@epam/ai-dial-chat-shared 1.3.0-dev.98 → 1.3.0-rc.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.
- package/components/ActionMenu/ActionMenu.d.ts +26 -0
- package/components/ActionMenu/ActionMenu.d.ts.map +1 -0
- package/components/ActionMenu/ActionMenu.js +50 -0
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts +6 -1
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/components/ConfirmationDialog/ConfirmationDialog.js +11 -9
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +5 -4
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +2 -2
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -2
- package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -1
- package/components/ConfirmationView/ConfirmationFooter.js +24 -25
- package/components/ConfirmationView/ConfirmationView.d.ts +2 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -1
- package/components/ConfirmationView/ConfirmationView.js +12 -12
- package/components/ConfirmationView/ConfirmationView.module.scss.js +6 -5
- package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.d.ts +31 -0
- package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.d.ts.map +1 -0
- package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.js +36 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +3 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -1
- package/components/DeleteConfirmationView/DeleteConfirmationView.js +36 -27
- package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +5 -4
- package/components/DeploymentIcon/DeploymentIcon.module.scss.js +3 -2
- package/components/EntityHeader/EntityHeader.js +1 -1
- package/components/InitialsAvatar/InitialsAvatar.d.ts +3 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -1
- package/components/InitialsAvatar/InitialsAvatar.js +4 -3
- package/components/ItemHeader/ItemHeader.module.scss.js +5 -4
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +6 -2
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +58 -58
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +9 -8
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -1
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts +6 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -1
- package/components/MarkdownRenderer/MarkdownRenderer.js +29 -24
- package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +9 -8
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +5 -4
- package/components/MarkdownRenderer/PlainTextRenderer.js +1 -1
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +4 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -1
- package/components/MarkdownRenderer/Table/MarkdownTable.js +68 -63
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +15 -13
- package/components/MarkdownRenderer/Table/TableHeader.module.scss.js +3 -2
- package/components/MarkdownRenderer/markdown-whitespace.js +2 -6
- package/components/NewVersionAlert/NewVersionAlert.d.ts +27 -0
- package/components/NewVersionAlert/NewVersionAlert.d.ts.map +1 -0
- package/components/NewVersionAlert/NewVersionAlert.js +28 -0
- package/components/NewVersionAlert/NewVersionAlert.module.scss.js +4 -0
- package/components/NotificationStack/NotificationStack.d.ts +48 -0
- package/components/NotificationStack/NotificationStack.d.ts.map +1 -0
- package/components/NotificationStack/NotificationStack.js +111 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts +12 -2
- package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -1
- package/components/PanelEmptyState/PanelEmptyState.js +19 -9
- package/components/PanelEmptyState/PanelEmptyState.module.scss.js +6 -2
- package/components/ResourceSummary/ResourceSummary.module.scss.js +5 -4
- package/components/TextRefinementField/TextRefinementField.d.ts +4 -2
- package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -1
- package/components/TextRefinementField/TextRefinementField.js +84 -55
- package/components/UnsavedChangesProvider/UnsavedChangesProvider.d.ts +22 -0
- package/components/UnsavedChangesProvider/UnsavedChangesProvider.d.ts.map +1 -0
- package/components/UnsavedChangesProvider/UnsavedChangesProvider.js +57 -0
- package/components/UnsavedChangesProvider/unsaved-changes-context.d.ts +44 -0
- package/components/UnsavedChangesProvider/unsaved-changes-context.d.ts.map +1 -0
- package/components/UnsavedChangesProvider/unsaved-changes-context.js +13 -0
- package/constants/breakpoint.d.ts +6 -0
- package/constants/breakpoint.d.ts.map +1 -1
- package/constants/breakpoint.js +2 -2
- package/conversation-transfer/conversation-transfer-queue.d.ts +16 -0
- package/conversation-transfer/conversation-transfer-queue.d.ts.map +1 -0
- package/conversation-transfer/conversation-transfer-queue.js +24 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +9 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -1
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +330 -269
- package/file-manager/DialFileManagerShell/DialFileManagerShell.module.scss.js +8 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +23 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -1
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +86 -80
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.module.scss.js +7 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +5 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -1
- package/file-manager/OperationLoaderModal/OperationLoaderModal.js +25 -20
- package/file-manager/OperationLoaderModal/OperationLoaderModal.module.scss.js +4 -0
- package/file-manager/file-manager-controller.d.ts +11 -3
- package/file-manager/file-manager-controller.d.ts.map +1 -1
- package/file-manager/index.d.ts +1 -0
- package/file-manager/index.d.ts.map +1 -1
- package/file-manager/labels.d.ts +21 -2
- package/file-manager/labels.d.ts.map +1 -1
- package/file-manager/shell-styles.d.ts +37 -0
- package/file-manager/shell-styles.d.ts.map +1 -0
- package/file-manager/upload-batch.d.ts +46 -0
- package/file-manager/upload-batch.d.ts.map +1 -1
- package/file-manager/upload-batch.js +6 -2
- package/file-manager/upload-queue.d.ts +44 -4
- package/file-manager/upload-queue.d.ts.map +1 -1
- package/file-manager/upload-queue.js +45 -13
- package/file-manager.js +4 -4
- package/hooks/useAvailableHeightCap.js +1 -1
- package/hooks/useControlErrorAssociation.d.ts +3 -0
- package/hooks/useControlErrorAssociation.d.ts.map +1 -0
- package/hooks/useControlErrorAssociation.js +12 -0
- package/hooks/useIsMobile.js +1 -1
- package/hooks/useIsPhone.d.ts +3 -0
- package/hooks/useIsPhone.d.ts.map +1 -0
- package/hooks/useIsPhone.js +13 -0
- package/hooks/useIsTablet.d.ts +3 -0
- package/hooks/useIsTablet.d.ts.map +1 -0
- package/hooks/useIsTablet.js +13 -0
- package/hooks/useIsTextClipped.d.ts +26 -0
- package/hooks/useIsTextClipped.d.ts.map +1 -0
- package/hooks/useIsTextClipped.js +25 -0
- package/hooks/useIsVerticallyClamped.d.ts +16 -0
- package/hooks/useIsVerticallyClamped.d.ts.map +1 -0
- package/hooks/useIsVerticallyClamped.js +20 -0
- package/hooks/useTextRefinement.d.ts +1 -1
- package/hooks/useTextRefinement.d.ts.map +1 -1
- package/hooks/useTextRefinement.js +4 -4
- package/hooks/useUnsavedChangesGuard.js +1 -5
- package/hooks/useUnsavedChangesLeaveConfirmation.d.ts +12 -0
- package/hooks/useUnsavedChangesLeaveConfirmation.d.ts.map +1 -0
- package/hooks/useUnsavedChangesLeaveConfirmation.js +22 -0
- package/hooks/useUnsavedChangesLeaveGuard.d.ts +24 -0
- package/hooks/useUnsavedChangesLeaveGuard.d.ts.map +1 -0
- package/hooks/useUnsavedChangesLeaveGuard.js +24 -0
- package/index.css +2 -2
- package/index.d.ts +15 -0
- package/index.d.ts.map +1 -1
- package/index.js +93 -78
- package/models/auth.d.ts +2 -0
- package/models/auth.d.ts.map +1 -1
- package/models/chat.d.ts +19 -0
- package/models/chat.d.ts.map +1 -1
- package/models/conversation-classification.d.ts +5 -0
- package/models/conversation-classification.d.ts.map +1 -1
- package/models/conversation-classification.js +3 -1
- package/models/text-refinement.d.ts +6 -2
- package/models/text-refinement.d.ts.map +1 -1
- package/package.json +10 -17
- package/types/mime-type.d.ts +30 -0
- package/types/mime-type.d.ts.map +1 -1
- package/types/mime-type.js +1 -1
- package/utils/dom.d.ts +8 -0
- package/utils/dom.d.ts.map +1 -0
- package/utils/dom.js +10 -0
- package/utils/format-price.js +10 -10
- package/utils/inline-segments.js +1 -1
- package/utils/latex.d.ts +4 -3
- package/utils/latex.d.ts.map +1 -1
- package/utils/latex.js +47 -41
- package/utils/message-attachment-to-display.js +1 -1
- package/utils/mime-type.js +1 -1
- package/utils/prompt-variables.js +5 -9
- package/utils/syntax-highlighting.js +8 -8
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Dropdown, DropdownItem } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
import { ComponentProps, FC, MouseEvent, ReactElement } from 'react';
|
|
3
|
+
/** Props for `ActionMenu`. */
|
|
4
|
+
export interface ActionMenuProps {
|
|
5
|
+
/** Actions of the menu. Dividers, plain-text rows and nested items are shown by the desktop dropdown only. */
|
|
6
|
+
items: DropdownItem[];
|
|
7
|
+
/** Trigger element; on a phone it gets the click handler that opens the sheet, so it must accept `onClick`. */
|
|
8
|
+
children: ReactElement<{
|
|
9
|
+
onClick?: (event: MouseEvent) => void;
|
|
10
|
+
}>;
|
|
11
|
+
/** Title and accessible name of the phone sheet. */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Accessible name of the phone sheet's close button. Defaults to `'Close'`. */
|
|
14
|
+
closeLabel?: string;
|
|
15
|
+
/** Placement of the desktop dropdown. Defaults to automatic placement. */
|
|
16
|
+
placement?: ComponentProps<typeof Dropdown>['placement'];
|
|
17
|
+
/** Whether the desktop dropdown is as wide as its trigger. Defaults to `true`. */
|
|
18
|
+
matchReferenceWidth?: boolean;
|
|
19
|
+
/** CSS class applied to the desktop dropdown's list. */
|
|
20
|
+
listClassName?: string;
|
|
21
|
+
/** Called when the menu opens or closes, on either surface. */
|
|
22
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
23
|
+
}
|
|
24
|
+
/** Action menu that opens as the kit dropdown on tablet and desktop and as a bottom sheet on a phone. */
|
|
25
|
+
export declare const ActionMenu: FC<ActionMenuProps>;
|
|
26
|
+
//# sourceMappingURL=ActionMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionMenu/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,KAAK,YAAY,EAGlB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,EAAE,EACP,KAAK,UAAU,EACf,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAGf,8BAA8B;AAC9B,MAAM,WAAW,eAAe;IAC9B,8GAA8G;IAC9G,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,+GAA+G;IAC/G,QAAQ,EAAE,YAAY,CAAC;QAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;KAAE,CAAC,CAAC;IAClE,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC;IACzD,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED,yGAAyG;AACzG,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA8E1C,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useIsPhone as e } from "../../hooks/useIsPhone.js";
|
|
2
|
+
import { BottomSheet as t, Dropdown as n, DropdownItemType as r, MenuItem as i } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { cloneElement as a, useState as o } from "react";
|
|
4
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ActionMenu/ActionMenu.tsx
|
|
6
|
+
var u = ({ items: u, children: d, title: f, closeLabel: p = "Close", placement: m, matchReferenceWidth: h, listClassName: g, onOpenChange: _ }) => {
|
|
7
|
+
let v = e(), [y, b] = o(!1);
|
|
8
|
+
if (!v) return /* @__PURE__ */ c(n, {
|
|
9
|
+
items: u,
|
|
10
|
+
placement: m,
|
|
11
|
+
matchReferenceWidth: h,
|
|
12
|
+
listClassName: g,
|
|
13
|
+
onOpenChange: _,
|
|
14
|
+
children: d
|
|
15
|
+
});
|
|
16
|
+
let x = (e) => {
|
|
17
|
+
b(e), _?.(e);
|
|
18
|
+
}, S = (e) => {
|
|
19
|
+
d.props.onClick?.(e), x(!0);
|
|
20
|
+
}, C = (e, t) => {
|
|
21
|
+
x(!1), e.onClick?.({
|
|
22
|
+
key: e.key,
|
|
23
|
+
domEvent: t
|
|
24
|
+
});
|
|
25
|
+
}, w = u.filter((e) => e.type !== r.Divider && e.type !== r.PlainText && !e.children?.length);
|
|
26
|
+
return /* @__PURE__ */ l(s, { children: [a(d, {
|
|
27
|
+
onClick: S,
|
|
28
|
+
"aria-haspopup": "dialog",
|
|
29
|
+
"aria-expanded": y
|
|
30
|
+
}), /* @__PURE__ */ c(t, {
|
|
31
|
+
open: y,
|
|
32
|
+
title: f,
|
|
33
|
+
closeAriaLabel: p,
|
|
34
|
+
onClose: () => x(!1),
|
|
35
|
+
children: /* @__PURE__ */ c("div", {
|
|
36
|
+
role: "menu",
|
|
37
|
+
"aria-label": f,
|
|
38
|
+
children: w.map((e) => /* @__PURE__ */ c(i, {
|
|
39
|
+
role: "menuitem",
|
|
40
|
+
label: e.label,
|
|
41
|
+
icon: e.icon,
|
|
42
|
+
disabled: e.disabled,
|
|
43
|
+
danger: e.danger,
|
|
44
|
+
onClick: (t) => C(e, t)
|
|
45
|
+
}, e.key))
|
|
46
|
+
})
|
|
47
|
+
})] });
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { u as ActionMenu };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PopupSize } from '@epam/ai-dial-ui-kit';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
+
import { ConfirmationFooterStyles } from '../ConfirmationView/ConfirmationFooter';
|
|
3
4
|
import { ConfirmationViewProps } from '../ConfirmationView/ConfirmationView';
|
|
4
5
|
/** Props for `ConfirmationDialog`. */
|
|
5
|
-
export interface ConfirmationDialogProps extends ConfirmationViewProps {
|
|
6
|
+
export interface ConfirmationDialogProps extends Omit<ConfirmationViewProps, 'className'> {
|
|
6
7
|
/** Whether the dialog is open. */
|
|
7
8
|
open: boolean;
|
|
8
9
|
/** Dialog title. A string rather than a node, so the kit names the dialog with it. */
|
|
@@ -27,6 +28,10 @@ export interface ConfirmationDialogProps extends ConfirmationViewProps {
|
|
|
27
28
|
popupClassName?: string;
|
|
28
29
|
/** CSS class applied to the dialog title. */
|
|
29
30
|
titleClassName?: string;
|
|
31
|
+
/** CSS class applied to the content view root, e.g. a `pt-0` override of its default top padding. */
|
|
32
|
+
viewClassName?: string;
|
|
33
|
+
/** Style overrides forwarded to the action row, e.g. a transparent top border. */
|
|
34
|
+
footerStyles?: ConfirmationFooterStyles;
|
|
30
35
|
/** Called when the user confirms. */
|
|
31
36
|
onConfirm: () => void;
|
|
32
37
|
/** Called when the dialog is dismissed — Cancel, the header close control, Escape, or an outside click. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,sCAAsC,CAAC;AAS9C,sCAAsC;AACtC,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CACnD,qBAAqB,EACrB,WAAW,CACZ;IACC,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,oIAAoI;IACpI,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iHAAiH;IACjH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qGAAqG;IACrG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,qCAAqC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,2GAA2G;IAC3G,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAwD1D,CAAC"}
|
|
@@ -3,9 +3,9 @@ import { ConfirmationFooter as t } from "../ConfirmationView/ConfirmationFooter.
|
|
|
3
3
|
import { ConfirmationPopupVariant as n, Popup as r, PopupSize as i } from "@epam/ai-dial-ui-kit";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/ConfirmationDialog/ConfirmationDialog.tsx
|
|
6
|
-
var o = ({ open: o, title: s, confirmLabel: c, cancelLabel: l, isLoading: u = !1, isConfirmDisabled: d = !1, loadingStatusLabel: f, size: p = i.Sm, popupClassName: m, titleClassName: h,
|
|
7
|
-
let
|
|
8
|
-
u ||
|
|
6
|
+
var o = ({ open: o, title: s, confirmLabel: c, cancelLabel: l, isLoading: u = !1, isConfirmDisabled: d = !1, loadingStatusLabel: f, size: p = i.Sm, popupClassName: m, titleClassName: h, viewClassName: g, footerStyles: _, variant: v = n.Info, onConfirm: y, onClose: b, ...x }) => {
|
|
7
|
+
let S = () => {
|
|
8
|
+
u || b();
|
|
9
9
|
};
|
|
10
10
|
return /* @__PURE__ */ a(r, {
|
|
11
11
|
open: o,
|
|
@@ -13,20 +13,22 @@ var o = ({ open: o, title: s, confirmLabel: c, cancelLabel: l, isLoading: u = !1
|
|
|
13
13
|
size: p,
|
|
14
14
|
className: m,
|
|
15
15
|
titleClassName: h,
|
|
16
|
-
onClose:
|
|
16
|
+
onClose: S,
|
|
17
17
|
footer: /* @__PURE__ */ a(t, {
|
|
18
|
-
variant:
|
|
18
|
+
variant: v,
|
|
19
19
|
confirmLabel: c,
|
|
20
20
|
cancelLabel: l,
|
|
21
21
|
isLoading: u,
|
|
22
22
|
isConfirmDisabled: d,
|
|
23
23
|
loadingStatusLabel: f,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
styles: _,
|
|
25
|
+
onConfirm: y,
|
|
26
|
+
onCancel: S
|
|
26
27
|
}),
|
|
27
28
|
children: /* @__PURE__ */ a(e, {
|
|
28
|
-
variant:
|
|
29
|
-
|
|
29
|
+
variant: v,
|
|
30
|
+
className: g,
|
|
31
|
+
...x
|
|
30
32
|
})
|
|
31
33
|
});
|
|
32
34
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss
|
|
2
|
+
var e = "_info_pkxew_1", t = "_danger_pkxew_5", n = {
|
|
3
|
+
info: e,
|
|
4
|
+
danger: t
|
|
4
5
|
};
|
|
5
6
|
//#endregion
|
|
6
|
-
export {
|
|
7
|
+
export { t as danger, n as default, e as info };
|
|
@@ -4,9 +4,9 @@ import n from "./ConfirmationIdentityRow.module.scss.js";
|
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/ConfirmationIdentityRow/ConfirmationIdentityRow.tsx
|
|
6
6
|
var a = ({ icon: a, typeLabel: o, name: s, styles: c }) => {
|
|
7
|
-
let { colors: l, typeLabelClassName: u = "dial-caption-lead-semi-text", nameClassName: d = "dial-small-semi-text" } = c ?? {};
|
|
7
|
+
let { colors: l, typeLabelClassName: u = "dial-caption-lead-semi-text", nameClassName: d = "dial-small-semi-text" } = c ?? {}, f = t({ "--cir-type-label-text": l?.typeLabelText });
|
|
8
8
|
return /* @__PURE__ */ i("div", {
|
|
9
|
-
style:
|
|
9
|
+
style: f,
|
|
10
10
|
className: "flex min-w-0 items-center gap-2",
|
|
11
11
|
children: [a, /* @__PURE__ */ i("div", {
|
|
12
12
|
className: "flex min-w-0 flex-col",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss
|
|
2
|
+
var e = "_typeLabel_17nhs_1", t = { typeLabel: e };
|
|
2
3
|
//#endregion
|
|
3
|
-
export {
|
|
4
|
+
export { t as default, e as typeLabel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationFooter.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationView/ConfirmationFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,
|
|
1
|
+
{"version":3,"file":"ConfirmationFooter.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationView/ConfirmationFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EASzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAK3B,gDAAgD;AAChD,MAAM,WAAW,wBAAwB;IACvC,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gDAAgD;AAChD,MAAM,WAAW,wBAAwB;IACvC,wDAAwD;IACxD,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AAED,sCAAsC;AACtC,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,4HAA4H;IAC5H,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uBAAuB;IACvB,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,qCAAqC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,kHAAkH;AAClH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAiE1D,CAAC"}
|
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
import { mergeClasses as e } from "../../utils/merge-class.js";
|
|
2
2
|
import { buildCssVars as t } from "../../utils/build-css-vars.js";
|
|
3
3
|
import n from "./ConfirmationView.module.scss.js";
|
|
4
|
-
import { ConfirmationPopupVariant as r, DIAL_ICON_SIZE as i, DIAL_KIT_ICON_STROKE as a, DangerButton as o, GhostButton as s,
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { IconTrashX as
|
|
4
|
+
import { ConfirmationPopupVariant as r, DIAL_ICON_SIZE as i, DIAL_KIT_ICON_STROKE as a, DangerButton as o, GhostButton as s, LiveRegion as c, LiveRegionElement as l, NeutralButton as u, Spinner as d } from "@epam/ai-dial-ui-kit";
|
|
5
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
import { IconTrashX as m } from "@tabler/icons-react";
|
|
7
7
|
//#region src/components/ConfirmationView/ConfirmationFooter.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
if (
|
|
11
|
-
if (
|
|
8
|
+
var h = ({ confirmLabel: h, cancelLabel: g, variant: _ = r.Info, isLoading: v = !1, isConfirmDisabled: y = !1, loadingStatusLabel: b, styles: x, onConfirm: S, onCancel: C }) => {
|
|
9
|
+
let w = _ === r.Danger, T = t({ "--cfm-footer-border": x?.colors?.border }), E = (() => {
|
|
10
|
+
if (v) return /* @__PURE__ */ f(d, { size: i.SM });
|
|
11
|
+
if (w) return /* @__PURE__ */ f(m, {
|
|
12
12
|
size: i.MD,
|
|
13
13
|
"aria-hidden": !0,
|
|
14
14
|
stroke: a
|
|
15
15
|
});
|
|
16
|
-
})(),
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
style:
|
|
16
|
+
})(), D = w ? o : u;
|
|
17
|
+
return /* @__PURE__ */ p("div", {
|
|
18
|
+
style: T,
|
|
19
19
|
className: e("flex items-center justify-end gap-2 px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-6", n.footer),
|
|
20
20
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
label:
|
|
21
|
+
/* @__PURE__ */ f(s, {
|
|
22
|
+
label: g,
|
|
23
23
|
className: "mobile:flex-1",
|
|
24
|
-
disabled:
|
|
25
|
-
onClick:
|
|
24
|
+
disabled: v,
|
|
25
|
+
onClick: C
|
|
26
26
|
}),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
label:
|
|
27
|
+
/* @__PURE__ */ f(D, {
|
|
28
|
+
label: h,
|
|
29
29
|
className: "mobile:flex-1",
|
|
30
|
-
disabled:
|
|
31
|
-
iconBefore:
|
|
32
|
-
onClick:
|
|
30
|
+
disabled: v || y,
|
|
31
|
+
iconBefore: E,
|
|
32
|
+
onClick: S
|
|
33
33
|
}),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
children: v
|
|
34
|
+
b != null && /* @__PURE__ */ f(c, {
|
|
35
|
+
visuallyHidden: !0,
|
|
36
|
+
as: l.Span,
|
|
37
|
+
children: v ? b : ""
|
|
39
38
|
})
|
|
40
39
|
]
|
|
41
40
|
});
|
|
42
41
|
};
|
|
43
42
|
//#endregion
|
|
44
|
-
export {
|
|
43
|
+
export { h as ConfirmationFooter };
|
|
@@ -40,6 +40,8 @@ export interface ConfirmationViewProps {
|
|
|
40
40
|
variant?: ConfirmationPopupVariant;
|
|
41
41
|
/** Typography class applied to the message and the bullet list. Defaults to `'dial-small-text'`. */
|
|
42
42
|
messageClassName?: string;
|
|
43
|
+
/** CSS class applied to the view root, e.g. a `pt-0` override of the default top padding. */
|
|
44
|
+
className?: string;
|
|
43
45
|
/** Style overrides. */
|
|
44
46
|
styles?: ConfirmationViewStyles;
|
|
45
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationView.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationView/ConfirmationView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oGAAoG;IACpG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,wDAAwD;IACxD,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,oCAAoC;AACpC,MAAM,WAAW,qBAAqB;IACpC,wJAAwJ;IACxJ,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAC;IACnB,6HAA6H;IAC7H,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,oGAAoG;IACpG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oIAAoI;AACpI,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ConfirmationView.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationView/ConfirmationView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oGAAoG;IACpG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,wDAAwD;IACxD,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,oCAAoC;AACpC,MAAM,WAAW,qBAAqB;IACpC,wJAAwJ;IACxJ,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAC;IACnB,6HAA6H;IAC7H,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,oGAAoG;IACpG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oIAAoI;AACpI,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAsEtD,CAAC"}
|
|
@@ -5,26 +5,26 @@ import r from "./ConfirmationView.module.scss.js";
|
|
|
5
5
|
import { ConfirmationPopupVariant as i } from "@epam/ai-dial-ui-kit";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/ConfirmationView/ConfirmationView.tsx
|
|
8
|
-
var s = ({ item: s, identity: c, message: l, details: u, consequences: d, variant: f = i.Info, messageClassName: p = "dial-small-text",
|
|
9
|
-
let
|
|
8
|
+
var s = ({ item: s, identity: c, message: l, details: u, consequences: d, variant: f = i.Info, messageClassName: p = "dial-small-text", className: m, styles: h, children: g }) => {
|
|
9
|
+
let _ = h?.colors, v = t({
|
|
10
|
+
"--cfm-message-text": _?.messageText,
|
|
11
|
+
"--cfm-consequence-text": _?.consequenceText
|
|
12
|
+
});
|
|
10
13
|
return /* @__PURE__ */ o("div", {
|
|
11
|
-
style:
|
|
12
|
-
|
|
13
|
-
"--cfm-consequence-text": g?.consequenceText
|
|
14
|
-
}),
|
|
15
|
-
className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
|
|
14
|
+
style: v,
|
|
15
|
+
className: e("flex flex-col gap-4 px-4 py-4 desktop:px-6", m),
|
|
16
16
|
children: [
|
|
17
17
|
c ?? (s != null && /* @__PURE__ */ a(n, {
|
|
18
18
|
item: s,
|
|
19
19
|
variant: f,
|
|
20
20
|
styles: { colors: {
|
|
21
|
-
background:
|
|
22
|
-
dangerBackground:
|
|
23
|
-
dangerBorder:
|
|
21
|
+
background: _?.cardBackground,
|
|
22
|
+
dangerBackground: _?.cardDangerBackground,
|
|
23
|
+
dangerBorder: _?.cardDangerBorder
|
|
24
24
|
} }
|
|
25
25
|
})),
|
|
26
26
|
/* @__PURE__ */ a("p", {
|
|
27
|
-
className: e(p, "break-
|
|
27
|
+
className: e(p, "wrap-break-word", r.message),
|
|
28
28
|
children: l
|
|
29
29
|
}),
|
|
30
30
|
u,
|
|
@@ -32,7 +32,7 @@ var s = ({ item: s, identity: c, message: l, details: u, consequences: d, varian
|
|
|
32
32
|
className: e("flex list-disc flex-col gap-2 ps-5", p, r.consequences),
|
|
33
33
|
children: d.map((e) => /* @__PURE__ */ a("li", { children: e }, e))
|
|
34
34
|
}),
|
|
35
|
-
|
|
35
|
+
g
|
|
36
36
|
]
|
|
37
37
|
});
|
|
38
38
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region src/components/ConfirmationView/ConfirmationView.module.scss
|
|
2
|
+
var e = "_message_1iqfi_1", t = "_consequences_1iqfi_5", n = "_footer_1iqfi_9", r = {
|
|
3
|
+
message: e,
|
|
4
|
+
consequences: t,
|
|
5
|
+
footer: n
|
|
5
6
|
};
|
|
6
7
|
//#endregion
|
|
7
|
-
export {
|
|
8
|
+
export { t as consequences, r as default, n as footer, e as message };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DeleteConfirmationViewLabels, DeleteConfirmationViewProps } from '../DeleteConfirmationView/DeleteConfirmationView';
|
|
3
|
+
/** User-visible strings of `DeleteConfirmationDrawer`. */
|
|
4
|
+
export interface DeleteConfirmationDrawerLabels extends DeleteConfirmationViewLabels {
|
|
5
|
+
/** Label of the confirming action button. Defaults to `'Delete'`. */
|
|
6
|
+
confirm?: string;
|
|
7
|
+
/** Label of the cancel button. Defaults to `'Cancel'`. */
|
|
8
|
+
cancel?: string;
|
|
9
|
+
/** Status text announced while the deletion is in flight. Defaults to `'Deleting…'`. */
|
|
10
|
+
deleting?: string;
|
|
11
|
+
/** Accessible name of the header's close button. Defaults to `'Close'`. */
|
|
12
|
+
close?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Props for `DeleteConfirmationDrawer`. */
|
|
15
|
+
export interface DeleteConfirmationDrawerProps extends Omit<DeleteConfirmationViewProps, 'labels'> {
|
|
16
|
+
/** Whether the drawer is open. */
|
|
17
|
+
open: boolean;
|
|
18
|
+
/** Drawer title. A string rather than a node, so the kit names the dialog with it. */
|
|
19
|
+
title: string;
|
|
20
|
+
/** Whether the delete request is in flight; blocks both actions and every dismissal route. Defaults to `false`. */
|
|
21
|
+
isLoading?: boolean;
|
|
22
|
+
/** User-visible strings. */
|
|
23
|
+
labels?: DeleteConfirmationDrawerLabels;
|
|
24
|
+
/** Called when the user confirms. */
|
|
25
|
+
onConfirm: () => void;
|
|
26
|
+
/** Called when the drawer is dismissed — Cancel, the close control, Escape, or a backdrop press. */
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
}
|
|
29
|
+
/** Delete confirmation presented as a side drawer, the same panel the catalog shows for an item. */
|
|
30
|
+
export declare const DeleteConfirmationDrawer: FC<DeleteConfirmationDrawerProps>;
|
|
31
|
+
//# sourceMappingURL=DeleteConfirmationDrawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteConfirmationDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EACjC,MAAM,kDAAkD,CAAC;AAE1D,0DAA0D;AAC1D,MAAM,WAAW,8BAA+B,SAAQ,4BAA4B;IAClF,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,4CAA4C;AAC5C,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CACzD,2BAA2B,EAC3B,QAAQ,CACT;IACC,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,mHAAmH;IACnH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,qCAAqC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,oGAAoG;IACpG,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,oGAAoG;AACpG,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CA8CtE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ConfirmationFooter as e } from "../ConfirmationView/ConfirmationFooter.js";
|
|
2
|
+
import { DeleteConfirmationView as t } from "../DeleteConfirmationView/DeleteConfirmationView.js";
|
|
3
|
+
import { ConfirmationPopupVariant as n, SideDrawer as r } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.tsx
|
|
6
|
+
var o = ({ open: o, title: s, isLoading: c = !1, labels: l, onConfirm: u, onClose: d, ...f }) => {
|
|
7
|
+
let { confirm: p = "Delete", cancel: m = "Cancel", deleting: h = "Deleting…", close: g = "Close", ..._ } = l ?? {}, v = () => {
|
|
8
|
+
c || d();
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ a(r, {
|
|
11
|
+
open: o,
|
|
12
|
+
header: s,
|
|
13
|
+
closeAriaLabel: g,
|
|
14
|
+
closeDisabled: c,
|
|
15
|
+
closeOnOutsideClick: !c,
|
|
16
|
+
onClose: v,
|
|
17
|
+
bodyClassName: "flex flex-col overflow-hidden",
|
|
18
|
+
children: [/* @__PURE__ */ i("div", {
|
|
19
|
+
className: "flex min-h-0 flex-1 flex-col overflow-y-auto",
|
|
20
|
+
children: /* @__PURE__ */ i(t, {
|
|
21
|
+
...f,
|
|
22
|
+
labels: _
|
|
23
|
+
})
|
|
24
|
+
}), /* @__PURE__ */ i(e, {
|
|
25
|
+
variant: n.Danger,
|
|
26
|
+
confirmLabel: p,
|
|
27
|
+
cancelLabel: m,
|
|
28
|
+
isLoading: c,
|
|
29
|
+
loadingStatusLabel: h,
|
|
30
|
+
onConfirm: u,
|
|
31
|
+
onCancel: v
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as DeleteConfirmationDrawer };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfirmationPopupVariant } from '@epam/ai-dial-ui-kit';
|
|
1
2
|
import { FC, ReactNode } from 'react';
|
|
2
3
|
import { ConfirmationViewColors } from '../ConfirmationView/ConfirmationView';
|
|
3
4
|
/** Default cap on the names listed for a multi-item delete. */
|
|
@@ -35,6 +36,8 @@ export interface DeleteConfirmationViewProps {
|
|
|
35
36
|
message: ReactNode;
|
|
36
37
|
/** Consequences listed before the final "cannot be undone" bullet. */
|
|
37
38
|
consequences?: string[];
|
|
39
|
+
/** Palette of the identity card. Defaults to `undefined`, a neutral card; `ConfirmationPopupVariant.Danger` tints it red. */
|
|
40
|
+
identityVariant?: ConfirmationPopupVariant;
|
|
38
41
|
/** Maximum number of names listed for a multi-item delete. Defaults to `DELETE_CONFIRMATION_MAX_LISTED_NAMES` (10). */
|
|
39
42
|
maxListedNames?: number;
|
|
40
43
|
/** User-visible strings. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteConfirmationView.d.ts","sourceRoot":"","sources":["../../../src/components/DeleteConfirmationView/DeleteConfirmationView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeleteConfirmationView.d.ts","sourceRoot":"","sources":["../../../src/components/DeleteConfirmationView/DeleteConfirmationView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,sCAAsC,CAAC;AAI9C,+DAA+D;AAC/D,eAAO,MAAM,oCAAoC,KAAK,CAAC;AAEvD,wDAAwD;AACxD,MAAM,WAAW,4BAA4B;IAC3C,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,+FAA+F;IAC/F,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC;AAED,oDAAoD;AACpD,MAAM,WAAW,4BAA6B,SAAQ,sBAAsB;IAC1E,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oDAAoD;AACpD,MAAM,WAAW,4BAA4B;IAC3C,gHAAgH;IAChH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,MAAM,CAAC,EAAE,4BAA4B,CAAC;CACvC;AAED,0CAA0C;AAC1C,MAAM,WAAW,2BAA2B;IAC1C,kJAAkJ;IAClJ,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,8GAA8G;IAC9G,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uGAAuG;IACvG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,OAAO,EAAE,SAAS,CAAC;IACnB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,6HAA6H;IAC7H,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C,uHAAuH;IACvH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,4BAA4B,CAAC;IACtC,uBAAuB;IACvB,MAAM,CAAC,EAAE,4BAA4B,CAAC;IACtC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD,+GAA+G;AAC/G,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAkFlE,CAAC"}
|
|
@@ -1,37 +1,46 @@
|
|
|
1
1
|
import { mergeClasses as e } from "../../utils/merge-class.js";
|
|
2
2
|
import { ResourceSummary as t } from "../ResourceSummary/ResourceSummary.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import i from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
3
|
+
import { ConfirmationIdentityCard as n } from "../ConfirmationIdentityCard/ConfirmationIdentityCard.js";
|
|
4
|
+
import { ConfirmationIdentityRow as r } from "../ConfirmationIdentityRow/ConfirmationIdentityRow.js";
|
|
5
|
+
import { ConfirmationView as i } from "../ConfirmationView/ConfirmationView.js";
|
|
6
|
+
import a from "./DeleteConfirmationView.module.scss.js";
|
|
7
|
+
import { ConfirmationPopupVariant as o } from "@epam/ai-dial-ui-kit";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
9
|
//#region src/components/DeleteConfirmationView/DeleteConfirmationView.tsx
|
|
9
|
-
var
|
|
10
|
-
let { cannotBeUndone:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
styles: { colors:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
var l = 10, u = (e) => e === 1 ? "1 item" : `${e} items`, d = (e) => `… and ${e} more`, f = ({ names: l, icon: f, typeLabel: p, message: m, consequences: h = [], identityVariant: g, maxListedNames: _ = 10, labels: v, styles: y, children: b }) => {
|
|
11
|
+
let { cannotBeUndone: x = "Cannot be undone", itemCount: S = u, moreItems: C = d } = v ?? {}, { typeLabelText: w, ...T } = y?.colors ?? {}, E = y?.messageClassName ?? "dial-small-text", D = l.length === 1, O = D ? [] : l.slice(0, _), k = l.length - (D ? 1 : O.length), A = /* @__PURE__ */ s(r, {
|
|
12
|
+
icon: D ? f : void 0,
|
|
13
|
+
typeLabel: D ? p : void 0,
|
|
14
|
+
name: D ? l[0] : S(l.length),
|
|
15
|
+
styles: { colors: { typeLabelText: w } }
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ s(i, {
|
|
18
|
+
variant: o.Danger,
|
|
19
|
+
messageClassName: E,
|
|
20
|
+
styles: { colors: T },
|
|
21
|
+
identity: g == null ? /* @__PURE__ */ s(t, { children: A }) : /* @__PURE__ */ s(n, {
|
|
22
|
+
variant: g,
|
|
23
|
+
styles: { colors: {
|
|
24
|
+
background: T.cardBackground,
|
|
25
|
+
dangerBackground: T.cardDangerBackground,
|
|
26
|
+
dangerBorder: T.cardDangerBorder
|
|
27
|
+
} },
|
|
28
|
+
children: A
|
|
29
|
+
}),
|
|
30
|
+
message: m,
|
|
31
|
+
details: O.length > 0 && /* @__PURE__ */ c("ul", {
|
|
32
|
+
className: e("flex flex-col gap-1", E, a.names),
|
|
33
|
+
children: [O.map((e, t) => /* @__PURE__ */ s("li", {
|
|
25
34
|
className: "truncate",
|
|
26
35
|
children: e
|
|
27
|
-
}, `${t}-${e}`)),
|
|
28
|
-
className:
|
|
29
|
-
children:
|
|
36
|
+
}, `${t}-${e}`)), k > 0 && /* @__PURE__ */ s("li", {
|
|
37
|
+
className: a.more,
|
|
38
|
+
children: C(k)
|
|
30
39
|
})]
|
|
31
40
|
}),
|
|
32
|
-
consequences: [...
|
|
33
|
-
children:
|
|
41
|
+
consequences: [...h, x],
|
|
42
|
+
children: b
|
|
34
43
|
});
|
|
35
44
|
};
|
|
36
45
|
//#endregion
|
|
37
|
-
export {
|
|
46
|
+
export { l as DELETE_CONFIRMATION_MAX_LISTED_NAMES, f as DeleteConfirmationView };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/components/DeleteConfirmationView/DeleteConfirmationView.module.scss
|
|
2
|
+
var e = "_names_g31v4_1", t = "_more_g31v4_5", n = {
|
|
3
|
+
names: e,
|
|
4
|
+
more: t
|
|
4
5
|
};
|
|
5
6
|
//#endregion
|
|
6
|
-
export {
|
|
7
|
+
export { n as default, t as more, e as names };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/components/DeploymentIcon/DeploymentIcon.module.scss
|
|
2
|
+
var e = "_agentIconBadge_147d2_1", t = { agentIconBadge: e };
|
|
2
3
|
//#endregion
|
|
3
|
-
export { e as default };
|
|
4
|
+
export { e as agentIconBadge, t as default };
|
|
@@ -22,7 +22,7 @@ var s = ({ item: s, nameClassName: c, versionClassName: l, showVersion: u = !0,
|
|
|
22
22
|
className: d,
|
|
23
23
|
label: f
|
|
24
24
|
}), (x != null || _ && s.isFeatured) && /* @__PURE__ */ o("div", {
|
|
25
|
-
className: "absolute
|
|
25
|
+
className: "absolute inset-e-0 top-[-6px] flex items-center gap-2",
|
|
26
26
|
children: [x, _ && s.isFeatured && /* @__PURE__ */ a(i, {
|
|
27
27
|
type: s.type,
|
|
28
28
|
label: g,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AvatarColorClasses } from '@epam/ai-dial-ui-kit';
|
|
1
2
|
import { FC } from 'react';
|
|
2
3
|
/** Props for `InitialsAvatar`. */
|
|
3
4
|
export interface InitialsAvatarProps {
|
|
@@ -5,6 +6,8 @@ export interface InitialsAvatarProps {
|
|
|
5
6
|
name: string;
|
|
6
7
|
/** Badge width and height in pixels. */
|
|
7
8
|
size: number;
|
|
9
|
+
/** Explicit colour pair overriding the deterministic pick from `name` (an `AVATAR_PALETTE` entry); omit to keep the name-derived colour. */
|
|
10
|
+
color?: AvatarColorClasses;
|
|
8
11
|
/** Extra classes applied to the root element (e.g. `'shrink-0'`). */
|
|
9
12
|
className?: string;
|
|
10
13
|
/** Type-scale class for the initials. Defaults to none: the initials are semibold at 40% of `size`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialsAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/InitialsAvatar/InitialsAvatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InitialsAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/InitialsAvatar/InitialsAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,4IAA4I;IAC5I,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uGAAuG;IACvG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oGAAoG;AACpG,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAgBlD,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Avatar as e, AvatarShape as t } from "@epam/ai-dial-ui-kit";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/InitialsAvatar/InitialsAvatar.tsx
|
|
4
|
-
var r = ({ name: r, size: i,
|
|
4
|
+
var r = ({ name: r, size: i, color: a, className: o, textClassName: s }) => /* @__PURE__ */ n(e, {
|
|
5
5
|
name: r,
|
|
6
6
|
size: i,
|
|
7
7
|
shape: t.Square,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
color: a,
|
|
9
|
+
className: o,
|
|
10
|
+
textClassName: s
|
|
10
11
|
});
|
|
11
12
|
//#endregion
|
|
12
13
|
export { r as InitialsAvatar };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/components/ItemHeader/ItemHeader.module.scss
|
|
2
|
+
var e = "_title_11w3i_1", t = "_count_11w3i_5", n = {
|
|
3
|
+
title: e,
|
|
4
|
+
count: t
|
|
4
5
|
};
|
|
5
6
|
//#endregion
|
|
6
|
-
export {
|
|
7
|
+
export { t as count, n as default, e as title };
|