@heliux-org/design-system-core 0.0.317-test → 0.0.317

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. package/dist/components/Icon/Icons/components/Lines.js +21 -0
  2. package/dist/components/Icon/Icons/components/Lines.js.map +1 -0
  3. package/dist/components/Icon/Icons/components/Notifications.js +21 -0
  4. package/dist/components/Icon/Icons/components/Notifications.js.map +1 -0
  5. package/dist/components/Icon/Icons/components/Update.js +21 -0
  6. package/dist/components/Icon/Icons/components/Update.js.map +1 -0
  7. package/dist/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js +3 -10
  8. package/dist/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js.map +1 -1
  9. package/dist/esm/components/Icon/Icons/components/Lines.d.ts +7 -0
  10. package/dist/esm/components/Icon/Icons/components/Lines.d.ts.map +1 -0
  11. package/dist/esm/components/Icon/Icons/components/Notifications.d.ts +7 -0
  12. package/dist/esm/components/Icon/Icons/components/Notifications.d.ts.map +1 -0
  13. package/dist/esm/components/Icon/Icons/components/Update.d.ts +7 -0
  14. package/dist/esm/components/Icon/Icons/components/Update.d.ts.map +1 -0
  15. package/dist/esm/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.d.ts.map +1 -1
  16. package/dist/esm/src/components/Icon/Icons/components/Lines.js +2 -0
  17. package/dist/esm/src/components/Icon/Icons/components/Lines.js.map +1 -0
  18. package/dist/esm/src/components/Icon/Icons/components/Notifications.js +2 -0
  19. package/dist/esm/src/components/Icon/Icons/components/Notifications.js.map +1 -0
  20. package/dist/esm/src/components/Icon/Icons/components/Update.js +2 -0
  21. package/dist/esm/src/components/Icon/Icons/components/Update.js.map +1 -0
  22. package/dist/esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js +1 -1
  23. package/dist/esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js.map +1 -1
  24. package/dist/icons/Lines.js +3 -0
  25. package/dist/icons/Lines.js.LICENSE.txt +8 -0
  26. package/dist/icons/Lines.js.map +1 -0
  27. package/dist/icons/Notifications.js +3 -0
  28. package/dist/icons/Notifications.js.LICENSE.txt +8 -0
  29. package/dist/icons/Notifications.js.map +1 -0
  30. package/dist/icons/Update.js +3 -0
  31. package/dist/icons/Update.js.LICENSE.txt +8 -0
  32. package/dist/icons/Update.js.map +1 -0
  33. package/dist/main.js +1 -1
  34. package/dist/main.js.map +1 -1
  35. package/dist/mocked_classnames_esm/components/Icon/Icons/components/Lines.d.ts +7 -0
  36. package/dist/mocked_classnames_esm/components/Icon/Icons/components/Lines.d.ts.map +1 -0
  37. package/dist/mocked_classnames_esm/components/Icon/Icons/components/Notifications.d.ts +7 -0
  38. package/dist/mocked_classnames_esm/components/Icon/Icons/components/Notifications.d.ts.map +1 -0
  39. package/dist/mocked_classnames_esm/components/Icon/Icons/components/Update.d.ts +7 -0
  40. package/dist/mocked_classnames_esm/components/Icon/Icons/components/Update.d.ts.map +1 -0
  41. package/dist/mocked_classnames_esm/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.d.ts.map +1 -1
  42. package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Lines.js +2 -0
  43. package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Lines.js.map +1 -0
  44. package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Notifications.js +2 -0
  45. package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Notifications.js.map +1 -0
  46. package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Update.js +2 -0
  47. package/dist/mocked_classnames_esm/src/components/Icon/Icons/components/Update.js.map +1 -0
  48. package/dist/mocked_classnames_esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js +1 -1
  49. package/dist/mocked_classnames_esm/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.js.map +1 -1
  50. package/dist/types/components/Icon/Icons/components/Lines.d.ts +7 -0
  51. package/dist/types/components/Icon/Icons/components/Lines.d.ts.map +1 -0
  52. package/dist/types/components/Icon/Icons/components/Notifications.d.ts +7 -0
  53. package/dist/types/components/Icon/Icons/components/Notifications.d.ts.map +1 -0
  54. package/dist/types/components/Icon/Icons/components/Update.d.ts +7 -0
  55. package/dist/types/components/Icon/Icons/components/Update.d.ts.map +1 -0
  56. package/dist/types/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.d.ts.map +1 -1
  57. package/package.json +2 -2
  58. package/src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx +3 -11
  59. package/dist/0321608e455c2c0eb137.woff +0 -1
  60. package/dist/03e4492a7714ed272a52.woff2 +0 -1
  61. package/dist/06aeb38caaec72476733.woff2 +0 -1
  62. package/dist/076f6175d9244d105e2e.woff +0 -1
  63. package/dist/084cd76aae009bf3d3ab.woff2 +0 -1
  64. package/dist/10a762b1fd7e18bee7dd.woff2 +0 -1
  65. package/dist/1c1d57500b956fb965fc.woff +0 -1
  66. package/dist/1d916756862fe6253c66.woff +0 -1
  67. package/dist/1e3a610311aa3c5fab96.woff2 +0 -1
  68. package/dist/1f20dfeb5533468fc81e.woff +0 -1
  69. package/dist/2ba081901fd49483a7c4.woff +0 -1
  70. package/dist/2ba227f8ac8ad61efd8d.woff2 +0 -1
  71. package/dist/2c8ae4cdfcc81627adf1.woff2 +0 -1
  72. package/dist/2e9f17c1f5c47e3e29ed.woff +0 -1
  73. package/dist/36b9d9b9b21b6e18c79d.woff +0 -1
  74. package/dist/4bbe1884f16c169995a9.woff +0 -1
  75. package/dist/4f0fbce4eb52d3e1219e.woff +0 -1
  76. package/dist/4fa97e4df09262d1b6a7.woff +0 -1
  77. package/dist/5294f100ea28a0b1c96d.woff +0 -1
  78. package/dist/562f320c7c8dce4a2152.woff2 +0 -1
  79. package/dist/569dd238d32f5f42fa28.woff2 +0 -1
  80. package/dist/5dd9e5711442d63ee224.woff +0 -1
  81. package/dist/6038f6f669220b54b790.woff +0 -1
  82. package/dist/630dfba43151b2c6f59e.woff +0 -1
  83. package/dist/654dba02955efb56ad1e.woff2 +0 -1
  84. package/dist/69cb6de48166f8fd9147.woff2 +0 -1
  85. package/dist/70a030291bb3a996ab02.woff +0 -1
  86. package/dist/7848beae55a65fbf8b9f.woff2 +0 -1
  87. package/dist/79f1fc391f7316c63dd9.woff +0 -1
  88. package/dist/7b0fb9b41302c6c3089a.woff +0 -1
  89. package/dist/7cb33355fa5c4c3b010a.woff +0 -1
  90. package/dist/80d0cd9e3cbf980b5552.woff +0 -1
  91. package/dist/87c1ca97538f29995134.woff +0 -1
  92. package/dist/8a0a29805c01c3ec645b.woff2 +0 -1
  93. package/dist/8bfe04a5a6a8cd05b121.woff2 +0 -1
  94. package/dist/90c68ac887776fdf1ae7.woff2 +0 -1
  95. package/dist/9116cc08640e4fe841c9.woff2 +0 -1
  96. package/dist/91907514fa1d4426625f.woff2 +0 -1
  97. package/dist/955bc62b385e30c902fb.woff2 +0 -1
  98. package/dist/960415db24032600c321.woff +0 -1
  99. package/dist/Alliance-Mono.66ceb65f7020d57d50b9953420f2a211.woff2 +0 -0
  100. package/dist/Alliance-Mono.6dff4ee633b4cd8b6b39adfee1525fcf.woff +0 -0
  101. package/dist/Alliance-NeueBlack.691e82d42b380a7fe68f392943c5cf63.woff +0 -0
  102. package/dist/Alliance-NeueBlack.c9b2b494eb80f7f2103eb59f8cf73390.woff2 +0 -0
  103. package/dist/Alliance-NeueBlackItalic.10a7cf76e9c63de3773ad70e992393ff.woff2 +0 -0
  104. package/dist/Alliance-NeueBlackItalic.66c62da463c3ce5c494d4d02fed59ed5.woff +0 -0
  105. package/dist/Alliance-NeueBold.136d07570e1fc99faa06c97250b49028.woff +0 -0
  106. package/dist/Alliance-NeueBold.8b45276c8d5867ea6b1e232e36869275.woff2 +0 -0
  107. package/dist/Alliance-NeueBoldItalic.b66ab0190dcf7b5da696910962640587.woff +0 -0
  108. package/dist/Alliance-NeueBoldItalic.c431ed0a2362f8d52494a1ca2aebaf98.woff2 +0 -0
  109. package/dist/Alliance-NeueExtraBold.345cfd636ceea3a1a0f6447d32b45543.woff2 +0 -0
  110. package/dist/Alliance-NeueExtraBold.7b57046ebc97a545f2bbee467dfaef98.woff +0 -0
  111. package/dist/Alliance-NeueExtraBoldtalic.1954637cd7a765c3e5650aff022b421a.woff2 +0 -0
  112. package/dist/Alliance-NeueExtraBoldtalic.5c8fa8cd79a6d09061dea2d2693c718c.woff +0 -0
  113. package/dist/Alliance-NeueLight.25338105b4de064cde15c1f9cadd4650.woff +0 -0
  114. package/dist/Alliance-NeueLight.2973470e0640c3bdee6627df36c35b1f.woff2 +0 -0
  115. package/dist/Alliance-NeueLightItalic.297ffdb5c554283afbb569b189a14537.woff +0 -0
  116. package/dist/Alliance-NeueLightItalic.fcd095115aef9c8af77cb9686c8a8b93.woff2 +0 -0
  117. package/dist/Alliance-NeueMedium.01099e901d8d36c4208d239c508df07f.woff +0 -0
  118. package/dist/Alliance-NeueMedium.250c3a2ede6ce02f4a235d279ce64015.woff2 +0 -0
  119. package/dist/Alliance-NeueMediumItalic.0b03efa08247214660c7927ef3bcd684.woff2 +0 -0
  120. package/dist/Alliance-NeueMediumItalic.435b0f6f271370b0839fd41ee78b094c.woff +0 -0
  121. package/dist/Alliance-NeueRegular.47aa3c5bb709255fac998d6c67dc56ca.woff +0 -0
  122. package/dist/Alliance-NeueRegular.8f03f0afb95f824228031d82e566c3e9.woff2 +0 -0
  123. package/dist/Alliance-NeueRegularItalic.1b9ba53f26dcc0beb84475fef8430ef0.woff2 +0 -0
  124. package/dist/Alliance-NeueRegularItalic.973c21b55a914d39a30995ade99a5b78.woff +0 -0
  125. package/dist/Alliance-NeueSemiBold.4847a2111cc8855a1e79e9ae209720be.woff2 +0 -0
  126. package/dist/Alliance-NeueSemiBold.f2798934e74c3cb482ac1683830f2b8f.woff +0 -0
  127. package/dist/Alliance-NeueSemiBoldItalic.4082afcc8ecc984a4d8dfa99ef2ba531.woff +0 -0
  128. package/dist/Alliance-NeueSemiBoldItalic.c3776e542750e50906a6007ff958739e.woff2 +0 -0
  129. package/dist/Alliance-PlattBlack.904e8c770706fdbf73a8f598d7780e36.woff2 +0 -0
  130. package/dist/Alliance-PlattBlack.da4786673aaa2c4b4f8db6f2a985693d.woff +0 -0
  131. package/dist/Alliance-PlattBold.8458a3bda74267bf5d97e23d7ddcdfda.woff2 +0 -0
  132. package/dist/Alliance-PlattBold.c8b0c1f510bf8de7daafe6f7f60cc973.woff +0 -0
  133. package/dist/Alliance-PlattExtraBold.71e76016cb243cb61f4c7defee5eb11c.woff2 +0 -0
  134. package/dist/Alliance-PlattExtraBold.dbc02abfebdd8b0887346d6720e25fcb.woff +0 -0
  135. package/dist/Alliance-PlattLight.b5fb6bb4bf91a7aaa50c85949ef1c9e5.woff2 +0 -0
  136. package/dist/Alliance-PlattLight.d8e13db10ac0902e5aa9a4f09233d734.woff +0 -0
  137. package/dist/Alliance-PlattMedium.11d2826e26962217b6c97cd313226e6d.woff +0 -0
  138. package/dist/Alliance-PlattMedium.6f4a6159caca9ab9558785b090d441b4.woff2 +0 -0
  139. package/dist/Alliance-PlattRegular.48fea4af52bcd858ce6daf3c0dbe4c8d.woff +0 -0
  140. package/dist/Alliance-PlattRegular.902e557cc62aff17d1b5337c708c435a.woff2 +0 -0
  141. package/dist/Alliance-PlattSemiBold.db0557b7781482567e41bf25d764fcc7.woff2 +0 -0
  142. package/dist/Alliance-PlattSemiBold.f44bfcba9cd05a5294d6a9d7a1332834.woff +0 -0
  143. package/dist/Alliance-TextBlack.59b92307682bb394d25b248a7650684c.woff2 +0 -0
  144. package/dist/Alliance-TextBlack.e7ebb6275c8bf2c533acffc78b57ec40.woff +0 -0
  145. package/dist/Alliance-TextBlackItalic.386a08442f3625ff3fbeff59bfff88fb.woff2 +0 -0
  146. package/dist/Alliance-TextBlackItalic.7c761b0f2c601d1a483c233fa64e6195.woff +0 -0
  147. package/dist/Alliance-TextBold.0204dde18eabd48872bc9c65a16931da.woff +0 -0
  148. package/dist/Alliance-TextBold.6cfdc9d232b607d3df66c48fd6a06deb.woff2 +0 -0
  149. package/dist/Alliance-TextBoldItalic.3a370a4e1fa49031c3f61a7513f6520f.woff +0 -0
  150. package/dist/Alliance-TextBoldItalic.582f881e26bdb790d1abc74b656a3fe0.woff2 +0 -0
  151. package/dist/Alliance-TextExtraBold.03446f23dd9b11b08a5006531ba166b9.woff2 +0 -0
  152. package/dist/Alliance-TextExtraBold.3936ac0e60ab737d0f741a417e625d8a.woff +0 -0
  153. package/dist/Alliance-TextExtraBoldItalic.6dc1dda9720e775f33dc9a95161fdd7a.woff +0 -0
  154. package/dist/Alliance-TextExtraBoldItalic.eaa4c684c6cbd502a918ad049054ad2b.woff2 +0 -0
  155. package/dist/Alliance-TextLight.4b7978710036d8d520cfe27e43018cdf.woff +0 -0
  156. package/dist/Alliance-TextLight.69f2e3adff94869a1d8a4187c349168f.woff2 +0 -0
  157. package/dist/Alliance-TextLightItalic.232301dc2e7000ba9ed6148e1f0f52f9.woff +0 -0
  158. package/dist/Alliance-TextLightItalic.5d51d5ad082ebe1aacecc2eff492708e.woff2 +0 -0
  159. package/dist/a087eb4090588a9e2f31.woff +0 -1
  160. package/dist/a692e5280973d5bccc56.woff2 +0 -1
  161. package/dist/aa15dfce8e6c09d389f7.woff2 +0 -1
  162. package/dist/b68556ab4037b1b26d3d.woff +0 -1
  163. package/dist/baf031e9a4e6a4f6723b.woff2 +0 -1
  164. package/dist/c132cf11513373fc7bc2.woff2 +0 -1
  165. package/dist/c304d1719feae90e906e.woff +0 -1
  166. package/dist/cdc6804d0466d99538c9.woff2 +0 -1
  167. package/dist/d1636e933a778d68d5b6.woff +0 -1
  168. package/dist/d2e40ec0d766229dafc4.woff2 +0 -1
  169. package/dist/d3eb25d52c7b72bf8f9e.woff2 +0 -1
  170. package/dist/e7545ddeb1878c5461e7.woff +0 -1
  171. package/dist/eb5b5d5c887f361eb8e5.woff2 +0 -1
  172. package/dist/eedd61db98681f841881.woff +0 -1
  173. package/dist/ef8fed5f48c767383a5b.woff2 +0 -1
  174. package/dist/f19bb93b3eac14f4e495.woff2 +0 -1
  175. package/dist/f5ceea15e8999492c520.woff +0 -1
  176. package/dist/f7331d98e27b665a33b7.woff2 +0 -1
  177. package/dist/f9324444aaeb0801d449.woff2 +0 -1
  178. package/dist/fcfcfcf356c2ff7b94cd.woff +0 -1
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface LinesProps extends React.SVGAttributes<SVGElement> {
3
+ size?: string | number;
4
+ }
5
+ declare const Lines: React.FC<LinesProps>;
6
+ export default Lines;
7
+ //# sourceMappingURL=Lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Lines.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACnE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAK/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface NotificationsProps extends React.SVGAttributes<SVGElement> {
3
+ size?: string | number;
4
+ }
5
+ declare const Notifications: React.FC<NotificationsProps>;
6
+ export default Notifications;
7
+ //# sourceMappingURL=Notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notifications.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Notifications.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IAC3E,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAK/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface UpdateProps extends React.SVGAttributes<SVGElement> {
3
+ size?: string | number;
4
+ }
5
+ declare const Update: React.FC<UpdateProps>;
6
+ export default Update;
7
+ //# sourceMappingURL=Update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Update.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAKjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLeafyGreenTable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAgC,MAAM,GAAG,CAAC;AAYlE,QAAA,MAAM,kBAAkB,ogBAyVvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"useLeafyGreenTable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAgC,MAAM,GAAG,CAAC;AAYlE,QAAA,MAAM,kBAAkB,ogBAiVvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{__rest as r}from"../../../../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";var t=function(t){var i=t.size,o=r(t,["size"]);return e("svg",Object.assign({viewBox:"0 0 20 20",fill:"currentColor",width:i||"20",height:i||"20"},o,{children:e("path",{d:"M16.8 5H2.79999M16.8 10H2.79999M16.8 15H2.79999",stroke:"currentColor",fill:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))};t.displayName="Lines";export{t as default};
2
+ //# sourceMappingURL=Lines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Lines.js","sources":["../../../../../../../src/components/Icon/Icons/components/Lines.tsx"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\nimport * as React from 'react';\nexport interface LinesProps extends React.SVGAttributes<SVGElement> {\nsize?: string | number;\n}\nconst Lines: React.FC<LinesProps> = ({size, ...props}) => (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width={ size || \"20\" } height={ size || \"20\" } {...props}>\n <path d=\"M16.8 5H2.79999M16.8 10H2.79999M16.8 15H2.79999\" stroke=\"currentColor\" fill=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"\n />\n </svg>\n);\nLines.displayName = 'Lines';\nexport default Lines;\n/* tslint:enable */\n/* eslint-enable */\n"],"names":["Lines","_a","size","props","__rest","_jsx","viewBox","fill","width","height","children","d","stroke","strokeWidth","strokeLinecap","strokeLinejoin","displayName"],"mappings":"mGAMA,IAAMA,EAA8B,SAACC,GAAA,IAACC,EAAeD,EAAfC,KAASC,EAAKC,EAAAH,EAAf,UAAqB,OACxDI,uBAAKC,QAAQ,YAAYC,KAAK,eAAeC,MAAQN,GAAQ,KAAOO,OAASP,GAAQ,MAAWC,EAC9F,CAAAO,SAAAL,EAAA,OAAA,CAAMM,EAAE,kDAAkDC,OAAO,eAAeL,KAAK,eAAeM,YAAY,MAAMC,cAAc,QAAQC,eAAe,cAI/Jf,EAAMgB,YAAc"}
@@ -0,0 +1,2 @@
1
+ import{__rest as C}from"../../../../../_virtual/_tslib.js";import{jsx as i}from"react/jsx-runtime";var e=function(e){var r=e.size,t=C(e,["size"]);return i("svg",Object.assign({viewBox:"0 0 20 20",fill:"currentColor",width:r||"20",height:r||"20"},t,{children:i("path",{d:"M10 2.04999C10.4143 2.04999 10.75 2.38577 10.75 2.79999V3.61058C12.0546 3.75821 13.2785 4.34336 14.2159 5.28079C15.309 6.37389 15.9231 7.85644 15.9231 9.4023C15.9231 11.7406 16.1727 13.0548 16.3959 13.758C16.5068 14.1075 16.6088 14.2984 16.6645 14.3868C16.6835 14.4168 16.697 14.435 16.7038 14.4435C16.9179 14.6455 16.9953 14.9565 16.8964 15.2377C16.7908 15.538 16.5072 15.7389 16.1889 15.7389H12.9529C12.9516 15.8038 12.9418 15.8695 12.9226 15.9348C12.7439 16.5449 12.3725 17.0809 11.864 17.4623C11.3554 17.8437 10.7371 18.05 10.1015 18.05C9.46584 18.05 8.84746 17.8437 8.33891 17.4623C7.83037 17.0809 7.45905 16.5449 7.28027 15.9348C7.26115 15.8695 7.2513 15.8038 7.24997 15.7389H4.00001C3.71313 15.7389 3.45138 15.5752 3.32575 15.3173C3.20248 15.0643 3.23145 14.764 3.39963 14.5394C3.40133 14.5369 3.40486 14.5316 3.41004 14.5235C3.42459 14.5005 3.45231 14.4542 3.48918 14.3812C3.56285 14.2352 3.67358 13.9813 3.78854 13.5917C4.01863 12.812 4.26574 11.4886 4.26574 9.4023C4.26574 7.85644 4.87984 6.37389 5.97293 5.28079C6.865 4.38872 8.01646 3.81567 9.25004 3.63507V2.79999C9.25004 2.38577 9.58582 2.04999 10 2.04999ZM8.80705 15.7389C8.90698 15.9443 9.05465 16.1241 9.2389 16.2623C9.488 16.4491 9.79062 16.55 10.1015 16.55C10.4123 16.55 10.7149 16.4491 10.964 16.2623C11.1483 16.1241 11.2959 15.9443 11.3959 15.7389H8.80705ZM7.03359 6.34145C7.84538 5.52967 8.9464 5.07361 10.0944 5.07361C11.2425 5.07361 12.3435 5.52967 13.1553 6.34145C13.9671 7.15324 14.4231 8.25426 14.4231 9.4023C14.4231 11.8353 14.6814 13.3144 14.9661 14.2117L14.9748 14.2389H5.15815C5.18119 14.1682 5.20426 14.0941 5.22721 14.0163C5.50499 13.075 5.76574 11.6052 5.76574 9.4023C5.76574 8.25426 6.2218 7.15324 7.03359 6.34145Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}))};e.displayName="Notifications";export{e as default};
2
+ //# sourceMappingURL=Notifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notifications.js","sources":["../../../../../../../src/components/Icon/Icons/components/Notifications.tsx"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\nimport * as React from 'react';\nexport interface NotificationsProps extends React.SVGAttributes<SVGElement> {\nsize?: string | number;\n}\nconst Notifications: React.FC<NotificationsProps> = ({size, ...props}) => (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width={ size || \"20\" } height={ size || \"20\" } {...props}>\n <path d=\"M10 2.04999C10.4143 2.04999 10.75 2.38577 10.75 2.79999V3.61058C12.0546 3.75821 13.2785 4.34336 14.2159 5.28079C15.309 6.37389 15.9231 7.85644 15.9231 9.4023C15.9231 11.7406 16.1727 13.0548 16.3959 13.758C16.5068 14.1075 16.6088 14.2984 16.6645 14.3868C16.6835 14.4168 16.697 14.435 16.7038 14.4435C16.9179 14.6455 16.9953 14.9565 16.8964 15.2377C16.7908 15.538 16.5072 15.7389 16.1889 15.7389H12.9529C12.9516 15.8038 12.9418 15.8695 12.9226 15.9348C12.7439 16.5449 12.3725 17.0809 11.864 17.4623C11.3554 17.8437 10.7371 18.05 10.1015 18.05C9.46584 18.05 8.84746 17.8437 8.33891 17.4623C7.83037 17.0809 7.45905 16.5449 7.28027 15.9348C7.26115 15.8695 7.2513 15.8038 7.24997 15.7389H4.00001C3.71313 15.7389 3.45138 15.5752 3.32575 15.3173C3.20248 15.0643 3.23145 14.764 3.39963 14.5394C3.40133 14.5369 3.40486 14.5316 3.41004 14.5235C3.42459 14.5005 3.45231 14.4542 3.48918 14.3812C3.56285 14.2352 3.67358 13.9813 3.78854 13.5917C4.01863 12.812 4.26574 11.4886 4.26574 9.4023C4.26574 7.85644 4.87984 6.37389 5.97293 5.28079C6.865 4.38872 8.01646 3.81567 9.25004 3.63507V2.79999C9.25004 2.38577 9.58582 2.04999 10 2.04999ZM8.80705 15.7389C8.90698 15.9443 9.05465 16.1241 9.2389 16.2623C9.488 16.4491 9.79062 16.55 10.1015 16.55C10.4123 16.55 10.7149 16.4491 10.964 16.2623C11.1483 16.1241 11.2959 15.9443 11.3959 15.7389H8.80705ZM7.03359 6.34145C7.84538 5.52967 8.9464 5.07361 10.0944 5.07361C11.2425 5.07361 12.3435 5.52967 13.1553 6.34145C13.9671 7.15324 14.4231 8.25426 14.4231 9.4023C14.4231 11.8353 14.6814 13.3144 14.9661 14.2117L14.9748 14.2389H5.15815C5.18119 14.1682 5.20426 14.0941 5.22721 14.0163C5.50499 13.075 5.76574 11.6052 5.76574 9.4023C5.76574 8.25426 6.2218 7.15324 7.03359 6.34145Z\"\n fill=\"currentColor\" fillRule=\"evenodd\" clipRule=\"evenodd\" />\n </svg>\n);\nNotifications.displayName = 'Notifications';\nexport default Notifications;\n/* tslint:enable */\n/* eslint-enable */\n"],"names":["Notifications","_a","size","props","__rest","_jsx","Object","assign","viewBox","fill","width","height","children","d","fillRule","clipRule","displayName"],"mappings":"mGAMA,IAAMA,EAA8C,SAACC,GAAA,IAACC,EAAeD,EAAfC,KAASC,EAAKC,EAAAH,EAAf,UAAqB,OACxEI,EAAK,MAAAC,OAAAC,OAAA,CAAAC,QAAQ,YAAYC,KAAK,eAAeC,MAAQR,GAAQ,KAAOS,OAAST,GAAQ,MAAWC,EAAK,CAAAS,SACnGP,UAAMQ,EAAE,sqDACNJ,KAAK,eAAeK,SAAS,UAAUC,SAAS,gBAGtDf,EAAcgB,YAAc"}
@@ -0,0 +1,2 @@
1
+ import{__rest as C}from"../../../../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";var r=function(r){var i=r.size,t=C(r,["size"]);return e("svg",Object.assign({viewBox:"0 0 20 20",fill:"currentColor",width:i||"20",height:i||"20"},t,{children:e("path",{d:"M10.4339 1.95001C11.5975 1.94802 12.7457 2.2162 13.7881 2.73345C14.8309 3.25087 15.7392 4.0034 16.4416 4.93172C17.1439 5.86004 17.6211 6.93879 17.8354 8.08295C18.0498 9.22712 17.9955 10.4054 17.6769 11.525C17.3582 12.6447 16.7839 13.675 15.9992 14.5348C15.2144 15.3946 14.2408 16.0604 13.1549 16.4798C12.0689 16.8991 10.9005 17.0606 9.74154 16.9514C8.72148 16.8553 7.73334 16.5518 6.83716 16.0612L4.29488 17.2723C3.23215 17.7786 2.12265 16.6693 2.6287 15.6064L3.83941 13.0637C3.26482 12.0144 2.94827 10.8411 2.91892 9.64118C2.88616 8.30174 3.21245 6.97794 3.86393 5.80714C4.51541 4.63635 5.46834 3.66124 6.62383 2.98299C7.77896 2.30495 9.09445 1.9483 10.4339 1.95001ZM10.4339 1.95001C10.4343 1.95001 10.4347 1.95001 10.4351 1.95001L10.434 2.70001L10.4326 1.95001C10.433 1.95001 10.4334 1.95001 10.4339 1.95001ZM13.1214 4.07712C12.2867 3.66294 11.3672 3.44826 10.4354 3.45001L10.4329 3.45001C9.3608 3.44846 8.30778 3.73387 7.38315 4.2766C6.45852 4.81934 5.69598 5.59963 5.17467 6.5365C4.65335 7.47337 4.39226 8.53268 4.41847 9.6045C4.44469 10.6763 4.75726 11.7216 5.32376 12.6319C5.45882 12.8489 5.47405 13.1198 5.36416 13.3506L4.28595 15.6151L6.54996 14.5366C6.78072 14.4266 7.05158 14.4418 7.26863 14.5768C8.05985 15.0689 8.95456 15.3706 9.88225 15.458C10.8099 15.5454 11.7452 15.4162 12.6145 15.0805C13.4837 14.7448 14.2631 14.2119 14.8912 13.5236C15.5194 12.8354 15.9791 12.0106 16.2341 11.1144C16.4892 10.2182 16.5327 9.27504 16.3611 8.35918C16.1895 7.44332 15.8075 6.57983 15.2453 5.83674C14.6831 5.09366 13.9561 4.49129 13.1214 4.07712Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}))};r.displayName="Update";export{r as default};
2
+ //# sourceMappingURL=Update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Update.js","sources":["../../../../../../../src/components/Icon/Icons/components/Update.tsx"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\nimport * as React from 'react';\nexport interface UpdateProps extends React.SVGAttributes<SVGElement> {\nsize?: string | number;\n}\nconst Update: React.FC<UpdateProps> = ({size, ...props}) => (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" width={ size || \"20\" } height={ size || \"20\" } {...props}>\n <path d=\"M10.4339 1.95001C11.5975 1.94802 12.7457 2.2162 13.7881 2.73345C14.8309 3.25087 15.7392 4.0034 16.4416 4.93172C17.1439 5.86004 17.6211 6.93879 17.8354 8.08295C18.0498 9.22712 17.9955 10.4054 17.6769 11.525C17.3582 12.6447 16.7839 13.675 15.9992 14.5348C15.2144 15.3946 14.2408 16.0604 13.1549 16.4798C12.0689 16.8991 10.9005 17.0606 9.74154 16.9514C8.72148 16.8553 7.73334 16.5518 6.83716 16.0612L4.29488 17.2723C3.23215 17.7786 2.12265 16.6693 2.6287 15.6064L3.83941 13.0637C3.26482 12.0144 2.94827 10.8411 2.91892 9.64118C2.88616 8.30174 3.21245 6.97794 3.86393 5.80714C4.51541 4.63635 5.46834 3.66124 6.62383 2.98299C7.77896 2.30495 9.09445 1.9483 10.4339 1.95001ZM10.4339 1.95001C10.4343 1.95001 10.4347 1.95001 10.4351 1.95001L10.434 2.70001L10.4326 1.95001C10.433 1.95001 10.4334 1.95001 10.4339 1.95001ZM13.1214 4.07712C12.2867 3.66294 11.3672 3.44826 10.4354 3.45001L10.4329 3.45001C9.3608 3.44846 8.30778 3.73387 7.38315 4.2766C6.45852 4.81934 5.69598 5.59963 5.17467 6.5365C4.65335 7.47337 4.39226 8.53268 4.41847 9.6045C4.44469 10.6763 4.75726 11.7216 5.32376 12.6319C5.45882 12.8489 5.47405 13.1198 5.36416 13.3506L4.28595 15.6151L6.54996 14.5366C6.78072 14.4266 7.05158 14.4418 7.26863 14.5768C8.05985 15.0689 8.95456 15.3706 9.88225 15.458C10.8099 15.5454 11.7452 15.4162 12.6145 15.0805C13.4837 14.7448 14.2631 14.2119 14.8912 13.5236C15.5194 12.8354 15.9791 12.0106 16.2341 11.1144C16.4892 10.2182 16.5327 9.27504 16.3611 8.35918C16.1895 7.44332 15.8075 6.57983 15.2453 5.83674C14.6831 5.09366 13.9561 4.49129 13.1214 4.07712Z\"\n fill=\"currentColor\" fillRule=\"evenodd\" clipRule=\"evenodd\" />\n </svg>\n);\nUpdate.displayName = 'Update';\nexport default Update;\n/* tslint:enable */\n/* eslint-enable */\n"],"names":["Update","_a","size","props","__rest","_jsx","Object","assign","viewBox","fill","width","height","children","d","fillRule","clipRule","displayName"],"mappings":"mGAMA,IAAMA,EAAgC,SAACC,GAAA,IAACC,EAAeD,EAAfC,KAASC,EAAKC,EAAAH,EAAf,UAAqB,OAC1DI,EAAK,MAAAC,OAAAC,OAAA,CAAAC,QAAQ,YAAYC,KAAK,eAAeC,MAAQR,GAAQ,KAAOS,OAAST,GAAQ,MAAWC,EAAK,CAAAS,SACnGP,UAAMQ,EAAE,ygDACNJ,KAAK,eAAeK,SAAS,UAAUC,SAAS,gBAGtDf,EAAOgB,YAAc"}
@@ -1,2 +1,2 @@
1
- import{slicedToArray as e,toConsumableArray as n}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as t}from"../../../../../_virtual/_tslib.js";import{jsx as o}from"@emotion/react/jsx-runtime";import{useState as i,useRef as l,useCallback as r,useEffect as a,useMemo as c}from"react";import{useVirtual as s}from"react-virtual";import{getCoreRowModel as u,getSortedRowModel as d,getPaginationRowModel as g,useReactTable as f}from"@tanstack/react-table";import h from"lodash/omit";import{TableHeaderCheckbox as m}from"./TableHeaderCheckbox.js";import{TableRowCheckbox as v}from"./TableRowCheckbox.js";import w from"../../../Icon/Icons/components/Settings.js";import R from"../../../IconButton/IconButton.js";import b from"../ToggleExpandedIcon/ToggleExpandedIcon.js";import S from"../../../Dialog/Dialog.js";import p from"../../../DialogContentContainer/DialogContentContainer.js";import C from"../../../Checkbox/Checkbox.js";import I from"../../../ListItem/ListItem.js";var x=function(x){var j=x.containerRef,O=x.data,M=x.columns,y=x.hasSelectableRows,z=x.withPagination,T=void 0!==z&&z,k=x.useVirtualScrolling,E=void 0!==k&&k,A=x.allowSelectAll,L=void 0===A||A,P=x.allowSelectSingle,D=void 0!==P&&P,_=x.onSelect,B=x.virtualizerOptions,H=x.initiallySelectedRowIds,V=void 0===H?[]:H,F=x.onRowSelectionChange,U=x.columnManager,K=void 0!==U&&U,X=x.isExpandable,N=void 0!==X&&X,q=x.hoverIcon,G=x.selectCurrentPageOnly,J=void 0!==G&&G,Q=x.onUnselectAll,W=x.initialState,Y=x.initialLoadCount,Z=void 0===Y?20:Y,$=x.loadMoreCount,ee=void 0===$?10:$,ne=x.onLoadMore,te=x.infiniteScrolling,oe=void 0!==te&&te,ie=x.autoResetPageIndex,le=void 0===ie||ie,re=x.selectAllRows,ae=void 0!==re&&re,ce=t(x,["containerRef","data","columns","hasSelectableRows","withPagination","useVirtualScrolling","allowSelectAll","allowSelectSingle","onSelect","virtualizerOptions","initiallySelectedRowIds","onRowSelectionChange","columnManager","isExpandable","hoverIcon","selectCurrentPageOnly","onUnselectAll","initialState","initialLoadCount","loadMoreCount","onLoadMore","infiniteScrolling","autoResetPageIndex","selectAllRows"]),se=i({}),ue=e(se,2),de=ue[0],ge=ue[1],fe=i(null),he=e(fe,2),me=he[0],ve=he[1],we=i(!1),Re=e(we,2),be=Re[0],Se=Re[1],pe=i([]),Ce=e(pe,2),Ie=Ce[0],xe=Ce[1],je=i(!1),Oe=e(je,2),Me=Oe[0],ye=Oe[1],ze=i(!1),Te=e(ze,2),ke=Te[0],Ee=Te[1],Ae=l(null),Le=l(!1),Pe=l({}),De=l([]),_e=l(null),Be=l(null),He=r((function(e,n){var t,o;return y&&null!==(o=null===(t=e.id)||void 0===t?void 0:""+t)&&void 0!==o?o:""+n}),[y]);a((function(){!Le.current&&y&&(Pe.current=V.reduce((function(e,n){return e[""+n]=!0,e}),{}),Le.current=!0)}),[V,y]),a((function(){Le.current&&ge(Pe.current)}),[Le.current]),a((function(){xe(oe?O.slice(0,Z):O)}),[O,oe,Z]),a((function(){O!==De.current&&y&&(ge(de),De.current=O)}),[O,He,y]),a((function(){if(ae&&y){var e=O.reduce((function(e,n,t){return e[He(n,t)]=!0,e}),{});ge(e)}}),[ae,y,O,He]);var Ve={id:"select",size:14,header:m,cell:v},Fe=c((function(){return M.some((function(e){return!!e.enableSorting}))}),[M]),Ue=L?Ve:h(Ve,"header"),Ke={id:"expander",size:30,header:function(){return null},cell:function(e){var n=e.row;return n.getCanExpand()?o(b,{isExpanded:n.getIsExpanded(),toggleExpanded:function(){return n.toggleExpanded()},disabled:!1}):null}},Xe={id:"hoverIcon",size:30,sticky:"right",header:function(){return null},cell:function(e){return o("span",Object.assign({style:{display:"block",height:"100%"}},{children:me===e.row.index&&q}))}},Ne=c((function(){var e=M.filter((function(e){return"left"===e.sticky})),t=M.filter((function(e){return"right"===e.sticky})),i=0,l=0;return[].concat(n(y?[Ue]:[]),n(N?[Ke]:[]),n(M.map((function(n,o){var r,a,c,s=Object.assign(Object.assign({},n),{align:null!==(r=n.align)&&void 0!==r?r:"left",enableSorting:null!==(a=n.enableSorting)&&void 0!==a&&a,isResizable:null!==(c=n.isResizable)&&void 0!==c&&c,cell:n.cell||function(e){return(0,e.getValue)()}});return"left"===n.sticky?(s.left=i,i+=n.size,s.isLastStickyLeft=o===e.length-1):"right"===n.sticky&&(s.right=(l+=n.size)-n.size,s.isFirstStickyRight=o===M.length-t.length),s})).map((function(e,n,o){return"right"===e.sticky&&(e.isFirstStickyRight=n===o.length-t.length),e}))),[q?Xe:null],n(K?[{id:"columnManager",size:20,header:function(){var e;return o(S,Object.assign({showTrigger:[S.hideShowTriggers.CLICK],hideTrigger:[S.hideShowTriggers.CLICK_OUTSIDE],position:S.positions.BOTTOM_END,open:ke,content:o(p,{children:tn.getAllLeafColumns().slice(0,-1).map((function(e,n){return o(I,{children:o(C,{checked:e.getIsVisible(),label:e.columnDef.header||e.id,onChange:e.getToggleVisibilityHandler(),"aria-labelledby":"iui-column-".concat(e.id)})},"".concat(e.id,"-").concat(n))}))},"small"),onDialogDidHide:function(){return Ee(!1)}},{children:o(R,{ariaLabel:"Customize",size:null===(e=null==R?void 0:R.sizes)||void 0===e?void 0:e.XXS,icon:w,ref:Ae,onClick:function(){return Ee(!0)}})}))},cell:function(){return null}}]:[])).filter(Boolean)}),[M,y,Ue,K,N,q,ke]),qe=i("onChange"),Ge=e(qe,2),Je=Ge[0],Qe=i("ltr"),We=e(Qe,2),Ye=We[0],Ze=function(e){if(y){var n=Object.assign({},Pe.current),t=J?tn.getPageRows():tn.getPreFilteredRowModel().rows,o=null!=e?e:!tn.getIsAllRowsSelected();t.forEach((function(e){n[e.id]=o})),ge(n)}},$e=function(){y&&(ge({}),Pe.current={},null==Q||Q())},en=r((function(){oe&&!Me&&O.length>Ie.length&&(ye(!0),setTimeout((function(){xe((function(e){var t=O.slice(e.length,e.length+ee);return e.length+t.length>=O.length&&_e.current&&_e.current.disconnect(),[].concat(n(e),n(t))})),ye(!1),ne&&ne()}),500))}),[oe,Me,O,ee,ne,Ie.length]);a((function(){return oe&&Be.current&&(_e.current=new IntersectionObserver((function(e){e[0].isIntersecting&&en()}),{threshold:.1}),_e.current.observe(Be.current)),function(){_e.current&&_e.current.disconnect()}}),[oe,en]);var nn=Object.assign({data:Ie,columns:Ne,getCoreRowModel:u(),getRowCanExpand:function(e){var n;return!!e.original.renderExpandedContent||!!(null===(n=e.subRows)||void 0===n?void 0:n.length)},enableExpanding:!0,enableSortingRemoval:!!Fe||void 0,getSubRows:function(e){return e.subRows},getSortedRowModel:d(),getPaginationRowModel:T?g():void 0,initialState:W||void 0,columnResizeMode:Je,columnResizeDirection:Ye,autoResetPageIndex:le},ce);y&&(nn.getRowId=He,nn.state={rowSelection:de},nn.onRowSelectionChange=ge);var tn=f(nn);tn.toggleAllRowsSelected=Ze,tn.unselectAllRows=$e;var on=tn.getCoreRowModel().rows,ln=(tn.getPaginationRowModel(),s(Object.assign({parentRef:j,size:on.length,overscan:30},B)));return a((function(){if(F&&y){var e=O.filter((function(e,n){return de[He(e,n)]}));F(e)}}),[de,O,F,He,y]),Object.assign(Object.assign(Object.assign(Object.assign({},tn),{handleRowClick:function(e){D&&(null==_||_(e.original))},toggleAllRowsSelected:Ze,unselectAllRows:$e}),E&&{virtualRows:ln.virtualItems,totalSize:ln.totalSize,scrollToIndex:ln.scrollToIndex,scrollToOffset:ln.scrollToOffset,measure:ln.measure}),{hasSelectableRows:y,showColumnManager:be,setShowColumnManager:Se,columnManagerRef:Ae,setHoveredRow:ve,isLoading:Me,loadedData:Ie,loadMoreTriggerRef:Be,infiniteScrolling:oe,loadMoreRows:en})};export{x as default};
1
+ import{slicedToArray as e,toConsumableArray as n}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as t}from"../../../../../_virtual/_tslib.js";import{jsx as o}from"@emotion/react/jsx-runtime";import{useState as i,useRef as l,useCallback as r,useEffect as a,useMemo as c}from"react";import{useVirtual as s}from"react-virtual";import{getCoreRowModel as u,getSortedRowModel as d,getPaginationRowModel as g,useReactTable as f}from"@tanstack/react-table";import h from"lodash/omit";import{TableHeaderCheckbox as m}from"./TableHeaderCheckbox.js";import{TableRowCheckbox as v}from"./TableRowCheckbox.js";import w from"../../../Icon/Icons/components/Settings.js";import R from"../../../IconButton/IconButton.js";import b from"../ToggleExpandedIcon/ToggleExpandedIcon.js";import S from"../../../Dialog/Dialog.js";import p from"../../../DialogContentContainer/DialogContentContainer.js";import C from"../../../Checkbox/Checkbox.js";import I from"../../../ListItem/ListItem.js";var x=function(x){var j=x.containerRef,O=x.data,M=x.columns,y=x.hasSelectableRows,z=x.withPagination,T=void 0!==z&&z,k=x.useVirtualScrolling,E=void 0!==k&&k,A=x.allowSelectAll,L=void 0===A||A,P=x.allowSelectSingle,D=void 0!==P&&P,_=x.onSelect,B=x.virtualizerOptions,H=x.initiallySelectedRowIds,V=void 0===H?[]:H,F=x.onRowSelectionChange,U=x.columnManager,K=void 0!==U&&U,X=x.isExpandable,N=void 0!==X&&X,q=x.hoverIcon,G=x.selectCurrentPageOnly,J=void 0!==G&&G,Q=x.onUnselectAll,W=x.initialState,Y=x.initialLoadCount,Z=void 0===Y?20:Y,$=x.loadMoreCount,ee=void 0===$?10:$,ne=x.onLoadMore,te=x.infiniteScrolling,oe=void 0!==te&&te,ie=x.autoResetPageIndex,le=void 0===ie||ie,re=x.selectAllRows,ae=void 0!==re&&re,ce=t(x,["containerRef","data","columns","hasSelectableRows","withPagination","useVirtualScrolling","allowSelectAll","allowSelectSingle","onSelect","virtualizerOptions","initiallySelectedRowIds","onRowSelectionChange","columnManager","isExpandable","hoverIcon","selectCurrentPageOnly","onUnselectAll","initialState","initialLoadCount","loadMoreCount","onLoadMore","infiniteScrolling","autoResetPageIndex","selectAllRows"]),se=i({}),ue=e(se,2),de=ue[0],ge=ue[1],fe=i(null),he=e(fe,2),me=he[0],ve=he[1],we=i(!1),Re=e(we,2),be=Re[0],Se=Re[1],pe=i([]),Ce=e(pe,2),Ie=Ce[0],xe=Ce[1],je=i(!1),Oe=e(je,2),Me=Oe[0],ye=Oe[1],ze=i(!1),Te=e(ze,2),ke=Te[0],Ee=Te[1],Ae=l(null),Le=l(!1),Pe=l({}),De=l([]),_e=l(null),Be=l(null),He=r((function(e,n){var t,o;return y&&null!==(o=null===(t=e.id)||void 0===t?void 0:""+t)&&void 0!==o?o:""+n}),[y]);a((function(){!Le.current&&y&&(Pe.current=V.reduce((function(e,n){return e[""+n]=!0,e}),{}),Le.current=!0)}),[V,y]),a((function(){Le.current&&(ae&&y?Ze():ge(Pe.current))}),[Le.current]),a((function(){xe(oe?O.slice(0,Z):O)}),[O,oe,Z]),a((function(){O!==De.current&&y&&(ge(de),De.current=O)}),[O,He,y]);var Ve={id:"select",size:14,header:m,cell:v},Fe=c((function(){return M.some((function(e){return!!e.enableSorting}))}),[M]),Ue=L?Ve:h(Ve,"header"),Ke={id:"expander",size:30,header:function(){return null},cell:function(e){var n=e.row;return n.getCanExpand()?o(b,{isExpanded:n.getIsExpanded(),toggleExpanded:function(){return n.toggleExpanded()},disabled:!1}):null}},Xe={id:"hoverIcon",size:30,sticky:"right",header:function(){return null},cell:function(e){return o("span",Object.assign({style:{display:"block",height:"100%"}},{children:me===e.row.index&&q}))}},Ne=c((function(){var e=M.filter((function(e){return"left"===e.sticky})),t=M.filter((function(e){return"right"===e.sticky})),i=0,l=0;return[].concat(n(y?[Ue]:[]),n(N?[Ke]:[]),n(M.map((function(n,o){var r,a,c,s=Object.assign(Object.assign({},n),{align:null!==(r=n.align)&&void 0!==r?r:"left",enableSorting:null!==(a=n.enableSorting)&&void 0!==a&&a,isResizable:null!==(c=n.isResizable)&&void 0!==c&&c,cell:n.cell||function(e){return(0,e.getValue)()}});return"left"===n.sticky?(s.left=i,i+=n.size,s.isLastStickyLeft=o===e.length-1):"right"===n.sticky&&(s.right=(l+=n.size)-n.size,s.isFirstStickyRight=o===M.length-t.length),s})).map((function(e,n,o){return"right"===e.sticky&&(e.isFirstStickyRight=n===o.length-t.length),e}))),[q?Xe:null],n(K?[{id:"columnManager",size:20,header:function(){var e;return o(S,Object.assign({showTrigger:[S.hideShowTriggers.CLICK],hideTrigger:[S.hideShowTriggers.CLICK_OUTSIDE],position:S.positions.BOTTOM_END,open:ke,content:o(p,{children:tn.getAllLeafColumns().slice(0,-1).map((function(e,n){return o(I,{children:o(C,{checked:e.getIsVisible(),label:e.columnDef.header||e.id,onChange:e.getToggleVisibilityHandler(),"aria-labelledby":"iui-column-".concat(e.id)})},"".concat(e.id,"-").concat(n))}))},"small"),onDialogDidHide:function(){return Ee(!1)}},{children:o(R,{ariaLabel:"Customize",size:null===(e=null==R?void 0:R.sizes)||void 0===e?void 0:e.XXS,icon:w,ref:Ae,onClick:function(){return Ee(!0)}})}))},cell:function(){return null}}]:[])).filter(Boolean)}),[M,y,Ue,K,N,q,ke]),qe=i("onChange"),Ge=e(qe,2),Je=Ge[0],Qe=i("ltr"),We=e(Qe,2),Ye=We[0],Ze=function(e){if(y){var n=Object.assign({},Pe.current),t=J?tn.getPageRows():tn.getPreFilteredRowModel().rows,o=null!=e?e:!tn.getIsAllRowsSelected();t.forEach((function(e){n[e.id]=o})),ge(n)}},$e=function(){y&&(ge({}),Pe.current={},null==Q||Q())},en=r((function(){oe&&!Me&&O.length>Ie.length&&(ye(!0),setTimeout((function(){xe((function(e){var t=O.slice(e.length,e.length+ee);return e.length+t.length>=O.length&&_e.current&&_e.current.disconnect(),[].concat(n(e),n(t))})),ye(!1),ne&&ne()}),500))}),[oe,Me,O,ee,ne,Ie.length]);a((function(){return oe&&Be.current&&(_e.current=new IntersectionObserver((function(e){e[0].isIntersecting&&en()}),{threshold:.1}),_e.current.observe(Be.current)),function(){_e.current&&_e.current.disconnect()}}),[oe,en]);var nn=Object.assign({data:Ie,columns:Ne,getCoreRowModel:u(),getRowCanExpand:function(e){var n;return!!e.original.renderExpandedContent||!!(null===(n=e.subRows)||void 0===n?void 0:n.length)},enableExpanding:!0,enableSortingRemoval:!!Fe||void 0,getSubRows:function(e){return e.subRows},getSortedRowModel:d(),getPaginationRowModel:T?g():void 0,initialState:W||void 0,columnResizeMode:Je,columnResizeDirection:Ye,autoResetPageIndex:le},ce);y&&(nn.getRowId=He,nn.state={rowSelection:de},nn.onRowSelectionChange=ge);var tn=f(nn);tn.toggleAllRowsSelected=Ze,tn.unselectAllRows=$e;var on=tn.getCoreRowModel().rows,ln=(tn.getPaginationRowModel(),s(Object.assign({parentRef:j,size:on.length,overscan:30},B)));return a((function(){if(F&&y){var e=O.filter((function(e,n){return de[He(e,n)]}));F(e)}}),[de,O,F,He,y]),Object.assign(Object.assign(Object.assign(Object.assign({},tn),{handleRowClick:function(e){D&&(null==_||_(e.original))},toggleAllRowsSelected:Ze,unselectAllRows:$e}),E&&{virtualRows:ln.virtualItems,totalSize:ln.totalSize,scrollToIndex:ln.scrollToIndex,scrollToOffset:ln.scrollToOffset,measure:ln.measure}),{hasSelectableRows:y,showColumnManager:be,setShowColumnManager:Se,columnManagerRef:Ae,setHoveredRow:ve,isLoading:Me,loadedData:Ie,loadMoreTriggerRef:Be,infiniteScrolling:oe,loadMoreRows:en})};export{x as default};
2
2
  //# sourceMappingURL=useLeafyGreenTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLeafyGreenTable.js","sources":["../../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"sourcesContent":["//@ts-nocheck\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState, useCallback } from \"react\";\nimport { useVirtual } from \"react-virtual\";\nimport { useReactTable, ColumnResizeMode, ColumnResizeDirection } from \"@tanstack/react-table\";\nimport { getCoreRowModel, getPaginationRowModel, getSortedRowModel, Row } from \"@tanstack/react-table\";\nimport omit from \"lodash/omit\";\nimport { TableHeaderCheckbox } from \"./TableHeaderCheckbox\";\nimport { TableRowCheckbox } from \"./TableRowCheckbox\";\nimport { LeafyGreenTableOptions, LGRowData } from \"./useLeafyGreenTable.types\";\nimport { LeafyGreenTable, LGColumnDef, LGTableDataType } from \".\";\nimport Settings from \"../../../Icon/Icons/components/Settings\";\nimport IconButton from \"../../../IconButton/IconButton\";\nimport ToggleExpandedIcon from \"../ToggleExpandedIcon\";\nimport Dialog from \"../../../Dialog/Dialog\";\nimport List from \"../../../List/List\";\nimport DialogContentContainer from \"../../../DialogContentContainer/DialogContentContainer\";\nimport Checkbox from \"../../../Checkbox/Checkbox\";\nimport ListItem from \"../../../ListItem/ListItem\";\n\nconst CHECKBOX_WIDTH = 14;\n\nconst useLeafyGreenTable = <T extends LGRowData, V extends unknown = unknown>({\n containerRef,\n data,\n columns: columnsProp,\n hasSelectableRows,\n withPagination = false,\n useVirtualScrolling = false,\n allowSelectAll = true,\n allowSelectSingle = false,\n onSelect,\n virtualizerOptions,\n initiallySelectedRowIds = [],\n onRowSelectionChange,\n columnManager = false,\n isExpandable = false,\n hoverIcon,\n selectCurrentPageOnly = false,\n onUnselectAll,\n initialState,\n initialLoadCount = 20, \n loadMoreCount = 10, \n onLoadMore, \n infiniteScrolling = false,\n autoResetPageIndex = true,\n selectAllRows = false,\n ...rest\n}: LeafyGreenTableOptions<T, V>): LeafyGreenTable<T> => {\n const [rowSelection, setRowSelection] = useState<{ [key: string]: boolean }>({});\n const [hoveredRow, setHoveredRow] = useState<number | null>(null);\n const [showColumnManager, setShowColumnManager] = useState(false);\n const [loadedData, setLoadedData] = useState<T[]>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [isDialogOpen, setIsDialogOpen] = useState(false);\n\n const columnManagerRef = useRef<HTMLButtonElement>(null);\n const isInitialSetupDone = useRef(false);\n const initialSelectionRef = useRef<{ [key: string]: boolean }>({});\n const previousDataRef = useRef<T[]>([]);\n const observerRef = useRef<IntersectionObserver | null>(null);\n const loadMoreTriggerRef = useRef<HTMLDivElement | null>(null);\n\n const getRowId = useCallback((row: T, index: number) => {\n if (hasSelectableRows) {\n return row.id?.toString() ?? index.toString();\n }\n return index.toString();\n }, [hasSelectableRows]);\n\n useEffect(() => {\n if (!isInitialSetupDone.current && hasSelectableRows) {\n initialSelectionRef.current = initiallySelectedRowIds.reduce((acc, id) => {\n acc[id.toString()] = true;\n return acc;\n }, {});\n isInitialSetupDone.current = true;\n }\n }, [initiallySelectedRowIds, hasSelectableRows]);\n\n useEffect(()=>{\n if (isInitialSetupDone.current) {\n setRowSelection(initialSelectionRef.current);\n }\n },[isInitialSetupDone.current]);\n\n useEffect(() => {\n setLoadedData(infiniteScrolling ? data.slice(0, initialLoadCount) : data);\n }, [data, infiniteScrolling, initialLoadCount]);\n\n useEffect(() => {\n if (data !== previousDataRef.current && hasSelectableRows) {\n setRowSelection(rowSelection);\n previousDataRef.current = data;\n }\n }, [data, getRowId, hasSelectableRows]);\n\n useEffect(() => {\n if (selectAllRows && hasSelectableRows) {\n const allSelected = data.reduce((acc, row, index) => {\n acc[getRowId(row, index)] = true;\n return acc;\n }, {});\n setRowSelection(allSelected);\n }\n }, [selectAllRows, hasSelectableRows, data, getRowId]);\n\n const baseSelectColumnConfig: LGColumnDef<T, V> = {\n id: \"select\",\n size: CHECKBOX_WIDTH,\n header: TableHeaderCheckbox,\n cell: TableRowCheckbox,\n };\n\n const handleRowClick = (row: Row<T>) => {\n if (allowSelectSingle) {\n const selectedRowData = row.original;\n onSelect?.(selectedRowData);\n }\n };\n\n const hasSortableColumns = useMemo(() => columnsProp.some((propCol) => !!propCol.enableSorting), [columnsProp]);\n\n const selectColumnConfig = allowSelectAll ? baseSelectColumnConfig : omit(baseSelectColumnConfig, \"header\");\n\n const expandColumnConfig: LGColumnDef<T, V> = {\n id: \"expander\",\n size: 30,\n header: () => null,\n cell: ({ row }) => {\n const isExpandable = row.getCanExpand();\n return isExpandable ? (\n <ToggleExpandedIcon\n isExpanded={row.getIsExpanded()}\n toggleExpanded={() => row.toggleExpanded()}\n disabled={false}\n />\n ) : null;\n },\n };\n\n const hoverIconConfig: LGColumnDef<T, V> = {\n id: \"hoverIcon\",\n size: 30,\n sticky: \"right\",\n header: () => null,\n cell: ({ row }) => (\n <span style={{ display: \"block\", height: \"100%\" }}>\n {hoveredRow === row.index && hoverIcon}\n </span>\n ),\n };\n\n const columns = useMemo<Array<LGColumnDef<T, V>>>(() => {\n const stickyLeftColumns = columnsProp.filter((col) => col.sticky === \"left\");\n const stickyRightColumns = columnsProp.filter((col) => col.sticky === \"right\");\n\n let leftOffset = 0;\n let rightOffset = 0;\n\n return [\n ...(hasSelectableRows ? [selectColumnConfig as LGColumnDef<T, V>] : []),\n ...(isExpandable ? [expandColumnConfig] : []),\n ...columnsProp\n .map((propColumn, index) => {\n const newColumn = {\n ...propColumn,\n align: propColumn.align ?? \"left\",\n enableSorting: propColumn.enableSorting ?? false,\n isResizable: propColumn.isResizable ?? false,\n cell: propColumn.cell || (({ getValue }) => getValue()),\n };\n\n if (propColumn.sticky === \"left\") {\n newColumn.left = leftOffset;\n leftOffset += propColumn.size;\n newColumn.isLastStickyLeft = index === stickyLeftColumns.length - 1;\n } else if (propColumn.sticky === \"right\") {\n rightOffset += propColumn.size;\n newColumn.right = rightOffset - propColumn.size;\n newColumn.isFirstStickyRight = index === columnsProp.length - stickyRightColumns.length;\n }\n\n return newColumn;\n })\n .map((column, index, columns) => {\n if (column.sticky === \"right\") {\n column.isFirstStickyRight = index === columns.length - stickyRightColumns.length;\n }\n return column;\n }),\n hoverIcon ? hoverIconConfig : null,\n ...(columnManager\n ? [\n {\n id: \"columnManager\",\n size: 20,\n header: () => (\n <Dialog\n showTrigger={[Dialog.hideShowTriggers.CLICK]}\n hideTrigger={[Dialog.hideShowTriggers.CLICK_OUTSIDE]}\n position={Dialog.positions.BOTTOM_END}\n open={isDialogOpen}\n content={\n <DialogContentContainer key=\"small\">\n {table.getAllLeafColumns().slice(0, -1).map((column, index) => (\n <ListItem key={`${column.id}-${index}`}>\n <Checkbox\n checked={column.getIsVisible()}\n label={column.columnDef.header as string || column.id}\n onChange={column.getToggleVisibilityHandler()}\n aria-labelledby={`iui-column-${column.id}`}\n />\n </ListItem>\n ))}\n </DialogContentContainer> \n }\n onDialogDidHide={() => setIsDialogOpen(false)}\n >\n <IconButton\n ariaLabel=\"Customize\"\n size={IconButton?.sizes?.XXS}\n icon={Settings}\n ref={columnManagerRef}\n onClick={() => setIsDialogOpen(true)}\n />\n </Dialog>\n ),\n cell: () => null,\n },\n ]\n : []),\n ].filter(Boolean);\n }, [columnsProp, hasSelectableRows, selectColumnConfig, columnManager, isExpandable, hoverIcon, isDialogOpen]);\n\n const [columnResizeMode, setColumnResizeMode] = useState<ColumnResizeMode>(\"onChange\");\n const [columnResizeDirection, setColumnResizeDirection] = useState<ColumnResizeDirection>(\"ltr\");\n\n const toggleAllRowsSelected = (value?: boolean) => {\n if (!hasSelectableRows) return;\n\n const newSelection = { ...initialSelectionRef.current };\n const rowsToSelect = selectCurrentPageOnly ? table.getPageRows() : table.getPreFilteredRowModel().rows;\n\n const setTo = value ?? !table.getIsAllRowsSelected();\n rowsToSelect.forEach((row) => {\n newSelection[row.id] = setTo;\n });\n\n setRowSelection(newSelection);\n };\n\n const unselectAllRows = () => {\n if (!hasSelectableRows) return;\n\n setRowSelection({});\n initialSelectionRef.current = {};\n onUnselectAll?.();\n };\n\n const loadMoreRows = useCallback(() => {\n if (!infiniteScrolling || isLoading || loadedData.length >= data.length) return;\n setIsLoading(true);\n setTimeout(() => {\n setLoadedData((prevData) => {\n const nextData = data.slice(prevData.length, prevData.length + loadMoreCount);\n if (prevData.length + nextData.length >= data.length && observerRef.current) {\n observerRef.current.disconnect();\n }\n\n return [...prevData, ...nextData];\n });\n setIsLoading(false);\n if (onLoadMore) {\n onLoadMore();\n }\n }, 500);\n }, [infiniteScrolling, isLoading, data, loadMoreCount, onLoadMore, loadedData.length]);\n\n useEffect(() => {\n if (infiniteScrolling && loadMoreTriggerRef.current) {\n observerRef.current = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting) {\n loadMoreRows();\n }\n },\n { threshold: 0.1 }\n );\n\n observerRef.current.observe(loadMoreTriggerRef.current);\n }\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [infiniteScrolling, loadMoreRows]);\n\n const tableOptions = {\n data: loadedData,\n columns,\n getCoreRowModel: getCoreRowModel(),\n getRowCanExpand: (row) => !!row.original.renderExpandedContent || !!row.subRows?.length,\n enableExpanding: true,\n enableSortingRemoval: hasSortableColumns ? true : undefined,\n getSubRows: (row) => row.subRows,\n getSortedRowModel: getSortedRowModel(),\n getPaginationRowModel: withPagination ? getPaginationRowModel() : undefined,\n initialState: initialState ? initialState : undefined,\n columnResizeMode,\n columnResizeDirection,\n autoResetPageIndex,\n ...rest,\n };\n\n if (hasSelectableRows) {\n tableOptions.getRowId = getRowId;\n tableOptions.state = { rowSelection };\n tableOptions.onRowSelectionChange = setRowSelection;\n }\n\n const table = useReactTable<LGTableDataType<T>>(tableOptions);\n\n table.toggleAllRowsSelected = toggleAllRowsSelected;\n table.unselectAllRows = unselectAllRows;\n\n const { rows } = table.getCoreRowModel();\n const { rows: paginationRows } = table.getPaginationRowModel();\n const _rowVirtualizer = useVirtual({\n parentRef: containerRef,\n size: rows.length,\n overscan: 30,\n ...virtualizerOptions,\n });\n\n useEffect(() => {\n if (onRowSelectionChange && hasSelectableRows) {\n const selectedRows = data.filter((row, index) => rowSelection[getRowId(row, index)]);\n onRowSelectionChange(selectedRows);\n }\n }, [rowSelection, data, onRowSelectionChange, getRowId, hasSelectableRows]);\n\n return {\n ...table,\n handleRowClick,\n toggleAllRowsSelected, \n unselectAllRows, \n ...(useVirtualScrolling && {\n virtualRows: _rowVirtualizer.virtualItems,\n totalSize: _rowVirtualizer.totalSize,\n scrollToIndex: _rowVirtualizer.scrollToIndex,\n scrollToOffset: _rowVirtualizer.scrollToOffset,\n measure: _rowVirtualizer.measure,\n }),\n hasSelectableRows,\n showColumnManager,\n setShowColumnManager,\n columnManagerRef,\n setHoveredRow,\n isLoading,\n loadedData,\n loadMoreTriggerRef,\n infiniteScrolling,\n loadMoreRows,\n } as LeafyGreenTable<T>;\n};\n\nexport default useLeafyGreenTable;\n"],"names":["useLeafyGreenTable","_a","containerRef","data","columnsProp","columns","hasSelectableRows","_a$withPagination","withPagination","_a$useVirtualScrollin","useVirtualScrolling","_a$allowSelectAll","allowSelectAll","_a$allowSelectSingle","allowSelectSingle","onSelect","virtualizerOptions","_a$initiallySelectedR","initiallySelectedRowIds","onRowSelectionChange","_a$columnManager","columnManager","_a$isExpandable","isExpandable","hoverIcon","_a$selectCurrentPageO","selectCurrentPageOnly","onUnselectAll","initialState","_a$initialLoadCount","initialLoadCount","_a$loadMoreCount","loadMoreCount","onLoadMore","_a$infiniteScrolling","infiniteScrolling","_a$autoResetPageIndex","autoResetPageIndex","_a$selectAllRows","selectAllRows","rest","__rest","_useState","useState","_useState2","_slicedToArray","rowSelection","setRowSelection","_useState3","_useState4","hoveredRow","setHoveredRow","_useState5","_useState6","showColumnManager","setShowColumnManager","_useState7","_useState8","loadedData","setLoadedData","_useState9","_useState10","isLoading","setIsLoading","_useState11","_useState12","isDialogOpen","setIsDialogOpen","columnManagerRef","useRef","isInitialSetupDone","initialSelectionRef","previousDataRef","observerRef","loadMoreTriggerRef","getRowId","useCallback","row","index","_b","id","useEffect","current","reduce","acc","slice","allSelected","baseSelectColumnConfig","size","header","TableHeaderCheckbox","cell","TableRowCheckbox","hasSortableColumns","useMemo","some","propCol","enableSorting","selectColumnConfig","omit","expandColumnConfig","_ref","getCanExpand","_jsx","ToggleExpandedIcon","isExpanded","getIsExpanded","toggleExpanded","disabled","hoverIconConfig","sticky","_ref2","Object","assign","style","display","height","children","stickyLeftColumns","filter","col","stickyRightColumns","leftOffset","rightOffset","concat","_toConsumableArray","map","propColumn","newColumn","align","isResizable","_c","_ref3","getValue","left","isLastStickyLeft","length","right","isFirstStickyRight","column","Dialog","showTrigger","hideShowTriggers","CLICK","hideTrigger","CLICK_OUTSIDE","position","positions","BOTTOM_END","open","content","DialogContentContainer","table","getAllLeafColumns","ListItem","Checkbox","checked","getIsVisible","label","columnDef","onChange","getToggleVisibilityHandler","onDialogDidHide","IconButton","ariaLabel","sizes","XXS","icon","Settings","ref","onClick","Boolean","_useState13","_useState14","columnResizeMode","_useState15","_useState16","columnResizeDirection","toggleAllRowsSelected","value","newSelection","rowsToSelect","getPageRows","getPreFilteredRowModel","rows","setTo","getIsAllRowsSelected","forEach","unselectAllRows","loadMoreRows","setTimeout","prevData","nextData","disconnect","IntersectionObserver","entries","isIntersecting","threshold","observe","tableOptions","getCoreRowModel","getRowCanExpand","original","renderExpandedContent","subRows","enableExpanding","enableSortingRemoval","undefined","getSubRows","getSortedRowModel","getPaginationRowModel","state","useReactTable","_rowVirtualizer","useVirtual","parentRef","overscan","selectedRows","handleRowClick","virtualRows","virtualItems","totalSize","scrollToIndex","scrollToOffset","measure"],"mappings":"+9BAmBA,IAEMA,EAAqB,SAAmDC,GAAA,IAC5EC,EAuBqBD,EAvBrBC,aACAC,EAsBqBF,EAtBrBE,KACSC,EAqBYH,EArBrBI,QACAC,EAoBqBL,EApBrBK,kBAAiBC,EAoBIN,EAnBrBO,eAAAA,OAAiB,IAAHD,GAAQA,EAAAE,EAmBDR,EAlBrBS,oBAAAA,OAAsB,IAAHD,GAAQA,EAAAE,EAkBNV,EAjBrBW,eAAAA,OAAiB,IAAHD,GAAOA,EAAAE,EAiBAZ,EAhBrBa,kBAAAA,OAAoB,IAAHD,GAAQA,EACzBE,EAeqBd,EAfrBc,SACAC,EAcqBf,EAdrBe,mBAAkBC,EAcGhB,EAbrBiB,wBAAAA,OAA0B,IAAHD,EAAG,GAAEA,EAC5BE,EAYqBlB,EAZrBkB,qBAAoBC,EAYCnB,EAXrBoB,cAAAA,OAAgB,IAAHD,GAAQA,EAAAE,EAWArB,EAVrBsB,aAAAA,OAAe,IAAHD,GAAQA,EACpBE,EASqBvB,EATrBuB,UAASC,EASYxB,EARrByB,sBAAAA,OAAwB,IAAHD,GAAQA,EAC7BE,EAOqB1B,EAPrB0B,cACAC,EAMqB3B,EANrB2B,aAAYC,EAMS5B,EALrB6B,iBAAAA,OAAmB,IAAHD,EAAG,GAAEA,EAAAE,EAKA9B,EAJrB+B,cAAAA,QAAgB,IAAHD,EAAG,GAAEA,EAClBE,GAGqBhC,EAHrBgC,WAAUC,GAGWjC,EAFrBkC,kBAAAA,QAAoB,IAAHD,IAAQA,GAAAE,GAEJnC,EADrBoC,mBAAAA,QAAqB,IAAHD,IAAOA,GAAAE,GACJrC,EAArBsC,cAAAA,QAAgB,IAAHD,IAAQA,GAClBE,GAAIC,EAAAxC,EAzBqE,+ZA2B5EyC,GAAwCC,EAAqC,IAAG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F6B,IAD2B7D,GAAM0D,wBACfI,EAAUtG,OAAAC,OAAA,CAChCsG,UAAWrN,EACXsF,KAAMgG,GAAKhD,OACXgF,SAAU,IACPxM,KAUL,OAPAiE,GAAU,WACR,GAAI9D,GAAwBb,EAAmB,CAC7C,IAAMmN,EAAetN,EAAKoH,QAAO,SAAC1C,EAAKC,GAAK,OAAKhC,GAAa6B,GAASE,EAAKC,OAC5E3D,EAAqBsM,EACtB,CACH,GAAG,CAAC3K,GAAc3C,EAAMgB,EAAsBwD,GAAUrE,IAEjD0G,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACFuC,IAAK,CACRkE,eAxOqB,SAAC7I,GAClB/D,IAEFC,SAAAA,EADwB8D,EAAI6H,YAuO9BxB,sBAAAA,GACAU,gBAAAA,KACIlL,GAAuB,CACzBiN,YAAaN,GAAgBO,aAC7BC,UAAWR,GAAgBQ,UAC3BC,cAAeT,GAAgBS,cAC/BC,eAAgBV,GAAgBU,eAChCC,QAASX,GAAgBW,WAE3B1N,kBAAAA,EACAgD,kBAAAA,GACAC,qBAAAA,GACAa,iBAAAA,GACAjB,cAAAA,GACAW,UAAAA,GACAJ,WAAAA,GACAgB,mBAAAA,GACAvC,kBAAAA,GACA0J,aAAAA,IAEJ"}
1
+ {"version":3,"file":"useLeafyGreenTable.js","sources":["../../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"sourcesContent":["//@ts-nocheck\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState, useCallback } from \"react\";\nimport { useVirtual } from \"react-virtual\";\nimport { useReactTable, ColumnResizeMode, ColumnResizeDirection } from \"@tanstack/react-table\";\nimport { getCoreRowModel, getPaginationRowModel, getSortedRowModel, Row } from \"@tanstack/react-table\";\nimport omit from \"lodash/omit\";\nimport { TableHeaderCheckbox } from \"./TableHeaderCheckbox\";\nimport { TableRowCheckbox } from \"./TableRowCheckbox\";\nimport { LeafyGreenTableOptions, LGRowData } from \"./useLeafyGreenTable.types\";\nimport { LeafyGreenTable, LGColumnDef, LGTableDataType } from \".\";\nimport Settings from \"../../../Icon/Icons/components/Settings\";\nimport IconButton from \"../../../IconButton/IconButton\";\nimport ToggleExpandedIcon from \"../ToggleExpandedIcon\";\nimport Dialog from \"../../../Dialog/Dialog\";\nimport List from \"../../../List/List\";\nimport DialogContentContainer from \"../../../DialogContentContainer/DialogContentContainer\";\nimport Checkbox from \"../../../Checkbox/Checkbox\";\nimport ListItem from \"../../../ListItem/ListItem\";\n\nconst CHECKBOX_WIDTH = 14;\n\nconst useLeafyGreenTable = <T extends LGRowData, V extends unknown = unknown>({\n containerRef,\n data,\n columns: columnsProp,\n hasSelectableRows,\n withPagination = false,\n useVirtualScrolling = false,\n allowSelectAll = true,\n allowSelectSingle = false,\n onSelect,\n virtualizerOptions,\n initiallySelectedRowIds = [],\n onRowSelectionChange,\n columnManager = false,\n isExpandable = false,\n hoverIcon,\n selectCurrentPageOnly = false,\n onUnselectAll,\n initialState,\n initialLoadCount = 20, \n loadMoreCount = 10, \n onLoadMore, \n infiniteScrolling = false,\n autoResetPageIndex = true,\n selectAllRows = false,\n ...rest\n}: LeafyGreenTableOptions<T, V>): LeafyGreenTable<T> => {\n const [rowSelection, setRowSelection] = useState<{ [key: string]: boolean }>({});\n const [hoveredRow, setHoveredRow] = useState<number | null>(null);\n const [showColumnManager, setShowColumnManager] = useState(false);\n const [loadedData, setLoadedData] = useState<T[]>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [isDialogOpen, setIsDialogOpen] = useState(false);\n\n const columnManagerRef = useRef<HTMLButtonElement>(null);\n const isInitialSetupDone = useRef(false);\n const initialSelectionRef = useRef<{ [key: string]: boolean }>({});\n const previousDataRef = useRef<T[]>([]);\n const observerRef = useRef<IntersectionObserver | null>(null);\n const loadMoreTriggerRef = useRef<HTMLDivElement | null>(null);\n\n const getRowId = useCallback((row: T, index: number) => {\n if (hasSelectableRows) {\n return row.id?.toString() ?? index.toString();\n }\n return index.toString();\n }, [hasSelectableRows]);\n\n useEffect(() => {\n if (!isInitialSetupDone.current && hasSelectableRows) {\n initialSelectionRef.current = initiallySelectedRowIds.reduce((acc, id) => {\n acc[id.toString()] = true;\n return acc;\n }, {});\n isInitialSetupDone.current = true;\n }\n }, [initiallySelectedRowIds, hasSelectableRows]);\n\n useEffect(()=>{\n if (isInitialSetupDone.current) {\n (selectAllRows && hasSelectableRows)\n ? toggleAllRowsSelected()\n : setRowSelection(initialSelectionRef.current);\n }\n },[isInitialSetupDone.current]);\n\n useEffect(() => {\n setLoadedData(infiniteScrolling ? data.slice(0, initialLoadCount) : data);\n }, [data, infiniteScrolling, initialLoadCount]);\n\n useEffect(() => {\n if (data !== previousDataRef.current && hasSelectableRows) {\n setRowSelection(rowSelection);\n previousDataRef.current = data;\n }\n }, [data, getRowId, hasSelectableRows]);\n\n const baseSelectColumnConfig: LGColumnDef<T, V> = {\n id: \"select\",\n size: CHECKBOX_WIDTH,\n header: TableHeaderCheckbox,\n cell: TableRowCheckbox,\n };\n\n const handleRowClick = (row: Row<T>) => {\n if (allowSelectSingle) {\n const selectedRowData = row.original;\n onSelect?.(selectedRowData);\n }\n };\n\n const hasSortableColumns = useMemo(() => columnsProp.some((propCol) => !!propCol.enableSorting), [columnsProp]);\n\n const selectColumnConfig = allowSelectAll ? baseSelectColumnConfig : omit(baseSelectColumnConfig, \"header\");\n\n const expandColumnConfig: LGColumnDef<T, V> = {\n id: \"expander\",\n size: 30,\n header: () => null,\n cell: ({ row }) => {\n const isExpandable = row.getCanExpand();\n return isExpandable ? (\n <ToggleExpandedIcon\n isExpanded={row.getIsExpanded()}\n toggleExpanded={() => row.toggleExpanded()}\n disabled={false}\n />\n ) : null;\n },\n };\n\n const hoverIconConfig: LGColumnDef<T, V> = {\n id: \"hoverIcon\",\n size: 30,\n sticky: \"right\",\n header: () => null,\n cell: ({ row }) => (\n <span style={{ display: \"block\", height: \"100%\" }}>\n {hoveredRow === row.index && hoverIcon}\n </span>\n ),\n };\n\n const columns = useMemo<Array<LGColumnDef<T, V>>>(() => {\n const stickyLeftColumns = columnsProp.filter((col) => col.sticky === \"left\");\n const stickyRightColumns = columnsProp.filter((col) => col.sticky === \"right\");\n\n let leftOffset = 0;\n let rightOffset = 0;\n\n return [\n ...(hasSelectableRows ? [selectColumnConfig as LGColumnDef<T, V>] : []),\n ...(isExpandable ? [expandColumnConfig] : []),\n ...columnsProp\n .map((propColumn, index) => {\n const newColumn = {\n ...propColumn,\n align: propColumn.align ?? \"left\",\n enableSorting: propColumn.enableSorting ?? false,\n isResizable: propColumn.isResizable ?? false,\n cell: propColumn.cell || (({ getValue }) => getValue()),\n };\n\n if (propColumn.sticky === \"left\") {\n newColumn.left = leftOffset;\n leftOffset += propColumn.size;\n newColumn.isLastStickyLeft = index === stickyLeftColumns.length - 1;\n } else if (propColumn.sticky === \"right\") {\n rightOffset += propColumn.size;\n newColumn.right = rightOffset - propColumn.size;\n newColumn.isFirstStickyRight = index === columnsProp.length - stickyRightColumns.length;\n }\n\n return newColumn;\n })\n .map((column, index, columns) => {\n if (column.sticky === \"right\") {\n column.isFirstStickyRight = index === columns.length - stickyRightColumns.length;\n }\n return column;\n }),\n hoverIcon ? hoverIconConfig : null,\n ...(columnManager\n ? [\n {\n id: \"columnManager\",\n size: 20,\n header: () => (\n <Dialog\n showTrigger={[Dialog.hideShowTriggers.CLICK]}\n hideTrigger={[Dialog.hideShowTriggers.CLICK_OUTSIDE]}\n position={Dialog.positions.BOTTOM_END}\n open={isDialogOpen}\n content={\n <DialogContentContainer key=\"small\">\n {table.getAllLeafColumns().slice(0, -1).map((column, index) => (\n <ListItem key={`${column.id}-${index}`}>\n <Checkbox\n checked={column.getIsVisible()}\n label={column.columnDef.header as string || column.id}\n onChange={column.getToggleVisibilityHandler()}\n aria-labelledby={`iui-column-${column.id}`}\n />\n </ListItem>\n ))}\n </DialogContentContainer> \n }\n onDialogDidHide={() => setIsDialogOpen(false)}\n >\n <IconButton\n ariaLabel=\"Customize\"\n size={IconButton?.sizes?.XXS}\n icon={Settings}\n ref={columnManagerRef}\n onClick={() => setIsDialogOpen(true)}\n />\n </Dialog>\n ),\n cell: () => null,\n },\n ]\n : []),\n ].filter(Boolean);\n }, [columnsProp, hasSelectableRows, selectColumnConfig, columnManager, isExpandable, hoverIcon, isDialogOpen]);\n\n const [columnResizeMode, setColumnResizeMode] = useState<ColumnResizeMode>(\"onChange\");\n const [columnResizeDirection, setColumnResizeDirection] = useState<ColumnResizeDirection>(\"ltr\");\n\n const toggleAllRowsSelected = (value?: boolean) => {\n if (!hasSelectableRows) return;\n\n const newSelection = { ...initialSelectionRef.current };\n const rowsToSelect = selectCurrentPageOnly ? table.getPageRows() : table.getPreFilteredRowModel().rows;\n\n const setTo = value ?? !table.getIsAllRowsSelected();\n rowsToSelect.forEach((row) => {\n newSelection[row.id] = setTo;\n });\n\n setRowSelection(newSelection);\n };\n\n const unselectAllRows = () => {\n if (!hasSelectableRows) return;\n\n setRowSelection({});\n initialSelectionRef.current = {};\n onUnselectAll?.();\n };\n\n const loadMoreRows = useCallback(() => {\n if (!infiniteScrolling || isLoading || loadedData.length >= data.length) return;\n setIsLoading(true);\n setTimeout(() => {\n setLoadedData((prevData) => {\n const nextData = data.slice(prevData.length, prevData.length + loadMoreCount);\n if (prevData.length + nextData.length >= data.length && observerRef.current) {\n observerRef.current.disconnect();\n }\n\n return [...prevData, ...nextData];\n });\n setIsLoading(false);\n if (onLoadMore) {\n onLoadMore();\n }\n }, 500);\n }, [infiniteScrolling, isLoading, data, loadMoreCount, onLoadMore, loadedData.length]);\n\n useEffect(() => {\n if (infiniteScrolling && loadMoreTriggerRef.current) {\n observerRef.current = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting) {\n loadMoreRows();\n }\n },\n { threshold: 0.1 }\n );\n\n observerRef.current.observe(loadMoreTriggerRef.current);\n }\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [infiniteScrolling, loadMoreRows]);\n\n const tableOptions = {\n data: loadedData,\n columns,\n getCoreRowModel: getCoreRowModel(),\n getRowCanExpand: (row) => !!row.original.renderExpandedContent || !!row.subRows?.length,\n enableExpanding: true,\n enableSortingRemoval: hasSortableColumns ? true : undefined,\n getSubRows: (row) => row.subRows,\n getSortedRowModel: getSortedRowModel(),\n getPaginationRowModel: withPagination ? getPaginationRowModel() : undefined,\n initialState: initialState ? initialState : undefined,\n columnResizeMode,\n columnResizeDirection,\n autoResetPageIndex,\n ...rest,\n };\n\n if (hasSelectableRows) {\n tableOptions.getRowId = getRowId;\n tableOptions.state = { rowSelection };\n tableOptions.onRowSelectionChange = setRowSelection;\n }\n\n const table = useReactTable<LGTableDataType<T>>(tableOptions);\n\n table.toggleAllRowsSelected = toggleAllRowsSelected;\n table.unselectAllRows = unselectAllRows;\n\n const { rows } = table.getCoreRowModel();\n const { rows: paginationRows } = table.getPaginationRowModel();\n const _rowVirtualizer = useVirtual({\n parentRef: containerRef,\n size: rows.length,\n overscan: 30,\n ...virtualizerOptions,\n });\n\n useEffect(() => {\n if (onRowSelectionChange && hasSelectableRows) {\n const selectedRows = data.filter((row, index) => rowSelection[getRowId(row, index)]);\n onRowSelectionChange(selectedRows);\n }\n }, [rowSelection, data, onRowSelectionChange, getRowId, hasSelectableRows]);\n\n return {\n ...table,\n handleRowClick,\n toggleAllRowsSelected, \n unselectAllRows, \n ...(useVirtualScrolling && {\n virtualRows: _rowVirtualizer.virtualItems,\n totalSize: _rowVirtualizer.totalSize,\n scrollToIndex: _rowVirtualizer.scrollToIndex,\n scrollToOffset: _rowVirtualizer.scrollToOffset,\n measure: _rowVirtualizer.measure,\n }),\n hasSelectableRows,\n showColumnManager,\n setShowColumnManager,\n columnManagerRef,\n setHoveredRow,\n isLoading,\n loadedData,\n loadMoreTriggerRef,\n infiniteScrolling,\n loadMoreRows,\n } as LeafyGreenTable<T>;\n};\n\nexport default useLeafyGreenTable;\n"],"names":["useLeafyGreenTable","_a","containerRef","data","columnsProp","columns","hasSelectableRows","_a$withPagination","withPagination","_a$useVirtualScrollin","useVirtualScrolling","_a$allowSelectAll","allowSelectAll","_a$allowSelectSingle","allowSelectSingle","onSelect","virtualizerOptions","_a$initiallySelectedR","initiallySelectedRowIds","onRowSelectionChange","_a$columnManager","columnManager","_a$isExpandable","isExpandable","hoverIcon","_a$selectCurrentPageO","selectCurrentPageOnly","onUnselectAll","initialState","_a$initialLoadCount","initialLoadCount","_a$loadMoreCount","loadMoreCount","onLoadMore","_a$infiniteScrolling","infiniteScrolling","_a$autoResetPageIndex","autoResetPageIndex","_a$selectAllRows","selectAllRows","rest","__rest","_useState","useState","_useState2","_slicedToArray","rowSelection","setRowSelection","_useState3","_useState4","hoveredRow","setHoveredRow","_useState5","_useState6","showColumnManager","setShowColumnManager","_useState7","_useState8","loadedData","setLoadedData","_useState9","_useState10","isLoading","setIsLoading","_useState11","_useState12","isDialogOpen","setIsDialogOpen","columnManagerRef","useRef","isInitialSetupDone","initialSelectionRef","previousDataRef","observerRef","loadMoreTriggerRef","getRowId","useCallback","row","index","_b","id","useEffect","current","reduce","acc","toggleAllRowsSelected","slice","baseSelectColumnConfig","size","header","TableHeaderCheckbox","cell","TableRowCheckbox","hasSortableColumns","useMemo","some","propCol","enableSorting","selectColumnConfig","omit","expandColumnConfig","_ref","getCanExpand","_jsx","ToggleExpandedIcon","isExpanded","getIsExpanded","toggleExpanded","disabled","hoverIconConfig","sticky","_ref2","Object","assign","style","display","height","children","stickyLeftColumns","filter","col","stickyRightColumns","leftOffset","rightOffset","concat","_toConsumableArray","map","propColumn","newColumn","align","isResizable","_c","_ref3","getValue","left","isLastStickyLeft","length","right","isFirstStickyRight","column","Dialog","showTrigger","hideShowTriggers","CLICK","hideTrigger","CLICK_OUTSIDE","position","positions","BOTTOM_END","open","content","DialogContentContainer","table","getAllLeafColumns","ListItem","Checkbox","checked","getIsVisible","label","columnDef","onChange","getToggleVisibilityHandler","onDialogDidHide","IconButton","ariaLabel","sizes","XXS","icon","Settings","ref","onClick","Boolean","_useState13","_useState14","columnResizeMode","_useState15","_useState16","columnResizeDirection","value","newSelection","rowsToSelect","getPageRows","getPreFilteredRowModel","rows","setTo","getIsAllRowsSelected","forEach","unselectAllRows","loadMoreRows","setTimeout","prevData","nextData","disconnect","IntersectionObserver","entries","isIntersecting","threshold","observe","tableOptions","getCoreRowModel","getRowCanExpand","original","renderExpandedContent","subRows","enableExpanding","enableSortingRemoval","undefined","getSubRows","getSortedRowModel","getPaginationRowModel","state","useReactTable","_rowVirtualizer","useVirtual","parentRef","overscan","selectedRows","handleRowClick","virtualRows","virtualItems","totalSize","scrollToIndex","scrollToOffset","measure"],"mappings":"+9BAmBA,IAEMA,EAAqB,SAAmDC,GAAA,IAC5EC,EAuBqBD,EAvBrBC,aACAC,EAsBqBF,EAtBrBE,KACSC,EAqBYH,EArBrBI,QACAC,EAoBqBL,EApBrBK,kBAAiBC,EAoBIN,EAnBrBO,eAAAA,OAAiB,IAAHD,GAAQA,EAAAE,EAmBDR,EAlBrBS,oBAAAA,OAAsB,IAAHD,GAAQA,EAAAE,EAkBNV,EAjBrBW,eAAAA,OAAiB,IAAHD,GAAOA,EAAAE,EAiBAZ,EAhBrBa,kBAAAA,OAAoB,IAAHD,GAAQA,EACzBE,EAeqBd,EAfrBc,SACAC,EAcqBf,EAdrBe,mBAAkBC,EAcGhB,EAbrBiB,wBAAAA,OAA0B,IAAHD,EAAG,GAAEA,EAC5BE,EAYqBlB,EAZrBkB,qBAAoBC,EAYCnB,EAXrBoB,cAAAA,OAAgB,IAAHD,GAAQA,EAAAE,EAWArB,EAVrBsB,aAAAA,OAAe,IAAHD,GAAQA,EACpBE,EASqBvB,EATrBuB,UAASC,EASYxB,EARrByB,sBAAAA,OAAwB,IAAHD,GAAQA,EAC7BE,EAOqB1B,EAPrB0B,cACAC,EAMqB3B,EANrB2B,aAAYC,EAMS5B,EALrB6B,iBAAAA,OAAmB,IAAHD,EAAG,GAAEA,EAAAE,EAKA9B,EAJrB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GAAMnE,sBAAwBA,GAC9BmE,GAAMmC,gBAAkBA,GAExB,IAAQJ,GAAS/B,GAAM+C,kBAAfhB,KAEF6B,IAD2B5D,GAAMyD,wBACfI,EAAUrG,OAAAC,OAAA,CAChCqG,UAAWpN,EACXsF,KAAM+F,GAAK/C,OACX+E,SAAU,IACPvM,KAUL,OAPAiE,GAAU,WACR,GAAI9D,GAAwBb,EAAmB,CAC7C,IAAMkN,EAAerN,EAAKoH,QAAO,SAAC1C,EAAKC,GAAK,OAAKhC,GAAa6B,GAASE,EAAKC,OAC5E3D,EAAqBqM,EACtB,CACH,GAAG,CAAC1K,GAAc3C,EAAMgB,EAAsBwD,GAAUrE,IAEjD0G,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACFuC,IAAK,CACRiE,eAxOqB,SAAC5I,GAClB/D,IAEFC,SAAAA,EADwB8D,EAAI4H,YAuO9BpH,sBAAAA,GACAsG,gBAAAA,KACIjL,GAAuB,CACzBgN,YAAaN,GAAgBO,aAC7BC,UAAWR,GAAgBQ,UAC3BC,cAAeT,GAAgBS,cAC/BC,eAAgBV,GAAgBU,eAChCC,QAASX,GAAgBW,WAE3BzN,kBAAAA,EACAgD,kBAAAA,GACAC,qBAAAA,GACAa,iBAAAA,GACAjB,cAAAA,GACAW,UAAAA,GACAJ,WAAAA,GACAgB,mBAAAA,GACAvC,kBAAAA,GACAyJ,aAAAA,IAEJ"}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface LinesProps extends React.SVGAttributes<SVGElement> {
3
+ size?: string | number;
4
+ }
5
+ declare const Lines: React.FC<LinesProps>;
6
+ export default Lines;
7
+ //# sourceMappingURL=Lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Lines.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACnE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAK/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface NotificationsProps extends React.SVGAttributes<SVGElement> {
3
+ size?: string | number;
4
+ }
5
+ declare const Notifications: React.FC<NotificationsProps>;
6
+ export default Notifications;
7
+ //# sourceMappingURL=Notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notifications.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Notifications.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IAC3E,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAK/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ export interface UpdateProps extends React.SVGAttributes<SVGElement> {
3
+ size?: string | number;
4
+ }
5
+ declare const Update: React.FC<UpdateProps>;
6
+ export default Update;
7
+ //# sourceMappingURL=Update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Icon/Icons/components/Update.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AACD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAKjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLeafyGreenTable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAgC,MAAM,GAAG,CAAC;AAYlE,QAAA,MAAM,kBAAkB,ogBAyVvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"useLeafyGreenTable.d.ts","sourceRoot":"","sources":["../../../../../../src/components/NewTable/components/useLeafyGreenTable/useLeafyGreenTable.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAa,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAgC,MAAM,GAAG,CAAC;AAYlE,QAAA,MAAM,kBAAkB,ogBAiVvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heliux-org/design-system-core",
3
- "version": "0.0.317-test",
3
+ "version": "0.0.317",
4
4
  "description": "Official Heliux design system resources for application development in React.js",
5
5
  "main": "./dist/main.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -299,5 +299,5 @@
299
299
  "PR: Icon 💎": "New Icons"
300
300
  }
301
301
  },
302
- "gitHead": "bcfa3584c4a5767bb902c36f874fa7203a6b9303"
302
+ "gitHead": "addfe26c0e275a0e0ed453757c18d37eb7eb8c87"
303
303
  }
@@ -79,7 +79,9 @@ const useLeafyGreenTable = <T extends LGRowData, V extends unknown = unknown>({
79
79
 
80
80
  useEffect(()=>{
81
81
  if (isInitialSetupDone.current) {
82
- setRowSelection(initialSelectionRef.current);
82
+ (selectAllRows && hasSelectableRows)
83
+ ? toggleAllRowsSelected()
84
+ : setRowSelection(initialSelectionRef.current);
83
85
  }
84
86
  },[isInitialSetupDone.current]);
85
87
 
@@ -94,16 +96,6 @@ const useLeafyGreenTable = <T extends LGRowData, V extends unknown = unknown>({
94
96
  }
95
97
  }, [data, getRowId, hasSelectableRows]);
96
98
 
97
- useEffect(() => {
98
- if (selectAllRows && hasSelectableRows) {
99
- const allSelected = data.reduce((acc, row, index) => {
100
- acc[getRowId(row, index)] = true;
101
- return acc;
102
- }, {});
103
- setRowSelection(allSelected);
104
- }
105
- }, [selectAllRows, hasSelectableRows, data, getRowId]);
106
-
107
99
  const baseSelectColumnConfig: LGColumnDef<T, V> = {
108
100
  id: "select",
109
101
  size: CHECKBOX_WIDTH,
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueMedium.01099e901d8d36c4208d239c508df07f.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueRegularItalic.1b9ba53f26dcc0beb84475fef8430ef0.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-PlattSemiBold.db0557b7781482567e41bf25d764fcc7.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-PlattRegular.48fea4af52bcd858ce6daf3c0dbe4c8d.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextExtraBoldItalic.eaa4c684c6cbd502a918ad049054ad2b.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueBlack.c9b2b494eb80f7f2103eb59f8cf73390.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueBlackItalic.66c62da463c3ce5c494d4d02fed59ed5.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextBoldItalic.3a370a4e1fa49031c3f61a7513f6520f.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextBlackItalic.386a08442f3625ff3fbeff59bfff88fb.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextBlackItalic.7c761b0f2c601d1a483c233fa64e6195.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueRegular.47aa3c5bb709255fac998d6c67dc56ca.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueLightItalic.fcd095115aef9c8af77cb9686c8a8b93.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueMediumItalic.0b03efa08247214660c7927ef3bcd684.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextBold.0204dde18eabd48872bc9c65a16931da.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextLight.4b7978710036d8d520cfe27e43018cdf.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextLightItalic.232301dc2e7000ba9ed6148e1f0f52f9.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueSemiBoldItalic.4082afcc8ecc984a4d8dfa99ef2ba531.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueMediumItalic.435b0f6f271370b0839fd41ee78b094c.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-PlattMedium.11d2826e26962217b6c97cd313226e6d.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueLight.2973470e0640c3bdee6627df36c35b1f.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-Mono.66ceb65f7020d57d50b9953420f2a211.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-PlattBlack.da4786673aaa2c4b4f8db6f2a985693d.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueExtraBoldtalic.5c8fa8cd79a6d09061dea2d2693c718c.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-Mono.6dff4ee633b4cd8b6b39adfee1525fcf.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueBold.8b45276c8d5867ea6b1e232e36869275.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueExtraBoldtalic.1954637cd7a765c3e5650aff022b421a.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-PlattSemiBold.f44bfcba9cd05a5294d6a9d7a1332834.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueSemiBold.4847a2111cc8855a1e79e9ae209720be.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueExtraBold.7b57046ebc97a545f2bbee467dfaef98.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-PlattBold.c8b0c1f510bf8de7daafe6f7f60cc973.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextExtraBold.3936ac0e60ab737d0f741a417e625d8a.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueBlack.691e82d42b380a7fe68f392943c5cf63.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueSemiBold.f2798934e74c3cb482ac1683830f2b8f.woff";
@@ -1 +0,0 @@
1
- export default "../Alliance-PlattExtraBold.71e76016cb243cb61f4c7defee5eb11c.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextExtraBold.03446f23dd9b11b08a5006531ba166b9.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-PlattLight.b5fb6bb4bf91a7aaa50c85949ef1c9e5.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueBlackItalic.10a7cf76e9c63de3773ad70e992393ff.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-TextLightItalic.5d51d5ad082ebe1aacecc2eff492708e.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-NeueSemiBoldItalic.c3776e542750e50906a6007ff958739e.woff2";
@@ -1 +0,0 @@
1
- export default "../Alliance-PlattExtraBold.dbc02abfebdd8b0887346d6720e25fcb.woff";