@oliasoft-open-source/react-ui-library 4.6.18 → 4.6.19

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.
Files changed (33) hide show
  1. package/dist/index.d.ts +3 -3
  2. package/dist/index.js +8 -5
  3. package/dist/index.js.map +1 -1
  4. package/dist/storybook/assets/{Color-6VNJS4EI-xbGhw5Tj.js → Color-6VNJS4EI-EH5Xrbg-.js} +1 -1
  5. package/dist/storybook/assets/{DocsRenderer-NNNQARDV-sAPbui3t.js → DocsRenderer-NNNQARDV-w3YEbTBQ.js} +1 -1
  6. package/dist/storybook/assets/{WithTooltip-V3YHNWJZ-gwFLosBp.js → WithTooltip-V3YHNWJZ-WCnfALaj.js} +1 -1
  7. package/dist/storybook/assets/{buttons-and-links-kUTQnA6P.js → buttons-and-links-jk0YaWjE.js} +1 -1
  8. package/dist/storybook/assets/{chunk-HLWAVYOI-IUW2ushY.js → chunk-HLWAVYOI-GWlvwLVD.js} +1 -1
  9. package/dist/storybook/assets/{color-T7GIoOH6.js → color-ROlDYjjo.js} +1 -1
  10. package/dist/storybook/assets/file-button.stories-XxMjOBfe.js +10 -0
  11. package/dist/storybook/assets/file-input-A0eGNEgX.js +1 -0
  12. package/dist/storybook/assets/{file-input.stories-2-2uTWvd.js → file-input.stories-dM7UFPVo.js} +1 -1
  13. package/dist/storybook/assets/{formatter-SWP5E3XI-GzRPFG7m.js → formatter-SWP5E3XI-eHGgpqqT.js} +1 -1
  14. package/dist/storybook/assets/{iframe-NjfSsybe.js → iframe-tZj2-qfe.js} +2 -2
  15. package/dist/storybook/assets/{index-wKW2GPrE.js → index-M219kuX1.js} +5 -5
  16. package/dist/storybook/assets/{input-validation-U4HJ5Ucw.js → input-validation-bs_xBFDH.js} +1 -1
  17. package/dist/storybook/assets/{inputs-S04nRGW2.js → inputs-cROoah8Z.js} +1 -1
  18. package/dist/storybook/assets/{layout-forms-a8CnPDfT.js → layout-forms-m9t0SIeq.js} +1 -1
  19. package/dist/storybook/assets/{layout-general-Khl-lgRH.js → layout-general-uBhsJ21C.js} +1 -1
  20. package/dist/storybook/assets/{padding-and-spacing-ckWSgL0y.js → padding-and-spacing-HlurZNUe.js} +1 -1
  21. package/dist/storybook/assets/{preview-eOJx8ySI.js → preview-8SjWr4K7.js} +1 -1
  22. package/dist/storybook/assets/{preview-YmO-dFt7.js → preview-xM6F3nZH.js} +2 -2
  23. package/dist/storybook/assets/{smart-upload-modal.stories-VCP3yghQ.js → smart-upload-modal.stories-B_UctN3V.js} +1 -1
  24. package/dist/storybook/assets/{syntaxhighlighter-B5GMVT5T-J83QFJ3_.js → syntaxhighlighter-B5GMVT5T-AOc_mapr.js} +1 -1
  25. package/dist/storybook/assets/unit-input.stories-vyth5NA2.js +284 -0
  26. package/dist/storybook/iframe.html +1 -1
  27. package/dist/storybook/index.json +1 -1
  28. package/dist/storybook/project.json +1 -1
  29. package/dist/storybook/stories.json +1 -1
  30. package/package.json +1 -1
  31. package/dist/storybook/assets/file-button.stories-z0vvWcvN.js +0 -10
  32. package/dist/storybook/assets/file-input-H1V5DMV-.js +0 -1
  33. package/dist/storybook/assets/unit-input.stories-QoJkzTRA.js +0 -273
package/dist/index.d.ts CHANGED
@@ -313,7 +313,7 @@ export declare enum IconType {
313
313
 
314
314
  declare interface ICustomChangeEvent {
315
315
  target: {
316
- value: string;
316
+ value?: string;
317
317
  name: string;
318
318
  predefinedSelected?: boolean;
319
319
  predefinedOption?: IPredefinedOption;
@@ -1043,7 +1043,7 @@ export declare interface IPortalProps {
1043
1043
  }
1044
1044
 
1045
1045
  declare interface IPredefinedOption {
1046
- value: string;
1046
+ value?: string;
1047
1047
  label: string;
1048
1048
  valueKey?: string;
1049
1049
  }
@@ -1574,7 +1574,7 @@ export declare interface IUnitInputProps {
1574
1574
  doNotConvertValue?: boolean;
1575
1575
  testId?: string;
1576
1576
  warning?: string | null;
1577
- predefinedOptions?: IPredefinedOption[];
1577
+ predefinedOptions?: IPredefinedOption[] | null;
1578
1578
  initialPredefinedOption?: boolean;
1579
1579
  shouldLinkAutomaticly?: boolean;
1580
1580
  selectedPredefinedOptionKey?: string;
package/dist/index.js CHANGED
@@ -70500,14 +70500,16 @@ const UnitInput = ({
70500
70500
  );
70501
70501
  const isAutoValue = propValue === "" && autoValue;
70502
70502
  const foundPredefinedMenuOption = predefinedOptions && predefinedOptions.find((el2) => {
70503
+ if (!(el2 == null ? void 0 : el2.value))
70504
+ return;
70503
70505
  if (selectedPredefinedOptionKey) {
70504
70506
  return selectedPredefinedOptionKey === el2.valueKey;
70505
70507
  }
70506
- const predefinedMenuItemUnit = isValueWithUnit(el2.value) ? getUnit(el2.value) : "";
70508
+ const predefinedMenuItemUnit = isValueWithUnit(el2 == null ? void 0 : el2.value) ? getUnit(el2 == null ? void 0 : el2.value) : "";
70507
70509
  return withUnit(
70508
70510
  convertUnit(value, predefinedMenuItemUnit),
70509
70511
  predefinedMenuItemUnit
70510
- ) === el2.value;
70512
+ ) === (el2 == null ? void 0 : el2.value);
70511
70513
  });
70512
70514
  const getAlternativeUnits = () => {
70513
70515
  if (unitkey) {
@@ -70614,7 +70616,8 @@ const UnitInput = ({
70614
70616
  const stringName = getStringName(name2);
70615
70617
  let sectionsPredefinedMenu;
70616
70618
  const createPredefinedOption = (el2) => {
70617
- const [value2, unit2 = ""] = isValueWithUnit(el2.value) ? split$1(el2.value) : [el2.value];
70619
+ const elementValue = (el2 == null ? void 0 : el2.value) ? el2.value : "";
70620
+ const [value2 = "", unit2 = ""] = isValueWithUnit(elementValue) ? split$1(elementValue) : [elementValue];
70618
70621
  return {
70619
70622
  type: MenuType.OPTION,
70620
70623
  inline: true,
@@ -70624,7 +70627,7 @@ const UnitInput = ({
70624
70627
  setPredefinedOptionsMenuState(PredefinedOptionsMenuState.PREDEFINED);
70625
70628
  onChange({
70626
70629
  target: {
70627
- value: el2.value,
70630
+ value: elementValue,
70628
70631
  name: typeof name2 === "string" ? name2 : (name2 == null ? void 0 : name2.fieldName) || "",
70629
70632
  predefinedSelected: true,
70630
70633
  predefinedOption: el2
@@ -70636,7 +70639,7 @@ const UnitInput = ({
70636
70639
  /* @__PURE__ */ jsx(Text, { children: el2.label }),
70637
70640
  /* @__PURE__ */ jsx(Spacer, { width: "20px", height: "0" })
70638
70641
  ] }),
70639
- description: isValueWithUnit(el2.value) ? `${value2} ${unit2}` : el2.value,
70642
+ description: isValueWithUnit(elementValue) ? `${value2} ${unit2}` : elementValue,
70640
70643
  selected: foundPredefinedMenuOption === el2 && predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED
70641
70644
  };
70642
70645
  };