@oracle/oraclejet-core-pack 18.0.3 → 18.0.5
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/InputDateText.json +43 -43
- package/oj-c/action-card/component.json +2 -2
- package/oj-c/area-chart/component.json +2 -2
- 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 +2 -2
- package/oj-c/button/component.json +2 -2
- package/oj-c/buttonset-multiple/component.json +2 -2
- package/oj-c/buttonset-single/component.json +2 -2
- package/oj-c/card-view/component.json +2 -2
- package/oj-c/checkbox/component.json +2 -2
- package/oj-c/checkboxset/component.json +2 -2
- package/oj-c/collapsible/component.json +2 -2
- package/oj-c/component.json +3 -3
- package/oj-c/conveyor-belt/component.json +2 -2
- package/oj-c/corepackbundle.js +22 -9
- package/oj-c/date-picker/component.json +2 -2
- package/oj-c/dialog/component.json +2 -2
- package/oj-c/drag-handle/component.json +2 -2
- package/oj-c/drawer-layout/component.json +2 -2
- package/oj-c/drawer-popup/component.json +2 -2
- package/oj-c/file-picker/component.json +2 -2
- package/oj-c/form-layout/component.json +2 -2
- package/oj-c/highlight-text/component.json +2 -2
- package/oj-c/hooks/UNSAFE_useEditableValue/useEditableValue.js +1 -3
- package/oj-c/input-date-mask/component.json +2 -2
- package/oj-c/input-date-picker/component.json +2 -2
- package/oj-c/input-date-text/component.json +2 -2
- package/oj-c/input-month-mask/component.json +2 -2
- package/oj-c/input-number/component.json +2 -2
- package/oj-c/input-password/component.json +2 -2
- package/oj-c/input-sensitive-text/component.json +2 -2
- package/oj-c/input-text/component.json +2 -2
- package/oj-c/labelled-link/component.json +2 -2
- package/oj-c/legend/component.json +2 -2
- package/oj-c/legend-item/component.json +2 -2
- package/oj-c/legend-section/component.json +2 -2
- package/oj-c/line-chart/component.json +2 -2
- 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/component.json +2 -2
- package/oj-c/list-view/component.json +2 -2
- package/oj-c/menu-button/component.json +2 -2
- package/oj-c/message-banner/component.json +2 -2
- package/oj-c/message-toast/component.json +2 -2
- package/oj-c/metadata/allComponents.json +133 -133
- package/oj-c/meter-bar/component.json +2 -2
- package/oj-c/meter-circle/component.json +2 -2
- 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.js +1 -1
- package/oj-c/min/corepackbundle.js.map +1 -1
- package/oj-c/min/hooks/UNSAFE_useEditableValue/useEditableValue.js +1 -3
- 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/radioset.js +1 -1
- package/oj-c/min/radioset.js.map +1 -1
- package/oj-c/min/select-common/UNSAFE_useDataProviderListeners/useDataProviderListeners.js +6 -1
- 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/text-area.js +1 -1
- package/oj-c/min/text-area.js.map +1 -1
- package/oj-c/popup/component.json +2 -2
- package/oj-c/progress-bar/component.json +2 -2
- package/oj-c/progress-button/component.json +2 -2
- package/oj-c/progress-circle/component.json +2 -2
- package/oj-c/radioset/component.json +2 -2
- package/oj-c/rating-gauge/component.json +2 -2
- package/oj-c/select-common/UNSAFE_useDataProviderListeners/useDataProviderListeners.js +6 -1
- package/oj-c/select-multiple/component.json +2 -2
- package/oj-c/select-single/component.json +2 -2
- package/oj-c/select-single/useSelectSinglePreact.js +11 -1
- package/oj-c/select-single/useSyncValueAndValueItem.js +4 -4
- package/oj-c/selection-card/component.json +2 -2
- package/oj-c/selector/component.json +2 -2
- package/oj-c/selector-all/component.json +2 -2
- package/oj-c/skeleton/component.json +2 -2
- package/oj-c/split-menu-button/component.json +2 -2
- package/oj-c/tab-bar/component.json +2 -2
- package/oj-c/tab-bar-mixed/component.json +2 -2
- package/oj-c/table/component.json +2 -2
- package/oj-c/tag-cloud/component.json +2 -2
- package/oj-c/tag-cloud-item/component.json +2 -2
- package/oj-c/text-area/component.json +2 -2
- package/oj-c/toggle-button/component.json +2 -2
- package/oj-c/toolbar/component.json +2 -2
- package/oj-c/types/select-single/useSyncValueAndValueItem.d.ts +4 -1
- package/package.json +4 -4
package/oj-c/corepackbundle.js
CHANGED
|
@@ -2200,8 +2200,6 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
2200
2200
|
}
|
|
2201
2201
|
if (initialRender.current) {
|
|
2202
2202
|
initialRender.current = false;
|
|
2203
|
-
}
|
|
2204
|
-
(0, hooks_1.useEffect)(() => {
|
|
2205
2203
|
_dispatch(reducer_1.updatePreviousValue, value);
|
|
2206
2204
|
_dispatch(reducer_1.updatePreviousConverter, converter);
|
|
2207
2205
|
_dispatch(reducer_1.updatePreviousValidators, validators);
|
|
@@ -2223,7 +2221,7 @@ define('oj-c/hooks/UNSAFE_useEditableValue/useEditableValue',["require", "export
|
|
|
2223
2221
|
_dispatch(reducer_1.updateValidStatus, 'valid');
|
|
2224
2222
|
refreshDisplayValue(value);
|
|
2225
2223
|
}
|
|
2226
|
-
}
|
|
2224
|
+
}
|
|
2227
2225
|
return {
|
|
2228
2226
|
value: state.value,
|
|
2229
2227
|
displayValue: state.displayValue,
|
|
@@ -5898,12 +5896,17 @@ define('oj-c/select-common/UNSAFE_useDataProviderListeners/useDataProviderListen
|
|
|
5898
5896
|
function cloneValueItem(valueItem) {
|
|
5899
5897
|
return valueItem instanceof Map ? new Map(valueItem.entries()) : Object.assign({}, valueItem);
|
|
5900
5898
|
}
|
|
5899
|
+
function isItemContext(value) {
|
|
5900
|
+
if (value == null)
|
|
5901
|
+
return false;
|
|
5902
|
+
return typeof value === 'object' && ['key', 'data'].every((prop) => prop in value);
|
|
5903
|
+
}
|
|
5901
5904
|
function compareValues(value, valueToCompare) {
|
|
5902
5905
|
if ((value instanceof Set && valueToCompare instanceof Set) ||
|
|
5903
5906
|
(value instanceof Map && valueToCompare instanceof Map)) {
|
|
5904
5907
|
return value.size === valueToCompare.size;
|
|
5905
5908
|
}
|
|
5906
|
-
if (
|
|
5909
|
+
if (isItemContext(value) && isItemContext(valueToCompare)) {
|
|
5907
5910
|
return value.key === valueToCompare.key;
|
|
5908
5911
|
}
|
|
5909
5912
|
return value === valueToCompare;
|
|
@@ -6547,7 +6550,7 @@ define('oj-c/select-single/useSyncValueAndValueItem',["require", "exports", "@or
|
|
|
6547
6550
|
}
|
|
6548
6551
|
return;
|
|
6549
6552
|
}
|
|
6550
|
-
if (value != null && valueItem != null && valueItem.key === value) {
|
|
6553
|
+
if (value != null && valueItem != null && valueItem.key === value.value) {
|
|
6551
6554
|
setValueItem(Object.assign({}, valueItem));
|
|
6552
6555
|
return;
|
|
6553
6556
|
}
|
|
@@ -6558,9 +6561,9 @@ define('oj-c/select-single/useSyncValueAndValueItem',["require", "exports", "@or
|
|
|
6558
6561
|
const resolveBusyState = addBusyState('useSyncValueItem: calling fetchByKeys');
|
|
6559
6562
|
const { isStale } = setStaleIdentity('useSyncValueItem:fetchByKeys');
|
|
6560
6563
|
try {
|
|
6561
|
-
const fetchResults = await dataProvider.fetchByKeys({ keys: new Set([value]) });
|
|
6564
|
+
const fetchResults = await dataProvider.fetchByKeys({ keys: new Set([value.value]) });
|
|
6562
6565
|
if (!isStale()) {
|
|
6563
|
-
const newValueItems = handleFetchByKeysResults(value, valueItem, fetchResults.results);
|
|
6566
|
+
const newValueItems = handleFetchByKeysResults(value.value, valueItem, fetchResults.results);
|
|
6564
6567
|
setValueItem(newValueItems);
|
|
6565
6568
|
}
|
|
6566
6569
|
}
|
|
@@ -6598,7 +6601,7 @@ define('oj-c/select-single/useSyncValueAndValueItem',["require", "exports", "@or
|
|
|
6598
6601
|
}
|
|
6599
6602
|
return;
|
|
6600
6603
|
}
|
|
6601
|
-
if (valueItem.key !== value) {
|
|
6604
|
+
if (valueItem.key !== value?.value) {
|
|
6602
6605
|
updateValue(valueItem.key);
|
|
6603
6606
|
return;
|
|
6604
6607
|
}
|
|
@@ -6721,7 +6724,17 @@ define('oj-c/select-single/useSelectSinglePreact',["require", "exports", "@oracl
|
|
|
6721
6724
|
filterCriterion,
|
|
6722
6725
|
hasCollectionTemplate: collectionTemplate !== undefined
|
|
6723
6726
|
});
|
|
6724
|
-
const [valueToSync,
|
|
6727
|
+
const [valueToSync, _setValueToSync] = (0, hooks_1.useState)(value != null ? { value } : value);
|
|
6728
|
+
const setValueToSync = (0, hooks_1.useCallback)((value) => {
|
|
6729
|
+
if (typeof value === 'function') {
|
|
6730
|
+
_setValueToSync((prevValue) => {
|
|
6731
|
+
const newValue = value(prevValue?.value);
|
|
6732
|
+
return newValue != null ? { value: newValue } : newValue;
|
|
6733
|
+
});
|
|
6734
|
+
return;
|
|
6735
|
+
}
|
|
6736
|
+
_setValueToSync(value != null ? { value } : value);
|
|
6737
|
+
}, []);
|
|
6725
6738
|
const [valueItemToSync, setValueItemToSync] = (0, hooks_1.useState)(valueItem);
|
|
6726
6739
|
(0, hooks_1.useEffect)(() => {
|
|
6727
6740
|
setValueToSync(value);
|
|
@@ -342,8 +342,6 @@ define(["require", "exports", "preact/hooks", "./converterUtils", "./utils", "oj
|
|
|
342
342
|
}
|
|
343
343
|
if (initialRender.current) {
|
|
344
344
|
initialRender.current = false;
|
|
345
|
-
}
|
|
346
|
-
(0, hooks_1.useEffect)(() => {
|
|
347
345
|
_dispatch(reducer_1.updatePreviousValue, value);
|
|
348
346
|
_dispatch(reducer_1.updatePreviousConverter, converter);
|
|
349
347
|
_dispatch(reducer_1.updatePreviousValidators, validators);
|
|
@@ -365,7 +363,7 @@ define(["require", "exports", "preact/hooks", "./converterUtils", "./utils", "oj
|
|
|
365
363
|
_dispatch(reducer_1.updateValidStatus, 'valid');
|
|
366
364
|
refreshDisplayValue(value);
|
|
367
365
|
}
|
|
368
|
-
}
|
|
366
|
+
}
|
|
369
367
|
return {
|
|
370
368
|
value: state.value,
|
|
371
369
|
displayValue: state.displayValue,
|