@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.
Files changed (24) hide show
  1. package/build/GlobalConfigContext.d.ts +0 -3
  2. package/build/OrangeDAMContentBrowserSDK.min.js +326 -782
  3. package/build/api/asset/asset.d.ts +7 -2
  4. package/build/components/content-browser/content-browser.d.ts +2 -37
  5. package/build/components/content-browser-asset-card/content-browser-asset-card.d.ts +1 -17
  6. package/build/components/content-browser-control-bar/content-browser-control-bar.d.ts +0 -1
  7. package/build/components/content-browser-control-view/content-browser-control-view.d.ts +2 -5
  8. package/build/components/content-browser-format-dialog/content-browser-format-dialog.d.ts +1 -27
  9. package/build/components/content-browser-grid/content-browser-grid.d.ts +1 -5
  10. package/build/components/content-browser-grid/scroll-anchor-controller.d.ts +1 -12
  11. package/build/content-browser.mjs +506 -1754
  12. package/build/events/cx-content-browser-control-view-change.d.ts +2 -2
  13. package/build/events/cx-content-browser-request-change.d.ts +2 -2
  14. package/build/events/index.d.ts +0 -1
  15. package/build/index.d.ts +2 -29
  16. package/build/index.html +0 -4
  17. package/build/index.mjs +440 -1706
  18. package/build/tools/fetch-and-merge-assets.d.ts +1 -10
  19. package/build/types/asset.d.ts +0 -5
  20. package/build/types/content-browser.d.ts +0 -53
  21. package/package.json +1 -1
  22. package/build/components/content-browser-table/content-browser-table.d.ts +0 -178
  23. package/build/components/content-browser-table/content-browser-table.styles.d.ts +0 -2
  24. package/build/events/cx-content-browser-table-column-resize.d.ts +0 -16
package/build/index.mjs CHANGED
@@ -110,7 +110,7 @@ var __yieldStar = (value) => {
110
110
  }, "return" in obj && method("return"), it2;
111
111
  };
112
112
  var __forAwait = (obj, it2, method) => (it2 = obj[__knownSymbol("asyncIterator")]) ? it2.call(obj) : (obj = obj[__knownSymbol("iterator")](), it2 = {}, method = (key, fn) => (fn = obj[key]) && (it2[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"), it2);
113
- var _a, _b, _c, _d, _e2, _f, _host, _getContainer, _getContentOffset, _getItemIndexById, _getLayoutSource, _itemSelector, _anchor, _columnCount, _itemHeight, _pendingRestoreFrames, _restoreSequence, _lastGetDataParameters, _lastMappedAvailableExtensions, _lastData, _hasFetchedOnce;
113
+ var _a, _b, _c, _d, _e2, _f, _host, _getContainer, _getItemIndexById, _itemSelector, _anchor, _columnCount, _itemHeight, _pendingRestoreFrames, _restoreSequence, _lastGetDataParameters, _lastMappedAvailableExtensions, _lastData, _hasFetchedOnce;
114
114
  import CxDrawer from "@orangelogic/design-system/components/drawer";
115
115
  import CxFolderSelect from "@orangelogic/design-system/components/folder-select";
116
116
  import CxIcon from "@orangelogic/design-system/components/icon";
@@ -1222,13 +1222,13 @@ var camelCase = createCompounder(function(result, word, index) {
1222
1222
  word = word.toLowerCase();
1223
1223
  return result + (index ? capitalize(word) : word);
1224
1224
  });
1225
- var __defProp$i = Object.defineProperty;
1226
- var __decorateClass$i = (decorators, target, key, kind) => {
1225
+ var __defProp$h = Object.defineProperty;
1226
+ var __decorateClass$h = (decorators, target, key, kind) => {
1227
1227
  var result = void 0;
1228
1228
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
1229
1229
  if (decorator = decorators[i4])
1230
1230
  result = decorator(target, key, result) || result;
1231
- if (result) __defProp$i(target, key, result);
1231
+ if (result) __defProp$h(target, key, result);
1232
1232
  return result;
1233
1233
  };
1234
1234
  const _CortexElement = class _CortexElement extends i$4 {
@@ -1355,16 +1355,16 @@ const _CortexElement = class _CortexElement extends i$4 {
1355
1355
  _CortexElement.version = "1";
1356
1356
  _CortexElement.dependencies = {};
1357
1357
  let CortexElement = _CortexElement;
1358
- __decorateClass$i([
1358
+ __decorateClass$h([
1359
1359
  n$6()
1360
1360
  ], CortexElement.prototype, "dir");
1361
- __decorateClass$i([
1361
+ __decorateClass$h([
1362
1362
  n$6()
1363
1363
  ], CortexElement.prototype, "lang");
1364
- __decorateClass$i([
1364
+ __decorateClass$h([
1365
1365
  n$6()
1366
1366
  ], CortexElement.prototype, "theme");
1367
- __decorateClass$i([
1367
+ __decorateClass$h([
1368
1368
  n$6({ attribute: "pre-render", type: Boolean })
1369
1369
  ], CortexElement.prototype, "preRender");
1370
1370
  function rescueElementPrototype(element) {
@@ -5814,7 +5814,7 @@ function watch(propertyName, options) {
5814
5814
  };
5815
5815
  };
5816
5816
  }
5817
- const styles$f = i$7`
5817
+ const styles$e = i$7`
5818
5818
  :host {
5819
5819
  display: contents;
5820
5820
  }
@@ -5903,14 +5903,14 @@ const styles$f = i$7`
5903
5903
  display: block;
5904
5904
  }
5905
5905
  `;
5906
- var __defProp$h = Object.defineProperty;
5907
- var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
5908
- var __decorateClass$h = (decorators, target, key, kind) => {
5909
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
5906
+ var __defProp$g = Object.defineProperty;
5907
+ var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
5908
+ var __decorateClass$g = (decorators, target, key, kind) => {
5909
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
5910
5910
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
5911
5911
  if (decorator = decorators[i4])
5912
5912
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5913
- if (kind && result) __defProp$h(target, key, result);
5913
+ if (kind && result) __defProp$g(target, key, result);
5914
5914
  return result;
5915
5915
  };
5916
5916
  const LIBRARY_FOLDER_TITLE = "Library";
@@ -6173,7 +6173,7 @@ let CxContentBrowserBrowser = class extends CortexElement {
6173
6173
  `;
6174
6174
  }
6175
6175
  };
6176
- CxContentBrowserBrowser.styles = [componentStyles, styles$f];
6176
+ CxContentBrowserBrowser.styles = [componentStyles, styles$e];
6177
6177
  CxContentBrowserBrowser.dependencies = {
6178
6178
  "cx-drawer": CxDrawer,
6179
6179
  "cx-folder-select": CxFolderSelect,
@@ -6183,67 +6183,67 @@ CxContentBrowserBrowser.dependencies = {
6183
6183
  "cx-tooltip": CxTooltip,
6184
6184
  "cx-typography": CxTypography
6185
6185
  };
6186
- __decorateClass$h([
6186
+ __decorateClass$g([
6187
6187
  e$7(".drawer-trigger")
6188
6188
  ], CxContentBrowserBrowser.prototype, "trigger", 2);
6189
- __decorateClass$h([
6189
+ __decorateClass$g([
6190
6190
  e$7(".content-browser-browser")
6191
6191
  ], CxContentBrowserBrowser.prototype, "drawer", 2);
6192
- __decorateClass$h([
6192
+ __decorateClass$g([
6193
6193
  n$6({ attribute: "folder-id", type: String })
6194
6194
  ], CxContentBrowserBrowser.prototype, "folderId", 2);
6195
- __decorateClass$h([
6195
+ __decorateClass$g([
6196
6196
  n$6({ attribute: "folder-title", type: String })
6197
6197
  ], CxContentBrowserBrowser.prototype, "folderTitle", 2);
6198
- __decorateClass$h([
6198
+ __decorateClass$g([
6199
6199
  n$6({ attribute: "allowed-folders", type: Array })
6200
6200
  ], CxContentBrowserBrowser.prototype, "allowedFolders", 2);
6201
- __decorateClass$h([
6201
+ __decorateClass$g([
6202
6202
  n$6({ attribute: "can-pin", type: Boolean })
6203
6203
  ], CxContentBrowserBrowser.prototype, "canPin", 2);
6204
- __decorateClass$h([
6204
+ __decorateClass$g([
6205
6205
  n$6({ attribute: "collection-path", type: String })
6206
6206
  ], CxContentBrowserBrowser.prototype, "collectionPath", 2);
6207
- __decorateClass$h([
6207
+ __decorateClass$g([
6208
6208
  n$6({ attribute: "favorite-folder-id", type: String })
6209
6209
  ], CxContentBrowserBrowser.prototype, "favoriteFolderId", 2);
6210
- __decorateClass$h([
6210
+ __decorateClass$g([
6211
6211
  n$6({ attribute: "show-collections", type: Boolean })
6212
6212
  ], CxContentBrowserBrowser.prototype, "showCollections", 2);
6213
- __decorateClass$h([
6213
+ __decorateClass$g([
6214
6214
  n$6({ attribute: "show-favorite-folder", type: Boolean })
6215
6215
  ], CxContentBrowserBrowser.prototype, "showFavoriteFolder", 2);
6216
- __decorateClass$h([
6216
+ __decorateClass$g([
6217
6217
  n$6({ attribute: "force-overlay", type: Boolean })
6218
6218
  ], CxContentBrowserBrowser.prototype, "forceOverlay", 2);
6219
- __decorateClass$h([
6219
+ __decorateClass$g([
6220
6220
  n$6({ attribute: "see-thru", type: Boolean })
6221
6221
  ], CxContentBrowserBrowser.prototype, "seeThru", 2);
6222
- __decorateClass$h([
6222
+ __decorateClass$g([
6223
6223
  n$6({ attribute: "min-query-length", type: Number })
6224
6224
  ], CxContentBrowserBrowser.prototype, "minQueryLength", 2);
6225
- __decorateClass$h([
6225
+ __decorateClass$g([
6226
6226
  n$6({ attribute: "token", type: String })
6227
6227
  ], CxContentBrowserBrowser.prototype, "token", 2);
6228
- __decorateClass$h([
6228
+ __decorateClass$g([
6229
6229
  n$6({ attribute: "base-url", type: String })
6230
6230
  ], CxContentBrowserBrowser.prototype, "baseUrl", 2);
6231
- __decorateClass$h([
6231
+ __decorateClass$g([
6232
6232
  n$6({ attribute: "use-site-session", type: Boolean })
6233
6233
  ], CxContentBrowserBrowser.prototype, "useSiteSession", 2);
6234
- __decorateClass$h([
6234
+ __decorateClass$g([
6235
6235
  r$6()
6236
6236
  ], CxContentBrowserBrowser.prototype, "searchTerm", 2);
6237
- __decorateClass$h([
6237
+ __decorateClass$g([
6238
6238
  r$6()
6239
6239
  ], CxContentBrowserBrowser.prototype, "isPersistent", 2);
6240
- __decorateClass$h([
6240
+ __decorateClass$g([
6241
6241
  r$6()
6242
6242
  ], CxContentBrowserBrowser.prototype, "collectionsOpen", 2);
6243
- __decorateClass$h([
6243
+ __decorateClass$g([
6244
6244
  watch("forceOverlay", { waitUntilFirstUpdate: true })
6245
6245
  ], CxContentBrowserBrowser.prototype, "handleForceOverlayChange", 1);
6246
- CxContentBrowserBrowser = __decorateClass$h([
6246
+ CxContentBrowserBrowser = __decorateClass$g([
6247
6247
  customElement("cx-content-browser-browser")
6248
6248
  ], CxContentBrowserBrowser);
6249
6249
  /**
@@ -6374,7 +6374,6 @@ var GridView$1 = /* @__PURE__ */ ((GridView2) => {
6374
6374
  GridView2["Small"] = "small";
6375
6375
  return GridView2;
6376
6376
  })(GridView$1 || {});
6377
- const TABLE_VIEW = "table";
6378
6377
  const ASSET_SIZE = {
6379
6378
  [
6380
6379
  "small"
@@ -6407,40 +6406,19 @@ var TransformationAction = /* @__PURE__ */ ((TransformationAction2) => {
6407
6406
  TransformationAction2["Rotate"] = "Rotate";
6408
6407
  return TransformationAction2;
6409
6408
  })(TransformationAction || {});
6410
- const autoSelectFormatConverter = {
6411
- fromAttribute: (value) => {
6412
- if (value === null) {
6413
- return false;
6414
- }
6415
- const normalized = value.trim();
6416
- if (normalized === "" || normalized.toLowerCase() === "true") {
6417
- return true;
6418
- }
6419
- if (normalized.toLowerCase() === "false") {
6420
- return false;
6421
- }
6422
- return normalized;
6423
- },
6424
- toAttribute: (value) => {
6425
- return value === false ? null : String(value);
6426
- }
6427
- };
6428
- function isAutoSelectFormatActive(value) {
6429
- return value === true || typeof value === "string" && value.trim() !== "";
6430
- }
6431
6409
  var ContentBrowserFormatDialogVariant = /* @__PURE__ */ ((ContentBrowserFormatDialogVariant2) => {
6432
6410
  ContentBrowserFormatDialogVariant2["Dialog"] = "dialog";
6433
6411
  ContentBrowserFormatDialogVariant2["Drawer"] = "drawer";
6434
6412
  return ContentBrowserFormatDialogVariant2;
6435
6413
  })(ContentBrowserFormatDialogVariant || {});
6436
- var __defProp$g = Object.defineProperty;
6437
- var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
6438
- var __decorateClass$g = (decorators, target, key, kind) => {
6439
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
6414
+ var __defProp$f = Object.defineProperty;
6415
+ var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
6416
+ var __decorateClass$f = (decorators, target, key, kind) => {
6417
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
6440
6418
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
6441
6419
  if (decorator = decorators[i4])
6442
6420
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6443
- if (kind && result) __defProp$g(target, key, result);
6421
+ if (kind && result) __defProp$f(target, key, result);
6444
6422
  return result;
6445
6423
  };
6446
6424
  let CxContentBrowserControlFilterFacet = class extends CortexElement {
@@ -6576,37 +6554,37 @@ CxContentBrowserControlFilterFacet.dependencies = {
6576
6554
  "cx-typography": CxTypography
6577
6555
  };
6578
6556
  CxContentBrowserControlFilterFacet.itemsPerPage = 10;
6579
- __decorateClass$g([
6557
+ __decorateClass$f([
6580
6558
  n$6({ attribute: "loading", reflect: false, type: Boolean })
6581
6559
  ], CxContentBrowserControlFilterFacet.prototype, "loading", 2);
6582
- __decorateClass$g([
6560
+ __decorateClass$f([
6583
6561
  n$6({ attribute: "display-name", reflect: false, type: String })
6584
6562
  ], CxContentBrowserControlFilterFacet.prototype, "displayName", 2);
6585
- __decorateClass$g([
6563
+ __decorateClass$f([
6586
6564
  n$6({ attribute: "type", reflect: true, type: String })
6587
6565
  ], CxContentBrowserControlFilterFacet.prototype, "type", 2);
6588
- __decorateClass$g([
6566
+ __decorateClass$f([
6589
6567
  n$6({ attribute: "values", reflect: false, type: Array })
6590
6568
  ], CxContentBrowserControlFilterFacet.prototype, "values", 2);
6591
- __decorateClass$g([
6569
+ __decorateClass$f([
6592
6570
  n$6({ attribute: "collections", reflect: false, type: Array })
6593
6571
  ], CxContentBrowserControlFilterFacet.prototype, "collections", 2);
6594
- __decorateClass$g([
6572
+ __decorateClass$f([
6595
6573
  r$6()
6596
6574
  ], CxContentBrowserControlFilterFacet.prototype, "mappedSubtypes", 2);
6597
- __decorateClass$g([
6575
+ __decorateClass$f([
6598
6576
  r$6()
6599
6577
  ], CxContentBrowserControlFilterFacet.prototype, "mappedDisplayNames", 2);
6600
- __decorateClass$g([
6578
+ __decorateClass$f([
6601
6579
  r$6()
6602
6580
  ], CxContentBrowserControlFilterFacet.prototype, "page", 2);
6603
- __decorateClass$g([
6581
+ __decorateClass$f([
6604
6582
  watch("values")
6605
6583
  ], CxContentBrowserControlFilterFacet.prototype, "handleValuesChange", 1);
6606
- CxContentBrowserControlFilterFacet = __decorateClass$g([
6584
+ CxContentBrowserControlFilterFacet = __decorateClass$f([
6607
6585
  customElement("cx-content-browser-control-filter-facet")
6608
6586
  ], CxContentBrowserControlFilterFacet);
6609
- const styles$e = i$7`
6587
+ const styles$d = i$7`
6610
6588
  :host {
6611
6589
  --details-width: min(240px, 90dvw);
6612
6590
 
@@ -6631,14 +6609,14 @@ const styles$e = i$7`
6631
6609
  border-left-width: 0px;
6632
6610
  }
6633
6611
  `;
6634
- var __defProp$f = Object.defineProperty;
6635
- var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
6636
- var __decorateClass$f = (decorators, target, key, kind) => {
6637
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
6612
+ var __defProp$e = Object.defineProperty;
6613
+ var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
6614
+ var __decorateClass$e = (decorators, target, key, kind) => {
6615
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
6638
6616
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
6639
6617
  if (decorator = decorators[i4])
6640
6618
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6641
- if (kind && result) __defProp$f(target, key, result);
6619
+ if (kind && result) __defProp$e(target, key, result);
6642
6620
  return result;
6643
6621
  };
6644
6622
  let CxContentBrowserControlFilter = class extends CortexElement {
@@ -6863,7 +6841,7 @@ let CxContentBrowserControlFilter = class extends CortexElement {
6863
6841
  `;
6864
6842
  }
6865
6843
  };
6866
- CxContentBrowserControlFilter.styles = [componentStyles, styles$e];
6844
+ CxContentBrowserControlFilter.styles = [componentStyles, styles$d];
6867
6845
  CxContentBrowserControlFilter.dependencies = {
6868
6846
  "cx-badge": CxBadge,
6869
6847
  "cx-button": CxButton,
@@ -6884,52 +6862,52 @@ CxContentBrowserControlFilter.dependencies = {
6884
6862
  "cx-tooltip": CxTooltip,
6885
6863
  "cx-typography": CxTypography
6886
6864
  };
6887
- __decorateClass$f([
6865
+ __decorateClass$e([
6888
6866
  n$6({ attribute: "facets", reflect: false, type: Array })
6889
6867
  ], CxContentBrowserControlFilter.prototype, "facets", 2);
6890
- __decorateClass$f([
6868
+ __decorateClass$e([
6891
6869
  n$6({ attribute: "available-facets", reflect: false, type: Array })
6892
6870
  ], CxContentBrowserControlFilter.prototype, "availableFacets", 2);
6893
- __decorateClass$f([
6871
+ __decorateClass$e([
6894
6872
  n$6({ attribute: "selected-facets", reflect: false, type: Object })
6895
6873
  ], CxContentBrowserControlFilter.prototype, "selectedFacets", 2);
6896
- __decorateClass$f([
6874
+ __decorateClass$e([
6897
6875
  n$6({ attribute: "loading", reflect: false, type: Boolean })
6898
6876
  ], CxContentBrowserControlFilter.prototype, "loading", 2);
6899
- __decorateClass$f([
6877
+ __decorateClass$e([
6900
6878
  n$6({ attribute: "newly-changed-option", reflect: false, type: Object })
6901
6879
  ], CxContentBrowserControlFilter.prototype, "newlyChangedOption", 2);
6902
- __decorateClass$f([
6880
+ __decorateClass$e([
6903
6881
  n$6({ attribute: "is-mobile", reflect: false, type: Boolean })
6904
6882
  ], CxContentBrowserControlFilter.prototype, "isMobile", 2);
6905
- __decorateClass$f([
6883
+ __decorateClass$e([
6906
6884
  r$6()
6907
6885
  ], CxContentBrowserControlFilter.prototype, "appliedFiltersCount", 2);
6908
- __decorateClass$f([
6886
+ __decorateClass$e([
6909
6887
  r$6()
6910
6888
  ], CxContentBrowserControlFilter.prototype, "mappedDisplayNames", 2);
6911
- __decorateClass$f([
6889
+ __decorateClass$e([
6912
6890
  watch("facets")
6913
6891
  ], CxContentBrowserControlFilter.prototype, "handleFacetsChange", 1);
6914
- __decorateClass$f([
6892
+ __decorateClass$e([
6915
6893
  watch("selectedFacets")
6916
6894
  ], CxContentBrowserControlFilter.prototype, "handleSelectedFacetsChange", 1);
6917
- CxContentBrowserControlFilter = __decorateClass$f([
6895
+ CxContentBrowserControlFilter = __decorateClass$e([
6918
6896
  customElement("cx-content-browser-control-filter")
6919
6897
  ], CxContentBrowserControlFilter);
6920
- const styles$d = i$7`
6898
+ const styles$c = i$7`
6921
6899
  :host {
6922
6900
  display: contents;
6923
6901
  }
6924
6902
  `;
6925
- var __defProp$e = Object.defineProperty;
6926
- var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
6927
- var __decorateClass$e = (decorators, target, key, kind) => {
6928
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
6903
+ var __defProp$d = Object.defineProperty;
6904
+ var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
6905
+ var __decorateClass$d = (decorators, target, key, kind) => {
6906
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
6929
6907
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
6930
6908
  if (decorator = decorators[i4])
6931
6909
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6932
- if (kind && result) __defProp$e(target, key, result);
6910
+ if (kind && result) __defProp$d(target, key, result);
6933
6911
  return result;
6934
6912
  };
6935
6913
  let CxContentBrowserControlSort = class extends CortexElement {
@@ -7068,7 +7046,7 @@ let CxContentBrowserControlSort = class extends CortexElement {
7068
7046
  `;
7069
7047
  }
7070
7048
  };
7071
- CxContentBrowserControlSort.styles = [componentStyles, styles$d];
7049
+ CxContentBrowserControlSort.styles = [componentStyles, styles$c];
7072
7050
  CxContentBrowserControlSort.dependencies = {
7073
7051
  "cx-divider": CxDivider,
7074
7052
  "cx-dropdown": CxDropdown,
@@ -7079,40 +7057,40 @@ CxContentBrowserControlSort.dependencies = {
7079
7057
  "cx-spinner": CxSpinner,
7080
7058
  "cx-tooltip": CxTooltip
7081
7059
  };
7082
- __decorateClass$e([
7060
+ __decorateClass$d([
7083
7061
  n$6({ attribute: "sort-order-name", reflect: true, type: String })
7084
7062
  ], CxContentBrowserControlSort.prototype, "sortOrderName", 2);
7085
- __decorateClass$e([
7063
+ __decorateClass$d([
7086
7064
  n$6({ attribute: "sort-direction", reflect: true, type: String })
7087
7065
  ], CxContentBrowserControlSort.prototype, "sortDirection", 2);
7088
- __decorateClass$e([
7066
+ __decorateClass$d([
7089
7067
  n$6({ attribute: "sort-orders", reflect: false, type: Array })
7090
7068
  ], CxContentBrowserControlSort.prototype, "sortOrders", 2);
7091
- __decorateClass$e([
7069
+ __decorateClass$d([
7092
7070
  n$6({ attribute: "loading", reflect: true, type: Boolean })
7093
7071
  ], CxContentBrowserControlSort.prototype, "loading", 2);
7094
- __decorateClass$e([
7072
+ __decorateClass$d([
7095
7073
  n$6({ attribute: "is-mobile", reflect: false, type: Boolean })
7096
7074
  ], CxContentBrowserControlSort.prototype, "isMobile", 2);
7097
- __decorateClass$e([
7075
+ __decorateClass$d([
7098
7076
  n$6({ attribute: "newly-changed-option", reflect: false, type: Object })
7099
7077
  ], CxContentBrowserControlSort.prototype, "newlyChangedOption", 2);
7100
- __decorateClass$e([
7078
+ __decorateClass$d([
7101
7079
  r$6()
7102
7080
  ], CxContentBrowserControlSort.prototype, "mappedSortDirections", 2);
7103
- __decorateClass$e([
7081
+ __decorateClass$d([
7104
7082
  r$6()
7105
7083
  ], CxContentBrowserControlSort.prototype, "sortDirections", 2);
7106
- __decorateClass$e([
7084
+ __decorateClass$d([
7107
7085
  watch("sortOrderName"),
7108
7086
  watch("sortDirection"),
7109
7087
  watch("sortOrders", { waitUntilFirstUpdate: true }),
7110
7088
  watch("sortDirections", { waitUntilFirstUpdate: true })
7111
7089
  ], CxContentBrowserControlSort.prototype, "handleSortDirectionsChange", 1);
7112
- CxContentBrowserControlSort = __decorateClass$e([
7090
+ CxContentBrowserControlSort = __decorateClass$d([
7113
7091
  customElement("cx-content-browser-control-sort")
7114
7092
  ], CxContentBrowserControlSort);
7115
- const styles$c = i$7`
7093
+ const styles$b = i$7`
7116
7094
  :host {
7117
7095
  display: contents;
7118
7096
  }
@@ -7122,14 +7100,14 @@ const styles$c = i$7`
7122
7100
  --checked-icon-display: none;
7123
7101
  }
7124
7102
  `;
7125
- var __defProp$d = Object.defineProperty;
7126
- var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
7127
- var __decorateClass$d = (decorators, target, key, kind) => {
7128
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
7103
+ var __defProp$c = Object.defineProperty;
7104
+ var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
7105
+ var __decorateClass$c = (decorators, target, key, kind) => {
7106
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
7129
7107
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
7130
7108
  if (decorator = decorators[i4])
7131
7109
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7132
- if (kind && result) __defProp$d(target, key, result);
7110
+ if (kind && result) __defProp$c(target, key, result);
7133
7111
  return result;
7134
7112
  };
7135
7113
  let CxContentBrowserControlView = class extends CortexElement {
@@ -7140,10 +7118,6 @@ let CxContentBrowserControlView = class extends CortexElement {
7140
7118
  this.views = [];
7141
7119
  this.isSeeThrough = false;
7142
7120
  this.isMobile = false;
7143
- this.canUseTable = false;
7144
- }
7145
- get isTable() {
7146
- return this.view === TABLE_VIEW;
7147
7121
  }
7148
7122
  runConnectedCallback() {
7149
7123
  this.handleViewChange();
@@ -7163,21 +7137,6 @@ let CxContentBrowserControlView = class extends CortexElement {
7163
7137
  }
7164
7138
  });
7165
7139
  }
7166
- renderTableOption() {
7167
- if (!this.canUseTable) {
7168
- return A$1;
7169
- }
7170
- return b`
7171
- <cx-menu-item
7172
- value=${TABLE_VIEW}
7173
- type="checkbox"
7174
- ?checked=${this.isTable}
7175
- >
7176
- <cx-line-clamp lines="1">${this.localize.term("table")}</cx-line-clamp>
7177
- <cx-icon slot="prefix" name="table_rows"></cx-icon>
7178
- </cx-menu-item>
7179
- `;
7180
- }
7181
7140
  handleViewChange() {
7182
7141
  this.selectedView = this.views.find((item) => item.value === this.view);
7183
7142
  }
@@ -7195,7 +7154,7 @@ let CxContentBrowserControlView = class extends CortexElement {
7195
7154
  <div slot="trigger">
7196
7155
  <cx-tooltip content=${this.localize.term("view")}>
7197
7156
  <cx-icon-button
7198
- name=${this.isTable ? "table_rows" : "dashboard"}
7157
+ name="dashboard"
7199
7158
  label=${this.localize.term("view")}
7200
7159
  outline
7201
7160
  ></cx-icon-button>
@@ -7222,7 +7181,6 @@ let CxContentBrowserControlView = class extends CortexElement {
7222
7181
  )}
7223
7182
  <cx-icon slot="prefix" name="grid_view"></cx-icon>
7224
7183
  </cx-menu-item>
7225
- ${this.renderTableOption()}
7226
7184
  <cx-divider></cx-divider>
7227
7185
  <cx-menu-item value="see-thru" class="menu-item--switch">
7228
7186
  <cx-space direction="horizontal" justify-content="space-between">
@@ -7256,7 +7214,7 @@ let CxContentBrowserControlView = class extends CortexElement {
7256
7214
  () => b`
7257
7215
  <cx-menu key="default-menu" no-uncheck>
7258
7216
  <cx-menu-label>${this.localize.term("view")}</cx-menu-label>
7259
- <cx-menu-item type="checkbox" ?checked=${!this.isTable}>
7217
+ <cx-menu-item type="checkbox">
7260
7218
  ${this.localize.term("grid")}
7261
7219
  ${n$5(
7262
7220
  this.selectedView,
@@ -7285,7 +7243,6 @@ let CxContentBrowserControlView = class extends CortexElement {
7285
7243
  </cx-menu>
7286
7244
  <cx-icon slot="prefix" name="grid_view"></cx-icon>
7287
7245
  </cx-menu-item>
7288
- ${this.renderTableOption()}
7289
7246
  <cx-divider></cx-divider>
7290
7247
  <cx-menu-item value="see-thru" class="menu-item--switch">
7291
7248
  <cx-space direction="horizontal" justify-content="space-between">
@@ -7303,7 +7260,7 @@ let CxContentBrowserControlView = class extends CortexElement {
7303
7260
  `;
7304
7261
  }
7305
7262
  };
7306
- CxContentBrowserControlView.styles = [componentStyles, styles$c];
7263
+ CxContentBrowserControlView.styles = [componentStyles, styles$b];
7307
7264
  CxContentBrowserControlView.dependencies = {
7308
7265
  "cx-divider": CxDivider,
7309
7266
  "cx-dropdown": CxDropdown,
@@ -7317,31 +7274,28 @@ CxContentBrowserControlView.dependencies = {
7317
7274
  "cx-switch": CxSwitch,
7318
7275
  "cx-tooltip": CxTooltip
7319
7276
  };
7320
- __decorateClass$d([
7277
+ __decorateClass$c([
7321
7278
  n$6({ attribute: "view", reflect: true, type: String })
7322
7279
  ], CxContentBrowserControlView.prototype, "view", 2);
7323
- __decorateClass$d([
7280
+ __decorateClass$c([
7324
7281
  n$6({ attribute: "views", reflect: false, type: Array })
7325
7282
  ], CxContentBrowserControlView.prototype, "views", 2);
7326
- __decorateClass$d([
7283
+ __decorateClass$c([
7327
7284
  n$6({ attribute: "is-see-through", reflect: true, type: Boolean })
7328
7285
  ], CxContentBrowserControlView.prototype, "isSeeThrough", 2);
7329
- __decorateClass$d([
7286
+ __decorateClass$c([
7330
7287
  n$6({ attribute: "is-mobile", reflect: false, type: Boolean })
7331
7288
  ], CxContentBrowserControlView.prototype, "isMobile", 2);
7332
- __decorateClass$d([
7333
- n$6({ attribute: "can-use-table", reflect: true, type: Boolean })
7334
- ], CxContentBrowserControlView.prototype, "canUseTable", 2);
7335
- __decorateClass$d([
7289
+ __decorateClass$c([
7336
7290
  r$6()
7337
7291
  ], CxContentBrowserControlView.prototype, "selectedView", 2);
7338
- __decorateClass$d([
7292
+ __decorateClass$c([
7339
7293
  watch("view", { waitUntilFirstUpdate: true })
7340
7294
  ], CxContentBrowserControlView.prototype, "handleViewChange", 1);
7341
- CxContentBrowserControlView = __decorateClass$d([
7295
+ CxContentBrowserControlView = __decorateClass$c([
7342
7296
  customElement("cx-content-browser-control-view")
7343
7297
  ], CxContentBrowserControlView);
7344
- const styles$b = i$7`
7298
+ const styles$a = i$7`
7345
7299
  :host {
7346
7300
  display: block;
7347
7301
  }
@@ -7364,14 +7318,14 @@ const styles$b = i$7`
7364
7318
  margin-left: auto;
7365
7319
  }
7366
7320
  `;
7367
- var __defProp$c = Object.defineProperty;
7368
- var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
7369
- var __decorateClass$c = (decorators, target, key, kind) => {
7370
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
7321
+ var __defProp$b = Object.defineProperty;
7322
+ var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
7323
+ var __decorateClass$b = (decorators, target, key, kind) => {
7324
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
7371
7325
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
7372
7326
  if (decorator = decorators[i4])
7373
7327
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7374
- if (kind && result) __defProp$c(target, key, result);
7328
+ if (kind && result) __defProp$b(target, key, result);
7375
7329
  return result;
7376
7330
  };
7377
7331
  let CxContentBrowserControlBar = class extends CortexElement {
@@ -7392,7 +7346,6 @@ let CxContentBrowserControlBar = class extends CortexElement {
7392
7346
  this.loading = false;
7393
7347
  this.searchText = "";
7394
7348
  this.isMobile = false;
7395
- this.canUseTable = false;
7396
7349
  }
7397
7350
  handleSearchChange(event) {
7398
7351
  this.searchText = event.target.value;
@@ -7440,7 +7393,6 @@ let CxContentBrowserControlBar = class extends CortexElement {
7440
7393
  <cx-content-browser-control-view
7441
7394
  view=${this.view}
7442
7395
  .views=${this.views}
7443
- ?can-use-table=${this.canUseTable}
7444
7396
  ?is-see-through=${this.isSeeThrough}
7445
7397
  ?is-mobile=${this.isMobile}
7446
7398
  ></cx-content-browser-control-view>
@@ -7457,7 +7409,7 @@ let CxContentBrowserControlBar = class extends CortexElement {
7457
7409
  `;
7458
7410
  }
7459
7411
  };
7460
- CxContentBrowserControlBar.styles = [componentStyles, styles$b];
7412
+ CxContentBrowserControlBar.styles = [componentStyles, styles$a];
7461
7413
  CxContentBrowserControlBar.dependencies = {
7462
7414
  "cx-avatar": CxAvatar,
7463
7415
  "cx-content-browser-control-filter": CxContentBrowserControlFilter,
@@ -7469,55 +7421,52 @@ CxContentBrowserControlBar.dependencies = {
7469
7421
  "cx-space": CxSpace,
7470
7422
  "cx-typography": CxTypography
7471
7423
  };
7472
- __decorateClass$c([
7424
+ __decorateClass$b([
7473
7425
  n$6({ attribute: "current-count", type: Number })
7474
7426
  ], CxContentBrowserControlBar.prototype, "currentCount", 2);
7475
- __decorateClass$c([
7427
+ __decorateClass$b([
7476
7428
  n$6({ attribute: "total-count", type: Number })
7477
7429
  ], CxContentBrowserControlBar.prototype, "totalCount", 2);
7478
- __decorateClass$c([
7430
+ __decorateClass$b([
7479
7431
  n$6({ attribute: "sort-order-name", reflect: true, type: String })
7480
7432
  ], CxContentBrowserControlBar.prototype, "sortOrderName", 2);
7481
- __decorateClass$c([
7433
+ __decorateClass$b([
7482
7434
  n$6({ attribute: "sort-direction", reflect: true, type: String })
7483
7435
  ], CxContentBrowserControlBar.prototype, "sortDirection", 2);
7484
- __decorateClass$c([
7436
+ __decorateClass$b([
7485
7437
  n$6({ attribute: "sort-orders", reflect: false, type: Array })
7486
7438
  ], CxContentBrowserControlBar.prototype, "sortOrders", 2);
7487
- __decorateClass$c([
7439
+ __decorateClass$b([
7488
7440
  n$6({ attribute: "view", reflect: true, type: String })
7489
7441
  ], CxContentBrowserControlBar.prototype, "view", 2);
7490
- __decorateClass$c([
7442
+ __decorateClass$b([
7491
7443
  n$6({ attribute: "views", reflect: false, type: Array })
7492
7444
  ], CxContentBrowserControlBar.prototype, "views", 2);
7493
- __decorateClass$c([
7445
+ __decorateClass$b([
7494
7446
  n$6({ attribute: "facets", reflect: false, type: Array })
7495
7447
  ], CxContentBrowserControlBar.prototype, "facets", 2);
7496
- __decorateClass$c([
7448
+ __decorateClass$b([
7497
7449
  n$6({ attribute: "available-facets", reflect: false, type: Array })
7498
7450
  ], CxContentBrowserControlBar.prototype, "availableFacets", 2);
7499
- __decorateClass$c([
7451
+ __decorateClass$b([
7500
7452
  n$6({ attribute: "selected-facets", reflect: false, type: Object })
7501
7453
  ], CxContentBrowserControlBar.prototype, "selectedFacets", 2);
7502
- __decorateClass$c([
7454
+ __decorateClass$b([
7503
7455
  n$6({ attribute: "is-see-through", reflect: true, type: Boolean })
7504
7456
  ], CxContentBrowserControlBar.prototype, "isSeeThrough", 2);
7505
- __decorateClass$c([
7457
+ __decorateClass$b([
7506
7458
  n$6({ attribute: "loading", reflect: true, type: Boolean })
7507
7459
  ], CxContentBrowserControlBar.prototype, "loading", 2);
7508
- __decorateClass$c([
7460
+ __decorateClass$b([
7509
7461
  n$6({ attribute: false, reflect: false, type: Object })
7510
7462
  ], CxContentBrowserControlBar.prototype, "newlyChangedOption", 2);
7511
- __decorateClass$c([
7463
+ __decorateClass$b([
7512
7464
  n$6({ attribute: "search-text", reflect: false, type: String })
7513
7465
  ], CxContentBrowserControlBar.prototype, "searchText", 2);
7514
- __decorateClass$c([
7466
+ __decorateClass$b([
7515
7467
  n$6({ attribute: "is-mobile", reflect: false, type: Boolean })
7516
7468
  ], CxContentBrowserControlBar.prototype, "isMobile", 2);
7517
- __decorateClass$c([
7518
- n$6({ attribute: "can-use-table", reflect: true, type: Boolean })
7519
- ], CxContentBrowserControlBar.prototype, "canUseTable", 2);
7520
- CxContentBrowserControlBar = __decorateClass$c([
7469
+ CxContentBrowserControlBar = __decorateClass$b([
7521
7470
  customElement("cx-content-browser-control-bar")
7522
7471
  ], CxContentBrowserControlBar);
7523
7472
  /**
@@ -7824,14 +7773,14 @@ var Orientation = /* @__PURE__ */ ((Orientation2) => {
7824
7773
  Orientation2["Vertical"] = "vertical";
7825
7774
  return Orientation2;
7826
7775
  })(Orientation || {});
7827
- var __defProp$b = Object.defineProperty;
7828
- var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
7829
- var __decorateClass$b = (decorators, target, key, kind) => {
7830
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
7776
+ var __defProp$a = Object.defineProperty;
7777
+ var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
7778
+ var __decorateClass$a = (decorators, target, key, kind) => {
7779
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
7831
7780
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
7832
7781
  if (decorator = decorators[i4])
7833
7782
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7834
- if (kind && result) __defProp$b(target, key, result);
7783
+ if (kind && result) __defProp$a(target, key, result);
7835
7784
  return result;
7836
7785
  };
7837
7786
  let CxContentBrowserAssetPreviewVideo = class extends CortexElement {
@@ -7947,40 +7896,40 @@ CxContentBrowserAssetPreviewVideo.dependencies = {
7947
7896
  "cx-typography": CxTypography,
7948
7897
  "cx-video": CxVideo
7949
7898
  };
7950
- __decorateClass$b([
7899
+ __decorateClass$a([
7951
7900
  e$7("cx-video")
7952
7901
  ], CxContentBrowserAssetPreviewVideo.prototype, "videoElement", 2);
7953
- __decorateClass$b([
7902
+ __decorateClass$a([
7954
7903
  e$7("img")
7955
7904
  ], CxContentBrowserAssetPreviewVideo.prototype, "imageElement", 2);
7956
- __decorateClass$b([
7905
+ __decorateClass$a([
7957
7906
  n$6({ attribute: "src", reflect: true, type: String })
7958
7907
  ], CxContentBrowserAssetPreviewVideo.prototype, "src", 2);
7959
- __decorateClass$b([
7908
+ __decorateClass$a([
7960
7909
  n$6({ attribute: "alt", reflect: true, type: String })
7961
7910
  ], CxContentBrowserAssetPreviewVideo.prototype, "alt", 2);
7962
- __decorateClass$b([
7911
+ __decorateClass$a([
7963
7912
  n$6({ attribute: "thumbnail-only", reflect: true, type: Boolean })
7964
7913
  ], CxContentBrowserAssetPreviewVideo.prototype, "thumbnailOnly", 2);
7965
- __decorateClass$b([
7914
+ __decorateClass$a([
7966
7915
  n$6({ attribute: "thumbnail-src", reflect: true, type: String })
7967
7916
  ], CxContentBrowserAssetPreviewVideo.prototype, "thumbnailSrc", 2);
7968
- __decorateClass$b([
7917
+ __decorateClass$a([
7969
7918
  n$6({ reflect: true, type: Boolean })
7970
7919
  ], CxContentBrowserAssetPreviewVideo.prototype, "controls", 2);
7971
- __decorateClass$b([
7920
+ __decorateClass$a([
7972
7921
  n$6({ attribute: "loaded", reflect: true, type: Boolean })
7973
7922
  ], CxContentBrowserAssetPreviewVideo.prototype, "loaded", 2);
7974
- __decorateClass$b([
7923
+ __decorateClass$a([
7975
7924
  r$6()
7976
7925
  ], CxContentBrowserAssetPreviewVideo.prototype, "assetDirection", 2);
7977
- __decorateClass$b([
7926
+ __decorateClass$a([
7978
7927
  r$6()
7979
7928
  ], CxContentBrowserAssetPreviewVideo.prototype, "progress", 2);
7980
- CxContentBrowserAssetPreviewVideo = __decorateClass$b([
7929
+ CxContentBrowserAssetPreviewVideo = __decorateClass$a([
7981
7930
  customElement("cx-content-browser-asset-preview-video")
7982
7931
  ], CxContentBrowserAssetPreviewVideo);
7983
- const styles$a = i$7`
7932
+ const styles$9 = i$7`
7984
7933
  :host {
7985
7934
  display: block;
7986
7935
  position: relative;
@@ -8127,14 +8076,14 @@ const styles$a = i$7`
8127
8076
  transition: none;
8128
8077
  }
8129
8078
  `;
8130
- var __defProp$a = Object.defineProperty;
8131
- var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
8132
- var __decorateClass$a = (decorators, target, key, kind) => {
8133
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
8079
+ var __defProp$9 = Object.defineProperty;
8080
+ var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
8081
+ var __decorateClass$9 = (decorators, target, key, kind) => {
8082
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
8134
8083
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
8135
8084
  if (decorator = decorators[i4])
8136
8085
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8137
- if (kind && result) __defProp$a(target, key, result);
8086
+ if (kind && result) __defProp$9(target, key, result);
8138
8087
  return result;
8139
8088
  };
8140
8089
  const GIF_EXTENSION = ".gif";
@@ -8299,53 +8248,53 @@ let CxContentBrowserAssetPreview = class extends CortexElement {
8299
8248
  `;
8300
8249
  }
8301
8250
  };
8302
- CxContentBrowserAssetPreview.styles = [componentStyles, styles$a];
8251
+ CxContentBrowserAssetPreview.styles = [componentStyles, styles$9];
8303
8252
  CxContentBrowserAssetPreview.dependencies = {
8304
8253
  "cx-content-browser-asset-preview-video": CxContentBrowserAssetPreviewVideo,
8305
8254
  "cx-icon": CxIcon,
8306
8255
  "cx-skeleton": CxSkeleton,
8307
8256
  "cx-typography": CxTypography
8308
8257
  };
8309
- __decorateClass$a([
8258
+ __decorateClass$9([
8310
8259
  e$7("cx-content-browser-asset-preview-video")
8311
8260
  ], CxContentBrowserAssetPreview.prototype, "previewVideo", 2);
8312
- __decorateClass$a([
8261
+ __decorateClass$9([
8313
8262
  n$6({ attribute: "image-url", reflect: true, type: String })
8314
8263
  ], CxContentBrowserAssetPreview.prototype, "imageUrl", 2);
8315
- __decorateClass$a([
8264
+ __decorateClass$9([
8316
8265
  n$6({ attribute: "original-url", reflect: true, type: String })
8317
8266
  ], CxContentBrowserAssetPreview.prototype, "originalUrl", 2);
8318
- __decorateClass$a([
8267
+ __decorateClass$9([
8319
8268
  n$6({ attribute: "preview-url", reflect: true, type: String })
8320
8269
  ], CxContentBrowserAssetPreview.prototype, "previewUrl", 2);
8321
- __decorateClass$a([
8270
+ __decorateClass$9([
8322
8271
  n$6({ attribute: "alt", reflect: true, type: String })
8323
8272
  ], CxContentBrowserAssetPreview.prototype, "alt", 2);
8324
- __decorateClass$a([
8273
+ __decorateClass$9([
8325
8274
  n$6({ attribute: "doc-type", reflect: true, type: String })
8326
8275
  ], CxContentBrowserAssetPreview.prototype, "docType", 2);
8327
- __decorateClass$a([
8276
+ __decorateClass$9([
8328
8277
  n$6({ attribute: "extension", reflect: true, type: String })
8329
8278
  ], CxContentBrowserAssetPreview.prototype, "extension", 2);
8330
- __decorateClass$a([
8279
+ __decorateClass$9([
8331
8280
  n$6({ attribute: "in-cold-storage", reflect: true, type: Boolean })
8332
8281
  ], CxContentBrowserAssetPreview.prototype, "inColdStorage", 2);
8333
- __decorateClass$a([
8282
+ __decorateClass$9([
8334
8283
  n$6({ attribute: "thumbnail-only", reflect: true, type: Boolean })
8335
8284
  ], CxContentBrowserAssetPreview.prototype, "thumbnailOnly", 2);
8336
- __decorateClass$a([
8285
+ __decorateClass$9([
8337
8286
  n$6({ attribute: "controls", reflect: true, type: Boolean })
8338
8287
  ], CxContentBrowserAssetPreview.prototype, "controls", 2);
8339
- __decorateClass$a([
8288
+ __decorateClass$9([
8340
8289
  r$6()
8341
8290
  ], CxContentBrowserAssetPreview.prototype, "isError", 2);
8342
- __decorateClass$a([
8291
+ __decorateClass$9([
8343
8292
  r$6()
8344
8293
  ], CxContentBrowserAssetPreview.prototype, "loaded", 2);
8345
- CxContentBrowserAssetPreview = __decorateClass$a([
8294
+ CxContentBrowserAssetPreview = __decorateClass$9([
8346
8295
  customElement("cx-content-browser-asset-preview")
8347
8296
  ], CxContentBrowserAssetPreview);
8348
- const styles$9 = i$7`
8297
+ const styles$8 = i$7`
8349
8298
  :host {
8350
8299
  display: block;
8351
8300
  padding: var(--cx-spacing-small);
@@ -8355,14 +8304,14 @@ const styles$9 = i$7`
8355
8304
  width: 100%;
8356
8305
  }
8357
8306
  `;
8358
- var __defProp$9 = Object.defineProperty;
8359
- var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
8360
- var __decorateClass$9 = (decorators, target, key, kind) => {
8361
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
8307
+ var __defProp$8 = Object.defineProperty;
8308
+ var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
8309
+ var __decorateClass$8 = (decorators, target, key, kind) => {
8310
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
8362
8311
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
8363
8312
  if (decorator = decorators[i4])
8364
8313
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8365
- if (kind && result) __defProp$9(target, key, result);
8314
+ if (kind && result) __defProp$8(target, key, result);
8366
8315
  return result;
8367
8316
  };
8368
8317
  let CxContentBrowserAssetTrackingParameters = class extends CortexElement {
@@ -8471,7 +8420,7 @@ let CxContentBrowserAssetTrackingParameters = class extends CortexElement {
8471
8420
  `;
8472
8421
  }
8473
8422
  };
8474
- CxContentBrowserAssetTrackingParameters.styles = [componentStyles, styles$9];
8423
+ CxContentBrowserAssetTrackingParameters.styles = [componentStyles, styles$8];
8475
8424
  CxContentBrowserAssetTrackingParameters.dependencies = {
8476
8425
  "cx-button": CxButton,
8477
8426
  "cx-icon": CxIcon,
@@ -8480,13 +8429,13 @@ CxContentBrowserAssetTrackingParameters.dependencies = {
8480
8429
  "cx-input-group": CxInputGroup,
8481
8430
  "cx-space": CxSpace
8482
8431
  };
8483
- __decorateClass$9([
8432
+ __decorateClass$8([
8484
8433
  n$6({ attribute: false, type: Array })
8485
8434
  ], CxContentBrowserAssetTrackingParameters.prototype, "values", 2);
8486
- CxContentBrowserAssetTrackingParameters = __decorateClass$9([
8435
+ CxContentBrowserAssetTrackingParameters = __decorateClass$8([
8487
8436
  customElement("cx-content-browser-asset-tracking-parameters")
8488
8437
  ], CxContentBrowserAssetTrackingParameters);
8489
- const styles$8 = i$7`
8438
+ const styles$7 = i$7`
8490
8439
  :host {
8491
8440
  display: block;
8492
8441
  }
@@ -8595,14 +8544,14 @@ const styles$8 = i$7`
8595
8544
  color: var(--cx-color-primary);
8596
8545
  }
8597
8546
  `;
8598
- var __defProp$8 = Object.defineProperty;
8599
- var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
8600
- var __decorateClass$8 = (decorators, target, key, kind) => {
8601
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
8547
+ var __defProp$7 = Object.defineProperty;
8548
+ var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
8549
+ var __decorateClass$7 = (decorators, target, key, kind) => {
8550
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
8602
8551
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
8603
8552
  if (decorator = decorators[i4])
8604
8553
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8605
- if (kind && result) __defProp$8(target, key, result);
8554
+ if (kind && result) __defProp$7(target, key, result);
8606
8555
  return result;
8607
8556
  };
8608
8557
  const USE_REPRESENTATIVE_VALUE = "use-representative";
@@ -8852,7 +8801,7 @@ let CxContentBrowserAssetProxySelector = class extends CortexElement {
8852
8801
  `;
8853
8802
  }
8854
8803
  };
8855
- CxContentBrowserAssetProxySelector.styles = [componentStyles, styles$8];
8804
+ CxContentBrowserAssetProxySelector.styles = [componentStyles, styles$7];
8856
8805
  CxContentBrowserAssetProxySelector.dependencies = {
8857
8806
  "cx-content-browser-asset-tracking-parameters": CxContentBrowserAssetTrackingParameters,
8858
8807
  "cx-icon": CxIcon,
@@ -8862,46 +8811,46 @@ CxContentBrowserAssetProxySelector.dependencies = {
8862
8811
  "cx-switch": CxSwitch,
8863
8812
  "cx-typography": CxTypography
8864
8813
  };
8865
- __decorateClass$8([
8814
+ __decorateClass$7([
8866
8815
  n$6({ reflect: false, type: Array })
8867
8816
  ], CxContentBrowserAssetProxySelector.prototype, "items", 2);
8868
- __decorateClass$8([
8817
+ __decorateClass$7([
8869
8818
  n$6({ attribute: "can-custom-format", reflect: true, type: Boolean })
8870
8819
  ], CxContentBrowserAssetProxySelector.prototype, "canCustomFormat", 2);
8871
- __decorateClass$8([
8820
+ __decorateClass$7([
8872
8821
  n$6({ attribute: "can-use-representative", reflect: true, type: Boolean })
8873
8822
  ], CxContentBrowserAssetProxySelector.prototype, "canUseRepresentative", 2);
8874
- __decorateClass$8([
8823
+ __decorateClass$7([
8875
8824
  n$6({ attribute: "can-use-ats", reflect: true, type: Boolean })
8876
8825
  ], CxContentBrowserAssetProxySelector.prototype, "canUseATS", 2);
8877
- __decorateClass$8([
8826
+ __decorateClass$7([
8878
8827
  n$6({ attribute: "can-use-tracking", reflect: true, type: Boolean })
8879
8828
  ], CxContentBrowserAssetProxySelector.prototype, "canUseTracking", 2);
8880
- __decorateClass$8([
8829
+ __decorateClass$7([
8881
8830
  n$6({ attribute: "selected", reflect: true, type: String })
8882
8831
  ], CxContentBrowserAssetProxySelector.prototype, "selected", 2);
8883
- __decorateClass$8([
8832
+ __decorateClass$7([
8884
8833
  n$6({ attribute: "disabled-selected", reflect: true, type: Boolean })
8885
8834
  ], CxContentBrowserAssetProxySelector.prototype, "disabledSelected", 2);
8886
- __decorateClass$8([
8835
+ __decorateClass$7([
8887
8836
  n$6({ attribute: "custom-width", reflect: true, type: String })
8888
8837
  ], CxContentBrowserAssetProxySelector.prototype, "customWidth", 2);
8889
- __decorateClass$8([
8838
+ __decorateClass$7([
8890
8839
  n$6({ attribute: "custom-height", reflect: true, type: String })
8891
8840
  ], CxContentBrowserAssetProxySelector.prototype, "customHeight", 2);
8892
- __decorateClass$8([
8841
+ __decorateClass$7([
8893
8842
  n$6({ attribute: "custom-extension", reflect: true, type: String })
8894
8843
  ], CxContentBrowserAssetProxySelector.prototype, "customExtension", 2);
8895
- __decorateClass$8([
8844
+ __decorateClass$7([
8896
8845
  n$6({ attribute: "enabled-tracking", reflect: true, type: Boolean })
8897
8846
  ], CxContentBrowserAssetProxySelector.prototype, "enabledTracking", 2);
8898
- __decorateClass$8([
8847
+ __decorateClass$7([
8899
8848
  n$6({ attribute: "tracking-parameters", reflect: false, type: Array })
8900
8849
  ], CxContentBrowserAssetProxySelector.prototype, "trackingParameters", 2);
8901
- CxContentBrowserAssetProxySelector = __decorateClass$8([
8850
+ CxContentBrowserAssetProxySelector = __decorateClass$7([
8902
8851
  customElement("cx-content-browser-asset-proxy-selector")
8903
8852
  ], CxContentBrowserAssetProxySelector);
8904
- const styles$7 = i$7`
8853
+ const styles$6 = i$7`
8905
8854
  :host {
8906
8855
  display: block;
8907
8856
  width: 100%;
@@ -8974,14 +8923,14 @@ const styles$7 = i$7`
8974
8923
  font-size: var(--cx-font-size-3x-large);
8975
8924
  }
8976
8925
  `;
8977
- var __defProp$7 = Object.defineProperty;
8978
- var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
8979
- var __decorateClass$7 = (decorators, target, key, kind) => {
8980
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
8926
+ var __defProp$6 = Object.defineProperty;
8927
+ var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
8928
+ var __decorateClass$6 = (decorators, target, key, kind) => {
8929
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
8981
8930
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
8982
8931
  if (decorator = decorators[i4])
8983
8932
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8984
- if (kind && result) __defProp$7(target, key, result);
8933
+ if (kind && result) __defProp$6(target, key, result);
8985
8934
  return result;
8986
8935
  };
8987
8936
  let CxContentBrowserAssetVersionHistory = class extends CortexElement {
@@ -9053,7 +9002,7 @@ let CxContentBrowserAssetVersionHistory = class extends CortexElement {
9053
9002
  `;
9054
9003
  }
9055
9004
  };
9056
- CxContentBrowserAssetVersionHistory.styles = [componentStyles, styles$7];
9005
+ CxContentBrowserAssetVersionHistory.styles = [componentStyles, styles$6];
9057
9006
  CxContentBrowserAssetVersionHistory.dependencies = {
9058
9007
  "cx-grid": CxGrid,
9059
9008
  "cx-grid-item": CxGridItem,
@@ -9065,13 +9014,13 @@ CxContentBrowserAssetVersionHistory.dependencies = {
9065
9014
  "cx-typography": CxTypography,
9066
9015
  "cx-content-browser-asset-preview": CxContentBrowserAssetPreview
9067
9016
  };
9068
- __decorateClass$7([
9017
+ __decorateClass$6([
9069
9018
  n$6({ reflect: false, type: Array })
9070
9019
  ], CxContentBrowserAssetVersionHistory.prototype, "versions", 2);
9071
- __decorateClass$7([
9020
+ __decorateClass$6([
9072
9021
  n$6({ reflect: true, type: Boolean })
9073
9022
  ], CxContentBrowserAssetVersionHistory.prototype, "loading", 2);
9074
- CxContentBrowserAssetVersionHistory = __decorateClass$7([
9023
+ CxContentBrowserAssetVersionHistory = __decorateClass$6([
9075
9024
  customElement("cx-content-browser-asset-version-history")
9076
9025
  ], CxContentBrowserAssetVersionHistory);
9077
9026
  const dialogStyles = i$7`
@@ -9122,7 +9071,7 @@ const drawerStyles = i$7`
9122
9071
  padding: var(--cx-spacing-medium);
9123
9072
  }
9124
9073
  `;
9125
- const styles$6 = i$7`
9074
+ const styles$5 = i$7`
9126
9075
  :host {
9127
9076
  display: block;
9128
9077
  }
@@ -9162,14 +9111,14 @@ const styles$6 = i$7`
9162
9111
  width: 100%;
9163
9112
  }
9164
9113
  `;
9165
- var __defProp$6 = Object.defineProperty;
9166
- var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
9167
- var __decorateClass$6 = (decorators, target, key, kind) => {
9168
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
9114
+ var __defProp$5 = Object.defineProperty;
9115
+ var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
9116
+ var __decorateClass$5 = (decorators, target, key, kind) => {
9117
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
9169
9118
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
9170
9119
  if (decorator = decorators[i4])
9171
9120
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9172
- if (kind && result) __defProp$6(target, key, result);
9121
+ if (kind && result) __defProp$5(target, key, result);
9173
9122
  return result;
9174
9123
  };
9175
9124
  const DEFAULT_TRACKING_PARAMETERS = [{
@@ -9211,7 +9160,6 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
9211
9160
  this.canPinAsset = false;
9212
9161
  this.canTrack = false;
9213
9162
  this.canUseProxies = false;
9214
- this.autoSelectFormat = false;
9215
9163
  this.simplePick = false;
9216
9164
  this.canViewVersions = false;
9217
9165
  this.variant = ContentBrowserFormatDialogVariant.Dialog;
@@ -9252,96 +9200,33 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
9252
9200
  ], "value") : [{ displayName: this.localize.term("automatic"), value: this.autoExtension }]).filter((item) => this.shouldAppendAutoExtension || item.value !== this.autoExtension);
9253
9201
  return this.canCustomFormat && extensionList.some((item) => item.value === this.asset.extension);
9254
9202
  }
9255
- filterProxies(proxies) {
9256
- return proxies.filter((item) => {
9257
- var _a2, _b2, _c2;
9258
- const assetExtension = (_c2 = (_b2 = (_a2 = this.asset) == null ? void 0 : _a2.extension) == null ? void 0 : _b2.replace(/^\./, "")) != null ? _c2 : "";
9203
+ handleSupportedExtensionsChange() {
9204
+ var _a2, _b2;
9205
+ this.filteredProxies = this.proxies.filter((item) => {
9206
+ var _a3, _b3, _c2;
9207
+ const assetExtension = (_c2 = (_b3 = (_a3 = this.asset) == null ? void 0 : _a3.extension) == null ? void 0 : _b3.replace(/^\./, "")) != null ? _c2 : "";
9259
9208
  if (!item.extension && this.asset && assetExtension) {
9260
9209
  return this.supportedExtensions.includes(assetExtension);
9261
9210
  }
9262
9211
  return true;
9263
9212
  });
9264
- }
9265
- handleSupportedExtensionsChange() {
9266
- var _a2, _b2;
9267
- this.filteredProxies = this.filterProxies(this.proxies);
9268
9213
  this.selectedProxy = (_b2 = (_a2 = this.filteredProxies[0]) == null ? void 0 : _a2.id) != null ? _b2 : "";
9269
9214
  }
9270
- /**
9271
- * What `autoSelectFormat` resolves to for this asset: the proxy to insert with, or `undefined`
9272
- * when the dialog should open as usual.
9273
- *
9274
- * `{ proxy: undefined }` is deliberate rather than a miss — with the picker switched off there is
9275
- * no format to name and the original file is the only outcome, which is `handleProxyConfirm`'s
9276
- * no-proxy branch. With the picker on a proxy must actually resolve: confirming none emits
9277
- * nothing and would turn the click into a silent no-op, so both an empty proxy list and a format
9278
- * name that matches nothing fall back to the dialog.
9279
- */
9280
- resolveAutoSelection() {
9281
- const requested = this.autoSelectFormat;
9282
- if (!isAutoSelectFormatActive(requested)) {
9283
- return void 0;
9284
- }
9285
- if (!this.canUseProxies) {
9286
- return { proxy: void 0 };
9287
- }
9288
- if (requested === true) {
9289
- const [first] = this.filteredProxies;
9290
- return first ? { proxy: first } : void 0;
9291
- }
9292
- const wanted = String(requested).trim().toLowerCase();
9293
- const match2 = this.filteredProxies.find((proxy) => {
9294
- var _a2, _b2;
9295
- return ((_a2 = proxy.proxyName) == null ? void 0 : _a2.toLowerCase()) === wanted || ((_b2 = proxy.proxyLabel) == null ? void 0 : _b2.toLowerCase()) === wanted;
9296
- });
9297
- return match2 ? { proxy: match2 } : void 0;
9298
- }
9299
9215
  open({
9300
9216
  asset,
9301
9217
  isFavorite,
9302
9218
  isAssetPinned = false,
9303
9219
  proxies
9304
9220
  }) {
9305
- var _a2, _b2;
9306
9221
  this.asset = asset;
9307
9222
  this.isFavorite = isFavorite;
9308
9223
  this.isAssetPinned = isAssetPinned;
9309
9224
  this.proxies = proxies;
9310
- this.filteredProxies = this.filterProxies(this.proxies);
9311
- this.selectedProxy = (_b2 = (_a2 = this.filteredProxies[0]) == null ? void 0 : _a2.id) != null ? _b2 : "";
9312
- const autoSelection = this.disabledConfirm ? void 0 : this.resolveAutoSelection();
9313
- if (autoSelection) {
9314
- if (autoSelection.proxy) {
9315
- this.selectedProxy = autoSelection.proxy.id;
9316
- }
9317
- if (!this.loadingConfirm) {
9318
- this.handleProxyConfirm();
9319
- }
9320
- return;
9321
- }
9322
- this.loadingConfirm = false;
9323
9225
  this.isOpen = true;
9324
9226
  }
9325
9227
  hide() {
9326
9228
  this.handleClose();
9327
9229
  }
9328
- /**
9329
- * Show a dialog that `open()` skipped through the auto-confirm shortcut. The asset, proxies and
9330
- * resolved selection are still in place, so this lands the user on exactly the dialog the
9331
- * shortcut spared them, with its confirm button live again to retry.
9332
- */
9333
- revealAfterAutoConfirm() {
9334
- if (!this.asset) {
9335
- this.handleClose();
9336
- return;
9337
- }
9338
- this.loadingConfirm = false;
9339
- this.isOpen = true;
9340
- }
9341
- /** Whether the dialog is actually on screen — false when `open()` took the auto-confirm path. */
9342
- get isDialogOpen() {
9343
- return this.isOpen;
9344
- }
9345
9230
  setVersionHistory(versions) {
9346
9231
  this.versions = versions;
9347
9232
  this.loadingVersionHistory = false;
@@ -9825,7 +9710,7 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
9825
9710
  <cx-button
9826
9711
  class="content-browser-format__footer__button"
9827
9712
  variant="primary"
9828
- ?loading=${this.loadingConfirm || this.loadingProxies}
9713
+ ?loading=${this.loadingProxies}
9829
9714
  @click=${this.handleProxyConfirm}
9830
9715
  >
9831
9716
  <cx-icon slot="prefix" name="folder"></cx-icon>
@@ -9890,7 +9775,7 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
9890
9775
  `;
9891
9776
  }
9892
9777
  handleRequestClose(event) {
9893
- if (this.loadingConfirm || this.loadingFavorites || this.loadingPinAsset) {
9778
+ if (this.loadingFavorites || this.loadingPinAsset) {
9894
9779
  event.preventDefault();
9895
9780
  return;
9896
9781
  }
@@ -9951,7 +9836,7 @@ let CxContentBrowserFormatDialog = class extends CortexElement {
9951
9836
  `;
9952
9837
  }
9953
9838
  };
9954
- CxContentBrowserFormatDialog.styles = [componentStyles, styles$6];
9839
+ CxContentBrowserFormatDialog.styles = [componentStyles, styles$5];
9955
9840
  CxContentBrowserFormatDialog.dependencies = {
9956
9841
  "cx-asset-link-format": CxAssetLinkFormat,
9957
9842
  "cx-cropper": CxCropper,
@@ -9967,16 +9852,16 @@ CxContentBrowserFormatDialog.dependencies = {
9967
9852
  "cx-tooltip": CxTooltip,
9968
9853
  "cx-typography": CxTypography
9969
9854
  };
9970
- __decorateClass$6([
9855
+ __decorateClass$5([
9971
9856
  e$7("cx-asset-link-format")
9972
9857
  ], CxContentBrowserFormatDialog.prototype, "assetLinkFormat", 2);
9973
- __decorateClass$6([
9858
+ __decorateClass$5([
9974
9859
  n$6({ reflect: false, type: Object })
9975
9860
  ], CxContentBrowserFormatDialog.prototype, "boundary", 2);
9976
- __decorateClass$6([
9861
+ __decorateClass$5([
9977
9862
  n$6({ attribute: false, reflect: false, type: Object })
9978
9863
  ], CxContentBrowserFormatDialog.prototype, "availableExtensions", 2);
9979
- __decorateClass$6([
9864
+ __decorateClass$5([
9980
9865
  n$6({
9981
9866
  attribute: "supported-extensions",
9982
9867
  converter: {
@@ -9987,7 +9872,7 @@ __decorateClass$6([
9987
9872
  type: Array
9988
9873
  })
9989
9874
  ], CxContentBrowserFormatDialog.prototype, "supportedExtensions", 2);
9990
- __decorateClass$6([
9875
+ __decorateClass$5([
9991
9876
  n$6({
9992
9877
  attribute: "supported-representative-subtypes",
9993
9878
  converter: {
@@ -9998,116 +9883,113 @@ __decorateClass$6([
9998
9883
  type: Array
9999
9884
  })
10000
9885
  ], CxContentBrowserFormatDialog.prototype, "supportedRepresentativeSubtypes", 2);
10001
- __decorateClass$6([
9886
+ __decorateClass$5([
10002
9887
  n$6({ attribute: "auto-extension", reflect: false, type: String })
10003
9888
  ], CxContentBrowserFormatDialog.prototype, "autoExtension", 2);
10004
- __decorateClass$6([
9889
+ __decorateClass$5([
10005
9890
  n$6({ attribute: "cta-text", reflect: false, type: String })
10006
9891
  ], CxContentBrowserFormatDialog.prototype, "ctaText", 2);
10007
- __decorateClass$6([
9892
+ __decorateClass$5([
10008
9893
  n$6({ attribute: "cta-text-transform", reflect: false, type: String })
10009
9894
  ], CxContentBrowserFormatDialog.prototype, "ctaTextTransform", 2);
10010
- __decorateClass$6([
9895
+ __decorateClass$5([
10011
9896
  n$6({ attribute: "can-custom-format", reflect: false, type: Boolean })
10012
9897
  ], CxContentBrowserFormatDialog.prototype, "canCustomFormat", 2);
10013
- __decorateClass$6([
9898
+ __decorateClass$5([
10014
9899
  n$6({ attribute: "can-favorite", reflect: false, type: Boolean })
10015
9900
  ], CxContentBrowserFormatDialog.prototype, "canFavorite", 2);
10016
- __decorateClass$6([
9901
+ __decorateClass$5([
10017
9902
  n$6({ attribute: "can-pin-asset", reflect: false, type: Boolean })
10018
9903
  ], CxContentBrowserFormatDialog.prototype, "canPinAsset", 2);
10019
- __decorateClass$6([
9904
+ __decorateClass$5([
10020
9905
  n$6({ attribute: "can-track", reflect: false, type: Boolean })
10021
9906
  ], CxContentBrowserFormatDialog.prototype, "canTrack", 2);
10022
- __decorateClass$6([
9907
+ __decorateClass$5([
10023
9908
  n$6({ attribute: "can-use-proxies", reflect: false, type: Boolean })
10024
9909
  ], CxContentBrowserFormatDialog.prototype, "canUseProxies", 2);
10025
- __decorateClass$6([
10026
- n$6({ attribute: "auto-select-format", converter: autoSelectFormatConverter, reflect: false })
10027
- ], CxContentBrowserFormatDialog.prototype, "autoSelectFormat", 2);
10028
- __decorateClass$6([
9910
+ __decorateClass$5([
10029
9911
  n$6({ attribute: "simple-pick", reflect: false, type: Boolean })
10030
9912
  ], CxContentBrowserFormatDialog.prototype, "simplePick", 2);
10031
- __decorateClass$6([
9913
+ __decorateClass$5([
10032
9914
  n$6({ attribute: "can-view-versions", reflect: false, type: Boolean })
10033
9915
  ], CxContentBrowserFormatDialog.prototype, "canViewVersions", 2);
10034
- __decorateClass$6([
9916
+ __decorateClass$5([
10035
9917
  n$6({ reflect: true, type: String })
10036
9918
  ], CxContentBrowserFormatDialog.prototype, "variant", 2);
10037
- __decorateClass$6([
9919
+ __decorateClass$5([
10038
9920
  n$6({ attribute: "loading-favorites", reflect: true, type: Boolean })
10039
9921
  ], CxContentBrowserFormatDialog.prototype, "loadingFavorites", 2);
10040
- __decorateClass$6([
9922
+ __decorateClass$5([
10041
9923
  n$6({ attribute: "loading-pin-asset", reflect: true, type: Boolean })
10042
9924
  ], CxContentBrowserFormatDialog.prototype, "loadingPinAsset", 2);
10043
- __decorateClass$6([
9925
+ __decorateClass$5([
10044
9926
  n$6({ attribute: "loading-proxies", reflect: true, type: Boolean })
10045
9927
  ], CxContentBrowserFormatDialog.prototype, "loadingProxies", 2);
10046
- __decorateClass$6([
9928
+ __decorateClass$5([
10047
9929
  n$6({ attribute: "disabled-confirm", reflect: true, type: Boolean })
10048
9930
  ], CxContentBrowserFormatDialog.prototype, "disabledConfirm", 2);
10049
- __decorateClass$6([
9931
+ __decorateClass$5([
10050
9932
  n$6({ attribute: "token", type: String })
10051
9933
  ], CxContentBrowserFormatDialog.prototype, "token", 2);
10052
- __decorateClass$6([
9934
+ __decorateClass$5([
10053
9935
  n$6({ attribute: "base-url", type: String })
10054
9936
  ], CxContentBrowserFormatDialog.prototype, "baseUrl", 2);
10055
- __decorateClass$6([
9937
+ __decorateClass$5([
10056
9938
  r$6()
10057
9939
  ], CxContentBrowserFormatDialog.prototype, "asset", 2);
10058
- __decorateClass$6([
9940
+ __decorateClass$5([
10059
9941
  r$6()
10060
9942
  ], CxContentBrowserFormatDialog.prototype, "isOpen", 2);
10061
- __decorateClass$6([
9943
+ __decorateClass$5([
10062
9944
  r$6()
10063
9945
  ], CxContentBrowserFormatDialog.prototype, "isFavorite", 2);
10064
- __decorateClass$6([
9946
+ __decorateClass$5([
10065
9947
  r$6()
10066
9948
  ], CxContentBrowserFormatDialog.prototype, "isAssetPinned", 2);
10067
- __decorateClass$6([
9949
+ __decorateClass$5([
10068
9950
  r$6()
10069
9951
  ], CxContentBrowserFormatDialog.prototype, "proxies", 2);
10070
- __decorateClass$6([
9952
+ __decorateClass$5([
10071
9953
  r$6()
10072
9954
  ], CxContentBrowserFormatDialog.prototype, "showVersionHistory", 2);
10073
- __decorateClass$6([
9955
+ __decorateClass$5([
10074
9956
  r$6()
10075
9957
  ], CxContentBrowserFormatDialog.prototype, "showCustomFormat", 2);
10076
- __decorateClass$6([
9958
+ __decorateClass$5([
10077
9959
  r$6()
10078
9960
  ], CxContentBrowserFormatDialog.prototype, "loadingVersionHistory", 2);
10079
- __decorateClass$6([
9961
+ __decorateClass$5([
10080
9962
  r$6()
10081
9963
  ], CxContentBrowserFormatDialog.prototype, "versions", 2);
10082
- __decorateClass$6([
9964
+ __decorateClass$5([
10083
9965
  r$6()
10084
9966
  ], CxContentBrowserFormatDialog.prototype, "filteredProxies", 2);
10085
- __decorateClass$6([
9967
+ __decorateClass$5([
10086
9968
  r$6()
10087
9969
  ], CxContentBrowserFormatDialog.prototype, "selectedProxy", 2);
10088
- __decorateClass$6([
9970
+ __decorateClass$5([
10089
9971
  r$6()
10090
9972
  ], CxContentBrowserFormatDialog.prototype, "lastProxyBeforeCustomFormat", 2);
10091
- __decorateClass$6([
9973
+ __decorateClass$5([
10092
9974
  r$6()
10093
9975
  ], CxContentBrowserFormatDialog.prototype, "confirmedTransformations", 2);
10094
- __decorateClass$6([
9976
+ __decorateClass$5([
10095
9977
  r$6()
10096
9978
  ], CxContentBrowserFormatDialog.prototype, "confirmedFormat", 2);
10097
- __decorateClass$6([
9979
+ __decorateClass$5([
10098
9980
  r$6()
10099
9981
  ], CxContentBrowserFormatDialog.prototype, "loadingConfirm", 2);
10100
- __decorateClass$6([
9982
+ __decorateClass$5([
10101
9983
  r$6()
10102
9984
  ], CxContentBrowserFormatDialog.prototype, "enabledTracking", 2);
10103
- __decorateClass$6([
9985
+ __decorateClass$5([
10104
9986
  r$6()
10105
9987
  ], CxContentBrowserFormatDialog.prototype, "trackingParameters", 2);
10106
- __decorateClass$6([
9988
+ __decorateClass$5([
10107
9989
  watch("proxies", { waitUntilFirstUpdate: true }),
10108
9990
  watch("supportedExtensions")
10109
9991
  ], CxContentBrowserFormatDialog.prototype, "handleSupportedExtensionsChange", 1);
10110
- CxContentBrowserFormatDialog = __decorateClass$6([
9992
+ CxContentBrowserFormatDialog = __decorateClass$5([
10111
9993
  customElement("cx-content-browser-format-dialog")
10112
9994
  ], CxContentBrowserFormatDialog);
10113
9995
  function __decorate(decorators, target, key, desc) {
@@ -11906,7 +11788,7 @@ class GridLayout extends GridBaseLayout {
11906
11788
  this._scrollSize = size;
11907
11789
  }
11908
11790
  }
11909
- const styles$5 = i$7`
11791
+ const styles$4 = i$7`
11910
11792
  :host {
11911
11793
  display: block;
11912
11794
  }
@@ -11942,44 +11824,6 @@ const styles$5 = i$7`
11942
11824
  line-height: var(--cx-line-height-small);
11943
11825
  }
11944
11826
 
11945
- /*
11946
- * Affordance only, never a second control: pointer-events stay off so the click lands on the card
11947
- * beneath and takes the one path a card click already takes, and the button is aria-hidden and
11948
- * untabbable so the card is still the single thing announced and focused.
11949
- */
11950
- .content-browser-asset-card__cta {
11951
- /*
11952
- * Positioned against the card's base, not the image slot, so the image box has to be described
11953
- * here: inset by the card's own padding and given the same aspect-ratio ::part(image) carries,
11954
- * which lands it exactly on the thumbnail. Without this it covers the title row too and centres
11955
- * the button on the card rather than on the image. Keep the ratio in step with ::part(image).
11956
- */
11957
- position: absolute;
11958
- inset: var(--cx-spacing-x-small);
11959
- bottom: auto;
11960
- aspect-ratio: 246 / 180;
11961
- z-index: 1;
11962
- display: flex;
11963
- align-items: center;
11964
- justify-content: center;
11965
- background-color: rgb(0 0 0 / 35%);
11966
- opacity: 0;
11967
- pointer-events: none;
11968
- transition: opacity 150ms ease;
11969
- }
11970
-
11971
- .content-browser-asset-card:hover .content-browser-asset-card__cta,
11972
- .content-browser-asset-card:focus-within .content-browser-asset-card__cta,
11973
- .content-browser-asset-card__cta--busy {
11974
- opacity: 1;
11975
- }
11976
-
11977
- @media (prefers-reduced-motion: reduce) {
11978
- .content-browser-asset-card__cta {
11979
- transition: none;
11980
- }
11981
- }
11982
-
11983
11827
  .content-browser-asset-card__checkbox {
11984
11828
  position: absolute;
11985
11829
  top: 2px;
@@ -11992,24 +11836,19 @@ const styles$5 = i$7`
11992
11836
  pointer-events: none;
11993
11837
  }
11994
11838
  `;
11995
- var __defProp$5 = Object.defineProperty;
11996
- var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
11997
- var __decorateClass$5 = (decorators, target, key, kind) => {
11998
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
11839
+ var __defProp$4 = Object.defineProperty;
11840
+ var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
11841
+ var __decorateClass$4 = (decorators, target, key, kind) => {
11842
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
11999
11843
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
12000
11844
  if (decorator = decorators[i4])
12001
11845
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12002
- if (kind && result) __defProp$5(target, key, result);
11846
+ if (kind && result) __defProp$4(target, key, result);
12003
11847
  return result;
12004
11848
  };
12005
11849
  let CxContentBrowserAssetCard = class extends CortexElement {
12006
11850
  constructor() {
12007
11851
  super(...arguments);
12008
- this.localize = new LocalizeController(this);
12009
- this.showCta = false;
12010
- this.ctaText = "";
12011
- this.ctaTextTransform = "capitalize";
12012
- this.busy = false;
12013
11852
  this.imageUrl = "";
12014
11853
  this.originalUrl = "";
12015
11854
  this.scrubUrl = "";
@@ -12077,26 +11916,6 @@ let CxContentBrowserAssetCard = class extends CortexElement {
12077
11916
  ?thumbnail-only=${this.view === "small"}
12078
11917
  ?in-cold-storage=${this.inColdStorage}
12079
11918
  ></cx-content-browser-asset-preview>
12080
- ${n$5(
12081
- this.showCta && !this.inColdStorage,
12082
- () => b`
12083
- <div
12084
- slot="image"
12085
- class=${e$5({
12086
- "content-browser-asset-card__cta": true,
12087
- "content-browser-asset-card__cta--busy": this.busy
12088
- })}
12089
- aria-hidden="true"
12090
- >
12091
- <cx-button size="small" variant="primary" tabindex="-1" ?loading=${this.busy}>
12092
- <span style=${o$2({ textTransform: this.ctaTextTransform })}>
12093
- ${this.ctaText || this.localize.term("insert")}
12094
- </span>
12095
- </cx-button>
12096
- </div>
12097
- `,
12098
- () => A$1
12099
- )}
12100
11919
  <cx-space spacing="small" align-items="center" wrap="nowrap" class="content-browser-asset-card__info">
12101
11920
  ${n$5(
12102
11921
  this.showTitle && this.assetName,
@@ -12207,10 +12026,9 @@ let CxContentBrowserAssetCard = class extends CortexElement {
12207
12026
  `;
12208
12027
  }
12209
12028
  };
12210
- CxContentBrowserAssetCard.styles = [componentStyles, styles$5];
12029
+ CxContentBrowserAssetCard.styles = [componentStyles, styles$4];
12211
12030
  CxContentBrowserAssetCard.dependencies = {
12212
12031
  "cx-array-line-clamp": CxArrayLineClamp,
12213
- "cx-button": CxButton,
12214
12032
  "cx-card": CxCard,
12215
12033
  "cx-checkbox": CxCheckbox,
12216
12034
  "cx-content-browser-asset-preview": CxContentBrowserAssetPreview,
@@ -12219,58 +12037,46 @@ CxContentBrowserAssetCard.dependencies = {
12219
12037
  "cx-tag": CxTag,
12220
12038
  "cx-typography": CxTypography
12221
12039
  };
12222
- __decorateClass$5([
12223
- n$6({ attribute: "show-cta", reflect: true, type: Boolean })
12224
- ], CxContentBrowserAssetCard.prototype, "showCta", 2);
12225
- __decorateClass$5([
12226
- n$6({ attribute: "cta-text", reflect: false, type: String })
12227
- ], CxContentBrowserAssetCard.prototype, "ctaText", 2);
12228
- __decorateClass$5([
12229
- n$6({ attribute: "cta-text-transform", reflect: false, type: String })
12230
- ], CxContentBrowserAssetCard.prototype, "ctaTextTransform", 2);
12231
- __decorateClass$5([
12232
- n$6({ attribute: "busy", reflect: true, type: Boolean })
12233
- ], CxContentBrowserAssetCard.prototype, "busy", 2);
12234
- __decorateClass$5([
12040
+ __decorateClass$4([
12235
12041
  n$6({ attribute: "image-url", reflect: true, type: String })
12236
12042
  ], CxContentBrowserAssetCard.prototype, "imageUrl", 2);
12237
- __decorateClass$5([
12043
+ __decorateClass$4([
12238
12044
  n$6({ attribute: "original-url", reflect: true, type: String })
12239
12045
  ], CxContentBrowserAssetCard.prototype, "originalUrl", 2);
12240
- __decorateClass$5([
12046
+ __decorateClass$4([
12241
12047
  n$6({ attribute: "scrub-url", reflect: true, type: String })
12242
12048
  ], CxContentBrowserAssetCard.prototype, "scrubUrl", 2);
12243
- __decorateClass$5([
12049
+ __decorateClass$4([
12244
12050
  n$6({ attribute: "asset-id", reflect: true, type: String })
12245
12051
  ], CxContentBrowserAssetCard.prototype, "assetId", 2);
12246
- __decorateClass$5([
12052
+ __decorateClass$4([
12247
12053
  n$6({ attribute: "asset-name", reflect: true, type: String })
12248
12054
  ], CxContentBrowserAssetCard.prototype, "assetName", 2);
12249
- __decorateClass$5([
12055
+ __decorateClass$4([
12250
12056
  n$6({ attribute: "asset-width", reflect: true, type: String })
12251
12057
  ], CxContentBrowserAssetCard.prototype, "assetWidth", 2);
12252
- __decorateClass$5([
12058
+ __decorateClass$4([
12253
12059
  n$6({ attribute: "asset-height", reflect: true, type: String })
12254
12060
  ], CxContentBrowserAssetCard.prototype, "assetHeight", 2);
12255
- __decorateClass$5([
12061
+ __decorateClass$4([
12256
12062
  n$6({ attribute: "asset-size", reflect: true, type: String })
12257
12063
  ], CxContentBrowserAssetCard.prototype, "assetSize", 2);
12258
- __decorateClass$5([
12064
+ __decorateClass$4([
12259
12065
  n$6({ attribute: "extension", reflect: true, type: String })
12260
12066
  ], CxContentBrowserAssetCard.prototype, "extension", 2);
12261
- __decorateClass$5([
12067
+ __decorateClass$4([
12262
12068
  n$6({ attribute: "in-cold-storage", reflect: true, type: Boolean })
12263
12069
  ], CxContentBrowserAssetCard.prototype, "inColdStorage", 2);
12264
- __decorateClass$5([
12070
+ __decorateClass$4([
12265
12071
  n$6({ attribute: "doc-type", reflect: true, type: String })
12266
12072
  ], CxContentBrowserAssetCard.prototype, "docType", 2);
12267
- __decorateClass$5([
12073
+ __decorateClass$4([
12268
12074
  n$6({ attribute: "view", reflect: true, type: String })
12269
12075
  ], CxContentBrowserAssetCard.prototype, "view", 2);
12270
- __decorateClass$5([
12076
+ __decorateClass$4([
12271
12077
  n$6({ attribute: "selected", reflect: true, type: Boolean })
12272
12078
  ], CxContentBrowserAssetCard.prototype, "selected", 2);
12273
- __decorateClass$5([
12079
+ __decorateClass$4([
12274
12080
  n$6({
12275
12081
  converter: {
12276
12082
  fromAttribute: (value) => value ? value.split(",").map((tag) => tag.trim()).filter(Boolean) : [],
@@ -12285,25 +12091,25 @@ __decorateClass$5([
12285
12091
  type: String
12286
12092
  })
12287
12093
  ], CxContentBrowserAssetCard.prototype, "tags", 2);
12288
- __decorateClass$5([
12094
+ __decorateClass$4([
12289
12095
  n$6({ attribute: "show-tags", reflect: true, type: Boolean })
12290
12096
  ], CxContentBrowserAssetCard.prototype, "showTags", 2);
12291
- __decorateClass$5([
12097
+ __decorateClass$4([
12292
12098
  n$6({ attribute: "show-title", reflect: true, type: Boolean })
12293
12099
  ], CxContentBrowserAssetCard.prototype, "showTitle", 2);
12294
- __decorateClass$5([
12100
+ __decorateClass$4([
12295
12101
  n$6({ attribute: "show-size", reflect: true, type: Boolean })
12296
12102
  ], CxContentBrowserAssetCard.prototype, "showSize", 2);
12297
- __decorateClass$5([
12103
+ __decorateClass$4([
12298
12104
  n$6({ attribute: "show-dimensions", reflect: true, type: Boolean })
12299
12105
  ], CxContentBrowserAssetCard.prototype, "showDimensions", 2);
12300
- __decorateClass$5([
12106
+ __decorateClass$4([
12301
12107
  e$7("cx-content-browser-asset-preview")
12302
12108
  ], CxContentBrowserAssetCard.prototype, "preview", 2);
12303
- CxContentBrowserAssetCard = __decorateClass$5([
12109
+ CxContentBrowserAssetCard = __decorateClass$4([
12304
12110
  customElement("cx-content-browser-asset-card")
12305
12111
  ], CxContentBrowserAssetCard);
12306
- const styles$4 = i$7`
12112
+ const styles$3 = i$7`
12307
12113
  :host {
12308
12114
  display: flex;
12309
12115
  align-items: center;
@@ -12328,14 +12134,14 @@ const styles$4 = i$7`
12328
12134
  font-size: 96px;
12329
12135
  }
12330
12136
  `;
12331
- var __defProp$4 = Object.defineProperty;
12332
- var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
12333
- var __decorateClass$4 = (decorators, target, key, kind) => {
12334
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
12137
+ var __defProp$3 = Object.defineProperty;
12138
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
12139
+ var __decorateClass$3 = (decorators, target, key, kind) => {
12140
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
12335
12141
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
12336
12142
  if (decorator = decorators[i4])
12337
12143
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12338
- if (kind && result) __defProp$4(target, key, result);
12144
+ if (kind && result) __defProp$3(target, key, result);
12339
12145
  return result;
12340
12146
  };
12341
12147
  let CxContentBrowserNoResult = class extends CortexElement {
@@ -12353,40 +12159,36 @@ let CxContentBrowserNoResult = class extends CortexElement {
12353
12159
  `;
12354
12160
  }
12355
12161
  };
12356
- CxContentBrowserNoResult.styles = [componentStyles, styles$4];
12162
+ CxContentBrowserNoResult.styles = [componentStyles, styles$3];
12357
12163
  CxContentBrowserNoResult.dependencies = {
12358
12164
  "cx-icon": CxIcon
12359
12165
  };
12360
- __decorateClass$4([
12166
+ __decorateClass$3([
12361
12167
  n$6({ attribute: "icon", type: String })
12362
12168
  ], CxContentBrowserNoResult.prototype, "icon", 2);
12363
- __decorateClass$4([
12169
+ __decorateClass$3([
12364
12170
  n$6({ attribute: "message", type: String })
12365
12171
  ], CxContentBrowserNoResult.prototype, "message", 2);
12366
- CxContentBrowserNoResult = __decorateClass$4([
12172
+ CxContentBrowserNoResult = __decorateClass$3([
12367
12173
  customElement("cx-content-browser-no-result")
12368
12174
  ], CxContentBrowserNoResult);
12369
12175
  class ScrollAnchorController {
12370
12176
  constructor(host, options) {
12371
12177
  __privateAdd(this, _host);
12372
12178
  __privateAdd(this, _getContainer);
12373
- __privateAdd(this, _getContentOffset);
12374
12179
  __privateAdd(this, _getItemIndexById);
12375
- __privateAdd(this, _getLayoutSource);
12376
12180
  __privateAdd(this, _itemSelector);
12377
12181
  __privateAdd(this, _anchor, null);
12378
12182
  __privateAdd(this, _columnCount, 0);
12379
12183
  __privateAdd(this, _itemHeight, 0);
12380
12184
  __privateAdd(this, _pendingRestoreFrames, []);
12381
12185
  __privateAdd(this, _restoreSequence, 0);
12382
- var _a2, _b2, _c2;
12186
+ var _a2;
12383
12187
  __privateSet(this, _host, host);
12384
12188
  __privateSet(this, _getContainer, options.getContainer);
12385
- __privateSet(this, _getContentOffset, (_a2 = options.getContentOffset) != null ? _a2 : (() => 0));
12386
12189
  __privateSet(this, _getItemIndexById, options.getItemIndexById);
12387
- __privateSet(this, _getLayoutSource, (_b2 = options.getLayoutSource) != null ? _b2 : options.getContainer);
12388
12190
  __privateSet(this, _itemSelector, options.itemSelector);
12389
- (_c2 = host.addController) == null ? void 0 : _c2.call(host, this);
12191
+ (_a2 = host.addController) == null ? void 0 : _a2.call(host, this);
12390
12192
  }
12391
12193
  capture(container = __privateGet(this, _getContainer).call(this)) {
12392
12194
  if (!container || typeof container.querySelectorAll !== "function") {
@@ -12396,11 +12198,10 @@ class ScrollAnchorController {
12396
12198
  container.querySelectorAll(__privateGet(this, _itemSelector))
12397
12199
  );
12398
12200
  const containerTop = container.getBoundingClientRect().top;
12399
- const contentTop = containerTop + __privateGet(this, _getContentOffset).call(this);
12400
12201
  for (const el of children) {
12401
12202
  const rect = el.getBoundingClientRect();
12402
12203
  const id = el.assetId || el.dataset.id;
12403
- if (rect.bottom > contentTop && id) {
12204
+ if (rect.bottom > containerTop && id) {
12404
12205
  __privateSet(this, _anchor, {
12405
12206
  id,
12406
12207
  offset: rect.top - containerTop
@@ -12420,8 +12221,8 @@ class ScrollAnchorController {
12420
12221
  this.cancelPendingRestore();
12421
12222
  const sequence = ++__privateWrapper(this, _restoreSequence)._;
12422
12223
  void __privateGet(this, _host).updateComplete.then(() => __async(this, null, function* () {
12423
- var _a2, _b2;
12424
- yield (_b2 = (_a2 = __privateGet(this, _getLayoutSource).call(this)) == null ? void 0 : _a2.layoutComplete) == null ? void 0 : _b2.catch(() => void 0);
12224
+ var _a2;
12225
+ yield (_a2 = __privateGet(this, _getContainer).call(this)) == null ? void 0 : _a2.layoutComplete;
12425
12226
  if (sequence !== __privateGet(this, _restoreSequence)) {
12426
12227
  return;
12427
12228
  }
@@ -12469,10 +12270,7 @@ class ScrollAnchorController {
12469
12270
  return void 0;
12470
12271
  }
12471
12272
  const rowIndex = Math.floor(assetIndex / __privateGet(this, _columnCount));
12472
- return Math.max(
12473
- 0,
12474
- __privateGet(this, _getContentOffset).call(this) + rowIndex * __privateGet(this, _itemHeight) - __privateGet(this, _anchor).offset
12475
- );
12273
+ return Math.max(0, rowIndex * __privateGet(this, _itemHeight) - __privateGet(this, _anchor).offset);
12476
12274
  }
12477
12275
  hostDisconnected() {
12478
12276
  this.cancelPendingRestore();
@@ -12494,16 +12292,14 @@ class ScrollAnchorController {
12494
12292
  }
12495
12293
  _host = new WeakMap();
12496
12294
  _getContainer = new WeakMap();
12497
- _getContentOffset = new WeakMap();
12498
12295
  _getItemIndexById = new WeakMap();
12499
- _getLayoutSource = new WeakMap();
12500
12296
  _itemSelector = new WeakMap();
12501
12297
  _anchor = new WeakMap();
12502
12298
  _columnCount = new WeakMap();
12503
12299
  _itemHeight = new WeakMap();
12504
12300
  _pendingRestoreFrames = new WeakMap();
12505
12301
  _restoreSequence = new WeakMap();
12506
- const styles$3 = i$7`
12302
+ const styles$2 = i$7`
12507
12303
  :host {
12508
12304
  display: block;
12509
12305
  flex: 1;
@@ -12524,24 +12320,24 @@ const styles$3 = i$7`
12524
12320
  --height: 4px;
12525
12321
  }
12526
12322
  `;
12527
- var __defProp$3 = Object.defineProperty;
12528
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
12529
- var __typeError$2 = (msg) => {
12323
+ var __defProp$2 = Object.defineProperty;
12324
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
12325
+ var __typeError2 = (msg) => {
12530
12326
  throw TypeError(msg);
12531
12327
  };
12532
- var __decorateClass$3 = (decorators, target, key, kind) => {
12533
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
12328
+ var __decorateClass$2 = (decorators, target, key, kind) => {
12329
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
12534
12330
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
12535
12331
  if (decorator = decorators[i4])
12536
12332
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12537
- if (kind && result) __defProp$3(target, key, result);
12333
+ if (kind && result) __defProp$2(target, key, result);
12538
12334
  return result;
12539
12335
  };
12540
- var __accessCheck$2 = (obj, member, msg) => member.has(obj) || __typeError$2("Cannot " + msg);
12541
- var __privateGet$2 = (obj, member, getter) => (__accessCheck$2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
12542
- var __privateAdd$2 = (obj, member, value) => member.has(obj) ? __typeError$2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
12543
- var __privateSet$2 = (obj, member, value, setter) => (__accessCheck$2(obj, member, "write to private field"), member.set(obj, value), value);
12544
- var _gutter, _lastHeight$1, _lastWidth;
12336
+ var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
12337
+ var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
12338
+ 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);
12339
+ var __privateSet2 = (obj, member, value, setter) => (__accessCheck2(obj, member, "write to private field"), member.set(obj, value), value);
12340
+ var _gutter, _lastHeight, _lastWidth;
12545
12341
  let CxContentBrowserGrid = class extends CortexElement {
12546
12342
  constructor() {
12547
12343
  super();
@@ -12555,16 +12351,12 @@ let CxContentBrowserGrid = class extends CortexElement {
12555
12351
  this.showSize = true;
12556
12352
  this.showDimensions = true;
12557
12353
  this.showTags = false;
12558
- this.showCta = false;
12559
- this.ctaText = "";
12560
- this.ctaTextTransform = "capitalize";
12561
- this.busyAssetId = void 0;
12562
12354
  this.selectedAssetId = void 0;
12563
12355
  this.assetMap = /* @__PURE__ */ new Map();
12564
12356
  this.columnWidth = 0;
12565
- __privateAdd$2(this, _gutter, 8);
12566
- __privateAdd$2(this, _lastHeight$1, 0);
12567
- __privateAdd$2(this, _lastWidth, 0);
12357
+ __privateAdd2(this, _gutter, 8);
12358
+ __privateAdd2(this, _lastHeight, 0);
12359
+ __privateAdd2(this, _lastWidth, 0);
12568
12360
  this.scrollAnchorController = new ScrollAnchorController(this, {
12569
12361
  getContainer: () => this.virtualizerEl,
12570
12362
  getItemIndexById: (id) => this.assets.findIndex((asset) => asset.id === id),
@@ -12577,7 +12369,7 @@ let CxContentBrowserGrid = class extends CortexElement {
12577
12369
  }
12578
12370
  handleViewChange() {
12579
12371
  this.scrollAnchorController.capture();
12580
- this.calculatePageSize(__privateGet$2(this, _lastWidth), __privateGet$2(this, _lastHeight$1), true);
12372
+ this.calculatePageSize(__privateGet2(this, _lastWidth), __privateGet2(this, _lastHeight), true);
12581
12373
  }
12582
12374
  handleAssetsChange() {
12583
12375
  this.assetMap.clear();
@@ -12595,17 +12387,17 @@ let CxContentBrowserGrid = class extends CortexElement {
12595
12387
  this.debouncedCalculatePageSize(width, height);
12596
12388
  }
12597
12389
  calculatePageSize(width, height, force = false) {
12598
- const lastHeight = __privateGet$2(this, _lastHeight$1);
12599
- const lastWidth = __privateGet$2(this, _lastWidth);
12390
+ const lastHeight = __privateGet2(this, _lastHeight);
12391
+ const lastWidth = __privateGet2(this, _lastWidth);
12600
12392
  if (!force && Math.abs(lastHeight - height) < 10 && Math.abs(lastWidth - width) < 10) {
12601
12393
  return;
12602
12394
  }
12603
- __privateSet$2(this, _lastHeight$1, height);
12604
- __privateSet$2(this, _lastWidth, width);
12395
+ __privateSet2(this, _lastHeight, height);
12396
+ __privateSet2(this, _lastWidth, width);
12605
12397
  const { columnCount, rowCount } = this.calculateColumnCount(width, height);
12606
12398
  this.scrollAnchorController.setLayoutMetrics({
12607
12399
  columnCount,
12608
- itemHeight: Math.max(this.columnWidth, 150) + __privateGet$2(this, _gutter)
12400
+ itemHeight: Math.max(this.columnWidth, 150) + __privateGet2(this, _gutter)
12609
12401
  });
12610
12402
  this.emit("cx-content-browser-grid-resize", {
12611
12403
  detail: {
@@ -12625,12 +12417,12 @@ let CxContentBrowserGrid = class extends CortexElement {
12625
12417
  }
12626
12418
  const effectiveWidth = ((_a2 = this.virtualizerEl) == null ? void 0 : _a2.clientWidth) || width;
12627
12419
  const breakPoint = ((_b2 = ASSET_SIZE[this.view]) == null ? void 0 : _b2.minWidth) || ASSET_SIZE[GridView$1.Large].minWidth;
12628
- const columnCount = Math.max(1, Math.floor((effectiveWidth + __privateGet$2(this, _gutter)) / (breakPoint + __privateGet$2(this, _gutter))));
12420
+ const columnCount = Math.max(1, Math.floor((effectiveWidth + __privateGet2(this, _gutter)) / (breakPoint + __privateGet2(this, _gutter))));
12629
12421
  let rowCount = 0;
12630
12422
  if (height) {
12631
- rowCount = Math.ceil(height / (breakPoint + __privateGet$2(this, _gutter)));
12423
+ rowCount = Math.ceil(height / (breakPoint + __privateGet2(this, _gutter)));
12632
12424
  }
12633
- const newColumnWidth = Math.floor((effectiveWidth - __privateGet$2(this, _gutter) * (columnCount + 1)) / columnCount);
12425
+ const newColumnWidth = Math.floor((effectiveWidth - __privateGet2(this, _gutter) * (columnCount + 1)) / columnCount);
12634
12426
  if (newColumnWidth !== this.columnWidth) {
12635
12427
  this.columnWidth = newColumnWidth;
12636
12428
  }
@@ -12674,10 +12466,6 @@ let CxContentBrowserGrid = class extends CortexElement {
12674
12466
  ?show-size=${this.showSize}
12675
12467
  ?show-dimensions=${this.showDimensions}
12676
12468
  ?show-tags=${this.showTags}
12677
- ?show-cta=${this.showCta}
12678
- ?busy=${asset.id === this.busyAssetId}
12679
- cta-text=${this.ctaText}
12680
- cta-text-transform=${this.ctaTextTransform}
12681
12469
  ?in-cold-storage=${asset.inColdStorage}
12682
12470
  @click=${this.handleClick}
12683
12471
  ></cx-content-browser-asset-card>
@@ -12701,7 +12489,7 @@ let CxContentBrowserGrid = class extends CortexElement {
12701
12489
  class="content-browser-grid-loading"
12702
12490
  style=${o$2({
12703
12491
  opacity: this.loading ? 1 : 0,
12704
- padding: `0 ${__privateGet$2(this, _gutter) * 2}px ${__privateGet$2(this, _gutter)}px`
12492
+ padding: `0 ${__privateGet2(this, _gutter) * 2}px ${__privateGet2(this, _gutter)}px`
12705
12493
  })}
12706
12494
  >
12707
12495
  <cx-progress-bar indeterminate></cx-progress-bar>
@@ -12725,7 +12513,7 @@ let CxContentBrowserGrid = class extends CortexElement {
12725
12513
  "overflow-x": "hidden"
12726
12514
  })}
12727
12515
  .layout=${grid({
12728
- gap: `${__privateGet$2(this, _gutter)}px`,
12516
+ gap: `${__privateGet2(this, _gutter)}px`,
12729
12517
  itemSize: {
12730
12518
  height: `${Math.max(this.columnWidth, 150)}px`,
12731
12519
  width: `${this.columnWidth}px`
@@ -12744,79 +12532,67 @@ let CxContentBrowserGrid = class extends CortexElement {
12744
12532
  }
12745
12533
  };
12746
12534
  _gutter = /* @__PURE__ */ new WeakMap();
12747
- _lastHeight$1 = /* @__PURE__ */ new WeakMap();
12535
+ _lastHeight = /* @__PURE__ */ new WeakMap();
12748
12536
  _lastWidth = /* @__PURE__ */ new WeakMap();
12749
- CxContentBrowserGrid.styles = [componentStyles, styles$3];
12537
+ CxContentBrowserGrid.styles = [componentStyles, styles$2];
12750
12538
  CxContentBrowserGrid.dependencies = {
12751
12539
  "cx-content-browser-asset-card": CxContentBrowserAssetCard,
12752
12540
  "cx-content-browser-no-result": CxContentBrowserNoResult,
12753
12541
  "cx-progress-bar": CxProgressBar,
12754
12542
  "cx-resize-observer": CxResizeObserver
12755
12543
  };
12756
- __decorateClass$3([
12544
+ __decorateClass$2([
12757
12545
  e$7(".content-browser-grid")
12758
12546
  ], CxContentBrowserGrid.prototype, "containerEl", 2);
12759
- __decorateClass$3([
12547
+ __decorateClass$2([
12760
12548
  e$7("lit-virtualizer")
12761
12549
  ], CxContentBrowserGrid.prototype, "virtualizerEl", 2);
12762
- __decorateClass$3([
12550
+ __decorateClass$2([
12763
12551
  n$6({ attribute: "assets", reflect: false, type: Array })
12764
12552
  ], CxContentBrowserGrid.prototype, "assets", 2);
12765
- __decorateClass$3([
12553
+ __decorateClass$2([
12766
12554
  n$6({ attribute: "empty", reflect: true, type: Boolean })
12767
12555
  ], CxContentBrowserGrid.prototype, "empty", 2);
12768
- __decorateClass$3([
12556
+ __decorateClass$2([
12769
12557
  n$6({ attribute: "view", reflect: true, type: String })
12770
12558
  ], CxContentBrowserGrid.prototype, "view", 2);
12771
- __decorateClass$3([
12559
+ __decorateClass$2([
12772
12560
  n$6({ attribute: "has-more", reflect: true, type: Boolean })
12773
12561
  ], CxContentBrowserGrid.prototype, "hasMore", 2);
12774
- __decorateClass$3([
12562
+ __decorateClass$2([
12775
12563
  n$6({ attribute: "loading", reflect: true, type: Boolean })
12776
12564
  ], CxContentBrowserGrid.prototype, "loading", 2);
12777
- __decorateClass$3([
12565
+ __decorateClass$2([
12778
12566
  n$6({ attribute: "show-title", reflect: true, type: Boolean })
12779
12567
  ], CxContentBrowserGrid.prototype, "showTitle", 2);
12780
- __decorateClass$3([
12568
+ __decorateClass$2([
12781
12569
  n$6({ attribute: "show-size", reflect: true, type: Boolean })
12782
12570
  ], CxContentBrowserGrid.prototype, "showSize", 2);
12783
- __decorateClass$3([
12571
+ __decorateClass$2([
12784
12572
  n$6({ attribute: "show-dimensions", reflect: true, type: Boolean })
12785
12573
  ], CxContentBrowserGrid.prototype, "showDimensions", 2);
12786
- __decorateClass$3([
12574
+ __decorateClass$2([
12787
12575
  n$6({ attribute: "show-tags", reflect: true, type: Boolean })
12788
12576
  ], CxContentBrowserGrid.prototype, "showTags", 2);
12789
- __decorateClass$3([
12790
- n$6({ attribute: "show-cta", reflect: true, type: Boolean })
12791
- ], CxContentBrowserGrid.prototype, "showCta", 2);
12792
- __decorateClass$3([
12793
- n$6({ attribute: "cta-text", reflect: false, type: String })
12794
- ], CxContentBrowserGrid.prototype, "ctaText", 2);
12795
- __decorateClass$3([
12796
- n$6({ attribute: "cta-text-transform", reflect: false, type: String })
12797
- ], CxContentBrowserGrid.prototype, "ctaTextTransform", 2);
12798
- __decorateClass$3([
12799
- n$6({ attribute: false })
12800
- ], CxContentBrowserGrid.prototype, "busyAssetId", 2);
12801
- __decorateClass$3([
12577
+ __decorateClass$2([
12802
12578
  n$6({ attribute: "selected-asset-id", reflect: true, type: String })
12803
12579
  ], CxContentBrowserGrid.prototype, "selectedAssetId", 2);
12804
- __decorateClass$3([
12580
+ __decorateClass$2([
12805
12581
  r$6()
12806
12582
  ], CxContentBrowserGrid.prototype, "assetMap", 2);
12807
- __decorateClass$3([
12583
+ __decorateClass$2([
12808
12584
  r$6()
12809
12585
  ], CxContentBrowserGrid.prototype, "columnWidth", 2);
12810
- __decorateClass$3([
12586
+ __decorateClass$2([
12811
12587
  watch("view", { waitUntilFirstUpdate: true })
12812
12588
  ], CxContentBrowserGrid.prototype, "handleViewChange", 1);
12813
- __decorateClass$3([
12589
+ __decorateClass$2([
12814
12590
  watch("assets")
12815
12591
  ], CxContentBrowserGrid.prototype, "handleAssetsChange", 1);
12816
- CxContentBrowserGrid = __decorateClass$3([
12592
+ CxContentBrowserGrid = __decorateClass$2([
12817
12593
  customElement("cx-content-browser-grid")
12818
12594
  ], CxContentBrowserGrid);
12819
- const styles$2 = i$7`
12595
+ const styles$1 = i$7`
12820
12596
  :host {
12821
12597
  display: block;
12822
12598
  }
@@ -12875,14 +12651,14 @@ const styles$2 = i$7`
12875
12651
  cursor: default;
12876
12652
  }
12877
12653
  `;
12878
- var __defProp$2 = Object.defineProperty;
12879
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
12880
- var __decorateClass$2 = (decorators, target, key, kind) => {
12881
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
12654
+ var __defProp$1 = Object.defineProperty;
12655
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
12656
+ var __decorateClass$1 = (decorators, target, key, kind) => {
12657
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
12882
12658
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
12883
12659
  if (decorator = decorators[i4])
12884
12660
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12885
- if (kind && result) __defProp$2(target, key, result);
12661
+ if (kind && result) __defProp$1(target, key, result);
12886
12662
  return result;
12887
12663
  };
12888
12664
  const LOGOUT_ITEM_VALUE = "logout";
@@ -13015,7 +12791,7 @@ let CxContentBrowserHeader = class extends CortexElement {
13015
12791
  `;
13016
12792
  }
13017
12793
  };
13018
- CxContentBrowserHeader.styles = [componentStyles, styles$2];
12794
+ CxContentBrowserHeader.styles = [componentStyles, styles$1];
13019
12795
  CxContentBrowserHeader.dependencies = {
13020
12796
  "cx-avatar": CxAvatar,
13021
12797
  "cx-divider": CxDivider,
@@ -13029,908 +12805,36 @@ CxContentBrowserHeader.dependencies = {
13029
12805
  "cx-space": CxSpace,
13030
12806
  "cx-typography": CxTypography
13031
12807
  };
13032
- __decorateClass$2([
12808
+ __decorateClass$1([
13033
12809
  n$6({ type: Boolean })
13034
12810
  ], CxContentBrowserHeader.prototype, "bordered", 2);
13035
- __decorateClass$2([
12811
+ __decorateClass$1([
13036
12812
  n$6({ attribute: "application-name", type: String })
13037
12813
  ], CxContentBrowserHeader.prototype, "applicationName", 2);
13038
- __decorateClass$2([
12814
+ __decorateClass$1([
13039
12815
  n$6({ type: Boolean })
13040
12816
  ], CxContentBrowserHeader.prototype, "loading", 2);
13041
- __decorateClass$2([
12817
+ __decorateClass$1([
13042
12818
  n$6({ attribute: "is-fetching", type: Boolean })
13043
12819
  ], CxContentBrowserHeader.prototype, "isFetching", 2);
13044
- __decorateClass$2([
12820
+ __decorateClass$1([
13045
12821
  n$6({ attribute: "avatar", type: String })
13046
12822
  ], CxContentBrowserHeader.prototype, "avatar", 2);
13047
- __decorateClass$2([
12823
+ __decorateClass$1([
13048
12824
  n$6({ attribute: "full-name", type: String })
13049
12825
  ], CxContentBrowserHeader.prototype, "fullName", 2);
13050
- __decorateClass$2([
12826
+ __decorateClass$1([
13051
12827
  n$6({ attribute: "folder-title", type: String })
13052
12828
  ], CxContentBrowserHeader.prototype, "folderTitle", 2);
13053
- __decorateClass$2([
12829
+ __decorateClass$1([
13054
12830
  n$6({ attribute: "show-close-button", type: Boolean })
13055
12831
  ], CxContentBrowserHeader.prototype, "showCloseButton", 2);
13056
- __decorateClass$2([
12832
+ __decorateClass$1([
13057
12833
  n$6({ attribute: "can-logout", type: Boolean })
13058
12834
  ], CxContentBrowserHeader.prototype, "canLogout", 2);
13059
- CxContentBrowserHeader = __decorateClass$2([
12835
+ CxContentBrowserHeader = __decorateClass$1([
13060
12836
  customElement("cx-content-browser-header")
13061
12837
  ], CxContentBrowserHeader);
13062
- const styles$1 = i$7`
13063
- /* Containing block for the absolutely positioned loading bar, which is a direct child. */
13064
- :host {
13065
- position: relative;
13066
- display: block;
13067
- flex: 1;
13068
- box-sizing: border-box;
13069
- /*
13070
- * The overflow has to stop at the scrollport below, which it only does while the host cannot
13071
- * grow with the grids' min-content width. Two different parents can let it grow, so both are
13072
- * closed off:
13073
- *
13074
- * width -- a multi-line flex parent stretches an item to its own flex line's cross size, the
13075
- * largest hypothetical size on that line, and not to the container's width; only a
13076
- * single-line container does the latter. The picker's column parent wraps, so the
13077
- * host stretched to the grids' min-content width and carried everything beside it
13078
- * along (L-429EVG: the login avatar left the viewport). A definite width ends that.
13079
- * min-width -- in a row parent the main axis is the horizontal one, and a flex item's automatic
13080
- * minimum size refuses to shrink below its content there. In a column parent that
13081
- * automatic minimum lands on min-height instead, which is why width alone is not
13082
- * enough for one shape and min-width alone is not enough for the other.
13083
- */
13084
- width: 100%;
13085
- min-width: 0;
13086
- min-height: 0;
13087
- }
13088
-
13089
- /*
13090
- * The one scrollport for both axes. The header and the virtualized rows are separate grids, so
13091
- * anything that scrolled them separately could drift; sharing a scroll container means a single
13092
- * scroll offset moves both and they cannot. The vertical scrollbar therefore sits outside both
13093
- * grids, which is why neither has to reserve a gutter for it.
13094
- */
13095
- .content-browser-table {
13096
- display: flex;
13097
- flex-direction: column;
13098
- height: 100%;
13099
- overflow: auto;
13100
- }
13101
-
13102
- .content-browser-table-loading {
13103
- position: absolute;
13104
- width: 100%;
13105
- z-index: var(--cx-z-index-drawer);
13106
- }
13107
-
13108
- .content-browser-table-loading cx-progress-bar {
13109
- --height: 4px;
13110
- }
13111
-
13112
- /*
13113
- * min-width: min-content is what makes the table scroll instead of squashing: it is the width
13114
- * at which every track that cannot shrink still fits, so a column dragged wider than the viewport
13115
- * widens both grids past it and the container gains a horizontal scrollbar. The header and a row
13116
- * resolve the same track list against the same padding and gaps, so their min-content widths are
13117
- * equal and their column boundaries stay on top of each other at any scroll offset.
13118
- */
13119
- .content-browser-table__header,
13120
- .content-browser-table__row {
13121
- display: grid;
13122
- align-items: center;
13123
- /* Set on the host so the header and every virtualized row resolve one identical track list. */
13124
- grid-template-columns: var(--cx-content-browser-table-columns);
13125
- column-gap: var(--cx-spacing-medium);
13126
- padding: var(--cx-spacing-x-small) var(--cx-spacing-medium);
13127
- min-width: min-content;
13128
- }
13129
-
13130
- /*
13131
- * Sticky rather than outside the scroller: the header has to travel with the rows horizontally
13132
- * and stay put vertically, and only sharing their scrollport gives the first of those for free.
13133
- */
13134
- .content-browser-table__head {
13135
- position: sticky;
13136
- top: 0;
13137
- z-index: 1;
13138
- flex: none;
13139
- min-width: min-content;
13140
- /*
13141
- * The offset and the background belong to the sticky box, not to the row inside it: rows now
13142
- * scroll underneath within the same scrollport, and any part of the sticky box that paints
13143
- * nothing shows them through. __head is a flex item, so a child's margin cannot collapse out
13144
- * of it either. Literal fallback because an unthemed host paints no background at all.
13145
- */
13146
- padding-top: 5px;
13147
- background-color: var(--cx-color-neutral-50, #f9f9f9);
13148
- }
13149
-
13150
- .content-browser-table__header {
13151
- border-bottom: 1px solid var(--cx-color-neutral-200);
13152
- color: var(--cx-color-neutral-700);
13153
- }
13154
-
13155
- /* cx-typography sets its own font-weight, so the host cannot simply inherit one in. */
13156
- .content-browser-table__header cx-typography::part(base) {
13157
- font-weight: var(--cx-font-weight-medium);
13158
- }
13159
-
13160
- .content-browser-table__body {
13161
- flex: 1;
13162
- min-height: 0;
13163
- }
13164
-
13165
- /*
13166
- * lit-virtualizer positions rows absolutely, which makes them shrink-to-fit. Without an explicit
13167
- * width the row's grid resolves its fr tracks against the row's own content width while the
13168
- * header -- not virtualized -- resolves the same tracks against the full container, so the two
13169
- * disagree and a fractional column never receives the free space. 100% is the scrollport, not
13170
- * the scroll width, so the shared min-width: min-content above is what carries a row past it.
13171
- */
13172
- .content-browser-table__row {
13173
- box-sizing: border-box;
13174
- width: 100%;
13175
- border-bottom: 1px solid var(--cx-color-neutral-200);
13176
- cursor: pointer;
13177
- }
13178
-
13179
- .content-browser-table__row:hover,
13180
- .content-browser-table__row:focus-visible {
13181
- background-color: var(--cx-color-neutral-100);
13182
- outline: none;
13183
- }
13184
-
13185
- .content-browser-table__row--selected {
13186
- background-color: var(--cx-color-primary-100);
13187
- }
13188
-
13189
- .content-browser-table__row--disabled {
13190
- cursor: default;
13191
- pointer-events: none;
13192
- opacity: 0.5;
13193
- }
13194
-
13195
- .content-browser-table__cell {
13196
- min-width: 0;
13197
- overflow: hidden;
13198
- }
13199
-
13200
- .content-browser-table__cell--center {
13201
- text-align: center;
13202
- }
13203
-
13204
- .content-browser-table__cell--right {
13205
- text-align: right;
13206
- }
13207
-
13208
- /* Anchors the resize handle; the cell clips, so the handle stays inside its own right edge. */
13209
- .content-browser-table__header .content-browser-table__cell {
13210
- position: relative;
13211
- }
13212
-
13213
- /*
13214
- * Kept wholly inside the cell: the cell clips, so any part hanging into the column gap is not
13215
- * painted and, more importantly, not hit-testable.
13216
- */
13217
- .content-browser-table__resize {
13218
- position: absolute;
13219
- top: 0;
13220
- right: 0;
13221
- bottom: 0;
13222
- /* Fallback matters: with no design-system theme the token is empty and the grab target is 0px. */
13223
- width: var(--cx-spacing-medium, 16px);
13224
- cursor: col-resize;
13225
- touch-action: none;
13226
- }
13227
-
13228
- /*
13229
- * The column divider, pinned to the grab target's right edge -- which the cell clips to, so it
13230
- * lands on the column boundary. Visible at rest as a neutral full-height hairline: it is what
13231
- * tells the user where the draggable boundaries are before the pointer is anywhere near one, so
13232
- * it has to read as table chrome. The rules below take it to the primary treatment once the
13233
- * boundary is actually being addressed. Literal fallbacks because the tokens resolve to nothing
13234
- * on an unthemed host, and an invisible divider is the defect this fixes.
13235
- */
13236
- .content-browser-table__resize::after {
13237
- position: absolute;
13238
- top: 0;
13239
- right: 0;
13240
- bottom: 0;
13241
- width: 1px;
13242
- background-color: var(--cx-color-neutral-200, #e4e4e7);
13243
- content: '';
13244
- }
13245
-
13246
- .content-browser-table__resize:hover::after,
13247
- .content-browser-table__resize:focus-visible::after {
13248
- width: 2px;
13249
- background-color: var(--cx-color-primary-500, #3b82f6);
13250
- }
13251
-
13252
- /*
13253
- * Keyboard focus needs an indicator of its own: the hover hairline is 2px wide and half the cell
13254
- * high, far too small to read as focus. The ring is inset by its own width because the header
13255
- * cell clips -- the handle is flush with the cell's top, right and bottom edges, so anything
13256
- * drawn outside its box is never painted. Fallbacks matter: with no design-system theme the
13257
- * tokens are empty and the ring would disappear entirely.
13258
- */
13259
- .content-browser-table__resize:focus-visible {
13260
- outline: var(--cx-focus-ring-style, solid) var(--cx-focus-ring-width, 3px)
13261
- var(--cx-focus-ring-color, #2563eb);
13262
- outline-offset: calc(-1 * var(--cx-focus-ring-width, 3px));
13263
- }
13264
-
13265
- /*
13266
- * While a column is being dragged the pointer is captured, so it can travel anywhere in the
13267
- * document -- keep the resize cursor and stop the drag from selecting header text.
13268
- */
13269
- .content-browser-table--resizing {
13270
- cursor: col-resize;
13271
- user-select: none;
13272
- }
13273
-
13274
- .content-browser-table--resizing .content-browser-table__resize::after {
13275
- width: 2px;
13276
- background-color: var(--cx-color-primary-500, #3b82f6);
13277
- }
13278
-
13279
- .content-browser-table__cell--action {
13280
- display: flex;
13281
- justify-content: flex-end;
13282
- }
13283
-
13284
- /*
13285
- * visibility, not display: the action column is a max-content track, so removing the button
13286
- * from layout would collapse the track and reflow every other column on hover.
13287
- */
13288
- .content-browser-table__action {
13289
- --min-height: 0;
13290
-
13291
- visibility: hidden;
13292
- }
13293
-
13294
- .content-browser-table__row:hover .content-browser-table__action,
13295
- .content-browser-table__row:focus-visible .content-browser-table__action,
13296
- .content-browser-table__row:focus-within .content-browser-table__action,
13297
- .content-browser-table__row--selected .content-browser-table__action,
13298
- .content-browser-table__action--busy {
13299
- visibility: visible;
13300
- }
13301
-
13302
- /*
13303
- * Reserves the action track's width in the header grid so it resolves to the same max-content
13304
- * size the row grid resolves to. It is never shown and never focusable.
13305
- */
13306
- .content-browser-table__action--placeholder {
13307
- visibility: hidden;
13308
- pointer-events: none;
13309
- }
13310
-
13311
- .content-browser-table__empty {
13312
- flex: 1;
13313
- }
13314
- `;
13315
- var __defProp$1 = Object.defineProperty;
13316
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
13317
- var __typeError$1 = (msg) => {
13318
- throw TypeError(msg);
13319
- };
13320
- var __decorateClass$1 = (decorators, target, key, kind) => {
13321
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
13322
- for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
13323
- if (decorator = decorators[i4])
13324
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13325
- if (kind && result) __defProp$1(target, key, result);
13326
- return result;
13327
- };
13328
- var __accessCheck$1 = (obj, member, msg) => member.has(obj) || __typeError$1("Cannot " + msg);
13329
- var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
13330
- 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);
13331
- var __privateSet$1 = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
13332
- var _lastHeight, _lastScrollTop, _resize, _fallbackListeners;
13333
- const ROW_HEIGHT = 40;
13334
- const ACTION_COLUMN_TRACK = "max-content";
13335
- const MIN_COLUMN_WIDTH = 48;
13336
- const MAX_COLUMN_WIDTH = 2e3;
13337
- const COLUMN_RESIZE_STEP = 8;
13338
- const COLUMN_RESIZE_STEP_LARGE = 32;
13339
- const TABLE_COLUMNS_PROPERTY = "--cx-content-browser-table-columns";
13340
- const FLEX_TRACK = /^\d*\.?\d+fr$/i;
13341
- const MINMAX_TRACK = /^minmax\(\s*(.+?)\s*,\s*(.+?)\s*\)$/i;
13342
- const COLLAPSIBLE_MINIMUM = /^(auto|min-content)$/i;
13343
- const PIXEL_MINIMUM = /^(\d*\.?\d+)(px)?$/i;
13344
- function floorFlexibleTrack(track) {
13345
- const authored = track.trim();
13346
- const minmax = MINMAX_TRACK.exec(authored);
13347
- if (!minmax) {
13348
- return FLEX_TRACK.test(authored) ? `minmax(${MIN_COLUMN_WIDTH}px, ${authored})` : authored;
13349
- }
13350
- const [, minimum, maximum] = minmax;
13351
- if (!FLEX_TRACK.test(maximum)) {
13352
- return authored;
13353
- }
13354
- const pixels = PIXEL_MINIMUM.exec(minimum);
13355
- const collapsible = COLLAPSIBLE_MINIMUM.test(minimum) || pixels !== null && Number.parseFloat(pixels[1]) < MIN_COLUMN_WIDTH;
13356
- return collapsible ? `minmax(${MIN_COLUMN_WIDTH}px, ${maximum})` : authored;
13357
- }
13358
- function createColumnWidths(entries = []) {
13359
- return Object.assign(/* @__PURE__ */ Object.create(null), Object.fromEntries(entries));
13360
- }
13361
- function readCellValue(asset, field) {
13362
- const value = asset[field];
13363
- if (value === void 0 || value === null || typeof value === "object") {
13364
- return "";
13365
- }
13366
- return String(value);
13367
- }
13368
- let CxContentBrowserTable = class extends CortexElement {
13369
- constructor() {
13370
- super();
13371
- this.localize = new LocalizeController(this);
13372
- this.assets = [];
13373
- this.columns = [];
13374
- this.ctaText = "";
13375
- this.ctaTextTransform = "capitalize";
13376
- this.empty = false;
13377
- this.hasMore = false;
13378
- this.loading = false;
13379
- this.selectedAssetId = void 0;
13380
- this.busyAssetId = void 0;
13381
- this.assetMap = /* @__PURE__ */ new Map();
13382
- this.columnWidths = createColumnWidths();
13383
- __privateAdd$1(this, _lastHeight, 0);
13384
- __privateAdd$1(this, _lastScrollTop, 0);
13385
- this.scrollAnchorController = new ScrollAnchorController(this, {
13386
- // The rows scroll inside the table container, not inside the virtualizer, so that is the
13387
- // element whose scroll offset an anchor has to be captured against and restored on.
13388
- getContainer: () => this.containerEl,
13389
- // The sticky header is the container's first in-flow child, so row 0 starts below it rather
13390
- // than at the content origin. Measured rather than a constant: the height is whatever the
13391
- // host's tokens and column titles resolve to.
13392
- getContentOffset: () => {
13393
- var _a2, _b2;
13394
- return (_b2 = (_a2 = this.headEl) == null ? void 0 : _a2.getBoundingClientRect().height) != null ? _b2 : 0;
13395
- },
13396
- getItemIndexById: (id) => this.assets.findIndex((asset) => asset.id === id),
13397
- // The container is a plain div, so it has no `layoutComplete` of its own; the virtualizer still
13398
- // has to have laid the rows out before a restore can land on one.
13399
- getLayoutSource: () => this.bodyEl,
13400
- itemSelector: ".content-browser-table__row"
13401
- });
13402
- __privateAdd$1(this, _resize);
13403
- __privateAdd$1(this, _fallbackListeners);
13404
- this.debouncedCalculatePageSize = debounce(this.calculatePageSize, 200);
13405
- this.debouncedHandleScrollEnd = debounce(this.handleScrollEnd, 200);
13406
- this.handleRowClick = this.handleRowClick.bind(this);
13407
- this.handleActionClick = this.handleActionClick.bind(this);
13408
- this.handleRowKeyDown = this.handleRowKeyDown.bind(this);
13409
- }
13410
- /** One authored track per configured column, in order. The action track is not one of them. */
13411
- buildColumnTracks(widths) {
13412
- return this.columns.map((column2) => {
13413
- var _a2;
13414
- const resized = widths[column2.field];
13415
- return resized === void 0 ? floorFlexibleTrack((_a2 = column2.width) != null ? _a2 : "minmax(0, 1fr)") : `${resized}px`;
13416
- });
13417
- }
13418
- buildTemplateColumns(widths) {
13419
- return [...this.buildColumnTracks(widths), ACTION_COLUMN_TRACK].join(" ");
13420
- }
13421
- get templateColumns() {
13422
- return this.buildTemplateColumns(this.columnWidths);
13423
- }
13424
- resolveColumnWidth(field) {
13425
- var _a2;
13426
- const configured = this.columnWidths[field];
13427
- if (configured !== void 0) {
13428
- return configured;
13429
- }
13430
- const cell = this.renderRoot.querySelector(
13431
- `.content-browser-table__header [role="columnheader"][data-field="${CSS.escape(field)}"]`
13432
- );
13433
- return this.clampColumnWidth((_a2 = cell == null ? void 0 : cell.getBoundingClientRect().width) != null ? _a2 : MIN_COLUMN_WIDTH);
13434
- }
13435
- clampColumnWidth(width) {
13436
- return Math.round(Math.min(MAX_COLUMN_WIDTH, Math.max(MIN_COLUMN_WIDTH, width)));
13437
- }
13438
- commitColumnWidth(field, width) {
13439
- if (this.columnWidths[field] === width) {
13440
- return;
13441
- }
13442
- const next2 = createColumnWidths(Object.entries(this.columnWidths));
13443
- if (width === void 0) {
13444
- delete next2[field];
13445
- } else {
13446
- next2[field] = width;
13447
- }
13448
- this.columnWidths = next2;
13449
- this.emit("cx-content-browser-table-column-resize", { detail: { field, width } });
13450
- }
13451
- /**
13452
- * Kept off the reactive path: its only effect is the cursor, the text selection and the handle
13453
- * colour, while a reactive toggle would rebind `renderItem` and re-render every visible row twice
13454
- * per drag.
13455
- */
13456
- setResizingClass(active) {
13457
- var _a2;
13458
- (_a2 = this.containerEl) == null ? void 0 : _a2.classList.toggle("content-browser-table--resizing", active);
13459
- }
13460
- bindFallbackListeners(target) {
13461
- const onMove = (event) => this.handleResizeMove(event);
13462
- const onUp = (event) => this.handleResizeEnd(event);
13463
- const onCancel = (event) => this.handleResizeCancel(event);
13464
- __privateSet$1(this, _fallbackListeners, { onCancel, onMove, onUp, target });
13465
- target.addEventListener("pointermove", onMove);
13466
- target.addEventListener("pointerup", onUp);
13467
- target.addEventListener("pointercancel", onCancel);
13468
- }
13469
- releaseFallbackListeners() {
13470
- if (!__privateGet$1(this, _fallbackListeners)) {
13471
- return;
13472
- }
13473
- const { onCancel, onMove, onUp, target } = __privateGet$1(this, _fallbackListeners);
13474
- target.removeEventListener("pointermove", onMove);
13475
- target.removeEventListener("pointerup", onUp);
13476
- target.removeEventListener("pointercancel", onCancel);
13477
- __privateSet$1(this, _fallbackListeners, void 0);
13478
- }
13479
- /**
13480
- * With the fallback bound, an event dispatched at the handle reaches the handle's own binding and
13481
- * then the document one, running every terminal handler twice. The fallback owns the whole drag on
13482
- * that path, so the element-level delivery is dropped.
13483
- */
13484
- isHandledByFallback(event) {
13485
- return __privateGet$1(this, _fallbackListeners) !== void 0 && event.currentTarget !== __privateGet$1(this, _fallbackListeners).target;
13486
- }
13487
- /** Every trace of a drag: the state the track-list publish is gated on, the cursor, the fallback. */
13488
- endResize() {
13489
- __privateSet$1(this, _resize, void 0);
13490
- this.releaseFallbackListeners();
13491
- this.setResizingClass(false);
13492
- }
13493
- handleResizeStart(event) {
13494
- const handle = event.currentTarget;
13495
- const field = handle.dataset.field;
13496
- if (!field || !event.isPrimary || event.button !== 0 || __privateGet$1(this, _resize)) {
13497
- return;
13498
- }
13499
- event.preventDefault();
13500
- handle.focus();
13501
- const startWidth = this.resolveColumnWidth(field);
13502
- __privateSet$1(this, _resize, {
13503
- field,
13504
- pointerId: event.pointerId,
13505
- startWidth,
13506
- startX: event.clientX,
13507
- width: startWidth
13508
- });
13509
- this.setResizingClass(true);
13510
- try {
13511
- handle.setPointerCapture(event.pointerId);
13512
- } catch (e2) {
13513
- this.bindFallbackListeners(handle.ownerDocument);
13514
- }
13515
- }
13516
- /**
13517
- * The track list a running drag owns, built against the columns rendering right now: the committed
13518
- * widths with the drag's own preview over the top. Falls back to the committed list when no drag is
13519
- * running, so one expression covers both.
13520
- */
13521
- get previewTemplateColumns() {
13522
- if (!__privateGet$1(this, _resize)) {
13523
- return this.templateColumns;
13524
- }
13525
- const preview = createColumnWidths(Object.entries(this.columnWidths));
13526
- preview[__privateGet$1(this, _resize).field] = __privateGet$1(this, _resize).width;
13527
- return this.buildTemplateColumns(preview);
13528
- }
13529
- /** Repaints the drag with one property write: no re-render, no layout read. */
13530
- previewColumnWidth(width) {
13531
- if (!__privateGet$1(this, _resize)) {
13532
- return;
13533
- }
13534
- __privateGet$1(this, _resize).width = width;
13535
- this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.previewTemplateColumns);
13536
- }
13537
- handleResizeMove(event) {
13538
- if (this.isHandledByFallback(event) || !__privateGet$1(this, _resize) || __privateGet$1(this, _resize).pointerId !== event.pointerId) {
13539
- return;
13540
- }
13541
- this.previewColumnWidth(this.clampColumnWidth(
13542
- __privateGet$1(this, _resize).startWidth + (event.clientX - __privateGet$1(this, _resize).startX)
13543
- ));
13544
- }
13545
- handleResizeEnd(event) {
13546
- if (this.isHandledByFallback(event) || !__privateGet$1(this, _resize) || __privateGet$1(this, _resize).pointerId !== event.pointerId) {
13547
- return;
13548
- }
13549
- const { field, startWidth, width } = __privateGet$1(this, _resize);
13550
- this.endResize();
13551
- if (!this.columns.some((column2) => column2.field === field)) {
13552
- this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.templateColumns);
13553
- return;
13554
- }
13555
- if (width !== startWidth) {
13556
- this.commitColumnWidth(field, width);
13557
- return;
13558
- }
13559
- this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.templateColumns);
13560
- }
13561
- /**
13562
- * A gesture the user agent took away was never a decision: restore the committed track list and
13563
- * tell the host nothing.
13564
- */
13565
- handleResizeCancel(event) {
13566
- if (this.isHandledByFallback(event) || !__privateGet$1(this, _resize) || __privateGet$1(this, _resize).pointerId !== event.pointerId) {
13567
- return;
13568
- }
13569
- this.endResize();
13570
- this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.templateColumns);
13571
- }
13572
- handleResizeKeyDown(event) {
13573
- const handle = event.currentTarget;
13574
- const field = handle.dataset.field;
13575
- if (!field) {
13576
- return;
13577
- }
13578
- if (event.key === "Home") {
13579
- event.preventDefault();
13580
- this.commitColumnWidth(field, void 0);
13581
- return;
13582
- }
13583
- const step = event.shiftKey ? COLUMN_RESIZE_STEP_LARGE : COLUMN_RESIZE_STEP;
13584
- const delta = event.key === "ArrowLeft" ? -step : event.key === "ArrowRight" ? step : 0;
13585
- if (!delta) {
13586
- return;
13587
- }
13588
- event.preventDefault();
13589
- const startWidth = this.resolveColumnWidth(field);
13590
- const width = this.clampColumnWidth(startWidth + delta);
13591
- if (width === startWidth) {
13592
- return;
13593
- }
13594
- this.commitColumnWidth(field, width);
13595
- }
13596
- handleResizeReset(event) {
13597
- const field = event.currentTarget.dataset.field;
13598
- if (field) {
13599
- this.commitColumnWidth(field, void 0);
13600
- }
13601
- }
13602
- renderResizeHandle(column2) {
13603
- const pinned = this.columnWidths[column2.field];
13604
- return b`
13605
- <div
13606
- class="content-browser-table__resize"
13607
- role="separator"
13608
- aria-orientation="vertical"
13609
- aria-label=${this.localize.term("resize")}
13610
- aria-valuemin=${MIN_COLUMN_WIDTH}
13611
- aria-valuemax=${MAX_COLUMN_WIDTH}
13612
- aria-valuenow=${o$5(pinned)}
13613
- tabindex="0"
13614
- data-field=${column2.field}
13615
- @pointerdown=${this.handleResizeStart}
13616
- @pointermove=${this.handleResizeMove}
13617
- @pointerup=${this.handleResizeEnd}
13618
- @pointercancel=${this.handleResizeCancel}
13619
- @lostpointercapture=${this.handleResizeEnd}
13620
- @dblclick=${this.handleResizeReset}
13621
- @keydown=${this.handleResizeKeyDown}
13622
- ></div>
13623
- `;
13624
- }
13625
- handleColumnsChange() {
13626
- const fields = new Set(this.columns.map((column2) => column2.field));
13627
- const kept = Object.entries(this.columnWidths).filter(([field]) => fields.has(field));
13628
- if (kept.length !== Object.keys(this.columnWidths).length) {
13629
- this.columnWidths = createColumnWidths(kept);
13630
- }
13631
- }
13632
- updated() {
13633
- this.style.setProperty(TABLE_COLUMNS_PROPERTY, this.previewTemplateColumns);
13634
- }
13635
- disconnectedCallback() {
13636
- super.disconnectedCallback();
13637
- this.endResize();
13638
- }
13639
- handleAssetsChange() {
13640
- this.assetMap.clear();
13641
- this.assets.forEach((item) => this.assetMap.set(item.id, item));
13642
- this.scrollAnchorController.scheduleRestore();
13643
- }
13644
- handleResize(event) {
13645
- event.stopPropagation();
13646
- const entries = event.detail.entries;
13647
- if (entries[0].target !== this.containerEl) {
13648
- return;
13649
- }
13650
- this.scrollAnchorController.capture();
13651
- this.debouncedCalculatePageSize(entries[0].contentRect.height);
13652
- }
13653
- calculatePageSize(height) {
13654
- if (Math.abs(__privateGet$1(this, _lastHeight) - height) < 10) {
13655
- return;
13656
- }
13657
- __privateSet$1(this, _lastHeight, height);
13658
- this.scrollAnchorController.setLayoutMetrics({
13659
- columnCount: 1,
13660
- itemHeight: ROW_HEIGHT
13661
- });
13662
- this.emit("cx-content-browser-grid-resize", {
13663
- detail: {
13664
- columnCount: 1,
13665
- rowCount: Math.ceil(height / ROW_HEIGHT)
13666
- }
13667
- });
13668
- this.scrollAnchorController.scheduleRestore();
13669
- }
13670
- selectRow(assetId) {
13671
- var _a2;
13672
- if (!assetId || ((_a2 = this.assetMap.get(assetId)) == null ? void 0 : _a2.inColdStorage)) {
13673
- return;
13674
- }
13675
- this.emit("cx-content-browser-grid-click", {
13676
- detail: {
13677
- id: assetId
13678
- }
13679
- });
13680
- }
13681
- handleRowClick(event) {
13682
- var _a2;
13683
- this.selectRow((_a2 = event.currentTarget.dataset.id) != null ? _a2 : "");
13684
- }
13685
- handleActionClick(event) {
13686
- var _a2;
13687
- event.stopPropagation();
13688
- this.selectRow((_a2 = event.currentTarget.dataset.id) != null ? _a2 : "");
13689
- }
13690
- handleRowKeyDown(event) {
13691
- var _a2;
13692
- if (event.key !== "Enter" && event.key !== " ") {
13693
- return;
13694
- }
13695
- event.preventDefault();
13696
- this.selectRow((_a2 = event.currentTarget.dataset.id) != null ? _a2 : "");
13697
- }
13698
- /**
13699
- * @param assetId - omitted for the header's sizing twin, which is inert and never announced.
13700
- */
13701
- renderActionButton(assetId) {
13702
- const isPlaceholder = assetId === void 0;
13703
- const isBusy = !isPlaceholder && assetId === this.busyAssetId;
13704
- return b`
13705
- <cx-button
13706
- class=${e$5({
13707
- "content-browser-table__action": true,
13708
- "content-browser-table__action--busy": isBusy,
13709
- "content-browser-table__action--placeholder": isPlaceholder
13710
- })}
13711
- data-id=${o$5(assetId)}
13712
- size="small"
13713
- variant="primary"
13714
- tabindex="-1"
13715
- ?loading=${isBusy}
13716
- aria-hidden=${isPlaceholder ? "true" : "false"}
13717
- @click=${isPlaceholder ? A$1 : this.handleActionClick}
13718
- >
13719
- <span style=${o$2({ textTransform: this.ctaTextTransform })}>
13720
- ${this.ctaText || this.localize.term("insert")}
13721
- </span>
13722
- </cx-button>
13723
- `;
13724
- }
13725
- /**
13726
- * Bound fresh on every render at the call site, deliberately. `lit-virtualizer` re-runs this only
13727
- * when `items` or `renderItem` change identity, and the selected id lives on neither — with a
13728
- * stable reference the rows keep their first render and the selected row is never marked. A new
13729
- * `items` array alone does not do it; the function identity is what the virtualizer acts on.
13730
- */
13731
- renderRow(asset) {
13732
- if (!asset) {
13733
- return A$1;
13734
- }
13735
- return b`
13736
- <div
13737
- class=${e$5({
13738
- "content-browser-table__row": true,
13739
- "content-browser-table__row--disabled": Boolean(asset.inColdStorage),
13740
- "content-browser-table__row--selected": asset.id === this.selectedAssetId
13741
- })}
13742
- data-id=${asset.id}
13743
- role="row"
13744
- tabindex=${asset.inColdStorage ? -1 : 0}
13745
- aria-current=${asset.id === this.selectedAssetId ? "true" : "false"}
13746
- style=${o$2({
13747
- "min-height": `${ROW_HEIGHT}px`
13748
- })}
13749
- @click=${this.handleRowClick}
13750
- @keydown=${this.handleRowKeyDown}
13751
- >
13752
- ${c$1(
13753
- this.columns,
13754
- (column2, index) => `${column2.field}:${index}`,
13755
- (column2) => {
13756
- var _a2;
13757
- return b`
13758
- <div
13759
- class=${e$5({
13760
- "content-browser-table__cell": true,
13761
- [`content-browser-table__cell--${column2.align}`]: Boolean(column2.align)
13762
- })}
13763
- role="cell"
13764
- >
13765
- <cx-line-clamp lines=${(_a2 = column2.lines) != null ? _a2 : 1}>
13766
- <cx-typography variant="body3">${readCellValue(asset, column2.field)}</cx-typography>
13767
- </cx-line-clamp>
13768
- </div>
13769
- `;
13770
- }
13771
- )}
13772
- <div class="content-browser-table__cell content-browser-table__cell--action" role="cell">
13773
- ${this.renderActionButton(asset.id)}
13774
- </div>
13775
- </div>
13776
- `;
13777
- }
13778
- handleScroll(event) {
13779
- const container = event.target;
13780
- this.scrollAnchorController.capture(container);
13781
- const scrolledVertically = container.scrollTop !== __privateGet$1(this, _lastScrollTop);
13782
- __privateSet$1(this, _lastScrollTop, container.scrollTop);
13783
- if (!scrolledVertically) {
13784
- return;
13785
- }
13786
- if (container.scrollTop + container.clientHeight >= container.scrollHeight - 10) {
13787
- this.debouncedHandleScrollEnd();
13788
- }
13789
- }
13790
- handleScrollEnd() {
13791
- if (this.hasMore) {
13792
- this.emit("cx-content-browser-grid-scroll-end");
13793
- }
13794
- }
13795
- render() {
13796
- return b`
13797
- <div
13798
- class="content-browser-table-loading"
13799
- style=${o$2({
13800
- opacity: this.loading ? 1 : 0
13801
- })}
13802
- >
13803
- <cx-progress-bar indeterminate></cx-progress-bar>
13804
- </div>
13805
- <cx-resize-observer @cx-resize=${this.handleResize}>
13806
- <div
13807
- class="content-browser-table"
13808
- role="table"
13809
- @scroll=${this.handleScroll}
13810
- >
13811
- <div class="content-browser-table__head" role="rowgroup">
13812
- <div
13813
- class="content-browser-table__header"
13814
- role="row"
13815
- >
13816
- ${c$1(
13817
- this.columns,
13818
- (column2) => column2.field,
13819
- (column2) => b`
13820
- <div
13821
- class=${e$5({
13822
- "content-browser-table__cell": true,
13823
- [`content-browser-table__cell--${column2.align}`]: Boolean(column2.align)
13824
- })}
13825
- role="columnheader"
13826
- data-field=${column2.field}
13827
- >
13828
- <cx-line-clamp lines="1">
13829
- <cx-typography variant="small">${column2.title}</cx-typography>
13830
- </cx-line-clamp>
13831
- ${this.renderResizeHandle(column2)}
13832
- </div>
13833
- `
13834
- )}
13835
- <div
13836
- class="content-browser-table__cell content-browser-table__cell--action"
13837
- role="columnheader"
13838
- aria-label=${this.ctaText || this.localize.term("insert")}
13839
- >
13840
- ${this.renderActionButton(void 0)}
13841
- </div>
13842
- </div>
13843
- </div>
13844
- ${n$5(
13845
- this.empty,
13846
- () => b`
13847
- <cx-content-browser-no-result
13848
- class="content-browser-table__empty"
13849
- icon="search_off"
13850
- message=${this.localize.term("noResults")}
13851
- ></cx-content-browser-no-result>
13852
- `,
13853
- // Deliberately not a `scroller`: the table container scrolls both axes, so the
13854
- // virtualizer sizes itself to the whole list and reacts to that ancestor's scrolling.
13855
- // One scrollport is what keeps the header and the rows on one horizontal offset.
13856
- () => b`
13857
- <lit-virtualizer
13858
- class="content-browser-table__body"
13859
- role="rowgroup"
13860
- .items=${this.assets}
13861
- .renderItem=${(asset) => this.renderRow(asset)}
13862
- ></lit-virtualizer>
13863
- `
13864
- )}
13865
- </div>
13866
- </cx-resize-observer>
13867
- `;
13868
- }
13869
- };
13870
- _lastHeight = /* @__PURE__ */ new WeakMap();
13871
- _lastScrollTop = /* @__PURE__ */ new WeakMap();
13872
- _resize = /* @__PURE__ */ new WeakMap();
13873
- _fallbackListeners = /* @__PURE__ */ new WeakMap();
13874
- CxContentBrowserTable.styles = [componentStyles, styles$1];
13875
- CxContentBrowserTable.dependencies = {
13876
- "cx-button": CxButton,
13877
- "cx-content-browser-no-result": CxContentBrowserNoResult,
13878
- "cx-line-clamp": CxLineClamp,
13879
- "cx-progress-bar": CxProgressBar,
13880
- "cx-resize-observer": CxResizeObserver,
13881
- "cx-typography": CxTypography
13882
- };
13883
- __decorateClass$1([
13884
- e$7(".content-browser-table")
13885
- ], CxContentBrowserTable.prototype, "containerEl", 2);
13886
- __decorateClass$1([
13887
- e$7(".content-browser-table__head")
13888
- ], CxContentBrowserTable.prototype, "headEl", 2);
13889
- __decorateClass$1([
13890
- e$7("lit-virtualizer")
13891
- ], CxContentBrowserTable.prototype, "bodyEl", 2);
13892
- __decorateClass$1([
13893
- n$6({ attribute: "assets", reflect: false, type: Array })
13894
- ], CxContentBrowserTable.prototype, "assets", 2);
13895
- __decorateClass$1([
13896
- n$6({ attribute: "columns", reflect: false, type: Array })
13897
- ], CxContentBrowserTable.prototype, "columns", 2);
13898
- __decorateClass$1([
13899
- n$6({ attribute: "cta-text", reflect: false, type: String })
13900
- ], CxContentBrowserTable.prototype, "ctaText", 2);
13901
- __decorateClass$1([
13902
- n$6({ attribute: "cta-text-transform", reflect: false, type: String })
13903
- ], CxContentBrowserTable.prototype, "ctaTextTransform", 2);
13904
- __decorateClass$1([
13905
- n$6({ attribute: "empty", reflect: true, type: Boolean })
13906
- ], CxContentBrowserTable.prototype, "empty", 2);
13907
- __decorateClass$1([
13908
- n$6({ attribute: "has-more", reflect: true, type: Boolean })
13909
- ], CxContentBrowserTable.prototype, "hasMore", 2);
13910
- __decorateClass$1([
13911
- n$6({ attribute: "loading", reflect: true, type: Boolean })
13912
- ], CxContentBrowserTable.prototype, "loading", 2);
13913
- __decorateClass$1([
13914
- n$6({ attribute: "selected-asset-id", reflect: true, type: String })
13915
- ], CxContentBrowserTable.prototype, "selectedAssetId", 2);
13916
- __decorateClass$1([
13917
- n$6({ attribute: false })
13918
- ], CxContentBrowserTable.prototype, "busyAssetId", 2);
13919
- __decorateClass$1([
13920
- r$6()
13921
- ], CxContentBrowserTable.prototype, "assetMap", 2);
13922
- __decorateClass$1([
13923
- r$6()
13924
- ], CxContentBrowserTable.prototype, "columnWidths", 2);
13925
- __decorateClass$1([
13926
- watch("columns", { waitUntilFirstUpdate: true })
13927
- ], CxContentBrowserTable.prototype, "handleColumnsChange", 1);
13928
- __decorateClass$1([
13929
- watch("assets")
13930
- ], CxContentBrowserTable.prototype, "handleAssetsChange", 1);
13931
- CxContentBrowserTable = __decorateClass$1([
13932
- customElement("cx-content-browser-table")
13933
- ], CxContentBrowserTable);
13934
12838
  const appendPathAndQuery = (baseUrl, pathSuffix, extraQueryParams = []) => {
13935
12839
  const questionMarkIndex = baseUrl.indexOf("?");
13936
12840
  const hashIndex = baseUrl.indexOf("#");
@@ -13968,6 +12872,9 @@ const FIELD_SUBTYPE = "CoreField.DocSubType";
13968
12872
  const FIELD_TITLE_WITH_FALLBACK = "CoreField.TitleWithFallback";
13969
12873
  const FIELD_UPDATED_FILE_NAME = "CoreField.UpdatedFileName";
13970
12874
  const ORIGINAL_VIEW_SIZE = "CoreField.OriginalPreview";
12875
+ function resolveAssetCaption(fields) {
12876
+ return fields[FIELD_DOC_TITLE] || fields[FIELD_IDENTIFIER] || "";
12877
+ }
13971
12878
  function resolveAssetExtraFilters(selectedFacets) {
13972
12879
  if (!selectedFacets || Object.keys(selectedFacets).length === 0) {
13973
12880
  return {};
@@ -14319,26 +13226,8 @@ function apiGetAssetsByIDs(_0) {
14319
13226
  }
14320
13227
  });
14321
13228
  }
14322
- const ASSET_LIST_FIELDS = [
14323
- DEFAULT_VIEW_SIZE,
14324
- FIELD_DOC_TYPE,
14325
- FIELD_EXTENSION,
14326
- FIELD_FILE_SIZE,
14327
- FIELD_IDENTIFIER,
14328
- FIELD_KEYWORDS,
14329
- FIELD_MAX_HEIGHT,
14330
- FIELD_MAX_WIDTH,
14331
- FIELD_ORIGINAL_FILE_NAME,
14332
- FIELD_RECORD_ID,
14333
- FIELD_SUBTYPE,
14334
- FIELD_TITLE_WITH_FALLBACK,
14335
- FIELD_UPDATED_FILE_NAME,
14336
- FIELD_STORAGE_GROUP,
14337
- ORIGINAL_VIEW_SIZE
14338
- ];
14339
13229
  function apiGetAssets(_0) {
14340
13230
  return __async(this, arguments, function* ({
14341
- fields,
14342
13231
  folderId,
14343
13232
  isSeeThrough,
14344
13233
  limitedToDocTypes = [],
@@ -14349,17 +13238,25 @@ function apiGetAssets(_0) {
14349
13238
  start,
14350
13239
  useSession
14351
13240
  }) {
14352
- var _a2;
14353
- const validatedFields = (_a2 = fields == null ? void 0 : fields.filter((field) => field && typeof field === "string")) != null ? _a2 : [];
14354
13241
  try {
14355
13242
  const response = yield http.request({
14356
13243
  data: __spreadValues({
14357
13244
  Fields: [
14358
- ...ASSET_LIST_FIELDS,
14359
- ...validatedFields.filter((field, index) => {
14360
- const seen = [...ASSET_LIST_FIELDS, ...validatedFields.slice(0, index)];
14361
- return !seen.some((item) => item.toLowerCase() === field.toLowerCase());
14362
- })
13245
+ DEFAULT_VIEW_SIZE,
13246
+ FIELD_DOC_TITLE,
13247
+ FIELD_DOC_TYPE,
13248
+ FIELD_EXTENSION,
13249
+ FIELD_FILE_SIZE,
13250
+ FIELD_IDENTIFIER,
13251
+ FIELD_KEYWORDS,
13252
+ FIELD_MAX_HEIGHT,
13253
+ FIELD_MAX_WIDTH,
13254
+ FIELD_RECORD_ID,
13255
+ FIELD_SUBTYPE,
13256
+ FIELD_TITLE_WITH_FALLBACK,
13257
+ FIELD_UPDATED_FILE_NAME,
13258
+ FIELD_STORAGE_GROUP,
13259
+ ORIGINAL_VIEW_SIZE
14363
13260
  ],
14364
13261
  Limit: pageSize || void 0,
14365
13262
  LimitedToDocTypes: limitedToDocTypes,
@@ -14375,22 +13272,15 @@ function apiGetAssets(_0) {
14375
13272
  transformResponse: [
14376
13273
  ...Array.isArray(http.defaults.transformResponse) ? http.defaults.transformResponse : [],
14377
13274
  (rawResponse) => {
14378
- var _a3, _b2;
14379
- const mappedItems = (_b2 = (_a3 = rawResponse.contentItems) == null ? void 0 : _a3.map((item) => {
14380
- var _a4, _b3, _c2, _d2, _e3, _f2, _g, _h, _i, _j, _k, _l;
14381
- let extension = (_a4 = item.fields[FIELD_EXTENSION]) != null ? _a4 : "";
14382
- const name = item.fields[FIELD_TITLE_WITH_FALLBACK];
13275
+ var _a2, _b2;
13276
+ const mappedItems = (_b2 = (_a2 = rawResponse.contentItems) == null ? void 0 : _a2.map((item) => {
13277
+ var _a3, _b3, _c2, _d2, _e3, _f2, _g, _h, _i, _j, _k, _l;
13278
+ let extension = (_a3 = item.fields[FIELD_EXTENSION]) != null ? _a3 : "";
13279
+ const name = resolveAssetCaption(item.fields);
14383
13280
  if (extension && !extension.startsWith(".")) {
14384
13281
  extension = "." + extension;
14385
13282
  }
14386
- return __spreadProps(__spreadValues({}, validatedFields.reduce((acc, field) => {
14387
- var _a5, _b4;
14388
- const sourceField = (_a5 = ASSET_LIST_FIELDS.find(
14389
- (defaultField) => defaultField.toLowerCase() === field.toLowerCase()
14390
- )) != null ? _a5 : field;
14391
- acc[field] = (_b4 = item.fields[sourceField]) != null ? _b4 : "";
14392
- return acc;
14393
- }, {})), {
13283
+ return {
14394
13284
  allowATSLink: item.fields[FIELD_ALLOW_ATS_LINK] === "True",
14395
13285
  docSubType: (_b3 = item.fields[FIELD_SUBTYPE]) != null ? _b3 : "",
14396
13286
  docType: (_c2 = item.fields[FIELD_DOC_TYPE]) != null ? _c2 : "",
@@ -14407,7 +13297,7 @@ function apiGetAssets(_0) {
14407
13297
  size: (_j = item.fields[FIELD_FILE_SIZE]) != null ? _j : "0 MB",
14408
13298
  tags: (_k = item.fields[FIELD_KEYWORDS]) != null ? _k : "",
14409
13299
  width: (_l = item.fields[FIELD_MAX_WIDTH]) != null ? _l : "0"
14410
- });
13300
+ };
14411
13301
  })) != null ? _b2 : [];
14412
13302
  return {
14413
13303
  facets: rawResponse.facets,
@@ -14882,7 +13772,6 @@ var intersection = baseRest(function(arrays) {
14882
13772
  });
14883
13773
  class FetchAndMergeAssetsController {
14884
13774
  constructor(host, {
14885
- additionalFields,
14886
13775
  availableDocTypes,
14887
13776
  baseUrl,
14888
13777
  defaultFolderId,
@@ -14924,7 +13813,6 @@ class FetchAndMergeAssetsController {
14924
13813
  this._debounceResolve = null;
14925
13814
  this.host = host;
14926
13815
  this.availableDocTypes = availableDocTypes;
14927
- this.additionalFields = additionalFields != null ? additionalFields : [];
14928
13816
  this.defaultFolderId = defaultFolderId;
14929
13817
  this.defaultIsSeeThrough = defaultIsSeeThrough;
14930
13818
  this.defaultSearchText = defaultSearchText;
@@ -15055,14 +13943,6 @@ class FetchAndMergeAssetsController {
15055
13943
  }
15056
13944
  this.host.requestUpdate();
15057
13945
  }
15058
- /**
15059
- * Table columns are host configuration and can be reconfigured after mount, unlike the rest of
15060
- * these options — every later fetch must ask for the current field list, not the one that
15061
- * happened to be set when the controller was constructed.
15062
- */
15063
- updateAdditionalFields(additionalFields) {
15064
- this.additionalFields = additionalFields;
15065
- }
15066
13946
  updateAuth(token2, useSession) {
15067
13947
  if (this.useSiteSession) {
15068
13948
  return;
@@ -15203,7 +14083,6 @@ class FetchAndMergeAssetsController {
15203
14083
  }
15204
14084
  }
15205
14085
  request = __spreadProps(__spreadValues({}, request), {
15206
- fields: this.additionalFields,
15207
14086
  limitedToDocTypes: this.availableDocTypes
15208
14087
  });
15209
14088
  this.lastRequest = request;
@@ -15237,12 +14116,13 @@ class FetchAndMergeAssetsController {
15237
14116
  }
15238
14117
  fetchAssetByID(id, options) {
15239
14118
  return __async(this, null, function* () {
15240
- var _a2, _b2, _c2, _d2, _e3, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o;
14119
+ var _a2, _b2, _c2, _d2, _e3, _f2, _g, _h, _i, _j, _k, _l, _m, _n;
15241
14120
  const { allowedExtensions = [], canFavorite = false, simplePick = false } = options != null ? options : {};
15242
14121
  const promises = [
15243
14122
  apiGetAssetsByIDs({
15244
14123
  extraFields: [
15245
14124
  DEFAULT_VIEW_SIZE,
14125
+ FIELD_DOC_TITLE,
15246
14126
  FIELD_DOC_TYPE,
15247
14127
  FIELD_EXTENSION,
15248
14128
  FIELD_FILE_SIZE,
@@ -15250,7 +14130,6 @@ class FetchAndMergeAssetsController {
15250
14130
  FIELD_KEYWORDS,
15251
14131
  FIELD_MAX_HEIGHT,
15252
14132
  FIELD_MAX_WIDTH,
15253
- FIELD_ORIGINAL_FILE_NAME,
15254
14133
  FIELD_RECORD_ID,
15255
14134
  FIELD_SUBTYPE,
15256
14135
  FIELD_TITLE_WITH_FALLBACK,
@@ -15289,17 +14168,17 @@ class FetchAndMergeAssetsController {
15289
14168
  identifier: (_d2 = item[FIELD_IDENTIFIER]) != null ? _d2 : "",
15290
14169
  imageUrl: (_e3 = item[DEFAULT_VIEW_SIZE]) != null ? _e3 : "",
15291
14170
  inColdStorage: Boolean(item.inColdStorage),
15292
- name: (_f2 = item[FIELD_TITLE_WITH_FALLBACK]) != null ? _f2 : "",
15293
- originalUrl: (_g = item[ORIGINAL_VIEW_SIZE]) != null ? _g : "",
15294
- previewUrl: (_i = (_h = proxyData == null ? void 0 : proxyData.previewUrl) != null ? _h : item[DEFAULT_VIEW_SIZE]) != null ? _i : "",
15295
- recordId: (_j = item[FIELD_RECORD_ID]) != null ? _j : "",
15296
- scrubUrl: (_k = item[FIELD_SCRUB_URL]) != null ? _k : "",
15297
- size: (_l = item[FIELD_FILE_SIZE]) != null ? _l : "0 MB",
15298
- tags: (_m = item[FIELD_KEYWORDS]) != null ? _m : "",
15299
- width: (_n = item[FIELD_MAX_WIDTH]) != null ? _n : "0"
14171
+ name: resolveAssetCaption(item),
14172
+ originalUrl: (_f2 = item[ORIGINAL_VIEW_SIZE]) != null ? _f2 : "",
14173
+ previewUrl: (_h = (_g = proxyData == null ? void 0 : proxyData.previewUrl) != null ? _g : item[DEFAULT_VIEW_SIZE]) != null ? _h : "",
14174
+ recordId: (_i = item[FIELD_RECORD_ID]) != null ? _i : "",
14175
+ scrubUrl: (_j = item[FIELD_SCRUB_URL]) != null ? _j : "",
14176
+ size: (_k = item[FIELD_FILE_SIZE]) != null ? _k : "0 MB",
14177
+ tags: (_l = item[FIELD_KEYWORDS]) != null ? _l : "",
14178
+ width: (_m = item[FIELD_MAX_WIDTH]) != null ? _m : "0"
15300
14179
  },
15301
14180
  isFavorite,
15302
- proxies: ((_o = proxyData == null ? void 0 : proxyData.proxies) != null ? _o : []).filter((proxy) => {
14181
+ proxies: ((_n = proxyData == null ? void 0 : proxyData.proxies) != null ? _n : []).filter((proxy) => {
15303
14182
  var _a3;
15304
14183
  if (!allowedExtensions || allowedExtensions.length === 0) {
15305
14184
  return true;
@@ -15471,9 +14350,6 @@ const styles = i$7`
15471
14350
  `;
15472
14351
  var __defProp2 = Object.defineProperty;
15473
14352
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15474
- var __typeError2 = (msg) => {
15475
- throw TypeError(msg);
15476
- };
15477
14353
  var __decorateClass = (decorators, target, key, kind) => {
15478
14354
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
15479
14355
  for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
@@ -15482,26 +14358,10 @@ var __decorateClass = (decorators, target, key, kind) => {
15482
14358
  if (kind && result) __defProp2(target, key, result);
15483
14359
  return result;
15484
14360
  };
15485
- var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
15486
- var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), member.get(obj));
15487
- 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);
15488
- var __privateSet2 = (obj, member, value, setter) => (__accessCheck2(obj, member, "write to private field"), member.set(obj, value), value);
15489
- var _openingAsset, _insertInFlight;
15490
14361
  const COMPUTED_FIELDS = ["ScrubUrl", "AllowATSLink"];
15491
14362
  const MOBILE_WIDTH_THRESHOLD = 480;
15492
14363
  const FORCE_OVERLAY_THRESHOLD = 650;
15493
14364
  const PERSISTENT_DRAWER_WIDTH = 400;
15494
- function resolvePageSize(view) {
15495
- switch (view) {
15496
- case GridView$1.Large:
15497
- return 15;
15498
- case GridView$1.Small:
15499
- case TABLE_VIEW:
15500
- return 30;
15501
- default:
15502
- return 20;
15503
- }
15504
- }
15505
14365
  let CxContentBrowser = class extends CortexElement {
15506
14366
  constructor() {
15507
14367
  super(...arguments);
@@ -15527,7 +14387,6 @@ let CxContentBrowser = class extends CortexElement {
15527
14387
  this.canFavorite = false;
15528
14388
  this.canPinAsset = false;
15529
14389
  this.canUseProxies = false;
15530
- this.autoSelectFormat = false;
15531
14390
  this.simplePick = false;
15532
14391
  this.canViewVersions = false;
15533
14392
  this.canTrack = false;
@@ -15536,7 +14395,6 @@ let CxContentBrowser = class extends CortexElement {
15536
14395
  this.ctaTextTransform = "capitalize";
15537
14396
  this.extraFields = [];
15538
14397
  this.defaultGridView = GridView$1.Medium;
15539
- this.tableColumns = [];
15540
14398
  this.defaultSortOrderName = "";
15541
14399
  this.defaultSortDirection = "ascending";
15542
14400
  this.defaultSelectedFacets = {};
@@ -15574,40 +14432,28 @@ let CxContentBrowser = class extends CortexElement {
15574
14432
  this.selectedAssetId = void 0;
15575
14433
  this.isMobile = false;
15576
14434
  this.defaultPageSize = 10;
15577
- this.busyAssetId = void 0;
15578
- __privateAdd2(this, _openingAsset, false);
15579
- __privateAdd2(this, _insertInFlight, false);
15580
14435
  }
15581
14436
  willUpdate(changedProperties) {
15582
14437
  super.willUpdate(changedProperties);
15583
14438
  if (!this.hasUpdated) {
15584
- this.view = this.defaultGridView === TABLE_VIEW && !this.canUseTable ? GridView$1.Medium : this.defaultGridView;
15585
- }
15586
- }
15587
- /**
15588
- * Never trust the host's value: it also arrives by direct property assignment, past the converter.
15589
- * Entries are checked one by one, not just the outer array — `field` is dereferenced while the
15590
- * fetch controller is being built, where a throw leaves the controller unassigned and the picker
15591
- * blank. `title` is only rendered, and Lit renders a nullish one as nothing, so a column is not
15592
- * worth dropping over it.
15593
- */
15594
- get tableColumnList() {
15595
- const columns = this.tableColumns;
15596
- if (!Array.isArray(columns)) {
15597
- return [];
14439
+ this.view = this.defaultGridView;
15598
14440
  }
15599
- return columns.filter((column2) => {
15600
- return !!column2 && typeof column2 === "object" && typeof column2.field === "string" && column2.field.length > 0;
15601
- });
15602
- }
15603
- get canUseTable() {
15604
- return this.tableColumnList.length > 0;
15605
14441
  }
15606
14442
  runFirstUpdated() {
15607
14443
  if (this.useSiteSession) {
15608
14444
  this.baseUrl = resolveSiteSessionUrl(this.baseUrl);
15609
14445
  }
15610
- this.defaultPageSize = resolvePageSize(this.view);
14446
+ switch (this.view) {
14447
+ case GridView$1.Large:
14448
+ this.defaultPageSize = 15;
14449
+ break;
14450
+ case GridView$1.Medium:
14451
+ this.defaultPageSize = 20;
14452
+ break;
14453
+ case GridView$1.Small:
14454
+ this.defaultPageSize = 30;
14455
+ break;
14456
+ }
15611
14457
  this.lastRequest = __spreadProps(__spreadValues({}, this.lastRequest), {
15612
14458
  folderId: this.defaultFolderId,
15613
14459
  isSeeThrough: this.defaultIsSeeThrough,
@@ -15618,7 +14464,6 @@ let CxContentBrowser = class extends CortexElement {
15618
14464
  });
15619
14465
  this.updateComplete.then(() => {
15620
14466
  this.fetchAndMergeAssetsController = new FetchAndMergeAssetsController(this, {
15621
- additionalFields: this.tableColumnList.map((column2) => column2.field),
15622
14467
  availableDocTypes: this.availableDocTypes,
15623
14468
  baseUrl: this.baseUrl,
15624
14469
  defaultFolderId: this.defaultFolderId,
@@ -15658,12 +14503,7 @@ let CxContentBrowser = class extends CortexElement {
15658
14503
  }
15659
14504
  openFormatDialog(id) {
15660
14505
  return __async(this, null, function* () {
15661
- if (__privateGet2(this, _openingAsset) || __privateGet2(this, _insertInFlight)) {
15662
- return;
15663
- }
15664
- __privateSet2(this, _openingAsset, true);
15665
14506
  this.selectedAssetId = id;
15666
- this.busyAssetId = id;
15667
14507
  try {
15668
14508
  const asset = yield this.fetchAndMergeAssetsController.fetchAssetByID(id, {
15669
14509
  canFavorite: this.canFavorite,
@@ -15671,7 +14511,6 @@ let CxContentBrowser = class extends CortexElement {
15671
14511
  });
15672
14512
  if (!asset) {
15673
14513
  this.selectedAssetId = void 0;
15674
- this.busyAssetId = void 0;
15675
14514
  return;
15676
14515
  }
15677
14516
  let isAssetPinned = false;
@@ -15682,14 +14521,8 @@ let CxContentBrowser = class extends CortexElement {
15682
14521
  isAssetPinned = lookupEvent.detail.isAssetPinned;
15683
14522
  }
15684
14523
  this.formatDialog.open(__spreadProps(__spreadValues({}, asset), { isAssetPinned }));
15685
- if (this.formatDialog.isDialogOpen) {
15686
- this.busyAssetId = void 0;
15687
- }
15688
14524
  } catch (e2) {
15689
14525
  this.selectedAssetId = void 0;
15690
- this.busyAssetId = void 0;
15691
- } finally {
15692
- __privateSet2(this, _openingAsset, false);
15693
14526
  }
15694
14527
  });
15695
14528
  }
@@ -15703,16 +14536,6 @@ let CxContentBrowser = class extends CortexElement {
15703
14536
  });
15704
14537
  });
15705
14538
  }
15706
- handleTableColumnsChange() {
15707
- if (!this.fetchAndMergeAssetsController) {
15708
- return;
15709
- }
15710
- this.fetchAndMergeAssetsController.updateAdditionalFields(
15711
- this.tableColumnList.map((column2) => column2.field)
15712
- );
15713
- this.lastRequest = __spreadProps(__spreadValues({}, this.lastRequest), { start: 0 });
15714
- void this.fetchAndMergeAssetsController.fetchAndMergeAssets(this.lastRequest);
15715
- }
15716
14539
  handleAuthChange() {
15717
14540
  var _a2;
15718
14541
  (_a2 = this.fetchAndMergeAssetsController) == null ? void 0 : _a2.updateAuth(this.token, this.useSession);
@@ -15770,7 +14593,17 @@ let CxContentBrowser = class extends CortexElement {
15770
14593
  });
15771
14594
  yield this.fetchAndMergeAssetsController.fetchAndMergeAssets(this.lastRequest);
15772
14595
  }
15773
- this.defaultPageSize = resolvePageSize(event.detail.view);
14596
+ switch (event.detail.view) {
14597
+ case GridView$1.Large:
14598
+ this.defaultPageSize = 15;
14599
+ break;
14600
+ case GridView$1.Medium:
14601
+ this.defaultPageSize = 20;
14602
+ break;
14603
+ case GridView$1.Small:
14604
+ this.defaultPageSize = 30;
14605
+ break;
14606
+ }
15774
14607
  this.view = event.detail.view;
15775
14608
  });
15776
14609
  }
@@ -15890,17 +14723,15 @@ let CxContentBrowser = class extends CortexElement {
15890
14723
  selectedProxyMetadata: event.detail.selectedProxyMetadata
15891
14724
  });
15892
14725
  this.formatDialog.hide();
15893
- this.busyAssetId = void 0;
15894
14726
  return;
15895
14727
  }
15896
- __privateSet2(this, _insertInFlight, true);
15897
14728
  try {
15898
14729
  const response = yield this.fetchAndMergeAssetsController.getAssetLink(__spreadProps(__spreadValues({}, event.detail), {
15899
14730
  assets: [event.detail.asset],
15900
14731
  extraFields: this.extraFields
15901
14732
  }));
15902
14733
  if (response.isError) {
15903
- this.reportProxyConfirmFailure();
14734
+ this.formatDialog.setLoadingConfirm(false);
15904
14735
  return;
15905
14736
  }
15906
14737
  this.handleSelectedAsset({
@@ -15910,23 +14741,12 @@ let CxContentBrowser = class extends CortexElement {
15910
14741
  });
15911
14742
  this.formatDialog.hide();
15912
14743
  } catch (e2) {
15913
- this.reportProxyConfirmFailure();
15914
- } finally {
15915
- __privateSet2(this, _insertInFlight, false);
15916
- this.busyAssetId = void 0;
14744
+ this.formatDialog.setLoadingConfirm(false);
15917
14745
  }
15918
14746
  });
15919
14747
  }
15920
- reportProxyConfirmFailure() {
15921
- if (this.formatDialog.isDialogOpen) {
15922
- this.formatDialog.setLoadingConfirm(false);
15923
- return;
15924
- }
15925
- this.formatDialog.revealAfterAutoConfirm();
15926
- }
15927
14748
  handleFormatConfirm(event) {
15928
14749
  return __async(this, null, function* () {
15929
- __privateSet2(this, _insertInFlight, true);
15930
14750
  try {
15931
14751
  const response = yield this.fetchAndMergeAssetsController.getAssetLink(__spreadProps(__spreadValues({}, event.detail), {
15932
14752
  assets: [event.detail.asset],
@@ -15945,9 +14765,6 @@ let CxContentBrowser = class extends CortexElement {
15945
14765
  this.formatDialog.hide();
15946
14766
  } catch (e2) {
15947
14767
  this.formatDialog.setLoadingConfirm(false);
15948
- } finally {
15949
- __privateSet2(this, _insertInFlight, false);
15950
- this.busyAssetId = void 0;
15951
14768
  }
15952
14769
  });
15953
14770
  }
@@ -16093,7 +14910,6 @@ let CxContentBrowser = class extends CortexElement {
16093
14910
  .newlyChangedOption=${this.newlyChangedOption}
16094
14911
  .sortOrders=${sortOrders}
16095
14912
  .views=${this.views}
16096
- ?can-use-table=${this.canUseTable}
16097
14913
  ?is-mobile=${this.isMobile}
16098
14914
  ?is-see-through=${request == null ? void 0 : request.isSeeThrough}
16099
14915
  ?loading=${loading}
@@ -16109,45 +14925,20 @@ let CxContentBrowser = class extends CortexElement {
16109
14925
  @cx-content-browser-control-filter-change=${this.handleFilterChange}
16110
14926
  @cx-content-browser-control-bar-search-change=${this.handleSearchChange}
16111
14927
  ></cx-content-browser-control-bar>
16112
- ${n$5(
16113
- this.view === TABLE_VIEW && this.canUseTable,
16114
- () => b`
16115
- <cx-content-browser-table
16116
- .busyAssetId=${this.busyAssetId}
16117
- .assets=${items}
16118
- .columns=${this.tableColumnList}
16119
- ?empty=${!loading && items.length === 0}
16120
- cta-text=${this.ctaText}
16121
- cta-text-transform=${this.ctaTextTransform}
16122
- ?has-more=${items.length < totalCount}
16123
- ?loading=${loading}
16124
- selected-asset-id=${o$5(this.selectedAssetId || void 0)}
16125
- @cx-content-browser-grid-scroll-end=${this.handleScrollEnd}
16126
- @cx-content-browser-grid-resize=${this.handleGridResize}
16127
- @cx-content-browser-grid-click=${this.handleGridClick}
16128
- ></cx-content-browser-table>
16129
- `,
16130
- () => b`
16131
- <cx-content-browser-grid
16132
- .assets=${items}
16133
- ?has-more=${items.length < totalCount}
16134
- ?loading=${loading}
16135
- ?show-title=${this.showTitle}
16136
- ?show-size=${this.showSize}
16137
- ?show-dimensions=${this.showDimensions}
16138
- ?show-tags=${this.showTags}
16139
- ?show-cta=${isAutoSelectFormatActive(this.autoSelectFormat)}
16140
- .busyAssetId=${this.busyAssetId}
16141
- cta-text=${this.ctaText}
16142
- cta-text-transform=${this.ctaTextTransform}
16143
- selected-asset-id=${o$5(this.selectedAssetId || void 0)}
16144
- view=${this.view}
16145
- @cx-content-browser-grid-scroll-end=${this.handleScrollEnd}
16146
- @cx-content-browser-grid-resize=${this.handleGridResize}
16147
- @cx-content-browser-grid-click=${this.handleGridClick}
16148
- ></cx-content-browser-grid>
16149
- `
16150
- )}
14928
+ <cx-content-browser-grid
14929
+ .assets=${items}
14930
+ ?has-more=${items.length < totalCount}
14931
+ ?loading=${loading}
14932
+ ?show-title=${this.showTitle}
14933
+ ?show-size=${this.showSize}
14934
+ ?show-dimensions=${this.showDimensions}
14935
+ ?show-tags=${this.showTags}
14936
+ selected-asset-id=${o$5(this.selectedAssetId || void 0)}
14937
+ view=${this.view}
14938
+ @cx-content-browser-grid-scroll-end=${this.handleScrollEnd}
14939
+ @cx-content-browser-grid-resize=${this.handleGridResize}
14940
+ @cx-content-browser-grid-click=${this.handleGridClick}
14941
+ ></cx-content-browser-grid>
16151
14942
  </cx-resize-observer>
16152
14943
  <cx-content-browser-format-dialog
16153
14944
  .availableExtensions=${availableExtensions}
@@ -16160,7 +14951,6 @@ let CxContentBrowser = class extends CortexElement {
16160
14951
  cta-text-transform=${this.ctaTextTransform}
16161
14952
  variant=${this.isMobile ? ContentBrowserFormatDialogVariant.Drawer : ContentBrowserFormatDialogVariant.Dialog}
16162
14953
  token=${this.useSiteSession ? "" : this.token}
16163
- .autoSelectFormat=${this.autoSelectFormat}
16164
14954
  ?can-custom-format=${!!(parameters == null ? void 0 : parameters.ATSEnabled)}
16165
14955
  ?can-favorite=${this.canFavorite}
16166
14956
  ?can-pin-asset=${this.canPinAsset}
@@ -16180,8 +14970,6 @@ let CxContentBrowser = class extends CortexElement {
16180
14970
  `;
16181
14971
  }
16182
14972
  };
16183
- _openingAsset = /* @__PURE__ */ new WeakMap();
16184
- _insertInFlight = /* @__PURE__ */ new WeakMap();
16185
14973
  CxContentBrowser.styles = [componentStyles, styles];
16186
14974
  CxContentBrowser.dependencies = {
16187
14975
  "cx-content-browser-browser": CxContentBrowserBrowser,
@@ -16190,7 +14978,6 @@ CxContentBrowser.dependencies = {
16190
14978
  "cx-content-browser-grid": CxContentBrowserGrid,
16191
14979
  "cx-content-browser-header": CxContentBrowserHeader,
16192
14980
  "cx-content-browser-no-result": CxContentBrowserNoResult,
16193
- "cx-content-browser-table": CxContentBrowserTable,
16194
14981
  "cx-icon": CxIcon,
16195
14982
  "cx-icon-button": CxIconButton,
16196
14983
  "cx-resize-observer": CxResizeObserver,
@@ -16282,9 +15069,6 @@ __decorateClass([
16282
15069
  __decorateClass([
16283
15070
  n$6({ attribute: "can-use-proxies", reflect: true, type: Boolean })
16284
15071
  ], CxContentBrowser.prototype, "canUseProxies", 2);
16285
- __decorateClass([
16286
- n$6({ attribute: "auto-select-format", converter: autoSelectFormatConverter, reflect: false })
16287
- ], CxContentBrowser.prototype, "autoSelectFormat", 2);
16288
15072
  __decorateClass([
16289
15073
  n$6({ attribute: "simple-pick", reflect: true, type: Boolean })
16290
15074
  ], CxContentBrowser.prototype, "simplePick", 2);
@@ -16317,32 +15101,6 @@ __decorateClass([
16317
15101
  __decorateClass([
16318
15102
  n$6({ attribute: "default-grid-view", type: String })
16319
15103
  ], CxContentBrowser.prototype, "defaultGridView", 2);
16320
- __decorateClass([
16321
- n$6({
16322
- attribute: "table-columns",
16323
- /**
16324
- * Lit's stock Array converter returns `null` for anything `JSON.parse` rejects, and a host that
16325
- * stringifies an array into the attribute hands it `""` or `"[object Object]"`. `null` then
16326
- * throws on every read below, taking the whole picker down. An unreadable value means "no
16327
- * columns", which turns the table view off — the same outcome as not configuring one.
16328
- */
16329
- converter: {
16330
- fromAttribute: (value) => {
16331
- if (!value) {
16332
- return [];
16333
- }
16334
- try {
16335
- const parsed = JSON.parse(value);
16336
- return Array.isArray(parsed) ? parsed : [];
16337
- } catch (e2) {
16338
- return [];
16339
- }
16340
- },
16341
- toAttribute: (value) => JSON.stringify(value != null ? value : [])
16342
- },
16343
- type: Array
16344
- })
16345
- ], CxContentBrowser.prototype, "tableColumns", 2);
16346
15104
  __decorateClass([
16347
15105
  n$6({ attribute: "default-sort-order-name", type: String })
16348
15106
  ], CxContentBrowser.prototype, "defaultSortOrderName", 2);
@@ -16406,15 +15164,9 @@ __decorateClass([
16406
15164
  __decorateClass([
16407
15165
  r$6()
16408
15166
  ], CxContentBrowser.prototype, "isMobile", 2);
16409
- __decorateClass([
16410
- r$6()
16411
- ], CxContentBrowser.prototype, "busyAssetId", 2);
16412
15167
  __decorateClass([
16413
15168
  watch("lastRequest", { waitUntilFirstUpdate: true })
16414
15169
  ], CxContentBrowser.prototype, "handleLastRequestChange", 1);
16415
- __decorateClass([
16416
- watch("tableColumns", { waitUntilFirstUpdate: true })
16417
- ], CxContentBrowser.prototype, "handleTableColumnsChange", 1);
16418
15170
  __decorateClass([
16419
15171
  watch(["token", "useSession"], { waitUntilFirstUpdate: true })
16420
15172
  ], CxContentBrowser.prototype, "handleAuthChange", 1);
@@ -30593,9 +29345,7 @@ const GlobalConfigContext = reactExports.createContext({
30593
29345
  allowFavorites: false,
30594
29346
  allowPin: false,
30595
29347
  allowFormatDialogPin: false,
30596
- defaultGridView: "",
30597
- autoSelectFormat: false,
30598
- tableColumns: []
29348
+ defaultGridView: ""
30599
29349
  });
30600
29350
  function formatProdErrorMessage$1(code) {
30601
29351
  return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
@@ -33406,9 +32156,6 @@ var GridView = /* @__PURE__ */ ((GridView2) => {
33406
32156
  function isPromise(value) {
33407
32157
  return typeof value === "object" && value !== null && typeof value.then === "function";
33408
32158
  }
33409
- function isSupportedView(view) {
33410
- return view === TABLE_VIEW || Object.values(GridView).includes(view);
33411
- }
33412
32159
  function parseSelectedFacets(selectedFilter) {
33413
32160
  var _a2;
33414
32161
  if (!selectedFilter) {
@@ -33470,9 +32217,7 @@ const AssetsPicker = reactExports.forwardRef(function AssetsPicker2({ accessToke
33470
32217
  pluginInfo,
33471
32218
  showCollections,
33472
32219
  showFavoriteFolder,
33473
- showVersions,
33474
- tableColumns,
33475
- autoSelectFormat
32220
+ showVersions
33476
32221
  } = reactExports.useContext(GlobalConfigContext);
33477
32222
  const {
33478
32223
  extraFields,
@@ -33489,7 +32234,7 @@ const AssetsPicker = reactExports.forwardRef(function AssetsPicker2({ accessToke
33489
32234
  const [defaultSettings, setDefaultSettings] = reactExports.useState({
33490
32235
  sortOrder: "",
33491
32236
  sortDirection: "",
33492
- view: isSupportedView(defaultGridView) ? defaultGridView : GridView.Medium,
32237
+ view: Object.values(GridView).includes(defaultGridView) ? defaultGridView : GridView.Medium,
33493
32238
  facets: [],
33494
32239
  selectedFacets: {},
33495
32240
  isSeeThrough: true,
@@ -33686,8 +32431,6 @@ const AssetsPicker = reactExports.forwardRef(function AssetsPicker2({ accessToke
33686
32431
  "available-doc-types": availableDocTypes,
33687
32432
  "available-representative-subtypes": availableRepresentativeSubtypes,
33688
32433
  "default-grid-view": defaultSettings.view,
33689
- "table-columns": tableColumns != null ? tableColumns : [],
33690
- "auto-select-format": autoSelectFormat != null ? autoSelectFormat : false,
33691
32434
  "default-sort-order-name": defaultSettings.sortOrder,
33692
32435
  "default-sort-direction": defaultSettings.sortDirection,
33693
32436
  "default-facets": defaultSettings.facets,
@@ -34375,11 +33118,6 @@ const ContentBrowser = {
34375
33118
  lastLocationMode: true, // Whether to open the last selected folder on load
34376
33119
  allowTracking: true, // Whether to enable tracking parameters for asset URLs
34377
33120
  allowFormatDialogPin: true, // Whether to show pin/unpin actions in format dialog
34378
- tableColumns: [ // Columns of the table view; omit to offer grid views only
34379
- { title: "Identifier", field: "CoreField.Identifier", width: "160px" },
34380
- { title: "Title", field: "CoreField.TitleWithFallback", width: "minmax(0, 2fr)" },
34381
- { title: "Description", field: "Document.CaptionLong", lines: 2 },
34382
- ],
34383
33121
  });`);
34384
33122
  },
34385
33123
  open: (_0) => __async(null, [_0], function* ({
@@ -34430,9 +33168,7 @@ const ContentBrowser = {
34430
33168
  showVersions,
34431
33169
  useSession,
34432
33170
  useSiteSession = false,
34433
- defaultGridView,
34434
- tableColumns,
34435
- autoSelectFormat
33171
+ defaultGridView
34436
33172
  }) {
34437
33173
  var _a2;
34438
33174
  const siteSessionUrl = useSiteSession ? resolveSiteSessionUrl(baseUrl) : void 0;
@@ -34540,9 +33276,7 @@ const ContentBrowser = {
34540
33276
  allowProxy: simplePick ? false : allowProxy !== void 0 ? !!allowProxy : true,
34541
33277
  simplePick: !!simplePick,
34542
33278
  allowFavorites: !!allowFavorites,
34543
- defaultGridView: defaultGridView != null ? defaultGridView : "",
34544
- autoSelectFormat: autoSelectFormat != null ? autoSelectFormat : false,
34545
- tableColumns: tableColumns != null ? tableColumns : []
33279
+ defaultGridView: defaultGridView != null ? defaultGridView : ""
34546
33280
  },
34547
33281
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
34548
33282
  App,