@orangelogic/orange-dam-content-browser-sdk 2.3.6 → 2.3.7-table-view-beta-2

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 (24) hide show
  1. package/build/GlobalConfigContext.d.ts +3 -0
  2. package/build/OrangeDAMContentBrowserSDK.min.js +782 -326
  3. package/build/api/asset/asset.d.ts +2 -1
  4. package/build/components/content-browser/content-browser.d.ts +37 -2
  5. package/build/components/content-browser-asset-card/content-browser-asset-card.d.ts +17 -1
  6. package/build/components/content-browser-control-bar/content-browser-control-bar.d.ts +1 -0
  7. package/build/components/content-browser-control-view/content-browser-control-view.d.ts +5 -2
  8. package/build/components/content-browser-format-dialog/content-browser-format-dialog.d.ts +27 -1
  9. package/build/components/content-browser-grid/content-browser-grid.d.ts +5 -1
  10. package/build/components/content-browser-grid/scroll-anchor-controller.d.ts +12 -1
  11. package/build/components/content-browser-table/content-browser-table.d.ts +178 -0
  12. package/build/components/content-browser-table/content-browser-table.styles.d.ts +2 -0
  13. package/build/content-browser.mjs +1725 -474
  14. package/build/events/cx-content-browser-control-view-change.d.ts +2 -2
  15. package/build/events/cx-content-browser-request-change.d.ts +2 -2
  16. package/build/events/cx-content-browser-table-column-resize.d.ts +16 -0
  17. package/build/events/index.d.ts +1 -0
  18. package/build/index.d.ts +29 -2
  19. package/build/index.html +4 -0
  20. package/build/index.mjs +1694 -425
  21. package/build/tools/fetch-and-merge-assets.d.ts +10 -1
  22. package/build/types/asset.d.ts +5 -0
  23. package/build/types/content-browser.d.ts +53 -0
  24. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { GridView } from '../types/content-browser';
1
+ import { ContentBrowserView } from '../types/content-browser';
2
2
  export type CxContentBrowserControlViewChangeEvent = CustomEvent<{
3
3
  isSeeThrough: boolean;
4
- view: GridView;
4
+ view: ContentBrowserView;
5
5
  }>;
6
6
  declare global {
7
7
  interface GlobalEventHandlersEventMap {
@@ -1,8 +1,8 @@
1
1
  import { GetAssetsRequest } from '../types/asset';
2
- import { GridView } from '../types/content-browser';
2
+ import { ContentBrowserView } from '../types/content-browser';
3
3
  export type CxContentBrowserRequestChangeEvent = CustomEvent<{
4
4
  request: GetAssetsRequest | null;
5
- view: GridView;
5
+ view: ContentBrowserView;
6
6
  }>;
7
7
  declare global {
8
8
  interface GlobalEventHandlersEventMap {
@@ -0,0 +1,16 @@
1
+ export interface CxContentBrowserTableColumnResizeEvent extends CustomEvent<{
2
+ field: string;
3
+ width: number | undefined;
4
+ }> {
5
+ detail: {
6
+ /** The Cortex field the resized column maps to, as the host configured it. */
7
+ field: string;
8
+ /** Resolved width in pixels, or `undefined` when the column was reset to its configured width. */
9
+ width: number | undefined;
10
+ };
11
+ }
12
+ declare global {
13
+ interface GlobalEventHandlersEventMap {
14
+ 'cx-content-browser-table-column-resize': CxContentBrowserTableColumnResizeEvent;
15
+ }
16
+ }
@@ -16,3 +16,4 @@ export * from './cx-content-browser-pin-asset-change';
16
16
  export * from './cx-content-browser-pin-asset-lookup';
17
17
  export * from './cx-content-browser-request-change';
18
18
  export * from './cx-content-browser-selected-asset';
19
+ export * from './cx-content-browser-table-column-resize';
package/build/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import './styles.css';
2
2
  export { default as CxContentBrowser } from './components/content-browser/content-browser';
3
3
  import { AppContextType } from './AppContext';
4
4
  import { CtaTextTransform, ImageCardDisplayInfo } from './GlobalConfigContext';
5
+ import { type AutoSelectFormat, TableColumn } from './types/content-browser';
5
6
  import { Folder, GetContentRequest, GetContentResponse, GetFoldersRequest } from './types/search';
6
7
  type OrangeDAMContentBrowser = {
7
8
  help: () => void;
@@ -208,10 +209,36 @@ type OrangeDAMContentBrowser = {
208
209
  */
209
210
  loadExternalFonts?: boolean;
210
211
  /**
211
- * The default grid view to be used when showing asset (default Medium)
212
- * Available values: small, medium, large
212
+ * The default view to be used when showing assets (default medium)
213
+ * Available values: small, medium, large, table.
214
+ * `table` only applies when `tableColumns` is also provided.
213
215
  */
214
216
  defaultGridView?: string;
217
+ /**
218
+ * The columns of the table view. Each column carries a `title` (the header text), a `field`
219
+ * (the Cortex field it reads, e.g. "CoreField.Identifier") and optional
220
+ * styling: `width` (a CSS grid track), `align` and `lines`.
221
+ *
222
+ * The table view is offered in the view menu only when this is set, and the fields listed here
223
+ * are requested on every search — so an asset with no thumbnail, such as a text fragment,
224
+ * becomes browsable and selectable by its metadata.
225
+ */
226
+ tableColumns?: TableColumn[];
227
+ /**
228
+ * Import behaviour when picking an asset, for a host that would rather not show the format
229
+ * picker.
230
+ *
231
+ * - `false` (default) - the format dialog opens as usual.
232
+ * - `true` - insert with the first available format, without showing the dialog.
233
+ * - a format name - insert with that format. Matched case-insensitively against a proxy's
234
+ * `proxyName` ("TRX") or the label the picker shows ("Original"). A name that matches no
235
+ * available format opens the dialog as usual, so a stale value degrades rather than breaks.
236
+ *
237
+ * Skipping the dialog also skips everything else it offers for that asset: the preview, the
238
+ * ATS custom format, and the tracking-parameter panel. Assets are inserted with tracking off,
239
+ * which is the dialog's own default.
240
+ */
241
+ autoSelectFormat?: AutoSelectFormat;
215
242
  }) => Promise<void>;
216
243
  close: () => void;
217
244
  fetchAssets: (params: GetContentRequest) => Promise<GetContentResponse | undefined> | undefined;
package/build/index.html CHANGED
@@ -92,6 +92,10 @@
92
92
  // fileSize: false,
93
93
  // tags: false,
94
94
  extraFields: ['coreField.OriginalFileName', 'document.CortexPath', 'ScrubUrl'],
95
+ // tableColumns: [
96
+ // { title: 'Identifier', field: 'CoreField.Identifier', width: '160px' },
97
+ // { title: 'Title', field: 'CoreField.TitleWithFallback', width: 'minmax(0, 2fr)' },
98
+ // ],
95
99
  persistMode: true,
96
100
  // publicApplicationName: "",
97
101
  // pluginName: "OrangeDAM Content Browser",