iguazio.dashboard-react-controls 3.0.4 → 3.1.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 (178) hide show
  1. package/dist/components/ActionsMenu/ActionsMenu.d.ts +18 -0
  2. package/dist/components/ActionsMenu/ActionsMenu.d.ts.map +1 -0
  3. package/dist/components/ActionsMenu/ActionsMenu.mjs +126 -0
  4. package/dist/components/ActionsMenu/ActionsMenu.mjs.map +1 -0
  5. package/dist/components/BlockerSpy/BlockerSpy.d.ts +12 -0
  6. package/dist/components/BlockerSpy/BlockerSpy.d.ts.map +1 -0
  7. package/dist/components/BlockerSpy/BlockerSpy.mjs +18 -0
  8. package/dist/components/BlockerSpy/BlockerSpy.mjs.map +1 -0
  9. package/dist/components/Button/Button.mjs +21 -20
  10. package/dist/components/Button/Button.mjs.map +1 -1
  11. package/dist/components/Chip/Chip.d.ts +3 -0
  12. package/dist/components/Chip/Chip.d.ts.map +1 -0
  13. package/dist/components/Chip/Chip.mjs +153 -0
  14. package/dist/components/Chip/Chip.mjs.map +1 -0
  15. package/dist/components/Chip/Chip.stories.d.ts +26 -0
  16. package/dist/components/Chip/Chip.stories.d.ts.map +1 -0
  17. package/dist/components/ChipCell/ChipCell.d.ts +3 -0
  18. package/dist/components/ChipCell/ChipCell.d.ts.map +1 -0
  19. package/dist/components/ChipCell/ChipCell.mjs +212 -0
  20. package/dist/components/ChipCell/ChipCell.mjs.map +1 -0
  21. package/dist/components/ChipCell/ChipTooltip/ChipTooltip.d.ts +15 -0
  22. package/dist/components/ChipCell/ChipTooltip/ChipTooltip.d.ts.map +1 -0
  23. package/dist/components/ChipCell/ChipTooltip/ChipTooltip.mjs +36 -0
  24. package/dist/components/ChipCell/ChipTooltip/ChipTooltip.mjs.map +1 -0
  25. package/dist/components/ChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts +35 -0
  26. package/dist/components/ChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts.map +1 -0
  27. package/dist/components/ChipCell/HiddenChipsBlock/HiddenChipsBlock.mjs +73 -0
  28. package/dist/components/ChipCell/HiddenChipsBlock/HiddenChipsBlock.mjs.map +1 -0
  29. package/dist/components/ChipForm/ChipForm.d.ts +25 -0
  30. package/dist/components/ChipForm/ChipForm.d.ts.map +1 -0
  31. package/dist/components/ChipForm/ChipForm.mjs +184 -0
  32. package/dist/components/ChipForm/ChipForm.mjs.map +1 -0
  33. package/dist/components/CopyToClipboard/CopyToClipboard.d.ts +18 -0
  34. package/dist/components/CopyToClipboard/CopyToClipboard.d.ts.map +1 -0
  35. package/dist/components/CopyToClipboard/CopyToClipboard.mjs +51 -0
  36. package/dist/components/CopyToClipboard/CopyToClipboard.mjs.map +1 -0
  37. package/dist/components/ErrorMessage/ErrorMessage.d.ts +12 -0
  38. package/dist/components/ErrorMessage/ErrorMessage.d.ts.map +1 -0
  39. package/dist/components/ErrorMessage/ErrorMessage.mjs +23 -0
  40. package/dist/components/ErrorMessage/ErrorMessage.mjs.map +1 -0
  41. package/dist/components/FormChipCell/FormChipCellView.mjs +1 -1
  42. package/dist/components/LoadButton/LoadButton.d.ts +16 -0
  43. package/dist/components/LoadButton/LoadButton.d.ts.map +1 -0
  44. package/dist/components/LoadButton/LoadButton.mjs +22 -0
  45. package/dist/components/LoadButton/LoadButton.mjs.map +1 -0
  46. package/dist/components/LoadButton/LoadButton.stories.d.ts +10 -0
  47. package/dist/components/LoadButton/LoadButton.stories.d.ts.map +1 -0
  48. package/dist/components/Loader/Loader.d.ts +3 -0
  49. package/dist/components/Loader/Loader.d.ts.map +1 -0
  50. package/dist/components/Loader/Loader.mjs +24 -0
  51. package/dist/components/Loader/Loader.mjs.map +1 -0
  52. package/dist/components/Loader/LoaderForSuspenseFallback.d.ts +3 -0
  53. package/dist/components/Loader/LoaderForSuspenseFallback.d.ts.map +1 -0
  54. package/dist/components/Loader/LoaderForSuspenseFallback.mjs +13 -0
  55. package/dist/components/Loader/LoaderForSuspenseFallback.mjs.map +1 -0
  56. package/dist/components/TableCell/TableCell.d.ts +28 -0
  57. package/dist/components/TableCell/TableCell.d.ts.map +1 -0
  58. package/dist/components/TableCell/TableCell.mjs +104 -0
  59. package/dist/components/TableCell/TableCell.mjs.map +1 -0
  60. package/dist/components/TabsSlider/TabsSlider.d.ts +20 -0
  61. package/dist/components/TabsSlider/TabsSlider.d.ts.map +1 -0
  62. package/dist/components/TabsSlider/TabsSlider.mjs +133 -0
  63. package/dist/components/TabsSlider/TabsSlider.mjs.map +1 -0
  64. package/dist/components/index.d.ts +12 -1
  65. package/dist/components/index.d.ts.map +1 -1
  66. package/dist/components/index.mjs +60 -38
  67. package/dist/components/index.mjs.map +1 -1
  68. package/dist/constants.d.ts +8 -0
  69. package/dist/constants.d.ts.map +1 -1
  70. package/dist/constants.mjs +34 -26
  71. package/dist/constants.mjs.map +1 -1
  72. package/dist/elements/ActionsMenuItem/ActionsMenuItem.d.ts +16 -0
  73. package/dist/elements/ActionsMenuItem/ActionsMenuItem.d.ts.map +1 -0
  74. package/dist/elements/ActionsMenuItem/ActionsMenuItem.mjs +51 -0
  75. package/dist/elements/ActionsMenuItem/ActionsMenuItem.mjs.map +1 -0
  76. package/dist/elements/TableHead/TableHead.d.ts +20 -0
  77. package/dist/elements/TableHead/TableHead.d.ts.map +1 -0
  78. package/dist/elements/TableHead/TableHead.mjs +58 -0
  79. package/dist/elements/TableHead/TableHead.mjs.map +1 -0
  80. package/dist/elements/TableLinkCell/TableLinkCell.d.ts +24 -0
  81. package/dist/elements/TableLinkCell/TableLinkCell.d.ts.map +1 -0
  82. package/dist/elements/TableLinkCell/TableLinkCell.mjs +87 -0
  83. package/dist/elements/TableLinkCell/TableLinkCell.mjs.map +1 -0
  84. package/dist/elements/TableTypeCell/TableTypeCell.d.ts +12 -0
  85. package/dist/elements/TableTypeCell/TableTypeCell.d.ts.map +1 -0
  86. package/dist/elements/TableTypeCell/TableTypeCell.mjs +37 -0
  87. package/dist/elements/TableTypeCell/TableTypeCell.mjs.map +1 -0
  88. package/dist/elements/index.d.ts +5 -1
  89. package/dist/elements/index.d.ts.map +1 -1
  90. package/dist/elements/index.mjs +18 -10
  91. package/dist/elements/index.mjs.map +1 -1
  92. package/dist/hooks/index.d.ts +3 -0
  93. package/dist/hooks/index.mjs +14 -8
  94. package/dist/hooks/index.mjs.map +1 -1
  95. package/dist/hooks/useDetails.hook.d.ts +72 -0
  96. package/dist/hooks/useDetails.hook.d.ts.map +1 -0
  97. package/dist/hooks/useDetails.hook.mjs +204 -0
  98. package/dist/hooks/useDetails.hook.mjs.map +1 -0
  99. package/dist/hooks/useDetailsHeader.hook.d.ts +77 -0
  100. package/dist/hooks/useDetailsHeader.hook.d.ts.map +1 -0
  101. package/dist/hooks/useDetailsHeader.hook.mjs +219 -0
  102. package/dist/hooks/useDetailsHeader.hook.mjs.map +1 -0
  103. package/dist/hooks/useTable.hook.d.ts +60 -0
  104. package/dist/hooks/useTable.hook.d.ts.map +1 -0
  105. package/dist/hooks/useTable.hook.mjs +129 -0
  106. package/dist/hooks/useTable.hook.mjs.map +1 -0
  107. package/dist/images/add.svg.mjs +2 -3
  108. package/dist/images/add.svg.mjs.map +1 -1
  109. package/dist/images/add.svg2.mjs +6 -0
  110. package/dist/images/add.svg2.mjs.map +1 -0
  111. package/dist/images/cancel.svg +3 -0
  112. package/dist/images/copy-to-clipboard-icon.svg.mjs +6 -0
  113. package/dist/images/copy-to-clipboard-icon.svg.mjs.map +1 -0
  114. package/dist/images/elipsis.svg.mjs +6 -0
  115. package/dist/images/elipsis.svg.mjs.map +1 -0
  116. package/dist/images/history.svg.mjs +6 -0
  117. package/dist/images/history.svg.mjs.map +1 -0
  118. package/dist/images/ml-enlarge.svg.mjs +6 -0
  119. package/dist/images/ml-enlarge.svg.mjs.map +1 -0
  120. package/dist/images/ml-minimize.svg.mjs +6 -0
  121. package/dist/images/ml-minimize.svg.mjs.map +1 -0
  122. package/dist/images/refresh.svg.mjs +6 -0
  123. package/dist/images/refresh.svg.mjs.map +1 -0
  124. package/dist/images/unsuccess_alert.svg.mjs +6 -0
  125. package/dist/images/unsuccess_alert.svg.mjs.map +1 -0
  126. package/dist/index.css +1 -1
  127. package/dist/index.d.ts +2 -1
  128. package/dist/index.d.ts.map +1 -1
  129. package/dist/index.mjs +10 -8
  130. package/dist/index.mjs.map +1 -1
  131. package/dist/reducers/commonDetailsReducer.d.ts +12 -0
  132. package/dist/reducers/commonDetailsReducer.d.ts.map +1 -0
  133. package/dist/reducers/commonDetailsReducer.mjs +77 -0
  134. package/dist/reducers/commonDetailsReducer.mjs.map +1 -0
  135. package/dist/reducers/index.d.ts +3 -0
  136. package/dist/reducers/index.d.ts.map +1 -0
  137. package/dist/reducers/index.mjs +7 -0
  138. package/dist/reducers/index.mjs.map +1 -0
  139. package/dist/reducers/notificationReducer.d.ts +3 -0
  140. package/dist/reducers/notificationReducer.d.ts.map +1 -0
  141. package/dist/reducers/notificationReducer.mjs +21 -0
  142. package/dist/reducers/notificationReducer.mjs.map +1 -0
  143. package/dist/scss/common.scss +655 -0
  144. package/dist/scss/details.scss +376 -0
  145. package/dist/scss/mixins.scss +1 -1
  146. package/dist/scss/table.scss +283 -0
  147. package/dist/types.d.ts +6 -0
  148. package/dist/types.d.ts.map +1 -1
  149. package/dist/types.mjs +89 -45
  150. package/dist/types.mjs.map +1 -1
  151. package/dist/utils/chips.util.d.ts +30 -0
  152. package/dist/utils/chips.util.d.ts.map +1 -0
  153. package/dist/utils/chips.util.mjs +75 -0
  154. package/dist/utils/chips.util.mjs.map +1 -0
  155. package/dist/utils/common.util.d.ts +5 -0
  156. package/dist/utils/common.util.d.ts.map +1 -1
  157. package/dist/utils/common.util.mjs +80 -33
  158. package/dist/utils/common.util.mjs.map +1 -1
  159. package/dist/utils/datetime.util.d.ts +9 -0
  160. package/dist/utils/datetime.util.d.ts.map +1 -0
  161. package/dist/utils/datetime.util.mjs +53 -0
  162. package/dist/utils/datetime.util.mjs.map +1 -0
  163. package/dist/utils/filter.util.d.ts +5 -0
  164. package/dist/utils/filter.util.d.ts.map +1 -0
  165. package/dist/utils/filter.util.mjs +23 -0
  166. package/dist/utils/filter.util.mjs.map +1 -0
  167. package/dist/utils/index.d.ts +5 -0
  168. package/dist/utils/index.mjs +22 -12
  169. package/dist/utils/index.mjs.map +1 -1
  170. package/dist/utils/notification.util.d.ts +2 -0
  171. package/dist/utils/notification.util.d.ts.map +1 -0
  172. package/dist/utils/notification.util.mjs +17 -0
  173. package/dist/utils/notification.util.mjs.map +1 -0
  174. package/dist/utils/string.util.d.ts +6 -0
  175. package/dist/utils/string.util.d.ts.map +1 -0
  176. package/dist/utils/string.util.mjs +13 -0
  177. package/dist/utils/string.util.mjs.map +1 -0
  178. package/package.json +11 -1
@@ -0,0 +1,53 @@
1
+ import n from "moment";
2
+ const u = (t, e) => {
3
+ if (!t)
4
+ return e;
5
+ const r = new Date(t);
6
+ return typeof r != "object" || !(r instanceof Date) || isNaN(r) ? e : new Intl.DateTimeFormat("en-US", {
7
+ year: "numeric",
8
+ month: "short",
9
+ day: "numeric",
10
+ hour: "2-digit",
11
+ minute: "2-digit",
12
+ second: "2-digit"
13
+ }).format(r);
14
+ }, c = (t) => {
15
+ const [e, r] = t.split(":");
16
+ return r ? {
17
+ hour: e.replace(/_/g, "0"),
18
+ minute: r.replace(/_/g, "0")
19
+ } : {
20
+ hour: "0",
21
+ minute: "0"
22
+ };
23
+ }, d = (t) => (n.updateLocale("en", {
24
+ relativeTime: {
25
+ future: "in %s",
26
+ past: "%s ago",
27
+ s: "a few seconds",
28
+ ss: "%d seconds",
29
+ m: "a minute",
30
+ mm: "%d minutes",
31
+ h: "an hour",
32
+ hh: "%d hours",
33
+ d: "a day",
34
+ dd: "%d days",
35
+ w: "a week",
36
+ ww: "%d weeks",
37
+ M: "a month",
38
+ MM: "%d months",
39
+ y: "a year",
40
+ yy: "%d years"
41
+ }
42
+ }), n.utc(t).fromNow()), h = (t, e) => n(t).format(e), y = (t = [], e, r = !0) => [...t].sort((s, m) => {
43
+ const o = Date.parse(s[e]), a = Date.parse(m[e]);
44
+ return r ? o - a : a - o;
45
+ });
46
+ export {
47
+ u as formatDatetime,
48
+ h as getDateAndTimeByFormat,
49
+ c as getFormatTime,
50
+ d as getTimeElapsedByDate,
51
+ y as sortListByDate
52
+ };
53
+ //# sourceMappingURL=datetime.util.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetime.util.mjs","sources":["../../src/lib/utils/datetime.util.js"],"sourcesContent":["/*\nCopyright 2019 Iguazio Systems Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\") with\nan addition restriction as set forth herein. You may not use this\nfile except in compliance with the License. You may obtain a copy of\nthe License at http://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing\npermissions and limitations under the License.\n\nIn addition, you may not use the software for any purposes that are\nillegal under applicable law, and the grant of the foregoing license\nunder the Apache 2.0 license is conditioned upon your compliance with\nsuch restriction.\n*/\nimport moment from 'moment'\n\nexport const formatDatetime = (datetime, invalidDateMessage) => {\n if (!datetime) {\n return invalidDateMessage\n }\n\n const date = new Date(datetime)\n\n return typeof date !== 'object' || !(date instanceof Date) || isNaN(date)\n ? invalidDateMessage\n : new Intl.DateTimeFormat('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit'\n }).format(date)\n}\n\nexport const getFormatTime = time => {\n const [hour, minute] = time.split(':')\n if (!minute) {\n return {\n hour: '0',\n minute: '0'\n }\n }\n return {\n hour: hour.replace(/_/g, '0'),\n minute: minute.replace(/_/g, '0')\n }\n}\n\nexport const getTimeElapsedByDate = creationDate => {\n moment.updateLocale('en', {\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n }\n })\n\n const time = moment.utc(creationDate)\n\n return time.fromNow()\n}\n\nexport const getDateAndTimeByFormat = (date, dateFormat) => {\n return moment(date).format(dateFormat)\n}\n\nexport const sortListByDate = (list = [], field, isAscending = true) => {\n return [...list].sort((prevElem, nextElem) => {\n const prev = Date.parse(prevElem[field])\n const next = Date.parse(nextElem[field])\n\n return isAscending ? prev - next : next - prev\n })\n}\n"],"names":["formatDatetime","datetime","invalidDateMessage","date","getFormatTime","time","hour","minute","getTimeElapsedByDate","creationDate","moment","getDateAndTimeByFormat","dateFormat","sortListByDate","list","field","isAscending","prevElem","nextElem","prev","next"],"mappings":";AAqBY,MAACA,IAAiB,CAACC,GAAUC,MAAuB;AAC9D,MAAI,CAACD;AACH,WAAOC;AAGT,QAAMC,IAAO,IAAI,KAAKF,CAAQ;AAE9B,SAAO,OAAOE,KAAS,YAAY,EAAEA,aAAgB,SAAS,MAAMA,CAAI,IACpED,IACA,IAAI,KAAK,eAAe,SAAS;AAAA,IAC/B,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,EAChB,CAAO,EAAE,OAAOC,CAAI;AACpB,GAEaC,IAAgB,CAAAC,MAAQ;AACnC,QAAM,CAACC,GAAMC,CAAM,IAAIF,EAAK,MAAM,GAAG;AACrC,SAAKE,IAME;AAAA,IACL,MAAMD,EAAK,QAAQ,MAAM,GAAG;AAAA,IAC5B,QAAQC,EAAO,QAAQ,MAAM,GAAG;AAAA,EACpC,IARW;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EACd;AAMA,GAEaC,IAAuB,CAAAC,OAClCC,EAAO,aAAa,MAAM;AAAA,EACxB,cAAc;AAAA,IACZ,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,EACV;AACG,CAAA,GAEYA,EAAO,IAAID,CAAY,EAExB,QAAO,IAGRE,IAAyB,CAACR,GAAMS,MACpCF,EAAOP,CAAI,EAAE,OAAOS,CAAU,GAG1BC,IAAiB,CAACC,IAAO,CAAA,GAAIC,GAAOC,IAAc,OACtD,CAAC,GAAGF,CAAI,EAAE,KAAK,CAACG,GAAUC,MAAa;AAC5C,QAAMC,IAAO,KAAK,MAAMF,EAASF,CAAK,CAAC,GACjCK,IAAO,KAAK,MAAMF,EAASH,CAAK,CAAC;AAEvC,SAAOC,IAAcG,IAAOC,IAAOA,IAAOD;AAC3C,CAAA;"}
@@ -0,0 +1,5 @@
1
+ export function getSavedSearchParams(searchParams: any): string;
2
+ export function saveAndTransformSearchParams(searchParams: any, includeSearchParams?: boolean, excludeParamsNames?: any[]): string;
3
+ export function transformSearchParams(params: any): string;
4
+ export function getFilteredSearchParams(searchParams: any, excludeParamsNames?: any[]): string;
5
+ //# sourceMappingURL=filter.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.util.d.ts","sourceRoot":"","sources":["../../src/lib/utils/filter.util.js"],"names":[],"mappings":"AAsBO,gEAEN;AAEM,mIAaN;AAEM,2DAEN;AAEM,+FAUN"}
@@ -0,0 +1,23 @@
1
+ const s = "savedParams", o = (r) => {
2
+ var a;
3
+ return atob(((a = new URLSearchParams(r)) == null ? void 0 : a.get(s)) ?? "") ?? "";
4
+ }, S = (r, a = !1, t = []) => {
5
+ let e = "?";
6
+ if (a) {
7
+ const n = c(r, t);
8
+ e = n ? `${n}&` : e;
9
+ }
10
+ return r ? `${e}${s}=${btoa(r)}` : "";
11
+ }, m = (r) => r ? `${s}=${btoa(r)}` : "", c = (r, a = []) => {
12
+ const t = new URLSearchParams(r);
13
+ a.forEach((n) => t.delete(n));
14
+ const e = t.toString();
15
+ return e ? `?${e}` : "";
16
+ };
17
+ export {
18
+ c as getFilteredSearchParams,
19
+ o as getSavedSearchParams,
20
+ S as saveAndTransformSearchParams,
21
+ m as transformSearchParams
22
+ };
23
+ //# sourceMappingURL=filter.util.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.util.mjs","sources":["../../src/lib/utils/filter.util.js"],"sourcesContent":["/*\nCopyright 2019 Iguazio Systems Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\") with\nan addition restriction as set forth herein. You may not use this\nfile except in compliance with the License. You may obtain a copy of\nthe License at http://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing\npermissions and limitations under the License.\n\nIn addition, you may not use the software for any purposes that are\nillegal under applicable law, and the grant of the foregoing license\nunder the Apache 2.0 license is conditioned upon your compliance with\nsuch restriction.\n*/\n\nconst SAVED_PARAMS = 'savedParams'\n\nexport const getSavedSearchParams = searchParams => {\n return atob(new URLSearchParams(searchParams)?.get(SAVED_PARAMS) ?? '') ?? ''\n}\n\nexport const saveAndTransformSearchParams = (\n searchParams,\n includeSearchParams = false,\n excludeParamsNames = []\n) => {\n let newSearchParams = '?'\n\n if (includeSearchParams) {\n const filteredNewSearchParams = getFilteredSearchParams(searchParams, excludeParamsNames)\n newSearchParams = filteredNewSearchParams ? `${filteredNewSearchParams}&` : newSearchParams\n }\n\n return searchParams ? `${newSearchParams}${SAVED_PARAMS}=${btoa(searchParams)}` : ''\n}\n\nexport const transformSearchParams = params => {\n return params ? `${SAVED_PARAMS}=${btoa(params)}` : ''\n}\n\nexport const getFilteredSearchParams = (searchParams, excludeParamsNames = []) => {\n const params = new URLSearchParams(searchParams)\n\n excludeParamsNames.forEach(paramName => params.delete(paramName))\n\n const newSearchParams = params.toString()\n\n if (!newSearchParams) return ''\n\n return `?${newSearchParams}`\n}\n"],"names":["SAVED_PARAMS","getSavedSearchParams","searchParams","_a","saveAndTransformSearchParams","includeSearchParams","excludeParamsNames","newSearchParams","filteredNewSearchParams","getFilteredSearchParams","transformSearchParams","params","paramName"],"mappings":"AAoBA,MAAMA,IAAe,eAERC,IAAuB,CAAAC,MAAgB;AAtBpD,MAAAC;AAuBE,SAAO,OAAKA,IAAA,IAAI,gBAAgBD,CAAY,MAAhC,gBAAAC,EAAmC,IAAIH,OAAiB,EAAE,KAAK;AAC7E,GAEaI,IAA+B,CAC1CF,GACAG,IAAsB,IACtBC,IAAqB,CAAA,MAClB;AACH,MAAIC,IAAkB;AAEtB,MAAIF,GAAqB;AACvB,UAAMG,IAA0BC,EAAwBP,GAAcI,CAAkB;AACxF,IAAAC,IAAkBC,IAA0B,GAAGA,CAAuB,MAAMD;AAAA,EAChF;AAEE,SAAOL,IAAe,GAAGK,CAAe,GAAGP,CAAY,IAAI,KAAKE,CAAY,CAAC,KAAK;AACpF,GAEaQ,IAAwB,CAAAC,MAC5BA,IAAS,GAAGX,CAAY,IAAI,KAAKW,CAAM,CAAC,KAAK,IAGzCF,IAA0B,CAACP,GAAcI,IAAqB,OAAO;AAChF,QAAMK,IAAS,IAAI,gBAAgBT,CAAY;AAE/C,EAAAI,EAAmB,QAAQ,CAAAM,MAAaD,EAAO,OAAOC,CAAS,CAAC;AAEhE,QAAML,IAAkBI,EAAO,SAAQ;AAEvC,SAAKJ,IAEE,IAAIA,CAAe,KAFG;AAG/B;"}
@@ -1,7 +1,12 @@
1
+ export * as chips from "./chips.util";
1
2
  export * as common from "./common.util";
3
+ export * as datetime from "./datetime.util";
4
+ export * as filter from "./filter.util";
2
5
  export * as form from "./form.util";
3
6
  export * as generateChipsList from "./generateChipsList.util";
4
7
  export * as getFirstScrollableParent from "./getFirstScrollableParent.util";
5
8
  export * as math from "./math.util";
9
+ export * as notification from "./notification.util";
10
+ export * as string from "./string.util";
6
11
  export * as validation from "./validation.util";
7
12
  //# sourceMappingURL=index.d.ts.map
@@ -1,15 +1,25 @@
1
- import * as t from "./common.util.mjs";
2
- import * as o from "./form.util.mjs";
3
- import * as r from "./generateChipsList.util.mjs";
4
- import * as a from "./getFirstScrollableParent.util.mjs";
5
- import * as i from "./math.util.mjs";
6
- import * as m from "./validation.util.mjs";
1
+ import * as t from "./chips.util.mjs";
2
+ import * as o from "./common.util.mjs";
3
+ import * as r from "./datetime.util.mjs";
4
+ import * as i from "./filter.util.mjs";
5
+ import * as a from "./form.util.mjs";
6
+ import * as m from "./generateChipsList.util.mjs";
7
+ import * as s from "./getFirstScrollableParent.util.mjs";
8
+ import * as e from "./math.util.mjs";
9
+ import * as p from "./notification.util.mjs";
10
+ import * as l from "./string.util.mjs";
11
+ import * as f from "./validation.util.mjs";
7
12
  export {
8
- t as common,
9
- o as form,
10
- r as generateChipsList,
11
- a as getFirstScrollableParent,
12
- i as math,
13
- m as validation
13
+ t as chips,
14
+ o as common,
15
+ r as datetime,
16
+ i as filter,
17
+ a as form,
18
+ m as generateChipsList,
19
+ s as getFirstScrollableParent,
20
+ e as math,
21
+ p as notification,
22
+ l as string,
23
+ f as validation
14
24
  };
15
25
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ export function showErrorNotification(dispatch: any, error: any, defaultErrorMsg: any, customErrorMsg: any, retryCallback?: any, showNotificationCallback?: any): void;
2
+ //# sourceMappingURL=notification.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.util.d.ts","sourceRoot":"","sources":["../../src/lib/utils/notification.util.js"],"names":[],"mappings":"AAwBO,uKAqBN"}
@@ -0,0 +1,17 @@
1
+ import { setNotification as O } from "../reducers/notificationReducer.mjs";
2
+ import { getErrorMsg as _ } from "./common.util.mjs";
3
+ import { FORBIDDEN_ERROR_STATUS_CODE as f } from "../constants.mjs";
4
+ const T = (E, t, m, R, n = null, s = null) => {
5
+ var u, D;
6
+ const p = {
7
+ status: ((u = t == null ? void 0 : t.response) == null ? void 0 : u.status) || 400,
8
+ id: Math.random(),
9
+ message: R || _(t, m),
10
+ error: t
11
+ };
12
+ n && ((D = t == null ? void 0 : t.response) == null ? void 0 : D.status) !== f && (p.retry = n), s == null || s(m), E(O(p));
13
+ };
14
+ export {
15
+ T as showErrorNotification
16
+ };
17
+ //# sourceMappingURL=notification.util.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.util.mjs","sources":["../../src/lib/utils/notification.util.js"],"sourcesContent":["/*\nCopyright 2019 Iguazio Systems Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\") with\nan addition restriction as set forth herein. You may not use this\nfile except in compliance with the License. You may obtain a copy of\nthe License at http://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing\npermissions and limitations under the License.\n\nIn addition, you may not use the software for any purposes that are\nillegal under applicable law, and the grant of the foregoing license\nunder the Apache 2.0 license is conditioned upon your compliance with\nsuch restriction.\n*/\n\nimport { setNotification } from '../reducers/notificationReducer'\nimport { getErrorMsg } from './common.util'\nimport { FORBIDDEN_ERROR_STATUS_CODE } from '../constants'\n\nexport const showErrorNotification = (\n dispatch,\n error,\n defaultErrorMsg,\n customErrorMsg,\n retryCallback = null,\n showNotificationCallback = null\n) => {\n const notificationData = {\n status: error?.response?.status || 400,\n id: Math.random(),\n message: customErrorMsg || getErrorMsg(error, defaultErrorMsg),\n error\n }\n\n if (retryCallback && error?.response?.status !== FORBIDDEN_ERROR_STATUS_CODE) {\n notificationData.retry = retryCallback\n }\n\n showNotificationCallback?.(defaultErrorMsg)\n dispatch(setNotification(notificationData))\n}\n"],"names":["showErrorNotification","dispatch","error","defaultErrorMsg","customErrorMsg","retryCallback","showNotificationCallback","notificationData","_a","getErrorMsg","_b","FORBIDDEN_ERROR_STATUS_CODE","setNotification"],"mappings":";;;AAwBY,MAACA,IAAwB,CACnCC,GACAC,GACAC,GACAC,GACAC,IAAgB,MAChBC,IAA2B,SACxB;;AACH,QAAMC,IAAmB;AAAA,IACvB,UAAQC,IAAAN,KAAA,gBAAAA,EAAO,aAAP,gBAAAM,EAAiB,WAAU;AAAA,IACnC,IAAI,KAAK,OAAQ;AAAA,IACjB,SAASJ,KAAkBK,EAAYP,GAAOC,CAAe;AAAA,IAC7D,OAAAD;AAAA,EACJ;AAEE,EAAIG,OAAiBK,IAAAR,KAAA,gBAAAA,EAAO,aAAP,gBAAAQ,EAAiB,YAAWC,MAC/CJ,EAAiB,QAAQF,IAG3BC,KAAA,QAAAA,EAA2BH,IAC3BF,EAASW,EAAgBL,CAAgB,CAAC;AAC5C;"}
@@ -0,0 +1,6 @@
1
+ export function truncateUid(value?: string): string;
2
+ export function joinDataOfArrayOrObject(data: any, splitCharacter?: string): any;
3
+ export function deleteUnsafeHtml(unsafeStr: any): any;
4
+ export function trimSplit(value: any, delimiter: any): any;
5
+ export function splitTrim(value: any, delimiter: any): any;
6
+ //# sourceMappingURL=string.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.util.d.ts","sourceRoot":"","sources":["../../src/lib/utils/string.util.js"],"names":[],"mappings":"AAqBO,oDAAwF;AAExF,iFAUN;AAEM,sDAEN;AAEM,2DAGN;AAEM,2DAGN"}
@@ -0,0 +1,13 @@
1
+ import { isNil as n, isObject as s } from "lodash";
2
+ const c = (r = "") => r.length > 7 ? `...${r.slice(-7)}` : r, l = (r, t = ",") => n(r) ? "" : Array.isArray(r) ? r.join(t) : s(r) ? Object.values(r).join(t) : r.toString(), m = (r) => r.replace(/[&<>"'()\][]/g, ""), p = (r, t) => {
3
+ const e = (r ?? "").trim();
4
+ return e ? e.split(t) : [];
5
+ }, u = (r, t) => r.split(t).map((i) => i.trim());
6
+ export {
7
+ m as deleteUnsafeHtml,
8
+ l as joinDataOfArrayOrObject,
9
+ u as splitTrim,
10
+ p as trimSplit,
11
+ c as truncateUid
12
+ };
13
+ //# sourceMappingURL=string.util.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.util.mjs","sources":["../../src/lib/utils/string.util.js"],"sourcesContent":["/*\nCopyright 2019 Iguazio Systems Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\") with\nan addition restriction as set forth herein. You may not use this\nfile except in compliance with the License. You may obtain a copy of\nthe License at http://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing\npermissions and limitations under the License.\n\nIn addition, you may not use the software for any purposes that are\nillegal under applicable law, and the grant of the foregoing license\nunder the Apache 2.0 license is conditioned upon your compliance with\nsuch restriction.\n*/\nimport { isNil, isObject } from 'lodash'\n\nexport const truncateUid = (value = '') => (value.length > 7 ? `...${value.slice(-7)}` : value)\n\nexport const joinDataOfArrayOrObject = (data, splitCharacter = ',') => {\n if (isNil(data)) {\n return ''\n } else if (Array.isArray(data)) {\n return data.join(splitCharacter)\n } else if (isObject(data)) {\n return Object.values(data).join(splitCharacter)\n }\n\n return data.toString()\n}\n\nexport const deleteUnsafeHtml = unsafeStr => {\n return unsafeStr.replace(/[&<>\"'()\\][]/g, '')\n}\n\nexport const trimSplit = (value, delimiter) => {\n const trimmed = (value ?? '').trim()\n return trimmed ? trimmed.split(delimiter) : []\n}\n\nexport const splitTrim = (value, delimiter) => {\n const arr = value.split(delimiter)\n return arr.map(string => string.trim())\n}\n"],"names":["truncateUid","value","joinDataOfArrayOrObject","data","splitCharacter","isNil","isObject","deleteUnsafeHtml","unsafeStr","trimSplit","delimiter","trimmed","splitTrim","string"],"mappings":";AAqBY,MAACA,IAAc,CAACC,IAAQ,OAAQA,EAAM,SAAS,IAAI,MAAMA,EAAM,MAAM,EAAE,CAAC,KAAKA,GAE5EC,IAA0B,CAACC,GAAMC,IAAiB,QACzDC,EAAMF,CAAI,IACL,KACE,MAAM,QAAQA,CAAI,IACpBA,EAAK,KAAKC,CAAc,IACtBE,EAASH,CAAI,IACf,OAAO,OAAOA,CAAI,EAAE,KAAKC,CAAc,IAGzCD,EAAK,SAAQ,GAGTI,IAAmB,CAAAC,MACvBA,EAAU,QAAQ,iBAAiB,EAAE,GAGjCC,IAAY,CAACR,GAAOS,MAAc;AAC7C,QAAMC,KAAWV,KAAS,IAAI,KAAI;AAClC,SAAOU,IAAUA,EAAQ,MAAMD,CAAS,IAAI,CAAA;AAC9C,GAEaE,IAAY,CAACX,GAAOS,MACnBT,EAAM,MAAMS,CAAS,EACtB,IAAI,CAAAG,MAAUA,EAAO,KAAM,CAAA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iguazio.dashboard-react-controls",
3
- "version": "3.0.4",
3
+ "version": "3.1.1",
4
4
  "description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.mjs",
@@ -20,6 +20,8 @@
20
20
  "./types": "./dist/types.mjs",
21
21
  "./utils": "./dist/utils/index.mjs",
22
22
  "./utils/*": "./dist/utils/*",
23
+ "./reducers": "./dist/reducers/index.mjs",
24
+ "./reducers/*": "./dist/reducers/*",
23
25
  "./images/*": "./dist/images/*",
24
26
  "./scss/*": "./dist/scss/*",
25
27
  "./index.css": "./dist/index.css"
@@ -39,20 +41,25 @@
39
41
  "mlrun"
40
42
  ],
41
43
  "peerDependencies": {
44
+ "@reduxjs/toolkit": "*",
42
45
  "classnames": "*",
43
46
  "final-form": "*",
44
47
  "final-form-arrays": "*",
45
48
  "lodash": "*",
49
+ "moment": "*",
46
50
  "prop-types": "*",
47
51
  "react": "*",
48
52
  "react-dom": "*",
49
53
  "react-final-form": "*",
50
54
  "react-final-form-arrays": "*",
51
55
  "react-modal-promise": "*",
56
+ "react-redux": "*",
57
+ "react-router-dom": "*",
52
58
  "react-transition-group": "*"
53
59
  },
54
60
  "devDependencies": {
55
61
  "@eslint/js": "^9.19.0",
62
+ "@reduxjs/toolkit": "^2.8.2",
56
63
  "@storybook/addon-actions": "^8.0.0",
57
64
  "@storybook/addon-essentials": "^8.0.0",
58
65
  "@storybook/addon-interactions": "^8.0.0",
@@ -75,6 +82,7 @@
75
82
  "final-form-arrays": "^3.1.0",
76
83
  "globals": "^15.14.0",
77
84
  "lodash": "^4.17.21",
85
+ "moment": "^2.30.1",
78
86
  "node": "21.6.2",
79
87
  "prettier": "3.3.3",
80
88
  "prop-types": "^15.8.1",
@@ -83,6 +91,8 @@
83
91
  "react-final-form": "^6.5.9",
84
92
  "react-final-form-arrays": "^3.1.4",
85
93
  "react-modal-promise": "^1.0.2",
94
+ "react-redux": "^7.2.9",
95
+ "react-router-dom": "6.22.3",
86
96
  "react-transition-group": "^4.4.5",
87
97
  "sass": "^1.72.0",
88
98
  "tsup": "^8.3.6",