@epam/ai-dial-chat-shared 1.3.6 → 1.4.0-dev.101

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":"useIsMobile.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsMobile.ts"],"names":[],"mappings":"AAQA,iGAAiG;AACjG,eAAO,MAAM,WAAW,QAAO,OAgB9B,CAAC"}
1
+ {"version":3,"file":"useIsMobile.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsMobile.ts"],"names":[],"mappings":"AAGA,iGAAiG;AACjG,eAAO,MAAM,WAAW,QAAO,OACS,CAAC"}
@@ -1,13 +1,6 @@
1
1
  import { MOBILE_MEDIA_QUERY as e } from "../constants/breakpoint.js";
2
- import { useEffect as t, useState as n } from "react";
2
+ import { useMediaQueryMatch as t } from "./useMediaQueryMatch.js";
3
3
  //#region src/hooks/useIsMobile.ts
4
- var r = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(max-width: 1279px)").matches, i = () => {
5
- let [i, a] = n(r);
6
- return t(() => {
7
- if (typeof window > "u" || typeof window.matchMedia != "function") return;
8
- let t = window.matchMedia(e), n = () => a(t.matches);
9
- return t.addEventListener("change", n), () => t.removeEventListener("change", n);
10
- }, []), i;
11
- };
4
+ var n = () => t(e);
12
5
  //#endregion
13
- export { i as useIsMobile };
6
+ export { n as useIsMobile };
@@ -1 +1 @@
1
- {"version":3,"file":"useIsPhone.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsPhone.ts"],"names":[],"mappings":"AAQA,oFAAoF;AACpF,eAAO,MAAM,UAAU,QAAO,OAiB7B,CAAC"}
1
+ {"version":3,"file":"useIsPhone.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsPhone.ts"],"names":[],"mappings":"AAGA,oFAAoF;AACpF,eAAO,MAAM,UAAU,QAAO,OAAgD,CAAC"}
@@ -1,13 +1,6 @@
1
1
  import { PHONE_MEDIA_QUERY as e } from "../constants/breakpoint.js";
2
- import { useEffect as t, useState as n } from "react";
2
+ import { useMediaQueryMatch as t } from "./useMediaQueryMatch.js";
3
3
  //#region src/hooks/useIsPhone.ts
4
- var r = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(width < 768px)").matches, i = () => {
5
- let [i, a] = n(r);
6
- return t(() => {
7
- if (typeof window > "u" || typeof window.matchMedia != "function") return;
8
- let t = window.matchMedia(e), n = () => a(t.matches);
9
- return n(), t.addEventListener("change", n), () => t.removeEventListener("change", n);
10
- }, []), i;
11
- };
4
+ var n = () => t(e);
12
5
  //#endregion
13
- export { i as useIsPhone };
6
+ export { n as useIsPhone };
@@ -1 +1 @@
1
- {"version":3,"file":"useIsTablet.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsTablet.ts"],"names":[],"mappings":"AAQA,qFAAqF;AACrF,eAAO,MAAM,WAAW,QAAO,OAiB9B,CAAC"}
1
+ {"version":3,"file":"useIsTablet.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsTablet.ts"],"names":[],"mappings":"AAGA,qFAAqF;AACrF,eAAO,MAAM,WAAW,QAAO,OACS,CAAC"}
@@ -1,13 +1,6 @@
1
1
  import { TABLET_MEDIA_QUERY as e } from "../constants/breakpoint.js";
2
- import { useEffect as t, useState as n } from "react";
2
+ import { useMediaQueryMatch as t } from "./useMediaQueryMatch.js";
3
3
  //#region src/hooks/useIsTablet.ts
4
- var r = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(768px <= width < 1280px)").matches, i = () => {
5
- let [i, a] = n(r);
6
- return t(() => {
7
- if (typeof window > "u" || typeof window.matchMedia != "function") return;
8
- let t = window.matchMedia(e), n = () => a(t.matches);
9
- return n(), t.addEventListener("change", n), () => t.removeEventListener("change", n);
10
- }, []), i;
11
- };
4
+ var n = () => t(e);
12
5
  //#endregion
13
- export { i as useIsTablet };
6
+ export { n as useIsTablet };
@@ -0,0 +1,3 @@
1
+ /** Returns whether `query` currently matches, re-rendering when the match changes. */
2
+ export declare const useMediaQueryMatch: (query: string) => boolean;
3
+ //# sourceMappingURL=useMediaQueryMatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMediaQueryMatch.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaQueryMatch.ts"],"names":[],"mappings":"AAcA,sFAAsF;AACtF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,OAgBlD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { useCallback as e, useSyncExternalStore as t } from "react";
2
+ //#region src/hooks/useMediaQueryMatch.ts
3
+ var n = () => typeof window < "u" && typeof window.matchMedia == "function", r = () => !1, i = (i) => {
4
+ let a = e((e) => {
5
+ if (!n()) return () => void 0;
6
+ let t = window.matchMedia(i);
7
+ return t.addEventListener("change", e), () => t.removeEventListener("change", e);
8
+ }, [i]), o = e(() => n() && window.matchMedia(i).matches, [i]);
9
+ return t(a, o, r);
10
+ };
11
+ //#endregion
12
+ export { i as useMediaQueryMatch };
package/index.d.ts CHANGED
@@ -26,6 +26,7 @@ export * from './utils/annotation';
26
26
  export * from './utils/base64-json';
27
27
  export * from './utils/string-utils';
28
28
  export * from './utils/entity-field-limits';
29
+ export * from './utils/resource-version';
29
30
  export * from './utils/merge-class';
30
31
  export * from './utils/build-css-vars';
31
32
  export * from './utils/org-unit';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,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,iBAAiB,EACjB,KAAK,0BAA0B,GAChC,MAAM,6DAA6D,CAAC;AAYrE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAErF,cAAc,qDAAqD,CAAC"}
package/index.js CHANGED
@@ -2,95 +2,97 @@ import { ConversationTransferErrorCode as e, ConversationTransferJobStatus as t,
2
2
  import { ConversationKind as a, FilterTab as o } from "./models/conversation-classification.js";
3
3
  import { BackgroundGenerationStatus as s, MessageRating as c, MessageRole as l, RequestStatus as u, StageStatus as d, StatusEvent as f } from "./models/chat.js";
4
4
  import { ResponseFormat as p } from "./models/deployment-features.js";
5
- import { AttachmentErrorReason as m, AttachmentType as h } from "./types/attachment.js";
6
- import { CatalogEntityType as g } from "./types/entity-type.js";
7
- import { FileExtension as _, MIMEType as v } from "./types/mime-type.js";
8
- import { CodeBlockTheme as y } from "./types/code-editor.js";
9
- import { MIME_TYPE_ALIASES as b, MIME_TYPE_AUDIO_PREFIX as x, MIME_TYPE_EXT_MAP as S, MIME_TYPE_WILDCARD as C } from "./constants/mime-types.js";
10
- import { getAttachmentTypeFromMime as w, getBaseMimeType as T, inferMimeTypeFromPath as E, normalizeMimeType as D, stripUrlQueryAndFragment as O } from "./utils/mime-type.js";
11
- import { isAnnotationSelector as k, normalizePersistedHtmlTagAttachmentType as A, normalizeRawAnnotations as j } from "./utils/annotation.js";
12
- import { decodeJsonFromBase64 as M, encodeJsonToBase64 as N } from "./utils/base64-json.js";
13
- import { PROHIBITED_CONVERSATION_NAME_CHARS_RE as P, getUtf8ByteLength as F, sanitizeConversationName as I, stripTrailingDots as L, truncateToUtf8Bytes as R } from "./utils/string-utils.js";
14
- import { ENTITY_DESCRIPTION_MAX_LENGTH as z, ENTITY_INSTRUCTIONS_MAX_LENGTH as B, ENTITY_NAME_MAX_LENGTH as V, exceedsMaxLength as H, hasControlCharacters as U } from "./utils/entity-field-limits.js";
15
- import { mergeClasses as W } from "./utils/merge-class.js";
16
- import { buildCssVars as G } from "./utils/build-css-vars.js";
17
- import { isOrgUnitFolder as K, normalizeOrgUnitFolder as q, toOrgUnitFolderSet as J } from "./utils/org-unit.js";
18
- import { isStatusMessage as Y } from "./utils/message.js";
19
- import { messageAttachmentToDisplayAttachment as X, messageAttachmentsToDisplayAttachments as Z } from "./utils/message-attachment-to-display.js";
20
- import { isAudioTranscriptionSupported as Q } from "./utils/is-audio-transcription-supported.js";
21
- import { copyToClipboard as $ } from "./utils/copy-to-clipboard.js";
22
- import { copyMarkdownAsRichText as ee, markdownToRichTextHtml as te } from "./utils/markdown-rich-text.js";
23
- import { makeOutsideInert as ne } from "./utils/dom.js";
24
- import { formatLastUsed as re } from "./utils/format-last-used.js";
25
- import { formatFileSize as ie } from "./utils/format-file-size.js";
26
- import { formatCost as ae, formatPrice as oe, formatUnitPrice as se } from "./utils/format-price.js";
27
- import { base64ToBlob as ce, downloadTextFile as le, ensureDownloadFilename as ue, getFileExtensionForLanguage as de, triggerAnchorDownload as fe, triggerBlobDownload as pe, tryBase64ToBytes as me } from "./utils/file-download.js";
28
- import { isSyntaxHighlightingAllowed as he } from "./utils/syntax-highlighting.js";
29
- import { ENTITY_TYPE_BG_COLOR as ge, ENTITY_TYPE_COLOR as _e } from "./constants/entity-colors.js";
30
- import { PROMPT_PARAM_DEFAULT_SEPARATOR as ve, PROMPT_PARAM_PATTERN as ye, PROMPT_VARIABLE_CLASS_NAME as be, buildPromptParamDefaults as xe, extractPromptParams as Se, rehypePromptVariables as Ce, resolvePromptParams as we } from "./utils/prompt-variables.js";
31
- import { generateUUID as Te } from "./utils/generate-uuid.js";
32
- import { BASE_LG_ICON_PROPS as Ee, BASE_MD_ICON_PROPS as De } from "./constants/icon.js";
33
- import { HIDDEN_FILE as Oe, PUBLIC_BUCKET as ke } from "./constants/dial.js";
34
- import { TAG_INPUT_TAG_CLASS_NAME as Ae } from "./constants/tag-input.js";
35
- import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as je, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as Me, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as Ne, RESIZABLE_TEXTAREA_CLASS_NAME as Pe } from "./constants/resizable-fields.js";
36
- import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as Fe } from "./constants/markdown-editor.js";
37
- import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as Ie, SELECT_LIST_MAX_HEIGHT_PX as Le } from "./constants/select-list.js";
38
- import { DESKTOP_BREAKPOINT_PX as Re, DESKTOP_MEDIA_QUERY as ze, MOBILE_MAX_WIDTH_PX as Be, MOBILE_MEDIA_QUERY as Ve, PHONE_MEDIA_QUERY as He, TABLET_BREAKPOINT_PX as Ue, TABLET_MEDIA_QUERY as We } from "./constants/breakpoint.js";
39
- import { InitialsAvatar as Ge } from "./components/InitialsAvatar/InitialsAvatar.js";
40
- import { DeploymentIcon as Ke } from "./components/DeploymentIcon/DeploymentIcon.js";
41
- import { CopyButton as qe, CopyIconButton as Je } from "./components/CopyButton/CopyButton.js";
42
- import { extractInitials as Ye } from "./utils/initials.js";
43
- import { pickAvatarColor as Xe } from "./utils/avatar-color.js";
44
- import { useIsPhone as Ze } from "./hooks/useIsPhone.js";
45
- import { ActionMenu as Qe } from "./components/ActionMenu/ActionMenu.js";
46
- import { PanelEmptyState as $e } from "./components/PanelEmptyState/PanelEmptyState.js";
47
- import { NewVersionAlert as et } from "./components/NewVersionAlert/NewVersionAlert.js";
48
- import { NotificationStack as tt } from "./components/NotificationStack/NotificationStack.js";
49
- import { ItemHeader as nt } from "./components/ItemHeader/ItemHeader.js";
50
- import { EntityTypeLabel as rt } from "./components/EntityTypeLabel/EntityTypeLabel.js";
51
- import { FeaturedChip as it } from "./components/FeaturedChip/FeaturedChip.js";
52
- import { EntityHeader as at } from "./components/EntityHeader/EntityHeader.js";
53
- import { ResourceSummary as ot } from "./components/ResourceSummary/ResourceSummary.js";
54
- import { ConfirmationIdentityCard as st } from "./components/ConfirmationIdentityCard/ConfirmationIdentityCard.js";
55
- import { ConfirmationIdentityRow as ct } from "./components/ConfirmationIdentityRow/ConfirmationIdentityRow.js";
56
- import { ConfirmationView as lt } from "./components/ConfirmationView/ConfirmationView.js";
57
- import { ConfirmationFooter as ut } from "./components/ConfirmationView/ConfirmationFooter.js";
58
- import { ConfirmationDialog as dt } from "./components/ConfirmationDialog/ConfirmationDialog.js";
59
- import { DELETE_CONFIRMATION_MAX_LISTED_NAMES as ft, DeleteConfirmationView as pt } from "./components/DeleteConfirmationView/DeleteConfirmationView.js";
60
- import { DeleteConfirmationDialog as mt } from "./components/DeleteConfirmationDialog/DeleteConfirmationDialog.js";
61
- import { DeleteConfirmationDrawer as ht } from "./components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.js";
62
- import { TableHeader as gt } from "./components/MarkdownRenderer/Table/TableHeader.js";
63
- import { TextRefinementState as _t, useTextRefinement as vt } from "./hooks/useTextRefinement.js";
64
- import { TextRefinementField as yt } from "./components/TextRefinementField/TextRefinementField.js";
65
- import { CHAT_SHARED_CLASS as bt } from "./constants/public-class-names.js";
66
- import { useCodeCopy as xt } from "./hooks/useCodeCopy.js";
67
- import { restrainedSyntaxTheme as St } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
68
- import { MarkdownCodeBlock as Ct } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
69
- import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as wt, MARKDOWN_TABLE_CSV_MIME_TYPE as Tt, MarkdownTableCopyFormat as Et, serializeMarkdownTableRows as Dt } from "./components/MarkdownRenderer/Table/table-serialization.js";
70
- import { MarkdownTable as Ot } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
71
- import { MarkdownRenderer as kt, defaultMarkdownComponents as At } from "./components/MarkdownRenderer/MarkdownRenderer.js";
72
- import { COMPACT_MARKDOWN_CLASS_NAMES as jt, DEFAULT_MARKDOWN_CLASS_NAMES as Mt } from "./components/MarkdownRenderer/markdown-class-names.js";
73
- import { PlainTextRenderer as Nt } from "./components/MarkdownRenderer/PlainTextRenderer.js";
74
- import { MDMessageViewer as Pt } from "./components/MarkdownRenderer/MDMessageViewer.js";
75
- import { MarkdownWithPlaceholders as Ft } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
76
- import { buildInlineSegmentSource as It, createInlineSegmentComponents as Lt, createRehypeInlineSegments as Rt } from "./utils/inline-segments.js";
77
- import { useCollapsedText as zt } from "./hooks/useCollapsedText.js";
78
- import { useAvailableHeightCap as Bt } from "./hooks/useAvailableHeightCap.js";
79
- import { useControlErrorAssociation as Vt } from "./hooks/useControlErrorAssociation.js";
80
- import { useIsMobile as Ht } from "./hooks/useIsMobile.js";
81
- import { useIsTablet as Ut } from "./hooks/useIsTablet.js";
82
- import { useIsTextClipped as Wt } from "./hooks/useIsTextClipped.js";
83
- import { useIsVerticallyClamped as Gt } from "./hooks/useIsVerticallyClamped.js";
84
- import { useUnsavedChangesGuard as Kt } from "./hooks/useUnsavedChangesGuard.js";
85
- import { useUnsavedChanges as qt } from "./components/UnsavedChangesProvider/unsaved-changes-context.js";
86
- import { useUnsavedChangesLeaveGuard as Jt } from "./hooks/useUnsavedChangesLeaveGuard.js";
87
- import { useUnsavedChangesLeaveConfirmation as Yt } from "./hooks/useUnsavedChangesLeaveConfirmation.js";
88
- import { UnsavedChangesProvider as Xt } from "./components/UnsavedChangesProvider/UnsavedChangesProvider.js";
89
- import { DialFileManagerActionProfile as Zt, DialFileManagerVariant as Qt } from "./file-manager/file-manager-variant.js";
90
- import { getParentFolderPath as $t, isHiddenPath as en } from "./file-manager/path.js";
91
- import { FileDownloadStatus as tn, FileUploadFailureReason as nn, FileUploadStatus as rn, isDownloadInProgress as an, isUploadInProgress as on } from "./file-manager/upload-batch.js";
92
- import { useGridEditingScroll as sn } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
93
- import { OperationLoaderModal as cn } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
94
- import { isSkillSelectionUnsupported as ln } from "./utils/is-skill-selection-unsupported.js";
95
- import { toConversationTransferQueueItems as un } from "./conversation-transfer/conversation-transfer-queue.js";
96
- export { Qe as ActionMenu, m as AttachmentErrorReason, h as AttachmentType, Ee as BASE_LG_ICON_PROPS, De as BASE_MD_ICON_PROPS, s as BackgroundGenerationStatus, bt as CHAT_SHARED_CLASS, jt as COMPACT_MARKDOWN_CLASS_NAMES, g as CatalogEntityType, y as CodeBlockTheme, dt as ConfirmationDialog, ut as ConfirmationFooter, st as ConfirmationIdentityCard, ct as ConfirmationIdentityRow, lt as ConfirmationView, a as ConversationKind, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, qe as CopyButton, Je as CopyIconButton, Mt as DEFAULT_MARKDOWN_CLASS_NAMES, wt as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, ft as DELETE_CONFIRMATION_MAX_LISTED_NAMES, Re as DESKTOP_BREAKPOINT_PX, ze as DESKTOP_MEDIA_QUERY, mt as DeleteConfirmationDialog, ht as DeleteConfirmationDrawer, pt as DeleteConfirmationView, Ke as DeploymentIcon, Zt as DialFileManagerActionProfile, Qt as DialFileManagerVariant, z as ENTITY_DESCRIPTION_MAX_LENGTH, B as ENTITY_INSTRUCTIONS_MAX_LENGTH, V as ENTITY_NAME_MAX_LENGTH, ge as ENTITY_TYPE_BG_COLOR, _e as ENTITY_TYPE_COLOR, at as EntityHeader, rt as EntityTypeLabel, it as FeaturedChip, tn as FileDownloadStatus, _ as FileExtension, nn as FileUploadFailureReason, rn as FileUploadStatus, o as FilterTab, Oe as HIDDEN_FILE, Ge as InitialsAvatar, nt as ItemHeader, je as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, Me as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, Fe as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, Tt as MARKDOWN_TABLE_CSV_MIME_TYPE, Pt as MDMessageViewer, v as MIMEType, b as MIME_TYPE_ALIASES, x as MIME_TYPE_AUDIO_PREFIX, S as MIME_TYPE_EXT_MAP, C as MIME_TYPE_WILDCARD, Be as MOBILE_MAX_WIDTH_PX, Ve as MOBILE_MEDIA_QUERY, Ct as MarkdownCodeBlock, kt as MarkdownRenderer, Ot as MarkdownTable, Et as MarkdownTableCopyFormat, Ft as MarkdownWithPlaceholders, c as MessageRating, l as MessageRole, et as NewVersionAlert, tt as NotificationStack, cn as OperationLoaderModal, He as PHONE_MEDIA_QUERY, P as PROHIBITED_CONVERSATION_NAME_CHARS_RE, ve as PROMPT_PARAM_DEFAULT_SEPARATOR, ye as PROMPT_PARAM_PATTERN, be as PROMPT_VARIABLE_CLASS_NAME, ke as PUBLIC_BUCKET, $e as PanelEmptyState, Nt as PlainTextRenderer, Ne as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, Pe as RESIZABLE_TEXTAREA_CLASS_NAME, u as RequestStatus, ot as ResourceSummary, p as ResponseFormat, Ie as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, Le as SELECT_LIST_MAX_HEIGHT_PX, d as StageStatus, f as StatusEvent, Ue as TABLET_BREAKPOINT_PX, We as TABLET_MEDIA_QUERY, Ae as TAG_INPUT_TAG_CLASS_NAME, gt as TableHeader, yt as TextRefinementField, _t as TextRefinementState, Xt as UnsavedChangesProvider, ce as base64ToBlob, G as buildCssVars, It as buildInlineSegmentSource, xe as buildPromptParamDefaults, ee as copyMarkdownAsRichText, $ as copyToClipboard, Lt as createInlineSegmentComponents, Rt as createRehypeInlineSegments, M as decodeJsonFromBase64, At as defaultMarkdownComponents, le as downloadTextFile, N as encodeJsonToBase64, ue as ensureDownloadFilename, H as exceedsMaxLength, Ye as extractInitials, Se as extractPromptParams, ae as formatCost, ie as formatFileSize, re as formatLastUsed, oe as formatPrice, se as formatUnitPrice, Te as generateUUID, w as getAttachmentTypeFromMime, T as getBaseMimeType, de as getFileExtensionForLanguage, $t as getParentFolderPath, F as getUtf8ByteLength, U as hasControlCharacters, E as inferMimeTypeFromPath, k as isAnnotationSelector, Q as isAudioTranscriptionSupported, an as isDownloadInProgress, en as isHiddenPath, K as isOrgUnitFolder, ln as isSkillSelectionUnsupported, Y as isStatusMessage, he as isSyntaxHighlightingAllowed, on as isUploadInProgress, ne as makeOutsideInert, te as markdownToRichTextHtml, W as mergeClasses, X as messageAttachmentToDisplayAttachment, Z as messageAttachmentsToDisplayAttachments, D as normalizeMimeType, q as normalizeOrgUnitFolder, A as normalizePersistedHtmlTagAttachmentType, j as normalizeRawAnnotations, Xe as pickAvatarColor, Ce as rehypePromptVariables, we as resolvePromptParams, St as restrainedSyntaxTheme, I as sanitizeConversationName, Dt as serializeMarkdownTableRows, L as stripTrailingDots, O as stripUrlQueryAndFragment, un as toConversationTransferQueueItems, J as toOrgUnitFolderSet, fe as triggerAnchorDownload, pe as triggerBlobDownload, R as truncateToUtf8Bytes, me as tryBase64ToBytes, Bt as useAvailableHeightCap, xt as useCodeCopy, zt as useCollapsedText, Vt as useControlErrorAssociation, sn as useGridEditingScroll, Ht as useIsMobile, Ze as useIsPhone, Ut as useIsTablet, Wt as useIsTextClipped, Gt as useIsVerticallyClamped, vt as useTextRefinement, qt as useUnsavedChanges, Kt as useUnsavedChangesGuard, Yt as useUnsavedChangesLeaveConfirmation, Jt as useUnsavedChangesLeaveGuard };
5
+ import { OrgUnitAction as m, OrgUnitNamespace as h } from "./models/org-unit.js";
6
+ import { AttachmentErrorReason as g, AttachmentType as _ } from "./types/attachment.js";
7
+ import { CatalogEntityType as v } from "./types/entity-type.js";
8
+ import { FileExtension as y, MIMEType as b } from "./types/mime-type.js";
9
+ import { CodeBlockTheme as x } from "./types/code-editor.js";
10
+ import { MIME_TYPE_ALIASES as S, MIME_TYPE_AUDIO_PREFIX as C, MIME_TYPE_EXT_MAP as w, MIME_TYPE_WILDCARD as T } from "./constants/mime-types.js";
11
+ import { getAttachmentTypeFromMime as E, getBaseMimeType as D, inferMimeTypeFromPath as O, normalizeMimeType as k, stripUrlQueryAndFragment as A } from "./utils/mime-type.js";
12
+ import { isAnnotationSelector as j, normalizePersistedHtmlTagAttachmentType as M, normalizeRawAnnotations as N } from "./utils/annotation.js";
13
+ import { decodeJsonFromBase64 as P, encodeJsonToBase64 as F } from "./utils/base64-json.js";
14
+ import { PROHIBITED_CONVERSATION_NAME_CHARS_RE as I, getUtf8ByteLength as L, sanitizeConversationName as R, stripTrailingDots as z, truncateToUtf8Bytes as B } from "./utils/string-utils.js";
15
+ import { ENTITY_DESCRIPTION_MAX_LENGTH as V, ENTITY_INSTRUCTIONS_MAX_LENGTH as H, ENTITY_NAME_MAX_LENGTH as U, exceedsMaxLength as W, hasControlCharacters as G } from "./utils/entity-field-limits.js";
16
+ import { RESOURCE_VERSION_PATTERN as K, STORED_RESOURCE_VERSION_PATTERN as q } from "./utils/resource-version.js";
17
+ import { mergeClasses as J } from "./utils/merge-class.js";
18
+ import { buildCssVars as Y } from "./utils/build-css-vars.js";
19
+ import { canAccessAt as X, canReadAt as Z, canRequestPublicationAt as Q, canSaveToFolderAt as $, canWriteAt as ee, canWriteIntoOrgUnitAt as te, findOwningOrgUnit as ne, normalizeOrgUnitFolder as re } from "./utils/org-unit.js";
20
+ import { isStatusMessage as ie } from "./utils/message.js";
21
+ import { messageAttachmentToDisplayAttachment as ae, messageAttachmentsToDisplayAttachments as oe } from "./utils/message-attachment-to-display.js";
22
+ import { isAudioTranscriptionSupported as se } from "./utils/is-audio-transcription-supported.js";
23
+ import { copyToClipboard as ce } from "./utils/copy-to-clipboard.js";
24
+ import { copyMarkdownAsRichText as le, markdownToRichTextHtml as ue } from "./utils/markdown-rich-text.js";
25
+ import { makeOutsideInert as de } from "./utils/dom.js";
26
+ import { formatLastUsed as fe } from "./utils/format-last-used.js";
27
+ import { formatFileSize as pe } from "./utils/format-file-size.js";
28
+ import { formatCost as me, formatPrice as he, formatUnitPrice as ge } from "./utils/format-price.js";
29
+ import { base64ToBlob as _e, downloadTextFile as ve, ensureDownloadFilename as ye, getFileExtensionForLanguage as be, triggerAnchorDownload as xe, triggerBlobDownload as Se, tryBase64ToBytes as Ce } from "./utils/file-download.js";
30
+ import { isSyntaxHighlightingAllowed as we } from "./utils/syntax-highlighting.js";
31
+ import { ENTITY_TYPE_BG_COLOR as Te, ENTITY_TYPE_COLOR as Ee } from "./constants/entity-colors.js";
32
+ import { PROMPT_PARAM_DEFAULT_SEPARATOR as De, PROMPT_PARAM_PATTERN as Oe, PROMPT_VARIABLE_CLASS_NAME as ke, buildPromptParamDefaults as Ae, extractPromptParams as je, rehypePromptVariables as Me, resolvePromptParams as Ne } from "./utils/prompt-variables.js";
33
+ import { generateUUID as Pe } from "./utils/generate-uuid.js";
34
+ import { BASE_LG_ICON_PROPS as Fe, BASE_MD_ICON_PROPS as Ie } from "./constants/icon.js";
35
+ import { HIDDEN_FILE as Le, PUBLIC_BUCKET as Re } from "./constants/dial.js";
36
+ import { TAG_INPUT_TAG_CLASS_NAME as ze } from "./constants/tag-input.js";
37
+ import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as Be, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as Ve, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as He, RESIZABLE_TEXTAREA_CLASS_NAME as Ue } from "./constants/resizable-fields.js";
38
+ import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as We } from "./constants/markdown-editor.js";
39
+ import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as Ge, SELECT_LIST_MAX_HEIGHT_PX as Ke } from "./constants/select-list.js";
40
+ import { DESKTOP_BREAKPOINT_PX as qe, DESKTOP_MEDIA_QUERY as Je, MOBILE_MAX_WIDTH_PX as Ye, MOBILE_MEDIA_QUERY as Xe, PHONE_MEDIA_QUERY as Ze, TABLET_BREAKPOINT_PX as Qe, TABLET_MEDIA_QUERY as $e } from "./constants/breakpoint.js";
41
+ import { InitialsAvatar as et } from "./components/InitialsAvatar/InitialsAvatar.js";
42
+ import { DeploymentIcon as tt } from "./components/DeploymentIcon/DeploymentIcon.js";
43
+ import { CopyButton as nt, CopyIconButton as rt } from "./components/CopyButton/CopyButton.js";
44
+ import { extractInitials as it } from "./utils/initials.js";
45
+ import { pickAvatarColor as at } from "./utils/avatar-color.js";
46
+ import { useIsPhone as ot } from "./hooks/useIsPhone.js";
47
+ import { ActionMenu as st } from "./components/ActionMenu/ActionMenu.js";
48
+ import { PanelEmptyState as ct } from "./components/PanelEmptyState/PanelEmptyState.js";
49
+ import { NewVersionAlert as lt } from "./components/NewVersionAlert/NewVersionAlert.js";
50
+ import { NotificationStack as ut } from "./components/NotificationStack/NotificationStack.js";
51
+ import { ItemHeader as dt } from "./components/ItemHeader/ItemHeader.js";
52
+ import { EntityTypeLabel as ft } from "./components/EntityTypeLabel/EntityTypeLabel.js";
53
+ import { FeaturedChip as pt } from "./components/FeaturedChip/FeaturedChip.js";
54
+ import { EntityHeader as mt } from "./components/EntityHeader/EntityHeader.js";
55
+ import { ResourceSummary as ht } from "./components/ResourceSummary/ResourceSummary.js";
56
+ import { ConfirmationIdentityCard as gt } from "./components/ConfirmationIdentityCard/ConfirmationIdentityCard.js";
57
+ import { ConfirmationIdentityRow as _t } from "./components/ConfirmationIdentityRow/ConfirmationIdentityRow.js";
58
+ import { ConfirmationView as vt } from "./components/ConfirmationView/ConfirmationView.js";
59
+ import { ConfirmationFooter as yt } from "./components/ConfirmationView/ConfirmationFooter.js";
60
+ import { ConfirmationDialog as bt } from "./components/ConfirmationDialog/ConfirmationDialog.js";
61
+ import { DELETE_CONFIRMATION_MAX_LISTED_NAMES as xt, DeleteConfirmationView as St } from "./components/DeleteConfirmationView/DeleteConfirmationView.js";
62
+ import { DeleteConfirmationDialog as Ct } from "./components/DeleteConfirmationDialog/DeleteConfirmationDialog.js";
63
+ import { DeleteConfirmationDrawer as wt } from "./components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.js";
64
+ import { TableHeader as Tt } from "./components/MarkdownRenderer/Table/TableHeader.js";
65
+ import { TextRefinementState as Et, useTextRefinement as Dt } from "./hooks/useTextRefinement.js";
66
+ import { TextRefinementField as Ot } from "./components/TextRefinementField/TextRefinementField.js";
67
+ import { CHAT_SHARED_CLASS as kt } from "./constants/public-class-names.js";
68
+ import { useCodeCopy as At } from "./hooks/useCodeCopy.js";
69
+ import { restrainedSyntaxTheme as jt } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
70
+ import { MarkdownCodeBlock as Mt } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
71
+ import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as Nt, MARKDOWN_TABLE_CSV_MIME_TYPE as Pt, MarkdownTableCopyFormat as Ft, serializeMarkdownTableRows as It } from "./components/MarkdownRenderer/Table/table-serialization.js";
72
+ import { MarkdownTable as Lt } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
73
+ import { MarkdownRenderer as Rt, defaultMarkdownComponents as zt } from "./components/MarkdownRenderer/MarkdownRenderer.js";
74
+ import { COMPACT_MARKDOWN_CLASS_NAMES as Bt, DEFAULT_MARKDOWN_CLASS_NAMES as Vt } from "./components/MarkdownRenderer/markdown-class-names.js";
75
+ import { PlainTextRenderer as Ht } from "./components/MarkdownRenderer/PlainTextRenderer.js";
76
+ import { MDMessageViewer as Ut } from "./components/MarkdownRenderer/MDMessageViewer.js";
77
+ import { MarkdownWithPlaceholders as Wt } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
78
+ import { buildInlineSegmentSource as Gt, createInlineSegmentComponents as Kt, createRehypeInlineSegments as qt } from "./utils/inline-segments.js";
79
+ import { useCollapsedText as Jt } from "./hooks/useCollapsedText.js";
80
+ import { useAvailableHeightCap as Yt } from "./hooks/useAvailableHeightCap.js";
81
+ import { useControlErrorAssociation as Xt } from "./hooks/useControlErrorAssociation.js";
82
+ import { useIsMobile as Zt } from "./hooks/useIsMobile.js";
83
+ import { useIsTablet as Qt } from "./hooks/useIsTablet.js";
84
+ import { useIsTextClipped as $t } from "./hooks/useIsTextClipped.js";
85
+ import { useIsVerticallyClamped as en } from "./hooks/useIsVerticallyClamped.js";
86
+ import { useUnsavedChangesGuard as tn } from "./hooks/useUnsavedChangesGuard.js";
87
+ import { useUnsavedChanges as nn } from "./components/UnsavedChangesProvider/unsaved-changes-context.js";
88
+ import { useUnsavedChangesLeaveGuard as rn } from "./hooks/useUnsavedChangesLeaveGuard.js";
89
+ import { useUnsavedChangesLeaveConfirmation as an } from "./hooks/useUnsavedChangesLeaveConfirmation.js";
90
+ import { UnsavedChangesProvider as on } from "./components/UnsavedChangesProvider/UnsavedChangesProvider.js";
91
+ import { DialFileManagerActionProfile as sn, DialFileManagerVariant as cn } from "./file-manager/file-manager-variant.js";
92
+ import { getParentFolderPath as ln, isHiddenPath as un } from "./file-manager/path.js";
93
+ import { FileDownloadStatus as dn, FileUploadFailureReason as fn, FileUploadStatus as pn, isDownloadInProgress as mn, isUploadInProgress as hn } from "./file-manager/upload-batch.js";
94
+ import { useGridEditingScroll as gn } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
95
+ import { OperationLoaderModal as _n } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
96
+ import { isSkillSelectionUnsupported as vn } from "./utils/is-skill-selection-unsupported.js";
97
+ import { toConversationTransferQueueItems as yn } from "./conversation-transfer/conversation-transfer-queue.js";
98
+ export { st as ActionMenu, g as AttachmentErrorReason, _ as AttachmentType, Fe as BASE_LG_ICON_PROPS, Ie as BASE_MD_ICON_PROPS, s as BackgroundGenerationStatus, kt as CHAT_SHARED_CLASS, Bt as COMPACT_MARKDOWN_CLASS_NAMES, v as CatalogEntityType, x as CodeBlockTheme, bt as ConfirmationDialog, yt as ConfirmationFooter, gt as ConfirmationIdentityCard, _t as ConfirmationIdentityRow, vt as ConfirmationView, a as ConversationKind, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, nt as CopyButton, rt as CopyIconButton, Vt as DEFAULT_MARKDOWN_CLASS_NAMES, Nt as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, xt as DELETE_CONFIRMATION_MAX_LISTED_NAMES, qe as DESKTOP_BREAKPOINT_PX, Je as DESKTOP_MEDIA_QUERY, Ct as DeleteConfirmationDialog, wt as DeleteConfirmationDrawer, St as DeleteConfirmationView, tt as DeploymentIcon, sn as DialFileManagerActionProfile, cn as DialFileManagerVariant, V as ENTITY_DESCRIPTION_MAX_LENGTH, H as ENTITY_INSTRUCTIONS_MAX_LENGTH, U as ENTITY_NAME_MAX_LENGTH, Te as ENTITY_TYPE_BG_COLOR, Ee as ENTITY_TYPE_COLOR, mt as EntityHeader, ft as EntityTypeLabel, pt as FeaturedChip, dn as FileDownloadStatus, y as FileExtension, fn as FileUploadFailureReason, pn as FileUploadStatus, o as FilterTab, Le as HIDDEN_FILE, et as InitialsAvatar, dt as ItemHeader, Be as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, Ve as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, We as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, Pt as MARKDOWN_TABLE_CSV_MIME_TYPE, Ut 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, Ye as MOBILE_MAX_WIDTH_PX, Xe as MOBILE_MEDIA_QUERY, Mt as MarkdownCodeBlock, Rt as MarkdownRenderer, Lt as MarkdownTable, Ft as MarkdownTableCopyFormat, Wt as MarkdownWithPlaceholders, c as MessageRating, l as MessageRole, lt as NewVersionAlert, ut as NotificationStack, _n as OperationLoaderModal, m as OrgUnitAction, h as OrgUnitNamespace, Ze as PHONE_MEDIA_QUERY, I as PROHIBITED_CONVERSATION_NAME_CHARS_RE, De as PROMPT_PARAM_DEFAULT_SEPARATOR, Oe as PROMPT_PARAM_PATTERN, ke as PROMPT_VARIABLE_CLASS_NAME, Re as PUBLIC_BUCKET, ct as PanelEmptyState, Ht as PlainTextRenderer, He as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, Ue as RESIZABLE_TEXTAREA_CLASS_NAME, K as RESOURCE_VERSION_PATTERN, u as RequestStatus, ht as ResourceSummary, p as ResponseFormat, Ge as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, Ke as SELECT_LIST_MAX_HEIGHT_PX, q as STORED_RESOURCE_VERSION_PATTERN, d as StageStatus, f as StatusEvent, Qe as TABLET_BREAKPOINT_PX, $e as TABLET_MEDIA_QUERY, ze as TAG_INPUT_TAG_CLASS_NAME, Tt as TableHeader, Ot as TextRefinementField, Et as TextRefinementState, on as UnsavedChangesProvider, _e as base64ToBlob, Y as buildCssVars, Gt as buildInlineSegmentSource, Ae as buildPromptParamDefaults, X as canAccessAt, Z as canReadAt, Q as canRequestPublicationAt, $ as canSaveToFolderAt, ee as canWriteAt, te as canWriteIntoOrgUnitAt, le as copyMarkdownAsRichText, ce as copyToClipboard, Kt as createInlineSegmentComponents, qt as createRehypeInlineSegments, P as decodeJsonFromBase64, zt as defaultMarkdownComponents, ve as downloadTextFile, F as encodeJsonToBase64, ye as ensureDownloadFilename, W as exceedsMaxLength, it as extractInitials, je as extractPromptParams, ne as findOwningOrgUnit, me as formatCost, pe as formatFileSize, fe as formatLastUsed, he as formatPrice, ge as formatUnitPrice, Pe as generateUUID, E as getAttachmentTypeFromMime, D as getBaseMimeType, be as getFileExtensionForLanguage, ln as getParentFolderPath, L as getUtf8ByteLength, G as hasControlCharacters, O as inferMimeTypeFromPath, j as isAnnotationSelector, se as isAudioTranscriptionSupported, mn as isDownloadInProgress, un as isHiddenPath, vn as isSkillSelectionUnsupported, ie as isStatusMessage, we as isSyntaxHighlightingAllowed, hn as isUploadInProgress, de as makeOutsideInert, ue as markdownToRichTextHtml, J as mergeClasses, ae as messageAttachmentToDisplayAttachment, oe as messageAttachmentsToDisplayAttachments, k as normalizeMimeType, re as normalizeOrgUnitFolder, M as normalizePersistedHtmlTagAttachmentType, N as normalizeRawAnnotations, at as pickAvatarColor, Me as rehypePromptVariables, Ne as resolvePromptParams, jt as restrainedSyntaxTheme, R as sanitizeConversationName, It as serializeMarkdownTableRows, z as stripTrailingDots, A as stripUrlQueryAndFragment, yn as toConversationTransferQueueItems, xe as triggerAnchorDownload, Se as triggerBlobDownload, B as truncateToUtf8Bytes, Ce as tryBase64ToBytes, Yt as useAvailableHeightCap, At as useCodeCopy, Jt as useCollapsedText, Xt as useControlErrorAssociation, gn as useGridEditingScroll, Zt as useIsMobile, ot as useIsPhone, Qt as useIsTablet, $t as useIsTextClipped, en as useIsVerticallyClamped, Dt as useTextRefinement, nn as useUnsavedChanges, tn as useUnsavedChangesGuard, an as useUnsavedChangesLeaveConfirmation, rn as useUnsavedChangesLeaveGuard };
@@ -9,5 +9,33 @@ export interface OrgUnit {
9
9
  path: string;
10
10
  /** Unit folder as DIAL Core returns it: url-encoded, with a trailing slash, e.g. `public/Acme/US%20Risk/`. */
11
11
  folder: string;
12
+ /**
13
+ * The caller's actions per Core namespace in this unit, e.g.
14
+ * `{ applications: ['read', 'write'] }`. Empty when the unit is reached only
15
+ * through its parent. Decisions use this map, never role names.
16
+ */
17
+ permissions: Record<string, string[]>;
18
+ }
19
+ /** DIAL Core resource namespaces an org unit grants actions on. */
20
+ export declare enum OrgUnitNamespace {
21
+ Files = "files",
22
+ Conversations = "conversations",
23
+ Prompts = "prompts",
24
+ Applications = "applications",
25
+ Toolsets = "toolsets",
26
+ Skills = "skills",
27
+ Projects = "projects",
28
+ Publications = "publications"
29
+ }
30
+ /** Actions Core grants per namespace in a unit. */
31
+ export declare enum OrgUnitAction {
32
+ Read = "read",
33
+ Write = "write"
34
+ }
35
+ /** The resolved org-unit data a right is decided from. */
36
+ export interface OrgUnitAccess {
37
+ /** `true` for a DIAL admin, who may act anywhere. */
38
+ hasAdminAccess: boolean;
39
+ units: readonly OrgUnit[];
12
40
  }
13
41
  //# sourceMappingURL=org-unit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"org-unit.d.ts","sourceRoot":"","sources":["../../src/models/org-unit.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,8GAA8G;IAC9G,MAAM,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"org-unit.d.ts","sourceRoot":"","sources":["../../src/models/org-unit.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,8GAA8G;IAC9G,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACvC;AAED,mEAAmE;AACnE,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,YAAY,iBAAiB;CAC9B;AAED,mDAAmD;AACnD,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;CAC3B"}
@@ -0,0 +1,8 @@
1
+ //#region src/models/org-unit.ts
2
+ var e = /* @__PURE__ */ function(e) {
3
+ return e.Files = "files", e.Conversations = "conversations", e.Prompts = "prompts", e.Applications = "applications", e.Toolsets = "toolsets", e.Skills = "skills", e.Projects = "projects", e.Publications = "publications", e;
4
+ }({}), t = /* @__PURE__ */ function(e) {
5
+ return e.Read = "read", e.Write = "write", e;
6
+ }({});
7
+ //#endregion
8
+ export { t as OrgUnitAction, e as OrgUnitNamespace };
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.3.6",
4
+ "version": "1.4.0-dev.101",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -34,7 +34,7 @@
34
34
  "react": "^19.2.8",
35
35
  "react-dom": "^19.2.8",
36
36
  "@epam/ai-dial-ui-kit": "^0.16.0",
37
- "@epam/ai-dial-react-file-manager": "^0.4.2"
37
+ "@epam/ai-dial-react-file-manager": "^0.4.3"
38
38
  },
39
39
  "dependencies": {
40
40
  "ag-grid-community": "^35.3.0",
@@ -1,4 +1,4 @@
1
- import { OrgUnit } from '../models/org-unit';
1
+ import { OrgUnitAction, OrgUnit, OrgUnitAccess, OrgUnitNamespace } from '../models/org-unit';
2
2
  /**
3
3
  * Returns a unit's Core `folder` (url-encoded, rooted at `public/`, e.g.
4
4
  * `public/Acme/US%20Risk/`) as a decoded public-relative folder with one
@@ -6,12 +6,61 @@ import { OrgUnit } from '../models/org-unit';
6
6
  * folder outside `public/`.
7
7
  */
8
8
  export declare const normalizeOrgUnitFolder: (folder: string) => string;
9
- /** The normalised folders of `units`, for repeated {@link isOrgUnitFolder} lookups. */
10
- export declare const toOrgUnitFolderSet: (units: readonly OrgUnit[]) => ReadonlySet<string>;
11
9
  /**
12
- * Whether `publicPath` — a decoded path relative to the public bucket, as the
13
- * file manager and the publish tree show it (`Acme/US Risk`) — is a unit's own
14
- * folder. A folder inside a unit is not a unit.
10
+ * The unit that owns `publicPath`: the one whose normalised folder is the
11
+ * longest prefix of the path at a segment boundary. A unit's own folder belongs
12
+ * to it; the public root, a path under no listed unit and a sibling sharing
13
+ * leading characters (`Risk2/` vs `Risk/`) have no owner. `publicPath` is the
14
+ * decoded, public-relative path a tree shows and is not decoded again. The
15
+ * units' folders are normalised once per `units` array (keep the array
16
+ * identity stable between calls).
17
+ * @param units - units as returned by DIAL Core
18
+ * @param publicPath - decoded path relative to the public bucket, e.g. `Acme/US Risk/Reports`
15
19
  */
16
- export declare const isOrgUnitFolder: (unitFolders: ReadonlySet<string>, publicPath: string) => boolean;
20
+ export declare const findOwningOrgUnit: (units: readonly OrgUnit[], publicPath: string) => OrgUnit | undefined;
21
+ /**
22
+ * Whether the caller may do `action` on `namespace` at `publicPath`. A DIAL
23
+ * admin may anywhere; otherwise only the owning unit's `permissions` decide, so
24
+ * a path under no unit, a missing namespace or an empty list is `false`. Role
25
+ * names are never consulted and `write` does not imply `read`.
26
+ * @param access - resolved org-unit data
27
+ * @param publicPath - decoded public-relative path
28
+ * @param namespace - Core namespace of the resource type
29
+ * @param action - the action asked about
30
+ */
31
+ export declare const canAccessAt: (access: OrgUnitAccess, publicPath: string, namespace: OrgUnitNamespace, action: OrgUnitAction) => boolean;
32
+ /** {@link canAccessAt} for the `write` action. */
33
+ export declare const canWriteAt: (access: OrgUnitAccess, publicPath: string, namespace: OrgUnitNamespace) => boolean;
34
+ /**
35
+ * Whether `publicPath` is a usable save destination: `true` for an admin and
36
+ * for a path under no listed unit (the plain public folders keep today's
37
+ * save-then-request flow), otherwise the owning unit must grant `write`.
38
+ * Unlike {@link canWriteAt}, which is strict, a path outside every unit is not
39
+ * refused here.
40
+ * @param access - resolved org-unit data
41
+ * @param publicPath - decoded public-relative path
42
+ * @param namespace - Core namespace of the resource type
43
+ */
44
+ export declare const canSaveToFolderAt: (access: OrgUnitAccess, publicPath: string, namespace: OrgUnitNamespace) => boolean;
45
+ /**
46
+ * Whether the caller may write straight into `publicPath`: the path lies inside
47
+ * a listed unit and that unit (or the caller's admin access) grants `write`.
48
+ * Unlike {@link canSaveToFolderAt}, a path under no unit is `false` even for a
49
+ * DIAL admin, so plain public folders keep the save-then-publish flow.
50
+ * @param access - resolved org-unit data
51
+ * @param publicPath - decoded public-relative path
52
+ * @param namespace - Core namespace of the resource type
53
+ */
54
+ export declare const canWriteIntoOrgUnitAt: (access: OrgUnitAccess, publicPath: string, namespace: OrgUnitNamespace) => boolean;
55
+ /** {@link canAccessAt} for the `read` action. */
56
+ export declare const canReadAt: (access: OrgUnitAccess, publicPath: string, namespace: OrgUnitNamespace) => boolean;
57
+ /**
58
+ * Whether a publication request into `publicPath` can be sent: `true` for an
59
+ * admin and for a path under no listed unit (Core's folder rules decide there,
60
+ * the client does not block), otherwise the owner must grant `read`.
61
+ * @param access - resolved org-unit data
62
+ * @param publicPath - decoded public-relative path
63
+ * @param namespace - Core namespace of the resource type
64
+ */
65
+ export declare const canRequestPublicationAt: (access: OrgUnitAccess, publicPath: string, namespace: OrgUnitNamespace) => boolean;
17
66
  //# sourceMappingURL=org-unit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"org-unit.d.ts","sourceRoot":"","sources":["../../src/utils/org-unit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAmBlD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,KAAG,MAIvD,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,GAC7B,OAAO,SAAS,OAAO,EAAE,KACxB,WAAW,CAAC,MAAM,CAKlB,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,aAAa,WAAW,C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26 @@
1
+ import { OrgUnitAction as e } from "../models/org-unit.js";
1
2
  //#region src/utils/org-unit.ts
2
- var e = (e) => {
3
+ var t = "public", n = (e) => {
3
4
  try {
4
5
  return decodeURIComponent(e);
5
6
  } catch {
6
7
  return e;
7
8
  }
8
- }, t = (e) => e.split("/").filter((e) => e !== ""), n = (e) => e.length === 0 ? "" : `${e.join("/")}/`, r = (r) => {
9
- let [i, ...a] = t(r);
10
- return i === "public" ? n(a.map(e)) : "";
11
- }, i = (e) => new Set(e.map(({ folder: e }) => r(e)).filter((e) => e !== "")), a = (e, r) => {
12
- let i = n(t(r));
13
- return i !== "" && e.has(i);
14
- };
9
+ }, r = (e) => e.split("/").filter((e) => e !== ""), i = (e) => e.length === 0 ? "" : `${e.join("/")}/`, a = (e) => {
10
+ let [a, ...o] = r(e);
11
+ return a === t ? i(o.map(n)) : "";
12
+ }, o = /* @__PURE__ */ new WeakMap(), s = (e) => {
13
+ let t = o.get(e);
14
+ return t || (t = e.map((e) => ({
15
+ unit: e,
16
+ folder: a(e.folder)
17
+ })), o.set(e, t)), t;
18
+ }, c = (e, t) => {
19
+ let n = i(r(t));
20
+ if (n === "") return;
21
+ let a, o = 0;
22
+ for (let { unit: t, folder: r } of s(e)) r.length > o && n.startsWith(r) && (a = t, o = r.length);
23
+ return a;
24
+ }, l = (e, t, n, r) => e.hasAdminAccess ? !0 : c(e.units, t)?.permissions?.[n]?.includes(r) ?? !1, u = (t, n, r) => l(t, n, r, e.Write), d = (e, t, n) => e.hasAdminAccess || !c(e.units, t) ? !0 : u(e, t, n), f = (e, t, n) => c(e.units, t) != null && u(e, t, n), p = (t, n, r) => l(t, n, r, e.Read), m = (e, t, n) => e.hasAdminAccess || !c(e.units, t) ? !0 : p(e, t, n);
15
25
  //#endregion
16
- export { a as isOrgUnitFolder, r as normalizeOrgUnitFolder, i as toOrgUnitFolderSet };
26
+ export { l as canAccessAt, p as canReadAt, m as canRequestPublicationAt, d as canSaveToFolderAt, u as canWriteAt, f as canWriteIntoOrgUnitAt, c as findOwningOrgUnit, a as normalizeOrgUnitFolder };
@@ -0,0 +1,5 @@
1
+ /** Accepts a resource version of 1-64 letters, digits, `_`, `.`, `+` or `-` that does not end with a dot, does not contain `__` and does not start with `_`. */
2
+ export declare const RESOURCE_VERSION_PATTERN: RegExp;
3
+ /** Accepts a version of letters, digits, `_`, `.`, `+` or `-` that is not made of dots only, with no length limit. */
4
+ export declare const STORED_RESOURCE_VERSION_PATTERN: RegExp;
5
+ //# sourceMappingURL=resource-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-version.d.ts","sourceRoot":"","sources":["../../src/utils/resource-version.ts"],"names":[],"mappings":"AAcA,gKAAgK;AAChK,eAAO,MAAM,wBAAwB,QAA0C,CAAC;AAUhF,sHAAsH;AACtH,eAAO,MAAM,+BAA+B,QAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ //#region src/utils/resource-version.ts
2
+ var e = /^(?!.*\.$)(?!.*__)(?!_)[\w.+-]{1,64}$/, t = /^(?!\.+$)[\w.+-]+$/;
3
+ //#endregion
4
+ export { e as RESOURCE_VERSION_PATTERN, t as STORED_RESOURCE_VERSION_PATTERN };