@oliasoft-open-source/react-ui-library 3.11.0-beta-11 → 3.11.0-beta-12

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.js CHANGED
@@ -59488,107 +59488,95 @@ const getHeaderAlignment = (alignments, isHeader, rowIndex) => {
59488
59488
  };
59489
59489
  const NumberInputCell = (props) => {
59490
59490
  const { cell: cell2, testId } = props;
59491
- return /* @__PURE__ */ jsxRuntime.exports.jsx("div", {
59492
- className: styles$7.inputWrapper,
59493
- children: /* @__PURE__ */ jsxRuntime.exports.jsx(NumberInput, {
59494
- name: cell2.name,
59495
- value: cell2.value,
59496
- onChange: (ev) => cell2.onChange(ev),
59497
- placeholder: cell2.placeholder,
59498
- error: cell2.error,
59499
- warning: cell2.warning,
59500
- disabled: cell2.disabled,
59501
- isInTable: true,
59502
- left: cell2.left,
59503
- testId,
59504
- tabIndex: cell2.disabled ? -1 : 0,
59505
- tooltip: cell2.tooltip,
59506
- validationCallback: cell2.validationCallback,
59507
- allowEmpty: cell2.allowEmpty
59508
- })
59491
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(NumberInput, {
59492
+ name: cell2.name,
59493
+ value: cell2.value,
59494
+ onChange: (ev) => cell2.onChange(ev),
59495
+ placeholder: cell2.placeholder,
59496
+ error: cell2.error,
59497
+ warning: cell2.warning,
59498
+ disabled: cell2.disabled,
59499
+ isInTable: true,
59500
+ left: cell2.left,
59501
+ testId,
59502
+ tabIndex: cell2.disabled ? -1 : 0,
59503
+ tooltip: cell2.tooltip,
59504
+ validationCallback: cell2.validationCallback,
59505
+ allowEmpty: cell2.allowEmpty
59509
59506
  });
59510
59507
  };
59511
59508
  const InputCell = (props) => {
59512
59509
  const { cell: cell2, columnAlignment, testId } = props;
59513
- return /* @__PURE__ */ jsxRuntime.exports.jsx("div", {
59514
- className: styles$7.inputWrapper,
59515
- children: /* @__PURE__ */ jsxRuntime.exports.jsx(Input$1, {
59516
- name: cell2.name,
59517
- value: cell2.value,
59518
- onChange: (ev) => cell2.onChange(ev),
59519
- placeholder: cell2.placeholder,
59520
- error: cell2.error,
59521
- warning: cell2.warning,
59522
- disabled: cell2.disabled,
59523
- isInTable: true,
59524
- maxTooltipWidth: cell2.maxTooltipWidth,
59525
- right: columnAlignment === "right",
59526
- testId,
59527
- tabIndex: cell2.disabled ? -1 : 0,
59528
- tooltip: cell2.tooltip
59529
- })
59510
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(Input$1, {
59511
+ name: cell2.name,
59512
+ value: cell2.value,
59513
+ onChange: (ev) => cell2.onChange(ev),
59514
+ placeholder: cell2.placeholder,
59515
+ error: cell2.error,
59516
+ warning: cell2.warning,
59517
+ disabled: cell2.disabled,
59518
+ isInTable: true,
59519
+ maxTooltipWidth: cell2.maxTooltipWidth,
59520
+ right: columnAlignment === "right",
59521
+ testId,
59522
+ tabIndex: cell2.disabled ? -1 : 0,
59523
+ tooltip: cell2.tooltip
59530
59524
  });
59531
59525
  };
59532
59526
  const SelectCell = (props) => {
59533
59527
  const { cell: cell2, columnAlignment, testId } = props;
59534
- return /* @__PURE__ */ jsxRuntime.exports.jsx("div", {
59535
- className: styles$7.inputWrapper,
59536
- children: /* @__PURE__ */ jsxRuntime.exports.jsx(Select, {
59537
- name: cell2.name,
59538
- borderRadius: 0,
59539
- menu: cell2.menu,
59540
- options: cell2.options,
59541
- onChange: (ev) => cell2.onChange(ev),
59542
- onCreate: cell2.onCreate ? (ev) => cell2.onCreate(ev) : void 0,
59543
- error: cell2.error,
59544
- warning: cell2.warning,
59545
- disabled: cell2.disabled,
59546
- placeholder: cell2.placeholder,
59547
- isInTable: true,
59548
- value: cell2.value,
59549
- native: cell2.native,
59550
- clearable: cell2.clearable,
59551
- searchable: cell2.searchable,
59552
- deprecatedEventHandler: cell2.deprecatedEventHandler,
59553
- maxTooltipWidth: cell2.maxTooltipWidth,
59554
- width: "100%",
59555
- autoLayerWidth: cell2.autoLayerWidth,
59556
- right: columnAlignment === "right",
59557
- testId,
59558
- tabIndex: cell2.disabled ? -1 : 0
59559
- })
59528
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(Select, {
59529
+ name: cell2.name,
59530
+ borderRadius: 0,
59531
+ menu: cell2.menu,
59532
+ options: cell2.options,
59533
+ onChange: (ev) => cell2.onChange(ev),
59534
+ onCreate: cell2.onCreate ? (ev) => cell2.onCreate(ev) : void 0,
59535
+ error: cell2.error,
59536
+ warning: cell2.warning,
59537
+ disabled: cell2.disabled,
59538
+ placeholder: cell2.placeholder,
59539
+ isInTable: true,
59540
+ value: cell2.value,
59541
+ native: cell2.native,
59542
+ clearable: cell2.clearable,
59543
+ searchable: cell2.searchable,
59544
+ deprecatedEventHandler: cell2.deprecatedEventHandler,
59545
+ maxTooltipWidth: cell2.maxTooltipWidth,
59546
+ width: "100%",
59547
+ autoLayerWidth: cell2.autoLayerWidth,
59548
+ right: columnAlignment === "right",
59549
+ testId,
59550
+ tabIndex: cell2.disabled ? -1 : 0
59560
59551
  });
59561
59552
  };
59562
59553
  const LinkCell = (props) => {
59563
59554
  const disabledContext = useContext(DisabledContext);
59564
59555
  const { cell: cell2, testId } = props;
59565
59556
  const { error: error2, warning: warning2, tooltip: tooltip2, maxTooltipWidth } = cell2;
59566
- return /* @__PURE__ */ jsxRuntime.exports.jsx("div", {
59567
- className: styles$7.inputWrapper,
59568
- children: /* @__PURE__ */ jsxRuntime.exports.jsx(Tooltip, {
59569
- error: !!error2,
59570
- warning: !!warning2,
59571
- text: tooltip2 || error2 || warning2,
59572
- enabled: tooltip2 && isStringNumberOrNode(tooltip2) || error2 && isStringNumberOrNode(error2) || warning2 && isStringNumberOrNode(warning2) || false,
59573
- maxWidth: maxTooltipWidth,
59574
- placement: "bottom-center",
59575
- children: /* @__PURE__ */ jsxRuntime.exports.jsx("div", {
59557
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(Tooltip, {
59558
+ error: !!error2,
59559
+ warning: !!warning2,
59560
+ text: tooltip2 || error2 || warning2,
59561
+ enabled: tooltip2 && isStringNumberOrNode(tooltip2) || error2 && isStringNumberOrNode(error2) || warning2 && isStringNumberOrNode(warning2) || false,
59562
+ maxWidth: maxTooltipWidth,
59563
+ placement: "bottom-center",
59564
+ children: /* @__PURE__ */ jsxRuntime.exports.jsx("div", {
59565
+ className: cx$2(
59566
+ styles$7.staticCellContent,
59567
+ error2 ? styles$7.error : warning2 ? styles$7.warning : ""
59568
+ ),
59569
+ children: /* @__PURE__ */ jsxRuntime.exports.jsx("a", {
59576
59570
  className: cx$2(
59577
- styles$7.staticCellContent,
59578
- error2 ? styles$7.error : warning2 ? styles$7.warning : ""
59571
+ (cell2.disabled || disabledContext) && styles$7.disabledLink
59579
59572
  ),
59580
- children: /* @__PURE__ */ jsxRuntime.exports.jsx("a", {
59581
- className: cx$2(
59582
- (cell2.disabled || disabledContext) && styles$7.disabledLink
59583
- ),
59584
- onClick: cell2.disabled || disabledContext ? () => {
59585
- } : (evt) => {
59586
- evt.stopPropagation();
59587
- cell2.onClick(evt);
59588
- },
59589
- "data-testid": testId,
59590
- children: cell2.value
59591
- })
59573
+ onClick: cell2.disabled || disabledContext ? () => {
59574
+ } : (evt) => {
59575
+ evt.stopPropagation();
59576
+ cell2.onClick(evt);
59577
+ },
59578
+ "data-testid": testId,
59579
+ children: cell2.value
59592
59580
  })
59593
59581
  })
59594
59582
  });
@@ -59741,24 +59729,33 @@ const PopoverCell = (props) => {
59741
59729
  })
59742
59730
  });
59743
59731
  };
59732
+ const InputCellWrapper = (props) => {
59733
+ const { cell: cell2, columnAlignment, testId } = props;
59734
+ return /* @__PURE__ */ jsxRuntime.exports.jsx("div", {
59735
+ className: styles$7.inputWrapper,
59736
+ children: cell2.type === "Input" ? /* @__PURE__ */ jsxRuntime.exports.jsx(InputCell, {
59737
+ cell: cell2,
59738
+ columnAlignment,
59739
+ testId
59740
+ }) : cell2.type === "NumberInput" ? /* @__PURE__ */ jsxRuntime.exports.jsx(NumberInputCell, {
59741
+ cell: cell2,
59742
+ columnAlignment,
59743
+ testId
59744
+ }) : cell2.type === "Select" ? /* @__PURE__ */ jsxRuntime.exports.jsx(SelectCell, {
59745
+ cell: cell2,
59746
+ columnAlignment,
59747
+ testId
59748
+ }) : null
59749
+ });
59750
+ };
59744
59751
  const CellWrapper = (props) => {
59745
59752
  const { cell: cell2, isHeader, columnAlignment, testId } = props;
59746
59753
  if (cell2) {
59747
59754
  switch (cell2.type) {
59748
59755
  case "Input":
59749
- return /* @__PURE__ */ jsxRuntime.exports.jsx(InputCell, {
59750
- cell: cell2,
59751
- columnAlignment,
59752
- testId
59753
- });
59754
59756
  case "NumberInput":
59755
- return /* @__PURE__ */ jsxRuntime.exports.jsx(NumberInputCell, {
59756
- cell: cell2,
59757
- columnAlignment,
59758
- testId
59759
- });
59760
59757
  case "Select":
59761
- return /* @__PURE__ */ jsxRuntime.exports.jsx(SelectCell, {
59758
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(InputCellWrapper, {
59762
59759
  cell: cell2,
59763
59760
  columnAlignment,
59764
59761
  testId