@epam/ai-dial-projects 1.3.0-dev.310 → 1.3.0-dev.317
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectConversationList.d.ts","sourceRoot":"","sources":["../../../src/components/ProjectConversationList/ProjectConversationList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectConversationList.d.ts","sourceRoot":"","sources":["../../../src/components/ProjectConversationList/ProjectConversationList.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAGV,4BAA4B,EAC7B,MAAM,8CAA8C,CAAC;AAsPtD,iHAAiH;AACjH,eAAO,MAAM,uBAAuB,oEAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectView.d.ts","sourceRoot":"","sources":["../../../src/components/ProjectView/ProjectView.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"ProjectView.d.ts","sourceRoot":"","sources":["../../../src/components/ProjectView/ProjectView.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AAybzC,2HAA2H;AAC3H,eAAO,MAAM,WAAW,wDAA6B,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeleteConfirmationDialog as e, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as t, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as n, MarkdownRenderer as r, PROHIBITED_CONVERSATION_NAME_CHARS_RE as i, PanelEmptyState as a, RequestStatus as o, TextRefinementField as s, buildCssVars as c, getAttachmentTypeFromMime as l, inferMimeTypeFromPath as u, mergeClasses as d, useAvailableHeightCap as f, useIsMobile as p, useTextRefinement as m } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { Button as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CardShell as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, Dropdown as S, ElementSize as C, EllipsisTooltip as w, ErrorText as T, FileDropzone as E, FolderPath as D, GhostButton as O, GhostIconButton as k, Highlight as A, Input as
|
|
2
|
+
import { Button as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CardShell as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, Dropdown as S, ElementSize as C, EllipsisTooltip as w, ErrorText as T, FileDropzone as E, FolderPath as D, GhostButton as O, GhostIconButton as k, Highlight as A, Input as ee, Label as j, LinkButton as M, LiveRegion as N, LiveRegionElement as P, LiveRegionPoliteness as F, MenuItemMark as I, NeutralButton as L, Popup as te, PopupSize as ne, Search as re, Spinner as ie } from "@epam/ai-dial-ui-kit";
|
|
3
3
|
import { IconArrowNarrowLeft as R, IconArrowsSort as ae, IconDotsVertical as z, IconDownload as oe, IconPencilMinus as B, IconPin as V, IconPinFilled as H, IconPlus as se, IconShare as ce, IconTrashX as le, IconWorldShare as U, createReactComponent as ue } from "@tabler/icons-react";
|
|
4
4
|
import { Suspense as de, lazy as fe, memo as W, useCallback as G, useEffect as pe, useId as K, useMemo as q, useRef as J, useState as Y } from "react";
|
|
5
5
|
import { Fragment as me, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
@@ -132,7 +132,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
132
132
|
subtitle: "_subtitle_4rer8_5",
|
|
133
133
|
sortButton: "_sortButton_4rer8_9"
|
|
134
134
|
}, je = ({ projects: e, isLoading: t = !1, hasError: n = !1, incompleteSources: r = [], onRetry: i, onCreateProject: o, onTogglePin: s, onOpenProject: l, getProjectHref: u, searchQuery: f, onSearchQueryChange: m, sortKey: y, onSortKeyChange: S, labels: w, locale: T, styles: E }) => {
|
|
135
|
-
let { colors: D, typography: k } = E ?? {}, A = k?.titleClassName ?? "dial-h1-text",
|
|
135
|
+
let { colors: D, typography: k } = E ?? {}, A = k?.titleClassName ?? "dial-h1-text", ee = k?.subtitleClassName ?? "dial-body-text", j = k?.cardTitleClassName ?? "dial-body-semi-text", M = k?.pathLabelClassName ?? "dial-tiny-text", F = k?.pathLeafClassName ?? "dial-tiny-semi-text", L = k?.updatedAtClassName ?? "dial-tiny-text", te = k?.emptyStateDescriptionClassName ?? "dial-small-paragraph-text", ne = c({
|
|
136
136
|
"--pr-bg": D?.background,
|
|
137
137
|
"--pr-subtitle-text": D?.subtitleText,
|
|
138
138
|
"--pr-sort-text": D?.sortButtonText,
|
|
@@ -168,7 +168,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
168
168
|
}) : void 0, fe = () => t ? /* @__PURE__ */ X(ie, {}) : n || V ? /* @__PURE__ */ Z("div", {
|
|
169
169
|
className: "flex flex-col items-center gap-3",
|
|
170
170
|
children: [/* @__PURE__ */ X("p", {
|
|
171
|
-
className: d(
|
|
171
|
+
className: d(ee, Ae.subtitle),
|
|
172
172
|
children: n ? w.errorLabel : w.incompleteLabel
|
|
173
173
|
}), /* @__PURE__ */ X(O, {
|
|
174
174
|
label: w.retryLabel,
|
|
@@ -200,8 +200,8 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
200
200
|
now: z,
|
|
201
201
|
locale: T,
|
|
202
202
|
updatedAtClassName: L,
|
|
203
|
-
titleClassName:
|
|
204
|
-
pathLabelClassName:
|
|
203
|
+
titleClassName: j,
|
|
204
|
+
pathLabelClassName: M,
|
|
205
205
|
pathLeafClassName: F
|
|
206
206
|
}, e.id))
|
|
207
207
|
}), W = t || n || V, G = "mt-6 p-3 desktop:mt-0";
|
|
@@ -222,7 +222,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
222
222
|
className: d("wrap-break-word", A),
|
|
223
223
|
children: w.title
|
|
224
224
|
}), w.subtitle && /* @__PURE__ */ X("p", {
|
|
225
|
-
className: d(
|
|
225
|
+
className: d(ee, Ae.subtitle),
|
|
226
226
|
children: w.subtitle
|
|
227
227
|
})]
|
|
228
228
|
}), de(v.Primary)]
|
|
@@ -259,9 +259,9 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
259
259
|
})
|
|
260
260
|
})]
|
|
261
261
|
}),
|
|
262
|
-
/* @__PURE__ */ X(
|
|
262
|
+
/* @__PURE__ */ X(N, {
|
|
263
263
|
visuallyHidden: !0,
|
|
264
|
-
as:
|
|
264
|
+
as: P.Span,
|
|
265
265
|
children: ue()
|
|
266
266
|
}),
|
|
267
267
|
/* @__PURE__ */ Z("div", {
|
|
@@ -269,7 +269,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
269
269
|
children: [B && !t && !n && !V && /* @__PURE__ */ Z("div", {
|
|
270
270
|
className: "flex w-full max-w-[1116px] flex-wrap items-center gap-3",
|
|
271
271
|
children: [/* @__PURE__ */ X("p", {
|
|
272
|
-
className: d(
|
|
272
|
+
className: d(ee, Ae.subtitle),
|
|
273
273
|
children: w.incompleteLabel
|
|
274
274
|
}), /* @__PURE__ */ X(O, {
|
|
275
275
|
label: w.retryLabel,
|
|
@@ -366,7 +366,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
366
366
|
label: "_label_ub3na_15",
|
|
367
367
|
link: "_link_ub3na_19"
|
|
368
368
|
}, et = fe(async () => ({ default: (await ve()).MarkdownEditor })), tt = (e) => `Preview ${e}`, nt = ({ values: e, errors: r, onFieldChange: i, contextFiles: a, onContextFilesChange: o, onContextFileClick: l, selectedContextFileId: u, allowedExtensions: p, maxFileBytes: h, maxTotalBytes: g, onPickFromFileManager: _, onRefineInstructions: v, onBack: y, onCancel: S, onSubmit: C, isSubmitting: w = !1, labels: D, markdownEditorTheme: O, className: k, styles: A }) => {
|
|
369
|
-
let
|
|
369
|
+
let M = K(), I = K(), L = K(), te = K(), ne = J(null), re = f(), [ae, z] = Y(!1), [oe, B] = Y([]), [V, H] = Y(""), se = m({
|
|
370
370
|
value: e.instructions,
|
|
371
371
|
onChange: (e) => i("instructions", e),
|
|
372
372
|
onRefine: v,
|
|
@@ -450,8 +450,8 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
450
450
|
/* @__PURE__ */ Z("div", {
|
|
451
451
|
className: "flex flex-col gap-1",
|
|
452
452
|
children: [
|
|
453
|
-
/* @__PURE__ */ X(
|
|
454
|
-
id:
|
|
453
|
+
/* @__PURE__ */ X(ee, {
|
|
454
|
+
id: M,
|
|
455
455
|
inputRef: ne,
|
|
456
456
|
value: e.name,
|
|
457
457
|
onChange: (e) => i("name", e ?? ""),
|
|
@@ -490,7 +490,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
490
490
|
disabled: w || ce,
|
|
491
491
|
children: /* @__PURE__ */ Z("div", {
|
|
492
492
|
className: "flex flex-1 flex-col gap-2",
|
|
493
|
-
children: [!v && /* @__PURE__ */ X(
|
|
493
|
+
children: [!v && /* @__PURE__ */ X(j, {
|
|
494
494
|
htmlFor: L,
|
|
495
495
|
className: Te,
|
|
496
496
|
label: D.instructionsLabel
|
|
@@ -534,7 +534,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
534
534
|
errorText: ke || void 0,
|
|
535
535
|
className: $e.dropZone
|
|
536
536
|
}),
|
|
537
|
-
/* @__PURE__ */ X(
|
|
537
|
+
/* @__PURE__ */ X(N, {
|
|
538
538
|
visuallyHidden: !0,
|
|
539
539
|
politeness: F.Assertive,
|
|
540
540
|
children: Oe
|
|
@@ -560,9 +560,9 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
560
560
|
]
|
|
561
561
|
})
|
|
562
562
|
}),
|
|
563
|
-
/* @__PURE__ */ X(
|
|
563
|
+
/* @__PURE__ */ X(N, {
|
|
564
564
|
visuallyHidden: !0,
|
|
565
|
-
as:
|
|
565
|
+
as: P.Span,
|
|
566
566
|
children: w ? D.creatingStatus : V
|
|
567
567
|
})
|
|
568
568
|
]
|
|
@@ -609,8 +609,8 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
609
609
|
contentType: e.contentType,
|
|
610
610
|
type: l(e.contentType),
|
|
611
611
|
status: o.Idle
|
|
612
|
-
}), at = W(({ project: e, isLoading: t = !1, hasError: n = !1, isNotFound: i = !1, isPinned: o, isPinPending: s = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: f, onTogglePin: p, onPublish: m, onEdit: h, onShare: g, onDelete: _, onDownload: v, onContextFileClick: y, selectedContextFileId: C, isDetailsStacked: T = !1, onRetry: E, onBrowseProjects: D, mainContent: A, mainContentLabel:
|
|
613
|
-
let { colors: F, typography: I } =
|
|
612
|
+
}), at = W(({ project: e, isLoading: t = !1, hasError: n = !1, isNotFound: i = !1, isPinned: o, isPinPending: s = !1, contextSearchQuery: l, onContextSearchQueryChange: u, onBack: f, onTogglePin: p, onPublish: m, onEdit: h, onShare: g, onDelete: _, onDownload: v, onContextFileClick: y, selectedContextFileId: C, isDetailsStacked: T = !1, onRetry: E, onBrowseProjects: D, mainContent: A, mainContentLabel: ee = "Project content", labels: j, styles: M }) => {
|
|
613
|
+
let { colors: F, typography: I } = M ?? {}, te = I?.titleClassName ?? "dial-h1-text", ne = I?.panelTitleClassName ?? "dial-body-semi-text", ae = I?.sectionTitleClassName ?? "dial-tiny-text", H = I?.bodyClassName ?? "dial-small-text", se = I?.helperClassName ?? "dial-tiny-text", ue = I?.instructionsHeadingClassName ?? "dial-small-semi-text", de = c({
|
|
614
614
|
"--pv-bg": F?.background,
|
|
615
615
|
"--pv-border": F?.border,
|
|
616
616
|
"--pv-heading-text": F?.headingText,
|
|
@@ -637,27 +637,27 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
637
637
|
let t = [];
|
|
638
638
|
return e && m && t.push({
|
|
639
639
|
key: "publish",
|
|
640
|
-
label:
|
|
640
|
+
label: j.publishLabel,
|
|
641
641
|
icon: Y(U),
|
|
642
642
|
onClick: m
|
|
643
643
|
}), e && h && t.push({
|
|
644
644
|
key: "edit",
|
|
645
|
-
label:
|
|
645
|
+
label: j.editLabel,
|
|
646
646
|
icon: Y(B),
|
|
647
647
|
onClick: h
|
|
648
648
|
}), g && t.push({
|
|
649
649
|
key: "share",
|
|
650
|
-
label:
|
|
650
|
+
label: j.shareLabel,
|
|
651
651
|
icon: Y(ce),
|
|
652
652
|
onClick: g
|
|
653
653
|
}), t.push({
|
|
654
654
|
key: "download",
|
|
655
|
-
label:
|
|
655
|
+
label: j.downloadLabel,
|
|
656
656
|
icon: Y(oe),
|
|
657
657
|
onClick: v
|
|
658
658
|
}), _ && t.push({
|
|
659
659
|
key: "delete",
|
|
660
|
-
label:
|
|
660
|
+
label: j.deleteLabel,
|
|
661
661
|
icon: Y(le),
|
|
662
662
|
danger: !0,
|
|
663
663
|
onClick: _
|
|
@@ -674,7 +674,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
674
674
|
"aria-hidden": !0,
|
|
675
675
|
stroke: x
|
|
676
676
|
}),
|
|
677
|
-
"aria-label":
|
|
677
|
+
"aria-label": j.moreActionsLabel
|
|
678
678
|
})
|
|
679
679
|
})
|
|
680
680
|
}), ve = () => {
|
|
@@ -682,42 +682,45 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
682
682
|
}, ye = () => t ? /* @__PURE__ */ X(ie, {}) : n ? /* @__PURE__ */ Z("div", {
|
|
683
683
|
className: "flex flex-col items-center gap-3",
|
|
684
684
|
children: [/* @__PURE__ */ X("p", {
|
|
685
|
-
|
|
685
|
+
"aria-hidden": !0,
|
|
686
686
|
className: d(H, $.body),
|
|
687
|
-
children:
|
|
687
|
+
children: j.errorLabel
|
|
688
688
|
}), /* @__PURE__ */ X(O, {
|
|
689
|
-
label:
|
|
689
|
+
label: j.retryLabel,
|
|
690
690
|
onClick: E
|
|
691
691
|
})]
|
|
692
692
|
}) : /* @__PURE__ */ Z("div", {
|
|
693
693
|
className: "flex flex-col items-center gap-3",
|
|
694
694
|
children: [/* @__PURE__ */ X("p", {
|
|
695
695
|
className: d(H, $.body),
|
|
696
|
-
children:
|
|
696
|
+
children: j.notFoundLabel
|
|
697
697
|
}), /* @__PURE__ */ X(O, {
|
|
698
|
-
label:
|
|
698
|
+
label: j.browseProjectsLabel,
|
|
699
699
|
onClick: D
|
|
700
700
|
})]
|
|
701
701
|
});
|
|
702
|
-
if (t || n || i || e == null) return /* @__PURE__ */
|
|
702
|
+
if (t || n || i || e == null) return /* @__PURE__ */ Z("div", {
|
|
703
703
|
style: de,
|
|
704
704
|
className: d("flex h-full w-full min-w-0 items-center justify-center p-4", $.container),
|
|
705
|
-
children:
|
|
705
|
+
children: [/* @__PURE__ */ X(N, {
|
|
706
|
+
visuallyHidden: !0,
|
|
707
|
+
children: !t && n && j.errorLabel
|
|
708
|
+
}), ye()]
|
|
706
709
|
});
|
|
707
|
-
let be = () => fe.length === 0 ? /* @__PURE__ */ X(a, { label:
|
|
710
|
+
let be = () => fe.length === 0 ? /* @__PURE__ */ X(a, { label: j.emptyContextLabel }) : /* @__PURE__ */ Z(me, { children: [
|
|
708
711
|
/* @__PURE__ */ X("div", {
|
|
709
712
|
role: "search",
|
|
710
713
|
children: /* @__PURE__ */ X(re, {
|
|
711
714
|
value: l,
|
|
712
715
|
onChange: (e) => u(e ?? ""),
|
|
713
|
-
placeholder:
|
|
714
|
-
clearLabel:
|
|
715
|
-
"aria-label":
|
|
716
|
+
placeholder: j.contextSearchPlaceholder,
|
|
717
|
+
clearLabel: j.clearSearchLabel,
|
|
718
|
+
"aria-label": j.contextSearchAriaLabel
|
|
716
719
|
})
|
|
717
720
|
}),
|
|
718
721
|
W.length === 0 ? /* @__PURE__ */ X("p", {
|
|
719
722
|
className: d(se, $.secondary),
|
|
720
|
-
children:
|
|
723
|
+
children: j.noContextMatchesLabel
|
|
721
724
|
}) : /* @__PURE__ */ X("ul", {
|
|
722
725
|
className: "m-0 flex min-w-0 list-none flex-wrap gap-2 p-0 pt-2",
|
|
723
726
|
children: W.map((e) => /* @__PURE__ */ X("li", {
|
|
@@ -727,14 +730,14 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
727
730
|
searchQuery: G,
|
|
728
731
|
onClick: y,
|
|
729
732
|
isSelected: e.name === C,
|
|
730
|
-
labels: { clickLabel:
|
|
733
|
+
labels: { clickLabel: j.openFileLabel(e.name) }
|
|
731
734
|
})
|
|
732
735
|
}, e.name))
|
|
733
736
|
}),
|
|
734
|
-
/* @__PURE__ */ X(
|
|
737
|
+
/* @__PURE__ */ X(N, {
|
|
735
738
|
visuallyHidden: !0,
|
|
736
|
-
as:
|
|
737
|
-
children: G === "" ? "" :
|
|
739
|
+
as: P.Span,
|
|
740
|
+
children: G === "" ? "" : j.contextResultCountLabel(W.length)
|
|
738
741
|
})
|
|
739
742
|
] }), xe = !T;
|
|
740
743
|
return /* @__PURE__ */ Z("div", {
|
|
@@ -750,7 +753,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
750
753
|
"aria-hidden": !0,
|
|
751
754
|
stroke: x
|
|
752
755
|
}),
|
|
753
|
-
"aria-label":
|
|
756
|
+
"aria-label": j.backLabel,
|
|
754
757
|
onClick: f
|
|
755
758
|
}),
|
|
756
759
|
/* @__PURE__ */ X("h1", {
|
|
@@ -758,7 +761,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
758
761
|
children: /* @__PURE__ */ X(w, { text: e.name })
|
|
759
762
|
}),
|
|
760
763
|
/* @__PURE__ */ X(O, {
|
|
761
|
-
label: o ?
|
|
764
|
+
label: o ? j.unpinLabel : j.pinLabel,
|
|
762
765
|
iconBefore: X(o ? rt : V, {
|
|
763
766
|
size: b.MD,
|
|
764
767
|
"aria-hidden": !0,
|
|
@@ -769,7 +772,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
769
772
|
className: "shrink-0"
|
|
770
773
|
}),
|
|
771
774
|
m && /* @__PURE__ */ X(L, {
|
|
772
|
-
label:
|
|
775
|
+
label: j.publishLabel,
|
|
773
776
|
iconBefore: /* @__PURE__ */ X(U, {
|
|
774
777
|
size: b.MD,
|
|
775
778
|
"aria-hidden": !0,
|
|
@@ -779,7 +782,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
779
782
|
className: "hidden shrink-0 desktop:inline-flex"
|
|
780
783
|
}),
|
|
781
784
|
h && /* @__PURE__ */ X(L, {
|
|
782
|
-
label:
|
|
785
|
+
label: j.editLabel,
|
|
783
786
|
iconBefore: /* @__PURE__ */ X(B, {
|
|
784
787
|
size: b.MD,
|
|
785
788
|
"aria-hidden": !0,
|
|
@@ -794,7 +797,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
794
797
|
}), /* @__PURE__ */ Z("div", {
|
|
795
798
|
className: d("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto", xe && "desktop:flex-row desktop:overflow-hidden", A == null && xe && "desktop:justify-end"),
|
|
796
799
|
children: [A != null && /* @__PURE__ */ X("section", {
|
|
797
|
-
"aria-label":
|
|
800
|
+
"aria-label": ee,
|
|
798
801
|
className: d("flex min-w-0 flex-1 flex-col px-4 py-6 desktop:px-8", xe && "desktop:overflow-y-auto"),
|
|
799
802
|
children: /* @__PURE__ */ X("div", {
|
|
800
803
|
className: "mx-auto flex w-full max-w-[748px] min-w-0 flex-col gap-5",
|
|
@@ -807,13 +810,13 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
807
810
|
/* @__PURE__ */ X("h2", {
|
|
808
811
|
id: pe,
|
|
809
812
|
className: d(ne, $.title),
|
|
810
|
-
children:
|
|
813
|
+
children: j.detailsLabel
|
|
811
814
|
}),
|
|
812
815
|
e.description !== "" && /* @__PURE__ */ Z("section", {
|
|
813
816
|
className: "flex min-w-0 flex-col gap-1",
|
|
814
817
|
children: [/* @__PURE__ */ X("h3", {
|
|
815
818
|
className: d(ae, $.secondary),
|
|
816
|
-
children:
|
|
819
|
+
children: j.descriptionLabel
|
|
817
820
|
}), /* @__PURE__ */ X("p", {
|
|
818
821
|
className: d("wrap-break-word whitespace-pre-line", H, $.body),
|
|
819
822
|
children: e.description
|
|
@@ -823,7 +826,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
823
826
|
className: "flex min-w-0 flex-col gap-1",
|
|
824
827
|
children: [/* @__PURE__ */ X("h3", {
|
|
825
828
|
className: d(ae, $.secondary),
|
|
826
|
-
children:
|
|
829
|
+
children: j.instructionsLabel
|
|
827
830
|
}), /* @__PURE__ */ X("div", {
|
|
828
831
|
className: d("min-w-0 wrap-break-word", H, $.body),
|
|
829
832
|
children: /* @__PURE__ */ X(r, {
|
|
@@ -836,7 +839,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
836
839
|
className: "flex min-w-0 flex-col gap-2",
|
|
837
840
|
children: [/* @__PURE__ */ X("h3", {
|
|
838
841
|
className: d(ae, $.secondary),
|
|
839
|
-
children:
|
|
842
|
+
children: j.contextLabel
|
|
840
843
|
}), be()]
|
|
841
844
|
})
|
|
842
845
|
]
|
|
@@ -919,62 +922,69 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
919
922
|
"aria-label": C ? m.title : void 0,
|
|
920
923
|
className: "flex min-w-0 flex-col gap-2 pt-3",
|
|
921
924
|
style: x,
|
|
922
|
-
children: [
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
925
|
+
children: [
|
|
926
|
+
!C && /* @__PURE__ */ X("h2", {
|
|
927
|
+
id: _,
|
|
928
|
+
className: d("m-0", v),
|
|
929
|
+
children: m.title
|
|
930
|
+
}),
|
|
931
|
+
/* @__PURE__ */ X(N, {
|
|
932
|
+
visuallyHidden: !0,
|
|
933
|
+
children: t ? m.loadingLabel : n ? m.errorLabel : C ? /* @__PURE__ */ Z(me, { children: [
|
|
934
|
+
/* @__PURE__ */ X("span", { children: m.emptyTitle }),
|
|
935
|
+
" ",
|
|
936
|
+
/* @__PURE__ */ X("span", { children: m.emptyDescription })
|
|
937
|
+
] }) : null
|
|
938
|
+
}),
|
|
939
|
+
t ? /* @__PURE__ */ X("div", {
|
|
940
|
+
className: "flex justify-center py-6",
|
|
941
|
+
children: /* @__PURE__ */ X("span", {
|
|
942
|
+
"aria-hidden": !0,
|
|
943
|
+
children: /* @__PURE__ */ X(ie, {})
|
|
944
|
+
})
|
|
945
|
+
}) : n ? /* @__PURE__ */ Z("div", {
|
|
946
|
+
className: "flex flex-col items-center gap-3 py-6 text-center",
|
|
947
|
+
children: [/* @__PURE__ */ X("p", {
|
|
948
|
+
"aria-hidden": !0,
|
|
949
|
+
className: d("m-0", S),
|
|
950
|
+
children: m.errorLabel
|
|
951
|
+
}), /* @__PURE__ */ X(O, {
|
|
952
|
+
label: m.retryLabel,
|
|
953
|
+
onClick: r
|
|
954
|
+
})]
|
|
955
|
+
}) : C ? /* @__PURE__ */ X("div", {
|
|
930
956
|
"aria-hidden": !0,
|
|
931
|
-
children: /* @__PURE__ */ X(
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
})
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
})
|
|
952
|
-
|
|
953
|
-
className: "m-0 flex min-w-0 list-none flex-col gap-2 p-0",
|
|
954
|
-
children: e.map((e) => /* @__PURE__ */ X(st, {
|
|
955
|
-
item: e,
|
|
956
|
-
labels: m,
|
|
957
|
-
rowTitleClassName: y,
|
|
958
|
-
unreadRowTitleClassName: b,
|
|
959
|
-
onOpen: u,
|
|
960
|
-
onRename: f,
|
|
961
|
-
onDelete: p
|
|
962
|
-
}, e.id))
|
|
963
|
-
}), i && s && /* @__PURE__ */ X(N, {
|
|
964
|
-
className: "self-start",
|
|
965
|
-
label: m.loadMoreLabel ?? "See more",
|
|
966
|
-
disabled: o,
|
|
967
|
-
onClick: s
|
|
968
|
-
})] })]
|
|
957
|
+
children: /* @__PURE__ */ X(a, {
|
|
958
|
+
label: m.emptyTitle,
|
|
959
|
+
description: m.emptyDescription
|
|
960
|
+
})
|
|
961
|
+
}) : /* @__PURE__ */ Z(me, { children: [/* @__PURE__ */ X("ul", {
|
|
962
|
+
className: "m-0 flex min-w-0 list-none flex-col gap-2 p-0",
|
|
963
|
+
children: e.map((e) => /* @__PURE__ */ X(st, {
|
|
964
|
+
item: e,
|
|
965
|
+
labels: m,
|
|
966
|
+
rowTitleClassName: y,
|
|
967
|
+
unreadRowTitleClassName: b,
|
|
968
|
+
onOpen: u,
|
|
969
|
+
onRename: f,
|
|
970
|
+
onDelete: p
|
|
971
|
+
}, e.id))
|
|
972
|
+
}), i && s && /* @__PURE__ */ X(M, {
|
|
973
|
+
className: "self-start",
|
|
974
|
+
label: m.loadMoreLabel ?? "See more",
|
|
975
|
+
disabled: o,
|
|
976
|
+
onClick: s
|
|
977
|
+
})] })
|
|
978
|
+
]
|
|
969
979
|
});
|
|
970
980
|
}), lt = W(({ composer: t, outputs: n, hasOutputs: r = !1, items: i, isLoading: a = !1, hasError: o = !1, onRetry: s, hasMore: c, isLoadingMore: l, onLoadMore: u, onOpen: d, onRename: f, onDelete: p, labels: m, listTypography: h, listColors: _ }) => {
|
|
971
|
-
let y = K(), b = J(null), [x, S] = Y(null), [C, w] = Y(""), [T, E] = Y(), [D, O] = Y(!1), [k, A] = Y(null), [
|
|
972
|
-
|
|
981
|
+
let y = K(), b = J(null), [x, S] = Y(null), [C, w] = Y(""), [T, E] = Y(), [D, O] = Y(!1), [k, A] = Y(null), [j, M] = Y(!1), N = J(null), P = G(() => {
|
|
982
|
+
N.current = document.activeElement;
|
|
973
983
|
}, []), F = G(() => {
|
|
974
|
-
let e =
|
|
975
|
-
|
|
984
|
+
let e = N.current;
|
|
985
|
+
N.current = null, e?.isConnected && window.setTimeout(() => e.focus(), 0);
|
|
976
986
|
}, []), I = G((e) => {
|
|
977
|
-
|
|
987
|
+
N.current = null, window.setTimeout(() => {
|
|
978
988
|
let t = b.current;
|
|
979
989
|
if (!t) return;
|
|
980
990
|
let n = t.querySelectorAll("li > button"), r = n[Math.min(e, n.length - 1)] ?? t.querySelector("h2, section");
|
|
@@ -983,26 +993,26 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
983
993
|
}, []), L = G((e) => i.find((t) => t.id === e) ?? null, [i]);
|
|
984
994
|
pe(() => {
|
|
985
995
|
let e = (e) => e != null && i.some((t) => t.id === e.id);
|
|
986
|
-
x && !D && !e(x) && (S(null), I(0)), k && !
|
|
996
|
+
x && !D && !e(x) && (S(null), I(0)), k && !j && !e(k) && (A(null), I(0));
|
|
987
997
|
}, [
|
|
988
998
|
k,
|
|
989
999
|
I,
|
|
990
|
-
|
|
1000
|
+
j,
|
|
991
1001
|
D,
|
|
992
1002
|
i,
|
|
993
1003
|
x
|
|
994
1004
|
]);
|
|
995
1005
|
let re = G((e) => {
|
|
996
|
-
|
|
1006
|
+
P();
|
|
997
1007
|
let t = L(e);
|
|
998
1008
|
S(t), w(t?.title ?? ""), E(void 0);
|
|
999
|
-
}, [L,
|
|
1000
|
-
|
|
1001
|
-
}, [L,
|
|
1009
|
+
}, [L, P]), ie = G((e) => {
|
|
1010
|
+
P(), A(L(e));
|
|
1011
|
+
}, [L, P]), R = G(() => {
|
|
1002
1012
|
D || (S(null), F());
|
|
1003
1013
|
}, [D, F]), ae = G(() => {
|
|
1004
|
-
|
|
1005
|
-
}, [
|
|
1014
|
+
j || (A(null), F());
|
|
1015
|
+
}, [j, F]), z = G(async () => {
|
|
1006
1016
|
if (!x || !f || D) return;
|
|
1007
1017
|
let e = C.trim();
|
|
1008
1018
|
if (!e) E(m.renameEmptyError);
|
|
@@ -1026,11 +1036,11 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
1026
1036
|
}, [z]), B = G(async () => {
|
|
1027
1037
|
if (!k || !p) return;
|
|
1028
1038
|
let e = i.findIndex((e) => e.id === k.id);
|
|
1029
|
-
|
|
1039
|
+
M(!0);
|
|
1030
1040
|
try {
|
|
1031
1041
|
await p(k.id), A(null), I(Math.max(e, 0));
|
|
1032
1042
|
} catch {} finally {
|
|
1033
|
-
|
|
1043
|
+
M(!1);
|
|
1034
1044
|
}
|
|
1035
1045
|
}, [
|
|
1036
1046
|
k,
|
|
@@ -1088,7 +1098,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
1088
1098
|
onClose: R,
|
|
1089
1099
|
children: /* @__PURE__ */ X("div", {
|
|
1090
1100
|
className: "px-6 py-4",
|
|
1091
|
-
children: /* @__PURE__ */ X(
|
|
1101
|
+
children: /* @__PURE__ */ X(ee, {
|
|
1092
1102
|
id: y,
|
|
1093
1103
|
value: C,
|
|
1094
1104
|
labelProps: { label: m.renameInputLabel },
|
|
@@ -1107,7 +1117,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
1107
1117
|
names: [k.title],
|
|
1108
1118
|
message: m.deleteDescription,
|
|
1109
1119
|
labels: m.deleteDialog,
|
|
1110
|
-
isLoading:
|
|
1120
|
+
isLoading: j,
|
|
1111
1121
|
onConfirm: () => {
|
|
1112
1122
|
B();
|
|
1113
1123
|
},
|
|
@@ -1133,7 +1143,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
1133
1143
|
pe(() => {
|
|
1134
1144
|
!r && p.current && (p.current = !1, f.current?.focus());
|
|
1135
1145
|
}, [r]);
|
|
1136
|
-
let T = r || e.length > 0, E = e.length > a, D = m || !E ? e : e.slice(0, a), k = o?.openOutputLabel ?? ((e) => `Preview ${e}`), A = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`,
|
|
1146
|
+
let T = r || e.length > 0, E = e.length > a, D = m || !E ? e : e.slice(0, a), k = o?.openOutputLabel ?? ((e) => `Preview ${e}`), A = o?.seeAllLabel?.(e.length) ?? `See all (${e.length})`, ee = o?.showLessLabel ?? "Show less";
|
|
1137
1147
|
return /* @__PURE__ */ Z("div", {
|
|
1138
1148
|
className: "contents",
|
|
1139
1149
|
style: S,
|
|
@@ -1148,8 +1158,8 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
1148
1158
|
tabIndex: -1,
|
|
1149
1159
|
className: d("m-0", ut.title, v),
|
|
1150
1160
|
children: b
|
|
1151
|
-
}), !r && E && /* @__PURE__ */ X(
|
|
1152
|
-
label: m ?
|
|
1161
|
+
}), !r && E && /* @__PURE__ */ X(M, {
|
|
1162
|
+
label: m ? ee : A,
|
|
1153
1163
|
"aria-expanded": m,
|
|
1154
1164
|
"aria-controls": u,
|
|
1155
1165
|
onClick: C
|
|
@@ -1175,7 +1185,7 @@ var ye = /* @__PURE__ */ function(e) {
|
|
|
1175
1185
|
})
|
|
1176
1186
|
}, e.name))
|
|
1177
1187
|
})]
|
|
1178
|
-
}), /* @__PURE__ */ X(
|
|
1188
|
+
}), /* @__PURE__ */ X(N, {
|
|
1179
1189
|
visuallyHidden: !0,
|
|
1180
1190
|
children: r ? x : ""
|
|
1181
1191
|
})]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-projects",
|
|
3
3
|
"description": "Presentational Projects page shell, New and Edit project form, and project view — searchable, sortable grid of the projects available to a user",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.317",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@epam/ai-dial-attachment-input": "1.3.0-dev.
|
|
21
|
-
"@epam/ai-dial-builder-form": "1.3.0-dev.
|
|
20
|
+
"@epam/ai-dial-attachment-input": "1.3.0-dev.317",
|
|
21
|
+
"@epam/ai-dial-builder-form": "1.3.0-dev.317",
|
|
22
22
|
"@tabler/icons-react": "^3.50.0",
|
|
23
23
|
"@uiw/react-markdown-preview": "^5.2.1",
|
|
24
24
|
"@uiw/react-md-editor": "^4.2.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
28
|
-
"@epam/ai-dial-ui-kit": "^0.16.0-dev.
|
|
27
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.317",
|
|
28
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.72",
|
|
29
29
|
"react": "^19.2.8"
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|