@orangelogic/orange-dam-content-browser-sdk 2.4.3 → 2.4.4-table-view-beta-3
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 +3 -0
- package/build/OrangeDAMContentBrowserSDK.min.js +629 -331
- 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 +42 -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/content-browser-table.d.ts +268 -0
- package/build/components/content-browser-table/content-browser-table.styles.d.ts +2 -0
- package/build/content-browser.mjs +2054 -517
- 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 +20 -0
- package/build/events/index.d.ts +1 -0
- package/build/index.d.ts +36 -2
- package/build/index.html +4 -0
- package/build/index.mjs +1978 -423
- 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 +74 -0
- package/package.json +1 -1
|
@@ -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,8 +1,8 @@
|
|
|
1
1
|
import { GetAssetsRequest } from '../types/asset';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentBrowserView } from '../types/content-browser';
|
|
3
3
|
export type CxContentBrowserRequestChangeEvent = CustomEvent<{
|
|
4
4
|
request: GetAssetsRequest | null;
|
|
5
|
-
view:
|
|
5
|
+
view: ContentBrowserView;
|
|
6
6
|
}>;
|
|
7
7
|
declare global {
|
|
8
8
|
interface GlobalEventHandlersEventMap {
|
|
@@ -0,0 +1,20 @@
|
|
|
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, trimmed of surrounding whitespace (see `TableColumn.field`). */
|
|
7
|
+
field: string;
|
|
8
|
+
/**
|
|
9
|
+
* The column's width in whole pixels, after a drag or after a double click on its divider fits
|
|
10
|
+
* it to its content. Never `undefined` since the table moved to `cx-table`, which has no reset to
|
|
11
|
+
* the configured width; the type keeps `undefined` so existing handlers stay valid.
|
|
12
|
+
*/
|
|
13
|
+
width: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface GlobalEventHandlersEventMap {
|
|
18
|
+
'cx-content-browser-table-column-resize': CxContentBrowserTableColumnResizeEvent;
|
|
19
|
+
}
|
|
20
|
+
}
|
package/build/events/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export * from './cx-content-browser-pin-asset-change';
|
|
|
20
20
|
export * from './cx-content-browser-pin-asset-lookup';
|
|
21
21
|
export * from './cx-content-browser-request-change';
|
|
22
22
|
export * from './cx-content-browser-selected-asset';
|
|
23
|
+
export * from './cx-content-browser-table-column-resize';
|
|
23
24
|
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 } 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,43 @@ 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), a `field`
|
|
219
|
+
* (the Cortex field it reads, e.g. "CoreField.Identifier") and optional
|
|
220
|
+
* styling: `width`, `align` and `lines`. `width` is a CSS grid track: pixels (`"160px"`) are a
|
|
221
|
+
* fixed width, a percentage (`"20%"`) is a fixed share of the table width in whole percents
|
|
222
|
+
* (`"12.5%"` is 12%), `"2fr"` is a share of the width left over, and a `minmax()` keeps a pixel
|
|
223
|
+
* minimum above 48px (`"minmax(120px, 1fr)"`). Any other form takes an equal flexible share. No
|
|
224
|
+
* column narrows below 48px, in the layout or in a drag, so a percentage share narrower than
|
|
225
|
+
* 48px renders at 48px. The one exception is a pixel width above 0 and below 48px, which renders
|
|
226
|
+
* as set. A width of 0 (`"0px"`, or a `"0fr"` share) renders at 48px. A column has no maximum
|
|
227
|
+
* width.
|
|
228
|
+
*
|
|
229
|
+
* The table view is offered in the view menu only when this is set, and the fields listed here
|
|
230
|
+
* are requested on every search — so an asset with no thumbnail, such as a text fragment,
|
|
231
|
+
* becomes browsable and selectable by its metadata.
|
|
232
|
+
*/
|
|
233
|
+
tableColumns?: TableColumn[];
|
|
234
|
+
/**
|
|
235
|
+
* Import behaviour when picking an asset, for a host that would rather not show the format
|
|
236
|
+
* picker.
|
|
237
|
+
*
|
|
238
|
+
* - `false` (default) - the format dialog opens as usual.
|
|
239
|
+
* - `true` - insert with the first available format, without showing the dialog.
|
|
240
|
+
* - a format name - insert with that format. Matched case-insensitively against a proxy's
|
|
241
|
+
* `proxyName` ("TRX") or the label the picker shows ("Original"). A name that matches no
|
|
242
|
+
* available format opens the dialog as usual, so a stale value degrades rather than breaks.
|
|
243
|
+
*
|
|
244
|
+
* Skipping the dialog also skips everything else it offers for that asset: the preview, the
|
|
245
|
+
* ATS custom format, and the tracking-parameter panel. Assets are inserted with tracking off,
|
|
246
|
+
* which is the dialog's own default.
|
|
247
|
+
*/
|
|
248
|
+
autoSelectFormat?: AutoSelectFormat;
|
|
215
249
|
}) => Promise<void>;
|
|
216
250
|
close: () => void;
|
|
217
251
|
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",
|