mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 09:27:29 +00:00
34 lines
628 B
JavaScript
34 lines
628 B
JavaScript
const USER_VISIBLE_OBJECT_KEYS = new Set([
|
|
'accessibilityHint',
|
|
'accessibilityLabel',
|
|
'ariaLabel',
|
|
'badge',
|
|
'description',
|
|
'emptyText',
|
|
'error',
|
|
'headerTitle',
|
|
'helperText',
|
|
'keywords',
|
|
'label',
|
|
'message',
|
|
'placeholder',
|
|
'subtitle',
|
|
'title',
|
|
'toggleDescription',
|
|
'tooltip'
|
|
])
|
|
const NATIVE_DIALOG_OBJECT_KEYS = new Set([
|
|
'detail',
|
|
'buttons',
|
|
'body',
|
|
'buttonLabel',
|
|
'checkboxLabel'
|
|
])
|
|
|
|
export function isVisibleObjectKey(name, includeNativeDialogFields) {
|
|
return (
|
|
USER_VISIBLE_OBJECT_KEYS.has(name) ||
|
|
(includeNativeDialogFields && NATIVE_DIALOG_OBJECT_KEYS.has(name))
|
|
)
|
|
}
|