@oracle/oraclejet-core-pack 17.0.4 → 17.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/oj-c/ActionCard.json +1 -1
- package/oj-c/AreaChart.json +270 -178
- package/oj-c/Button.json +1 -1
- package/oj-c/ButtonsetMultiple.json +8 -8
- package/oj-c/ButtonsetSingle.json +8 -8
- package/oj-c/CardView.json +25 -12
- package/oj-c/Checkbox.json +4 -4
- package/oj-c/Checkboxset.json +92 -7
- package/oj-c/Collapsible.json +8 -8
- package/oj-c/ConveyorBelt.json +67 -5
- package/oj-c/DatePicker.json +96 -3
- package/oj-c/FilePicker.json +6 -6
- package/oj-c/FormControlWrapper/FormControlWrapper.js +54 -0
- package/oj-c/FormControlWrapper/index.js +6 -0
- package/oj-c/InputDateMask.json +16 -5
- package/oj-c/InputDatePicker.json +115 -58
- package/oj-c/InputDateText.json +62 -51
- package/oj-c/InputMonthMask.json +67 -149
- package/oj-c/InputNumber.json +25 -4
- package/oj-c/InputPassword.json +12 -1
- package/oj-c/InputSensitiveText.json +16 -5
- package/oj-c/InputText.json +23 -2
- package/oj-c/Legend.json +358 -321
- package/oj-c/LegendSection.json +1 -1
- package/oj-c/LineChart.json +270 -178
- package/oj-c/ListItemLayout.json +20 -0
- package/oj-c/ListView.json +84 -62
- package/oj-c/MenuButton.json +432 -4
- package/oj-c/MessageBanner.json +20 -17
- package/oj-c/MessageToast.json +21 -18
- package/oj-c/MeterBar.json +1627 -35
- package/oj-c/MeterCircle.json +1579 -6
- package/oj-c/Popup.json +56 -1
- package/oj-c/ProgressButton.json +567 -0
- package/oj-c/Radioset.json +92 -7
- package/oj-c/RatingGauge.json +2 -2
- package/oj-c/SelectMultiple.json +156 -10
- package/oj-c/SelectSingle.json +140 -11
- package/oj-c/SelectionCard.json +1 -2
- package/oj-c/Selector.json +11 -1
- package/oj-c/SelectorAll.json +11 -1
- package/oj-c/SplitMenuButton.json +161 -327
- package/oj-c/TabBar.json +169 -12
- package/oj-c/TabBarMixed.json +14 -14
- package/oj-c/Table.json +2117 -0
- package/oj-c/TagCloud.json +114 -8
- package/oj-c/TextArea.json +23 -2
- package/oj-c/action-card/component.json +4 -4
- package/oj-c/area-chart/__webdriver__/AreaChartWebElementBase.d.ts +2 -2
- package/oj-c/area-chart/__webdriver__/AreaChartWebElementBase.js +1 -1
- package/oj-c/area-chart/__webdriver__/AreaChartWebElementBase.js.map +1 -1
- package/oj-c/area-chart/area-chart.js +6 -5
- package/oj-c/area-chart/component.json +30 -5
- package/oj-c/area-chart-group/component.json +2 -2
- package/oj-c/area-chart-item/component.json +2 -2
- package/oj-c/area-chart-series/component.json +2 -2
- package/oj-c/avatar/component.json +3 -3
- package/oj-c/button/component.json +4 -4
- package/oj-c/buttonset-multiple/component.json +4 -4
- package/oj-c/buttonset-single/component.json +4 -4
- package/oj-c/card-view/__webdriver__/CardViewWebElement.js +5 -13
- package/oj-c/card-view/__webdriver__/CardViewWebElement.js.map +1 -1
- package/oj-c/card-view/card-view.js +7 -4
- package/oj-c/card-view/component.json +3 -3
- package/oj-c/checkbox/checkbox.js +1 -17
- package/oj-c/checkbox/component.json +3 -3
- package/oj-c/checkbox/useCheckboxPreact.js +26 -13
- package/oj-c/checkboxset/component.json +3 -3
- package/oj-c/checkboxset/useCheckboxsetPreact.js +17 -13
- package/oj-c/collapsible/component.json +3 -3
- package/oj-c/component.json +13 -5
- package/oj-c/conveyor-belt/component.json +3 -3
- package/oj-c/corepackbundle.js +1474 -315
- package/oj-c/date-picker/__webdriver__/DatePickerWebElementBase.d.ts +7 -0
- package/oj-c/date-picker/__webdriver__/DatePickerWebElementBase.js +9 -0
- package/oj-c/date-picker/__webdriver__/DatePickerWebElementBase.js.map +1 -1
- package/oj-c/date-picker/component.json +26 -5
- package/oj-c/date-picker/date-picker.js +3 -3
- package/oj-c/drag-handle/component.json +3 -3
- package/oj-c/drawer-layout/component.json +3 -3
- package/oj-c/drawer-popup/component.json +3 -3
- package/oj-c/editable-value/UNSAFE_useConverterLifecycle/useConverterLifecycle.js +3 -3
- package/oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue.js +2 -1
- package/oj-c/editable-value/UNSAFE_useValue/useValue.js +3 -3
- package/oj-c/editable-value/utils/utils.js +13 -1
- package/oj-c/file-picker/__webdriver__/FilePickerWebElement.js +20 -10
- package/oj-c/file-picker/__webdriver__/FilePickerWebElement.js.map +1 -1
- package/oj-c/file-picker/component.json +3 -3
- package/oj-c/form-layout/component.json +3 -3
- package/oj-c/highlight-text/component.json +3 -3
- package/oj-c/hooks/UNSAFE_useEditableValue/useEditableValue.js +36 -18
- package/oj-c/hooks/UNSAFE_useListData/useListData.js +10 -6
- package/oj-c/input-date-mask/component.json +3 -3
- package/oj-c/input-date-picker/__webdriver__/InputDatePickerWebElementBase.d.ts +7 -0
- package/oj-c/input-date-picker/__webdriver__/InputDatePickerWebElementBase.js +9 -0
- package/oj-c/input-date-picker/__webdriver__/InputDatePickerWebElementBase.js.map +1 -1
- package/oj-c/input-date-picker/component.json +29 -5
- package/oj-c/input-date-picker/input-date-picker.js +3 -2
- package/oj-c/input-date-picker/useInputDatePicker.js +2 -1
- package/oj-c/input-date-text/component.json +3 -3
- package/oj-c/input-month-mask/component.json +3 -3
- package/oj-c/input-number/__webdriver__/InputNumberWebElementBase.d.ts +1 -1
- package/oj-c/input-number/__webdriver__/InputNumberWebElementBase.js +1 -1
- package/oj-c/input-number/__webdriver__/InputNumberWebElementBase.js.map +1 -1
- package/oj-c/input-number/component.json +6 -6
- package/oj-c/input-number/useNumberInputTextPreact.js +3 -2
- package/oj-c/input-password/component.json +3 -3
- package/oj-c/input-password/useInputPasswordPreact.js +14 -11
- package/oj-c/input-sensitive-text/component.json +3 -3
- package/oj-c/input-sensitive-text/useInputSensitiveTextPreact.js +14 -11
- package/oj-c/input-text/component.json +3 -3
- package/oj-c/input-text/useInputTextPreact.js +4 -3
- package/oj-c/labelled-link/component.json +3 -3
- package/oj-c/legend/__webdriver__/LegendWebElementBase.d.ts +1 -1
- package/oj-c/legend/__webdriver__/LegendWebElementBase.js +1 -1
- package/oj-c/legend/__webdriver__/LegendWebElementBase.js.map +1 -1
- package/oj-c/legend/component.json +14 -3
- package/oj-c/legend/legend.js +5 -1
- package/oj-c/legend-item/component.json +2 -2
- package/oj-c/legend-section/component.json +2 -3
- package/oj-c/line-chart/__webdriver__/LineChartWebElementBase.d.ts +2 -2
- package/oj-c/line-chart/__webdriver__/LineChartWebElementBase.js +1 -1
- package/oj-c/line-chart/__webdriver__/LineChartWebElementBase.js.map +1 -1
- package/oj-c/line-chart/component.json +30 -5
- package/oj-c/line-chart/line-chart.js +6 -5
- package/oj-c/line-chart-group/component.json +2 -2
- package/oj-c/line-chart-item/component.json +2 -2
- package/oj-c/line-chart-series/component.json +2 -2
- package/oj-c/list-item-layout/__webdriver__/ListItemLayoutWebElementBase.d.ts +7 -0
- package/oj-c/list-item-layout/__webdriver__/ListItemLayoutWebElementBase.js +9 -0
- package/oj-c/list-item-layout/__webdriver__/ListItemLayoutWebElementBase.js.map +1 -1
- package/oj-c/list-item-layout/component.json +13 -3
- package/oj-c/list-item-layout/list-item-layout.js +4 -4
- package/oj-c/list-view/__webdriver__/ListViewWebElement.js +4 -13
- package/oj-c/list-view/__webdriver__/ListViewWebElement.js.map +1 -1
- package/oj-c/list-view/component.json +6 -3
- package/oj-c/list-view/list-view-styles.css +4 -0
- package/oj-c/list-view/list-view.js +9 -5
- package/oj-c/list-view/useHandleRemoveCurrentKey.js +13 -7
- package/oj-c/list-view/useListViewPreact.js +10 -6
- package/oj-c/menu-button/component.json +50 -5
- package/oj-c/message-banner/component.json +3 -3
- package/oj-c/message-toast/component.json +3 -3
- package/oj-c/metadata/allComponents.json +1967 -319
- package/oj-c/meter-bar/__webdriver__/MeterBarWebElementBase.d.ts +33 -0
- package/oj-c/meter-bar/__webdriver__/MeterBarWebElementBase.js +9 -0
- package/oj-c/meter-bar/__webdriver__/MeterBarWebElementBase.js.map +1 -1
- package/oj-c/meter-bar/component.json +215 -3
- package/oj-c/meter-bar/meter-bar.js +7 -5
- package/oj-c/meter-circle/__webdriver__/MeterCircleWebElementBase.d.ts +26 -0
- package/oj-c/meter-circle/__webdriver__/MeterCircleWebElementBase.js.map +1 -1
- package/oj-c/meter-circle/component.json +209 -3
- package/oj-c/meter-circle/meter-circle.js +5 -3
- package/oj-c/min/FormControlWrapper/FormControlWrapper.js +54 -0
- package/oj-c/min/FormControlWrapper/index.js +6 -0
- package/oj-c/min/area-chart.js +1 -1
- package/oj-c/min/area-chart.js.map +1 -1
- package/oj-c/min/card-view.js +1 -1
- package/oj-c/min/card-view.js.map +1 -1
- package/oj-c/min/checkbox.js +1 -1
- package/oj-c/min/checkbox.js.map +1 -1
- package/oj-c/min/checkboxset.js +1 -1
- package/oj-c/min/checkboxset.js.map +1 -1
- package/oj-c/min/corepackbundle.css +54 -1
- package/oj-c/min/corepackbundle.js +1 -1
- package/oj-c/min/corepackbundle.js.map +1 -1
- package/oj-c/min/date-picker.js +1 -1
- package/oj-c/min/date-picker.js.map +1 -1
- package/oj-c/min/editable-value/UNSAFE_useConverterLifecycle/useConverterLifecycle.js +3 -3
- package/oj-c/min/editable-value/UNSAFE_useEditableValue/useEditableValue.js +2 -1
- package/oj-c/min/editable-value/UNSAFE_useValue/useValue.js +3 -3
- package/oj-c/min/editable-value/utils/utils.js +13 -1
- package/oj-c/min/hooks/UNSAFE_useEditableValue/useEditableValue.js +36 -18
- package/oj-c/min/hooks/UNSAFE_useListData/useListData.js +10 -6
- package/oj-c/min/input-date-mask.js +1 -1
- package/oj-c/min/input-date-mask.js.map +1 -1
- package/oj-c/min/input-date-picker.js +2 -2
- package/oj-c/min/input-date-picker.js.map +1 -1
- package/oj-c/min/input-date-text.js +1 -1
- package/oj-c/min/input-date-text.js.map +1 -1
- package/oj-c/min/input-month-mask.js +1 -1
- package/oj-c/min/input-month-mask.js.map +1 -1
- package/oj-c/min/input-number.js +1 -1
- package/oj-c/min/input-number.js.map +1 -1
- package/oj-c/min/input-password.js +1 -1
- package/oj-c/min/input-password.js.map +1 -1
- package/oj-c/min/input-sensitive-text.js +1 -1
- package/oj-c/min/input-sensitive-text.js.map +1 -1
- package/oj-c/min/input-text.js +1 -1
- package/oj-c/min/input-text.js.map +1 -1
- package/oj-c/min/legend.js +1 -1
- package/oj-c/min/legend.js.map +1 -1
- package/oj-c/min/line-chart.js +1 -1
- package/oj-c/min/line-chart.js.map +1 -1
- package/oj-c/min/list-item-layout.js +1 -1
- package/oj-c/min/list-item-layout.js.map +1 -1
- package/oj-c/min/list-view/list-view-styles.css +4 -0
- package/oj-c/min/list-view.js +1 -1
- package/oj-c/min/list-view.js.map +1 -1
- package/oj-c/min/menu-button.js +1 -1
- package/oj-c/min/menu-button.js.map +1 -1
- package/oj-c/min/meter-bar.js +1 -1
- package/oj-c/min/meter-bar.js.map +1 -1
- package/oj-c/min/meter-circle.js +1 -1
- package/oj-c/min/meter-circle.js.map +1 -1
- package/oj-c/min/progress-button/progress-button-styles.css +12 -0
- package/oj-c/min/progress-button.js +2 -0
- package/oj-c/min/progress-button.js.map +1 -0
- package/oj-c/min/radioset.js +1 -1
- package/oj-c/min/radioset.js.map +1 -1
- package/oj-c/min/rating-gauge.js +1 -1
- package/oj-c/min/rating-gauge.js.map +1 -1
- package/oj-c/min/select-common/PRIVATE_DebouncingDataProviderView/Debouncer.js +78 -0
- package/oj-c/min/select-common/PRIVATE_DebouncingDataProviderView/DebouncingDataProviderView.js +92 -0
- package/oj-c/min/select-common/PRIVATE_useCache/index.js +6 -0
- package/oj-c/min/select-common/PRIVATE_useCache/useCache.js +30 -0
- package/oj-c/min/select-common/PRIVATE_useSelectData/CollectionTemplateDataProviderView.js +208 -0
- package/oj-c/min/select-common/PRIVATE_useSelectData/index.js +7 -0
- package/oj-c/min/select-common/PRIVATE_useSelectData/useCollectionTemplateDataProviderView.js +98 -0
- package/oj-c/min/select-common/PRIVATE_useSelectData/useSelectData.js +24 -0
- package/oj-c/min/select-common/UNSAFE_useDataProviderListeners/useDataProviderListeners.js +13 -4
- package/oj-c/min/select-common/UNSAFE_useWrapDataProvider/useWrapDataProvider.js +10 -6
- package/oj-c/min/select-multiple.js +2 -2
- package/oj-c/min/select-multiple.js.map +1 -1
- package/oj-c/min/select-single.js +2 -2
- package/oj-c/min/select-single.js.map +1 -1
- package/oj-c/min/selector.js +1 -1
- package/oj-c/min/selector.js.map +1 -1
- package/oj-c/min/split-menu-button.js +1 -1
- package/oj-c/min/split-menu-button.js.map +1 -1
- package/oj-c/min/tab-bar-mixed.js +1 -1
- package/oj-c/min/tab-bar-mixed.js.map +1 -1
- package/oj-c/min/tab-bar.js +1 -1
- package/oj-c/min/tab-bar.js.map +1 -1
- package/oj-c/min/table/table-styles.css +39 -0
- package/oj-c/min/table.js +2 -0
- package/oj-c/min/table.js.map +1 -0
- package/oj-c/min/tag-cloud.js +1 -1
- package/oj-c/min/tag-cloud.js.map +1 -1
- package/oj-c/min/text-area.js +1 -1
- package/oj-c/min/text-area.js.map +1 -1
- package/oj-c/min/utils/PRIVATE_ItemsMenu/items-menu.js +2 -2
- package/oj-c/popup/component.json +3 -3
- package/oj-c/progress-bar/component.json +3 -3
- package/oj-c/progress-button/__webdriver__/ProgressButtonWebElement.d.ts +16 -0
- package/oj-c/progress-button/__webdriver__/ProgressButtonWebElement.js +29 -0
- package/oj-c/progress-button/__webdriver__/ProgressButtonWebElement.js.map +1 -0
- package/oj-c/progress-button/__webdriver__/ProgressButtonWebElementBase.d.ts +72 -0
- package/oj-c/progress-button/__webdriver__/ProgressButtonWebElementBase.js +95 -0
- package/oj-c/progress-button/__webdriver__/ProgressButtonWebElementBase.js.map +1 -0
- package/oj-c/progress-button/__webdriver__/index.d.ts +17 -0
- package/oj-c/progress-button/__webdriver__/index.js +34 -0
- package/oj-c/progress-button/__webdriver__/index.js.map +1 -0
- package/oj-c/progress-button/component.json +258 -0
- package/oj-c/progress-button/index.js +6 -0
- package/oj-c/progress-button/progress-button-styles.css +12 -0
- package/oj-c/progress-button/progress-button.js +50 -0
- package/oj-c/progress-button.js +6 -0
- package/oj-c/progress-circle/component.json +3 -3
- package/oj-c/radioset/component.json +3 -3
- package/oj-c/radioset/useRadiosetPreact.js +9 -5
- package/oj-c/rating-gauge/component.json +3 -3
- package/oj-c/rating-gauge/rating-gauge.js +11 -3
- package/oj-c/select-common/PRIVATE_DebouncingDataProviderView/Debouncer.js +78 -0
- package/oj-c/select-common/PRIVATE_DebouncingDataProviderView/DebouncingDataProviderView.js +92 -0
- package/oj-c/select-common/PRIVATE_useCache/index.js +6 -0
- package/oj-c/select-common/PRIVATE_useCache/useCache.js +30 -0
- package/oj-c/select-common/PRIVATE_useSelectData/CollectionTemplateDataProviderView.js +208 -0
- package/oj-c/select-common/PRIVATE_useSelectData/index.js +7 -0
- package/oj-c/select-common/PRIVATE_useSelectData/useCollectionTemplateDataProviderView.js +98 -0
- package/oj-c/select-common/PRIVATE_useSelectData/useSelectData.js +24 -0
- package/oj-c/select-common/UNSAFE_useDataProviderListeners/useDataProviderListeners.js +13 -4
- package/oj-c/select-common/UNSAFE_useWrapDataProvider/useWrapDataProvider.js +10 -6
- package/oj-c/select-multiple/component.json +101 -67
- package/oj-c/select-multiple/select-multiple.js +2 -2
- package/oj-c/select-multiple/useSelectMultiplePreact.js +68 -27
- package/oj-c/select-single/component.json +37 -3
- package/oj-c/select-single/select-single.js +2 -2
- package/oj-c/select-single/useSelectSinglePreact.js +50 -18
- package/oj-c/selection-card/component.json +3 -3
- package/oj-c/selector/component.json +3 -3
- package/oj-c/selector/selector.js +2 -2
- package/oj-c/selector-all/component.json +3 -3
- package/oj-c/split-menu-button/component.json +21 -4
- package/oj-c/tab-bar/__webdriver__/TabBarWebElement.d.ts +29 -0
- package/oj-c/tab-bar/__webdriver__/TabBarWebElement.js +89 -0
- package/oj-c/tab-bar/__webdriver__/TabBarWebElement.js.map +1 -1
- package/oj-c/tab-bar/component.json +13 -3
- package/oj-c/tab-bar/tab-bar.js +10 -4
- package/oj-c/tab-bar-mixed/DataTabBarMixed.js +1 -1
- package/oj-c/tab-bar-mixed/__webdriver__/TabBarMixedWebElement.d.ts +15 -0
- package/oj-c/tab-bar-mixed/__webdriver__/TabBarMixedWebElement.js +36 -0
- package/oj-c/tab-bar-mixed/__webdriver__/TabBarMixedWebElement.js.map +1 -1
- package/oj-c/tab-bar-mixed/component.json +3 -3
- package/oj-c/tab-bar-mixed/tab-bar-mixed.js +2 -2
- package/oj-c/table/__webdriver__/TableWebElement.d.ts +106 -0
- package/oj-c/table/__webdriver__/TableWebElement.js +166 -0
- package/oj-c/table/__webdriver__/TableWebElement.js.map +1 -0
- package/oj-c/table/__webdriver__/TableWebElementBase.d.ts +153 -0
- package/oj-c/table/__webdriver__/TableWebElementBase.js +158 -0
- package/oj-c/table/__webdriver__/TableWebElementBase.js.map +1 -0
- package/oj-c/table/__webdriver__/index.d.ts +17 -0
- package/oj-c/table/__webdriver__/index.js +34 -0
- package/oj-c/table/__webdriver__/index.js.map +1 -0
- package/oj-c/table/component.json +703 -0
- package/oj-c/table/index.js +6 -0
- package/oj-c/table/table-styles.css +39 -0
- package/oj-c/table/table.js +353 -0
- package/oj-c/table.js +6 -0
- package/oj-c/tag-cloud/__webdriver__/TagCloudWebElementBase.d.ts +1 -1
- package/oj-c/tag-cloud/__webdriver__/TagCloudWebElementBase.js +1 -1
- package/oj-c/tag-cloud/__webdriver__/TagCloudWebElementBase.js.map +1 -1
- package/oj-c/tag-cloud/component.json +14 -3
- package/oj-c/tag-cloud/tag-cloud.js +4 -1
- package/oj-c/tag-cloud-item/component.json +2 -2
- package/oj-c/text-area/component.json +3 -3
- package/oj-c/text-area/useTextAreaAutosizePreact.js +2 -2
- package/oj-c/text-area/useTextAreaPreact.js +2 -2
- package/oj-c/toggle-button/component.json +3 -3
- package/oj-c/types/FormControlWrapper/FormControlWrapper.d.ts +36 -0
- package/oj-c/types/FormControlWrapper/index.d.ts +2 -0
- package/oj-c/types/checkbox/checkbox.d.ts +2 -1
- package/oj-c/types/checkbox/useCheckboxPreact.d.ts +3 -6
- package/oj-c/types/checkboxset/checkboxset.d.ts +3 -2
- package/oj-c/types/checkboxset/useCheckboxsetPreact.d.ts +3 -6
- package/oj-c/types/date-picker/date-picker.d.ts +6 -0
- package/oj-c/types/editable-value/UNSAFE_useConverterLifecycle/useConverterLifecycle.d.ts +3 -2
- package/oj-c/types/editable-value/UNSAFE_useValue/useValue.d.ts +1 -1
- package/oj-c/types/editable-value/utils/utils.d.ts +2 -0
- package/oj-c/types/hooks/UNSAFE_useEditableValue/useEditableValue.d.ts +3 -1
- package/oj-c/types/hooks/UNSAFE_useListData/useListData.d.ts +2 -1
- package/oj-c/types/input-date-mask/input-date-mask.d.ts +2 -1
- package/oj-c/types/input-date-picker/input-date-picker.d.ts +8 -2
- package/oj-c/types/input-date-picker/useInputDatePicker.d.ts +1 -0
- package/oj-c/types/input-date-text/useInputDateTextPreact.d.ts +1 -1
- package/oj-c/types/input-month-mask/input-month-mask.d.ts +2 -1
- package/oj-c/types/input-number/useNumberInputTextPreact.d.ts +1 -1
- package/oj-c/types/input-password/useInputPasswordPreact.d.ts +2 -4
- package/oj-c/types/input-sensitive-text/input-sensitive-text.d.ts +2 -1
- package/oj-c/types/input-sensitive-text/useInputSensitiveTextPreact.d.ts +2 -4
- package/oj-c/types/input-text/useInputTextPreact.d.ts +1 -1
- package/oj-c/types/legend-section/legend-section.d.ts +2 -2
- package/oj-c/types/list-item-layout/list-item-layout.d.ts +5 -0
- package/oj-c/types/list-view/list-view.d.ts +6 -4
- package/oj-c/types/list-view/useHandleRemoveCurrentKey.d.ts +4 -2
- package/oj-c/types/list-view/useListViewPreact.d.ts +1 -1
- package/oj-c/types/meter-bar/meter-bar.d.ts +6 -1
- package/oj-c/types/meter-circle/meter-circle.d.ts +1 -1
- package/oj-c/types/progress-button/index.d.ts +2 -0
- package/oj-c/types/progress-button/progress-button.d.ts +101 -0
- package/oj-c/types/radioset/radioset.d.ts +3 -2
- package/oj-c/types/radioset/useRadiosetPreact.d.ts +3 -6
- package/oj-c/types/rating-gauge/rating-gauge.d.ts +1 -1
- package/oj-c/types/select-common/PRIVATE_DebouncingDataProviderView/Debouncer.d.ts +11 -0
- package/oj-c/types/select-common/PRIVATE_DebouncingDataProviderView/DebouncingDataProviderView.d.ts +16 -0
- package/oj-c/types/select-common/PRIVATE_useCache/index.d.ts +1 -0
- package/oj-c/types/select-common/PRIVATE_useCache/useCache.d.ts +1 -0
- package/oj-c/types/select-common/PRIVATE_useSelectData/CollectionTemplateDataProviderView.d.ts +43 -0
- package/oj-c/types/select-common/PRIVATE_useSelectData/index.d.ts +2 -0
- package/oj-c/types/select-common/PRIVATE_useSelectData/useCollectionTemplateDataProviderView.d.ts +15 -0
- package/oj-c/types/select-common/PRIVATE_useSelectData/useSelectData.d.ts +15 -0
- package/oj-c/types/select-common/UNSAFE_useDataProviderListeners/useDataProviderListeners.d.ts +4 -4
- package/oj-c/types/select-common/UNSAFE_useWrapDataProvider/useWrapDataProvider.d.ts +2 -1
- package/oj-c/types/select-multiple/select-multiple.d.ts +26 -9
- package/oj-c/types/select-multiple/useSelectMultiplePreact.d.ts +28 -36
- package/oj-c/types/select-single/select-single.d.ts +26 -8
- package/oj-c/types/select-single/useSelectSinglePreact.d.ts +30 -53
- package/oj-c/types/tab-bar/tab-bar.d.ts +1 -0
- package/oj-c/types/table/index.d.ts +2 -0
- package/oj-c/types/table/table.d.ts +239 -0
- package/oj-c/types/text-area/useTextAreaAutosizePreact.d.ts +1 -1
- package/oj-c/types/text-area/useTextAreaPreact.d.ts +1 -1
- package/oj-c/types/utils/PRIVATE_ItemsMenu/items-menu.d.ts +3 -1
- package/oj-c/types/utils/UNSAFE_vizTypes/meterTypes.d.ts +2 -0
- package/oj-c/utils/PRIVATE_ItemsMenu/items-menu.js +2 -2
- package/package.json +4 -4
- package/webdriver/docs/assets/navigation.js +1 -1
- package/webdriver/docs/assets/search.js +1 -1
- package/webdriver/docs/classes/AreaChartWebElement.html +4 -3
- package/webdriver/docs/classes/DatePickerWebElement.html +5 -2
- package/webdriver/docs/classes/InputDatePickerWebElement.html +6 -2
- package/webdriver/docs/classes/InputNumberWebElement.html +1 -1
- package/webdriver/docs/classes/LegendWebElement.html +4 -3
- package/webdriver/docs/classes/LineChartWebElement.html +4 -3
- package/webdriver/docs/classes/ListItemLayoutWebElement.html +6 -2
- package/webdriver/docs/classes/MeterBarWebElement.html +6 -2
- package/webdriver/docs/classes/ProgressButtonWebElement.html +142 -0
- package/webdriver/docs/classes/TabBarMixedWebElement.html +11 -2
- package/webdriver/docs/classes/TabBarWebElement.html +18 -2
- package/webdriver/docs/classes/TableWebElement.html +192 -0
- package/webdriver/docs/classes/TagCloudWebElement.html +4 -3
- package/webdriver/docs/functions/findProgressButton.html +8 -0
- package/webdriver/docs/functions/findTable.html +8 -0
- package/webdriver/docs/modules.html +4 -0
- package/webdriver/index.d.ts +2 -0
- package/webdriver/index.js +2 -0
- package/webdriver/index.js.map +1 -1
- package/webdriver/index.ts +2 -0
package/oj-c/corepackbundle.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
;
|
|
2
|
-
define("corepackbundle", function(){});
|
|
3
|
-
|
|
4
1
|
define('oj-c/hooks/UNSAFE_useVisBusyState/useVisBusyState',["require", "exports", "preact/hooks", "ojs/ojcontext"], function (require, exports, hooks_1, Context) {
|
|
5
2
|
"use strict";
|
|
6
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -898,10 +895,11 @@ define('oj-c/area-chart/area-chart',["require", "exports", "preact/jsx-runtime",
|
|
|
898
895
|
"use strict";
|
|
899
896
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
900
897
|
exports.AreaChart = void 0;
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
898
|
+
const HIGHLIGHTED_DEFAULT = [];
|
|
899
|
+
const SELECTION_DEFAULT = [];
|
|
900
|
+
const HIDDEN_DEFAULT = [];
|
|
901
|
+
const LEGEND_DEFAULT = { rendered: 'on', position: 'auto' };
|
|
902
|
+
function AreaChartComp({ data, hideAndShowBehavior = 'none', orientation = 'vertical', xAxis, yAxis, hoverBehavior = 'none', valueFormats, plotArea, zoomAndScroll, itemTemplate, seriesTemplate, groupTemplate, seriesComparator, groupComparator, drilling = 'off', hiddenCategories = HIDDEN_DEFAULT, highlightedCategories = HIGHLIGHTED_DEFAULT, highlightMatch = 'any', selection = SELECTION_DEFAULT, selectionMode = 'none', timeAxisType, stack = 'off', legend = LEGEND_DEFAULT, ...props }) {
|
|
905
903
|
const rootRef = (0, hooks_1.useRef)(null);
|
|
906
904
|
const addBusyState = (0, useVisBusyState_1.useVisBusyState)(rootRef, 'oj-c-area-chart');
|
|
907
905
|
const { series, groups, getDataItem, isLoading } = (0, useChartData_1.useChartData)(data, addBusyState, itemTemplate, seriesTemplate, groupTemplate, 'oj-c-area-chart-item', 'oj-c-area-chart-series', 'oj-c-area-chart-group', seriesComparator, groupComparator);
|
|
@@ -939,7 +937,7 @@ define('oj-c/area-chart/area-chart',["require", "exports", "preact/jsx-runtime",
|
|
|
939
937
|
const chartLegend = isLegendRendered && legendData.length > 0 ? ((0, jsx_runtime_1.jsx)(UNSAFE_Legend_1.Legend, { items: legendData, orientation: legendPosition === 'start' || legendPosition === 'end' ? 'vertical' : 'horizontal', isReadOnly: !isLegendInteractive, highlightedIds: highlightedIds.length === 0 ? undefined : highlightedIds, hiddenIds: hiddenIds.length === 0 ? undefined : hiddenIds, symbolHeight: legend.symbolHeight, symbolWidth: legend.symbolWidth, onItemAction: legendItemActionHandler, onItemHover: legendItemInputHandler, onItemFocus: legendItemInputHandler })) : undefined;
|
|
940
938
|
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { ref: rootRef, children: (0, jsx_runtime_1.jsx)(UNSAFE_VisProgressiveLoader_1.VisProgressiveLoader, { isLoading: isLoading, type: "area", "aria-label": props['aria-label'], "aria-describedBy": props['aria-describedby'], "aria-labelledBy": props['aria-labelledby'], children: (0, jsx_runtime_1.jsx)(UNSAFE_ChartWithLegend_1.ChartWithLegend, { chart: chart, position: legendPosition, maxSize: legend.maxSize, size: legend.size, legend: chartLegend }) }) }));
|
|
941
939
|
}
|
|
942
|
-
exports.AreaChart = (0, ojvcomponent_1.registerCustomElement)('oj-c-area-chart', AreaChartComp, "AreaChart", { "properties": { "data": { "type": "DataProvider|null" }, "seriesComparator": { "type": "function" }, "groupComparator": { "type": "function" }, "stack": { "type": "string", "enumValues": ["off", "on"] }, "drilling": { "type": "string", "enumValues": ["off", "on"] }, "orientation": { "type": "string", "enumValues": ["horizontal", "vertical"] }, "timeAxisType": { "type": "string", "enumValues": ["enabled", "mixedFrequency", "skipGaps"] }, "yAxis": { "type": "object", "properties": { "dataMax": { "type": "number" }, "dataMin": { "type": "number" }, "max": { "type": "number" }, "min": { "type": "number" }, "majorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "minorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "tickLabel": { "type": "object", "properties": { "converter": { "type": "object" }, "rendered": { "type": "string", "enumValues": ["off", "on"] }, "style": { "type": "object" } } }, "viewportMin": { "type": "number" }, "viewportMax": { "type": "number" }, "step": { "type": "number" }, "size": { "type": "number" }, "scale": { "type": "string", "enumValues": ["linear", "log"] }, "title": { "type": "string" }, "titleStyle": { "type": "object" } } }, "xAxis": { "type": "object", "properties": { "majorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "minorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "tickLabel": { "type": "object", "properties": { "converter": { "type": "object|" }, "rendered": { "type": "string", "enumValues": ["off", "on"] }, "rotation": { "type": "string", "enumValues": ["auto", "none"] }, "style": { "type": "object" } } }, "viewportMin": { "type": "number" }, "viewportMax": { "type": "number" }, "step": { "type": "number" }, "size": { "type": "number" }, "scale": { "type": "string", "enumValues": ["linear", "log"] }, "title": { "type": "string" }, "titleStyle": { "type": "object" } } }, "plotArea": { "type": "object", "properties": { "backgroundColor": { "type": "string" } } }, "zoomAndScroll": { "type": "string", "enumValues": ["off", "live"] }, "valueFormats": { "type": "object", "properties": { "group": { "type": "object", "properties": { "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } }, "series": { "type": "object", "properties": { "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } }, "value": { "type": "object", "properties": { "converter": { "type": "object" }, "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } } } }, "selectionMode": { "type": "string", "enumValues": ["none", "multiple", "single"] }, "selection": { "type": "Array<any>", "writeback": true }, "hiddenCategories": { "type": "Array<string>", "writeback": true }, "dragMode": { "type": "string", "enumValues": ["pan", "select", "off", "user", "zoom"] }, "highlightedCategories": { "type": "Array<string>", "writeback": true }, "hideAndShowBehavior": { "type": "string", "enumValues": ["none", "withoutRescale", "withRescale"] }, "hoverBehavior": { "type": "string", "enumValues": ["none", "dim"] }, "highlightMatch": { "type": "string", "enumValues": ["all", "any"] }, "legend": { "type": "object", "properties": { "position": { "type": "string", "enumValues": ["auto", "end", "start", "top", "bottom"] }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] }, "maxSize": { "type": "number|string" }, "size": { "type": "number|string" }, "symbolHeight": { "type": "number" }, "symbolWidth": { "type": "number" } } } }, "slots": { "itemTemplate": { "data": {} }, "seriesTemplate": { "data": {} }, "groupTemplate": { "data": {} } }, "events": { "ojViewportChange": {}, "ojItemDrill": {}, "ojGroupDrill": {}, "ojSeriesDrill": {} }, "extension": { "_WRITEBACK_PROPS": ["selection", "hiddenCategories", "highlightedCategories"], "_READ_ONLY_PROPS": [], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "aria-describedby", "aria-labelledby"] } }, { "hideAndShowBehavior": "none", "orientation": "vertical", "hoverBehavior": "none", "drilling": "off", "hiddenCategories": [], "highlightedCategories": [], "highlightMatch": "any", "selection": [], "selectionMode": "none", "stack": "off", "legend": { "rendered": "on", "position": "auto" } }, {
|
|
940
|
+
exports.AreaChart = (0, ojvcomponent_1.registerCustomElement)('oj-c-area-chart', AreaChartComp, "AreaChart", { "properties": { "data": { "type": "DataProvider|null" }, "seriesComparator": { "type": "function" }, "groupComparator": { "type": "function" }, "stack": { "type": "string", "enumValues": ["off", "on"] }, "drilling": { "type": "string", "enumValues": ["off", "on"] }, "orientation": { "type": "string", "enumValues": ["horizontal", "vertical"] }, "timeAxisType": { "type": "string", "enumValues": ["enabled", "mixedFrequency", "skipGaps"] }, "yAxis": { "type": "object", "properties": { "dataMax": { "type": "number" }, "dataMin": { "type": "number" }, "max": { "type": "number" }, "min": { "type": "number" }, "majorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "minorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "tickLabel": { "type": "object", "properties": { "converter": { "type": "object" }, "rendered": { "type": "string", "enumValues": ["off", "on"] }, "style": { "type": "object" } } }, "viewportMin": { "type": "number" }, "viewportMax": { "type": "number" }, "step": { "type": "number" }, "size": { "type": "number" }, "scale": { "type": "string", "enumValues": ["linear", "log"] }, "title": { "type": "string" }, "titleStyle": { "type": "object" } } }, "xAxis": { "type": "object", "properties": { "majorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "minorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "tickLabel": { "type": "object", "properties": { "converter": { "type": "object|Array<object>" }, "rendered": { "type": "string", "enumValues": ["off", "on"] }, "rotation": { "type": "string", "enumValues": ["auto", "none"] }, "style": { "type": "object" } } }, "viewportMin": { "type": "number" }, "viewportMax": { "type": "number" }, "step": { "type": "number" }, "size": { "type": "number" }, "scale": { "type": "string", "enumValues": ["linear", "log"] }, "title": { "type": "string" }, "titleStyle": { "type": "object" } } }, "plotArea": { "type": "object", "properties": { "backgroundColor": { "type": "string" } } }, "zoomAndScroll": { "type": "string", "enumValues": ["off", "live"] }, "valueFormats": { "type": "object", "properties": { "group": { "type": "object", "properties": { "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } }, "series": { "type": "object", "properties": { "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } }, "value": { "type": "object", "properties": { "converter": { "type": "object" }, "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } } } }, "selectionMode": { "type": "string", "enumValues": ["none", "multiple", "single"] }, "selection": { "type": "Array<any>", "writeback": true }, "hiddenCategories": { "type": "Array<string>", "writeback": true }, "dragMode": { "type": "string", "enumValues": ["pan", "select", "off", "user", "zoom"] }, "highlightedCategories": { "type": "Array<string>", "writeback": true }, "hideAndShowBehavior": { "type": "string", "enumValues": ["none", "withoutRescale", "withRescale"] }, "hoverBehavior": { "type": "string", "enumValues": ["none", "dim"] }, "highlightMatch": { "type": "string", "enumValues": ["all", "any"] }, "legend": { "type": "object", "properties": { "position": { "type": "string", "enumValues": ["auto", "end", "start", "top", "bottom"] }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] }, "maxSize": { "type": "number|string" }, "size": { "type": "number|string" }, "symbolHeight": { "type": "number" }, "symbolWidth": { "type": "number" } } } }, "slots": { "itemTemplate": { "data": {} }, "seriesTemplate": { "data": {} }, "groupTemplate": { "data": {} } }, "events": { "ojViewportChange": {}, "ojItemDrill": {}, "ojGroupDrill": {}, "ojSeriesDrill": {} }, "extension": { "_WRITEBACK_PROPS": ["selection", "hiddenCategories", "highlightedCategories"], "_READ_ONLY_PROPS": [], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "aria-describedby", "aria-labelledby"] } }, { "hideAndShowBehavior": "none", "orientation": "vertical", "hoverBehavior": "none", "drilling": "off", "hiddenCategories": [], "highlightedCategories": [], "highlightMatch": "any", "selection": [], "selectionMode": "none", "stack": "off", "legend": { "rendered": "on", "position": "auto" } }, {
|
|
943
941
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
944
942
|
});
|
|
945
943
|
});
|
|
@@ -1015,7 +1013,7 @@ define('oj-c/date-picker/date-picker',["require", "exports", "preact/jsx-runtime
|
|
|
1015
1013
|
"use strict";
|
|
1016
1014
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1017
1015
|
exports.DatePicker = void 0;
|
|
1018
|
-
exports.DatePicker = (0, ojvcomponent_1.registerCustomElement)('oj-c-date-picker', ({ dayFormatter, daysOutsideMonth = 'hidden', monthAndYearPicker = 'on', max = null, maxWidth, min = null, readonly = false, todayButton = 'visible', todayTimeZone, value = null, width, onValueChanged, ...otherProps }) => {
|
|
1016
|
+
exports.DatePicker = (0, ojvcomponent_1.registerCustomElement)('oj-c-date-picker', ({ dayFormatter, daysOutsideMonth = 'hidden', monthAndYearPicker = 'on', max = null, maxWidth, min = null, readonly = false, todayButton = 'visible', todayTimeZone, value = null, width, weekDisplay = 'none', onValueChanged, ...otherProps }) => {
|
|
1019
1017
|
if (!UNSAFE_IntlDateTime_1.DateTimeUtils.isDateOnlyIsoString(value)) {
|
|
1020
1018
|
throw new Error('value must be a date-only ISO string');
|
|
1021
1019
|
}
|
|
@@ -1040,8 +1038,8 @@ define('oj-c/date-picker/date-picker',["require", "exports", "preact/jsx-runtime
|
|
|
1040
1038
|
: onValueChanged(null);
|
|
1041
1039
|
}
|
|
1042
1040
|
}, [onValueChanged]);
|
|
1043
|
-
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { id: otherProps.id, children: (0, jsx_runtime_1.jsx)(UNSAFE_DatePicker_1.DatePicker, { dayFormatter: dayFormatter ?? undefined, daysOutsideMonth: daysOutsideMonth, monthAndYearPicker: monthAndYearPicker, max: maxCalendarDate, min: minCalendarDate, isReadonly: readonly, todayButton: todayButton, todayTimeZone: todayTimeZone ?? undefined, value: valueCalendarDate, width: width, maxWidth: maxWidth, onCommit: onCommitHandler }) }));
|
|
1044
|
-
}, "DatePicker", { "properties": { "dayFormatter": { "type": "function" }, "daysOutsideMonth": { "type": "string", "enumValues": ["hidden", "selectable"] }, "monthAndYearPicker": { "type": "string", "enumValues": ["off", "on"] }, "max": { "type": "string|null" }, "maxWidth": { "type": "number|string" }, "min": { "type": "string|null" }, "readonly": { "type": "boolean" }, "todayButton": { "type": "string", "enumValues": ["hidden", "visible"] }, "todayTimeZone": { "type": "string" }, "value": { "type": "string|null", "writeback": true }, "width": { "type": "number|string" } }, "extension": { "_WRITEBACK_PROPS": ["value"], "_READ_ONLY_PROPS": [], "_OBSERVED_GLOBAL_PROPS": ["aria-describedby", "id"] } }, { "daysOutsideMonth": "hidden", "monthAndYearPicker": "on", "max": null, "min": null, "readonly": false, "todayButton": "visible", "value": null }, {
|
|
1041
|
+
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { id: otherProps.id, children: (0, jsx_runtime_1.jsx)(UNSAFE_DatePicker_1.DatePicker, { dayFormatter: dayFormatter ?? undefined, daysOutsideMonth: daysOutsideMonth, monthAndYearPicker: monthAndYearPicker, max: maxCalendarDate, min: minCalendarDate, isReadonly: readonly, todayButton: todayButton, todayTimeZone: todayTimeZone ?? undefined, value: valueCalendarDate, weekDisplay: weekDisplay, width: width, maxWidth: maxWidth, onCommit: onCommitHandler }) }));
|
|
1042
|
+
}, "DatePicker", { "properties": { "dayFormatter": { "type": "function" }, "daysOutsideMonth": { "type": "string", "enumValues": ["hidden", "selectable"] }, "monthAndYearPicker": { "type": "string", "enumValues": ["off", "on"] }, "max": { "type": "string|null" }, "maxWidth": { "type": "number|string" }, "min": { "type": "string|null" }, "readonly": { "type": "boolean" }, "todayButton": { "type": "string", "enumValues": ["hidden", "visible"] }, "todayTimeZone": { "type": "string" }, "value": { "type": "string|null", "writeback": true }, "weekDisplay": { "type": "string", "enumValues": ["number", "none"] }, "width": { "type": "number|string" } }, "extension": { "_WRITEBACK_PROPS": ["value"], "_READ_ONLY_PROPS": [], "_OBSERVED_GLOBAL_PROPS": ["aria-describedby", "id"] } }, { "daysOutsideMonth": "hidden", "monthAndYearPicker": "on", "max": null, "min": null, "readonly": false, "todayButton": "visible", "value": null, "weekDisplay": "none" }, {
|
|
1045
1043
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
1046
1044
|
}, { consume: [UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
1047
1045
|
});
|
|
@@ -1217,7 +1215,7 @@ define('oj-c/input-date-text/useImplicitDateRangeValidator',["require", "exports
|
|
|
1217
1215
|
define('oj-c/editable-value/utils/utils',["require", "exports"], function (require, exports) {
|
|
1218
1216
|
"use strict";
|
|
1219
1217
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1220
|
-
exports.isShallowEqual = exports.normalizeValue = exports.treatNull = exports.createMessageFromError = void 0;
|
|
1218
|
+
exports.isShallowEqual = exports.normalizeValue = exports.treatNull = exports.getVirtualKeyboardHintFromConverter = exports.createMessageFromError = void 0;
|
|
1221
1219
|
function createMessageFromError(error) {
|
|
1222
1220
|
if (typeof error.getMessage === 'function') {
|
|
1223
1221
|
return {
|
|
@@ -1228,6 +1226,18 @@ define('oj-c/editable-value/utils/utils',["require", "exports"], function (requi
|
|
|
1228
1226
|
return { severity: 'error', detail: error.message };
|
|
1229
1227
|
}
|
|
1230
1228
|
exports.createMessageFromError = createMessageFromError;
|
|
1229
|
+
function getVirtualKeyboardHintFromConverter(converter) {
|
|
1230
|
+
let virtualKeyboardHint;
|
|
1231
|
+
if (converter && converter.resolvedOptions) {
|
|
1232
|
+
const resOptions = converter.resolvedOptions();
|
|
1233
|
+
virtualKeyboardHint = resOptions?.virtualKeyboardHint ?? 'text';
|
|
1234
|
+
}
|
|
1235
|
+
else {
|
|
1236
|
+
virtualKeyboardHint = 'text';
|
|
1237
|
+
}
|
|
1238
|
+
return virtualKeyboardHint;
|
|
1239
|
+
}
|
|
1240
|
+
exports.getVirtualKeyboardHintFromConverter = getVirtualKeyboardHintFromConverter;
|
|
1231
1241
|
function treatNull(value, defaultValue) {
|
|
1232
1242
|
if (value === null) {
|
|
1233
1243
|
return defaultValue;
|
|
@@ -1603,6 +1613,14 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
1603
1613
|
});
|
|
1604
1614
|
return true;
|
|
1605
1615
|
}, [dispatch, onMessagesCustomChanged, onRawValueChanged, onValidChanged, onValueChanged]);
|
|
1616
|
+
const validateDeferredSync = (0, hooks_1.useCallback)((value) => {
|
|
1617
|
+
const valueToSendToDeferredValidation = typeof value === 'string' ? value.trim() : value;
|
|
1618
|
+
const deferredValidate = (0, validationUtils_1.validateSync)({
|
|
1619
|
+
validators: deferredValidators ?? [],
|
|
1620
|
+
value: valueToSendToDeferredValidation
|
|
1621
|
+
});
|
|
1622
|
+
return deferredValidate;
|
|
1623
|
+
}, [deferredValidators]);
|
|
1606
1624
|
const refreshDisplayValue = (0, hooks_1.useCallback)((value) => {
|
|
1607
1625
|
let newDisplayValue;
|
|
1608
1626
|
if (!converter) {
|
|
@@ -1664,7 +1682,7 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
1664
1682
|
return true;
|
|
1665
1683
|
}
|
|
1666
1684
|
const errors = [];
|
|
1667
|
-
const deferredValidate = (
|
|
1685
|
+
const deferredValidate = validateDeferredSync(value);
|
|
1668
1686
|
deferredValidate.result === 'failure' && errors.push(...deferredValidate.errors);
|
|
1669
1687
|
let nonDeferredValidate = undefined;
|
|
1670
1688
|
if (value !== null && value !== undefined) {
|
|
@@ -1703,7 +1721,15 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
1703
1721
|
}
|
|
1704
1722
|
resolver?.();
|
|
1705
1723
|
return !hasSyncError && !hasAsyncError;
|
|
1706
|
-
}, [
|
|
1724
|
+
}, [
|
|
1725
|
+
addBusyState,
|
|
1726
|
+
_dispatch,
|
|
1727
|
+
deferredValidators,
|
|
1728
|
+
messagesCustom,
|
|
1729
|
+
setStaleIdentity,
|
|
1730
|
+
validateDeferredSync,
|
|
1731
|
+
validators
|
|
1732
|
+
]);
|
|
1707
1733
|
const runFullValidationAndUpdateValue = async () => {
|
|
1708
1734
|
if (disabled || readonly)
|
|
1709
1735
|
return;
|
|
@@ -1726,15 +1752,21 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
1726
1752
|
}
|
|
1727
1753
|
return validationResult;
|
|
1728
1754
|
}, [addBusyState, fullValidate, setStaleIdentity]);
|
|
1755
|
+
const onCommitValue = (0, hooks_1.useCallback)(async (value, doCommitOnValid = true) => {
|
|
1756
|
+
const validated = await validateValueOnInternalChange(value);
|
|
1757
|
+
validated && doCommitOnValid && _dispatch(reducer_1.updateValue, value);
|
|
1758
|
+
return validated;
|
|
1759
|
+
}, [_dispatch, validateValueOnInternalChange]);
|
|
1729
1760
|
const onCommit = (0, hooks_1.useCallback)(async ({ value }) => {
|
|
1730
1761
|
const parsedValueOrSymbol = normalizeAndParseValue(value);
|
|
1731
1762
|
if (parsedValueOrSymbol === ConverterErrorSymbol) {
|
|
1732
|
-
return;
|
|
1763
|
+
return false;
|
|
1733
1764
|
}
|
|
1734
1765
|
const parsedValue = parsedValueOrSymbol;
|
|
1735
|
-
const
|
|
1736
|
-
|
|
1737
|
-
|
|
1766
|
+
const succeeded = await onCommitValue(parsedValue);
|
|
1767
|
+
succeeded && refreshDisplayValue(parsedValue);
|
|
1768
|
+
return succeeded;
|
|
1769
|
+
}, [onCommitValue, normalizeAndParseValue, refreshDisplayValue]);
|
|
1738
1770
|
const onInput = (0, hooks_1.useCallback)(({ value }) => {
|
|
1739
1771
|
_dispatch(reducer_1.updateDisplayValue, value ?? defaultDisplayValue);
|
|
1740
1772
|
}, [_dispatch, defaultDisplayValue]);
|
|
@@ -1772,14 +1804,11 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
1772
1804
|
const reset = (0, hooks_1.useCallback)(() => {
|
|
1773
1805
|
_dispatch(reducer_1.clearAllMessages);
|
|
1774
1806
|
const valueToValidate = state.value;
|
|
1775
|
-
const validated = (
|
|
1776
|
-
validators: deferredValidators ?? [],
|
|
1777
|
-
value: valueToValidate
|
|
1778
|
-
});
|
|
1807
|
+
const validated = validateDeferredSync(valueToValidate);
|
|
1779
1808
|
validated.result === 'failure' && _dispatch(reducer_1.updateHiddenMessages, validated.errors);
|
|
1780
1809
|
_dispatch(reducer_1.updateValidStatus, validated.result === 'failure' ? 'invalidHidden' : 'valid');
|
|
1781
1810
|
refreshDisplayValue(state.value);
|
|
1782
|
-
}, [
|
|
1811
|
+
}, [_dispatch, refreshDisplayValue, state.value, validateDeferredSync]);
|
|
1783
1812
|
const showMessages = (0, hooks_1.useCallback)(() => {
|
|
1784
1813
|
if (state.hiddenMessages && state.hiddenMessages.length > 0) {
|
|
1785
1814
|
_dispatch(reducer_1.showHiddenMessages);
|
|
@@ -1790,7 +1819,7 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
1790
1819
|
_dispatch(reducer_1.updatePreviousValue, value);
|
|
1791
1820
|
if (value !== state.value) {
|
|
1792
1821
|
_dispatch(reducer_1.clearAllMessages);
|
|
1793
|
-
const validated = (
|
|
1822
|
+
const validated = validateDeferredSync(value);
|
|
1794
1823
|
validated.result === 'success' && _dispatch(reducer_1.updateValidStatus, 'valid');
|
|
1795
1824
|
validated.result === 'failure' &&
|
|
1796
1825
|
_dispatch(reducer_1.updateValidStatus, 'invalidHidden') &&
|
|
@@ -1841,10 +1870,7 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
1841
1870
|
case 'valid':
|
|
1842
1871
|
const newValue = getValueForValidation();
|
|
1843
1872
|
if (newValue !== ConverterErrorSymbol) {
|
|
1844
|
-
const deferredValidate = (
|
|
1845
|
-
validators: deferredValidators ?? [],
|
|
1846
|
-
value: newValue
|
|
1847
|
-
});
|
|
1873
|
+
const deferredValidate = validateDeferredSync(newValue);
|
|
1848
1874
|
deferredValidate.result === 'failure' &&
|
|
1849
1875
|
_dispatch(reducer_1.updateHiddenMessages, deferredValidate.errors) &&
|
|
1850
1876
|
_dispatch(reducer_1.updateValidStatus, 'invalidHidden');
|
|
@@ -1874,10 +1900,10 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
1874
1900
|
_dispatch(reducer_1.updatePreviousReadonly, readonly);
|
|
1875
1901
|
_dispatch(reducer_1.updateCustomMessages, messagesCustom);
|
|
1876
1902
|
if (!disabled && !readonly) {
|
|
1877
|
-
const validated = (
|
|
1903
|
+
const validated = validateDeferredSync(value);
|
|
1878
1904
|
validated.result === 'failure' &&
|
|
1879
1905
|
_dispatch(reducer_1.updateHiddenMessages, validated.errors) &&
|
|
1880
|
-
_dispatch(reducer_1.updateValidStatus, 'invalidHidden');
|
|
1906
|
+
_dispatch(reducer_1.updateValidStatus, (0, utils_1.hasErrorMessages)(messagesCustom) ? 'invalidShown' : 'invalidHidden');
|
|
1881
1907
|
validated.result === 'success' &&
|
|
1882
1908
|
_dispatch(reducer_1.updateValidStatus, (0, utils_1.hasErrorMessages)(messagesCustom) ? 'invalidShown' : 'valid') &&
|
|
1883
1909
|
refreshDisplayValue(value);
|
|
@@ -1895,6 +1921,8 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
1895
1921
|
showMessages,
|
|
1896
1922
|
validate
|
|
1897
1923
|
},
|
|
1924
|
+
onCommitValue,
|
|
1925
|
+
refreshDisplayValue,
|
|
1898
1926
|
textFieldProps: {
|
|
1899
1927
|
'aria-describedby': ariaDescribedBy,
|
|
1900
1928
|
messages: displayOptions?.messages !== 'none' ? state.shownMessages : undefined,
|
|
@@ -2407,7 +2435,8 @@ define('oj-c/input-date-picker/useInputDatePicker',["require", "exports", "@orac
|
|
|
2407
2435
|
todayButton: props.todayButton,
|
|
2408
2436
|
userAssistanceDensity: inputDateMaskProps.userAssistanceDensity,
|
|
2409
2437
|
value: inputDateMaskProps.value,
|
|
2410
|
-
variant: variant
|
|
2438
|
+
variant: variant,
|
|
2439
|
+
weekDisplay: props.weekDisplay
|
|
2411
2440
|
},
|
|
2412
2441
|
rootProps: {
|
|
2413
2442
|
id: props.id,
|
|
@@ -2454,7 +2483,7 @@ define('oj-c/input-date-picker/input-date-picker',["require", "exports", "preact
|
|
|
2454
2483
|
};
|
|
2455
2484
|
const messagesCustomDefault = [];
|
|
2456
2485
|
const validatorsDefault = [];
|
|
2457
|
-
function InputDatePickerImpl({ columnSpan = 1, daysOutsideMonth = 'hidden', disabled = false, displayOptions = displayOptionsDefault, help = helpDefault, helpHints = helpHintsDefault, messagesCustom = messagesCustomDefault, monthAndYearPicker = 'on', required = false, todayButton = 'visible', validators = validatorsDefault, value = null, ...otherProps }, ref) {
|
|
2486
|
+
function InputDatePickerImpl({ columnSpan = 1, daysOutsideMonth = 'hidden', disabled = false, displayOptions = displayOptionsDefault, help = helpDefault, helpHints = helpHintsDefault, messagesCustom = messagesCustomDefault, monthAndYearPicker = 'on', required = false, todayButton = 'visible', validators = validatorsDefault, value = null, weekDisplay = 'none', ...otherProps }, ref) {
|
|
2458
2487
|
const { formContextValue, inputDatePickerProps, rootProps } = (0, useInputDatePicker_1.useInputDatePicker)({
|
|
2459
2488
|
columnSpan,
|
|
2460
2489
|
daysOutsideMonth,
|
|
@@ -2468,11 +2497,12 @@ define('oj-c/input-date-picker/input-date-picker',["require", "exports", "preact
|
|
|
2468
2497
|
todayButton,
|
|
2469
2498
|
validators,
|
|
2470
2499
|
value,
|
|
2500
|
+
weekDisplay,
|
|
2471
2501
|
...otherProps
|
|
2472
2502
|
}, ref);
|
|
2473
2503
|
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { ...rootProps, children: (0, jsx_runtime_1.jsx)(UNSAFE_useFormContext_1.FormContext.Provider, { value: formContextValue, children: (0, jsx_runtime_1.jsx)(UNSAFE_InputDatePicker_1.InputDatePicker, { ...inputDatePickerProps }) }) }));
|
|
2474
2504
|
}
|
|
2475
|
-
exports.InputDatePicker = (0, ojvcomponent_1.registerCustomElement)('oj-c-input-date-picker', (0, compat_1.forwardRef)(InputDatePickerImpl), "InputDatePicker", { "properties": { "columnSpan": { "type": "number" }, "containerReadonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "dateRangeOverflowMessageDetail": { "type": "function" }, "dateRangeUnderflowMessageDetail": { "type": "function" }, "dateRestrictionMessageDetail": { "type": "function" }, "dayFormatter": { "type": "function" }, "daysOutsideMonth": { "type": "string", "enumValues": ["hidden", "selectable"] }, "disabled": { "type": "boolean" }, "displayOptions": { "type": "object", "properties": { "messages": { "type": "string", "enumValues": ["none", "display"] }, "validatorHint": { "type": "string", "enumValues": ["none", "display"] } } }, "help": { "type": "object", "properties": { "instruction": { "type": "string" } } }, "helpHints": { "type": "object", "properties": { "definition": { "type": "string" }, "source": { "type": "string" }, "sourceText": { "type": "string" } } }, "labelEdge": { "type": "string", "enumValues": ["none", "start", "top", "inside"], "binding": { "consume": { "name": "containerLabelEdge" } } }, "labelHint": { "type": "string" }, "labelStartWidth": { "type": "number|string", "binding": { "consume": { "name": "labelWidth" } } }, "labelWrapping": { "type": "string", "enumValues": ["truncate", "wrap"], "binding": { "consume": { "name": "labelWrapping" } } }, "max": { "type": "string|null" }, "messagesCustom": { "type": "Array<object>", "writeback": true }, "min": { "type": "string|null" }, "monthAndYearPicker": { "type": "string", "enumValues": ["off", "on"] }, "readonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "required": { "type": "boolean" }, "requiredMessageDetail": { "type": "string" }, "textAlign": { "type": "string", "enumValues": ["end", "start", "right"] }, "todayTimeZone": { "type": "string" }, "todayButton": { "type": "string", "enumValues": ["hidden", "visible"] }, "userAssistanceDensity": { "type": "string", "enumValues": ["compact", "reflow", "efficient"], "binding": { "consume": { "name": "containerUserAssistanceDensity" } } }, "validators": { "type": "Array<object>|null" }, "value": { "type": "string|null", "writeback": true }, "rawValue": { "type": "object", "properties": { "year": { "type": "number" }, "month": { "type": "number" }, "day": { "type": "number" } }, "readOnly": true, "writeback": true }, "valid": { "type": "string", "enumValues": ["pending", "valid", "invalidHidden", "invalidShown"], "readOnly": true, "writeback": true } }, "extension": { "_WRITEBACK_PROPS": ["messagesCustom", "rawValue", "valid", "value"], "_READ_ONLY_PROPS": ["rawValue", "valid"], "_OBSERVED_GLOBAL_PROPS": ["aria-describedby", "id"] }, "methods": { "blur": {}, "focus": {}, "showMessages": {}, "reset": {}, "validate": {} } }, { "columnSpan": 1, "daysOutsideMonth": "hidden", "disabled": false, "displayOptions": { "messages": "display", "validatorHint": "display" }, "help": { "instruction": "" }, "helpHints": { "definition": "", "source": "" }, "messagesCustom": [], "monthAndYearPicker": "on", "required": false, "todayButton": "visible", "validators": [], "value": null }, {
|
|
2505
|
+
exports.InputDatePicker = (0, ojvcomponent_1.registerCustomElement)('oj-c-input-date-picker', (0, compat_1.forwardRef)(InputDatePickerImpl), "InputDatePicker", { "properties": { "columnSpan": { "type": "number" }, "containerReadonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "dateRangeOverflowMessageDetail": { "type": "function" }, "dateRangeUnderflowMessageDetail": { "type": "function" }, "dateRestrictionMessageDetail": { "type": "function" }, "dayFormatter": { "type": "function" }, "daysOutsideMonth": { "type": "string", "enumValues": ["hidden", "selectable"] }, "disabled": { "type": "boolean" }, "displayOptions": { "type": "object", "properties": { "messages": { "type": "string", "enumValues": ["none", "display"] }, "validatorHint": { "type": "string", "enumValues": ["none", "display"] } } }, "help": { "type": "object", "properties": { "instruction": { "type": "string" } } }, "helpHints": { "type": "object", "properties": { "definition": { "type": "string" }, "source": { "type": "string" }, "sourceText": { "type": "string" } } }, "labelEdge": { "type": "string", "enumValues": ["none", "start", "top", "inside"], "binding": { "consume": { "name": "containerLabelEdge" } } }, "labelHint": { "type": "string" }, "labelStartWidth": { "type": "number|string", "binding": { "consume": { "name": "labelWidth" } } }, "labelWrapping": { "type": "string", "enumValues": ["truncate", "wrap"], "binding": { "consume": { "name": "labelWrapping" } } }, "max": { "type": "string|null" }, "messagesCustom": { "type": "Array<object>", "writeback": true }, "min": { "type": "string|null" }, "monthAndYearPicker": { "type": "string", "enumValues": ["off", "on"] }, "readonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "required": { "type": "boolean" }, "requiredMessageDetail": { "type": "string" }, "textAlign": { "type": "string", "enumValues": ["end", "start", "right"] }, "todayTimeZone": { "type": "string" }, "todayButton": { "type": "string", "enumValues": ["hidden", "visible"] }, "userAssistanceDensity": { "type": "string", "enumValues": ["compact", "reflow", "efficient"], "binding": { "consume": { "name": "containerUserAssistanceDensity" } } }, "validators": { "type": "Array<object>|null" }, "value": { "type": "string|null", "writeback": true }, "weekDisplay": { "type": "string", "enumValues": ["number", "none"] }, "rawValue": { "type": "object", "properties": { "year": { "type": "number" }, "month": { "type": "number" }, "day": { "type": "number" } }, "readOnly": true, "writeback": true }, "valid": { "type": "string", "enumValues": ["pending", "valid", "invalidHidden", "invalidShown"], "readOnly": true, "writeback": true } }, "extension": { "_WRITEBACK_PROPS": ["messagesCustom", "rawValue", "valid", "value"], "_READ_ONLY_PROPS": ["rawValue", "valid"], "_OBSERVED_GLOBAL_PROPS": ["aria-describedby", "id"] }, "methods": { "blur": {}, "focus": {}, "showMessages": {}, "reset": {}, "validate": {} } }, { "columnSpan": 1, "daysOutsideMonth": "hidden", "disabled": false, "displayOptions": { "messages": "display", "validatorHint": "display" }, "help": { "instruction": "" }, "helpHints": { "definition": "", "source": "" }, "messagesCustom": [], "monthAndYearPicker": "on", "required": false, "todayButton": "visible", "validators": [], "value": null, "weekDisplay": "none" }, {
|
|
2476
2506
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
2477
2507
|
}, { consume: [UNSAFE_useFormVariantContext_1.FormVariantContext, UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
2478
2508
|
});
|
|
@@ -3088,7 +3118,7 @@ define('oj-c/editable-value/UNSAFE_useConverterLifecycle/useConverterLifecycle',
|
|
|
3088
3118
|
"use strict";
|
|
3089
3119
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3090
3120
|
exports.useConverterLifecycle = void 0;
|
|
3091
|
-
function useConverterLifecycle({ converter, validationState, refreshDisplayValue, runFullValidationAndUpdateValue }) {
|
|
3121
|
+
function useConverterLifecycle({ converter, validationState, value, refreshDisplayValue, runFullValidationAndUpdateValue }) {
|
|
3092
3122
|
const prevConverterRef = (0, hooks_1.useRef)(converter);
|
|
3093
3123
|
(0, hooks_1.useEffect)(() => {
|
|
3094
3124
|
if (prevConverterRef.current === converter) {
|
|
@@ -3103,10 +3133,10 @@ define('oj-c/editable-value/UNSAFE_useConverterLifecycle/useConverterLifecycle',
|
|
|
3103
3133
|
case 'valid':
|
|
3104
3134
|
case 'invalidHidden':
|
|
3105
3135
|
default:
|
|
3106
|
-
refreshDisplayValue();
|
|
3136
|
+
value && refreshDisplayValue(value);
|
|
3107
3137
|
break;
|
|
3108
3138
|
}
|
|
3109
|
-
}, [converter, validationState, refreshDisplayValue, runFullValidationAndUpdateValue]);
|
|
3139
|
+
}, [converter, validationState, refreshDisplayValue, runFullValidationAndUpdateValue, value]);
|
|
3110
3140
|
}
|
|
3111
3141
|
exports.useConverterLifecycle = useConverterLifecycle;
|
|
3112
3142
|
});
|
|
@@ -3450,13 +3480,13 @@ define('oj-c/editable-value/UNSAFE_useValue/useValue',["require", "exports", "@o
|
|
|
3450
3480
|
setValueAfterValidation: (0, hooks_1.useCallback)((value) => {
|
|
3451
3481
|
setValue(value);
|
|
3452
3482
|
setDisplayValue(format(value));
|
|
3453
|
-
}, [format]),
|
|
3483
|
+
}, [format, setDisplayValue, setValue]),
|
|
3454
3484
|
setDisplayValue,
|
|
3455
3485
|
setTransientValue,
|
|
3456
3486
|
setValue,
|
|
3457
|
-
refreshDisplayValue: (0, hooks_1.useCallback)(() => {
|
|
3487
|
+
refreshDisplayValue: (0, hooks_1.useCallback)((value) => {
|
|
3458
3488
|
setDisplayValue(format(value));
|
|
3459
|
-
}, [
|
|
3489
|
+
}, [format, setDisplayValue])
|
|
3460
3490
|
};
|
|
3461
3491
|
}
|
|
3462
3492
|
exports.useValue = useValue;
|
|
@@ -3544,6 +3574,7 @@ define('oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue',["require"
|
|
|
3544
3574
|
(0, useConverterLifecycle_1.useConverterLifecycle)({
|
|
3545
3575
|
converter,
|
|
3546
3576
|
validationState,
|
|
3577
|
+
value: valueProp,
|
|
3547
3578
|
refreshDisplayValue,
|
|
3548
3579
|
runFullValidationAndUpdateValue
|
|
3549
3580
|
});
|
|
@@ -3580,7 +3611,7 @@ define('oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue',["require"
|
|
|
3580
3611
|
const reset = (0, hooks_1.useCallback)(() => {
|
|
3581
3612
|
clearAllMessages();
|
|
3582
3613
|
validateValueOnExternalChange(value);
|
|
3583
|
-
refreshDisplayValue();
|
|
3614
|
+
refreshDisplayValue(value);
|
|
3584
3615
|
}, [value, clearAllMessages, refreshDisplayValue, validateValueOnExternalChange]);
|
|
3585
3616
|
const validate = (0, hooks_1.useCallback)(async () => {
|
|
3586
3617
|
if (readonly || disabled) {
|
|
@@ -3754,7 +3785,7 @@ define('oj-c/input-number/stepBasisUtils',["require", "exports"], function (requ
|
|
|
3754
3785
|
}
|
|
3755
3786
|
});
|
|
3756
3787
|
|
|
3757
|
-
define('oj-c/input-number/useNumberInputTextPreact',["require", "exports", "oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue", "oj-c/editable-value/UNSAFE_useValidators/useValidators", "./useImplicitNumberConverter", "./useImplicitNumberRangeValidator", "preact/hooks", "oj-c/editable-value/utils/utils", "./stepBasisUtils"], function (require, exports, useEditableValue_1, useValidators_1, useImplicitNumberConverter_1, useImplicitNumberRangeValidator_1, hooks_1, utils_1, stepBasisUtils_1) {
|
|
3788
|
+
define('oj-c/input-number/useNumberInputTextPreact',["require", "exports", "oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue", "oj-c/editable-value/UNSAFE_useValidators/useValidators", "./useImplicitNumberConverter", "./useImplicitNumberRangeValidator", "preact/hooks", "oj-c/editable-value/utils/utils", "./stepBasisUtils", "oj-c/editable-value/utils/utils"], function (require, exports, useEditableValue_1, useValidators_1, useImplicitNumberConverter_1, useImplicitNumberRangeValidator_1, hooks_1, utils_1, stepBasisUtils_1, utils_2) {
|
|
3758
3789
|
"use strict";
|
|
3759
3790
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3760
3791
|
exports.useNumberInputTextPreact = void 0;
|
|
@@ -3893,6 +3924,7 @@ define('oj-c/input-number/useNumberInputTextPreact',["require", "exports", "oj-c
|
|
|
3893
3924
|
await onCommitValue(parsedValue);
|
|
3894
3925
|
}, [onCommitValue, normalizeAndParseValue]);
|
|
3895
3926
|
const valueText = calculateValueText(hasUncommittedDisplayValue, displayValue, valueNow, format);
|
|
3927
|
+
const normalizedVirtualKeyboard = virtualKeyboard === 'auto' ? (0, utils_2.getVirtualKeyboardHintFromConverter)(converter) : virtualKeyboard;
|
|
3896
3928
|
return {
|
|
3897
3929
|
value,
|
|
3898
3930
|
setValue,
|
|
@@ -3929,7 +3961,7 @@ define('oj-c/input-number/useNumberInputTextPreact',["require", "exports", "oj-c
|
|
|
3929
3961
|
(displayValue === '' && maxTreatNull === 0))),
|
|
3930
3962
|
textAlign,
|
|
3931
3963
|
userAssistanceDensity,
|
|
3932
|
-
virtualKeyboard,
|
|
3964
|
+
virtualKeyboard: normalizedVirtualKeyboard,
|
|
3933
3965
|
...textFieldPropsWithOverride
|
|
3934
3966
|
}
|
|
3935
3967
|
};
|
|
@@ -4030,33 +4062,43 @@ define('oj-c/input-number',["require", "exports", "oj-c/input-number/input-numbe
|
|
|
4030
4062
|
Object.defineProperty(exports, "InputNumber", { enumerable: true, get: function () { return input_number_1.InputNumber; } });
|
|
4031
4063
|
});
|
|
4032
4064
|
|
|
4033
|
-
define('oj-c/
|
|
4065
|
+
define('oj-c/hooks/UNSAFE_useEditableValue/index',["require", "exports", "./useEditableValue"], function (require, exports, useEditableValue_1) {
|
|
4066
|
+
"use strict";
|
|
4067
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4068
|
+
exports.useEditableValue = void 0;
|
|
4069
|
+
Object.defineProperty(exports, "useEditableValue", { enumerable: true, get: function () { return useEditableValue_1.useEditableValue; } });
|
|
4070
|
+
});
|
|
4071
|
+
|
|
4072
|
+
define('oj-c/input-password/useInputPasswordPreact',["require", "exports", "oj-c/editable-value/utils/utils", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators", "oj-c/hooks/UNSAFE_useEditableValue/index"], function (require, exports, utils_1, useDeferredValidators_1, index_1) {
|
|
4034
4073
|
"use strict";
|
|
4035
4074
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4036
4075
|
exports.useInputPasswordPreact = void 0;
|
|
4037
4076
|
function useInputPasswordPreact({ autocomplete = 'on', autofocus, clearIcon = 'never', disabled, displayOptions, labelEdge, labelHint, labelStartWidth, maskIcon, messagesCustom, placeholder, readonly, required, requiredMessageDetail, textAlign, userAssistanceDensity, validators, value: propValue, onMessagesCustomChanged, onRawValueChanged, onValidChanged, onValueChanged, ...otherProps }, addBusyState) {
|
|
4038
|
-
const
|
|
4077
|
+
const deferredValidators = (0, useDeferredValidators_1.useDeferredValidators)({
|
|
4078
|
+
labelHint,
|
|
4079
|
+
required,
|
|
4080
|
+
requiredMessageDetail
|
|
4081
|
+
});
|
|
4082
|
+
const { methods, textFieldProps, value } = (0, index_1.useEditableValue)({
|
|
4083
|
+
addBusyState,
|
|
4039
4084
|
ariaDescribedBy: otherProps['aria-describedby'],
|
|
4085
|
+
defaultDisplayValue: '',
|
|
4086
|
+
deferredValidators,
|
|
4040
4087
|
disabled,
|
|
4041
4088
|
displayOptions,
|
|
4042
4089
|
messagesCustom,
|
|
4043
|
-
readonly,
|
|
4044
|
-
required,
|
|
4045
|
-
requiredMessageDetail,
|
|
4046
|
-
validators,
|
|
4047
|
-
value: propValue,
|
|
4048
|
-
addBusyState,
|
|
4049
4090
|
onMessagesCustomChanged,
|
|
4050
4091
|
onRawValueChanged,
|
|
4051
4092
|
onValidChanged,
|
|
4052
|
-
onValueChanged
|
|
4093
|
+
onValueChanged,
|
|
4094
|
+
readonly,
|
|
4095
|
+
validators: (0, utils_1.treatNull)(validators, undefined),
|
|
4096
|
+
value: propValue
|
|
4053
4097
|
});
|
|
4054
4098
|
const hasNoValue = value === null || (typeof value === 'string' && value === '');
|
|
4055
4099
|
const hasClearIcon = clearIcon === 'conditional' ? 'conditionally' : clearIcon;
|
|
4056
4100
|
const hasRevealToggle = maskIcon === 'hidden' ? 'never' : 'always';
|
|
4057
4101
|
return {
|
|
4058
|
-
value,
|
|
4059
|
-
setValue,
|
|
4060
4102
|
methods,
|
|
4061
4103
|
inputPasswordProps: {
|
|
4062
4104
|
autoComplete: autocomplete,
|
|
@@ -4156,33 +4198,36 @@ define('oj-c/input-password',["require", "exports", "oj-c/input-password/input-p
|
|
|
4156
4198
|
Object.defineProperty(exports, "InputPassword", { enumerable: true, get: function () { return input_password_1.InputPassword; } });
|
|
4157
4199
|
});
|
|
4158
4200
|
|
|
4159
|
-
define('oj-c/input-sensitive-text/useInputSensitiveTextPreact',["require", "exports", "oj-c/editable-value/UNSAFE_useEditableValue/
|
|
4201
|
+
define('oj-c/input-sensitive-text/useInputSensitiveTextPreact',["require", "exports", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators", "oj-c/hooks/UNSAFE_useEditableValue/index", "oj-c/editable-value/utils/utils"], function (require, exports, useDeferredValidators_1, index_1, utils_1) {
|
|
4160
4202
|
"use strict";
|
|
4161
4203
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4162
4204
|
exports.useInputSensitiveTextPreact = void 0;
|
|
4163
4205
|
function useInputSensitiveTextPreact({ autofocus, clearIcon = 'never', disabled, displayOptions, labelEdge, labelHint, labelStartWidth, length, maskIcon, maskIconLabel, messagesCustom, placeholder, readonly, required, requiredMessageDetail, textAlign, userAssistanceDensity, validators, value: propValue, virtualKeyboard, onMessagesCustomChanged, onRawValueChanged, onValidChanged, onValueChanged, ...otherProps }, addBusyState) {
|
|
4164
|
-
const
|
|
4206
|
+
const deferredValidators = (0, useDeferredValidators_1.useDeferredValidators)({
|
|
4207
|
+
labelHint,
|
|
4208
|
+
required,
|
|
4209
|
+
requiredMessageDetail
|
|
4210
|
+
});
|
|
4211
|
+
const { methods, textFieldProps, value } = (0, index_1.useEditableValue)({
|
|
4212
|
+
addBusyState,
|
|
4165
4213
|
ariaDescribedBy: otherProps['aria-describedby'],
|
|
4214
|
+
defaultDisplayValue: '',
|
|
4215
|
+
deferredValidators,
|
|
4166
4216
|
disabled,
|
|
4167
4217
|
displayOptions,
|
|
4168
4218
|
messagesCustom,
|
|
4169
|
-
readonly,
|
|
4170
|
-
required,
|
|
4171
|
-
requiredMessageDetail,
|
|
4172
|
-
validators,
|
|
4173
|
-
value: propValue,
|
|
4174
|
-
addBusyState,
|
|
4175
4219
|
onMessagesCustomChanged,
|
|
4176
4220
|
onRawValueChanged,
|
|
4177
4221
|
onValidChanged,
|
|
4178
|
-
onValueChanged
|
|
4222
|
+
onValueChanged,
|
|
4223
|
+
readonly,
|
|
4224
|
+
validators: (0, utils_1.treatNull)(validators, undefined),
|
|
4225
|
+
value: propValue
|
|
4179
4226
|
});
|
|
4180
4227
|
const hasNoValue = value === null || (typeof value === 'string' && value === '');
|
|
4181
4228
|
const hasClearIcon = clearIcon === 'conditional' ? 'conditionally' : clearIcon;
|
|
4182
4229
|
const hasRevealToggle = maskIcon === 'hidden' ? 'never' : 'always';
|
|
4183
4230
|
return {
|
|
4184
|
-
value,
|
|
4185
|
-
setValue,
|
|
4186
4231
|
methods,
|
|
4187
4232
|
inputSensitiveTextProps: {
|
|
4188
4233
|
...textFieldProps,
|
|
@@ -4293,14 +4338,7 @@ define('oj-c/input-sensitive-text',["require", "exports", "oj-c/input-sensitive-
|
|
|
4293
4338
|
Object.defineProperty(exports, "InputSensitiveText", { enumerable: true, get: function () { return input_sensitive_text_1.InputSensitiveText; } });
|
|
4294
4339
|
});
|
|
4295
4340
|
|
|
4296
|
-
define('oj-c/
|
|
4297
|
-
"use strict";
|
|
4298
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4299
|
-
exports.useEditableValue = void 0;
|
|
4300
|
-
Object.defineProperty(exports, "useEditableValue", { enumerable: true, get: function () { return useEditableValue_1.useEditableValue; } });
|
|
4301
|
-
});
|
|
4302
|
-
|
|
4303
|
-
define('oj-c/input-text/useInputTextPreact',["require", "exports", "oj-c/editable-value/utils/utils", "oj-c/hooks/UNSAFE_useEditableValue/index", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators"], function (require, exports, utils_1, index_1, useDeferredValidators_1) {
|
|
4341
|
+
define('oj-c/input-text/useInputTextPreact',["require", "exports", "oj-c/editable-value/utils/utils", "oj-c/hooks/UNSAFE_useEditableValue/index", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators", "oj-c/editable-value/utils/utils"], function (require, exports, utils_1, index_1, useDeferredValidators_1, utils_2) {
|
|
4304
4342
|
"use strict";
|
|
4305
4343
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4306
4344
|
exports.useInputTextPreact = void 0;
|
|
@@ -4324,11 +4362,12 @@ define('oj-c/input-text/useInputTextPreact',["require", "exports", "oj-c/editabl
|
|
|
4324
4362
|
onValidChanged,
|
|
4325
4363
|
onValueChanged,
|
|
4326
4364
|
readonly,
|
|
4327
|
-
validators: validators
|
|
4365
|
+
validators: (0, utils_1.treatNull)(validators, undefined),
|
|
4328
4366
|
value: propValue
|
|
4329
4367
|
});
|
|
4330
4368
|
const hasNoValue = value === null || (typeof value === 'string' && value === '');
|
|
4331
4369
|
const hasClearIcon = clearIcon === 'conditional' ? 'conditionally' : clearIcon;
|
|
4370
|
+
const normalizedVirtualKeyboard = virtualKeyboard === 'auto' ? (0, utils_2.getVirtualKeyboardHintFromConverter)(converter) : virtualKeyboard;
|
|
4332
4371
|
return {
|
|
4333
4372
|
methods,
|
|
4334
4373
|
inputTextProps: {
|
|
@@ -4351,7 +4390,7 @@ define('oj-c/input-text/useInputTextPreact',["require", "exports", "oj-c/editabl
|
|
|
4351
4390
|
suffix: inputSuffix,
|
|
4352
4391
|
textAlign,
|
|
4353
4392
|
userAssistanceDensity,
|
|
4354
|
-
virtualKeyboard,
|
|
4393
|
+
virtualKeyboard: normalizedVirtualKeyboard,
|
|
4355
4394
|
...textFieldProps
|
|
4356
4395
|
}
|
|
4357
4396
|
};
|
|
@@ -4486,7 +4525,7 @@ define('oj-c/message-toast',["require", "exports", "oj-c/message-toast/message-t
|
|
|
4486
4525
|
Object.defineProperty(exports, "MessageToast", { enumerable: true, get: function () { return message_toast_1.MessageToast; } });
|
|
4487
4526
|
});
|
|
4488
4527
|
|
|
4489
|
-
define('oj-c/text-area/useTextAreaAutosizePreact',["require", "exports", "oj-c/hooks/UNSAFE_useEditableValue/index", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators"], function (require, exports, index_1, useDeferredValidators_1) {
|
|
4528
|
+
define('oj-c/text-area/useTextAreaAutosizePreact',["require", "exports", "oj-c/hooks/UNSAFE_useEditableValue/index", "oj-c/editable-value/utils/utils", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators"], function (require, exports, index_1, utils_1, useDeferredValidators_1) {
|
|
4490
4529
|
"use strict";
|
|
4491
4530
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4492
4531
|
exports.useTextAreaAutosizePreact = void 0;
|
|
@@ -4506,7 +4545,7 @@ define('oj-c/text-area/useTextAreaAutosizePreact',["require", "exports", "oj-c/h
|
|
|
4506
4545
|
displayOptions,
|
|
4507
4546
|
messagesCustom,
|
|
4508
4547
|
readonly,
|
|
4509
|
-
validators: validators
|
|
4548
|
+
validators: (0, utils_1.treatNull)(validators, undefined),
|
|
4510
4549
|
value: propValue,
|
|
4511
4550
|
onMessagesCustomChanged,
|
|
4512
4551
|
onRawValueChanged,
|
|
@@ -4542,7 +4581,7 @@ define('oj-c/text-area/useTextAreaAutosizePreact',["require", "exports", "oj-c/h
|
|
|
4542
4581
|
exports.useTextAreaAutosizePreact = useTextAreaAutosizePreact;
|
|
4543
4582
|
});
|
|
4544
4583
|
|
|
4545
|
-
define('oj-c/text-area/useTextAreaPreact',["require", "exports", "oj-c/hooks/UNSAFE_useEditableValue/index", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators"], function (require, exports, index_1, useDeferredValidators_1) {
|
|
4584
|
+
define('oj-c/text-area/useTextAreaPreact',["require", "exports", "oj-c/hooks/UNSAFE_useEditableValue/index", "oj-c/editable-value/utils/utils", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators"], function (require, exports, index_1, utils_1, useDeferredValidators_1) {
|
|
4546
4585
|
"use strict";
|
|
4547
4586
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4548
4587
|
exports.useTextAreaPreact = void 0;
|
|
@@ -4562,7 +4601,7 @@ define('oj-c/text-area/useTextAreaPreact',["require", "exports", "oj-c/hooks/UNS
|
|
|
4562
4601
|
displayOptions,
|
|
4563
4602
|
messagesCustom,
|
|
4564
4603
|
readonly,
|
|
4565
|
-
validators: validators
|
|
4604
|
+
validators: (0, utils_1.treatNull)(validators, undefined),
|
|
4566
4605
|
value: propValue,
|
|
4567
4606
|
onMessagesCustomChanged,
|
|
4568
4607
|
onRawValueChanged,
|
|
@@ -4866,31 +4905,44 @@ define('oj-c/button',["require", "exports", "oj-c/button/button"], function (req
|
|
|
4866
4905
|
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return button_1.Button; } });
|
|
4867
4906
|
});
|
|
4868
4907
|
|
|
4869
|
-
define('oj-c/checkbox/useCheckboxPreact',["require", "exports", "preact/hooks", "oj-c/
|
|
4908
|
+
define('oj-c/checkbox/useCheckboxPreact',["require", "exports", "preact/hooks", "oj-c/hooks/UNSAFE_useEditableValue/index", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslationBundle"], function (require, exports, hooks_1, index_1, UNSAFE_useTranslationBundle_1) {
|
|
4870
4909
|
"use strict";
|
|
4871
4910
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4872
4911
|
exports.useCheckboxPreact = void 0;
|
|
4873
|
-
function useCheckboxPreact({ ['aria-describedby']: ariaDescribedBy, disabled, displayOptions, messagesCustom, readonly, requiredMessageDetail, required, userAssistanceDensity, value: propValue, onMessagesCustomChanged, onValidChanged, onValueChanged
|
|
4874
|
-
const
|
|
4912
|
+
function useCheckboxPreact({ ['aria-describedby']: ariaDescribedBy, disabled, displayOptions, messagesCustom, readonly, requiredMessageDetail: propRequiredMessageDetail, required, userAssistanceDensity, value: propValue, onMessagesCustomChanged, onValidChanged, onValueChanged }, addBusyState) {
|
|
4913
|
+
const translations = (0, UNSAFE_useTranslationBundle_1.useTranslationBundle)('@oracle/oraclejet-preact');
|
|
4914
|
+
const requiredMessageDetail = propRequiredMessageDetail || translations.checkbox_requiredMessageDetail();
|
|
4915
|
+
const deferredValidators = (0, hooks_1.useMemo)(() => {
|
|
4916
|
+
return [
|
|
4917
|
+
{
|
|
4918
|
+
validate: (value) => {
|
|
4919
|
+
if (required && value !== true) {
|
|
4920
|
+
throw new Error(requiredMessageDetail);
|
|
4921
|
+
}
|
|
4922
|
+
return;
|
|
4923
|
+
}
|
|
4924
|
+
}
|
|
4925
|
+
];
|
|
4926
|
+
}, [requiredMessageDetail, required]);
|
|
4927
|
+
const { methods, onCommitValue, displayValue, refreshDisplayValue, textFieldProps } = (0, index_1.useEditableValue)({
|
|
4928
|
+
addBusyState,
|
|
4875
4929
|
ariaDescribedBy,
|
|
4930
|
+
defaultDisplayValue: false,
|
|
4931
|
+
deferredValidators,
|
|
4876
4932
|
disabled,
|
|
4877
4933
|
displayOptions,
|
|
4878
4934
|
messagesCustom,
|
|
4879
|
-
readonly,
|
|
4880
|
-
required,
|
|
4881
|
-
requiredMessageDetail,
|
|
4882
|
-
value: propValue,
|
|
4883
|
-
addBusyState,
|
|
4884
4935
|
onMessagesCustomChanged,
|
|
4885
4936
|
onValidChanged,
|
|
4886
4937
|
onValueChanged,
|
|
4887
|
-
|
|
4938
|
+
readonly,
|
|
4939
|
+
value: propValue
|
|
4888
4940
|
});
|
|
4889
4941
|
const onCommitHandler = (0, hooks_1.useCallback)(async ({ value }) => {
|
|
4890
|
-
const
|
|
4891
|
-
const newValue =
|
|
4892
|
-
|
|
4893
|
-
}, [onCommitValue]);
|
|
4942
|
+
const commitSucceeded = await onCommitValue(value);
|
|
4943
|
+
const newValue = commitSucceeded ? value : false;
|
|
4944
|
+
refreshDisplayValue(newValue);
|
|
4945
|
+
}, [onCommitValue, refreshDisplayValue]);
|
|
4894
4946
|
const checkboxProps = {
|
|
4895
4947
|
'aria-describedby': textFieldProps['aria-describedby'],
|
|
4896
4948
|
isRequired: required,
|
|
@@ -4910,7 +4962,7 @@ define('oj-c/checkbox/useCheckboxPreact',["require", "exports", "preact/hooks",
|
|
|
4910
4962
|
});
|
|
4911
4963
|
|
|
4912
4964
|
|
|
4913
|
-
define('oj-c/checkbox/checkbox',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "preact/hooks", "preact/compat", "ojs/ojcontext", "ojs/ojvcomponent", "@oracle/oraclejet-preact/UNSAFE_Checkbox", "@oracle/oraclejet-preact/hooks/UNSAFE_useFormContext", "oj-c/hooks/UNSAFE_useMergedFormContext/useMergedFormContext", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "@oracle/oraclejet-preact/
|
|
4965
|
+
define('oj-c/checkbox/checkbox',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "preact/hooks", "preact/compat", "ojs/ojcontext", "ojs/ojvcomponent", "@oracle/oraclejet-preact/UNSAFE_Checkbox", "@oracle/oraclejet-preact/hooks/UNSAFE_useFormContext", "oj-c/hooks/UNSAFE_useMergedFormContext/useMergedFormContext", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "@oracle/oraclejet-preact/utils/UNSAFE_styles/Layout", "oj-c/editable-value/UNSAFE_useAssistiveText/useAssistiveText", "./useCheckboxPreact", "css!oj-c/checkbox/checkbox-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, hooks_1, compat_1, Context, ojvcomponent_1, UNSAFE_Checkbox_1, UNSAFE_useFormContext_1, useMergedFormContext_1, UNSAFE_useTabbableMode_1, Layout_1, useAssistiveText_1, useCheckboxPreact_1) {
|
|
4914
4966
|
"use strict";
|
|
4915
4967
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4916
4968
|
exports.Checkbox = void 0;
|
|
@@ -4928,20 +4980,6 @@ define('oj-c/checkbox/checkbox',["require", "exports", "preact/jsx-runtime", '@o
|
|
|
4928
4980
|
const FunctionalCheckbox = (0, compat_1.forwardRef)(({ ['aria-describedby']: ariaDescribedBy, children, columnSpan = 1, containerReadonly: propContainerReadonly, disabled = false, displayOptions = displayOptionsDefault, help = helpDefault, helpHints = helpHintsDefault, id, messagesCustom = messagesCustomDefault, onMessagesCustomChanged, onValidChanged, onValueChanged, readonly: propReadonly, required = false, requiredMessageDetail, userAssistanceDensity: propUserAssistanceDensity, value = false }, ref) => {
|
|
4929
4981
|
const rootRef = (0, hooks_1.useRef)();
|
|
4930
4982
|
const checkboxRef = (0, hooks_1.useRef)();
|
|
4931
|
-
const translations = (0, UNSAFE_useTranslationBundle_1.useTranslationBundle)('@oracle/oraclejet-preact');
|
|
4932
|
-
const errorMessage = requiredMessageDetail || translations.checkbox_requiredMessageDetail();
|
|
4933
|
-
const validators = (0, hooks_1.useMemo)(() => {
|
|
4934
|
-
return [
|
|
4935
|
-
{
|
|
4936
|
-
validate: (value) => {
|
|
4937
|
-
if (required && value !== true) {
|
|
4938
|
-
throw new Error(errorMessage);
|
|
4939
|
-
}
|
|
4940
|
-
return;
|
|
4941
|
-
}
|
|
4942
|
-
}
|
|
4943
|
-
];
|
|
4944
|
-
}, [errorMessage, required]);
|
|
4945
4983
|
const addBusyState = (0, hooks_1.useCallback)((description) => {
|
|
4946
4984
|
return rootRef.current
|
|
4947
4985
|
? Context.getContext(rootRef.current)
|
|
@@ -4967,7 +5005,6 @@ define('oj-c/checkbox/checkbox',["require", "exports", "preact/jsx-runtime", '@o
|
|
|
4967
5005
|
required,
|
|
4968
5006
|
requiredMessageDetail,
|
|
4969
5007
|
userAssistanceDensity: uadValue,
|
|
4970
|
-
validators,
|
|
4971
5008
|
value
|
|
4972
5009
|
}, addBusyState);
|
|
4973
5010
|
(0, hooks_1.useImperativeHandle)(ref, () => ({
|
|
@@ -4979,7 +5016,6 @@ define('oj-c/checkbox/checkbox',["require", "exports", "preact/jsx-runtime", '@o
|
|
|
4979
5016
|
displayOptions,
|
|
4980
5017
|
help,
|
|
4981
5018
|
helpHints,
|
|
4982
|
-
validators,
|
|
4983
5019
|
userAssistanceDensity: checkboxProps.userAssistanceDensity
|
|
4984
5020
|
});
|
|
4985
5021
|
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { id: id, ref: rootRef, class: Layout_1.layoutSpanStyles.layoutSpanColumn[columnSpan], children: (0, jsx_runtime_1.jsx)(UNSAFE_useFormContext_1.FormContext.Provider, { value: containerProps, children: (0, jsx_runtime_1.jsx)(UNSAFE_Checkbox_1.Checkbox, { ref: checkboxRef, ...assistiveTextProps, ...checkboxProps, children: children }) }) }));
|
|
@@ -4997,34 +5033,38 @@ define('oj-c/checkbox',["require", "exports", "oj-c/checkbox/checkbox"], functio
|
|
|
4997
5033
|
Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return checkbox_1.Checkbox; } });
|
|
4998
5034
|
});
|
|
4999
5035
|
|
|
5000
|
-
define('oj-c/checkboxset/useCheckboxsetPreact',["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslationBundle", "oj-c/
|
|
5036
|
+
define('oj-c/checkboxset/useCheckboxsetPreact',["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslationBundle", "oj-c/hooks/UNSAFE_useEditableValue/index", "preact/hooks", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators"], function (require, exports, UNSAFE_useTranslationBundle_1, index_1, hooks_1, useDeferredValidators_1) {
|
|
5001
5037
|
"use strict";
|
|
5002
5038
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5003
5039
|
exports.useCheckboxsetPreact = void 0;
|
|
5004
5040
|
function useCheckboxsetPreact({ 'aria-describedby': ariaDescribedBy, disabled, displayOptions, labelEdge, labelHint, labelStartWidth, messagesCustom, readonly, requiredMessageDetail: propRequiredMessageDetail, required, userAssistanceDensity, value: propValue, onMessagesCustomChanged, onValidChanged, onValueChanged }, addBusyState) {
|
|
5005
5041
|
const translations = (0, UNSAFE_useTranslationBundle_1.useTranslationBundle)('@oracle/oraclejet-preact');
|
|
5006
5042
|
const requiredMessageDetail = propRequiredMessageDetail || translations.checkboxSet_requiredMessageDetail();
|
|
5007
|
-
const
|
|
5043
|
+
const deferredValidators = (0, useDeferredValidators_1.useDeferredValidators)({
|
|
5044
|
+
labelHint,
|
|
5045
|
+
required,
|
|
5046
|
+
requiredMessageDetail
|
|
5047
|
+
});
|
|
5048
|
+
const { methods, displayValue, onCommitValue, refreshDisplayValue, textFieldProps } = (0, index_1.useEditableValue)({
|
|
5049
|
+
addBusyState,
|
|
5008
5050
|
ariaDescribedBy,
|
|
5051
|
+
defaultDisplayValue: null,
|
|
5052
|
+
deferredValidators,
|
|
5009
5053
|
disabled,
|
|
5010
5054
|
displayOptions,
|
|
5011
|
-
labelHint,
|
|
5012
5055
|
messagesCustom,
|
|
5013
|
-
readonly,
|
|
5014
|
-
required,
|
|
5015
|
-
requiredMessageDetail,
|
|
5016
|
-
value: propValue,
|
|
5017
|
-
addBusyState,
|
|
5018
5056
|
onMessagesCustomChanged,
|
|
5019
5057
|
onValidChanged,
|
|
5020
|
-
onValueChanged
|
|
5058
|
+
onValueChanged,
|
|
5059
|
+
readonly,
|
|
5060
|
+
value: propValue
|
|
5021
5061
|
});
|
|
5022
5062
|
const onCommitHandler = (0, hooks_1.useCallback)(async ({ value }) => {
|
|
5023
5063
|
const valueAsArray = value ? Array.from(value) : null;
|
|
5024
|
-
const
|
|
5025
|
-
const newValue =
|
|
5026
|
-
|
|
5027
|
-
}, [onCommitValue,
|
|
5064
|
+
const commitSuccessful = await onCommitValue(valueAsArray);
|
|
5065
|
+
const newValue = commitSuccessful ? valueAsArray : null;
|
|
5066
|
+
refreshDisplayValue(newValue);
|
|
5067
|
+
}, [onCommitValue, refreshDisplayValue]);
|
|
5028
5068
|
return {
|
|
5029
5069
|
methods,
|
|
5030
5070
|
checkboxsetProps: {
|
|
@@ -5143,7 +5183,7 @@ define('oj-c/utils/UNSAFE_meterUtils/meterUtils',["require", "exports"], functio
|
|
|
5143
5183
|
});
|
|
5144
5184
|
|
|
5145
5185
|
|
|
5146
|
-
define('oj-c/rating-gauge/rating-gauge',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_RatingGauge", "ojs/ojvcomponent", "preact/hooks", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "../utils/UNSAFE_meterUtils/meterUtils", "css!oj-c/rating-gauge/rating-gauge-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_RatingGauge_1, ojvcomponent_1, hooks_1, UNSAFE_useTabbableMode_1, meterUtils_1) {
|
|
5186
|
+
define('oj-c/rating-gauge/rating-gauge',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_RatingGauge", "ojs/ojvcomponent", "preact/hooks", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "../utils/UNSAFE_meterUtils/meterUtils", "@oracle/oraclejet-preact/utils/UNSAFE_stringUtils", "css!oj-c/rating-gauge/rating-gauge-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_RatingGauge_1, ojvcomponent_1, hooks_1, UNSAFE_useTabbableMode_1, meterUtils_1, UNSAFE_stringUtils_1) {
|
|
5147
5187
|
"use strict";
|
|
5148
5188
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5149
5189
|
exports.RatingGauge = void 0;
|
|
@@ -5165,10 +5205,18 @@ define('oj-c/rating-gauge/rating-gauge',["require", "exports", "preact/jsx-runti
|
|
|
5165
5205
|
color: (0, meterUtils_1.getThresholdColorByIndex)(threshold, index)
|
|
5166
5206
|
};
|
|
5167
5207
|
});
|
|
5208
|
+
const preactRatingGaugeAriaLabelledBy = (0, UNSAFE_stringUtils_1.merge)([
|
|
5209
|
+
otherProps['aria-labelledby'],
|
|
5210
|
+
otherProps.labelledBy
|
|
5211
|
+
]);
|
|
5212
|
+
const preactRatingGaugeAriaDescribedBy = (0, UNSAFE_stringUtils_1.merge)([
|
|
5213
|
+
otherProps['aria-describedby'],
|
|
5214
|
+
otherProps.describedBy
|
|
5215
|
+
]);
|
|
5168
5216
|
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { children: (0, jsx_runtime_1.jsx)(UNSAFE_RatingGauge_1.RatingGauge, { isReadonly: readonly, isDisabled: disabled, value: (hoveredVal != undefined ? hoveredVal : value), step: step, max: max, size: size, color: color, thresholds: thresholds, tooltip: otherProps.tooltip, datatip: otherProps.datatip?.({
|
|
5169
5217
|
value: hoveredVal != undefined ? hoveredVal : value
|
|
5170
|
-
}), onCommit: commitHandler, onInput: inputHandler, "aria-label": otherProps['aria-label'], "aria-labelledby":
|
|
5171
|
-
}, "RatingGauge", { "properties": { "max": { "type": "number" }, "readonly": { "type": "boolean" }, "disabled": { "type": "boolean" }, "changed": { "type": "boolean", "writeback": true }, "value": { "type": "number|null", "writeback": true }, "step": { "type": "number" }, "describedBy": { "type": "string|null" }, "labelledBy": { "type": "string|null" }, "size": { "type": "string", "enumValues": ["sm", "md", "lg"] }, "color": { "type": "string", "enumValues": ["gold", "neutral"] }, "thresholds": { "type": "Array<object>" }, "datatip": { "type": "function" }, "tooltip": { "type": "string" }, "transientValue": { "type": "number", "readOnly": true, "writeback": true } }, "extension": { "_WRITEBACK_PROPS": ["changed", "value", "transientValue"], "_READ_ONLY_PROPS": ["transientValue"], "_OBSERVED_GLOBAL_PROPS": ["aria-label"] } }, { "max": 5, "value": 0, "size": "md", "color": "neutral", "step": 1, "readonly": false, "disabled": false, "changed": false }, {
|
|
5218
|
+
}), onCommit: commitHandler, onInput: inputHandler, "aria-label": otherProps['aria-label'], "aria-labelledby": preactRatingGaugeAriaLabelledBy ?? undefined, "aria-describedby": preactRatingGaugeAriaDescribedBy ?? undefined }) }));
|
|
5219
|
+
}, "RatingGauge", { "properties": { "max": { "type": "number" }, "readonly": { "type": "boolean" }, "disabled": { "type": "boolean" }, "changed": { "type": "boolean", "writeback": true }, "value": { "type": "number|null", "writeback": true }, "step": { "type": "number" }, "describedBy": { "type": "string|null" }, "labelledBy": { "type": "string|null" }, "size": { "type": "string", "enumValues": ["sm", "md", "lg"] }, "color": { "type": "string", "enumValues": ["gold", "neutral"] }, "thresholds": { "type": "Array<object>" }, "datatip": { "type": "function" }, "tooltip": { "type": "string" }, "transientValue": { "type": "number", "readOnly": true, "writeback": true } }, "extension": { "_WRITEBACK_PROPS": ["changed", "value", "transientValue"], "_READ_ONLY_PROPS": ["transientValue"], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "aria-labelledby", "aria-describedby"] } }, { "max": 5, "value": 0, "size": "md", "color": "neutral", "step": 1, "readonly": false, "disabled": false, "changed": false }, {
|
|
5172
5220
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
5173
5221
|
}, { consume: [UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
5174
5222
|
});
|
|
@@ -5180,10 +5228,116 @@ define('oj-c/rating-gauge',["require", "exports", "oj-c/rating-gauge/rating-gaug
|
|
|
5180
5228
|
Object.defineProperty(exports, "RatingGauge", { enumerable: true, get: function () { return rating_gauge_1.RatingGauge; } });
|
|
5181
5229
|
});
|
|
5182
5230
|
|
|
5183
|
-
define('oj-c/
|
|
5231
|
+
define('oj-c/select-common/utils/utils',["require", "exports", "ojs/ojdataprovider", "@oracle/oraclejet-preact/utils/UNSAFE_logger"], function (require, exports, ojdataprovider_1, UNSAFE_logger_1) {
|
|
5232
|
+
"use strict";
|
|
5233
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5234
|
+
exports.getFilterCriterion = exports.isSetEqual = exports.isEmpty = exports.DEFAULT_VALUE_ITEMS = exports.DEFAULT_VALUE_ITEM = exports.DEFAULT_VALUE = exports.DEFAULT_ITEM_CONTEXT = void 0;
|
|
5235
|
+
exports.DEFAULT_ITEM_CONTEXT = null;
|
|
5236
|
+
exports.DEFAULT_VALUE = null;
|
|
5237
|
+
exports.DEFAULT_VALUE_ITEM = null;
|
|
5238
|
+
exports.DEFAULT_VALUE_ITEMS = null;
|
|
5239
|
+
function isEmpty(value) {
|
|
5240
|
+
if (!value)
|
|
5241
|
+
return true;
|
|
5242
|
+
if (Array.isArray(value))
|
|
5243
|
+
return value.length === 0;
|
|
5244
|
+
if (value instanceof Set || value instanceof Map)
|
|
5245
|
+
return value.size === 0;
|
|
5246
|
+
return false;
|
|
5247
|
+
}
|
|
5248
|
+
exports.isEmpty = isEmpty;
|
|
5249
|
+
function isSetEqual(a, b) {
|
|
5250
|
+
if (a === b)
|
|
5251
|
+
return true;
|
|
5252
|
+
if (a?.size !== b?.size)
|
|
5253
|
+
return false;
|
|
5254
|
+
const aArray = Array.from(a);
|
|
5255
|
+
const bArray = Array.from(b);
|
|
5256
|
+
return aArray.every((value, index) => value === bArray[index]);
|
|
5257
|
+
}
|
|
5258
|
+
exports.isSetEqual = isSetEqual;
|
|
5259
|
+
function getFilterCriterion(dataProvider, searchText, paramMatchBy) {
|
|
5260
|
+
const hasSearchText = searchText && searchText.length > 0;
|
|
5261
|
+
if (!hasSearchText) {
|
|
5262
|
+
return undefined;
|
|
5263
|
+
}
|
|
5264
|
+
const arMatchBy = paramMatchBy;
|
|
5265
|
+
const hasMatchBy = arMatchBy && arMatchBy.length > 0;
|
|
5266
|
+
const filterCapability = dataProvider?.getCapability('filter');
|
|
5267
|
+
const hasTextFilterCapability = filterCapability && filterCapability.textFilter;
|
|
5268
|
+
if (dataProvider && hasSearchText && !hasTextFilterCapability) {
|
|
5269
|
+
(0, UNSAFE_logger_1.error)('Core Pack Select: DataProvider does not support text filter. ' +
|
|
5270
|
+
'Filtering results in dropdown may not work correctly.');
|
|
5271
|
+
}
|
|
5272
|
+
const matchBy = dataProvider && hasTextFilterCapability && hasSearchText && hasMatchBy
|
|
5273
|
+
? arMatchBy.reduce((result, curr) => {
|
|
5274
|
+
if (result) {
|
|
5275
|
+
return result;
|
|
5276
|
+
}
|
|
5277
|
+
if (curr === 'unknown') {
|
|
5278
|
+
return curr;
|
|
5279
|
+
}
|
|
5280
|
+
if (curr) {
|
|
5281
|
+
if (filterCapability.textFilterMatching &&
|
|
5282
|
+
filterCapability.textFilterMatching.matchBy &&
|
|
5283
|
+
filterCapability.textFilterMatching.matchBy.indexOf(curr) > -1) {
|
|
5284
|
+
return curr;
|
|
5285
|
+
}
|
|
5286
|
+
(0, UNSAFE_logger_1.warn)(`Core Pack Select: DataProvider does not support text filter "${curr}" matching. ` +
|
|
5287
|
+
'Filtering results in dropdown may not work as expected.');
|
|
5288
|
+
}
|
|
5289
|
+
return undefined;
|
|
5290
|
+
}, null)
|
|
5291
|
+
: undefined;
|
|
5292
|
+
const filterDef = matchBy ? { text: searchText, matchBy } : { text: searchText };
|
|
5293
|
+
const fc = ojdataprovider_1.FilterFactory.getFilter({ filterDef });
|
|
5294
|
+
return fc;
|
|
5295
|
+
}
|
|
5296
|
+
exports.getFilterCriterion = getFilterCriterion;
|
|
5297
|
+
});
|
|
5298
|
+
|
|
5299
|
+
define('oj-c/select-common/PRIVATE_useCache/useCache',["require", "exports", "preact/hooks", "../utils/utils"], function (require, exports, hooks_1, utils_1) {
|
|
5300
|
+
"use strict";
|
|
5301
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5302
|
+
exports.useCache = void 0;
|
|
5303
|
+
function useCache() {
|
|
5304
|
+
const cache = (0, hooks_1.useRef)(new Map());
|
|
5305
|
+
return (0, hooks_1.useCallback)((key, value, deps) => {
|
|
5306
|
+
if (isChanged(cache.current, key, deps)) {
|
|
5307
|
+
cache.current.set(key, { value, deps });
|
|
5308
|
+
return value;
|
|
5309
|
+
}
|
|
5310
|
+
return cache.current.get(key).value;
|
|
5311
|
+
}, []);
|
|
5312
|
+
}
|
|
5313
|
+
exports.useCache = useCache;
|
|
5314
|
+
const isChanged = (cache, key, deps) => {
|
|
5315
|
+
if (!cache.has(key))
|
|
5316
|
+
return true;
|
|
5317
|
+
const oldDeps = cache.get(key).deps;
|
|
5318
|
+
return (oldDeps.length !== deps.length || oldDeps.some((value, index) => !isEquals(value, deps[index])));
|
|
5319
|
+
};
|
|
5320
|
+
const isEquals = (value1, value2) => {
|
|
5321
|
+
if (value1 === value2)
|
|
5322
|
+
return true;
|
|
5323
|
+
if (value1 instanceof Set && value2 instanceof Set) {
|
|
5324
|
+
return (0, utils_1.isSetEqual)(value1, value2);
|
|
5325
|
+
}
|
|
5326
|
+
return value1 === value2;
|
|
5327
|
+
};
|
|
5328
|
+
});
|
|
5329
|
+
|
|
5330
|
+
define('oj-c/select-common/PRIVATE_useCache/index',["require", "exports", "./useCache"], function (require, exports, useCache_1) {
|
|
5331
|
+
"use strict";
|
|
5332
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5333
|
+
exports.useCache = void 0;
|
|
5334
|
+
Object.defineProperty(exports, "useCache", { enumerable: true, get: function () { return useCache_1.useCache; } });
|
|
5335
|
+
});
|
|
5336
|
+
|
|
5337
|
+
define('oj-c/hooks/UNSAFE_useListData/useListData',["require", "exports", "ojs/ojdatacollection-common", "ojs/ojdataproviderfactory", "preact/hooks"], function (require, exports, ojdatacollection_common_1, ojdataproviderfactory_1, hooks_1) {
|
|
5184
5338
|
"use strict";
|
|
5185
5339
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5186
|
-
exports.useListData = void 0;
|
|
5340
|
+
exports.getEmptyState = exports.useListData = void 0;
|
|
5187
5341
|
const initialState = Object.freeze({
|
|
5188
5342
|
status: 'loading',
|
|
5189
5343
|
data: null
|
|
@@ -5200,11 +5354,11 @@ define('oj-c/hooks/UNSAFE_useListData/useListData',["require", "exports", "ojs/o
|
|
|
5200
5354
|
const abortControllerRef = (0, hooks_1.useRef)(null);
|
|
5201
5355
|
const fetchSize = options.fetchSize && options.fetchSize > 0 ? options.fetchSize : DEFAULT_FETCH_SIZE;
|
|
5202
5356
|
if (!data) {
|
|
5203
|
-
const emptyListState = getEmptyState('exact');
|
|
5357
|
+
const emptyListState = (0, exports.getEmptyState)('exact');
|
|
5204
5358
|
return [emptyListState, (_) => Promise.resolve()];
|
|
5205
5359
|
}
|
|
5206
5360
|
const dataProvider = (0, hooks_1.useMemo)(() => wrapData(data), [data]);
|
|
5207
|
-
const [state, dispatch] = (0, hooks_1.useReducer)(reducer, options.initialRowsFetched === 0 ? getEmptyState('atLeast') : initialState);
|
|
5361
|
+
const [state, dispatch] = (0, hooks_1.useReducer)(reducer, options.initialRowsFetched === 0 ? (0, exports.getEmptyState)('atLeast') : initialState);
|
|
5208
5362
|
const fetchRange = (0, hooks_1.useCallback)(async (range, resultsCallback) => {
|
|
5209
5363
|
const fetchOptions = {
|
|
5210
5364
|
attributes: options.attributes,
|
|
@@ -5250,6 +5404,9 @@ define('oj-c/hooks/UNSAFE_useListData/useListData',["require", "exports", "ojs/o
|
|
|
5250
5404
|
}
|
|
5251
5405
|
}, [dataProvider, options.attributes, options.filterCriterion, options.sortCriteria]);
|
|
5252
5406
|
const loadInitial = (0, hooks_1.useCallback)(async () => {
|
|
5407
|
+
if (state.status === 'loading') {
|
|
5408
|
+
abortControllerRef.current?.abort((0, ojdatacollection_common_1.getAbortReason)());
|
|
5409
|
+
}
|
|
5253
5410
|
dispatch({ status: 'loading', data: null });
|
|
5254
5411
|
const controller = new AbortController();
|
|
5255
5412
|
abortControllerRef.current = controller;
|
|
@@ -5343,7 +5500,7 @@ define('oj-c/hooks/UNSAFE_useListData/useListData',["require", "exports", "ojs/o
|
|
|
5343
5500
|
totalSizeRef.current = 0;
|
|
5344
5501
|
isDoneRef.current = false;
|
|
5345
5502
|
if (options.initialRowsFetched === 0) {
|
|
5346
|
-
dispatch(getEmptyState('atLeast'));
|
|
5503
|
+
dispatch((0, exports.getEmptyState)('atLeast'));
|
|
5347
5504
|
}
|
|
5348
5505
|
else if (!options.isInitialFetchDeferred) {
|
|
5349
5506
|
loadInitial();
|
|
@@ -5365,7 +5522,7 @@ define('oj-c/hooks/UNSAFE_useListData/useListData',["require", "exports", "ojs/o
|
|
|
5365
5522
|
totalSizeRef.current = totalSizeRef.current + itemsInserted;
|
|
5366
5523
|
count = count + itemsInserted;
|
|
5367
5524
|
shouldUpdate = itemsInserted > 0 || dataState.sizePrecision === 'exact';
|
|
5368
|
-
if (itemsInserted
|
|
5525
|
+
if (itemsInserted < event.detail.add.data.length) {
|
|
5369
5526
|
isDoneRef.current = false;
|
|
5370
5527
|
}
|
|
5371
5528
|
}
|
|
@@ -5460,6 +5617,7 @@ define('oj-c/hooks/UNSAFE_useListData/useListData',["require", "exports", "ojs/o
|
|
|
5460
5617
|
const getEmptyState = (precision) => {
|
|
5461
5618
|
return (precision === 'atLeast' ? emptyStateAtLeast : emptyStateExact);
|
|
5462
5619
|
};
|
|
5620
|
+
exports.getEmptyState = getEmptyState;
|
|
5463
5621
|
const emptyStateAtLeast = Object.freeze({
|
|
5464
5622
|
status: 'success',
|
|
5465
5623
|
data: {
|
|
@@ -5529,75 +5687,548 @@ define('oj-c/hooks/UNSAFE_useListData/useListData',["require", "exports", "ojs/o
|
|
|
5529
5687
|
};
|
|
5530
5688
|
});
|
|
5531
5689
|
|
|
5532
|
-
define('oj-c/select-common/
|
|
5690
|
+
define('oj-c/select-common/PRIVATE_DebouncingDataProviderView/Debouncer',["require", "exports"], function (require, exports) {
|
|
5533
5691
|
"use strict";
|
|
5534
5692
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5535
|
-
exports.
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
const bArray = Array.from(b);
|
|
5557
|
-
return aArray.every((value, index) => value === bArray[index]);
|
|
5558
|
-
}
|
|
5559
|
-
exports.isSetEqual = isSetEqual;
|
|
5560
|
-
function getFilterCriterion(dataProvider, searchText, paramMatchBy) {
|
|
5561
|
-
const hasSearchText = searchText && searchText.length > 0;
|
|
5562
|
-
if (!hasSearchText) {
|
|
5563
|
-
return undefined;
|
|
5693
|
+
exports.Debouncer = void 0;
|
|
5694
|
+
class Debouncer {
|
|
5695
|
+
constructor() {
|
|
5696
|
+
this._responseTimes = [
|
|
5697
|
+
{ time: 900, count: 0 },
|
|
5698
|
+
{ time: 720, count: 0 },
|
|
5699
|
+
{ time: 600, count: 0 },
|
|
5700
|
+
{ time: 450, count: 0 },
|
|
5701
|
+
{ time: 360, count: 0 },
|
|
5702
|
+
{ time: 300, count: 0 }
|
|
5703
|
+
];
|
|
5704
|
+
this._requestTime = { time: 250, count: 0 };
|
|
5705
|
+
this._lastRequestTime = 0;
|
|
5706
|
+
}
|
|
5707
|
+
debounce(callback, filterTextLength) {
|
|
5708
|
+
const wait = this.GetDebounceTime(filterTextLength);
|
|
5709
|
+
return (...args) => {
|
|
5710
|
+
window.setTimeout(() => {
|
|
5711
|
+
callback(...args);
|
|
5712
|
+
}, wait);
|
|
5713
|
+
};
|
|
5564
5714
|
}
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5715
|
+
recordResponseTime(time, filterTextLength) {
|
|
5716
|
+
const index = Math.min(filterTextLength, 5);
|
|
5717
|
+
const record = this._responseTimes[index];
|
|
5718
|
+
if (record.count === 0) {
|
|
5719
|
+
record.time = time;
|
|
5720
|
+
}
|
|
5721
|
+
else {
|
|
5722
|
+
record.time = (record.time * record.count + time) / (record.count + 1);
|
|
5723
|
+
}
|
|
5724
|
+
record.count += 1;
|
|
5572
5725
|
}
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5726
|
+
recordRequestTime() {
|
|
5727
|
+
const requestTime = Date.now();
|
|
5728
|
+
const lastRequestTime = this._lastRequestTime;
|
|
5729
|
+
this._lastRequestTime = requestTime;
|
|
5730
|
+
if (lastRequestTime === 0) {
|
|
5731
|
+
return;
|
|
5732
|
+
}
|
|
5733
|
+
const time = requestTime - lastRequestTime;
|
|
5734
|
+
if (time > 1000) {
|
|
5735
|
+
return;
|
|
5736
|
+
}
|
|
5737
|
+
const record = this._requestTime;
|
|
5738
|
+
if (record.count === 0) {
|
|
5739
|
+
record.time = time;
|
|
5740
|
+
}
|
|
5741
|
+
else {
|
|
5742
|
+
record.time = (record.time * record.count + time) / (record.count + 1);
|
|
5743
|
+
}
|
|
5744
|
+
record.count += 1;
|
|
5745
|
+
}
|
|
5746
|
+
_getResponseTime(filterTextLength) {
|
|
5747
|
+
const index = Math.min(filterTextLength, 5);
|
|
5748
|
+
const record = this._responseTimes[index];
|
|
5749
|
+
return record.time;
|
|
5750
|
+
}
|
|
5751
|
+
_getRequestTime() {
|
|
5752
|
+
return this._requestTime.time;
|
|
5753
|
+
}
|
|
5754
|
+
GetDebounceTime(filterTextLength) {
|
|
5755
|
+
const responseTime = this._getResponseTime(filterTextLength);
|
|
5756
|
+
const requestTime = this._getRequestTime();
|
|
5757
|
+
const paddedRequestTime = 1.2 * requestTime;
|
|
5758
|
+
if (responseTime < paddedRequestTime) {
|
|
5759
|
+
return 0;
|
|
5760
|
+
}
|
|
5761
|
+
const factor = (responseTime - paddedRequestTime) / responseTime;
|
|
5762
|
+
const debounceTime = (1 + factor) * paddedRequestTime;
|
|
5763
|
+
return debounceTime;
|
|
5764
|
+
}
|
|
5765
|
+
}
|
|
5766
|
+
exports.Debouncer = Debouncer;
|
|
5767
|
+
});
|
|
5768
|
+
|
|
5769
|
+
define('oj-c/select-common/PRIVATE_DebouncingDataProviderView/DebouncingDataProviderView',["require", "exports", "ojs/ojdataprovider", "./Debouncer"], function (require, exports, ojdataprovider_1, Debouncer_1) {
|
|
5770
|
+
"use strict";
|
|
5771
|
+
var _a;
|
|
5772
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5773
|
+
exports.DebouncingDataProviderView = void 0;
|
|
5774
|
+
class AsyncIteratorWrapper {
|
|
5775
|
+
constructor(dataProvider, debouncer, params) {
|
|
5776
|
+
this._isFirstNext = true;
|
|
5777
|
+
this.dataProvider = dataProvider;
|
|
5778
|
+
this.debouncer = debouncer;
|
|
5779
|
+
this.params = params;
|
|
5780
|
+
}
|
|
5781
|
+
next() {
|
|
5782
|
+
if (this._isFirstNext) {
|
|
5783
|
+
this.debouncer.recordRequestTime();
|
|
5784
|
+
this._isFirstNext = false;
|
|
5785
|
+
const filterText = this.params?.filterCriterion?.text;
|
|
5786
|
+
const debounceCallback = (resolve, reject) => {
|
|
5787
|
+
if (this.params?.signal?.aborted) {
|
|
5788
|
+
reject(this.params?.signal?.reason);
|
|
5789
|
+
return;
|
|
5790
|
+
}
|
|
5791
|
+
const asyncIterable = this.dataProvider.fetchFirst(this.params);
|
|
5792
|
+
this._asyncIterator = asyncIterable[Symbol.asyncIterator]();
|
|
5793
|
+
const fetchStart = Date.now();
|
|
5794
|
+
const iterPromise = this._asyncIterator.next();
|
|
5795
|
+
iterPromise.then((result) => {
|
|
5796
|
+
const fetchEnd = Date.now();
|
|
5797
|
+
this.debouncer.recordResponseTime(fetchEnd - fetchStart, filterText ? filterText.length : 0);
|
|
5798
|
+
resolve(result);
|
|
5799
|
+
}, reject);
|
|
5800
|
+
};
|
|
5801
|
+
const callback = (resolve, reject) => {
|
|
5802
|
+
const promise = new Promise((pResolve, pReject) => {
|
|
5803
|
+
this.debouncer.debounce(debounceCallback, filterText ? filterText.length : 0)(pResolve, pReject);
|
|
5804
|
+
});
|
|
5805
|
+
return promise.then(resolve, reject);
|
|
5806
|
+
};
|
|
5807
|
+
return (0, ojdataprovider_1.wrapWithAbortHandling)(this.params?.signal, callback, false);
|
|
5808
|
+
}
|
|
5809
|
+
return this._asyncIterator.next();
|
|
5810
|
+
}
|
|
5811
|
+
}
|
|
5812
|
+
class AsyncIterableWrapper {
|
|
5813
|
+
constructor(dataProvider, debouncer, params) {
|
|
5814
|
+
this[_a] = () => {
|
|
5815
|
+
return new AsyncIteratorWrapper(this.dataProvider, this.debouncer, this.params);
|
|
5816
|
+
};
|
|
5817
|
+
this.dataProvider = dataProvider;
|
|
5818
|
+
this.debouncer = debouncer;
|
|
5819
|
+
this.params = params;
|
|
5820
|
+
}
|
|
5821
|
+
}
|
|
5822
|
+
_a = Symbol.asyncIterator;
|
|
5823
|
+
class DebouncingDataProviderView {
|
|
5824
|
+
constructor(dataProvider) {
|
|
5825
|
+
this._debouncer = new Debouncer_1.Debouncer();
|
|
5826
|
+
this.dataProvider = dataProvider;
|
|
5827
|
+
}
|
|
5828
|
+
fetchFirst(params) {
|
|
5829
|
+
return new AsyncIterableWrapper(this.dataProvider, this._debouncer, params);
|
|
5830
|
+
}
|
|
5831
|
+
fetchByKeys(params) {
|
|
5832
|
+
return this.dataProvider.fetchByKeys(params);
|
|
5833
|
+
}
|
|
5834
|
+
containsKeys(params) {
|
|
5835
|
+
return this.dataProvider.containsKeys(params);
|
|
5836
|
+
}
|
|
5837
|
+
fetchByOffset(params) {
|
|
5838
|
+
return this.dataProvider.fetchByOffset(params);
|
|
5839
|
+
}
|
|
5840
|
+
getTotalSize() {
|
|
5841
|
+
return this.dataProvider.getTotalSize();
|
|
5842
|
+
}
|
|
5843
|
+
isEmpty() {
|
|
5844
|
+
return this.dataProvider.isEmpty();
|
|
5845
|
+
}
|
|
5846
|
+
getCapability(capabilityName) {
|
|
5847
|
+
return this.dataProvider.getCapability(capabilityName);
|
|
5848
|
+
}
|
|
5849
|
+
addEventListener(eventType, listener) {
|
|
5850
|
+
this.dataProvider.addEventListener(eventType, listener);
|
|
5851
|
+
}
|
|
5852
|
+
removeEventListener(eventType, listener) {
|
|
5853
|
+
this.dataProvider.removeEventListener(eventType, listener);
|
|
5854
|
+
}
|
|
5855
|
+
dispatchEvent(event) {
|
|
5856
|
+
return this.dataProvider.dispatchEvent(event);
|
|
5857
|
+
}
|
|
5858
|
+
}
|
|
5859
|
+
exports.DebouncingDataProviderView = DebouncingDataProviderView;
|
|
5860
|
+
});
|
|
5861
|
+
|
|
5862
|
+
define('oj-c/select-common/UNSAFE_useWrapDataProvider/useWrapDataProvider',["require", "exports", "ojs/ojdataproviderfactory", "preact/hooks", "../PRIVATE_DebouncingDataProviderView/DebouncingDataProviderView"], function (require, exports, ojdataproviderfactory_1, hooks_1, DebouncingDataProviderView_1) {
|
|
5863
|
+
"use strict";
|
|
5864
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5865
|
+
exports.useWrapDataProvider = void 0;
|
|
5866
|
+
function useWrapDataProvider(data) {
|
|
5867
|
+
const dataProvider = (0, hooks_1.useMemo)(() => {
|
|
5868
|
+
if (!data) {
|
|
5869
|
+
return data;
|
|
5870
|
+
}
|
|
5871
|
+
const enhancedDP = (0, ojdataproviderfactory_1.getEnhancedDataProvider)(data, {
|
|
5872
|
+
fetchFirst: { caching: 'visitedByCurrentIterator' }
|
|
5873
|
+
});
|
|
5874
|
+
const filterCapability = enhancedDP.getCapability('fetchFirst');
|
|
5875
|
+
const isImmediate = filterCapability?.iterationSpeed === 'immediate';
|
|
5876
|
+
return isImmediate ? enhancedDP : new DebouncingDataProviderView_1.DebouncingDataProviderView(enhancedDP);
|
|
5877
|
+
}, [data]);
|
|
5878
|
+
return dataProvider;
|
|
5879
|
+
}
|
|
5880
|
+
exports.useWrapDataProvider = useWrapDataProvider;
|
|
5881
|
+
});
|
|
5882
|
+
|
|
5883
|
+
define('oj-c/select-common/UNSAFE_useWrapDataProvider/index',["require", "exports", "./useWrapDataProvider"], function (require, exports, useWrapDataProvider_1) {
|
|
5884
|
+
"use strict";
|
|
5885
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5886
|
+
exports.useWrapDataProvider = void 0;
|
|
5887
|
+
Object.defineProperty(exports, "useWrapDataProvider", { enumerable: true, get: function () { return useWrapDataProvider_1.useWrapDataProvider; } });
|
|
5888
|
+
});
|
|
5889
|
+
|
|
5890
|
+
define('oj-c/select-common/PRIVATE_useSelectData/CollectionTemplateDataProviderView',["require", "exports", "ojs/ojdataprovider"], function (require, exports, ojdataprovider_1) {
|
|
5891
|
+
"use strict";
|
|
5892
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5893
|
+
exports.CollectionTemplateDataProviderView = exports.SELECT_INTERNALS = void 0;
|
|
5894
|
+
exports.SELECT_INTERNALS = Symbol('__SELECT_INTERNALS__');
|
|
5895
|
+
class CollectionTemplateDataProviderView {
|
|
5896
|
+
get currentDataProvider() {
|
|
5897
|
+
return this.overrideDataProvider ?? this.originalDataProvider;
|
|
5898
|
+
}
|
|
5899
|
+
setFilterCriterion(filter) {
|
|
5900
|
+
const previousFilter = this.filterCriterion;
|
|
5901
|
+
this.filterCriterion = filter;
|
|
5902
|
+
if (!this.compareFilter(previousFilter, filter)) {
|
|
5903
|
+
const event = new ojdataprovider_1.DataProviderRefreshEvent();
|
|
5904
|
+
Object.defineProperty(event, exports.SELECT_INTERNALS, {
|
|
5905
|
+
value: { cause: 'filterCriterionChanged' }
|
|
5906
|
+
});
|
|
5907
|
+
this.dispatchEvent(event);
|
|
5908
|
+
this.options.onRefresh?.();
|
|
5909
|
+
}
|
|
5910
|
+
}
|
|
5911
|
+
setDataStateOverride(dataStateOverride) {
|
|
5912
|
+
if (this.dataStateOverride !== dataStateOverride) {
|
|
5913
|
+
this.dataStateOverride = dataStateOverride;
|
|
5914
|
+
this.overrideDataProvider =
|
|
5915
|
+
this.dataStateOverride?.status === 'success'
|
|
5916
|
+
? new DataStateDataProviderView(this.dataStateOverride)
|
|
5917
|
+
: undefined;
|
|
5918
|
+
const event = new ojdataprovider_1.DataProviderRefreshEvent();
|
|
5919
|
+
Object.defineProperty(event, exports.SELECT_INTERNALS, {
|
|
5920
|
+
value: { cause: 'dataOverrideChanged' }
|
|
5921
|
+
});
|
|
5922
|
+
this.dispatchEvent(event);
|
|
5923
|
+
this.options.onRefresh?.();
|
|
5924
|
+
}
|
|
5925
|
+
}
|
|
5926
|
+
compareFilter(fc1, fc2) {
|
|
5927
|
+
if (fc1 === fc2)
|
|
5928
|
+
return true;
|
|
5929
|
+
if (fc1 === undefined || fc2 === undefined)
|
|
5930
|
+
return false;
|
|
5931
|
+
const keys1 = Object.keys(fc1);
|
|
5932
|
+
const keys2 = Object.keys(fc2);
|
|
5933
|
+
if (keys1.length !== keys2.length)
|
|
5934
|
+
return false;
|
|
5935
|
+
return keys1.every((key) => keys2.includes(key) && fc1[key] === fc2[key]);
|
|
5936
|
+
}
|
|
5937
|
+
constructor(dataProvider, options) {
|
|
5938
|
+
this.originalDataProvider = dataProvider;
|
|
5939
|
+
this.options = options;
|
|
5940
|
+
if (dataProvider.createOptimizedKeyMap)
|
|
5941
|
+
this.createOptimizedKeyMap = (initialMap) => dataProvider.createOptimizedKeyMap(initialMap);
|
|
5942
|
+
if (dataProvider.createOptimizedKeySet)
|
|
5943
|
+
this.createOptimizedKeySet = (initialMap) => dataProvider.createOptimizedKeySet(initialMap);
|
|
5944
|
+
}
|
|
5945
|
+
async fetchByOffset(parameters) {
|
|
5946
|
+
const overriddenParams = this.filterCriterion
|
|
5947
|
+
? { ...parameters, filterCriterion: this.filterCriterion }
|
|
5948
|
+
: parameters;
|
|
5949
|
+
const results = await this.currentDataProvider.fetchByOffset(overriddenParams);
|
|
5950
|
+
this.options.onOffsetFetch?.({ results });
|
|
5951
|
+
return results;
|
|
5952
|
+
}
|
|
5953
|
+
fetchFirst(parameters) {
|
|
5954
|
+
const overriddenParams = this.filterCriterion
|
|
5955
|
+
? { ...parameters, filterCriterion: this.filterCriterion }
|
|
5956
|
+
: parameters;
|
|
5957
|
+
const options = this.options;
|
|
5958
|
+
options.onInitializeFetch?.();
|
|
5959
|
+
const iterable = this.currentDataProvider.fetchFirst(overriddenParams);
|
|
5960
|
+
return {
|
|
5961
|
+
[Symbol.asyncIterator]() {
|
|
5962
|
+
let offset = 0;
|
|
5963
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
5964
|
+
return {
|
|
5965
|
+
async next() {
|
|
5966
|
+
const itResult = await iterator.next();
|
|
5967
|
+
const { value: results, done = false } = itResult;
|
|
5968
|
+
options.onNextIteration?.({ results, offset, done });
|
|
5969
|
+
offset += results.data.length;
|
|
5970
|
+
return itResult;
|
|
5971
|
+
}
|
|
5972
|
+
};
|
|
5577
5973
|
}
|
|
5578
|
-
|
|
5579
|
-
|
|
5974
|
+
};
|
|
5975
|
+
}
|
|
5976
|
+
addEventListener(eventType, listener) {
|
|
5977
|
+
return this.originalDataProvider.addEventListener(eventType, listener);
|
|
5978
|
+
}
|
|
5979
|
+
containsKeys(parameters) {
|
|
5980
|
+
return this.currentDataProvider.containsKeys(parameters);
|
|
5981
|
+
}
|
|
5982
|
+
dispatchEvent(event) {
|
|
5983
|
+
return this.originalDataProvider.dispatchEvent(event);
|
|
5984
|
+
}
|
|
5985
|
+
fetchByKeys(parameters) {
|
|
5986
|
+
return this.currentDataProvider.fetchByKeys(parameters);
|
|
5987
|
+
}
|
|
5988
|
+
getCapability(capabilityName) {
|
|
5989
|
+
return this.originalDataProvider.getCapability(capabilityName);
|
|
5990
|
+
}
|
|
5991
|
+
getTotalSize() {
|
|
5992
|
+
return this.currentDataProvider.getTotalSize();
|
|
5993
|
+
}
|
|
5994
|
+
isEmpty() {
|
|
5995
|
+
return this.currentDataProvider.isEmpty();
|
|
5996
|
+
}
|
|
5997
|
+
removeEventListener(eventType, listener) {
|
|
5998
|
+
return this.originalDataProvider.removeEventListener(eventType, listener);
|
|
5999
|
+
}
|
|
6000
|
+
}
|
|
6001
|
+
exports.CollectionTemplateDataProviderView = CollectionTemplateDataProviderView;
|
|
6002
|
+
class DataStateDataProviderView {
|
|
6003
|
+
constructor(dataState) {
|
|
6004
|
+
this.dataState = dataState;
|
|
6005
|
+
}
|
|
6006
|
+
containsKeys(parameters) {
|
|
6007
|
+
const { keys } = parameters;
|
|
6008
|
+
const { data } = this.dataState;
|
|
6009
|
+
const foundKeys = new Set();
|
|
6010
|
+
data.data.forEach((item) => {
|
|
6011
|
+
if (keys.has(item.metadata.key)) {
|
|
6012
|
+
foundKeys.add(item.metadata.key);
|
|
5580
6013
|
}
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
6014
|
+
});
|
|
6015
|
+
return Promise.resolve({
|
|
6016
|
+
containsParameters: parameters,
|
|
6017
|
+
results: foundKeys
|
|
6018
|
+
});
|
|
6019
|
+
}
|
|
6020
|
+
fetchByKeys(parameters) {
|
|
6021
|
+
const { keys } = parameters;
|
|
6022
|
+
const { data } = this.dataState;
|
|
6023
|
+
const results = new Map();
|
|
6024
|
+
data.data.forEach((item) => {
|
|
6025
|
+
if (keys.has(item.metadata.key)) {
|
|
6026
|
+
results.set(item.metadata.key, item);
|
|
5589
6027
|
}
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
6028
|
+
});
|
|
6029
|
+
return Promise.resolve({
|
|
6030
|
+
fetchParameters: parameters,
|
|
6031
|
+
results
|
|
6032
|
+
});
|
|
6033
|
+
}
|
|
6034
|
+
fetchByOffset(parameters) {
|
|
6035
|
+
const { offset, size } = parameters;
|
|
6036
|
+
const { data } = this.dataState;
|
|
6037
|
+
const filteredData = data.data.slice(offset, size);
|
|
6038
|
+
const results = {
|
|
6039
|
+
fetchParameters: parameters ?? {},
|
|
6040
|
+
results: filteredData.map((item) => ({ data: item.data, metadata: item.metadata })),
|
|
6041
|
+
done: offset + (size ?? 0) >= data.totalSize
|
|
6042
|
+
};
|
|
6043
|
+
return Promise.resolve(results);
|
|
6044
|
+
}
|
|
6045
|
+
fetchFirst(parameters) {
|
|
6046
|
+
const { data } = this.dataState;
|
|
6047
|
+
return {
|
|
6048
|
+
[Symbol.asyncIterator]() {
|
|
6049
|
+
let offset = 0;
|
|
6050
|
+
const size = parameters?.size ?? 25;
|
|
6051
|
+
const totalSize = data.totalSize;
|
|
6052
|
+
return {
|
|
6053
|
+
async next() {
|
|
6054
|
+
if (offset < totalSize) {
|
|
6055
|
+
const filteredData = data.data.slice(offset, size);
|
|
6056
|
+
const resultsOverride = filteredData.reduce((acc, value) => {
|
|
6057
|
+
acc.data.push(value.data);
|
|
6058
|
+
acc.metadata.push(value.metadata);
|
|
6059
|
+
return acc;
|
|
6060
|
+
}, { data: [], metadata: [] });
|
|
6061
|
+
const results = {
|
|
6062
|
+
...resultsOverride,
|
|
6063
|
+
fetchParameters: parameters ?? {},
|
|
6064
|
+
totalFilteredRowCount: data.totalSize
|
|
6065
|
+
};
|
|
6066
|
+
const adjustedSize = Math.min(size, totalSize - offset);
|
|
6067
|
+
offset += offset + adjustedSize;
|
|
6068
|
+
return { value: results, done: false };
|
|
6069
|
+
}
|
|
6070
|
+
const results = {
|
|
6071
|
+
data: [],
|
|
6072
|
+
metadata: [],
|
|
6073
|
+
fetchParameters: parameters ?? {},
|
|
6074
|
+
totalFilteredRowCount: data.totalSize
|
|
6075
|
+
};
|
|
6076
|
+
return { value: results, done: true };
|
|
6077
|
+
}
|
|
6078
|
+
};
|
|
6079
|
+
}
|
|
6080
|
+
};
|
|
6081
|
+
}
|
|
6082
|
+
getCapability() {
|
|
6083
|
+
return null;
|
|
6084
|
+
}
|
|
6085
|
+
getTotalSize() {
|
|
6086
|
+
return Promise.resolve(this.dataState.data.totalSize);
|
|
6087
|
+
}
|
|
6088
|
+
isEmpty() {
|
|
6089
|
+
return this.dataState.data.totalSize === 0 ? 'yes' : 'no';
|
|
6090
|
+
}
|
|
6091
|
+
addEventListener() { }
|
|
6092
|
+
dispatchEvent() {
|
|
6093
|
+
return false;
|
|
6094
|
+
}
|
|
6095
|
+
removeEventListener() { }
|
|
5596
6096
|
}
|
|
5597
|
-
exports.getFilterCriterion = getFilterCriterion;
|
|
5598
6097
|
});
|
|
5599
6098
|
|
|
5600
|
-
define('oj-c/select-common/
|
|
6099
|
+
define('oj-c/select-common/PRIVATE_useSelectData/useCollectionTemplateDataProviderView',["require", "exports", "oj-c/hooks/UNSAFE_useListData/useListData", "preact/hooks", "./CollectionTemplateDataProviderView"], function (require, exports, useListData_1, hooks_1, CollectionTemplateDataProviderView_1) {
|
|
6100
|
+
"use strict";
|
|
6101
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6102
|
+
exports.useCollectionTemplateDataProviderView = void 0;
|
|
6103
|
+
function useCollectionTemplateDataProviderView({ dataProvider, options: { dataStateOverride, filterCriterion } }) {
|
|
6104
|
+
const [state, dispatch] = (0, hooks_1.useReducer)((reducer), {
|
|
6105
|
+
dataState: (0, useListData_1.getEmptyState)('atLeast')
|
|
6106
|
+
});
|
|
6107
|
+
const wrappedDP = (0, hooks_1.useMemo)(() => dataProvider == null
|
|
6108
|
+
? dataProvider
|
|
6109
|
+
: new CollectionTemplateDataProviderView_1.CollectionTemplateDataProviderView(dataProvider, {
|
|
6110
|
+
onInitializeFetch() {
|
|
6111
|
+
dispatch({ type: 'loading' });
|
|
6112
|
+
},
|
|
6113
|
+
onNextIteration({ results: { data, metadata, fetchParameters }, offset, done }) {
|
|
6114
|
+
if (fetchParameters.signal?.aborted)
|
|
6115
|
+
return;
|
|
6116
|
+
const items = data.map((item, index) => ({
|
|
6117
|
+
data: item,
|
|
6118
|
+
metadata: metadata[index]
|
|
6119
|
+
}));
|
|
6120
|
+
dispatch({ type: 'append', payload: { items, offset, done } });
|
|
6121
|
+
},
|
|
6122
|
+
onOffsetFetch({ results: { results, done, fetchParameters } }) {
|
|
6123
|
+
if (fetchParameters.signal?.aborted)
|
|
6124
|
+
return;
|
|
6125
|
+
dispatch({
|
|
6126
|
+
type: 'update',
|
|
6127
|
+
payload: { items: results, done, offset: fetchParameters.offset }
|
|
6128
|
+
});
|
|
6129
|
+
},
|
|
6130
|
+
onRefresh() {
|
|
6131
|
+
dispatch({ type: 'loading' });
|
|
6132
|
+
}
|
|
6133
|
+
}), [dataProvider]);
|
|
6134
|
+
const prevFilterCriterionRef = (0, hooks_1.useRef)();
|
|
6135
|
+
if (prevFilterCriterionRef.current !== filterCriterion) {
|
|
6136
|
+
prevFilterCriterionRef.current = filterCriterion;
|
|
6137
|
+
wrappedDP?.setFilterCriterion(filterCriterion);
|
|
6138
|
+
}
|
|
6139
|
+
const prevDataStateOverride = (0, hooks_1.useRef)();
|
|
6140
|
+
if (prevDataStateOverride.current !== dataStateOverride) {
|
|
6141
|
+
prevDataStateOverride.current = dataStateOverride;
|
|
6142
|
+
wrappedDP?.setDataStateOverride(dataStateOverride);
|
|
6143
|
+
}
|
|
6144
|
+
return {
|
|
6145
|
+
dataState: state.dataState,
|
|
6146
|
+
dataProvider: wrappedDP
|
|
6147
|
+
};
|
|
6148
|
+
}
|
|
6149
|
+
exports.useCollectionTemplateDataProviderView = useCollectionTemplateDataProviderView;
|
|
6150
|
+
const reducer = (state, { type, payload }) => {
|
|
6151
|
+
switch (type) {
|
|
6152
|
+
case 'append': {
|
|
6153
|
+
const { dataState } = state;
|
|
6154
|
+
const prevData = dataState.status === 'success' ? dataState.data : null;
|
|
6155
|
+
const { done, items } = payload;
|
|
6156
|
+
return {
|
|
6157
|
+
...state,
|
|
6158
|
+
dataState: {
|
|
6159
|
+
status: 'success',
|
|
6160
|
+
data: {
|
|
6161
|
+
data: [...(prevData?.data ?? []), ...items],
|
|
6162
|
+
offset: prevData?.offset ?? 0,
|
|
6163
|
+
sizePrecision: done ? 'exact' : 'atLeast',
|
|
6164
|
+
totalSize: (prevData?.data.length ?? 0) + items.length
|
|
6165
|
+
}
|
|
6166
|
+
}
|
|
6167
|
+
};
|
|
6168
|
+
}
|
|
6169
|
+
case 'update': {
|
|
6170
|
+
return {
|
|
6171
|
+
...state,
|
|
6172
|
+
dataState: {
|
|
6173
|
+
status: 'success',
|
|
6174
|
+
data: {
|
|
6175
|
+
data: payload.items,
|
|
6176
|
+
offset: payload.offset,
|
|
6177
|
+
sizePrecision: payload.done ? 'exact' : 'atLeast',
|
|
6178
|
+
totalSize: payload.items.length
|
|
6179
|
+
}
|
|
6180
|
+
}
|
|
6181
|
+
};
|
|
6182
|
+
}
|
|
6183
|
+
case 'loading': {
|
|
6184
|
+
return {
|
|
6185
|
+
...state,
|
|
6186
|
+
dataState: {
|
|
6187
|
+
status: 'loading',
|
|
6188
|
+
data: null
|
|
6189
|
+
}
|
|
6190
|
+
};
|
|
6191
|
+
}
|
|
6192
|
+
default:
|
|
6193
|
+
return state;
|
|
6194
|
+
}
|
|
6195
|
+
};
|
|
6196
|
+
});
|
|
6197
|
+
|
|
6198
|
+
define('oj-c/select-common/PRIVATE_useSelectData/useSelectData',["require", "exports", "oj-c/hooks/UNSAFE_useListData/useListData", "preact/hooks", "../UNSAFE_useWrapDataProvider/index", "./useCollectionTemplateDataProviderView"], function (require, exports, useListData_1, hooks_1, index_1, useCollectionTemplateDataProviderView_1) {
|
|
6199
|
+
"use strict";
|
|
6200
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6201
|
+
exports.useSelectData = void 0;
|
|
6202
|
+
const noOp = () => { };
|
|
6203
|
+
const useSelectData = ({ data, dataStateOverride: propDataStateOverride, filterCriterion, hasCollectionTemplate }) => {
|
|
6204
|
+
const dataProvider = (0, index_1.useWrapDataProvider)(data);
|
|
6205
|
+
const [listDataState, onLoadRange] = (0, useListData_1.useListData)(dataProvider ?? null, {
|
|
6206
|
+
filterCriterion,
|
|
6207
|
+
initialRowsFetched: 0
|
|
6208
|
+
});
|
|
6209
|
+
const dataStateOverride = (0, hooks_1.useMemo)(() => (propDataStateOverride ? { status: 'success', data: propDataStateOverride } : undefined), [propDataStateOverride]);
|
|
6210
|
+
const { dataState: templateDataState, dataProvider: templateDataProvider } = (0, useCollectionTemplateDataProviderView_1.useCollectionTemplateDataProviderView)({
|
|
6211
|
+
dataProvider,
|
|
6212
|
+
options: { dataStateOverride, filterCriterion }
|
|
6213
|
+
});
|
|
6214
|
+
return {
|
|
6215
|
+
dataProvider: hasCollectionTemplate ? templateDataProvider : dataProvider,
|
|
6216
|
+
dataState: hasCollectionTemplate ? dataStateOverride ?? templateDataState : listDataState,
|
|
6217
|
+
onLoadRange: hasCollectionTemplate ? noOp : onLoadRange
|
|
6218
|
+
};
|
|
6219
|
+
};
|
|
6220
|
+
exports.useSelectData = useSelectData;
|
|
6221
|
+
});
|
|
6222
|
+
|
|
6223
|
+
define('oj-c/select-common/PRIVATE_useSelectData/index',["require", "exports", "./useSelectData", "./CollectionTemplateDataProviderView"], function (require, exports, useSelectData_1, CollectionTemplateDataProviderView_1) {
|
|
6224
|
+
"use strict";
|
|
6225
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6226
|
+
exports.SELECT_INTERNALS = exports.useSelectData = void 0;
|
|
6227
|
+
Object.defineProperty(exports, "useSelectData", { enumerable: true, get: function () { return useSelectData_1.useSelectData; } });
|
|
6228
|
+
Object.defineProperty(exports, "SELECT_INTERNALS", { enumerable: true, get: function () { return CollectionTemplateDataProviderView_1.SELECT_INTERNALS; } });
|
|
6229
|
+
});
|
|
6230
|
+
|
|
6231
|
+
define('oj-c/select-common/UNSAFE_useDataProviderListeners/useDataProviderListeners',["require", "exports", "@oracle/oraclejet-preact/utils/UNSAFE_logger", "preact/hooks", "../PRIVATE_useSelectData/index", "../utils/utils"], function (require, exports, UNSAFE_logger_1, hooks_1, index_1, utils_1) {
|
|
5601
6232
|
"use strict";
|
|
5602
6233
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5603
6234
|
exports.useDataProviderListeners = void 0;
|
|
@@ -5638,12 +6269,14 @@ define('oj-c/select-common/UNSAFE_useDataProviderListeners/useDataProviderListen
|
|
|
5638
6269
|
}
|
|
5639
6270
|
function useDataProviderListeners({ dataProvider, setValue, setValueToSync, setValueItemsToSync, value, valueItems }) {
|
|
5640
6271
|
const isSelectMultiple = value instanceof Set;
|
|
5641
|
-
const handleRefresh = (0, hooks_1.useCallback)(() => {
|
|
6272
|
+
const handleRefresh = (0, hooks_1.useCallback)((event) => {
|
|
6273
|
+
if (!shouldHandleRefreshEvent(event))
|
|
6274
|
+
return;
|
|
5642
6275
|
if (!(0, utils_1.isEmpty)(value)) {
|
|
5643
6276
|
setValueToSync(cloneValue(value));
|
|
5644
6277
|
setValueItemsToSync(utils_1.DEFAULT_VALUE_ITEMS);
|
|
5645
6278
|
}
|
|
5646
|
-
}, [value]);
|
|
6279
|
+
}, [setValueItemsToSync, setValueToSync, value]);
|
|
5647
6280
|
const handleMutation = (0, hooks_1.useCallback)((event) => {
|
|
5648
6281
|
if ((0, utils_1.isEmpty)(value)) {
|
|
5649
6282
|
return;
|
|
@@ -5681,7 +6314,7 @@ define('oj-c/select-common/UNSAFE_useDataProviderListeners/useDataProviderListen
|
|
|
5681
6314
|
setValueItemsToSync(!(0, utils_1.isEmpty)(newValueItems) ? newValueItems : utils_1.DEFAULT_VALUE_ITEMS);
|
|
5682
6315
|
}
|
|
5683
6316
|
}
|
|
5684
|
-
}, [value, valueItems]);
|
|
6317
|
+
}, [isSelectMultiple, setValue, setValueItemsToSync, setValueToSync, value, valueItems]);
|
|
5685
6318
|
(0, hooks_1.useEffect)(() => {
|
|
5686
6319
|
dataProvider?.addEventListener('refresh', handleRefresh);
|
|
5687
6320
|
dataProvider?.addEventListener('mutate', handleMutation);
|
|
@@ -5692,23 +6325,13 @@ define('oj-c/select-common/UNSAFE_useDataProviderListeners/useDataProviderListen
|
|
|
5692
6325
|
}, [dataProvider, handleMutation, handleRefresh]);
|
|
5693
6326
|
}
|
|
5694
6327
|
exports.useDataProviderListeners = useDataProviderListeners;
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
const dataProvider = (0, hooks_1.useMemo)(() => {
|
|
5703
|
-
return data
|
|
5704
|
-
? (0, ojdataproviderfactory_1.getEnhancedDataProvider)(data, {
|
|
5705
|
-
fetchFirst: { caching: 'visitedByCurrentIterator' }
|
|
5706
|
-
})
|
|
5707
|
-
: data;
|
|
5708
|
-
}, [data]);
|
|
5709
|
-
return dataProvider;
|
|
5710
|
-
}
|
|
5711
|
-
exports.useWrapDataProvider = useWrapDataProvider;
|
|
6328
|
+
const shouldHandleRefreshEvent = (event) => {
|
|
6329
|
+
if (index_1.SELECT_INTERNALS in event) {
|
|
6330
|
+
const { cause = '' } = event[index_1.SELECT_INTERNALS];
|
|
6331
|
+
return !['filterCriterionChanged', 'dataOverrideChanged'].includes(cause);
|
|
6332
|
+
}
|
|
6333
|
+
return true;
|
|
6334
|
+
};
|
|
5712
6335
|
});
|
|
5713
6336
|
|
|
5714
6337
|
define('oj-c/select-common/UNSAFE_useWrapValueState/useWrapValueState',["require", "exports", "preact/hooks", "../utils/utils"], function (require, exports, hooks_1, utils_1) {
|
|
@@ -5978,13 +6601,13 @@ define('oj-c/select-multiple/useValueItems',["require", "exports", "@oracle/orac
|
|
|
5978
6601
|
exports.useValueItems = useValueItems;
|
|
5979
6602
|
});
|
|
5980
6603
|
|
|
5981
|
-
define('oj-c/select-multiple/useSelectMultiplePreact',["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslationBundle", "oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue", "oj-c/editable-value/UNSAFE_useValidators/useValidators", "oj-c/
|
|
6604
|
+
define('oj-c/select-multiple/useSelectMultiplePreact',["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslationBundle", "oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue", "oj-c/editable-value/UNSAFE_useValidators/useValidators", "oj-c/select-common/PRIVATE_useCache/index", "oj-c/select-common/PRIVATE_useSelectData/index", "oj-c/select-common/UNSAFE_useDataProviderListeners/useDataProviderListeners", "oj-c/select-common/UNSAFE_useWrapValueState/useWrapValueState", "oj-c/select-common/utils/utils", "oj-c/utils/UNSAFE_keyUtils/keySetUtils", "ojs/ojkeyset", "preact/hooks", "./useSyncValueAndValueItems", "./useValueItems"], function (require, exports, UNSAFE_useTranslationBundle_1, useEditableValue_1, useValidators_1, index_1, index_2, useDataProviderListeners_1, useWrapValueState_1, utils_1, keySetUtils_1, ojkeyset_1, hooks_1, useSyncValueAndValueItems_1, useValueItems_1) {
|
|
5982
6605
|
"use strict";
|
|
5983
6606
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5984
6607
|
exports.useSelectMultiplePreact = void 0;
|
|
5985
|
-
function useSelectMultiplePreact({ data
|
|
6608
|
+
function useSelectMultiplePreact({ collectionTemplate, data, disabled, displayOptions, itemTemplate, itemText, labelEdge, labelHint, labelStartWidth, matchBy: propMatchBy, messagesCustom, placeholder, readonly, required, requiredMessageDetail: propRequiredMessageDetail, textAlign, userAssistanceDensity, value: propValue, valueItems: propValueItems, virtualKeyboard, onMessagesCustomChanged, onValidChanged, onValueChanged, onValueItemsChanged, ...otherProps }, addBusyState) {
|
|
5986
6609
|
const [filterCriterion, setFilterCriterion] = (0, hooks_1.useState)(undefined);
|
|
5987
|
-
const [isLoading, setIsLoading] = (0, hooks_1.useState)(
|
|
6610
|
+
const [isLoading, setIsLoading] = (0, hooks_1.useState)(data != null &&
|
|
5988
6611
|
propValue != null &&
|
|
5989
6612
|
propValue.size > 0 &&
|
|
5990
6613
|
(propValueItems == null || propValueItems.size === 0));
|
|
@@ -6022,7 +6645,13 @@ define('oj-c/select-multiple/useSelectMultiplePreact',["require", "exports", "@o
|
|
|
6022
6645
|
});
|
|
6023
6646
|
const { 'aria-describedby': ariaDescribedBy, messages } = textFieldProps;
|
|
6024
6647
|
const hasNoValue = value === null || (value instanceof Set && value.size === 0);
|
|
6025
|
-
const
|
|
6648
|
+
const [dataStateOverride, setDataStateOverride] = (0, hooks_1.useState)();
|
|
6649
|
+
const { dataProvider, dataState, onLoadRange } = (0, index_2.useSelectData)({
|
|
6650
|
+
data,
|
|
6651
|
+
dataStateOverride,
|
|
6652
|
+
filterCriterion,
|
|
6653
|
+
hasCollectionTemplate: collectionTemplate !== undefined
|
|
6654
|
+
});
|
|
6026
6655
|
const [valueToSync, setValueToSync] = (0, hooks_1.useState)(value);
|
|
6027
6656
|
const [valueItemsToSync, setValueItemsToSync] = (0, hooks_1.useState)(valueItems);
|
|
6028
6657
|
const [prevValue, setPrevValue] = (0, hooks_1.useState)(value);
|
|
@@ -6052,10 +6681,6 @@ define('oj-c/select-multiple/useSelectMultiplePreact',["require", "exports", "@o
|
|
|
6052
6681
|
valueItems: valueItemsToSync,
|
|
6053
6682
|
validateValueOnExternalChange
|
|
6054
6683
|
});
|
|
6055
|
-
const [listDataState, onLoadRange] = (0, useListData_1.useListData)(dataProvider, {
|
|
6056
|
-
filterCriterion,
|
|
6057
|
-
initialRowsFetched: 0
|
|
6058
|
-
});
|
|
6059
6684
|
const onCommit = (0, hooks_1.useCallback)(async ({ value }) => {
|
|
6060
6685
|
const valueToCommit = (value && value.size > 0 ? value : utils_1.DEFAULT_VALUE);
|
|
6061
6686
|
setDisplayValue(valueToCommit);
|
|
@@ -6080,23 +6705,25 @@ define('oj-c/select-multiple/useSelectMultiplePreact',["require", "exports", "@o
|
|
|
6080
6705
|
setFilterCriterion(fc);
|
|
6081
6706
|
}, [dataProvider, matchBy]);
|
|
6082
6707
|
const prevSelectedKeysRef = (0, hooks_1.useRef)((0, keySetUtils_1.keysToKeySet)({ all: false, keys: new Set() }));
|
|
6083
|
-
const itemRenderer = (0, hooks_1.
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6708
|
+
const itemRenderer = (0, hooks_1.useMemo)(() => {
|
|
6709
|
+
if (!itemTemplate)
|
|
6710
|
+
return undefined;
|
|
6711
|
+
return ({ data, metadata, searchText, selectedKeys: preactSelectedKeys, onSelectionChange: preactOnSelectionChange }) => {
|
|
6712
|
+
const newPreactSelectedKeys = preactSelectedKeys ?? new Set();
|
|
6713
|
+
const prevPreactSelectedKeys = prevSelectedKeysRef.current.keys.keys ?? new Set();
|
|
6714
|
+
const selectedKeys = (0, utils_1.isSetEqual)(prevPreactSelectedKeys, newPreactSelectedKeys)
|
|
6715
|
+
? prevSelectedKeysRef.current
|
|
6716
|
+
: (0, keySetUtils_1.keysToKeySet)({ all: false, keys: newPreactSelectedKeys });
|
|
6717
|
+
prevSelectedKeysRef.current = selectedKeys;
|
|
6718
|
+
const onSelectedKeysChanged = ((arg) => {
|
|
6719
|
+
const immutableKeySet = (arg instanceof CustomEvent ? arg.detail.value : arg);
|
|
6720
|
+
const immutableSet = immutableKeySet.keys.keys;
|
|
6721
|
+
preactOnSelectionChange({
|
|
6722
|
+
target: arg instanceof CustomEvent ? arg.target : null,
|
|
6723
|
+
value: new Set(immutableSet?.values())
|
|
6724
|
+
});
|
|
6096
6725
|
});
|
|
6097
|
-
|
|
6098
|
-
return itemTemplate
|
|
6099
|
-
? itemTemplate({
|
|
6726
|
+
return itemTemplate({
|
|
6100
6727
|
selectedKeys,
|
|
6101
6728
|
onSelectedKeysChanged,
|
|
6102
6729
|
item: {
|
|
@@ -6104,9 +6731,45 @@ define('oj-c/select-multiple/useSelectMultiplePreact',["require", "exports", "@o
|
|
|
6104
6731
|
metadata: metadata
|
|
6105
6732
|
},
|
|
6106
6733
|
searchText
|
|
6107
|
-
})
|
|
6108
|
-
|
|
6734
|
+
});
|
|
6735
|
+
};
|
|
6109
6736
|
}, [itemTemplate]);
|
|
6737
|
+
const stableCollectionTemplateContextRef = (0, hooks_1.useRef)();
|
|
6738
|
+
const cache = (0, index_1.useCache)();
|
|
6739
|
+
const collectionRenderer = (0, hooks_1.useMemo)(() => {
|
|
6740
|
+
if (!collectionTemplate)
|
|
6741
|
+
return undefined;
|
|
6742
|
+
return ({ currentRowKeyOverride, onPersistCurrentRowKey, onSelectedChange, searchText, selected, selectedOnlyData }) => {
|
|
6743
|
+
if (dataStateOverride !== selectedOnlyData) {
|
|
6744
|
+
setDataStateOverride(selectedOnlyData);
|
|
6745
|
+
}
|
|
6746
|
+
const newCollectionTemplateContext = {
|
|
6747
|
+
currentRowOverride: cache('currentRowOverride', currentRowKeyOverride ? { rowKey: currentRowKeyOverride } : undefined, [currentRowKeyOverride, searchText]),
|
|
6748
|
+
data: dataProvider,
|
|
6749
|
+
onCurrentRowChanged: cache('onCurrentRowChanged', ({ rowKey }) => {
|
|
6750
|
+
onPersistCurrentRowKey({ value: rowKey });
|
|
6751
|
+
}, [onPersistCurrentRowKey]),
|
|
6752
|
+
onSelectedChanged: cache('onSelectedChanged', (detail) => {
|
|
6753
|
+
if (detail.value?.keys.all === false) {
|
|
6754
|
+
const immutableSet = detail.value.keys.keys;
|
|
6755
|
+
const current = selected ?? new Set();
|
|
6756
|
+
const next = new Set(immutableSet.values());
|
|
6757
|
+
if (!(0, utils_1.isSetEqual)(current, next))
|
|
6758
|
+
onSelectedChange({ value: next });
|
|
6759
|
+
}
|
|
6760
|
+
}, [selected, onSelectedChange]),
|
|
6761
|
+
searchText,
|
|
6762
|
+
selected: cache('selected', new ojkeyset_1.KeySetImpl([...(selected?.values() ?? [])]), [selected])
|
|
6763
|
+
};
|
|
6764
|
+
if (!stableCollectionTemplateContextRef.current) {
|
|
6765
|
+
stableCollectionTemplateContextRef.current = newCollectionTemplateContext;
|
|
6766
|
+
}
|
|
6767
|
+
else {
|
|
6768
|
+
Object.assign(stableCollectionTemplateContextRef.current, newCollectionTemplateContext);
|
|
6769
|
+
}
|
|
6770
|
+
return collectionTemplate(stableCollectionTemplateContextRef.current);
|
|
6771
|
+
};
|
|
6772
|
+
}, [cache, collectionTemplate, dataProvider, dataStateOverride]);
|
|
6110
6773
|
const _selectItemsByValue = (0, hooks_1.useCallback)(async (value) => {
|
|
6111
6774
|
return onCommit({
|
|
6112
6775
|
value: value ?? undefined,
|
|
@@ -6126,7 +6789,8 @@ define('oj-c/select-multiple/useSelectMultiplePreact',["require", "exports", "@o
|
|
|
6126
6789
|
methods,
|
|
6127
6790
|
selectMultipleProps: {
|
|
6128
6791
|
'aria-describedby': ariaDescribedBy,
|
|
6129
|
-
|
|
6792
|
+
collectionRenderer,
|
|
6793
|
+
data: dataState.status !== 'error' ? dataState.data : null,
|
|
6130
6794
|
isDisabled: disabled,
|
|
6131
6795
|
isLoading,
|
|
6132
6796
|
isReadonly: readonly,
|
|
@@ -6154,7 +6818,7 @@ define('oj-c/select-multiple/useSelectMultiplePreact',["require", "exports", "@o
|
|
|
6154
6818
|
});
|
|
6155
6819
|
|
|
6156
6820
|
|
|
6157
|
-
define('oj-c/select-multiple/select-multiple',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_SelectMultiple", "@oracle/oraclejet-preact/hooks/
|
|
6821
|
+
define('oj-c/select-multiple/select-multiple',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_SelectMultiple", "@oracle/oraclejet-preact/hooks/UNSAFE_useFormContext", "@oracle/oraclejet-preact/hooks/UNSAFE_useFormVariantContext", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "@oracle/oraclejet-preact/utils/UNSAFE_styles/Layout", "oj-c/editable-value/UNSAFE_useAssistiveText/useAssistiveText", "oj-c/hooks/UNSAFE_useMergedFormContext/useMergedFormContext", "ojs/ojvcomponent", "preact/compat", "preact/hooks", "./useSelectMultiplePreact", "ojs/ojcontext", "css!oj-c/select-multiple/select-multiple-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_SelectMultiple_1, UNSAFE_useFormContext_1, UNSAFE_useFormVariantContext_1, UNSAFE_useTabbableMode_1, Layout_1, useAssistiveText_1, useMergedFormContext_1, ojvcomponent_1, compat_1, hooks_1, useSelectMultiplePreact_1, Context) {
|
|
6158
6822
|
"use strict";
|
|
6159
6823
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6160
6824
|
exports.SelectMultiple = void 0;
|
|
@@ -6214,7 +6878,7 @@ define('oj-c/select-multiple/select-multiple',["require", "exports", "preact/jsx
|
|
|
6214
6878
|
const variant = (0, UNSAFE_useFormVariantContext_1.useFormVariantContext)();
|
|
6215
6879
|
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { id: id, ref: rootRef, class: Layout_1.layoutSpanStyles.layoutSpanColumn[columnSpan], children: (0, jsx_runtime_1.jsx)(UNSAFE_useFormContext_1.FormContext.Provider, { value: containerProps, children: (0, jsx_runtime_1.jsx)(UNSAFE_SelectMultiple_1.SelectMultiple, { ref: selectMultipleRef, ...assistiveTextProps, ...selectMultipleProps, variant: variant }) }) }));
|
|
6216
6880
|
}
|
|
6217
|
-
exports.SelectMultiple = (0, ojvcomponent_1.registerCustomElement)('oj-c-select-multiple', (0, compat_1.forwardRef)(SelectMultipleImpl), "SelectMultiple", { "properties": { "columnSpan": { "type": "number" }, "containerReadonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "data": { "type": "DataProvider|null" }, "disabled": { "type": "boolean" }, "displayOptions": { "type": "object", "properties": { "messages": { "type": "string", "enumValues": ["none", "display"] } } }, "help": { "type": "object", "properties": { "instruction": { "type": "string" } } }, "helpHints": { "type": "object", "properties": { "definition": { "type": "string" }, "source": { "type": "string" }, "sourceText": { "type": "string" } } }, "itemText": { "type": "string|number|function" }, "labelEdge": { "type": "string", "enumValues": ["none", "start", "top", "inside"], "binding": { "consume": { "name": "containerLabelEdge" } } }, "labelHint": { "type": "string" }, "labelStartWidth": { "type": "number|string", "binding": { "consume": { "name": "labelWidth" } } }, "labelWrapping": { "type": "string", "enumValues": ["truncate", "wrap"], "binding": { "consume": { "name": "labelWrapping" } } }, "matchBy": { "type": "Array<string>|null" }, "messagesCustom": { "type": "Array<object>", "writeback": true }, "placeholder": { "type": "string" }, "readonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "required": { "type": "boolean" }, "requiredMessageDetail": { "type": "string" }, "textAlign": { "type": "string", "enumValues": ["end", "start", "right"] }, "userAssistanceDensity": { "type": "string", "enumValues": ["compact", "reflow", "efficient"], "binding": { "consume": { "name": "containerUserAssistanceDensity" } } }, "value": { "type": "object|null", "writeback": true }, "valueItems": { "type": "object|null", "writeback": true }, "virtualKeyboard": { "type": "string", "enumValues": ["number", "search", "auto", "url", "text", "email", "tel"] }, "valid": { "type": "string", "enumValues": ["pending", "valid", "invalidHidden", "invalidShown"], "readOnly": true, "writeback": true } }, "
|
|
6881
|
+
exports.SelectMultiple = (0, ojvcomponent_1.registerCustomElement)('oj-c-select-multiple', (0, compat_1.forwardRef)(SelectMultipleImpl), "SelectMultiple", { "slots": { "collectionTemplate": { "data": {} }, "itemTemplate": { "data": {} } }, "properties": { "columnSpan": { "type": "number" }, "containerReadonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "data": { "type": "DataProvider|null" }, "disabled": { "type": "boolean" }, "displayOptions": { "type": "object", "properties": { "messages": { "type": "string", "enumValues": ["none", "display"] } } }, "help": { "type": "object", "properties": { "instruction": { "type": "string" } } }, "helpHints": { "type": "object", "properties": { "definition": { "type": "string" }, "source": { "type": "string" }, "sourceText": { "type": "string" } } }, "itemText": { "type": "string|number|function" }, "labelEdge": { "type": "string", "enumValues": ["none", "start", "top", "inside"], "binding": { "consume": { "name": "containerLabelEdge" } } }, "labelHint": { "type": "string" }, "labelStartWidth": { "type": "number|string", "binding": { "consume": { "name": "labelWidth" } } }, "labelWrapping": { "type": "string", "enumValues": ["truncate", "wrap"], "binding": { "consume": { "name": "labelWrapping" } } }, "matchBy": { "type": "Array<string>|null" }, "messagesCustom": { "type": "Array<object>", "writeback": true }, "placeholder": { "type": "string" }, "readonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "required": { "type": "boolean" }, "requiredMessageDetail": { "type": "string" }, "textAlign": { "type": "string", "enumValues": ["end", "start", "right"] }, "userAssistanceDensity": { "type": "string", "enumValues": ["compact", "reflow", "efficient"], "binding": { "consume": { "name": "containerUserAssistanceDensity" } } }, "value": { "type": "object|null", "writeback": true }, "valueItems": { "type": "object|null", "writeback": true }, "virtualKeyboard": { "type": "string", "enumValues": ["number", "search", "auto", "url", "text", "email", "tel"] }, "valid": { "type": "string", "enumValues": ["pending", "valid", "invalidHidden", "invalidShown"], "readOnly": true, "writeback": true } }, "extension": { "_WRITEBACK_PROPS": ["messagesCustom", "valid", "value", "valueItems"], "_READ_ONLY_PROPS": ["valid"], "_OBSERVED_GLOBAL_PROPS": ["aria-describedby", "id"] }, "methods": { "blur": {}, "focus": {}, "showMessages": {}, "reset": {}, "validate": {}, "_selectItemsByValue": {} } }, { "columnSpan": 1, "data": null, "disabled": false, "displayOptions": { "messages": "display" }, "help": { "instruction": "" }, "helpHints": { "definition": "", "source": "" }, "matchBy": null, "messagesCustom": [], "required": false, "value": null, "valueItems": null, "virtualKeyboard": "auto" }, {
|
|
6218
6882
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
6219
6883
|
}, { consume: [UNSAFE_useFormVariantContext_1.FormVariantContext, UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
6220
6884
|
});
|
|
@@ -6372,13 +7036,13 @@ define('oj-c/select-single/useValueItem',["require", "exports", "@oracle/oraclej
|
|
|
6372
7036
|
exports.useValueItem = useValueItem;
|
|
6373
7037
|
});
|
|
6374
7038
|
|
|
6375
|
-
define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslationBundle", "oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue", "oj-c/editable-value/UNSAFE_useValidators/useValidators", "oj-c/editable-value/utils/utils", "oj-c/
|
|
7039
|
+
define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslationBundle", "oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue", "oj-c/editable-value/UNSAFE_useValidators/useValidators", "oj-c/editable-value/utils/utils", "oj-c/select-common/PRIVATE_useCache/index", "oj-c/select-common/PRIVATE_useSelectData/index", "oj-c/select-common/UNSAFE_useDataProviderListeners/useDataProviderListeners", "oj-c/select-common/UNSAFE_useWrapValueState/useWrapValueState", "oj-c/select-common/utils/utils", "ojs/ojkeyset", "preact/hooks", "./useSyncValueAndValueItem", "./useValueItem"], function (require, exports, UNSAFE_useTranslationBundle_1, useEditableValue_1, useValidators_1, utils_1, index_1, index_2, useDataProviderListeners_1, useWrapValueState_1, utils_2, ojkeyset_1, hooks_1, useSyncValueAndValueItem_1, useValueItem_1) {
|
|
6376
7040
|
"use strict";
|
|
6377
7041
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6378
7042
|
exports.useSelectSinglePreact = void 0;
|
|
6379
|
-
function useSelectSinglePreact({ advancedSearch, data
|
|
7043
|
+
function useSelectSinglePreact({ advancedSearch, collectionTemplate, data, disabled, displayOptions, itemTemplate, itemText, labelEdge, labelHint, labelStartWidth, matchBy: propMatchBy, messagesCustom, placeholder, readonly, requiredMessageDetail: propRequiredMessageDetail, required, textAlign, userAssistanceDensity, value: propValue, valueItem: propValueItem, virtualKeyboard, onMessagesCustomChanged, onOjAdvancedSearchAction, onOjValueAction, onValidChanged, onValueChanged, onValueItemChanged, ...otherProps }, addBusyState) {
|
|
6380
7044
|
const [filterCriterion, setFilterCriterion] = (0, hooks_1.useState)(undefined);
|
|
6381
|
-
const [isLoading, setIsLoading] = (0, hooks_1.useState)(
|
|
7045
|
+
const [isLoading, setIsLoading] = (0, hooks_1.useState)(data != null && propValue != null && propValueItem == null);
|
|
6382
7046
|
const matchBy = (0, hooks_1.useMemo)(() => {
|
|
6383
7047
|
return propMatchBy && propMatchBy.length > 0 ? [...propMatchBy] : undefined;
|
|
6384
7048
|
}, [propMatchBy]);
|
|
@@ -6412,7 +7076,11 @@ define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracl
|
|
|
6412
7076
|
});
|
|
6413
7077
|
const { 'aria-describedby': ariaDescribedBy, messages } = textFieldProps;
|
|
6414
7078
|
const hasNoValue = value === null;
|
|
6415
|
-
const dataProvider = (0,
|
|
7079
|
+
const { dataProvider, dataState, onLoadRange } = (0, index_2.useSelectData)({
|
|
7080
|
+
data,
|
|
7081
|
+
filterCriterion,
|
|
7082
|
+
hasCollectionTemplate: collectionTemplate !== undefined
|
|
7083
|
+
});
|
|
6416
7084
|
const [valueToSync, setValueToSync] = (0, hooks_1.useState)(value);
|
|
6417
7085
|
const [valueItemToSync, setValueItemToSync] = (0, hooks_1.useState)(valueItem);
|
|
6418
7086
|
(0, hooks_1.useEffect)(() => {
|
|
@@ -6440,10 +7108,6 @@ define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracl
|
|
|
6440
7108
|
valueItem: valueItemToSync,
|
|
6441
7109
|
validateValueOnExternalChange
|
|
6442
7110
|
});
|
|
6443
|
-
const [listDataState, onLoadRange] = (0, useListData_1.useListData)(dataProvider, {
|
|
6444
|
-
filterCriterion,
|
|
6445
|
-
initialRowsFetched: 0
|
|
6446
|
-
});
|
|
6447
7111
|
const onCommit = (0, hooks_1.useCallback)(async ({ previousValue, value }) => {
|
|
6448
7112
|
const valueToCommit = value != null ? value : utils_2.DEFAULT_VALUE;
|
|
6449
7113
|
setDisplayValue(valueToCommit);
|
|
@@ -6451,7 +7115,7 @@ define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracl
|
|
|
6451
7115
|
if (validationResult === useValidators_1.ValidationResult.INVALID) {
|
|
6452
7116
|
setPreactValueItem(undefined);
|
|
6453
7117
|
}
|
|
6454
|
-
else if (validationResult === useValidators_1.ValidationResult.VALID &&
|
|
7118
|
+
else if (validationResult === useValidators_1.ValidationResult.VALID && dataState.status === 'success') {
|
|
6455
7119
|
if (value == null) {
|
|
6456
7120
|
onOjValueAction?.({
|
|
6457
7121
|
itemContext: utils_2.DEFAULT_ITEM_CONTEXT,
|
|
@@ -6470,7 +7134,7 @@ define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracl
|
|
|
6470
7134
|
}
|
|
6471
7135
|
}
|
|
6472
7136
|
else {
|
|
6473
|
-
const data =
|
|
7137
|
+
const data = dataState.data.data;
|
|
6474
7138
|
let item = data.find((item) => item.metadata.key === value);
|
|
6475
7139
|
if (item === undefined) {
|
|
6476
7140
|
const fetchResults = await dataProvider.fetchByKeys({ keys: new Set([value]) });
|
|
@@ -6490,7 +7154,7 @@ define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracl
|
|
|
6490
7154
|
}
|
|
6491
7155
|
}, [
|
|
6492
7156
|
dataProvider,
|
|
6493
|
-
|
|
7157
|
+
dataState,
|
|
6494
7158
|
preactValueItem,
|
|
6495
7159
|
valueItem,
|
|
6496
7160
|
onCommitValue,
|
|
@@ -6501,17 +7165,48 @@ define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracl
|
|
|
6501
7165
|
const fc = (0, utils_2.getFilterCriterion)(dataProvider, searchText, matchBy);
|
|
6502
7166
|
setFilterCriterion(fc);
|
|
6503
7167
|
}, [dataProvider, matchBy]);
|
|
6504
|
-
const itemRenderer = (0, hooks_1.
|
|
6505
|
-
|
|
6506
|
-
|
|
7168
|
+
const itemRenderer = (0, hooks_1.useMemo)(() => {
|
|
7169
|
+
if (!itemTemplate)
|
|
7170
|
+
return undefined;
|
|
7171
|
+
return ({ data, metadata, searchText }) => {
|
|
7172
|
+
return itemTemplate({
|
|
6507
7173
|
item: {
|
|
6508
7174
|
data: data,
|
|
6509
7175
|
metadata: metadata
|
|
6510
7176
|
},
|
|
6511
7177
|
searchText
|
|
6512
|
-
})
|
|
6513
|
-
|
|
7178
|
+
});
|
|
7179
|
+
};
|
|
6514
7180
|
}, [itemTemplate]);
|
|
7181
|
+
const stableCollectionTemplateContextRef = (0, hooks_1.useRef)();
|
|
7182
|
+
const cache = (0, index_1.useCache)();
|
|
7183
|
+
const collectionRenderer = (0, hooks_1.useMemo)(() => {
|
|
7184
|
+
if (!collectionTemplate)
|
|
7185
|
+
return undefined;
|
|
7186
|
+
return ({ currentRowKeyOverride, searchText, selected, onPersistCurrentRowKey, onRowAction }) => {
|
|
7187
|
+
const newCollectionTemplateContext = {
|
|
7188
|
+
currentRowOverride: cache('currentRowOverride', currentRowKeyOverride ? { rowKey: currentRowKeyOverride } : undefined, [currentRowKeyOverride, searchText]),
|
|
7189
|
+
data: dataProvider,
|
|
7190
|
+
onCurrentRowChanged: cache('onCurrentRowChanged', ({ rowKey }) => {
|
|
7191
|
+
onPersistCurrentRowKey({ value: rowKey });
|
|
7192
|
+
}, [onPersistCurrentRowKey]),
|
|
7193
|
+
onRowAction: cache('onRowAction', ({ item }) => {
|
|
7194
|
+
onRowAction({
|
|
7195
|
+
context: { data: item.data, key: item.metadata.key, metadata: item.metadata }
|
|
7196
|
+
});
|
|
7197
|
+
}, [onRowAction]),
|
|
7198
|
+
searchText,
|
|
7199
|
+
selected: cache('selected', new ojkeyset_1.KeySetImpl([...(selected?.values() ?? [])]), [selected])
|
|
7200
|
+
};
|
|
7201
|
+
if (!stableCollectionTemplateContextRef.current) {
|
|
7202
|
+
stableCollectionTemplateContextRef.current = newCollectionTemplateContext;
|
|
7203
|
+
}
|
|
7204
|
+
else {
|
|
7205
|
+
Object.assign(stableCollectionTemplateContextRef.current, newCollectionTemplateContext);
|
|
7206
|
+
}
|
|
7207
|
+
return collectionTemplate(stableCollectionTemplateContextRef.current);
|
|
7208
|
+
};
|
|
7209
|
+
}, [cache, collectionTemplate, dataProvider]);
|
|
6515
7210
|
const _selectItemByValue = (0, hooks_1.useCallback)(async (value) => {
|
|
6516
7211
|
return onCommit({
|
|
6517
7212
|
value: value ?? undefined,
|
|
@@ -6529,13 +7224,14 @@ define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracl
|
|
|
6529
7224
|
selectSingleProps: {
|
|
6530
7225
|
advancedSearch,
|
|
6531
7226
|
'aria-describedby': ariaDescribedBy,
|
|
6532
|
-
|
|
7227
|
+
collectionRenderer,
|
|
7228
|
+
data: dataState.status !== 'error' ? dataState.data : null,
|
|
6533
7229
|
isDisabled: disabled,
|
|
6534
7230
|
isLoading,
|
|
6535
7231
|
isReadonly: readonly,
|
|
6536
7232
|
isRequired: required,
|
|
6537
7233
|
isRequiredShown: required && (userAssistanceDensity === 'compact' || hasNoValue),
|
|
6538
|
-
itemRenderer
|
|
7234
|
+
itemRenderer,
|
|
6539
7235
|
itemText,
|
|
6540
7236
|
label: labelHint,
|
|
6541
7237
|
labelEdge,
|
|
@@ -6559,7 +7255,7 @@ define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracl
|
|
|
6559
7255
|
});
|
|
6560
7256
|
|
|
6561
7257
|
|
|
6562
|
-
define('oj-c/select-single/select-single',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/
|
|
7258
|
+
define('oj-c/select-single/select-single',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_SelectSingle", "@oracle/oraclejet-preact/hooks/UNSAFE_useFormContext", "@oracle/oraclejet-preact/hooks/UNSAFE_useFormVariantContext", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "@oracle/oraclejet-preact/utils/UNSAFE_styles/Layout", "oj-c/editable-value/UNSAFE_useAssistiveText/useAssistiveText", "oj-c/hooks/UNSAFE_useMergedFormContext/useMergedFormContext", "ojs/ojvcomponent", "preact/compat", "preact/hooks", "./useSelectSinglePreact", "ojs/ojcontext", "css!oj-c/select-single/select-single-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_SelectSingle_1, UNSAFE_useFormContext_1, UNSAFE_useFormVariantContext_1, UNSAFE_useTabbableMode_1, Layout_1, useAssistiveText_1, useMergedFormContext_1, ojvcomponent_1, compat_1, hooks_1, useSelectSinglePreact_1, Context) {
|
|
6563
7259
|
"use strict";
|
|
6564
7260
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6565
7261
|
exports.SelectSingle = void 0;
|
|
@@ -6621,7 +7317,7 @@ define('oj-c/select-single/select-single',["require", "exports", "preact/jsx-run
|
|
|
6621
7317
|
const variant = (0, UNSAFE_useFormVariantContext_1.useFormVariantContext)();
|
|
6622
7318
|
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { id: id, ref: rootRef, class: Layout_1.layoutSpanStyles.layoutSpanColumn[columnSpan], children: (0, jsx_runtime_1.jsx)(UNSAFE_useFormContext_1.FormContext.Provider, { value: containerProps, children: (0, jsx_runtime_1.jsx)(UNSAFE_SelectSingle_1.SelectSingle, { ref: selectSingleRef, ...assistiveTextProps, ...selectSingleProps, variant: variant }) }) }));
|
|
6623
7319
|
}
|
|
6624
|
-
exports.SelectSingle = (0, ojvcomponent_1.registerCustomElement)('oj-c-select-single', (0, compat_1.forwardRef)(SelectSingleImpl), "SelectSingle", { "properties": { "advancedSearch": { "type": "string", "enumValues": ["off", "on"] }, "columnSpan": { "type": "number" }, "containerReadonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "data": { "type": "DataProvider|null" }, "disabled": { "type": "boolean" }, "displayOptions": { "type": "object", "properties": { "messages": { "type": "string", "enumValues": ["none", "display"] } } }, "help": { "type": "object", "properties": { "instruction": { "type": "string" } } }, "helpHints": { "type": "object", "properties": { "definition": { "type": "string" }, "source": { "type": "string" }, "sourceText": { "type": "string" } } }, "itemText": { "type": "string|number|function" }, "labelEdge": { "type": "string", "enumValues": ["none", "start", "top", "inside"], "binding": { "consume": { "name": "containerLabelEdge" } } }, "labelHint": { "type": "string" }, "labelStartWidth": { "type": "number|string", "binding": { "consume": { "name": "labelWidth" } } }, "labelWrapping": { "type": "string", "enumValues": ["truncate", "wrap"], "binding": { "consume": { "name": "labelWrapping" } } }, "matchBy": { "type": "Array<string>|null" }, "messagesCustom": { "type": "Array<object>", "writeback": true }, "placeholder": { "type": "string" }, "readonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "required": { "type": "boolean" }, "requiredMessageDetail": { "type": "string" }, "textAlign": { "type": "string", "enumValues": ["end", "start", "right"] }, "userAssistanceDensity": { "type": "string", "enumValues": ["compact", "reflow", "efficient"], "binding": { "consume": { "name": "containerUserAssistanceDensity" } } }, "value": { "type": "any", "writeback": true }, "valueItem": { "type": "object|null", "properties": { "data": { "type": "any" }, "key": { "type": "any" }, "metadata": { "type": "object", "properties": { "indexFromParent": { "type": "number" }, "isLeaf": { "type": "boolean" }, "key": { "type": "any" }, "message": { "type": "object", "properties": { "detail": { "type": "string" }, "severity": { "type": "string|number" }, "summary": { "type": "string" } } }, "parentKey": { "type": "any" }, "suggestion": { "type": "object" }, "treeDepth": { "type": "number" } } } }, "writeback": true }, "virtualKeyboard": { "type": "string", "enumValues": ["number", "search", "auto", "url", "text", "email", "tel"] }, "valid": { "type": "string", "enumValues": ["pending", "valid", "invalidHidden", "invalidShown"], "readOnly": true, "writeback": true } }, "slots": { "itemTemplate": { "data": {} } }, "events": { "ojAdvancedSearchAction": {}, "ojValueAction": {} }, "extension": { "_WRITEBACK_PROPS": ["messagesCustom", "valid", "value", "valueItem"], "_READ_ONLY_PROPS": ["valid"], "_OBSERVED_GLOBAL_PROPS": ["aria-describedby", "id"] }, "methods": { "blur": {}, "focus": {}, "showMessages": {}, "reset": {}, "validate": {}, "_doAdvancedSearchAction": {}, "_selectItemByValue": {} } }, { "advancedSearch": "off", "columnSpan": 1, "data": null, "disabled": false, "displayOptions": { "messages": "display" }, "help": { "instruction": "" }, "helpHints": { "definition": "", "source": "" }, "matchBy": null, "messagesCustom": [], "required": false, "value": null, "valueItem": null, "virtualKeyboard": "auto" }, {
|
|
7320
|
+
exports.SelectSingle = (0, ojvcomponent_1.registerCustomElement)('oj-c-select-single', (0, compat_1.forwardRef)(SelectSingleImpl), "SelectSingle", { "properties": { "advancedSearch": { "type": "string", "enumValues": ["off", "on"] }, "columnSpan": { "type": "number" }, "containerReadonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "data": { "type": "DataProvider|null" }, "disabled": { "type": "boolean" }, "displayOptions": { "type": "object", "properties": { "messages": { "type": "string", "enumValues": ["none", "display"] } } }, "help": { "type": "object", "properties": { "instruction": { "type": "string" } } }, "helpHints": { "type": "object", "properties": { "definition": { "type": "string" }, "source": { "type": "string" }, "sourceText": { "type": "string" } } }, "itemText": { "type": "string|number|function" }, "labelEdge": { "type": "string", "enumValues": ["none", "start", "top", "inside"], "binding": { "consume": { "name": "containerLabelEdge" } } }, "labelHint": { "type": "string" }, "labelStartWidth": { "type": "number|string", "binding": { "consume": { "name": "labelWidth" } } }, "labelWrapping": { "type": "string", "enumValues": ["truncate", "wrap"], "binding": { "consume": { "name": "labelWrapping" } } }, "matchBy": { "type": "Array<string>|null" }, "messagesCustom": { "type": "Array<object>", "writeback": true }, "placeholder": { "type": "string" }, "readonly": { "type": "boolean", "binding": { "consume": { "name": "containerReadonly" } } }, "required": { "type": "boolean" }, "requiredMessageDetail": { "type": "string" }, "textAlign": { "type": "string", "enumValues": ["end", "start", "right"] }, "userAssistanceDensity": { "type": "string", "enumValues": ["compact", "reflow", "efficient"], "binding": { "consume": { "name": "containerUserAssistanceDensity" } } }, "value": { "type": "any", "writeback": true }, "valueItem": { "type": "object|null", "properties": { "data": { "type": "any" }, "key": { "type": "any" }, "metadata": { "type": "object", "properties": { "indexFromParent": { "type": "number" }, "isLeaf": { "type": "boolean" }, "key": { "type": "any" }, "message": { "type": "object", "properties": { "detail": { "type": "string" }, "severity": { "type": "string|number" }, "summary": { "type": "string" } } }, "parentKey": { "type": "any" }, "suggestion": { "type": "object" }, "treeDepth": { "type": "number" } } } }, "writeback": true }, "virtualKeyboard": { "type": "string", "enumValues": ["number", "search", "auto", "url", "text", "email", "tel"] }, "valid": { "type": "string", "enumValues": ["pending", "valid", "invalidHidden", "invalidShown"], "readOnly": true, "writeback": true } }, "slots": { "collectionTemplate": { "data": {} }, "itemTemplate": { "data": {} } }, "events": { "ojAdvancedSearchAction": {}, "ojValueAction": {} }, "extension": { "_WRITEBACK_PROPS": ["messagesCustom", "valid", "value", "valueItem"], "_READ_ONLY_PROPS": ["valid"], "_OBSERVED_GLOBAL_PROPS": ["aria-describedby", "id"] }, "methods": { "blur": {}, "focus": {}, "showMessages": {}, "reset": {}, "validate": {}, "_doAdvancedSearchAction": {}, "_selectItemByValue": {} } }, { "advancedSearch": "off", "columnSpan": 1, "data": null, "disabled": false, "displayOptions": { "messages": "display" }, "help": { "instruction": "" }, "helpHints": { "definition": "", "source": "" }, "matchBy": null, "messagesCustom": [], "required": false, "value": null, "valueItem": null, "virtualKeyboard": "auto" }, {
|
|
6625
7321
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
6626
7322
|
}, { consume: [UNSAFE_useFormVariantContext_1.FormVariantContext, UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
6627
7323
|
});
|
|
@@ -6787,11 +7483,11 @@ define('oj-c/file-picker',["require", "exports", "oj-c/file-picker/file-picker"]
|
|
|
6787
7483
|
});
|
|
6788
7484
|
|
|
6789
7485
|
|
|
6790
|
-
define('oj-c/meter-bar/meter-bar',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_MeterBar", "ojs/ojvcomponent", "preact/hooks", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "../utils/UNSAFE_meterUtils/meterUtils", "css!oj-c/meter-bar/meter-bar-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_MeterBar_1, ojvcomponent_1, hooks_1, UNSAFE_useTabbableMode_1, meterUtils_1) {
|
|
7486
|
+
define('oj-c/meter-bar/meter-bar',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_MeterBar", "ojs/ojvcomponent", "preact/hooks", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "../utils/UNSAFE_meterUtils/meterUtils", "@oracle/oraclejet-preact/utils/UNSAFE_stringUtils", "css!oj-c/meter-bar/meter-bar-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_MeterBar_1, ojvcomponent_1, hooks_1, UNSAFE_useTabbableMode_1, meterUtils_1, UNSAFE_stringUtils_1) {
|
|
6791
7487
|
"use strict";
|
|
6792
7488
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6793
7489
|
exports.MeterBar = void 0;
|
|
6794
|
-
exports.MeterBar = (0, ojvcomponent_1.registerCustomElement)('oj-c-meter-bar', ({ max = 100, value = 0, min = 0, size = 'md', orientation = 'horizontal', step = 1, indicatorSize = 1, readonly = false, thresholdDisplay = 'indicator', ...props }) => {
|
|
7490
|
+
exports.MeterBar = (0, ojvcomponent_1.registerCustomElement)('oj-c-meter-bar', ({ max = 100, value = 0, min = 0, size = 'md', orientation = 'horizontal', step = 1, indicatorSize = 1, readonly = false, thresholdDisplay = 'indicator', baseline, ...props }) => {
|
|
6795
7491
|
const [hoveredVal, setHoveredVal] = (0, hooks_1.useState)();
|
|
6796
7492
|
const inputHandler = (detail) => {
|
|
6797
7493
|
setHoveredVal(detail.value);
|
|
@@ -6806,12 +7502,14 @@ define('oj-c/meter-bar/meter-bar',["require", "exports", "preact/jsx-runtime", '
|
|
|
6806
7502
|
color: (0, meterUtils_1.getThresholdColorByIndex)(threshold, index)
|
|
6807
7503
|
};
|
|
6808
7504
|
});
|
|
6809
|
-
|
|
7505
|
+
const preactMeterBarAriaLabelledBy = (0, UNSAFE_stringUtils_1.merge)([props['aria-labelledby'], props.labelledBy]);
|
|
7506
|
+
const preactMeterBarAriaDescribedBy = (0, UNSAFE_stringUtils_1.merge)([props['aria-describedby'], props.describedBy]);
|
|
7507
|
+
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { class: `oj-c-meter-bar-${orientation}${size === 'fit' ? '-fit' : ''}`, children: (0, jsx_runtime_1.jsx)(UNSAFE_MeterBar_1.MeterBar, { value: (hoveredVal != undefined ? hoveredVal : value), step: step, max: max, min: min, size: size, orientation: orientation, indicatorSize: indicatorSize, baseline: baseline, datatip: props.datatip
|
|
6810
7508
|
? props.datatip({
|
|
6811
7509
|
value: hoveredVal != undefined ? hoveredVal : value
|
|
6812
7510
|
})
|
|
6813
|
-
: props.datatip, onCommit: readonly ? undefined : commitHandler, onInput: readonly ? undefined : inputHandler, length: '100%', thresholds: thresholds, referenceLines: props.referenceLines, thresholdDisplay: thresholdDisplay === 'plotArea' ? 'track' : thresholdDisplay, indicatorColor: props.color, trackColor: props.plotArea?.color, isTrackRendered: props.plotArea?.rendered !== 'off', "aria-label": props['aria-label'], "aria-labelledby":
|
|
6814
|
-
}, "MeterBar", { "properties": { "max": { "type": "number" }, "min": { "type": "number" }, "readonly": { "type": "boolean" }, "value": { "type": "number|null", "writeback": true }, "step": { "type": "number" }, "color": { "type": "string" }, "indicatorSize": { "type": "number" }, "plotArea": { "type": "object", "properties": { "color": { "type": "string" }, "rendered": { "type": "string", "enumValues": ["off", "on"] } } }, "orientation": { "type": "string", "enumValues": ["horizontal", "vertical"] }, "referenceLines": { "type": "Array<object>" }, "thresholdDisplay": { "type": "string", "enumValues": ["all", "plotArea", "indicator"] }, "thresholds": { "type": "Array<object>" }, "describedBy": { "type": "string|null" }, "labelledBy": { "type": "string|null" }, "size": { "type": "string", "enumValues": ["sm", "md", "lg", "fit"] }, "datatip": { "type": "function" }, "transientValue": { "type": "number", "readOnly": true, "writeback": true } }, "extension": { "_WRITEBACK_PROPS": ["value", "transientValue"], "_READ_ONLY_PROPS": ["transientValue"], "_OBSERVED_GLOBAL_PROPS": ["aria-label"] } }, { "max": 100, "value": 0, "min": 0, "size": "md", "orientation": "horizontal", "step": 1, "indicatorSize": 1, "readonly": false, "thresholdDisplay": "indicator" }, {
|
|
7511
|
+
: props.datatip, onCommit: readonly ? undefined : commitHandler, onInput: readonly ? undefined : inputHandler, length: '100%', thresholds: thresholds, referenceLines: props.referenceLines, thresholdDisplay: thresholdDisplay === 'plotArea' ? 'track' : thresholdDisplay, indicatorColor: props.color, trackColor: props.plotArea?.color, isTrackRendered: props.plotArea?.rendered !== 'off', "aria-label": props['aria-label'], "aria-labelledby": preactMeterBarAriaLabelledBy ?? undefined, "aria-describedby": preactMeterBarAriaDescribedBy ?? undefined }) }));
|
|
7512
|
+
}, "MeterBar", { "properties": { "max": { "type": "number" }, "min": { "type": "number" }, "readonly": { "type": "boolean" }, "value": { "type": "number|null", "writeback": true }, "baseline": { "type": "number" }, "step": { "type": "number" }, "color": { "type": "string" }, "indicatorSize": { "type": "number" }, "plotArea": { "type": "object", "properties": { "color": { "type": "string" }, "rendered": { "type": "string", "enumValues": ["off", "on"] } } }, "orientation": { "type": "string", "enumValues": ["horizontal", "vertical"] }, "referenceLines": { "type": "Array<object>" }, "thresholdDisplay": { "type": "string", "enumValues": ["all", "plotArea", "indicator"] }, "thresholds": { "type": "Array<object>" }, "describedBy": { "type": "string|null" }, "labelledBy": { "type": "string|null" }, "size": { "type": "string", "enumValues": ["sm", "md", "lg", "fit"] }, "datatip": { "type": "function" }, "transientValue": { "type": "number", "readOnly": true, "writeback": true } }, "extension": { "_WRITEBACK_PROPS": ["value", "transientValue"], "_READ_ONLY_PROPS": ["transientValue"], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "aria-labelledby", "aria-describedby"] } }, { "max": 100, "value": 0, "min": 0, "size": "md", "orientation": "horizontal", "step": 1, "indicatorSize": 1, "readonly": false, "thresholdDisplay": "indicator" }, {
|
|
6815
7513
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
6816
7514
|
}, { consume: [UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
6817
7515
|
});
|
|
@@ -6824,7 +7522,7 @@ define('oj-c/meter-bar',["require", "exports", "oj-c/meter-bar/meter-bar"], func
|
|
|
6824
7522
|
});
|
|
6825
7523
|
|
|
6826
7524
|
|
|
6827
|
-
define('oj-c/meter-circle/meter-circle',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_MeterCircle", "ojs/ojvcomponent", "preact/hooks", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "../utils/UNSAFE_meterUtils/meterUtils", "css!oj-c/meter-circle/meter-circle-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_MeterCircle_1, ojvcomponent_1, hooks_1, UNSAFE_useTabbableMode_1, meterUtils_1) {
|
|
7525
|
+
define('oj-c/meter-circle/meter-circle',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_MeterCircle", "ojs/ojvcomponent", "preact/hooks", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "../utils/UNSAFE_meterUtils/meterUtils", "@oracle/oraclejet-preact/utils/UNSAFE_stringUtils", "css!oj-c/meter-circle/meter-circle-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_MeterCircle_1, ojvcomponent_1, hooks_1, UNSAFE_useTabbableMode_1, meterUtils_1, UNSAFE_stringUtils_1) {
|
|
6828
7526
|
"use strict";
|
|
6829
7527
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6830
7528
|
exports.MeterCircle = void 0;
|
|
@@ -6843,14 +7541,16 @@ define('oj-c/meter-circle/meter-circle',["require", "exports", "preact/jsx-runti
|
|
|
6843
7541
|
color: (0, meterUtils_1.getThresholdColorByIndex)(threshold, index)
|
|
6844
7542
|
};
|
|
6845
7543
|
});
|
|
7544
|
+
const preactMeterCircleAriaLabelledBy = (0, UNSAFE_stringUtils_1.merge)([props['aria-labelledby'], props.labelledBy]);
|
|
7545
|
+
const preactMeterCircleAriaDescribedBy = (0, UNSAFE_stringUtils_1.merge)([props['aria-describedby'], props.describedBy]);
|
|
6846
7546
|
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { class: size === 'fit' ? 'oj-c-meter-circle-fit' : undefined, children: (0, jsx_runtime_1.jsx)(UNSAFE_MeterCircle_1.MeterCircle, { value: (hoveredVal != undefined ? hoveredVal : value), step: step, max: max, min: min, size: size, angleExtent: angleExtent, startAngle: startAngle, indicatorSize: indicatorSize, innerRadius: props.innerRadius, datatip: props.datatip
|
|
6847
7547
|
? props.datatip({
|
|
6848
7548
|
value: hoveredVal != undefined ? hoveredVal : value
|
|
6849
7549
|
})
|
|
6850
|
-
: props.datatip, onCommit: readonly ? undefined : commitHandler, onInput: readonly ? undefined : inputHandler, thresholds: thresholds, trackColor: props.plotArea?.color, indicatorColor: props.color, isTrackRendered: props.plotArea?.rendered !== 'off', referenceLines: props.referenceLines, thresholdDisplay: thresholdDisplay === 'plotArea' ? 'track' : thresholdDisplay, "aria-label": props['aria-label'], "aria-labelledby":
|
|
7550
|
+
: props.datatip, onCommit: readonly ? undefined : commitHandler, onInput: readonly ? undefined : inputHandler, thresholds: thresholds, trackColor: props.plotArea?.color, indicatorColor: props.color, isTrackRendered: props.plotArea?.rendered !== 'off', referenceLines: props.referenceLines, thresholdDisplay: thresholdDisplay === 'plotArea' ? 'track' : thresholdDisplay, "aria-label": props['aria-label'], "aria-labelledby": preactMeterCircleAriaLabelledBy ?? undefined, "aria-describedby": preactMeterCircleAriaDescribedBy ?? undefined, children: (context) => {
|
|
6851
7551
|
return props.centerTemplate?.({ value, ...context });
|
|
6852
7552
|
} }) }));
|
|
6853
|
-
}, "MeterCircle", { "properties": { "max": { "type": "number" }, "min": { "type": "number" }, "readonly": { "type": "boolean" }, "value": { "type": "number|null", "writeback": true }, "step": { "type": "number" }, "color": { "type": "string" }, "indicatorSize": { "type": "number" }, "innerRadius": { "type": "number" }, "plotArea": { "type": "object", "properties": { "color": { "type": "string" }, "rendered": { "type": "string", "enumValues": ["off", "on"] } } }, "angleExtent": { "type": "number" }, "startAngle": { "type": "number" }, "referenceLines": { "type": "Array<object>" }, "thresholdDisplay": { "type": "string", "enumValues": ["all", "plotArea", "indicator"] }, "thresholds": { "type": "Array<object>" }, "describedBy": { "type": "string|null" }, "labelledBy": { "type": "string|null" }, "size": { "type": "string", "enumValues": ["sm", "md", "lg", "fit"] }, "datatip": { "type": "function" }, "transientValue": { "type": "number", "readOnly": true, "writeback": true } }, "slots": { "centerTemplate": { "data": {} } }, "extension": { "_WRITEBACK_PROPS": ["value", "transientValue"], "_READ_ONLY_PROPS": ["transientValue"], "_OBSERVED_GLOBAL_PROPS": ["aria-label"] } }, { "max": 100, "value": 0, "min": 0, "size": "md", "step": 1, "readonly": false, "startAngle": 90, "indicatorSize": 1, "angleExtent": 360, "thresholdDisplay": "indicator" }, {
|
|
7553
|
+
}, "MeterCircle", { "properties": { "max": { "type": "number" }, "min": { "type": "number" }, "readonly": { "type": "boolean" }, "value": { "type": "number|null", "writeback": true }, "step": { "type": "number" }, "color": { "type": "string" }, "indicatorSize": { "type": "number" }, "innerRadius": { "type": "number" }, "plotArea": { "type": "object", "properties": { "color": { "type": "string" }, "rendered": { "type": "string", "enumValues": ["off", "on"] } } }, "angleExtent": { "type": "number" }, "startAngle": { "type": "number" }, "referenceLines": { "type": "Array<object>" }, "thresholdDisplay": { "type": "string", "enumValues": ["all", "plotArea", "indicator"] }, "thresholds": { "type": "Array<object>" }, "describedBy": { "type": "string|null" }, "labelledBy": { "type": "string|null" }, "size": { "type": "string", "enumValues": ["sm", "md", "lg", "fit"] }, "datatip": { "type": "function" }, "transientValue": { "type": "number", "readOnly": true, "writeback": true } }, "slots": { "centerTemplate": { "data": {} } }, "extension": { "_WRITEBACK_PROPS": ["value", "transientValue"], "_READ_ONLY_PROPS": ["transientValue"], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "aria-labelledby", "aria-describedby"] } }, { "max": 100, "value": 0, "min": 0, "size": "md", "step": 1, "readonly": false, "startAngle": 90, "indicatorSize": 1, "angleExtent": 360, "thresholdDisplay": "indicator" }, {
|
|
6854
7554
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
6855
7555
|
}, { consume: [UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
6856
7556
|
});
|
|
@@ -6867,10 +7567,11 @@ define('oj-c/line-chart/line-chart',["require", "exports", "preact/jsx-runtime",
|
|
|
6867
7567
|
"use strict";
|
|
6868
7568
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6869
7569
|
exports.LineChart = void 0;
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
7570
|
+
const HIGHLIGHTED_DEFAULT = [];
|
|
7571
|
+
const SELECTION_DEFAULT = [];
|
|
7572
|
+
const HIDDEN_DEFAULT = [];
|
|
7573
|
+
const LEGEND_DEFAULT = { rendered: 'on', position: 'auto' };
|
|
7574
|
+
function LineChartComp({ data, hideAndShowBehavior = 'none', orientation = 'vertical', xAxis, yAxis, hoverBehavior = 'none', valueFormats, plotArea, zoomAndScroll, itemTemplate, seriesTemplate, groupTemplate, seriesComparator, groupComparator, drilling = 'off', hiddenCategories = HIDDEN_DEFAULT, timeAxisType, highlightedCategories = HIGHLIGHTED_DEFAULT, highlightMatch = 'any', selection = SELECTION_DEFAULT, selectionMode = 'none', stack = 'off', legend = LEGEND_DEFAULT, ...props }) {
|
|
6874
7575
|
const rootRef = (0, hooks_1.useRef)(null);
|
|
6875
7576
|
const addBusyState = (0, useVisBusyState_1.useVisBusyState)(rootRef, 'oj-c-line-chart');
|
|
6876
7577
|
const { series, groups, getDataItem, isLoading } = (0, useChartData_1.useChartData)(data, addBusyState, itemTemplate, seriesTemplate, groupTemplate, 'oj-c-line-chart-item', 'oj-c-line-chart-series', 'oj-c-line-chart-group', seriesComparator, groupComparator);
|
|
@@ -6911,7 +7612,7 @@ define('oj-c/line-chart/line-chart',["require", "exports", "preact/jsx-runtime",
|
|
|
6911
7612
|
const chartLegend = isLegendRendered && legendData.length > 0 ? ((0, jsx_runtime_1.jsx)(UNSAFE_Legend_1.Legend, { items: legendData, orientation: legendPosition === 'start' || legendPosition === 'end' ? 'vertical' : 'horizontal', isReadOnly: !isLegendInteractive, highlightedIds: highlightedIds.length === 0 ? undefined : highlightedIds, hiddenIds: hiddenIds.length === 0 ? undefined : hiddenIds, symbolHeight: legend.symbolHeight, symbolWidth: legend.symbolWidth, onItemAction: legendItemActionHandler, onItemHover: legendItemInputHandler, onItemFocus: legendItemInputHandler })) : undefined;
|
|
6912
7613
|
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { ref: rootRef, children: (0, jsx_runtime_1.jsx)(UNSAFE_VisProgressiveLoader_1.VisProgressiveLoader, { isLoading: isLoading, type: "line", "aria-label": props['aria-label'], "aria-describedBy": props['aria-describedby'], "aria-labelledBy": props['aria-labelledby'], children: (0, jsx_runtime_1.jsx)(UNSAFE_ChartWithLegend_1.ChartWithLegend, { chart: chart, position: legendPosition, maxSize: legend.maxSize, size: legend.size, legend: chartLegend }) }) }));
|
|
6913
7614
|
}
|
|
6914
|
-
exports.LineChart = (0, ojvcomponent_1.registerCustomElement)('oj-c-line-chart', LineChartComp, "LineChart", { "properties": { "groupComparator": { "type": "function" }, "stack": { "type": "string", "enumValues": ["off", "on"] }, "drilling": { "type": "string", "enumValues": ["off", "on", "groupsOnly", "seriesOnly"] }, "orientation": { "type": "string", "enumValues": ["horizontal", "vertical"] }, "timeAxisType": { "type": "string", "enumValues": ["enabled", "mixedFrequency", "skipGaps"] }, "yAxis": { "type": "object", "properties": { "dataMax": { "type": "number" }, "dataMin": { "type": "number" }, "max": { "type": "number" }, "min": { "type": "number" }, "majorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "minorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "tickLabel": { "type": "object", "properties": { "converter": { "type": "object" }, "rendered": { "type": "string", "enumValues": ["off", "on"] }, "style": { "type": "object" } } }, "viewportMin": { "type": "number" }, "viewportMax": { "type": "number" }, "step": { "type": "number" }, "size": { "type": "number" }, "scale": { "type": "string", "enumValues": ["linear", "log"] }, "title": { "type": "string" }, "titleStyle": { "type": "object" } } }, "xAxis": { "type": "object", "properties": { "majorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "minorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "tickLabel": { "type": "object", "properties": { "converter": { "type": "object|" }, "rendered": { "type": "string", "enumValues": ["off", "on"] }, "rotation": { "type": "string", "enumValues": ["auto", "none"] }, "style": { "type": "object" } } }, "viewportMin": { "type": "number" }, "viewportMax": { "type": "number" }, "step": { "type": "number" }, "size": { "type": "number" }, "scale": { "type": "string", "enumValues": ["linear", "log"] }, "title": { "type": "string" }, "titleStyle": { "type": "object" } } }, "plotArea": { "type": "object", "properties": { "backgroundColor": { "type": "string" } } }, "zoomAndScroll": { "type": "string", "enumValues": ["off", "live"] }, "valueFormats": { "type": "object", "properties": { "group": { "type": "object", "properties": { "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } }, "series": { "type": "object", "properties": { "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } }, "value": { "type": "object", "properties": { "converter": { "type": "object" }, "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } } } }, "seriesComparator": { "type": "function" }, "data": { "type": "DataProvider|null" }, "selectionMode": { "type": "string", "enumValues": ["none", "multiple", "single"] }, "selection": { "type": "Array<any>", "writeback": true }, "dragMode": { "type": "string", "enumValues": ["pan", "select", "off", "user", "zoom"] }, "hiddenCategories": { "type": "Array<string>", "writeback": true }, "highlightedCategories": { "type": "Array<string>", "writeback": true }, "hideAndShowBehavior": { "type": "string", "enumValues": ["none", "withoutRescale", "withRescale"] }, "hoverBehavior": { "type": "string", "enumValues": ["none", "dim"] }, "highlightMatch": { "type": "string", "enumValues": ["all", "any"] }, "legend": { "type": "object", "properties": { "position": { "type": "string", "enumValues": ["auto", "end", "start", "top", "bottom"] }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] }, "maxSize": { "type": "number|string" }, "size": { "type": "number|string" }, "symbolHeight": { "type": "number" }, "symbolWidth": { "type": "number" } } } }, "slots": { "itemTemplate": { "data": {} }, "seriesTemplate": { "data": {} }, "groupTemplate": { "data": {} } }, "events": { "ojItemDrill": {}, "ojSeriesDrill": {}, "ojGroupDrill": {}, "ojViewportChange": {} }, "extension": { "_WRITEBACK_PROPS": ["selection", "hiddenCategories", "highlightedCategories"], "_READ_ONLY_PROPS": [], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "aria-describedby", "aria-labelledby"] } }, { "hideAndShowBehavior": "none", "orientation": "vertical", "hoverBehavior": "none", "drilling": "off", "hiddenCategories": [], "highlightedCategories": [], "highlightMatch": "any", "selection": [], "selectionMode": "none", "stack": "off", "legend": { "rendered": "on", "position": "auto" } }, {
|
|
7615
|
+
exports.LineChart = (0, ojvcomponent_1.registerCustomElement)('oj-c-line-chart', LineChartComp, "LineChart", { "properties": { "groupComparator": { "type": "function" }, "stack": { "type": "string", "enumValues": ["off", "on"] }, "drilling": { "type": "string", "enumValues": ["off", "on", "groupsOnly", "seriesOnly"] }, "orientation": { "type": "string", "enumValues": ["horizontal", "vertical"] }, "timeAxisType": { "type": "string", "enumValues": ["enabled", "mixedFrequency", "skipGaps"] }, "yAxis": { "type": "object", "properties": { "dataMax": { "type": "number" }, "dataMin": { "type": "number" }, "max": { "type": "number" }, "min": { "type": "number" }, "majorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "minorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "tickLabel": { "type": "object", "properties": { "converter": { "type": "object" }, "rendered": { "type": "string", "enumValues": ["off", "on"] }, "style": { "type": "object" } } }, "viewportMin": { "type": "number" }, "viewportMax": { "type": "number" }, "step": { "type": "number" }, "size": { "type": "number" }, "scale": { "type": "string", "enumValues": ["linear", "log"] }, "title": { "type": "string" }, "titleStyle": { "type": "object" } } }, "xAxis": { "type": "object", "properties": { "majorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "minorTick": { "type": "object", "properties": { "lineColor": { "type": "string" }, "lineStyle": { "type": "string", "enumValues": ["dashed", "solid", "dotted"] }, "lineWidth": { "type": "number" }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] } } }, "tickLabel": { "type": "object", "properties": { "converter": { "type": "object|Array<object>" }, "rendered": { "type": "string", "enumValues": ["off", "on"] }, "rotation": { "type": "string", "enumValues": ["auto", "none"] }, "style": { "type": "object" } } }, "viewportMin": { "type": "number" }, "viewportMax": { "type": "number" }, "step": { "type": "number" }, "size": { "type": "number" }, "scale": { "type": "string", "enumValues": ["linear", "log"] }, "title": { "type": "string" }, "titleStyle": { "type": "object" } } }, "plotArea": { "type": "object", "properties": { "backgroundColor": { "type": "string" } } }, "zoomAndScroll": { "type": "string", "enumValues": ["off", "live"] }, "valueFormats": { "type": "object", "properties": { "group": { "type": "object", "properties": { "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } }, "series": { "type": "object", "properties": { "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } }, "value": { "type": "object", "properties": { "converter": { "type": "object" }, "tooltipLabel": { "type": "string" }, "tooltipDisplay": { "type": "string", "enumValues": ["auto", "off"] } } } } }, "seriesComparator": { "type": "function" }, "data": { "type": "DataProvider|null" }, "selectionMode": { "type": "string", "enumValues": ["none", "multiple", "single"] }, "selection": { "type": "Array<any>", "writeback": true }, "dragMode": { "type": "string", "enumValues": ["pan", "select", "off", "user", "zoom"] }, "hiddenCategories": { "type": "Array<string>", "writeback": true }, "highlightedCategories": { "type": "Array<string>", "writeback": true }, "hideAndShowBehavior": { "type": "string", "enumValues": ["none", "withoutRescale", "withRescale"] }, "hoverBehavior": { "type": "string", "enumValues": ["none", "dim"] }, "highlightMatch": { "type": "string", "enumValues": ["all", "any"] }, "legend": { "type": "object", "properties": { "position": { "type": "string", "enumValues": ["auto", "end", "start", "top", "bottom"] }, "rendered": { "type": "string", "enumValues": ["auto", "off", "on"] }, "maxSize": { "type": "number|string" }, "size": { "type": "number|string" }, "symbolHeight": { "type": "number" }, "symbolWidth": { "type": "number" } } } }, "slots": { "itemTemplate": { "data": {} }, "seriesTemplate": { "data": {} }, "groupTemplate": { "data": {} } }, "events": { "ojItemDrill": {}, "ojSeriesDrill": {}, "ojGroupDrill": {}, "ojViewportChange": {} }, "extension": { "_WRITEBACK_PROPS": ["selection", "hiddenCategories", "highlightedCategories"], "_READ_ONLY_PROPS": [], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "aria-describedby", "aria-labelledby"] } }, { "hideAndShowBehavior": "none", "orientation": "vertical", "hoverBehavior": "none", "drilling": "off", "hiddenCategories": [], "highlightedCategories": [], "highlightMatch": "any", "selection": [], "selectionMode": "none", "stack": "off", "legend": { "rendered": "on", "position": "auto" } }, {
|
|
6915
7616
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
6916
7617
|
});
|
|
6917
7618
|
});
|
|
@@ -6984,7 +7685,7 @@ define('oj-c/line-chart-group',["require", "exports", "oj-c/line-chart-group/lin
|
|
|
6984
7685
|
});
|
|
6985
7686
|
|
|
6986
7687
|
|
|
6987
|
-
define('oj-c/list-item-layout/list-item-layout',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_ListItemLayout", "@oracle/oraclejet-preact/UNSAFE_Inset", "ojs/ojvcomponent", "css!oj-c/list-item-layout/list-item-layout-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_ListItemLayout_1, UNSAFE_Inset_1, ojvcomponent_1) {
|
|
7688
|
+
define('oj-c/list-item-layout/list-item-layout',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_ListItemLayout", "@oracle/oraclejet-preact/UNSAFE_Inset", "@oracle/oraclejet-preact/hooks/UNSAFE_useCollectionInteractionContext", "ojs/ojvcomponent", "css!oj-c/list-item-layout/list-item-layout-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_ListItemLayout_1, UNSAFE_Inset_1, UNSAFE_useCollectionInteractionContext_1, ojvcomponent_1) {
|
|
6988
7689
|
"use strict";
|
|
6989
7690
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6990
7691
|
exports.ListItemLayout = void 0;
|
|
@@ -6992,11 +7693,11 @@ define('oj-c/list-item-layout/list-item-layout',["require", "exports", "preact/j
|
|
|
6992
7693
|
const primary = children;
|
|
6993
7694
|
const actionSlot = otherProps.action ? ((0, jsx_runtime_1.jsx)("div", { "data-oj-clickthrough": "disabled", children: otherProps.action })) : undefined;
|
|
6994
7695
|
const navSlot = otherProps.navigation ? ((0, jsx_runtime_1.jsx)("div", { "data-oj-clickthrough": "disabled", children: otherProps.navigation })) : undefined;
|
|
6995
|
-
const layout = otherProps.inset === 'none' ? ((0, jsx_runtime_1.jsx)(UNSAFE_ListItemLayout_1.ListItemLayout, { primary: primary, overline: otherProps.overline, selector: otherProps.selector, leading: otherProps.leading, secondary: otherProps.secondary, tertiary: otherProps.tertiary, metadata: otherProps.metadata, trailing: otherProps.trailing, action: actionSlot, quaternary: otherProps.quaternary, navigation: navSlot })) : ((0, jsx_runtime_1.jsx)(UNSAFE_Inset_1.Inset, { variant: "listview", children: (0, jsx_runtime_1.jsx)(UNSAFE_ListItemLayout_1.ListItemLayout, { primary: primary, overline: otherProps.overline, selector: otherProps.selector, leading: otherProps.leading, secondary: otherProps.secondary, tertiary: otherProps.tertiary, metadata: otherProps.metadata, trailing: otherProps.trailing, action: actionSlot, quaternary: otherProps.quaternary, navigation: navSlot }) }));
|
|
7696
|
+
const layout = otherProps.inset === 'none' ? ((0, jsx_runtime_1.jsx)(UNSAFE_ListItemLayout_1.ListItemLayout, { verticalAlignment: otherProps.verticalAlignment, primary: primary, overline: otherProps.overline, selector: otherProps.selector, leading: otherProps.leading, secondary: otherProps.secondary, tertiary: otherProps.tertiary, metadata: otherProps.metadata, trailing: otherProps.trailing, action: actionSlot, quaternary: otherProps.quaternary, navigation: navSlot })) : ((0, jsx_runtime_1.jsx)(UNSAFE_Inset_1.Inset, { variant: "listview", children: (0, jsx_runtime_1.jsx)(UNSAFE_ListItemLayout_1.ListItemLayout, { verticalAlignment: otherProps.verticalAlignment, primary: primary, overline: otherProps.overline, selector: otherProps.selector, leading: otherProps.leading, secondary: otherProps.secondary, tertiary: otherProps.tertiary, metadata: otherProps.metadata, trailing: otherProps.trailing, action: actionSlot, quaternary: otherProps.quaternary, navigation: navSlot }) }));
|
|
6996
7697
|
return (0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { children: layout });
|
|
6997
|
-
}, "ListItemLayout", { "slots": { "": {}, "overline": {}, "selector": {}, "leading": {}, "secondary": {}, "tertiary": {}, "metadata": {}, "trailing": {}, "action": {}, "quaternary": {}, "navigation": {} }, "properties": { "inset": { "type": "string", "enumValues": ["none", "listInset"] } }, "extension": { "_OBSERVED_GLOBAL_PROPS": ["aria-label"] } }, undefined, {
|
|
7698
|
+
}, "ListItemLayout", { "slots": { "": {}, "overline": {}, "selector": {}, "leading": {}, "secondary": {}, "tertiary": {}, "metadata": {}, "trailing": {}, "action": {}, "quaternary": {}, "navigation": {} }, "properties": { "inset": { "type": "string", "enumValues": ["none", "listInset"] }, "verticalAlignment": { "type": "string", "enumValues": ["top", "middle"] } }, "extension": { "_OBSERVED_GLOBAL_PROPS": ["aria-label"] } }, undefined, {
|
|
6998
7699
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
6999
|
-
});
|
|
7700
|
+
}, { consume: [UNSAFE_useCollectionInteractionContext_1.CollectionInteractionContext] });
|
|
7000
7701
|
});
|
|
7001
7702
|
|
|
7002
7703
|
define('oj-c/list-item-layout',["require", "exports", "oj-c/list-item-layout/list-item-layout"], function (require, exports, list_item_layout_1) {
|
|
@@ -7010,12 +7711,15 @@ define('oj-c/list-view/useHandleRemoveCurrentKey',["require", "exports", "preact
|
|
|
7010
7711
|
"use strict";
|
|
7011
7712
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7012
7713
|
exports.useHandleRemoveCurrentKey = void 0;
|
|
7013
|
-
function useHandleRemoveCurrentKey(dataState,
|
|
7714
|
+
function useHandleRemoveCurrentKey(dataState, updateCurrentKey) {
|
|
7014
7715
|
const prevDataState = (0, hooks_1.useRef)();
|
|
7716
|
+
const currentItemRef = (0, hooks_1.useRef)();
|
|
7717
|
+
const notifyCurrentItemChanged = (detail) => {
|
|
7718
|
+
currentItemRef.current = detail.value;
|
|
7719
|
+
};
|
|
7015
7720
|
(0, hooks_1.useEffect)(() => {
|
|
7016
7721
|
const oldDataState = prevDataState.current;
|
|
7017
|
-
if (
|
|
7018
|
-
onChange &&
|
|
7722
|
+
if (currentItemRef.current &&
|
|
7019
7723
|
oldDataState &&
|
|
7020
7724
|
dataState &&
|
|
7021
7725
|
oldDataState.offset === dataState.offset &&
|
|
@@ -7023,18 +7727,18 @@ define('oj-c/list-view/useHandleRemoveCurrentKey',["require", "exports", "preact
|
|
|
7023
7727
|
const newKeys = dataState.data.map((dataMetadata) => {
|
|
7024
7728
|
return dataMetadata.metadata.key;
|
|
7025
7729
|
});
|
|
7026
|
-
if (newKeys.indexOf(
|
|
7730
|
+
if (newKeys.indexOf(currentItemRef.current.rowKey) === -1) {
|
|
7027
7731
|
const oldKeys = oldDataState?.data.map((dataMetadata) => {
|
|
7028
7732
|
return dataMetadata.metadata.key;
|
|
7029
7733
|
});
|
|
7030
|
-
let index = oldKeys.indexOf(
|
|
7734
|
+
let index = oldKeys.indexOf(currentItemRef.current.rowKey);
|
|
7031
7735
|
if (index > -1) {
|
|
7032
7736
|
const backward = index === oldKeys.length - 1;
|
|
7033
7737
|
while (index >= 0 && index < oldKeys.length) {
|
|
7034
7738
|
index = backward ? index - 1 : index + 1;
|
|
7035
7739
|
const newCurrentKey = oldKeys[index];
|
|
7036
7740
|
if (newKeys.indexOf(newCurrentKey) > -1) {
|
|
7037
|
-
|
|
7741
|
+
updateCurrentKey(newCurrentKey);
|
|
7038
7742
|
break;
|
|
7039
7743
|
}
|
|
7040
7744
|
}
|
|
@@ -7042,7 +7746,10 @@ define('oj-c/list-view/useHandleRemoveCurrentKey',["require", "exports", "preact
|
|
|
7042
7746
|
}
|
|
7043
7747
|
}
|
|
7044
7748
|
prevDataState.current = dataState;
|
|
7045
|
-
}, [dataState,
|
|
7749
|
+
}, [dataState, updateCurrentKey]);
|
|
7750
|
+
return {
|
|
7751
|
+
notifyCurrentItemChanged
|
|
7752
|
+
};
|
|
7046
7753
|
}
|
|
7047
7754
|
exports.useHandleRemoveCurrentKey = useHandleRemoveCurrentKey;
|
|
7048
7755
|
});
|
|
@@ -7058,7 +7765,7 @@ define('oj-c/list-view/useListViewPreact',["require", "exports", "preact/hooks",
|
|
|
7058
7765
|
fetchSize: scrollPolicyOptions?.fetchSize
|
|
7059
7766
|
});
|
|
7060
7767
|
const listData = listDataState.status !== 'error' ? listDataState.data : null;
|
|
7061
|
-
const [
|
|
7768
|
+
const [currentItemOverride, setCurrentItemOverride] = (0, hooks_1.useState)();
|
|
7062
7769
|
const firstSelectedItemRef = (0, hooks_1.useRef)();
|
|
7063
7770
|
const numOfSelectedItems = !selected?.keys.all
|
|
7064
7771
|
? selected?.keys.keys?.size
|
|
@@ -7086,8 +7793,12 @@ define('oj-c/list-view/useListViewPreact',["require", "exports", "preact/hooks",
|
|
|
7086
7793
|
}
|
|
7087
7794
|
}, [listDataState.status, addBusyState]);
|
|
7088
7795
|
const handleOnCurrentItemChanged = (detail) => {
|
|
7089
|
-
|
|
7090
|
-
|
|
7796
|
+
const item = detail.value;
|
|
7797
|
+
item && onCurrentItemChanged?.(item.rowKey);
|
|
7798
|
+
notifyCurrentItemChanged(detail);
|
|
7799
|
+
};
|
|
7800
|
+
const updateCurrentItemOverride = (key) => {
|
|
7801
|
+
setCurrentItemOverride({ rowKey: key });
|
|
7091
7802
|
};
|
|
7092
7803
|
const handleOnOjFirstSelectedItem = (0, hooks_1.useCallback)((data) => {
|
|
7093
7804
|
if (selected && onOjFirstSelectedItem && propData) {
|
|
@@ -7163,7 +7874,7 @@ define('oj-c/list-view/useListViewPreact',["require", "exports", "preact/hooks",
|
|
|
7163
7874
|
};
|
|
7164
7875
|
}, [propData, onOjFirstSelectedItem]);
|
|
7165
7876
|
const dataState = listDataState.status === 'error' ? null : listDataState.data;
|
|
7166
|
-
(0, useHandleRemoveCurrentKey_1.useHandleRemoveCurrentKey)(dataState,
|
|
7877
|
+
const { notifyCurrentItemChanged } = (0, useHandleRemoveCurrentKey_1.useHandleRemoveCurrentKey)(dataState, updateCurrentItemOverride);
|
|
7167
7878
|
const viewportConfig = scrollPolicyOptions?.scroller
|
|
7168
7879
|
? {
|
|
7169
7880
|
scroller: () => {
|
|
@@ -7190,10 +7901,10 @@ define('oj-c/list-view/useListViewPreact',["require", "exports", "preact/hooks",
|
|
|
7190
7901
|
'aria-label': ariaLabel,
|
|
7191
7902
|
'aria-labelledby': ariaLabelledBy,
|
|
7192
7903
|
data: listData ? listData.data : null,
|
|
7193
|
-
|
|
7904
|
+
currentItemOverride: currentItemOverride,
|
|
7194
7905
|
getRowKey,
|
|
7195
7906
|
gridlines,
|
|
7196
|
-
|
|
7907
|
+
onPersistCurrentItem: handleOnCurrentItemChanged,
|
|
7197
7908
|
hasMore: listData ? listData.sizePrecision === 'atLeast' : false,
|
|
7198
7909
|
onLoadMore,
|
|
7199
7910
|
onSelectionChange: handleOnSelectionChanged,
|
|
@@ -7340,7 +8051,7 @@ define('oj-c/utils/PRIVATE_ItemsMenu/items-menu',["require", "exports", "preact/
|
|
|
7340
8051
|
function getCommit(key, selection, onSelection) {
|
|
7341
8052
|
return (detail) => {
|
|
7342
8053
|
onSelection?.({ value: detail.value });
|
|
7343
|
-
onOjMenuSelection?.({ value: detail.value });
|
|
8054
|
+
onOjMenuSelection?.({ value: detail.value, menuSelectionGroupKey: key });
|
|
7344
8055
|
onSelectionChanged?.(setSelectionValue(selection, key, detail.value));
|
|
7345
8056
|
};
|
|
7346
8057
|
}
|
|
@@ -7351,7 +8062,7 @@ define('oj-c/utils/PRIVATE_ItemsMenu/items-menu',["require", "exports", "preact/
|
|
|
7351
8062
|
return (0, jsx_runtime_1.jsx)(UNSAFE_Menu_1.MenuSeparator, {});
|
|
7352
8063
|
case 'submenu':
|
|
7353
8064
|
if (item.items && item.label && !isSplitMenu) {
|
|
7354
|
-
return ((0, jsx_runtime_1.jsx)(UNSAFE_Menu_1.Submenu, { label: item.label, children: (0, jsx_runtime_1.jsx)(exports.ItemsMenu, { items: item.items, selection: selection, onSelectionChanged: onSelectionChanged, onOjMenuAction: onOjMenuAction }) }));
|
|
8065
|
+
return ((0, jsx_runtime_1.jsx)(UNSAFE_Menu_1.Submenu, { label: item.label, children: (0, jsx_runtime_1.jsx)(exports.ItemsMenu, { items: item.items, selection: selection, onSelectionChanged: onSelectionChanged, onOjMenuAction: onOjMenuAction, onOjMenuSelection: onOjMenuSelection }) }));
|
|
7355
8066
|
}
|
|
7356
8067
|
return;
|
|
7357
8068
|
case 'selectsingle':
|
|
@@ -7397,9 +8108,10 @@ define('oj-c/list-view/list-view',["require", "exports", "preact/jsx-runtime", '
|
|
|
7397
8108
|
menuItemKey: key,
|
|
7398
8109
|
contextMenuContext: itemDetail
|
|
7399
8110
|
});
|
|
7400
|
-
}, onOjMenuSelection: ({ value }) => {
|
|
8111
|
+
}, onOjMenuSelection: ({ value, menuSelectionGroupKey }) => {
|
|
7401
8112
|
onOjContextMenuSelection?.({
|
|
7402
8113
|
value,
|
|
8114
|
+
menuSelectionGroupKey,
|
|
7403
8115
|
contextMenuContext: itemDetail
|
|
7404
8116
|
});
|
|
7405
8117
|
} }));
|
|
@@ -7427,11 +8139,14 @@ define('oj-c/list-view/list-view',["require", "exports", "preact/jsx-runtime", '
|
|
|
7427
8139
|
};
|
|
7428
8140
|
const ListViewImpl = ({ selectionMode = 'none', reorderable = { items: 'disabled' }, ...rest }) => {
|
|
7429
8141
|
const rootRef = (0, hooks_1.useRef)();
|
|
7430
|
-
const busyContextRef = (0, hooks_1.useRef)(Context.getContext(rootRef.current).getBusyContext());
|
|
7431
8142
|
const addBusyState = (0, hooks_1.useCallback)((desc) => {
|
|
7432
|
-
return
|
|
7433
|
-
|
|
7434
|
-
|
|
8143
|
+
return rootRef.current
|
|
8144
|
+
? Context.getContext(rootRef.current)
|
|
8145
|
+
.getBusyContext()
|
|
8146
|
+
.addBusyState({
|
|
8147
|
+
description: `oj-c-list-view: ${desc}`
|
|
8148
|
+
})
|
|
8149
|
+
: () => { };
|
|
7435
8150
|
}, []);
|
|
7436
8151
|
const isClickthroughDisabled = (0, hooks_1.useCallback)((target) => {
|
|
7437
8152
|
if (target === null || rootRef.current === undefined) {
|
|
@@ -7471,22 +8186,26 @@ define('oj-c/list-view',["require", "exports", "oj-c/list-view/list-view"], func
|
|
|
7471
8186
|
Object.defineProperty(exports, "ListView", { enumerable: true, get: function () { return list_view_1.ListView; } });
|
|
7472
8187
|
});
|
|
7473
8188
|
|
|
7474
|
-
define('oj-c/radioset/useRadiosetPreact',["require", "exports", "
|
|
8189
|
+
define('oj-c/radioset/useRadiosetPreact',["require", "exports", "oj-c/editable-value/UNSAFE_useDeferredValidators/useDeferredValidators", "oj-c/hooks/UNSAFE_useEditableValue/index", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslationBundle"], function (require, exports, useDeferredValidators_1, index_1, UNSAFE_useTranslationBundle_1) {
|
|
7475
8190
|
"use strict";
|
|
7476
8191
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7477
8192
|
exports.useRadiosetPreact = void 0;
|
|
7478
8193
|
function useRadiosetPreact({ direction, disabled, displayOptions, labelEdge, labelHint, labelStartWidth, messagesCustom, readonly, requiredMessageDetail: propRequiredMessageDetail, required, userAssistanceDensity, value: propValue, onMessagesCustomChanged, onValidChanged, onValueChanged, ...otherProps }, addBusyState) {
|
|
7479
8194
|
const translations = (0, UNSAFE_useTranslationBundle_1.useTranslationBundle)('@oracle/oraclejet-preact');
|
|
7480
8195
|
const requiredMessageDetail = propRequiredMessageDetail || translations.radio_requiredMessageDetail();
|
|
7481
|
-
const
|
|
8196
|
+
const deferredValidators = (0, useDeferredValidators_1.useDeferredValidators)({
|
|
8197
|
+
labelHint,
|
|
8198
|
+
required,
|
|
8199
|
+
requiredMessageDetail
|
|
8200
|
+
});
|
|
8201
|
+
const { value, methods, textFieldProps } = (0, index_1.useEditableValue)({
|
|
7482
8202
|
ariaDescribedBy: otherProps['aria-describedby'],
|
|
8203
|
+
deferredValidators,
|
|
8204
|
+
defaultDisplayValue: null,
|
|
7483
8205
|
disabled,
|
|
7484
8206
|
displayOptions,
|
|
7485
|
-
labelHint,
|
|
7486
8207
|
messagesCustom,
|
|
7487
8208
|
readonly,
|
|
7488
|
-
required,
|
|
7489
|
-
requiredMessageDetail,
|
|
7490
8209
|
value: propValue,
|
|
7491
8210
|
addBusyState,
|
|
7492
8211
|
onMessagesCustomChanged,
|
|
@@ -7672,7 +8391,7 @@ define('oj-c/split-menu-button',["require", "exports", "oj-c/split-menu-button/s
|
|
|
7672
8391
|
Object.defineProperty(exports, "SplitMenuButton", { enumerable: true, get: function () { return split_menu_button_1.SplitMenuButton; } });
|
|
7673
8392
|
});
|
|
7674
8393
|
|
|
7675
|
-
define('oj-c/selector/selector',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_Selector", "ojs/ojvcomponent", "../utils/UNSAFE_keyUtils/keySetUtils", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_Selector_1, ojvcomponent_1, keySetUtils_1, UNSAFE_useTabbableMode_1) {
|
|
8394
|
+
define('oj-c/selector/selector',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_Selector", "ojs/ojvcomponent", "../utils/UNSAFE_keyUtils/keySetUtils", "@oracle/oraclejet-preact/hooks/UNSAFE_useCollectionInteractionContext", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode"], function (require, exports, jsx_runtime_1, translationBundle_1, UNSAFE_Selector_1, ojvcomponent_1, keySetUtils_1, UNSAFE_useCollectionInteractionContext_1, UNSAFE_useTabbableMode_1) {
|
|
7676
8395
|
"use strict";
|
|
7677
8396
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7678
8397
|
exports.Selector = void 0;
|
|
@@ -7683,7 +8402,7 @@ define('oj-c/selector/selector',["require", "exports", "preact/jsx-runtime", '@o
|
|
|
7683
8402
|
};
|
|
7684
8403
|
exports.Selector = (0, ojvcomponent_1.registerCustomElement)('oj-c-selector', SelectorImpl, "Selector", { "properties": { "rowKey": { "type": "any" }, "selectedKeys": { "type": "object", "writeback": true }, "indeterminate": { "type": "boolean" }, "selectionMode": { "type": "string", "enumValues": ["multiple", "single"] } }, "extension": { "_WRITEBACK_PROPS": ["selectedKeys"], "_READ_ONLY_PROPS": [], "_OBSERVED_GLOBAL_PROPS": ["aria-label"] } }, { "indeterminate": false, "selectionMode": "multiple" }, {
|
|
7685
8404
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
7686
|
-
}, { consume: [UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
8405
|
+
}, { consume: [UNSAFE_useCollectionInteractionContext_1.CollectionInteractionContext, UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
7687
8406
|
});
|
|
7688
8407
|
|
|
7689
8408
|
define('oj-c/selector',["require", "exports", "oj-c/selector/selector"], function (require, exports, selector_1) {
|
|
@@ -7950,7 +8669,11 @@ define('oj-c/legend/legend',["require", "exports", "preact/jsx-runtime", '@oracl
|
|
|
7950
8669
|
"use strict";
|
|
7951
8670
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7952
8671
|
exports.LinearLegend = exports.Legend = void 0;
|
|
7953
|
-
|
|
8672
|
+
const HIGHLIGHTED_DEFAULT = [];
|
|
8673
|
+
const HIDDEN_DEFAULT = [];
|
|
8674
|
+
const TEXTSTYLE_DEFAULT = {};
|
|
8675
|
+
const SECTION_TITLE_DEFAULT = {};
|
|
8676
|
+
function LegendComp({ data = null, drilling = 'off', halign = 'start', valign = 'top', hiddenCategories = HIDDEN_DEFAULT, hideAndShowBehavior = 'off', highlightedCategories = HIGHLIGHTED_DEFAULT, hoverBehavior = 'none', orientation = 'vertical', symbolHeight = 0, symbolWidth = 0, textStyle = TEXTSTYLE_DEFAULT, sectionTitleStyle = SECTION_TITLE_DEFAULT, sectionTitleHalign = 'start', ...props }) {
|
|
7954
8677
|
const rootRef = (0, hooks_1.useRef)(null);
|
|
7955
8678
|
const addBusyState = (0, useVisBusyState_1.useVisBusyState)(rootRef, 'oj-c-legend');
|
|
7956
8679
|
const isTreeData = (0, utils_1.isTreeDataProvider)(data);
|
|
@@ -8125,7 +8848,10 @@ define('oj-c/tag-cloud/tag-cloud',["require", "exports", "preact/jsx-runtime", '
|
|
|
8125
8848
|
"use strict";
|
|
8126
8849
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8127
8850
|
exports.TagCloud = void 0;
|
|
8128
|
-
|
|
8851
|
+
const HIGHLIGHTED_DEFAULT = [];
|
|
8852
|
+
const SELECTION_DEFAULT = [];
|
|
8853
|
+
const HIDDEN_DEFAULT = [];
|
|
8854
|
+
function TagCloudComp({ hiddenCategories = HIDDEN_DEFAULT, data = null, highlightedCategories = HIGHLIGHTED_DEFAULT, hoverBehavior = 'none', layout = 'rectangular', selection = SELECTION_DEFAULT, selectionMode = 'none', highlightMatch = 'all', ...props }) {
|
|
8129
8855
|
const rootRef = (0, hooks_1.useRef)(null);
|
|
8130
8856
|
const addBusyState = (0, useVisBusyState_1.useVisBusyState)(rootRef, 'oj-c-tag-cloud');
|
|
8131
8857
|
const { data: compData } = (0, useDataProvider_1.useDataProvider)({
|
|
@@ -8878,14 +9604,14 @@ define('oj-c/tab-bar/DataTabBar',["require", "exports", "preact/jsx-runtime", "p
|
|
|
8878
9604
|
exports.DataTabBar = DataTabBar;
|
|
8879
9605
|
});
|
|
8880
9606
|
|
|
8881
|
-
define('oj-c/tab-bar/tab-bar',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "ojs/ojvcomponent", "oj-c/hooks/UNSAFE_useDataProvider/useDataProvider", "ojs/ojcontext", "./DataTabBar", "preact/hooks"], function (require, exports, jsx_runtime_1, translationBundle_1, ojvcomponent_1, useDataProvider_1, Context, DataTabBar_1, hooks_1) {
|
|
9607
|
+
define('oj-c/tab-bar/tab-bar',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "ojs/ojvcomponent", "oj-c/hooks/UNSAFE_useDataProvider/useDataProvider", "ojs/ojcontext", "./DataTabBar", "preact/hooks", "preact/compat"], function (require, exports, jsx_runtime_1, translationBundle_1, ojvcomponent_1, useDataProvider_1, Context, DataTabBar_1, hooks_1, compat_1) {
|
|
8882
9608
|
"use strict";
|
|
8883
9609
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8884
9610
|
exports.TabBar = void 0;
|
|
8885
9611
|
function isDataProvider(data) {
|
|
8886
9612
|
return data && 'fetchFirst' in data;
|
|
8887
9613
|
}
|
|
8888
|
-
exports.TabBar = (0, ojvcomponent_1.registerCustomElement)('oj-c-tab-bar', ({ data = [], onOjBeforeSelect, onOjRemove, onOjReorder, onOjSelectionAction, onSelectionChanged, reorderable = 'disabled', overflow = 'hidden', selection, display = 'standard', layout = 'stretch', edge = 'top', 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby }) => {
|
|
9614
|
+
exports.TabBar = (0, ojvcomponent_1.registerCustomElement)('oj-c-tab-bar', (0, compat_1.forwardRef)(({ data = [], onOjBeforeSelect, onOjRemove, onOjReorder, onOjSelectionAction, onSelectionChanged, reorderable = 'disabled', overflow = 'hidden', selection, display = 'standard', layout = 'stretch', edge = 'top', 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, id }, ref) => {
|
|
8889
9615
|
const rootRef = (0, hooks_1.useRef)();
|
|
8890
9616
|
const addBusyState = (0, hooks_1.useCallback)((description = 'MessageBanner: busyState') => {
|
|
8891
9617
|
return rootRef.current
|
|
@@ -8943,8 +9669,14 @@ define('oj-c/tab-bar/tab-bar',["require", "exports", "preact/jsx-runtime", '@ora
|
|
|
8943
9669
|
}
|
|
8944
9670
|
})();
|
|
8945
9671
|
};
|
|
8946
|
-
|
|
8947
|
-
|
|
9672
|
+
(0, hooks_1.useImperativeHandle)(ref, () => ({
|
|
9673
|
+
_doReorderHelper: (tabBarKeys) => {
|
|
9674
|
+
onOjReorder && onOjReorder({ reorderedKeys: tabBarKeys });
|
|
9675
|
+
return Promise.resolve();
|
|
9676
|
+
}
|
|
9677
|
+
}));
|
|
9678
|
+
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { id: id, ref: rootRef, children: (0, jsx_runtime_1.jsx)(DataTabBar_1.DataTabBar, { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, data: dataArr, onRemove: handleRemove, onReorder: handleReorder, onSelect: handleSelect, reorderable: reorderable, selection: selection, display: display, edge: edge, layout: layout, overflow: overflow }) }));
|
|
9679
|
+
}), "TabBar", { "properties": { "data": { "type": "Array<object>|DataProvider" }, "selection": { "type": "any", "writeback": true }, "reorderable": { "type": "string", "enumValues": ["disabled", "enabled"] }, "overflow": { "type": "string", "enumValues": ["hidden", "popup", "conveyor"] }, "display": { "type": "string", "enumValues": ["standard", "icons", "stacked"] }, "layout": { "type": "string", "enumValues": ["stretch", "condense"] }, "edge": { "type": "string", "enumValues": ["top", "bottom"] } }, "events": { "ojBeforeSelect": { "cancelable": true }, "ojRemove": {}, "ojReorder": {}, "ojSelectionAction": {} }, "extension": { "_WRITEBACK_PROPS": ["selection"], "_READ_ONLY_PROPS": [], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "id", "aria-labelledby"] }, "methods": { "_doReorderHelper": {} } }, { "data": [], "reorderable": "disabled", "overflow": "hidden", "display": "standard", "layout": "stretch", "edge": "top" }, {
|
|
8948
9680
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
8949
9681
|
});
|
|
8950
9682
|
});
|
|
@@ -9031,7 +9763,7 @@ define('oj-c/tab-bar-mixed/DataTabBarMixed',["require", "exports", "preact/jsx-r
|
|
|
9031
9763
|
};
|
|
9032
9764
|
const badgeTotal = (0, sumBadge_1.sumBadge)(dynamicTabs);
|
|
9033
9765
|
const isDividerVisible = staticTabs.length > 0 && dynamicTabs.length > 0;
|
|
9034
|
-
return ((0, jsx_runtime_1.jsxs)(UNSAFE_TabBarMixed_1.TabBarMixed, { onRemove: onRemove, onSelect: handleSelect, selection: selection, size: size, ref: tabBarMixedRef, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, children: [(0, jsx_runtime_1.jsxs)(UNSAFE_TabBarMixed_1.TabBarLayout, { layout: "stretch", display: staticTabsDisplay, children: [staticTabs.map((tab) => ((0, jsx_runtime_1.jsx)(UNSAFE_TabBarMixed_1.TabBarItem, { icon: tab.icon ? ((0, jsx_runtime_1.jsx)(DataTabBarMixedIcon_1.DataTabBarMixedIcon, { label: staticTabsDisplay === 'icons' ? tab.label : undefined, icon: tab.icon })) : undefined, itemKey: tab.itemKey, label: tab.label, "aria-controls": tab.tabPanelId }))), dynamicTabsOverflow === 'popup' && ((0, jsx_runtime_1.jsx)(UNSAFE_TabBarMixed_1.OverflowTabBarItem, { badge: badgeTotal > 0 ? badgeTotal.toString() : undefined, icon: (0, jsx_runtime_1.jsx)(DataTabBarMixedIcon_1.DataTabBarMixedIcon, { icon: dynamicTabsOverflowIcon }), isOpen: isOverflowMenuOpen, onClose: handleClose, overflowItemKey: "overflow", overflowItems: dynamicTabs.map((tab) => ({
|
|
9766
|
+
return ((0, jsx_runtime_1.jsxs)(UNSAFE_TabBarMixed_1.TabBarMixed, { onRemove: onRemove, onSelect: handleSelect, selection: selection, size: size, ref: tabBarMixedRef, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, children: [(0, jsx_runtime_1.jsxs)(UNSAFE_TabBarMixed_1.TabBarLayout, { layout: "stretch", display: staticTabsDisplay, children: [staticTabs.map((tab) => ((0, jsx_runtime_1.jsx)(UNSAFE_TabBarMixed_1.TabBarItem, { icon: tab.icon ? ((0, jsx_runtime_1.jsx)(DataTabBarMixedIcon_1.DataTabBarMixedIcon, { label: staticTabsDisplay === 'icons' ? tab.label : undefined, icon: tab.icon })) : undefined, itemKey: tab.itemKey, label: tab.label, badge: tab.badge ? tab.badge.toString() : undefined, "aria-controls": tab.tabPanelId }))), dynamicTabsOverflow === 'popup' && ((0, jsx_runtime_1.jsx)(UNSAFE_TabBarMixed_1.OverflowTabBarItem, { badge: badgeTotal > 0 ? badgeTotal.toString() : undefined, icon: (0, jsx_runtime_1.jsx)(DataTabBarMixedIcon_1.DataTabBarMixedIcon, { icon: dynamicTabsOverflowIcon }), isOpen: isOverflowMenuOpen, onClose: handleClose, overflowItemKey: "overflow", overflowItems: dynamicTabs.map((tab) => ({
|
|
9035
9767
|
itemKey: tab.itemKey,
|
|
9036
9768
|
badge: tab.badge ? tab.badge.toString() : undefined,
|
|
9037
9769
|
label: tab.label,
|
|
@@ -9046,7 +9778,7 @@ define('oj-c/tab-bar-mixed/tab-bar-mixed',["require", "exports", "preact/jsx-run
|
|
|
9046
9778
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9047
9779
|
exports.TabBarMixed = void 0;
|
|
9048
9780
|
exports.TabBarMixed = (0, ojvcomponent_1.registerCustomElement)('oj-c-tab-bar-mixed', (props) => {
|
|
9049
|
-
const { dynamicTabs = [], dynamicTabsOverflow = 'conveyor', dynamicTabsOverflowIcon = { type: 'class', class: 'oj-ux-ico-collection' }, onOjBeforeSelect, onOjRemove, onOjSelectionAction, onSelectionChanged, selection, separatorPadding = '3rem', size, staticTabs = [], staticTabsDisplay = 'standard', 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby } = props;
|
|
9781
|
+
const { dynamicTabs = [], dynamicTabsOverflow = 'conveyor', dynamicTabsOverflowIcon = { type: 'class', class: 'oj-ux-ico-collection' }, onOjBeforeSelect, onOjRemove, onOjSelectionAction, onSelectionChanged, selection, separatorPadding = '3rem', size, staticTabs = [], staticTabsDisplay = 'standard', 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, id } = props;
|
|
9050
9782
|
const handleRemove = (event) => {
|
|
9051
9783
|
if (onOjRemove) {
|
|
9052
9784
|
onOjRemove({ key: event.value });
|
|
@@ -9075,7 +9807,7 @@ define('oj-c/tab-bar-mixed/tab-bar-mixed',["require", "exports", "preact/jsx-run
|
|
|
9075
9807
|
}
|
|
9076
9808
|
})();
|
|
9077
9809
|
};
|
|
9078
|
-
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { children: (0, jsx_runtime_1.jsx)(DataTabBarMixed_1.DataTabBarMixed, { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, dynamicTabs: dynamicTabs, dynamicTabsOverflow: dynamicTabsOverflow, dynamicTabsOverflowIcon: dynamicTabsOverflowIcon, onRemove: handleRemove, onSelect: handleSelect, selection: selection, separatorPadding: separatorPadding, size: size, staticTabs: staticTabs, staticTabsDisplay: staticTabsDisplay }) }));
|
|
9810
|
+
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { id: id, children: (0, jsx_runtime_1.jsx)(DataTabBarMixed_1.DataTabBarMixed, { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, dynamicTabs: dynamicTabs, dynamicTabsOverflow: dynamicTabsOverflow, dynamicTabsOverflowIcon: dynamicTabsOverflowIcon, onRemove: handleRemove, onSelect: handleSelect, selection: selection, separatorPadding: separatorPadding, size: size, staticTabs: staticTabs, staticTabsDisplay: staticTabsDisplay }) }));
|
|
9079
9811
|
}, "TabBarMixed", { "properties": { "dynamicTabs": { "type": "Array<object>" }, "dynamicTabsOverflow": { "type": "string", "enumValues": ["popup", "conveyor"] }, "dynamicTabsOverflowIcon": { "type": "object" }, "size": { "type": "string", "enumValues": ["md", "lg"] }, "selection": { "type": "any", "writeback": true }, "separatorPadding": { "type": "string" }, "staticTabs": { "type": "Array<object>" }, "staticTabsDisplay": { "type": "string", "enumValues": ["standard", "icons"] } }, "events": { "ojBeforeSelect": { "cancelable": true }, "ojRemove": {}, "ojSelectionAction": {} }, "extension": { "_WRITEBACK_PROPS": ["selection"], "_READ_ONLY_PROPS": [], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "id", "aria-labelledby"] } }, undefined, {
|
|
9080
9812
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
9081
9813
|
});
|
|
@@ -9215,7 +9947,6 @@ define('oj-c/card-view/card-view',["require", "exports", "preact/jsx-runtime", '
|
|
|
9215
9947
|
};
|
|
9216
9948
|
const CardViewImpl = ({ columns = 'auto', data = null, focusBehavior = 'card', gutterSize = 'sm', initialAnimation = 'slideUp', scrollPolicyOptions = { fetchSize: 25 }, selectionMode = 'none', reorderable = { items: 'disabled' }, ...rest }) => {
|
|
9217
9949
|
const rootRef = (0, hooks_1.useRef)();
|
|
9218
|
-
const busyContextRef = (0, hooks_1.useRef)(Context.getContext(rootRef.current).getBusyContext());
|
|
9219
9950
|
const isClickthroughDisabled = (0, hooks_1.useCallback)((target) => {
|
|
9220
9951
|
if (target === null || rootRef.current === undefined) {
|
|
9221
9952
|
return false;
|
|
@@ -9223,9 +9954,13 @@ define('oj-c/card-view/card-view',["require", "exports", "preact/jsx-runtime", '
|
|
|
9223
9954
|
return isEventClickthroughDisabled({ target }, rootRef.current);
|
|
9224
9955
|
}, []);
|
|
9225
9956
|
const addBusyState = (0, hooks_1.useCallback)((desc) => {
|
|
9226
|
-
return
|
|
9227
|
-
|
|
9228
|
-
|
|
9957
|
+
return rootRef.current
|
|
9958
|
+
? Context.getContext(rootRef.current)
|
|
9959
|
+
.getBusyContext()
|
|
9960
|
+
.addBusyState({
|
|
9961
|
+
description: `oj-c-card-view: ${desc}`
|
|
9962
|
+
})
|
|
9963
|
+
: () => { };
|
|
9229
9964
|
}, []);
|
|
9230
9965
|
const props = {
|
|
9231
9966
|
columns,
|
|
@@ -9694,3 +10429,427 @@ define('oj-c/buttonset-multiple',["require", "exports", "oj-c/buttonset-multiple
|
|
|
9694
10429
|
Object.defineProperty(exports, "ButtonsetMultiple", { enumerable: true, get: function () { return buttonset_multiple_1.ButtonsetMultiple; } });
|
|
9695
10430
|
});
|
|
9696
10431
|
|
|
10432
|
+
|
|
10433
|
+
define('oj-c/progress-button/progress-button',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "ojs/ojvcomponent", "@oracle/oraclejet-preact/UNSAFE_ProgressButton", "@oracle/oraclejet-preact/UNSAFE_IconProgressButton", "@oracle/oraclejet-preact/hooks/UNSAFE_useTabbableMode", "@oracle/oraclejet-preact/hooks/UNSAFE_useTooltip", "@oracle/oraclejet-preact/utils/UNSAFE_mergeProps", "preact/hooks", "preact/compat", "css!oj-c/progress-button/progress-button-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, ojvcomponent_1, UNSAFE_ProgressButton_1, UNSAFE_IconProgressButton_1, UNSAFE_useTabbableMode_1, UNSAFE_useTooltip_1, UNSAFE_mergeProps_1, hooks_1, compat_1) {
|
|
10434
|
+
"use strict";
|
|
10435
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10436
|
+
exports.ProgressButton = void 0;
|
|
10437
|
+
function ProgressButtonImpl({ chroming = 'outlined', disabled = false, size = 'md', display = 'all', startIcon, edge = 'none', tooltip, isLoading, width, label, onOjAction, ...otherProps }, ref) {
|
|
10438
|
+
const rootRef = (0, hooks_1.useRef)();
|
|
10439
|
+
const buttonRef = (0, hooks_1.useRef)();
|
|
10440
|
+
const iconButtonRef = (0, hooks_1.useRef)();
|
|
10441
|
+
const isLabelButton = display != 'icons' || (!startIcon && display == 'icons');
|
|
10442
|
+
const widthSize = { width: edge === 'bottom' ? '100%' : width };
|
|
10443
|
+
const widthProps = width || edge !== 'none' ? { style: widthSize } : {};
|
|
10444
|
+
const ariaProps = { 'aria-label': label };
|
|
10445
|
+
(0, hooks_1.useImperativeHandle)(ref, () => ({
|
|
10446
|
+
blur: () => (isLabelButton ? buttonRef.current?.blur() : iconButtonRef?.current?.blur()),
|
|
10447
|
+
focus: () => (isLabelButton ? buttonRef.current?.focus() : iconButtonRef?.current?.focus()),
|
|
10448
|
+
click: () => (isLabelButton ? buttonRef.current?.click() : iconButtonRef?.current?.click())
|
|
10449
|
+
}), [isLabelButton, buttonRef, iconButtonRef]);
|
|
10450
|
+
if (isLabelButton) {
|
|
10451
|
+
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { ref: rootRef, ...widthProps, children: (0, jsx_runtime_1.jsx)(FunctionalProgressButton, { ref: buttonRef, type: "submit", variant: chroming, isDisabled: disabled, width: '100%', onAction: onOjAction, startIcon: startIcon, isLoading: isLoading, size: size, label: display == 'icons' ? (!startIcon ? label : '') : label, display: display != 'icons' ? display : 'all', ...otherProps }) }));
|
|
10452
|
+
}
|
|
10453
|
+
else {
|
|
10454
|
+
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { ref: rootRef, ...widthProps, children: (0, jsx_runtime_1.jsx)(FunctionalIconProgressButton, { width: '100%', ref: iconButtonRef, type: "submit", variant: chroming, isDisabled: disabled, isLoading: isLoading, tooltip: label, onAction: onOjAction, size: size, ...ariaProps, ...otherProps, children: startIcon }) }));
|
|
10455
|
+
}
|
|
10456
|
+
}
|
|
10457
|
+
exports.ProgressButton = (0, ojvcomponent_1.registerCustomElement)('oj-c-progress-button', (0, compat_1.forwardRef)(ProgressButtonImpl), "ProgressButton", { "properties": { "label": { "type": "string" }, "tooltip": { "type": "string" }, "disabled": { "type": "boolean" }, "isLoading": { "type": "boolean" }, "width": { "type": "number|string" }, "display": { "type": "string", "enumValues": ["all", "label", "icons"] }, "size": { "type": "string", "enumValues": ["sm", "md", "lg"] }, "edge": { "type": "string", "enumValues": ["none", "bottom"] }, "chroming": { "type": "string", "enumValues": ["solid", "borderless", "outlined", "callToAction"], "binding": { "consume": { "name": "containerChroming" } } } }, "slots": { "startIcon": {} }, "events": { "ojAction": { "bubbles": true } }, "methods": { "focus": {}, "blur": {}, "click": {} } }, { "chroming": "outlined", "disabled": false, "size": "md", "display": "all", "edge": "none" }, {
|
|
10458
|
+
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
10459
|
+
}, { consume: [UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
10460
|
+
const FunctionalProgressButton = (0, compat_1.forwardRef)((props, ref) => {
|
|
10461
|
+
const buttonRef = (0, hooks_1.useRef)();
|
|
10462
|
+
(0, hooks_1.useImperativeHandle)(ref, () => ({
|
|
10463
|
+
focus: () => buttonRef.current?.focus(),
|
|
10464
|
+
blur: () => buttonRef.current?.blur(),
|
|
10465
|
+
click: () => buttonRef.current?.click()
|
|
10466
|
+
}), []);
|
|
10467
|
+
const { tooltipContent, tooltipProps } = (0, UNSAFE_useTooltip_1.useTooltip)({
|
|
10468
|
+
text: props.tooltip,
|
|
10469
|
+
isDisabled: props.isDisabled
|
|
10470
|
+
});
|
|
10471
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(UNSAFE_ProgressButton_1.ProgressButton, { ref: buttonRef, ...(0, UNSAFE_mergeProps_1.mergeProps)(props, tooltipProps) }), tooltipContent] }));
|
|
10472
|
+
});
|
|
10473
|
+
const FunctionalIconProgressButton = (0, compat_1.forwardRef)((props, ref) => {
|
|
10474
|
+
const iconButtonRef = (0, hooks_1.useRef)();
|
|
10475
|
+
(0, hooks_1.useImperativeHandle)(ref, () => ({
|
|
10476
|
+
focus: () => iconButtonRef.current?.focus(),
|
|
10477
|
+
blur: () => iconButtonRef.current?.blur(),
|
|
10478
|
+
click: () => iconButtonRef.current?.click()
|
|
10479
|
+
}), []);
|
|
10480
|
+
return (0, jsx_runtime_1.jsx)(UNSAFE_IconProgressButton_1.IconProgressButton, { ref: iconButtonRef, ...props });
|
|
10481
|
+
});
|
|
10482
|
+
});
|
|
10483
|
+
|
|
10484
|
+
define('oj-c/progress-button',["require", "exports", "oj-c/progress-button/progress-button"], function (require, exports, progress_button_1) {
|
|
10485
|
+
"use strict";
|
|
10486
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10487
|
+
exports.ProgressButton = void 0;
|
|
10488
|
+
Object.defineProperty(exports, "ProgressButton", { enumerable: true, get: function () { return progress_button_1.ProgressButton; } });
|
|
10489
|
+
});
|
|
10490
|
+
|
|
10491
|
+
|
|
10492
|
+
define('oj-c/table/table',["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "ojs/ojcustomelement-registry", "ojs/ojcontext", "ojs/ojvcomponent", "preact/hooks", "../hooks/UNSAFE_useListData/useListData", "@oracle/oraclejet-preact/UNSAFE_TableView", "ojs/ojkeyset", "../utils/UNSAFE_keyUtils/keySetUtils", "@oracle/oraclejet-preact/hooks/UNSAFE_useCollectionInteractionContext", "@oracle/oraclejet-preact/hooks/UNSAFE_useFormVariantContext", "css!oj-c/table/table-styles.css"], function (require, exports, jsx_runtime_1, translationBundle_1, ojcustomelement_registry_1, Context, ojvcomponent_1, hooks_1, useListData_1, UNSAFE_TableView_1, ojkeyset_1, keySetUtils_1, UNSAFE_useCollectionInteractionContext_1, UNSAFE_useFormVariantContext_1) {
|
|
10493
|
+
"use strict";
|
|
10494
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10495
|
+
exports.Table = void 0;
|
|
10496
|
+
const _SELECTION_COLUMN_KEY = 'oj-c-table_selection';
|
|
10497
|
+
const _selectedDefault = {};
|
|
10498
|
+
const _selectionModeDefault = { row: 'none', column: 'none' };
|
|
10499
|
+
const _scrollPolicyOptionsDefault = { fetchSize: 25 };
|
|
10500
|
+
const _defaultHeaderRenderer = (headerText) => {
|
|
10501
|
+
return headerText != null ? ((0, jsx_runtime_1.jsx)("div", { class: "oj-c-table-header-div", children: (0, jsx_runtime_1.jsx)("span", { class: "oj-c-table-header-span", children: headerText }) })) : undefined;
|
|
10502
|
+
};
|
|
10503
|
+
const _isClickthroughDisabled = function (element) {
|
|
10504
|
+
return element.dataset['ojClickthrough'] === 'disabled';
|
|
10505
|
+
};
|
|
10506
|
+
const _isEventClickthroughDisabled = function (event, rootElement) {
|
|
10507
|
+
let node = event.target;
|
|
10508
|
+
while (node != null && node !== rootElement) {
|
|
10509
|
+
if (_isClickthroughDisabled(node)) {
|
|
10510
|
+
return true;
|
|
10511
|
+
}
|
|
10512
|
+
node = node.parentNode;
|
|
10513
|
+
}
|
|
10514
|
+
return false;
|
|
10515
|
+
};
|
|
10516
|
+
function TableImpl({ 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, id, data, columns, row, horizontalGridVisible = 'enabled', verticalGridVisible = 'disabled', layout = 'contents', currentCellOverride, onCurrentCellChanged, selected = _selectedDefault, selectionMode = _selectionModeDefault, onSelectedChanged, selectAllControl = 'visible', columnOrder, cellTemplate, headerTemplate, footerTemplate, templates, onOjRowAction, noData, columnWidths, scrollPolicyOptions = _scrollPolicyOptionsDefault }) {
|
|
10517
|
+
const rootRef = (0, hooks_1.useRef)(null);
|
|
10518
|
+
const tableViewRef = (0, hooks_1.useRef)(null);
|
|
10519
|
+
const isClickthroughDisabled = (0, hooks_1.useCallback)((target) => {
|
|
10520
|
+
if (target == null || rootRef.current == null) {
|
|
10521
|
+
return false;
|
|
10522
|
+
}
|
|
10523
|
+
return _isEventClickthroughDisabled({ target }, rootRef.current);
|
|
10524
|
+
}, []);
|
|
10525
|
+
const [listDataState, onLoadRange] = (0, useListData_1.useListData)(data, {
|
|
10526
|
+
fetchSize: scrollPolicyOptions?.fetchSize
|
|
10527
|
+
});
|
|
10528
|
+
const onLoadMore = (0, hooks_1.useCallback)(() => {
|
|
10529
|
+
if (listDataState.status === 'success' && listDataState.data && onLoadRange) {
|
|
10530
|
+
const fetchSize = scrollPolicyOptions && scrollPolicyOptions.fetchSize != null
|
|
10531
|
+
? scrollPolicyOptions.fetchSize
|
|
10532
|
+
: 25;
|
|
10533
|
+
onLoadRange({ offset: 0, count: listDataState.data.data.length + fetchSize });
|
|
10534
|
+
}
|
|
10535
|
+
}, [listDataState, onLoadRange, scrollPolicyOptions]);
|
|
10536
|
+
const hasMore = listDataState.status === 'loading' ||
|
|
10537
|
+
(listDataState.status === 'success' && listDataState.data.sizePrecision === 'atLeast');
|
|
10538
|
+
const realizedColumnWidths = (0, hooks_1.useMemo)(() => {
|
|
10539
|
+
const preactColumnWidths = { ...columnWidths };
|
|
10540
|
+
if (selectionMode?.row === 'multiple') {
|
|
10541
|
+
preactColumnWidths[_SELECTION_COLUMN_KEY] = 36;
|
|
10542
|
+
}
|
|
10543
|
+
return preactColumnWidths;
|
|
10544
|
+
}, [selectionMode?.row, columnWidths]);
|
|
10545
|
+
function getRowContext(context) {
|
|
10546
|
+
const { data } = context;
|
|
10547
|
+
return {
|
|
10548
|
+
item: data
|
|
10549
|
+
};
|
|
10550
|
+
}
|
|
10551
|
+
const tableCellSelectorRenderer = (context) => {
|
|
10552
|
+
return context.selector != null ? context.selector() : undefined;
|
|
10553
|
+
};
|
|
10554
|
+
const tableHeaderSelectorRenderer = (context) => {
|
|
10555
|
+
return context.selector != null ? ((0, jsx_runtime_1.jsx)("div", { "data-oj-table-selector": 'all', children: context.selector() })) : undefined;
|
|
10556
|
+
};
|
|
10557
|
+
function getPreactHeaderRenderer(headerTemplate) {
|
|
10558
|
+
return (context) => {
|
|
10559
|
+
const templateContext = {
|
|
10560
|
+
key: context.key,
|
|
10561
|
+
headerText: context.headerText,
|
|
10562
|
+
isTabbable: context.isTabbable
|
|
10563
|
+
};
|
|
10564
|
+
return headerTemplate
|
|
10565
|
+
? headerTemplate(templateContext)
|
|
10566
|
+
: _defaultHeaderRenderer(templateContext.headerText);
|
|
10567
|
+
};
|
|
10568
|
+
}
|
|
10569
|
+
function getPreactFooterRenderer(footerTemplate, footerText) {
|
|
10570
|
+
if (footerTemplate || footerText != null) {
|
|
10571
|
+
return (context) => {
|
|
10572
|
+
const templateContext = {
|
|
10573
|
+
key: context.key,
|
|
10574
|
+
footerText: context.footerText,
|
|
10575
|
+
isTabbable: context.isTabbable
|
|
10576
|
+
};
|
|
10577
|
+
return footerTemplate ? footerTemplate(templateContext) : footerText;
|
|
10578
|
+
};
|
|
10579
|
+
}
|
|
10580
|
+
return undefined;
|
|
10581
|
+
}
|
|
10582
|
+
function getPreactNoDataRenderer(noData) {
|
|
10583
|
+
if (noData) {
|
|
10584
|
+
return (context) => {
|
|
10585
|
+
return noData({ isTabbable: context.isTabbable });
|
|
10586
|
+
};
|
|
10587
|
+
}
|
|
10588
|
+
return undefined;
|
|
10589
|
+
}
|
|
10590
|
+
function getPreactCellRenderer(cellTemplate, field) {
|
|
10591
|
+
return (context) => {
|
|
10592
|
+
const templateContext = {
|
|
10593
|
+
item: context.rowData,
|
|
10594
|
+
columnKey: context.columnKey,
|
|
10595
|
+
data: field != null ? context.rowData.data[field] : undefined,
|
|
10596
|
+
isTabbable: context.isTabbable
|
|
10597
|
+
};
|
|
10598
|
+
return cellTemplate
|
|
10599
|
+
? cellTemplate(templateContext)
|
|
10600
|
+
: templateContext.data != null
|
|
10601
|
+
? String(templateContext.data)
|
|
10602
|
+
: undefined;
|
|
10603
|
+
};
|
|
10604
|
+
}
|
|
10605
|
+
function getPreactColumns(cols, globalCellTemplate, globalHeaderTemplate, globalFooterTemplate, templates) {
|
|
10606
|
+
const preactColumns = {};
|
|
10607
|
+
if (selectionMode?.row === 'multiple') {
|
|
10608
|
+
preactColumns[_SELECTION_COLUMN_KEY] = {
|
|
10609
|
+
stickyEdge: 'start',
|
|
10610
|
+
selectable: 'disabled',
|
|
10611
|
+
renderer: tableCellSelectorRenderer,
|
|
10612
|
+
headerRenderer: selectAllControl !== 'hidden' ? tableHeaderSelectorRenderer : undefined,
|
|
10613
|
+
padding: 'disabled',
|
|
10614
|
+
headerPadding: 'disabled'
|
|
10615
|
+
};
|
|
10616
|
+
}
|
|
10617
|
+
Object.keys(cols).forEach((key) => {
|
|
10618
|
+
const colKey = key;
|
|
10619
|
+
const column = cols[colKey];
|
|
10620
|
+
const cellRenderer = column.template && templates && templates[column.template]
|
|
10621
|
+
? getPreactCellRenderer(templates[column.template], column.field)
|
|
10622
|
+
: getPreactCellRenderer(globalCellTemplate, column.field);
|
|
10623
|
+
const headerCellRenderer = column.headerTemplate && templates && templates[column.headerTemplate]
|
|
10624
|
+
? getPreactHeaderRenderer(templates[column.headerTemplate])
|
|
10625
|
+
: getPreactHeaderRenderer(globalHeaderTemplate);
|
|
10626
|
+
const footerCellRenderer = column.footerTemplate && templates && templates[column.footerTemplate]
|
|
10627
|
+
? getPreactFooterRenderer(templates[column.footerTemplate], column.footerText)
|
|
10628
|
+
: getPreactFooterRenderer(globalFooterTemplate, column.footerText);
|
|
10629
|
+
const headerText = column.headerText ?? undefined;
|
|
10630
|
+
const footerText = column.footerText ?? undefined;
|
|
10631
|
+
const maxWidth = column.maxWidth ?? undefined;
|
|
10632
|
+
const minWidth = column.minWidth ?? undefined;
|
|
10633
|
+
const weight = column.weight ?? undefined;
|
|
10634
|
+
let padding;
|
|
10635
|
+
const columnPadding = column.padding;
|
|
10636
|
+
if (typeof columnPadding === 'function') {
|
|
10637
|
+
padding = (context) => {
|
|
10638
|
+
const internalContext = getRowContext(context);
|
|
10639
|
+
return columnPadding(internalContext);
|
|
10640
|
+
};
|
|
10641
|
+
}
|
|
10642
|
+
else {
|
|
10643
|
+
padding = columnPadding ?? 'enabled';
|
|
10644
|
+
}
|
|
10645
|
+
const headerPadding = column.headerPadding ?? 'enabled';
|
|
10646
|
+
const footerPadding = column.footerPadding ?? 'enabled';
|
|
10647
|
+
preactColumns[colKey] = {
|
|
10648
|
+
headerText: headerText,
|
|
10649
|
+
footerText: footerText,
|
|
10650
|
+
renderer: cellRenderer,
|
|
10651
|
+
headerRenderer: headerCellRenderer,
|
|
10652
|
+
footerRenderer: footerCellRenderer,
|
|
10653
|
+
maxWidth,
|
|
10654
|
+
minWidth,
|
|
10655
|
+
weight,
|
|
10656
|
+
padding,
|
|
10657
|
+
headerPadding,
|
|
10658
|
+
footerPadding
|
|
10659
|
+
};
|
|
10660
|
+
});
|
|
10661
|
+
return preactColumns;
|
|
10662
|
+
}
|
|
10663
|
+
const handleKeyDown = (0, hooks_1.useCallback)((event) => {
|
|
10664
|
+
if (event.key === ' ') {
|
|
10665
|
+
const targetElement = event.target;
|
|
10666
|
+
if (targetElement.children.length > 0 &&
|
|
10667
|
+
targetElement.children[0].dataset['ojTableSelector'] === 'all') {
|
|
10668
|
+
let newRowSelection;
|
|
10669
|
+
if (selected.row?.isAddAll() && selected.row.keys.deletedKeys?.size === 0) {
|
|
10670
|
+
newRowSelection = new ojkeyset_1.KeySetImpl();
|
|
10671
|
+
}
|
|
10672
|
+
else {
|
|
10673
|
+
newRowSelection = new ojkeyset_1.AllKeySetImpl();
|
|
10674
|
+
}
|
|
10675
|
+
onSelectedChanged({
|
|
10676
|
+
row: newRowSelection,
|
|
10677
|
+
column: new ojkeyset_1.KeySetImpl()
|
|
10678
|
+
});
|
|
10679
|
+
}
|
|
10680
|
+
}
|
|
10681
|
+
}, [onSelectedChanged, selected]);
|
|
10682
|
+
const selectAllHandlerProps = selectionMode?.row === 'multiple' && selectAllControl !== 'hidden'
|
|
10683
|
+
? { onKeyDown: handleKeyDown }
|
|
10684
|
+
: {};
|
|
10685
|
+
const preactColumns = (0, hooks_1.useMemo)(() => {
|
|
10686
|
+
return columns
|
|
10687
|
+
? getPreactColumns(columns, cellTemplate, headerTemplate, footerTemplate, templates)
|
|
10688
|
+
: {};
|
|
10689
|
+
}, [columns, cellTemplate, headerTemplate, footerTemplate, templates, selectionMode?.row]);
|
|
10690
|
+
const preactColumnOrder = (0, hooks_1.useMemo)(() => {
|
|
10691
|
+
const newColumnOrder = [];
|
|
10692
|
+
let hasSelectorColumn = false;
|
|
10693
|
+
if (selectionMode?.row === 'multiple') {
|
|
10694
|
+
newColumnOrder.push(_SELECTION_COLUMN_KEY);
|
|
10695
|
+
hasSelectorColumn = true;
|
|
10696
|
+
}
|
|
10697
|
+
if (columnOrder != null) {
|
|
10698
|
+
for (const key of columnOrder) {
|
|
10699
|
+
if (preactColumns[key] != null && !newColumnOrder.includes(key)) {
|
|
10700
|
+
newColumnOrder.push(key);
|
|
10701
|
+
}
|
|
10702
|
+
}
|
|
10703
|
+
}
|
|
10704
|
+
else {
|
|
10705
|
+
for (const [key] of Object.entries(preactColumns)) {
|
|
10706
|
+
if (key !== _SELECTION_COLUMN_KEY) {
|
|
10707
|
+
newColumnOrder.push(key);
|
|
10708
|
+
}
|
|
10709
|
+
}
|
|
10710
|
+
}
|
|
10711
|
+
return newColumnOrder.length === 1 && hasSelectorColumn ? [] : newColumnOrder;
|
|
10712
|
+
}, [columnOrder, selectionMode?.row, preactColumns]);
|
|
10713
|
+
const preactData = listDataState.status === 'success' ? listDataState?.data?.data || [] : [];
|
|
10714
|
+
const preactGetRowKey = (data) => {
|
|
10715
|
+
return data.metadata.key;
|
|
10716
|
+
};
|
|
10717
|
+
const preactGetAccessibleRowHeaders = (preactContext) => {
|
|
10718
|
+
const internalContext = getRowContext(preactContext);
|
|
10719
|
+
const rowHeaders = new Set();
|
|
10720
|
+
if (row != null && row.accessibleRowHeader != null) {
|
|
10721
|
+
if (typeof row.accessibleRowHeader === 'string') {
|
|
10722
|
+
rowHeaders.add(row.accessibleRowHeader);
|
|
10723
|
+
}
|
|
10724
|
+
else if (Array.isArray(row.accessibleRowHeader)) {
|
|
10725
|
+
row.accessibleRowHeader.forEach((header) => rowHeaders.add(header));
|
|
10726
|
+
}
|
|
10727
|
+
else if (typeof row.accessibleRowHeader === 'function') {
|
|
10728
|
+
const result = row.accessibleRowHeader(internalContext);
|
|
10729
|
+
if (typeof result === 'string') {
|
|
10730
|
+
rowHeaders.add(result);
|
|
10731
|
+
}
|
|
10732
|
+
else if (Array.isArray(result)) {
|
|
10733
|
+
result.forEach((header) => rowHeaders.add(header));
|
|
10734
|
+
}
|
|
10735
|
+
}
|
|
10736
|
+
}
|
|
10737
|
+
else if (preactColumnOrder.length > 0) {
|
|
10738
|
+
if (selectionMode?.row === 'multiple') {
|
|
10739
|
+
rowHeaders.add(preactColumnOrder[1]);
|
|
10740
|
+
}
|
|
10741
|
+
else {
|
|
10742
|
+
rowHeaders.add(preactColumnOrder[0]);
|
|
10743
|
+
}
|
|
10744
|
+
}
|
|
10745
|
+
return rowHeaders;
|
|
10746
|
+
};
|
|
10747
|
+
const preactOnRowAction = (0, hooks_1.useCallback)((eventDetail) => {
|
|
10748
|
+
if (onOjRowAction && eventDetail != null && !isClickthroughDisabled(eventDetail.target)) {
|
|
10749
|
+
onOjRowAction({ context: getRowContext(eventDetail.context) });
|
|
10750
|
+
}
|
|
10751
|
+
}, [onOjRowAction, isClickthroughDisabled, getRowContext]);
|
|
10752
|
+
const gridlines = (0, hooks_1.useMemo)(() => ({
|
|
10753
|
+
horizontal: horizontalGridVisible === 'enabled' ? 'visible' : 'hidden',
|
|
10754
|
+
vertical: verticalGridVisible === 'enabled' ? 'visible' : 'hidden'
|
|
10755
|
+
}), [horizontalGridVisible, verticalGridVisible]);
|
|
10756
|
+
const noDataRenderer = (0, hooks_1.useMemo)(() => {
|
|
10757
|
+
return getPreactNoDataRenderer(noData);
|
|
10758
|
+
}, [noData]);
|
|
10759
|
+
const preactSelected = (0, hooks_1.useMemo)(() => {
|
|
10760
|
+
return selected
|
|
10761
|
+
? {
|
|
10762
|
+
row: selected.row ? (0, keySetUtils_1.keySetToKeys)(selected.row) : undefined,
|
|
10763
|
+
column: selected.column ? (0, keySetUtils_1.keySetToKeys)(selected.column) : undefined
|
|
10764
|
+
}
|
|
10765
|
+
: undefined;
|
|
10766
|
+
}, [selected?.row, selected?.column]);
|
|
10767
|
+
const preactOnSelectionChange = (0, hooks_1.useCallback)((detail) => {
|
|
10768
|
+
if (!isClickthroughDisabled(detail.target)) {
|
|
10769
|
+
const value = detail.value;
|
|
10770
|
+
const rowKeySet = value.row
|
|
10771
|
+
? (0, keySetUtils_1.keysToKeySet)(value.row)
|
|
10772
|
+
: undefined;
|
|
10773
|
+
const columnKeySet = value.column
|
|
10774
|
+
? (0, keySetUtils_1.keysToKeySet)(value.column)
|
|
10775
|
+
: undefined;
|
|
10776
|
+
onSelectedChanged({
|
|
10777
|
+
row: rowKeySet,
|
|
10778
|
+
column: columnKeySet
|
|
10779
|
+
});
|
|
10780
|
+
}
|
|
10781
|
+
}, [onSelectedChanged, isClickthroughDisabled]);
|
|
10782
|
+
const onPersistCurrentCell = (0, hooks_1.useCallback)((detail) => {
|
|
10783
|
+
if (onCurrentCellChanged) {
|
|
10784
|
+
onCurrentCellChanged(detail.value);
|
|
10785
|
+
}
|
|
10786
|
+
}, [onCurrentCellChanged]);
|
|
10787
|
+
const busyContextRef = (0, hooks_1.useRef)();
|
|
10788
|
+
const childBusyContextRef = (0, hooks_1.useRef)();
|
|
10789
|
+
const resolveDataBusyStateRef = (0, hooks_1.useRef)();
|
|
10790
|
+
const resolveContentBusyStateRef = (0, hooks_1.useRef)();
|
|
10791
|
+
const [isInitialLoading, setIsInitialLoading] = (0, hooks_1.useState)(layout === 'contents');
|
|
10792
|
+
const isInitialLoadingRef = (0, hooks_1.useRef)(isInitialLoading);
|
|
10793
|
+
(0, hooks_1.useEffect)(() => {
|
|
10794
|
+
busyContextRef.current = Context.getContext(rootRef.current).getBusyContext();
|
|
10795
|
+
childBusyContextRef.current = Context.getContext(tableViewRef.current).getBusyContext();
|
|
10796
|
+
}, []);
|
|
10797
|
+
const addBusyState = (0, hooks_1.useCallback)((desc) => {
|
|
10798
|
+
return busyContextRef.current?.addBusyState({
|
|
10799
|
+
description: `oj-c-table: ${desc}`
|
|
10800
|
+
});
|
|
10801
|
+
}, []);
|
|
10802
|
+
(0, hooks_1.useEffect)(() => {
|
|
10803
|
+
if (listDataState.status === 'loading') {
|
|
10804
|
+
resolveDataBusyStateRef.current = addBusyState('Table is loading data');
|
|
10805
|
+
}
|
|
10806
|
+
else {
|
|
10807
|
+
if (isInitialLoadingRef.current) {
|
|
10808
|
+
resolveContentBusyStateRef.current = addBusyState('Table content is initializing');
|
|
10809
|
+
childBusyContextRef.current.whenReady().then(function () {
|
|
10810
|
+
if (resolveContentBusyStateRef.current) {
|
|
10811
|
+
resolveContentBusyStateRef.current();
|
|
10812
|
+
resolveContentBusyStateRef.current = undefined;
|
|
10813
|
+
}
|
|
10814
|
+
setIsInitialLoading(false);
|
|
10815
|
+
isInitialLoadingRef.current = false;
|
|
10816
|
+
});
|
|
10817
|
+
}
|
|
10818
|
+
}
|
|
10819
|
+
return () => {
|
|
10820
|
+
if (resolveDataBusyStateRef.current) {
|
|
10821
|
+
resolveDataBusyStateRef.current();
|
|
10822
|
+
resolveDataBusyStateRef.current = undefined;
|
|
10823
|
+
}
|
|
10824
|
+
if (resolveContentBusyStateRef.current) {
|
|
10825
|
+
resolveContentBusyStateRef.current();
|
|
10826
|
+
resolveContentBusyStateRef.current = undefined;
|
|
10827
|
+
}
|
|
10828
|
+
};
|
|
10829
|
+
}, [listDataState.status, addBusyState]);
|
|
10830
|
+
return ((0, jsx_runtime_1.jsx)(ojvcomponent_1.Root, { id: id, ref: rootRef, children: (0, jsx_runtime_1.jsx)("div", { ref: tableViewRef, "data-oj-context": true, ...selectAllHandlerProps, ...(cellTemplate ? { 'data-oj-ct': true } : {}), ...(headerTemplate ? { 'data-oj-ht': true } : {}), ...(footerTemplate ? { 'data-oj-ft': true } : {}), ...(noData ? { 'data-oj-ndt': true } : {}), style: "display: contents;", children: (0, jsx_runtime_1.jsx)(UNSAFE_useFormVariantContext_1.FormVariantContext.Provider, { value: 'embedded', children: (0, jsx_runtime_1.jsx)(UNSAFE_TableView_1.TableView, { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, columns: preactColumns, data: preactData, getRowKey: preactGetRowKey, getAccessibleRowHeaders: preactGetAccessibleRowHeaders, gridlines: gridlines, layout: isInitialLoading ? 'pending' : layout, selected: preactSelected, selectionMode: selectionMode, onSelectionChange: preactOnSelectionChange, columnOrder: preactColumnOrder, onRowAction: preactOnRowAction, noDataRenderer: noDataRenderer, columnWidths: realizedColumnWidths, onLoadMore: onLoadMore, hasMore: hasMore, currentCellOverride: currentCellOverride, onPersistCurrentCell: onPersistCurrentCell, width: '100%' }) }) }) }));
|
|
10831
|
+
}
|
|
10832
|
+
exports.Table = (0, ojvcomponent_1.registerCustomElement)('oj-c-table', TableImpl, "Table", { "properties": { "layout": { "type": "string", "enumValues": ["fixed", "contents"] }, "data": { "type": "DataProvider" }, "columns": { "type": "object" }, "row": { "type": "object", "properties": { "accessibleRowHeader": { "type": "any" } } }, "horizontalGridVisible": { "type": "string", "enumValues": ["disabled", "enabled"] }, "verticalGridVisible": { "type": "string", "enumValues": ["disabled", "enabled"] }, "selected": { "type": "object", "properties": { "column": { "type": "object" }, "row": { "type": "object" } }, "writeback": true }, "selectionMode": { "type": "object", "properties": { "column": { "type": "string", "enumValues": ["none", "multiple", "single"] }, "row": { "type": "string", "enumValues": ["none", "multiple", "single"] } } }, "selectAllControl": { "type": "string", "enumValues": ["hidden", "visible"] }, "columnOrder": { "type": "Array<string>", "writeback": true }, "currentCellOverride": { "type": "object" }, "currentCell": { "type": "object", "readOnly": true, "writeback": true }, "columnWidths": { "type": "object", "writeback": true }, "scrollPolicyOptions": { "type": "object", "properties": { "fetchSize": { "type": "number" } } } }, "slots": { "cellTemplate": { "data": {} }, "headerTemplate": { "data": {} }, "footerTemplate": { "data": {} }, "noData": { "data": {} } }, "extension": { "_DYNAMIC_SLOT": { "prop": "templates", "isTemplate": 1 }, "_WRITEBACK_PROPS": ["selected", "columnOrder", "currentCell", "columnWidths"], "_READ_ONLY_PROPS": ["currentCell"], "_OBSERVED_GLOBAL_PROPS": ["aria-label", "aria-labelledby", "id"] }, "events": { "ojRowAction": { "bubbles": true } } }, { "horizontalGridVisible": "enabled", "verticalGridVisible": "disabled", "layout": "contents", "selected": {}, "selectionMode": { "row": "none", "column": "none" }, "selectAllControl": "visible", "scrollPolicyOptions": { "fetchSize": 25 } }, {
|
|
10833
|
+
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
10834
|
+
}, { consume: [UNSAFE_useCollectionInteractionContext_1.CollectionInteractionContext] });
|
|
10835
|
+
const metadata = (0, ojcustomelement_registry_1.getMetadata)('oj-c-table');
|
|
10836
|
+
metadata.properties.__oj_private_do_not_use_userAssistanceDensity = {
|
|
10837
|
+
binding: {
|
|
10838
|
+
provide: [
|
|
10839
|
+
{ name: 'containerUserAssistanceDensity', default: 'compact' },
|
|
10840
|
+
{ name: 'userAssistanceDensity', default: 'compact' }
|
|
10841
|
+
]
|
|
10842
|
+
}
|
|
10843
|
+
};
|
|
10844
|
+
});
|
|
10845
|
+
|
|
10846
|
+
define('oj-c/table',["require", "exports", "oj-c/table/table"], function (require, exports, table_1) {
|
|
10847
|
+
"use strict";
|
|
10848
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10849
|
+
exports.Table = void 0;
|
|
10850
|
+
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return table_1.Table; } });
|
|
10851
|
+
});
|
|
10852
|
+
|
|
10853
|
+
|
|
10854
|
+
define("corepackbundle", function(){});
|
|
10855
|
+
|