impact-ui 4.0.14 → 4.0.15-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/_virtual/index4.js +4 -2
- package/dist/_virtual/index5.js +3 -3
- package/dist/_virtual/index6.js +2 -4
- package/dist/components/Chart/ChartSkeleton.d.ts +4 -1
- package/dist/components/Chart/ChartSkeleton.d.ts.map +1 -1
- package/dist/components/Chart/ChartSkeleton.js +994 -29
- package/dist/components/Chart/index.d.ts +2 -1
- package/dist/components/Chart/index.d.ts.map +1 -1
- package/dist/components/Chart/index.js +16 -6
- package/dist/components/CreateItemFlow/CreateItemFlow.types.d.ts +39 -16
- package/dist/components/CreateItemFlow/CreateItemFlow.types.d.ts.map +1 -1
- package/dist/components/CreateItemFlow/index.d.ts +2 -1
- package/dist/components/CreateItemFlow/index.d.ts.map +1 -1
- package/dist/components/CreateItemFlow/index.js +116 -66
- package/dist/components/DatePicker/datePickerDropdown.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerDropdown.js +3 -0
- package/dist/components/DatePicker/datePickerFooter.d.ts +3 -1
- package/dist/components/DatePicker/datePickerFooter.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerFooter.js +24 -2
- package/dist/components/DateRangePicker/dateRangePickerDropdown.d.ts +1 -1
- package/dist/components/DateRangePicker/dateRangePickerDropdown.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerDropdown.js +35 -12
- package/dist/components/DateRangePicker/dateRangePickerFooter.d.ts +1 -1
- package/dist/components/DateRangePicker/dateRangePickerFooter.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerFooter.js +5 -3
- package/dist/components/DateRangePicker/index.d.ts.map +1 -1
- package/dist/components/DateRangePicker/index.js +2 -0
- package/dist/components/DynamicLayout/index.d.ts +9 -12
- package/dist/components/DynamicLayout/index.d.ts.map +1 -1
- package/dist/components/DynamicLayout/index.js +37 -34
- package/dist/components/Header/index.js +2 -2
- package/dist/components/HomePage/index.d.ts.map +1 -1
- package/dist/components/HomePage/index.js +5 -7
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +3 -2
- package/dist/components/NewCreateItemFlow/NewCreateItemFlow.types.d.ts +21 -0
- package/dist/components/NewCreateItemFlow/NewCreateItemFlow.types.d.ts.map +1 -0
- package/dist/components/NewCreateItemFlow/index.d.ts +5 -0
- package/dist/components/NewCreateItemFlow/index.d.ts.map +1 -0
- package/dist/components/NewCreateItemFlow/index.js +93 -0
- package/dist/components/NewDynamicLayout/NewDynamicLayout.types.d.ts +26 -0
- package/dist/components/NewDynamicLayout/NewDynamicLayout.types.d.ts.map +1 -0
- package/dist/components/NewDynamicLayout/index.d.ts +15 -0
- package/dist/components/NewDynamicLayout/index.d.ts.map +1 -0
- package/dist/components/NewDynamicLayout/index.js +45 -0
- package/dist/components/Notification/Notification.types.d.ts +2 -1
- package/dist/components/Notification/Notification.types.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationBody.types.d.ts +2 -1
- package/dist/components/Notification/NotificationBody/NotificationBody.types.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationPanelContent.d.ts +1 -1
- package/dist/components/Notification/NotificationBody/NotificationPanelContent.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationPanelContent.js +2 -0
- package/dist/components/Notification/NotificationBody/NotificationTaskList.d.ts +2 -1
- package/dist/components/Notification/NotificationBody/NotificationTaskList.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationTaskList.js +32 -13
- package/dist/components/Notification/index.d.ts +1 -1
- package/dist/components/Notification/index.d.ts.map +1 -1
- package/dist/components/Notification/index.js +2 -0
- package/dist/components/Table/AgGridHeader.d.ts.map +1 -1
- package/dist/components/Table/AgGridHeader.js +3 -1
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +1 -1
- package/dist/components/Table/filterUtils.d.ts +13 -0
- package/dist/components/Table/filterUtils.d.ts.map +1 -1
- package/dist/components/Table/filterUtils.js +18 -9
- package/dist/components/Table/tableMoreOptions.js +12 -12
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/i18n/I18nContext.d.ts.map +1 -1
- package/dist/i18n/I18nContext.js +1 -0
- package/dist/locales/en-US.json.d.ts +1 -1
- package/dist/locales/en-US.json.js +1 -1
- package/dist/locales/es-ES.json.d.ts +666 -0
- package/dist/locales/es-ES.json.js +599 -0
- package/dist/locales/index.d.ts.map +1 -1
- package/dist/locales/index.js +11 -3
- package/dist/mcp-component-registry.json +114 -61
- package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +258 -158
- package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
- package/dist/node_modules/moment/dist/locale/es.js +98 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/stories/LocaleDictionaryCollapse.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ltr{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ltr{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--rtl{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(270deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--rtl{animation:none;background-image:linear-gradient(270deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--btt{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--btt{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ttb{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ttb{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--circular{background-color:#e8edf5;background-repeat:no-repeat;--ia-shimmer-angle:0deg;animation:ia-shimmer-circular 1.6s linear infinite;background-image:conic-gradient(from var(--ia-shimmer-angle),#eceef4 0deg,#e8edf5 80deg,#d5dbe8 160deg,#e8edf5 260deg,#eceef4 1turn);background-size:100% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--circular{animation:none;background-image:conic-gradient(from 0deg,#eceef4,#e8edf5,#d5dbe8,#e8edf5 1turn)}}:root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px;--ia-modal-backdrop:#0d152ccc}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}.content-wrapper{flex:1;min-height:100%}.form-section{width:100%}.form-section .form-section-title{color:#0d152c;font-size:16px;font-weight:600;margin-bottom:12px}.form-section .form-filter-block{background:#f7f9fd;border-radius:8px;margin-top:20px;padding:12px}.form-section .form-filter-block .form-filter-title{color:#0d152c;font-size:14px;font-weight:600;margin-bottom:16px}.form-section .form-filter-block .form-filter-fields{display:flex;flex-wrap:wrap;gap:24px}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React__default, { memo } from "react";
|
|
4
|
+
import default_1 from "../../node_modules/@mui/icons-material/ChevronLeft.js";
|
|
5
|
+
import default_1$1 from "../../node_modules/@mui/icons-material/ChevronRight.js";
|
|
6
|
+
import { getAssetUrl } from "../../utils/assetBase.js";
|
|
7
|
+
import { Button } from "../Button/index.js";
|
|
8
|
+
import { NewDynamicLayout } from "../NewDynamicLayout/index.js";
|
|
9
|
+
|
|
10
|
+
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
11
|
+
const createFlowImage = getAssetUrl("icons/create-item-flow-img.webp");
|
|
12
|
+
const LeftPanelContent = ({ leftPanelContent, leftPanelImage }) => {
|
|
13
|
+
const { t } = useTranslation();
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", { className: "left-panel-content", children: [
|
|
15
|
+
leftPanelContent,
|
|
16
|
+
leftPanelImage ? leftPanelImage : /* @__PURE__ */ jsx(
|
|
17
|
+
"img",
|
|
18
|
+
{
|
|
19
|
+
alt: t("createItemFlow.imageAlt"),
|
|
20
|
+
className: "left-panel-image",
|
|
21
|
+
src: createFlowImage
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
] });
|
|
25
|
+
};
|
|
26
|
+
const RightContentPanel = ({ contentRef, children }) => /* @__PURE__ */ jsx("div", { ref: contentRef, className: "content-wrapper", children });
|
|
27
|
+
const NewCreateItemFlowComponent = ({
|
|
28
|
+
leftPanelWidth,
|
|
29
|
+
leftPanelContent = null,
|
|
30
|
+
leftPanelImage = null,
|
|
31
|
+
rightContent,
|
|
32
|
+
title,
|
|
33
|
+
description = "",
|
|
34
|
+
prevButtonProps = {},
|
|
35
|
+
extraButtonProp,
|
|
36
|
+
nextButtonProps = {},
|
|
37
|
+
customCSS,
|
|
38
|
+
className
|
|
39
|
+
}) => {
|
|
40
|
+
const { t } = useTranslation();
|
|
41
|
+
const {
|
|
42
|
+
children: prevLabel = t("createItemFlow.back"),
|
|
43
|
+
icon: prevIcon,
|
|
44
|
+
...restPrevProps
|
|
45
|
+
} = prevButtonProps;
|
|
46
|
+
const {
|
|
47
|
+
children: nextLabel = t("createItemFlow.next"),
|
|
48
|
+
icon: nextIcon,
|
|
49
|
+
...restNextProps
|
|
50
|
+
} = nextButtonProps;
|
|
51
|
+
const resolvedTitle = title ?? t("createItemFlow.defaultTitle");
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
NewDynamicLayout,
|
|
54
|
+
{
|
|
55
|
+
className,
|
|
56
|
+
description,
|
|
57
|
+
footer: /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
Button,
|
|
60
|
+
{
|
|
61
|
+
icon: "icon" in prevButtonProps ? prevIcon : /* @__PURE__ */ jsx(default_1, {}),
|
|
62
|
+
variant: restPrevProps.variant ?? "tertiary",
|
|
63
|
+
...restPrevProps,
|
|
64
|
+
children: prevLabel
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ jsxs("div", { className: "footer-right-group", children: [
|
|
68
|
+
extraButtonProp,
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Button,
|
|
71
|
+
{
|
|
72
|
+
icon: "icon" in nextButtonProps ? nextIcon : /* @__PURE__ */ jsx(default_1$1, {}),
|
|
73
|
+
iconPlacement: nextButtonProps.iconPlacement ?? "right",
|
|
74
|
+
variant: restNextProps.variant ?? "primary",
|
|
75
|
+
...restNextProps,
|
|
76
|
+
children: nextLabel
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
] }),
|
|
81
|
+
leftPanel: /* @__PURE__ */ jsx(LeftPanelContent, { leftPanelContent, leftPanelImage }),
|
|
82
|
+
leftPanelWidth,
|
|
83
|
+
rightContent: /* @__PURE__ */ jsx(RightContentPanel, { children: rightContent }),
|
|
84
|
+
style: customCSS,
|
|
85
|
+
title: resolvedTitle
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
const NewCreateItemFlow = memo(NewCreateItemFlowComponent);
|
|
90
|
+
NewCreateItemFlow.displayName = "NewCreateItemFlow";
|
|
91
|
+
export {
|
|
92
|
+
NewCreateItemFlow
|
|
93
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { BaseComponentProps } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface InjectedLayoutProps {
|
|
5
|
+
contentRef: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
hasScroll: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface NewDynamicLayoutProps extends BaseComponentProps {
|
|
9
|
+
/**
|
|
10
|
+
* Left panel content (e.g. title, description, image)
|
|
11
|
+
*/
|
|
12
|
+
leftPanel: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Right side content (single element; receives contentRef and hasScroll via cloneElement)
|
|
15
|
+
*/
|
|
16
|
+
rightContent: ReactElement<InjectedLayoutProps>;
|
|
17
|
+
/**
|
|
18
|
+
* Width of the left panel (e.g. "375px" or "300px")
|
|
19
|
+
*/
|
|
20
|
+
leftPanelWidth?: string | number;
|
|
21
|
+
/**
|
|
22
|
+
* Whether to show stepper styling on the right content area
|
|
23
|
+
*/
|
|
24
|
+
showStepper?: boolean;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=NewDynamicLayout.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewDynamicLayout.types.d.ts","sourceRoot":"","sources":["../../../src/components/NewDynamicLayout/NewDynamicLayout.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAC;IAChD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface NewDynamicLayoutProps {
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
leftPanel?: React.ReactNode;
|
|
7
|
+
rightContent: React.ReactElement;
|
|
8
|
+
leftPanelWidth?: string | number;
|
|
9
|
+
className?: string;
|
|
10
|
+
footer?: React.ReactNode;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare const NewDynamicLayout: ({ title, description, leftPanel, rightContent, leftPanelWidth, className, footer, ...props }: NewDynamicLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NewDynamicLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,gCAAgC,CAAC;AAGxC,UAAU,qBAAqB;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB,GAAI,8FAS9B,qBAAqB,4CAgCvB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ltr{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ltr{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--rtl{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(270deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--rtl{animation:none;background-image:linear-gradient(270deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--btt{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--btt{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ttb{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ttb{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--circular{background-color:#e8edf5;background-repeat:no-repeat;--ia-shimmer-angle:0deg;animation:ia-shimmer-circular 1.6s linear infinite;background-image:conic-gradient(from var(--ia-shimmer-angle),#eceef4 0deg,#e8edf5 80deg,#d5dbe8 160deg,#e8edf5 260deg,#eceef4 1turn);background-size:100% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--circular{animation:none;background-image:conic-gradient(from 0deg,#eceef4,#e8edf5,#d5dbe8,#e8edf5 1turn)}}:root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px;--ia-modal-backdrop:#0d152ccc}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}.new-dynamic-layout-container{background-color:#fff;border-radius:24px!important;box-shadow:0 0 4px #ababab40;display:flex;flex-direction:column;top:0;right:24px;bottom:24px;left:24px;justify-content:center;position:absolute}.new-dynamic-layout-container .new-dynamic-layout-header{border-bottom:1px solid #d9dde7;display:flex;flex-direction:column;gap:8px;padding:24px}.new-dynamic-layout-container .new-dynamic-layout-header h1{color:#0d152c;font-size:24px;font-weight:800;line-height:36px}.new-dynamic-layout-container .new-dynamic-layout-header p{color:#7a8294;font-size:12px;font-weight:500;line-height:16px;text-transform:capitalize}.new-dynamic-layout-container .new-dynamic-layout-body{background-position:100% 0;background-repeat:no-repeat;background-size:contain;border-bottom-right-radius:24px;display:flex;flex:1;min-height:0;overflow:hidden;padding:24px}.new-dynamic-layout-container .new-dynamic-layout-body .left-panel{border-right:1px solid #d9dde7;padding-right:24px;width:var(--left-panel-width,220px)}.new-dynamic-layout-container .new-dynamic-layout-body .left-panel .left-panel-content{display:flex;flex-direction:column;height:100%;justify-content:space-between}.new-dynamic-layout-container .new-dynamic-layout-body .left-panel .left-panel-image{height:130px;margin:0 auto;width:132px}.new-dynamic-layout-container .new-dynamic-layout-body .right-column{display:flex;flex-direction:column;justify-content:space-between;min-height:0;padding-left:24px;width:calc(100% - var(--left-panel-width, 220px))}.new-dynamic-layout-container .new-dynamic-layout-body .right-column .right-content{display:flex;flex:1;flex-direction:column;min-height:0;overflow-x:hidden;overflow-y:auto}.new-dynamic-layout-container .new-dynamic-layout-body .right-column .new-dynamic-layout-footer{border-top:1px solid #d9dde7;display:flex;justify-content:space-between;padding-top:24px}.new-dynamic-layout-container .new-dynamic-layout-body .right-column .new-dynamic-layout-footer .footer-right-group{align-items:center;display:flex;gap:12px}@media screen and (min-width:1400px) and (max-width:1600px){.new-dynamic-layout-body{padding:20px}.left-panel-image{width:100%}}@media screen and (max-width:1399px){.new-dynamic-layout-body{padding:16px}.left-panel{flex-shrink:0;padding-right:16px;width:fit-content}.right-column{flex:1;padding-left:16px;width:auto}.left-panel-image{height:auto;max-width:132px;width:100%}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import React__default, { useRef } from "react";
|
|
4
|
+
|
|
5
|
+
import { getAssetUrl } from "../../utils/assetBase.js";
|
|
6
|
+
import Box from "../../node_modules/@mui/material/Box/Box.js";
|
|
7
|
+
const NewDynamicLayout = ({
|
|
8
|
+
title,
|
|
9
|
+
description,
|
|
10
|
+
leftPanel,
|
|
11
|
+
rightContent,
|
|
12
|
+
leftPanelWidth,
|
|
13
|
+
className,
|
|
14
|
+
footer,
|
|
15
|
+
...props
|
|
16
|
+
}) => {
|
|
17
|
+
const contentRef = useRef(null);
|
|
18
|
+
const contentBackgroundImage = getAssetUrl("images/review-tech-bg.webp");
|
|
19
|
+
return /* @__PURE__ */ jsxs(Box, { className: `new-dynamic-layout-container ${className || ""}`, ...props, children: [
|
|
20
|
+
/* @__PURE__ */ jsxs(Box, { className: "new-dynamic-layout-header", children: [
|
|
21
|
+
/* @__PURE__ */ jsx("h1", { children: title }),
|
|
22
|
+
description && /* @__PURE__ */ jsx("p", { children: description })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsxs(
|
|
25
|
+
Box,
|
|
26
|
+
{
|
|
27
|
+
className: "new-dynamic-layout-body",
|
|
28
|
+
style: leftPanelWidth ? {
|
|
29
|
+
"--left-panel-width": typeof leftPanelWidth === "number" ? `${leftPanelWidth}px` : leftPanelWidth
|
|
30
|
+
} : void 0,
|
|
31
|
+
sx: { backgroundImage: `url(${contentBackgroundImage})` },
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(Box, { className: "left-panel", children: leftPanel }),
|
|
34
|
+
/* @__PURE__ */ jsxs(Box, { className: "right-column", children: [
|
|
35
|
+
/* @__PURE__ */ jsx(Box, { className: "right-content", children: React__default.cloneElement(rightContent, { contentRef }) }),
|
|
36
|
+
footer && /* @__PURE__ */ jsx(Box, { className: "new-dynamic-layout-footer", children: footer })
|
|
37
|
+
] })
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] });
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
NewDynamicLayout
|
|
45
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ChangeEvent, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
export type DrawerAnchor = 'left' | 'right' | 'top' | 'bottom';
|
|
4
4
|
export interface NotificationTabItem {
|
|
@@ -88,6 +88,7 @@ export interface NotificationProps {
|
|
|
88
88
|
onNotificationScrollToBottom?: () => void;
|
|
89
89
|
scrollThreshold?: number;
|
|
90
90
|
isWithSearch?: boolean;
|
|
91
|
+
onSearchChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
91
92
|
isHoverOnCard?: boolean;
|
|
92
93
|
isChipsExpandable?: boolean;
|
|
93
94
|
isDeleteAlwaysVisible?: boolean;
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"Notification.types.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpD,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;IAC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C;CAC1E;AAED,+CAA+C;AAC/C,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAExD,4CAA4C;AAC5C,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ChangeEvent, ReactNode } from 'react';
|
|
2
2
|
import { NotificationTabItem, NotificationPanelItem, NotificationBadgeList } from '../Notification.types';
|
|
3
3
|
|
|
4
4
|
export interface NotificationBodyProps {
|
|
@@ -22,6 +22,7 @@ export interface NotificationBodyProps {
|
|
|
22
22
|
onNotificationScrollToBottom?: () => void;
|
|
23
23
|
scrollThreshold?: number;
|
|
24
24
|
isWithSearch?: boolean;
|
|
25
|
+
onSearchChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
25
26
|
isHoverOnCard?: boolean;
|
|
26
27
|
isChipsExpandable?: boolean;
|
|
27
28
|
isDeleteAlwaysVisible?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationBody.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/NotificationBody/NotificationBody.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationBody.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/NotificationBody/NotificationBody.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACrC,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;IACxC,kBAAkB,EAAE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4,6 +4,6 @@ import { NotificationPanelItem } from '../Notification.types';
|
|
|
4
4
|
type NotificationPanelContentProps = NotificationBodyProps & {
|
|
5
5
|
panel: NotificationPanelItem;
|
|
6
6
|
};
|
|
7
|
-
export declare function NotificationPanelContent({ panel, expand, badgesList, notificationPanels, setNotificationPanels, handleSelectAll, handleMarkReadAll, handleMoveAllPending, moveToPendingDropdownOptions, handleNotificationDeleteAll, showNotificationListLoader, showBadgeLoader, displayFormat, onNotificationScrollToBottom, scrollThreshold, isWithSearch, isChipsExpandable, isHoverOnCard, isDeleteAlwaysVisible, isEmptyState, emptyStateTitle, emptyStateDescription, customNotificationJsx, activeBadge, }: NotificationPanelContentProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function NotificationPanelContent({ panel, expand, badgesList, notificationPanels, setNotificationPanels, handleSelectAll, handleMarkReadAll, handleMoveAllPending, moveToPendingDropdownOptions, handleNotificationDeleteAll, showNotificationListLoader, showBadgeLoader, displayFormat, onNotificationScrollToBottom, scrollThreshold, isWithSearch, onSearchChange, isChipsExpandable, isHoverOnCard, isDeleteAlwaysVisible, isEmptyState, emptyStateTitle, emptyStateDescription, customNotificationJsx, activeBadge, }: NotificationPanelContentProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=NotificationPanelContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPanelContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/NotificationBody/NotificationPanelContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,KAAK,6BAA6B,GAAG,qBAAqB,GAAG;IAC3D,KAAK,EAAE,qBAAqB,CAAC;CAC9B,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,MAAc,EACd,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,eAAe,EACf,aAAmB,EACnB,4BAA4B,EAC5B,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,GACZ,EAAE,6BAA6B,
|
|
1
|
+
{"version":3,"file":"NotificationPanelContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/NotificationBody/NotificationPanelContent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,KAAK,6BAA6B,GAAG,qBAAqB,GAAG;IAC3D,KAAK,EAAE,qBAAqB,CAAC;CAC9B,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,MAAc,EACd,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,eAAe,EACf,aAAmB,EACnB,4BAA4B,EAC5B,eAAe,EACf,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,GACZ,EAAE,6BAA6B,2CA4C/B"}
|
|
@@ -18,6 +18,7 @@ function NotificationPanelContent({
|
|
|
18
18
|
onNotificationScrollToBottom,
|
|
19
19
|
scrollThreshold,
|
|
20
20
|
isWithSearch,
|
|
21
|
+
onSearchChange,
|
|
21
22
|
isChipsExpandable,
|
|
22
23
|
isHoverOnCard,
|
|
23
24
|
isDeleteAlwaysVisible,
|
|
@@ -53,6 +54,7 @@ function NotificationPanelContent({
|
|
|
53
54
|
isMultiSelectFilter: panel.isMultiSelectFilter,
|
|
54
55
|
isWithSearch,
|
|
55
56
|
listTypes,
|
|
57
|
+
onSearchChange,
|
|
56
58
|
moveToPendingDropdownOptions,
|
|
57
59
|
notificationList,
|
|
58
60
|
notificationPanels,
|
|
@@ -30,6 +30,7 @@ export interface NotificationTaskListProps {
|
|
|
30
30
|
onNotificationScrollToBottom?: () => void | Promise<void>;
|
|
31
31
|
scrollThreshold?: number;
|
|
32
32
|
isWithSearch?: boolean;
|
|
33
|
+
onSearchChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
33
34
|
isChipsExpandable?: boolean;
|
|
34
35
|
isHoverOnCard?: boolean;
|
|
35
36
|
isDeleteAlwaysVisible?: boolean;
|
|
@@ -38,6 +39,6 @@ export interface NotificationTaskListProps {
|
|
|
38
39
|
emptyStateDescription?: string;
|
|
39
40
|
customNotificationJsx?: React.ReactNode;
|
|
40
41
|
}
|
|
41
|
-
export declare function NotificationTaskList({ expand, type, listTypes, notificationList, handleSettingClick, handleSelectAll, handleMarkReadAll, handleMoveAllPending, moveToPendingDropdownOptions, handleNotificationDeleteAll, notificationPanels, setNotificationPanels, activeBadge, filterChip, handleApplyFilter, isMultiSelectFilter, showBadgeLoader, showNotificationListLoader, selectedFilterChip, displayFormat, onNotificationScrollToBottom, scrollThreshold, isWithSearch, isChipsExpandable, isHoverOnCard, isDeleteAlwaysVisible, isEmptyState, emptyStateTitle, emptyStateDescription, customNotificationJsx, }: NotificationTaskListProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function NotificationTaskList({ expand, type, listTypes, notificationList, handleSettingClick, handleSelectAll, handleMarkReadAll, handleMoveAllPending, moveToPendingDropdownOptions, handleNotificationDeleteAll, notificationPanels, setNotificationPanels, activeBadge, filterChip, handleApplyFilter, isMultiSelectFilter, showBadgeLoader, showNotificationListLoader, selectedFilterChip, displayFormat, onNotificationScrollToBottom, scrollThreshold, isWithSearch, onSearchChange, isChipsExpandable, isHoverOnCard, isDeleteAlwaysVisible, isEmptyState, emptyStateTitle, emptyStateDescription, customNotificationJsx, }: NotificationTaskListProps): import("react/jsx-runtime").JSX.Element;
|
|
42
43
|
export {};
|
|
43
44
|
//# sourceMappingURL=NotificationTaskList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationTaskList.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/NotificationBody/NotificationTaskList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NotificationTaskList.d.ts","sourceRoot":"","sources":["../../../../src/components/Notification/NotificationBody/NotificationTaskList.tsx"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE7F,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnC,gBAAgB,EAAE,wBAAwB,EAAE,CAAC;IAC7C,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,eAAe,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,wBAAwB,EAAE,KAAK,IAAI,CAAC;IACzF,iBAAiB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,wBAAwB,EAAE,KAAK,IAAI,CAAC;IAC3F,oBAAoB,CAAC,EAAE,CAC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AE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,MAAc,EACd,IAAI,EACJ,SAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,mBAA2B,EAC3B,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,aAAmB,EACnB,4BAA4B,EAC5B,eAAe,EACf,YAAmB,EACnB,cAAc,EACd,iBAAyB,EACzB,aAAqB,EACrB,qBAA6B,EAC7B,YAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,GACtB,EAAE,yBAAyB,2CAkP3B"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useRef, useEffect, useCallback } from "react";
|
|
2
|
+
import { useState, useRef, useEffect, useMemo, useCallback } from "react";
|
|
3
3
|
import default_1$1 from "../../../node_modules/@mui/icons-material/FilterListOutlined.js";
|
|
4
4
|
import default_1 from "../../../node_modules/@mui/icons-material/SearchOutlined.js";
|
|
5
|
+
import { debounce } from "../../../utils/debounce.js";
|
|
5
6
|
import { Badge } from "../../Badge/index.js";
|
|
6
7
|
import { Button } from "../../Button/index.js";
|
|
7
8
|
import { Input } from "../../Input/index.js";
|
|
@@ -32,6 +33,7 @@ function NotificationTaskList({
|
|
|
32
33
|
onNotificationScrollToBottom,
|
|
33
34
|
scrollThreshold,
|
|
34
35
|
isWithSearch = true,
|
|
36
|
+
onSearchChange,
|
|
35
37
|
isChipsExpandable = false,
|
|
36
38
|
isHoverOnCard = false,
|
|
37
39
|
isDeleteAlwaysVisible = false,
|
|
@@ -74,21 +76,38 @@ function NotificationTaskList({
|
|
|
74
76
|
useEffect(() => {
|
|
75
77
|
setExpandList(isChipsExpandable);
|
|
76
78
|
}, [isChipsExpandable]);
|
|
77
|
-
const
|
|
78
|
-
(event) => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const searchTerms = searchTerm.split(/\s+/).filter(Boolean);
|
|
82
|
-
if (searchTerms.length > 0) {
|
|
83
|
-
const searchResults = notificationList.filter(
|
|
84
|
-
(option) => searchTerms.every((term) => new RegExp(term, "i").test(option.label))
|
|
85
|
-
);
|
|
86
|
-
setNotificationListItems([...searchResults]);
|
|
79
|
+
const debouncedSearch = useMemo(
|
|
80
|
+
() => debounce((value, event) => {
|
|
81
|
+
if (onSearchChange) {
|
|
82
|
+
onSearchChange(value, event);
|
|
87
83
|
} else {
|
|
88
|
-
|
|
84
|
+
const searchTerm = value.trim().toUpperCase();
|
|
85
|
+
const searchTerms = searchTerm.split(/\s+/).filter(Boolean);
|
|
86
|
+
if (searchTerms.length > 0) {
|
|
87
|
+
const searchResults = notificationList.filter(
|
|
88
|
+
(option) => searchTerms.every((term) => new RegExp(term, "i").test(option.label))
|
|
89
|
+
);
|
|
90
|
+
setNotificationListItems([...searchResults]);
|
|
91
|
+
} else {
|
|
92
|
+
setNotificationListItems(notificationList);
|
|
93
|
+
}
|
|
89
94
|
}
|
|
95
|
+
}, 400),
|
|
96
|
+
[notificationList, onSearchChange]
|
|
97
|
+
);
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
return () => {
|
|
100
|
+
debouncedSearch.cancel();
|
|
101
|
+
};
|
|
102
|
+
}, [debouncedSearch]);
|
|
103
|
+
const handleSearch = useCallback(
|
|
104
|
+
(event) => {
|
|
105
|
+
var _a2;
|
|
106
|
+
const value = ((_a2 = event == null ? void 0 : event.target) == null ? void 0 : _a2.value) ?? "";
|
|
107
|
+
setSearchInput(value);
|
|
108
|
+
debouncedSearch(value, event);
|
|
90
109
|
},
|
|
91
|
-
[
|
|
110
|
+
[debouncedSearch]
|
|
92
111
|
);
|
|
93
112
|
const handleClickOutside = useCallback(
|
|
94
113
|
(event) => {
|
|
@@ -3,7 +3,7 @@ import { NotificationProps } from './Notification.types';
|
|
|
3
3
|
export type { NotificationProps, DrawerAnchor } from './Notification.types';
|
|
4
4
|
export { NotificationHeader } from './NotificationHeader';
|
|
5
5
|
export { NotificationFooter } from './NotificationFooter';
|
|
6
|
-
export declare function Notification({ title, anchor, isOpen, setIsOpen, className, handleClose, secondaryButtonLabel, onSecondaryButtonClick, primaryButtonLabel, onPrimaryButtonClick, onSettingButtonClick, handleSelectAll, handleMarkReadAll, handleMoveAllPending, handleNotificationDeleteAll, badgesList, notificationTabs, notificationPanels, setNotificationPanels, handleTabChange, moveToPendingDropdownOptions, activeNotiTab, activeBadge, showBadgeLoader, showNotificationListLoader, displayFormat, onNotificationScrollToBottom, scrollThreshold, isWithSearch, isHoverOnCard, isChipsExpandable, isDeleteAlwaysVisible, isEmptyState, emptyStateTitle, emptyStateDescription, customNotificationJsx, NotificationBodyComponent, }: NotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function Notification({ title, anchor, isOpen, setIsOpen, className, handleClose, secondaryButtonLabel, onSecondaryButtonClick, primaryButtonLabel, onPrimaryButtonClick, onSettingButtonClick, handleSelectAll, handleMarkReadAll, handleMoveAllPending, handleNotificationDeleteAll, badgesList, notificationTabs, notificationPanels, setNotificationPanels, handleTabChange, moveToPendingDropdownOptions, activeNotiTab, activeBadge, showBadgeLoader, showNotificationListLoader, displayFormat, onNotificationScrollToBottom, scrollThreshold, isWithSearch, onSearchChange, isHoverOnCard, isChipsExpandable, isDeleteAlwaysVisible, isEmptyState, emptyStateTitle, emptyStateDescription, customNotificationJsx, NotificationBodyComponent, }: NotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare namespace Notification {
|
|
8
8
|
var displayName: string;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,4BAA4B,CAAC;AAEpC,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,MAAgB,EAChB,MAAM,EACN,SAAS,EACT,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,eAA0B,EAC1B,4BAA4B,EAC5B,aAAa,EACb,WAAW,EACX,eAAe,EACf,0BAA0B,EAC1B,aAAmB,EACnB,4BAA4B,EAC5B,eAAe,EACf,YAAmB,EACnB,aAAqB,EACrB,iBAAyB,EACzB,qBAA6B,EAC7B,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,GAC1B,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,4BAA4B,CAAC;AAEpC,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,MAAgB,EAChB,MAAM,EACN,SAAS,EACT,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,eAA0B,EAC1B,4BAA4B,EAC5B,aAAa,EACb,WAAW,EACX,eAAe,EACf,0BAA0B,EAC1B,aAAmB,EACnB,4BAA4B,EAC5B,eAAe,EACf,YAAmB,EACnB,cAAc,EACd,aAAqB,EACrB,iBAAyB,EACzB,qBAA6B,EAC7B,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,GAC1B,EAAE,iBAAiB,2CA8EnB;yBArHe,YAAY"}
|
|
@@ -37,6 +37,7 @@ function Notification({
|
|
|
37
37
|
onNotificationScrollToBottom,
|
|
38
38
|
scrollThreshold,
|
|
39
39
|
isWithSearch = true,
|
|
40
|
+
onSearchChange,
|
|
40
41
|
isHoverOnCard = false,
|
|
41
42
|
isChipsExpandable = false,
|
|
42
43
|
isDeleteAlwaysVisible = false,
|
|
@@ -99,6 +100,7 @@ function Notification({
|
|
|
99
100
|
isHoverOnCard,
|
|
100
101
|
isWithSearch,
|
|
101
102
|
moveToPendingDropdownOptions,
|
|
103
|
+
onSearchChange,
|
|
102
104
|
notificationPanels: notificationPanels ?? [],
|
|
103
105
|
notificationTabs: notificationTabs ?? [],
|
|
104
106
|
scrollThreshold,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgGridHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Table/AgGridHeader.tsx"],"names":[],"mappings":"AA8BA,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,oBAA2B,EAC3B,GAAG,IAAI,EACR;;;;;;;;;;CAAA,
|
|
1
|
+
{"version":3,"file":"AgGridHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Table/AgGridHeader.tsx"],"names":[],"mappings":"AA8BA,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,oBAA2B,EAC3B,GAAG,IAAI,EACR;;;;;;;;;;CAAA,kDAi9BA;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -649,7 +649,9 @@ function AgGridHeader({
|
|
|
649
649
|
iconClickOnDisabled: (_X = (_W = rest.column) == null ? void 0 : _W.colDef) == null ? void 0 : _X.toShowDuplicateColumnInAdvanceSearch,
|
|
650
650
|
inputProps: {
|
|
651
651
|
...isNumericSearchColumn ? {
|
|
652
|
-
|
|
652
|
+
// "text" so Shift+Minus (_) is not blocked by decimal inputMode; keys are
|
|
653
|
+
// still validated in handleNumericKeyDown / isPartialNumericInput.
|
|
654
|
+
inputMode: "text",
|
|
653
655
|
onKeyDown: handleNumericKeyDown,
|
|
654
656
|
onPaste: (e) => {
|
|
655
657
|
handleNumericPaste(e, applySearchText);
|
|
@@ -277,7 +277,7 @@ const NewAdvanceSearchModalItem = ({
|
|
|
277
277
|
Input,
|
|
278
278
|
{
|
|
279
279
|
inputProps: isNumericColumn ? {
|
|
280
|
-
inputMode: "
|
|
280
|
+
inputMode: "text",
|
|
281
281
|
onKeyDown: handleNumericKeyDown,
|
|
282
282
|
onPaste: (event) => {
|
|
283
283
|
handleNumericPaste(event, valueField.onChange);
|
|
@@ -30,10 +30,18 @@ export declare const roundedFilterValueGetter: (decimals?: number) => (params: a
|
|
|
30
30
|
/**
|
|
31
31
|
* Matches any value that is, or could still become, a decimal number.
|
|
32
32
|
* Intermediate states such as "", "-", "1." are allowed so the user can keep typing.
|
|
33
|
+
* Underscores are also allowed between digits (and trailing, mid-type) since they are
|
|
34
|
+
* used as a digit-group separator by some data sources — e.g. "124_56", "1_234_567" —
|
|
35
|
+
* mirroring the underscore support already in `cleanNumericValue`/`GROUPED_DIGITS`.
|
|
33
36
|
* @param {string} value - The candidate input value
|
|
34
37
|
* @returns {boolean} - true when the value may be entered into a numeric field
|
|
35
38
|
*/
|
|
36
39
|
export declare const isPartialNumericInput: (value: any) => boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Maps a keydown event to the character that would be inserted into a numeric field.
|
|
42
|
+
* Shift+Minus is often reported as key "-" (not "_"), which must still become "_".
|
|
43
|
+
*/
|
|
44
|
+
export declare const resolveNumericKeyInsert: (event: any) => any;
|
|
37
45
|
/**
|
|
38
46
|
* Inserts a pasted value into a numeric field, reading it the way it was rendered:
|
|
39
47
|
* currency symbols, thousands separators and percent signs are dropped, accounting
|
|
@@ -57,6 +65,11 @@ export declare const handleNumericPaste: (event: any, applyValue: any) => void;
|
|
|
57
65
|
* Rejecting the key press rather than the resulting value keeps the caret in place;
|
|
58
66
|
* pasting is handled by handleNumericPaste, and drag-drop by the isPartialNumericInput
|
|
59
67
|
* check on change.
|
|
68
|
+
*
|
|
69
|
+
* The resulting value (current value with this key spliced in at the caret/selection) is
|
|
70
|
+
* checked against `isPartialNumericInput` directly, rather than hand-rolling per-character
|
|
71
|
+
* rules, so every character this gate accepts — digits, one ".", a leading "-", and now
|
|
72
|
+
* "_" as a digit-group separator — stays in lockstep with what onChange/paste allow.
|
|
60
73
|
* @param {object} event - React keyboard event from a numeric input
|
|
61
74
|
*/
|
|
62
75
|
export declare const handleNumericKeyDown: (event: any) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Table/filterUtils.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,wBAAwB,GAAI,cAAS,EAAE,MAAC,QAoDpD,CAAC;AAGF,eAAO,MAAM,4BAA4B,GAAI,cAAS,EAAE,wBAAa,EAAE,MAAC,QAyBvE,C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eAAU,EAAE,cAAS,EAAE,oBAAoB,QAsI7F,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,YAAO,EAAE,UAAK,QAoB3C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAK,EAAE,cAAS,EAAE,QAAG,EAAE,aAAQ;;;CA0ErE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,gBAAW,YAwB7C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,aAAQ,EAAE,cAAS,EAAE,YAAO,QAc1D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,WAAM,YAUzC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,GAAI,aAAQ,EAAE,WAAM,EAAE,cAAS,EAAE,YAAO;;;;;;;;;;;CA4C9E,CAAC;AAqGF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAAI,oBAAe,EAAE,aAAQ,EAAE,UAAK,EAAE,cAAS,EAAE,YAAO,QAUrF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAG,EACH,oBAAe,EACf,eAAU,EACV,cAAS,EACT,YAAO,EACP,aAAQ,EACR,sBAAiB,EACjB,+BAA0B,SA2B3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GAAI,eAAU,EAAE,YAAO,OAqChE,CAAC"}
|
|
@@ -51,7 +51,7 @@ const cleanNumericValue = (value) => {
|
|
|
51
51
|
if (typeof value !== "string") {
|
|
52
52
|
return value;
|
|
53
53
|
}
|
|
54
|
-
return value.replace(/[
|
|
54
|
+
return value.replace(/[$€£¥₹,_\s%]/g, "");
|
|
55
55
|
};
|
|
56
56
|
const isNumericValueColumn = (columnDef) => {
|
|
57
57
|
if (!columnDef || columnDef.thirdOptionAsDropdown) {
|
|
@@ -62,9 +62,16 @@ const isNumericValueColumn = (columnDef) => {
|
|
|
62
62
|
}
|
|
63
63
|
return columnDef.filter === "agNumberColumnFilter" || columnDef.type === "number";
|
|
64
64
|
};
|
|
65
|
-
const isPartialNumericInput = (value) =>
|
|
65
|
+
const isPartialNumericInput = (value) => /^-?(\d(_?\d)*_?)?\.?(\d(_?\d)*_?)?$/.test(value ?? "");
|
|
66
|
+
const resolveNumericKeyInsert = (event) => {
|
|
67
|
+
const { key, shiftKey } = event;
|
|
68
|
+
if (key === "_" || key === "-" && shiftKey) {
|
|
69
|
+
return "_";
|
|
70
|
+
}
|
|
71
|
+
return key;
|
|
72
|
+
};
|
|
66
73
|
const CURRENCY_SYMBOL = String.raw`[$€£¥₹]`;
|
|
67
|
-
const GROUPED_DIGITS = String.raw`\d{1,3}(?:[,\u202f\u00a0 ]\d{3})+`;
|
|
74
|
+
const GROUPED_DIGITS = String.raw`\d{1,3}(?:[,\u202f\u00a0 _]\d{3})+`;
|
|
68
75
|
const MAGNITUDES = { k: 1e3, m: 1e6, mn: 1e6, b: 1e9, bn: 1e9, t: 1e12 };
|
|
69
76
|
const UNSIGNED_NUMBER = new RegExp(
|
|
70
77
|
String.raw`^${CURRENCY_SYMBOL}?\s*((?:${GROUPED_DIGITS}|\d+)(?:\.\d+)?|\.\d+)\s*(mn|bn|[kmbt])?%?$`,
|
|
@@ -110,15 +117,16 @@ const handleNumericKeyDown = (event) => {
|
|
|
110
117
|
if (event.ctrlKey || event.metaKey || event.altKey || event.key.length > 1) {
|
|
111
118
|
return;
|
|
112
119
|
}
|
|
113
|
-
|
|
120
|
+
const insertKey = resolveNumericKeyInsert(event);
|
|
121
|
+
if (insertKey.length !== 1) {
|
|
122
|
+
event.preventDefault();
|
|
114
123
|
return;
|
|
115
124
|
}
|
|
116
125
|
const { value = "", selectionStart, selectionEnd } = event.target;
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if (event.key === "-" && !remaining.includes("-") && (selectionStart ?? 0) === 0) {
|
|
126
|
+
const start = selectionStart ?? value.length;
|
|
127
|
+
const end = selectionEnd ?? value.length;
|
|
128
|
+
const next = value.slice(0, start) + insertKey + value.slice(end);
|
|
129
|
+
if (isPartialNumericInput(next)) {
|
|
122
130
|
return;
|
|
123
131
|
}
|
|
124
132
|
event.preventDefault();
|
|
@@ -547,6 +555,7 @@ export {
|
|
|
547
555
|
isValidFilterValue,
|
|
548
556
|
parseFilterValue,
|
|
549
557
|
parseInlineSearchValue,
|
|
558
|
+
resolveNumericKeyInsert,
|
|
550
559
|
syncFiltersWithModal,
|
|
551
560
|
updateOrAddFilter
|
|
552
561
|
};
|