@oliasoft-open-source/react-ui-library 4.6.15 → 4.6.16
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/dist/index.d.ts +5 -0
- package/dist/index.js +23 -5
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-6VNJS4EI--MtBZKKT.js → Color-6VNJS4EI-YEDm9gbz.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-NNNQARDV-zWIDUW8s.js → DocsRenderer-NNNQARDV-NmCW-oyQ.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-V3YHNWJZ-12HSM2HQ.js → WithTooltip-V3YHNWJZ-3DZ-8kE7.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-TsMdBhhr.js → accordion.stories-lXs4IRds.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-EBr5j6Pb.js → buttons-and-links-2FBaBkFc.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-cbxQQ8QL.js → casing-loads.stories-g4yBGv5b.js} +1 -1
- package/dist/storybook/assets/{cell.stories-S6RxEUZs.js → cell.stories-sVyam_bx.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-olKL1DOp.js → chunk-HLWAVYOI-tHzaOxem.js} +1 -1
- package/dist/storybook/assets/{color-cEIYsWoC.js → color-7OzxGyA_.js} +1 -1
- package/dist/storybook/assets/{footer.stories-C10mdMff.js → footer.stories-ZEZ_We0f.js} +1 -1
- package/dist/storybook/assets/{formation.stories-SDrsEBR-.js → formation.stories-062BdtdZ.js} +1 -1
- package/dist/storybook/assets/{formatter-SWP5E3XI-lcnUpu9o.js → formatter-SWP5E3XI-_Igw7BUr.js} +1 -1
- package/dist/storybook/assets/{iframe-tFrL7OgV.js → iframe-CpYMK6kb.js} +2 -2
- package/dist/storybook/assets/{index-i7J9GoJM.js → index-K-0S6d15.js} +5 -5
- package/dist/storybook/assets/{input-validation-PXF1N2vm.js → input-validation-gD2VptJq.js} +1 -1
- package/dist/storybook/assets/{inputs-WqrsreQN.js → inputs-xtYro1Lt.js} +1 -1
- package/dist/storybook/assets/{layout-forms-5QbjGxm5.js → layout-forms-NhJIOV9y.js} +1 -1
- package/dist/storybook/assets/{layout-general-6o2l_EdT.js → layout-general-wuAEAmS1.js} +1 -1
- package/dist/storybook/assets/{modal.stories-PLF80IYZ.js → modal.stories-aZGhb1Cl.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-A6N16ujc.js → padding-and-spacing-h7UETkPK.js} +1 -1
- package/dist/storybook/assets/{pop-confirm.stories-GmXpbAIC.js → pop-confirm.stories-6V_XrhKa.js} +1 -1
- package/dist/storybook/assets/popover-N9B8JT3G.js +1 -0
- package/dist/storybook/assets/popover.stories-goIrT_jy.js +10 -0
- package/dist/storybook/assets/{preview-jFWbYQuo.js → preview-T-saggOw.js} +1 -1
- package/dist/storybook/assets/{preview-xqKimQkP.js → preview-f-BBQod4.js} +2 -2
- package/dist/storybook/assets/{row.stories-JJLYUXaO.js → row.stories-ZibxnXR9.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-B5GMVT5T-MZJdrJvC.js → syntaxhighlighter-B5GMVT5T-d9li6xQn.js} +1 -1
- package/dist/storybook/assets/{table-38J6JCSb.js → table-kSTipYE0.js} +1 -1
- package/dist/storybook/assets/{table.stories-Sbzi__am.js → table.stories-zdRM5AV8.js} +1 -1
- package/dist/storybook/assets/{title.stories-qvk0Or3W.js → title.stories-tcfNoA6z.js} +1 -1
- package/dist/storybook/assets/{unit-table.stories-0Wv_gCzq.js → unit-table.stories-9k8rllRh.js} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/stories.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/popover-Ioxe80BK.js +0 -1
- package/dist/storybook/assets/popover.stories-NbC7Zba8.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1536,6 +1536,11 @@ export declare interface ITreeProps {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
|
|
1538
1538
|
declare interface IUnitConfigItem {
|
|
1539
|
+
onChange?: (params: {
|
|
1540
|
+
oldUnit: string;
|
|
1541
|
+
newUnit: string;
|
|
1542
|
+
unitKey: string;
|
|
1543
|
+
}) => void;
|
|
1539
1544
|
unitKey: string;
|
|
1540
1545
|
storageUnit: string;
|
|
1541
1546
|
preferredUnit: string;
|
package/dist/index.js
CHANGED
|
@@ -70812,10 +70812,22 @@ const UnitTable = ({
|
|
|
70812
70812
|
const onChangeUnit = ({
|
|
70813
70813
|
unitKey,
|
|
70814
70814
|
value
|
|
70815
|
-
}) =>
|
|
70816
|
-
|
|
70817
|
-
|
|
70818
|
-
|
|
70815
|
+
}) => {
|
|
70816
|
+
setSelectedUnits({
|
|
70817
|
+
...selectedUnits,
|
|
70818
|
+
[unitKey]: value
|
|
70819
|
+
});
|
|
70820
|
+
const specificUnitConfiguration = unitConfig.find(
|
|
70821
|
+
(configuration) => configuration.unitKey === unitKey
|
|
70822
|
+
);
|
|
70823
|
+
if (specificUnitConfiguration && typeof specificUnitConfiguration.onChange === "function") {
|
|
70824
|
+
specificUnitConfiguration.onChange({
|
|
70825
|
+
oldUnit: selectedUnits[unitKey],
|
|
70826
|
+
newUnit: value,
|
|
70827
|
+
unitKey
|
|
70828
|
+
});
|
|
70829
|
+
}
|
|
70830
|
+
};
|
|
70819
70831
|
const convertViewData = (selectedUnits2) => convertVisibleRows({
|
|
70820
70832
|
headers,
|
|
70821
70833
|
rows,
|
|
@@ -70831,7 +70843,13 @@ const UnitTable = ({
|
|
|
70831
70843
|
useEffect(() => {
|
|
70832
70844
|
const templateChanged = !isEqual$4(preferredUnits, previousPreferredUnits);
|
|
70833
70845
|
if (templateChanged) {
|
|
70834
|
-
|
|
70846
|
+
Object.keys(preferredUnits).forEach((unitKey) => {
|
|
70847
|
+
const oldUnit = previousPreferredUnits == null ? void 0 : previousPreferredUnits[unitKey];
|
|
70848
|
+
const newUnit = preferredUnits[unitKey];
|
|
70849
|
+
if (oldUnit !== newUnit) {
|
|
70850
|
+
onChangeUnit({ unitKey, value: newUnit });
|
|
70851
|
+
}
|
|
70852
|
+
});
|
|
70835
70853
|
setViewData(convertViewData(preferredUnits));
|
|
70836
70854
|
}
|
|
70837
70855
|
}, [unitConfig]);
|