@epam/ai-dial-chat-hooks 1.4.0-dev.140 → 1.4.0-dev.143
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/create-publish-api.d.ts +1 -10
- package/catalog/create-publish-api.d.ts.map +1 -1
- package/catalog/create-publish-api.js +1 -9
- package/catalog/resource-save.d.ts +2 -4
- package/catalog/resource-save.d.ts.map +1 -1
- package/catalog/resource-save.js +20 -22
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +5 -10
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -1
- package/catalog/useResourceSavePanel/useResourceSavePanel.js +117 -148
- package/catalog.js +51 -51
- package/index.js +252 -252
- package/package.json +17 -17
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { ApplicationValuesDependenciesRequestDto, CopyCatalogEntityToOrgUnitDto, PublishApi, PublishCatalogEntityDto, PublishHistoryEntryDto, PublishResultDto,
|
|
2
|
-
import { PublicationRule } from '@epam/ai-dial-publish-panel';
|
|
1
|
+
import { ApplicationValuesDependenciesRequestDto, CopyCatalogEntityToOrgUnitDto, PublishApi, PublishCatalogEntityDto, PublishHistoryEntryDto, PublishResultDto, PublishTargetCheckDto, ResourceIdResponseDto, ResourceDependenciesResultDto, UnpublishAccessDto, UnpublishCatalogEntityDto, UnpublishResultDto, VersionStatusEntryDto } from '@epam/ai-dial-chat-api-client';
|
|
3
2
|
import { CatalogPublishEntityType } from './publish';
|
|
4
|
-
/**
|
|
5
|
-
* Converts a `PublicationRule` (publish-panel lib model) to the generated
|
|
6
|
-
* client's `PublishRuleDto` shape. The two differ only in how the comparison
|
|
7
|
-
* function is typed, so the value passes through unchanged.
|
|
8
|
-
*/
|
|
9
|
-
export declare const toPublishRuleDto: (rule: PublicationRule) => PublishRuleDto;
|
|
10
3
|
/** The DIAL publish API surface produced by {@link createPublishApiClient}. */
|
|
11
4
|
export interface PublishApiClient {
|
|
12
5
|
/** Submits a publication request for one catalog entity into `folderPath`. */
|
|
@@ -41,8 +34,6 @@ export interface PublishApiClient {
|
|
|
41
34
|
getCatalogUnpublishAccess: (entityType: CatalogPublishEntityType, entityId: string) => Promise<UnpublishAccessDto>;
|
|
42
35
|
/** Reads the publication status of every saved version of one application or toolset. */
|
|
43
36
|
getCatalogVersionStatuses: (entityType: CatalogPublishEntityType, entityId: string) => Promise<VersionStatusEntryDto[]>;
|
|
44
|
-
/** Reads a destination folder's already-configured access rules. */
|
|
45
|
-
getPublishRules: (folderPath: string) => Promise<PublicationRule[]>;
|
|
46
37
|
/**
|
|
47
38
|
* Reads whether the published copy of one catalog entity would land on a path
|
|
48
39
|
* that is already taken, for `folderPath` (plain, `/`-joined) and `version`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-publish-api.d.ts","sourceRoot":"","sources":["../../src/catalog/create-publish-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uCAAuC,EACvC,6BAA6B,EAC7B,UAAU,EACV,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"create-publish-api.d.ts","sourceRoot":"","sources":["../../src/catalog/create-publish-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uCAAuC,EACvC,6BAA6B,EAC7B,UAAU,EACV,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAE1D,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,8EAA8E;IAC9E,oBAAoB,EAAE,CACpB,UAAU,EAAE,wBAAwB,EACpC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,uBAAuB,KAC1B,OAAO,CAAC,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|
|
|
1
1
|
//#region src/catalog/create-publish-api.ts
|
|
2
2
|
var e = (e) => ({
|
|
3
|
-
source: e.source,
|
|
4
|
-
targets: e.targets,
|
|
5
|
-
function: e.function
|
|
6
|
-
}), t = (e) => ({
|
|
7
3
|
publishCatalogEntity: (t, n, r) => e.publishCatalogEntity({
|
|
8
4
|
entityType: t,
|
|
9
5
|
entityId: n,
|
|
@@ -36,10 +32,6 @@ var e = (e) => ({
|
|
|
36
32
|
entityType: t,
|
|
37
33
|
entityId: n
|
|
38
34
|
}),
|
|
39
|
-
getPublishRules: async (t) => (await e.getPublishRules({ folderPath: t })).rules.map(({ function: e, ...t }) => ({
|
|
40
|
-
...t,
|
|
41
|
-
function: e
|
|
42
|
-
})),
|
|
43
35
|
checkPublishTarget: (t, n, r, i) => e.getCatalogPublishTarget({
|
|
44
36
|
entityType: t,
|
|
45
37
|
entityId: n,
|
|
@@ -48,4 +40,4 @@ var e = (e) => ({
|
|
|
48
40
|
})
|
|
49
41
|
});
|
|
50
42
|
//#endregion
|
|
51
|
-
export {
|
|
43
|
+
export { e as createPublishApiClient };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SaveVersionMode, FolderDestination
|
|
1
|
+
import { SaveVersionMode, FolderDestination } from '@epam/ai-dial-publish-panel';
|
|
2
2
|
import { PublishApiClient } from './create-publish-api';
|
|
3
3
|
import { CatalogPublishEntityType } from './publish';
|
|
4
4
|
import { ResourceSaveAdapter } from './resource-save-adapter';
|
|
@@ -45,13 +45,11 @@ export interface ResourceSaveChoice {
|
|
|
45
45
|
versionMode: SaveVersionMode;
|
|
46
46
|
/** The new version, used when `versionMode` is `New`. */
|
|
47
47
|
newVersion: string;
|
|
48
|
-
/** Access rules sent with the publish request for an Organization destination. */
|
|
49
|
-
rules?: PublicationRule[];
|
|
50
48
|
/** Whether the Organization destination takes a direct write (an org unit the user may write to) instead of a publish request. Defaults to `false`. */
|
|
51
49
|
isDirectWrite?: boolean;
|
|
52
50
|
}
|
|
53
51
|
/** Sends the publish request for a saved resource. */
|
|
54
|
-
export type PublishSavedResource = (entityType: CatalogPublishEntityType, id: string, folderPath: string[], version: string | undefined
|
|
52
|
+
export type PublishSavedResource = (entityType: CatalogPublishEntityType, id: string, folderPath: string[], version: string | undefined) => Promise<void>;
|
|
55
53
|
/** The result of a save whose first step succeeded. */
|
|
56
54
|
export interface ResourceSaveResult {
|
|
57
55
|
/** How the later steps ended. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-save.d.ts","sourceRoot":"","sources":["../../src/catalog/resource-save.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"resource-save.d.ts","sourceRoot":"","sources":["../../src/catalog/resource-save.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,cAAc,yBAAyB,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,KACd,mBAAmB,GAAG,SAC4C,CAAC;AAEtE,6DAA6D;AAC7D,oBAAY,mBAAmB;IAC7B,4BAA4B;IAC5B,KAAK,UAAU;IACf,4EAA4E;IAC5E,kBAAkB,uBAAuB;IACzC,yDAAyD;IACzD,qBAAqB,0BAA0B;IAC/C,+EAA+E;IAC/E,0BAA0B,+BAA+B;CAC1D;AAED,kEAAkE;AAClE,oBAAY,wBAAwB;IAClC,oDAAoD;IACpD,OAAO,YAAY;IACnB,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BAAkB,EAC1B,SAAS,oBAAoB,KAC5B,OAAO,CAAC,kBAAkB,CAqF5B,CAAC"}
|
package/catalog/resource-save.js
CHANGED
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { SaveVersionMode as i, toFolderPathKey as a } from "@epam/ai-dial-publish-panel";
|
|
1
|
+
import { ResourceSaveError as e, isResourceCreateAdapter as t } from "./resource-save-adapter.js";
|
|
2
|
+
import { SaveDestinationRoot as n } from "./save-destination-root.js";
|
|
3
|
+
import { SaveVersionMode as r, toFolderPathKey as i } from "@epam/ai-dial-publish-panel";
|
|
5
4
|
//#region src/catalog/resource-save.ts
|
|
6
|
-
var
|
|
5
|
+
var a = (e) => Object.values(n).find((t) => t === e), o = /* @__PURE__ */ function(e) {
|
|
7
6
|
return e.Saved = "saved", e.SavedButMoveFailed = "savedButMoveFailed", e.SavedButPublishFailed = "savedButPublishFailed", e.SavedButOrgUnitWriteFailed = "savedButOrgUnitWriteFailed", e;
|
|
8
|
-
}({}),
|
|
7
|
+
}({}), s = /* @__PURE__ */ function(e) {
|
|
9
8
|
return e.Invalid = "invalid", e.Unchanged = "unchanged", e.Exists = "exists", e;
|
|
10
|
-
}({}),
|
|
11
|
-
await
|
|
12
|
-
folderPath:
|
|
13
|
-
...
|
|
14
|
-
rules: o.map(e)
|
|
9
|
+
}({}), c = (e, t) => i(e) === i(t), l = (e) => async (t, n, r, i) => {
|
|
10
|
+
await e.publishCatalogEntity(t, n, {
|
|
11
|
+
folderPath: r.join("/"),
|
|
12
|
+
...i ? { version: i } : {}
|
|
15
13
|
});
|
|
16
|
-
},
|
|
17
|
-
let o = e.isVersioned &&
|
|
18
|
-
if (
|
|
14
|
+
}, u = async (e, i, a) => {
|
|
15
|
+
let o = e.isVersioned && i.versionMode === r.New, s = i.destination.rootKey === n.Organization, l = s && i.isDirectWrite === !0 && e.saveIntoOrgUnit != null, u = s ? i.currentFolderPath : i.destination.path, d, f = !1;
|
|
16
|
+
if (t(e)) ({id: d} = await e.createIn(u));
|
|
19
17
|
else if (o) {
|
|
20
18
|
if (!e.saveAsNewVersion) throw Error("This resource cannot be saved as a new version");
|
|
21
|
-
({id: d} = await e.saveAsNewVersion(
|
|
22
|
-
} else ({id: d} = await e.saveInPlace()), f = !s && !
|
|
19
|
+
({id: d} = await e.saveAsNewVersion(i.newVersion, u));
|
|
20
|
+
} else ({id: d} = await e.saveInPlace()), f = !s && !c(u, i.currentFolderPath);
|
|
23
21
|
let p = {
|
|
24
22
|
outcome: "saved",
|
|
25
23
|
savedId: d,
|
|
26
|
-
isCreated:
|
|
24
|
+
isCreated: t(e),
|
|
27
25
|
isNewVersion: o,
|
|
28
26
|
isPublished: !1,
|
|
29
27
|
isWrittenToOrgUnit: !1
|
|
30
28
|
};
|
|
31
|
-
if (f && !
|
|
29
|
+
if (f && !t(e)) try {
|
|
32
30
|
({id: p.savedId} = await e.move(d, u));
|
|
33
31
|
} catch (e) {
|
|
34
32
|
return {
|
|
@@ -37,8 +35,8 @@ var o = (e) => Object.values(r).find((t) => t === e), s = /* @__PURE__ */ functi
|
|
|
37
35
|
error: e
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
|
-
if (s &&
|
|
41
|
-
await e.saveIntoOrgUnit?.(p.savedId,
|
|
38
|
+
if (s && l) try {
|
|
39
|
+
await e.saveIntoOrgUnit?.(p.savedId, i.destination.path), p.isWrittenToOrgUnit = !0;
|
|
42
40
|
} catch (e) {
|
|
43
41
|
return {
|
|
44
42
|
...p,
|
|
@@ -47,7 +45,7 @@ var o = (e) => Object.values(r).find((t) => t === e), s = /* @__PURE__ */ functi
|
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
47
|
else if (s) try {
|
|
50
|
-
await a(e.publishEntityType, p.savedId,
|
|
48
|
+
await a(e.publishEntityType, p.savedId, i.destination.path, o ? i.newVersion : i.currentVersion), p.isPublished = !0;
|
|
51
49
|
} catch (e) {
|
|
52
50
|
return {
|
|
53
51
|
...p,
|
|
@@ -58,4 +56,4 @@ var o = (e) => Object.values(r).find((t) => t === e), s = /* @__PURE__ */ functi
|
|
|
58
56
|
return p;
|
|
59
57
|
};
|
|
60
58
|
//#endregion
|
|
61
|
-
export {
|
|
59
|
+
export { e as ResourceSaveError, o as ResourceSaveOutcome, s as ResourceSaveVersionError, n as SaveDestinationRoot, l as createPublishSavedResource, t as isResourceCreateAdapter, u as runResourceSave, a as toSaveDestinationRoot };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResourceFoldersResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
2
|
import { OrgUnitNamespace } from '@epam/ai-dial-chat-shared';
|
|
3
|
-
import { PublishDependency,
|
|
3
|
+
import { PublishDependency, StandaloneSaveToFolderPanelProps } from '@epam/ai-dial-publish-panel';
|
|
4
4
|
import { PublishApiClient } from '../create-publish-api';
|
|
5
5
|
import { ResourceSaveVersionError, SaveDestinationRoot, ResourceSaveAdapter, ResourceSaveChoice, ResourceSaveResult } from '../resource-save';
|
|
6
6
|
import { UsePublishFoldersResult } from '../usePublishFolders/usePublishFolders';
|
|
@@ -16,8 +16,6 @@ export interface UseResourceSavePanelLabels {
|
|
|
16
16
|
saveError: string;
|
|
17
17
|
/** Returns the error shown under the new version input for `error` and the typed `version`. */
|
|
18
18
|
getVersionError: (error: ResourceSaveVersionError, version: string) => string;
|
|
19
|
-
/** Text overrides for the access-rules section. */
|
|
20
|
-
accessRules?: PublishAccessRulesLabels;
|
|
21
19
|
}
|
|
22
20
|
/** Parameters for {@link useResourceSavePanel}. */
|
|
23
21
|
export interface UseResourceSavePanelParams {
|
|
@@ -38,7 +36,7 @@ export interface UseResourceSavePanelParams {
|
|
|
38
36
|
/** The Organization folder tree state; omit when the user may not publish, which hides that root. */
|
|
39
37
|
organizationFolders?: UsePublishFoldersResult;
|
|
40
38
|
/** Publish operations used for an Organization destination. */
|
|
41
|
-
publishClient: Pick<PublishApiClient, 'publishCatalogEntity'
|
|
39
|
+
publishClient: Pick<PublishApiClient, 'publishCatalogEntity'> & Partial<Pick<PublishApiClient, 'checkPublishTarget'>>;
|
|
42
40
|
/** Whether an Organization destination takes a direct write into an org unit (the user may write there); omit while the org-unit rule does not apply, which keeps every Organization destination on the publish path. */
|
|
43
41
|
canSaveDirectlyTo?: (folderPath: string[], root: SaveDestinationRoot) => boolean;
|
|
44
42
|
/** Reason a folder is unavailable as a destination in the given root, or `undefined` when usable; omit while the org-unit rule does not apply. A committed destination with a reason shows it and disables Save. */
|
|
@@ -57,15 +55,13 @@ export interface UseResourceSavePanelParams {
|
|
|
57
55
|
iconNote?: string;
|
|
58
56
|
/** Reason shown, and Save disabled, while the committed direct-write folder already holds the name this save would write; receives that folder and, for "Save as new version", the typed version. It is returned through `getDisabledReason`, so it needs that parameter too; without it, or without `publishClient.checkPublishTarget`, no target check is made. */
|
|
59
57
|
getTargetTakenReason?: (folderPath: string[], version?: string) => string;
|
|
60
|
-
/** Options offered in the access-rules editor's source picker. */
|
|
61
|
-
ruleSourceOptions: string[];
|
|
62
58
|
/** Translated copy. */
|
|
63
59
|
labels: UseResourceSavePanelLabels;
|
|
64
60
|
/** Called once a save whose first step succeeded has finished, with the choice it ran. */
|
|
65
61
|
onSaved: (result: ResourceSaveResult, choice: ResourceSaveChoice) => void;
|
|
66
62
|
}
|
|
67
63
|
/** The {@link StandaloneSaveToFolderPanelProps} the Save flow owns; the host adds the open state, resource summary and labels. */
|
|
68
|
-
export type ResourceSavePanelStateProps = Pick<StandaloneSaveToFolderPanelProps, 'onSubmit' | 'isSubmitDisabled' | 'isSubmitting' | 'submitError' | 'roots' | 'destination' | 'onDestinationChange' | 'onCreateFolder' | 'getDisabledReason' | 'version' | '
|
|
64
|
+
export type ResourceSavePanelStateProps = Pick<StandaloneSaveToFolderPanelProps, 'onSubmit' | 'isSubmitDisabled' | 'isSubmitting' | 'submitError' | 'roots' | 'destination' | 'onDestinationChange' | 'onCreateFolder' | 'getDisabledReason' | 'version' | 'onPendingDestinationChange' | 'foldersError' | 'onRetryFolders' | 'dependencies' | 'dependenciesNote' | 'destinationNote'>;
|
|
69
65
|
/** Result of {@link useResourceSavePanel}. */
|
|
70
66
|
export interface UseResourceSavePanelResult {
|
|
71
67
|
/** Props to spread on `StandaloneSaveToFolderPanel`. */
|
|
@@ -75,11 +71,10 @@ export interface UseResourceSavePanelResult {
|
|
|
75
71
|
}
|
|
76
72
|
/**
|
|
77
73
|
* Owns the Save panel's flow for one resource — the Personal and
|
|
78
|
-
* Organization destination tree, the version choice
|
|
79
|
-
* folder's access rules — and runs the choice through the resource's
|
|
74
|
+
* Organization destination tree, and the version choice — and runs the choice through the resource's
|
|
80
75
|
* adapter. Notifications stay with the host through `onSaved`. For a resource
|
|
81
76
|
* with private dependencies it also reads them while an Organization
|
|
82
77
|
* destination is chosen and returns them as `panelProps.dependencies`.
|
|
83
78
|
*/
|
|
84
|
-
export declare const useResourceSavePanel: ({ isOpen, adapter, resourceId, currentFolderPath, currentVersion, versionPattern, listPersonalFolders, organizationFolders, publishClient, canSaveDirectlyTo, getDisabledReason: getFolderDisabledReason, loadDependencies, getMissingNamespaces, getMissingNamespacesReason, dependenciesNote, iconNote, getTargetTakenReason,
|
|
79
|
+
export declare const useResourceSavePanel: ({ isOpen, adapter, resourceId, currentFolderPath, currentVersion, versionPattern, listPersonalFolders, organizationFolders, publishClient, canSaveDirectlyTo, getDisabledReason: getFolderDisabledReason, loadDependencies, getMissingNamespaces, getMissingNamespacesReason, dependenciesNote, iconNote, getTargetTakenReason, labels, onSaved, }: UseResourceSavePanelParams) => UseResourceSavePanelResult;
|
|
85
80
|
//# sourceMappingURL=useResourceSavePanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResourceSavePanel.d.ts","sourceRoot":"","sources":["../../../src/catalog/useResourceSavePanel/useResourceSavePanel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"useResourceSavePanel.d.ts","sourceRoot":"","sources":["../../../src/catalog/useResourceSavePanel/useResourceSavePanel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAIL,KAAK,iBAAiB,EAEtB,KAAK,gCAAgC,EACtC,MAAM,6BAA6B,CAAC;AAIrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAIL,wBAAwB,EAExB,mBAAmB,EAEnB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAQtF,4GAA4G;AAC5G,MAAM,WAAW,0BAA0B;IACzC,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,gBAAgB,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,gBAAgB,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,+FAA+F;IAC/F,eAAe,EAAE,CAAC,KAAK,EAAE,wBAAwB,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/E;AAED,mDAAmD;AACnD,MAAM,WAAW,0BAA0B;IACzC,wGAAwG;IACxG,MAAM,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,mBAAmB,CAAC;IAC7B,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,yDAAyD;IACzD,cAAc,CAAC,EAA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AE,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC3E;AAED,kIAAkI;AAClI,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,gCAAgC,EAC9B,UAAU,GACV,kBAAkB,GAClB,cAAc,GACd,aAAa,GACb,OAAO,GACP,aAAa,GACb,qBAAqB,GACrB,gBAAgB,GAChB,mBAAmB,GACnB,SAAS,GACT,4BAA4B,GAC5B,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,CACpB,CAAC;AAEF,8CAA8C;AAC9C,MAAM,WAAW,0BAA0B;IACzC,wDAAwD;IACxD,UAAU,EAAE,2BAA2B,CAAC;IACxC,4CAA4C;IAC5C,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,oVAoBlC,0BAA0B,KAAG,0BA8Y/B,CAAC"}
|
|
@@ -5,234 +5,203 @@ import { SaveDestinationRoot as i } from "../save-destination-root.js";
|
|
|
5
5
|
import { ResourceSaveVersionError as a, createPublishSavedResource as ee, runResourceSave as te, toSaveDestinationRoot as ne } from "../resource-save.js";
|
|
6
6
|
import { getDependencyOrgUnitNamespaces as re } from "../../org-units/org-unit-guards.js";
|
|
7
7
|
import { OrgUnitNamespace as ie } from "@epam/ai-dial-chat-shared";
|
|
8
|
-
import { useCallback as o, useEffect as s, useMemo as c, useRef as
|
|
9
|
-
import { SaveVersionMode as
|
|
8
|
+
import { useCallback as o, useEffect as s, useMemo as c, useRef as ae, useState as l } from "react";
|
|
9
|
+
import { SaveVersionMode as u } from "@epam/ai-dial-publish-panel";
|
|
10
10
|
//#region src/catalog/useResourceSavePanel/useResourceSavePanel.ts
|
|
11
|
-
var
|
|
11
|
+
var d = [], oe = 400, f = ({ isOpen: f, adapter: p, resourceId: m, currentFolderPath: h, currentVersion: g, versionPattern: _, listPersonalFolders: se, organizationFolders: v, publishClient: y, canSaveDirectlyTo: ce, getDisabledReason: b, loadDependencies: x, getMissingNamespaces: S, getMissingNamespacesReason: C, dependenciesNote: le, iconNote: w, getTargetTakenReason: T, labels: E, onSaved: ue }) => {
|
|
12
12
|
let D = t({
|
|
13
13
|
listFolders: se,
|
|
14
|
-
isEnabled:
|
|
15
|
-
}), {
|
|
14
|
+
isEnabled: f
|
|
15
|
+
}), { checkPublishTarget: O } = y, de = c(() => ee(y), [y]), fe = c(() => ({
|
|
16
16
|
rootKey: i.Personal,
|
|
17
|
-
path:
|
|
18
|
-
}), [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
t !== V.current && (V.current = t, I([]), B(!1), R(!0), (async () => {
|
|
22
|
-
try {
|
|
23
|
-
let n = await pe(e.path.join("/"));
|
|
24
|
-
V.current === t && I(n);
|
|
25
|
-
} catch {
|
|
26
|
-
V.current === t && B(!0);
|
|
27
|
-
} finally {
|
|
28
|
-
V.current === t && R(!1);
|
|
29
|
-
}
|
|
30
|
-
})());
|
|
31
|
-
}, [pe, H]);
|
|
17
|
+
path: h
|
|
18
|
+
}), [h]), [k, pe] = l(fe), [A, me] = l(u.Keep), [j, he] = l(""), [M, N] = l(!1), [P, F] = l(), [ge, I] = l(!1), [_e, L] = l(), [ve, R] = l(!1), [ye, z] = l(), B = ae(/* @__PURE__ */ new Set()), V = o((e) => e.rootKey === i.Organization && p.saveIntoOrgUnit != null && ce?.(e.path, i.Organization) === !0, [p.saveIntoOrgUnit, ce]), be = o((e) => {
|
|
19
|
+
R(e?.rootKey === i.Organization);
|
|
20
|
+
}, []);
|
|
32
21
|
s(() => {
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
let [
|
|
22
|
+
f && (R(!1), z(void 0), B.current.clear(), pe(fe), me(u.Keep), he(""), N(!1), F(void 0), L(void 0));
|
|
23
|
+
}, [f]);
|
|
24
|
+
let [H, xe] = l(d), Se = ae(x);
|
|
36
25
|
s(() => {
|
|
37
|
-
|
|
38
|
-
}, [
|
|
39
|
-
let
|
|
26
|
+
Se.current = x;
|
|
27
|
+
}, [x]);
|
|
28
|
+
let Ce = f && x != null && (k.rootKey === i.Organization || ve);
|
|
40
29
|
s(() => {
|
|
41
|
-
if (
|
|
30
|
+
if (xe(d), !Ce) return;
|
|
42
31
|
let e = !1;
|
|
43
32
|
return (async () => {
|
|
44
33
|
try {
|
|
45
|
-
let t = await
|
|
46
|
-
!e && t &&
|
|
34
|
+
let t = await Se.current?.();
|
|
35
|
+
!e && t && xe(t);
|
|
47
36
|
} catch {}
|
|
48
37
|
})(), () => {
|
|
49
38
|
e = !0;
|
|
50
39
|
};
|
|
51
|
-
}, [
|
|
52
|
-
let
|
|
53
|
-
if (
|
|
54
|
-
if (!
|
|
55
|
-
if (
|
|
56
|
-
if (
|
|
40
|
+
}, [Ce]);
|
|
41
|
+
let U = p.isVersioned && A === u.New, W = j.trim(), G = c(() => {
|
|
42
|
+
if (U) {
|
|
43
|
+
if (!_.test(W)) return a.Invalid;
|
|
44
|
+
if (W === g) return a.Unchanged;
|
|
45
|
+
if (W === P) return a.Exists;
|
|
57
46
|
}
|
|
58
47
|
}, [
|
|
59
|
-
|
|
60
|
-
v,
|
|
61
|
-
G,
|
|
48
|
+
U,
|
|
62
49
|
_,
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
W,
|
|
51
|
+
g,
|
|
52
|
+
P
|
|
53
|
+
]), we = r(p), K = k.path.join("/"), Te = [...B.current].some((e) => K === e || K.startsWith(`${e}/`)), Ee = _.test(W) && W !== g, q = U ? W : void 0, J = T != null && b != null && O != null && !we && V(k) && !Te && (!U || Ee) ? `${K}\u0000${q ?? ""}` : void 0, De = p.publishEntityType;
|
|
65
54
|
s(() => {
|
|
66
|
-
if (
|
|
55
|
+
if (J == null || O == null) return;
|
|
67
56
|
let e = !1, t = async () => {
|
|
68
57
|
try {
|
|
69
|
-
let { taken: t } = await O(
|
|
58
|
+
let { taken: t } = await O(De, m, K, q);
|
|
70
59
|
if (e) return;
|
|
71
|
-
|
|
60
|
+
z((e) => t ? J : e === J ? void 0 : e);
|
|
72
61
|
} catch {}
|
|
73
|
-
}, n = setTimeout(() => void t(),
|
|
62
|
+
}, n = setTimeout(() => void t(), q == null ? 0 : oe);
|
|
74
63
|
return () => {
|
|
75
64
|
e = !0, clearTimeout(n);
|
|
76
65
|
};
|
|
77
|
-
}, [
|
|
78
|
-
let
|
|
79
|
-
if (
|
|
66
|
+
}, [J]);
|
|
67
|
+
let Oe = J != null && ye === J, Y = c(() => re(H), [H]), ke = c(() => {
|
|
68
|
+
if (b) return (e) => {
|
|
80
69
|
let t = ne(e.rootKey);
|
|
81
70
|
if (!t) return;
|
|
82
|
-
let n =
|
|
71
|
+
let n = b(e.path, t);
|
|
83
72
|
if (n != null) return n;
|
|
84
|
-
let r = e.rootKey === k.rootKey && e.path.join("/") ===
|
|
85
|
-
if (
|
|
86
|
-
if (!
|
|
87
|
-
let i =
|
|
88
|
-
return i.length > 0 ?
|
|
73
|
+
let r = e.rootKey === k.rootKey && e.path.join("/") === K;
|
|
74
|
+
if (Oe && r && T) return T(e.path, q);
|
|
75
|
+
if (!S || !C || Y.length === 0 || !V(e)) return;
|
|
76
|
+
let i = S(e.path, Y);
|
|
77
|
+
return i.length > 0 ? C(i) : void 0;
|
|
89
78
|
};
|
|
90
79
|
}, [
|
|
91
|
-
|
|
80
|
+
Y,
|
|
92
81
|
k.rootKey,
|
|
93
|
-
|
|
82
|
+
b,
|
|
83
|
+
S,
|
|
94
84
|
C,
|
|
95
|
-
w,
|
|
96
85
|
T,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
]),
|
|
102
|
-
|
|
103
|
-
}, []),
|
|
104
|
-
if (
|
|
105
|
-
|
|
86
|
+
V,
|
|
87
|
+
Oe,
|
|
88
|
+
K,
|
|
89
|
+
q
|
|
90
|
+
]), X = ke?.(k), Z = V(k), Ae = k.rootKey === i.Organization, je = w != null && Z && S?.(k.path, [ie.Files]).length ? w : void 0, Me = o((e) => {
|
|
91
|
+
he(e), L(void 0);
|
|
92
|
+
}, []), Ne = o(() => N(!0), []), Pe = v?.rememberPublishFolder, { saveError: Fe } = E, Q = o(async () => {
|
|
93
|
+
if (N(!0), G || X) return;
|
|
94
|
+
I(!0), L(void 0);
|
|
106
95
|
let t = {
|
|
107
|
-
resourceId:
|
|
108
|
-
currentFolderPath:
|
|
109
|
-
currentVersion:
|
|
96
|
+
resourceId: m,
|
|
97
|
+
currentFolderPath: h,
|
|
98
|
+
currentVersion: g,
|
|
110
99
|
destination: k,
|
|
111
100
|
versionMode: A,
|
|
112
|
-
newVersion:
|
|
113
|
-
|
|
114
|
-
isDirectWrite: Q
|
|
101
|
+
newVersion: W,
|
|
102
|
+
isDirectWrite: Z
|
|
115
103
|
};
|
|
116
104
|
try {
|
|
117
|
-
let e = await te(
|
|
118
|
-
e.isPublished &&
|
|
105
|
+
let e = await te(p, t, de);
|
|
106
|
+
e.isPublished && Pe?.(k.path), ue(e, t);
|
|
119
107
|
} catch (t) {
|
|
120
108
|
if (t instanceof n) {
|
|
121
|
-
|
|
109
|
+
L(t.message);
|
|
122
110
|
return;
|
|
123
111
|
}
|
|
124
112
|
let { message: r, status: i } = await e(t);
|
|
125
|
-
if (
|
|
126
|
-
|
|
113
|
+
if (U && i === 409) {
|
|
114
|
+
F(W);
|
|
127
115
|
return;
|
|
128
116
|
}
|
|
129
|
-
|
|
117
|
+
L(r ?? Fe);
|
|
130
118
|
} finally {
|
|
131
|
-
|
|
119
|
+
I(!1);
|
|
132
120
|
}
|
|
133
121
|
}, [
|
|
134
|
-
|
|
122
|
+
p,
|
|
123
|
+
h,
|
|
135
124
|
g,
|
|
136
|
-
_,
|
|
137
125
|
k,
|
|
138
|
-
|
|
139
|
-
Q,
|
|
140
|
-
$,
|
|
126
|
+
U,
|
|
141
127
|
Z,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
128
|
+
X,
|
|
129
|
+
ue,
|
|
130
|
+
de,
|
|
131
|
+
Pe,
|
|
132
|
+
m,
|
|
133
|
+
Fe,
|
|
134
|
+
W,
|
|
149
135
|
A,
|
|
150
|
-
|
|
151
|
-
]),
|
|
136
|
+
G
|
|
137
|
+
]), Ie = o(() => void Q(), [Q]), { personalRoot: Le, organizationRoot: $ } = E, Re = c(() => {
|
|
152
138
|
let e = {
|
|
153
139
|
key: i.Personal,
|
|
154
|
-
label:
|
|
140
|
+
label: Le,
|
|
155
141
|
items: D.folderItems,
|
|
156
142
|
expandedPaths: D.expandedPaths,
|
|
157
143
|
onExpandedPathsChange: D.onExpandedPathsChange,
|
|
158
144
|
loadingPaths: D.loadingPaths
|
|
159
145
|
};
|
|
160
|
-
return
|
|
146
|
+
return v ? [e, {
|
|
161
147
|
key: i.Organization,
|
|
162
|
-
label:
|
|
163
|
-
items:
|
|
164
|
-
expandedPaths:
|
|
165
|
-
onExpandedPathsChange:
|
|
166
|
-
loadingPaths:
|
|
167
|
-
hasAccessRules: !0
|
|
148
|
+
label: $,
|
|
149
|
+
items: v.folderItems,
|
|
150
|
+
expandedPaths: v.expandedPaths,
|
|
151
|
+
onExpandedPathsChange: v.onExpandedPathsChange,
|
|
152
|
+
loadingPaths: v.loadingPaths
|
|
168
153
|
}] : [e];
|
|
169
154
|
}, [
|
|
170
|
-
|
|
171
|
-
|
|
155
|
+
v,
|
|
156
|
+
$,
|
|
172
157
|
D.expandedPaths,
|
|
173
158
|
D.folderItems,
|
|
174
159
|
D.loadingPaths,
|
|
175
160
|
D.onExpandedPathsChange,
|
|
176
|
-
|
|
177
|
-
]), { onCreateFolder:
|
|
178
|
-
e === i.Organization ? (
|
|
179
|
-
}, [
|
|
161
|
+
Le
|
|
162
|
+
]), { onCreateFolder: ze } = D, Be = v?.onCreatePublishFolder, Ve = o(async (e, t, n) => {
|
|
163
|
+
e === i.Organization ? (B.current.add([...t, n].join("/")), await Be?.(t, n)) : await ze(t, n);
|
|
164
|
+
}, [ze, Be]), { getVersionError: He } = E, Ue = c(() => p.isVersioned && g != null ? {
|
|
180
165
|
versionMode: A,
|
|
181
|
-
onVersionModeChange:
|
|
182
|
-
currentVersion:
|
|
166
|
+
onVersionModeChange: me,
|
|
167
|
+
currentVersion: g,
|
|
183
168
|
newVersion: j,
|
|
184
|
-
onNewVersionChange:
|
|
185
|
-
onNewVersionBlur:
|
|
186
|
-
newVersionError:
|
|
169
|
+
onNewVersionChange: Me,
|
|
170
|
+
onNewVersionBlur: Ne,
|
|
171
|
+
newVersionError: M && G ? He(G, W) : void 0
|
|
187
172
|
} : void 0, [
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
$e,
|
|
191
|
-
ye,
|
|
173
|
+
p.isVersioned,
|
|
174
|
+
g,
|
|
192
175
|
He,
|
|
176
|
+
M,
|
|
177
|
+
Ne,
|
|
193
178
|
j,
|
|
194
|
-
|
|
179
|
+
Me,
|
|
180
|
+
W,
|
|
195
181
|
G,
|
|
196
|
-
K,
|
|
197
182
|
A
|
|
198
|
-
]), { accessRules: tt } = E, nt = c(() => ({
|
|
199
|
-
rules: F,
|
|
200
|
-
onRulesChange: I,
|
|
201
|
-
sourceOptions: de,
|
|
202
|
-
isLoading: L,
|
|
203
|
-
hasLoadError: z,
|
|
204
|
-
labels: tt,
|
|
205
|
-
isHiddenFor: H
|
|
206
|
-
}), [
|
|
207
|
-
tt,
|
|
208
|
-
z,
|
|
209
|
-
H,
|
|
210
|
-
L,
|
|
211
|
-
de,
|
|
212
|
-
F
|
|
213
183
|
]);
|
|
214
184
|
return {
|
|
215
185
|
panelProps: {
|
|
216
|
-
onSubmit:
|
|
217
|
-
isSubmitDisabled:
|
|
218
|
-
isSubmitting:
|
|
219
|
-
submitError:
|
|
220
|
-
roots:
|
|
186
|
+
onSubmit: Ie,
|
|
187
|
+
isSubmitDisabled: U && !!G || X != null,
|
|
188
|
+
isSubmitting: ge,
|
|
189
|
+
submitError: _e,
|
|
190
|
+
roots: Re,
|
|
221
191
|
destination: k,
|
|
222
|
-
onDestinationChange:
|
|
223
|
-
onCreateFolder:
|
|
224
|
-
getDisabledReason:
|
|
225
|
-
version:
|
|
226
|
-
|
|
227
|
-
onPendingDestinationChange: ke,
|
|
192
|
+
onDestinationChange: pe,
|
|
193
|
+
onCreateFolder: Ve,
|
|
194
|
+
getDisabledReason: ke,
|
|
195
|
+
version: Ue,
|
|
196
|
+
onPendingDestinationChange: be,
|
|
228
197
|
foldersError: D.hasError ? E.foldersLoadError : void 0,
|
|
229
198
|
onRetryFolders: D.retry,
|
|
230
|
-
dependencies:
|
|
231
|
-
dependenciesNote:
|
|
232
|
-
destinationNote:
|
|
199
|
+
dependencies: Ae ? H : d,
|
|
200
|
+
dependenciesNote: Ae ? le : void 0,
|
|
201
|
+
destinationNote: je
|
|
233
202
|
},
|
|
234
|
-
submit:
|
|
203
|
+
submit: Q
|
|
235
204
|
};
|
|
236
205
|
};
|
|
237
206
|
//#endregion
|
|
238
|
-
export {
|
|
207
|
+
export { f as useResourceSavePanel };
|