@orangelogic/orange-dam-content-browser-sdk 2.3.7-table-view-beta-2 → 2.3.7
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 +0 -3
- package/build/OrangeDAMContentBrowserSDK.min.js +326 -782
- package/build/api/asset/asset.d.ts +7 -2
- package/build/components/content-browser/content-browser.d.ts +2 -37
- package/build/components/content-browser-asset-card/content-browser-asset-card.d.ts +1 -17
- package/build/components/content-browser-control-bar/content-browser-control-bar.d.ts +0 -1
- package/build/components/content-browser-control-view/content-browser-control-view.d.ts +2 -5
- package/build/components/content-browser-format-dialog/content-browser-format-dialog.d.ts +1 -27
- package/build/components/content-browser-grid/content-browser-grid.d.ts +1 -5
- package/build/components/content-browser-grid/scroll-anchor-controller.d.ts +1 -12
- package/build/content-browser.mjs +506 -1754
- 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/index.d.ts +0 -1
- package/build/index.d.ts +2 -29
- package/build/index.html +0 -4
- package/build/index.mjs +440 -1706
- package/build/tools/fetch-and-merge-assets.d.ts +1 -10
- package/build/types/asset.d.ts +0 -5
- package/build/types/content-browser.d.ts +0 -53
- package/package.json +1 -1
- package/build/components/content-browser-table/content-browser-table.d.ts +0 -178
- package/build/components/content-browser-table/content-browser-table.styles.d.ts +0 -2
- package/build/events/cx-content-browser-table-column-resize.d.ts +0 -16
|
@@ -24,14 +24,19 @@ export declare const FIELD_UPDATED_FILE_NAME = "CoreField.UpdatedFileName";
|
|
|
24
24
|
export declare const LIBRARY_NAME = "Library";
|
|
25
25
|
export declare const MESSAGE_NEW_LINE = "\n";
|
|
26
26
|
export declare const ORIGINAL_VIEW_SIZE = "CoreField.OriginalPreview";
|
|
27
|
+
/**
|
|
28
|
+
* The caption shown under an asset. Falls back to the identifier rather than the original file name:
|
|
29
|
+
* file names can carry private information (model names, shoot details) that must never reach a host
|
|
30
|
+
* application, and there is no way for a customer to turn the caption off. See L-42B0OO.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveAssetCaption(fields: Record<string, string>): string;
|
|
27
33
|
export declare function resolveAssetExtraFilters(selectedFacets?: Record<string, string[]>): {
|
|
28
34
|
SubtypeCriteria?: string[];
|
|
29
35
|
FacetFilters?: Record<string, string[]>;
|
|
30
36
|
};
|
|
31
37
|
export declare function apiGetAssetLinks({ assets, extension, extraFields, parameters, permanentLink, proxyPreference, transformations, useSession, }: GetAssetLinksRequest): Promise<GetAssetLinksResponse>;
|
|
32
38
|
export declare function apiGetAssetsByIDs({ extraFields, recordIds, }: GetAssetsByIDsRequest): Promise<GetAssetsByIDsResponse>;
|
|
33
|
-
export declare
|
|
34
|
-
export declare function apiGetAssets({ fields, folderId, isSeeThrough, limitedToDocTypes, pageSize, searchText, selectedFacets, sortOrder, start, useSession, }: GetAssetsRequest): Promise<GetAssetsResponse>;
|
|
39
|
+
export declare function apiGetAssets({ folderId, isSeeThrough, limitedToDocTypes, pageSize, searchText, selectedFacets, sortOrder, start, useSession, }: GetAssetsRequest): Promise<GetAssetsResponse>;
|
|
35
40
|
export declare function apiGetAvailableProxies({ assetRecordId, siteUrl, }: {
|
|
36
41
|
assetRecordId: string;
|
|
37
42
|
siteUrl?: string;
|
|
@@ -6,8 +6,7 @@ import CxContentBrowserFormatDialog from '../../components/content-browser-forma
|
|
|
6
6
|
import CxContentBrowserGrid from '../../components/content-browser-grid/content-browser-grid';
|
|
7
7
|
import CxContentBrowserHeader from '../../components/content-browser-header/content-browser-header';
|
|
8
8
|
import CxContentBrowserNoResult from '../../components/content-browser-no-result/content-browser-no-result';
|
|
9
|
-
import
|
|
10
|
-
import { type AutoSelectFormat, type ContentBrowserView, type CtaTextTransform, type TableColumn } from '../../types/content-browser';
|
|
9
|
+
import { type CtaTextTransform, GridView } from '../../types/content-browser';
|
|
11
10
|
import { GetFolderRequest } from '../../types/folder';
|
|
12
11
|
import CxIcon from '@orangelogic/design-system/components/icon';
|
|
13
12
|
import CxIconButton from '@orangelogic/design-system/components/icon-button';
|
|
@@ -19,7 +18,6 @@ export declare const COMPUTED_FIELDS: string[];
|
|
|
19
18
|
* @summary CxContentBrowser
|
|
20
19
|
*/
|
|
21
20
|
export default class CxContentBrowser extends CortexElement {
|
|
22
|
-
#private;
|
|
23
21
|
static readonly styles: CSSResultGroup;
|
|
24
22
|
static readonly dependencies: {
|
|
25
23
|
'cx-content-browser-browser': typeof CxContentBrowserBrowser;
|
|
@@ -28,7 +26,6 @@ export default class CxContentBrowser extends CortexElement {
|
|
|
28
26
|
'cx-content-browser-grid': typeof CxContentBrowserGrid;
|
|
29
27
|
'cx-content-browser-header': typeof CxContentBrowserHeader;
|
|
30
28
|
'cx-content-browser-no-result': typeof CxContentBrowserNoResult;
|
|
31
|
-
'cx-content-browser-table': typeof CxContentBrowserTable;
|
|
32
29
|
'cx-icon': typeof CxIcon;
|
|
33
30
|
'cx-icon-button': typeof CxIconButton;
|
|
34
31
|
'cx-resize-observer': typeof CxResizeObserver;
|
|
@@ -65,10 +62,6 @@ export default class CxContentBrowser extends CortexElement {
|
|
|
65
62
|
* shows the asset's LargeSizePreview and confirming emits the asset straight to the host.
|
|
66
63
|
* Implies `can-use-proxies=false`.
|
|
67
64
|
*/
|
|
68
|
-
/**
|
|
69
|
-
* Host-level import behaviour; forwarded to the format dialog. See `AutoSelectFormat`.
|
|
70
|
-
*/
|
|
71
|
-
autoSelectFormat: AutoSelectFormat;
|
|
72
65
|
simplePick: boolean;
|
|
73
66
|
canViewVersions: boolean;
|
|
74
67
|
canTrack: boolean;
|
|
@@ -76,13 +69,7 @@ export default class CxContentBrowser extends CortexElement {
|
|
|
76
69
|
ctaText: string;
|
|
77
70
|
ctaTextTransform: CtaTextTransform;
|
|
78
71
|
extraFields: string[];
|
|
79
|
-
defaultGridView:
|
|
80
|
-
/**
|
|
81
|
-
* Columns of the table view, defined by the host: a title, the Cortex field the column reads, and
|
|
82
|
-
* its styling. The table view is offered only while this is non-empty — an empty table is not a
|
|
83
|
-
* view mode — and the fields are read once, when the fetch controller is created.
|
|
84
|
-
*/
|
|
85
|
-
tableColumns: TableColumn[];
|
|
72
|
+
defaultGridView: GridView;
|
|
86
73
|
defaultSortOrderName: string;
|
|
87
74
|
defaultSortDirection: 'ascending' | 'descending';
|
|
88
75
|
defaultSelectedFacets: Record<string, string[]>;
|
|
@@ -110,15 +97,6 @@ export default class CxContentBrowser extends CortexElement {
|
|
|
110
97
|
private defaultPageSize;
|
|
111
98
|
private fetchAndMergeAssetsController;
|
|
112
99
|
willUpdate(changedProperties: PropertyValues): void;
|
|
113
|
-
/**
|
|
114
|
-
* Never trust the host's value: it also arrives by direct property assignment, past the converter.
|
|
115
|
-
* Entries are checked one by one, not just the outer array — `field` is dereferenced while the
|
|
116
|
-
* fetch controller is being built, where a throw leaves the controller unassigned and the picker
|
|
117
|
-
* blank. `title` is only rendered, and Lit renders a nullish one as nothing, so a column is not
|
|
118
|
-
* worth dropping over it.
|
|
119
|
-
*/
|
|
120
|
-
private get tableColumnList();
|
|
121
|
-
private get canUseTable();
|
|
122
100
|
runFirstUpdated(): void;
|
|
123
101
|
fetchAssets(request: GetAssetsRequest): Promise<import("../../api/asset/asset.types").GetAssetsResponse>;
|
|
124
102
|
fetchFolders(request: GetFolderRequest): Promise<import("../../types/folder").GetFolderResponse>;
|
|
@@ -128,20 +106,8 @@ export default class CxContentBrowser extends CortexElement {
|
|
|
128
106
|
* pin/unpin request (see `cx-content-browser-pin-asset-change`) to reflect the result.
|
|
129
107
|
*/
|
|
130
108
|
setIsAssetPinned(isAssetPinned: boolean): void;
|
|
131
|
-
/**
|
|
132
|
-
* The asset a click is still working on, or undefined. The two private flags below drive the
|
|
133
|
-
* guards; this drives the UI, and is a separate field because they are plain fields rather than
|
|
134
|
-
* reactive state.
|
|
135
|
-
*
|
|
136
|
-
* Cleared the moment the format dialog actually opens: from there the dialog's own confirm button
|
|
137
|
-
* carries the pending state, and two spinners for one operation reads as two operations. It
|
|
138
|
-
* survives when no dialog opens, which is the auto-confirm path, where the CTA is the only thing
|
|
139
|
-
* the user can be told anything by.
|
|
140
|
-
*/
|
|
141
|
-
private busyAssetId;
|
|
142
109
|
private openFormatDialog;
|
|
143
110
|
handleLastRequestChange(): Promise<void>;
|
|
144
|
-
handleTableColumnsChange(): void;
|
|
145
111
|
handleAuthChange(): void;
|
|
146
112
|
handleSiteSessionChange(): void;
|
|
147
113
|
private handleSortOrderChange;
|
|
@@ -161,7 +127,6 @@ export default class CxContentBrowser extends CortexElement {
|
|
|
161
127
|
*/
|
|
162
128
|
private handlePinAssetChange;
|
|
163
129
|
private handleProxyConfirm;
|
|
164
|
-
private reportProxyConfirmFailure;
|
|
165
130
|
private handleFormatConfirm;
|
|
166
131
|
private handleFormatDialogClose;
|
|
167
132
|
private handleSelectedAsset;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CSSResultGroup } from 'lit';
|
|
2
2
|
import CortexElement from '../../base/element';
|
|
3
3
|
import { MediaType } from '../../types/asset';
|
|
4
|
-
import {
|
|
4
|
+
import { GridView } from '../../types/content-browser';
|
|
5
5
|
import CxArrayLineClamp from '@orangelogic/design-system/components/array-line-clamp';
|
|
6
|
-
import CxButton from '@orangelogic/design-system/components/button';
|
|
7
6
|
import CxCard from '@orangelogic/design-system/components/card';
|
|
8
7
|
import CxCheckbox from '@orangelogic/design-system/components/checkbox';
|
|
9
8
|
import CxLineClamp from '@orangelogic/design-system/components/line-clamp';
|
|
@@ -15,7 +14,6 @@ export default class CxContentBrowserAssetCard extends CortexElement {
|
|
|
15
14
|
static readonly styles: CSSResultGroup;
|
|
16
15
|
static readonly dependencies: {
|
|
17
16
|
'cx-array-line-clamp': typeof CxArrayLineClamp;
|
|
18
|
-
'cx-button': typeof CxButton;
|
|
19
17
|
'cx-card': typeof CxCard;
|
|
20
18
|
'cx-checkbox': typeof CxCheckbox;
|
|
21
19
|
'cx-content-browser-asset-preview': typeof CxContentBrowserAssetPreview;
|
|
@@ -24,20 +22,6 @@ export default class CxContentBrowserAssetCard extends CortexElement {
|
|
|
24
22
|
'cx-tag': typeof CxTag;
|
|
25
23
|
'cx-typography': typeof CxTypography;
|
|
26
24
|
};
|
|
27
|
-
private readonly localize;
|
|
28
|
-
/**
|
|
29
|
-
* Show the hover overlay that says clicking this card inserts. Set when the host has asked to
|
|
30
|
-
* skip the format picker: without the dialog a click hands the asset over immediately, and the
|
|
31
|
-
* card would otherwise carry no sign of that.
|
|
32
|
-
*/
|
|
33
|
-
showCta: boolean;
|
|
34
|
-
ctaText: string;
|
|
35
|
-
ctaTextTransform: CtaTextTransform;
|
|
36
|
-
/**
|
|
37
|
-
* This card's insert is still running: hold the overlay open and spin its CTA, so the feedback
|
|
38
|
-
* does not vanish the moment the pointer leaves.
|
|
39
|
-
*/
|
|
40
|
-
busy: boolean;
|
|
41
25
|
imageUrl: string;
|
|
42
26
|
originalUrl: string;
|
|
43
27
|
scrubUrl: string;
|
|
@@ -10,7 +10,7 @@ import CxSpace from '@orangelogic/design-system/components/space';
|
|
|
10
10
|
import CxSwitch from '@orangelogic/design-system/components/switch';
|
|
11
11
|
import CxTooltip from '@orangelogic/design-system/components/tooltip';
|
|
12
12
|
import CortexElement from '../../base/element';
|
|
13
|
-
import {
|
|
13
|
+
import { ControlOption, GridView } from '../../types/content-browser';
|
|
14
14
|
import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
15
15
|
/**
|
|
16
16
|
* @summary DAM view control toolbar for selecting asset view modes and toggling options.
|
|
@@ -41,17 +41,14 @@ export default class CxContentBrowserControlView extends CortexElement {
|
|
|
41
41
|
'cx-tooltip': typeof CxTooltip;
|
|
42
42
|
};
|
|
43
43
|
private readonly localize;
|
|
44
|
-
view:
|
|
44
|
+
view: GridView;
|
|
45
45
|
views: ControlOption[];
|
|
46
46
|
isSeeThrough: boolean;
|
|
47
47
|
isMobile: boolean;
|
|
48
|
-
canUseTable: boolean;
|
|
49
48
|
private selectedView;
|
|
50
|
-
private get isTable();
|
|
51
49
|
runConnectedCallback(): void;
|
|
52
50
|
private handleSeeThroughClick;
|
|
53
51
|
private handleViewSelect;
|
|
54
|
-
private renderTableOption;
|
|
55
52
|
handleViewChange(): void;
|
|
56
53
|
render(): TemplateResult;
|
|
57
54
|
}
|
|
@@ -15,7 +15,7 @@ import CxTypography from '@orangelogic/design-system/components/typography';
|
|
|
15
15
|
import CxContentBrowserAssetPreview from '../content-browser-asset-preview/content-browser-asset-preview';
|
|
16
16
|
import CxContentBrowserAssetProxySelector from '../content-browser-asset-proxy-selector/content-browser-asset-proxy-selector';
|
|
17
17
|
import CxContentBrowserAssetVersionHistory from '../content-browser-asset-version-history/content-browser-asset-version-history';
|
|
18
|
-
import { type Parameter, type Transformation, type CtaTextTransform,
|
|
18
|
+
import { type Parameter, type Transformation, type CtaTextTransform, ContentBrowserFormatDialogVariant } from '../../types/content-browser';
|
|
19
19
|
export default class CxContentBrowserFormatDialog extends CortexElement {
|
|
20
20
|
static readonly styles: CSSResultGroup;
|
|
21
21
|
static readonly dependencies: {
|
|
@@ -47,12 +47,6 @@ export default class CxContentBrowserFormatDialog extends CortexElement {
|
|
|
47
47
|
canPinAsset: boolean;
|
|
48
48
|
canTrack: boolean;
|
|
49
49
|
canUseProxies: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Skip the format picker and insert directly — see `resolveAutoSelection` for what each value
|
|
52
|
-
* does. Off by default: this changes what a click does, so a host opts in rather than
|
|
53
|
-
* inheriting it.
|
|
54
|
-
*/
|
|
55
|
-
autoSelectFormat: AutoSelectFormat;
|
|
56
50
|
/**
|
|
57
51
|
* Pick-only mode. Suppresses the custom-format editor entirely: cx-asset-link-format issues its
|
|
58
52
|
* own transformasset request as soon as it is in the DOM, so hiding it with CSS is not enough.
|
|
@@ -98,19 +92,7 @@ export default class CxContentBrowserFormatDialog extends CortexElement {
|
|
|
98
92
|
trackingParameters: Parameter[];
|
|
99
93
|
private get shouldAppendAutoExtension();
|
|
100
94
|
private get canUseATS();
|
|
101
|
-
private filterProxies;
|
|
102
95
|
handleSupportedExtensionsChange(): void;
|
|
103
|
-
/**
|
|
104
|
-
* What `autoSelectFormat` resolves to for this asset: the proxy to insert with, or `undefined`
|
|
105
|
-
* when the dialog should open as usual.
|
|
106
|
-
*
|
|
107
|
-
* `{ proxy: undefined }` is deliberate rather than a miss — with the picker switched off there is
|
|
108
|
-
* no format to name and the original file is the only outcome, which is `handleProxyConfirm`'s
|
|
109
|
-
* no-proxy branch. With the picker on a proxy must actually resolve: confirming none emits
|
|
110
|
-
* nothing and would turn the click into a silent no-op, so both an empty proxy list and a format
|
|
111
|
-
* name that matches nothing fall back to the dialog.
|
|
112
|
-
*/
|
|
113
|
-
private resolveAutoSelection;
|
|
114
96
|
open({ asset, isFavorite, isAssetPinned, proxies, }: {
|
|
115
97
|
asset: Asset & {
|
|
116
98
|
previewUrl: string;
|
|
@@ -120,14 +102,6 @@ export default class CxContentBrowserFormatDialog extends CortexElement {
|
|
|
120
102
|
proxies: AvailableProxy[];
|
|
121
103
|
}): void;
|
|
122
104
|
hide(): void;
|
|
123
|
-
/**
|
|
124
|
-
* Show a dialog that `open()` skipped through the auto-confirm shortcut. The asset, proxies and
|
|
125
|
-
* resolved selection are still in place, so this lands the user on exactly the dialog the
|
|
126
|
-
* shortcut spared them, with its confirm button live again to retry.
|
|
127
|
-
*/
|
|
128
|
-
revealAfterAutoConfirm(): void;
|
|
129
|
-
/** Whether the dialog is actually on screen — false when `open()` took the auto-confirm path. */
|
|
130
|
-
get isDialogOpen(): boolean;
|
|
131
105
|
setVersionHistory(versions: AssetVersion[]): void;
|
|
132
106
|
setIsFavorite(isFavorite: boolean): void;
|
|
133
107
|
setIsAssetPinned(isAssetPinned: boolean): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@lit-labs/virtualizer';
|
|
2
2
|
import CortexElement from '../../base/element';
|
|
3
3
|
import { Asset } from '../../types/asset';
|
|
4
|
-
import { GridView
|
|
4
|
+
import { GridView } from '../../types/content-browser';
|
|
5
5
|
import CxProgressBar from '@orangelogic/design-system/components/progress-bar';
|
|
6
6
|
import CxResizeObserver from '@orangelogic/design-system/components/resize-observer';
|
|
7
7
|
import CxContentBrowserAssetCard from '../content-browser-asset-card/content-browser-asset-card';
|
|
@@ -28,10 +28,6 @@ export default class CxContentBrowserGrid extends CortexElement {
|
|
|
28
28
|
showSize: boolean;
|
|
29
29
|
showDimensions: boolean;
|
|
30
30
|
showTags: boolean;
|
|
31
|
-
showCta: boolean;
|
|
32
|
-
ctaText: string;
|
|
33
|
-
ctaTextTransform: CtaTextTransform;
|
|
34
|
-
busyAssetId: string | undefined;
|
|
35
31
|
selectedAssetId: string | undefined;
|
|
36
32
|
assetMap: Map<string, Asset>;
|
|
37
33
|
columnWidth: number;
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
-
type
|
|
2
|
+
type ScrollAnchorContainer = HTMLElement & {
|
|
3
3
|
layoutComplete?: Promise<unknown>;
|
|
4
4
|
};
|
|
5
|
-
type ScrollAnchorContainer = HTMLElement & ScrollAnchorLayoutSource;
|
|
6
5
|
type ScrollAnchorControllerOptions = {
|
|
7
6
|
getContainer: () => ScrollAnchorContainer | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* Distance from the scroller's content origin down to the top of row 0 -- the height of whatever
|
|
10
|
-
* leads the content, such as a sticky header. Defaults to 0: the rows start at the origin.
|
|
11
|
-
*/
|
|
12
|
-
getContentOffset?: () => number;
|
|
13
7
|
getItemIndexById: (id: string) => number;
|
|
14
|
-
/**
|
|
15
|
-
* The object whose `layoutComplete` a restore waits on. Defaults to the container, which carries
|
|
16
|
-
* it when the virtualizer is itself the scroller.
|
|
17
|
-
*/
|
|
18
|
-
getLayoutSource?: () => ScrollAnchorLayoutSource | undefined;
|
|
19
8
|
itemSelector: string;
|
|
20
9
|
};
|
|
21
10
|
export default class ScrollAnchorController implements ReactiveController {
|