@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "select-multiple",
|
|
3
|
-
"version": "17.0
|
|
4
|
-
"jetVersion": "^17.0
|
|
3
|
+
"version": "17.1.0",
|
|
4
|
+
"jetVersion": "^17.1.0",
|
|
5
5
|
"pack": "oj-c",
|
|
6
6
|
"type": "composite",
|
|
7
7
|
"dependencyScope": "runtime",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
31
|
"webelement": {
|
|
32
|
-
"docUrl": "https://www.oracle.com/webfolder/technetwork/jet-
|
|
32
|
+
"docUrl": "https://www.oracle.com/webfolder/technetwork/jet-1710/cpwdtsdoc/classes/SelectMultipleWebElement.html"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"propertyLayout": [
|
|
@@ -64,6 +64,104 @@
|
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
66
|
],
|
|
67
|
+
"slots": {
|
|
68
|
+
"collectionTemplate": {
|
|
69
|
+
"description": "The collectionTemplate slot is used to specify the template for rendering the items in the dropdown.",
|
|
70
|
+
"displayName": "collectionTemplate",
|
|
71
|
+
"help": "#collectionTemplate",
|
|
72
|
+
"maxItems": 1,
|
|
73
|
+
"preferredContent": [
|
|
74
|
+
"CTableElement"
|
|
75
|
+
],
|
|
76
|
+
"data": {
|
|
77
|
+
"data": {
|
|
78
|
+
"type": "DataProvider|null"
|
|
79
|
+
},
|
|
80
|
+
"searchText": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
},
|
|
83
|
+
"currentRowOverride": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"properties": {
|
|
86
|
+
"rowKey": {
|
|
87
|
+
"type": "any"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"onCurrentRowChanged": {
|
|
92
|
+
"type": "function"
|
|
93
|
+
},
|
|
94
|
+
"selected": {
|
|
95
|
+
"type": "object"
|
|
96
|
+
},
|
|
97
|
+
"onSelectedChanged": {
|
|
98
|
+
"type": "function"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"itemTemplate": {
|
|
103
|
+
"description": "The itemTemplate slot is used to specify the template for rendering each item in the dropdown. See the Help documentation for more information.",
|
|
104
|
+
"displayName": "itemTemplate",
|
|
105
|
+
"help": "#itemTemplate",
|
|
106
|
+
"maxItems": 1,
|
|
107
|
+
"data": {
|
|
108
|
+
"searchText": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"item": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"properties": {
|
|
114
|
+
"data": {
|
|
115
|
+
"type": "any"
|
|
116
|
+
},
|
|
117
|
+
"metadata": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {
|
|
120
|
+
"indexFromParent": {
|
|
121
|
+
"type": "number"
|
|
122
|
+
},
|
|
123
|
+
"isLeaf": {
|
|
124
|
+
"type": "boolean"
|
|
125
|
+
},
|
|
126
|
+
"key": {
|
|
127
|
+
"type": "any"
|
|
128
|
+
},
|
|
129
|
+
"message": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"properties": {
|
|
132
|
+
"detail": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
},
|
|
135
|
+
"severity": {
|
|
136
|
+
"type": "string|number"
|
|
137
|
+
},
|
|
138
|
+
"summary": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"parentKey": {
|
|
144
|
+
"type": "any"
|
|
145
|
+
},
|
|
146
|
+
"suggestion": {
|
|
147
|
+
"type": "object"
|
|
148
|
+
},
|
|
149
|
+
"treeDepth": {
|
|
150
|
+
"type": "number"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"selectedKeys": {
|
|
157
|
+
"type": "object"
|
|
158
|
+
},
|
|
159
|
+
"onSelectedKeysChanged": {
|
|
160
|
+
"type": "function"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
67
165
|
"properties": {
|
|
68
166
|
"columnSpan": {
|
|
69
167
|
"type": "number",
|
|
@@ -459,70 +557,6 @@
|
|
|
459
557
|
"writeback": true
|
|
460
558
|
}
|
|
461
559
|
},
|
|
462
|
-
"slots": {
|
|
463
|
-
"itemTemplate": {
|
|
464
|
-
"description": "The itemTemplate slot is used to specify the template for rendering each item in the dropdown. See the Help documentation for more information.",
|
|
465
|
-
"displayName": "itemTemplate",
|
|
466
|
-
"help": "#itemTemplate",
|
|
467
|
-
"maxItems": 1,
|
|
468
|
-
"data": {
|
|
469
|
-
"searchText": {
|
|
470
|
-
"type": "string"
|
|
471
|
-
},
|
|
472
|
-
"item": {
|
|
473
|
-
"type": "object",
|
|
474
|
-
"properties": {
|
|
475
|
-
"data": {
|
|
476
|
-
"type": "any"
|
|
477
|
-
},
|
|
478
|
-
"metadata": {
|
|
479
|
-
"type": "object",
|
|
480
|
-
"properties": {
|
|
481
|
-
"indexFromParent": {
|
|
482
|
-
"type": "number"
|
|
483
|
-
},
|
|
484
|
-
"isLeaf": {
|
|
485
|
-
"type": "boolean"
|
|
486
|
-
},
|
|
487
|
-
"key": {
|
|
488
|
-
"type": "any"
|
|
489
|
-
},
|
|
490
|
-
"message": {
|
|
491
|
-
"type": "object",
|
|
492
|
-
"properties": {
|
|
493
|
-
"detail": {
|
|
494
|
-
"type": "string"
|
|
495
|
-
},
|
|
496
|
-
"severity": {
|
|
497
|
-
"type": "string|number"
|
|
498
|
-
},
|
|
499
|
-
"summary": {
|
|
500
|
-
"type": "string"
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
},
|
|
504
|
-
"parentKey": {
|
|
505
|
-
"type": "any"
|
|
506
|
-
},
|
|
507
|
-
"suggestion": {
|
|
508
|
-
"type": "object"
|
|
509
|
-
},
|
|
510
|
-
"treeDepth": {
|
|
511
|
-
"type": "number"
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
},
|
|
517
|
-
"selectedKeys": {
|
|
518
|
-
"type": "object"
|
|
519
|
-
},
|
|
520
|
-
"onSelectedKeysChanged": {
|
|
521
|
-
"type": "function"
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
},
|
|
526
560
|
"methods": {
|
|
527
561
|
"blur": {
|
|
528
562
|
"description": "Blurs the input field.",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/UNSAFE_SelectMultiple", "@oracle/oraclejet-preact/hooks/
|
|
1
|
+
define(["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) {
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.SelectMultiple = void 0;
|
|
@@ -58,7 +58,7 @@ define(["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/tr
|
|
|
58
58
|
const variant = (0, UNSAFE_useFormVariantContext_1.useFormVariantContext)();
|
|
59
59
|
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 }) }) }));
|
|
60
60
|
}
|
|
61
|
-
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 } }, "
|
|
61
|
+
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" }, {
|
|
62
62
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
63
63
|
}, { consume: [UNSAFE_useFormVariantContext_1.FormVariantContext, UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
64
64
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslationBundle", "oj-c/editable-value/UNSAFE_useEditableValue/useEditableValue", "oj-c/editable-value/UNSAFE_useValidators/useValidators", "oj-c/
|
|
1
|
+
define(["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) {
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.useSelectMultiplePreact = void 0;
|
|
5
|
-
function useSelectMultiplePreact({ data
|
|
5
|
+
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) {
|
|
6
6
|
const [filterCriterion, setFilterCriterion] = (0, hooks_1.useState)(undefined);
|
|
7
|
-
const [isLoading, setIsLoading] = (0, hooks_1.useState)(
|
|
7
|
+
const [isLoading, setIsLoading] = (0, hooks_1.useState)(data != null &&
|
|
8
8
|
propValue != null &&
|
|
9
9
|
propValue.size > 0 &&
|
|
10
10
|
(propValueItems == null || propValueItems.size === 0));
|
|
@@ -42,7 +42,13 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
42
42
|
});
|
|
43
43
|
const { 'aria-describedby': ariaDescribedBy, messages } = textFieldProps;
|
|
44
44
|
const hasNoValue = value === null || (value instanceof Set && value.size === 0);
|
|
45
|
-
const
|
|
45
|
+
const [dataStateOverride, setDataStateOverride] = (0, hooks_1.useState)();
|
|
46
|
+
const { dataProvider, dataState, onLoadRange } = (0, index_2.useSelectData)({
|
|
47
|
+
data,
|
|
48
|
+
dataStateOverride,
|
|
49
|
+
filterCriterion,
|
|
50
|
+
hasCollectionTemplate: collectionTemplate !== undefined
|
|
51
|
+
});
|
|
46
52
|
const [valueToSync, setValueToSync] = (0, hooks_1.useState)(value);
|
|
47
53
|
const [valueItemsToSync, setValueItemsToSync] = (0, hooks_1.useState)(valueItems);
|
|
48
54
|
const [prevValue, setPrevValue] = (0, hooks_1.useState)(value);
|
|
@@ -72,10 +78,6 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
72
78
|
valueItems: valueItemsToSync,
|
|
73
79
|
validateValueOnExternalChange
|
|
74
80
|
});
|
|
75
|
-
const [listDataState, onLoadRange] = (0, useListData_1.useListData)(dataProvider, {
|
|
76
|
-
filterCriterion,
|
|
77
|
-
initialRowsFetched: 0
|
|
78
|
-
});
|
|
79
81
|
const onCommit = (0, hooks_1.useCallback)(async ({ value }) => {
|
|
80
82
|
const valueToCommit = (value && value.size > 0 ? value : utils_1.DEFAULT_VALUE);
|
|
81
83
|
setDisplayValue(valueToCommit);
|
|
@@ -100,23 +102,25 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
100
102
|
setFilterCriterion(fc);
|
|
101
103
|
}, [dataProvider, matchBy]);
|
|
102
104
|
const prevSelectedKeysRef = (0, hooks_1.useRef)((0, keySetUtils_1.keysToKeySet)({ all: false, keys: new Set() }));
|
|
103
|
-
const itemRenderer = (0, hooks_1.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
105
|
+
const itemRenderer = (0, hooks_1.useMemo)(() => {
|
|
106
|
+
if (!itemTemplate)
|
|
107
|
+
return undefined;
|
|
108
|
+
return ({ data, metadata, searchText, selectedKeys: preactSelectedKeys, onSelectionChange: preactOnSelectionChange }) => {
|
|
109
|
+
const newPreactSelectedKeys = preactSelectedKeys ?? new Set();
|
|
110
|
+
const prevPreactSelectedKeys = prevSelectedKeysRef.current.keys.keys ?? new Set();
|
|
111
|
+
const selectedKeys = (0, utils_1.isSetEqual)(prevPreactSelectedKeys, newPreactSelectedKeys)
|
|
112
|
+
? prevSelectedKeysRef.current
|
|
113
|
+
: (0, keySetUtils_1.keysToKeySet)({ all: false, keys: newPreactSelectedKeys });
|
|
114
|
+
prevSelectedKeysRef.current = selectedKeys;
|
|
115
|
+
const onSelectedKeysChanged = ((arg) => {
|
|
116
|
+
const immutableKeySet = (arg instanceof CustomEvent ? arg.detail.value : arg);
|
|
117
|
+
const immutableSet = immutableKeySet.keys.keys;
|
|
118
|
+
preactOnSelectionChange({
|
|
119
|
+
target: arg instanceof CustomEvent ? arg.target : null,
|
|
120
|
+
value: new Set(immutableSet?.values())
|
|
121
|
+
});
|
|
116
122
|
});
|
|
117
|
-
|
|
118
|
-
return itemTemplate
|
|
119
|
-
? itemTemplate({
|
|
123
|
+
return itemTemplate({
|
|
120
124
|
selectedKeys,
|
|
121
125
|
onSelectedKeysChanged,
|
|
122
126
|
item: {
|
|
@@ -124,9 +128,45 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
124
128
|
metadata: metadata
|
|
125
129
|
},
|
|
126
130
|
searchText
|
|
127
|
-
})
|
|
128
|
-
|
|
131
|
+
});
|
|
132
|
+
};
|
|
129
133
|
}, [itemTemplate]);
|
|
134
|
+
const stableCollectionTemplateContextRef = (0, hooks_1.useRef)();
|
|
135
|
+
const cache = (0, index_1.useCache)();
|
|
136
|
+
const collectionRenderer = (0, hooks_1.useMemo)(() => {
|
|
137
|
+
if (!collectionTemplate)
|
|
138
|
+
return undefined;
|
|
139
|
+
return ({ currentRowKeyOverride, onPersistCurrentRowKey, onSelectedChange, searchText, selected, selectedOnlyData }) => {
|
|
140
|
+
if (dataStateOverride !== selectedOnlyData) {
|
|
141
|
+
setDataStateOverride(selectedOnlyData);
|
|
142
|
+
}
|
|
143
|
+
const newCollectionTemplateContext = {
|
|
144
|
+
currentRowOverride: cache('currentRowOverride', currentRowKeyOverride ? { rowKey: currentRowKeyOverride } : undefined, [currentRowKeyOverride, searchText]),
|
|
145
|
+
data: dataProvider,
|
|
146
|
+
onCurrentRowChanged: cache('onCurrentRowChanged', ({ rowKey }) => {
|
|
147
|
+
onPersistCurrentRowKey({ value: rowKey });
|
|
148
|
+
}, [onPersistCurrentRowKey]),
|
|
149
|
+
onSelectedChanged: cache('onSelectedChanged', (detail) => {
|
|
150
|
+
if (detail.value?.keys.all === false) {
|
|
151
|
+
const immutableSet = detail.value.keys.keys;
|
|
152
|
+
const current = selected ?? new Set();
|
|
153
|
+
const next = new Set(immutableSet.values());
|
|
154
|
+
if (!(0, utils_1.isSetEqual)(current, next))
|
|
155
|
+
onSelectedChange({ value: next });
|
|
156
|
+
}
|
|
157
|
+
}, [selected, onSelectedChange]),
|
|
158
|
+
searchText,
|
|
159
|
+
selected: cache('selected', new ojkeyset_1.KeySetImpl([...(selected?.values() ?? [])]), [selected])
|
|
160
|
+
};
|
|
161
|
+
if (!stableCollectionTemplateContextRef.current) {
|
|
162
|
+
stableCollectionTemplateContextRef.current = newCollectionTemplateContext;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
Object.assign(stableCollectionTemplateContextRef.current, newCollectionTemplateContext);
|
|
166
|
+
}
|
|
167
|
+
return collectionTemplate(stableCollectionTemplateContextRef.current);
|
|
168
|
+
};
|
|
169
|
+
}, [cache, collectionTemplate, dataProvider, dataStateOverride]);
|
|
130
170
|
const _selectItemsByValue = (0, hooks_1.useCallback)(async (value) => {
|
|
131
171
|
return onCommit({
|
|
132
172
|
value: value ?? undefined,
|
|
@@ -146,7 +186,8 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
146
186
|
methods,
|
|
147
187
|
selectMultipleProps: {
|
|
148
188
|
'aria-describedby': ariaDescribedBy,
|
|
149
|
-
|
|
189
|
+
collectionRenderer,
|
|
190
|
+
data: dataState.status !== 'error' ? dataState.data : null,
|
|
150
191
|
isDisabled: disabled,
|
|
151
192
|
isLoading,
|
|
152
193
|
isReadonly: readonly,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "select-single",
|
|
3
|
-
"version": "17.0
|
|
4
|
-
"jetVersion": "^17.0
|
|
3
|
+
"version": "17.1.0",
|
|
4
|
+
"jetVersion": "^17.1.0",
|
|
5
5
|
"pack": "oj-c",
|
|
6
6
|
"type": "composite",
|
|
7
7
|
"dependencyScope": "runtime",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
37
|
"webelement": {
|
|
38
|
-
"docUrl": "https://www.oracle.com/webfolder/technetwork/jet-
|
|
38
|
+
"docUrl": "https://www.oracle.com/webfolder/technetwork/jet-1710/cpwdtsdoc/classes/SelectSingleWebElement.html"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"propertyLayout": [
|
|
@@ -520,6 +520,40 @@
|
|
|
520
520
|
}
|
|
521
521
|
},
|
|
522
522
|
"slots": {
|
|
523
|
+
"collectionTemplate": {
|
|
524
|
+
"description": "The collectionTemplate slot is used to specify the template for rendering the items in the dropdown.",
|
|
525
|
+
"displayName": "collectionTemplate",
|
|
526
|
+
"help": "#collectionTemplate",
|
|
527
|
+
"maxItems": 1,
|
|
528
|
+
"preferredContent": [
|
|
529
|
+
"CTableElement"
|
|
530
|
+
],
|
|
531
|
+
"data": {
|
|
532
|
+
"data": {
|
|
533
|
+
"type": "DataProvider|null"
|
|
534
|
+
},
|
|
535
|
+
"searchText": {
|
|
536
|
+
"type": "string"
|
|
537
|
+
},
|
|
538
|
+
"currentRowOverride": {
|
|
539
|
+
"type": "object",
|
|
540
|
+
"properties": {
|
|
541
|
+
"rowKey": {
|
|
542
|
+
"type": "any"
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
"onCurrentRowChanged": {
|
|
547
|
+
"type": "function"
|
|
548
|
+
},
|
|
549
|
+
"selected": {
|
|
550
|
+
"type": "object"
|
|
551
|
+
},
|
|
552
|
+
"onRowAction": {
|
|
553
|
+
"type": "function"
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
},
|
|
523
557
|
"itemTemplate": {
|
|
524
558
|
"description": "The itemTemplate slot is used to specify the template for rendering each item in the dropdown. See the Help documentation for more information.",
|
|
525
559
|
"displayName": "itemTemplate",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/translationBundle', "@oracle/oraclejet-preact/
|
|
1
|
+
define(["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) {
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.SelectSingle = void 0;
|
|
@@ -60,7 +60,7 @@ define(["require", "exports", "preact/jsx-runtime", '@oracle/oraclejet-preact/tr
|
|
|
60
60
|
const variant = (0, UNSAFE_useFormVariantContext_1.useFormVariantContext)();
|
|
61
61
|
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 }) }) }));
|
|
62
62
|
}
|
|
63
|
-
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" }, {
|
|
63
|
+
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" }, {
|
|
64
64
|
'@oracle/oraclejet-preact': translationBundle_1.default
|
|
65
65
|
}, { consume: [UNSAFE_useFormVariantContext_1.FormVariantContext, UNSAFE_useTabbableMode_1.TabbableModeContext] });
|
|
66
66
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
define(["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/
|
|
1
|
+
define(["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) {
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.useSelectSinglePreact = void 0;
|
|
5
|
-
function useSelectSinglePreact({ advancedSearch, data
|
|
5
|
+
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) {
|
|
6
6
|
const [filterCriterion, setFilterCriterion] = (0, hooks_1.useState)(undefined);
|
|
7
|
-
const [isLoading, setIsLoading] = (0, hooks_1.useState)(
|
|
7
|
+
const [isLoading, setIsLoading] = (0, hooks_1.useState)(data != null && propValue != null && propValueItem == null);
|
|
8
8
|
const matchBy = (0, hooks_1.useMemo)(() => {
|
|
9
9
|
return propMatchBy && propMatchBy.length > 0 ? [...propMatchBy] : undefined;
|
|
10
10
|
}, [propMatchBy]);
|
|
@@ -38,7 +38,11 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
38
38
|
});
|
|
39
39
|
const { 'aria-describedby': ariaDescribedBy, messages } = textFieldProps;
|
|
40
40
|
const hasNoValue = value === null;
|
|
41
|
-
const dataProvider = (0,
|
|
41
|
+
const { dataProvider, dataState, onLoadRange } = (0, index_2.useSelectData)({
|
|
42
|
+
data,
|
|
43
|
+
filterCriterion,
|
|
44
|
+
hasCollectionTemplate: collectionTemplate !== undefined
|
|
45
|
+
});
|
|
42
46
|
const [valueToSync, setValueToSync] = (0, hooks_1.useState)(value);
|
|
43
47
|
const [valueItemToSync, setValueItemToSync] = (0, hooks_1.useState)(valueItem);
|
|
44
48
|
(0, hooks_1.useEffect)(() => {
|
|
@@ -66,10 +70,6 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
66
70
|
valueItem: valueItemToSync,
|
|
67
71
|
validateValueOnExternalChange
|
|
68
72
|
});
|
|
69
|
-
const [listDataState, onLoadRange] = (0, useListData_1.useListData)(dataProvider, {
|
|
70
|
-
filterCriterion,
|
|
71
|
-
initialRowsFetched: 0
|
|
72
|
-
});
|
|
73
73
|
const onCommit = (0, hooks_1.useCallback)(async ({ previousValue, value }) => {
|
|
74
74
|
const valueToCommit = value != null ? value : utils_2.DEFAULT_VALUE;
|
|
75
75
|
setDisplayValue(valueToCommit);
|
|
@@ -77,7 +77,7 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
77
77
|
if (validationResult === useValidators_1.ValidationResult.INVALID) {
|
|
78
78
|
setPreactValueItem(undefined);
|
|
79
79
|
}
|
|
80
|
-
else if (validationResult === useValidators_1.ValidationResult.VALID &&
|
|
80
|
+
else if (validationResult === useValidators_1.ValidationResult.VALID && dataState.status === 'success') {
|
|
81
81
|
if (value == null) {
|
|
82
82
|
onOjValueAction?.({
|
|
83
83
|
itemContext: utils_2.DEFAULT_ITEM_CONTEXT,
|
|
@@ -96,7 +96,7 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
|
-
const data =
|
|
99
|
+
const data = dataState.data.data;
|
|
100
100
|
let item = data.find((item) => item.metadata.key === value);
|
|
101
101
|
if (item === undefined) {
|
|
102
102
|
const fetchResults = await dataProvider.fetchByKeys({ keys: new Set([value]) });
|
|
@@ -116,7 +116,7 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
116
116
|
}
|
|
117
117
|
}, [
|
|
118
118
|
dataProvider,
|
|
119
|
-
|
|
119
|
+
dataState,
|
|
120
120
|
preactValueItem,
|
|
121
121
|
valueItem,
|
|
122
122
|
onCommitValue,
|
|
@@ -127,17 +127,48 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
127
127
|
const fc = (0, utils_2.getFilterCriterion)(dataProvider, searchText, matchBy);
|
|
128
128
|
setFilterCriterion(fc);
|
|
129
129
|
}, [dataProvider, matchBy]);
|
|
130
|
-
const itemRenderer = (0, hooks_1.
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
const itemRenderer = (0, hooks_1.useMemo)(() => {
|
|
131
|
+
if (!itemTemplate)
|
|
132
|
+
return undefined;
|
|
133
|
+
return ({ data, metadata, searchText }) => {
|
|
134
|
+
return itemTemplate({
|
|
133
135
|
item: {
|
|
134
136
|
data: data,
|
|
135
137
|
metadata: metadata
|
|
136
138
|
},
|
|
137
139
|
searchText
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
+
});
|
|
141
|
+
};
|
|
140
142
|
}, [itemTemplate]);
|
|
143
|
+
const stableCollectionTemplateContextRef = (0, hooks_1.useRef)();
|
|
144
|
+
const cache = (0, index_1.useCache)();
|
|
145
|
+
const collectionRenderer = (0, hooks_1.useMemo)(() => {
|
|
146
|
+
if (!collectionTemplate)
|
|
147
|
+
return undefined;
|
|
148
|
+
return ({ currentRowKeyOverride, searchText, selected, onPersistCurrentRowKey, onRowAction }) => {
|
|
149
|
+
const newCollectionTemplateContext = {
|
|
150
|
+
currentRowOverride: cache('currentRowOverride', currentRowKeyOverride ? { rowKey: currentRowKeyOverride } : undefined, [currentRowKeyOverride, searchText]),
|
|
151
|
+
data: dataProvider,
|
|
152
|
+
onCurrentRowChanged: cache('onCurrentRowChanged', ({ rowKey }) => {
|
|
153
|
+
onPersistCurrentRowKey({ value: rowKey });
|
|
154
|
+
}, [onPersistCurrentRowKey]),
|
|
155
|
+
onRowAction: cache('onRowAction', ({ item }) => {
|
|
156
|
+
onRowAction({
|
|
157
|
+
context: { data: item.data, key: item.metadata.key, metadata: item.metadata }
|
|
158
|
+
});
|
|
159
|
+
}, [onRowAction]),
|
|
160
|
+
searchText,
|
|
161
|
+
selected: cache('selected', new ojkeyset_1.KeySetImpl([...(selected?.values() ?? [])]), [selected])
|
|
162
|
+
};
|
|
163
|
+
if (!stableCollectionTemplateContextRef.current) {
|
|
164
|
+
stableCollectionTemplateContextRef.current = newCollectionTemplateContext;
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
Object.assign(stableCollectionTemplateContextRef.current, newCollectionTemplateContext);
|
|
168
|
+
}
|
|
169
|
+
return collectionTemplate(stableCollectionTemplateContextRef.current);
|
|
170
|
+
};
|
|
171
|
+
}, [cache, collectionTemplate, dataProvider]);
|
|
141
172
|
const _selectItemByValue = (0, hooks_1.useCallback)(async (value) => {
|
|
142
173
|
return onCommit({
|
|
143
174
|
value: value ?? undefined,
|
|
@@ -155,13 +186,14 @@ define(["require", "exports", "@oracle/oraclejet-preact/hooks/UNSAFE_useTranslat
|
|
|
155
186
|
selectSingleProps: {
|
|
156
187
|
advancedSearch,
|
|
157
188
|
'aria-describedby': ariaDescribedBy,
|
|
158
|
-
|
|
189
|
+
collectionRenderer,
|
|
190
|
+
data: dataState.status !== 'error' ? dataState.data : null,
|
|
159
191
|
isDisabled: disabled,
|
|
160
192
|
isLoading,
|
|
161
193
|
isReadonly: readonly,
|
|
162
194
|
isRequired: required,
|
|
163
195
|
isRequiredShown: required && (userAssistanceDensity === 'compact' || hasNoValue),
|
|
164
|
-
itemRenderer
|
|
196
|
+
itemRenderer,
|
|
165
197
|
itemText,
|
|
166
198
|
label: labelHint,
|
|
167
199
|
labelEdge,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "selection-card",
|
|
3
|
-
"version": "17.0
|
|
4
|
-
"jetVersion": "^17.0
|
|
3
|
+
"version": "17.1.0",
|
|
4
|
+
"jetVersion": "^17.1.0",
|
|
5
5
|
"pack": "oj-c",
|
|
6
6
|
"type": "composite",
|
|
7
7
|
"dependencyScope": "runtime",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"minColumns": "1"
|
|
34
34
|
},
|
|
35
35
|
"webelement": {
|
|
36
|
-
"docUrl": "https://www.oracle.com/webfolder/technetwork/jet-
|
|
36
|
+
"docUrl": "https://www.oracle.com/webfolder/technetwork/jet-1710/cpwdtsdoc/classes/SelectionCardWebElement.html"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"since": "16.0.0",
|