@epam/ai-dial-chat-hooks 1.4.0-dev.83 → 1.4.0-dev.89

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.
Files changed (57) hide show
  1. package/catalog/create-publish-api.d.ts +7 -1
  2. package/catalog/create-publish-api.d.ts.map +1 -1
  3. package/catalog/create-publish-api.js +5 -0
  4. package/catalog/resource-save-adapter.d.ts +7 -2
  5. package/catalog/resource-save-adapter.d.ts.map +1 -1
  6. package/catalog/resource-save-adapters.d.ts +32 -7
  7. package/catalog/resource-save-adapters.d.ts.map +1 -1
  8. package/catalog/resource-save-adapters.js +47 -41
  9. package/catalog/resource-save.d.ts +17 -9
  10. package/catalog/resource-save.d.ts.map +1 -1
  11. package/catalog/resource-save.js +34 -25
  12. package/catalog/save-destination-root.d.ts +12 -0
  13. package/catalog/save-destination-root.d.ts.map +1 -0
  14. package/catalog/save-destination-root.js +6 -0
  15. package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -2
  16. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
  17. package/catalog/usePublishFolders/usePublishFolders.js +29 -29
  18. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +7 -3
  19. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -1
  20. package/catalog/useResourceSavePanel/useResourceSavePanel.js +107 -97
  21. package/catalog.js +9 -8
  22. package/entry-points/usage-limits.d.ts +1 -0
  23. package/entry-points/usage-limits.d.ts.map +1 -1
  24. package/entry-points/utils.d.ts +3 -0
  25. package/entry-points/utils.d.ts.map +1 -1
  26. package/index.d.ts +4 -0
  27. package/index.d.ts.map +1 -1
  28. package/index.js +191 -187
  29. package/org-units/models.d.ts +3 -1
  30. package/org-units/models.d.ts.map +1 -1
  31. package/org-units/org-unit-guards.d.ts +64 -0
  32. package/org-units/org-unit-guards.d.ts.map +1 -0
  33. package/org-units/org-unit-guards.js +28 -0
  34. package/org-units/useFolderGuards/useFolderGuards.d.ts +31 -0
  35. package/org-units/useFolderGuards/useFolderGuards.d.ts.map +1 -0
  36. package/org-units/useFolderGuards/useFolderGuards.js +50 -0
  37. package/org-units/useOrgUnits/useOrgUnits.d.ts +18 -3
  38. package/org-units/useOrgUnits/useOrgUnits.d.ts.map +1 -1
  39. package/org-units/useOrgUnits/useOrgUnits.js +43 -23
  40. package/package.json +18 -18
  41. package/skill/useSkillEditorSubmit.d.ts +4 -1
  42. package/skill/useSkillEditorSubmit.d.ts.map +1 -1
  43. package/skill/useSkillEditorSubmit.js +125 -121
  44. package/usage/map-usage-data-to-dashboard.d.ts +22 -1
  45. package/usage/map-usage-data-to-dashboard.d.ts.map +1 -1
  46. package/usage/map-usage-data-to-dashboard.js +33 -2
  47. package/usage/spending-limits-mode.d.ts +37 -0
  48. package/usage/spending-limits-mode.d.ts.map +1 -0
  49. package/usage/spending-limits-mode.js +15 -0
  50. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +6 -2
  51. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -1
  52. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +4 -1
  53. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -1
  54. package/usage/useUsageLimitBanner/useUsageLimitBanner.js +55 -47
  55. package/usage-limits.js +6 -5
  56. package/usage.js +3 -3
  57. package/utils.js +19 -16
@@ -0,0 +1,64 @@
1
+ import { OrgUnitNamespace } from '@epam/ai-dial-chat-shared';
2
+ import { CatalogPublishEntityType } from '../catalog/publish';
3
+ import { SaveDestinationRoot } from '../catalog/save-destination-root';
4
+ import { OrgUnitsStatus } from './types';
5
+ import { OrgUnitRightCheck } from './useOrgUnits/useOrgUnits';
6
+ /**
7
+ * The Core namespace an org unit grants rights on for a publishable resource
8
+ * type. Quick App, schema-form and custom applications are all `application`.
9
+ * A model is never saved or published by a user, so it has no namespace. A
10
+ * conversation has no catalog entity type; its containers pass
11
+ * `OrgUnitNamespace.Conversations` directly.
12
+ * @param entityType - the publish API's entity type
13
+ */
14
+ export declare const getOrgUnitNamespace: (entityType: CatalogPublishEntityType) => OrgUnitNamespace | undefined;
15
+ /** Which panel the guards are built for; picks the right they check. */
16
+ export declare enum OrgUnitFolderGuardPurpose {
17
+ /** A save destination is usable outside every unit, and inside one only with `write` on its owner. */
18
+ Save = "save",
19
+ /** A publication request needs `read` on the owning unit. */
20
+ Publish = "publish"
21
+ }
22
+ /** Inputs of {@link buildFolderGuards}. */
23
+ export interface BuildFolderGuardsParams {
24
+ purpose: OrgUnitFolderGuardPurpose;
25
+ /** Whether the `orgUnitsEnabled` feature flag is on. */
26
+ isEnabled: boolean;
27
+ /** Load status from `useOrgUnits`. */
28
+ status: OrgUnitsStatus;
29
+ /** Namespace of the resource type, from {@link getOrgUnitNamespace}; `undefined` turns the guards off. */
30
+ namespace: OrgUnitNamespace | undefined;
31
+ canSaveAt: OrgUnitRightCheck;
32
+ canPublishAt: OrgUnitRightCheck;
33
+ /** Strict check from `useOrgUnits`; omit it when the panel has no direct save. */
34
+ canSaveDirectlyAt?: OrgUnitRightCheck;
35
+ /** The host's translated reason shown for a disabled folder; without it `getDisabledReason` is `undefined`. */
36
+ getReason?: (folderPath: string[]) => string;
37
+ }
38
+ /** Guards a panel passes to its folder tree; both are `undefined` while the rule does not apply. */
39
+ export interface FolderGuards {
40
+ /** Whether a destination is usable for the panel's purpose (Save: `canSaveAt`, Publish: `canPublishAt`); a host passes it to `usePublishFolders` as `canPublishTo`, where it replaces the `Production` placeholder. Only the Organization root is matched against units: any other `root` is always usable, and an omitted `root` means Organization (the publish panels' only tree). */
41
+ isDestinationUsable: ((folderPath: string[], root?: SaveDestinationRoot) => boolean) | undefined;
42
+ /** The reason a destination is disabled, or `undefined` when it is usable; `root` follows the same rule as in `isDestinationUsable`. */
43
+ getDisabledReason: ((folderPath: string[], root?: SaveDestinationRoot) => string | undefined) | undefined;
44
+ /** Whether a save may write straight into the destination (inside an org unit that grants `write`); like `isDestinationUsable`, only the Organization root (or an omitted root) can be a unit, so a Personal folder never direct-writes. `undefined` while the rule does not apply or no check was given. */
45
+ canSaveDirectlyTo: ((folderPath: string[], root?: SaveDestinationRoot) => boolean) | undefined;
46
+ }
47
+ /**
48
+ * Builds the folder guards from the org-unit answers. They exist only with the
49
+ * feature flag on, status `Ready` and a namespace; otherwise both are
50
+ * `undefined`, so a panel keeps today's behaviour (the `Production`
51
+ * placeholder, no disabled rows).
52
+ * @param params - flag, status, namespace, the hook's right checks and the reason text callback
53
+ */
54
+ export declare const buildFolderGuards: ({ purpose, isEnabled, status, namespace, canSaveAt, canPublishAt, canSaveDirectlyAt, getReason, }: BuildFolderGuardsParams) => FolderGuards;
55
+ /**
56
+ * Adapts a guard's `getDisabledReason(folderPath)` to the publish panels'
57
+ * `getDisabledReason(destination)`: a publish tree has one root, so only the
58
+ * path is judged.
59
+ * @param getDisabledReason - the guard's callback, or `undefined` while the rule does not apply
60
+ */
61
+ export declare const toPublishDisabledReason: (getDisabledReason: ((folderPath: string[]) => string | undefined) | undefined) => ((destination: {
62
+ path: string[];
63
+ }) => string | undefined) | undefined;
64
+ //# sourceMappingURL=org-unit-guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org-unit-guards.d.ts","sourceRoot":"","sources":["../../src/org-units/org-unit-guards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,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,oBA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CAAC,WAAW,EAAE;IAAE,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,KAAK,MAAM,GAAG,SAAS,CAAC,GAAG,SACc,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { SaveDestinationRoot as e } from "../catalog/save-destination-root.js";
2
+ import { OrgUnitsStatus as t } from "./types.js";
3
+ import { OrgUnitNamespace as n } from "@epam/ai-dial-chat-shared";
4
+ //#region src/org-units/org-unit-guards.ts
5
+ var r = {
6
+ model: void 0,
7
+ toolset: n.Toolsets,
8
+ application: n.Applications,
9
+ prompt: n.Prompts,
10
+ skill: n.Skills,
11
+ project: n.Projects
12
+ }, i = (e) => r[e], a = /* @__PURE__ */ function(e) {
13
+ return e.Save = "save", e.Publish = "publish", e;
14
+ }({}), o = ({ purpose: n, isEnabled: r, status: i, namespace: a, canSaveAt: o, canPublishAt: s, canSaveDirectlyAt: c, getReason: l }) => {
15
+ if (!r || i !== t.Ready || a == null) return {
16
+ isDestinationUsable: void 0,
17
+ getDisabledReason: void 0,
18
+ canSaveDirectlyTo: void 0
19
+ };
20
+ let u = n === "save" ? o : s, d = (t, n = e.Organization) => n !== e.Organization || u(t.join("/"), a);
21
+ return {
22
+ isDestinationUsable: d,
23
+ canSaveDirectlyTo: c && ((t, n = e.Organization) => n === e.Organization && c(t.join("/"), a)),
24
+ getDisabledReason: l && ((e, t) => d(e, t) ? void 0 : l(e))
25
+ };
26
+ }, s = (e) => e && ((t) => e(t.path));
27
+ //#endregion
28
+ export { a as OrgUnitFolderGuardPurpose, o as buildFolderGuards, i as getOrgUnitNamespace, s as toPublishDisabledReason };
@@ -0,0 +1,31 @@
1
+ import { OrgUnitNamespace } from '@epam/ai-dial-chat-shared';
2
+ import { OrgUnitFolderGuardPurpose, FolderGuards } from '../org-unit-guards';
3
+ import { UseOrgUnitsResult } from '../useOrgUnits/useOrgUnits';
4
+ /** What {@link useFolderGuards} reads from `useOrgUnits`. */
5
+ export type FolderGuardsOrgUnits = Pick<UseOrgUnitsResult, 'status' | 'ensureUnits' | 'refreshUnits' | 'canSaveAt' | 'canPublishAt' | 'canSaveDirectlyAt'>;
6
+ /** Parameters of {@link useFolderGuards}. */
7
+ export interface UseFolderGuardsParams {
8
+ /** Save uses `canSaveAt` (and the strict direct-save check), Publish uses `canPublishAt`. */
9
+ purpose: OrgUnitFolderGuardPurpose;
10
+ /** Core namespace of the resource; `undefined` turns the guards off. */
11
+ namespace: OrgUnitNamespace | undefined;
12
+ /** Whether the panel is open; the org-unit read starts only while it is true. */
13
+ isActive: boolean;
14
+ /** Whether the host's `orgUnitsEnabled` feature flag is on. */
15
+ isEnabled: boolean;
16
+ /** The result of `useOrgUnits` (the host usually shares one through a context). */
17
+ orgUnits: FolderGuardsOrgUnits;
18
+ /** Re-read already loaded rights each time the panel opens, so a right that changed since is honoured. Defaults to `false`. */
19
+ shouldRefreshOnOpen?: boolean;
20
+ /** The host's translated reason shown for a disabled folder; without it `getDisabledReason` is `undefined`. Keep its identity stable (memoise it): a new function each render rebuilds the guards and so re-renders the folder tree. */
21
+ getReason?: (folderPath: string[]) => string;
22
+ }
23
+ /**
24
+ * The org-unit folder guards of a Save or Publish panel: starts the org-unit
25
+ * read while the panel is active, optionally re-reads loaded rights on open,
26
+ * and builds the guards, which exist only with the flag on and the rights
27
+ * `Ready`.
28
+ * @param params - purpose, namespace, flag, the org-unit result and the reason callback
29
+ */
30
+ export declare const useFolderGuards: ({ purpose, namespace, isActive, isEnabled, orgUnits, shouldRefreshOnOpen, getReason, }: UseFolderGuardsParams) => FolderGuards;
31
+ //# sourceMappingURL=useFolderGuards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFolderGuards.d.ts","sourceRoot":"","sources":["../../../src/org-units/useFolderGuards/useFolderGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAEL,yBAAyB,EACzB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,6DAA6D;AAC7D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,iBAAiB,EACf,QAAQ,GACR,aAAa,GACb,cAAc,GACd,WAAW,GACX,cAAc,GACd,mBAAmB,CACtB,CAAC;AAEF,6CAA6C;AAC7C,MAAM,WAAW,qBAAqB;IACpC,6FAA6F;IAC7F,OAAO,EAAE,yBAAyB,CAAC;IACnC,wEAAwE;IACxE,SAAS,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACxC,iFAAiF;IACjF,QAAQ,EAAE,OAAO,CAAC;IAClB,+DAA+D;IAC/D,SAAS,EAAE,OAAO,CAAC;IACnB,mFAAmF;IACnF,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,+HAA+H;IAC/H,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,wOAAwO;IACxO,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;CAC9C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,wFAQ7B,qBAAqB,KAAG,YAkD1B,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { OrgUnitsStatus as e } from "../types.js";
2
+ import { OrgUnitFolderGuardPurpose as t, buildFolderGuards as n } from "../org-unit-guards.js";
3
+ import { useEffect as r, useMemo as i, useRef as a } from "react";
4
+ //#region src/org-units/useFolderGuards/useFolderGuards.ts
5
+ var o = ({ purpose: o, namespace: s, isActive: c, isEnabled: l, orgUnits: u, shouldRefreshOnOpen: d = !1, getReason: f }) => {
6
+ let { status: p, ensureUnits: m, refreshUnits: h, canSaveAt: g, canPublishAt: _, canSaveDirectlyAt: v } = u, y = a({
7
+ status: p,
8
+ refreshUnits: h
9
+ });
10
+ return r(() => {
11
+ y.current = {
12
+ status: p,
13
+ refreshUnits: h
14
+ };
15
+ }, [p, h]), r(() => {
16
+ c && l && m();
17
+ }, [
18
+ c,
19
+ l,
20
+ m
21
+ ]), r(() => {
22
+ if (!c || !l || !d) return;
23
+ let { status: t, refreshUnits: n } = y.current;
24
+ t === e.Ready && n();
25
+ }, [
26
+ c,
27
+ l,
28
+ d
29
+ ]), i(() => n({
30
+ purpose: o,
31
+ isEnabled: l,
32
+ status: p,
33
+ namespace: s,
34
+ canSaveAt: g,
35
+ canPublishAt: _,
36
+ canSaveDirectlyAt: o === t.Save ? v : void 0,
37
+ getReason: f
38
+ }), [
39
+ o,
40
+ s,
41
+ l,
42
+ p,
43
+ g,
44
+ _,
45
+ v,
46
+ f
47
+ ]);
48
+ };
49
+ //#endregion
50
+ export { o as useFolderGuards };
@@ -1,3 +1,4 @@
1
+ import { OrgUnitNamespace } from '@epam/ai-dial-chat-shared';
1
2
  import { OrgUnitsListResult } from '../models';
2
3
  import { OrgUnitsStatus } from '../types';
3
4
  /** Options for {@link useOrgUnits}. */
@@ -5,15 +6,29 @@ export interface UseOrgUnitsOptions {
5
6
  /** Reads the org units visible to the current user; supplied by the host. */
6
7
  listOrgUnits: () => Promise<OrgUnitsListResult>;
7
8
  }
9
+ /** Answers whether an action is allowed at a decoded public-relative path for a Core namespace. */
10
+ export type OrgUnitRightCheck = (publicPath: string, namespace: OrgUnitNamespace) => boolean;
8
11
  /** State returned by {@link useOrgUnits}. */
9
12
  export interface UseOrgUnitsResult {
10
13
  /** Load state of the units. */
11
14
  status: OrgUnitsStatus;
12
15
  /** Starts the read on its first call, and again after a failed read; otherwise does nothing. */
13
16
  ensureUnits: () => void;
14
- /** Whether a public-bucket path is a unit's own folder; `false` until the units are loaded. */
15
- isOrgUnitFolder: (publicPath: string) => boolean;
17
+ /** Reads the units again while the previous answer stays in use; does nothing once Core reported org units off. */
18
+ refreshUnits: () => void;
19
+ /** Whether the path is a usable save destination: `true` outside every unit, otherwise needs `write`; `true` until the status is `Ready`. */
20
+ canSaveAt: OrgUnitRightCheck;
21
+ /** Whether the user may write straight into the path: it lies inside an org unit that grants `write`. `false` until the status is `Ready` and outside every unit, even for a DIAL admin. */
22
+ canSaveDirectlyAt: OrgUnitRightCheck;
23
+ /** Whether a publication request into the path can be sent; `true` until the status is `Ready`. */
24
+ canPublishAt: OrgUnitRightCheck;
16
25
  }
17
- /** Loads the current user's org units once, on demand, and answers which public folders are units. */
26
+ /**
27
+ * Loads the current user's org units once, on demand, and answers save, direct-save
28
+ * and publication-request rights per path. Until the status is `Ready` (and in
29
+ * `Disabled` and `Error`) every answer is `true` except `canSaveDirectlyAt`, so missing
30
+ * data never disables a folder.
31
+ * @param options - the host-supplied `listOrgUnits` read
32
+ */
18
33
  export declare const useOrgUnits: ({ listOrgUnits, }: UseOrgUnitsOptions) => UseOrgUnitsResult;
19
34
  //# sourceMappingURL=useOrgUnits.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useOrgUnits.d.ts","sourceRoot":"","sources":["../../../src/org-units/useOrgUnits/useOrgUnits.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,YAAY,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACjD;AAED,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,gGAAgG;IAChG,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,+FAA+F;IAC/F,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;CAClD;AAED,sGAAsG;AACtG,eAAO,MAAM,WAAW,GAAI,mBAEzB,kBAAkB,KAAG,iBAoDvB,CAAC"}
1
+ {"version":3,"file":"useOrgUnits.d.ts","sourceRoot":"","sources":["../../../src/org-units/useOrgUnits/useOrgUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,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,kBAAkB;IACjC,6EAA6E;IAC7E,YAAY,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACjD;AAED,mGAAmG;AACnG,MAAM,MAAM,iBAAiB,GAAG,CAC9B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,gBAAgB,KACxB,OAAO,CAAC;AAEb,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,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;CACjC;AAID;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,mBAEzB,kBAAkB,KAAG,iBAiGvB,CAAC"}
@@ -1,34 +1,54 @@
1
1
  import { OrgUnitsStatus as e } from "../types.js";
2
- import { isOrgUnitFolder as t, toOrgUnitFolderSet as n } from "@epam/ai-dial-chat-shared";
3
- import { useCallback as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
2
+ import { canRequestPublicationAt as t, canSaveToFolderAt as n, canWriteIntoOrgUnitAt as r } from "@epam/ai-dial-chat-shared";
3
+ import { useCallback as i, useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
4
4
  //#region src/org-units/useOrgUnits/useOrgUnits.ts
5
- var c = ({ listOrgUnits: c }) => {
6
- let [l, u] = s([]), [d, f] = s(e.Idle), p = o(!1), m = o(!0), h = o(c);
7
- h.current = c, i(() => (m.current = !0, () => {
8
- m.current = !1;
5
+ var l = {
6
+ hasAdminAccess: !1,
7
+ units: []
8
+ }, u = ({ listOrgUnits: u }) => {
9
+ let [d, f] = c(l), [p, m] = c(e.Idle), h = s(!1), g = s(p);
10
+ g.current = p;
11
+ let _ = s(!0), v = s(u);
12
+ v.current = u, a(() => (_.current = !0, () => {
13
+ _.current = !1;
9
14
  }), []);
10
- let g = r(async () => {
11
- f(e.Loading);
15
+ let y = i(async (t) => {
16
+ t || m(e.Loading);
12
17
  try {
13
- let t = await h.current();
14
- if (!m.current) return;
18
+ let t = await v.current();
19
+ if (!_.current) return;
15
20
  if (!t.enabled) {
16
- u([]), f(e.Disabled);
21
+ f(l), m(e.Disabled);
17
22
  return;
18
23
  }
19
- u(t.units), f(e.Ready);
24
+ f({
25
+ hasAdminAccess: t.hasAdminAccess,
26
+ units: t.units
27
+ }), m(e.Ready);
20
28
  } catch {
21
- if (p.current = !1, !m.current) return;
22
- u([]), f(e.Error);
29
+ if (t || (h.current = !1, !_.current)) return;
30
+ f(l), m(e.Error);
23
31
  }
24
- }, []), _ = r(() => {
25
- p.current || (p.current = !0, g());
26
- }, [g]), v = a(() => n(l), [l]);
27
- return {
28
- status: d,
29
- ensureUnits: _,
30
- isOrgUnitFolder: r((n) => d === e.Ready && t(v, n), [d, v])
31
- };
32
+ }, []), b = i(() => {
33
+ h.current || (h.current = !0, y(!1));
34
+ }, [y]), x = i(() => {
35
+ g.current !== e.Disabled && (g.current === e.Ready ? y(!0) : b());
36
+ }, [b, y]), S = p === e.Ready, C = i((e, t) => !S || n(d, e, t), [S, d]), w = i((e, t) => S && r(d, e, t), [S, d]), T = i((e, n) => !S || t(d, e, n), [S, d]);
37
+ return o(() => ({
38
+ status: p,
39
+ ensureUnits: b,
40
+ refreshUnits: x,
41
+ canSaveAt: C,
42
+ canSaveDirectlyAt: w,
43
+ canPublishAt: T
44
+ }), [
45
+ p,
46
+ b,
47
+ x,
48
+ C,
49
+ w,
50
+ T
51
+ ]);
32
52
  };
33
53
  //#endregion
34
- export { c as useOrgUnits };
54
+ export { u as useOrgUnits };
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.83",
4
+ "version": "1.4.0-dev.89",
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.83",
134
+ "@epam/ai-dial-chat-api-client": "1.4.0-dev.89",
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.83",
144
- "@epam/ai-dial-attachment-input": "1.4.0-dev.83",
145
- "@epam/ai-dial-catalog": "1.4.0-dev.83",
146
- "@epam/ai-dial-chat-overlay": "1.4.0-dev.83",
147
- "@epam/ai-dial-chat-shared": "1.4.0-dev.83",
148
- "@epam/ai-dial-conversation-input": "1.4.0-dev.83",
149
- "@epam/ai-dial-mcp-apps": "1.4.0-dev.83",
150
- "@epam/ai-dial-projects": "1.4.0-dev.83",
151
- "@epam/ai-dial-publish-panel": "1.4.0-dev.83",
152
- "@epam/ai-dial-quotations": "1.4.0-dev.83",
153
- "@epam/ai-dial-react-file-manager": "^0.4.2",
154
- "@epam/ai-dial-scheduled-tasks": "1.4.0-dev.83",
155
- "@epam/ai-dial-share": "1.4.0-dev.83",
156
- "@epam/ai-dial-skill-editor": "1.4.0-dev.83",
157
- "@epam/ai-dial-source-panel": "1.4.0-dev.83",
143
+ "@epam/ai-dial-attachment-canvas": "1.4.0-dev.89",
144
+ "@epam/ai-dial-attachment-input": "1.4.0-dev.89",
145
+ "@epam/ai-dial-catalog": "1.4.0-dev.89",
146
+ "@epam/ai-dial-chat-overlay": "1.4.0-dev.89",
147
+ "@epam/ai-dial-chat-shared": "1.4.0-dev.89",
148
+ "@epam/ai-dial-conversation-input": "1.4.0-dev.89",
149
+ "@epam/ai-dial-mcp-apps": "1.4.0-dev.89",
150
+ "@epam/ai-dial-projects": "1.4.0-dev.89",
151
+ "@epam/ai-dial-publish-panel": "1.4.0-dev.89",
152
+ "@epam/ai-dial-quotations": "1.4.0-dev.89",
153
+ "@epam/ai-dial-react-file-manager": "^0.4.3",
154
+ "@epam/ai-dial-scheduled-tasks": "1.4.0-dev.89",
155
+ "@epam/ai-dial-share": "1.4.0-dev.89",
156
+ "@epam/ai-dial-skill-editor": "1.4.0-dev.89",
157
+ "@epam/ai-dial-source-panel": "1.4.0-dev.89",
158
158
  "@epam/ai-dial-ui-kit": "^0.16.0",
159
- "@epam/ai-dial-usage-dashboard": "1.4.0-dev.83",
159
+ "@epam/ai-dial-usage-dashboard": "1.4.0-dev.89",
160
160
  "@modelcontextprotocol/sdk": "^1.32.2",
161
161
  "@epam/pdf-highlighter-kit": "^0.0.22"
162
162
  },
@@ -2,6 +2,7 @@ import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
2
2
  import { SkillEditorErrors, SkillEditorValues, SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
3
3
  import { NotificationVariant } from '@epam/ai-dial-ui-kit';
4
4
  import { ResourceSaveAdapter } from '../catalog/resource-save-adapter';
5
+ import { ResourceSavePublishClient } from '../catalog/resource-save-adapters';
5
6
  import { SkillFileContent } from './skill-file-preview';
6
7
  type SubmitPhase = 'idle' | 'submitting' | 'success' | 'failure';
7
8
  /** Already-configured DIAL Core write operations `useSkillEditorSubmit` needs. */
@@ -87,6 +88,8 @@ export interface UseSkillEditorSubmitParams {
87
88
  refetchSkills: () => Promise<void>;
88
89
  /** Already-configured create/update operations. */
89
90
  client: SkillEditorSubmitClient;
91
+ /** Client whose `copyCatalogEntityToOrgUnit` the direct write into an org unit calls; without it the Save panel offers no direct write for skills. */
92
+ publishClient?: ResourceSavePublishClient;
90
93
  /** Localized messages, resolved by the host. */
91
94
  messages: SkillEditorSubmitMessages;
92
95
  /** Called with `returnUrl` after a successful save. */
@@ -134,6 +137,6 @@ export interface UseSkillEditorSubmitResult {
134
137
  * `client.createSkill`/`client.updateSkill`, and mapping the resulting
135
138
  * success/error/conflict outcomes to presentable state.
136
139
  */
137
- export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, contentRevisions, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, messages, onNavigate, onNotify, onSaveRequest, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
140
+ export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, contentRevisions, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, publishClient, messages, onNavigate, onNotify, onSaveRequest, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
138
141
  export {};
139
142
  //# sourceMappingURL=useSkillEditorSubmit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSkillEditorSubmit.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillEditorSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,kCAAkC,CAAC;AAW1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ7D,KAAK,WAAW,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,SAA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