@drivenets/design-system 0.11.1 → 0.12.1

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 (49) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/index.cjs +778 -140
  3. package/dist/index.d.cts +268 -2
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.ts +268 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +774 -141
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.min.css +1 -1
  10. package/package.json +2 -1
  11. package/src/components/ds-autocomplete/ds-autocomplete.module.scss +1 -1
  12. package/src/components/ds-catalog-layout/catalog-layout-empty-illustration.tsx +57 -0
  13. package/src/components/ds-catalog-layout/ds-catalog-layout.context.ts +19 -0
  14. package/src/components/ds-catalog-layout/ds-catalog-layout.module.scss +167 -0
  15. package/src/components/ds-catalog-layout/ds-catalog-layout.tsx +130 -0
  16. package/src/components/ds-catalog-layout/ds-catalog-layout.types.ts +62 -0
  17. package/src/components/ds-catalog-layout/index.ts +9 -0
  18. package/src/components/ds-dropdown-menu/ds-dropdown-menu.module.scss +5 -0
  19. package/src/components/ds-key-value-pair/ds-key-value-pair.module.scss +0 -5
  20. package/src/components/ds-smart-tabs/ds-smart-tabs.module.scss +1 -0
  21. package/src/components/ds-status-badge/ds-status-badge.types.ts +15 -0
  22. package/src/components/ds-status-badge-v2/ds-status-badge-v2.module.scss +109 -0
  23. package/src/components/ds-status-badge-v2/ds-status-badge-v2.tsx +77 -0
  24. package/src/components/ds-status-badge-v2/ds-status-badge-v2.types.ts +79 -0
  25. package/src/components/ds-status-badge-v2/ds-status-badge-v2.unit.test.ts +25 -0
  26. package/src/components/ds-status-badge-v2/index.ts +13 -0
  27. package/src/components/ds-status-badge-v2/phase-config.ts +15 -0
  28. package/src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.tsx +16 -8
  29. package/src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.types.ts +61 -0
  30. package/src/components/ds-table/components/ds-table-body-virtualized/use-infinite-scroll.ts +54 -0
  31. package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +4 -9
  32. package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +12 -26
  33. package/src/components/ds-table/components/ds-table-header-selectable-cell/ds-table-header-selectable-cell.tsx +22 -0
  34. package/src/components/ds-table/components/ds-table-header-selectable-cell/ds-table-header-selectable-cell.types.ts +9 -0
  35. package/src/components/ds-table/components/ds-table-header-selectable-cell/index.ts +2 -0
  36. package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +4 -9
  37. package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +20 -15
  38. package/src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx +9 -18
  39. package/src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.types.ts +2 -11
  40. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.module.scss +3 -6
  41. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +2 -6
  42. package/src/components/ds-table/ds-table.tsx +57 -17
  43. package/src/components/ds-table/ds-table.types.ts +27 -1
  44. package/src/components/ds-table/styles/_variables.scss +0 -1
  45. package/src/components/ds-table/styles/shared/ds-table-shared.module.scss +1 -0
  46. package/src/components/ds-table/utils/constants.ts +21 -0
  47. package/src/index.ts +2 -0
  48. package/src/styles/shared/_dropdown.scss +1 -1
  49. package/src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.module.scss +0 -6
package/dist/index.js CHANGED
@@ -3195,7 +3195,7 @@ const Title$2 = (t0) => {
3195
3195
  } else t2 = $[5];
3196
3196
  return t2;
3197
3197
  };
3198
- const Body$3 = (t0) => {
3198
+ const Body$4 = (t0) => {
3199
3199
  const $ = c(6);
3200
3200
  const { style, className, children } = t0;
3201
3201
  let t1;
@@ -3243,7 +3243,7 @@ const Actions$3 = (t0) => {
3243
3243
  return t2;
3244
3244
  };
3245
3245
  DsAlertBanner.Title = Title$2;
3246
- DsAlertBanner.Body = Body$3;
3246
+ DsAlertBanner.Body = Body$4;
3247
3247
  DsAlertBanner.Actions = Actions$3;
3248
3248
  //#endregion
3249
3249
  //#region src/components/ds-alert-banner/ds-alert-banner.types.ts
@@ -4052,7 +4052,7 @@ const Trigger = Menu.Trigger;
4052
4052
  /**
4053
4053
  * Content component - wraps the dropdown content
4054
4054
  */
4055
- const Content$1 = (t0) => {
4055
+ const Content$2 = (t0) => {
4056
4056
  const $ = c(9);
4057
4057
  const { disablePortal: t1, children, className, style } = t0;
4058
4058
  const Wrapper = (t1 === void 0 ? false : t1) ? Fragment$1 : Portal;
@@ -4157,7 +4157,7 @@ const ItemIndicator = (t0) => {
4157
4157
  /**
4158
4158
  * Header component - sticky header container for search, filters, or other controls
4159
4159
  */
4160
- const Header$4 = (t0) => {
4160
+ const Header$5 = (t0) => {
4161
4161
  const $ = c(6);
4162
4162
  const { children, className, style } = t0;
4163
4163
  let t1;
@@ -4633,11 +4633,11 @@ const DsDropdownMenuLegacy = (t0) => {
4633
4633
  const DsDropdownMenu = {
4634
4634
  Root: Root$4,
4635
4635
  Trigger,
4636
- Content: Content$1,
4636
+ Content: Content$2,
4637
4637
  Item: Item$2,
4638
4638
  ItemIndicator,
4639
4639
  TriggerItem,
4640
- Header: Header$4,
4640
+ Header: Header$5,
4641
4641
  Actions: Actions$2,
4642
4642
  ItemGroup,
4643
4643
  ItemGroupLabel,
@@ -5475,7 +5475,7 @@ const Root$3 = (t0) => {
5475
5475
  * Use with DsCard.Title and DsCard.Extra for standard layout,
5476
5476
  * or provide custom children for full flexibility.
5477
5477
  */
5478
- const Header$3 = (t0) => {
5478
+ const Header$4 = (t0) => {
5479
5479
  const $ = c(12);
5480
5480
  let children;
5481
5481
  let className;
@@ -5519,7 +5519,7 @@ const Header$3 = (t0) => {
5519
5519
  /**
5520
5520
  * Card body - main content area.
5521
5521
  */
5522
- const Body$2 = (t0) => {
5522
+ const Body$3 = (t0) => {
5523
5523
  const $ = c(12);
5524
5524
  let children;
5525
5525
  let className;
@@ -5606,8 +5606,8 @@ const Footer$3 = (t0) => {
5606
5606
  };
5607
5607
  const DsCard = {
5608
5608
  Root: Root$3,
5609
- Header: Header$3,
5610
- Body: Body$2,
5609
+ Header: Header$4,
5610
+ Body: Body$3,
5611
5611
  Footer: Footer$3
5612
5612
  };
5613
5613
  //#endregion
@@ -5618,6 +5618,413 @@ const cardSizes = [
5618
5618
  "large"
5619
5619
  ];
5620
5620
  //#endregion
5621
+ //#region src/components/ds-catalog-layout/ds-catalog-layout.module.scss
5622
+ var ds_catalog_layout_module_default = {
5623
+ "body": "ub6JXq_body",
5624
+ "content": "ub6JXq_content",
5625
+ "contentHeader": "ub6JXq_contentHeader",
5626
+ "contentHeaderActions": "ub6JXq_contentHeaderActions",
5627
+ "contentHeaderItem": "ub6JXq_contentHeaderItem",
5628
+ "contentHeaderTitle": "ub6JXq_contentHeaderTitle",
5629
+ "contentHeaderTitleRow": "ub6JXq_contentHeaderTitleRow",
5630
+ "contentWithSideMenu": "ub6JXq_contentWithSideMenu",
5631
+ "fillParent": "ub6JXq_fillParent",
5632
+ "header": "ub6JXq_header",
5633
+ "root": "ub6JXq_root",
5634
+ "sideMenu": "ub6JXq_sideMenu",
5635
+ "sideMenuPanel": "ub6JXq_sideMenuPanel",
5636
+ "sideMenuPinButton": "ub6JXq_sideMenuPinButton"
5637
+ };
5638
+ //#endregion
5639
+ //#region src/components/ds-catalog-layout/ds-catalog-layout.context.ts
5640
+ const DsCatalogLayoutContext = createContext(null);
5641
+ const useDsCatalogLayoutContext = () => {
5642
+ const context = useContext(DsCatalogLayoutContext);
5643
+ if (!context) throw new Error("DsCatalogLayout compound components must be used within DsCatalogLayout");
5644
+ return context;
5645
+ };
5646
+ //#endregion
5647
+ //#region src/components/ds-catalog-layout/ds-catalog-layout.tsx
5648
+ const DEFAULT_LOCALE = Object.freeze({
5649
+ pinButtonLabel: "Pin side menu",
5650
+ unpinButtonLabel: "Unpin side menu"
5651
+ });
5652
+ const DsCatalogLayout = (t0) => {
5653
+ const $ = c(17);
5654
+ let className;
5655
+ let rest;
5656
+ let t1;
5657
+ if ($[0] !== t0) {
5658
+ ({className, fillParent: t1, ...rest} = t0);
5659
+ $[0] = t0;
5660
+ $[1] = className;
5661
+ $[2] = rest;
5662
+ $[3] = t1;
5663
+ } else {
5664
+ className = $[1];
5665
+ rest = $[2];
5666
+ t1 = $[3];
5667
+ }
5668
+ const fillParent = t1 === void 0 ? false : t1;
5669
+ const [hasSideMenu, setHasSideMenu] = useState(false);
5670
+ let t2;
5671
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
5672
+ t2 = () => setHasSideMenu(true);
5673
+ $[4] = t2;
5674
+ } else t2 = $[4];
5675
+ const registerSideMenu = t2;
5676
+ let t3;
5677
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
5678
+ t3 = () => setHasSideMenu(false);
5679
+ $[5] = t3;
5680
+ } else t3 = $[5];
5681
+ const unregisterSideMenu = t3;
5682
+ let t4;
5683
+ if ($[6] !== hasSideMenu) {
5684
+ t4 = {
5685
+ hasSideMenu,
5686
+ registerSideMenu,
5687
+ unregisterSideMenu
5688
+ };
5689
+ $[6] = hasSideMenu;
5690
+ $[7] = t4;
5691
+ } else t4 = $[7];
5692
+ const contextValue = t4;
5693
+ let t5;
5694
+ if ($[8] !== className || $[9] !== fillParent) {
5695
+ t5 = classNames(ds_catalog_layout_module_default.root, { [ds_catalog_layout_module_default.fillParent]: fillParent }, className);
5696
+ $[8] = className;
5697
+ $[9] = fillParent;
5698
+ $[10] = t5;
5699
+ } else t5 = $[10];
5700
+ let t6;
5701
+ if ($[11] !== rest || $[12] !== t5) {
5702
+ t6 = /* @__PURE__ */ jsx("div", {
5703
+ ...rest,
5704
+ className: t5
5705
+ });
5706
+ $[11] = rest;
5707
+ $[12] = t5;
5708
+ $[13] = t6;
5709
+ } else t6 = $[13];
5710
+ let t7;
5711
+ if ($[14] !== contextValue || $[15] !== t6) {
5712
+ t7 = /* @__PURE__ */ jsx(DsCatalogLayoutContext.Provider, {
5713
+ value: contextValue,
5714
+ children: t6
5715
+ });
5716
+ $[14] = contextValue;
5717
+ $[15] = t6;
5718
+ $[16] = t7;
5719
+ } else t7 = $[16];
5720
+ return t7;
5721
+ };
5722
+ const Header$3 = (t0) => {
5723
+ const $ = c(8);
5724
+ let className;
5725
+ let rest;
5726
+ if ($[0] !== t0) {
5727
+ ({className, ...rest} = t0);
5728
+ $[0] = t0;
5729
+ $[1] = className;
5730
+ $[2] = rest;
5731
+ } else {
5732
+ className = $[1];
5733
+ rest = $[2];
5734
+ }
5735
+ let t1;
5736
+ if ($[3] !== className) {
5737
+ t1 = classNames(ds_catalog_layout_module_default.header, className);
5738
+ $[3] = className;
5739
+ $[4] = t1;
5740
+ } else t1 = $[4];
5741
+ let t2;
5742
+ if ($[5] !== rest || $[6] !== t1) {
5743
+ t2 = /* @__PURE__ */ jsx("header", {
5744
+ ...rest,
5745
+ className: t1
5746
+ });
5747
+ $[5] = rest;
5748
+ $[6] = t1;
5749
+ $[7] = t2;
5750
+ } else t2 = $[7];
5751
+ return t2;
5752
+ };
5753
+ const Body$2 = (t0) => {
5754
+ const $ = c(8);
5755
+ let className;
5756
+ let rest;
5757
+ if ($[0] !== t0) {
5758
+ ({className, ...rest} = t0);
5759
+ $[0] = t0;
5760
+ $[1] = className;
5761
+ $[2] = rest;
5762
+ } else {
5763
+ className = $[1];
5764
+ rest = $[2];
5765
+ }
5766
+ let t1;
5767
+ if ($[3] !== className) {
5768
+ t1 = classNames(ds_catalog_layout_module_default.body, className);
5769
+ $[3] = className;
5770
+ $[4] = t1;
5771
+ } else t1 = $[4];
5772
+ let t2;
5773
+ if ($[5] !== rest || $[6] !== t1) {
5774
+ t2 = /* @__PURE__ */ jsx("div", {
5775
+ ...rest,
5776
+ className: t1
5777
+ });
5778
+ $[5] = rest;
5779
+ $[6] = t1;
5780
+ $[7] = t2;
5781
+ } else t2 = $[7];
5782
+ return t2;
5783
+ };
5784
+ const SideMenu = (t0) => {
5785
+ const $ = c(32);
5786
+ let children;
5787
+ let className;
5788
+ let locale;
5789
+ let onPinnedChange;
5790
+ let rest;
5791
+ let t1;
5792
+ if ($[0] !== t0) {
5793
+ ({className, pinned: t1, onPinnedChange, locale, children, ...rest} = t0);
5794
+ $[0] = t0;
5795
+ $[1] = children;
5796
+ $[2] = className;
5797
+ $[3] = locale;
5798
+ $[4] = onPinnedChange;
5799
+ $[5] = rest;
5800
+ $[6] = t1;
5801
+ } else {
5802
+ children = $[1];
5803
+ className = $[2];
5804
+ locale = $[3];
5805
+ onPinnedChange = $[4];
5806
+ rest = $[5];
5807
+ t1 = $[6];
5808
+ }
5809
+ const pinned = t1 === void 0 ? false : t1;
5810
+ const { registerSideMenu, unregisterSideMenu } = useDsCatalogLayoutContext();
5811
+ const [isHovering, setIsHovering] = useState(false);
5812
+ let t2;
5813
+ let t3;
5814
+ if ($[7] !== registerSideMenu || $[8] !== unregisterSideMenu) {
5815
+ t2 = () => {
5816
+ registerSideMenu();
5817
+ return unregisterSideMenu;
5818
+ };
5819
+ t3 = [registerSideMenu, unregisterSideMenu];
5820
+ $[7] = registerSideMenu;
5821
+ $[8] = unregisterSideMenu;
5822
+ $[9] = t2;
5823
+ $[10] = t3;
5824
+ } else {
5825
+ t2 = $[9];
5826
+ t3 = $[10];
5827
+ }
5828
+ useEffect(t2, t3);
5829
+ const isExpanded = pinned || isHovering;
5830
+ const ariaLabel = pinned ? locale?.unpinButtonLabel ?? DEFAULT_LOCALE.unpinButtonLabel : locale?.pinButtonLabel ?? DEFAULT_LOCALE.pinButtonLabel;
5831
+ let t4;
5832
+ if ($[11] !== className) {
5833
+ t4 = classNames(ds_catalog_layout_module_default.sideMenu, className);
5834
+ $[11] = className;
5835
+ $[12] = t4;
5836
+ } else t4 = $[12];
5837
+ let t5;
5838
+ if ($[13] !== pinned) {
5839
+ t5 = pinned ? { "data-pinned": "" } : {};
5840
+ $[13] = pinned;
5841
+ $[14] = t5;
5842
+ } else t5 = $[14];
5843
+ let t6;
5844
+ if ($[15] !== isExpanded) {
5845
+ t6 = isExpanded ? { "data-expanded": "" } : {};
5846
+ $[15] = isExpanded;
5847
+ $[16] = t6;
5848
+ } else t6 = $[16];
5849
+ let t7;
5850
+ let t8;
5851
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
5852
+ t7 = () => setIsHovering(true);
5853
+ t8 = () => setIsHovering(false);
5854
+ $[17] = t7;
5855
+ $[18] = t8;
5856
+ } else {
5857
+ t7 = $[17];
5858
+ t8 = $[18];
5859
+ }
5860
+ let t9;
5861
+ if ($[19] !== ariaLabel || $[20] !== onPinnedChange || $[21] !== pinned) {
5862
+ t9 = onPinnedChange ? /* @__PURE__ */ jsx("button", {
5863
+ type: "button",
5864
+ className: ds_catalog_layout_module_default.sideMenuPinButton,
5865
+ onClick: () => onPinnedChange(!pinned),
5866
+ "aria-label": ariaLabel,
5867
+ "aria-pressed": pinned,
5868
+ children: /* @__PURE__ */ jsx(DsIcon, {
5869
+ icon: "keep",
5870
+ size: "small",
5871
+ filled: pinned
5872
+ })
5873
+ }) : null;
5874
+ $[19] = ariaLabel;
5875
+ $[20] = onPinnedChange;
5876
+ $[21] = pinned;
5877
+ $[22] = t9;
5878
+ } else t9 = $[22];
5879
+ let t10;
5880
+ if ($[23] !== children || $[24] !== t9) {
5881
+ t10 = /* @__PURE__ */ jsxs("div", {
5882
+ className: ds_catalog_layout_module_default.sideMenuPanel,
5883
+ onMouseEnter: t7,
5884
+ onMouseLeave: t8,
5885
+ children: [t9, children]
5886
+ });
5887
+ $[23] = children;
5888
+ $[24] = t9;
5889
+ $[25] = t10;
5890
+ } else t10 = $[25];
5891
+ let t11;
5892
+ if ($[26] !== rest || $[27] !== t10 || $[28] !== t4 || $[29] !== t5 || $[30] !== t6) {
5893
+ t11 = /* @__PURE__ */ jsx("aside", {
5894
+ ...rest,
5895
+ className: t4,
5896
+ ...t5,
5897
+ ...t6,
5898
+ children: t10
5899
+ });
5900
+ $[26] = rest;
5901
+ $[27] = t10;
5902
+ $[28] = t4;
5903
+ $[29] = t5;
5904
+ $[30] = t6;
5905
+ $[31] = t11;
5906
+ } else t11 = $[31];
5907
+ return t11;
5908
+ };
5909
+ const Content$1 = (t0) => {
5910
+ const $ = c(9);
5911
+ let className;
5912
+ let rest;
5913
+ if ($[0] !== t0) {
5914
+ ({className, ...rest} = t0);
5915
+ $[0] = t0;
5916
+ $[1] = className;
5917
+ $[2] = rest;
5918
+ } else {
5919
+ className = $[1];
5920
+ rest = $[2];
5921
+ }
5922
+ const { hasSideMenu } = useDsCatalogLayoutContext();
5923
+ let t1;
5924
+ if ($[3] !== className || $[4] !== hasSideMenu) {
5925
+ t1 = classNames(ds_catalog_layout_module_default.content, { [ds_catalog_layout_module_default.contentWithSideMenu]: hasSideMenu }, className);
5926
+ $[3] = className;
5927
+ $[4] = hasSideMenu;
5928
+ $[5] = t1;
5929
+ } else t1 = $[5];
5930
+ let t2;
5931
+ if ($[6] !== rest || $[7] !== t1) {
5932
+ t2 = /* @__PURE__ */ jsx("div", {
5933
+ ...rest,
5934
+ className: t1
5935
+ });
5936
+ $[6] = rest;
5937
+ $[7] = t1;
5938
+ $[8] = t2;
5939
+ } else t2 = $[8];
5940
+ return t2;
5941
+ };
5942
+ const ContentHeader = (t0) => {
5943
+ const $ = c(22);
5944
+ let children;
5945
+ let className;
5946
+ let headerActions;
5947
+ let rest;
5948
+ let title;
5949
+ if ($[0] !== t0) {
5950
+ ({className, title, headerActions, children, ...rest} = t0);
5951
+ $[0] = t0;
5952
+ $[1] = children;
5953
+ $[2] = className;
5954
+ $[3] = headerActions;
5955
+ $[4] = rest;
5956
+ $[5] = title;
5957
+ } else {
5958
+ children = $[1];
5959
+ className = $[2];
5960
+ headerActions = $[3];
5961
+ rest = $[4];
5962
+ title = $[5];
5963
+ }
5964
+ let t1;
5965
+ if ($[6] !== className) {
5966
+ t1 = classNames(ds_catalog_layout_module_default.contentHeader, className);
5967
+ $[6] = className;
5968
+ $[7] = t1;
5969
+ } else t1 = $[7];
5970
+ let t2;
5971
+ if ($[8] !== title) {
5972
+ t2 = /* @__PURE__ */ jsx("div", {
5973
+ className: ds_catalog_layout_module_default.contentHeaderTitle,
5974
+ children: title
5975
+ });
5976
+ $[8] = title;
5977
+ $[9] = t2;
5978
+ } else t2 = $[9];
5979
+ let t3;
5980
+ if ($[10] !== headerActions) {
5981
+ t3 = headerActions ? /* @__PURE__ */ jsx("div", {
5982
+ className: ds_catalog_layout_module_default.contentHeaderActions,
5983
+ children: headerActions
5984
+ }) : null;
5985
+ $[10] = headerActions;
5986
+ $[11] = t3;
5987
+ } else t3 = $[11];
5988
+ let t4;
5989
+ if ($[12] !== t2 || $[13] !== t3) {
5990
+ t4 = /* @__PURE__ */ jsxs("div", {
5991
+ className: ds_catalog_layout_module_default.contentHeaderTitleRow,
5992
+ children: [t2, t3]
5993
+ });
5994
+ $[12] = t2;
5995
+ $[13] = t3;
5996
+ $[14] = t4;
5997
+ } else t4 = $[14];
5998
+ let t5;
5999
+ if ($[15] !== children) {
6000
+ t5 = children ? /* @__PURE__ */ jsx("div", {
6001
+ className: ds_catalog_layout_module_default.contentHeaderItem,
6002
+ children
6003
+ }) : null;
6004
+ $[15] = children;
6005
+ $[16] = t5;
6006
+ } else t5 = $[16];
6007
+ let t6;
6008
+ if ($[17] !== rest || $[18] !== t1 || $[19] !== t4 || $[20] !== t5) {
6009
+ t6 = /* @__PURE__ */ jsxs("div", {
6010
+ ...rest,
6011
+ className: t1,
6012
+ children: [t4, t5]
6013
+ });
6014
+ $[17] = rest;
6015
+ $[18] = t1;
6016
+ $[19] = t4;
6017
+ $[20] = t5;
6018
+ $[21] = t6;
6019
+ } else t6 = $[21];
6020
+ return t6;
6021
+ };
6022
+ DsCatalogLayout.Header = Header$3;
6023
+ DsCatalogLayout.Body = Body$2;
6024
+ DsCatalogLayout.SideMenu = SideMenu;
6025
+ DsCatalogLayout.Content = Content$1;
6026
+ DsCatalogLayout.ContentHeader = ContentHeader;
6027
+ //#endregion
5621
6028
  //#region src/components/ds-checkbox/ds-checkbox.module.scss
5622
6029
  var ds_checkbox_module_default = {
5623
6030
  "control": "-9VV7a_control",
@@ -16961,6 +17368,167 @@ const DsStatusBadge = (t0) => {
16961
17368
  return t12;
16962
17369
  };
16963
17370
  //#endregion
17371
+ //#region src/components/ds-status-badge-v2/ds-status-badge-v2.module.scss
17372
+ var ds_status_badge_v2_module_default = {
17373
+ "active": "xQkUdW_active",
17374
+ "deprecated": "xQkUdW_deprecated",
17375
+ "execution": "xQkUdW_execution",
17376
+ "icon": "xQkUdW_icon",
17377
+ "iconOnly": "xQkUdW_iconOnly",
17378
+ "in-review": "xQkUdW_in-review",
17379
+ "label": "xQkUdW_label",
17380
+ "medium": "xQkUdW_medium",
17381
+ "not-started": "xQkUdW_not-started",
17382
+ "pending": "xQkUdW_pending",
17383
+ "result-failed": "xQkUdW_result-failed",
17384
+ "result-succeeded": "xQkUdW_result-succeeded",
17385
+ "result-warning": "xQkUdW_result-warning",
17386
+ "root": "xQkUdW_root",
17387
+ "secondary": "xQkUdW_secondary",
17388
+ "small": "xQkUdW_small",
17389
+ "temporary": "xQkUdW_temporary",
17390
+ "textOnly": "xQkUdW_textOnly"
17391
+ };
17392
+ //#endregion
17393
+ //#region src/components/ds-status-badge-v2/phase-config.ts
17394
+ const phaseIconMap = Object.freeze({
17395
+ "not-started": "lasso_select",
17396
+ temporary: "hourglass_empty",
17397
+ "in-review": "document_search",
17398
+ pending: "timer_pause",
17399
+ active: "power_settings_circle",
17400
+ execution: "timelapse",
17401
+ "result-succeeded": "verified",
17402
+ "result-warning": "warning",
17403
+ "result-failed": "cancel",
17404
+ deprecated: "inventory_2"
17405
+ });
17406
+ //#endregion
17407
+ //#region src/components/ds-status-badge-v2/ds-status-badge-v2.tsx
17408
+ const DsStatusBadgeV2$1 = (t0) => {
17409
+ const $ = c(26);
17410
+ const { phase, label, icon, iconOnly: t1, variant: t2, size: t3, className, style, ref, "aria-label": ariaLabel } = t0;
17411
+ const iconOnly = t1 === void 0 ? false : t1;
17412
+ const variant = t2 === void 0 ? "primary" : t2;
17413
+ const size = t3 === void 0 ? "medium" : t3;
17414
+ const resolvedIcon = icon === null ? null : icon ?? phaseIconMap[phase];
17415
+ const hasIcon = resolvedIcon !== null;
17416
+ const isTextOnly = !hasIcon;
17417
+ const tooltipContent = iconOnly ? label : void 0;
17418
+ let t4;
17419
+ if ($[0] !== size) {
17420
+ t4 = size === "small" ? {
17421
+ fontSize: "var(--_badge-icon-size)",
17422
+ width: "var(--_badge-icon-size)",
17423
+ height: "var(--_badge-icon-size)"
17424
+ } : void 0;
17425
+ $[0] = size;
17426
+ $[1] = t4;
17427
+ } else t4 = $[1];
17428
+ const iconStyle = t4;
17429
+ const t5 = ds_status_badge_v2_module_default[phase];
17430
+ const t6 = ds_status_badge_v2_module_default[size];
17431
+ const t7 = variant === "secondary";
17432
+ let t8;
17433
+ if ($[2] !== className || $[3] !== iconOnly || $[4] !== isTextOnly || $[5] !== t5 || $[6] !== t6 || $[7] !== t7) {
17434
+ t8 = classNames(ds_status_badge_v2_module_default.root, t5, t6, {
17435
+ [ds_status_badge_v2_module_default.secondary]: t7,
17436
+ [ds_status_badge_v2_module_default.iconOnly]: iconOnly,
17437
+ [ds_status_badge_v2_module_default.textOnly]: isTextOnly
17438
+ }, className);
17439
+ $[2] = className;
17440
+ $[3] = iconOnly;
17441
+ $[4] = isTextOnly;
17442
+ $[5] = t5;
17443
+ $[6] = t6;
17444
+ $[7] = t7;
17445
+ $[8] = t8;
17446
+ } else t8 = $[8];
17447
+ const rootClass = t8;
17448
+ const t9 = ref;
17449
+ const t10 = ariaLabel ?? label;
17450
+ let t11;
17451
+ if ($[9] !== hasIcon || $[10] !== iconStyle || $[11] !== resolvedIcon) {
17452
+ t11 = hasIcon && /* @__PURE__ */ jsx("span", {
17453
+ className: ds_status_badge_v2_module_default.icon,
17454
+ children: /* @__PURE__ */ jsx(DsIcon, {
17455
+ icon: resolvedIcon,
17456
+ size: "tiny",
17457
+ filled: true,
17458
+ "aria-hidden": "true",
17459
+ style: iconStyle
17460
+ })
17461
+ });
17462
+ $[9] = hasIcon;
17463
+ $[10] = iconStyle;
17464
+ $[11] = resolvedIcon;
17465
+ $[12] = t11;
17466
+ } else t11 = $[12];
17467
+ let t12;
17468
+ if ($[13] !== iconOnly || $[14] !== label) {
17469
+ t12 = !iconOnly && /* @__PURE__ */ jsx(DsTypography, {
17470
+ className: ds_status_badge_v2_module_default.label,
17471
+ variant: "body-xs-reg",
17472
+ children: label
17473
+ });
17474
+ $[13] = iconOnly;
17475
+ $[14] = label;
17476
+ $[15] = t12;
17477
+ } else t12 = $[15];
17478
+ let t13;
17479
+ if ($[16] !== rootClass || $[17] !== style || $[18] !== t10 || $[19] !== t11 || $[20] !== t12 || $[21] !== t9) {
17480
+ t13 = /* @__PURE__ */ jsxs("div", {
17481
+ ref: t9,
17482
+ className: rootClass,
17483
+ style,
17484
+ role: "status",
17485
+ "aria-label": t10,
17486
+ children: [t11, t12]
17487
+ });
17488
+ $[16] = rootClass;
17489
+ $[17] = style;
17490
+ $[18] = t10;
17491
+ $[19] = t11;
17492
+ $[20] = t12;
17493
+ $[21] = t9;
17494
+ $[22] = t13;
17495
+ } else t13 = $[22];
17496
+ const badge = t13;
17497
+ if (iconOnly) {
17498
+ let t14;
17499
+ if ($[23] !== badge || $[24] !== tooltipContent) {
17500
+ t14 = /* @__PURE__ */ jsx(DsTooltip, {
17501
+ content: tooltipContent,
17502
+ children: badge
17503
+ });
17504
+ $[23] = badge;
17505
+ $[24] = tooltipContent;
17506
+ $[25] = t14;
17507
+ } else t14 = $[25];
17508
+ return t14;
17509
+ }
17510
+ return badge;
17511
+ };
17512
+ //#endregion
17513
+ //#region src/components/ds-status-badge-v2/ds-status-badge-v2.types.ts
17514
+ const statusBadgeV2Phases = [
17515
+ "not-started",
17516
+ "temporary",
17517
+ "in-review",
17518
+ "pending",
17519
+ "active",
17520
+ "execution",
17521
+ "result-succeeded",
17522
+ "result-warning",
17523
+ "result-failed",
17524
+ "deprecated"
17525
+ ];
17526
+ const statusBadgeV2Variants = ["primary", "secondary"];
17527
+ const statusBadgeV2Sizes = ["medium", "small"];
17528
+ //#endregion
17529
+ //#region src/components/ds-status-badge-v2/index.ts
17530
+ const DsStatusBadgeV2 = withResponsiveProps(DsStatusBadgeV2$1, ["size"]);
17531
+ //#endregion
16964
17532
  //#region src/components/ds-stepper/ds-stepper.module.scss
16965
17533
  var ds_stepper_module_default = {
16966
17534
  "dragHandle": "kFAdma_dragHandle",
@@ -18102,8 +18670,7 @@ var ds_table_header_module_default = {
18102
18670
  "headerSortContainer": "-2rCNG_headerSortContainer",
18103
18671
  "pageButtonIcon": "-2rCNG_pageButtonIcon",
18104
18672
  "pageButtonIconContainer": "-2rCNG_pageButtonIconContainer",
18105
- "reorderColumn": "-2rCNG_reorderColumn",
18106
- "selectColumn": "-2rCNG_selectColumn",
18673
+ "selectHeaderCell": "-2rCNG_selectHeaderCell",
18107
18674
  "sortableHeader": "-2rCNG_sortableHeader",
18108
18675
  "stickyHeader": "-2rCNG_stickyHeader",
18109
18676
  "virtualizedHeader": "-2rCNG_virtualizedHeader"
@@ -18143,54 +18710,58 @@ const getColumnSizeStyle = (columnSize, virtualized) => {
18143
18710
  if (columnSize !== defaultColumnSizing.size) return { width: columnSize };
18144
18711
  if (virtualized) return { flex: 1 };
18145
18712
  };
18713
+ /**
18714
+ * Column id used for the synthetic expander column injected when `expandable` is set.
18715
+ */
18716
+ const EXPANDER_COLUMN_ID = "expander";
18717
+ /**
18718
+ * Column id used for the synthetic selection column injected when `selectable` is set.
18719
+ */
18720
+ const SELECT_COLUMN_ID = "select";
18721
+ /**
18722
+ * Column id used for the synthetic reorder column injected when `reorderable` is set
18723
+ * (non-virtualized tables only).
18724
+ */
18725
+ const REORDER_COLUMN_ID = "reorder";
18146
18726
  //#endregion
18147
18727
  //#region src/components/ds-table/components/ds-table-header/ds-table-header.tsx
18148
18728
  const DsTableHeader = ({ table }) => {
18149
- const { stickyHeader, bordered, selectable, reorderable, showSelectAllCheckbox, virtualized } = useDsTableContext();
18729
+ const { stickyHeader, bordered, virtualized } = useDsTableContext();
18150
18730
  return /* @__PURE__ */ jsx(TableHeader, {
18151
18731
  className: classNames(stickyHeader && ds_table_header_module_default.stickyHeader, virtualized && ds_table_header_module_default.virtualizedHeader),
18152
- children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs(TableRow, {
18732
+ children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, {
18153
18733
  className: classNames(ds_table_header_module_default.headerRow, !bordered && ds_table_header_module_default.headerRowNoBorder, virtualized && ds_table_header_module_default.headerRowVirtualized),
18154
- children: [
18155
- selectable && /* @__PURE__ */ jsx(TableHead, {
18156
- className: classNames(ds_table_header_module_default.headerCell, ds_table_header_module_default.selectColumn),
18157
- children: showSelectAllCheckbox && /* @__PURE__ */ jsx(DsCheckbox, {
18158
- className: ds_table_shared_module_default.checkboxContainer,
18159
- checked: table.getIsAllRowsSelected() ? true : table.getIsSomeRowsSelected() ? "indeterminate" : false,
18160
- onCheckedChange: (checked) => table.toggleAllRowsSelected(!!checked),
18161
- onClick: (e) => e.stopPropagation()
18734
+ children: headerGroup.headers.map((header) => {
18735
+ const headerStyle = getColumnSizeStyle(header.column.getSize(), virtualized);
18736
+ const canSort = header.column.getCanSort();
18737
+ const isSelectColumn = header.column.id === SELECT_COLUMN_ID;
18738
+ return /* @__PURE__ */ jsx(TableHead, {
18739
+ className: classNames(ds_table_header_module_default.headerCell, canSort && ds_table_header_module_default.sortableHeader, isSelectColumn && ds_table_header_module_default.selectHeaderCell),
18740
+ onClick: header.column.getToggleSortingHandler(),
18741
+ style: headerStyle,
18742
+ children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs("div", {
18743
+ className: ds_table_header_module_default.headerSortContainer,
18744
+ children: [/* @__PURE__ */ jsx(DsStack, {
18745
+ direction: "column",
18746
+ justifyContent: "center",
18747
+ width: "100%",
18748
+ children: flexRender(header.column.columnDef.header, header.getContext())
18749
+ }), canSort && /* @__PURE__ */ jsx("div", {
18750
+ className: ds_table_header_module_default.pageButtonIconContainer,
18751
+ children: {
18752
+ asc: /* @__PURE__ */ jsx(DsIcon, {
18753
+ icon: "arrow_drop_up",
18754
+ className: classNames(ds_table_header_module_default.pageButtonIcon, ds_table_shared_module_default.pageButtonIcon)
18755
+ }),
18756
+ desc: /* @__PURE__ */ jsx(DsIcon, {
18757
+ icon: "arrow_drop_down",
18758
+ className: classNames(ds_table_header_module_default.pageButtonIcon, ds_table_shared_module_default.pageButtonIcon)
18759
+ })
18760
+ }[header.column.getIsSorted()] ?? /* @__PURE__ */ jsx("div", { className: classNames(ds_table_header_module_default.pageButtonIcon, ds_table_shared_module_default.pageButtonIcon) })
18761
+ })]
18162
18762
  })
18163
- }),
18164
- reorderable && /* @__PURE__ */ jsx(TableHead, {
18165
- className: classNames(ds_table_header_module_default.headerCell, ds_table_header_module_default.reorderColumn),
18166
- children: "Order"
18167
- }),
18168
- headerGroup.headers.map((header) => {
18169
- const headerStyle = getColumnSizeStyle(header.column.getSize(), virtualized);
18170
- const canSort = header.column.getCanSort();
18171
- return /* @__PURE__ */ jsx(TableHead, {
18172
- className: classNames(ds_table_header_module_default.headerCell, canSort && ds_table_header_module_default.sortableHeader),
18173
- onClick: header.column.getToggleSortingHandler(),
18174
- style: headerStyle,
18175
- children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs("div", {
18176
- className: ds_table_header_module_default.headerSortContainer,
18177
- children: [/* @__PURE__ */ jsx("div", { children: flexRender(header.column.columnDef.header, header.getContext()) }), canSort && /* @__PURE__ */ jsx("div", {
18178
- className: ds_table_header_module_default.pageButtonIconContainer,
18179
- children: {
18180
- asc: /* @__PURE__ */ jsx(DsIcon, {
18181
- icon: "arrow_drop_up",
18182
- className: classNames(ds_table_header_module_default.pageButtonIcon, ds_table_shared_module_default.pageButtonIcon)
18183
- }),
18184
- desc: /* @__PURE__ */ jsx(DsIcon, {
18185
- icon: "arrow_drop_down",
18186
- className: classNames(ds_table_header_module_default.pageButtonIcon, ds_table_shared_module_default.pageButtonIcon)
18187
- })
18188
- }[header.column.getIsSorted()] ?? /* @__PURE__ */ jsx("div", { className: classNames(ds_table_header_module_default.pageButtonIcon, ds_table_shared_module_default.pageButtonIcon) })
18189
- })]
18190
- })
18191
- }, header.id);
18192
- })
18193
- ]
18763
+ }, header.id);
18764
+ })
18194
18765
  }, headerGroup.id))
18195
18766
  });
18196
18767
  };
@@ -18294,24 +18865,6 @@ const DsTableCell = ({ row, cell, primaryRowActions = [], secondaryRowActions =
18294
18865
  return /* @__PURE__ */ jsx(DsDefaultTableCell, { cell });
18295
18866
  };
18296
18867
  //#endregion
18297
- //#region src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.module.scss
18298
- var ds_table_row_selectable_cell_module_default = { "cell": "BxP8ta_cell" };
18299
- //#endregion
18300
- //#region src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx
18301
- const DsTableRowSelectableCell = ({ row, isSelected, className }) => {
18302
- return /* @__PURE__ */ jsx(TableCell, {
18303
- className: classNames(ds_table_row_selectable_cell_module_default.cell, className),
18304
- children: /* @__PURE__ */ jsx(DsCheckbox, {
18305
- className: ds_table_shared_module_default.checkboxContainer,
18306
- checked: isSelected,
18307
- disabled: !row.getCanSelect(),
18308
- onCheckedChange: (checked) => row.toggleSelected(!!checked),
18309
- onClick: (e) => e.stopPropagation(),
18310
- onDoubleClick: (e) => e.stopPropagation()
18311
- })
18312
- });
18313
- };
18314
- //#endregion
18315
18868
  //#region src/components/ds-table/components/ds-table-row/ds-table-row.module.scss
18316
18869
  var ds_table_row_module_default = {
18317
18870
  "cellReorder": "t8OZCq_cellReorder",
@@ -18329,15 +18882,12 @@ var ds_table_row_module_default = {
18329
18882
  "tableCell": "t8OZCq_tableCell",
18330
18883
  "tableRow": "t8OZCq_tableRow"
18331
18884
  };
18332
- /**
18333
- * Column id used for the synthetic expander column injected when `expandable` is set.
18334
- */
18335
- const EXPANDER_COLUMN_ID = "expander";
18336
18885
  //#endregion
18337
18886
  //#region src/components/ds-table/components/ds-table-row/ds-table-row.tsx
18338
- const DsRowDragHandle = ({ isDragging, attributes, listeners }) => {
18887
+ const DsRowDragHandle = ({ isDragging, attributes, listeners, style }) => {
18339
18888
  return /* @__PURE__ */ jsx(TableCell, {
18340
18889
  className: classNames(ds_table_row_module_default.tableCell, ds_table_row_module_default.cellReorder, { [ds_table_row_module_default.isDragging]: isDragging }),
18890
+ style,
18341
18891
  children: /* @__PURE__ */ jsx(DsIcon, {
18342
18892
  className: ds_table_row_module_default.rowDragHandle,
18343
18893
  icon: isDragging ? "drag_indicator" : "arrow_downward",
@@ -18349,7 +18899,7 @@ const DsRowDragHandle = ({ isDragging, attributes, listeners }) => {
18349
18899
  });
18350
18900
  };
18351
18901
  const DsTableRow = ({ ref, row, isSelected }) => {
18352
- const { selectable, reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId } = useDsTableContext();
18902
+ const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId } = useDsTableContext();
18353
18903
  const isExpanded = row.getIsExpanded();
18354
18904
  const isActive = activeRowId === row.id;
18355
18905
  const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
@@ -18366,7 +18916,7 @@ const DsTableRow = ({ ref, row, isSelected }) => {
18366
18916
  } : {},
18367
18917
  position: "relative"
18368
18918
  } : {};
18369
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(TableRow, {
18919
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(TableRow, {
18370
18920
  ref: mergeRefs(reorderable ? setNodeRef : null, ref),
18371
18921
  "data-state": isActive ? "active" : isSelected ? "selected" : void 0,
18372
18922
  className: classNames(ds_table_row_module_default.tableRow, {
@@ -18377,39 +18927,33 @@ const DsTableRow = ({ ref, row, isSelected }) => {
18377
18927
  style: rowStyle,
18378
18928
  onClick: () => onRowClick?.(row.original),
18379
18929
  onDoubleClick: () => onRowDoubleClick?.(row.original),
18380
- children: [
18381
- selectable && /* @__PURE__ */ jsx(DsTableRowSelectableCell, {
18382
- row,
18383
- isSelected,
18384
- className: ds_table_row_module_default.selectableCell
18385
- }),
18386
- reorderable && /* @__PURE__ */ jsx(DsRowDragHandle, {
18930
+ children: row.getVisibleCells().map((cell, idx) => {
18931
+ const cellStyle = getColumnSizeStyle(cell.column.getSize());
18932
+ if (cell.column.id === "reorder") return /* @__PURE__ */ jsx(DsRowDragHandle, {
18387
18933
  isDragging,
18388
18934
  attributes,
18389
- listeners
18390
- }),
18391
- row.getVisibleCells().map((cell, idx) => {
18392
- const isLastColumn = idx === row.getVisibleCells().length - 1;
18393
- const cellStyle = getColumnSizeStyle(cell.column.getSize());
18394
- return /* @__PURE__ */ jsx(TableCell, {
18395
- className: classNames(ds_table_row_module_default.tableCell, cell.column.id === "expander" && ds_table_row_module_default.expandableCell),
18396
- style: cellStyle,
18397
- children: isLastColumn ? /* @__PURE__ */ jsx(DsTableCell, {
18398
- row,
18399
- cell,
18400
- primaryRowActions,
18401
- secondaryRowActions
18402
- }) : /* @__PURE__ */ jsx(DsTableCell, {
18403
- row,
18404
- cell
18405
- })
18406
- }, cell.id);
18407
- })
18408
- ]
18935
+ listeners,
18936
+ style: cellStyle
18937
+ }, cell.id);
18938
+ const isLastColumn = idx === row.getVisibleCells().length - 1;
18939
+ return /* @__PURE__ */ jsx(TableCell, {
18940
+ className: classNames(ds_table_row_module_default.tableCell, cell.column.id === "expander" && ds_table_row_module_default.expandableCell, cell.column.id === "select" && ds_table_row_module_default.selectableCell),
18941
+ style: cellStyle,
18942
+ children: isLastColumn ? /* @__PURE__ */ jsx(DsTableCell, {
18943
+ row,
18944
+ cell,
18945
+ primaryRowActions,
18946
+ secondaryRowActions
18947
+ }) : /* @__PURE__ */ jsx(DsTableCell, {
18948
+ row,
18949
+ cell
18950
+ })
18951
+ }, cell.id);
18952
+ })
18409
18953
  }), isExpanded && renderExpandedRow && /* @__PURE__ */ jsx(TableRow, {
18410
18954
  className: ds_table_row_module_default.expandedRow,
18411
18955
  children: /* @__PURE__ */ jsx(TableCell, {
18412
- colSpan: row.getVisibleCells().length + (selectable ? 1 : 0) + (reorderable ? 1 : 0),
18956
+ colSpan: row.getVisibleCells().length,
18413
18957
  className: ds_table_row_module_default.tableCell,
18414
18958
  children: renderExpandedRow(row.original)
18415
18959
  })
@@ -18442,6 +18986,30 @@ const DsTableRowExpandableCell = ({ row, buttonClassName }) => {
18442
18986
  });
18443
18987
  };
18444
18988
  //#endregion
18989
+ //#region src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx
18990
+ const DsTableRowSelectableCell = ({ row }) => {
18991
+ return /* @__PURE__ */ jsx(DsCheckbox, {
18992
+ className: ds_table_shared_module_default.checkboxContainer,
18993
+ checked: row.getIsSelected(),
18994
+ disabled: !row.getCanSelect(),
18995
+ onCheckedChange: (checked) => row.toggleSelected(!!checked),
18996
+ onClick: (e) => e.stopPropagation(),
18997
+ onDoubleClick: (e) => e.stopPropagation()
18998
+ });
18999
+ };
19000
+ //#endregion
19001
+ //#region src/components/ds-table/components/ds-table-header-selectable-cell/ds-table-header-selectable-cell.tsx
19002
+ const DsTableHeaderSelectableCell = ({ table }) => {
19003
+ const checked = table.getIsAllRowsSelected() ? true : table.getIsSomeRowsSelected() ? "indeterminate" : false;
19004
+ return /* @__PURE__ */ jsx(DsCheckbox, {
19005
+ className: ds_table_shared_module_default.checkboxContainer,
19006
+ checked,
19007
+ onCheckedChange: (nextChecked) => table.toggleAllRowsSelected(!!nextChecked),
19008
+ onClick: (e) => e.stopPropagation(),
19009
+ onDoubleClick: (e) => e.stopPropagation()
19010
+ });
19011
+ };
19012
+ //#endregion
18445
19013
  //#region src/components/ds-table/hooks/use-drag-and-drop.tsx
18446
19014
  const DragWrapper = ({ children, onDragEnd, sensors }) => /* @__PURE__ */ jsx(DndContext, {
18447
19015
  collisionDetection: closestCenter,
@@ -18510,7 +19078,7 @@ var ds_table_row_virtualized_module_default = {
18510
19078
  //#endregion
18511
19079
  //#region src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx
18512
19080
  const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent }) => {
18513
- const { selectable, bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick } = useDsTableContext();
19081
+ const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick } = useDsTableContext();
18514
19082
  const isExpanded = row.getIsExpanded();
18515
19083
  const isActive = activeRowId === row.id;
18516
19084
  return /* @__PURE__ */ jsx(TableRow, {
@@ -18532,15 +19100,11 @@ const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef,
18532
19100
  }, isExpandedRowContent && ds_table_row_virtualized_module_default.expandedRowContent, onRowClick && ds_table_row_virtualized_module_default.clickableRow, !bordered && ds_table_row_virtualized_module_default.rowNoBorder, isExpanded && ds_table_row_virtualized_module_default.expanded),
18533
19101
  onClick: isExpandedRowContent ? void 0 : () => onRowClick?.(row.original),
18534
19102
  onDoubleClick: isExpandedRowContent ? void 0 : () => onRowDoubleClick?.(row.original),
18535
- children: isExpandedRowContent ? /* @__PURE__ */ jsx(TableCell, { children: renderExpandedRow?.(row.original) }) : /* @__PURE__ */ jsxs(Fragment, { children: [selectable && /* @__PURE__ */ jsx(DsTableRowSelectableCell, {
18536
- row,
18537
- isSelected,
18538
- className: ds_table_row_virtualized_module_default.selectableCell
18539
- }), row.getVisibleCells().map((cell, idx) => {
19103
+ children: isExpandedRowContent ? /* @__PURE__ */ jsx(TableCell, { children: renderExpandedRow?.(row.original) }) : /* @__PURE__ */ jsx(Fragment, { children: row.getVisibleCells().map((cell, idx) => {
18540
19104
  const isLastColumn = idx === row.getVisibleCells().length - 1;
18541
19105
  return /* @__PURE__ */ jsx(TableCell, {
18542
19106
  style: getColumnSizeStyle(cell.column.getSize(), true),
18543
- className: classNames(ds_table_row_virtualized_module_default.cell, cell.column.id === "expander" && ds_table_row_virtualized_module_default.expandableCell),
19107
+ className: classNames(ds_table_row_virtualized_module_default.cell, cell.column.id === "expander" && ds_table_row_virtualized_module_default.expandableCell, cell.column.id === "select" && ds_table_row_virtualized_module_default.selectableCell),
18544
19108
  children: isLastColumn ? /* @__PURE__ */ jsx(DsTableCell, {
18545
19109
  row,
18546
19110
  cell,
@@ -18551,12 +19115,41 @@ const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef,
18551
19115
  cell
18552
19116
  })
18553
19117
  }, cell.id);
18554
- })] })
19118
+ }) })
18555
19119
  });
18556
19120
  };
18557
19121
  //#endregion
19122
+ //#region src/components/ds-table/components/ds-table-body-virtualized/use-infinite-scroll.ts
19123
+ const DEFAULT_THRESHOLD_PX = 500;
19124
+ const DEFAULT_AUTO_FILL = true;
19125
+ /**
19126
+ * Owns the infinite-scroll trigger logic for `DsTable`:
19127
+ * threshold detection and the auto-fill loop for short initial pages.
19128
+ */
19129
+ const useInfiniteScroll = (scrollElementRef, rowCount, config) => {
19130
+ const hasMore = config?.hasMore ?? false;
19131
+ const isLoadingMore = config?.isLoadingMore ?? false;
19132
+ const thresholdPx = config?.thresholdPx ?? DEFAULT_THRESHOLD_PX;
19133
+ const autoFill = config?.autoFill ?? DEFAULT_AUTO_FILL;
19134
+ const loadDataIfNeeded = () => {
19135
+ const el = scrollElementRef.current;
19136
+ if (!config || !hasMore || isLoadingMore || !el) return;
19137
+ const isScrollable = el.scrollHeight > el.clientHeight;
19138
+ const distanceToBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
19139
+ if (isScrollable && distanceToBottom <= thresholdPx || autoFill && !isScrollable) config.onLoadMore();
19140
+ };
19141
+ useEffect(() => {
19142
+ loadDataIfNeeded();
19143
+ }, [
19144
+ rowCount,
19145
+ hasMore,
19146
+ isLoadingMore
19147
+ ]);
19148
+ return { loadDataIfNeeded };
19149
+ };
19150
+ //#endregion
18558
19151
  //#region src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.tsx
18559
- const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimateSize, overscan, onScroll, rowSelection }) => {
19152
+ const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimateSize, overscan, onScroll, rowSelection, infiniteScroll }) => {
18560
19153
  const rowsMapRef = useRef(/* @__PURE__ */ new Map());
18561
19154
  const rowHeightsMapRef = useRef(/* @__PURE__ */ new Map());
18562
19155
  const { rows } = table.getRowModel();
@@ -18568,6 +19161,7 @@ const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimate
18568
19161
  const item = rowsAndExpandedRowContent[index];
18569
19162
  return item ? `${item.row.id}${item.isExpandedRowContent ? "-expanded-content" : ""}` : String(index);
18570
19163
  };
19164
+ const { loadDataIfNeeded } = useInfiniteScroll(tableContainerRef, rows.length, infiniteScroll);
18571
19165
  const rowVirtualizer = useVirtualizer({
18572
19166
  count: rowsAndExpandedRowContent.length,
18573
19167
  estimateSize: (index) => {
@@ -18585,18 +19179,21 @@ const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimate
18585
19179
  row.style.transform = `translateY(${virtualRow.start.toString()}px)`;
18586
19180
  });
18587
19181
  });
18588
- if (sync && onScroll) {
18589
- const scrollOffset = instance.scrollOffset || 0;
18590
- const totalContentHeight = instance.getTotalSize();
18591
- const viewportHeight = instance.scrollElement?.clientHeight;
18592
- const scrollDirection = instance.scrollDirection;
18593
- if (viewportHeight) onScroll({
18594
- scrollOffset,
18595
- totalContentHeight,
18596
- viewportHeight,
18597
- bottomOffset: totalContentHeight - (scrollOffset + viewportHeight),
18598
- scrollDirection
18599
- });
19182
+ if (sync) {
19183
+ if (onScroll) {
19184
+ const scrollOffset = instance.scrollOffset || 0;
19185
+ const totalContentHeight = instance.getTotalSize();
19186
+ const viewportHeight = instance.scrollElement?.clientHeight;
19187
+ const scrollDirection = instance.scrollDirection;
19188
+ if (viewportHeight) onScroll({
19189
+ scrollOffset,
19190
+ totalContentHeight,
19191
+ viewportHeight,
19192
+ bottomOffset: totalContentHeight - (scrollOffset + viewportHeight),
19193
+ scrollDirection
19194
+ });
19195
+ }
19196
+ loadDataIfNeeded();
18600
19197
  }
18601
19198
  }
18602
19199
  });
@@ -18645,7 +19242,7 @@ const ROW_SIZE_HEIGHT_MAP = {
18645
19242
  /**
18646
19243
  * Design system Table component
18647
19244
  */
18648
- const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = false, virtualizedOptions, className, onRowClick, emptyState, stickyHeader = true, bordered = true, fullWidth = true, rowSize = "medium", expandable = false, renderExpandedRow, selectable = false, showSelectAllCheckbox = true, onSelectionChange, onSortingChange, onScroll, actions = [], onRowDoubleClick, primaryRowActions = [], secondaryRowActions, reorderable = false, onOrderChange, columnFilters: externalColumnFilters, onColumnFiltersChange, columnVisibility: externalColumnVisibility, onColumnVisibilityChange, activeRowId }) => {
19245
+ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = false, virtualizedOptions, className, onRowClick, emptyState, stickyHeader = true, bordered = true, fullWidth = true, rowSize = "medium", expandable = false, renderExpandedRow, selectable = false, showSelectAllCheckbox = true, onSelectionChange, onSortingChange, onScroll, actions = [], onRowDoubleClick, primaryRowActions = [], secondaryRowActions, reorderable = false, onOrderChange, columnFilters: externalColumnFilters, onColumnFiltersChange, columnVisibility: externalColumnVisibility, onColumnVisibilityChange, activeRowId, infiniteScroll }) => {
18649
19246
  const [data, setData] = React$1.useState(tableData);
18650
19247
  const [sorting, setSorting] = React$1.useState([]);
18651
19248
  const [internalColumnFilters, setInternalColumnFilters] = React$1.useState([]);
@@ -18682,17 +19279,52 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
18682
19279
  setRowSelection(newRowSelection);
18683
19280
  onSelectionChange?.(newRowSelection);
18684
19281
  };
19282
+ const hasExpanderColumn = !!expandable;
19283
+ const hasSelectColumn = !!selectable;
19284
+ const hasReorderColumn = reorderable && !virtualized;
18685
19285
  const columns = useMemo(() => {
18686
- if (!expandable) return columnsProp;
18687
- return [{
18688
- id: EXPANDER_COLUMN_ID,
18689
- size: 36,
18690
- enableSorting: false,
18691
- enableResizing: false,
18692
- header: () => null,
18693
- cell: ({ row }) => row.getCanExpand() ? /* @__PURE__ */ jsx(DsTableRowExpandableCell, { row }) : null
18694
- }, ...columnsProp];
18695
- }, [columnsProp, expandable]);
19286
+ const augmentedColumns = [...columnsProp];
19287
+ if (hasSelectColumn) {
19288
+ const selectColumn = {
19289
+ id: SELECT_COLUMN_ID,
19290
+ size: 36,
19291
+ enableSorting: false,
19292
+ enableResizing: false,
19293
+ header: ({ table }) => showSelectAllCheckbox ? /* @__PURE__ */ jsx(DsTableHeaderSelectableCell, { table }) : null,
19294
+ cell: ({ row }) => /* @__PURE__ */ jsx(DsTableRowSelectableCell, { row })
19295
+ };
19296
+ augmentedColumns.unshift(selectColumn);
19297
+ }
19298
+ if (hasExpanderColumn) {
19299
+ const expanderColumn = {
19300
+ id: EXPANDER_COLUMN_ID,
19301
+ size: 36,
19302
+ enableSorting: false,
19303
+ enableResizing: false,
19304
+ header: () => null,
19305
+ cell: ({ row }) => row.getCanExpand() ? /* @__PURE__ */ jsx(DsTableRowExpandableCell, { row }) : null
19306
+ };
19307
+ augmentedColumns.unshift(expanderColumn);
19308
+ }
19309
+ if (hasReorderColumn) {
19310
+ const reorderColumn = {
19311
+ id: REORDER_COLUMN_ID,
19312
+ size: 60,
19313
+ enableSorting: false,
19314
+ enableResizing: false,
19315
+ header: "Order",
19316
+ cell: () => null
19317
+ };
19318
+ augmentedColumns.unshift(reorderColumn);
19319
+ }
19320
+ return augmentedColumns;
19321
+ }, [
19322
+ columnsProp,
19323
+ hasExpanderColumn,
19324
+ hasReorderColumn,
19325
+ hasSelectColumn,
19326
+ showSelectAllCheckbox
19327
+ ]);
18696
19328
  const table = useReactTable({
18697
19329
  data: reorderable ? data : tableData,
18698
19330
  columns,
@@ -18755,7 +19387,7 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
18755
19387
  }), [table]);
18756
19388
  const { rows, rowsById } = table.getRowModel();
18757
19389
  const renderEmptyState = () => /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
18758
- colSpan: columns.length + (selectable ? 1 : 0) + (reorderable ? 1 : 0),
19390
+ colSpan: columns.length,
18759
19391
  className: ds_table_module_default.emptyState,
18760
19392
  children: emptyState || "No results."
18761
19393
  }) });
@@ -18792,7 +19424,8 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
18792
19424
  estimateSize: virtualizedOptions?.estimateSize || ROW_SIZE_HEIGHT_MAP[rowSize],
18793
19425
  overscan: virtualizedOptions?.overscan,
18794
19426
  onScroll,
18795
- rowSelection
19427
+ rowSelection,
19428
+ infiniteScroll
18796
19429
  }) : /* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsx(SortableWrapper, { children: rows.length ? rows.map((row) => /* @__PURE__ */ jsx(DsTableRow, {
18797
19430
  row,
18798
19431
  isSelected: !!rowSelection[row.id]
@@ -19945,6 +20578,6 @@ DsWorkspace.SubHeader = SubHeader;
19945
20578
  DsWorkspace.Content = Content;
19946
20579
  DsWorkspace.Footer = Footer;
19947
20580
  //#endregion
19948
- export { BREAKPOINT_LG, DsAlertBanner, DsAutocomplete, DsAvatar, DsAvatarGroup, DsBreadcrumb, DsButton, DsButtonV3, DsCard, DsCheckbox, DsCheckboxGroup, DsChip, DsChipGroup, DsCommentBubble, DsCommentCard, DsCommentIndicator, DsCommentThread, DsCommentsDrawer, DsConfirmation, DsDateInput, DsDatePicker, DsDateRangePicker, DsDialog, DsDivider, DsDrawer, DsDropdownMenu, DsDropdownMenuLegacy, DsExpandableTextInput, DsFileUpload, DsFilterStatusIcon, DsFormControl, DsGrid, DsGridItem, DsIcon, DsKeyValuePair, DsLoader, DsModal, DsNextStepButton, DsNumberInput, DsPanel, DsPasswordInput, DsPopover, DsProgressArc, DsProgressDonut, DsProgressLinear, DsRadioGroup, DsRadioGroupLegacy, DsSegmentGroup, DsSelect, ds_skeleton_default as DsSkeleton, DsSkeletonCircle, DsSkeletonRect, DsSkeletonText, DsSmartTabs, DsSpinner, DsSplitButton, DsStack, DsStatusBadge, DsStep, DsStepContent, DsStepper, DsSystemStatus, DsTable, DsTabs, DsTag, DsTagFilter, DsTextInput, DsTextarea, DsThreadItem, DsTimePicker, DsToastProvider, DsToggle, DsTooltip, DsTree, DsTypography, DsVerticalTabs, DsWorkspace, FatalFileUploadError, FileUpload, FileUploadError, RetryableFileUploadError, alertBannerVariants, breakpoints, buttonV3Colors, buttonV3Sizes, buttonV3Variants, cardSizes, checkboxVariants, colors, controlStatuses, createCheckboxFilterAdapter, createDsTreeCollection, createDualRangeFilterAdapter, createFilterAdapter, customIcons, dropdownMenuItemVariants, dsKeyValuePairOrientations, filterStatuses, formatTime, iconColors, iconSizes, iconVariants, isCustomIcon, isResponsiveValue, loaderVariants, progressArcSizes, progressArcVariants, progressDonutSizes, progressDonutVariants, progressLinearSizes, progressLinearVariants, resolveResponsiveValue, skeletonColorVariants, skeletonRadiusVariants, spinnerSizes, splitButtonSizes, systemStatuses, tagSizes, tagVariants, textInputSizes, useBreakpoint, useCheckboxSelectAll, useFileUpload, useResponsiveValue, useTableFilters, useToaster, withResponsiveProps };
20581
+ export { BREAKPOINT_LG, DsAlertBanner, DsAutocomplete, DsAvatar, DsAvatarGroup, DsBreadcrumb, DsButton, DsButtonV3, DsCard, DsCatalogLayout, DsCheckbox, DsCheckboxGroup, DsChip, DsChipGroup, DsCommentBubble, DsCommentCard, DsCommentIndicator, DsCommentThread, DsCommentsDrawer, DsConfirmation, DsDateInput, DsDatePicker, DsDateRangePicker, DsDialog, DsDivider, DsDrawer, DsDropdownMenu, DsDropdownMenuLegacy, DsExpandableTextInput, DsFileUpload, DsFilterStatusIcon, DsFormControl, DsGrid, DsGridItem, DsIcon, DsKeyValuePair, DsLoader, DsModal, DsNextStepButton, DsNumberInput, DsPanel, DsPasswordInput, DsPopover, DsProgressArc, DsProgressDonut, DsProgressLinear, DsRadioGroup, DsRadioGroupLegacy, DsSegmentGroup, DsSelect, ds_skeleton_default as DsSkeleton, DsSkeletonCircle, DsSkeletonRect, DsSkeletonText, DsSmartTabs, DsSpinner, DsSplitButton, DsStack, DsStatusBadge, DsStatusBadgeV2, DsStep, DsStepContent, DsStepper, DsSystemStatus, DsTable, DsTabs, DsTag, DsTagFilter, DsTextInput, DsTextarea, DsThreadItem, DsTimePicker, DsToastProvider, DsToggle, DsTooltip, DsTree, DsTypography, DsVerticalTabs, DsWorkspace, FatalFileUploadError, FileUpload, FileUploadError, RetryableFileUploadError, alertBannerVariants, breakpoints, buttonV3Colors, buttonV3Sizes, buttonV3Variants, cardSizes, checkboxVariants, colors, controlStatuses, createCheckboxFilterAdapter, createDsTreeCollection, createDualRangeFilterAdapter, createFilterAdapter, customIcons, dropdownMenuItemVariants, dsKeyValuePairOrientations, filterStatuses, formatTime, iconColors, iconSizes, iconVariants, isCustomIcon, isResponsiveValue, loaderVariants, progressArcSizes, progressArcVariants, progressDonutSizes, progressDonutVariants, progressLinearSizes, progressLinearVariants, resolveResponsiveValue, skeletonColorVariants, skeletonRadiusVariants, spinnerSizes, splitButtonSizes, statusBadgeV2Phases, statusBadgeV2Sizes, statusBadgeV2Variants, systemStatuses, tagSizes, tagVariants, textInputSizes, useBreakpoint, useCheckboxSelectAll, useFileUpload, useResponsiveValue, useTableFilters, useToaster, withResponsiveProps };
19949
20582
 
19950
20583
  //# sourceMappingURL=index.js.map