@orangelogic/orange-dam-content-browser-sdk 2.4.8 → 2.4.9
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/build/GlobalConfigContext.d.ts +4 -0
- package/build/OrangeDAMContentBrowserSDK.min.js +738 -337
- package/build/api/asset/asset.d.ts +2 -1
- package/build/api/asset/asset.types.d.ts +9 -0
- package/build/components/content-browser/content-browser.d.ts +73 -2
- package/build/components/content-browser-asset-card/content-browser-asset-card.d.ts +25 -1
- package/build/components/content-browser-control-bar/content-browser-control-bar.d.ts +1 -0
- package/build/components/content-browser-control-view/content-browser-control-view.d.ts +5 -2
- package/build/components/content-browser-format-dialog/content-browser-format-dialog.d.ts +27 -1
- package/build/components/content-browser-grid/content-browser-grid.d.ts +5 -1
- package/build/components/content-browser-table/column-layout.d.ts +29 -0
- package/build/components/content-browser-table/content-browser-table.d.ts +302 -0
- package/build/components/content-browser-table/content-browser-table.styles.d.ts +2 -0
- package/build/content-browser.mjs +2506 -450
- package/build/events/cx-content-browser-control-view-change.d.ts +2 -2
- package/build/events/cx-content-browser-request-change.d.ts +2 -2
- package/build/events/cx-content-browser-table-column-resize.d.ts +26 -0
- package/build/events/index.d.ts +1 -0
- package/build/index.d.ts +40 -2
- package/build/index.html +4 -0
- package/build/index.mjs +2531 -635
- package/build/tools/fetch-and-merge-assets.d.ts +15 -3
- package/build/types/asset.d.ts +5 -0
- package/build/types/content-browser.d.ts +69 -0
- package/build/utils/table-column-widths.d.ts +5 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ContentBrowserView } from '../types/content-browser';
|
|
2
2
|
export type CxContentBrowserControlViewChangeEvent = CustomEvent<{
|
|
3
3
|
isSeeThrough: boolean;
|
|
4
|
-
view:
|
|
4
|
+
view: ContentBrowserView;
|
|
5
5
|
}>;
|
|
6
6
|
declare global {
|
|
7
7
|
interface GlobalEventHandlersEventMap {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { GetAssetsRequest } from '../types/asset';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentBrowserView } from '../types/content-browser';
|
|
3
3
|
export type CxContentBrowserRequestChangeEvent = CustomEvent<{
|
|
4
4
|
folderTitle: string | undefined;
|
|
5
5
|
request: GetAssetsRequest | null;
|
|
6
|
-
view:
|
|
6
|
+
view: ContentBrowserView;
|
|
7
7
|
}>;
|
|
8
8
|
declare global {
|
|
9
9
|
interface GlobalEventHandlersEventMap {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface CxContentBrowserTableColumnResizeEvent extends CustomEvent<{
|
|
2
|
+
field: string;
|
|
3
|
+
reset: boolean;
|
|
4
|
+
width: number | undefined;
|
|
5
|
+
}> {
|
|
6
|
+
detail: {
|
|
7
|
+
/** The Cortex field the resized column maps to, trimmed of surrounding whitespace (see `TableColumn.field`). */
|
|
8
|
+
field: string;
|
|
9
|
+
/**
|
|
10
|
+
* `false` after a drag of the column divider. `true` after a double click on the divider, which
|
|
11
|
+
* removes the saved width and auto-fits the column again.
|
|
12
|
+
*/
|
|
13
|
+
reset: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The column's width in whole pixels: the dragged width, or the auto-fit width after a reset.
|
|
16
|
+
* The SDK saves a dragged width itself. The value is never `undefined`. The type keeps
|
|
17
|
+
* `undefined` so that existing handlers stay valid.
|
|
18
|
+
*/
|
|
19
|
+
width: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface GlobalEventHandlersEventMap {
|
|
24
|
+
'cx-content-browser-table-column-resize': CxContentBrowserTableColumnResizeEvent;
|
|
25
|
+
}
|
|
26
|
+
}
|
package/build/events/index.d.ts
CHANGED
|
@@ -21,4 +21,5 @@ export * from './cx-content-browser-pin-asset-change';
|
|
|
21
21
|
export * from './cx-content-browser-pin-asset-lookup';
|
|
22
22
|
export * from './cx-content-browser-request-change';
|
|
23
23
|
export * from './cx-content-browser-selected-asset';
|
|
24
|
+
export * from './cx-content-browser-table-column-resize';
|
|
24
25
|
export * from './cx-loaded';
|
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, type TableRowActionPosition } 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,47 @@ type OrangeDAMContentBrowser = {
|
|
|
208
209
|
*/
|
|
209
210
|
loadExternalFonts?: boolean;
|
|
210
211
|
/**
|
|
211
|
-
* The default
|
|
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) and a `field`
|
|
219
|
+
* (the Cortex field it reads, e.g. "CoreField.Identifier"). The table fits each column to its
|
|
220
|
+
* content, and the columns share the spare width so that they fill the table. The user resizes
|
|
221
|
+
* a column, and the table keeps the width of a resized column for each site.
|
|
222
|
+
* When a user drags a column divider, the other columns keep their width until the page reloads,
|
|
223
|
+
* the view changes or the site changes. Thus the table can end before the right edge of the
|
|
224
|
+
* host, or scroll horizontally.
|
|
225
|
+
* `width`, `align` and `lines` are ignored.
|
|
226
|
+
*
|
|
227
|
+
* The table view is offered in the view menu only when this is set, and the fields listed here
|
|
228
|
+
* are requested on every search — so an asset with no thumbnail, such as a text fragment,
|
|
229
|
+
* becomes browsable and selectable by its metadata.
|
|
230
|
+
*/
|
|
231
|
+
tableColumns?: TableColumn[];
|
|
232
|
+
/**
|
|
233
|
+
* Where the row action of the table view shows: at the right edge of the host (`host-edge`), or
|
|
234
|
+
* at the end of the last data column (`row-end`). Any other value gives `host-edge`.
|
|
235
|
+
* Default `host-edge`.
|
|
236
|
+
*/
|
|
237
|
+
tableRowActionPosition?: TableRowActionPosition;
|
|
238
|
+
/**
|
|
239
|
+
* Import behaviour when picking an asset, for a host that would rather not show the format
|
|
240
|
+
* picker.
|
|
241
|
+
*
|
|
242
|
+
* - `false` (default) - the format dialog opens as usual.
|
|
243
|
+
* - `true` - insert with the first available format, without showing the dialog.
|
|
244
|
+
* - a format name - insert with that format. Matched case-insensitively against a proxy's
|
|
245
|
+
* `proxyName` ("TRX") or the label the picker shows ("Original"). A name that matches no
|
|
246
|
+
* available format opens the dialog as usual, so a stale value degrades rather than breaks.
|
|
247
|
+
*
|
|
248
|
+
* Skipping the dialog also skips everything else it offers for that asset: the preview, the
|
|
249
|
+
* ATS custom format, and the tracking-parameter panel. Assets are inserted with tracking off,
|
|
250
|
+
* which is the dialog's own default.
|
|
251
|
+
*/
|
|
252
|
+
autoSelectFormat?: AutoSelectFormat;
|
|
215
253
|
}) => Promise<void>;
|
|
216
254
|
close: () => void;
|
|
217
255
|
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",
|