@orangelogic/orange-dam-content-browser-sdk 2.2.8 → 2.3.0
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/App.d.ts +34 -0
- package/build/OrangeDAMContentBrowserSDK.min.css +1 -2
- package/build/OrangeDAMContentBrowserSDK.min.js +2121 -11471
- package/build/api/api.d.ts +2 -0
- package/build/api/asset/asset.d.ts +53 -0
- package/build/api/asset/asset.types.d.ts +116 -0
- package/build/api/asset/asset.utils.d.ts +5 -0
- package/build/api/asset/index.d.ts +1 -0
- package/build/api/auth/auth.d.ts +2 -0
- package/build/api/auth/index.d.ts +1 -0
- package/build/api/endpoints.d.ts +21 -0
- package/build/api/folder/folder.d.ts +22 -0
- package/build/api/folder/folder.types.d.ts +17 -0
- package/build/api/folder/index.d.ts +1 -0
- package/build/api/metadata/index.d.ts +1 -0
- package/build/api/metadata/metadata.d.ts +4 -0
- package/build/api/metadata/metadata.types.d.ts +20 -0
- package/build/base/element.d.ts +39 -0
- package/build/components/content-browser/content-browser.d.ts +132 -0
- package/build/components/content-browser/content-browser.styles.d.ts +2 -0
- package/build/components/content-browser-asset-card/content-browser-asset-card.d.ts +53 -0
- package/build/components/content-browser-asset-card/content-browser-asset-card.styles.d.ts +2 -0
- package/build/components/content-browser-asset-preview/content-browser-asset-preview-video/content-browser-asset-preview-video.d.ts +37 -0
- package/build/components/content-browser-asset-preview/content-browser-asset-preview.d.ts +43 -0
- package/build/components/content-browser-asset-preview/content-browser-asset-preview.styles.d.ts +2 -0
- package/build/components/content-browser-asset-proxy-selector/content-browser-asset-proxy-selector.d.ts +54 -0
- package/build/components/content-browser-asset-proxy-selector/content-browser-asset-proxy-selector.styles.d.ts +2 -0
- package/build/components/content-browser-asset-tracking-parameters/content-browser-asset-tracking-parameters.d.ts +39 -0
- package/build/components/content-browser-asset-tracking-parameters/content-browser-asset-tracking-parameters.styles.d.ts +2 -0
- package/build/components/content-browser-asset-version-history/content-browser-asset-version-history.d.ts +35 -0
- package/build/components/content-browser-asset-version-history/content-browser-asset-version-history.styles.d.ts +2 -0
- package/build/components/content-browser-browser/content-browser-browser.d.ts +72 -0
- package/build/components/content-browser-browser/content-browser-browser.styles.d.ts +2 -0
- package/build/components/content-browser-control-bar/content-browser-control-bar.d.ts +71 -0
- package/build/components/content-browser-control-bar/content-browser-control-bar.styles.d.ts +2 -0
- package/build/components/content-browser-control-filter/content-browser-control-filter.d.ts +81 -0
- package/build/components/content-browser-control-filter/content-browser-control-filter.styles.d.ts +2 -0
- package/build/components/content-browser-control-filter-facet/content-browser-control-filter-facet.d.ts +45 -0
- package/build/components/content-browser-control-sort/content-browser-control-sort.d.ts +64 -0
- package/build/components/content-browser-control-sort/content-browser-control-sort.styles.d.ts +2 -0
- package/build/components/content-browser-control-view/content-browser-control-view.d.ts +59 -0
- package/build/components/content-browser-control-view/content-browser-control-view.styles.d.ts +2 -0
- package/build/components/content-browser-format-dialog/content-browser-format-dialog.d.ts +166 -0
- package/build/components/content-browser-format-dialog/content-browser-format-dialog.styles.d.ts +2 -0
- package/build/components/content-browser-grid/content-browser-grid.d.ts +53 -0
- package/build/components/content-browser-grid/content-browser-grid.styles.d.ts +2 -0
- package/build/components/content-browser-grid/scroll-anchor-controller.d.ts +27 -0
- package/build/components/content-browser-header/content-browser-header.d.ts +65 -0
- package/build/components/content-browser-header/content-browser-header.styles.d.ts +2 -0
- package/build/components/content-browser-loader/content-browser-loader.d.ts +25 -0
- package/build/components/content-browser-loader/content-browser-loader.styles.d.ts +2 -0
- package/build/components/content-browser-loader/index.d.ts +1 -0
- package/build/components/content-browser-no-result/content-browser-no-result.d.ts +18 -0
- package/build/components/content-browser-no-result/content-browser-no-result.styles.d.ts +2 -0
- package/build/components/content-browser-no-result/index.d.ts +1 -0
- package/build/content-browser.d.ts +7 -0
- package/build/content-browser.mjs +15323 -0
- package/build/events/cx-content-browser-asset-card-click.d.ts +8 -0
- package/build/events/cx-content-browser-asset-tracking-parameters-change.d.ts +9 -0
- package/build/events/cx-content-browser-control-bar-search-change.d.ts +8 -0
- package/build/events/cx-content-browser-control-filter-change.d.ts +8 -0
- package/build/events/cx-content-browser-control-sort-order-change.d.ts +9 -0
- package/build/events/cx-content-browser-control-view-change.d.ts +10 -0
- package/build/events/cx-content-browser-favorite-change.d.ts +13 -0
- package/build/events/cx-content-browser-format-dialog-favorite-change.d.ts +9 -0
- package/build/events/cx-content-browser-format-dialog-format-confirm.d.ts +16 -0
- package/build/events/cx-content-browser-format-dialog-pin-asset-change.d.ts +9 -0
- package/build/events/cx-content-browser-format-dialog-proxy-confirm.d.ts +7 -0
- package/build/events/cx-content-browser-format-dialog-version-history-open.d.ts +8 -0
- package/build/events/cx-content-browser-grid-click.d.ts +12 -0
- package/build/events/cx-content-browser-grid-resize.d.ts +9 -0
- package/build/events/cx-content-browser-pin-asset-change.d.ts +9 -0
- package/build/events/cx-content-browser-pin-asset-lookup.d.ts +14 -0
- package/build/events/cx-content-browser-request-change.d.ts +11 -0
- package/build/events/cx-content-browser-selected-asset.d.ts +6 -0
- package/build/events/index.d.ts +18 -0
- package/build/index-umd.d.ts +6 -0
- package/build/index.css +1 -0
- package/build/{src/index.d.ts → index.d.ts} +6 -9
- package/build/index.html +135 -1
- package/build/index.mjs +33396 -0
- package/build/{src/store → store}/auth/auth.service.d.ts +1 -1
- package/build/store/auth/auth.slice.d.ts +148 -0
- package/build/store/index.d.ts +14 -0
- package/build/styles/component.styles.d.ts +2 -0
- package/build/tools/fetch-and-merge-assets.d.ts +122 -0
- package/build/types/asset.d.ts +94 -0
- package/build/{src/types → types}/auth.d.ts +7 -12
- package/build/types/base.d.ts +4 -0
- package/build/types/content-browser.d.ts +120 -0
- package/build/types/folder.d.ts +35 -0
- package/build/{src/types → types}/search.d.ts +1 -38
- package/build/{src/utils → utils}/api.d.ts +5 -6
- package/build/{src/utils → utils}/constants.d.ts +0 -9
- package/build/utils/number.d.ts +1 -0
- package/build/{src/utils → utils}/storage.d.ts +1 -1
- package/build/utils/string.d.ts +7 -0
- package/build/utils/watch.d.ts +27 -0
- package/build/view/AssetsPicker.d.ts +22 -0
- package/package.json +50 -127
- package/build/OrangeDAMContentBrowserSDK.min.css.map +0 -1
- package/build/OrangeDAMContentBrowserSDK.min.js.map +0 -1
- package/build/asset-manifest.json +0 -13
- package/build/cypress/support/commands.d.ts +0 -0
- package/build/cypress/support/component.d.ts +0 -12
- package/build/cypress/support/e2e.d.ts +0 -2
- package/build/src/ApiService.d.ts +0 -15
- package/build/src/App.d.ts +0 -67
- package/build/src/components/ArrayClamp/ArrayClamp.cy.d.ts +0 -1
- package/build/src/components/ArrayClamp/ArrayClamp.d.ts +0 -10
- package/build/src/components/ArrayClamp/ArrayClamp.styled.d.ts +0 -1
- package/build/src/components/ArrayClamp/index.d.ts +0 -1
- package/build/src/components/Browser/Browser.constants.d.ts +0 -3
- package/build/src/components/Browser/Browser.cy.d.ts +0 -1
- package/build/src/components/Browser/Browser.d.ts +0 -23
- package/build/src/components/Browser/Browser.styled.d.ts +0 -2
- package/build/src/components/Browser/BrowserItem.d.ts +0 -14
- package/build/src/components/Browser/LoadMoreButton.d.ts +0 -9
- package/build/src/components/Browser/index.d.ts +0 -1
- package/build/src/components/ControlBar/ControlBar.constants.d.ts +0 -10
- package/build/src/components/ControlBar/ControlBar.cy.d.ts +0 -1
- package/build/src/components/ControlBar/ControlBar.d.ts +0 -23
- package/build/src/components/ControlBar/ControlBar.styled.d.ts +0 -1
- package/build/src/components/ControlBar/Facet/Facet.cy.d.ts +0 -1
- package/build/src/components/ControlBar/Facet/Facet.d.ts +0 -14
- package/build/src/components/ControlBar/Facet/index.d.ts +0 -1
- package/build/src/components/ControlBar/index.d.ts +0 -1
- package/build/src/components/FormatDialog/CropPreviewer/CropPreviewer.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/CropPreviewer/CropPreviewer.d.ts +0 -44
- package/build/src/components/FormatDialog/CropPreviewer/index.d.ts +0 -3
- package/build/src/components/FormatDialog/CustomRendition/CustomRendition.constants.d.ts +0 -5
- package/build/src/components/FormatDialog/CustomRendition/CustomRendition.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/CustomRendition.d.ts +0 -56
- package/build/src/components/FormatDialog/CustomRendition/CustomRendition.styled.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/index.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/transformations/Crop.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/transformations/Crop.d.ts +0 -26
- package/build/src/components/FormatDialog/CustomRendition/transformations/Extension.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/transformations/Extension.d.ts +0 -11
- package/build/src/components/FormatDialog/CustomRendition/transformations/Format.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/transformations/Format.d.ts +0 -10
- package/build/src/components/FormatDialog/CustomRendition/transformations/Metadata.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/transformations/Metadata.d.ts +0 -7
- package/build/src/components/FormatDialog/CustomRendition/transformations/Quality.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/transformations/Quality.d.ts +0 -7
- package/build/src/components/FormatDialog/CustomRendition/transformations/Resize.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/transformations/Resize.d.ts +0 -18
- package/build/src/components/FormatDialog/CustomRendition/transformations/Rotate.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/CustomRendition/transformations/Rotate.d.ts +0 -8
- package/build/src/components/FormatDialog/CustomRendition/transformations/index.d.ts +0 -7
- package/build/src/components/FormatDialog/FormatDialog.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/FormatDialog.d.ts +0 -55
- package/build/src/components/FormatDialog/FormatDialog.styled.d.ts +0 -3
- package/build/src/components/FormatDialog/PinButton/PinButton.d.ts +0 -9
- package/build/src/components/FormatDialog/PinButton/index.d.ts +0 -1
- package/build/src/components/FormatDialog/Previewer/Previewer.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/Previewer/Previewer.d.ts +0 -17
- package/build/src/components/FormatDialog/Previewer/Previewer.styled.d.ts +0 -1
- package/build/src/components/FormatDialog/Previewer/index.d.ts +0 -1
- package/build/src/components/FormatDialog/ProxyMenu/ProxyMenu.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/ProxyMenu/ProxyMenu.d.ts +0 -20
- package/build/src/components/FormatDialog/ProxyMenu/ProxyMenu.styled.d.ts +0 -2
- package/build/src/components/FormatDialog/ProxyMenu/index.d.ts +0 -1
- package/build/src/components/FormatDialog/TrackingParameters/TrackingParameters.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/TrackingParameters/TrackingParameters.d.ts +0 -13
- package/build/src/components/FormatDialog/TrackingParameters/index.d.ts +0 -1
- package/build/src/components/FormatDialog/VersionHistory/VersionHistory.cy.d.ts +0 -1
- package/build/src/components/FormatDialog/VersionHistory/VersionHistory.d.ts +0 -6
- package/build/src/components/FormatDialog/VersionHistory/VersionHistory.styled.d.ts +0 -1
- package/build/src/components/FormatDialog/VersionHistory/index.d.ts +0 -1
- package/build/src/components/FormatDialog/index.d.ts +0 -1
- package/build/src/components/Header/Header.cy.d.ts +0 -1
- package/build/src/components/Header/Header.d.ts +0 -16
- package/build/src/components/Header/Header.styled.d.ts +0 -5
- package/build/src/components/Header/index.d.ts +0 -1
- package/build/src/components/LineClamp/LineClamp.d.ts +0 -4
- package/build/src/components/LineClamp/index.d.ts +0 -1
- package/build/src/components/Loader/Loader.cy.d.ts +0 -1
- package/build/src/components/Loader/Loader.d.ts +0 -7
- package/build/src/components/Loader/index.d.ts +0 -1
- package/build/src/components/NoResult/NoResult.cy.d.ts +0 -1
- package/build/src/components/NoResult/NoResult.d.ts +0 -7
- package/build/src/components/NoResult/index.d.ts +0 -1
- package/build/src/components/Result/AssetCard/AssetCard.d.ts +0 -15
- package/build/src/components/Result/AssetCard/AssetCard.styled.d.ts +0 -2
- package/build/src/components/Result/AssetCard/AssetCardWrapper.cy.d.ts +0 -1
- package/build/src/components/Result/AssetCard/AssetCardWrapper.d.ts +0 -22
- package/build/src/components/Result/AssetCard/AssetCardWrapper.styled.d.ts +0 -1
- package/build/src/components/Result/AssetCard/index.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/AssetPreview.cy.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/AssetPreview.d.ts +0 -11
- package/build/src/components/Result/AssetPreview/AssetPreview.styled.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/ImagePreview/ImagePreview.cy.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/ImagePreview/ImagePreview.d.ts +0 -11
- package/build/src/components/Result/AssetPreview/ImagePreview/index.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/OtherPreview/OtherPreview.cy.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/OtherPreview/OtherPreview.d.ts +0 -10
- package/build/src/components/Result/AssetPreview/OtherPreview/OtherPreview.styled.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/OtherPreview/index.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/VideoPreview/VideoPreview.cy.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/VideoPreview/VideoPreview.d.ts +0 -11
- package/build/src/components/Result/AssetPreview/VideoPreview/index.d.ts +0 -1
- package/build/src/components/Result/AssetPreview/index.d.ts +0 -1
- package/build/src/consts/asset.d.ts +0 -14
- package/build/src/consts/data.d.ts +0 -23
- package/build/src/page/Authenticate/Authenticate.cy.d.ts +0 -1
- package/build/src/page/Home/Home.d.ts +0 -6
- package/build/src/page/Home/Home.styled.d.ts +0 -2
- package/build/src/page/Home/index.d.ts +0 -1
- package/build/src/setupTests.d.ts +0 -1
- package/build/src/store/assets/assets.api.d.ts +0 -66
- package/build/src/store/assets/assets.service.d.ts +0 -23
- package/build/src/store/assets/assets.slice.d.ts +0 -65
- package/build/src/store/auth/auth.slice.d.ts +0 -76
- package/build/src/store/index.d.ts +0 -368
- package/build/src/store/search/search.api.d.ts +0 -39
- package/build/src/store/search/search.slice.d.ts +0 -12
- package/build/src/store/user/user.api.d.ts +0 -5
- package/build/src/types/assets.d.ts +0 -74
- package/build/src/types/common.d.ts +0 -11
- package/build/src/types/download.d.ts +0 -8
- package/build/src/types/navigation.d.ts +0 -3
- package/build/src/types/user.d.ts +0 -7
- package/build/src/utils/array.d.ts +0 -13
- package/build/src/utils/browser.d.ts +0 -1
- package/build/src/utils/dom.d.ts +0 -7
- package/build/src/utils/icon.d.ts +0 -3
- package/build/src/utils/image.d.ts +0 -69
- package/build/src/utils/mergeRefs.d.ts +0 -14
- package/build/src/utils/number.d.ts +0 -4
- package/build/src/utils/rotate.d.ts +0 -4
- package/build/src/utils/string.d.ts +0 -12
- package/build/src/utils/utils.cy.d.ts +0 -1
- package/build/src/view/AssetsPicker.d.ts +0 -6
- /package/build/{src/AppContext.d.ts → AppContext.d.ts} +0 -0
- /package/build/{src/GlobalConfigContext.d.ts → GlobalConfigContext.d.ts} +0 -0
- /package/build/{src/consts → consts}/auth.d.ts +0 -0
- /package/build/{src/page → page}/Authenticate/Authenticate.d.ts +0 -0
- /package/build/{src/page → page}/Authenticate/ConnectingBackground.d.ts +0 -0
- /package/build/{src/page → page}/Authenticate/index.d.ts +0 -0
- /package/build/{src/types → types}/storage.d.ts +0 -0
- /package/build/{src/utils → utils}/function.d.ts +0 -0
- /package/build/{src/utils → utils}/getRequestUrl.d.ts +0 -0
- /package/build/{src/utils → utils}/hooks.d.ts +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
2
|
+
import CortexElement from '../../base/element';
|
|
3
|
+
import { GetAvailableExtensionsResponse } from '../../api/asset/asset.types';
|
|
4
|
+
import { Asset, AssetVersion, AvailableProxy } from '../../types/asset';
|
|
5
|
+
import CxAssetLinkFormat from '@orangelogic/design-system/components/asset-link-format';
|
|
6
|
+
import CxCropper from '@orangelogic/design-system/components/cropper';
|
|
7
|
+
import CxDialog from '@orangelogic/design-system/components/dialog';
|
|
8
|
+
import CxDrawer from '@orangelogic/design-system/components/drawer';
|
|
9
|
+
import CxIconButton from '@orangelogic/design-system/components/icon-button';
|
|
10
|
+
import CxLineClamp from '@orangelogic/design-system/components/line-clamp';
|
|
11
|
+
import CxSpace from '@orangelogic/design-system/components/space';
|
|
12
|
+
import CxSpinner from '@orangelogic/design-system/components/spinner';
|
|
13
|
+
import CxTooltip from '@orangelogic/design-system/components/tooltip';
|
|
14
|
+
import CxTypography from '@orangelogic/design-system/components/typography';
|
|
15
|
+
import CxContentBrowserAssetPreview from '../content-browser-asset-preview/content-browser-asset-preview';
|
|
16
|
+
import CxContentBrowserAssetProxySelector from '../content-browser-asset-proxy-selector/content-browser-asset-proxy-selector';
|
|
17
|
+
import CxContentBrowserAssetVersionHistory from '../content-browser-asset-version-history/content-browser-asset-version-history';
|
|
18
|
+
import { type Parameter, type Transformation, type CtaTextTransform, ContentBrowserFormatDialogVariant } from '../../types/content-browser';
|
|
19
|
+
export default class CxContentBrowserFormatDialog extends CortexElement {
|
|
20
|
+
static readonly styles: CSSResultGroup;
|
|
21
|
+
static readonly dependencies: {
|
|
22
|
+
'cx-asset-link-format': typeof CxAssetLinkFormat;
|
|
23
|
+
'cx-cropper': typeof CxCropper;
|
|
24
|
+
'cx-content-browser-asset-preview': typeof CxContentBrowserAssetPreview;
|
|
25
|
+
'cx-content-browser-asset-proxy-selector': typeof CxContentBrowserAssetProxySelector;
|
|
26
|
+
'cx-content-browser-asset-version-history': typeof CxContentBrowserAssetVersionHistory;
|
|
27
|
+
'cx-dialog': typeof CxDialog;
|
|
28
|
+
'cx-drawer': typeof CxDrawer;
|
|
29
|
+
'cx-icon-button': typeof CxIconButton;
|
|
30
|
+
'cx-line-clamp': typeof CxLineClamp;
|
|
31
|
+
'cx-space': typeof CxSpace;
|
|
32
|
+
'cx-spinner': typeof CxSpinner;
|
|
33
|
+
'cx-tooltip': typeof CxTooltip;
|
|
34
|
+
'cx-typography': typeof CxTypography;
|
|
35
|
+
};
|
|
36
|
+
private readonly localize;
|
|
37
|
+
assetLinkFormat: CxAssetLinkFormat;
|
|
38
|
+
boundary: HTMLElement;
|
|
39
|
+
availableExtensions: GetAvailableExtensionsResponse | null;
|
|
40
|
+
supportedExtensions: string[];
|
|
41
|
+
supportedRepresentativeSubtypes: string[];
|
|
42
|
+
autoExtension: string;
|
|
43
|
+
ctaText: string;
|
|
44
|
+
ctaTextTransform: CtaTextTransform;
|
|
45
|
+
canCustomFormat: boolean;
|
|
46
|
+
canFavorite: boolean;
|
|
47
|
+
canPinAsset: boolean;
|
|
48
|
+
canTrack: boolean;
|
|
49
|
+
canUseProxies: boolean;
|
|
50
|
+
canViewVersions: boolean;
|
|
51
|
+
variant: ContentBrowserFormatDialogVariant;
|
|
52
|
+
loadingFavorites: boolean;
|
|
53
|
+
loadingPinAsset: boolean;
|
|
54
|
+
loadingProxies: boolean;
|
|
55
|
+
disabledConfirm: boolean;
|
|
56
|
+
token: string;
|
|
57
|
+
baseUrl: string;
|
|
58
|
+
asset: Asset & {
|
|
59
|
+
previewUrl: string;
|
|
60
|
+
} | undefined;
|
|
61
|
+
private isOpen;
|
|
62
|
+
isFavorite: boolean;
|
|
63
|
+
isAssetPinned: boolean;
|
|
64
|
+
proxies: AvailableProxy[];
|
|
65
|
+
showVersionHistory: boolean;
|
|
66
|
+
showCustomFormat: boolean;
|
|
67
|
+
loadingVersionHistory: boolean;
|
|
68
|
+
versions: AssetVersion[];
|
|
69
|
+
filteredProxies: AvailableProxy[];
|
|
70
|
+
selectedProxy: string;
|
|
71
|
+
/**
|
|
72
|
+
* The proxy id that was active right before switching into Custom Format mode.
|
|
73
|
+
* `selectedProxy` gets overwritten to `CUSTOM_FORMAT_VALUE` while the custom format panel is
|
|
74
|
+
* open, so this is what the embedded `cx-asset-link-format` panel's `selected-proxy` attribute
|
|
75
|
+
* is bound to — otherwise it always resolves to `undefined` and the panel silently defaults
|
|
76
|
+
* to `proxies[0]` instead of the proxy the user had actually selected (e.g. TRX).
|
|
77
|
+
*/
|
|
78
|
+
private lastProxyBeforeCustomFormat;
|
|
79
|
+
confirmedTransformations: Transformation[];
|
|
80
|
+
confirmedFormat: {
|
|
81
|
+
width?: number | null;
|
|
82
|
+
height?: number | null;
|
|
83
|
+
extension?: string | null;
|
|
84
|
+
} | undefined;
|
|
85
|
+
loadingConfirm: boolean;
|
|
86
|
+
enabledTracking: boolean;
|
|
87
|
+
trackingParameters: Parameter[];
|
|
88
|
+
private get shouldAppendAutoExtension();
|
|
89
|
+
private get canUseATS();
|
|
90
|
+
handleSupportedExtensionsChange(): void;
|
|
91
|
+
open({ asset, isFavorite, isAssetPinned, proxies, }: {
|
|
92
|
+
asset: Asset & {
|
|
93
|
+
previewUrl: string;
|
|
94
|
+
};
|
|
95
|
+
isFavorite: boolean;
|
|
96
|
+
isAssetPinned?: boolean;
|
|
97
|
+
proxies: AvailableProxy[];
|
|
98
|
+
}): void;
|
|
99
|
+
hide(): void;
|
|
100
|
+
setVersionHistory(versions: AssetVersion[]): void;
|
|
101
|
+
setIsFavorite(isFavorite: boolean): void;
|
|
102
|
+
setIsAssetPinned(isAssetPinned: boolean): void;
|
|
103
|
+
setLoadingConfirm(loadingConfirm: boolean): void;
|
|
104
|
+
mapFormatConfirmPayload(asset: Asset, selectedProxy?: AvailableProxy): {
|
|
105
|
+
asset: Asset;
|
|
106
|
+
extension: string;
|
|
107
|
+
parameters: Parameter[] | undefined;
|
|
108
|
+
proxyPreference: string;
|
|
109
|
+
sourceProxyMetadata: {
|
|
110
|
+
cdnName: string | null;
|
|
111
|
+
extension: string | null;
|
|
112
|
+
height: number | null;
|
|
113
|
+
isCustomFormat: null;
|
|
114
|
+
permanentLink: string | null;
|
|
115
|
+
proxyLabel: string | null;
|
|
116
|
+
proxyName: string | null;
|
|
117
|
+
width: number | null;
|
|
118
|
+
};
|
|
119
|
+
transformations: Transformation[];
|
|
120
|
+
transformedAssetMetadata: {
|
|
121
|
+
extension: string | null;
|
|
122
|
+
height: number | null;
|
|
123
|
+
isCustomFormat: boolean;
|
|
124
|
+
permanentLink: null;
|
|
125
|
+
width: number | null;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
mapProxyConfirmPayload(asset: Asset, selectedProxy?: AvailableProxy): {
|
|
129
|
+
asset: Asset;
|
|
130
|
+
extension: string;
|
|
131
|
+
parameters: Parameter[] | undefined;
|
|
132
|
+
permanentLink: string | undefined;
|
|
133
|
+
proxyPreference: string;
|
|
134
|
+
selectedProxyMetadata: {
|
|
135
|
+
cdnName: string | null;
|
|
136
|
+
extension: string | null;
|
|
137
|
+
height: number | null;
|
|
138
|
+
isCustomFormat: boolean;
|
|
139
|
+
permanentLink: string | null;
|
|
140
|
+
proxyLabel: string | null;
|
|
141
|
+
proxyName: string | null;
|
|
142
|
+
width: number | null;
|
|
143
|
+
};
|
|
144
|
+
useRepresentative: boolean;
|
|
145
|
+
};
|
|
146
|
+
private handleCancelCustomFormat;
|
|
147
|
+
private handleDoneCustomFormat;
|
|
148
|
+
private handleFavorite;
|
|
149
|
+
private handlePinAsset;
|
|
150
|
+
private handleProxyConfirm;
|
|
151
|
+
private handleVersionHistory;
|
|
152
|
+
private handleProxySelect;
|
|
153
|
+
private handleTrackingParametersChange;
|
|
154
|
+
private renderHeader;
|
|
155
|
+
private renderBody;
|
|
156
|
+
private renderFooter;
|
|
157
|
+
private renderContent;
|
|
158
|
+
private handleRequestClose;
|
|
159
|
+
private handleClose;
|
|
160
|
+
render(): TemplateResult<1>;
|
|
161
|
+
}
|
|
162
|
+
declare global {
|
|
163
|
+
interface HTMLElementTagNameMap {
|
|
164
|
+
'cx-content-browser-format-dialog': CxContentBrowserFormatDialog;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import '@lit-labs/virtualizer';
|
|
2
|
+
import CortexElement from '../../base/element';
|
|
3
|
+
import { Asset } from '../../types/asset';
|
|
4
|
+
import { GridView } from '../../types/content-browser';
|
|
5
|
+
import CxProgressBar from '@orangelogic/design-system/components/progress-bar';
|
|
6
|
+
import CxResizeObserver from '@orangelogic/design-system/components/resize-observer';
|
|
7
|
+
import CxContentBrowserAssetCard from '../content-browser-asset-card/content-browser-asset-card';
|
|
8
|
+
import CxContentBrowserNoResult from '../content-browser-no-result/content-browser-no-result';
|
|
9
|
+
import type { CSSResultGroup } from 'lit';
|
|
10
|
+
export default class CxContentBrowserGrid extends CortexElement {
|
|
11
|
+
#private;
|
|
12
|
+
static readonly styles: CSSResultGroup;
|
|
13
|
+
static readonly dependencies: {
|
|
14
|
+
'cx-content-browser-asset-card': typeof CxContentBrowserAssetCard;
|
|
15
|
+
'cx-content-browser-no-result': typeof CxContentBrowserNoResult;
|
|
16
|
+
'cx-progress-bar': typeof CxProgressBar;
|
|
17
|
+
'cx-resize-observer': typeof CxResizeObserver;
|
|
18
|
+
};
|
|
19
|
+
private readonly localize;
|
|
20
|
+
private readonly containerEl;
|
|
21
|
+
private readonly virtualizerEl;
|
|
22
|
+
assets: Asset[];
|
|
23
|
+
empty: boolean;
|
|
24
|
+
view: GridView;
|
|
25
|
+
hasMore: boolean;
|
|
26
|
+
loading: boolean;
|
|
27
|
+
showTitle: boolean;
|
|
28
|
+
showSize: boolean;
|
|
29
|
+
showDimensions: boolean;
|
|
30
|
+
showTags: boolean;
|
|
31
|
+
selectedAssetId: string | undefined;
|
|
32
|
+
assetMap: Map<string, Asset>;
|
|
33
|
+
columnWidth: number;
|
|
34
|
+
private readonly scrollAnchorController;
|
|
35
|
+
constructor();
|
|
36
|
+
handleViewChange(): void;
|
|
37
|
+
handleAssetsChange(): void;
|
|
38
|
+
private handleResize;
|
|
39
|
+
private readonly debouncedCalculatePageSize;
|
|
40
|
+
private calculatePageSize;
|
|
41
|
+
private calculateColumnCount;
|
|
42
|
+
private handleClick;
|
|
43
|
+
private renderItem;
|
|
44
|
+
private handleScroll;
|
|
45
|
+
private readonly debouncedHandleScrollEnd;
|
|
46
|
+
private handleScrollEnd;
|
|
47
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
48
|
+
}
|
|
49
|
+
declare global {
|
|
50
|
+
interface HTMLElementTagNameMap {
|
|
51
|
+
'cx-content-browser-grid': CxContentBrowserGrid;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
type ScrollAnchorContainer = HTMLElement & {
|
|
3
|
+
layoutComplete?: Promise<unknown>;
|
|
4
|
+
};
|
|
5
|
+
type ScrollAnchorControllerOptions = {
|
|
6
|
+
getContainer: () => ScrollAnchorContainer | undefined;
|
|
7
|
+
getItemIndexById: (id: string) => number;
|
|
8
|
+
itemSelector: string;
|
|
9
|
+
};
|
|
10
|
+
export default class ScrollAnchorController implements ReactiveController {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(host: ReactiveControllerHost & {
|
|
13
|
+
updateComplete: Promise<unknown>;
|
|
14
|
+
}, options: ScrollAnchorControllerOptions);
|
|
15
|
+
capture(container?: ScrollAnchorContainer | undefined): void;
|
|
16
|
+
setLayoutMetrics(options: {
|
|
17
|
+
columnCount: number;
|
|
18
|
+
itemHeight: number;
|
|
19
|
+
}): void;
|
|
20
|
+
scheduleRestore(): void;
|
|
21
|
+
restore(): void;
|
|
22
|
+
private getAnchorRowTop;
|
|
23
|
+
hostDisconnected(): void;
|
|
24
|
+
private cancelPendingRestore;
|
|
25
|
+
private scrollTo;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import CxAvatar from '@orangelogic/design-system/components/avatar';
|
|
2
|
+
import CxDivider from '@orangelogic/design-system/components/divider';
|
|
3
|
+
import CxDropdown from '@orangelogic/design-system/components/dropdown';
|
|
4
|
+
import CxIcon from '@orangelogic/design-system/components/icon';
|
|
5
|
+
import CxIconButton from '@orangelogic/design-system/components/icon-button';
|
|
6
|
+
import CxLineClamp from '@orangelogic/design-system/components/line-clamp';
|
|
7
|
+
import CxMenu from '@orangelogic/design-system/components/menu';
|
|
8
|
+
import CxMenuItem from '@orangelogic/design-system/components/menu-item';
|
|
9
|
+
import CxSkeleton from '@orangelogic/design-system/components/skeleton';
|
|
10
|
+
import CxSpace from '@orangelogic/design-system/components/space';
|
|
11
|
+
import CxTypography from '@orangelogic/design-system/components/typography';
|
|
12
|
+
import CortexElement from '../../base/element';
|
|
13
|
+
import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
14
|
+
/**
|
|
15
|
+
* @summary DAM view header. Converted from ContentBrowserSDK Header React component.
|
|
16
|
+
*
|
|
17
|
+
* @event cx-content-browser-header-close - Emitted when the close button is clicked (when shown in popup).
|
|
18
|
+
* @event cx-content-browser-header-logout - Emitted when the user selects logout.
|
|
19
|
+
*/
|
|
20
|
+
export default class CxContentBrowserHeader extends CortexElement {
|
|
21
|
+
static readonly styles: CSSResultGroup;
|
|
22
|
+
static readonly dependencies: {
|
|
23
|
+
'cx-avatar': typeof CxAvatar;
|
|
24
|
+
'cx-divider': typeof CxDivider;
|
|
25
|
+
'cx-dropdown': typeof CxDropdown;
|
|
26
|
+
'cx-icon': typeof CxIcon;
|
|
27
|
+
'cx-icon-button': typeof CxIconButton;
|
|
28
|
+
'cx-line-clamp': typeof CxLineClamp;
|
|
29
|
+
'cx-menu': typeof CxMenu;
|
|
30
|
+
'cx-menu-item': typeof CxMenuItem;
|
|
31
|
+
'cx-skeleton': typeof CxSkeleton;
|
|
32
|
+
'cx-space': typeof CxSpace;
|
|
33
|
+
'cx-typography': typeof CxTypography;
|
|
34
|
+
};
|
|
35
|
+
private readonly localize;
|
|
36
|
+
bordered: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Application name shown when no folder is selected.
|
|
39
|
+
*/
|
|
40
|
+
applicationName: string;
|
|
41
|
+
loading: boolean;
|
|
42
|
+
isFetching: boolean;
|
|
43
|
+
avatar: string;
|
|
44
|
+
fullName: string;
|
|
45
|
+
folderTitle: string;
|
|
46
|
+
/**
|
|
47
|
+
* When true, show the close button (e.g. when content browser is in a popup).
|
|
48
|
+
*/
|
|
49
|
+
showCloseButton: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* When true, show logout option in user dropdown.
|
|
52
|
+
*/
|
|
53
|
+
canLogout: boolean;
|
|
54
|
+
get isLoading(): boolean;
|
|
55
|
+
private handleCloseClick;
|
|
56
|
+
private handleMenuSelect;
|
|
57
|
+
private renderTitle;
|
|
58
|
+
private renderUserDropdown;
|
|
59
|
+
render(): TemplateResult;
|
|
60
|
+
}
|
|
61
|
+
declare global {
|
|
62
|
+
interface HTMLElementTagNameMap {
|
|
63
|
+
'cx-content-browser-header': CxContentBrowserHeader;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import CxButton from '@orangelogic/design-system/components/button';
|
|
2
|
+
import CxSpace from '@orangelogic/design-system/components/space';
|
|
3
|
+
import CxSpinner from '@orangelogic/design-system/components/spinner';
|
|
4
|
+
import CxTypography from '@orangelogic/design-system/components/typography';
|
|
5
|
+
import { TemplateResult } from 'lit';
|
|
6
|
+
import CortexElement from '../../base/element';
|
|
7
|
+
import type { CSSResultGroup } from 'lit';
|
|
8
|
+
export declare const MESSAGE_NEW_LINE = "\n";
|
|
9
|
+
export default class CxContentBrowserLoader extends CortexElement {
|
|
10
|
+
static readonly styles: CSSResultGroup;
|
|
11
|
+
static readonly dependencies: {
|
|
12
|
+
'cx-button': typeof CxButton;
|
|
13
|
+
'cx-space': typeof CxSpace;
|
|
14
|
+
'cx-spinner': typeof CxSpinner;
|
|
15
|
+
'cx-typography': typeof CxTypography;
|
|
16
|
+
};
|
|
17
|
+
message: string;
|
|
18
|
+
private renderMessageLines;
|
|
19
|
+
render(): TemplateResult;
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
'cx-content-browser-loader': CxContentBrowserLoader;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './content-browser-loader';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CxIcon from '@orangelogic/design-system/components/icon';
|
|
2
|
+
import { TemplateResult } from 'lit';
|
|
3
|
+
import CortexElement from '../../base/element';
|
|
4
|
+
import type { CSSResultGroup } from 'lit';
|
|
5
|
+
export default class CxContentBrowserNoResult extends CortexElement {
|
|
6
|
+
static readonly styles: CSSResultGroup;
|
|
7
|
+
static readonly dependencies: {
|
|
8
|
+
'cx-icon': typeof CxIcon;
|
|
9
|
+
};
|
|
10
|
+
icon: string;
|
|
11
|
+
message: string;
|
|
12
|
+
render(): TemplateResult;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'cx-content-browser-no-result': CxContentBrowserNoResult;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './content-browser-no-result';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subpath entry: `import CxContentBrowser from '@orangelogic/orange-dam-content-browser-sdk/content-browser'`.
|
|
3
|
+
* Skips the full Content Browser React bundle and global styles from `index.tsx`.
|
|
4
|
+
*/
|
|
5
|
+
export { default } from './components/content-browser/content-browser';
|
|
6
|
+
export { default as CxContentBrowser } from './components/content-browser/content-browser';
|
|
7
|
+
export { COMPUTED_FIELDS } from './components/content-browser/content-browser';
|