@epam/ai-dial-publish-panel 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/components/PublishPanel/PublishPanel.d.ts +4 -21
- package/components/PublishPanel/PublishPanel.d.ts.map +1 -1
- package/components/PublishPanel/StandalonePublishPanel.d.ts +1 -11
- package/components/PublishPanel/StandalonePublishPanel.d.ts.map +1 -1
- package/components/SaveToFolderPanel/SaveToFolderPanel.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.d.ts +3 -8
- package/index.d.ts.map +1 -1
- package/index.js +761 -1122
- package/models/folder-destination.d.ts +0 -2
- package/models/folder-destination.d.ts.map +1 -1
- package/models/publish-panel-styles.d.ts +0 -3
- package/models/publish-panel-styles.d.ts.map +1 -1
- package/models/publish.d.ts +0 -19
- package/models/publish.d.ts.map +1 -1
- package/models/save-to-folder-panel.d.ts +1 -24
- package/models/save-to-folder-panel.d.ts.map +1 -1
- package/package.json +2 -2
- package/types/publish-panel.d.ts +1 -1
- package/types/publish-panel.d.ts.map +1 -1
- package/utils/use-publish-flow.d.ts +8 -27
- package/utils/use-publish-flow.d.ts.map +1 -1
- package/components/PublishAccessRuleEditor/PublishAccessRuleEditor.d.ts +0 -5
- package/components/PublishAccessRuleEditor/PublishAccessRuleEditor.d.ts.map +0 -1
- package/components/PublishAccessRules/PublishAccessRules.d.ts +0 -83
- package/components/PublishAccessRules/PublishAccessRules.d.ts.map +0 -1
- package/models/publish-access-rule-editor.d.ts +0 -79
- package/models/publish-access-rule-editor.d.ts.map +0 -1
- package/models/publish-access-rules-styles.d.ts +0 -25
- package/models/publish-access-rules-styles.d.ts.map +0 -1
|
@@ -22,7 +22,5 @@ export interface FolderDestinationRoot {
|
|
|
22
22
|
onExpandedPathsChange?: (paths: Set<string>) => void;
|
|
23
23
|
/** Folder path keys inside this root that the host is currently fetching. */
|
|
24
24
|
loadingPaths?: Set<string>;
|
|
25
|
-
/** Whether a folder under this root takes access rules, edited below the tree once selected. Defaults to `false`. */
|
|
26
|
-
hasAccessRules?: boolean;
|
|
27
25
|
}
|
|
28
26
|
//# sourceMappingURL=folder-destination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder-destination.d.ts","sourceRoot":"","sources":["../../src/models/folder-destination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,gFAAgF;AAChF,MAAM,WAAW,iBAAiB;IAChC,4FAA4F;IAC5F,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,qFAAqF;AACrF,MAAM,WAAW,qBAAqB;IACpC,+GAA+G;IAC/G,GAAG,EAAE,MAAM,CAAC;IACZ,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,6EAA6E;IAC7E,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"folder-destination.d.ts","sourceRoot":"","sources":["../../src/models/folder-destination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,gFAAgF;AAChF,MAAM,WAAW,iBAAiB;IAChC,4FAA4F;IAC5F,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,qFAAqF;AACrF,MAAM,WAAW,qBAAqB;IACpC,+GAA+G;IAC/G,GAAG,EAAE,MAAM,CAAC;IACZ,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,6EAA6E;IAC7E,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
import { PublishAccessRulesStyles } from './publish-access-rules-styles';
|
|
3
2
|
import { PublishDependenciesStyles } from './publish-dependencies-list';
|
|
4
3
|
import { PublishFoldersTreeStyles } from './publish-folders-tree';
|
|
5
4
|
/** Color overrides for the publish panel body. */
|
|
@@ -23,8 +22,6 @@ export interface PublishPanelStyles {
|
|
|
23
22
|
colors?: PublishPanelColors;
|
|
24
23
|
/** Style overrides forwarded to the destination folder tree. */
|
|
25
24
|
folderTree?: PublishFoldersTreeStyles;
|
|
26
|
-
/** Style overrides forwarded to the access-rules section. */
|
|
27
|
-
accessRules?: PublishAccessRulesStyles;
|
|
28
25
|
/** Style overrides forwarded to the private-dependencies section. */
|
|
29
26
|
dependencies?: PublishDependenciesStyles;
|
|
30
27
|
/** Additional CSS custom properties applied to the panel body root. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-panel-styles.d.ts","sourceRoot":"","sources":["../../src/models/publish-panel-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"publish-panel-styles.d.ts","sourceRoot":"","sources":["../../src/models/publish-panel-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,4EAA4E;AAC5E,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,gEAAgE;IAChE,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,qEAAqE;IACrE,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,uEAAuE;IACvE,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB"}
|
package/models/publish.d.ts
CHANGED
|
@@ -49,25 +49,6 @@ export interface PublishResourceSummary {
|
|
|
49
49
|
/** URL of the entity icon, used only by the entity-header row. */
|
|
50
50
|
iconUrl?: string;
|
|
51
51
|
}
|
|
52
|
-
/** Combining function applied across a rule's `targets`. */
|
|
53
|
-
export declare enum PublicationRuleFunction {
|
|
54
|
-
Equal = "EQUAL",
|
|
55
|
-
Contain = "CONTAIN",
|
|
56
|
-
Regex = "REGEX"
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* One access-restriction rule: grants access when `source`'s claim value
|
|
60
|
-
* matches any of `targets` (OR) under `function`. Rules within a publish
|
|
61
|
-
* request are combined with AND.
|
|
62
|
-
*/
|
|
63
|
-
export interface PublicationRule {
|
|
64
|
-
/** Claim/category name this rule matches against, e.g. `'role'`. */
|
|
65
|
-
source: string;
|
|
66
|
-
/** Combining function applied across `targets`. */
|
|
67
|
-
function: PublicationRuleFunction;
|
|
68
|
-
/** Values combined with OR; exactly one pattern when `function` is `Regex`. */
|
|
69
|
-
targets: string[];
|
|
70
|
-
}
|
|
71
52
|
/** Which callout (if any) the publish panel should show below the folder picker. */
|
|
72
53
|
export declare enum PublishCalloutKind {
|
|
73
54
|
/** No callout — no folder selected, or a request is in flight. */
|
package/models/publish.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/models/publish.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,mEAAmE;AACnE,MAAM,WAAW,iBAAiB;IAChC,yFAAyF;IACzF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mIAAmI;IACnI,IAAI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C1D,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,8BAA8B,EAAE,OAAO,CAAC;IACxC,mEAAmE;IACnE,cAAc,EAAE,OAAO,CAAC;IACxB,wDAAwD;IACxD,YAAY,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,cAAc,EAAE,OAAO,CAAC;IACxB,6GAA6G;IAC7G,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,yDAAyD;AACzD,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,WAAW,EAAE,kBAAkB,CAAC;IAChC,6CAA6C;IAC7C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,uEAAuE;IACvE,eAAe,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, Ref, RefObject } from 'react';
|
|
2
|
-
import { PublishAccessRulesLabels } from '../components/PublishAccessRules/PublishAccessRules';
|
|
3
2
|
import { SaveToFolderView, SaveVersionMode } from '../types/save-to-folder';
|
|
4
3
|
import { FolderDestination, FolderDestinationRoot } from './folder-destination';
|
|
5
|
-
import {
|
|
6
|
-
import { PublishAccessRulesStyles } from './publish-access-rules-styles';
|
|
4
|
+
import { PublishResourceSummary } from './publish';
|
|
7
5
|
import { PublishDependenciesLabels, PublishDependenciesStyles } from './publish-dependencies-list';
|
|
8
6
|
import { PublishDependency } from './publish-dependency';
|
|
9
7
|
import { PublishFoldersTreeStyles } from './publish-folders-tree';
|
|
@@ -90,25 +88,6 @@ export interface SaveToFolderVersionProps {
|
|
|
90
88
|
/** Error shown under the new version input, already translated by the host. */
|
|
91
89
|
newVersionError?: string;
|
|
92
90
|
}
|
|
93
|
-
/** Access-rules props; the rules section renders below the tree while a folder of a root with `hasAccessRules` is selected. */
|
|
94
|
-
export interface SaveToFolderAccessRulesProps {
|
|
95
|
-
/** Access rules of the selected folder, combined with AND. */
|
|
96
|
-
rules: PublicationRule[];
|
|
97
|
-
/** Called with the full next rules array on add, remove, or clear. */
|
|
98
|
-
onRulesChange: (rules: PublicationRule[]) => void;
|
|
99
|
-
/** Options offered in the rule editor's source picker. */
|
|
100
|
-
sourceOptions: string[];
|
|
101
|
-
/** Whether the selected folder's existing rules are being fetched. Defaults to `false`. */
|
|
102
|
-
isLoading?: boolean;
|
|
103
|
-
/** Whether the most recent existing-rules fetch failed. Defaults to `false`. */
|
|
104
|
-
hasLoadError?: boolean;
|
|
105
|
-
/** Text overrides for the rules section. */
|
|
106
|
-
labels?: PublishAccessRulesLabels;
|
|
107
|
-
/** Style overrides for the rules section. */
|
|
108
|
-
styles?: PublishAccessRulesStyles;
|
|
109
|
-
/** Returns `true` for a destination that takes no rules, which hides the section while it is selected. Omit to show the section for every folder of a root with `hasAccessRules`. */
|
|
110
|
-
isHiddenFor?: (destination: FolderDestination) => boolean;
|
|
111
|
-
}
|
|
112
91
|
/** Props shared by the body and the standalone shell of the save-to-folder panel. */
|
|
113
92
|
export interface SaveToFolderPanelBaseProps {
|
|
114
93
|
/** Summary row content; a `type` renders the entity header with icon and type badge. */
|
|
@@ -125,8 +104,6 @@ export interface SaveToFolderPanelBaseProps {
|
|
|
125
104
|
onCreateFolder: (rootKey: string, parentPath: string[], name: string) => Promise<void>;
|
|
126
105
|
/** Version choice; omit for an unversioned resource. */
|
|
127
106
|
version?: SaveToFolderVersionProps;
|
|
128
|
-
/** Access rules for a destination under a root with `hasAccessRules`; omit to hide the section. */
|
|
129
|
-
accessRules?: SaveToFolderAccessRulesProps;
|
|
130
107
|
/** Resources the item refers to that are not in the public bucket, listed in the main view as in `PublishPanel`; informational only, it never blocks Save. The host passes them only when they apply (for example, an Organization destination); the section is hidden while this is empty or omitted. */
|
|
131
108
|
dependencies?: PublishDependency[];
|
|
132
109
|
/** One sentence shown in the dependencies section, under its heading, while `dependencies` is omitted or empty; ignored while the list has rows. The host passes it only when the panel cannot list the dependencies itself. Plain text in reading order, not a live region. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-to-folder-panel.d.ts","sourceRoot":"","sources":["../../src/models/save-to-folder-panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"save-to-folder-panel.d.ts","sourceRoot":"","sources":["../../src/models/save-to-folder-panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EACV,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAEpE,+DAA+D;AAC/D,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yGAAyG;IACzG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4EA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C,EAAE,MAAM,CAAC;CACzB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-publish-panel",
|
|
3
3
|
"description": "Publish-to-folder UI and state flow shared by catalog entity publish and conversation publish",
|
|
4
|
-
"version": "1.4.0-dev.
|
|
4
|
+
"version": "1.4.0-dev.143",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^19.2.8",
|
|
28
|
-
"@epam/ai-dial-chat-shared": "1.4.0-dev.
|
|
28
|
+
"@epam/ai-dial-chat-shared": "1.4.0-dev.143",
|
|
29
29
|
"@epam/ai-dial-ui-kit": "^0.16.0",
|
|
30
30
|
"@epam/ai-dial-react-file-manager": "^0.4.3"
|
|
31
31
|
},
|
package/types/publish-panel.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Which view the publish panel shows. */
|
|
2
2
|
export declare enum PublishPanelView {
|
|
3
|
-
/** Summary, destination row, author
|
|
3
|
+
/** Summary, destination row, author and credentials. */
|
|
4
4
|
Main = "main",
|
|
5
5
|
/** The destination folder tree. */
|
|
6
6
|
ChangeFolder = "change-folder"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-panel.d.ts","sourceRoot":"","sources":["../../src/types/publish-panel.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,oBAAY,gBAAgB;IAC1B,
|
|
1
|
+
{"version":3,"file":"publish-panel.d.ts","sourceRoot":"","sources":["../../src/types/publish-panel.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,oBAAY,gBAAgB;IAC1B,wDAAwD;IACxD,IAAI,SAAS;IACb,mCAAmC;IACnC,YAAY,kBAAkB;CAC/B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PublishFolderNode, PublishHistoryEntry } from '../models/publish';
|
|
2
2
|
/** An item publishable through {@link usePublishFlow} — versioned or not (e.g. a conversation). */
|
|
3
3
|
export interface PublishFlowItem {
|
|
4
4
|
/** Version, when the item is versioned. `undefined` for unversioned resources. */
|
|
@@ -43,14 +43,11 @@ export interface UsePublishFlowOptions<TItem extends PublishFlowItem> {
|
|
|
43
43
|
*/
|
|
44
44
|
defaultAuthor?: string;
|
|
45
45
|
/**
|
|
46
|
-
* Called with the destination folder path,
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* `publishCredentials` is additive and positional: a host callback that
|
|
50
|
-
* declares only the first four parameters stays assignable and keeps
|
|
51
|
-
* behaving exactly as it did.
|
|
46
|
+
* Called with the destination folder path, trimmed display author, and the
|
|
47
|
+
* credentials opt-in when the user confirms publish/update. A host callback
|
|
48
|
+
* that declares only the first three parameters stays assignable.
|
|
52
49
|
*/
|
|
53
|
-
onPublish: (item: TItem, folderPath: string[],
|
|
50
|
+
onPublish: (item: TItem, folderPath: string[], author: string, publishCredentials: boolean) => Promise<void>;
|
|
54
51
|
/** Called after a successful publish, with whether it was a direct write; the host surfaces its own success notification. */
|
|
55
52
|
onPublishSuccess?: (item: TItem, folderPath: string[], isDirectWrite: boolean) => void;
|
|
56
53
|
/**
|
|
@@ -59,14 +56,6 @@ export interface UsePublishFlowOptions<TItem extends PublishFlowItem> {
|
|
|
59
56
|
* notification; the hook only sets `hasSubmitError` for the inline callout.
|
|
60
57
|
*/
|
|
61
58
|
onPublishError?: (item: TItem, folderPath: string[], error: unknown) => void;
|
|
62
|
-
/**
|
|
63
|
-
* Resolves the access rules already configured for a destination folder.
|
|
64
|
-
* Called whenever `selectedFolderPath` changes to a defined folder; the
|
|
65
|
-
* result fully replaces the current `rules` state (never merged). Omit to
|
|
66
|
-
* skip pre-filling entirely — `rules` then only ever changes via
|
|
67
|
-
* `setRules`.
|
|
68
|
-
*/
|
|
69
|
-
onFetchExistingRules?: (folderPath: string[]) => Promise<PublicationRule[]>;
|
|
70
59
|
/**
|
|
71
60
|
* Resolves whether another resource already holds the published path of
|
|
72
61
|
* `item` in a destination folder, so the panel can say so before submit.
|
|
@@ -97,7 +86,7 @@ export interface UsePublishFlowOptions<TItem extends PublishFlowItem> {
|
|
|
97
86
|
/**
|
|
98
87
|
* Writes the item into the folder directly. Called by `handleSubmit` instead
|
|
99
88
|
* of `onPublish` while {@link UsePublishFlowResult.isDirectWrite} is `true`,
|
|
100
|
-
* with the same success, error and taken-target handling; no
|
|
89
|
+
* with the same success, error and taken-target handling; no author or
|
|
101
90
|
* credentials are sent.
|
|
102
91
|
*/
|
|
103
92
|
onPublishDirectly?: (item: TItem, folderPath: string[]) => Promise<void>;
|
|
@@ -134,12 +123,8 @@ export interface UsePublishFlowResult {
|
|
|
134
123
|
* decide whether to close the flow.
|
|
135
124
|
*/
|
|
136
125
|
handleSubmit: () => Promise<boolean>;
|
|
137
|
-
/** Resets folder selection, any locally-created folders,
|
|
126
|
+
/** Resets folder selection, any locally-created folders, the author, the credentials opt-in, and the submit error back to their initial state. */
|
|
138
127
|
reset: () => void;
|
|
139
|
-
/** Current access rules for the selected folder — fetched, manually edited, or both. */
|
|
140
|
-
rules: PublicationRule[];
|
|
141
|
-
/** Replaces the current rules; used by manual add/remove/clear actions. */
|
|
142
|
-
setRules: (rules: PublicationRule[]) => void;
|
|
143
128
|
/**
|
|
144
129
|
* Current display author for the publication — the host-supplied
|
|
145
130
|
* `defaultAuthor` until the user edits it.
|
|
@@ -165,13 +150,9 @@ export interface UsePublishFlowResult {
|
|
|
165
150
|
isTargetTaken: boolean;
|
|
166
151
|
/** Whether `onCheckTargetExists` is currently resolving for the selected folder and version. */
|
|
167
152
|
isTargetChecking: boolean;
|
|
168
|
-
/** Whether `onFetchExistingRules` is currently resolving for the selected folder. */
|
|
169
|
-
isRulesLoading: boolean;
|
|
170
|
-
/** Whether the most recent `onFetchExistingRules` call failed. `rules` is left unchanged when this is `true`. */
|
|
171
|
-
hasRulesLoadError: boolean;
|
|
172
153
|
/** Whether the selected folder is written directly: a folder is selected, both direct options are supplied and `canPublishDirectlyTo` holds for it. */
|
|
173
154
|
isDirectWrite: boolean;
|
|
174
155
|
}
|
|
175
156
|
/** Manages all state for the Publish flow: folder selection, local folder creation, existing-publication detection, and submit handling. */
|
|
176
|
-
export declare const usePublishFlow: <TItem extends PublishFlowItem = PublishFlowItem>({ item, history, folderItems: initialFolderItems, hasWriteAccess: resolveWriteAccess, defaultAuthor, onCreateFolder, onPublish, onPublishSuccess, onPublishError,
|
|
157
|
+
export declare const usePublishFlow: <TItem extends PublishFlowItem = PublishFlowItem>({ item, history, folderItems: initialFolderItems, hasWriteAccess: resolveWriteAccess, defaultAuthor, onCreateFolder, onPublish, onPublishSuccess, onPublishError, onCheckTargetExists, isTargetTakenError, canPublishDirectlyTo, onPublishDirectly, }: UsePublishFlowOptions<TItem>) => UsePublishFlowResult;
|
|
177
158
|
//# sourceMappingURL=use-publish-flow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-publish-flow.d.ts","sourceRoot":"","sources":["../../src/utils/use-publish-flow.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-publish-flow.d.ts","sourceRoot":"","sources":["../../src/utils/use-publish-flow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,mGAAmG;AACnG,MAAM,WAAW,eAAe;IAC9B,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kJAAkJ;IAClJ,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AA2DD,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB,CAAC,KAAK,SAAS,eAAe;IAClE,8FAA8F;IAC9F,IAAI,EAAE,KAAK,CAAC;IACZ,kDAAkD;IAClD,OAAO,EAAE,mBAAmB,EAAE,CAAC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,5 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { PublishAccessRuleEditorProps } from '../../models/publish-access-rule-editor';
|
|
3
|
-
/** Edits one access rule inline on desktop or in a bottom sheet below the desktop breakpoint. */
|
|
4
|
-
export declare const PublishAccessRuleEditor: FC<PublishAccessRuleEditorProps>;
|
|
5
|
-
//# sourceMappingURL=PublishAccessRuleEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublishAccessRuleEditor.d.ts","sourceRoot":"","sources":["../../../src/components/PublishAccessRuleEditor/PublishAccessRuleEditor.tsx"],"names":[],"mappings":"AAeA,OAAO,EACL,EAAE,EAOH,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAoB5F,iGAAiG;AACjG,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAgTpE,CAAC"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { PublicationRule } from '../../models/publish';
|
|
3
|
-
import { PublishAccessRuleEditorLabels } from '../../models/publish-access-rule-editor';
|
|
4
|
-
import { PublishAccessRulesStyles } from '../../models/publish-access-rules-styles';
|
|
5
|
-
/** Text overrides for all user-visible strings in {@link PublishAccessRules}. */
|
|
6
|
-
export interface PublishAccessRulesLabels {
|
|
7
|
-
/** Section heading. Default: `'Allow access if all match'`. */
|
|
8
|
-
heading?: string;
|
|
9
|
-
/** Hint under the heading naming the destination folder the rules apply to; `{folder}` is replaced. Default: `'These rules apply to "{folder}". Selecting another folder loads that folder\'s own rules instead.'`. */
|
|
10
|
-
folderScopeHint?: string;
|
|
11
|
-
/** Hint under the heading shown while no destination folder is selected. Default: `'Access rules apply to the destination folder — pick a folder above to set its rules.'`. */
|
|
12
|
-
noFolderScopeHint?: string;
|
|
13
|
-
/** Warning shown when rules exist while no destination folder is selected. Default: `'These rules have no destination yet. Select a folder above to apply them.'`. */
|
|
14
|
-
rulesWithoutFolderWarning?: string;
|
|
15
|
-
/** Hint next to a disabled "Add rule" trigger once `maxRules` is reached; `{max}` is replaced. Default: `'Rule limit reached ({max}). Remove a rule to add another.'`. */
|
|
16
|
-
maxRulesReachedLabel?: string;
|
|
17
|
-
/** Label for the trigger that opens the single-rule editor. Default: `'Add rule'`. */
|
|
18
|
-
addRuleLabel?: string;
|
|
19
|
-
/** Label for the control that removes every rule; shown only when at least one rule exists. Default: `'Clear all'`. */
|
|
20
|
-
clearAllLabel?: string;
|
|
21
|
-
/** Separator joining a rule's targets. Default: `'Or'`. */
|
|
22
|
-
orSeparatorLabel?: string;
|
|
23
|
-
/** Accessible name template for a chip's remove control; `{source}` and `{targets}` are replaced. Default: `'Remove rule for {source}: {targets}'`. */
|
|
24
|
-
removeRuleAriaLabelTemplate?: string;
|
|
25
|
-
/** Chip label for an `EQUAL` rule. Default: `'Equal'`. */
|
|
26
|
-
equalFunctionLabel?: string;
|
|
27
|
-
/** Chip label for a `CONTAIN` rule. Default: `'Contain'`. */
|
|
28
|
-
containFunctionLabel?: string;
|
|
29
|
-
/** Chip label for a `REGEX` rule. Default: `'Regex'`. */
|
|
30
|
-
regexFunctionLabel?: string;
|
|
31
|
-
/** Shown while existing rules are being fetched for the selected folder. Default: `'Loading existing rules…'`. */
|
|
32
|
-
loadingLabel?: string;
|
|
33
|
-
/** Shown when fetching existing rules for the selected folder failed. Default: `"Couldn't load existing rules for this folder. You can still add rules manually."`. */
|
|
34
|
-
loadErrorLabel?: string;
|
|
35
|
-
/** Live-region announcement after a rule is added. Default: `'Rule added.'`. */
|
|
36
|
-
ruleAddedAnnouncement?: string;
|
|
37
|
-
/** Live-region announcement after a rule is removed. Default: `'Rule removed.'`. */
|
|
38
|
-
ruleRemovedAnnouncement?: string;
|
|
39
|
-
/** Live-region announcement after all rules are cleared. Default: `'All rules cleared.'`. */
|
|
40
|
-
rulesClearedAnnouncement?: string;
|
|
41
|
-
/** Live-region announcement after existing rules are loaded for a selected folder. Default: `'Existing rules loaded for the selected folder.'`. */
|
|
42
|
-
rulesLoadedAnnouncement?: string;
|
|
43
|
-
/** Text overrides passed through to the nested single-rule editor. */
|
|
44
|
-
editorLabels?: PublishAccessRuleEditorLabels;
|
|
45
|
-
}
|
|
46
|
-
/** Props for {@link PublishAccessRules}. */
|
|
47
|
-
export interface PublishAccessRulesProps {
|
|
48
|
-
/** Current access rules, combined with AND. */
|
|
49
|
-
rules: PublicationRule[];
|
|
50
|
-
/** Called with the full next rules array on add, remove, or clear. */
|
|
51
|
-
onRulesChange: (rules: PublicationRule[]) => void;
|
|
52
|
-
/** Options offered in the single-rule editor's source picker. */
|
|
53
|
-
sourceOptions: string[];
|
|
54
|
-
/** Name of the destination folder these rules apply to; `undefined` while no folder is selected. */
|
|
55
|
-
folderName?: string;
|
|
56
|
-
/** Disables every control in the section, e.g. while a publish request is in flight. Default: `false`. */
|
|
57
|
-
disabled?: boolean;
|
|
58
|
-
/** Whether existing rules are currently being fetched for the selected folder. Default: `false`. */
|
|
59
|
-
isLoading?: boolean;
|
|
60
|
-
/** Whether the most recent existing-rules fetch failed. Default: `false`. */
|
|
61
|
-
hasLoadError?: boolean;
|
|
62
|
-
/** Maximum number of rules allowed. Default: `20`. */
|
|
63
|
-
maxRules?: number;
|
|
64
|
-
/** Maximum number of targets allowed per EQUAL/CONTAIN rule. Default: `20`. */
|
|
65
|
-
maxTargetsPerRule?: number;
|
|
66
|
-
/** Text overrides for all user-visible strings. */
|
|
67
|
-
labels?: PublishAccessRulesLabels;
|
|
68
|
-
/** Typography class for the section heading. Default: `'dial-body-semi-text'`. */
|
|
69
|
-
headingClassName?: string;
|
|
70
|
-
/** Typography class for the folder-scope and rule-limit hints. Default: `'dial-small-text'`. */
|
|
71
|
-
hintClassName?: string;
|
|
72
|
-
/** Typography class for the loading message. Default: `'dial-small-text'`. */
|
|
73
|
-
loadingClassName?: string;
|
|
74
|
-
/** Typography class for each rule chip's text. Default: `'dial-small-text'`. */
|
|
75
|
-
ruleTextClassName?: string;
|
|
76
|
-
/** Typography class for the emphasised rule source inside each chip. Default: `'dial-small-semi-text'`. */
|
|
77
|
-
ruleSourceClassName?: string;
|
|
78
|
-
/** Style overrides. */
|
|
79
|
-
styles?: PublishAccessRulesStyles;
|
|
80
|
-
}
|
|
81
|
-
/** Renders access rules with controls to add, remove, and clear them. */
|
|
82
|
-
export declare const PublishAccessRules: FC<PublishAccessRulesProps>;
|
|
83
|
-
//# sourceMappingURL=PublishAccessRules.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublishAccessRules.d.ts","sourceRoot":"","sources":["../../../src/components/PublishAccessRules/PublishAccessRules.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,EAAE,EAAsC,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,eAAe,EAA2B,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAMzF,iFAAiF;AACjF,MAAM,WAAW,wBAAwB;IACvC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uNAAuN;IACvN,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+KAA+K;IAC/K,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sKAAsK;IACtK,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,0KAA0K;IAC1K,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uHAAuH;IACvH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uJAAuJ;IACvJ,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,0DAA0D;IAC1D,kBAA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gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2GAA2G;IAC3G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uBAAuB;IACvB,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AAWD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAiQ1D,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { PublicationRule } from './publish';
|
|
3
|
-
/** Text overrides for the access-rule editor. */
|
|
4
|
-
export interface PublishAccessRuleEditorLabels {
|
|
5
|
-
/** Source picker label. Defaults to `'Source'`. */
|
|
6
|
-
sourceLabel?: string;
|
|
7
|
-
/** Source picker placeholder. Defaults to `'Select...'`. */
|
|
8
|
-
sourcePlaceholder?: string;
|
|
9
|
-
/** Function picker label. Defaults to `'Function'`. */
|
|
10
|
-
functionLabel?: string;
|
|
11
|
-
/** EQUAL option label. Defaults to `'Equal'`. */
|
|
12
|
-
equalOptionLabel?: string;
|
|
13
|
-
/** CONTAIN option label. Defaults to `'Contain'`. */
|
|
14
|
-
containOptionLabel?: string;
|
|
15
|
-
/** REGEX option label. Defaults to `'Regex'`. */
|
|
16
|
-
regexOptionLabel?: string;
|
|
17
|
-
/** Targets field label. Defaults to `'Targets'`. */
|
|
18
|
-
targetsLabel?: string;
|
|
19
|
-
/** Targets field placeholder. Defaults to `'Add a target'`. */
|
|
20
|
-
targetsPlaceholder?: string;
|
|
21
|
-
/** Targets field hint. Defaults to `'Press Enter or comma to add a target.'`. */
|
|
22
|
-
targetsHintLabel?: string;
|
|
23
|
-
/** Pattern field label. Defaults to `'Pattern'`. */
|
|
24
|
-
patternLabel?: string;
|
|
25
|
-
/** Pattern field placeholder. Defaults to `'Enter a regular expression'`. */
|
|
26
|
-
patternPlaceholder?: string;
|
|
27
|
-
/** Invalid-regex message. Defaults to `'Enter a valid regular expression.'`. */
|
|
28
|
-
invalidRegexError?: string;
|
|
29
|
-
/** Required picker message. Defaults to `'This field is required.'`. */
|
|
30
|
-
requiredFieldError?: string;
|
|
31
|
-
/** Required targets message. Defaults to `'Add at least one target.'`. */
|
|
32
|
-
targetsRequiredError?: string;
|
|
33
|
-
/** Save action label. Defaults to `'Save'`. */
|
|
34
|
-
saveLabel?: string;
|
|
35
|
-
/** Cancel action label. Defaults to `'Cancel'`. */
|
|
36
|
-
cancelLabel?: string;
|
|
37
|
-
/** Accessible name of the editor — the bottom sheet below the desktop breakpoint, the inline group on desktop. Defaults to `'Add access rule'`. */
|
|
38
|
-
dialogAriaLabel?: string;
|
|
39
|
-
}
|
|
40
|
-
/** Color overrides for the access-rule editor. */
|
|
41
|
-
export interface PublishAccessRuleEditorColors {
|
|
42
|
-
/** Bottom-sheet background below the desktop breakpoint. Defaults to `--bg-layer-sunken`. */
|
|
43
|
-
mobileBackground?: string;
|
|
44
|
-
/** Desktop panel background. Defaults to `--bg-layer-base`. */
|
|
45
|
-
background?: string;
|
|
46
|
-
/** Picker border color. Defaults to `--stroke-tertiary`. */
|
|
47
|
-
selectBorder?: string;
|
|
48
|
-
/** Picker hover border color. Defaults to `--stroke-secondary`. */
|
|
49
|
-
selectBorderHover?: string;
|
|
50
|
-
/** Open picker border color. Defaults to `--stroke-accent`. */
|
|
51
|
-
selectBorderOpen?: string;
|
|
52
|
-
/** Focused picker border color. Defaults to `--stroke-accent`. */
|
|
53
|
-
selectBorderFocus?: string;
|
|
54
|
-
}
|
|
55
|
-
/** Style overrides for the access-rule editor. */
|
|
56
|
-
export interface PublishAccessRuleEditorStyles {
|
|
57
|
-
/** Color overrides. */
|
|
58
|
-
colors?: PublishAccessRuleEditorColors;
|
|
59
|
-
/** Additional CSS custom properties applied to the editor root (the sheet panel below the desktop breakpoint). */
|
|
60
|
-
cssVars?: CSSProperties;
|
|
61
|
-
}
|
|
62
|
-
/** Props for the access-rule editor. */
|
|
63
|
-
export interface PublishAccessRuleEditorProps {
|
|
64
|
-
/** Options offered in the source picker. */
|
|
65
|
-
sourceOptions: string[];
|
|
66
|
-
/** Called with the completed rule. */
|
|
67
|
-
onSave: (rule: PublicationRule) => void;
|
|
68
|
-
/** Called when editing is cancelled. */
|
|
69
|
-
onCancel: () => void;
|
|
70
|
-
/** Disables every control. Defaults to `false`. */
|
|
71
|
-
disabled?: boolean;
|
|
72
|
-
/** Maximum target count. Defaults to `20`. */
|
|
73
|
-
maxTargets?: number;
|
|
74
|
-
/** Text overrides. */
|
|
75
|
-
labels?: PublishAccessRuleEditorLabels;
|
|
76
|
-
/** Style overrides. */
|
|
77
|
-
styles?: PublishAccessRuleEditorStyles;
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=publish-access-rule-editor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publish-access-rule-editor.d.ts","sourceRoot":"","sources":["../../src/models/publish-access-rule-editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,iDAAiD;AACjD,MAAM,WAAW,6BAA6B;IAC5C,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iFAAiF;IACjF,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CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,uBAAuB;IACvB,MAAM,CAAC,EAAE,6BAA6B,CAAC;CACxC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { PublishAccessRuleEditorStyles } from './publish-access-rule-editor';
|
|
3
|
-
/** Color overrides for the access-rules section. */
|
|
4
|
-
export interface PublishAccessRulesColors {
|
|
5
|
-
/** Rule row background. Defaults to `--bg-layer-base`. */
|
|
6
|
-
ruleBackground?: string;
|
|
7
|
-
/** Section heading text color. Defaults to `--text-primary`. */
|
|
8
|
-
headingText?: string;
|
|
9
|
-
/** Hint text color. Defaults to `--text-primary`. */
|
|
10
|
-
hintText?: string;
|
|
11
|
-
/** Loading message text color. Defaults to `--text-primary`. */
|
|
12
|
-
loadingText?: string;
|
|
13
|
-
/** Rule chip text color. Defaults to `--text-primary`. */
|
|
14
|
-
ruleText?: string;
|
|
15
|
-
}
|
|
16
|
-
/** Style overrides for the access-rules section and its editor. */
|
|
17
|
-
export interface PublishAccessRulesStyles {
|
|
18
|
-
/** Color overrides for the section. */
|
|
19
|
-
colors?: PublishAccessRulesColors;
|
|
20
|
-
/** Style overrides forwarded to the nested rule editor. */
|
|
21
|
-
editor?: PublishAccessRuleEditorStyles;
|
|
22
|
-
/** Additional CSS custom properties applied to the section root. */
|
|
23
|
-
cssVars?: CSSProperties;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=publish-access-rules-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publish-access-rules-styles.d.ts","sourceRoot":"","sources":["../../src/models/publish-access-rules-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAElF,oDAAoD;AACpD,MAAM,WAAW,wBAAwB;IACvC,0DAA0D;IAC1D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,mEAAmE;AACnE,MAAM,WAAW,wBAAwB;IACvC,uCAAuC;IACvC,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,2DAA2D;IAC3D,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,oEAAoE;IACpE,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB"}
|