@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
|
@@ -109,7 +109,7 @@ var __yieldStar = (value) => {
|
|
|
109
109
|
}, "return" in obj && method("return"), it;
|
|
110
110
|
};
|
|
111
111
|
var __forAwait = (obj, it, method) => (it = obj[__knownSymbol("asyncIterator")]) ? it.call(obj) : (obj = obj[__knownSymbol("iterator")](), it = {}, method = (key, fn) => (fn = obj[key]) && (it[key] = (arg) => new Promise((yes, no, done) => (arg = fn.call(obj, arg), done = arg.done, Promise.resolve(arg.value).then((value) => yes({ value, done }), no)))), method("next"), method("return"), it);
|
|
112
|
-
var _a, _b, _c, _d, _e, _f, _host, _getContainer,
|
|
112
|
+
var _a, _b, _c, _d, _e, _f, _host, _getContainer, _getItemIndexById, _itemSelector, _anchor, _columnCount, _itemHeight, _pendingRestoreFrames, _restoreSequence, _lastGetDataParameters, _lastMappedAvailableExtensions, _lastData, _hasFetchedOnce;
|
|
113
113
|
import CxDrawer from "@orangelogic/design-system/components/drawer";
|
|
114
114
|
import CxFolderSelect from "@orangelogic/design-system/components/folder-select";
|
|
115
115
|
import CxIcon from "@orangelogic/design-system/components/icon";
|
|
@@ -1165,13 +1165,13 @@ var camelCase = createCompounder(function(result, word, index) {
|
|
|
1165
1165
|
word = word.toLowerCase();
|
|
1166
1166
|
return result + (index ? capitalize(word) : word);
|
|
1167
1167
|
});
|
|
1168
|
-
var __defProp$
|
|
1169
|
-
var __decorateClass$
|
|
1168
|
+
var __defProp$h = Object.defineProperty;
|
|
1169
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
1170
1170
|
var result = void 0;
|
|
1171
1171
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
1172
1172
|
if (decorator = decorators[i4])
|
|
1173
1173
|
result = decorator(target, key, result) || result;
|
|
1174
|
-
if (result) __defProp$
|
|
1174
|
+
if (result) __defProp$h(target, key, result);
|
|
1175
1175
|
return result;
|
|
1176
1176
|
};
|
|
1177
1177
|
const _CortexElement = class _CortexElement extends i$4 {
|
|
@@ -1298,16 +1298,16 @@ const _CortexElement = class _CortexElement extends i$4 {
|
|
|
1298
1298
|
_CortexElement.version = "1";
|
|
1299
1299
|
_CortexElement.dependencies = {};
|
|
1300
1300
|
let CortexElement = _CortexElement;
|
|
1301
|
-
__decorateClass$
|
|
1301
|
+
__decorateClass$h([
|
|
1302
1302
|
n$6()
|
|
1303
1303
|
], CortexElement.prototype, "dir");
|
|
1304
|
-
__decorateClass$
|
|
1304
|
+
__decorateClass$h([
|
|
1305
1305
|
n$6()
|
|
1306
1306
|
], CortexElement.prototype, "lang");
|
|
1307
|
-
__decorateClass$
|
|
1307
|
+
__decorateClass$h([
|
|
1308
1308
|
n$6()
|
|
1309
1309
|
], CortexElement.prototype, "theme");
|
|
1310
|
-
__decorateClass$
|
|
1310
|
+
__decorateClass$h([
|
|
1311
1311
|
n$6({ attribute: "pre-render", type: Boolean })
|
|
1312
1312
|
], CortexElement.prototype, "preRender");
|
|
1313
1313
|
function rescueElementPrototype(element) {
|
|
@@ -5748,7 +5748,7 @@ function watch(propertyName, options) {
|
|
|
5748
5748
|
};
|
|
5749
5749
|
};
|
|
5750
5750
|
}
|
|
5751
|
-
const styles$
|
|
5751
|
+
const styles$e = i$7`
|
|
5752
5752
|
:host {
|
|
5753
5753
|
display: contents;
|
|
5754
5754
|
}
|
|
@@ -5837,14 +5837,14 @@ const styles$f = i$7`
|
|
|
5837
5837
|
display: block;
|
|
5838
5838
|
}
|
|
5839
5839
|
`;
|
|
5840
|
-
var __defProp$
|
|
5841
|
-
var __getOwnPropDesc$
|
|
5842
|
-
var __decorateClass$
|
|
5843
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5840
|
+
var __defProp$g = Object.defineProperty;
|
|
5841
|
+
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
5842
|
+
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
5843
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
5844
5844
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
5845
5845
|
if (decorator = decorators[i4])
|
|
5846
5846
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5847
|
-
if (kind && result) __defProp$
|
|
5847
|
+
if (kind && result) __defProp$g(target, key, result);
|
|
5848
5848
|
return result;
|
|
5849
5849
|
};
|
|
5850
5850
|
const LIBRARY_FOLDER_TITLE = "Library";
|
|
@@ -6107,7 +6107,7 @@ let CxContentBrowserBrowser = class extends CortexElement {
|
|
|
6107
6107
|
`;
|
|
6108
6108
|
}
|
|
6109
6109
|
};
|
|
6110
|
-
CxContentBrowserBrowser.styles = [componentStyles, styles$
|
|
6110
|
+
CxContentBrowserBrowser.styles = [componentStyles, styles$e];
|
|
6111
6111
|
CxContentBrowserBrowser.dependencies = {
|
|
6112
6112
|
"cx-drawer": CxDrawer,
|
|
6113
6113
|
"cx-folder-select": CxFolderSelect,
|
|
@@ -6117,67 +6117,67 @@ CxContentBrowserBrowser.dependencies = {
|
|
|
6117
6117
|
"cx-tooltip": CxTooltip,
|
|
6118
6118
|
"cx-typography": CxTypography
|
|
6119
6119
|
};
|
|
6120
|
-
__decorateClass$
|
|
6120
|
+
__decorateClass$g([
|
|
6121
6121
|
e$7(".drawer-trigger")
|
|
6122
6122
|
], CxContentBrowserBrowser.prototype, "trigger", 2);
|
|
6123
|
-
__decorateClass$
|
|
6123
|
+
__decorateClass$g([
|
|
6124
6124
|
e$7(".content-browser-browser")
|
|
6125
6125
|
], CxContentBrowserBrowser.prototype, "drawer", 2);
|
|
6126
|
-
__decorateClass$
|
|
6126
|
+
__decorateClass$g([
|
|
6127
6127
|
n$6({ attribute: "folder-id", type: String })
|
|
6128
6128
|
], CxContentBrowserBrowser.prototype, "folderId", 2);
|
|
6129
|
-
__decorateClass$
|
|
6129
|
+
__decorateClass$g([
|
|
6130
6130
|
n$6({ attribute: "folder-title", type: String })
|
|
6131
6131
|
], CxContentBrowserBrowser.prototype, "folderTitle", 2);
|
|
6132
|
-
__decorateClass$
|
|
6132
|
+
__decorateClass$g([
|
|
6133
6133
|
n$6({ attribute: "allowed-folders", type: Array })
|
|
6134
6134
|
], CxContentBrowserBrowser.prototype, "allowedFolders", 2);
|
|
6135
|
-
__decorateClass$
|
|
6135
|
+
__decorateClass$g([
|
|
6136
6136
|
n$6({ attribute: "can-pin", type: Boolean })
|
|
6137
6137
|
], CxContentBrowserBrowser.prototype, "canPin", 2);
|
|
6138
|
-
__decorateClass$
|
|
6138
|
+
__decorateClass$g([
|
|
6139
6139
|
n$6({ attribute: "collection-path", type: String })
|
|
6140
6140
|
], CxContentBrowserBrowser.prototype, "collectionPath", 2);
|
|
6141
|
-
__decorateClass$
|
|
6141
|
+
__decorateClass$g([
|
|
6142
6142
|
n$6({ attribute: "favorite-folder-id", type: String })
|
|
6143
6143
|
], CxContentBrowserBrowser.prototype, "favoriteFolderId", 2);
|
|
6144
|
-
__decorateClass$
|
|
6144
|
+
__decorateClass$g([
|
|
6145
6145
|
n$6({ attribute: "show-collections", type: Boolean })
|
|
6146
6146
|
], CxContentBrowserBrowser.prototype, "showCollections", 2);
|
|
6147
|
-
__decorateClass$
|
|
6147
|
+
__decorateClass$g([
|
|
6148
6148
|
n$6({ attribute: "show-favorite-folder", type: Boolean })
|
|
6149
6149
|
], CxContentBrowserBrowser.prototype, "showFavoriteFolder", 2);
|
|
6150
|
-
__decorateClass$
|
|
6150
|
+
__decorateClass$g([
|
|
6151
6151
|
n$6({ attribute: "force-overlay", type: Boolean })
|
|
6152
6152
|
], CxContentBrowserBrowser.prototype, "forceOverlay", 2);
|
|
6153
|
-
__decorateClass$
|
|
6153
|
+
__decorateClass$g([
|
|
6154
6154
|
n$6({ attribute: "see-thru", type: Boolean })
|
|
6155
6155
|
], CxContentBrowserBrowser.prototype, "seeThru", 2);
|
|
6156
|
-
__decorateClass$
|
|
6156
|
+
__decorateClass$g([
|
|
6157
6157
|
n$6({ attribute: "min-query-length", type: Number })
|
|
6158
6158
|
], CxContentBrowserBrowser.prototype, "minQueryLength", 2);
|
|
6159
|
-
__decorateClass$
|
|
6159
|
+
__decorateClass$g([
|
|
6160
6160
|
n$6({ attribute: "token", type: String })
|
|
6161
6161
|
], CxContentBrowserBrowser.prototype, "token", 2);
|
|
6162
|
-
__decorateClass$
|
|
6162
|
+
__decorateClass$g([
|
|
6163
6163
|
n$6({ attribute: "base-url", type: String })
|
|
6164
6164
|
], CxContentBrowserBrowser.prototype, "baseUrl", 2);
|
|
6165
|
-
__decorateClass$
|
|
6165
|
+
__decorateClass$g([
|
|
6166
6166
|
n$6({ attribute: "use-site-session", type: Boolean })
|
|
6167
6167
|
], CxContentBrowserBrowser.prototype, "useSiteSession", 2);
|
|
6168
|
-
__decorateClass$
|
|
6168
|
+
__decorateClass$g([
|
|
6169
6169
|
r$6()
|
|
6170
6170
|
], CxContentBrowserBrowser.prototype, "searchTerm", 2);
|
|
6171
|
-
__decorateClass$
|
|
6171
|
+
__decorateClass$g([
|
|
6172
6172
|
r$6()
|
|
6173
6173
|
], CxContentBrowserBrowser.prototype, "isPersistent", 2);
|
|
6174
|
-
__decorateClass$
|
|
6174
|
+
__decorateClass$g([
|
|
6175
6175
|
r$6()
|
|
6176
6176
|
], CxContentBrowserBrowser.prototype, "collectionsOpen", 2);
|
|
6177
|
-
__decorateClass$
|
|
6177
|
+
__decorateClass$g([
|
|
6178
6178
|
watch("forceOverlay", { waitUntilFirstUpdate: true })
|
|
6179
6179
|
], CxContentBrowserBrowser.prototype, "handleForceOverlayChange", 1);
|
|
6180
|
-
CxContentBrowserBrowser = __decorateClass$
|
|
6180
|
+
CxContentBrowserBrowser = __decorateClass$g([
|
|
6181
6181
|
customElement("cx-content-browser-browser")
|
|
6182
6182
|
], CxContentBrowserBrowser);
|
|
6183
6183
|
/**
|
|
@@ -6308,7 +6308,6 @@ var GridView = /* @__PURE__ */ ((GridView2) => {
|
|
|
6308
6308
|
GridView2["Small"] = "small";
|
|
6309
6309
|
return GridView2;
|
|
6310
6310
|
})(GridView || {});
|
|
6311
|
-
const TABLE_VIEW = "table";
|
|
6312
6311
|
const ASSET_SIZE = {
|
|
6313
6312
|
[
|
|
6314
6313
|
"small"
|
|
@@ -6341,40 +6340,19 @@ var TransformationAction = /* @__PURE__ */ ((TransformationAction2) => {
|
|
|
6341
6340
|
TransformationAction2["Rotate"] = "Rotate";
|
|
6342
6341
|
return TransformationAction2;
|
|
6343
6342
|
})(TransformationAction || {});
|
|
6344
|
-
const autoSelectFormatConverter = {
|
|
6345
|
-
fromAttribute: (value) => {
|
|
6346
|
-
if (value === null) {
|
|
6347
|
-
return false;
|
|
6348
|
-
}
|
|
6349
|
-
const normalized = value.trim();
|
|
6350
|
-
if (normalized === "" || normalized.toLowerCase() === "true") {
|
|
6351
|
-
return true;
|
|
6352
|
-
}
|
|
6353
|
-
if (normalized.toLowerCase() === "false") {
|
|
6354
|
-
return false;
|
|
6355
|
-
}
|
|
6356
|
-
return normalized;
|
|
6357
|
-
},
|
|
6358
|
-
toAttribute: (value) => {
|
|
6359
|
-
return value === false ? null : String(value);
|
|
6360
|
-
}
|
|
6361
|
-
};
|
|
6362
|
-
function isAutoSelectFormatActive(value) {
|
|
6363
|
-
return value === true || typeof value === "string" && value.trim() !== "";
|
|
6364
|
-
}
|
|
6365
6343
|
var ContentBrowserFormatDialogVariant = /* @__PURE__ */ ((ContentBrowserFormatDialogVariant2) => {
|
|
6366
6344
|
ContentBrowserFormatDialogVariant2["Dialog"] = "dialog";
|
|
6367
6345
|
ContentBrowserFormatDialogVariant2["Drawer"] = "drawer";
|
|
6368
6346
|
return ContentBrowserFormatDialogVariant2;
|
|
6369
6347
|
})(ContentBrowserFormatDialogVariant || {});
|
|
6370
|
-
var __defProp$
|
|
6371
|
-
var __getOwnPropDesc$
|
|
6372
|
-
var __decorateClass$
|
|
6373
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6348
|
+
var __defProp$f = Object.defineProperty;
|
|
6349
|
+
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
6350
|
+
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
6351
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
6374
6352
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
6375
6353
|
if (decorator = decorators[i4])
|
|
6376
6354
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6377
|
-
if (kind && result) __defProp$
|
|
6355
|
+
if (kind && result) __defProp$f(target, key, result);
|
|
6378
6356
|
return result;
|
|
6379
6357
|
};
|
|
6380
6358
|
let CxContentBrowserControlFilterFacet = class extends CortexElement {
|
|
@@ -6510,37 +6488,37 @@ CxContentBrowserControlFilterFacet.dependencies = {
|
|
|
6510
6488
|
"cx-typography": CxTypography
|
|
6511
6489
|
};
|
|
6512
6490
|
CxContentBrowserControlFilterFacet.itemsPerPage = 10;
|
|
6513
|
-
__decorateClass$
|
|
6491
|
+
__decorateClass$f([
|
|
6514
6492
|
n$6({ attribute: "loading", reflect: false, type: Boolean })
|
|
6515
6493
|
], CxContentBrowserControlFilterFacet.prototype, "loading", 2);
|
|
6516
|
-
__decorateClass$
|
|
6494
|
+
__decorateClass$f([
|
|
6517
6495
|
n$6({ attribute: "display-name", reflect: false, type: String })
|
|
6518
6496
|
], CxContentBrowserControlFilterFacet.prototype, "displayName", 2);
|
|
6519
|
-
__decorateClass$
|
|
6497
|
+
__decorateClass$f([
|
|
6520
6498
|
n$6({ attribute: "type", reflect: true, type: String })
|
|
6521
6499
|
], CxContentBrowserControlFilterFacet.prototype, "type", 2);
|
|
6522
|
-
__decorateClass$
|
|
6500
|
+
__decorateClass$f([
|
|
6523
6501
|
n$6({ attribute: "values", reflect: false, type: Array })
|
|
6524
6502
|
], CxContentBrowserControlFilterFacet.prototype, "values", 2);
|
|
6525
|
-
__decorateClass$
|
|
6503
|
+
__decorateClass$f([
|
|
6526
6504
|
n$6({ attribute: "collections", reflect: false, type: Array })
|
|
6527
6505
|
], CxContentBrowserControlFilterFacet.prototype, "collections", 2);
|
|
6528
|
-
__decorateClass$
|
|
6506
|
+
__decorateClass$f([
|
|
6529
6507
|
r$6()
|
|
6530
6508
|
], CxContentBrowserControlFilterFacet.prototype, "mappedSubtypes", 2);
|
|
6531
|
-
__decorateClass$
|
|
6509
|
+
__decorateClass$f([
|
|
6532
6510
|
r$6()
|
|
6533
6511
|
], CxContentBrowserControlFilterFacet.prototype, "mappedDisplayNames", 2);
|
|
6534
|
-
__decorateClass$
|
|
6512
|
+
__decorateClass$f([
|
|
6535
6513
|
r$6()
|
|
6536
6514
|
], CxContentBrowserControlFilterFacet.prototype, "page", 2);
|
|
6537
|
-
__decorateClass$
|
|
6515
|
+
__decorateClass$f([
|
|
6538
6516
|
watch("values")
|
|
6539
6517
|
], CxContentBrowserControlFilterFacet.prototype, "handleValuesChange", 1);
|
|
6540
|
-
CxContentBrowserControlFilterFacet = __decorateClass$
|
|
6518
|
+
CxContentBrowserControlFilterFacet = __decorateClass$f([
|
|
6541
6519
|
customElement("cx-content-browser-control-filter-facet")
|
|
6542
6520
|
], CxContentBrowserControlFilterFacet);
|
|
6543
|
-
const styles$
|
|
6521
|
+
const styles$d = i$7`
|
|
6544
6522
|
:host {
|
|
6545
6523
|
--details-width: min(240px, 90dvw);
|
|
6546
6524
|
|
|
@@ -6565,14 +6543,14 @@ const styles$e = i$7`
|
|
|
6565
6543
|
border-left-width: 0px;
|
|
6566
6544
|
}
|
|
6567
6545
|
`;
|
|
6568
|
-
var __defProp$
|
|
6569
|
-
var __getOwnPropDesc$
|
|
6570
|
-
var __decorateClass$
|
|
6571
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6546
|
+
var __defProp$e = Object.defineProperty;
|
|
6547
|
+
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
6548
|
+
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
6549
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
6572
6550
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
6573
6551
|
if (decorator = decorators[i4])
|
|
6574
6552
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6575
|
-
if (kind && result) __defProp$
|
|
6553
|
+
if (kind && result) __defProp$e(target, key, result);
|
|
6576
6554
|
return result;
|
|
6577
6555
|
};
|
|
6578
6556
|
let CxContentBrowserControlFilter = class extends CortexElement {
|
|
@@ -6797,7 +6775,7 @@ let CxContentBrowserControlFilter = class extends CortexElement {
|
|
|
6797
6775
|
`;
|
|
6798
6776
|
}
|
|
6799
6777
|
};
|
|
6800
|
-
CxContentBrowserControlFilter.styles = [componentStyles, styles$
|
|
6778
|
+
CxContentBrowserControlFilter.styles = [componentStyles, styles$d];
|
|
6801
6779
|
CxContentBrowserControlFilter.dependencies = {
|
|
6802
6780
|
"cx-badge": CxBadge,
|
|
6803
6781
|
"cx-button": CxButton,
|
|
@@ -6818,52 +6796,52 @@ CxContentBrowserControlFilter.dependencies = {
|
|
|
6818
6796
|
"cx-tooltip": CxTooltip,
|
|
6819
6797
|
"cx-typography": CxTypography
|
|
6820
6798
|
};
|
|
6821
|
-
__decorateClass$
|
|
6799
|
+
__decorateClass$e([
|
|
6822
6800
|
n$6({ attribute: "facets", reflect: false, type: Array })
|
|
6823
6801
|
], CxContentBrowserControlFilter.prototype, "facets", 2);
|
|
6824
|
-
__decorateClass$
|
|
6802
|
+
__decorateClass$e([
|
|
6825
6803
|
n$6({ attribute: "available-facets", reflect: false, type: Array })
|
|
6826
6804
|
], CxContentBrowserControlFilter.prototype, "availableFacets", 2);
|
|
6827
|
-
__decorateClass$
|
|
6805
|
+
__decorateClass$e([
|
|
6828
6806
|
n$6({ attribute: "selected-facets", reflect: false, type: Object })
|
|
6829
6807
|
], CxContentBrowserControlFilter.prototype, "selectedFacets", 2);
|
|
6830
|
-
__decorateClass$
|
|
6808
|
+
__decorateClass$e([
|
|
6831
6809
|
n$6({ attribute: "loading", reflect: false, type: Boolean })
|
|
6832
6810
|
], CxContentBrowserControlFilter.prototype, "loading", 2);
|
|
6833
|
-
__decorateClass$
|
|
6811
|
+
__decorateClass$e([
|
|
6834
6812
|
n$6({ attribute: "newly-changed-option", reflect: false, type: Object })
|
|
6835
6813
|
], CxContentBrowserControlFilter.prototype, "newlyChangedOption", 2);
|
|
6836
|
-
__decorateClass$
|
|
6814
|
+
__decorateClass$e([
|
|
6837
6815
|
n$6({ attribute: "is-mobile", reflect: false, type: Boolean })
|
|
6838
6816
|
], CxContentBrowserControlFilter.prototype, "isMobile", 2);
|
|
6839
|
-
__decorateClass$
|
|
6817
|
+
__decorateClass$e([
|
|
6840
6818
|
r$6()
|
|
6841
6819
|
], CxContentBrowserControlFilter.prototype, "appliedFiltersCount", 2);
|
|
6842
|
-
__decorateClass$
|
|
6820
|
+
__decorateClass$e([
|
|
6843
6821
|
r$6()
|
|
6844
6822
|
], CxContentBrowserControlFilter.prototype, "mappedDisplayNames", 2);
|
|
6845
|
-
__decorateClass$
|
|
6823
|
+
__decorateClass$e([
|
|
6846
6824
|
watch("facets")
|
|
6847
6825
|
], CxContentBrowserControlFilter.prototype, "handleFacetsChange", 1);
|
|
6848
|
-
__decorateClass$
|
|
6826
|
+
__decorateClass$e([
|
|
6849
6827
|
watch("selectedFacets")
|
|
6850
6828
|
], CxContentBrowserControlFilter.prototype, "handleSelectedFacetsChange", 1);
|
|
6851
|
-
CxContentBrowserControlFilter = __decorateClass$
|
|
6829
|
+
CxContentBrowserControlFilter = __decorateClass$e([
|
|
6852
6830
|
customElement("cx-content-browser-control-filter")
|
|
6853
6831
|
], CxContentBrowserControlFilter);
|
|
6854
|
-
const styles$
|
|
6832
|
+
const styles$c = i$7`
|
|
6855
6833
|
:host {
|
|
6856
6834
|
display: contents;
|
|
6857
6835
|
}
|
|
6858
6836
|
`;
|
|
6859
|
-
var __defProp$
|
|
6860
|
-
var __getOwnPropDesc$
|
|
6861
|
-
var __decorateClass$
|
|
6862
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6837
|
+
var __defProp$d = Object.defineProperty;
|
|
6838
|
+
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
6839
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
6840
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
6863
6841
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
6864
6842
|
if (decorator = decorators[i4])
|
|
6865
6843
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6866
|
-
if (kind && result) __defProp$
|
|
6844
|
+
if (kind && result) __defProp$d(target, key, result);
|
|
6867
6845
|
return result;
|
|
6868
6846
|
};
|
|
6869
6847
|
let CxContentBrowserControlSort = class extends CortexElement {
|
|
@@ -7002,7 +6980,7 @@ let CxContentBrowserControlSort = class extends CortexElement {
|
|
|
7002
6980
|
`;
|
|
7003
6981
|
}
|
|
7004
6982
|
};
|
|
7005
|
-
CxContentBrowserControlSort.styles = [componentStyles, styles$
|
|
6983
|
+
CxContentBrowserControlSort.styles = [componentStyles, styles$c];
|
|
7006
6984
|
CxContentBrowserControlSort.dependencies = {
|
|
7007
6985
|
"cx-divider": CxDivider,
|
|
7008
6986
|
"cx-dropdown": CxDropdown,
|
|
@@ -7013,40 +6991,40 @@ CxContentBrowserControlSort.dependencies = {
|
|
|
7013
6991
|
"cx-spinner": CxSpinner,
|
|
7014
6992
|
"cx-tooltip": CxTooltip
|
|
7015
6993
|
};
|
|
7016
|
-
__decorateClass$
|
|
6994
|
+
__decorateClass$d([
|
|
7017
6995
|
n$6({ attribute: "sort-order-name", reflect: true, type: String })
|
|
7018
6996
|
], CxContentBrowserControlSort.prototype, "sortOrderName", 2);
|
|
7019
|
-
__decorateClass$
|
|
6997
|
+
__decorateClass$d([
|
|
7020
6998
|
n$6({ attribute: "sort-direction", reflect: true, type: String })
|
|
7021
6999
|
], CxContentBrowserControlSort.prototype, "sortDirection", 2);
|
|
7022
|
-
__decorateClass$
|
|
7000
|
+
__decorateClass$d([
|
|
7023
7001
|
n$6({ attribute: "sort-orders", reflect: false, type: Array })
|
|
7024
7002
|
], CxContentBrowserControlSort.prototype, "sortOrders", 2);
|
|
7025
|
-
__decorateClass$
|
|
7003
|
+
__decorateClass$d([
|
|
7026
7004
|
n$6({ attribute: "loading", reflect: true, type: Boolean })
|
|
7027
7005
|
], CxContentBrowserControlSort.prototype, "loading", 2);
|
|
7028
|
-
__decorateClass$
|
|
7006
|
+
__decorateClass$d([
|
|
7029
7007
|
n$6({ attribute: "is-mobile", reflect: false, type: Boolean })
|
|
7030
7008
|
], CxContentBrowserControlSort.prototype, "isMobile", 2);
|
|
7031
|
-
__decorateClass$
|
|
7009
|
+
__decorateClass$d([
|
|
7032
7010
|
n$6({ attribute: "newly-changed-option", reflect: false, type: Object })
|
|
7033
7011
|
], CxContentBrowserControlSort.prototype, "newlyChangedOption", 2);
|
|
7034
|
-
__decorateClass$
|
|
7012
|
+
__decorateClass$d([
|
|
7035
7013
|
r$6()
|
|
7036
7014
|
], CxContentBrowserControlSort.prototype, "mappedSortDirections", 2);
|
|
7037
|
-
__decorateClass$
|
|
7015
|
+
__decorateClass$d([
|
|
7038
7016
|
r$6()
|
|
7039
7017
|
], CxContentBrowserControlSort.prototype, "sortDirections", 2);
|
|
7040
|
-
__decorateClass$
|
|
7018
|
+
__decorateClass$d([
|
|
7041
7019
|
watch("sortOrderName"),
|
|
7042
7020
|
watch("sortDirection"),
|
|
7043
7021
|
watch("sortOrders", { waitUntilFirstUpdate: true }),
|
|
7044
7022
|
watch("sortDirections", { waitUntilFirstUpdate: true })
|
|
7045
7023
|
], CxContentBrowserControlSort.prototype, "handleSortDirectionsChange", 1);
|
|
7046
|
-
CxContentBrowserControlSort = __decorateClass$
|
|
7024
|
+
CxContentBrowserControlSort = __decorateClass$d([
|
|
7047
7025
|
customElement("cx-content-browser-control-sort")
|
|
7048
7026
|
], CxContentBrowserControlSort);
|
|
7049
|
-
const styles$
|
|
7027
|
+
const styles$b = i$7`
|
|
7050
7028
|
:host {
|
|
7051
7029
|
display: contents;
|
|
7052
7030
|
}
|
|
@@ -7056,14 +7034,14 @@ const styles$c = i$7`
|
|
|
7056
7034
|
--checked-icon-display: none;
|
|
7057
7035
|
}
|
|
7058
7036
|
`;
|
|
7059
|
-
var __defProp$
|
|
7060
|
-
var __getOwnPropDesc$
|
|
7061
|
-
var __decorateClass$
|
|
7062
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7037
|
+
var __defProp$c = Object.defineProperty;
|
|
7038
|
+
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
7039
|
+
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
7040
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
7063
7041
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
7064
7042
|
if (decorator = decorators[i4])
|
|
7065
7043
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7066
|
-
if (kind && result) __defProp$
|
|
7044
|
+
if (kind && result) __defProp$c(target, key, result);
|
|
7067
7045
|
return result;
|
|
7068
7046
|
};
|
|
7069
7047
|
let CxContentBrowserControlView = class extends CortexElement {
|
|
@@ -7074,10 +7052,6 @@ let CxContentBrowserControlView = class extends CortexElement {
|
|
|
7074
7052
|
this.views = [];
|
|
7075
7053
|
this.isSeeThrough = false;
|
|
7076
7054
|
this.isMobile = false;
|
|
7077
|
-
this.canUseTable = false;
|
|
7078
|
-
}
|
|
7079
|
-
get isTable() {
|
|
7080
|
-
return this.view === TABLE_VIEW;
|
|
7081
7055
|
}
|
|
7082
7056
|
runConnectedCallback() {
|
|
7083
7057
|
this.handleViewChange();
|
|
@@ -7097,21 +7071,6 @@ let CxContentBrowserControlView = class extends CortexElement {
|
|
|
7097
7071
|
}
|
|
7098
7072
|
});
|
|
7099
7073
|
}
|
|
7100
|
-
renderTableOption() {
|
|
7101
|
-
if (!this.canUseTable) {
|
|
7102
|
-
return A;
|
|
7103
|
-
}
|
|
7104
|
-
return b`
|
|
7105
|
-
<cx-menu-item
|
|
7106
|
-
value=${TABLE_VIEW}
|
|
7107
|
-
type="checkbox"
|
|
7108
|
-
?checked=${this.isTable}
|
|
7109
|
-
>
|
|
7110
|
-
<cx-line-clamp lines="1">${this.localize.term("table")}</cx-line-clamp>
|
|
7111
|
-
<cx-icon slot="prefix" name="table_rows"></cx-icon>
|
|
7112
|
-
</cx-menu-item>
|
|
7113
|
-
`;
|
|
7114
|
-
}
|
|
7115
7074
|
handleViewChange() {
|
|
7116
7075
|
this.selectedView = this.views.find((item) => item.value === this.view);
|
|
7117
7076
|
}
|
|
@@ -7129,7 +7088,7 @@ let CxContentBrowserControlView = class extends CortexElement {
|
|
|
7129
7088
|
<div slot="trigger">
|
|
7130
7089
|
<cx-tooltip content=${this.localize.term("view")}>
|
|
7131
7090
|
<cx-icon-button
|
|
7132
|
-
name
|
|
7091
|
+
name="dashboard"
|
|
7133
7092
|
label=${this.localize.term("view")}
|
|
7134
7093
|
outline
|
|
7135
7094
|
></cx-icon-button>
|
|
@@ -7156,7 +7115,6 @@ let CxContentBrowserControlView = class extends CortexElement {
|
|
|
7156
7115
|
)}
|
|
7157
7116
|
<cx-icon slot="prefix" name="grid_view"></cx-icon>
|
|
7158
7117
|
</cx-menu-item>
|
|
7159
|
-
${this.renderTableOption()}
|
|
7160
7118
|
<cx-divider></cx-divider>
|
|
7161
7119
|
<cx-menu-item value="see-thru" class="menu-item--switch">
|
|
7162
7120
|
<cx-space direction="horizontal" justify-content="space-between">
|
|
@@ -7190,7 +7148,7 @@ let CxContentBrowserControlView = class extends CortexElement {
|
|
|
7190
7148
|
() => b`
|
|
7191
7149
|
<cx-menu key="default-menu" no-uncheck>
|
|
7192
7150
|
<cx-menu-label>${this.localize.term("view")}</cx-menu-label>
|
|
7193
|
-
<cx-menu-item type="checkbox"
|
|
7151
|
+
<cx-menu-item type="checkbox">
|
|
7194
7152
|
${this.localize.term("grid")}
|
|
7195
7153
|
${n$5(
|
|
7196
7154
|
this.selectedView,
|
|
@@ -7219,7 +7177,6 @@ let CxContentBrowserControlView = class extends CortexElement {
|
|
|
7219
7177
|
</cx-menu>
|
|
7220
7178
|
<cx-icon slot="prefix" name="grid_view"></cx-icon>
|
|
7221
7179
|
</cx-menu-item>
|
|
7222
|
-
${this.renderTableOption()}
|
|
7223
7180
|
<cx-divider></cx-divider>
|
|
7224
7181
|
<cx-menu-item value="see-thru" class="menu-item--switch">
|
|
7225
7182
|
<cx-space direction="horizontal" justify-content="space-between">
|
|
@@ -7237,7 +7194,7 @@ let CxContentBrowserControlView = class extends CortexElement {
|
|
|
7237
7194
|
`;
|
|
7238
7195
|
}
|
|
7239
7196
|
};
|
|
7240
|
-
CxContentBrowserControlView.styles = [componentStyles, styles$
|
|
7197
|
+
CxContentBrowserControlView.styles = [componentStyles, styles$b];
|
|
7241
7198
|
CxContentBrowserControlView.dependencies = {
|
|
7242
7199
|
"cx-divider": CxDivider,
|
|
7243
7200
|
"cx-dropdown": CxDropdown,
|
|
@@ -7251,31 +7208,28 @@ CxContentBrowserControlView.dependencies = {
|
|
|
7251
7208
|
"cx-switch": CxSwitch,
|
|
7252
7209
|
"cx-tooltip": CxTooltip
|
|
7253
7210
|
};
|
|
7254
|
-
__decorateClass$
|
|
7211
|
+
__decorateClass$c([
|
|
7255
7212
|
n$6({ attribute: "view", reflect: true, type: String })
|
|
7256
7213
|
], CxContentBrowserControlView.prototype, "view", 2);
|
|
7257
|
-
__decorateClass$
|
|
7214
|
+
__decorateClass$c([
|
|
7258
7215
|
n$6({ attribute: "views", reflect: false, type: Array })
|
|
7259
7216
|
], CxContentBrowserControlView.prototype, "views", 2);
|
|
7260
|
-
__decorateClass$
|
|
7217
|
+
__decorateClass$c([
|
|
7261
7218
|
n$6({ attribute: "is-see-through", reflect: true, type: Boolean })
|
|
7262
7219
|
], CxContentBrowserControlView.prototype, "isSeeThrough", 2);
|
|
7263
|
-
__decorateClass$
|
|
7220
|
+
__decorateClass$c([
|
|
7264
7221
|
n$6({ attribute: "is-mobile", reflect: false, type: Boolean })
|
|
7265
7222
|
], CxContentBrowserControlView.prototype, "isMobile", 2);
|
|
7266
|
-
__decorateClass$
|
|
7267
|
-
n$6({ attribute: "can-use-table", reflect: true, type: Boolean })
|
|
7268
|
-
], CxContentBrowserControlView.prototype, "canUseTable", 2);
|
|
7269
|
-
__decorateClass$d([
|
|
7223
|
+
__decorateClass$c([
|
|
7270
7224
|
r$6()
|
|
7271
7225
|
], CxContentBrowserControlView.prototype, "selectedView", 2);
|
|
7272
|
-
__decorateClass$
|
|
7226
|
+
__decorateClass$c([
|
|
7273
7227
|
watch("view", { waitUntilFirstUpdate: true })
|
|
7274
7228
|
], CxContentBrowserControlView.prototype, "handleViewChange", 1);
|
|
7275
|
-
CxContentBrowserControlView = __decorateClass$
|
|
7229
|
+
CxContentBrowserControlView = __decorateClass$c([
|
|
7276
7230
|
customElement("cx-content-browser-control-view")
|
|
7277
7231
|
], CxContentBrowserControlView);
|
|
7278
|
-
const styles$
|
|
7232
|
+
const styles$a = i$7`
|
|
7279
7233
|
:host {
|
|
7280
7234
|
display: block;
|
|
7281
7235
|
}
|
|
@@ -7298,14 +7252,14 @@ const styles$b = i$7`
|
|
|
7298
7252
|
margin-left: auto;
|
|
7299
7253
|
}
|
|
7300
7254
|
`;
|
|
7301
|
-
var __defProp$
|
|
7302
|
-
var __getOwnPropDesc$
|
|
7303
|
-
var __decorateClass$
|
|
7304
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7255
|
+
var __defProp$b = Object.defineProperty;
|
|
7256
|
+
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
7257
|
+
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
7258
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
7305
7259
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
7306
7260
|
if (decorator = decorators[i4])
|
|
7307
7261
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7308
|
-
if (kind && result) __defProp$
|
|
7262
|
+
if (kind && result) __defProp$b(target, key, result);
|
|
7309
7263
|
return result;
|
|
7310
7264
|
};
|
|
7311
7265
|
let CxContentBrowserControlBar = class extends CortexElement {
|
|
@@ -7326,7 +7280,6 @@ let CxContentBrowserControlBar = class extends CortexElement {
|
|
|
7326
7280
|
this.loading = false;
|
|
7327
7281
|
this.searchText = "";
|
|
7328
7282
|
this.isMobile = false;
|
|
7329
|
-
this.canUseTable = false;
|
|
7330
7283
|
}
|
|
7331
7284
|
handleSearchChange(event) {
|
|
7332
7285
|
this.searchText = event.target.value;
|
|
@@ -7374,7 +7327,6 @@ let CxContentBrowserControlBar = class extends CortexElement {
|
|
|
7374
7327
|
<cx-content-browser-control-view
|
|
7375
7328
|
view=${this.view}
|
|
7376
7329
|
.views=${this.views}
|
|
7377
|
-
?can-use-table=${this.canUseTable}
|
|
7378
7330
|
?is-see-through=${this.isSeeThrough}
|
|
7379
7331
|
?is-mobile=${this.isMobile}
|
|
7380
7332
|
></cx-content-browser-control-view>
|
|
@@ -7391,7 +7343,7 @@ let CxContentBrowserControlBar = class extends CortexElement {
|
|
|
7391
7343
|
`;
|
|
7392
7344
|
}
|
|
7393
7345
|
};
|
|
7394
|
-
CxContentBrowserControlBar.styles = [componentStyles, styles$
|
|
7346
|
+
CxContentBrowserControlBar.styles = [componentStyles, styles$a];
|
|
7395
7347
|
CxContentBrowserControlBar.dependencies = {
|
|
7396
7348
|
"cx-avatar": CxAvatar,
|
|
7397
7349
|
"cx-content-browser-control-filter": CxContentBrowserControlFilter,
|
|
@@ -7403,55 +7355,52 @@ CxContentBrowserControlBar.dependencies = {
|
|
|
7403
7355
|
"cx-space": CxSpace,
|
|
7404
7356
|
"cx-typography": CxTypography
|
|
7405
7357
|
};
|
|
7406
|
-
__decorateClass$
|
|
7358
|
+
__decorateClass$b([
|
|
7407
7359
|
n$6({ attribute: "current-count", type: Number })
|
|
7408
7360
|
], CxContentBrowserControlBar.prototype, "currentCount", 2);
|
|
7409
|
-
__decorateClass$
|
|
7361
|
+
__decorateClass$b([
|
|
7410
7362
|
n$6({ attribute: "total-count", type: Number })
|
|
7411
7363
|
], CxContentBrowserControlBar.prototype, "totalCount", 2);
|
|
7412
|
-
__decorateClass$
|
|
7364
|
+
__decorateClass$b([
|
|
7413
7365
|
n$6({ attribute: "sort-order-name", reflect: true, type: String })
|
|
7414
7366
|
], CxContentBrowserControlBar.prototype, "sortOrderName", 2);
|
|
7415
|
-
__decorateClass$
|
|
7367
|
+
__decorateClass$b([
|
|
7416
7368
|
n$6({ attribute: "sort-direction", reflect: true, type: String })
|
|
7417
7369
|
], CxContentBrowserControlBar.prototype, "sortDirection", 2);
|
|
7418
|
-
__decorateClass$
|
|
7370
|
+
__decorateClass$b([
|
|
7419
7371
|
n$6({ attribute: "sort-orders", reflect: false, type: Array })
|
|
7420
7372
|
], CxContentBrowserControlBar.prototype, "sortOrders", 2);
|
|
7421
|
-
__decorateClass$
|
|
7373
|
+
__decorateClass$b([
|
|
7422
7374
|
n$6({ attribute: "view", reflect: true, type: String })
|
|
7423
7375
|
], CxContentBrowserControlBar.prototype, "view", 2);
|
|
7424
|
-
__decorateClass$
|
|
7376
|
+
__decorateClass$b([
|
|
7425
7377
|
n$6({ attribute: "views", reflect: false, type: Array })
|
|
7426
7378
|
], CxContentBrowserControlBar.prototype, "views", 2);
|
|
7427
|
-
__decorateClass$
|
|
7379
|
+
__decorateClass$b([
|
|
7428
7380
|
n$6({ attribute: "facets", reflect: false, type: Array })
|
|
7429
7381
|
], CxContentBrowserControlBar.prototype, "facets", 2);
|
|
7430
|
-
__decorateClass$
|
|
7382
|
+
__decorateClass$b([
|
|
7431
7383
|
n$6({ attribute: "available-facets", reflect: false, type: Array })
|
|
7432
7384
|
], CxContentBrowserControlBar.prototype, "availableFacets", 2);
|
|
7433
|
-
__decorateClass$
|
|
7385
|
+
__decorateClass$b([
|
|
7434
7386
|
n$6({ attribute: "selected-facets", reflect: false, type: Object })
|
|
7435
7387
|
], CxContentBrowserControlBar.prototype, "selectedFacets", 2);
|
|
7436
|
-
__decorateClass$
|
|
7388
|
+
__decorateClass$b([
|
|
7437
7389
|
n$6({ attribute: "is-see-through", reflect: true, type: Boolean })
|
|
7438
7390
|
], CxContentBrowserControlBar.prototype, "isSeeThrough", 2);
|
|
7439
|
-
__decorateClass$
|
|
7391
|
+
__decorateClass$b([
|
|
7440
7392
|
n$6({ attribute: "loading", reflect: true, type: Boolean })
|
|
7441
7393
|
], CxContentBrowserControlBar.prototype, "loading", 2);
|
|
7442
|
-
__decorateClass$
|
|
7394
|
+
__decorateClass$b([
|
|
7443
7395
|
n$6({ attribute: false, reflect: false, type: Object })
|
|
7444
7396
|
], CxContentBrowserControlBar.prototype, "newlyChangedOption", 2);
|
|
7445
|
-
__decorateClass$
|
|
7397
|
+
__decorateClass$b([
|
|
7446
7398
|
n$6({ attribute: "search-text", reflect: false, type: String })
|
|
7447
7399
|
], CxContentBrowserControlBar.prototype, "searchText", 2);
|
|
7448
|
-
__decorateClass$
|
|
7400
|
+
__decorateClass$b([
|
|
7449
7401
|
n$6({ attribute: "is-mobile", reflect: false, type: Boolean })
|
|
7450
7402
|
], CxContentBrowserControlBar.prototype, "isMobile", 2);
|
|
7451
|
-
__decorateClass$
|
|
7452
|
-
n$6({ attribute: "can-use-table", reflect: true, type: Boolean })
|
|
7453
|
-
], CxContentBrowserControlBar.prototype, "canUseTable", 2);
|
|
7454
|
-
CxContentBrowserControlBar = __decorateClass$c([
|
|
7403
|
+
CxContentBrowserControlBar = __decorateClass$b([
|
|
7455
7404
|
customElement("cx-content-browser-control-bar")
|
|
7456
7405
|
], CxContentBrowserControlBar);
|
|
7457
7406
|
/**
|
|
@@ -7758,14 +7707,14 @@ var Orientation = /* @__PURE__ */ ((Orientation2) => {
|
|
|
7758
7707
|
Orientation2["Vertical"] = "vertical";
|
|
7759
7708
|
return Orientation2;
|
|
7760
7709
|
})(Orientation || {});
|
|
7761
|
-
var __defProp$
|
|
7762
|
-
var __getOwnPropDesc$
|
|
7763
|
-
var __decorateClass$
|
|
7764
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7710
|
+
var __defProp$a = Object.defineProperty;
|
|
7711
|
+
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
7712
|
+
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
7713
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
7765
7714
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
7766
7715
|
if (decorator = decorators[i4])
|
|
7767
7716
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7768
|
-
if (kind && result) __defProp$
|
|
7717
|
+
if (kind && result) __defProp$a(target, key, result);
|
|
7769
7718
|
return result;
|
|
7770
7719
|
};
|
|
7771
7720
|
let CxContentBrowserAssetPreviewVideo = class extends CortexElement {
|
|
@@ -7881,40 +7830,40 @@ CxContentBrowserAssetPreviewVideo.dependencies = {
|
|
|
7881
7830
|
"cx-typography": CxTypography,
|
|
7882
7831
|
"cx-video": CxVideo
|
|
7883
7832
|
};
|
|
7884
|
-
__decorateClass$
|
|
7833
|
+
__decorateClass$a([
|
|
7885
7834
|
e$7("cx-video")
|
|
7886
7835
|
], CxContentBrowserAssetPreviewVideo.prototype, "videoElement", 2);
|
|
7887
|
-
__decorateClass$
|
|
7836
|
+
__decorateClass$a([
|
|
7888
7837
|
e$7("img")
|
|
7889
7838
|
], CxContentBrowserAssetPreviewVideo.prototype, "imageElement", 2);
|
|
7890
|
-
__decorateClass$
|
|
7839
|
+
__decorateClass$a([
|
|
7891
7840
|
n$6({ attribute: "src", reflect: true, type: String })
|
|
7892
7841
|
], CxContentBrowserAssetPreviewVideo.prototype, "src", 2);
|
|
7893
|
-
__decorateClass$
|
|
7842
|
+
__decorateClass$a([
|
|
7894
7843
|
n$6({ attribute: "alt", reflect: true, type: String })
|
|
7895
7844
|
], CxContentBrowserAssetPreviewVideo.prototype, "alt", 2);
|
|
7896
|
-
__decorateClass$
|
|
7845
|
+
__decorateClass$a([
|
|
7897
7846
|
n$6({ attribute: "thumbnail-only", reflect: true, type: Boolean })
|
|
7898
7847
|
], CxContentBrowserAssetPreviewVideo.prototype, "thumbnailOnly", 2);
|
|
7899
|
-
__decorateClass$
|
|
7848
|
+
__decorateClass$a([
|
|
7900
7849
|
n$6({ attribute: "thumbnail-src", reflect: true, type: String })
|
|
7901
7850
|
], CxContentBrowserAssetPreviewVideo.prototype, "thumbnailSrc", 2);
|
|
7902
|
-
__decorateClass$
|
|
7851
|
+
__decorateClass$a([
|
|
7903
7852
|
n$6({ reflect: true, type: Boolean })
|
|
7904
7853
|
], CxContentBrowserAssetPreviewVideo.prototype, "controls", 2);
|
|
7905
|
-
__decorateClass$
|
|
7854
|
+
__decorateClass$a([
|
|
7906
7855
|
n$6({ attribute: "loaded", reflect: true, type: Boolean })
|
|
7907
7856
|
], CxContentBrowserAssetPreviewVideo.prototype, "loaded", 2);
|
|
7908
|
-
__decorateClass$
|
|
7857
|
+
__decorateClass$a([
|
|
7909
7858
|
r$6()
|
|
7910
7859
|
], CxContentBrowserAssetPreviewVideo.prototype, "assetDirection", 2);
|
|
7911
|
-
__decorateClass$
|
|
7860
|
+
__decorateClass$a([
|
|
7912
7861
|
r$6()
|
|
7913
7862
|
], CxContentBrowserAssetPreviewVideo.prototype, "progress", 2);
|
|
7914
|
-
CxContentBrowserAssetPreviewVideo = __decorateClass$
|
|
7863
|
+
CxContentBrowserAssetPreviewVideo = __decorateClass$a([
|
|
7915
7864
|
customElement("cx-content-browser-asset-preview-video")
|
|
7916
7865
|
], CxContentBrowserAssetPreviewVideo);
|
|
7917
|
-
const styles$
|
|
7866
|
+
const styles$9 = i$7`
|
|
7918
7867
|
:host {
|
|
7919
7868
|
display: block;
|
|
7920
7869
|
position: relative;
|
|
@@ -8061,14 +8010,14 @@ const styles$a = i$7`
|
|
|
8061
8010
|
transition: none;
|
|
8062
8011
|
}
|
|
8063
8012
|
`;
|
|
8064
|
-
var __defProp$
|
|
8065
|
-
var __getOwnPropDesc$
|
|
8066
|
-
var __decorateClass$
|
|
8067
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8013
|
+
var __defProp$9 = Object.defineProperty;
|
|
8014
|
+
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
8015
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
8016
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
8068
8017
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
8069
8018
|
if (decorator = decorators[i4])
|
|
8070
8019
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8071
|
-
if (kind && result) __defProp$
|
|
8020
|
+
if (kind && result) __defProp$9(target, key, result);
|
|
8072
8021
|
return result;
|
|
8073
8022
|
};
|
|
8074
8023
|
const GIF_EXTENSION = ".gif";
|
|
@@ -8233,53 +8182,53 @@ let CxContentBrowserAssetPreview = class extends CortexElement {
|
|
|
8233
8182
|
`;
|
|
8234
8183
|
}
|
|
8235
8184
|
};
|
|
8236
|
-
CxContentBrowserAssetPreview.styles = [componentStyles, styles$
|
|
8185
|
+
CxContentBrowserAssetPreview.styles = [componentStyles, styles$9];
|
|
8237
8186
|
CxContentBrowserAssetPreview.dependencies = {
|
|
8238
8187
|
"cx-content-browser-asset-preview-video": CxContentBrowserAssetPreviewVideo,
|
|
8239
8188
|
"cx-icon": CxIcon,
|
|
8240
8189
|
"cx-skeleton": CxSkeleton,
|
|
8241
8190
|
"cx-typography": CxTypography
|
|
8242
8191
|
};
|
|
8243
|
-
__decorateClass$
|
|
8192
|
+
__decorateClass$9([
|
|
8244
8193
|
e$7("cx-content-browser-asset-preview-video")
|
|
8245
8194
|
], CxContentBrowserAssetPreview.prototype, "previewVideo", 2);
|
|
8246
|
-
__decorateClass$
|
|
8195
|
+
__decorateClass$9([
|
|
8247
8196
|
n$6({ attribute: "image-url", reflect: true, type: String })
|
|
8248
8197
|
], CxContentBrowserAssetPreview.prototype, "imageUrl", 2);
|
|
8249
|
-
__decorateClass$
|
|
8198
|
+
__decorateClass$9([
|
|
8250
8199
|
n$6({ attribute: "original-url", reflect: true, type: String })
|
|
8251
8200
|
], CxContentBrowserAssetPreview.prototype, "originalUrl", 2);
|
|
8252
|
-
__decorateClass$
|
|
8201
|
+
__decorateClass$9([
|
|
8253
8202
|
n$6({ attribute: "preview-url", reflect: true, type: String })
|
|
8254
8203
|
], CxContentBrowserAssetPreview.prototype, "previewUrl", 2);
|
|
8255
|
-
__decorateClass$
|
|
8204
|
+
__decorateClass$9([
|
|
8256
8205
|
n$6({ attribute: "alt", reflect: true, type: String })
|
|
8257
8206
|
], CxContentBrowserAssetPreview.prototype, "alt", 2);
|
|
8258
|
-
__decorateClass$
|
|
8207
|
+
__decorateClass$9([
|
|
8259
8208
|
n$6({ attribute: "doc-type", reflect: true, type: String })
|
|
8260
8209
|
], CxContentBrowserAssetPreview.prototype, "docType", 2);
|
|
8261
|
-
__decorateClass$
|
|
8210
|
+
__decorateClass$9([
|
|
8262
8211
|
n$6({ attribute: "extension", reflect: true, type: String })
|
|
8263
8212
|
], CxContentBrowserAssetPreview.prototype, "extension", 2);
|
|
8264
|
-
__decorateClass$
|
|
8213
|
+
__decorateClass$9([
|
|
8265
8214
|
n$6({ attribute: "in-cold-storage", reflect: true, type: Boolean })
|
|
8266
8215
|
], CxContentBrowserAssetPreview.prototype, "inColdStorage", 2);
|
|
8267
|
-
__decorateClass$
|
|
8216
|
+
__decorateClass$9([
|
|
8268
8217
|
n$6({ attribute: "thumbnail-only", reflect: true, type: Boolean })
|
|
8269
8218
|
], CxContentBrowserAssetPreview.prototype, "thumbnailOnly", 2);
|
|
8270
|
-
__decorateClass$
|
|
8219
|
+
__decorateClass$9([
|
|
8271
8220
|
n$6({ attribute: "controls", reflect: true, type: Boolean })
|
|
8272
8221
|
], CxContentBrowserAssetPreview.prototype, "controls", 2);
|
|
8273
|
-
__decorateClass$
|
|
8222
|
+
__decorateClass$9([
|
|
8274
8223
|
r$6()
|
|
8275
8224
|
], CxContentBrowserAssetPreview.prototype, "isError", 2);
|
|
8276
|
-
__decorateClass$
|
|
8225
|
+
__decorateClass$9([
|
|
8277
8226
|
r$6()
|
|
8278
8227
|
], CxContentBrowserAssetPreview.prototype, "loaded", 2);
|
|
8279
|
-
CxContentBrowserAssetPreview = __decorateClass$
|
|
8228
|
+
CxContentBrowserAssetPreview = __decorateClass$9([
|
|
8280
8229
|
customElement("cx-content-browser-asset-preview")
|
|
8281
8230
|
], CxContentBrowserAssetPreview);
|
|
8282
|
-
const styles$
|
|
8231
|
+
const styles$8 = i$7`
|
|
8283
8232
|
:host {
|
|
8284
8233
|
display: block;
|
|
8285
8234
|
padding: var(--cx-spacing-small);
|
|
@@ -8289,14 +8238,14 @@ const styles$9 = i$7`
|
|
|
8289
8238
|
width: 100%;
|
|
8290
8239
|
}
|
|
8291
8240
|
`;
|
|
8292
|
-
var __defProp$
|
|
8293
|
-
var __getOwnPropDesc$
|
|
8294
|
-
var __decorateClass$
|
|
8295
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8241
|
+
var __defProp$8 = Object.defineProperty;
|
|
8242
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
8243
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
8244
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
8296
8245
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
8297
8246
|
if (decorator = decorators[i4])
|
|
8298
8247
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8299
|
-
if (kind && result) __defProp$
|
|
8248
|
+
if (kind && result) __defProp$8(target, key, result);
|
|
8300
8249
|
return result;
|
|
8301
8250
|
};
|
|
8302
8251
|
let CxContentBrowserAssetTrackingParameters = class extends CortexElement {
|
|
@@ -8405,7 +8354,7 @@ let CxContentBrowserAssetTrackingParameters = class extends CortexElement {
|
|
|
8405
8354
|
`;
|
|
8406
8355
|
}
|
|
8407
8356
|
};
|
|
8408
|
-
CxContentBrowserAssetTrackingParameters.styles = [componentStyles, styles$
|
|
8357
|
+
CxContentBrowserAssetTrackingParameters.styles = [componentStyles, styles$8];
|
|
8409
8358
|
CxContentBrowserAssetTrackingParameters.dependencies = {
|
|
8410
8359
|
"cx-button": CxButton,
|
|
8411
8360
|
"cx-icon": CxIcon,
|
|
@@ -8414,13 +8363,13 @@ CxContentBrowserAssetTrackingParameters.dependencies = {
|
|
|
8414
8363
|
"cx-input-group": CxInputGroup,
|
|
8415
8364
|
"cx-space": CxSpace
|
|
8416
8365
|
};
|
|
8417
|
-
__decorateClass$
|
|
8366
|
+
__decorateClass$8([
|
|
8418
8367
|
n$6({ attribute: false, type: Array })
|
|
8419
8368
|
], CxContentBrowserAssetTrackingParameters.prototype, "values", 2);
|
|
8420
|
-
CxContentBrowserAssetTrackingParameters = __decorateClass$
|
|
8369
|
+
CxContentBrowserAssetTrackingParameters = __decorateClass$8([
|
|
8421
8370
|
customElement("cx-content-browser-asset-tracking-parameters")
|
|
8422
8371
|
], CxContentBrowserAssetTrackingParameters);
|
|
8423
|
-
const styles$
|
|
8372
|
+
const styles$7 = i$7`
|
|
8424
8373
|
:host {
|
|
8425
8374
|
display: block;
|
|
8426
8375
|
}
|
|
@@ -8529,14 +8478,14 @@ const styles$8 = i$7`
|
|
|
8529
8478
|
color: var(--cx-color-primary);
|
|
8530
8479
|
}
|
|
8531
8480
|
`;
|
|
8532
|
-
var __defProp$
|
|
8533
|
-
var __getOwnPropDesc$
|
|
8534
|
-
var __decorateClass$
|
|
8535
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8481
|
+
var __defProp$7 = Object.defineProperty;
|
|
8482
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
8483
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
8484
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
8536
8485
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
8537
8486
|
if (decorator = decorators[i4])
|
|
8538
8487
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8539
|
-
if (kind && result) __defProp$
|
|
8488
|
+
if (kind && result) __defProp$7(target, key, result);
|
|
8540
8489
|
return result;
|
|
8541
8490
|
};
|
|
8542
8491
|
const USE_REPRESENTATIVE_VALUE = "use-representative";
|
|
@@ -8786,7 +8735,7 @@ let CxContentBrowserAssetProxySelector = class extends CortexElement {
|
|
|
8786
8735
|
`;
|
|
8787
8736
|
}
|
|
8788
8737
|
};
|
|
8789
|
-
CxContentBrowserAssetProxySelector.styles = [componentStyles, styles$
|
|
8738
|
+
CxContentBrowserAssetProxySelector.styles = [componentStyles, styles$7];
|
|
8790
8739
|
CxContentBrowserAssetProxySelector.dependencies = {
|
|
8791
8740
|
"cx-content-browser-asset-tracking-parameters": CxContentBrowserAssetTrackingParameters,
|
|
8792
8741
|
"cx-icon": CxIcon,
|
|
@@ -8796,46 +8745,46 @@ CxContentBrowserAssetProxySelector.dependencies = {
|
|
|
8796
8745
|
"cx-switch": CxSwitch,
|
|
8797
8746
|
"cx-typography": CxTypography
|
|
8798
8747
|
};
|
|
8799
|
-
__decorateClass$
|
|
8748
|
+
__decorateClass$7([
|
|
8800
8749
|
n$6({ reflect: false, type: Array })
|
|
8801
8750
|
], CxContentBrowserAssetProxySelector.prototype, "items", 2);
|
|
8802
|
-
__decorateClass$
|
|
8751
|
+
__decorateClass$7([
|
|
8803
8752
|
n$6({ attribute: "can-custom-format", reflect: true, type: Boolean })
|
|
8804
8753
|
], CxContentBrowserAssetProxySelector.prototype, "canCustomFormat", 2);
|
|
8805
|
-
__decorateClass$
|
|
8754
|
+
__decorateClass$7([
|
|
8806
8755
|
n$6({ attribute: "can-use-representative", reflect: true, type: Boolean })
|
|
8807
8756
|
], CxContentBrowserAssetProxySelector.prototype, "canUseRepresentative", 2);
|
|
8808
|
-
__decorateClass$
|
|
8757
|
+
__decorateClass$7([
|
|
8809
8758
|
n$6({ attribute: "can-use-ats", reflect: true, type: Boolean })
|
|
8810
8759
|
], CxContentBrowserAssetProxySelector.prototype, "canUseATS", 2);
|
|
8811
|
-
__decorateClass$
|
|
8760
|
+
__decorateClass$7([
|
|
8812
8761
|
n$6({ attribute: "can-use-tracking", reflect: true, type: Boolean })
|
|
8813
8762
|
], CxContentBrowserAssetProxySelector.prototype, "canUseTracking", 2);
|
|
8814
|
-
__decorateClass$
|
|
8763
|
+
__decorateClass$7([
|
|
8815
8764
|
n$6({ attribute: "selected", reflect: true, type: String })
|
|
8816
8765
|
], CxContentBrowserAssetProxySelector.prototype, "selected", 2);
|
|
8817
|
-
__decorateClass$
|
|
8766
|
+
__decorateClass$7([
|
|
8818
8767
|
n$6({ attribute: "disabled-selected", reflect: true, type: Boolean })
|
|
8819
8768
|
], CxContentBrowserAssetProxySelector.prototype, "disabledSelected", 2);
|
|
8820
|
-
__decorateClass$
|
|
8769
|
+
__decorateClass$7([
|
|
8821
8770
|
n$6({ attribute: "custom-width", reflect: true, type: String })
|
|
8822
8771
|
], CxContentBrowserAssetProxySelector.prototype, "customWidth", 2);
|
|
8823
|
-
__decorateClass$
|
|
8772
|
+
__decorateClass$7([
|
|
8824
8773
|
n$6({ attribute: "custom-height", reflect: true, type: String })
|
|
8825
8774
|
], CxContentBrowserAssetProxySelector.prototype, "customHeight", 2);
|
|
8826
|
-
__decorateClass$
|
|
8775
|
+
__decorateClass$7([
|
|
8827
8776
|
n$6({ attribute: "custom-extension", reflect: true, type: String })
|
|
8828
8777
|
], CxContentBrowserAssetProxySelector.prototype, "customExtension", 2);
|
|
8829
|
-
__decorateClass$
|
|
8778
|
+
__decorateClass$7([
|
|
8830
8779
|
n$6({ attribute: "enabled-tracking", reflect: true, type: Boolean })
|
|
8831
8780
|
], CxContentBrowserAssetProxySelector.prototype, "enabledTracking", 2);
|
|
8832
|
-
__decorateClass$
|
|
8781
|
+
__decorateClass$7([
|
|
8833
8782
|
n$6({ attribute: "tracking-parameters", reflect: false, type: Array })
|
|
8834
8783
|
], CxContentBrowserAssetProxySelector.prototype, "trackingParameters", 2);
|
|
8835
|
-
CxContentBrowserAssetProxySelector = __decorateClass$
|
|
8784
|
+
CxContentBrowserAssetProxySelector = __decorateClass$7([
|
|
8836
8785
|
customElement("cx-content-browser-asset-proxy-selector")
|
|
8837
8786
|
], CxContentBrowserAssetProxySelector);
|
|
8838
|
-
const styles$
|
|
8787
|
+
const styles$6 = i$7`
|
|
8839
8788
|
:host {
|
|
8840
8789
|
display: block;
|
|
8841
8790
|
width: 100%;
|
|
@@ -8908,14 +8857,14 @@ const styles$7 = i$7`
|
|
|
8908
8857
|
font-size: var(--cx-font-size-3x-large);
|
|
8909
8858
|
}
|
|
8910
8859
|
`;
|
|
8911
|
-
var __defProp$
|
|
8912
|
-
var __getOwnPropDesc$
|
|
8913
|
-
var __decorateClass$
|
|
8914
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8860
|
+
var __defProp$6 = Object.defineProperty;
|
|
8861
|
+
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
8862
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
8863
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
8915
8864
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
8916
8865
|
if (decorator = decorators[i4])
|
|
8917
8866
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8918
|
-
if (kind && result) __defProp$
|
|
8867
|
+
if (kind && result) __defProp$6(target, key, result);
|
|
8919
8868
|
return result;
|
|
8920
8869
|
};
|
|
8921
8870
|
let CxContentBrowserAssetVersionHistory = class extends CortexElement {
|
|
@@ -8987,7 +8936,7 @@ let CxContentBrowserAssetVersionHistory = class extends CortexElement {
|
|
|
8987
8936
|
`;
|
|
8988
8937
|
}
|
|
8989
8938
|
};
|
|
8990
|
-
CxContentBrowserAssetVersionHistory.styles = [componentStyles, styles$
|
|
8939
|
+
CxContentBrowserAssetVersionHistory.styles = [componentStyles, styles$6];
|
|
8991
8940
|
CxContentBrowserAssetVersionHistory.dependencies = {
|
|
8992
8941
|
"cx-grid": CxGrid,
|
|
8993
8942
|
"cx-grid-item": CxGridItem,
|
|
@@ -8999,13 +8948,13 @@ CxContentBrowserAssetVersionHistory.dependencies = {
|
|
|
8999
8948
|
"cx-typography": CxTypography,
|
|
9000
8949
|
"cx-content-browser-asset-preview": CxContentBrowserAssetPreview
|
|
9001
8950
|
};
|
|
9002
|
-
__decorateClass$
|
|
8951
|
+
__decorateClass$6([
|
|
9003
8952
|
n$6({ reflect: false, type: Array })
|
|
9004
8953
|
], CxContentBrowserAssetVersionHistory.prototype, "versions", 2);
|
|
9005
|
-
__decorateClass$
|
|
8954
|
+
__decorateClass$6([
|
|
9006
8955
|
n$6({ reflect: true, type: Boolean })
|
|
9007
8956
|
], CxContentBrowserAssetVersionHistory.prototype, "loading", 2);
|
|
9008
|
-
CxContentBrowserAssetVersionHistory = __decorateClass$
|
|
8957
|
+
CxContentBrowserAssetVersionHistory = __decorateClass$6([
|
|
9009
8958
|
customElement("cx-content-browser-asset-version-history")
|
|
9010
8959
|
], CxContentBrowserAssetVersionHistory);
|
|
9011
8960
|
const dialogStyles = i$7`
|
|
@@ -9056,7 +9005,7 @@ const drawerStyles = i$7`
|
|
|
9056
9005
|
padding: var(--cx-spacing-medium);
|
|
9057
9006
|
}
|
|
9058
9007
|
`;
|
|
9059
|
-
const styles$
|
|
9008
|
+
const styles$5 = i$7`
|
|
9060
9009
|
:host {
|
|
9061
9010
|
display: block;
|
|
9062
9011
|
}
|
|
@@ -9096,14 +9045,14 @@ const styles$6 = i$7`
|
|
|
9096
9045
|
width: 100%;
|
|
9097
9046
|
}
|
|
9098
9047
|
`;
|
|
9099
|
-
var __defProp$
|
|
9100
|
-
var __getOwnPropDesc$
|
|
9101
|
-
var __decorateClass$
|
|
9102
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
9048
|
+
var __defProp$5 = Object.defineProperty;
|
|
9049
|
+
var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
|
|
9050
|
+
var __decorateClass$5 = (decorators, target, key, kind) => {
|
|
9051
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
|
|
9103
9052
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
9104
9053
|
if (decorator = decorators[i4])
|
|
9105
9054
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9106
|
-
if (kind && result) __defProp$
|
|
9055
|
+
if (kind && result) __defProp$5(target, key, result);
|
|
9107
9056
|
return result;
|
|
9108
9057
|
};
|
|
9109
9058
|
const DEFAULT_TRACKING_PARAMETERS = [{
|
|
@@ -9145,7 +9094,6 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
|
|
|
9145
9094
|
this.canPinAsset = false;
|
|
9146
9095
|
this.canTrack = false;
|
|
9147
9096
|
this.canUseProxies = false;
|
|
9148
|
-
this.autoSelectFormat = false;
|
|
9149
9097
|
this.simplePick = false;
|
|
9150
9098
|
this.canViewVersions = false;
|
|
9151
9099
|
this.variant = ContentBrowserFormatDialogVariant.Dialog;
|
|
@@ -9186,96 +9134,33 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
|
|
|
9186
9134
|
], "value") : [{ displayName: this.localize.term("automatic"), value: this.autoExtension }]).filter((item) => this.shouldAppendAutoExtension || item.value !== this.autoExtension);
|
|
9187
9135
|
return this.canCustomFormat && extensionList.some((item) => item.value === this.asset.extension);
|
|
9188
9136
|
}
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9137
|
+
handleSupportedExtensionsChange() {
|
|
9138
|
+
var _a2, _b2;
|
|
9139
|
+
this.filteredProxies = this.proxies.filter((item) => {
|
|
9140
|
+
var _a3, _b3, _c2;
|
|
9141
|
+
const assetExtension = (_c2 = (_b3 = (_a3 = this.asset) == null ? void 0 : _a3.extension) == null ? void 0 : _b3.replace(/^\./, "")) != null ? _c2 : "";
|
|
9193
9142
|
if (!item.extension && this.asset && assetExtension) {
|
|
9194
9143
|
return this.supportedExtensions.includes(assetExtension);
|
|
9195
9144
|
}
|
|
9196
9145
|
return true;
|
|
9197
9146
|
});
|
|
9198
|
-
}
|
|
9199
|
-
handleSupportedExtensionsChange() {
|
|
9200
|
-
var _a2, _b2;
|
|
9201
|
-
this.filteredProxies = this.filterProxies(this.proxies);
|
|
9202
9147
|
this.selectedProxy = (_b2 = (_a2 = this.filteredProxies[0]) == null ? void 0 : _a2.id) != null ? _b2 : "";
|
|
9203
9148
|
}
|
|
9204
|
-
/**
|
|
9205
|
-
* What `autoSelectFormat` resolves to for this asset: the proxy to insert with, or `undefined`
|
|
9206
|
-
* when the dialog should open as usual.
|
|
9207
|
-
*
|
|
9208
|
-
* `{ proxy: undefined }` is deliberate rather than a miss — with the picker switched off there is
|
|
9209
|
-
* no format to name and the original file is the only outcome, which is `handleProxyConfirm`'s
|
|
9210
|
-
* no-proxy branch. With the picker on a proxy must actually resolve: confirming none emits
|
|
9211
|
-
* nothing and would turn the click into a silent no-op, so both an empty proxy list and a format
|
|
9212
|
-
* name that matches nothing fall back to the dialog.
|
|
9213
|
-
*/
|
|
9214
|
-
resolveAutoSelection() {
|
|
9215
|
-
const requested = this.autoSelectFormat;
|
|
9216
|
-
if (!isAutoSelectFormatActive(requested)) {
|
|
9217
|
-
return void 0;
|
|
9218
|
-
}
|
|
9219
|
-
if (!this.canUseProxies) {
|
|
9220
|
-
return { proxy: void 0 };
|
|
9221
|
-
}
|
|
9222
|
-
if (requested === true) {
|
|
9223
|
-
const [first] = this.filteredProxies;
|
|
9224
|
-
return first ? { proxy: first } : void 0;
|
|
9225
|
-
}
|
|
9226
|
-
const wanted = String(requested).trim().toLowerCase();
|
|
9227
|
-
const match = this.filteredProxies.find((proxy) => {
|
|
9228
|
-
var _a2, _b2;
|
|
9229
|
-
return ((_a2 = proxy.proxyName) == null ? void 0 : _a2.toLowerCase()) === wanted || ((_b2 = proxy.proxyLabel) == null ? void 0 : _b2.toLowerCase()) === wanted;
|
|
9230
|
-
});
|
|
9231
|
-
return match ? { proxy: match } : void 0;
|
|
9232
|
-
}
|
|
9233
9149
|
open({
|
|
9234
9150
|
asset,
|
|
9235
9151
|
isFavorite,
|
|
9236
9152
|
isAssetPinned = false,
|
|
9237
9153
|
proxies
|
|
9238
9154
|
}) {
|
|
9239
|
-
var _a2, _b2;
|
|
9240
9155
|
this.asset = asset;
|
|
9241
9156
|
this.isFavorite = isFavorite;
|
|
9242
9157
|
this.isAssetPinned = isAssetPinned;
|
|
9243
9158
|
this.proxies = proxies;
|
|
9244
|
-
this.filteredProxies = this.filterProxies(this.proxies);
|
|
9245
|
-
this.selectedProxy = (_b2 = (_a2 = this.filteredProxies[0]) == null ? void 0 : _a2.id) != null ? _b2 : "";
|
|
9246
|
-
const autoSelection = this.disabledConfirm ? void 0 : this.resolveAutoSelection();
|
|
9247
|
-
if (autoSelection) {
|
|
9248
|
-
if (autoSelection.proxy) {
|
|
9249
|
-
this.selectedProxy = autoSelection.proxy.id;
|
|
9250
|
-
}
|
|
9251
|
-
if (!this.loadingConfirm) {
|
|
9252
|
-
this.handleProxyConfirm();
|
|
9253
|
-
}
|
|
9254
|
-
return;
|
|
9255
|
-
}
|
|
9256
|
-
this.loadingConfirm = false;
|
|
9257
9159
|
this.isOpen = true;
|
|
9258
9160
|
}
|
|
9259
9161
|
hide() {
|
|
9260
9162
|
this.handleClose();
|
|
9261
9163
|
}
|
|
9262
|
-
/**
|
|
9263
|
-
* Show a dialog that `open()` skipped through the auto-confirm shortcut. The asset, proxies and
|
|
9264
|
-
* resolved selection are still in place, so this lands the user on exactly the dialog the
|
|
9265
|
-
* shortcut spared them, with its confirm button live again to retry.
|
|
9266
|
-
*/
|
|
9267
|
-
revealAfterAutoConfirm() {
|
|
9268
|
-
if (!this.asset) {
|
|
9269
|
-
this.handleClose();
|
|
9270
|
-
return;
|
|
9271
|
-
}
|
|
9272
|
-
this.loadingConfirm = false;
|
|
9273
|
-
this.isOpen = true;
|
|
9274
|
-
}
|
|
9275
|
-
/** Whether the dialog is actually on screen — false when `open()` took the auto-confirm path. */
|
|
9276
|
-
get isDialogOpen() {
|
|
9277
|
-
return this.isOpen;
|
|
9278
|
-
}
|
|
9279
9164
|
setVersionHistory(versions) {
|
|
9280
9165
|
this.versions = versions;
|
|
9281
9166
|
this.loadingVersionHistory = false;
|
|
@@ -9759,7 +9644,7 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
|
|
|
9759
9644
|
<cx-button
|
|
9760
9645
|
class="content-browser-format__footer__button"
|
|
9761
9646
|
variant="primary"
|
|
9762
|
-
?loading=${this.
|
|
9647
|
+
?loading=${this.loadingProxies}
|
|
9763
9648
|
@click=${this.handleProxyConfirm}
|
|
9764
9649
|
>
|
|
9765
9650
|
<cx-icon slot="prefix" name="folder"></cx-icon>
|
|
@@ -9824,7 +9709,7 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
|
|
|
9824
9709
|
`;
|
|
9825
9710
|
}
|
|
9826
9711
|
handleRequestClose(event) {
|
|
9827
|
-
if (this.
|
|
9712
|
+
if (this.loadingFavorites || this.loadingPinAsset) {
|
|
9828
9713
|
event.preventDefault();
|
|
9829
9714
|
return;
|
|
9830
9715
|
}
|
|
@@ -9885,7 +9770,7 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
|
|
|
9885
9770
|
`;
|
|
9886
9771
|
}
|
|
9887
9772
|
};
|
|
9888
|
-
CxContentBrowserFormatDialog.styles = [componentStyles, styles$
|
|
9773
|
+
CxContentBrowserFormatDialog.styles = [componentStyles, styles$5];
|
|
9889
9774
|
CxContentBrowserFormatDialog.dependencies = {
|
|
9890
9775
|
"cx-asset-link-format": CxAssetLinkFormat,
|
|
9891
9776
|
"cx-cropper": CxCropper,
|
|
@@ -9901,16 +9786,16 @@ CxContentBrowserFormatDialog.dependencies = {
|
|
|
9901
9786
|
"cx-tooltip": CxTooltip,
|
|
9902
9787
|
"cx-typography": CxTypography
|
|
9903
9788
|
};
|
|
9904
|
-
__decorateClass$
|
|
9789
|
+
__decorateClass$5([
|
|
9905
9790
|
e$7("cx-asset-link-format")
|
|
9906
9791
|
], CxContentBrowserFormatDialog.prototype, "assetLinkFormat", 2);
|
|
9907
|
-
__decorateClass$
|
|
9792
|
+
__decorateClass$5([
|
|
9908
9793
|
n$6({ reflect: false, type: Object })
|
|
9909
9794
|
], CxContentBrowserFormatDialog.prototype, "boundary", 2);
|
|
9910
|
-
__decorateClass$
|
|
9795
|
+
__decorateClass$5([
|
|
9911
9796
|
n$6({ attribute: false, reflect: false, type: Object })
|
|
9912
9797
|
], CxContentBrowserFormatDialog.prototype, "availableExtensions", 2);
|
|
9913
|
-
__decorateClass$
|
|
9798
|
+
__decorateClass$5([
|
|
9914
9799
|
n$6({
|
|
9915
9800
|
attribute: "supported-extensions",
|
|
9916
9801
|
converter: {
|
|
@@ -9921,7 +9806,7 @@ __decorateClass$6([
|
|
|
9921
9806
|
type: Array
|
|
9922
9807
|
})
|
|
9923
9808
|
], CxContentBrowserFormatDialog.prototype, "supportedExtensions", 2);
|
|
9924
|
-
__decorateClass$
|
|
9809
|
+
__decorateClass$5([
|
|
9925
9810
|
n$6({
|
|
9926
9811
|
attribute: "supported-representative-subtypes",
|
|
9927
9812
|
converter: {
|
|
@@ -9932,116 +9817,113 @@ __decorateClass$6([
|
|
|
9932
9817
|
type: Array
|
|
9933
9818
|
})
|
|
9934
9819
|
], CxContentBrowserFormatDialog.prototype, "supportedRepresentativeSubtypes", 2);
|
|
9935
|
-
__decorateClass$
|
|
9820
|
+
__decorateClass$5([
|
|
9936
9821
|
n$6({ attribute: "auto-extension", reflect: false, type: String })
|
|
9937
9822
|
], CxContentBrowserFormatDialog.prototype, "autoExtension", 2);
|
|
9938
|
-
__decorateClass$
|
|
9823
|
+
__decorateClass$5([
|
|
9939
9824
|
n$6({ attribute: "cta-text", reflect: false, type: String })
|
|
9940
9825
|
], CxContentBrowserFormatDialog.prototype, "ctaText", 2);
|
|
9941
|
-
__decorateClass$
|
|
9826
|
+
__decorateClass$5([
|
|
9942
9827
|
n$6({ attribute: "cta-text-transform", reflect: false, type: String })
|
|
9943
9828
|
], CxContentBrowserFormatDialog.prototype, "ctaTextTransform", 2);
|
|
9944
|
-
__decorateClass$
|
|
9829
|
+
__decorateClass$5([
|
|
9945
9830
|
n$6({ attribute: "can-custom-format", reflect: false, type: Boolean })
|
|
9946
9831
|
], CxContentBrowserFormatDialog.prototype, "canCustomFormat", 2);
|
|
9947
|
-
__decorateClass$
|
|
9832
|
+
__decorateClass$5([
|
|
9948
9833
|
n$6({ attribute: "can-favorite", reflect: false, type: Boolean })
|
|
9949
9834
|
], CxContentBrowserFormatDialog.prototype, "canFavorite", 2);
|
|
9950
|
-
__decorateClass$
|
|
9835
|
+
__decorateClass$5([
|
|
9951
9836
|
n$6({ attribute: "can-pin-asset", reflect: false, type: Boolean })
|
|
9952
9837
|
], CxContentBrowserFormatDialog.prototype, "canPinAsset", 2);
|
|
9953
|
-
__decorateClass$
|
|
9838
|
+
__decorateClass$5([
|
|
9954
9839
|
n$6({ attribute: "can-track", reflect: false, type: Boolean })
|
|
9955
9840
|
], CxContentBrowserFormatDialog.prototype, "canTrack", 2);
|
|
9956
|
-
__decorateClass$
|
|
9841
|
+
__decorateClass$5([
|
|
9957
9842
|
n$6({ attribute: "can-use-proxies", reflect: false, type: Boolean })
|
|
9958
9843
|
], CxContentBrowserFormatDialog.prototype, "canUseProxies", 2);
|
|
9959
|
-
__decorateClass$
|
|
9960
|
-
n$6({ attribute: "auto-select-format", converter: autoSelectFormatConverter, reflect: false })
|
|
9961
|
-
], CxContentBrowserFormatDialog.prototype, "autoSelectFormat", 2);
|
|
9962
|
-
__decorateClass$6([
|
|
9844
|
+
__decorateClass$5([
|
|
9963
9845
|
n$6({ attribute: "simple-pick", reflect: false, type: Boolean })
|
|
9964
9846
|
], CxContentBrowserFormatDialog.prototype, "simplePick", 2);
|
|
9965
|
-
__decorateClass$
|
|
9847
|
+
__decorateClass$5([
|
|
9966
9848
|
n$6({ attribute: "can-view-versions", reflect: false, type: Boolean })
|
|
9967
9849
|
], CxContentBrowserFormatDialog.prototype, "canViewVersions", 2);
|
|
9968
|
-
__decorateClass$
|
|
9850
|
+
__decorateClass$5([
|
|
9969
9851
|
n$6({ reflect: true, type: String })
|
|
9970
9852
|
], CxContentBrowserFormatDialog.prototype, "variant", 2);
|
|
9971
|
-
__decorateClass$
|
|
9853
|
+
__decorateClass$5([
|
|
9972
9854
|
n$6({ attribute: "loading-favorites", reflect: true, type: Boolean })
|
|
9973
9855
|
], CxContentBrowserFormatDialog.prototype, "loadingFavorites", 2);
|
|
9974
|
-
__decorateClass$
|
|
9856
|
+
__decorateClass$5([
|
|
9975
9857
|
n$6({ attribute: "loading-pin-asset", reflect: true, type: Boolean })
|
|
9976
9858
|
], CxContentBrowserFormatDialog.prototype, "loadingPinAsset", 2);
|
|
9977
|
-
__decorateClass$
|
|
9859
|
+
__decorateClass$5([
|
|
9978
9860
|
n$6({ attribute: "loading-proxies", reflect: true, type: Boolean })
|
|
9979
9861
|
], CxContentBrowserFormatDialog.prototype, "loadingProxies", 2);
|
|
9980
|
-
__decorateClass$
|
|
9862
|
+
__decorateClass$5([
|
|
9981
9863
|
n$6({ attribute: "disabled-confirm", reflect: true, type: Boolean })
|
|
9982
9864
|
], CxContentBrowserFormatDialog.prototype, "disabledConfirm", 2);
|
|
9983
|
-
__decorateClass$
|
|
9865
|
+
__decorateClass$5([
|
|
9984
9866
|
n$6({ attribute: "token", type: String })
|
|
9985
9867
|
], CxContentBrowserFormatDialog.prototype, "token", 2);
|
|
9986
|
-
__decorateClass$
|
|
9868
|
+
__decorateClass$5([
|
|
9987
9869
|
n$6({ attribute: "base-url", type: String })
|
|
9988
9870
|
], CxContentBrowserFormatDialog.prototype, "baseUrl", 2);
|
|
9989
|
-
__decorateClass$
|
|
9871
|
+
__decorateClass$5([
|
|
9990
9872
|
r$6()
|
|
9991
9873
|
], CxContentBrowserFormatDialog.prototype, "asset", 2);
|
|
9992
|
-
__decorateClass$
|
|
9874
|
+
__decorateClass$5([
|
|
9993
9875
|
r$6()
|
|
9994
9876
|
], CxContentBrowserFormatDialog.prototype, "isOpen", 2);
|
|
9995
|
-
__decorateClass$
|
|
9877
|
+
__decorateClass$5([
|
|
9996
9878
|
r$6()
|
|
9997
9879
|
], CxContentBrowserFormatDialog.prototype, "isFavorite", 2);
|
|
9998
|
-
__decorateClass$
|
|
9880
|
+
__decorateClass$5([
|
|
9999
9881
|
r$6()
|
|
10000
9882
|
], CxContentBrowserFormatDialog.prototype, "isAssetPinned", 2);
|
|
10001
|
-
__decorateClass$
|
|
9883
|
+
__decorateClass$5([
|
|
10002
9884
|
r$6()
|
|
10003
9885
|
], CxContentBrowserFormatDialog.prototype, "proxies", 2);
|
|
10004
|
-
__decorateClass$
|
|
9886
|
+
__decorateClass$5([
|
|
10005
9887
|
r$6()
|
|
10006
9888
|
], CxContentBrowserFormatDialog.prototype, "showVersionHistory", 2);
|
|
10007
|
-
__decorateClass$
|
|
9889
|
+
__decorateClass$5([
|
|
10008
9890
|
r$6()
|
|
10009
9891
|
], CxContentBrowserFormatDialog.prototype, "showCustomFormat", 2);
|
|
10010
|
-
__decorateClass$
|
|
9892
|
+
__decorateClass$5([
|
|
10011
9893
|
r$6()
|
|
10012
9894
|
], CxContentBrowserFormatDialog.prototype, "loadingVersionHistory", 2);
|
|
10013
|
-
__decorateClass$
|
|
9895
|
+
__decorateClass$5([
|
|
10014
9896
|
r$6()
|
|
10015
9897
|
], CxContentBrowserFormatDialog.prototype, "versions", 2);
|
|
10016
|
-
__decorateClass$
|
|
9898
|
+
__decorateClass$5([
|
|
10017
9899
|
r$6()
|
|
10018
9900
|
], CxContentBrowserFormatDialog.prototype, "filteredProxies", 2);
|
|
10019
|
-
__decorateClass$
|
|
9901
|
+
__decorateClass$5([
|
|
10020
9902
|
r$6()
|
|
10021
9903
|
], CxContentBrowserFormatDialog.prototype, "selectedProxy", 2);
|
|
10022
|
-
__decorateClass$
|
|
9904
|
+
__decorateClass$5([
|
|
10023
9905
|
r$6()
|
|
10024
9906
|
], CxContentBrowserFormatDialog.prototype, "lastProxyBeforeCustomFormat", 2);
|
|
10025
|
-
__decorateClass$
|
|
9907
|
+
__decorateClass$5([
|
|
10026
9908
|
r$6()
|
|
10027
9909
|
], CxContentBrowserFormatDialog.prototype, "confirmedTransformations", 2);
|
|
10028
|
-
__decorateClass$
|
|
9910
|
+
__decorateClass$5([
|
|
10029
9911
|
r$6()
|
|
10030
9912
|
], CxContentBrowserFormatDialog.prototype, "confirmedFormat", 2);
|
|
10031
|
-
__decorateClass$
|
|
9913
|
+
__decorateClass$5([
|
|
10032
9914
|
r$6()
|
|
10033
9915
|
], CxContentBrowserFormatDialog.prototype, "loadingConfirm", 2);
|
|
10034
|
-
__decorateClass$
|
|
9916
|
+
__decorateClass$5([
|
|
10035
9917
|
r$6()
|
|
10036
9918
|
], CxContentBrowserFormatDialog.prototype, "enabledTracking", 2);
|
|
10037
|
-
__decorateClass$
|
|
9919
|
+
__decorateClass$5([
|
|
10038
9920
|
r$6()
|
|
10039
9921
|
], CxContentBrowserFormatDialog.prototype, "trackingParameters", 2);
|
|
10040
|
-
__decorateClass$
|
|
9922
|
+
__decorateClass$5([
|
|
10041
9923
|
watch("proxies", { waitUntilFirstUpdate: true }),
|
|
10042
9924
|
watch("supportedExtensions")
|
|
10043
9925
|
], CxContentBrowserFormatDialog.prototype, "handleSupportedExtensionsChange", 1);
|
|
10044
|
-
CxContentBrowserFormatDialog = __decorateClass$
|
|
9926
|
+
CxContentBrowserFormatDialog = __decorateClass$5([
|
|
10045
9927
|
customElement("cx-content-browser-format-dialog")
|
|
10046
9928
|
], CxContentBrowserFormatDialog);
|
|
10047
9929
|
function __decorate(decorators, target, key, desc) {
|
|
@@ -11840,7 +11722,7 @@ class GridLayout extends GridBaseLayout {
|
|
|
11840
11722
|
this._scrollSize = size;
|
|
11841
11723
|
}
|
|
11842
11724
|
}
|
|
11843
|
-
const styles$
|
|
11725
|
+
const styles$4 = i$7`
|
|
11844
11726
|
:host {
|
|
11845
11727
|
display: block;
|
|
11846
11728
|
}
|
|
@@ -11876,44 +11758,6 @@ const styles$5 = i$7`
|
|
|
11876
11758
|
line-height: var(--cx-line-height-small);
|
|
11877
11759
|
}
|
|
11878
11760
|
|
|
11879
|
-
/*
|
|
11880
|
-
* Affordance only, never a second control: pointer-events stay off so the click lands on the card
|
|
11881
|
-
* beneath and takes the one path a card click already takes, and the button is aria-hidden and
|
|
11882
|
-
* untabbable so the card is still the single thing announced and focused.
|
|
11883
|
-
*/
|
|
11884
|
-
.content-browser-asset-card__cta {
|
|
11885
|
-
/*
|
|
11886
|
-
* Positioned against the card's base, not the image slot, so the image box has to be described
|
|
11887
|
-
* here: inset by the card's own padding and given the same aspect-ratio ::part(image) carries,
|
|
11888
|
-
* which lands it exactly on the thumbnail. Without this it covers the title row too and centres
|
|
11889
|
-
* the button on the card rather than on the image. Keep the ratio in step with ::part(image).
|
|
11890
|
-
*/
|
|
11891
|
-
position: absolute;
|
|
11892
|
-
inset: var(--cx-spacing-x-small);
|
|
11893
|
-
bottom: auto;
|
|
11894
|
-
aspect-ratio: 246 / 180;
|
|
11895
|
-
z-index: 1;
|
|
11896
|
-
display: flex;
|
|
11897
|
-
align-items: center;
|
|
11898
|
-
justify-content: center;
|
|
11899
|
-
background-color: rgb(0 0 0 / 35%);
|
|
11900
|
-
opacity: 0;
|
|
11901
|
-
pointer-events: none;
|
|
11902
|
-
transition: opacity 150ms ease;
|
|
11903
|
-
}
|
|
11904
|
-
|
|
11905
|
-
.content-browser-asset-card:hover .content-browser-asset-card__cta,
|
|
11906
|
-
.content-browser-asset-card:focus-within .content-browser-asset-card__cta,
|
|
11907
|
-
.content-browser-asset-card__cta--busy {
|
|
11908
|
-
opacity: 1;
|
|
11909
|
-
}
|
|
11910
|
-
|
|
11911
|
-
@media (prefers-reduced-motion: reduce) {
|
|
11912
|
-
.content-browser-asset-card__cta {
|
|
11913
|
-
transition: none;
|
|
11914
|
-
}
|
|
11915
|
-
}
|
|
11916
|
-
|
|
11917
11761
|
.content-browser-asset-card__checkbox {
|
|
11918
11762
|
position: absolute;
|
|
11919
11763
|
top: 2px;
|
|
@@ -11926,24 +11770,19 @@ const styles$5 = i$7`
|
|
|
11926
11770
|
pointer-events: none;
|
|
11927
11771
|
}
|
|
11928
11772
|
`;
|
|
11929
|
-
var __defProp$
|
|
11930
|
-
var __getOwnPropDesc$
|
|
11931
|
-
var __decorateClass$
|
|
11932
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
11933
|
-
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
11934
|
-
if (decorator = decorators[i4])
|
|
11773
|
+
var __defProp$4 = Object.defineProperty;
|
|
11774
|
+
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
11775
|
+
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
11776
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
11777
|
+
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
11778
|
+
if (decorator = decorators[i4])
|
|
11935
11779
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11936
|
-
if (kind && result) __defProp$
|
|
11780
|
+
if (kind && result) __defProp$4(target, key, result);
|
|
11937
11781
|
return result;
|
|
11938
11782
|
};
|
|
11939
11783
|
let CxContentBrowserAssetCard = class extends CortexElement {
|
|
11940
11784
|
constructor() {
|
|
11941
11785
|
super(...arguments);
|
|
11942
|
-
this.localize = new LocalizeController(this);
|
|
11943
|
-
this.showCta = false;
|
|
11944
|
-
this.ctaText = "";
|
|
11945
|
-
this.ctaTextTransform = "capitalize";
|
|
11946
|
-
this.busy = false;
|
|
11947
11786
|
this.imageUrl = "";
|
|
11948
11787
|
this.originalUrl = "";
|
|
11949
11788
|
this.scrubUrl = "";
|
|
@@ -12011,26 +11850,6 @@ let CxContentBrowserAssetCard = class extends CortexElement {
|
|
|
12011
11850
|
?thumbnail-only=${this.view === "small"}
|
|
12012
11851
|
?in-cold-storage=${this.inColdStorage}
|
|
12013
11852
|
></cx-content-browser-asset-preview>
|
|
12014
|
-
${n$5(
|
|
12015
|
-
this.showCta && !this.inColdStorage,
|
|
12016
|
-
() => b`
|
|
12017
|
-
<div
|
|
12018
|
-
slot="image"
|
|
12019
|
-
class=${e$5({
|
|
12020
|
-
"content-browser-asset-card__cta": true,
|
|
12021
|
-
"content-browser-asset-card__cta--busy": this.busy
|
|
12022
|
-
})}
|
|
12023
|
-
aria-hidden="true"
|
|
12024
|
-
>
|
|
12025
|
-
<cx-button size="small" variant="primary" tabindex="-1" ?loading=${this.busy}>
|
|
12026
|
-
<span style=${o$1({ textTransform: this.ctaTextTransform })}>
|
|
12027
|
-
${this.ctaText || this.localize.term("insert")}
|
|
12028
|
-
</span>
|
|
12029
|
-
</cx-button>
|
|
12030
|
-
</div>
|
|
12031
|
-
`,
|
|
12032
|
-
() => A
|
|
12033
|
-
)}
|
|
12034
11853
|
<cx-space spacing="small" align-items="center" wrap="nowrap" class="content-browser-asset-card__info">
|
|
12035
11854
|
${n$5(
|
|
12036
11855
|
this.showTitle && this.assetName,
|
|
@@ -12141,10 +11960,9 @@ let CxContentBrowserAssetCard = class extends CortexElement {
|
|
|
12141
11960
|
`;
|
|
12142
11961
|
}
|
|
12143
11962
|
};
|
|
12144
|
-
CxContentBrowserAssetCard.styles = [componentStyles, styles$
|
|
11963
|
+
CxContentBrowserAssetCard.styles = [componentStyles, styles$4];
|
|
12145
11964
|
CxContentBrowserAssetCard.dependencies = {
|
|
12146
11965
|
"cx-array-line-clamp": CxArrayLineClamp,
|
|
12147
|
-
"cx-button": CxButton,
|
|
12148
11966
|
"cx-card": CxCard,
|
|
12149
11967
|
"cx-checkbox": CxCheckbox,
|
|
12150
11968
|
"cx-content-browser-asset-preview": CxContentBrowserAssetPreview,
|
|
@@ -12153,58 +11971,46 @@ CxContentBrowserAssetCard.dependencies = {
|
|
|
12153
11971
|
"cx-tag": CxTag,
|
|
12154
11972
|
"cx-typography": CxTypography
|
|
12155
11973
|
};
|
|
12156
|
-
__decorateClass$
|
|
12157
|
-
n$6({ attribute: "show-cta", reflect: true, type: Boolean })
|
|
12158
|
-
], CxContentBrowserAssetCard.prototype, "showCta", 2);
|
|
12159
|
-
__decorateClass$5([
|
|
12160
|
-
n$6({ attribute: "cta-text", reflect: false, type: String })
|
|
12161
|
-
], CxContentBrowserAssetCard.prototype, "ctaText", 2);
|
|
12162
|
-
__decorateClass$5([
|
|
12163
|
-
n$6({ attribute: "cta-text-transform", reflect: false, type: String })
|
|
12164
|
-
], CxContentBrowserAssetCard.prototype, "ctaTextTransform", 2);
|
|
12165
|
-
__decorateClass$5([
|
|
12166
|
-
n$6({ attribute: "busy", reflect: true, type: Boolean })
|
|
12167
|
-
], CxContentBrowserAssetCard.prototype, "busy", 2);
|
|
12168
|
-
__decorateClass$5([
|
|
11974
|
+
__decorateClass$4([
|
|
12169
11975
|
n$6({ attribute: "image-url", reflect: true, type: String })
|
|
12170
11976
|
], CxContentBrowserAssetCard.prototype, "imageUrl", 2);
|
|
12171
|
-
__decorateClass$
|
|
11977
|
+
__decorateClass$4([
|
|
12172
11978
|
n$6({ attribute: "original-url", reflect: true, type: String })
|
|
12173
11979
|
], CxContentBrowserAssetCard.prototype, "originalUrl", 2);
|
|
12174
|
-
__decorateClass$
|
|
11980
|
+
__decorateClass$4([
|
|
12175
11981
|
n$6({ attribute: "scrub-url", reflect: true, type: String })
|
|
12176
11982
|
], CxContentBrowserAssetCard.prototype, "scrubUrl", 2);
|
|
12177
|
-
__decorateClass$
|
|
11983
|
+
__decorateClass$4([
|
|
12178
11984
|
n$6({ attribute: "asset-id", reflect: true, type: String })
|
|
12179
11985
|
], CxContentBrowserAssetCard.prototype, "assetId", 2);
|
|
12180
|
-
__decorateClass$
|
|
11986
|
+
__decorateClass$4([
|
|
12181
11987
|
n$6({ attribute: "asset-name", reflect: true, type: String })
|
|
12182
11988
|
], CxContentBrowserAssetCard.prototype, "assetName", 2);
|
|
12183
|
-
__decorateClass$
|
|
11989
|
+
__decorateClass$4([
|
|
12184
11990
|
n$6({ attribute: "asset-width", reflect: true, type: String })
|
|
12185
11991
|
], CxContentBrowserAssetCard.prototype, "assetWidth", 2);
|
|
12186
|
-
__decorateClass$
|
|
11992
|
+
__decorateClass$4([
|
|
12187
11993
|
n$6({ attribute: "asset-height", reflect: true, type: String })
|
|
12188
11994
|
], CxContentBrowserAssetCard.prototype, "assetHeight", 2);
|
|
12189
|
-
__decorateClass$
|
|
11995
|
+
__decorateClass$4([
|
|
12190
11996
|
n$6({ attribute: "asset-size", reflect: true, type: String })
|
|
12191
11997
|
], CxContentBrowserAssetCard.prototype, "assetSize", 2);
|
|
12192
|
-
__decorateClass$
|
|
11998
|
+
__decorateClass$4([
|
|
12193
11999
|
n$6({ attribute: "extension", reflect: true, type: String })
|
|
12194
12000
|
], CxContentBrowserAssetCard.prototype, "extension", 2);
|
|
12195
|
-
__decorateClass$
|
|
12001
|
+
__decorateClass$4([
|
|
12196
12002
|
n$6({ attribute: "in-cold-storage", reflect: true, type: Boolean })
|
|
12197
12003
|
], CxContentBrowserAssetCard.prototype, "inColdStorage", 2);
|
|
12198
|
-
__decorateClass$
|
|
12004
|
+
__decorateClass$4([
|
|
12199
12005
|
n$6({ attribute: "doc-type", reflect: true, type: String })
|
|
12200
12006
|
], CxContentBrowserAssetCard.prototype, "docType", 2);
|
|
12201
|
-
__decorateClass$
|
|
12007
|
+
__decorateClass$4([
|
|
12202
12008
|
n$6({ attribute: "view", reflect: true, type: String })
|
|
12203
12009
|
], CxContentBrowserAssetCard.prototype, "view", 2);
|
|
12204
|
-
__decorateClass$
|
|
12010
|
+
__decorateClass$4([
|
|
12205
12011
|
n$6({ attribute: "selected", reflect: true, type: Boolean })
|
|
12206
12012
|
], CxContentBrowserAssetCard.prototype, "selected", 2);
|
|
12207
|
-
__decorateClass$
|
|
12013
|
+
__decorateClass$4([
|
|
12208
12014
|
n$6({
|
|
12209
12015
|
converter: {
|
|
12210
12016
|
fromAttribute: (value) => value ? value.split(",").map((tag) => tag.trim()).filter(Boolean) : [],
|
|
@@ -12219,25 +12025,25 @@ __decorateClass$5([
|
|
|
12219
12025
|
type: String
|
|
12220
12026
|
})
|
|
12221
12027
|
], CxContentBrowserAssetCard.prototype, "tags", 2);
|
|
12222
|
-
__decorateClass$
|
|
12028
|
+
__decorateClass$4([
|
|
12223
12029
|
n$6({ attribute: "show-tags", reflect: true, type: Boolean })
|
|
12224
12030
|
], CxContentBrowserAssetCard.prototype, "showTags", 2);
|
|
12225
|
-
__decorateClass$
|
|
12031
|
+
__decorateClass$4([
|
|
12226
12032
|
n$6({ attribute: "show-title", reflect: true, type: Boolean })
|
|
12227
12033
|
], CxContentBrowserAssetCard.prototype, "showTitle", 2);
|
|
12228
|
-
__decorateClass$
|
|
12034
|
+
__decorateClass$4([
|
|
12229
12035
|
n$6({ attribute: "show-size", reflect: true, type: Boolean })
|
|
12230
12036
|
], CxContentBrowserAssetCard.prototype, "showSize", 2);
|
|
12231
|
-
__decorateClass$
|
|
12037
|
+
__decorateClass$4([
|
|
12232
12038
|
n$6({ attribute: "show-dimensions", reflect: true, type: Boolean })
|
|
12233
12039
|
], CxContentBrowserAssetCard.prototype, "showDimensions", 2);
|
|
12234
|
-
__decorateClass$
|
|
12040
|
+
__decorateClass$4([
|
|
12235
12041
|
e$7("cx-content-browser-asset-preview")
|
|
12236
12042
|
], CxContentBrowserAssetCard.prototype, "preview", 2);
|
|
12237
|
-
CxContentBrowserAssetCard = __decorateClass$
|
|
12043
|
+
CxContentBrowserAssetCard = __decorateClass$4([
|
|
12238
12044
|
customElement("cx-content-browser-asset-card")
|
|
12239
12045
|
], CxContentBrowserAssetCard);
|
|
12240
|
-
const styles$
|
|
12046
|
+
const styles$3 = i$7`
|
|
12241
12047
|
:host {
|
|
12242
12048
|
display: flex;
|
|
12243
12049
|
align-items: center;
|
|
@@ -12262,14 +12068,14 @@ const styles$4 = i$7`
|
|
|
12262
12068
|
font-size: 96px;
|
|
12263
12069
|
}
|
|
12264
12070
|
`;
|
|
12265
|
-
var __defProp$
|
|
12266
|
-
var __getOwnPropDesc$
|
|
12267
|
-
var __decorateClass$
|
|
12268
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
12071
|
+
var __defProp$3 = Object.defineProperty;
|
|
12072
|
+
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
12073
|
+
var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
12074
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
|
|
12269
12075
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
12270
12076
|
if (decorator = decorators[i4])
|
|
12271
12077
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12272
|
-
if (kind && result) __defProp$
|
|
12078
|
+
if (kind && result) __defProp$3(target, key, result);
|
|
12273
12079
|
return result;
|
|
12274
12080
|
};
|
|
12275
12081
|
let CxContentBrowserNoResult = class extends CortexElement {
|
|
@@ -12287,40 +12093,36 @@ let CxContentBrowserNoResult = class extends CortexElement {
|
|
|
12287
12093
|
`;
|
|
12288
12094
|
}
|
|
12289
12095
|
};
|
|
12290
|
-
CxContentBrowserNoResult.styles = [componentStyles, styles$
|
|
12096
|
+
CxContentBrowserNoResult.styles = [componentStyles, styles$3];
|
|
12291
12097
|
CxContentBrowserNoResult.dependencies = {
|
|
12292
12098
|
"cx-icon": CxIcon
|
|
12293
12099
|
};
|
|
12294
|
-
__decorateClass$
|
|
12100
|
+
__decorateClass$3([
|
|
12295
12101
|
n$6({ attribute: "icon", type: String })
|
|
12296
12102
|
], CxContentBrowserNoResult.prototype, "icon", 2);
|
|
12297
|
-
__decorateClass$
|
|
12103
|
+
__decorateClass$3([
|
|
12298
12104
|
n$6({ attribute: "message", type: String })
|
|
12299
12105
|
], CxContentBrowserNoResult.prototype, "message", 2);
|
|
12300
|
-
CxContentBrowserNoResult = __decorateClass$
|
|
12106
|
+
CxContentBrowserNoResult = __decorateClass$3([
|
|
12301
12107
|
customElement("cx-content-browser-no-result")
|
|
12302
12108
|
], CxContentBrowserNoResult);
|
|
12303
12109
|
class ScrollAnchorController {
|
|
12304
12110
|
constructor(host, options) {
|
|
12305
12111
|
__privateAdd(this, _host);
|
|
12306
12112
|
__privateAdd(this, _getContainer);
|
|
12307
|
-
__privateAdd(this, _getContentOffset);
|
|
12308
12113
|
__privateAdd(this, _getItemIndexById);
|
|
12309
|
-
__privateAdd(this, _getLayoutSource);
|
|
12310
12114
|
__privateAdd(this, _itemSelector);
|
|
12311
12115
|
__privateAdd(this, _anchor, null);
|
|
12312
12116
|
__privateAdd(this, _columnCount, 0);
|
|
12313
12117
|
__privateAdd(this, _itemHeight, 0);
|
|
12314
12118
|
__privateAdd(this, _pendingRestoreFrames, []);
|
|
12315
12119
|
__privateAdd(this, _restoreSequence, 0);
|
|
12316
|
-
var _a2
|
|
12120
|
+
var _a2;
|
|
12317
12121
|
__privateSet(this, _host, host);
|
|
12318
12122
|
__privateSet(this, _getContainer, options.getContainer);
|
|
12319
|
-
__privateSet(this, _getContentOffset, (_a2 = options.getContentOffset) != null ? _a2 : (() => 0));
|
|
12320
12123
|
__privateSet(this, _getItemIndexById, options.getItemIndexById);
|
|
12321
|
-
__privateSet(this, _getLayoutSource, (_b2 = options.getLayoutSource) != null ? _b2 : options.getContainer);
|
|
12322
12124
|
__privateSet(this, _itemSelector, options.itemSelector);
|
|
12323
|
-
(
|
|
12125
|
+
(_a2 = host.addController) == null ? void 0 : _a2.call(host, this);
|
|
12324
12126
|
}
|
|
12325
12127
|
capture(container = __privateGet(this, _getContainer).call(this)) {
|
|
12326
12128
|
if (!container || typeof container.querySelectorAll !== "function") {
|
|
@@ -12330,11 +12132,10 @@ class ScrollAnchorController {
|
|
|
12330
12132
|
container.querySelectorAll(__privateGet(this, _itemSelector))
|
|
12331
12133
|
);
|
|
12332
12134
|
const containerTop = container.getBoundingClientRect().top;
|
|
12333
|
-
const contentTop = containerTop + __privateGet(this, _getContentOffset).call(this);
|
|
12334
12135
|
for (const el of children) {
|
|
12335
12136
|
const rect = el.getBoundingClientRect();
|
|
12336
12137
|
const id = el.assetId || el.dataset.id;
|
|
12337
|
-
if (rect.bottom >
|
|
12138
|
+
if (rect.bottom > containerTop && id) {
|
|
12338
12139
|
__privateSet(this, _anchor, {
|
|
12339
12140
|
id,
|
|
12340
12141
|
offset: rect.top - containerTop
|
|
@@ -12354,8 +12155,8 @@ class ScrollAnchorController {
|
|
|
12354
12155
|
this.cancelPendingRestore();
|
|
12355
12156
|
const sequence = ++__privateWrapper(this, _restoreSequence)._;
|
|
12356
12157
|
void __privateGet(this, _host).updateComplete.then(() => __async(this, null, function* () {
|
|
12357
|
-
var _a2
|
|
12358
|
-
yield (
|
|
12158
|
+
var _a2;
|
|
12159
|
+
yield (_a2 = __privateGet(this, _getContainer).call(this)) == null ? void 0 : _a2.layoutComplete;
|
|
12359
12160
|
if (sequence !== __privateGet(this, _restoreSequence)) {
|
|
12360
12161
|
return;
|
|
12361
12162
|
}
|
|
@@ -12403,10 +12204,7 @@ class ScrollAnchorController {
|
|
|
12403
12204
|
return void 0;
|
|
12404
12205
|
}
|
|
12405
12206
|
const rowIndex = Math.floor(assetIndex / __privateGet(this, _columnCount));
|
|
12406
|
-
return Math.max(
|
|
12407
|
-
0,
|
|
12408
|
-
__privateGet(this, _getContentOffset).call(this) + rowIndex * __privateGet(this, _itemHeight) - __privateGet(this, _anchor).offset
|
|
12409
|
-
);
|
|
12207
|
+
return Math.max(0, rowIndex * __privateGet(this, _itemHeight) - __privateGet(this, _anchor).offset);
|
|
12410
12208
|
}
|
|
12411
12209
|
hostDisconnected() {
|
|
12412
12210
|
this.cancelPendingRestore();
|
|
@@ -12428,16 +12226,14 @@ class ScrollAnchorController {
|
|
|
12428
12226
|
}
|
|
12429
12227
|
_host = new WeakMap();
|
|
12430
12228
|
_getContainer = new WeakMap();
|
|
12431
|
-
_getContentOffset = new WeakMap();
|
|
12432
12229
|
_getItemIndexById = new WeakMap();
|
|
12433
|
-
_getLayoutSource = new WeakMap();
|
|
12434
12230
|
_itemSelector = new WeakMap();
|
|
12435
12231
|
_anchor = new WeakMap();
|
|
12436
12232
|
_columnCount = new WeakMap();
|
|
12437
12233
|
_itemHeight = new WeakMap();
|
|
12438
12234
|
_pendingRestoreFrames = new WeakMap();
|
|
12439
12235
|
_restoreSequence = new WeakMap();
|
|
12440
|
-
const styles$
|
|
12236
|
+
const styles$2 = i$7`
|
|
12441
12237
|
:host {
|
|
12442
12238
|
display: block;
|
|
12443
12239
|
flex: 1;
|
|
@@ -12458,24 +12254,24 @@ const styles$3 = i$7`
|
|
|
12458
12254
|
--height: 4px;
|
|
12459
12255
|
}
|
|
12460
12256
|
`;
|
|
12461
|
-
var __defProp$
|
|
12462
|
-
var __getOwnPropDesc$
|
|
12463
|
-
var
|
|
12257
|
+
var __defProp$2 = Object.defineProperty;
|
|
12258
|
+
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
12259
|
+
var __typeError2 = (msg) => {
|
|
12464
12260
|
throw TypeError(msg);
|
|
12465
12261
|
};
|
|
12466
|
-
var __decorateClass$
|
|
12467
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
12262
|
+
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
12263
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
|
|
12468
12264
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
12469
12265
|
if (decorator = decorators[i4])
|
|
12470
12266
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12471
|
-
if (kind && result) __defProp$
|
|
12267
|
+
if (kind && result) __defProp$2(target, key, result);
|
|
12472
12268
|
return result;
|
|
12473
12269
|
};
|
|
12474
|
-
var
|
|
12475
|
-
var
|
|
12476
|
-
var
|
|
12477
|
-
var
|
|
12478
|
-
var _gutter, _lastHeight
|
|
12270
|
+
var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
|
|
12271
|
+
var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
12272
|
+
var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
12273
|
+
var __privateSet2 = (obj, member, value, setter) => (__accessCheck2(obj, member, "write to private field"), member.set(obj, value), value);
|
|
12274
|
+
var _gutter, _lastHeight, _lastWidth;
|
|
12479
12275
|
let CxContentBrowserGrid = class extends CortexElement {
|
|
12480
12276
|
constructor() {
|
|
12481
12277
|
super();
|
|
@@ -12489,16 +12285,12 @@ let CxContentBrowserGrid = class extends CortexElement {
|
|
|
12489
12285
|
this.showSize = true;
|
|
12490
12286
|
this.showDimensions = true;
|
|
12491
12287
|
this.showTags = false;
|
|
12492
|
-
this.showCta = false;
|
|
12493
|
-
this.ctaText = "";
|
|
12494
|
-
this.ctaTextTransform = "capitalize";
|
|
12495
|
-
this.busyAssetId = void 0;
|
|
12496
12288
|
this.selectedAssetId = void 0;
|
|
12497
12289
|
this.assetMap = /* @__PURE__ */ new Map();
|
|
12498
12290
|
this.columnWidth = 0;
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12291
|
+
__privateAdd2(this, _gutter, 8);
|
|
12292
|
+
__privateAdd2(this, _lastHeight, 0);
|
|
12293
|
+
__privateAdd2(this, _lastWidth, 0);
|
|
12502
12294
|
this.scrollAnchorController = new ScrollAnchorController(this, {
|
|
12503
12295
|
getContainer: () => this.virtualizerEl,
|
|
12504
12296
|
getItemIndexById: (id) => this.assets.findIndex((asset) => asset.id === id),
|
|
@@ -12511,7 +12303,7 @@ let CxContentBrowserGrid = class extends CortexElement {
|
|
|
12511
12303
|
}
|
|
12512
12304
|
handleViewChange() {
|
|
12513
12305
|
this.scrollAnchorController.capture();
|
|
12514
|
-
this.calculatePageSize(
|
|
12306
|
+
this.calculatePageSize(__privateGet2(this, _lastWidth), __privateGet2(this, _lastHeight), true);
|
|
12515
12307
|
}
|
|
12516
12308
|
handleAssetsChange() {
|
|
12517
12309
|
this.assetMap.clear();
|
|
@@ -12529,17 +12321,17 @@ let CxContentBrowserGrid = class extends CortexElement {
|
|
|
12529
12321
|
this.debouncedCalculatePageSize(width, height);
|
|
12530
12322
|
}
|
|
12531
12323
|
calculatePageSize(width, height, force = false) {
|
|
12532
|
-
const lastHeight =
|
|
12533
|
-
const lastWidth =
|
|
12324
|
+
const lastHeight = __privateGet2(this, _lastHeight);
|
|
12325
|
+
const lastWidth = __privateGet2(this, _lastWidth);
|
|
12534
12326
|
if (!force && Math.abs(lastHeight - height) < 10 && Math.abs(lastWidth - width) < 10) {
|
|
12535
12327
|
return;
|
|
12536
12328
|
}
|
|
12537
|
-
|
|
12538
|
-
|
|
12329
|
+
__privateSet2(this, _lastHeight, height);
|
|
12330
|
+
__privateSet2(this, _lastWidth, width);
|
|
12539
12331
|
const { columnCount, rowCount } = this.calculateColumnCount(width, height);
|
|
12540
12332
|
this.scrollAnchorController.setLayoutMetrics({
|
|
12541
12333
|
columnCount,
|
|
12542
|
-
itemHeight: Math.max(this.columnWidth, 150) +
|
|
12334
|
+
itemHeight: Math.max(this.columnWidth, 150) + __privateGet2(this, _gutter)
|
|
12543
12335
|
});
|
|
12544
12336
|
this.emit("cx-content-browser-grid-resize", {
|
|
12545
12337
|
detail: {
|
|
@@ -12559,12 +12351,12 @@ let CxContentBrowserGrid = class extends CortexElement {
|
|
|
12559
12351
|
}
|
|
12560
12352
|
const effectiveWidth = ((_a2 = this.virtualizerEl) == null ? void 0 : _a2.clientWidth) || width;
|
|
12561
12353
|
const breakPoint = ((_b2 = ASSET_SIZE[this.view]) == null ? void 0 : _b2.minWidth) || ASSET_SIZE[GridView.Large].minWidth;
|
|
12562
|
-
const columnCount = Math.max(1, Math.floor((effectiveWidth +
|
|
12354
|
+
const columnCount = Math.max(1, Math.floor((effectiveWidth + __privateGet2(this, _gutter)) / (breakPoint + __privateGet2(this, _gutter))));
|
|
12563
12355
|
let rowCount = 0;
|
|
12564
12356
|
if (height) {
|
|
12565
|
-
rowCount = Math.ceil(height / (breakPoint +
|
|
12357
|
+
rowCount = Math.ceil(height / (breakPoint + __privateGet2(this, _gutter)));
|
|
12566
12358
|
}
|
|
12567
|
-
const newColumnWidth = Math.floor((effectiveWidth -
|
|
12359
|
+
const newColumnWidth = Math.floor((effectiveWidth - __privateGet2(this, _gutter) * (columnCount + 1)) / columnCount);
|
|
12568
12360
|
if (newColumnWidth !== this.columnWidth) {
|
|
12569
12361
|
this.columnWidth = newColumnWidth;
|
|
12570
12362
|
}
|
|
@@ -12608,10 +12400,6 @@ let CxContentBrowserGrid = class extends CortexElement {
|
|
|
12608
12400
|
?show-size=${this.showSize}
|
|
12609
12401
|
?show-dimensions=${this.showDimensions}
|
|
12610
12402
|
?show-tags=${this.showTags}
|
|
12611
|
-
?show-cta=${this.showCta}
|
|
12612
|
-
?busy=${asset.id === this.busyAssetId}
|
|
12613
|
-
cta-text=${this.ctaText}
|
|
12614
|
-
cta-text-transform=${this.ctaTextTransform}
|
|
12615
12403
|
?in-cold-storage=${asset.inColdStorage}
|
|
12616
12404
|
@click=${this.handleClick}
|
|
12617
12405
|
></cx-content-browser-asset-card>
|
|
@@ -12635,7 +12423,7 @@ let CxContentBrowserGrid = class extends CortexElement {
|
|
|
12635
12423
|
class="content-browser-grid-loading"
|
|
12636
12424
|
style=${o$1({
|
|
12637
12425
|
opacity: this.loading ? 1 : 0,
|
|
12638
|
-
padding: `0 ${
|
|
12426
|
+
padding: `0 ${__privateGet2(this, _gutter) * 2}px ${__privateGet2(this, _gutter)}px`
|
|
12639
12427
|
})}
|
|
12640
12428
|
>
|
|
12641
12429
|
<cx-progress-bar indeterminate></cx-progress-bar>
|
|
@@ -12659,7 +12447,7 @@ let CxContentBrowserGrid = class extends CortexElement {
|
|
|
12659
12447
|
"overflow-x": "hidden"
|
|
12660
12448
|
})}
|
|
12661
12449
|
.layout=${grid({
|
|
12662
|
-
gap: `${
|
|
12450
|
+
gap: `${__privateGet2(this, _gutter)}px`,
|
|
12663
12451
|
itemSize: {
|
|
12664
12452
|
height: `${Math.max(this.columnWidth, 150)}px`,
|
|
12665
12453
|
width: `${this.columnWidth}px`
|
|
@@ -12678,79 +12466,67 @@ let CxContentBrowserGrid = class extends CortexElement {
|
|
|
12678
12466
|
}
|
|
12679
12467
|
};
|
|
12680
12468
|
_gutter = /* @__PURE__ */ new WeakMap();
|
|
12681
|
-
_lastHeight
|
|
12469
|
+
_lastHeight = /* @__PURE__ */ new WeakMap();
|
|
12682
12470
|
_lastWidth = /* @__PURE__ */ new WeakMap();
|
|
12683
|
-
CxContentBrowserGrid.styles = [componentStyles, styles$
|
|
12471
|
+
CxContentBrowserGrid.styles = [componentStyles, styles$2];
|
|
12684
12472
|
CxContentBrowserGrid.dependencies = {
|
|
12685
12473
|
"cx-content-browser-asset-card": CxContentBrowserAssetCard,
|
|
12686
12474
|
"cx-content-browser-no-result": CxContentBrowserNoResult,
|
|
12687
12475
|
"cx-progress-bar": CxProgressBar,
|
|
12688
12476
|
"cx-resize-observer": CxResizeObserver
|
|
12689
12477
|
};
|
|
12690
|
-
__decorateClass$
|
|
12478
|
+
__decorateClass$2([
|
|
12691
12479
|
e$7(".content-browser-grid")
|
|
12692
12480
|
], CxContentBrowserGrid.prototype, "containerEl", 2);
|
|
12693
|
-
__decorateClass$
|
|
12481
|
+
__decorateClass$2([
|
|
12694
12482
|
e$7("lit-virtualizer")
|
|
12695
12483
|
], CxContentBrowserGrid.prototype, "virtualizerEl", 2);
|
|
12696
|
-
__decorateClass$
|
|
12484
|
+
__decorateClass$2([
|
|
12697
12485
|
n$6({ attribute: "assets", reflect: false, type: Array })
|
|
12698
12486
|
], CxContentBrowserGrid.prototype, "assets", 2);
|
|
12699
|
-
__decorateClass$
|
|
12487
|
+
__decorateClass$2([
|
|
12700
12488
|
n$6({ attribute: "empty", reflect: true, type: Boolean })
|
|
12701
12489
|
], CxContentBrowserGrid.prototype, "empty", 2);
|
|
12702
|
-
__decorateClass$
|
|
12490
|
+
__decorateClass$2([
|
|
12703
12491
|
n$6({ attribute: "view", reflect: true, type: String })
|
|
12704
12492
|
], CxContentBrowserGrid.prototype, "view", 2);
|
|
12705
|
-
__decorateClass$
|
|
12493
|
+
__decorateClass$2([
|
|
12706
12494
|
n$6({ attribute: "has-more", reflect: true, type: Boolean })
|
|
12707
12495
|
], CxContentBrowserGrid.prototype, "hasMore", 2);
|
|
12708
|
-
__decorateClass$
|
|
12496
|
+
__decorateClass$2([
|
|
12709
12497
|
n$6({ attribute: "loading", reflect: true, type: Boolean })
|
|
12710
12498
|
], CxContentBrowserGrid.prototype, "loading", 2);
|
|
12711
|
-
__decorateClass$
|
|
12499
|
+
__decorateClass$2([
|
|
12712
12500
|
n$6({ attribute: "show-title", reflect: true, type: Boolean })
|
|
12713
12501
|
], CxContentBrowserGrid.prototype, "showTitle", 2);
|
|
12714
|
-
__decorateClass$
|
|
12502
|
+
__decorateClass$2([
|
|
12715
12503
|
n$6({ attribute: "show-size", reflect: true, type: Boolean })
|
|
12716
12504
|
], CxContentBrowserGrid.prototype, "showSize", 2);
|
|
12717
|
-
__decorateClass$
|
|
12505
|
+
__decorateClass$2([
|
|
12718
12506
|
n$6({ attribute: "show-dimensions", reflect: true, type: Boolean })
|
|
12719
12507
|
], CxContentBrowserGrid.prototype, "showDimensions", 2);
|
|
12720
|
-
__decorateClass$
|
|
12508
|
+
__decorateClass$2([
|
|
12721
12509
|
n$6({ attribute: "show-tags", reflect: true, type: Boolean })
|
|
12722
12510
|
], CxContentBrowserGrid.prototype, "showTags", 2);
|
|
12723
|
-
__decorateClass$
|
|
12724
|
-
n$6({ attribute: "show-cta", reflect: true, type: Boolean })
|
|
12725
|
-
], CxContentBrowserGrid.prototype, "showCta", 2);
|
|
12726
|
-
__decorateClass$3([
|
|
12727
|
-
n$6({ attribute: "cta-text", reflect: false, type: String })
|
|
12728
|
-
], CxContentBrowserGrid.prototype, "ctaText", 2);
|
|
12729
|
-
__decorateClass$3([
|
|
12730
|
-
n$6({ attribute: "cta-text-transform", reflect: false, type: String })
|
|
12731
|
-
], CxContentBrowserGrid.prototype, "ctaTextTransform", 2);
|
|
12732
|
-
__decorateClass$3([
|
|
12733
|
-
n$6({ attribute: false })
|
|
12734
|
-
], CxContentBrowserGrid.prototype, "busyAssetId", 2);
|
|
12735
|
-
__decorateClass$3([
|
|
12511
|
+
__decorateClass$2([
|
|
12736
12512
|
n$6({ attribute: "selected-asset-id", reflect: true, type: String })
|
|
12737
12513
|
], CxContentBrowserGrid.prototype, "selectedAssetId", 2);
|
|
12738
|
-
__decorateClass$
|
|
12514
|
+
__decorateClass$2([
|
|
12739
12515
|
r$6()
|
|
12740
12516
|
], CxContentBrowserGrid.prototype, "assetMap", 2);
|
|
12741
|
-
__decorateClass$
|
|
12517
|
+
__decorateClass$2([
|
|
12742
12518
|
r$6()
|
|
12743
12519
|
], CxContentBrowserGrid.prototype, "columnWidth", 2);
|
|
12744
|
-
__decorateClass$
|
|
12520
|
+
__decorateClass$2([
|
|
12745
12521
|
watch("view", { waitUntilFirstUpdate: true })
|
|
12746
12522
|
], CxContentBrowserGrid.prototype, "handleViewChange", 1);
|
|
12747
|
-
__decorateClass$
|
|
12523
|
+
__decorateClass$2([
|
|
12748
12524
|
watch("assets")
|
|
12749
12525
|
], CxContentBrowserGrid.prototype, "handleAssetsChange", 1);
|
|
12750
|
-
CxContentBrowserGrid = __decorateClass$
|
|
12526
|
+
CxContentBrowserGrid = __decorateClass$2([
|
|
12751
12527
|
customElement("cx-content-browser-grid")
|
|
12752
12528
|
], CxContentBrowserGrid);
|
|
12753
|
-
const styles$
|
|
12529
|
+
const styles$1 = i$7`
|
|
12754
12530
|
:host {
|
|
12755
12531
|
display: block;
|
|
12756
12532
|
}
|
|
@@ -12809,14 +12585,14 @@ const styles$2 = i$7`
|
|
|
12809
12585
|
cursor: default;
|
|
12810
12586
|
}
|
|
12811
12587
|
`;
|
|
12812
|
-
var __defProp$
|
|
12813
|
-
var __getOwnPropDesc$
|
|
12814
|
-
var __decorateClass$
|
|
12815
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
12588
|
+
var __defProp$1 = Object.defineProperty;
|
|
12589
|
+
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
12590
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
12591
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
12816
12592
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
12817
12593
|
if (decorator = decorators[i4])
|
|
12818
12594
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12819
|
-
if (kind && result) __defProp$
|
|
12595
|
+
if (kind && result) __defProp$1(target, key, result);
|
|
12820
12596
|
return result;
|
|
12821
12597
|
};
|
|
12822
12598
|
const LOGOUT_ITEM_VALUE = "logout";
|
|
@@ -12889,982 +12665,110 @@ let CxContentBrowserHeader = class extends CortexElement {
|
|
|
12889
12665
|
<cx-menu-item class="header__user-info" readonly>
|
|
12890
12666
|
<cx-line-clamp lines="1">${this.fullName}</cx-line-clamp>
|
|
12891
12667
|
<cx-avatar
|
|
12892
|
-
slot="prefix"
|
|
12893
|
-
label=${this.localize.term("userAvatar")}
|
|
12894
|
-
image=${this.avatar}
|
|
12895
|
-
loading="lazy"
|
|
12896
|
-
style=${o$1({
|
|
12897
|
-
"--size": "var(--cx-font-size-x-large)"
|
|
12898
|
-
})}
|
|
12899
|
-
></cx-avatar>
|
|
12900
|
-
</cx-menu-item>
|
|
12901
|
-
<cx-divider></cx-divider>
|
|
12902
|
-
<cx-menu-item value=${LOGOUT_ITEM_VALUE}>
|
|
12903
|
-
${this.localize.term("logout")}
|
|
12904
|
-
<cx-icon slot="prefix" name="logout"></cx-icon>
|
|
12905
|
-
</cx-menu-item>
|
|
12906
|
-
</cx-menu>
|
|
12907
|
-
</cx-dropdown>
|
|
12908
|
-
`;
|
|
12909
|
-
}
|
|
12910
|
-
return b`
|
|
12911
|
-
<cx-avatar
|
|
12912
|
-
class="header__user-avatar"
|
|
12913
|
-
label=${this.localize.term("userAvatar")}
|
|
12914
|
-
image=${this.avatar}
|
|
12915
|
-
loading="lazy"
|
|
12916
|
-
></cx-avatar>
|
|
12917
|
-
`;
|
|
12918
|
-
}
|
|
12919
|
-
render() {
|
|
12920
|
-
const containerClasses = {
|
|
12921
|
-
container: true,
|
|
12922
|
-
"container--bordered": this.bordered
|
|
12923
|
-
};
|
|
12924
|
-
return b`
|
|
12925
|
-
<cx-space class=${e$5(containerClasses)} direction="vertical" spacing="small">
|
|
12926
|
-
<cx-space class="header" justify-content="space-between" align-items="center">
|
|
12927
|
-
<div class="header__title">
|
|
12928
|
-
<cx-space class="header" justify-content="space-between" align-items="center" spacing="x-small">
|
|
12929
|
-
${this.renderTitle()}
|
|
12930
|
-
</cx-space>
|
|
12931
|
-
</div>
|
|
12932
|
-
<div class="header__menu">
|
|
12933
|
-
${this.renderUserDropdown()}
|
|
12934
|
-
${n$5(
|
|
12935
|
-
this.showCloseButton,
|
|
12936
|
-
() => b`
|
|
12937
|
-
<cx-icon-button
|
|
12938
|
-
name="close"
|
|
12939
|
-
label=${this.localize.term("close")}
|
|
12940
|
-
@click=${this.handleCloseClick}
|
|
12941
|
-
></cx-icon-button>
|
|
12942
|
-
`,
|
|
12943
|
-
() => A
|
|
12944
|
-
)}
|
|
12945
|
-
</div>
|
|
12946
|
-
</cx-space>
|
|
12947
|
-
<slot></slot>
|
|
12948
|
-
</cx-space>
|
|
12949
|
-
`;
|
|
12950
|
-
}
|
|
12951
|
-
};
|
|
12952
|
-
CxContentBrowserHeader.styles = [componentStyles, styles$2];
|
|
12953
|
-
CxContentBrowserHeader.dependencies = {
|
|
12954
|
-
"cx-avatar": CxAvatar,
|
|
12955
|
-
"cx-divider": CxDivider,
|
|
12956
|
-
"cx-dropdown": CxDropdown,
|
|
12957
|
-
"cx-icon": CxIcon,
|
|
12958
|
-
"cx-icon-button": CxIconButton,
|
|
12959
|
-
"cx-line-clamp": CxLineClamp,
|
|
12960
|
-
"cx-menu": CxMenu,
|
|
12961
|
-
"cx-menu-item": CxMenuItem,
|
|
12962
|
-
"cx-skeleton": CxSkeleton,
|
|
12963
|
-
"cx-space": CxSpace,
|
|
12964
|
-
"cx-typography": CxTypography
|
|
12965
|
-
};
|
|
12966
|
-
__decorateClass$2([
|
|
12967
|
-
n$6({ type: Boolean })
|
|
12968
|
-
], CxContentBrowserHeader.prototype, "bordered", 2);
|
|
12969
|
-
__decorateClass$2([
|
|
12970
|
-
n$6({ attribute: "application-name", type: String })
|
|
12971
|
-
], CxContentBrowserHeader.prototype, "applicationName", 2);
|
|
12972
|
-
__decorateClass$2([
|
|
12973
|
-
n$6({ type: Boolean })
|
|
12974
|
-
], CxContentBrowserHeader.prototype, "loading", 2);
|
|
12975
|
-
__decorateClass$2([
|
|
12976
|
-
n$6({ attribute: "is-fetching", type: Boolean })
|
|
12977
|
-
], CxContentBrowserHeader.prototype, "isFetching", 2);
|
|
12978
|
-
__decorateClass$2([
|
|
12979
|
-
n$6({ attribute: "avatar", type: String })
|
|
12980
|
-
], CxContentBrowserHeader.prototype, "avatar", 2);
|
|
12981
|
-
__decorateClass$2([
|
|
12982
|
-
n$6({ attribute: "full-name", type: String })
|
|
12983
|
-
], CxContentBrowserHeader.prototype, "fullName", 2);
|
|
12984
|
-
__decorateClass$2([
|
|
12985
|
-
n$6({ attribute: "folder-title", type: String })
|
|
12986
|
-
], CxContentBrowserHeader.prototype, "folderTitle", 2);
|
|
12987
|
-
__decorateClass$2([
|
|
12988
|
-
n$6({ attribute: "show-close-button", type: Boolean })
|
|
12989
|
-
], CxContentBrowserHeader.prototype, "showCloseButton", 2);
|
|
12990
|
-
__decorateClass$2([
|
|
12991
|
-
n$6({ attribute: "can-logout", type: Boolean })
|
|
12992
|
-
], CxContentBrowserHeader.prototype, "canLogout", 2);
|
|
12993
|
-
CxContentBrowserHeader = __decorateClass$2([
|
|
12994
|
-
customElement("cx-content-browser-header")
|
|
12995
|
-
], CxContentBrowserHeader);
|
|
12996
|
-
const styles$1 = i$7`
|
|
12997
|
-
/* Containing block for the absolutely positioned loading bar, which is a direct child. */
|
|
12998
|
-
:host {
|
|
12999
|
-
position: relative;
|
|
13000
|
-
display: block;
|
|
13001
|
-
flex: 1;
|
|
13002
|
-
box-sizing: border-box;
|
|
13003
|
-
/*
|
|
13004
|
-
* The overflow has to stop at the scrollport below, which it only does while the host cannot
|
|
13005
|
-
* grow with the grids' min-content width. Two different parents can let it grow, so both are
|
|
13006
|
-
* closed off:
|
|
13007
|
-
*
|
|
13008
|
-
* width -- a multi-line flex parent stretches an item to its own flex line's cross size, the
|
|
13009
|
-
* largest hypothetical size on that line, and not to the container's width; only a
|
|
13010
|
-
* single-line container does the latter. The picker's column parent wraps, so the
|
|
13011
|
-
* host stretched to the grids' min-content width and carried everything beside it
|
|
13012
|
-
* along (L-429EVG: the login avatar left the viewport). A definite width ends that.
|
|
13013
|
-
* min-width -- in a row parent the main axis is the horizontal one, and a flex item's automatic
|
|
13014
|
-
* minimum size refuses to shrink below its content there. In a column parent that
|
|
13015
|
-
* automatic minimum lands on min-height instead, which is why width alone is not
|
|
13016
|
-
* enough for one shape and min-width alone is not enough for the other.
|
|
13017
|
-
*/
|
|
13018
|
-
width: 100%;
|
|
13019
|
-
min-width: 0;
|
|
13020
|
-
min-height: 0;
|
|
13021
|
-
}
|
|
13022
|
-
|
|
13023
|
-
/*
|
|
13024
|
-
* The one scrollport for both axes. The header and the virtualized rows are separate grids, so
|
|
13025
|
-
* anything that scrolled them separately could drift; sharing a scroll container means a single
|
|
13026
|
-
* scroll offset moves both and they cannot. The vertical scrollbar therefore sits outside both
|
|
13027
|
-
* grids, which is why neither has to reserve a gutter for it.
|
|
13028
|
-
*/
|
|
13029
|
-
.content-browser-table {
|
|
13030
|
-
display: flex;
|
|
13031
|
-
flex-direction: column;
|
|
13032
|
-
height: 100%;
|
|
13033
|
-
overflow: auto;
|
|
13034
|
-
}
|
|
13035
|
-
|
|
13036
|
-
.content-browser-table-loading {
|
|
13037
|
-
position: absolute;
|
|
13038
|
-
width: 100%;
|
|
13039
|
-
z-index: var(--cx-z-index-drawer);
|
|
13040
|
-
}
|
|
13041
|
-
|
|
13042
|
-
.content-browser-table-loading cx-progress-bar {
|
|
13043
|
-
--height: 4px;
|
|
13044
|
-
}
|
|
13045
|
-
|
|
13046
|
-
/*
|
|
13047
|
-
* min-width: min-content is what makes the table scroll instead of squashing: it is the width
|
|
13048
|
-
* at which every track that cannot shrink still fits, so a column dragged wider than the viewport
|
|
13049
|
-
* widens both grids past it and the container gains a horizontal scrollbar. The header and a row
|
|
13050
|
-
* resolve the same track list against the same padding and gaps, so their min-content widths are
|
|
13051
|
-
* equal and their column boundaries stay on top of each other at any scroll offset.
|
|
13052
|
-
*/
|
|
13053
|
-
.content-browser-table__header,
|
|
13054
|
-
.content-browser-table__row {
|
|
13055
|
-
display: grid;
|
|
13056
|
-
align-items: center;
|
|
13057
|
-
/* Set on the host so the header and every virtualized row resolve one identical track list. */
|
|
13058
|
-
grid-template-columns: var(--cx-content-browser-table-columns);
|
|
13059
|
-
column-gap: var(--cx-spacing-medium);
|
|
13060
|
-
padding: var(--cx-spacing-x-small) var(--cx-spacing-medium);
|
|
13061
|
-
min-width: min-content;
|
|
13062
|
-
}
|
|
13063
|
-
|
|
13064
|
-
/*
|
|
13065
|
-
* Sticky rather than outside the scroller: the header has to travel with the rows horizontally
|
|
13066
|
-
* and stay put vertically, and only sharing their scrollport gives the first of those for free.
|
|
13067
|
-
*/
|
|
13068
|
-
.content-browser-table__head {
|
|
13069
|
-
position: sticky;
|
|
13070
|
-
top: 0;
|
|
13071
|
-
z-index: 1;
|
|
13072
|
-
flex: none;
|
|
13073
|
-
min-width: min-content;
|
|
13074
|
-
/*
|
|
13075
|
-
* The offset and the background belong to the sticky box, not to the row inside it: rows now
|
|
13076
|
-
* scroll underneath within the same scrollport, and any part of the sticky box that paints
|
|
13077
|
-
* nothing shows them through. __head is a flex item, so a child's margin cannot collapse out
|
|
13078
|
-
* of it either. Literal fallback because an unthemed host paints no background at all.
|
|
13079
|
-
*/
|
|
13080
|
-
padding-top: 5px;
|
|
13081
|
-
background-color: var(--cx-color-neutral-50, #f9f9f9);
|
|
13082
|
-
}
|
|
13083
|
-
|
|
13084
|
-
.content-browser-table__header {
|
|
13085
|
-
border-bottom: 1px solid var(--cx-color-neutral-200);
|
|
13086
|
-
color: var(--cx-color-neutral-700);
|
|
13087
|
-
}
|
|
13088
|
-
|
|
13089
|
-
/* cx-typography sets its own font-weight, so the host cannot simply inherit one in. */
|
|
13090
|
-
.content-browser-table__header cx-typography::part(base) {
|
|
13091
|
-
font-weight: var(--cx-font-weight-medium);
|
|
13092
|
-
}
|
|
13093
|
-
|
|
13094
|
-
.content-browser-table__body {
|
|
13095
|
-
flex: 1;
|
|
13096
|
-
min-height: 0;
|
|
13097
|
-
}
|
|
13098
|
-
|
|
13099
|
-
/*
|
|
13100
|
-
* lit-virtualizer positions rows absolutely, which makes them shrink-to-fit. Without an explicit
|
|
13101
|
-
* width the row's grid resolves its fr tracks against the row's own content width while the
|
|
13102
|
-
* header -- not virtualized -- resolves the same tracks against the full container, so the two
|
|
13103
|
-
* disagree and a fractional column never receives the free space. 100% is the scrollport, not
|
|
13104
|
-
* the scroll width, so the shared min-width: min-content above is what carries a row past it.
|
|
13105
|
-
*/
|
|
13106
|
-
.content-browser-table__row {
|
|
13107
|
-
box-sizing: border-box;
|
|
13108
|
-
width: 100%;
|
|
13109
|
-
border-bottom: 1px solid var(--cx-color-neutral-200);
|
|
13110
|
-
cursor: pointer;
|
|
13111
|
-
}
|
|
13112
|
-
|
|
13113
|
-
.content-browser-table__row:hover,
|
|
13114
|
-
.content-browser-table__row:focus-visible {
|
|
13115
|
-
background-color: var(--cx-color-neutral-100);
|
|
13116
|
-
outline: none;
|
|
13117
|
-
}
|
|
13118
|
-
|
|
13119
|
-
.content-browser-table__row--selected {
|
|
13120
|
-
background-color: var(--cx-color-primary-100);
|
|
13121
|
-
}
|
|
13122
|
-
|
|
13123
|
-
.content-browser-table__row--disabled {
|
|
13124
|
-
cursor: default;
|
|
13125
|
-
pointer-events: none;
|
|
13126
|
-
opacity: 0.5;
|
|
13127
|
-
}
|
|
13128
|
-
|
|
13129
|
-
.content-browser-table__cell {
|
|
13130
|
-
min-width: 0;
|
|
13131
|
-
overflow: hidden;
|
|
13132
|
-
}
|
|
13133
|
-
|
|
13134
|
-
.content-browser-table__cell--center {
|
|
13135
|
-
text-align: center;
|
|
13136
|
-
}
|
|
13137
|
-
|
|
13138
|
-
.content-browser-table__cell--right {
|
|
13139
|
-
text-align: right;
|
|
13140
|
-
}
|
|
13141
|
-
|
|
13142
|
-
/* Anchors the resize handle; the cell clips, so the handle stays inside its own right edge. */
|
|
13143
|
-
.content-browser-table__header .content-browser-table__cell {
|
|
13144
|
-
position: relative;
|
|
13145
|
-
}
|
|
13146
|
-
|
|
13147
|
-
/*
|
|
13148
|
-
* Kept wholly inside the cell: the cell clips, so any part hanging into the column gap is not
|
|
13149
|
-
* painted and, more importantly, not hit-testable.
|
|
13150
|
-
*/
|
|
13151
|
-
.content-browser-table__resize {
|
|
13152
|
-
position: absolute;
|
|
13153
|
-
top: 0;
|
|
13154
|
-
right: 0;
|
|
13155
|
-
bottom: 0;
|
|
13156
|
-
/* Fallback matters: with no design-system theme the token is empty and the grab target is 0px. */
|
|
13157
|
-
width: var(--cx-spacing-medium, 16px);
|
|
13158
|
-
cursor: col-resize;
|
|
13159
|
-
touch-action: none;
|
|
13160
|
-
}
|
|
13161
|
-
|
|
13162
|
-
/*
|
|
13163
|
-
* The column divider, pinned to the grab target's right edge -- which the cell clips to, so it
|
|
13164
|
-
* lands on the column boundary. Visible at rest as a neutral full-height hairline: it is what
|
|
13165
|
-
* tells the user where the draggable boundaries are before the pointer is anywhere near one, so
|
|
13166
|
-
* it has to read as table chrome. The rules below take it to the primary treatment once the
|
|
13167
|
-
* boundary is actually being addressed. Literal fallbacks because the tokens resolve to nothing
|
|
13168
|
-
* on an unthemed host, and an invisible divider is the defect this fixes.
|
|
13169
|
-
*/
|
|
13170
|
-
.content-browser-table__resize::after {
|
|
13171
|
-
position: absolute;
|
|
13172
|
-
top: 0;
|
|
13173
|
-
right: 0;
|
|
13174
|
-
bottom: 0;
|
|
13175
|
-
width: 1px;
|
|
13176
|
-
background-color: var(--cx-color-neutral-200, #e4e4e7);
|
|
13177
|
-
content: '';
|
|
13178
|
-
}
|
|
13179
|
-
|
|
13180
|
-
.content-browser-table__resize:hover::after,
|
|
13181
|
-
.content-browser-table__resize:focus-visible::after {
|
|
13182
|
-
width: 2px;
|
|
13183
|
-
background-color: var(--cx-color-primary-500, #3b82f6);
|
|
13184
|
-
}
|
|
13185
|
-
|
|
13186
|
-
/*
|
|
13187
|
-
* Keyboard focus needs an indicator of its own: the hover hairline is 2px wide and half the cell
|
|
13188
|
-
* high, far too small to read as focus. The ring is inset by its own width because the header
|
|
13189
|
-
* cell clips -- the handle is flush with the cell's top, right and bottom edges, so anything
|
|
13190
|
-
* drawn outside its box is never painted. Fallbacks matter: with no design-system theme the
|
|
13191
|
-
* tokens are empty and the ring would disappear entirely.
|
|
13192
|
-
*/
|
|
13193
|
-
.content-browser-table__resize:focus-visible {
|
|
13194
|
-
outline: var(--cx-focus-ring-style, solid) var(--cx-focus-ring-width, 3px)
|
|
13195
|
-
var(--cx-focus-ring-color, #2563eb);
|
|
13196
|
-
outline-offset: calc(-1 * var(--cx-focus-ring-width, 3px));
|
|
13197
|
-
}
|
|
13198
|
-
|
|
13199
|
-
/*
|
|
13200
|
-
* While a column is being dragged the pointer is captured, so it can travel anywhere in the
|
|
13201
|
-
* document -- keep the resize cursor and stop the drag from selecting header text.
|
|
13202
|
-
*/
|
|
13203
|
-
.content-browser-table--resizing {
|
|
13204
|
-
cursor: col-resize;
|
|
13205
|
-
user-select: none;
|
|
13206
|
-
}
|
|
13207
|
-
|
|
13208
|
-
.content-browser-table--resizing .content-browser-table__resize::after {
|
|
13209
|
-
width: 2px;
|
|
13210
|
-
background-color: var(--cx-color-primary-500, #3b82f6);
|
|
13211
|
-
}
|
|
13212
|
-
|
|
13213
|
-
.content-browser-table__cell--action {
|
|
13214
|
-
display: flex;
|
|
13215
|
-
justify-content: flex-end;
|
|
13216
|
-
}
|
|
13217
|
-
|
|
13218
|
-
/*
|
|
13219
|
-
* visibility, not display: the action column is a max-content track, so removing the button
|
|
13220
|
-
* from layout would collapse the track and reflow every other column on hover.
|
|
13221
|
-
*/
|
|
13222
|
-
.content-browser-table__action {
|
|
13223
|
-
--min-height: 0;
|
|
13224
|
-
|
|
13225
|
-
visibility: hidden;
|
|
13226
|
-
}
|
|
13227
|
-
|
|
13228
|
-
.content-browser-table__row:hover .content-browser-table__action,
|
|
13229
|
-
.content-browser-table__row:focus-visible .content-browser-table__action,
|
|
13230
|
-
.content-browser-table__row:focus-within .content-browser-table__action,
|
|
13231
|
-
.content-browser-table__row--selected .content-browser-table__action,
|
|
13232
|
-
.content-browser-table__action--busy {
|
|
13233
|
-
visibility: visible;
|
|
13234
|
-
}
|
|
13235
|
-
|
|
13236
|
-
/*
|
|
13237
|
-
* Reserves the action track's width in the header grid so it resolves to the same max-content
|
|
13238
|
-
* size the row grid resolves to. It is never shown and never focusable.
|
|
13239
|
-
*/
|
|
13240
|
-
.content-browser-table__action--placeholder {
|
|
13241
|
-
visibility: hidden;
|
|
13242
|
-
pointer-events: none;
|
|
13243
|
-
}
|
|
13244
|
-
|
|
13245
|
-
.content-browser-table__empty {
|
|
13246
|
-
flex: 1;
|
|
13247
|
-
}
|
|
13248
|
-
`;
|
|
13249
|
-
var __defProp$1 = Object.defineProperty;
|
|
13250
|
-
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
13251
|
-
var __typeError$1 = (msg) => {
|
|
13252
|
-
throw TypeError(msg);
|
|
13253
|
-
};
|
|
13254
|
-
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
13255
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
13256
|
-
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
13257
|
-
if (decorator = decorators[i4])
|
|
13258
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13259
|
-
if (kind && result) __defProp$1(target, key, result);
|
|
13260
|
-
return result;
|
|
13261
|
-
};
|
|
13262
|
-
var __accessCheck$1 = (obj, member, msg) => member.has(obj) || __typeError$1("Cannot " + msg);
|
|
13263
|
-
var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
13264
|
-
var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13265
|
-
var __privateSet$1 = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
|
|
13266
|
-
var _lastHeight, _lastScrollTop, _resize, _fallbackListeners;
|
|
13267
|
-
const ROW_HEIGHT = 40;
|
|
13268
|
-
const ACTION_COLUMN_TRACK = "max-content";
|
|
13269
|
-
const MIN_COLUMN_WIDTH = 48;
|
|
13270
|
-
const MAX_COLUMN_WIDTH = 2e3;
|
|
13271
|
-
const COLUMN_RESIZE_STEP = 8;
|
|
13272
|
-
const COLUMN_RESIZE_STEP_LARGE = 32;
|
|
13273
|
-
const TABLE_COLUMNS_PROPERTY = "--cx-content-browser-table-columns";
|
|
13274
|
-
const FLEX_TRACK = /^\d*\.?\d+fr$/i;
|
|
13275
|
-
const MINMAX_TRACK = /^minmax\(\s*(.+?)\s*,\s*(.+?)\s*\)$/i;
|
|
13276
|
-
const COLLAPSIBLE_MINIMUM = /^(auto|min-content)$/i;
|
|
13277
|
-
const PIXEL_MINIMUM = /^(\d*\.?\d+)(px)?$/i;
|
|
13278
|
-
function floorFlexibleTrack(track) {
|
|
13279
|
-
const authored = track.trim();
|
|
13280
|
-
const minmax = MINMAX_TRACK.exec(authored);
|
|
13281
|
-
if (!minmax) {
|
|
13282
|
-
return FLEX_TRACK.test(authored) ? `minmax(${MIN_COLUMN_WIDTH}px, ${authored})` : authored;
|
|
13283
|
-
}
|
|
13284
|
-
const [, minimum, maximum] = minmax;
|
|
13285
|
-
if (!FLEX_TRACK.test(maximum)) {
|
|
13286
|
-
return authored;
|
|
13287
|
-
}
|
|
13288
|
-
const pixels = PIXEL_MINIMUM.exec(minimum);
|
|
13289
|
-
const collapsible = COLLAPSIBLE_MINIMUM.test(minimum) || pixels !== null && Number.parseFloat(pixels[1]) < MIN_COLUMN_WIDTH;
|
|
13290
|
-
return collapsible ? `minmax(${MIN_COLUMN_WIDTH}px, ${maximum})` : authored;
|
|
13291
|
-
}
|
|
13292
|
-
function createColumnWidths(entries = []) {
|
|
13293
|
-
return Object.assign(/* @__PURE__ */ Object.create(null), Object.fromEntries(entries));
|
|
13294
|
-
}
|
|
13295
|
-
function readCellValue(asset, field) {
|
|
13296
|
-
const value = asset[field];
|
|
13297
|
-
if (value === void 0 || value === null || typeof value === "object") {
|
|
13298
|
-
return "";
|
|
13299
|
-
}
|
|
13300
|
-
return String(value);
|
|
13301
|
-
}
|
|
13302
|
-
let CxContentBrowserTable = class extends CortexElement {
|
|
13303
|
-
constructor() {
|
|
13304
|
-
super();
|
|
13305
|
-
this.localize = new LocalizeController(this);
|
|
13306
|
-
this.assets = [];
|
|
13307
|
-
this.columns = [];
|
|
13308
|
-
this.ctaText = "";
|
|
13309
|
-
this.ctaTextTransform = "capitalize";
|
|
13310
|
-
this.empty = false;
|
|
13311
|
-
this.hasMore = false;
|
|
13312
|
-
this.loading = false;
|
|
13313
|
-
this.selectedAssetId = void 0;
|
|
13314
|
-
this.busyAssetId = void 0;
|
|
13315
|
-
this.assetMap = /* @__PURE__ */ new Map();
|
|
13316
|
-
this.columnWidths = createColumnWidths();
|
|
13317
|
-
__privateAdd$1(this, _lastHeight, 0);
|
|
13318
|
-
__privateAdd$1(this, _lastScrollTop, 0);
|
|
13319
|
-
this.scrollAnchorController = new ScrollAnchorController(this, {
|
|
13320
|
-
// The rows scroll inside the table container, not inside the virtualizer, so that is the
|
|
13321
|
-
// element whose scroll offset an anchor has to be captured against and restored on.
|
|
13322
|
-
getContainer: () => this.containerEl,
|
|
13323
|
-
// The sticky header is the container's first in-flow child, so row 0 starts below it rather
|
|
13324
|
-
// than at the content origin. Measured rather than a constant: the height is whatever the
|
|
13325
|
-
// host's tokens and column titles resolve to.
|
|
13326
|
-
getContentOffset: () => {
|
|
13327
|
-
var _a2, _b2;
|
|
13328
|
-
return (_b2 = (_a2 = this.headEl) == null ? void 0 : _a2.getBoundingClientRect().height) != null ? _b2 : 0;
|
|
13329
|
-
},
|
|
13330
|
-
getItemIndexById: (id) => this.assets.findIndex((asset) => asset.id === id),
|
|
13331
|
-
// The container is a plain div, so it has no `layoutComplete` of its own; the virtualizer still
|
|
13332
|
-
// has to have laid the rows out before a restore can land on one.
|
|
13333
|
-
getLayoutSource: () => this.bodyEl,
|
|
13334
|
-
itemSelector: ".content-browser-table__row"
|
|
13335
|
-
});
|
|
13336
|
-
__privateAdd$1(this, _resize);
|
|
13337
|
-
__privateAdd$1(this, _fallbackListeners);
|
|
13338
|
-
this.debouncedCalculatePageSize = debounce(this.calculatePageSize, 200);
|
|
13339
|
-
this.debouncedHandleScrollEnd = debounce(this.handleScrollEnd, 200);
|
|
13340
|
-
this.handleRowClick = this.handleRowClick.bind(this);
|
|
13341
|
-
this.handleActionClick = this.handleActionClick.bind(this);
|
|
13342
|
-
this.handleRowKeyDown = this.handleRowKeyDown.bind(this);
|
|
13343
|
-
}
|
|
13344
|
-
/** One authored track per configured column, in order. The action track is not one of them. */
|
|
13345
|
-
buildColumnTracks(widths) {
|
|
13346
|
-
return this.columns.map((column) => {
|
|
13347
|
-
var _a2;
|
|
13348
|
-
const resized = widths[column.field];
|
|
13349
|
-
return resized === void 0 ? floorFlexibleTrack((_a2 = column.width) != null ? _a2 : "minmax(0, 1fr)") : `${resized}px`;
|
|
13350
|
-
});
|
|
13351
|
-
}
|
|
13352
|
-
buildTemplateColumns(widths) {
|
|
13353
|
-
return [...this.buildColumnTracks(widths), ACTION_COLUMN_TRACK].join(" ");
|
|
13354
|
-
}
|
|
13355
|
-
get templateColumns() {
|
|
13356
|
-
return this.buildTemplateColumns(this.columnWidths);
|
|
13357
|
-
}
|
|
13358
|
-
resolveColumnWidth(field) {
|
|
13359
|
-
var _a2;
|
|
13360
|
-
const configured = this.columnWidths[field];
|
|
13361
|
-
if (configured !== void 0) {
|
|
13362
|
-
return configured;
|
|
13363
|
-
}
|
|
13364
|
-
const cell = this.renderRoot.querySelector(
|
|
13365
|
-
`.content-browser-table__header [role="columnheader"][data-field="${CSS.escape(field)}"]`
|
|
13366
|
-
);
|
|
13367
|
-
return this.clampColumnWidth((_a2 = cell == null ? void 0 : cell.getBoundingClientRect().width) != null ? _a2 : MIN_COLUMN_WIDTH);
|
|
13368
|
-
}
|
|
13369
|
-
clampColumnWidth(width) {
|
|
13370
|
-
return Math.round(Math.min(MAX_COLUMN_WIDTH, Math.max(MIN_COLUMN_WIDTH, width)));
|
|
13371
|
-
}
|
|
13372
|
-
commitColumnWidth(field, width) {
|
|
13373
|
-
if (this.columnWidths[field] === width) {
|
|
13374
|
-
return;
|
|
13375
|
-
}
|
|
13376
|
-
const next = createColumnWidths(Object.entries(this.columnWidths));
|
|
13377
|
-
if (width === void 0) {
|
|
13378
|
-
delete next[field];
|
|
13379
|
-
} else {
|
|
13380
|
-
next[field] = width;
|
|
13381
|
-
}
|
|
13382
|
-
this.columnWidths = next;
|
|
13383
|
-
this.emit("cx-content-browser-table-column-resize", { detail: { field, width } });
|
|
13384
|
-
}
|
|
13385
|
-
/**
|
|
13386
|
-
* Kept off the reactive path: its only effect is the cursor, the text selection and the handle
|
|
13387
|
-
* colour, while a reactive toggle would rebind `renderItem` and re-render every visible row twice
|
|
13388
|
-
* per drag.
|
|
13389
|
-
*/
|
|
13390
|
-
setResizingClass(active) {
|
|
13391
|
-
var _a2;
|
|
13392
|
-
(_a2 = this.containerEl) == null ? void 0 : _a2.classList.toggle("content-browser-table--resizing", active);
|
|
13393
|
-
}
|
|
13394
|
-
bindFallbackListeners(target) {
|
|
13395
|
-
const onMove = (event) => this.handleResizeMove(event);
|
|
13396
|
-
const onUp = (event) => this.handleResizeEnd(event);
|
|
13397
|
-
const onCancel = (event) => this.handleResizeCancel(event);
|
|
13398
|
-
__privateSet$1(this, _fallbackListeners, { onCancel, onMove, onUp, target });
|
|
13399
|
-
target.addEventListener("pointermove", onMove);
|
|
13400
|
-
target.addEventListener("pointerup", onUp);
|
|
13401
|
-
target.addEventListener("pointercancel", onCancel);
|
|
13402
|
-
}
|
|
13403
|
-
releaseFallbackListeners() {
|
|
13404
|
-
if (!__privateGet$1(this, _fallbackListeners)) {
|
|
13405
|
-
return;
|
|
13406
|
-
}
|
|
13407
|
-
const { onCancel, onMove, onUp, target } = __privateGet$1(this, _fallbackListeners);
|
|
13408
|
-
target.removeEventListener("pointermove", onMove);
|
|
13409
|
-
target.removeEventListener("pointerup", onUp);
|
|
13410
|
-
target.removeEventListener("pointercancel", onCancel);
|
|
13411
|
-
__privateSet$1(this, _fallbackListeners, void 0);
|
|
13412
|
-
}
|
|
13413
|
-
/**
|
|
13414
|
-
* With the fallback bound, an event dispatched at the handle reaches the handle's own binding and
|
|
13415
|
-
* then the document one, running every terminal handler twice. The fallback owns the whole drag on
|
|
13416
|
-
* that path, so the element-level delivery is dropped.
|
|
13417
|
-
*/
|
|
13418
|
-
isHandledByFallback(event) {
|
|
13419
|
-
return __privateGet$1(this, _fallbackListeners) !== void 0 && event.currentTarget !== __privateGet$1(this, _fallbackListeners).target;
|
|
13420
|
-
}
|
|
13421
|
-
/** Every trace of a drag: the state the track-list publish is gated on, the cursor, the fallback. */
|
|
13422
|
-
endResize() {
|
|
13423
|
-
__privateSet$1(this, _resize, void 0);
|
|
13424
|
-
this.releaseFallbackListeners();
|
|
13425
|
-
this.setResizingClass(false);
|
|
13426
|
-
}
|
|
13427
|
-
handleResizeStart(event) {
|
|
13428
|
-
const handle = event.currentTarget;
|
|
13429
|
-
const field = handle.dataset.field;
|
|
13430
|
-
if (!field || !event.isPrimary || event.button !== 0 || __privateGet$1(this, _resize)) {
|
|
13431
|
-
return;
|
|
13432
|
-
}
|
|
13433
|
-
event.preventDefault();
|
|
13434
|
-
handle.focus();
|
|
13435
|
-
const startWidth = this.resolveColumnWidth(field);
|
|
13436
|
-
__privateSet$1(this, _resize, {
|
|
13437
|
-
field,
|
|
13438
|
-
pointerId: event.pointerId,
|
|
13439
|
-
startWidth,
|
|
13440
|
-
startX: event.clientX,
|
|
13441
|
-
width: startWidth
|
|
13442
|
-
});
|
|
13443
|
-
this.setResizingClass(true);
|
|
13444
|
-
try {
|
|
13445
|
-
handle.setPointerCapture(event.pointerId);
|
|
13446
|
-
} catch (e2) {
|
|
13447
|
-
this.bindFallbackListeners(handle.ownerDocument);
|
|
13448
|
-
}
|
|
13449
|
-
}
|
|
13450
|
-
/**
|
|
13451
|
-
* The track list a running drag owns, built against the columns rendering right now: the committed
|
|
13452
|
-
* widths with the drag's own preview over the top. Falls back to the committed list when no drag is
|
|
13453
|
-
* running, so one expression covers both.
|
|
13454
|
-
*/
|
|
13455
|
-
get previewTemplateColumns() {
|
|
13456
|
-
if (!__privateGet$1(this, _resize)) {
|
|
13457
|
-
return this.templateColumns;
|
|
13458
|
-
}
|
|
13459
|
-
const preview = createColumnWidths(Object.entries(this.columnWidths));
|
|
13460
|
-
preview[__privateGet$1(this, _resize).field] = __privateGet$1(this, _resize).width;
|
|
13461
|
-
return this.buildTemplateColumns(preview);
|
|
13462
|
-
}
|
|
13463
|
-
/** Repaints the drag with one property write: no re-render, no layout read. */
|
|
13464
|
-
previewColumnWidth(width) {
|
|
13465
|
-
if (!__privateGet$1(this, _resize)) {
|
|
13466
|
-
return;
|
|
13467
|
-
}
|
|
13468
|
-
__privateGet$1(this, _resize).width = width;
|
|
13469
|
-
this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.previewTemplateColumns);
|
|
13470
|
-
}
|
|
13471
|
-
handleResizeMove(event) {
|
|
13472
|
-
if (this.isHandledByFallback(event) || !__privateGet$1(this, _resize) || __privateGet$1(this, _resize).pointerId !== event.pointerId) {
|
|
13473
|
-
return;
|
|
13474
|
-
}
|
|
13475
|
-
this.previewColumnWidth(this.clampColumnWidth(
|
|
13476
|
-
__privateGet$1(this, _resize).startWidth + (event.clientX - __privateGet$1(this, _resize).startX)
|
|
13477
|
-
));
|
|
13478
|
-
}
|
|
13479
|
-
handleResizeEnd(event) {
|
|
13480
|
-
if (this.isHandledByFallback(event) || !__privateGet$1(this, _resize) || __privateGet$1(this, _resize).pointerId !== event.pointerId) {
|
|
13481
|
-
return;
|
|
13482
|
-
}
|
|
13483
|
-
const { field, startWidth, width } = __privateGet$1(this, _resize);
|
|
13484
|
-
this.endResize();
|
|
13485
|
-
if (!this.columns.some((column) => column.field === field)) {
|
|
13486
|
-
this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.templateColumns);
|
|
13487
|
-
return;
|
|
13488
|
-
}
|
|
13489
|
-
if (width !== startWidth) {
|
|
13490
|
-
this.commitColumnWidth(field, width);
|
|
13491
|
-
return;
|
|
13492
|
-
}
|
|
13493
|
-
this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.templateColumns);
|
|
13494
|
-
}
|
|
13495
|
-
/**
|
|
13496
|
-
* A gesture the user agent took away was never a decision: restore the committed track list and
|
|
13497
|
-
* tell the host nothing.
|
|
13498
|
-
*/
|
|
13499
|
-
handleResizeCancel(event) {
|
|
13500
|
-
if (this.isHandledByFallback(event) || !__privateGet$1(this, _resize) || __privateGet$1(this, _resize).pointerId !== event.pointerId) {
|
|
13501
|
-
return;
|
|
13502
|
-
}
|
|
13503
|
-
this.endResize();
|
|
13504
|
-
this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.templateColumns);
|
|
13505
|
-
}
|
|
13506
|
-
handleResizeKeyDown(event) {
|
|
13507
|
-
const handle = event.currentTarget;
|
|
13508
|
-
const field = handle.dataset.field;
|
|
13509
|
-
if (!field) {
|
|
13510
|
-
return;
|
|
13511
|
-
}
|
|
13512
|
-
if (event.key === "Home") {
|
|
13513
|
-
event.preventDefault();
|
|
13514
|
-
this.commitColumnWidth(field, void 0);
|
|
13515
|
-
return;
|
|
13516
|
-
}
|
|
13517
|
-
const step = event.shiftKey ? COLUMN_RESIZE_STEP_LARGE : COLUMN_RESIZE_STEP;
|
|
13518
|
-
const delta = event.key === "ArrowLeft" ? -step : event.key === "ArrowRight" ? step : 0;
|
|
13519
|
-
if (!delta) {
|
|
13520
|
-
return;
|
|
13521
|
-
}
|
|
13522
|
-
event.preventDefault();
|
|
13523
|
-
const startWidth = this.resolveColumnWidth(field);
|
|
13524
|
-
const width = this.clampColumnWidth(startWidth + delta);
|
|
13525
|
-
if (width === startWidth) {
|
|
13526
|
-
return;
|
|
13527
|
-
}
|
|
13528
|
-
this.commitColumnWidth(field, width);
|
|
13529
|
-
}
|
|
13530
|
-
handleResizeReset(event) {
|
|
13531
|
-
const field = event.currentTarget.dataset.field;
|
|
13532
|
-
if (field) {
|
|
13533
|
-
this.commitColumnWidth(field, void 0);
|
|
13534
|
-
}
|
|
13535
|
-
}
|
|
13536
|
-
renderResizeHandle(column) {
|
|
13537
|
-
const pinned = this.columnWidths[column.field];
|
|
13538
|
-
return b`
|
|
13539
|
-
<div
|
|
13540
|
-
class="content-browser-table__resize"
|
|
13541
|
-
role="separator"
|
|
13542
|
-
aria-orientation="vertical"
|
|
13543
|
-
aria-label=${this.localize.term("resize")}
|
|
13544
|
-
aria-valuemin=${MIN_COLUMN_WIDTH}
|
|
13545
|
-
aria-valuemax=${MAX_COLUMN_WIDTH}
|
|
13546
|
-
aria-valuenow=${o$4(pinned)}
|
|
13547
|
-
tabindex="0"
|
|
13548
|
-
data-field=${column.field}
|
|
13549
|
-
@pointerdown=${this.handleResizeStart}
|
|
13550
|
-
@pointermove=${this.handleResizeMove}
|
|
13551
|
-
@pointerup=${this.handleResizeEnd}
|
|
13552
|
-
@pointercancel=${this.handleResizeCancel}
|
|
13553
|
-
@lostpointercapture=${this.handleResizeEnd}
|
|
13554
|
-
@dblclick=${this.handleResizeReset}
|
|
13555
|
-
@keydown=${this.handleResizeKeyDown}
|
|
13556
|
-
></div>
|
|
13557
|
-
`;
|
|
13558
|
-
}
|
|
13559
|
-
handleColumnsChange() {
|
|
13560
|
-
const fields = new Set(this.columns.map((column) => column.field));
|
|
13561
|
-
const kept = Object.entries(this.columnWidths).filter(([field]) => fields.has(field));
|
|
13562
|
-
if (kept.length !== Object.keys(this.columnWidths).length) {
|
|
13563
|
-
this.columnWidths = createColumnWidths(kept);
|
|
13564
|
-
}
|
|
13565
|
-
}
|
|
13566
|
-
updated() {
|
|
13567
|
-
this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.previewTemplateColumns);
|
|
13568
|
-
}
|
|
13569
|
-
disconnectedCallback() {
|
|
13570
|
-
super.disconnectedCallback();
|
|
13571
|
-
this.endResize();
|
|
13572
|
-
}
|
|
13573
|
-
handleAssetsChange() {
|
|
13574
|
-
this.assetMap.clear();
|
|
13575
|
-
this.assets.forEach((item) => this.assetMap.set(item.id, item));
|
|
13576
|
-
this.scrollAnchorController.scheduleRestore();
|
|
13577
|
-
}
|
|
13578
|
-
handleResize(event) {
|
|
13579
|
-
event.stopPropagation();
|
|
13580
|
-
const entries = event.detail.entries;
|
|
13581
|
-
if (entries[0].target !== this.containerEl) {
|
|
13582
|
-
return;
|
|
13583
|
-
}
|
|
13584
|
-
this.scrollAnchorController.capture();
|
|
13585
|
-
this.debouncedCalculatePageSize(entries[0].contentRect.height);
|
|
13586
|
-
}
|
|
13587
|
-
calculatePageSize(height) {
|
|
13588
|
-
if (Math.abs(__privateGet$1(this, _lastHeight) - height) < 10) {
|
|
13589
|
-
return;
|
|
13590
|
-
}
|
|
13591
|
-
__privateSet$1(this, _lastHeight, height);
|
|
13592
|
-
this.scrollAnchorController.setLayoutMetrics({
|
|
13593
|
-
columnCount: 1,
|
|
13594
|
-
itemHeight: ROW_HEIGHT
|
|
13595
|
-
});
|
|
13596
|
-
this.emit("cx-content-browser-grid-resize", {
|
|
13597
|
-
detail: {
|
|
13598
|
-
columnCount: 1,
|
|
13599
|
-
rowCount: Math.ceil(height / ROW_HEIGHT)
|
|
13600
|
-
}
|
|
13601
|
-
});
|
|
13602
|
-
this.scrollAnchorController.scheduleRestore();
|
|
13603
|
-
}
|
|
13604
|
-
selectRow(assetId) {
|
|
13605
|
-
var _a2;
|
|
13606
|
-
if (!assetId || ((_a2 = this.assetMap.get(assetId)) == null ? void 0 : _a2.inColdStorage)) {
|
|
13607
|
-
return;
|
|
13608
|
-
}
|
|
13609
|
-
this.emit("cx-content-browser-grid-click", {
|
|
13610
|
-
detail: {
|
|
13611
|
-
id: assetId
|
|
13612
|
-
}
|
|
13613
|
-
});
|
|
13614
|
-
}
|
|
13615
|
-
handleRowClick(event) {
|
|
13616
|
-
var _a2;
|
|
13617
|
-
this.selectRow((_a2 = event.currentTarget.dataset.id) != null ? _a2 : "");
|
|
13618
|
-
}
|
|
13619
|
-
handleActionClick(event) {
|
|
13620
|
-
var _a2;
|
|
13621
|
-
event.stopPropagation();
|
|
13622
|
-
this.selectRow((_a2 = event.currentTarget.dataset.id) != null ? _a2 : "");
|
|
13623
|
-
}
|
|
13624
|
-
handleRowKeyDown(event) {
|
|
13625
|
-
var _a2;
|
|
13626
|
-
if (event.key !== "Enter" && event.key !== " ") {
|
|
13627
|
-
return;
|
|
13628
|
-
}
|
|
13629
|
-
event.preventDefault();
|
|
13630
|
-
this.selectRow((_a2 = event.currentTarget.dataset.id) != null ? _a2 : "");
|
|
13631
|
-
}
|
|
13632
|
-
/**
|
|
13633
|
-
* @param assetId - omitted for the header's sizing twin, which is inert and never announced.
|
|
13634
|
-
*/
|
|
13635
|
-
renderActionButton(assetId) {
|
|
13636
|
-
const isPlaceholder = assetId === void 0;
|
|
13637
|
-
const isBusy = !isPlaceholder && assetId === this.busyAssetId;
|
|
13638
|
-
return b`
|
|
13639
|
-
<cx-button
|
|
13640
|
-
class=${e$5({
|
|
13641
|
-
"content-browser-table__action": true,
|
|
13642
|
-
"content-browser-table__action--busy": isBusy,
|
|
13643
|
-
"content-browser-table__action--placeholder": isPlaceholder
|
|
13644
|
-
})}
|
|
13645
|
-
data-id=${o$4(assetId)}
|
|
13646
|
-
size="small"
|
|
13647
|
-
variant="primary"
|
|
13648
|
-
tabindex="-1"
|
|
13649
|
-
?loading=${isBusy}
|
|
13650
|
-
aria-hidden=${isPlaceholder ? "true" : "false"}
|
|
13651
|
-
@click=${isPlaceholder ? A : this.handleActionClick}
|
|
13652
|
-
>
|
|
13653
|
-
<span style=${o$1({ textTransform: this.ctaTextTransform })}>
|
|
13654
|
-
${this.ctaText || this.localize.term("insert")}
|
|
13655
|
-
</span>
|
|
13656
|
-
</cx-button>
|
|
13657
|
-
`;
|
|
13658
|
-
}
|
|
13659
|
-
/**
|
|
13660
|
-
* Bound fresh on every render at the call site, deliberately. `lit-virtualizer` re-runs this only
|
|
13661
|
-
* when `items` or `renderItem` change identity, and the selected id lives on neither — with a
|
|
13662
|
-
* stable reference the rows keep their first render and the selected row is never marked. A new
|
|
13663
|
-
* `items` array alone does not do it; the function identity is what the virtualizer acts on.
|
|
13664
|
-
*/
|
|
13665
|
-
renderRow(asset) {
|
|
13666
|
-
if (!asset) {
|
|
13667
|
-
return A;
|
|
12668
|
+
slot="prefix"
|
|
12669
|
+
label=${this.localize.term("userAvatar")}
|
|
12670
|
+
image=${this.avatar}
|
|
12671
|
+
loading="lazy"
|
|
12672
|
+
style=${o$1({
|
|
12673
|
+
"--size": "var(--cx-font-size-x-large)"
|
|
12674
|
+
})}
|
|
12675
|
+
></cx-avatar>
|
|
12676
|
+
</cx-menu-item>
|
|
12677
|
+
<cx-divider></cx-divider>
|
|
12678
|
+
<cx-menu-item value=${LOGOUT_ITEM_VALUE}>
|
|
12679
|
+
${this.localize.term("logout")}
|
|
12680
|
+
<cx-icon slot="prefix" name="logout"></cx-icon>
|
|
12681
|
+
</cx-menu-item>
|
|
12682
|
+
</cx-menu>
|
|
12683
|
+
</cx-dropdown>
|
|
12684
|
+
`;
|
|
13668
12685
|
}
|
|
13669
12686
|
return b`
|
|
13670
|
-
<
|
|
13671
|
-
class
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13676
|
-
data-id=${asset.id}
|
|
13677
|
-
role="row"
|
|
13678
|
-
tabindex=${asset.inColdStorage ? -1 : 0}
|
|
13679
|
-
aria-current=${asset.id === this.selectedAssetId ? "true" : "false"}
|
|
13680
|
-
style=${o$1({
|
|
13681
|
-
"min-height": `${ROW_HEIGHT}px`
|
|
13682
|
-
})}
|
|
13683
|
-
@click=${this.handleRowClick}
|
|
13684
|
-
@keydown=${this.handleRowKeyDown}
|
|
13685
|
-
>
|
|
13686
|
-
${c$1(
|
|
13687
|
-
this.columns,
|
|
13688
|
-
(column, index) => `${column.field}:${index}`,
|
|
13689
|
-
(column) => {
|
|
13690
|
-
var _a2;
|
|
13691
|
-
return b`
|
|
13692
|
-
<div
|
|
13693
|
-
class=${e$5({
|
|
13694
|
-
"content-browser-table__cell": true,
|
|
13695
|
-
[`content-browser-table__cell--${column.align}`]: Boolean(column.align)
|
|
13696
|
-
})}
|
|
13697
|
-
role="cell"
|
|
13698
|
-
>
|
|
13699
|
-
<cx-line-clamp lines=${(_a2 = column.lines) != null ? _a2 : 1}>
|
|
13700
|
-
<cx-typography variant="body3">${readCellValue(asset, column.field)}</cx-typography>
|
|
13701
|
-
</cx-line-clamp>
|
|
13702
|
-
</div>
|
|
13703
|
-
`;
|
|
13704
|
-
}
|
|
13705
|
-
)}
|
|
13706
|
-
<div class="content-browser-table__cell content-browser-table__cell--action" role="cell">
|
|
13707
|
-
${this.renderActionButton(asset.id)}
|
|
13708
|
-
</div>
|
|
13709
|
-
</div>
|
|
12687
|
+
<cx-avatar
|
|
12688
|
+
class="header__user-avatar"
|
|
12689
|
+
label=${this.localize.term("userAvatar")}
|
|
12690
|
+
image=${this.avatar}
|
|
12691
|
+
loading="lazy"
|
|
12692
|
+
></cx-avatar>
|
|
13710
12693
|
`;
|
|
13711
12694
|
}
|
|
13712
|
-
handleScroll(event) {
|
|
13713
|
-
const container = event.target;
|
|
13714
|
-
this.scrollAnchorController.capture(container);
|
|
13715
|
-
const scrolledVertically = container.scrollTop !== __privateGet$1(this, _lastScrollTop);
|
|
13716
|
-
__privateSet$1(this, _lastScrollTop, container.scrollTop);
|
|
13717
|
-
if (!scrolledVertically) {
|
|
13718
|
-
return;
|
|
13719
|
-
}
|
|
13720
|
-
if (container.scrollTop + container.clientHeight >= container.scrollHeight - 10) {
|
|
13721
|
-
this.debouncedHandleScrollEnd();
|
|
13722
|
-
}
|
|
13723
|
-
}
|
|
13724
|
-
handleScrollEnd() {
|
|
13725
|
-
if (this.hasMore) {
|
|
13726
|
-
this.emit("cx-content-browser-grid-scroll-end");
|
|
13727
|
-
}
|
|
13728
|
-
}
|
|
13729
12695
|
render() {
|
|
12696
|
+
const containerClasses = {
|
|
12697
|
+
container: true,
|
|
12698
|
+
"container--bordered": this.bordered
|
|
12699
|
+
};
|
|
13730
12700
|
return b`
|
|
13731
|
-
<
|
|
13732
|
-
class="content-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
<cx-progress-bar indeterminate></cx-progress-bar>
|
|
13738
|
-
</div>
|
|
13739
|
-
<cx-resize-observer @cx-resize=${this.handleResize}>
|
|
13740
|
-
<div
|
|
13741
|
-
class="content-browser-table"
|
|
13742
|
-
role="table"
|
|
13743
|
-
@scroll=${this.handleScroll}
|
|
13744
|
-
>
|
|
13745
|
-
<div class="content-browser-table__head" role="rowgroup">
|
|
13746
|
-
<div
|
|
13747
|
-
class="content-browser-table__header"
|
|
13748
|
-
role="row"
|
|
13749
|
-
>
|
|
13750
|
-
${c$1(
|
|
13751
|
-
this.columns,
|
|
13752
|
-
(column) => column.field,
|
|
13753
|
-
(column) => b`
|
|
13754
|
-
<div
|
|
13755
|
-
class=${e$5({
|
|
13756
|
-
"content-browser-table__cell": true,
|
|
13757
|
-
[`content-browser-table__cell--${column.align}`]: Boolean(column.align)
|
|
13758
|
-
})}
|
|
13759
|
-
role="columnheader"
|
|
13760
|
-
data-field=${column.field}
|
|
13761
|
-
>
|
|
13762
|
-
<cx-line-clamp lines="1">
|
|
13763
|
-
<cx-typography variant="small">${column.title}</cx-typography>
|
|
13764
|
-
</cx-line-clamp>
|
|
13765
|
-
${this.renderResizeHandle(column)}
|
|
13766
|
-
</div>
|
|
13767
|
-
`
|
|
13768
|
-
)}
|
|
13769
|
-
<div
|
|
13770
|
-
class="content-browser-table__cell content-browser-table__cell--action"
|
|
13771
|
-
role="columnheader"
|
|
13772
|
-
aria-label=${this.ctaText || this.localize.term("insert")}
|
|
13773
|
-
>
|
|
13774
|
-
${this.renderActionButton(void 0)}
|
|
13775
|
-
</div>
|
|
13776
|
-
</div>
|
|
12701
|
+
<cx-space class=${e$5(containerClasses)} direction="vertical" spacing="small">
|
|
12702
|
+
<cx-space class="header" justify-content="space-between" align-items="center">
|
|
12703
|
+
<div class="header__title">
|
|
12704
|
+
<cx-space class="header" justify-content="space-between" align-items="center" spacing="x-small">
|
|
12705
|
+
${this.renderTitle()}
|
|
12706
|
+
</cx-space>
|
|
13777
12707
|
</div>
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
class="content-browser-table__empty"
|
|
13783
|
-
icon="search_off"
|
|
13784
|
-
message=${this.localize.term("noResults")}
|
|
13785
|
-
></cx-content-browser-no-result>
|
|
13786
|
-
`,
|
|
13787
|
-
// Deliberately not a `scroller`: the table container scrolls both axes, so the
|
|
13788
|
-
// virtualizer sizes itself to the whole list and reacts to that ancestor's scrolling.
|
|
13789
|
-
// One scrollport is what keeps the header and the rows on one horizontal offset.
|
|
12708
|
+
<div class="header__menu">
|
|
12709
|
+
${this.renderUserDropdown()}
|
|
12710
|
+
${n$5(
|
|
12711
|
+
this.showCloseButton,
|
|
13790
12712
|
() => b`
|
|
13791
|
-
|
|
13792
|
-
|
|
13793
|
-
|
|
13794
|
-
|
|
13795
|
-
|
|
13796
|
-
|
|
13797
|
-
|
|
12713
|
+
<cx-icon-button
|
|
12714
|
+
name="close"
|
|
12715
|
+
label=${this.localize.term("close")}
|
|
12716
|
+
@click=${this.handleCloseClick}
|
|
12717
|
+
></cx-icon-button>
|
|
12718
|
+
`,
|
|
12719
|
+
() => A
|
|
13798
12720
|
)}
|
|
13799
|
-
|
|
13800
|
-
|
|
12721
|
+
</div>
|
|
12722
|
+
</cx-space>
|
|
12723
|
+
<slot></slot>
|
|
12724
|
+
</cx-space>
|
|
13801
12725
|
`;
|
|
13802
12726
|
}
|
|
13803
12727
|
};
|
|
13804
|
-
|
|
13805
|
-
|
|
13806
|
-
|
|
13807
|
-
|
|
13808
|
-
|
|
13809
|
-
|
|
13810
|
-
"cx-button":
|
|
13811
|
-
"cx-content-browser-no-result": CxContentBrowserNoResult,
|
|
12728
|
+
CxContentBrowserHeader.styles = [componentStyles, styles$1];
|
|
12729
|
+
CxContentBrowserHeader.dependencies = {
|
|
12730
|
+
"cx-avatar": CxAvatar,
|
|
12731
|
+
"cx-divider": CxDivider,
|
|
12732
|
+
"cx-dropdown": CxDropdown,
|
|
12733
|
+
"cx-icon": CxIcon,
|
|
12734
|
+
"cx-icon-button": CxIconButton,
|
|
13812
12735
|
"cx-line-clamp": CxLineClamp,
|
|
13813
|
-
"cx-
|
|
13814
|
-
"cx-
|
|
12736
|
+
"cx-menu": CxMenu,
|
|
12737
|
+
"cx-menu-item": CxMenuItem,
|
|
12738
|
+
"cx-skeleton": CxSkeleton,
|
|
12739
|
+
"cx-space": CxSpace,
|
|
13815
12740
|
"cx-typography": CxTypography
|
|
13816
12741
|
};
|
|
13817
12742
|
__decorateClass$1([
|
|
13818
|
-
|
|
13819
|
-
],
|
|
13820
|
-
__decorateClass$1([
|
|
13821
|
-
e$7(".content-browser-table__head")
|
|
13822
|
-
], CxContentBrowserTable.prototype, "headEl", 2);
|
|
13823
|
-
__decorateClass$1([
|
|
13824
|
-
e$7("lit-virtualizer")
|
|
13825
|
-
], CxContentBrowserTable.prototype, "bodyEl", 2);
|
|
13826
|
-
__decorateClass$1([
|
|
13827
|
-
n$6({ attribute: "assets", reflect: false, type: Array })
|
|
13828
|
-
], CxContentBrowserTable.prototype, "assets", 2);
|
|
13829
|
-
__decorateClass$1([
|
|
13830
|
-
n$6({ attribute: "columns", reflect: false, type: Array })
|
|
13831
|
-
], CxContentBrowserTable.prototype, "columns", 2);
|
|
13832
|
-
__decorateClass$1([
|
|
13833
|
-
n$6({ attribute: "cta-text", reflect: false, type: String })
|
|
13834
|
-
], CxContentBrowserTable.prototype, "ctaText", 2);
|
|
13835
|
-
__decorateClass$1([
|
|
13836
|
-
n$6({ attribute: "cta-text-transform", reflect: false, type: String })
|
|
13837
|
-
], CxContentBrowserTable.prototype, "ctaTextTransform", 2);
|
|
13838
|
-
__decorateClass$1([
|
|
13839
|
-
n$6({ attribute: "empty", reflect: true, type: Boolean })
|
|
13840
|
-
], CxContentBrowserTable.prototype, "empty", 2);
|
|
12743
|
+
n$6({ type: Boolean })
|
|
12744
|
+
], CxContentBrowserHeader.prototype, "bordered", 2);
|
|
13841
12745
|
__decorateClass$1([
|
|
13842
|
-
n$6({ attribute: "
|
|
13843
|
-
],
|
|
12746
|
+
n$6({ attribute: "application-name", type: String })
|
|
12747
|
+
], CxContentBrowserHeader.prototype, "applicationName", 2);
|
|
13844
12748
|
__decorateClass$1([
|
|
13845
|
-
n$6({
|
|
13846
|
-
],
|
|
12749
|
+
n$6({ type: Boolean })
|
|
12750
|
+
], CxContentBrowserHeader.prototype, "loading", 2);
|
|
13847
12751
|
__decorateClass$1([
|
|
13848
|
-
n$6({ attribute: "
|
|
13849
|
-
],
|
|
12752
|
+
n$6({ attribute: "is-fetching", type: Boolean })
|
|
12753
|
+
], CxContentBrowserHeader.prototype, "isFetching", 2);
|
|
13850
12754
|
__decorateClass$1([
|
|
13851
|
-
n$6({ attribute:
|
|
13852
|
-
],
|
|
12755
|
+
n$6({ attribute: "avatar", type: String })
|
|
12756
|
+
], CxContentBrowserHeader.prototype, "avatar", 2);
|
|
13853
12757
|
__decorateClass$1([
|
|
13854
|
-
|
|
13855
|
-
],
|
|
12758
|
+
n$6({ attribute: "full-name", type: String })
|
|
12759
|
+
], CxContentBrowserHeader.prototype, "fullName", 2);
|
|
13856
12760
|
__decorateClass$1([
|
|
13857
|
-
|
|
13858
|
-
],
|
|
12761
|
+
n$6({ attribute: "folder-title", type: String })
|
|
12762
|
+
], CxContentBrowserHeader.prototype, "folderTitle", 2);
|
|
13859
12763
|
__decorateClass$1([
|
|
13860
|
-
|
|
13861
|
-
],
|
|
12764
|
+
n$6({ attribute: "show-close-button", type: Boolean })
|
|
12765
|
+
], CxContentBrowserHeader.prototype, "showCloseButton", 2);
|
|
13862
12766
|
__decorateClass$1([
|
|
13863
|
-
|
|
13864
|
-
],
|
|
13865
|
-
|
|
13866
|
-
customElement("cx-content-browser-
|
|
13867
|
-
],
|
|
12767
|
+
n$6({ attribute: "can-logout", type: Boolean })
|
|
12768
|
+
], CxContentBrowserHeader.prototype, "canLogout", 2);
|
|
12769
|
+
CxContentBrowserHeader = __decorateClass$1([
|
|
12770
|
+
customElement("cx-content-browser-header")
|
|
12771
|
+
], CxContentBrowserHeader);
|
|
13868
12772
|
const appendPathAndQuery = (baseUrl, pathSuffix, extraQueryParams = []) => {
|
|
13869
12773
|
const questionMarkIndex = baseUrl.indexOf("?");
|
|
13870
12774
|
const hashIndex = baseUrl.indexOf("#");
|
|
@@ -13902,6 +12806,9 @@ const FIELD_SUBTYPE = "CoreField.DocSubType";
|
|
|
13902
12806
|
const FIELD_TITLE_WITH_FALLBACK = "CoreField.TitleWithFallback";
|
|
13903
12807
|
const FIELD_UPDATED_FILE_NAME = "CoreField.UpdatedFileName";
|
|
13904
12808
|
const ORIGINAL_VIEW_SIZE = "CoreField.OriginalPreview";
|
|
12809
|
+
function resolveAssetCaption(fields) {
|
|
12810
|
+
return fields[FIELD_DOC_TITLE] || fields[FIELD_IDENTIFIER] || "";
|
|
12811
|
+
}
|
|
13905
12812
|
function resolveAssetExtraFilters(selectedFacets) {
|
|
13906
12813
|
if (!selectedFacets || Object.keys(selectedFacets).length === 0) {
|
|
13907
12814
|
return {};
|
|
@@ -14253,26 +13160,8 @@ function apiGetAssetsByIDs(_0) {
|
|
|
14253
13160
|
}
|
|
14254
13161
|
});
|
|
14255
13162
|
}
|
|
14256
|
-
const ASSET_LIST_FIELDS = [
|
|
14257
|
-
DEFAULT_VIEW_SIZE,
|
|
14258
|
-
FIELD_DOC_TYPE,
|
|
14259
|
-
FIELD_EXTENSION,
|
|
14260
|
-
FIELD_FILE_SIZE,
|
|
14261
|
-
FIELD_IDENTIFIER,
|
|
14262
|
-
FIELD_KEYWORDS,
|
|
14263
|
-
FIELD_MAX_HEIGHT,
|
|
14264
|
-
FIELD_MAX_WIDTH,
|
|
14265
|
-
FIELD_ORIGINAL_FILE_NAME,
|
|
14266
|
-
FIELD_RECORD_ID,
|
|
14267
|
-
FIELD_SUBTYPE,
|
|
14268
|
-
FIELD_TITLE_WITH_FALLBACK,
|
|
14269
|
-
FIELD_UPDATED_FILE_NAME,
|
|
14270
|
-
FIELD_STORAGE_GROUP,
|
|
14271
|
-
ORIGINAL_VIEW_SIZE
|
|
14272
|
-
];
|
|
14273
13163
|
function apiGetAssets(_0) {
|
|
14274
13164
|
return __async(this, arguments, function* ({
|
|
14275
|
-
fields,
|
|
14276
13165
|
folderId,
|
|
14277
13166
|
isSeeThrough,
|
|
14278
13167
|
limitedToDocTypes = [],
|
|
@@ -14283,17 +13172,25 @@ function apiGetAssets(_0) {
|
|
|
14283
13172
|
start,
|
|
14284
13173
|
useSession
|
|
14285
13174
|
}) {
|
|
14286
|
-
var _a2;
|
|
14287
|
-
const validatedFields = (_a2 = fields == null ? void 0 : fields.filter((field) => field && typeof field === "string")) != null ? _a2 : [];
|
|
14288
13175
|
try {
|
|
14289
13176
|
const response = yield http.request({
|
|
14290
13177
|
data: __spreadValues({
|
|
14291
13178
|
Fields: [
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
13179
|
+
DEFAULT_VIEW_SIZE,
|
|
13180
|
+
FIELD_DOC_TITLE,
|
|
13181
|
+
FIELD_DOC_TYPE,
|
|
13182
|
+
FIELD_EXTENSION,
|
|
13183
|
+
FIELD_FILE_SIZE,
|
|
13184
|
+
FIELD_IDENTIFIER,
|
|
13185
|
+
FIELD_KEYWORDS,
|
|
13186
|
+
FIELD_MAX_HEIGHT,
|
|
13187
|
+
FIELD_MAX_WIDTH,
|
|
13188
|
+
FIELD_RECORD_ID,
|
|
13189
|
+
FIELD_SUBTYPE,
|
|
13190
|
+
FIELD_TITLE_WITH_FALLBACK,
|
|
13191
|
+
FIELD_UPDATED_FILE_NAME,
|
|
13192
|
+
FIELD_STORAGE_GROUP,
|
|
13193
|
+
ORIGINAL_VIEW_SIZE
|
|
14297
13194
|
],
|
|
14298
13195
|
Limit: pageSize || void 0,
|
|
14299
13196
|
LimitedToDocTypes: limitedToDocTypes,
|
|
@@ -14309,22 +13206,15 @@ function apiGetAssets(_0) {
|
|
|
14309
13206
|
transformResponse: [
|
|
14310
13207
|
...Array.isArray(http.defaults.transformResponse) ? http.defaults.transformResponse : [],
|
|
14311
13208
|
(rawResponse) => {
|
|
14312
|
-
var
|
|
14313
|
-
const mappedItems = (_b2 = (
|
|
14314
|
-
var
|
|
14315
|
-
let extension = (
|
|
14316
|
-
const name = item.fields
|
|
13209
|
+
var _a2, _b2;
|
|
13210
|
+
const mappedItems = (_b2 = (_a2 = rawResponse.contentItems) == null ? void 0 : _a2.map((item) => {
|
|
13211
|
+
var _a3, _b3, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l;
|
|
13212
|
+
let extension = (_a3 = item.fields[FIELD_EXTENSION]) != null ? _a3 : "";
|
|
13213
|
+
const name = resolveAssetCaption(item.fields);
|
|
14317
13214
|
if (extension && !extension.startsWith(".")) {
|
|
14318
13215
|
extension = "." + extension;
|
|
14319
13216
|
}
|
|
14320
|
-
return
|
|
14321
|
-
var _a5, _b4;
|
|
14322
|
-
const sourceField = (_a5 = ASSET_LIST_FIELDS.find(
|
|
14323
|
-
(defaultField) => defaultField.toLowerCase() === field.toLowerCase()
|
|
14324
|
-
)) != null ? _a5 : field;
|
|
14325
|
-
acc[field] = (_b4 = item.fields[sourceField]) != null ? _b4 : "";
|
|
14326
|
-
return acc;
|
|
14327
|
-
}, {})), {
|
|
13217
|
+
return {
|
|
14328
13218
|
allowATSLink: item.fields[FIELD_ALLOW_ATS_LINK] === "True",
|
|
14329
13219
|
docSubType: (_b3 = item.fields[FIELD_SUBTYPE]) != null ? _b3 : "",
|
|
14330
13220
|
docType: (_c2 = item.fields[FIELD_DOC_TYPE]) != null ? _c2 : "",
|
|
@@ -14341,7 +13231,7 @@ function apiGetAssets(_0) {
|
|
|
14341
13231
|
size: (_j = item.fields[FIELD_FILE_SIZE]) != null ? _j : "0 MB",
|
|
14342
13232
|
tags: (_k = item.fields[FIELD_KEYWORDS]) != null ? _k : "",
|
|
14343
13233
|
width: (_l = item.fields[FIELD_MAX_WIDTH]) != null ? _l : "0"
|
|
14344
|
-
}
|
|
13234
|
+
};
|
|
14345
13235
|
})) != null ? _b2 : [];
|
|
14346
13236
|
return {
|
|
14347
13237
|
facets: rawResponse.facets,
|
|
@@ -14816,7 +13706,6 @@ var intersection = baseRest(function(arrays) {
|
|
|
14816
13706
|
});
|
|
14817
13707
|
class FetchAndMergeAssetsController {
|
|
14818
13708
|
constructor(host, {
|
|
14819
|
-
additionalFields,
|
|
14820
13709
|
availableDocTypes,
|
|
14821
13710
|
baseUrl,
|
|
14822
13711
|
defaultFolderId,
|
|
@@ -14858,7 +13747,6 @@ class FetchAndMergeAssetsController {
|
|
|
14858
13747
|
this._debounceResolve = null;
|
|
14859
13748
|
this.host = host;
|
|
14860
13749
|
this.availableDocTypes = availableDocTypes;
|
|
14861
|
-
this.additionalFields = additionalFields != null ? additionalFields : [];
|
|
14862
13750
|
this.defaultFolderId = defaultFolderId;
|
|
14863
13751
|
this.defaultIsSeeThrough = defaultIsSeeThrough;
|
|
14864
13752
|
this.defaultSearchText = defaultSearchText;
|
|
@@ -14989,14 +13877,6 @@ class FetchAndMergeAssetsController {
|
|
|
14989
13877
|
}
|
|
14990
13878
|
this.host.requestUpdate();
|
|
14991
13879
|
}
|
|
14992
|
-
/**
|
|
14993
|
-
* Table columns are host configuration and can be reconfigured after mount, unlike the rest of
|
|
14994
|
-
* these options — every later fetch must ask for the current field list, not the one that
|
|
14995
|
-
* happened to be set when the controller was constructed.
|
|
14996
|
-
*/
|
|
14997
|
-
updateAdditionalFields(additionalFields) {
|
|
14998
|
-
this.additionalFields = additionalFields;
|
|
14999
|
-
}
|
|
15000
13880
|
updateAuth(token, useSession) {
|
|
15001
13881
|
if (this.useSiteSession) {
|
|
15002
13882
|
return;
|
|
@@ -15137,7 +14017,6 @@ class FetchAndMergeAssetsController {
|
|
|
15137
14017
|
}
|
|
15138
14018
|
}
|
|
15139
14019
|
request = __spreadProps(__spreadValues({}, request), {
|
|
15140
|
-
fields: this.additionalFields,
|
|
15141
14020
|
limitedToDocTypes: this.availableDocTypes
|
|
15142
14021
|
});
|
|
15143
14022
|
this.lastRequest = request;
|
|
@@ -15171,12 +14050,13 @@ class FetchAndMergeAssetsController {
|
|
|
15171
14050
|
}
|
|
15172
14051
|
fetchAssetByID(id, options) {
|
|
15173
14052
|
return __async(this, null, function* () {
|
|
15174
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n
|
|
14053
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
15175
14054
|
const { allowedExtensions = [], canFavorite = false, simplePick = false } = options != null ? options : {};
|
|
15176
14055
|
const promises = [
|
|
15177
14056
|
apiGetAssetsByIDs({
|
|
15178
14057
|
extraFields: [
|
|
15179
14058
|
DEFAULT_VIEW_SIZE,
|
|
14059
|
+
FIELD_DOC_TITLE,
|
|
15180
14060
|
FIELD_DOC_TYPE,
|
|
15181
14061
|
FIELD_EXTENSION,
|
|
15182
14062
|
FIELD_FILE_SIZE,
|
|
@@ -15184,7 +14064,6 @@ class FetchAndMergeAssetsController {
|
|
|
15184
14064
|
FIELD_KEYWORDS,
|
|
15185
14065
|
FIELD_MAX_HEIGHT,
|
|
15186
14066
|
FIELD_MAX_WIDTH,
|
|
15187
|
-
FIELD_ORIGINAL_FILE_NAME,
|
|
15188
14067
|
FIELD_RECORD_ID,
|
|
15189
14068
|
FIELD_SUBTYPE,
|
|
15190
14069
|
FIELD_TITLE_WITH_FALLBACK,
|
|
@@ -15223,17 +14102,17 @@ class FetchAndMergeAssetsController {
|
|
|
15223
14102
|
identifier: (_d2 = item[FIELD_IDENTIFIER]) != null ? _d2 : "",
|
|
15224
14103
|
imageUrl: (_e2 = item[DEFAULT_VIEW_SIZE]) != null ? _e2 : "",
|
|
15225
14104
|
inColdStorage: Boolean(item.inColdStorage),
|
|
15226
|
-
name: (
|
|
15227
|
-
originalUrl: (
|
|
15228
|
-
previewUrl: (
|
|
15229
|
-
recordId: (
|
|
15230
|
-
scrubUrl: (
|
|
15231
|
-
size: (
|
|
15232
|
-
tags: (
|
|
15233
|
-
width: (
|
|
14105
|
+
name: resolveAssetCaption(item),
|
|
14106
|
+
originalUrl: (_f2 = item[ORIGINAL_VIEW_SIZE]) != null ? _f2 : "",
|
|
14107
|
+
previewUrl: (_h = (_g = proxyData == null ? void 0 : proxyData.previewUrl) != null ? _g : item[DEFAULT_VIEW_SIZE]) != null ? _h : "",
|
|
14108
|
+
recordId: (_i = item[FIELD_RECORD_ID]) != null ? _i : "",
|
|
14109
|
+
scrubUrl: (_j = item[FIELD_SCRUB_URL]) != null ? _j : "",
|
|
14110
|
+
size: (_k = item[FIELD_FILE_SIZE]) != null ? _k : "0 MB",
|
|
14111
|
+
tags: (_l = item[FIELD_KEYWORDS]) != null ? _l : "",
|
|
14112
|
+
width: (_m = item[FIELD_MAX_WIDTH]) != null ? _m : "0"
|
|
15234
14113
|
},
|
|
15235
14114
|
isFavorite,
|
|
15236
|
-
proxies: ((
|
|
14115
|
+
proxies: ((_n = proxyData == null ? void 0 : proxyData.proxies) != null ? _n : []).filter((proxy) => {
|
|
15237
14116
|
var _a3;
|
|
15238
14117
|
if (!allowedExtensions || allowedExtensions.length === 0) {
|
|
15239
14118
|
return true;
|
|
@@ -15405,9 +14284,6 @@ const styles = i$7`
|
|
|
15405
14284
|
`;
|
|
15406
14285
|
var __defProp2 = Object.defineProperty;
|
|
15407
14286
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15408
|
-
var __typeError2 = (msg) => {
|
|
15409
|
-
throw TypeError(msg);
|
|
15410
|
-
};
|
|
15411
14287
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
15412
14288
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15413
14289
|
for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
|
|
@@ -15416,26 +14292,10 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
15416
14292
|
if (kind && result) __defProp2(target, key, result);
|
|
15417
14293
|
return result;
|
|
15418
14294
|
};
|
|
15419
|
-
var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
|
|
15420
|
-
var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), member.get(obj));
|
|
15421
|
-
var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
15422
|
-
var __privateSet2 = (obj, member, value, setter) => (__accessCheck2(obj, member, "write to private field"), member.set(obj, value), value);
|
|
15423
|
-
var _openingAsset, _insertInFlight;
|
|
15424
14295
|
const COMPUTED_FIELDS = ["ScrubUrl", "AllowATSLink"];
|
|
15425
14296
|
const MOBILE_WIDTH_THRESHOLD = 480;
|
|
15426
14297
|
const FORCE_OVERLAY_THRESHOLD = 650;
|
|
15427
14298
|
const PERSISTENT_DRAWER_WIDTH = 400;
|
|
15428
|
-
function resolvePageSize(view) {
|
|
15429
|
-
switch (view) {
|
|
15430
|
-
case GridView.Large:
|
|
15431
|
-
return 15;
|
|
15432
|
-
case GridView.Small:
|
|
15433
|
-
case TABLE_VIEW:
|
|
15434
|
-
return 30;
|
|
15435
|
-
default:
|
|
15436
|
-
return 20;
|
|
15437
|
-
}
|
|
15438
|
-
}
|
|
15439
14299
|
let CxContentBrowser = class extends CortexElement {
|
|
15440
14300
|
constructor() {
|
|
15441
14301
|
super(...arguments);
|
|
@@ -15461,7 +14321,6 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15461
14321
|
this.canFavorite = false;
|
|
15462
14322
|
this.canPinAsset = false;
|
|
15463
14323
|
this.canUseProxies = false;
|
|
15464
|
-
this.autoSelectFormat = false;
|
|
15465
14324
|
this.simplePick = false;
|
|
15466
14325
|
this.canViewVersions = false;
|
|
15467
14326
|
this.canTrack = false;
|
|
@@ -15470,7 +14329,6 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15470
14329
|
this.ctaTextTransform = "capitalize";
|
|
15471
14330
|
this.extraFields = [];
|
|
15472
14331
|
this.defaultGridView = GridView.Medium;
|
|
15473
|
-
this.tableColumns = [];
|
|
15474
14332
|
this.defaultSortOrderName = "";
|
|
15475
14333
|
this.defaultSortDirection = "ascending";
|
|
15476
14334
|
this.defaultSelectedFacets = {};
|
|
@@ -15508,40 +14366,28 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15508
14366
|
this.selectedAssetId = void 0;
|
|
15509
14367
|
this.isMobile = false;
|
|
15510
14368
|
this.defaultPageSize = 10;
|
|
15511
|
-
this.busyAssetId = void 0;
|
|
15512
|
-
__privateAdd2(this, _openingAsset, false);
|
|
15513
|
-
__privateAdd2(this, _insertInFlight, false);
|
|
15514
14369
|
}
|
|
15515
14370
|
willUpdate(changedProperties) {
|
|
15516
14371
|
super.willUpdate(changedProperties);
|
|
15517
14372
|
if (!this.hasUpdated) {
|
|
15518
|
-
this.view = this.defaultGridView
|
|
15519
|
-
}
|
|
15520
|
-
}
|
|
15521
|
-
/**
|
|
15522
|
-
* Never trust the host's value: it also arrives by direct property assignment, past the converter.
|
|
15523
|
-
* Entries are checked one by one, not just the outer array — `field` is dereferenced while the
|
|
15524
|
-
* fetch controller is being built, where a throw leaves the controller unassigned and the picker
|
|
15525
|
-
* blank. `title` is only rendered, and Lit renders a nullish one as nothing, so a column is not
|
|
15526
|
-
* worth dropping over it.
|
|
15527
|
-
*/
|
|
15528
|
-
get tableColumnList() {
|
|
15529
|
-
const columns = this.tableColumns;
|
|
15530
|
-
if (!Array.isArray(columns)) {
|
|
15531
|
-
return [];
|
|
14373
|
+
this.view = this.defaultGridView;
|
|
15532
14374
|
}
|
|
15533
|
-
return columns.filter((column) => {
|
|
15534
|
-
return !!column && typeof column === "object" && typeof column.field === "string" && column.field.length > 0;
|
|
15535
|
-
});
|
|
15536
|
-
}
|
|
15537
|
-
get canUseTable() {
|
|
15538
|
-
return this.tableColumnList.length > 0;
|
|
15539
14375
|
}
|
|
15540
14376
|
runFirstUpdated() {
|
|
15541
14377
|
if (this.useSiteSession) {
|
|
15542
14378
|
this.baseUrl = resolveSiteSessionUrl(this.baseUrl);
|
|
15543
14379
|
}
|
|
15544
|
-
|
|
14380
|
+
switch (this.view) {
|
|
14381
|
+
case GridView.Large:
|
|
14382
|
+
this.defaultPageSize = 15;
|
|
14383
|
+
break;
|
|
14384
|
+
case GridView.Medium:
|
|
14385
|
+
this.defaultPageSize = 20;
|
|
14386
|
+
break;
|
|
14387
|
+
case GridView.Small:
|
|
14388
|
+
this.defaultPageSize = 30;
|
|
14389
|
+
break;
|
|
14390
|
+
}
|
|
15545
14391
|
this.lastRequest = __spreadProps(__spreadValues({}, this.lastRequest), {
|
|
15546
14392
|
folderId: this.defaultFolderId,
|
|
15547
14393
|
isSeeThrough: this.defaultIsSeeThrough,
|
|
@@ -15552,7 +14398,6 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15552
14398
|
});
|
|
15553
14399
|
this.updateComplete.then(() => {
|
|
15554
14400
|
this.fetchAndMergeAssetsController = new FetchAndMergeAssetsController(this, {
|
|
15555
|
-
additionalFields: this.tableColumnList.map((column) => column.field),
|
|
15556
14401
|
availableDocTypes: this.availableDocTypes,
|
|
15557
14402
|
baseUrl: this.baseUrl,
|
|
15558
14403
|
defaultFolderId: this.defaultFolderId,
|
|
@@ -15592,12 +14437,7 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15592
14437
|
}
|
|
15593
14438
|
openFormatDialog(id) {
|
|
15594
14439
|
return __async(this, null, function* () {
|
|
15595
|
-
if (__privateGet2(this, _openingAsset) || __privateGet2(this, _insertInFlight)) {
|
|
15596
|
-
return;
|
|
15597
|
-
}
|
|
15598
|
-
__privateSet2(this, _openingAsset, true);
|
|
15599
14440
|
this.selectedAssetId = id;
|
|
15600
|
-
this.busyAssetId = id;
|
|
15601
14441
|
try {
|
|
15602
14442
|
const asset = yield this.fetchAndMergeAssetsController.fetchAssetByID(id, {
|
|
15603
14443
|
canFavorite: this.canFavorite,
|
|
@@ -15605,7 +14445,6 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15605
14445
|
});
|
|
15606
14446
|
if (!asset) {
|
|
15607
14447
|
this.selectedAssetId = void 0;
|
|
15608
|
-
this.busyAssetId = void 0;
|
|
15609
14448
|
return;
|
|
15610
14449
|
}
|
|
15611
14450
|
let isAssetPinned = false;
|
|
@@ -15616,14 +14455,8 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15616
14455
|
isAssetPinned = lookupEvent.detail.isAssetPinned;
|
|
15617
14456
|
}
|
|
15618
14457
|
this.formatDialog.open(__spreadProps(__spreadValues({}, asset), { isAssetPinned }));
|
|
15619
|
-
if (this.formatDialog.isDialogOpen) {
|
|
15620
|
-
this.busyAssetId = void 0;
|
|
15621
|
-
}
|
|
15622
14458
|
} catch (e2) {
|
|
15623
14459
|
this.selectedAssetId = void 0;
|
|
15624
|
-
this.busyAssetId = void 0;
|
|
15625
|
-
} finally {
|
|
15626
|
-
__privateSet2(this, _openingAsset, false);
|
|
15627
14460
|
}
|
|
15628
14461
|
});
|
|
15629
14462
|
}
|
|
@@ -15637,16 +14470,6 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15637
14470
|
});
|
|
15638
14471
|
});
|
|
15639
14472
|
}
|
|
15640
|
-
handleTableColumnsChange() {
|
|
15641
|
-
if (!this.fetchAndMergeAssetsController) {
|
|
15642
|
-
return;
|
|
15643
|
-
}
|
|
15644
|
-
this.fetchAndMergeAssetsController.updateAdditionalFields(
|
|
15645
|
-
this.tableColumnList.map((column) => column.field)
|
|
15646
|
-
);
|
|
15647
|
-
this.lastRequest = __spreadProps(__spreadValues({}, this.lastRequest), { start: 0 });
|
|
15648
|
-
void this.fetchAndMergeAssetsController.fetchAndMergeAssets(this.lastRequest);
|
|
15649
|
-
}
|
|
15650
14473
|
handleAuthChange() {
|
|
15651
14474
|
var _a2;
|
|
15652
14475
|
(_a2 = this.fetchAndMergeAssetsController) == null ? void 0 : _a2.updateAuth(this.token, this.useSession);
|
|
@@ -15704,7 +14527,17 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15704
14527
|
});
|
|
15705
14528
|
yield this.fetchAndMergeAssetsController.fetchAndMergeAssets(this.lastRequest);
|
|
15706
14529
|
}
|
|
15707
|
-
|
|
14530
|
+
switch (event.detail.view) {
|
|
14531
|
+
case GridView.Large:
|
|
14532
|
+
this.defaultPageSize = 15;
|
|
14533
|
+
break;
|
|
14534
|
+
case GridView.Medium:
|
|
14535
|
+
this.defaultPageSize = 20;
|
|
14536
|
+
break;
|
|
14537
|
+
case GridView.Small:
|
|
14538
|
+
this.defaultPageSize = 30;
|
|
14539
|
+
break;
|
|
14540
|
+
}
|
|
15708
14541
|
this.view = event.detail.view;
|
|
15709
14542
|
});
|
|
15710
14543
|
}
|
|
@@ -15824,17 +14657,15 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15824
14657
|
selectedProxyMetadata: event.detail.selectedProxyMetadata
|
|
15825
14658
|
});
|
|
15826
14659
|
this.formatDialog.hide();
|
|
15827
|
-
this.busyAssetId = void 0;
|
|
15828
14660
|
return;
|
|
15829
14661
|
}
|
|
15830
|
-
__privateSet2(this, _insertInFlight, true);
|
|
15831
14662
|
try {
|
|
15832
14663
|
const response = yield this.fetchAndMergeAssetsController.getAssetLink(__spreadProps(__spreadValues({}, event.detail), {
|
|
15833
14664
|
assets: [event.detail.asset],
|
|
15834
14665
|
extraFields: this.extraFields
|
|
15835
14666
|
}));
|
|
15836
14667
|
if (response.isError) {
|
|
15837
|
-
this.
|
|
14668
|
+
this.formatDialog.setLoadingConfirm(false);
|
|
15838
14669
|
return;
|
|
15839
14670
|
}
|
|
15840
14671
|
this.handleSelectedAsset({
|
|
@@ -15844,23 +14675,12 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15844
14675
|
});
|
|
15845
14676
|
this.formatDialog.hide();
|
|
15846
14677
|
} catch (e2) {
|
|
15847
|
-
this.
|
|
15848
|
-
} finally {
|
|
15849
|
-
__privateSet2(this, _insertInFlight, false);
|
|
15850
|
-
this.busyAssetId = void 0;
|
|
14678
|
+
this.formatDialog.setLoadingConfirm(false);
|
|
15851
14679
|
}
|
|
15852
14680
|
});
|
|
15853
14681
|
}
|
|
15854
|
-
reportProxyConfirmFailure() {
|
|
15855
|
-
if (this.formatDialog.isDialogOpen) {
|
|
15856
|
-
this.formatDialog.setLoadingConfirm(false);
|
|
15857
|
-
return;
|
|
15858
|
-
}
|
|
15859
|
-
this.formatDialog.revealAfterAutoConfirm();
|
|
15860
|
-
}
|
|
15861
14682
|
handleFormatConfirm(event) {
|
|
15862
14683
|
return __async(this, null, function* () {
|
|
15863
|
-
__privateSet2(this, _insertInFlight, true);
|
|
15864
14684
|
try {
|
|
15865
14685
|
const response = yield this.fetchAndMergeAssetsController.getAssetLink(__spreadProps(__spreadValues({}, event.detail), {
|
|
15866
14686
|
assets: [event.detail.asset],
|
|
@@ -15879,9 +14699,6 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
15879
14699
|
this.formatDialog.hide();
|
|
15880
14700
|
} catch (e2) {
|
|
15881
14701
|
this.formatDialog.setLoadingConfirm(false);
|
|
15882
|
-
} finally {
|
|
15883
|
-
__privateSet2(this, _insertInFlight, false);
|
|
15884
|
-
this.busyAssetId = void 0;
|
|
15885
14702
|
}
|
|
15886
14703
|
});
|
|
15887
14704
|
}
|
|
@@ -16027,7 +14844,6 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
16027
14844
|
.newlyChangedOption=${this.newlyChangedOption}
|
|
16028
14845
|
.sortOrders=${sortOrders}
|
|
16029
14846
|
.views=${this.views}
|
|
16030
|
-
?can-use-table=${this.canUseTable}
|
|
16031
14847
|
?is-mobile=${this.isMobile}
|
|
16032
14848
|
?is-see-through=${request == null ? void 0 : request.isSeeThrough}
|
|
16033
14849
|
?loading=${loading}
|
|
@@ -16043,45 +14859,20 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
16043
14859
|
@cx-content-browser-control-filter-change=${this.handleFilterChange}
|
|
16044
14860
|
@cx-content-browser-control-bar-search-change=${this.handleSearchChange}
|
|
16045
14861
|
></cx-content-browser-control-bar>
|
|
16046
|
-
|
|
16047
|
-
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
|
|
16053
|
-
|
|
16054
|
-
|
|
16055
|
-
|
|
16056
|
-
|
|
16057
|
-
|
|
16058
|
-
|
|
16059
|
-
|
|
16060
|
-
@cx-content-browser-grid-resize=${this.handleGridResize}
|
|
16061
|
-
@cx-content-browser-grid-click=${this.handleGridClick}
|
|
16062
|
-
></cx-content-browser-table>
|
|
16063
|
-
`,
|
|
16064
|
-
() => b`
|
|
16065
|
-
<cx-content-browser-grid
|
|
16066
|
-
.assets=${items}
|
|
16067
|
-
?has-more=${items.length < totalCount}
|
|
16068
|
-
?loading=${loading}
|
|
16069
|
-
?show-title=${this.showTitle}
|
|
16070
|
-
?show-size=${this.showSize}
|
|
16071
|
-
?show-dimensions=${this.showDimensions}
|
|
16072
|
-
?show-tags=${this.showTags}
|
|
16073
|
-
?show-cta=${isAutoSelectFormatActive(this.autoSelectFormat)}
|
|
16074
|
-
.busyAssetId=${this.busyAssetId}
|
|
16075
|
-
cta-text=${this.ctaText}
|
|
16076
|
-
cta-text-transform=${this.ctaTextTransform}
|
|
16077
|
-
selected-asset-id=${o$4(this.selectedAssetId || void 0)}
|
|
16078
|
-
view=${this.view}
|
|
16079
|
-
@cx-content-browser-grid-scroll-end=${this.handleScrollEnd}
|
|
16080
|
-
@cx-content-browser-grid-resize=${this.handleGridResize}
|
|
16081
|
-
@cx-content-browser-grid-click=${this.handleGridClick}
|
|
16082
|
-
></cx-content-browser-grid>
|
|
16083
|
-
`
|
|
16084
|
-
)}
|
|
14862
|
+
<cx-content-browser-grid
|
|
14863
|
+
.assets=${items}
|
|
14864
|
+
?has-more=${items.length < totalCount}
|
|
14865
|
+
?loading=${loading}
|
|
14866
|
+
?show-title=${this.showTitle}
|
|
14867
|
+
?show-size=${this.showSize}
|
|
14868
|
+
?show-dimensions=${this.showDimensions}
|
|
14869
|
+
?show-tags=${this.showTags}
|
|
14870
|
+
selected-asset-id=${o$4(this.selectedAssetId || void 0)}
|
|
14871
|
+
view=${this.view}
|
|
14872
|
+
@cx-content-browser-grid-scroll-end=${this.handleScrollEnd}
|
|
14873
|
+
@cx-content-browser-grid-resize=${this.handleGridResize}
|
|
14874
|
+
@cx-content-browser-grid-click=${this.handleGridClick}
|
|
14875
|
+
></cx-content-browser-grid>
|
|
16085
14876
|
</cx-resize-observer>
|
|
16086
14877
|
<cx-content-browser-format-dialog
|
|
16087
14878
|
.availableExtensions=${availableExtensions}
|
|
@@ -16094,7 +14885,6 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
16094
14885
|
cta-text-transform=${this.ctaTextTransform}
|
|
16095
14886
|
variant=${this.isMobile ? ContentBrowserFormatDialogVariant.Drawer : ContentBrowserFormatDialogVariant.Dialog}
|
|
16096
14887
|
token=${this.useSiteSession ? "" : this.token}
|
|
16097
|
-
.autoSelectFormat=${this.autoSelectFormat}
|
|
16098
14888
|
?can-custom-format=${!!(parameters == null ? void 0 : parameters.ATSEnabled)}
|
|
16099
14889
|
?can-favorite=${this.canFavorite}
|
|
16100
14890
|
?can-pin-asset=${this.canPinAsset}
|
|
@@ -16114,8 +14904,6 @@ let CxContentBrowser = class extends CortexElement {
|
|
|
16114
14904
|
`;
|
|
16115
14905
|
}
|
|
16116
14906
|
};
|
|
16117
|
-
_openingAsset = /* @__PURE__ */ new WeakMap();
|
|
16118
|
-
_insertInFlight = /* @__PURE__ */ new WeakMap();
|
|
16119
14907
|
CxContentBrowser.styles = [componentStyles, styles];
|
|
16120
14908
|
CxContentBrowser.dependencies = {
|
|
16121
14909
|
"cx-content-browser-browser": CxContentBrowserBrowser,
|
|
@@ -16124,7 +14912,6 @@ CxContentBrowser.dependencies = {
|
|
|
16124
14912
|
"cx-content-browser-grid": CxContentBrowserGrid,
|
|
16125
14913
|
"cx-content-browser-header": CxContentBrowserHeader,
|
|
16126
14914
|
"cx-content-browser-no-result": CxContentBrowserNoResult,
|
|
16127
|
-
"cx-content-browser-table": CxContentBrowserTable,
|
|
16128
14915
|
"cx-icon": CxIcon,
|
|
16129
14916
|
"cx-icon-button": CxIconButton,
|
|
16130
14917
|
"cx-resize-observer": CxResizeObserver,
|
|
@@ -16216,9 +15003,6 @@ __decorateClass([
|
|
|
16216
15003
|
__decorateClass([
|
|
16217
15004
|
n$6({ attribute: "can-use-proxies", reflect: true, type: Boolean })
|
|
16218
15005
|
], CxContentBrowser.prototype, "canUseProxies", 2);
|
|
16219
|
-
__decorateClass([
|
|
16220
|
-
n$6({ attribute: "auto-select-format", converter: autoSelectFormatConverter, reflect: false })
|
|
16221
|
-
], CxContentBrowser.prototype, "autoSelectFormat", 2);
|
|
16222
15006
|
__decorateClass([
|
|
16223
15007
|
n$6({ attribute: "simple-pick", reflect: true, type: Boolean })
|
|
16224
15008
|
], CxContentBrowser.prototype, "simplePick", 2);
|
|
@@ -16251,32 +15035,6 @@ __decorateClass([
|
|
|
16251
15035
|
__decorateClass([
|
|
16252
15036
|
n$6({ attribute: "default-grid-view", type: String })
|
|
16253
15037
|
], CxContentBrowser.prototype, "defaultGridView", 2);
|
|
16254
|
-
__decorateClass([
|
|
16255
|
-
n$6({
|
|
16256
|
-
attribute: "table-columns",
|
|
16257
|
-
/**
|
|
16258
|
-
* Lit's stock Array converter returns `null` for anything `JSON.parse` rejects, and a host that
|
|
16259
|
-
* stringifies an array into the attribute hands it `""` or `"[object Object]"`. `null` then
|
|
16260
|
-
* throws on every read below, taking the whole picker down. An unreadable value means "no
|
|
16261
|
-
* columns", which turns the table view off — the same outcome as not configuring one.
|
|
16262
|
-
*/
|
|
16263
|
-
converter: {
|
|
16264
|
-
fromAttribute: (value) => {
|
|
16265
|
-
if (!value) {
|
|
16266
|
-
return [];
|
|
16267
|
-
}
|
|
16268
|
-
try {
|
|
16269
|
-
const parsed = JSON.parse(value);
|
|
16270
|
-
return Array.isArray(parsed) ? parsed : [];
|
|
16271
|
-
} catch (e2) {
|
|
16272
|
-
return [];
|
|
16273
|
-
}
|
|
16274
|
-
},
|
|
16275
|
-
toAttribute: (value) => JSON.stringify(value != null ? value : [])
|
|
16276
|
-
},
|
|
16277
|
-
type: Array
|
|
16278
|
-
})
|
|
16279
|
-
], CxContentBrowser.prototype, "tableColumns", 2);
|
|
16280
15038
|
__decorateClass([
|
|
16281
15039
|
n$6({ attribute: "default-sort-order-name", type: String })
|
|
16282
15040
|
], CxContentBrowser.prototype, "defaultSortOrderName", 2);
|
|
@@ -16340,15 +15098,9 @@ __decorateClass([
|
|
|
16340
15098
|
__decorateClass([
|
|
16341
15099
|
r$6()
|
|
16342
15100
|
], CxContentBrowser.prototype, "isMobile", 2);
|
|
16343
|
-
__decorateClass([
|
|
16344
|
-
r$6()
|
|
16345
|
-
], CxContentBrowser.prototype, "busyAssetId", 2);
|
|
16346
15101
|
__decorateClass([
|
|
16347
15102
|
watch("lastRequest", { waitUntilFirstUpdate: true })
|
|
16348
15103
|
], CxContentBrowser.prototype, "handleLastRequestChange", 1);
|
|
16349
|
-
__decorateClass([
|
|
16350
|
-
watch("tableColumns", { waitUntilFirstUpdate: true })
|
|
16351
|
-
], CxContentBrowser.prototype, "handleTableColumnsChange", 1);
|
|
16352
15104
|
__decorateClass([
|
|
16353
15105
|
watch(["token", "useSession"], { waitUntilFirstUpdate: true })
|
|
16354
15106
|
], CxContentBrowser.prototype, "handleAuthChange", 1);
|