@epam/ai-dial-catalog 1.1.0-dev.30 → 1.1.0-dev.307

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 (203) hide show
  1. package/components/AppIdentity/AppIdentity.d.ts +9 -14
  2. package/components/AppIdentity/AppIdentity.d.ts.map +1 -1
  3. package/components/CardGrid/Card.d.ts.map +1 -1
  4. package/components/CardGrid/CardGrid.d.ts.map +1 -1
  5. package/components/CardGrid/CardRowRenderer.d.ts.map +1 -1
  6. package/components/CardTag/CardTag.d.ts +24 -0
  7. package/components/CardTag/CardTag.d.ts.map +1 -0
  8. package/components/Catalog/Catalog.d.ts +1 -5
  9. package/components/Catalog/Catalog.d.ts.map +1 -1
  10. package/components/Catalog/CreateButton.d.ts +2 -2
  11. package/components/Catalog/CreateButton.d.ts.map +1 -1
  12. package/components/CredentialsBadge/CredentialsBadge.d.ts +12 -5
  13. package/components/CredentialsBadge/CredentialsBadge.d.ts.map +1 -1
  14. package/components/Details/ApiDetails.d.ts +6 -2
  15. package/components/Details/ApiDetails.d.ts.map +1 -1
  16. package/components/Details/ConfirmationView/ConfirmationFooter.d.ts +29 -0
  17. package/components/Details/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
  18. package/components/Details/ConfirmationView/ConfirmationView.d.ts +28 -0
  19. package/components/Details/ConfirmationView/ConfirmationView.d.ts.map +1 -0
  20. package/components/Details/Credentials/CredentialsBanner/CredentialsBanner.d.ts +16 -0
  21. package/components/Details/Credentials/CredentialsBanner/CredentialsBanner.d.ts.map +1 -0
  22. package/components/Details/Credentials/CredentialsIdentityIcon/CredentialsIdentityIcon.d.ts +29 -0
  23. package/components/Details/Credentials/CredentialsIdentityIcon/CredentialsIdentityIcon.d.ts.map +1 -0
  24. package/components/Details/Credentials/CredentialsInfoCard/CredentialsInfoCard.d.ts +20 -0
  25. package/components/Details/Credentials/CredentialsInfoCard/CredentialsInfoCard.d.ts.map +1 -0
  26. package/components/Details/Credentials/CredentialsManagementPanel/CredentialsManagementPanel.d.ts +31 -0
  27. package/components/Details/Credentials/CredentialsManagementPanel/CredentialsManagementPanel.d.ts.map +1 -0
  28. package/components/Details/DetailsPanel.d.ts.map +1 -1
  29. package/components/Details/Header/CredentialsApiKeyOverlay/CredentialsApiKeyOverlay.d.ts +34 -0
  30. package/components/Details/Header/CredentialsApiKeyOverlay/CredentialsApiKeyOverlay.d.ts.map +1 -0
  31. package/components/Details/Header/Header.d.ts +92 -19
  32. package/components/Details/Header/Header.d.ts.map +1 -1
  33. package/components/Details/Header/ShareButton/ShareButton.d.ts +6 -0
  34. package/components/Details/Header/ShareButton/ShareButton.d.ts.map +1 -1
  35. package/components/Details/TabsContent/About.d.ts +3 -2
  36. package/components/Details/TabsContent/About.d.ts.map +1 -1
  37. package/components/Details/TabsContent/Content.d.ts +53 -0
  38. package/components/Details/TabsContent/Content.d.ts.map +1 -0
  39. package/components/Details/TabsContent/ContentFileTree/ContentFileTree.d.ts +28 -0
  40. package/components/Details/TabsContent/ContentFileTree/ContentFileTree.d.ts.map +1 -0
  41. package/components/Details/TabsContent/DataGrid/DataGrid.d.ts +1 -1
  42. package/components/Details/TabsContent/DataGrid/DataGrid.d.ts.map +1 -1
  43. package/components/Details/TabsContent/Limits/LimitGroupSection.d.ts +11 -0
  44. package/components/Details/TabsContent/Limits/LimitGroupSection.d.ts.map +1 -0
  45. package/components/Details/TabsContent/Limits/LimitRow.d.ts +10 -0
  46. package/components/Details/TabsContent/Limits/LimitRow.d.ts.map +1 -0
  47. package/components/Details/TabsContent/Limits/Limits.d.ts +5 -0
  48. package/components/Details/TabsContent/Limits/Limits.d.ts.map +1 -0
  49. package/components/Favorites/FavoriteCard.d.ts +9 -4
  50. package/components/Favorites/FavoriteCard.d.ts.map +1 -1
  51. package/components/Favorites/Favorites.d.ts.map +1 -1
  52. package/components/Filter/Filter.d.ts +42 -6
  53. package/components/Filter/Filter.d.ts.map +1 -1
  54. package/components/InfoCard/InfoCard.d.ts +15 -0
  55. package/components/InfoCard/InfoCard.d.ts.map +1 -0
  56. package/components/ListView/ListView.d.ts +1 -5
  57. package/components/ListView/ListView.d.ts.map +1 -1
  58. package/components/ListView/Renders/EntityTypeCellRenderer.d.ts +1 -0
  59. package/components/ListView/Renders/EntityTypeCellRenderer.d.ts.map +1 -1
  60. package/components/ListView/Renders/FolderCellRenderer.d.ts +1 -0
  61. package/components/ListView/Renders/FolderCellRenderer.d.ts.map +1 -1
  62. package/components/ListView/Renders/NameCellRenderer.d.ts +1 -0
  63. package/components/ListView/Renders/NameCellRenderer.d.ts.map +1 -1
  64. package/components/ListView/Renders/StarCellRenderer.d.ts +1 -0
  65. package/components/ListView/Renders/StarCellRenderer.d.ts.map +1 -1
  66. package/components/ListView/Renders/TagsCellRenderer.d.ts +1 -0
  67. package/components/ListView/Renders/TagsCellRenderer.d.ts.map +1 -1
  68. package/components/ListView/columns.d.ts +2 -1
  69. package/components/ListView/columns.d.ts.map +1 -1
  70. package/components/StarToggleButton/StarToggleButton.d.ts +2 -0
  71. package/components/StarToggleButton/StarToggleButton.d.ts.map +1 -1
  72. package/components/TableView/TableView.d.ts +19 -0
  73. package/components/TableView/TableView.d.ts.map +1 -1
  74. package/components/Toolbar/Rows/TitleRow.d.ts +4 -3
  75. package/components/Toolbar/Rows/TitleRow.d.ts.map +1 -1
  76. package/components/Toolbar/Toolbar.d.ts.map +1 -1
  77. package/components/TopicTag/TopicTag.d.ts +12 -7
  78. package/components/TopicTag/TopicTag.d.ts.map +1 -1
  79. package/index.css +1 -1
  80. package/index.d.ts +21 -34
  81. package/index.d.ts.map +1 -1
  82. package/index.js +47934 -10596
  83. package/models/app-identity-styles.d.ts +28 -0
  84. package/models/app-identity-styles.d.ts.map +1 -0
  85. package/models/card-props.d.ts +22 -14
  86. package/models/card-props.d.ts.map +1 -1
  87. package/models/card-row-data.d.ts +5 -1
  88. package/models/card-row-data.d.ts.map +1 -1
  89. package/models/catalog-item-credentials.d.ts +4 -0
  90. package/models/catalog-item-credentials.d.ts.map +1 -1
  91. package/models/catalog-item.d.ts +3 -6
  92. package/models/catalog-item.d.ts.map +1 -1
  93. package/models/catalog-props.d.ts +158 -33
  94. package/models/catalog-props.d.ts.map +1 -1
  95. package/models/catalog-styles.d.ts +4 -41
  96. package/models/catalog-styles.d.ts.map +1 -1
  97. package/models/favorites.d.ts +24 -8
  98. package/models/favorites.d.ts.map +1 -1
  99. package/models/grid-context.d.ts +6 -1
  100. package/models/grid-context.d.ts.map +1 -1
  101. package/models/grid-props.d.ts +13 -1
  102. package/models/grid-props.d.ts.map +1 -1
  103. package/models/item-details-data.d.ts +94 -4
  104. package/models/item-details-data.d.ts.map +1 -1
  105. package/models/item-details-props.d.ts +457 -57
  106. package/models/item-details-props.d.ts.map +1 -1
  107. package/models/item-overview.d.ts +1 -7
  108. package/models/item-overview.d.ts.map +1 -1
  109. package/models/limits-props.d.ts +61 -0
  110. package/models/limits-props.d.ts.map +1 -0
  111. package/models/list-props.d.ts +27 -4
  112. package/models/list-props.d.ts.map +1 -1
  113. package/models/toolbar-props.d.ts +7 -21
  114. package/models/toolbar-props.d.ts.map +1 -1
  115. package/package.json +5 -6
  116. package/types/catalog-content-type.d.ts +13 -0
  117. package/types/catalog-content-type.d.ts.map +1 -0
  118. package/types/deployment-icon-size.d.ts +5 -0
  119. package/types/deployment-icon-size.d.ts.map +1 -0
  120. package/types/detail-tab.d.ts +4 -1
  121. package/types/detail-tab.d.ts.map +1 -1
  122. package/types/details-confirmation.d.ts +28 -0
  123. package/types/details-confirmation.d.ts.map +1 -0
  124. package/types/recipients-count.d.ts +12 -0
  125. package/types/recipients-count.d.ts.map +1 -0
  126. package/types/toolset-auth.d.ts +9 -0
  127. package/types/toolset-auth.d.ts.map +1 -1
  128. package/utils/catalog-content-tree.d.ts +8 -0
  129. package/utils/catalog-content-tree.d.ts.map +1 -0
  130. package/utils/catalog-filter.d.ts +1 -0
  131. package/utils/catalog-filter.d.ts.map +1 -1
  132. package/utils/catalog-sort.d.ts +1 -8
  133. package/utils/catalog-sort.d.ts.map +1 -1
  134. package/utils/catalog-tabs.d.ts +2 -2
  135. package/utils/catalog-tabs.d.ts.map +1 -1
  136. package/utils/styles.d.ts +1 -3
  137. package/utils/styles.d.ts.map +1 -1
  138. package/utils/toolset-credentials.d.ts +6 -19
  139. package/utils/toolset-credentials.d.ts.map +1 -1
  140. package/utils/usage-limits.d.ts +15 -0
  141. package/utils/usage-limits.d.ts.map +1 -0
  142. package/utils/use-fav-columns.d.ts +1 -4
  143. package/utils/use-fav-columns.d.ts.map +1 -1
  144. package/utils/use-scroll-virtualizer.d.ts +1 -9
  145. package/utils/use-scroll-virtualizer.d.ts.map +1 -1
  146. package/components/Details/Credentials/CredentialsSection.d.ts +0 -21
  147. package/components/Details/Credentials/CredentialsSection.d.ts.map +0 -1
  148. package/components/Details/Header/ConnectButton/ConnectButton.d.ts +0 -25
  149. package/components/Details/Header/ConnectButton/ConnectButton.d.ts.map +0 -1
  150. package/components/Details/Header/DeleteButton/DeleteButton.d.ts +0 -25
  151. package/components/Details/Header/DeleteButton/DeleteButton.d.ts.map +0 -1
  152. package/components/Details/Summary/Limits.d.ts +0 -18
  153. package/components/Details/Summary/Limits.d.ts.map +0 -1
  154. package/components/Details/Summary/Summary.d.ts +0 -12
  155. package/components/Details/Summary/Summary.d.ts.map +0 -1
  156. package/components/Details/TabsContent/Limits.d.ts +0 -14
  157. package/components/Details/TabsContent/Limits.d.ts.map +0 -1
  158. package/components/EntityHeader/EntityHeader.d.ts +0 -32
  159. package/components/EntityHeader/EntityHeader.d.ts.map +0 -1
  160. package/components/EntityTypeLabel/EntityTypeLabel.d.ts +0 -16
  161. package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +0 -1
  162. package/components/FeaturedChip/FeaturedChip.d.ts +0 -11
  163. package/components/FeaturedChip/FeaturedChip.d.ts.map +0 -1
  164. package/components/FolderPath/FolderPath.d.ts +0 -25
  165. package/components/FolderPath/FolderPath.d.ts.map +0 -1
  166. package/components/ItemHeader/ItemHeader.d.ts +0 -14
  167. package/components/ItemHeader/ItemHeader.d.ts.map +0 -1
  168. package/components/PublishFoldersTree/PublishFoldersTree.d.ts +0 -72
  169. package/components/PublishFoldersTree/PublishFoldersTree.d.ts.map +0 -1
  170. package/components/PublishHistoryList/PublishHistoryList.d.ts +0 -44
  171. package/components/PublishHistoryList/PublishHistoryList.d.ts.map +0 -1
  172. package/components/PublishPanel/PublishFooter.d.ts +0 -37
  173. package/components/PublishPanel/PublishFooter.d.ts.map +0 -1
  174. package/components/PublishPanel/PublishPanel.d.ts +0 -109
  175. package/components/PublishPanel/PublishPanel.d.ts.map +0 -1
  176. package/components/PublishPanel/StandalonePublishPanel.d.ts +0 -90
  177. package/components/PublishPanel/StandalonePublishPanel.d.ts.map +0 -1
  178. package/components/SearchBar/SearchBar.d.ts +0 -29
  179. package/components/SearchBar/SearchBar.d.ts.map +0 -1
  180. package/constants/catalog-defaults.d.ts +0 -4
  181. package/constants/catalog-defaults.d.ts.map +0 -1
  182. package/constants/entity-colors.d.ts +0 -6
  183. package/constants/entity-colors.d.ts.map +0 -1
  184. package/models/entity-summary.d.ts +0 -23
  185. package/models/entity-summary.d.ts.map +0 -1
  186. package/models/publish.d.ts +0 -89
  187. package/models/publish.d.ts.map +0 -1
  188. package/models/sort.d.ts +0 -8
  189. package/models/sort.d.ts.map +0 -1
  190. package/types/entity-tag.d.ts +0 -9
  191. package/types/entity-tag.d.ts.map +0 -1
  192. package/types/entity-type.d.ts +0 -11
  193. package/types/entity-type.d.ts.map +0 -1
  194. package/utils/format-published-date.d.ts +0 -8
  195. package/utils/format-published-date.d.ts.map +0 -1
  196. package/utils/parse-about-content.d.ts +0 -32
  197. package/utils/parse-about-content.d.ts.map +0 -1
  198. package/utils/publish-folder-tree.d.ts +0 -45
  199. package/utils/publish-folder-tree.d.ts.map +0 -1
  200. package/utils/publish-state.d.ts +0 -9
  201. package/utils/publish-state.d.ts.map +0 -1
  202. package/utils/use-publish-flow.d.ts +0 -77
  203. package/utils/use-publish-flow.d.ts.map +0 -1
@@ -1,90 +0,0 @@
1
- import { FC, RefObject } from 'react';
2
- import { CatalogItem } from '../../models/catalog-item';
3
- import { PublishFolderNode, PublishHistoryEntry, PublishResourceSummary } from '../../models/publish';
4
- import { PublishFooterTexts } from './PublishFooter';
5
- import { PublishPanelTexts } from './PublishPanel';
6
- /** Text overrides for all user-visible strings in {@link StandalonePublishPanel} not already covered by `PublishPanelTexts`/`PublishFooterTexts`. */
7
- export interface StandalonePublishPanelTexts {
8
- /** Header title. Default: `'Publish'`. */
9
- title?: string;
10
- /** Accessible label for the panel's `role="dialog"`. Default: `'Publish'`. */
11
- ariaLabel?: string;
12
- /** Accessible label for the header's Close button. Default: `'Close'`. */
13
- closeAriaLabel?: string;
14
- }
15
- /** Props for {@link StandalonePublishPanel}. */
16
- export interface StandalonePublishPanelProps {
17
- /** Whether the panel is open (controls the slide-in animation and backdrop). */
18
- isOpen: boolean;
19
- /** The catalog entity being published. Mutually exclusive with `resource`. */
20
- item?: CatalogItem;
21
- /** Title-only summary for an unversioned resource (e.g. a conversation). Mutually exclusive with `item`. */
22
- resource?: PublishResourceSummary;
23
- /** Previously published entries for this item. */
24
- history: PublishHistoryEntry[];
25
- /** Whether `history` is currently being fetched. Default: `false`. */
26
- isHistoryLoading?: boolean;
27
- /** Whether the most recent history fetch failed. Default: `false`. */
28
- hasHistoryError?: boolean;
29
- /** Destination folders available for selection. */
30
- folderItems: PublishFolderNode[];
31
- /** Currently selected destination folder path. `undefined` means nothing selected; `[]` means the bucket root. */
32
- selectedFolderPath?: string[];
33
- /** Called when the user selects a destination folder or the root; `undefined` when deselected. */
34
- onSelectedFolderPathChange: (path: string[] | undefined) => void;
35
- /** Called when the user confirms a new folder name. */
36
- onCreateFolder: (parentPath: string[], name: string) => Promise<void>;
37
- /** Externally-controlled set of expanded folder path keys. */
38
- expandedPaths?: Set<string>;
39
- /** Called when the set of expanded folders changes. */
40
- onExpandedPathsChange?: (paths: Set<string>) => void;
41
- /** Folder path keys currently being fetched by the host. */
42
- loadingPaths?: Set<string>;
43
- /** Whether `selectedFolderPath` already has this publication. */
44
- hasExistingPublicationInFolder: boolean;
45
- /** Whether the current user can publish to `selectedFolderPath`. */
46
- hasWriteAccess: boolean;
47
- /** Whether a publish request is currently in flight. */
48
- isSubmitting: boolean;
49
- /** Whether the most recent submit attempt failed. */
50
- hasSubmitError?: boolean;
51
- /**
52
- * Whether resubmitting when `hasExistingPublicationInFolder` is true is
53
- * allowed (catalog default) or blocked (conversations). Default `true`.
54
- */
55
- allowReplace?: boolean;
56
- /** Called when the panel should be dismissed — Close button, Cancel button, backdrop click, or Escape. */
57
- onClose: () => void;
58
- /** Focus target restored when an open panel closes or unmounts. */
59
- returnFocusRef?: RefObject<HTMLElement | null>;
60
- /** Called when the user confirms the publish action. */
61
- onSubmit: () => void;
62
- /** Text overrides for the panel body. */
63
- panelTexts?: PublishPanelTexts;
64
- /** Text overrides for the pinned footer. */
65
- footerTexts?: PublishFooterTexts;
66
- /** Text overrides for the header/shell. */
67
- texts?: StandalonePublishPanelTexts;
68
- }
69
- /**
70
- * Standalone end-edge slide-in panel for the Publish flow, sized and
71
- * animated like `DetailsPanel` but with no details view behind it: the
72
- * header shows a Close (X) button instead of `DetailsPanel`'s publish
73
- * sub-view Back (chevron) control, since there is nothing to go "back" to
74
- * (see design.md D4). Cancel (in the pinned footer) and Escape both invoke
75
- * the same `onClose` as the header's Close button.
76
- *
77
- * Backdrop/panel use `z-[51]`/`z-[52]` rather than `DetailsPanel`'s
78
- * `z-40`/`z-50` — unlike catalog details (opened from a view where no other
79
- * panel is open), this panel is opened while the conversation list's
80
- * `SidebarPanel` (`libs/sidebar`) is still mounted, which applies its own
81
- * `z-50` while open. Matching `z-40`/`z-50` here left that sidebar
82
- * un-dimmed and above the backdrop. Capped at `z-[52]` (not higher) so it
83
- * stays below `@epam/ai-dial-ui-kit`'s own `z-[53]` dropdown/context-menu
84
- * layer — `PublishFoldersTree`'s "Add sibling"/"Add child" context menu
85
- * (`getContextMenuItems`) portals to `document.body` as a sibling of this
86
- * panel, so a higher panel z-index would visually cover and block clicks on
87
- * that menu even though it "opens" correctly in the DOM.
88
- */
89
- export declare const StandalonePublishPanel: FC<StandalonePublishPanelProps>;
90
- //# sourceMappingURL=StandalonePublishPanel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StandalonePublishPanel.d.ts","sourceRoot":"","sources":["../../../src/components/PublishPanel/StandalonePublishPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,SAAS,EAA8B,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAiB,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAgB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGjE,qJAAqJ;AACrJ,MAAM,WAAW,2BAA2B;IAC1C,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,gDAAgD;AAChD,MAAM,WAAW,2BAA2B;IAC1C,gFAAgF;IAChF,MAAM,EAAE,OAAO,CAAC;IAChB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,kDAAkD;IAClD,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sEAAsE;IACtE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mDAAmD;IACnD,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,kHAAkH;IAClH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,kGAAkG;IAClG,0BAA0B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IACjE,uDAAuD;IACvD,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,8DAA8D;IAC9D,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,uDAAuD;IACvD,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,4DAA4D;IAC5D,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,iEAAiE;IACjE,8BAA8B,EAAE,OAAO,CAAC;IACxC,oEAAoE;IACpE,cAAc,EAAE,OAAO,CAAC;IACxB,wDAAwD;IACxD,YAAY,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0GAA0G;IAC1G,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mEAAmE;IACnE,cAAc,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC/C,wDAAwD;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,yCAAyC;IACzC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,4CAA4C;IAC5C,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,2BAA2B,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAuKlE,CAAC"}
@@ -1,29 +0,0 @@
1
- import { FC } from 'react';
2
- /** Props for SearchBar. */
3
- export interface SearchBarProps {
4
- /** Current search query value. */
5
- value: string;
6
- /** Called on every keystroke with the new value. */
7
- onChange: (value: string) => void;
8
- /** Input placeholder text. Default: 'Search'. */
9
- placeholder?: string;
10
- /**
11
- * Accessible label for the input element.
12
- * Defaults to the `placeholder` value, or `'Search'` if neither is provided.
13
- */
14
- ariaLabel?: string;
15
- /** Additional CSS class applied to the container for layout purposes (e.g. flex-1). */
16
- className?: string;
17
- /**
18
- * Accessible label for the clear-search button. When provided, a clear (X) button is shown once `value` is non-empty.
19
- * App callers must pass a translated label.
20
- */
21
- clearLabel?: string;
22
- }
23
- /**
24
- * Catalog search bar. Reuses the shared {@link BaseSearchBar} default colors
25
- * (background, border, hover/focus, icon and text colors) and only adjusts
26
- * height, radius, padding, and icon/text size for the catalog layout.
27
- */
28
- export declare const SearchBar: FC<SearchBarProps>;
29
- //# sourceMappingURL=SearchBar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBar/SearchBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,2BAA2B;AAC3B,MAAM,WAAW,cAAc;IAC7B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAyBxC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { CatalogSortOption } from '../models/sort';
2
- /** Default sort options for the browse toolbar. */
3
- export declare const DEFAULT_SORT_OPTIONS: CatalogSortOption[];
4
- //# sourceMappingURL=catalog-defaults.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"catalog-defaults.d.ts","sourceRoot":"","sources":["../../src/constants/catalog-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,mDAAmD;AACnD,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EAInD,CAAC"}
@@ -1,6 +0,0 @@
1
- import { CatalogEntityType } from '../types/entity-type';
2
- /** Hex color per entity type — used for the type label, featured card border, and drop shadow. */
3
- export declare const ENTITY_TYPE_COLOR: Record<CatalogEntityType, string>;
4
- /** Low-opacity (12%) rgba version of each entity type color — used for featured card glow shadow. */
5
- export declare const ENTITY_TYPE_SHADOW: Record<CatalogEntityType, string>;
6
- //# sourceMappingURL=entity-colors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-colors.d.ts","sourceRoot":"","sources":["../../src/constants/entity-colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAQ/D,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAQhE,CAAC"}
@@ -1,23 +0,0 @@
1
- import { EntityTag } from '../types/entity-tag';
2
- /** Daily usage limit data shown as a progress bar in the entity details header. */
3
- export interface DailyLimit {
4
- /** Number of tokens or requests consumed today. */
5
- used: number;
6
- /** Total daily allowance. */
7
- total: number;
8
- /** Human-readable reset cadence label, e.g. "Resets Fri 12:00 AM". */
9
- resetLabel?: string;
10
- }
11
- /**
12
- * Header-level metadata rendered above the tab strip in the entity details panel.
13
- * All fields are optional; omitting the entire `summary` field hides this section.
14
- */
15
- export interface CatalogItemSummary {
16
- /** Lifecycle or access-tier tag; renders a colored badge next to the entity type. */
17
- tag?: EntityTag;
18
- /** URL of the provider/publisher badge image shown in the header. */
19
- badgeImageUrl?: string;
20
- /** Daily usage limit; when present renders a labeled progress bar. */
21
- dailyLimit?: DailyLimit;
22
- }
23
- //# sourceMappingURL=entity-summary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-summary.d.ts","sourceRoot":"","sources":["../../src/models/entity-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,qFAAqF;IACrF,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sEAAsE;IACtE,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB"}
@@ -1,89 +0,0 @@
1
- /** A single folder in the "publish to folder" destination tree. */
2
- export interface PublishFolderNode {
3
- /** Full path segments to this folder, outermost first. Also serves as the unique key. */
4
- path: string[];
5
- /** Display name of this folder (its last path segment). */
6
- name: string;
7
- /** Child folders, if any. */
8
- children?: PublishFolderNode[];
9
- }
10
- /**
11
- * A previously published version of a catalog entity, or a previous
12
- * publication of an unversioned resource (e.g. a conversation).
13
- */
14
- export interface PublishHistoryEntry {
15
- /**
16
- * Semantic version string, e.g. "4.0.0". `undefined` for unversioned
17
- * resources (e.g. a conversation), where a folder having any entry at all
18
- * already means "already published here" — see `usePublishFlow`.
19
- */
20
- version?: string;
21
- /** Unix timestamp (ms) when this version was published. */
22
- publishedAt: number;
23
- /** Display name of the user who published this version. */
24
- publishedBy: string;
25
- /** Folder path segments this version was published to, outermost first. */
26
- folderPath: string[];
27
- }
28
- /**
29
- * Minimal display data for the Publish flow's entity-summary row, covering
30
- * both versioned catalog entities and unversioned resources (e.g. a
31
- * conversation). `PublishPanel` renders the full `EntityHeader`+version-pill
32
- * summary only when a `CatalogItem` is supplied; a title-only resource
33
- * (`version` and `iconUrl` both absent) renders a simpler row instead.
34
- */
35
- export interface PublishResourceSummary {
36
- /** Display title/name shown in the summary row. */
37
- title: string;
38
- /** Icon URL, if any. */
39
- iconUrl?: string;
40
- /** Version, when the resource is versioned. `undefined` for conversations. */
41
- version?: string;
42
- }
43
- /** Which callout (if any) the publish panel should show below the folder picker. */
44
- export declare enum PublishCalloutKind {
45
- /** No callout — no folder selected, or a request is in flight. */
46
- None = "none",
47
- /** Informational callout describing who gets access once published. */
48
- Info = "info",
49
- /** Warning callout — publishing will replace an existing version in this folder. */
50
- ReplaceWarning = "replaceWarning",
51
- /** Error callout — the user lacks write access to the selected folder. */
52
- NoAccess = "noAccess",
53
- /** Error callout — the most recent submit attempt failed. */
54
- SubmitError = "submitError"
55
- }
56
- /** Inputs used to derive the publish panel's callout and submit-button state. */
57
- export interface PublishDerivationInput {
58
- /** Whether a destination folder is currently selected. */
59
- hasSelectedFolder: boolean;
60
- /**
61
- * Whether the selected folder already has this publication — this exact
62
- * version, for a versioned catalog entity, or any prior publication at
63
- * all, for an unversioned resource (e.g. a conversation).
64
- */
65
- hasExistingPublicationInFolder: boolean;
66
- /** Whether the current user can publish to the selected folder. */
67
- hasWriteAccess: boolean;
68
- /** Whether a publish request is currently in flight. */
69
- isSubmitting: boolean;
70
- /** Whether the most recent submit attempt failed. */
71
- hasSubmitError: boolean;
72
- /**
73
- * Whether resubmitting when `hasExistingPublicationInFolder` is true is
74
- * allowed (catalog: republishing replaces the existing version) or
75
- * blocked entirely (conversations have no update/replace semantics —
76
- * publishing again to the same folder is not supported). Default `true`.
77
- */
78
- allowReplace?: boolean;
79
- }
80
- /** Derived, render-ready state for the publish panel. */
81
- export interface PublishDerivedState {
82
- /** Which callout (if any) to show below the folder picker. */
83
- calloutKind: PublishCalloutKind;
84
- /** Whether the submit button is disabled. */
85
- isSubmitDisabled: boolean;
86
- /** Whether the submit button should show its loading/spinner state. */
87
- isSubmitLoading: boolean;
88
- }
89
- //# sourceMappingURL=publish.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/models/publish.ts"],"names":[],"mappings":"AAAA,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,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,oFAAoF;AACpF,oBAAY,kBAAkB;IAC5B,kEAAkE;IAClE,IAAI,SAAS;IACb,uEAAuE;IACvE,IAAI,SAAS;IACb,oFAAoF;IACpF,cAAc,mBAAmB;IACjC,0EAA0E;IAC1E,QAAQ,aAAa;IACrB,6DAA6D;IAC7D,WAAW,gBAAgB;CAC5B;AAED,iFAAiF;AACjF,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,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;;;;;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"}
package/models/sort.d.ts DELETED
@@ -1,8 +0,0 @@
1
- /** A single option in the sort dropdown. */
2
- export interface CatalogSortOption {
3
- /** Unique key, should match a CatalogSortKey value. */
4
- value: string;
5
- /** Display label shown in the dropdown. */
6
- label: string;
7
- }
8
- //# sourceMappingURL=sort.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../src/models/sort.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,WAAW,iBAAiB;IAChC,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1,9 +0,0 @@
1
- /** Promotional or lifecycle tag displayed on the entity header. */
2
- export declare enum EntityTag {
3
- Free = "FREE",
4
- Featured = "FEATURED",
5
- ByRequest = "BY_REQUEST",
6
- Beta = "BETA",
7
- Deprecated = "DEPRECATED"
8
- }
9
- //# sourceMappingURL=entity-tag.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-tag.d.ts","sourceRoot":"","sources":["../../src/types/entity-tag.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,oBAAY,SAAS;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,SAAS,eAAe;IACxB,IAAI,SAAS;IACb,UAAU,eAAe;CAC1B"}
@@ -1,11 +0,0 @@
1
- /** Entity type for a catalog item. Values are uppercase for direct color-map lookup. */
2
- export declare enum CatalogEntityType {
3
- Model = "MODEL",
4
- Application = "APPLICATION",
5
- Agent = "AGENT",
6
- Toolset = "TOOLSET",
7
- Guardrail = "GUARDRAIL",
8
- Skill = "SKILL",
9
- Mcp = "MCP"
10
- }
11
- //# sourceMappingURL=entity-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-type.d.ts","sourceRoot":"","sources":["../../src/types/entity-type.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Formats a publish timestamp for display: a relative phrase ("Today",
3
- * "Yesterday", "N days ago") within the last week, and an exact date
4
- * (e.g. "Nov 20, 2024") once it's a week old or more. The exact date uses
5
- * `locale` (default: the browser/runtime locale) rather than a fixed one.
6
- */
7
- export declare const formatPublishedDate: (publishedAt: number, now?: number, locale?: string) => string;
8
- //# sourceMappingURL=format-published-date.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format-published-date.d.ts","sourceRoot":"","sources":["../../src/utils/format-published-date.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,EACnB,MAAK,MAAmB,EACxB,SAAS,MAAM,KACd,MAkBF,CAAC"}
@@ -1,32 +0,0 @@
1
- /** A run of consecutive bullet items within an about-content block. */
2
- export interface AboutBulletRun {
3
- kind: 'bullets';
4
- items: string[];
5
- }
6
- /** A plain-text paragraph within an about-content block. */
7
- export interface AboutTextRun {
8
- kind: 'text';
9
- text: string;
10
- }
11
- /** A single content run — either a list of bullets or a paragraph of text. */
12
- export type AboutRun = AboutBulletRun | AboutTextRun;
13
- /**
14
- * A parsed section of about content.
15
- * Sections with a `heading` start with a short non-bullet label line.
16
- */
17
- export interface AboutBlock {
18
- /** Optional section heading (e.g. "Capabilities", "Pricing"). */
19
- heading?: string;
20
- /** Ordered list of content runs inside this block. */
21
- runs: AboutRun[];
22
- }
23
- /**
24
- * Parses a plain-text about description into structured blocks for rendering.
25
- *
26
- * Splits on blank lines. Within each chunk the first line becomes a section
27
- * heading when it is ≤ 60 chars, does not start with `•`, and is followed by
28
- * more lines. Content lines starting with `•` are grouped into bullet runs;
29
- * other lines become text paragraph runs.
30
- */
31
- export declare const parseAboutContent: (content: string) => AboutBlock[];
32
- //# sourceMappingURL=parse-about-content.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-about-content.d.ts","sourceRoot":"","sources":["../../src/utils/parse-about-content.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,4DAA4D;AAC5D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,8EAA8E;AAC9E,MAAM,MAAM,QAAQ,GAAG,cAAc,GAAG,YAAY,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,UAAU,EAgCxD,CAAC"}
@@ -1,45 +0,0 @@
1
- import { DialFile } from '@epam/ai-dial-ui-kit';
2
- import { PublishFolderNode } from '../models/publish';
3
- /**
4
- * Returns the subset of `items` whose name matches `query`, or that contain a
5
- * descendant whose name matches. Matched branches keep only their matching
6
- * descendants. Matching is case-insensitive substring matching.
7
- */
8
- export declare const filterFolderTree: (items: PublishFolderNode[], query: string) => PublishFolderNode[];
9
- /** Returns every folder path (joined by "/") in `items`, recursively. */
10
- export declare const collectFolderKeys: (items: PublishFolderNode[]) => string[];
11
- /** Joins folder path segments into the string path key used by `DialFile`/`DialFoldersTree`. */
12
- export declare const toFolderPathKey: (path: string[]) => string;
13
- /** Splits a `DialFile`/`DialFoldersTree` string path back into folder path segments. */
14
- export declare const fromFolderPathKey: (pathKey: string) => string[];
15
- /**
16
- * Converts `PublishFolderNode[]` to the `DialFile[]` shape `DialFoldersTree`
17
- * requires. `folderId` is required by `DialFile` but unused for this
18
- * folder-only, context-menu-less tree, so it is set to the path key.
19
- */
20
- export declare const toDialFileTree: (items: PublishFolderNode[]) => DialFile[];
21
- /** Error messages returned by {@link validateFolderName} for each rejection reason. */
22
- export interface FolderNameValidationMessages {
23
- /** Shown when the trimmed name is empty. */
24
- empty: string;
25
- /** Shown when the name contains `..` or a forbidden character. */
26
- invalid: string;
27
- /** Shown when a sibling folder already has this name (case-insensitive). */
28
- duplicate: string;
29
- }
30
- /**
31
- * Validates a folder name entered in the publish destination tree. Returns an
32
- * error message from `messages`, or `null` when `rawValue` is a valid,
33
- * non-duplicate folder name.
34
- */
35
- export declare const validateFolderName: (rawValue: string, siblingNames: string[], messages: FolderNameValidationMessages) => string | null;
36
- /**
37
- * Returns `baseName` if no sibling already has that name, otherwise
38
- * `"${baseName} 2"`, `"${baseName} 3"`, etc. — the first suffix that is
39
- * free. Used so the inline create-folder editor starts with a name that does
40
- * not duplicate an existing sibling folder.
41
- */
42
- export declare const getUniqueFolderName: (baseName: string, siblingNames: string[]) => string;
43
- /** Names of the direct children of the folder at `parentPath` (root siblings when empty). */
44
- export declare const getSiblingFolderNames: (items: PublishFolderNode[], parentPath: string[]) => string[];
45
- //# sourceMappingURL=publish-folder-tree.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish-folder-tree.d.ts","sourceRoot":"","sources":["../../src/utils/publish-folder-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAoB,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,iBAAiB,EAAE,EAC1B,OAAO,MAAM,KACZ,iBAAiB,EAoBnB,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,GAAI,OAAO,iBAAiB,EAAE,KAAG,MAAM,EAIjE,CAAC;AAEL,gGAAgG;AAChG,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,KAAG,MAAwB,CAAC;AAE1E,wFAAwF;AACxF,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,MAAM,EACtB,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,iBAAiB,EAAE,KAAG,QAAQ,EAUhE,CAAC;AAKL,uFAAuF;AACvF,MAAM,WAAW,4BAA4B;IAC3C,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,UAAU,MAAM,EAChB,cAAc,MAAM,EAAE,EACtB,UAAU,4BAA4B,KACrC,MAAM,GAAG,IAcX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,EAChB,cAAc,MAAM,EAAE,KACrB,MAYF,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB,GAChC,OAAO,iBAAiB,EAAE,EAC1B,YAAY,MAAM,EAAE,KACnB,MAAM,EAoBR,CAAC"}
@@ -1,9 +0,0 @@
1
- import { PublishDerivationInput, PublishDerivedState } from '../models/publish';
2
- /**
3
- * Derives the publish panel's callout and submit-button state from the
4
- * current destination-folder context. Priority (highest first): a request
5
- * in flight, no folder selected yet, missing write access, a failed submit,
6
- * replacing an existing version, then the default informational callout.
7
- */
8
- export declare const derivePublishState: (input: PublishDerivationInput) => PublishDerivedState;
9
- //# sourceMappingURL=publish-state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish-state.d.ts","sourceRoot":"","sources":["../../src/utils/publish-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,sBAAsB,KAC5B,mBA8CF,CAAC"}
@@ -1,77 +0,0 @@
1
- import { CatalogItem } from '../models/catalog-item';
2
- import { PublishFolderNode, PublishHistoryEntry } from '../models/publish';
3
- /** An item publishable through {@link usePublishFlow} — versioned (`CatalogItem`) or not (e.g. a conversation). */
4
- export interface PublishFlowItem {
5
- /** Version, when the item is versioned. `undefined` for unversioned resources. */
6
- version?: string;
7
- }
8
- /** Options for {@link usePublishFlow}. */
9
- export interface UsePublishFlowOptions<TItem extends PublishFlowItem> {
10
- /** The item being published — a `CatalogItem` (versioned) or an unversioned resource (e.g. a conversation). */
11
- item: TItem;
12
- /** Previously published entries for this item. */
13
- history: PublishHistoryEntry[];
14
- /** Root-level destination folder nodes, as currently known to the host. */
15
- folderItems: PublishFolderNode[];
16
- /**
17
- * Resolves whether the current user can publish to a given folder path.
18
- * Defaults to always allowing (`() => true`) when omitted.
19
- */
20
- hasWriteAccess?: (folderPath: string[]) => boolean;
21
- /**
22
- * Called when the user confirms a new folder name. The host owns
23
- * persisting the folder; the hook also adds it locally so it is
24
- * immediately selectable within this session. If the returned promise
25
- * rejects, the optimistically added folder is rolled back and the submit-
26
- * error callout is surfaced.
27
- */
28
- onCreateFolder?: (parentPath: string[], name: string) => void | Promise<void>;
29
- /** Called with the destination folder path when the user confirms publish/update. */
30
- onPublish: (item: TItem, folderPath: string[]) => Promise<void>;
31
- /** Called after a successful publish; the host surfaces its own success notification. */
32
- onPublishSuccess?: (item: TItem, folderPath: string[]) => void;
33
- }
34
- /** State and handlers returned by {@link usePublishFlow}. */
35
- export interface UsePublishFlowResult {
36
- /** Folder tree, including any folders created (but not yet persisted) during this session. */
37
- folderItems: PublishFolderNode[];
38
- /**
39
- * Currently selected destination folder path. `undefined` means nothing
40
- * is selected; `[]` means the bucket root itself is selected (a distinct,
41
- * valid destination).
42
- */
43
- selectedFolderPath?: string[];
44
- /** Selects a destination folder or the root (`[]`); pass `undefined` to deselect. */
45
- setSelectedFolderPath: (path: string[] | undefined) => void;
46
- /** Confirms a new folder name: adds it locally and reports it to the host, rolling back and surfacing an error if the host rejects. */
47
- handleCreateFolder: (parentPath: string[], name: string) => Promise<void>;
48
- /**
49
- * Whether `selectedFolderPath` already has this publication — this exact
50
- * version, for a versioned item, or any prior entry at all, for an
51
- * unversioned item (whose `version` is `undefined`).
52
- */
53
- hasExistingPublicationInFolder: boolean;
54
- /** Whether the current user can publish to `selectedFolderPath`. */
55
- hasWriteAccess: boolean;
56
- /** Whether a publish request is currently in flight. */
57
- isSubmitting: boolean;
58
- /** Whether the most recent submit attempt failed. */
59
- hasSubmitError: boolean;
60
- /**
61
- * Submits the publish/update request for the selected folder. Resolves to
62
- * `true` on success and `false` if `onPublish` rejected, so the caller can
63
- * decide whether to close the flow.
64
- */
65
- handleSubmit: () => Promise<boolean>;
66
- /** Resets folder selection, any locally-created folders, and the submit error back to their initial state. */
67
- reset: () => void;
68
- }
69
- /**
70
- * Drives the Publish flow's state: destination-folder selection, optimistic
71
- * local folder creation, existing-publication detection, and submit
72
- * handling. Framework for both in-place (DetailsPanel) and popup/standalone
73
- * presentations, and for both versioned (`CatalogItem`) and unversioned
74
- * (e.g. conversation) items.
75
- */
76
- export declare const usePublishFlow: <TItem extends PublishFlowItem = CatalogItem>({ item, history, folderItems: initialFolderItems, hasWriteAccess: resolveWriteAccess, onCreateFolder, onPublish, onPublishSuccess, }: UsePublishFlowOptions<TItem>) => UsePublishFlowResult;
77
- //# sourceMappingURL=use-publish-flow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-publish-flow.d.ts","sourceRoot":"","sources":["../../src/utils/use-publish-flow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,mHAAmH;AACnH,MAAM,WAAW,eAAe;IAC9B,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA2DD,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB,CAAC,KAAK,SAAS,eAAe;IAClE,+GAA+G;IAC/G,IAAI,EAAE,KAAK,CAAC;IACZ,kDAAkD;IAClD,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,2EAA2E;IAC3E,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC;IACnD;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,qFAAqF;IACrF,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAChE;AAED,6DAA6D;AAC7D,MAAM,WAAW,oBAAoB;IACnC,8FAA8F;IAC9F,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,qFAAqF;IACrF,qBAAqB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5D,uIAAuI;IACvI,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E;;;;OAIG;IACH,8BAA8B,EAAE,OAAO,CAAC;IACxC,oEAAoE;IACpE,cAAc,EAAE,OAAO,CAAC;IACxB,wDAAwD;IACxD,YAAY,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,cAAc,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,YAAY,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,8GAA8G;IAC9G,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,SAAS,eAAe,GAAG,WAAW,EAAE,sIAQzE,qBAAqB,CAAC,KAAK,CAAC,KAAG,oBAyEjC,CAAC"}