@epam/ai-dial-catalog 1.3.0-dev.364 → 1.3.0-dev.371

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 (40) hide show
  1. package/components/Details/DetailsPanel.d.ts.map +1 -1
  2. package/components/Details/DetailsPublishContent.d.ts +19 -0
  3. package/components/Details/DetailsPublishContent.d.ts.map +1 -0
  4. package/components/Details/DetailsTabs.d.ts +23 -0
  5. package/components/Details/DetailsTabs.d.ts.map +1 -0
  6. package/components/Details/Header/Header.d.ts +3 -153
  7. package/components/Details/Header/Header.d.ts.map +1 -1
  8. package/components/Details/Header/HeaderCredentialsButton.d.ts +16 -0
  9. package/components/Details/Header/HeaderCredentialsButton.d.ts.map +1 -0
  10. package/components/Details/Header/HeaderManageSlot.d.ts +27 -0
  11. package/components/Details/Header/HeaderManageSlot.d.ts.map +1 -0
  12. package/components/Details/Header/LimitStatusBadge.d.ts +14 -0
  13. package/components/Details/Header/LimitStatusBadge.d.ts.map +1 -0
  14. package/components/Details/Header/hooks/useManageActions.d.ts +34 -0
  15. package/components/Details/Header/hooks/useManageActions.d.ts.map +1 -0
  16. package/components/Details/Header/hooks/useRecipientsCount.d.ts +11 -0
  17. package/components/Details/Header/hooks/useRecipientsCount.d.ts.map +1 -0
  18. package/components/Details/hooks/useDetailsConfirmation.d.ts +29 -0
  19. package/components/Details/hooks/useDetailsConfirmation.d.ts.map +1 -0
  20. package/components/Details/hooks/useDetailsContentFile.d.ts +19 -0
  21. package/components/Details/hooks/useDetailsContentFile.d.ts.map +1 -0
  22. package/components/Details/hooks/useDetailsPublish.d.ts +22 -0
  23. package/components/Details/hooks/useDetailsPublish.d.ts.map +1 -0
  24. package/components/ListView/columns.d.ts +1 -2
  25. package/components/ListView/columns.d.ts.map +1 -1
  26. package/index.css +1 -1
  27. package/index.d.ts +2 -1
  28. package/index.d.ts.map +1 -1
  29. package/index.js +2456 -2231
  30. package/models/details-header.d.ts +176 -0
  31. package/models/details-header.d.ts.map +1 -0
  32. package/models/details-panel.d.ts +31 -0
  33. package/models/details-panel.d.ts.map +1 -0
  34. package/package.json +3 -3
  35. package/types/list-view-column.d.ts +7 -0
  36. package/types/list-view-column.d.ts.map +1 -0
  37. package/utils/details-header-actions.d.ts +37 -0
  38. package/utils/details-header-actions.d.ts.map +1 -0
  39. package/utils/details-panel.d.ts +33 -0
  40. package/utils/details-panel.d.ts.map +1 -0
@@ -0,0 +1,176 @@
1
+ import { TablerIcon } from '@tabler/icons-react';
2
+ import { ReactNode } from 'react';
3
+ import { CredentialsLevel } from '../types/toolset-auth';
4
+ import { CatalogItem } from './catalog-item';
5
+ import { ItemDetailsStyles, ItemDetailsTexts } from './item-details-props';
6
+ /**
7
+ * One secondary ("Manage") action, declared once and rendered on whichever
8
+ * surface it lands on: an entry inside the overflow menu, or — when it is the
9
+ * only action left after filtering — a button in the action row. The icon
10
+ * stays a component rather than a rendered node so each surface can size it
11
+ * for itself (SM in the menu, MD on a button).
12
+ */
13
+ export interface ManageAction {
14
+ /** Stable key of the action, also the menu item key. */
15
+ key: string;
16
+ /** Visible label. */
17
+ label: ReactNode;
18
+ /** Icon component, sized by the surface that renders it. */
19
+ Icon: TablerIcon;
20
+ /** Menu-entry icon tint. The destructive entries take the menu row's own colour. */
21
+ iconClassName?: string;
22
+ /** Whether the action is destructive. */
23
+ danger?: boolean;
24
+ /** Runs the action. */
25
+ onClick: () => void;
26
+ }
27
+ /**
28
+ * Props for {@link Header}, exported as `DetailsHeaderProps`: the details
29
+ * view's identity block and action row. Every action is opt-in and hidden
30
+ * when its prop is absent.
31
+ */
32
+ export interface HeaderProps {
33
+ /** The item whose identity, folder and actions are shown. */
34
+ item: CatalogItem;
35
+ /** Called by the primary "Use in chat" action. The action is hidden when absent. */
36
+ onUseInChat?: (item: CatalogItem) => void;
37
+ /** Returns `false` to hide the primary action for an item. */
38
+ isPrimaryActionVisible?: (item: CatalogItem) => boolean;
39
+ /** Called by Share when no `shareOverlay` is given. Share is hidden when both are absent. */
40
+ onShare?: (item: CatalogItem) => void;
41
+ /**
42
+ * Renders the Share popover content. When provided, choosing Share opens
43
+ * this popover instead of calling `onShare`. It anchors to whichever surface
44
+ * carries Share: the header button, or the Manage trigger when
45
+ * `isSharePrimary` has moved the entry into that menu.
46
+ */
47
+ shareOverlay?: (item: CatalogItem, onClose: () => void) => ReactNode;
48
+ /**
49
+ * Additional caller-supplied rule for whether Share is shown, combined
50
+ * (AND) with the built-in ownership/type rule.
51
+ */
52
+ isShareVisible?: (item: CatalogItem) => boolean;
53
+ /**
54
+ * Resolves whether Share renders as its own header button rather than a
55
+ * Manage-menu entry. Defaults to `true` — the header button. Returning
56
+ * `false` moves Share into the Manage menu, beside Delete. Share renders on
57
+ * one surface or the other, never both.
58
+ */
59
+ isSharePrimary?: (item: CatalogItem) => boolean;
60
+ /** Called by the Manage menu's "Edit" entry, shown only for an editable item. */
61
+ onEdit?: (item: CatalogItem) => void;
62
+ /**
63
+ * Called when "Download" is clicked. In the Manage menu, fire-and-forget:
64
+ * the result is not awaited and no pending state is shown. As the primary
65
+ * action (see `isDownloadPrimary`), the call is awaited and drives a
66
+ * pending/disabled state on the button.
67
+ */
68
+ onDownload?: (item: CatalogItem) => Promise<void> | void;
69
+ /** Additional caller-supplied rule for whether "Download" is shown. Defaults to `true` when absent. */
70
+ isDownloadVisible?: (item: CatalogItem) => boolean;
71
+ /**
72
+ * Resolves whether Download renders as the primary action instead of a
73
+ * Manage-menu entry. Defaults to a Skill whose "Use in chat" primary action
74
+ * is not shown (`item.type === CatalogEntityType.Skill` and no primary
75
+ * action). An item whose Download is primary never also shows it in the
76
+ * Manage menu.
77
+ */
78
+ isDownloadPrimary?: (item: CatalogItem) => boolean;
79
+ /** Called when "Delete" is clicked in the Manage menu. The details panel owns the confirmation step, so this only requests it. */
80
+ onDelete?: (item: CatalogItem) => void;
81
+ /** Called when the recipient-side "Remove from My List" action is clicked for an item shared with the current user. The details panel owns the confirmation step. */
82
+ onUnshare?: (item: CatalogItem) => void;
83
+ /** Additional caller-supplied rule for whether "Remove from My List" is shown, combined (AND) with the built-in `sharedWithMe`/`isMyApp` rule. Defaults to `true` when absent. */
84
+ isUnshareVisible?: (item: CatalogItem) => boolean;
85
+ /** Called when the owner-side "Revoke access" action is clicked for an item the current user owns. The details panel owns the confirmation step. */
86
+ onRevokeShare?: (item: CatalogItem) => void;
87
+ /** Resolves how many users currently hold shared access to an owned item, called when the Manage menu is opened or focused. `0` hides "Revoke access"; `undefined` or a rejection leaves it reachable without a count. */
88
+ onFetchRecipientsCount?: (item: CatalogItem) => Promise<number | undefined>;
89
+ /** Additional caller-supplied rule for whether "Revoke access" is shown, combined (AND) with the built-in `isMyApp` rule and the recipient count. Defaults to `true` when absent. */
90
+ isRevokeShareVisible?: (item: CatalogItem) => boolean;
91
+ /** Called by the credentials action to sign in (OAuth) or to add an API key, for the given credentials level. May return a promise. */
92
+ onLogin?: (item: CatalogItem, params: {
93
+ level: CredentialsLevel;
94
+ apiKey?: string;
95
+ }) => Promise<void> | void;
96
+ /** Called to sign out or remove an API key for the given credentials level, when no confirmation is requested through `onRequestLogout`. May return a promise. */
97
+ onLogout?: (item: CatalogItem, params: {
98
+ level: CredentialsLevel;
99
+ }) => Promise<void> | void;
100
+ /**
101
+ * Called when the credentials trigger button is clicked and the resolved
102
+ * state is "Manage credentials"/"Manage API keys" — opens the admin
103
+ * credentials-management sub-screen.
104
+ */
105
+ onOpenCredentialsManagement?: () => void;
106
+ /**
107
+ * Called instead of directly logging out when the resolved state is
108
+ * "Log out" for OAuth authentication — opens the logout confirmation
109
+ * without signing out immediately.
110
+ */
111
+ onRequestLogout?: () => void;
112
+ /** Text overrides, shared with `DetailsPanel`. */
113
+ texts?: ItemDetailsTexts;
114
+ /** Style overrides, shared with `DetailsPanel`. */
115
+ detailsStyles?: ItemDetailsStyles;
116
+ /**
117
+ * Controls whether the "Publish" action is shown. Defaults to the same rule
118
+ * as the primary action. Returning `true` is not sufficient on its own:
119
+ * "Publish" is suppressed whenever "Unpublish" is shown, so the panel
120
+ * carries one of the two, never both.
121
+ */
122
+ isPublishVisible?: (item: CatalogItem) => boolean;
123
+ /**
124
+ * Resolves whether whichever of "Publish"/"Unpublish" applies renders as its
125
+ * own header button rather than a Manage-menu entry. Defaults to `false` —
126
+ * the menu entry. It renders on one surface or the other, never both.
127
+ */
128
+ isPublishPrimary?: (item: CatalogItem) => boolean;
129
+ /** Called when the "Publish" button is clicked; the host swaps this panel's content to the publish view. */
130
+ onOpenPublish?: () => void;
131
+ /**
132
+ * Additional caller-supplied rule for whether "Unpublish" is shown,
133
+ * combined (AND) with `hasPublishedFolders` and the presence of
134
+ * `onOpenUnpublish`. Defaults to `true` when absent. When the entry ends up
135
+ * shown, it replaces "Publish" rather than joining it. Supplying it also
136
+ * withholds the Manage slot for an item it returns `true` for while
137
+ * `isPublishHistoryResolved` is still `false`, and lets a lone "Unpublish"
138
+ * render as its own button once history resolves — so the host must
139
+ * resolve history for such an item without waiting for hover, and settle
140
+ * it on failure too.
141
+ */
142
+ isUnpublishVisible?: (item: CatalogItem) => boolean;
143
+ /**
144
+ * Whether the panel has resolved publish history for this item to at least
145
+ * one folder. Withheld while the lookup is unresolved and `false` on zero
146
+ * entries or failure — the request cannot be built without a folder, so an
147
+ * entry shown without one could not do anything if clicked. Default: `false`.
148
+ */
149
+ hasPublishedFolders?: boolean;
150
+ /**
151
+ * Whether the panel's publish-history lookup for this item has settled.
152
+ * Keeps the Manage trigger rendered while an "Unpublish" entry is still
153
+ * pending, so an item that would have no other entry can still start the
154
+ * lookup that produces one. Default: `true` — a host that does not report
155
+ * it is treated as having nothing outstanding.
156
+ */
157
+ isPublishHistoryResolved?: boolean;
158
+ /**
159
+ * Starts the panel's publish-history lookup, called on hover/focus of the
160
+ * Manage trigger and on Manage-menu open, plus on hover/focus of the publish
161
+ * button where `isPublishPrimary` promoted it into the action row. Guarded
162
+ * once per item by the panel.
163
+ */
164
+ onRequestPublishHistory?: () => void;
165
+ /** Called when the "Unpublish" button is clicked; the host swaps this panel's content to the unpublish confirmation. */
166
+ onOpenUnpublish?: () => void;
167
+ /**
168
+ * Renders the header read-only: every action that mutates the item or the
169
+ * caller's relationship to it — Share, Publish/Unpublish, Edit, Delete,
170
+ * "Remove from My List", "Revoke access", and the credentials Log in / Log
171
+ * out / manage button — is withheld. The non-mutating actions (the primary
172
+ * "Use in chat" and Download) still render. Default: false.
173
+ */
174
+ isReadonly?: boolean;
175
+ }
176
+ //# sourceMappingURL=details-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details-header.d.ts","sourceRoot":"","sources":["../../src/models/details-header.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEhF;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,qBAAqB;IACrB,KAAK,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,IAAI,EAAE,UAAU,CAAC;IACjB,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yCAAyC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,6DAA6D;IAC7D,IAAI,EAAE,WAAW,CAAC;IAClB,oFAAoF;IACpF,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1C,8DAA8D;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;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -0,0 +1,31 @@
1
+ import { ConfirmationPopupVariant } from '@epam/ai-dial-ui-kit';
2
+ import { ReactNode } from 'react';
3
+ /** One folder an item is currently published to, derived from its publish history. */
4
+ export interface PublishedFolder {
5
+ /** Joined folder path, used for identity and display. Empty for the public root. */
6
+ key: string;
7
+ /** Folder path segments, the shape `onUnpublish` is handed. */
8
+ segments: string[];
9
+ }
10
+ /** Everything the panel needs to render the confirmation step for one {@link DetailsConfirmationKind}. */
11
+ export interface ConfirmationContent {
12
+ /** Sub-view title, shown next to the back button and used as the dialog's accessible name. */
13
+ title: string;
14
+ /** Confirmation body copy. */
15
+ message: ReactNode;
16
+ /** Consequences listed as bullets under the message. */
17
+ consequences?: string[];
18
+ /** Label of the confirming action button. */
19
+ confirmLabel: string;
20
+ /** Status text announced to assistive tech while the action is in flight. */
21
+ loadingStatusLabel: string;
22
+ /** Palette the confirm button (and its icon) is rendered with. */
23
+ variant: ConfirmationPopupVariant;
24
+ /**
25
+ * Palette of the item identity card. Defaults to `variant` when absent —
26
+ * only `DeleteApiKey` diverges, since removing one credential is far less
27
+ * consequential than the whole-item actions that share the danger button.
28
+ */
29
+ cardVariant?: ConfirmationPopupVariant;
30
+ }
31
+ //# sourceMappingURL=details-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details-panel.d.ts","sourceRoot":"","sources":["../../src/models/details-panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,sFAAsF;AACtF,MAAM,WAAW,eAAe;IAC9B,oFAAoF;IACpF,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,0GAA0G;AAC1G,MAAM,WAAW,mBAAmB;IAClC,8FAA8F;IAC9F,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,OAAO,EAAE,SAAS,CAAC;IACnB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kEAAkE;IAClE,OAAO,EAAE,wBAAwB,CAAC;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACxC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-catalog",
3
3
  "description": "Marketplace catalog component for browsing models, tools, and assistants with search, filter, and sort",
4
- "version": "1.3.0-dev.364",
4
+ "version": "1.3.0-dev.371",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -28,11 +28,11 @@
28
28
  "dependencies": {
29
29
  "@tabler/icons-react": "^3.50.0",
30
30
  "ag-grid-community": "^35.3.0",
31
- "@epam/ai-dial-publish-panel": "1.3.0-dev.364"
31
+ "@epam/ai-dial-publish-panel": "1.3.0-dev.371"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "^19.2.8",
35
- "@epam/ai-dial-chat-shared": "1.3.0-dev.364",
35
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.371",
36
36
  "@epam/ai-dial-ui-kit": "^0.16.0"
37
37
  },
38
38
  "repository": {
@@ -0,0 +1,7 @@
1
+ /** The optional built-in `ListView` columns a host can independently show or hide per entity type. */
2
+ export declare enum ListViewColumnKey {
3
+ Folder = "folder",
4
+ Tags = "tags",
5
+ Favorite = "favorite"
6
+ }
7
+ //# sourceMappingURL=list-view-column.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-view-column.d.ts","sourceRoot":"","sources":["../../src/types/list-view-column.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,37 @@
1
+ import { HeaderProps } from '../models/details-header';
2
+ import { RecipientsCountStatus } from '../types/recipients-count';
3
+ import { CredentialsUiState, ToolsetAuthenticationType } from '../types/toolset-auth';
4
+ /** Returns the default label of the admin credentials-management action for an authentication type. */
5
+ export declare const defaultManageCredentialsActionLabel: (authenticationType: ToolsetAuthenticationType) => string;
6
+ /** Parameters for {@link resolveHeaderActionVisibility}. */
7
+ export interface HeaderActionVisibilityParams extends Pick<HeaderProps, 'item' | 'texts' | 'isReadonly' | 'isPrimaryActionVisible' | 'onOpenUnpublish' | 'hasPublishedFolders' | 'isUnpublishVisible' | 'isPublishHistoryResolved' | 'isPublishVisible' | 'onEdit' | 'isShareVisible' | 'isSharePrimary' | 'isPublishPrimary' | 'onLogin' | 'onLogout' | 'onDownload' | 'isDownloadVisible' | 'isDownloadPrimary' | 'onUnshare' | 'isUnshareVisible' | 'onRevokeShare' | 'onFetchRecipientsCount' | 'isRevokeShareVisible'> {
8
+ /** State of the recipient-count lookup, from `useRecipientsCount`. */
9
+ recipientsCountStatus: RecipientsCountStatus;
10
+ /** Resolved recipient count, from `useRecipientsCount`. */
11
+ recipientsCount: number | undefined;
12
+ }
13
+ /** Resolves which header actions show, and on which surface, for one item. */
14
+ export declare const resolveHeaderActionVisibility: ({ item, texts, isReadonly, isPrimaryActionVisible, onOpenUnpublish, hasPublishedFolders, isUnpublishVisible, isPublishHistoryResolved, isPublishVisible, onEdit, isShareVisible, isSharePrimary, isPublishPrimary, onLogin, onLogout, onDownload, isDownloadVisible, isDownloadPrimary, onUnshare, isUnshareVisible, onRevokeShare, onFetchRecipientsCount, isRevokeShareVisible, recipientsCountStatus, recipientsCount, }: HeaderActionVisibilityParams) => {
15
+ shouldShowPrimaryAction: boolean;
16
+ shouldShowUnpublish: boolean;
17
+ isUnpublishPending: boolean;
18
+ shouldShowPublish: boolean;
19
+ shouldShowEditAction: boolean;
20
+ shouldShowShareAction: boolean;
21
+ isShareInActionRow: boolean;
22
+ isPublishInActionRow: boolean;
23
+ authenticationType: ToolsetAuthenticationType;
24
+ credentialsUiState: CredentialsUiState | undefined;
25
+ shouldShowCredentialsAction: boolean;
26
+ isCredentialsActionPrimary: boolean;
27
+ isDownloadActionPrimary: boolean;
28
+ shouldShowDownloadAction: boolean;
29
+ shouldShowDeleteAction: boolean | undefined;
30
+ shouldShowUnshareAction: boolean;
31
+ shouldShowRevokeShareAction: boolean;
32
+ mayGainUnpublishEntry: boolean;
33
+ mayGainRevokeShareEntry: boolean;
34
+ isApiKeyConfigured: boolean;
35
+ isOAuthLogoutState: boolean;
36
+ };
37
+ //# sourceMappingURL=details-header-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details-header-actions.d.ts","sourceRoot":"","sources":["../../src/utils/details-header-actions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAG/B,uGAAuG;AACvG,eAAO,MAAM,mCAAmC,GAC9C,oBAAoB,yBAAyB,KAC5C,MAGuB,CAAC;AAE3B,4DAA4D;AAC5D,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CACxD,WAAW,EACT,MAAM,GACN,OAAO,GACP,YAAY,GACZ,wBAAwB,GACxB,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,GACpB,0BAA0B,GAC1B,kBAAkB,GAClB,QAAQ,GACR,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,SAAS,GACT,UAAU,GACV,YAAY,GACZ,mBAAmB,GACnB,mBAAmB,GACnB,WAAW,GACX,kBAAkB,GAClB,eAAe,GACf,wBAAwB,GACxB,sBAAsB,CACzB;IACC,sEAAsE;IACtE,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,2DAA2D;IAC3D,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,GAAI,6ZA0B3C,4BAA4B;;;;;;;;;;;;;;;;;;;;;;CAwM9B,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { PublishFolderNode } from '@epam/ai-dial-publish-panel';
2
+ import { CSSProperties } from 'react';
3
+ import { PublishedFolder } from '../models/details-panel';
4
+ import { ItemDetailsColors } from '../models/item-details-props';
5
+ import { DetailsConfirmationKind } from '../types/details-confirmation';
6
+ import { CredentialsLevel, ToolsetAuthenticationType } from '../types/toolset-auth';
7
+ /** One published folder needs no choice; several require the user to pick one. */
8
+ export declare const resolveUnpublishFolder: (folders: PublishedFolder[], selectedKey: string | null) => PublishedFolder | undefined;
9
+ /** Whether the catalog's publish flow may replace an already-published version. Always `false`. */
10
+ export declare const CATALOG_PUBLISH_ALLOWS_REPLACE = false;
11
+ /** Publish handler used when the host supplies none. */
12
+ export declare const NO_OP_PUBLISH: () => Promise<undefined>;
13
+ /** Stable empty folder list for the `publishFolderItems` default. */
14
+ export declare const EMPTY_PUBLISH_FOLDERS: PublishFolderNode[];
15
+ /** Stable empty list for the `ruleSourceOptions` default. */
16
+ export declare const EMPTY_RULE_SOURCE_OPTIONS: string[];
17
+ /** Default consequences listed under the Delete confirmation. */
18
+ export declare const DEFAULT_DELETE_CONSEQUENCES: string[];
19
+ /** Default consequences listed under the Remove-from-My-List confirmation. */
20
+ export declare const DEFAULT_UNSHARE_CONSEQUENCES: string[];
21
+ /** Default consequences listed under the Unpublish confirmation. */
22
+ export declare const DEFAULT_UNPUBLISH_CONSEQUENCES: string[];
23
+ /** Default consequences listed under the Revoke-access confirmation. */
24
+ export declare const DEFAULT_REVOKE_SHARE_CONSEQUENCES: string[];
25
+ /** Returns the default credentials-management sub-view title for an authentication type. */
26
+ export declare const defaultCredentialsManagementTitle: (authenticationType: ToolsetAuthenticationType) => string;
27
+ /** Returns the default API-key delete confirmation message for a credentials level. */
28
+ export declare const defaultDeleteApiKeyConfirmMessage: (level: CredentialsLevel) => string;
29
+ /** Confirmation kinds that close the details panel once confirmed. */
30
+ export declare const CONFIRMATIONS_REMOVING_ITEM_FROM_VIEW: Set<DetailsConfirmationKind>;
31
+ /** Maps the details panel color overrides to the CSS custom properties its stylesheets read. */
32
+ export declare const getDetailsPanelCssVars: (detailsColors: ItemDetailsColors | undefined) => CSSProperties;
33
+ //# sourceMappingURL=details-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details-panel.d.ts","sourceRoot":"","sources":["../../src/utils/details-panel.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAE/B,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,GACjC,SAAS,eAAe,EAAE,EAC1B,aAAa,MAAM,GAAG,IAAI,KACzB,eAAe,GAAG,SAKpB,CAAC;AASF,mGAAmG;AACnG,eAAO,MAAM,8BAA8B,QAAQ,CAAC;AACpD,wDAAwD;AACxD,eAAO,MAAM,aAAa,0BAAwB,CAAC;AACnD,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAAO,CAAC;AAC7D,6DAA6D;AAC7D,eAAO,MAAM,yBAAyB,EAAE,MAAM,EAAO,CAAC;AAEtD,iEAAiE;AACjE,eAAO,MAAM,2BAA2B,UAIvC,CAAC;AAEF,8EAA8E;AAC9E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