@epam/ai-dial-chat-shared 1.4.0-dev.180 → 1.4.0-dev.185

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":"FileManagerDestinationPanel.d.ts","sourceRoot":"","sources":["../../../src/file-manager/FileManagerDestinationPanel/FileManagerDestinationPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EAEd,MAAM,kCAAkC,CAAC;AAQ1C,OAAO,EAAE,EAAE,EAA6C,MAAM,OAAO,CAAC;AAStE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,WAAW,CAAC;AAWnE,oDAAoD;AACpD,MAAM,WAAW,gCAAgC;IAC/C,yCAAyC;IACzC,OAAO,EAAE,sBAAsB,CAAC;IAChC,uFAAuF;IACvF,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,uDAAuD;IACvD,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,qDAAqD;IACrD,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,mEAAmE;IACnE,uBAAuB,EAAE,qBAAqB,CAAC,yBAAyB,CAAC,CAAC;IAC1E,oEAAoE;IACpE,cAAc,EAAE,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IACxD,yBAAyB;IACzB,MAAM,EAAE,iCAAiC,CAAC;IAC1C,gGAAgG;IAChG,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,6GAA6G;AAC7G,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAC1C,gCAAgC,CAkRjC,CAAC"}
1
+ {"version":3,"file":"FileManagerDestinationPanel.d.ts","sourceRoot":"","sources":["../../../src/file-manager/FileManagerDestinationPanel/FileManagerDestinationPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EAEd,MAAM,kCAAkC,CAAC;AAQ1C,OAAO,EAAE,EAAE,EAA6C,MAAM,OAAO,CAAC;AAStE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,WAAW,CAAC;AAUnE,oDAAoD;AACpD,MAAM,WAAW,gCAAgC;IAC/C,yCAAyC;IACzC,OAAO,EAAE,sBAAsB,CAAC;IAChC,uFAAuF;IACvF,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,uDAAuD;IACvD,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,qDAAqD;IACrD,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,mEAAmE;IACnE,uBAAuB,EAAE,qBAAqB,CAAC,yBAAyB,CAAC,CAAC;IAC1E,oEAAoE;IACpE,cAAc,EAAE,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IACxD,yBAAyB;IACzB,MAAM,EAAE,iCAAiC,CAAC;IAC1C,gGAAgG;IAChG,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,6GAA6G;AAC7G,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAC1C,gCAAgC,CAoQjC,CAAC"}
@@ -1,141 +1,131 @@
1
- import { isHiddenPath as e } from "../path.js";
2
- import { findFolder as t, findSectionRoot as n, isSameOrInsidePath as r, toDestinationFolderNodes as i, toDestinationPath as a, toPathSegments as o } from "../destination-folders.js";
3
- import { DIAL_ICON_SIZE as s, DIAL_KIT_ICON_STROKE as c, DialItemType as l, FileName as u } from "@epam/ai-dial-ui-kit";
4
- import { useCallback as d, useEffect as f, useMemo as p, useState as m } from "react";
5
- import { jsx as h } from "react/jsx-runtime";
6
- import { IconFolderShare as ee } from "@tabler/icons-react";
7
- import { DestinationFolderMode as te, DialFileNodeType as g, FolderDestinationLayout as _, FolderDestinationPanel as v, fromFolderPathKey as y, toFolderPathKey as b } from "@epam/ai-dial-react-file-manager";
1
+ import { findFolder as e, findSectionRoot as t, isSameOrInsidePath as n, toDestinationFolderNodes as r, toDestinationPath as i, toPathSegments as a } from "../destination-folders.js";
2
+ import { DIAL_ICON_SIZE as o, DIAL_KIT_ICON_STROKE as s, DialItemType as c, FileName as ee } from "@epam/ai-dial-ui-kit";
3
+ import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
4
+ import { jsx as p } from "react/jsx-runtime";
5
+ import { IconFolderShare as m } from "@tabler/icons-react";
6
+ import { DestinationFolderMode as te, DialFileNodeType as h, FolderDestinationLayout as g, FolderDestinationPanel as _, fromFolderPathKey as ne, toFolderPathKey as v } from "@epam/ai-dial-react-file-manager";
8
7
  //#region src/file-manager/FileManagerDestinationPanel/FileManagerDestinationPanel.tsx
9
- var x = "files", S = ".dial_folder", ne = "Failed to create the folder. Please try again.", C = ({ request: C, roots: w, loadedPaths: T, loadingPaths: E, onFolderPopupPathChange: D, onCreateFolder: O, labels: k, onFinish: A }) => {
10
- let j = n(w, C.sourceFolder), M = j?.path ?? "", N = o(M).length, P = C.mode === te.Move, F = p(() => C.items.filter((e) => e.nodeType === g.FOLDER).map((e) => e.path), [C.items]), I = d(({ path: e }) => {
11
- if (!P) return;
12
- let t = a(M, e);
13
- if (F.some((e) => r(t, e))) return k.movedIntoItselfTooltip;
14
- if (o(t).join("/") === o(C.sourceFolder).join("/")) return k.sourceFolderTooltip;
8
+ var y = "files", b = ".dial_folder", x = "Failed to create the folder. Please try again.", S = ({ request: S, roots: re, loadedPaths: C, loadingPaths: w, onFolderPopupPathChange: T, onCreateFolder: E, labels: D, onFinish: O }) => {
9
+ let k = t(re, S.sourceFolder), A = k?.path ?? "", j = a(A).length, M = S.mode === te.Move, N = d(() => S.items.filter((e) => e.nodeType === h.FOLDER).map((e) => e.path), [S.items]), P = l(({ path: e }) => {
10
+ if (!M) return;
11
+ let t = i(A, e);
12
+ if (N.some((e) => n(t, e))) return D.movedIntoItselfTooltip;
13
+ if (a(t).join("/") === a(S.sourceFolder).join("/")) return D.sourceFolderTooltip;
15
14
  }, [
16
- P,
17
15
  M,
18
- F,
19
- C.sourceFolder,
20
- k
21
- ]), re = o(C.sourceFolder).slice(N), [L, R] = m(() => {
22
- let t = {
23
- rootKey: x,
24
- path: re
25
- };
26
- return !P || I(t) == null ? t : [{
27
- rootKey: x,
28
- path: []
29
- }, ...(j?.items ?? []).filter((t) => t.nodeType === g.FOLDER && !e(t.name)).map((e) => ({
30
- rootKey: x,
31
- path: o(e.path).slice(N)
32
- }))].find((e) => I(e) == null) ?? t;
33
- }), [z, B] = m(() => /* @__PURE__ */ new Set()), V = d((e) => D(a(M, e)), [D, M]), H = d((e) => {
34
- let t = a(e, []);
35
- return T.has(t) || T.has(`${t}/`);
36
- }, [T]);
37
- f(() => {
38
- V(L.path);
16
+ A,
17
+ N,
18
+ S.sourceFolder,
19
+ D
20
+ ]), ie = a(S.sourceFolder).slice(j), [F, I] = f({
21
+ rootKey: y,
22
+ path: ie
23
+ }), [L, R] = f(() => /* @__PURE__ */ new Set()), z = l((e) => T(i(A, e)), [T, A]), B = l((e) => {
24
+ let t = i(e, []);
25
+ return C.has(t) || C.has(`${t}/`);
26
+ }, [C]);
27
+ u(() => {
28
+ z(F.path);
39
29
  }, []);
40
- let U = p(() => i(j?.items, N, H), [
30
+ let V = d(() => r(k?.items, j, B), [
31
+ k,
41
32
  j,
42
- N,
43
- H
44
- ]), W = p(() => new Set([...E].filter((e) => r(e, M)).map((e) => b(o(e).slice(N)))), [
45
- E,
46
- M,
47
- N
48
- ]), G = d((e) => {
33
+ B
34
+ ]), H = d(() => new Set([...w].filter((e) => n(e, A)).map((e) => v(a(e).slice(j)))), [
35
+ w,
36
+ A,
37
+ j
38
+ ]), U = l((e) => {
49
39
  e.forEach((e) => {
50
- z.has(e) || V(y(e));
51
- }), B(e);
52
- }, [z, V]), K = p(() => [{
53
- key: x,
54
- label: j?.name ?? "",
55
- items: U,
56
- expandedPaths: z,
57
- onExpandedPathsChange: G,
58
- loadingPaths: W
40
+ L.has(e) || z(ne(e));
41
+ }), R(e);
42
+ }, [L, z]), W = d(() => [{
43
+ key: y,
44
+ label: k?.name ?? "",
45
+ items: V,
46
+ expandedPaths: L,
47
+ onExpandedPathsChange: U,
48
+ loadingPaths: H
59
49
  }], [
60
- j,
50
+ k,
51
+ V,
52
+ L,
61
53
  U,
62
- z,
63
- G,
64
- W
65
- ]), [q, J] = m(), Y = d(() => {
66
- J(k.createFolderFailedMessage ?? ne);
67
- }, [k.createFolderFailedMessage]), ie = d(async (e, t, n) => {
68
- J(void 0);
69
- let r = `${a(M, t)}/${n}`;
70
- if (!await O({
71
- fileContent: new File([], S, { type: "text/plain" }),
72
- name: S
73
- }, r, `${r}/${S}`)) throw Error(`Folder "${n}" was not created`);
74
- }, [O, M]), ae = d((e) => {
75
- J(void 0), R(e), V(e.path);
76
- }, [V]);
77
- if (!j) return null;
78
- let X = a(M, L.path), oe = W.has(b(L.path)) || !H(X), Z = C.items.length, [Q] = C.items, $ = Z === 1 && Q.nodeType === g.FOLDER, se = P ? k.getMoveTitle(Z, $) : k.getCopyTitle(Z, $), ce = /* @__PURE__ */ h("ul", {
54
+ H
55
+ ]), [G, K] = f(), q = l(() => {
56
+ K(D.createFolderFailedMessage ?? x);
57
+ }, [D.createFolderFailedMessage]), J = l(async (e, t, n) => {
58
+ K(void 0);
59
+ let r = `${i(A, t)}/${n}`;
60
+ if (!await E({
61
+ fileContent: new File([], b, { type: "text/plain" }),
62
+ name: b
63
+ }, r, `${r}/${b}`)) throw Error(`Folder "${n}" was not created`);
64
+ }, [E, A]), ae = l((e) => {
65
+ K(void 0), I(e), z(e.path);
66
+ }, [z]);
67
+ if (!k) return null;
68
+ let Y = i(A, F.path), X = H.has(v(F.path)) || !B(Y), Z = S.items.length, [Q] = S.items, $ = Z === 1 && Q.nodeType === h.FOLDER, oe = M ? D.getMoveTitle(Z, $) : D.getCopyTitle(Z, $), se = /* @__PURE__ */ p("ul", {
79
69
  className: "flex max-h-60 min-w-0 flex-col gap-1 overflow-y-auto",
80
- children: C.items.map((e) => /* @__PURE__ */ h("li", {
70
+ children: S.items.map((e) => /* @__PURE__ */ p("li", {
81
71
  className: "min-w-0",
82
- children: /* @__PURE__ */ h(u, {
72
+ children: /* @__PURE__ */ p(ee, {
83
73
  name: e.name,
84
- type: e.nodeType === g.FOLDER ? l.Folder : l.File
74
+ type: e.nodeType === h.FOLDER ? c.Folder : c.File
85
75
  })
86
76
  }, e.path))
87
77
  });
88
- return /* @__PURE__ */ h(v, {
78
+ return /* @__PURE__ */ p(_, {
89
79
  isOpen: !0,
90
80
  onClose: () => {
91
- C.cancel(), A();
81
+ S.cancel(), O();
92
82
  },
93
83
  item: {
94
84
  title: Q.name,
95
- summary: ce
85
+ summary: se
96
86
  },
97
- roots: K,
98
- destination: L,
99
- layout: _.Inline,
87
+ roots: W,
88
+ destination: F,
89
+ layout: g.Inline,
100
90
  onDestinationChange: ae,
101
- onCreateFolder: ie,
102
- getDisabledReason: I,
103
- onCreateFolderError: Y,
104
- submitError: q,
91
+ onCreateFolder: J,
92
+ getDisabledReason: P,
93
+ onCreateFolderError: q,
94
+ submitError: G,
105
95
  labels: {
106
- title: se,
107
- closeAriaLabel: k.closeAriaLabel,
108
- cancelLabel: k.cancelLabel
96
+ title: oe,
97
+ closeAriaLabel: D.closeAriaLabel,
98
+ cancelLabel: D.cancelLabel
109
99
  },
110
100
  panelLabels: {
111
- destinationHeading: P ? k.moveHeading : k.copyHeading,
112
- createFolderLabel: k.addFolderLabel,
113
- searchPlaceholder: k.searchPlaceholder,
114
- clearSearchAriaLabel: k.clearSearchAriaLabel,
115
- folderEmptyStateLabel: k.folderEmptyStateLabel,
116
- cancelCreatingFolderLabel: k.cancelCreatingFolderLabel,
117
- addSiblingFolderLabel: k.addSiblingFolderLabel,
118
- addChildFolderLabel: k.addChildFolderLabel,
119
- createFolderEmptyNameError: k.createFolderEmptyNameError,
120
- createFolderInvalidNameError: k.createFolderInvalidNameError,
121
- createFolderDuplicateNameError: k.createFolderDuplicateNameError,
122
- createFolderSameAsParentNameError: k.createFolderSameAsParentNameError,
123
- createFolderHiddenNameWarning: k.createFolderHiddenNameWarning,
124
- retryLabel: k.retryLabel
101
+ destinationHeading: M ? D.moveHeading : D.copyHeading,
102
+ createFolderLabel: D.addFolderLabel,
103
+ searchPlaceholder: D.searchPlaceholder,
104
+ clearSearchAriaLabel: D.clearSearchAriaLabel,
105
+ folderEmptyStateLabel: D.folderEmptyStateLabel,
106
+ cancelCreatingFolderLabel: D.cancelCreatingFolderLabel,
107
+ addSiblingFolderLabel: D.addSiblingFolderLabel,
108
+ addChildFolderLabel: D.addChildFolderLabel,
109
+ createFolderEmptyNameError: D.createFolderEmptyNameError,
110
+ createFolderInvalidNameError: D.createFolderInvalidNameError,
111
+ createFolderDuplicateNameError: D.createFolderDuplicateNameError,
112
+ createFolderSameAsParentNameError: D.createFolderSameAsParentNameError,
113
+ createFolderHiddenNameWarning: D.createFolderHiddenNameWarning,
114
+ retryLabel: D.retryLabel
125
115
  },
126
116
  action: {
127
- label: P ? k.moveButtonLabel : k.copyButtonLabel,
128
- icon: /* @__PURE__ */ h(ee, {
129
- size: s.SM,
130
- stroke: c,
117
+ label: M ? D.moveButtonLabel : D.copyButtonLabel,
118
+ icon: /* @__PURE__ */ p(m, {
119
+ size: o.SM,
120
+ stroke: s,
131
121
  "aria-hidden": !0
132
122
  }),
133
- isDisabled: oe || I(L) != null,
123
+ isDisabled: X || P(F) != null,
134
124
  onClick: () => {
135
- C.confirm(X, t(j, X)?.items), A();
125
+ S.confirm(Y, e(k, Y)?.items), O();
136
126
  }
137
127
  }
138
128
  });
139
129
  };
140
130
  //#endregion
141
- export { C as FileManagerDestinationPanel };
131
+ export { S as FileManagerDestinationPanel };
package/index.js CHANGED
@@ -16,84 +16,84 @@ import { ENTITY_DESCRIPTION_MAX_LENGTH as V, ENTITY_INSTRUCTIONS_MAX_LENGTH as H
16
16
  import { RESOURCE_VERSION_PATTERN as K, STORED_RESOURCE_VERSION_PATTERN as q } from "./utils/resource-version.js";
17
17
  import { mergeClasses as J } from "./utils/merge-class.js";
18
18
  import { buildCssVars as Y } from "./utils/build-css-vars.js";
19
- import { canAccessAt as X, canApprovePublicationsAt as Z, canReadAt as Q, canRequestPublicationAt as $, canSaveToFolderAt as ee, canWriteAt as te, canWriteIntoOrgUnitAt as ne, findOwningOrgUnit as re, normalizeOrgUnitFolder as ie } from "./utils/org-unit.js";
20
- import { isStatusMessage as ae } from "./utils/message.js";
21
- import { messageAttachmentToDisplayAttachment as oe, messageAttachmentsToDisplayAttachments as se } from "./utils/message-attachment-to-display.js";
22
- import { isAudioTranscriptionSupported as ce } from "./utils/is-audio-transcription-supported.js";
23
- import { copyToClipboard as le } from "./utils/copy-to-clipboard.js";
24
- import { copyMarkdownAsRichText as ue, markdownToRichTextHtml as de } from "./utils/markdown-rich-text.js";
25
- import { makeOutsideInert as fe } from "./utils/dom.js";
26
- import { formatLastUsed as pe } from "./utils/format-last-used.js";
27
- import { formatFileSize as me } from "./utils/format-file-size.js";
28
- import { formatCost as he, formatPrice as ge, formatUnitPrice as _e } from "./utils/format-price.js";
29
- import { base64ToBlob as ve, downloadTextFile as ye, ensureDownloadFilename as be, getFileExtensionForLanguage as xe, triggerAnchorDownload as Se, triggerBlobDownload as Ce, tryBase64ToBytes as we } from "./utils/file-download.js";
30
- import { isSyntaxHighlightingAllowed as Te } from "./utils/syntax-highlighting.js";
31
- import { ENTITY_TYPE_BG_COLOR as Ee, ENTITY_TYPE_COLOR as De } from "./constants/entity-colors.js";
32
- import { PROMPT_PARAM_DEFAULT_SEPARATOR as Oe, PROMPT_PARAM_PATTERN as ke, PROMPT_VARIABLE_CLASS_NAME as Ae, buildPromptParamDefaults as je, extractPromptParams as Me, rehypePromptVariables as Ne, resolvePromptParams as Pe } from "./utils/prompt-variables.js";
33
- import { generateUUID as Fe } from "./utils/generate-uuid.js";
34
- import { BASE_LG_ICON_PROPS as Ie, BASE_MD_ICON_PROPS as Le } from "./constants/icon.js";
35
- import { HIDDEN_FILE as Re, PUBLIC_BUCKET as ze } from "./constants/dial.js";
36
- import { TAG_INPUT_TAG_CLASS_NAME as Be } from "./constants/tag-input.js";
37
- import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as Ve, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as He, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as Ue, RESIZABLE_TEXTAREA_CLASS_NAME as We } from "./constants/resizable-fields.js";
38
- import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as Ge } from "./constants/markdown-editor.js";
39
- import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as Ke, SELECT_LIST_MAX_HEIGHT_PX as qe } from "./constants/select-list.js";
40
- import { DESKTOP_BREAKPOINT_PX as Je, DESKTOP_MEDIA_QUERY as Ye, MOBILE_MAX_WIDTH_PX as Xe, MOBILE_MEDIA_QUERY as Ze, PHONE_MEDIA_QUERY as Qe, TABLET_BREAKPOINT_PX as $e, TABLET_MEDIA_QUERY as et } from "./constants/breakpoint.js";
41
- import { InitialsAvatar as tt } from "./components/InitialsAvatar/InitialsAvatar.js";
42
- import { DeploymentIcon as nt } from "./components/DeploymentIcon/DeploymentIcon.js";
43
- import { CopyButton as rt, CopyIconButton as it } from "./components/CopyButton/CopyButton.js";
44
- import { extractInitials as at } from "./utils/initials.js";
45
- import { pickAvatarColor as ot } from "./utils/avatar-color.js";
46
- import { useIsPhone as st } from "./hooks/useIsPhone.js";
47
- import { ActionMenu as ct } from "./components/ActionMenu/ActionMenu.js";
48
- import { PanelEmptyState as lt } from "./components/PanelEmptyState/PanelEmptyState.js";
49
- import { NewVersionAlert as ut } from "./components/NewVersionAlert/NewVersionAlert.js";
50
- import { NotificationStack as dt } from "./components/NotificationStack/NotificationStack.js";
51
- import { ItemHeader as ft } from "./components/ItemHeader/ItemHeader.js";
52
- import { EntityTypeLabel as pt } from "./components/EntityTypeLabel/EntityTypeLabel.js";
53
- import { FeaturedChip as mt } from "./components/FeaturedChip/FeaturedChip.js";
54
- import { EntityHeader as ht } from "./components/EntityHeader/EntityHeader.js";
55
- import { ResourceSummary as gt } from "./components/ResourceSummary/ResourceSummary.js";
56
- import { ConfirmationIdentityCard as _t } from "./components/ConfirmationIdentityCard/ConfirmationIdentityCard.js";
57
- import { ConfirmationIdentityRow as vt } from "./components/ConfirmationIdentityRow/ConfirmationIdentityRow.js";
58
- import { ConfirmationView as yt } from "./components/ConfirmationView/ConfirmationView.js";
59
- import { ConfirmationFooter as bt } from "./components/ConfirmationView/ConfirmationFooter.js";
60
- import { ConfirmationDialog as xt } from "./components/ConfirmationDialog/ConfirmationDialog.js";
61
- import { DELETE_CONFIRMATION_MAX_LISTED_NAMES as St, DeleteConfirmationView as Ct } from "./components/DeleteConfirmationView/DeleteConfirmationView.js";
62
- import { DeleteConfirmationDialog as wt } from "./components/DeleteConfirmationDialog/DeleteConfirmationDialog.js";
63
- import { DeleteConfirmationDrawer as Tt } from "./components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.js";
64
- import { TableHeader as Et } from "./components/MarkdownRenderer/Table/TableHeader.js";
65
- import { TextRefinementState as Dt, useTextRefinement as Ot } from "./hooks/useTextRefinement.js";
66
- import { TextRefinementField as kt } from "./components/TextRefinementField/TextRefinementField.js";
67
- import { CHAT_SHARED_CLASS as At } from "./constants/public-class-names.js";
68
- import { useCodeCopy as jt } from "./hooks/useCodeCopy.js";
69
- import { restrainedSyntaxTheme as Mt } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
70
- import { MarkdownCodeBlock as Nt } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
71
- import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as Pt, MARKDOWN_TABLE_CSV_MIME_TYPE as Ft, MarkdownTableCopyFormat as It, serializeMarkdownTableRows as Lt } from "./components/MarkdownRenderer/Table/table-serialization.js";
72
- import { MarkdownTable as Rt } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
73
- import { MarkdownRenderer as zt, defaultMarkdownComponents as Bt } from "./components/MarkdownRenderer/MarkdownRenderer.js";
74
- import { COMPACT_MARKDOWN_CLASS_NAMES as Vt, DEFAULT_MARKDOWN_CLASS_NAMES as Ht } from "./components/MarkdownRenderer/markdown-class-names.js";
75
- import { PlainTextRenderer as Ut } from "./components/MarkdownRenderer/PlainTextRenderer.js";
76
- import { MDMessageViewer as Wt } from "./components/MarkdownRenderer/MDMessageViewer.js";
77
- import { MarkdownWithPlaceholders as Gt } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
78
- import { buildInlineSegmentSource as Kt, createInlineSegmentComponents as qt, createRehypeInlineSegments as Jt } from "./utils/inline-segments.js";
79
- import { useCollapsedText as Yt } from "./hooks/useCollapsedText.js";
80
- import { useAvailableHeightCap as Xt } from "./hooks/useAvailableHeightCap.js";
81
- import { useControlErrorAssociation as Zt } from "./hooks/useControlErrorAssociation.js";
82
- import { useHasBeenTrue as Qt } from "./hooks/useHasBeenTrue.js";
83
- import { useIsMobile as $t } from "./hooks/useIsMobile.js";
84
- import { useIsTablet as en } from "./hooks/useIsTablet.js";
85
- import { useIsTextClipped as tn } from "./hooks/useIsTextClipped.js";
86
- import { useIsVerticallyClamped as nn } from "./hooks/useIsVerticallyClamped.js";
87
- import { useUnsavedChangesGuard as rn } from "./hooks/useUnsavedChangesGuard.js";
88
- import { useUnsavedChanges as an } from "./components/UnsavedChangesProvider/unsaved-changes-context.js";
89
- import { useUnsavedChangesLeaveGuard as on } from "./hooks/useUnsavedChangesLeaveGuard.js";
90
- import { useUnsavedChangesLeaveConfirmation as sn } from "./hooks/useUnsavedChangesLeaveConfirmation.js";
91
- import { UnsavedChangesProvider as cn } from "./components/UnsavedChangesProvider/UnsavedChangesProvider.js";
92
- import { DialFileManagerActionProfile as ln, DialFileManagerVariant as un } from "./file-manager/file-manager-variant.js";
93
- import { getParentFolderPath as dn, isHiddenPath as fn } from "./file-manager/path.js";
94
- import { FileDownloadStatus as pn, FileUploadFailureReason as mn, FileUploadStatus as hn, isDownloadInProgress as gn, isUploadInProgress as _n } from "./file-manager/upload-batch.js";
95
- import { useGridEditingScroll as vn } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
96
- import { OperationLoaderModal as yn } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
97
- import { isSkillSelectionUnsupported as bn } from "./utils/is-skill-selection-unsupported.js";
98
- import { toConversationTransferQueueItems as xn } from "./conversation-transfer/conversation-transfer-queue.js";
99
- export { ct as ActionMenu, g as AttachmentErrorReason, _ as AttachmentType, Ie as BASE_LG_ICON_PROPS, Le as BASE_MD_ICON_PROPS, s as BackgroundGenerationStatus, At as CHAT_SHARED_CLASS, Vt as COMPACT_MARKDOWN_CLASS_NAMES, v as CatalogEntityType, x as CodeBlockTheme, xt as ConfirmationDialog, bt as ConfirmationFooter, _t as ConfirmationIdentityCard, vt as ConfirmationIdentityRow, yt as ConfirmationView, a as ConversationKind, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, rt as CopyButton, it as CopyIconButton, Ht as DEFAULT_MARKDOWN_CLASS_NAMES, Pt as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, St as DELETE_CONFIRMATION_MAX_LISTED_NAMES, Je as DESKTOP_BREAKPOINT_PX, Ye as DESKTOP_MEDIA_QUERY, wt as DeleteConfirmationDialog, Tt as DeleteConfirmationDrawer, Ct as DeleteConfirmationView, nt as DeploymentIcon, ln as DialFileManagerActionProfile, un as DialFileManagerVariant, V as ENTITY_DESCRIPTION_MAX_LENGTH, H as ENTITY_INSTRUCTIONS_MAX_LENGTH, U as ENTITY_NAME_MAX_LENGTH, Ee as ENTITY_TYPE_BG_COLOR, De as ENTITY_TYPE_COLOR, ht as EntityHeader, pt as EntityTypeLabel, mt as FeaturedChip, pn as FileDownloadStatus, y as FileExtension, mn as FileUploadFailureReason, hn as FileUploadStatus, o as FilterTab, Re as HIDDEN_FILE, tt as InitialsAvatar, ft as ItemHeader, Ve as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, He as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, Ge as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, Ft as MARKDOWN_TABLE_CSV_MIME_TYPE, Wt as MDMessageViewer, b as MIMEType, S as MIME_TYPE_ALIASES, C as MIME_TYPE_AUDIO_PREFIX, w as MIME_TYPE_EXT_MAP, T as MIME_TYPE_WILDCARD, Xe as MOBILE_MAX_WIDTH_PX, Ze as MOBILE_MEDIA_QUERY, Nt as MarkdownCodeBlock, zt as MarkdownRenderer, Rt as MarkdownTable, It as MarkdownTableCopyFormat, Gt as MarkdownWithPlaceholders, c as MessageRating, l as MessageRole, ut as NewVersionAlert, dt as NotificationStack, yn as OperationLoaderModal, m as OrgUnitAction, h as OrgUnitNamespace, Qe as PHONE_MEDIA_QUERY, I as PROHIBITED_CONVERSATION_NAME_CHARS_RE, Oe as PROMPT_PARAM_DEFAULT_SEPARATOR, ke as PROMPT_PARAM_PATTERN, Ae as PROMPT_VARIABLE_CLASS_NAME, ze as PUBLIC_BUCKET, lt as PanelEmptyState, Ut as PlainTextRenderer, Ue as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, We as RESIZABLE_TEXTAREA_CLASS_NAME, K as RESOURCE_VERSION_PATTERN, u as RequestStatus, gt as ResourceSummary, p as ResponseFormat, Ke as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, qe as SELECT_LIST_MAX_HEIGHT_PX, q as STORED_RESOURCE_VERSION_PATTERN, d as StageStatus, f as StatusEvent, $e as TABLET_BREAKPOINT_PX, et as TABLET_MEDIA_QUERY, Be as TAG_INPUT_TAG_CLASS_NAME, Et as TableHeader, kt as TextRefinementField, Dt as TextRefinementState, cn as UnsavedChangesProvider, ve as base64ToBlob, Y as buildCssVars, Kt as buildInlineSegmentSource, je as buildPromptParamDefaults, X as canAccessAt, Z as canApprovePublicationsAt, Q as canReadAt, $ as canRequestPublicationAt, ee as canSaveToFolderAt, te as canWriteAt, ne as canWriteIntoOrgUnitAt, ue as copyMarkdownAsRichText, le as copyToClipboard, qt as createInlineSegmentComponents, Jt as createRehypeInlineSegments, P as decodeJsonFromBase64, Bt as defaultMarkdownComponents, ye as downloadTextFile, F as encodeJsonToBase64, be as ensureDownloadFilename, W as exceedsMaxLength, at as extractInitials, Me as extractPromptParams, re as findOwningOrgUnit, he as formatCost, me as formatFileSize, pe as formatLastUsed, ge as formatPrice, _e as formatUnitPrice, Fe as generateUUID, E as getAttachmentTypeFromMime, D as getBaseMimeType, xe as getFileExtensionForLanguage, dn as getParentFolderPath, L as getUtf8ByteLength, G as hasControlCharacters, O as inferMimeTypeFromPath, j as isAnnotationSelector, ce as isAudioTranscriptionSupported, gn as isDownloadInProgress, fn as isHiddenPath, bn as isSkillSelectionUnsupported, ae as isStatusMessage, Te as isSyntaxHighlightingAllowed, _n as isUploadInProgress, fe as makeOutsideInert, de as markdownToRichTextHtml, J as mergeClasses, oe as messageAttachmentToDisplayAttachment, se as messageAttachmentsToDisplayAttachments, k as normalizeMimeType, ie as normalizeOrgUnitFolder, M as normalizePersistedHtmlTagAttachmentType, N as normalizeRawAnnotations, ot as pickAvatarColor, Ne as rehypePromptVariables, Pe as resolvePromptParams, Mt as restrainedSyntaxTheme, R as sanitizeConversationName, Lt as serializeMarkdownTableRows, z as stripTrailingDots, A as stripUrlQueryAndFragment, xn as toConversationTransferQueueItems, Se as triggerAnchorDownload, Ce as triggerBlobDownload, B as truncateToUtf8Bytes, we as tryBase64ToBytes, Xt as useAvailableHeightCap, jt as useCodeCopy, Yt as useCollapsedText, Zt as useControlErrorAssociation, vn as useGridEditingScroll, Qt as useHasBeenTrue, $t as useIsMobile, st as useIsPhone, en as useIsTablet, tn as useIsTextClipped, nn as useIsVerticallyClamped, Ot as useTextRefinement, an as useUnsavedChanges, rn as useUnsavedChangesGuard, sn as useUnsavedChangesLeaveConfirmation, on as useUnsavedChangesLeaveGuard };
19
+ import { canAccessAt as X, canApprovePublicationsAt as Z, canReadAt as Q, canRequestPublicationAt as $, canSaveToFolderAt as ee, canWriteAt as te, canWriteIntoOrgUnitAt as ne, findOwningOrgUnit as re, isOrgUnitTreeFolder as ie, normalizeOrgUnitFolder as ae } from "./utils/org-unit.js";
20
+ import { isStatusMessage as oe } from "./utils/message.js";
21
+ import { messageAttachmentToDisplayAttachment as se, messageAttachmentsToDisplayAttachments as ce } from "./utils/message-attachment-to-display.js";
22
+ import { isAudioTranscriptionSupported as le } from "./utils/is-audio-transcription-supported.js";
23
+ import { copyToClipboard as ue } from "./utils/copy-to-clipboard.js";
24
+ import { copyMarkdownAsRichText as de, markdownToRichTextHtml as fe } from "./utils/markdown-rich-text.js";
25
+ import { makeOutsideInert as pe } from "./utils/dom.js";
26
+ import { formatLastUsed as me } from "./utils/format-last-used.js";
27
+ import { formatFileSize as he } from "./utils/format-file-size.js";
28
+ import { formatCost as ge, formatPrice as _e, formatUnitPrice as ve } from "./utils/format-price.js";
29
+ import { base64ToBlob as ye, downloadTextFile as be, ensureDownloadFilename as xe, getFileExtensionForLanguage as Se, triggerAnchorDownload as Ce, triggerBlobDownload as we, tryBase64ToBytes as Te } from "./utils/file-download.js";
30
+ import { isSyntaxHighlightingAllowed as Ee } from "./utils/syntax-highlighting.js";
31
+ import { ENTITY_TYPE_BG_COLOR as De, ENTITY_TYPE_COLOR as Oe } from "./constants/entity-colors.js";
32
+ import { PROMPT_PARAM_DEFAULT_SEPARATOR as ke, PROMPT_PARAM_PATTERN as Ae, PROMPT_VARIABLE_CLASS_NAME as je, buildPromptParamDefaults as Me, extractPromptParams as Ne, rehypePromptVariables as Pe, resolvePromptParams as Fe } from "./utils/prompt-variables.js";
33
+ import { generateUUID as Ie } from "./utils/generate-uuid.js";
34
+ import { BASE_LG_ICON_PROPS as Le, BASE_MD_ICON_PROPS as Re } from "./constants/icon.js";
35
+ import { HIDDEN_FILE as ze, PUBLIC_BUCKET as Be } from "./constants/dial.js";
36
+ import { TAG_INPUT_TAG_CLASS_NAME as Ve } from "./constants/tag-input.js";
37
+ import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as He, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as Ue, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as We, RESIZABLE_TEXTAREA_CLASS_NAME as Ge } from "./constants/resizable-fields.js";
38
+ import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as Ke } from "./constants/markdown-editor.js";
39
+ import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as qe, SELECT_LIST_MAX_HEIGHT_PX as Je } from "./constants/select-list.js";
40
+ import { DESKTOP_BREAKPOINT_PX as Ye, DESKTOP_MEDIA_QUERY as Xe, MOBILE_MAX_WIDTH_PX as Ze, MOBILE_MEDIA_QUERY as Qe, PHONE_MEDIA_QUERY as $e, TABLET_BREAKPOINT_PX as et, TABLET_MEDIA_QUERY as tt } from "./constants/breakpoint.js";
41
+ import { InitialsAvatar as nt } from "./components/InitialsAvatar/InitialsAvatar.js";
42
+ import { DeploymentIcon as rt } from "./components/DeploymentIcon/DeploymentIcon.js";
43
+ import { CopyButton as it, CopyIconButton as at } from "./components/CopyButton/CopyButton.js";
44
+ import { extractInitials as ot } from "./utils/initials.js";
45
+ import { pickAvatarColor as st } from "./utils/avatar-color.js";
46
+ import { useIsPhone as ct } from "./hooks/useIsPhone.js";
47
+ import { ActionMenu as lt } from "./components/ActionMenu/ActionMenu.js";
48
+ import { PanelEmptyState as ut } from "./components/PanelEmptyState/PanelEmptyState.js";
49
+ import { NewVersionAlert as dt } from "./components/NewVersionAlert/NewVersionAlert.js";
50
+ import { NotificationStack as ft } from "./components/NotificationStack/NotificationStack.js";
51
+ import { ItemHeader as pt } from "./components/ItemHeader/ItemHeader.js";
52
+ import { EntityTypeLabel as mt } from "./components/EntityTypeLabel/EntityTypeLabel.js";
53
+ import { FeaturedChip as ht } from "./components/FeaturedChip/FeaturedChip.js";
54
+ import { EntityHeader as gt } from "./components/EntityHeader/EntityHeader.js";
55
+ import { ResourceSummary as _t } from "./components/ResourceSummary/ResourceSummary.js";
56
+ import { ConfirmationIdentityCard as vt } from "./components/ConfirmationIdentityCard/ConfirmationIdentityCard.js";
57
+ import { ConfirmationIdentityRow as yt } from "./components/ConfirmationIdentityRow/ConfirmationIdentityRow.js";
58
+ import { ConfirmationView as bt } from "./components/ConfirmationView/ConfirmationView.js";
59
+ import { ConfirmationFooter as xt } from "./components/ConfirmationView/ConfirmationFooter.js";
60
+ import { ConfirmationDialog as St } from "./components/ConfirmationDialog/ConfirmationDialog.js";
61
+ import { DELETE_CONFIRMATION_MAX_LISTED_NAMES as Ct, DeleteConfirmationView as wt } from "./components/DeleteConfirmationView/DeleteConfirmationView.js";
62
+ import { DeleteConfirmationDialog as Tt } from "./components/DeleteConfirmationDialog/DeleteConfirmationDialog.js";
63
+ import { DeleteConfirmationDrawer as Et } from "./components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.js";
64
+ import { TableHeader as Dt } from "./components/MarkdownRenderer/Table/TableHeader.js";
65
+ import { TextRefinementState as Ot, useTextRefinement as kt } from "./hooks/useTextRefinement.js";
66
+ import { TextRefinementField as At } from "./components/TextRefinementField/TextRefinementField.js";
67
+ import { CHAT_SHARED_CLASS as jt } from "./constants/public-class-names.js";
68
+ import { useCodeCopy as Mt } from "./hooks/useCodeCopy.js";
69
+ import { restrainedSyntaxTheme as Nt } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
70
+ import { MarkdownCodeBlock as Pt } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
71
+ import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as Ft, MARKDOWN_TABLE_CSV_MIME_TYPE as It, MarkdownTableCopyFormat as Lt, serializeMarkdownTableRows as Rt } from "./components/MarkdownRenderer/Table/table-serialization.js";
72
+ import { MarkdownTable as zt } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
73
+ import { MarkdownRenderer as Bt, defaultMarkdownComponents as Vt } from "./components/MarkdownRenderer/MarkdownRenderer.js";
74
+ import { COMPACT_MARKDOWN_CLASS_NAMES as Ht, DEFAULT_MARKDOWN_CLASS_NAMES as Ut } from "./components/MarkdownRenderer/markdown-class-names.js";
75
+ import { PlainTextRenderer as Wt } from "./components/MarkdownRenderer/PlainTextRenderer.js";
76
+ import { MDMessageViewer as Gt } from "./components/MarkdownRenderer/MDMessageViewer.js";
77
+ import { MarkdownWithPlaceholders as Kt } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
78
+ import { buildInlineSegmentSource as qt, createInlineSegmentComponents as Jt, createRehypeInlineSegments as Yt } from "./utils/inline-segments.js";
79
+ import { useCollapsedText as Xt } from "./hooks/useCollapsedText.js";
80
+ import { useAvailableHeightCap as Zt } from "./hooks/useAvailableHeightCap.js";
81
+ import { useControlErrorAssociation as Qt } from "./hooks/useControlErrorAssociation.js";
82
+ import { useHasBeenTrue as $t } from "./hooks/useHasBeenTrue.js";
83
+ import { useIsMobile as en } from "./hooks/useIsMobile.js";
84
+ import { useIsTablet as tn } from "./hooks/useIsTablet.js";
85
+ import { useIsTextClipped as nn } from "./hooks/useIsTextClipped.js";
86
+ import { useIsVerticallyClamped as rn } from "./hooks/useIsVerticallyClamped.js";
87
+ import { useUnsavedChangesGuard as an } from "./hooks/useUnsavedChangesGuard.js";
88
+ import { useUnsavedChanges as on } from "./components/UnsavedChangesProvider/unsaved-changes-context.js";
89
+ import { useUnsavedChangesLeaveGuard as sn } from "./hooks/useUnsavedChangesLeaveGuard.js";
90
+ import { useUnsavedChangesLeaveConfirmation as cn } from "./hooks/useUnsavedChangesLeaveConfirmation.js";
91
+ import { UnsavedChangesProvider as ln } from "./components/UnsavedChangesProvider/UnsavedChangesProvider.js";
92
+ import { DialFileManagerActionProfile as un, DialFileManagerVariant as dn } from "./file-manager/file-manager-variant.js";
93
+ import { getParentFolderPath as fn, isHiddenPath as pn } from "./file-manager/path.js";
94
+ import { FileDownloadStatus as mn, FileUploadFailureReason as hn, FileUploadStatus as gn, isDownloadInProgress as _n, isUploadInProgress as vn } from "./file-manager/upload-batch.js";
95
+ import { useGridEditingScroll as yn } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
96
+ import { OperationLoaderModal as bn } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
97
+ import { isSkillSelectionUnsupported as xn } from "./utils/is-skill-selection-unsupported.js";
98
+ import { toConversationTransferQueueItems as Sn } from "./conversation-transfer/conversation-transfer-queue.js";
99
+ export { lt as ActionMenu, g as AttachmentErrorReason, _ as AttachmentType, Le as BASE_LG_ICON_PROPS, Re as BASE_MD_ICON_PROPS, s as BackgroundGenerationStatus, jt as CHAT_SHARED_CLASS, Ht as COMPACT_MARKDOWN_CLASS_NAMES, v as CatalogEntityType, x as CodeBlockTheme, St as ConfirmationDialog, xt as ConfirmationFooter, vt as ConfirmationIdentityCard, yt as ConfirmationIdentityRow, bt as ConfirmationView, a as ConversationKind, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, it as CopyButton, at as CopyIconButton, Ut as DEFAULT_MARKDOWN_CLASS_NAMES, Ft as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, Ct as DELETE_CONFIRMATION_MAX_LISTED_NAMES, Ye as DESKTOP_BREAKPOINT_PX, Xe as DESKTOP_MEDIA_QUERY, Tt as DeleteConfirmationDialog, Et as DeleteConfirmationDrawer, wt as DeleteConfirmationView, rt as DeploymentIcon, un as DialFileManagerActionProfile, dn as DialFileManagerVariant, V as ENTITY_DESCRIPTION_MAX_LENGTH, H as ENTITY_INSTRUCTIONS_MAX_LENGTH, U as ENTITY_NAME_MAX_LENGTH, De as ENTITY_TYPE_BG_COLOR, Oe as ENTITY_TYPE_COLOR, gt as EntityHeader, mt as EntityTypeLabel, ht as FeaturedChip, mn as FileDownloadStatus, y as FileExtension, hn as FileUploadFailureReason, gn as FileUploadStatus, o as FilterTab, ze as HIDDEN_FILE, nt as InitialsAvatar, pt as ItemHeader, He as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, Ue as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, Ke as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, It as MARKDOWN_TABLE_CSV_MIME_TYPE, Gt as MDMessageViewer, b as MIMEType, S as MIME_TYPE_ALIASES, C as MIME_TYPE_AUDIO_PREFIX, w as MIME_TYPE_EXT_MAP, T as MIME_TYPE_WILDCARD, Ze as MOBILE_MAX_WIDTH_PX, Qe as MOBILE_MEDIA_QUERY, Pt as MarkdownCodeBlock, Bt as MarkdownRenderer, zt as MarkdownTable, Lt as MarkdownTableCopyFormat, Kt as MarkdownWithPlaceholders, c as MessageRating, l as MessageRole, dt as NewVersionAlert, ft as NotificationStack, bn as OperationLoaderModal, m as OrgUnitAction, h as OrgUnitNamespace, $e as PHONE_MEDIA_QUERY, I as PROHIBITED_CONVERSATION_NAME_CHARS_RE, ke as PROMPT_PARAM_DEFAULT_SEPARATOR, Ae as PROMPT_PARAM_PATTERN, je as PROMPT_VARIABLE_CLASS_NAME, Be as PUBLIC_BUCKET, ut as PanelEmptyState, Wt as PlainTextRenderer, We as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, Ge as RESIZABLE_TEXTAREA_CLASS_NAME, K as RESOURCE_VERSION_PATTERN, u as RequestStatus, _t as ResourceSummary, p as ResponseFormat, qe as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, Je as SELECT_LIST_MAX_HEIGHT_PX, q as STORED_RESOURCE_VERSION_PATTERN, d as StageStatus, f as StatusEvent, et as TABLET_BREAKPOINT_PX, tt as TABLET_MEDIA_QUERY, Ve as TAG_INPUT_TAG_CLASS_NAME, Dt as TableHeader, At as TextRefinementField, Ot as TextRefinementState, ln as UnsavedChangesProvider, ye as base64ToBlob, Y as buildCssVars, qt as buildInlineSegmentSource, Me as buildPromptParamDefaults, X as canAccessAt, Z as canApprovePublicationsAt, Q as canReadAt, $ as canRequestPublicationAt, ee as canSaveToFolderAt, te as canWriteAt, ne as canWriteIntoOrgUnitAt, de as copyMarkdownAsRichText, ue as copyToClipboard, Jt as createInlineSegmentComponents, Yt as createRehypeInlineSegments, P as decodeJsonFromBase64, Vt as defaultMarkdownComponents, be as downloadTextFile, F as encodeJsonToBase64, xe as ensureDownloadFilename, W as exceedsMaxLength, ot as extractInitials, Ne as extractPromptParams, re as findOwningOrgUnit, ge as formatCost, he as formatFileSize, me as formatLastUsed, _e as formatPrice, ve as formatUnitPrice, Ie as generateUUID, E as getAttachmentTypeFromMime, D as getBaseMimeType, Se as getFileExtensionForLanguage, fn as getParentFolderPath, L as getUtf8ByteLength, G as hasControlCharacters, O as inferMimeTypeFromPath, j as isAnnotationSelector, le as isAudioTranscriptionSupported, _n as isDownloadInProgress, pn as isHiddenPath, ie as isOrgUnitTreeFolder, xn as isSkillSelectionUnsupported, oe as isStatusMessage, Ee as isSyntaxHighlightingAllowed, vn as isUploadInProgress, pe as makeOutsideInert, fe as markdownToRichTextHtml, J as mergeClasses, se as messageAttachmentToDisplayAttachment, ce as messageAttachmentsToDisplayAttachments, k as normalizeMimeType, ae as normalizeOrgUnitFolder, M as normalizePersistedHtmlTagAttachmentType, N as normalizeRawAnnotations, st as pickAvatarColor, Pe as rehypePromptVariables, Fe as resolvePromptParams, Nt as restrainedSyntaxTheme, R as sanitizeConversationName, Rt as serializeMarkdownTableRows, z as stripTrailingDots, A as stripUrlQueryAndFragment, Sn as toConversationTransferQueueItems, Ce as triggerAnchorDownload, we as triggerBlobDownload, B as truncateToUtf8Bytes, Te as tryBase64ToBytes, Zt as useAvailableHeightCap, Mt as useCodeCopy, Xt as useCollapsedText, Qt as useControlErrorAssociation, yn as useGridEditingScroll, $t as useHasBeenTrue, en as useIsMobile, ct as useIsPhone, tn as useIsTablet, nn as useIsTextClipped, rn as useIsVerticallyClamped, kt as useTextRefinement, on as useUnsavedChanges, an as useUnsavedChangesGuard, cn as useUnsavedChangesLeaveConfirmation, sn as useUnsavedChangesLeaveGuard };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-shared",
3
3
  "description": "Shared domain models, utilities, and UI components for AI DIAL Chat libraries",
4
- "version": "1.4.0-dev.180",
4
+ "version": "1.4.0-dev.185",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -18,6 +18,18 @@ export declare const normalizeOrgUnitFolder: (folder: string) => string;
18
18
  * @param publicPath - decoded path relative to the public bucket, e.g. `Acme/US Risk/Reports`
19
19
  */
20
20
  export declare const findOwningOrgUnit: (units: readonly OrgUnit[], publicPath: string) => OrgUnit | undefined;
21
+ /**
22
+ * Whether `publicPath` belongs to the org-unit structure of the public bucket,
23
+ * i.e. should stay listed when org units are on: the public root, a unit's own
24
+ * folder, a folder inside a unit (see {@link findOwningOrgUnit}), or an
25
+ * ancestor of a unit folder at a segment boundary (`Acme/` when only
26
+ * `Acme/Risk/` is a unit). Any other public folder — and so its subtree — is a
27
+ * plain folder no unit owns. Describes the folder kind, not a right, so admin
28
+ * access is not consulted. `publicPath` is decoded and public-relative.
29
+ * @param units - units as returned by DIAL Core
30
+ * @param publicPath - decoded path relative to the public bucket, e.g. `Acme/Reports`
31
+ */
32
+ export declare const isOrgUnitTreeFolder: (units: readonly OrgUnit[], publicPath: string) => boolean;
21
33
  /**
22
34
  * Whether the caller may do `action` on `namespace` at `publicPath`. A DIAL
23
35
  * admin may anywhere; otherwise only the owning unit's `permissions` decide, so
@@ -1 +1 @@
1
- {"version":3,"file":"org-unit.d.ts","sourceRoot":"","sources":["../../src/utils/org-unit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,KAAK,OAAO,EACZ,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAmB5B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,KAAG,MAIvD,CAAC;AAsBF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,SAAS,OAAO,EAAE,EACzB,YAAY,MAAM,KACjB,OAAO,GAAG,SAYZ,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,EAC3B,QAAQ,aAAa,KACpB,OAIF,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,UAAU,GACrB,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAA0E,CAAC;AAE9E;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAIF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAEwC,CAAC;AAE5C,iDAAiD;AACjD,eAAO,MAAM,SAAS,GACpB,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAAyE,CAAC;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GACnC,QAAQ,aAAa,EACrB,YAAY,MAAM,KACjB,OAE4D,CAAC;AAEhE;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAClC,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAIF,CAAC"}
1
+ {"version":3,"file":"org-unit.d.ts","sourceRoot":"","sources":["../../src/utils/org-unit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,KAAK,OAAO,EACZ,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAmB5B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,KAAG,MAIvD,CAAC;AAsBF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,SAAS,OAAO,EAAE,EACzB,YAAY,MAAM,KACjB,OAAO,GAAG,SAYZ,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,SAAS,OAAO,EAAE,EACzB,YAAY,MAAM,KACjB,OAOF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,EAC3B,QAAQ,aAAa,KACpB,OAIF,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,UAAU,GACrB,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAA0E,CAAC;AAE9E;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAIF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAEwC,CAAC;AAE5C,iDAAiD;AACjD,eAAO,MAAM,SAAS,GACpB,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAAyE,CAAC;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GACnC,QAAQ,aAAa,EACrB,YAAY,MAAM,KACjB,OAE4D,CAAC;AAEhE;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAClC,QAAQ,aAAa,EACrB,YAAY,MAAM,EAClB,WAAW,gBAAgB,KAC1B,OAIF,CAAC"}
package/utils/org-unit.js CHANGED
@@ -21,6 +21,9 @@ var n = "public", r = (e) => {
21
21
  let r, o = 0;
22
22
  for (let { unit: t, folder: i } of c(e)) i.length > o && n.startsWith(i) && (r = t, o = i.length);
23
23
  return r;
24
- }, u = (e, t, n, r) => e.hasAdminAccess ? !0 : l(e.units, t)?.permissions?.[n]?.includes(r) ?? !1, d = (t, n, r) => u(t, n, r, e.Write), f = (e, t, n) => e.hasAdminAccess || !l(e.units, t) ? !0 : d(e, t, n), p = (e, t, n) => l(e.units, t) != null && d(e, t, n), m = (t, n, r) => u(t, n, r, e.Read), h = (e, n) => m(e, n, t.Publications) && d(e, n, t.Publications), g = (e, t, n) => e.hasAdminAccess || !l(e.units, t) ? !0 : m(e, t, n);
24
+ }, u = (e, t) => {
25
+ let n = a(i(t));
26
+ return n === "" || l(e, t) ? !0 : c(e).some(({ folder: e }) => e !== "" && e.startsWith(n));
27
+ }, d = (e, t, n, r) => e.hasAdminAccess ? !0 : l(e.units, t)?.permissions?.[n]?.includes(r) ?? !1, f = (t, n, r) => d(t, n, r, e.Write), p = (e, t, n) => e.hasAdminAccess || !l(e.units, t) ? !0 : f(e, t, n), m = (e, t, n) => l(e.units, t) != null && f(e, t, n), h = (t, n, r) => d(t, n, r, e.Read), g = (e, n) => h(e, n, t.Publications) && f(e, n, t.Publications), _ = (e, t, n) => e.hasAdminAccess || !l(e.units, t) ? !0 : h(e, t, n);
25
28
  //#endregion
26
- export { u as canAccessAt, h as canApprovePublicationsAt, m as canReadAt, g as canRequestPublicationAt, f as canSaveToFolderAt, d as canWriteAt, p as canWriteIntoOrgUnitAt, l as findOwningOrgUnit, o as normalizeOrgUnitFolder };
29
+ export { d as canAccessAt, g as canApprovePublicationsAt, h as canReadAt, _ as canRequestPublicationAt, p as canSaveToFolderAt, f as canWriteAt, m as canWriteIntoOrgUnitAt, l as findOwningOrgUnit, u as isOrgUnitTreeFolder, o as normalizeOrgUnitFolder };