impact-ui 4.0.0-alpha.7 → 4.0.0-alpha.9

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 (169) hide show
  1. package/dist/_virtual/BookmarkBorderOutlined.js +4 -0
  2. package/dist/_virtual/FilterListOutlined.js +4 -0
  3. package/dist/_virtual/IsConstructor.js +4 -0
  4. package/dist/_virtual/___vite-browser-external.js +6 -0
  5. package/dist/_virtual/__vite-browser-external.js +4 -0
  6. package/dist/_virtual/_commonjsHelpers.js +2 -0
  7. package/dist/_virtual/constants.js +4 -0
  8. package/dist/_virtual/getClassName.js +4 -0
  9. package/dist/_virtual/index13.js +2 -2
  10. package/dist/_virtual/index14.js +4 -0
  11. package/dist/_virtual/index15.js +4 -0
  12. package/dist/_virtual/index16.js +4 -0
  13. package/dist/_virtual/index3.js +2 -4
  14. package/dist/_virtual/index4.js +3 -3
  15. package/dist/_virtual/index5.js +4 -2
  16. package/dist/_virtual/separateStyles.js +4 -0
  17. package/dist/components/Chatbot/bookMarkPanel.js +1 -1
  18. package/dist/components/Notification/Notification.types.d.ts +35 -5
  19. package/dist/components/Notification/Notification.types.d.ts.map +1 -1
  20. package/dist/components/Notification/NotificationBody/NotificationList/NotificationChipsList.d.ts +21 -0
  21. package/dist/components/Notification/NotificationBody/NotificationList/NotificationChipsList.d.ts.map +1 -0
  22. package/dist/components/Notification/NotificationBody/NotificationList/NotificationChipsList.js +49 -0
  23. package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.d.ts +30 -0
  24. package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.d.ts.map +1 -0
  25. package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.js +211 -0
  26. package/dist/components/Notification/NotificationBody/NotificationList/NotificationListItem.d.ts +14 -0
  27. package/dist/components/Notification/NotificationBody/NotificationList/NotificationListItem.d.ts.map +1 -0
  28. package/dist/components/Notification/NotificationBody/NotificationList/NotificationListItem.js +299 -0
  29. package/dist/components/Notification/NotificationBody/NotificationPanelContent.d.ts +9 -0
  30. package/dist/components/Notification/NotificationBody/NotificationPanelContent.d.ts.map +1 -0
  31. package/dist/components/Notification/NotificationBody/NotificationPanelContent.js +71 -0
  32. package/dist/components/Notification/NotificationBody/NotificationTaskList.d.ts +43 -0
  33. package/dist/components/Notification/NotificationBody/NotificationTaskList.d.ts.map +1 -0
  34. package/dist/components/Notification/NotificationBody/NotificationTaskList.js +245 -0
  35. package/dist/components/Notification/NotificationBody/index.d.ts +2 -3
  36. package/dist/components/Notification/NotificationBody/index.d.ts.map +1 -1
  37. package/dist/components/Notification/NotificationBody/index.js +21 -11
  38. package/dist/components/Notification/mockData.d.ts +14 -0
  39. package/dist/components/Notification/mockData.d.ts.map +1 -0
  40. package/dist/components/index.d.ts +1 -1
  41. package/dist/components/index.d.ts.map +1 -1
  42. package/dist/mcp-component-registry.json +193 -18
  43. package/dist/node_modules/@mui/icons-material/BookmarkBorderOutlined.js +17 -0
  44. package/dist/node_modules/@mui/icons-material/FilterListOutlined.js +17 -0
  45. package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
  46. package/dist/node_modules/array.prototype.flat/implementation.js +33 -0
  47. package/dist/node_modules/array.prototype.flat/index.js +28 -0
  48. package/dist/node_modules/array.prototype.flat/polyfill.js +15 -0
  49. package/dist/node_modules/array.prototype.flat/shim.js +28 -0
  50. package/dist/node_modules/call-bind/index.js +34 -0
  51. package/dist/node_modules/call-bind-apply-helpers/actualApply.js +19 -0
  52. package/dist/node_modules/call-bind-apply-helpers/applyBind.js +19 -0
  53. package/dist/node_modules/call-bind-apply-helpers/functionApply.js +11 -0
  54. package/dist/node_modules/call-bind-apply-helpers/functionCall.js +11 -0
  55. package/dist/node_modules/call-bind-apply-helpers/index.js +24 -0
  56. package/dist/node_modules/call-bind-apply-helpers/reflectApply.js +11 -0
  57. package/dist/node_modules/call-bound/index.js +28 -0
  58. package/dist/node_modules/define-data-property/index.js +55 -0
  59. package/dist/node_modules/define-properties/index.js +50 -0
  60. package/dist/node_modules/dunder-proto/get.js +36 -0
  61. package/dist/node_modules/dunder-proto/set.js +40 -0
  62. package/dist/node_modules/es-abstract/2024/ArrayCreate.js +45 -0
  63. package/dist/node_modules/es-abstract/2024/ArraySpeciesCreate.js +50 -0
  64. package/dist/node_modules/es-abstract/2024/Call.js +26 -0
  65. package/dist/node_modules/es-abstract/2024/CreateDataProperty.js +33 -0
  66. package/dist/node_modules/es-abstract/2024/CreateDataPropertyOrThrow.js +30 -0
  67. package/dist/node_modules/es-abstract/2024/DefinePropertyOrThrow.js +48 -0
  68. package/dist/node_modules/es-abstract/2024/FlattenIntoArray.js +65 -0
  69. package/dist/node_modules/es-abstract/2024/FromPropertyDescriptor.js +22 -0
  70. package/dist/node_modules/es-abstract/2024/Get.js +27 -0
  71. package/dist/node_modules/es-abstract/2024/HasProperty.js +25 -0
  72. package/dist/node_modules/es-abstract/2024/IsAccessorDescriptor.js +28 -0
  73. package/dist/node_modules/es-abstract/2024/IsArray.js +12 -0
  74. package/dist/node_modules/es-abstract/2024/IsCallable.js +12 -0
  75. package/dist/node_modules/es-abstract/2024/IsConstructor.js +42 -0
  76. package/dist/node_modules/es-abstract/2024/IsDataDescriptor.js +28 -0
  77. package/dist/node_modules/es-abstract/2024/IsExtensible.js +21 -0
  78. package/dist/node_modules/es-abstract/2024/IsGenericDescriptor.js +30 -0
  79. package/dist/node_modules/es-abstract/2024/LengthOfArrayLike.js +24 -0
  80. package/dist/node_modules/es-abstract/2024/OrdinaryDefineOwnProperty.js +59 -0
  81. package/dist/node_modules/es-abstract/2024/SameValue.js +21 -0
  82. package/dist/node_modules/es-abstract/2024/StringToNumber.js +48 -0
  83. package/dist/node_modules/es-abstract/2024/ToBoolean.js +13 -0
  84. package/dist/node_modules/es-abstract/2024/ToIntegerOrInfinity.js +28 -0
  85. package/dist/node_modules/es-abstract/2024/ToLength.js +24 -0
  86. package/dist/node_modules/es-abstract/2024/ToNumber.js +34 -0
  87. package/dist/node_modules/es-abstract/2024/ToObject.js +12 -0
  88. package/dist/node_modules/es-abstract/2024/ToPrimitive.js +18 -0
  89. package/dist/node_modules/es-abstract/2024/ToPropertyDescriptor.js +56 -0
  90. package/dist/node_modules/es-abstract/2024/ToString.js +21 -0
  91. package/dist/node_modules/es-abstract/2024/ValidateAndApplyPropertyDescriptor.js +161 -0
  92. package/dist/node_modules/es-abstract/2024/floor.js +18 -0
  93. package/dist/node_modules/es-abstract/2024/truncate.js +21 -0
  94. package/dist/node_modules/es-abstract/GetIntrinsic.js +12 -0
  95. package/dist/node_modules/es-abstract/helpers/DefineOwnProperty.js +42 -0
  96. package/dist/node_modules/es-abstract/helpers/IsArray.js +18 -0
  97. package/dist/node_modules/es-abstract/helpers/fromPropertyDescriptor.js +35 -0
  98. package/dist/node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js +15 -0
  99. package/dist/node_modules/es-abstract/helpers/isPrimitive.js +13 -0
  100. package/dist/node_modules/es-abstract/helpers/isPropertyKey.js +13 -0
  101. package/dist/node_modules/es-abstract/helpers/records/property-descriptor.js +39 -0
  102. package/dist/node_modules/es-define-property/index.js +19 -0
  103. package/dist/node_modules/es-errors/eval.js +11 -0
  104. package/dist/node_modules/es-errors/index.js +11 -0
  105. package/dist/node_modules/es-errors/range.js +11 -0
  106. package/dist/node_modules/es-errors/ref.js +11 -0
  107. package/dist/node_modules/es-errors/syntax.js +11 -0
  108. package/dist/node_modules/es-errors/type.js +11 -0
  109. package/dist/node_modules/es-errors/uri.js +11 -0
  110. package/dist/node_modules/es-object-atoms/RequireObjectCoercible.js +18 -0
  111. package/dist/node_modules/es-object-atoms/ToObject.js +18 -0
  112. package/dist/node_modules/es-object-atoms/index.js +11 -0
  113. package/dist/node_modules/es-object-atoms/isObject.js +13 -0
  114. package/dist/node_modules/es-shim-unscopables/index.js +26 -0
  115. package/dist/node_modules/es-to-primitive/es2015.js +89 -0
  116. package/dist/node_modules/es-to-primitive/helpers/isPrimitive.js +13 -0
  117. package/dist/node_modules/function-bind/implementation.js +79 -0
  118. package/dist/node_modules/function-bind/index.js +13 -0
  119. package/dist/node_modules/get-intrinsic/index.js +358 -0
  120. package/dist/node_modules/get-proto/Object.getPrototypeOf.js +13 -0
  121. package/dist/node_modules/get-proto/Reflect.getPrototypeOf.js +11 -0
  122. package/dist/node_modules/get-proto/index.js +26 -0
  123. package/dist/node_modules/global-cache/index.js +85 -0
  124. package/dist/node_modules/gopd/gOPD.js +11 -0
  125. package/dist/node_modules/gopd/index.js +20 -0
  126. package/dist/node_modules/has-property-descriptors/index.js +26 -0
  127. package/dist/node_modules/has-symbols/index.js +28 -0
  128. package/dist/node_modules/has-symbols/shams.js +58 -0
  129. package/dist/node_modules/has-tostringtag/shams.js +15 -0
  130. package/dist/node_modules/hasown/index.js +15 -0
  131. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
  132. package/dist/node_modules/is-callable/index.js +120 -0
  133. package/dist/node_modules/is-date-object/index.js +31 -0
  134. package/dist/node_modules/is-regex/index.js +70 -0
  135. package/dist/node_modules/is-symbol/index.js +44 -0
  136. package/dist/node_modules/math-intrinsics/abs.js +11 -0
  137. package/dist/node_modules/math-intrinsics/constants/maxArrayLength.js +11 -0
  138. package/dist/node_modules/math-intrinsics/constants/maxSafeInteger.js +12 -0
  139. package/dist/node_modules/math-intrinsics/floor.js +11 -0
  140. package/dist/node_modules/math-intrinsics/isFinite.js +15 -0
  141. package/dist/node_modules/math-intrinsics/isInteger.js +25 -0
  142. package/dist/node_modules/math-intrinsics/isNaN.js +13 -0
  143. package/dist/node_modules/math-intrinsics/max.js +11 -0
  144. package/dist/node_modules/math-intrinsics/min.js +11 -0
  145. package/dist/node_modules/math-intrinsics/pow.js +11 -0
  146. package/dist/node_modules/math-intrinsics/round.js +11 -0
  147. package/dist/node_modules/math-intrinsics/sign.js +18 -0
  148. package/dist/node_modules/object-inspect/index.js +537 -0
  149. package/dist/node_modules/object-keys/implementation.js +125 -0
  150. package/dist/node_modules/object-keys/index.js +39 -0
  151. package/dist/node_modules/object-keys/isArguments.js +19 -0
  152. package/dist/node_modules/react-dates/lib/utils/registerCSSInterfaceWithDefaultTheme.js +2 -2
  153. package/dist/node_modules/react-is/index.js +1 -1
  154. package/dist/node_modules/react-with-styles-interface-css/dist/index.js +57 -0
  155. package/dist/node_modules/react-with-styles-interface-css/dist/utils/constants.js +18 -0
  156. package/dist/node_modules/react-with-styles-interface-css/dist/utils/getClassName.js +20 -0
  157. package/dist/node_modules/react-with-styles-interface-css/dist/utils/separateStyles.js +39 -0
  158. package/dist/node_modules/react-with-styles-interface-css/index.js +12 -0
  159. package/dist/node_modules/safe-regex-test/index.js +25 -0
  160. package/dist/node_modules/set-function-length/index.js +61 -0
  161. package/dist/node_modules/set-proto/Object.setPrototypeOf.js +13 -0
  162. package/dist/node_modules/set-proto/Reflect.setPrototypeOf.js +11 -0
  163. package/dist/node_modules/set-proto/index.js +27 -0
  164. package/dist/node_modules/string.prototype.trim/implementation.js +24 -0
  165. package/dist/node_modules/string.prototype.trim/index.js +33 -0
  166. package/dist/node_modules/string.prototype.trim/polyfill.js +20 -0
  167. package/dist/node_modules/string.prototype.trim/shim.js +27 -0
  168. package/dist/styles/style.css +1 -1
  169. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ var BookmarkBorderOutlined = {};
2
+ export {
3
+ BookmarkBorderOutlined as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var FilterListOutlined = {};
2
+ export {
3
+ FilterListOutlined as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var IsConstructor = { exports: {} };
2
+ export {
3
+ IsConstructor as __module
4
+ };
@@ -0,0 +1,6 @@
1
+ import * as __viteBrowserExternal from "./__vite-browser-external.js";
2
+ import { getAugmentedNamespace } from "./_commonjsHelpers.js";
3
+ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal);
4
+ export {
5
+ require$$0 as default
6
+ };
@@ -0,0 +1,4 @@
1
+ const __viteBrowserExternal = {};
2
+ export {
3
+ __viteBrowserExternal as default
4
+ };
@@ -1,3 +1,4 @@
1
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1
2
  function getDefaultExportFromCjs(x) {
2
3
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
3
4
  }
@@ -26,6 +27,7 @@ function getAugmentedNamespace(n) {
26
27
  return a;
27
28
  }
28
29
  export {
30
+ commonjsGlobal,
29
31
  getAugmentedNamespace,
30
32
  getDefaultExportFromCjs
31
33
  };
@@ -0,0 +1,4 @@
1
+ var constants = {};
2
+ export {
3
+ constants as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var getClassName = {};
2
+ export {
3
+ getClassName as __exports
4
+ };
@@ -1,4 +1,4 @@
1
- var reactIs = { exports: {} };
1
+ var dist = {};
2
2
  export {
3
- reactIs as __module
3
+ dist as __exports
4
4
  };
@@ -0,0 +1,4 @@
1
+ var callBind = { exports: {} };
2
+ export {
3
+ callBind as __module
4
+ };
@@ -0,0 +1,4 @@
1
+ var isSymbol = { exports: {} };
2
+ export {
3
+ isSymbol as __module
4
+ };
@@ -0,0 +1,4 @@
1
+ var reactIs = { exports: {} };
2
+ export {
3
+ reactIs as __module
4
+ };
@@ -1,6 +1,4 @@
1
- import { getAugmentedNamespace } from "./_commonjsHelpers.js";
2
- import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/formatMuiErrorMessage/index.js";
3
- const require$$1 = /* @__PURE__ */ getAugmentedNamespace(index);
1
+ var reactIs = { exports: {} };
4
2
  export {
5
- require$$1 as default
3
+ reactIs as __module
6
4
  };
@@ -1,6 +1,6 @@
1
1
  import { getAugmentedNamespace } from "./_commonjsHelpers.js";
2
- import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/clamp/index.js";
3
- const require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
2
+ import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/formatMuiErrorMessage/index.js";
3
+ const require$$1 = /* @__PURE__ */ getAugmentedNamespace(index);
4
4
  export {
5
- require$$2 as default
5
+ require$$1 as default
6
6
  };
@@ -1,4 +1,6 @@
1
- var reactIs = { exports: {} };
1
+ import { getAugmentedNamespace } from "./_commonjsHelpers.js";
2
+ import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/clamp/index.js";
3
+ const require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
2
4
  export {
3
- reactIs as __module
5
+ require$$2 as default
4
6
  };
@@ -0,0 +1,4 @@
1
+ var separateStyles = {};
2
+ export {
3
+ separateStyles as __exports
4
+ };
@@ -46,7 +46,7 @@ function BookMarkPanel({
46
46
  }
47
47
  )
48
48
  ] }) }),
49
- activeTab === "predefined" ? preDefinedQuestions == null ? void 0 : preDefinedQuestions.map((item, idx) => /* @__PURE__ */ jsxs("div", { className: "bookmark-panel-body", children: [
49
+ activeTab === "preDefined" ? preDefinedQuestions == null ? void 0 : preDefinedQuestions.map((item, idx) => /* @__PURE__ */ jsxs("div", { className: "bookmark-panel-body", children: [
50
50
  /* @__PURE__ */ jsx("span", { className: "drag-handle", children: "⋮⋮" }),
51
51
  /* @__PURE__ */ jsx("span", { className: "bookmark-question-text", children: item.question }),
52
52
  /* @__PURE__ */ jsx("span", { className: "bookmark-menu", children: "⋮" })
@@ -5,10 +5,36 @@ export interface NotificationTabItem {
5
5
  label: string;
6
6
  value: string;
7
7
  }
8
+ export interface NotificationListItemData {
9
+ id: string | number;
10
+ label: string;
11
+ date: Date;
12
+ time: number;
13
+ description: string;
14
+ selected?: boolean;
15
+ read?: boolean;
16
+ status?: 'success' | 'fail' | 'pending';
17
+ badge?: string;
18
+ bookMarked?: boolean;
19
+ showBookMark?: boolean;
20
+ showOverdueIcon?: boolean;
21
+ showFastApproachingIcon?: boolean;
22
+ showNOverdueIcon?: boolean;
23
+ moveToPendingText?: string;
24
+ checkBoxClick?: NotificationListItemHandler;
25
+ handleSelectChange?: NotificationListItemHandler;
26
+ handleMarkCompleted?: NotificationListItemHandler;
27
+ handleMoveToPending?: NotificationListItemHandler;
28
+ handleMarkAsRead?: NotificationListItemHandler;
29
+ handleBookMark?: NotificationListItemHandler;
30
+ handleDeleteNotification?: NotificationListItemHandler;
31
+ handleDownloadNotification?: NotificationListItemHandler;
32
+ }
33
+ export type NotificationListItemHandler = (type?: string, notificationPanels?: NotificationPanelItem[], setNotificationPanels?: (panels: NotificationPanelItem[]) => void, list?: NotificationListItemData) => void;
8
34
  export interface NotificationPanelItem {
9
35
  id: number;
10
36
  value: string;
11
- notificationList?: ReactNode;
37
+ notificationList?: NotificationListItemData[] | ReactNode;
12
38
  handleSettingClick?: () => void;
13
39
  filterChip?: unknown;
14
40
  selectedFilterChip?: unknown;
@@ -39,10 +65,10 @@ export interface NotificationProps {
39
65
  primaryButtonLabel?: string;
40
66
  onPrimaryButtonClick?: () => void;
41
67
  onSettingButtonClick?: () => void;
42
- handleSelectAll?: () => void;
43
- handleMarkReadAll?: () => void;
44
- handleMoveAllPending?: () => void;
45
- handleNotificationDeleteAll?: () => void;
68
+ handleSelectAll?: (type?: string, notificationList?: NotificationListItemData[]) => void;
69
+ handleMarkReadAll?: (type?: string, notificationList?: NotificationListItemData[]) => void;
70
+ handleMoveAllPending?: (type?: string, selectedItems?: NotificationListItemData[], selectedOption?: unknown) => void;
71
+ handleNotificationDeleteAll?: (type?: string, selectedItems?: NotificationListItemData[]) => void;
46
72
  badgesList?: NotificationBadgeList[];
47
73
  notificationTabs?: NotificationTabItem[];
48
74
  notificationPanels?: NotificationPanelItem[];
@@ -67,4 +93,8 @@ export interface NotificationProps {
67
93
  /** Optional body component (e.g. for testing); defaults to NotificationBody */
68
94
  NotificationBodyComponent?: React.ComponentType<Record<string, unknown>>;
69
95
  }
96
+ /** @deprecated Use NotificationListItemData */
97
+ export type NotificationItem = NotificationListItemData;
98
+ /** @deprecated Use NotificationPanelItem */
99
+ export type NotificationPanel = NotificationPanelItem;
70
100
  //# sourceMappingURL=Notification.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.types.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE/D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QACN,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;QACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;KACtB,EAAE,CAAC;CACL;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,CAAC,IAAI,E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AAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,+EAA+E;IAC/E,yBAAyB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC1E"}
1
+ {"version":3,"file":"Notification.types.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE/D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,2BAA2B,CAAC;IAC5C,kBAAkB,CAAC,EAA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,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4BAA4B,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAClC,+EAA+E;IAC/E,yBAAyB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC1E;AAED,+CAA+C;AAC/C,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAExD,4CAA4C;AAC5C,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { NotificationListItemData } from '../../Notification.types';
2
+
3
+ export interface NotificationChipItem {
4
+ id?: number;
5
+ label: string;
6
+ numberOfTypes?: number;
7
+ handleClick?: () => void;
8
+ onClick?: () => void;
9
+ }
10
+ interface NotificationChipsListProps {
11
+ list: NotificationChipItem[];
12
+ currActiveListType: string;
13
+ setCurrActiveListType: (label: string) => void;
14
+ activeBadge?: string;
15
+ showBadgeLoader?: boolean;
16
+ notificationList: NotificationListItemData[];
17
+ expandList: boolean;
18
+ }
19
+ export declare function NotificationChipsList({ list, currActiveListType, setCurrActiveListType, activeBadge, showBadgeLoader, notificationList, expandList, }: NotificationChipsListProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
21
+ //# sourceMappingURL=NotificationChipsList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationChipsList.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/NotificationBody/NotificationList/NotificationChipsList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,UAAU,0BAA0B;IAClC,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,wBAAwB,EAAE,CAAC;IAC7C,UAAU,EAAE,OAAO,CAAC;CACrB;AAWD,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,UAAU,GACX,EAAE,0BAA0B,2CA4B5B"}
@@ -0,0 +1,49 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Badge } from "../../../Badge/index.js";
3
+ import { Loader } from "../../../Loader/index.js";
4
+ function getBadgeLabel(item, notificationList) {
5
+ const baseLabel = item.label || "";
6
+ if (item.numberOfTypes) {
7
+ return `${baseLabel} (${item.numberOfTypes})`;
8
+ }
9
+ const count = notificationList.filter((listItem) => listItem.badge === item.label).length;
10
+ return count > 0 ? `${baseLabel} (${count})` : baseLabel;
11
+ }
12
+ function NotificationChipsList({
13
+ list,
14
+ currActiveListType,
15
+ setCurrActiveListType,
16
+ activeBadge,
17
+ showBadgeLoader,
18
+ notificationList,
19
+ expandList
20
+ }) {
21
+ if (showBadgeLoader) {
22
+ return /* @__PURE__ */ jsx(Loader, { showSkeleton: true, size: "small" });
23
+ }
24
+ const activeLabel = activeBadge != null && activeBadge !== "" ? activeBadge : currActiveListType;
25
+ return /* @__PURE__ */ jsx("div", { className: "impact-notification-task-list-chips", children: /* @__PURE__ */ jsx(
26
+ "div",
27
+ {
28
+ className: `impact-notification-task-list-item ${expandList ? "list-item-full-width" : ""}`,
29
+ children: list.map((item, index) => /* @__PURE__ */ jsx(
30
+ Badge,
31
+ {
32
+ color: activeLabel === item.label ? "info" : void 0,
33
+ label: getBadgeLabel(item, notificationList),
34
+ variant: "stroke",
35
+ onClick: () => {
36
+ var _a, _b;
37
+ (_a = item.handleClick) == null ? void 0 : _a.call(item);
38
+ (_b = item.onClick) == null ? void 0 : _b.call(item);
39
+ setCurrActiveListType(item.label);
40
+ }
41
+ },
42
+ item.id ?? index
43
+ ))
44
+ }
45
+ ) });
46
+ }
47
+ export {
48
+ NotificationChipsList
49
+ };
@@ -0,0 +1,30 @@
1
+ import { SelectOption } from '../../../Select/Select.types';
2
+ import { NotificationListItemData, NotificationPanelItem } from '../../Notification.types';
3
+
4
+ export interface NotificationListProps {
5
+ expand?: boolean;
6
+ type: string;
7
+ title?: string;
8
+ notificationList: NotificationListItemData[];
9
+ notificationPanels: NotificationPanelItem[];
10
+ setNotificationPanels?: (panels: NotificationPanelItem[]) => void;
11
+ handleSelectAll?: (type?: string, notificationList?: NotificationListItemData[]) => void;
12
+ handleMarkReadAll?: (type?: string, notificationList?: NotificationListItemData[]) => void;
13
+ handleMoveAllPending?: (type?: string, selectedItems?: NotificationListItemData[], selectedOption?: unknown) => void;
14
+ moveToPendingDropdownOptions?: SelectOption[];
15
+ handleNotificationDeleteAll?: (type?: string, selectedItems?: NotificationListItemData[]) => void;
16
+ showNotificationListLoader?: boolean;
17
+ showBadgeLoader?: boolean;
18
+ displayFormat?: string;
19
+ onNotificationScrollToBottom?: () => void | Promise<void>;
20
+ scrollThreshold?: number;
21
+ isHoverOnCard?: boolean;
22
+ isDeleteAlwaysVisible?: boolean;
23
+ isEmptyState?: boolean;
24
+ emptyStateTitle?: string;
25
+ emptyStateDescription?: string;
26
+ customNotificationJsx?: React.ReactNode;
27
+ }
28
+ export declare function getPanelNotificationList(panel: NotificationPanelItem): NotificationListItemData[];
29
+ export declare function NotificationList({ expand, type, title, notificationList, notificationPanels, setNotificationPanels, handleSelectAll, handleMarkReadAll, handleMoveAllPending, moveToPendingDropdownOptions, handleNotificationDeleteAll, showNotificationListLoader, showBadgeLoader, displayFormat, onNotificationScrollToBottom, scrollThreshold, isHoverOnCard, isDeleteAlwaysVisible, isEmptyState, emptyStateTitle, emptyStateDescription, customNotificationJsx, }: NotificationListProps): import("react/jsx-runtime").JSX.Element;
30
+ //# sourceMappingURL=NotificationList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationList.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/NotificationBody/NotificationList/NotificationList.tsx"],"names":[],"mappings":"AAOA,OAAO,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAIhG,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,wBAAwB,EAAE,CAAC;IAC7C,kBAAkB,EAAE,qBAAqB,EAAE,CAAC;IAC5C,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,KAAK,IA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pB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAAkC,EAClC,eAAuB,EACvB,aAA4B,EAC5B,4BAA4B,EAC5B,eAAoB,EACpB,aAAqB,EACrB,qBAA6B,EAC7B,YAAoB,EACpB,eAAkD,EAClD,qBAAsE,EACtE,qBAAqB,GACtB,EAAE,qBAAqB,2CAiMvB"}
@@ -0,0 +1,211 @@
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { useRef, useState, useEffect, useCallback } from "react";
3
+ import default_1 from "../../../../node_modules/@mui/icons-material/DeleteOutlineOutlined.js";
4
+ import { getAssetUrl } from "../../../../utils/assetBase.js";
5
+ import { NotificationListItem } from "./NotificationListItem.js";
6
+ import { Button } from "../../../Button/index.js";
7
+ import { Loader } from "../../../Loader/index.js";
8
+ import { Select } from "../../../Select/index.js";
9
+ /* empty css */
10
+ const NotificationEmptyStateIcon = getAssetUrl("webp/notificationEmptyStateIcon.webp");
11
+ function isNotificationListData(value) {
12
+ return Array.isArray(value);
13
+ }
14
+ function getPanelNotificationList(panel) {
15
+ const { notificationList } = panel;
16
+ if (!isNotificationListData(notificationList)) {
17
+ return [];
18
+ }
19
+ return notificationList;
20
+ }
21
+ function NotificationList({
22
+ expand = false,
23
+ type,
24
+ title = "",
25
+ notificationList,
26
+ notificationPanels,
27
+ setNotificationPanels,
28
+ handleSelectAll,
29
+ handleMarkReadAll,
30
+ handleMoveAllPending,
31
+ moveToPendingDropdownOptions,
32
+ handleNotificationDeleteAll,
33
+ showNotificationListLoader = false,
34
+ showBadgeLoader = false,
35
+ displayFormat = "MM/DD/YYYY",
36
+ onNotificationScrollToBottom,
37
+ scrollThreshold = 50,
38
+ isHoverOnCard = false,
39
+ isDeleteAlwaysVisible = false,
40
+ isEmptyState = false,
41
+ emptyStateTitle = "Everything looks quiet for now",
42
+ emptyStateDescription = "We'll notify you when something new comes up",
43
+ customNotificationJsx
44
+ }) {
45
+ const isLoading = useRef(false);
46
+ const [moveToPendingOpen, setMoveToPendingOpen] = useState(false);
47
+ const [currentOptions, setCurrentOptions] = useState(
48
+ moveToPendingDropdownOptions ?? []
49
+ );
50
+ const [selectedOptions, setSelectedOptions] = useState([]);
51
+ useEffect(() => {
52
+ setCurrentOptions(moveToPendingDropdownOptions ?? []);
53
+ }, [moveToPendingDropdownOptions]);
54
+ const handleNotificationScroll = useCallback(
55
+ async (e) => {
56
+ const { scrollTop, scrollHeight, clientHeight } = e.currentTarget;
57
+ const reachedBottom = scrollTop + clientHeight >= scrollHeight - scrollThreshold;
58
+ if (reachedBottom && !isLoading.current) {
59
+ isLoading.current = true;
60
+ try {
61
+ await (onNotificationScrollToBottom == null ? void 0 : onNotificationScrollToBottom());
62
+ } finally {
63
+ isLoading.current = false;
64
+ }
65
+ }
66
+ },
67
+ [onNotificationScrollToBottom, scrollThreshold]
68
+ );
69
+ const visibleItems = notificationList.some((item) => item.badge !== void 0) ? notificationList.filter((item) => item.badge === title) : notificationList;
70
+ const selectedCount = notificationList.filter((item) => item.selected).length;
71
+ if (isEmptyState) {
72
+ return /* @__PURE__ */ jsxs("div", { className: "impact-notification-list-empty-state-container", children: [
73
+ /* @__PURE__ */ jsx(
74
+ "img",
75
+ {
76
+ alt: "notification-empty-state",
77
+ className: "impact-notification-list-empty-state-icon",
78
+ src: NotificationEmptyStateIcon
79
+ }
80
+ ),
81
+ /* @__PURE__ */ jsxs("div", { className: "impact-notification-list-empty-state-content", children: [
82
+ /* @__PURE__ */ jsx("span", { className: "impact-notification-list-empty-state-title", children: emptyStateTitle }),
83
+ /* @__PURE__ */ jsx("span", { className: "impact-notification-list-empty-state-description", children: emptyStateDescription })
84
+ ] })
85
+ ] });
86
+ }
87
+ if (customNotificationJsx) {
88
+ return /* @__PURE__ */ jsx(Fragment, { children: customNotificationJsx });
89
+ }
90
+ return /* @__PURE__ */ jsxs("div", { className: "impact-notification-list-container", children: [
91
+ /* @__PURE__ */ jsxs("div", { className: "impact-notification-list-header", children: [
92
+ showBadgeLoader ? /* @__PURE__ */ jsx("div", { className: "impact-notification-list-title-loader", children: /* @__PURE__ */ jsx(Loader, { showSkeleton: true, size: "small" }) }) : /* @__PURE__ */ jsx("div", { className: "impact-notification-list-title", children: title }),
93
+ showNotificationListLoader ? /* @__PURE__ */ jsx("div", { className: "impact-notification-list-action-btns-loader", children: /* @__PURE__ */ jsx(Loader, { showSkeleton: true, size: "small" }) }) : /* @__PURE__ */ jsxs("div", { className: "impact-notification-list-action-btns", children: [
94
+ handleSelectAll && /* @__PURE__ */ jsx(
95
+ Button,
96
+ {
97
+ size: "small",
98
+ variant: "url",
99
+ onClick: () => {
100
+ handleSelectAll(type, notificationList);
101
+ },
102
+ children: "Select All"
103
+ }
104
+ ),
105
+ handleMarkReadAll && /* @__PURE__ */ jsxs(Fragment, { children: [
106
+ /* @__PURE__ */ jsx("span", { className: "impact-notification-separator" }),
107
+ /* @__PURE__ */ jsx(
108
+ Button,
109
+ {
110
+ size: "small",
111
+ variant: "url",
112
+ onClick: () => {
113
+ handleMarkReadAll(type, notificationList);
114
+ },
115
+ children: "Mark all as read"
116
+ }
117
+ )
118
+ ] }),
119
+ handleMoveAllPending && /* @__PURE__ */ jsxs(Fragment, { children: [
120
+ /* @__PURE__ */ jsx("span", { className: "impact-notification-separator" }),
121
+ moveToPendingDropdownOptions ? /* @__PURE__ */ jsxs(Fragment, { children: [
122
+ /* @__PURE__ */ jsx("p", { style: { fontSize: "12px" }, children: "Move to" }),
123
+ /* @__PURE__ */ jsx(
124
+ Select,
125
+ {
126
+ currentOptions,
127
+ handleChange: (selectedOption) => {
128
+ handleMoveAllPending(
129
+ type,
130
+ notificationList.filter((item) => item.selected),
131
+ selectedOption
132
+ );
133
+ },
134
+ initialOptions: moveToPendingDropdownOptions,
135
+ isDisabled: selectedCount === 0,
136
+ isOpen: moveToPendingOpen,
137
+ minWidth: "140px",
138
+ name: "move-to-pending",
139
+ selectedOptions,
140
+ setCurrentOptions,
141
+ setIsOpen: setMoveToPendingOpen,
142
+ setSelectedOptions: (opts) => {
143
+ setSelectedOptions(opts ?? []);
144
+ }
145
+ }
146
+ )
147
+ ] }) : /* @__PURE__ */ jsx(
148
+ Button,
149
+ {
150
+ disabled: selectedCount === 0,
151
+ size: "small",
152
+ variant: "url",
153
+ onClick: () => {
154
+ handleMoveAllPending(
155
+ type,
156
+ notificationList.filter((item) => item.selected)
157
+ );
158
+ },
159
+ children: "Move to pending"
160
+ }
161
+ )
162
+ ] }),
163
+ handleNotificationDeleteAll && /* @__PURE__ */ jsxs(Fragment, { children: [
164
+ /* @__PURE__ */ jsx("span", { className: "impact-notification-separator" }),
165
+ /* @__PURE__ */ jsx(
166
+ Button,
167
+ {
168
+ disabled: selectedCount === 0,
169
+ icon: /* @__PURE__ */ jsx(default_1, {}),
170
+ size: "medium",
171
+ variant: "text",
172
+ onClick: () => {
173
+ handleNotificationDeleteAll(
174
+ type,
175
+ notificationList.filter((item) => item.selected)
176
+ );
177
+ }
178
+ }
179
+ )
180
+ ] })
181
+ ] })
182
+ ] }),
183
+ showNotificationListLoader ? /* @__PURE__ */ jsx("div", { className: "impact-notification-list-loader-container", children: /* @__PURE__ */ jsx(Loader, { showSkeleton: true, size: "large" }) }) : /* @__PURE__ */ jsx(
184
+ "div",
185
+ {
186
+ className: "impact-notification-list-items-container",
187
+ style: {
188
+ height: expand ? "calc(100% - 230px)" : "calc(100% - 280px)"
189
+ },
190
+ onScroll: handleNotificationScroll,
191
+ children: visibleItems.map((list, index) => /* @__PURE__ */ jsx(
192
+ NotificationListItem,
193
+ {
194
+ displayFormat,
195
+ isDeleteAlwaysVisible,
196
+ isHoverOnCard,
197
+ list,
198
+ notificationPanels,
199
+ setNotificationPanels,
200
+ type
201
+ },
202
+ list.id ?? index
203
+ ))
204
+ }
205
+ )
206
+ ] });
207
+ }
208
+ export {
209
+ NotificationList,
210
+ getPanelNotificationList
211
+ };
@@ -0,0 +1,14 @@
1
+ import { NotificationListItemData, NotificationPanelItem } from '../../Notification.types';
2
+
3
+ interface NotificationListItemProps {
4
+ list: NotificationListItemData;
5
+ type: string;
6
+ notificationPanels: NotificationPanelItem[];
7
+ setNotificationPanels?: (panels: NotificationPanelItem[]) => void;
8
+ displayFormat: string;
9
+ isHoverOnCard?: boolean;
10
+ isDeleteAlwaysVisible?: boolean;
11
+ }
12
+ export declare function NotificationListItem({ list, type, notificationPanels, setNotificationPanels, displayFormat, isHoverOnCard, isDeleteAlwaysVisible, }: NotificationListItemProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=NotificationListItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationListItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notification/NotificationBody/NotificationList/NotificationListItem.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,wBAAwB,EAExB,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAMlC,UAAU,yBAAyB;IACjC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,qBAAqB,EAAE,CAAC;IAC5C,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,KAAK,IAAI,CAAC;IAClE,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AA6CD,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,IAAI,EACJ,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,aAAqB,EACrB,qBAA6B,GAC9B,EAAE,yBAAyB,2CAsQ3B"}