@epam/ai-dial-chat-hooks 1.4.0-dev.173 → 1.4.0-dev.176
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/resource-save.d.ts.map +1 -1
- package/catalog/resource-save.js +36 -28
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +5 -1
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -1
- package/catalog/useResourceSavePanel/useResourceSavePanel.js +77 -77
- package/index.js +189 -189
- package/org-units/org-unit-guards.d.ts +38 -15
- package/org-units/org-unit-guards.d.ts.map +1 -1
- package/org-units/org-unit-guards.js +17 -19
- package/org-units/useOrgUnits/useOrgUnits.d.ts +2 -0
- package/org-units/useOrgUnits/useOrgUnits.d.ts.map +1 -1
- package/org-units/useOrgUnits/useOrgUnits.js +5 -2
- package/package.json +17 -17
- package/utils.js +17 -17
|
@@ -94,42 +94,65 @@ interface MissingDirectWriteNamespacesParams {
|
|
|
94
94
|
* @param namespaces - the namespaces the write needs
|
|
95
95
|
*/
|
|
96
96
|
export declare const getMissingDirectWriteNamespaces: ({ isEnabled, status, canSaveDirectlyAt }: MissingDirectWriteNamespacesParams, folderPath: string[], namespaces: readonly OrgUnitNamespace[]) => OrgUnitNamespace[];
|
|
97
|
+
/** What {@link getPublishDirectAvailability} reads of a listed dependency. */
|
|
98
|
+
export interface PublishDirectDependency {
|
|
99
|
+
/** What kind of resource it is. */
|
|
100
|
+
type: PublishDependencyType;
|
|
101
|
+
/** Whether the dependency is a folder of files; only a `file` dependency is ever one. */
|
|
102
|
+
isFolder?: boolean;
|
|
103
|
+
}
|
|
97
104
|
/** Outcome of {@link getPublishDirectAvailability}. */
|
|
98
105
|
export interface PublishDirectAvailability {
|
|
99
|
-
/** Whether the publish may write directly: the entity check holds
|
|
100
|
-
isDirect: boolean;
|
|
106
|
+
/** Whether the publish may write directly: the entity check holds, no dependency namespace is missing and no folder reference blocks it. */
|
|
107
|
+
readonly isDirect: boolean;
|
|
101
108
|
/** Dependency namespaces the user may not write in the owning unit; empty unless the entity check holds. */
|
|
102
|
-
missingNamespaces: OrgUnitNamespace[];
|
|
109
|
+
readonly missingNamespaces: readonly OrgUnitNamespace[];
|
|
103
110
|
/** The dependency kinds of `missingNamespaces`, for the host to name; same order, same emptiness. */
|
|
104
|
-
missingTypes: PublishDependencyType[];
|
|
111
|
+
readonly missingTypes: readonly PublishDependencyType[];
|
|
112
|
+
/** Whether an application refers to a folder of files and the user is not a DIAL admin, so a request is filed; `false` unless the entity check holds. */
|
|
113
|
+
readonly hasFolderReference: boolean;
|
|
105
114
|
}
|
|
106
|
-
/**
|
|
115
|
+
/** The outcome when nothing can be written directly and nothing is named: frozen, so it is safe to share. */
|
|
116
|
+
export declare const NO_DIRECT_AVAILABILITY: PublishDirectAvailability;
|
|
117
|
+
/** Checks {@link getPublishDirectAvailability} reads, all from `useOrgUnits`. */
|
|
107
118
|
export interface PublishDirectChecks {
|
|
108
119
|
/** The entity's own direct-publish check. */
|
|
109
120
|
canPublishDirectlyAt: OrgUnitRightCheck;
|
|
110
121
|
/** Strict write check, applied to each dependency namespace. */
|
|
111
122
|
canSaveDirectlyAt: OrgUnitRightCheck;
|
|
123
|
+
/** Whether the user is a DIAL admin, the only caller DIAL Core lets copy an application that refers to a folder. */
|
|
124
|
+
hasAdminAccess: boolean;
|
|
112
125
|
}
|
|
113
126
|
/**
|
|
114
|
-
* Whether
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* namespace
|
|
127
|
+
* Whether the dependencies and the user make an application a folder-reference
|
|
128
|
+
* case: a listed dependency is a folder of files and the user is not a DIAL
|
|
129
|
+
* admin. Only an application can be one.
|
|
130
|
+
* @param namespace - the entity's org-unit namespace
|
|
131
|
+
* @param dependencies - the private dependencies the panel lists
|
|
132
|
+
* @param hasAdminAccess - whether the user is a DIAL admin
|
|
133
|
+
*/
|
|
134
|
+
export declare const hasBlockingFolderReference: (namespace: OrgUnitNamespace, dependencies: readonly PublishDirectDependency[], hasAdminAccess: boolean) => boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Whether a publish into the folder writes directly and which reasons block
|
|
137
|
+
* it. A user who may not publish the entity directly gets no missing list and
|
|
138
|
+
* no folder flag, since a request is filed anyway; a plain file dependency
|
|
139
|
+
* never blocks, a folder of files blocks an application unless the user is a
|
|
140
|
+
* DIAL admin.
|
|
118
141
|
* @param folderPath - the destination folder inside the Organization root
|
|
119
142
|
* @param namespace - the entity's org-unit namespace
|
|
120
|
-
* @param
|
|
121
|
-
* @param checks - the hook's direct-publish and strict write checks
|
|
143
|
+
* @param dependencies - the private dependencies the panel lists
|
|
144
|
+
* @param checks - the hook's direct-publish and strict write checks, and the DIAL admin flag
|
|
122
145
|
*/
|
|
123
|
-
export declare const getPublishDirectAvailability: (folderPath: string[], namespace: OrgUnitNamespace,
|
|
146
|
+
export declare const getPublishDirectAvailability: (folderPath: string[], namespace: OrgUnitNamespace, dependencies: readonly PublishDirectDependency[], { canPublishDirectlyAt, canSaveDirectlyAt, hasAdminAccess, }: PublishDirectChecks) => PublishDirectAvailability;
|
|
124
147
|
/**
|
|
125
148
|
* {@link getPublishDirectAvailability} for a catalog item type: the entity's
|
|
126
149
|
* namespace comes from its publish entity type, and a type that cannot be
|
|
127
150
|
* published (or has no namespace) is never direct.
|
|
128
151
|
* @param itemType - the catalog entity type of the item being published
|
|
129
152
|
* @param folderPath - the destination folder inside the Organization root
|
|
130
|
-
* @param
|
|
131
|
-
* @param checks - the hook's direct-publish and strict write checks
|
|
153
|
+
* @param dependencies - the private dependencies the panel lists
|
|
154
|
+
* @param checks - the hook's direct-publish and strict write checks, and the DIAL admin flag
|
|
132
155
|
*/
|
|
133
|
-
export declare const getCatalogPublishDirectAvailability: (itemType: CatalogEntityType, folderPath: string[],
|
|
156
|
+
export declare const getCatalogPublishDirectAvailability: (itemType: CatalogEntityType, folderPath: string[], dependencies: readonly PublishDirectDependency[], checks: PublishDirectChecks) => PublishDirectAvailability;
|
|
134
157
|
export {};
|
|
135
158
|
//# sourceMappingURL=org-unit-guards.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org-unit-guards.d.ts","sourceRoot":"","sources":["../../src/org-units/org-unit-guards.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,iBAAiB,EACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAcnE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,wBAAwB,KACnC,gBAAgB,GAAG,SAAiD,CAAC;AAExE,wEAAwE;AACxE,oBAAY,yBAAyB;IACnC,sGAAsG;IACtG,IAAI,SAAS;IACb,6DAA6D;IAC7D,OAAO,YAAY;CACpB;AAED,2CAA2C;AAC3C,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,yBAAyB,CAAC;IACnC,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,MAAM,EAAE,cAAc,CAAC;IACvB,0GAA0G;IAC1G,SAAS,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACxC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,YAAY,EAAE,iBAAiB,CAAC;IAChC,kFAAkF;IAClF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,+GAA+G;IAC/G,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;CAC9C;AAED,oGAAoG;AACpG,MAAM,WAAW,YAAY;IAC3B,yXAAyX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,iBAAiB,EAC3B,YAAY,MAAM,EAAE,EACpB,cAAc,SAAS,uBAAuB,EAAE,EAChD,QAAQ,mBAAmB,KAC1B,yBAWF,CAAC"}
|
|
@@ -37,29 +37,27 @@ var i = {
|
|
|
37
37
|
e != null && t.add(e);
|
|
38
38
|
}
|
|
39
39
|
return [...t];
|
|
40
|
-
}, f = ({ isEnabled: e, status: t, canSaveDirectlyAt: r }, i, a) => !e || t !== n.Ready ? [] : a.filter((e) => !r(i.join("/"), e)), p = (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
}, f = ({ isEnabled: e, status: t, canSaveDirectlyAt: r }, i, a) => !e || t !== n.Ready ? [] : a.filter((e) => !r(i.join("/"), e)), p = Object.freeze({
|
|
41
|
+
isDirect: !1,
|
|
42
|
+
missingNamespaces: Object.freeze([]),
|
|
43
|
+
missingTypes: Object.freeze([]),
|
|
44
|
+
hasFolderReference: !1
|
|
45
|
+
}), m = (e, t, n) => e === r.Applications && !n && t.some((e) => e.isFolder === !0), h = (e, t, n, { canPublishDirectlyAt: r, canSaveDirectlyAt: i, hasAdminAccess: a }) => {
|
|
46
|
+
let o = e.join("/");
|
|
47
|
+
if (!r(o, t)) return p;
|
|
48
|
+
let s = d(n).filter((e) => !i(o, e)), c = m(t, n, a);
|
|
48
49
|
return {
|
|
49
|
-
isDirect:
|
|
50
|
-
missingNamespaces:
|
|
51
|
-
missingTypes:
|
|
50
|
+
isDirect: s.length === 0 && !c,
|
|
51
|
+
missingNamespaces: s,
|
|
52
|
+
missingTypes: s.flatMap((e) => {
|
|
52
53
|
let t = u(e);
|
|
53
54
|
return t == null ? [] : [t];
|
|
54
|
-
})
|
|
55
|
+
}),
|
|
56
|
+
hasFolderReference: c
|
|
55
57
|
};
|
|
56
|
-
},
|
|
58
|
+
}, g = (t, n, r, i) => {
|
|
57
59
|
let o = e(t), s = o == null ? void 0 : a(o);
|
|
58
|
-
return s == null ?
|
|
59
|
-
isDirect: !1,
|
|
60
|
-
missingNamespaces: [],
|
|
61
|
-
missingTypes: []
|
|
62
|
-
} : p(n, s, r, i);
|
|
60
|
+
return s == null ? p : h(n, s, r, i);
|
|
63
61
|
};
|
|
64
62
|
//#endregion
|
|
65
|
-
export { o as OrgUnitFolderGuardPurpose, s as buildFolderGuards,
|
|
63
|
+
export { p as NO_DIRECT_AVAILABILITY, o as OrgUnitFolderGuardPurpose, s as buildFolderGuards, g as getCatalogPublishDirectAvailability, d as getDependencyOrgUnitNamespaces, u as getDependencyTypeOfNamespace, f as getMissingDirectWriteNamespaces, a as getOrgUnitNamespace, h as getPublishDirectAvailability, m as hasBlockingFolderReference, c as toPublishDisabledReason };
|
|
@@ -22,6 +22,8 @@ export interface UseOrgUnitsResult {
|
|
|
22
22
|
canSaveDirectlyAt: OrgUnitRightCheck;
|
|
23
23
|
/** Whether a publication request into the path can be sent; `true` until the status is `Ready`. */
|
|
24
24
|
canPublishAt: OrgUnitRightCheck;
|
|
25
|
+
/** Whether the user is a DIAL admin, the global role; a unit's own `admin` role does not count. `false` until the status is `Ready`. */
|
|
26
|
+
hasAdminAccess: boolean;
|
|
25
27
|
/** Whether a publish panel may write straight into the path instead of filing a request: it lies inside an org unit, the user may write the namespace there and may approve publications (`read` and `write` on `publications`, or DIAL admin). `false` until the status is `Ready`. */
|
|
26
28
|
canPublishDirectlyAt: OrgUnitRightCheck;
|
|
27
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOrgUnits.d.ts","sourceRoot":"","sources":["../../../src/org-units/useOrgUnits/useOrgUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,uCAAuC;AACvC,MAAM,WAAW,k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M,EAAE,cAAc,CAAC;IACvB,gGAAgG;IAChG,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mHAAmH;IACnH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,6IAA6I;IAC7I,SAAS,EAAE,iBAAiB,CAAC;IAC7B,4LAA4L;IAC5L,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,mGAAmG;IACnG,YAAY,EAAE,iBAAiB,CAAC;IAChC,wIAAwI;IACxI,cAAc,EAAE,OAAO,CAAC;IACxB,wRAAwR;IACxR,oBAAoB,EAAE,iBAAiB,CAAC;CACzC;AAID;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,mBAEzB,kBAAkB,KAAG,iBA8GvB,CAAC"}
|
|
@@ -41,7 +41,8 @@ var u = {
|
|
|
41
41
|
canSaveAt: w,
|
|
42
42
|
canSaveDirectlyAt: T,
|
|
43
43
|
canPublishAt: E,
|
|
44
|
-
canPublishDirectlyAt: D
|
|
44
|
+
canPublishDirectlyAt: D,
|
|
45
|
+
hasAdminAccess: C && f.hasAdminAccess
|
|
45
46
|
}), [
|
|
46
47
|
m,
|
|
47
48
|
x,
|
|
@@ -49,7 +50,9 @@ var u = {
|
|
|
49
50
|
w,
|
|
50
51
|
T,
|
|
51
52
|
E,
|
|
52
|
-
D
|
|
53
|
+
D,
|
|
54
|
+
C,
|
|
55
|
+
f.hasAdminAccess
|
|
53
56
|
]);
|
|
54
57
|
};
|
|
55
58
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-chat-hooks",
|
|
3
3
|
"description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
|
|
4
|
-
"version": "1.4.0-dev.
|
|
4
|
+
"version": "1.4.0-dev.176",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
"dependencies": {
|
|
134
|
-
"@epam/ai-dial-chat-api-client": "1.4.0-dev.
|
|
134
|
+
"@epam/ai-dial-chat-api-client": "1.4.0-dev.176",
|
|
135
135
|
"dompurify": "3.4.17",
|
|
136
136
|
"fflate": "^0.8.3",
|
|
137
137
|
"lru-cache": "^10.4.3",
|
|
@@ -140,23 +140,23 @@
|
|
|
140
140
|
},
|
|
141
141
|
"peerDependencies": {
|
|
142
142
|
"react": "^19.2.8",
|
|
143
|
-
"@epam/ai-dial-attachment-canvas": "1.4.0-dev.
|
|
144
|
-
"@epam/ai-dial-attachment-input": "1.4.0-dev.
|
|
145
|
-
"@epam/ai-dial-catalog": "1.4.0-dev.
|
|
146
|
-
"@epam/ai-dial-chat-overlay": "1.4.0-dev.
|
|
147
|
-
"@epam/ai-dial-chat-shared": "1.4.0-dev.
|
|
148
|
-
"@epam/ai-dial-conversation-input": "1.4.0-dev.
|
|
149
|
-
"@epam/ai-dial-mcp-apps": "1.4.0-dev.
|
|
150
|
-
"@epam/ai-dial-projects": "1.4.0-dev.
|
|
151
|
-
"@epam/ai-dial-publish-panel": "1.4.0-dev.
|
|
152
|
-
"@epam/ai-dial-quotations": "1.4.0-dev.
|
|
143
|
+
"@epam/ai-dial-attachment-canvas": "1.4.0-dev.176",
|
|
144
|
+
"@epam/ai-dial-attachment-input": "1.4.0-dev.176",
|
|
145
|
+
"@epam/ai-dial-catalog": "1.4.0-dev.176",
|
|
146
|
+
"@epam/ai-dial-chat-overlay": "1.4.0-dev.176",
|
|
147
|
+
"@epam/ai-dial-chat-shared": "1.4.0-dev.176",
|
|
148
|
+
"@epam/ai-dial-conversation-input": "1.4.0-dev.176",
|
|
149
|
+
"@epam/ai-dial-mcp-apps": "1.4.0-dev.176",
|
|
150
|
+
"@epam/ai-dial-projects": "1.4.0-dev.176",
|
|
151
|
+
"@epam/ai-dial-publish-panel": "1.4.0-dev.176",
|
|
152
|
+
"@epam/ai-dial-quotations": "1.4.0-dev.176",
|
|
153
153
|
"@epam/ai-dial-react-file-manager": "^0.5.0",
|
|
154
|
-
"@epam/ai-dial-scheduled-tasks": "1.4.0-dev.
|
|
155
|
-
"@epam/ai-dial-share": "1.4.0-dev.
|
|
156
|
-
"@epam/ai-dial-skill-editor": "1.4.0-dev.
|
|
157
|
-
"@epam/ai-dial-source-panel": "1.4.0-dev.
|
|
154
|
+
"@epam/ai-dial-scheduled-tasks": "1.4.0-dev.176",
|
|
155
|
+
"@epam/ai-dial-share": "1.4.0-dev.176",
|
|
156
|
+
"@epam/ai-dial-skill-editor": "1.4.0-dev.176",
|
|
157
|
+
"@epam/ai-dial-source-panel": "1.4.0-dev.176",
|
|
158
158
|
"@epam/ai-dial-ui-kit": "^0.17.0",
|
|
159
|
-
"@epam/ai-dial-usage-dashboard": "1.4.0-dev.
|
|
159
|
+
"@epam/ai-dial-usage-dashboard": "1.4.0-dev.176",
|
|
160
160
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
161
161
|
"@epam/pdf-highlighter-kit": "^0.0.23"
|
|
162
162
|
},
|
package/utils.js
CHANGED
|
@@ -10,20 +10,20 @@ import { getRunnerSchemas as C, isCustomAppSchema as w, isQuickAppSchema as T }
|
|
|
10
10
|
import { buildExternalServiceScopeId as E, getExternalServiceFallbackName as D, parseExternalServiceUrl as O } from "./shared/external-services.js";
|
|
11
11
|
import { SaveDestinationRoot as k } from "./catalog/save-destination-root.js";
|
|
12
12
|
import { OrgUnitsStatus as A } from "./org-units/types.js";
|
|
13
|
-
import {
|
|
14
|
-
import { buildPromptExportEnvelope as
|
|
15
|
-
import { PROMPT_CONTENT_MAX_LENGTH as
|
|
16
|
-
import { usePromptsState as
|
|
17
|
-
import { getBrowserTimezone as
|
|
18
|
-
import { apSchedulerDayToJsDay as
|
|
19
|
-
import { isValidAbsoluteUrl as
|
|
20
|
-
import { EXTERNAL_SERVICE_SIGNIN_METHOD as
|
|
21
|
-
import { ColorScheme as
|
|
22
|
-
import { useUsageData as
|
|
23
|
-
import { triggerBrowserDownload as
|
|
24
|
-
import { usePersistedState as
|
|
25
|
-
import { useAppVersionCheck as
|
|
26
|
-
import { getCleanedLocationTarget as
|
|
27
|
-
import { useOrgUnits as
|
|
28
|
-
import { useFolderGuards as
|
|
29
|
-
export {
|
|
13
|
+
import { NO_DIRECT_AVAILABILITY as j, OrgUnitFolderGuardPurpose as M, buildFolderGuards as N, getCatalogPublishDirectAvailability as P, getDependencyOrgUnitNamespaces as F, getDependencyTypeOfNamespace as I, getMissingDirectWriteNamespaces as L, getOrgUnitNamespace as R, getPublishDirectAvailability as z, hasBlockingFolderReference as B, toPublishDisabledReason as V } from "./org-units/org-unit-guards.js";
|
|
14
|
+
import { buildPromptExportEnvelope as H, buildPromptExportFileName as U, serializePromptExport as W } from "./prompt/export-prompt.js";
|
|
15
|
+
import { PROMPT_CONTENT_MAX_LENGTH as G, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as K, PROMPT_DESCRIPTION_MAX_LENGTH as q, PROMPT_FIELD_VALIDATORS as J, PROMPT_NAME_MAX_LENGTH as Y, PromptFieldError as X, buildPromptPath as Z, getRemainingCharacters as Q, validatePromptContent as $, validatePromptDescription as ee, validatePromptName as te } from "./prompt/prompt.js";
|
|
16
|
+
import { usePromptsState as ne } from "./prompt/usePromptsState/usePromptsState.js";
|
|
17
|
+
import { getBrowserTimezone as re } from "./shared/browser-timezone.js";
|
|
18
|
+
import { apSchedulerDayToJsDay as ie, jsDayToApSchedulerDay as ae } from "./shared/cron-weekday.js";
|
|
19
|
+
import { isValidAbsoluteUrl as oe, isValidFeaturesData as se, parseFeaturesData as ce } from "./shared/custom-apps.js";
|
|
20
|
+
import { EXTERNAL_SERVICE_SIGNIN_METHOD as le, PendingSigninEventKind as ue, TOOLSET_SIGNIN_METHOD as de } from "./shared/client-channel.js";
|
|
21
|
+
import { ColorScheme as fe, applyThemeColors as pe, getOsPreferredTheme as me } from "./shared/theme-colors.js";
|
|
22
|
+
import { useUsageData as he } from "./usage/useUsageData/useUsageData.js";
|
|
23
|
+
import { triggerBrowserDownload as ge } from "./files/browser-download.js";
|
|
24
|
+
import { usePersistedState as _e } from "./shared/usePersistedState/usePersistedState.js";
|
|
25
|
+
import { useAppVersionCheck as ve } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
|
|
26
|
+
import { getCleanedLocationTarget as ye } from "./shared/url-cleanup.js";
|
|
27
|
+
import { useOrgUnits as be } from "./org-units/useOrgUnits/useOrgUnits.js";
|
|
28
|
+
import { useFolderGuards as xe } from "./org-units/useFolderGuards/useFolderGuards.js";
|
|
29
|
+
export { fe as ColorScheme, le as EXTERNAL_SERVICE_SIGNIN_METHOD, j as NO_DIRECT_AVAILABILITY, M as OrgUnitFolderGuardPurpose, A as OrgUnitsStatus, G as PROMPT_CONTENT_MAX_LENGTH, K as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, q as PROMPT_DESCRIPTION_MAX_LENGTH, J as PROMPT_FIELD_VALIDATORS, Y as PROMPT_NAME_MAX_LENGTH, ue as PendingSigninEventKind, X as PromptFieldError, x as PromptSource, k as SaveDestinationRoot, de as TOOLSET_SIGNIN_METHOD, ie as apSchedulerDayToJsDay, p as appendLocaleCode, pe as applyThemeColors, m as buildAdditionalLocaleOptions, E as buildExternalServiceScopeId, N as buildFolderGuards, H as buildPromptExportEnvelope, U as buildPromptExportFileName, Z as buildPromptPath, h as composeLocalePayload, o as createCsrfMiddleware, s as createUnauthorizedMiddleware, g as decomposeLocalizedFields, y as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, re as getBrowserTimezone, P as getCatalogPublishDirectAvailability, ye as getCleanedLocationTarget, F as getDependencyOrgUnitNamespaces, I as getDependencyTypeOfNamespace, D as getExternalServiceFallbackName, L as getMissingDirectWriteNamespaces, R as getOrgUnitNamespace, me as getOsPreferredTheme, z as getPublishDirectAvailability, Q as getRemainingCharacters, C as getRunnerSchemas, B as hasBlockingFolderReference, c as includesIgnoreCase, i as isConversationNotFoundError, w as isCustomAppSchema, T as isQuickAppSchema, oe as isValidAbsoluteUrl, se as isValidFeaturesData, ae as jsDayToApSchedulerDay, b as padTwoDigits, O as parseExternalServiceUrl, ce as parseFeaturesData, S as parsePromptResourceUrl, _ as resolveLocalizedText, l as safeDecodeURI, u as safeDecodeURIComponent, W as serializePromptExport, d as stripSurroundingSlashes, f as stripTrailingSlashes, v as toBaseLocale, V as toPublishDisabledReason, ge as triggerBrowserDownload, ve as useAppVersionCheck, xe as useFolderGuards, be as useOrgUnits, _e as usePersistedState, ne as usePromptsState, he as useUsageData, $ as validatePromptContent, ee as validatePromptDescription, te as validatePromptName, a as withApiErrorMapping };
|