@orangelogic/orange-dam-content-browser-sdk 2.3.5 → 2.3.6-beta-2

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.
@@ -48,6 +48,7 @@ export default class CxContentBrowser extends CortexElement {
48
48
  showFavoriteFolder: boolean;
49
49
  showCloseButton: boolean;
50
50
  useSession: string;
51
+ useSiteSession: boolean;
51
52
  canPin: boolean;
52
53
  canFavorite: boolean;
53
54
  /**
@@ -56,6 +57,12 @@ export default class CxContentBrowser extends CortexElement {
56
57
  */
57
58
  canPinAsset: boolean;
58
59
  canUseProxies: boolean;
60
+ /**
61
+ * Pick-only mode: no available-proxies lookup, no transformation on confirm. The preview popup
62
+ * shows the asset's LargeSizePreview and confirming emits the asset straight to the host.
63
+ * Implies `can-use-proxies=false`.
64
+ */
65
+ simplePick: boolean;
59
66
  canViewVersions: boolean;
60
67
  canTrack: boolean;
61
68
  canLogout: boolean;
@@ -102,6 +109,7 @@ export default class CxContentBrowser extends CortexElement {
102
109
  private openFormatDialog;
103
110
  handleLastRequestChange(): Promise<void>;
104
111
  handleAuthChange(): void;
112
+ handleSiteSessionChange(): void;
105
113
  private handleSortOrderChange;
106
114
  private handleFilterChange;
107
115
  private handleViewChange;
@@ -39,6 +39,7 @@ export default class CxContentBrowserBrowser extends CortexElement {
39
39
  minQueryLength: number;
40
40
  token: string;
41
41
  baseUrl: string;
42
+ useSiteSession: boolean;
42
43
  private searchTerm;
43
44
  private isPersistent;
44
45
  private collectionsOpen;
@@ -5867,6 +5867,7 @@ let CxContentBrowserBrowser = class extends CortexElement {
5867
5867
  this.minQueryLength = 2;
5868
5868
  this.token = "";
5869
5869
  this.baseUrl = "";
5870
+ this.useSiteSession = false;
5870
5871
  this.searchTerm = "";
5871
5872
  this.isPersistent = false;
5872
5873
  this.collectionsOpen = false;
@@ -6059,6 +6060,7 @@ let CxContentBrowserBrowser = class extends CortexElement {
6059
6060
  selected-label=${o$4(this.folderTitle || void 0)}
6060
6061
  auto-page-size
6061
6062
  .token=${this.token}
6063
+ .api=${this.useSiteSession ? apiGetFolders : E}
6062
6064
  .baseUrl=${this.baseUrl}
6063
6065
  .form=${this.closest("form")}
6064
6066
  .firstFetchCallback=${this.handleFirstFetchCallback}
@@ -6160,6 +6162,9 @@ __decorateClass$g([
6160
6162
  __decorateClass$g([
6161
6163
  n$6({ attribute: "base-url", type: String })
6162
6164
  ], CxContentBrowserBrowser.prototype, "baseUrl", 2);
6165
+ __decorateClass$g([
6166
+ n$6({ attribute: "use-site-session", type: Boolean })
6167
+ ], CxContentBrowserBrowser.prototype, "useSiteSession", 2);
6163
6168
  __decorateClass$g([
6164
6169
  r$6()
6165
6170
  ], CxContentBrowserBrowser.prototype, "searchTerm", 2);
@@ -13559,6 +13564,26 @@ function apiGetContentBrowserParameters() {
13559
13564
  }
13560
13565
  });
13561
13566
  }
13567
+ const SITE_SESSION_EXPIRED_MESSAGE = "Your Cortex site session has expired. Sign in to the site and reopen the content browser.";
13568
+ const resolveSiteSessionUrl = (baseUrl) => {
13569
+ const url = new URL(baseUrl || window.location.origin, window.location.origin);
13570
+ if (!["http:", "https:"].includes(url.protocol) || url.origin !== window.location.origin || url.username || url.password || url.search || url.hash) {
13571
+ throw new Error("Site session mode requires an HTTP(S) baseUrl on the current page origin, without credentials, query, or fragment.");
13572
+ }
13573
+ return url.href.replace(/\/$/, "");
13574
+ };
13575
+ const getSiteSessionRequestUrl = (baseUrl, resource) => {
13576
+ const url = new URL(resource, `${resolveSiteSessionUrl(baseUrl)}/`);
13577
+ if (url.origin !== window.location.origin || url.username || url.password) {
13578
+ throw new Error("Site session requests must use the current page origin.");
13579
+ }
13580
+ for (const key of Array.from(url.searchParams.keys())) {
13581
+ if (["token", "usesession"].includes(key.toLowerCase())) {
13582
+ url.searchParams.delete(key);
13583
+ }
13584
+ }
13585
+ return url.href;
13586
+ };
13562
13587
  var nativeMin = Math.min;
13563
13588
  function baseIntersection(arrays, iteratee, comparator) {
13564
13589
  var includes = arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = [];
@@ -13682,7 +13707,8 @@ class FetchAndMergeAssetsController {
13682
13707
  defaultSortDirection,
13683
13708
  defaultSortOrderName,
13684
13709
  token,
13685
- useSession
13710
+ useSession,
13711
+ useSiteSession = false
13686
13712
  }) {
13687
13713
  __privateAdd(this, _lastGetDataParameters);
13688
13714
  __privateAdd(this, _lastMappedAvailableExtensions);
@@ -13719,10 +13745,23 @@ class FetchAndMergeAssetsController {
13719
13745
  this.defaultSelectedFacets = defaultSelectedFacets;
13720
13746
  this.defaultSortOrderName = defaultSortOrderName;
13721
13747
  this.defaultSortDirection = defaultSortDirection;
13722
- this.token = token;
13723
- this.useSession = useSession;
13724
- http.defaults.baseURL = baseUrl;
13748
+ this.applyTransportMode(useSiteSession, baseUrl, token, useSession);
13725
13749
  this.requestInterceptorId = http.interceptors.request.use((config) => {
13750
+ var _a3;
13751
+ if (this.useSiteSession) {
13752
+ config.baseURL = this.baseUrl;
13753
+ config.url = getSiteSessionRequestUrl(this.baseUrl, (_a3 = config.url) != null ? _a3 : "");
13754
+ config.withCredentials = true;
13755
+ config.auth = void 0;
13756
+ ["Authorization", "Token", "UseSession"].forEach((name) => config.headers.delete(name));
13757
+ config.params = __spreadValues({}, config.params);
13758
+ for (const key of Object.keys(config.params)) {
13759
+ if (["token", "usesession"].includes(key.toLowerCase())) {
13760
+ delete config.params[key];
13761
+ }
13762
+ }
13763
+ return config;
13764
+ }
13726
13765
  if (config.url && ![
13727
13766
  AssetApiEndpoint.GET_AVAILABLE_EXTENSIONS,
13728
13767
  AssetApiEndpoint.GET_ASSET_VERSION_HISTORY,
@@ -13741,8 +13780,8 @@ class FetchAndMergeAssetsController {
13741
13780
  ].includes(config.url.split("?")[0])) {
13742
13781
  return config;
13743
13782
  }
13744
- if (baseUrl) {
13745
- config.baseURL = baseUrl;
13783
+ if (this.baseUrl) {
13784
+ config.baseURL = this.baseUrl;
13746
13785
  }
13747
13786
  config.params = __spreadProps(__spreadValues({}, config.params), {
13748
13787
  Token: this.token || void 0,
@@ -13752,16 +13791,21 @@ class FetchAndMergeAssetsController {
13752
13791
  });
13753
13792
  this.responseInterceptorId = http.interceptors.response.use(
13754
13793
  (response) => {
13755
- if (response.status >= 200 && response.status < 300 && !this.isLoggedIn) {
13794
+ if (!this.useSiteSession && response.status >= 200 && response.status < 300 && !this.isLoggedIn) {
13756
13795
  this.isLoggedIn = true;
13757
13796
  this.host.requestUpdate();
13758
13797
  }
13759
13798
  return response;
13760
13799
  },
13761
13800
  (error) => __async(this, null, function* () {
13762
- var _a3;
13801
+ var _a3, _b3;
13802
+ if (this.useSiteSession && ((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.status) === 401) {
13803
+ this.isLoggedIn = false;
13804
+ this.host.requestUpdate();
13805
+ return Promise.reject(error);
13806
+ }
13763
13807
  const originalConfig = error == null ? void 0 : error.config;
13764
- if (((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.status) === 401 && originalConfig && !originalConfig._retry) {
13808
+ if (((_b3 = error == null ? void 0 : error.response) == null ? void 0 : _b3.status) === 401 && originalConfig && !originalConfig._retry) {
13765
13809
  originalConfig._retry = true;
13766
13810
  const newToken = yield this.waitForNewToken();
13767
13811
  if (!newToken) {
@@ -13792,7 +13836,43 @@ class FetchAndMergeAssetsController {
13792
13836
  }
13793
13837
  return this.pendingTokenRefresh;
13794
13838
  }
13839
+ /**
13840
+ * Site-session mode decides the transport (cookies on the Cortex origin vs. Token/UseSession
13841
+ * params), so it has to be applied to the interceptor state and base URL, not just captured once.
13842
+ */
13843
+ applyTransportMode(useSiteSession, baseUrl, token, useSession) {
13844
+ this.useSiteSession = useSiteSession;
13845
+ this.baseUrl = useSiteSession ? resolveSiteSessionUrl(baseUrl) : baseUrl;
13846
+ this.token = useSiteSession ? "" : token;
13847
+ this.useSession = useSiteSession ? "" : useSession;
13848
+ http.defaults.baseURL = this.baseUrl;
13849
+ }
13850
+ /**
13851
+ * `setSiteSession(...)` can flip the mode while the host stays mounted, so keep the transport in
13852
+ * step with the UI instead of serving requests through the mode the controller was built with.
13853
+ */
13854
+ updateSiteSession(useSiteSession, baseUrl, token, useSession) {
13855
+ if (useSiteSession === this.useSiteSession) {
13856
+ return;
13857
+ }
13858
+ this.applyTransportMode(useSiteSession, baseUrl, token, useSession);
13859
+ if (this.resolvePendingTokenRefresh) {
13860
+ this.resolvePendingTokenRefresh(null);
13861
+ this.pendingTokenRefresh = null;
13862
+ this.resolvePendingTokenRefresh = null;
13863
+ }
13864
+ this.isLoggedIn = true;
13865
+ __privateSet(this, _hasFetchedOnce, false);
13866
+ this.fetchInitialData();
13867
+ if (this.lastRequest) {
13868
+ this.fetchAndMergeAssets(this.lastRequest);
13869
+ }
13870
+ this.host.requestUpdate();
13871
+ }
13795
13872
  updateAuth(token, useSession) {
13873
+ if (this.useSiteSession) {
13874
+ return;
13875
+ }
13796
13876
  const tokenChanged = this.token !== token;
13797
13877
  const wasLoggedOut = !this.isLoggedIn;
13798
13878
  this.token = token;
@@ -13962,8 +14042,8 @@ class FetchAndMergeAssetsController {
13962
14042
  }
13963
14043
  fetchAssetByID(id, options) {
13964
14044
  return __async(this, null, function* () {
13965
- var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n;
13966
- const { allowedExtensions = [], canFavorite = false } = options != null ? options : {};
14045
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o;
14046
+ const { allowedExtensions = [], canFavorite = false, simplePick = false } = options != null ? options : {};
13967
14047
  const promises = [
13968
14048
  apiGetAssetsByIDs({
13969
14049
  extraFields: [
@@ -13983,7 +14063,9 @@ class FetchAndMergeAssetsController {
13983
14063
  ],
13984
14064
  recordIds: [id]
13985
14065
  }),
13986
- apiGetAvailableProxies({
14066
+ // Simple-pick mode never offers a proxy or a transformation, so the only thing this response
14067
+ // would still supply is the preview image -- which getcontent already returns as LargeSizePreview.
14068
+ simplePick ? Promise.resolve(void 0) : apiGetAvailableProxies({
13987
14069
  assetRecordId: id
13988
14070
  })
13989
14071
  ];
@@ -14014,15 +14096,15 @@ class FetchAndMergeAssetsController {
14014
14096
  inColdStorage: Boolean(item.inColdStorage),
14015
14097
  name: (_f2 = item[FIELD_TITLE_WITH_FALLBACK]) != null ? _f2 : "",
14016
14098
  originalUrl: (_g = item[ORIGINAL_VIEW_SIZE]) != null ? _g : "",
14017
- previewUrl: (_h = proxyData == null ? void 0 : proxyData.previewUrl) != null ? _h : "",
14018
- recordId: (_i = item[FIELD_RECORD_ID]) != null ? _i : "",
14019
- scrubUrl: (_j = item[FIELD_SCRUB_URL]) != null ? _j : "",
14020
- size: (_k = item[FIELD_FILE_SIZE]) != null ? _k : "0 MB",
14021
- tags: (_l = item[FIELD_KEYWORDS]) != null ? _l : "",
14022
- width: (_m = item[FIELD_MAX_WIDTH]) != null ? _m : "0"
14099
+ previewUrl: (_i = (_h = proxyData == null ? void 0 : proxyData.previewUrl) != null ? _h : item[DEFAULT_VIEW_SIZE]) != null ? _i : "",
14100
+ recordId: (_j = item[FIELD_RECORD_ID]) != null ? _j : "",
14101
+ scrubUrl: (_k = item[FIELD_SCRUB_URL]) != null ? _k : "",
14102
+ size: (_l = item[FIELD_FILE_SIZE]) != null ? _l : "0 MB",
14103
+ tags: (_m = item[FIELD_KEYWORDS]) != null ? _m : "",
14104
+ width: (_n = item[FIELD_MAX_WIDTH]) != null ? _n : "0"
14023
14105
  },
14024
14106
  isFavorite,
14025
- proxies: ((_n = proxyData == null ? void 0 : proxyData.proxies) != null ? _n : []).filter((proxy) => {
14107
+ proxies: ((_o = proxyData == null ? void 0 : proxyData.proxies) != null ? _o : []).filter((proxy) => {
14026
14108
  var _a3;
14027
14109
  if (!allowedExtensions || allowedExtensions.length === 0) {
14028
14110
  return true;
@@ -14069,7 +14151,7 @@ class FetchAndMergeAssetsController {
14069
14151
  return __async(this, null, function* () {
14070
14152
  var _a2;
14071
14153
  const response = yield apiGetAssetLinks(__spreadProps(__spreadValues({}, payload), {
14072
- useSession: (_a2 = payload.useSession) != null ? _a2 : this.useSession
14154
+ useSession: this.useSiteSession ? void 0 : (_a2 = payload.useSession) != null ? _a2 : this.useSession
14073
14155
  }));
14074
14156
  if (!payload.useRepresentative) {
14075
14157
  return response;
@@ -14226,10 +14308,12 @@ let CxContentBrowser = class extends CortexElement {
14226
14308
  this.showFavoriteFolder = false;
14227
14309
  this.showCloseButton = false;
14228
14310
  this.useSession = "";
14311
+ this.useSiteSession = false;
14229
14312
  this.canPin = false;
14230
14313
  this.canFavorite = false;
14231
14314
  this.canPinAsset = false;
14232
14315
  this.canUseProxies = false;
14316
+ this.simplePick = false;
14233
14317
  this.canViewVersions = false;
14234
14318
  this.canTrack = false;
14235
14319
  this.canLogout = false;
@@ -14282,6 +14366,9 @@ let CxContentBrowser = class extends CortexElement {
14282
14366
  }
14283
14367
  }
14284
14368
  runFirstUpdated() {
14369
+ if (this.useSiteSession) {
14370
+ this.baseUrl = resolveSiteSessionUrl(this.baseUrl);
14371
+ }
14285
14372
  switch (this.view) {
14286
14373
  case GridView.Large:
14287
14374
  this.defaultPageSize = 15;
@@ -14312,7 +14399,8 @@ let CxContentBrowser = class extends CortexElement {
14312
14399
  defaultSortDirection: this.defaultSortDirection,
14313
14400
  defaultSortOrderName: this.defaultSortOrderName,
14314
14401
  token: this.token,
14315
- useSession: this.useSession
14402
+ useSession: this.useSession,
14403
+ useSiteSession: this.useSiteSession
14316
14404
  });
14317
14405
  this.requestUpdate();
14318
14406
  });
@@ -14344,7 +14432,8 @@ let CxContentBrowser = class extends CortexElement {
14344
14432
  this.selectedAssetId = id;
14345
14433
  try {
14346
14434
  const asset = yield this.fetchAndMergeAssetsController.fetchAssetByID(id, {
14347
- canFavorite: this.canFavorite
14435
+ canFavorite: this.canFavorite,
14436
+ simplePick: this.simplePick
14348
14437
  });
14349
14438
  if (!asset) {
14350
14439
  this.selectedAssetId = void 0;
@@ -14377,6 +14466,18 @@ let CxContentBrowser = class extends CortexElement {
14377
14466
  var _a2;
14378
14467
  (_a2 = this.fetchAndMergeAssetsController) == null ? void 0 : _a2.updateAuth(this.token, this.useSession);
14379
14468
  }
14469
+ handleSiteSessionChange() {
14470
+ var _a2;
14471
+ if (this.useSiteSession) {
14472
+ this.baseUrl = resolveSiteSessionUrl(this.baseUrl);
14473
+ }
14474
+ (_a2 = this.fetchAndMergeAssetsController) == null ? void 0 : _a2.updateSiteSession(
14475
+ this.useSiteSession,
14476
+ this.baseUrl,
14477
+ this.token,
14478
+ this.useSession
14479
+ );
14480
+ }
14380
14481
  handleSortOrderChange(event) {
14381
14482
  return __async(this, null, function* () {
14382
14483
  const { sortDirection, sortOrderName } = event.detail;
@@ -14540,6 +14641,16 @@ let CxContentBrowser = class extends CortexElement {
14540
14641
  }
14541
14642
  handleProxyConfirm(event) {
14542
14643
  return __async(this, null, function* () {
14644
+ var _a2;
14645
+ if (this.simplePick) {
14646
+ this.handleSelectedAsset({
14647
+ asset: event.detail.asset,
14648
+ images: [{ imageUrl: (_a2 = event.detail.asset.imageUrl) != null ? _a2 : "" }],
14649
+ selectedProxyMetadata: event.detail.selectedProxyMetadata
14650
+ });
14651
+ this.formatDialog.hide();
14652
+ return;
14653
+ }
14543
14654
  try {
14544
14655
  const response = yield this.fetchAndMergeAssetsController.getAssetLink(__spreadProps(__spreadValues({}, event.detail), {
14545
14656
  assets: [event.detail.asset],
@@ -14664,13 +14775,16 @@ let CxContentBrowser = class extends CortexElement {
14664
14775
  });
14665
14776
  if (!isLoggedIn) {
14666
14777
  return b`
14778
+ ${n$5(this.useSiteSession && this.showCloseButton, () => b`
14779
+ <cx-content-browser-header show-close-button></cx-content-browser-header>
14780
+ `)}
14667
14781
  <cx-space class="content-browser__message" align-items="center" justify-content="center" spacing="small" direction="vertical">
14668
14782
  <cx-icon name="warning" class="content-browser__message__icon"></cx-icon>
14669
14783
  ${n$5(
14670
- this.errorMessage,
14784
+ this.useSiteSession || this.errorMessage,
14671
14785
  () => b`
14672
14786
  <cx-typography class="content-browser__message__text">
14673
- ${this.errorMessage}
14787
+ ${this.useSiteSession ? SITE_SESSION_EXPIRED_MESSAGE : this.errorMessage}
14674
14788
  </cx-typography>
14675
14789
  `,
14676
14790
  () => A
@@ -14687,9 +14801,10 @@ let CxContentBrowser = class extends CortexElement {
14687
14801
  favorite-folder-id=${o$4(userInfo == null ? void 0 : userInfo.favoriteFolderRecordID)}
14688
14802
  folder-id=${o$4(this.lastRequest.folderId || void 0)}
14689
14803
  folder-title=${o$4(this.folderTitle || void 0)}
14690
- token=${this.token}
14804
+ token=${this.useSiteSession ? "" : this.token}
14691
14805
  base-url=${this.baseUrl}
14692
- use-session=${this.useSession}
14806
+ use-session=${this.useSiteSession ? "" : this.useSession}
14807
+ ?use-site-session=${this.useSiteSession}
14693
14808
  ?can-favorite=${this.canFavorite}
14694
14809
  ?can-pin=${this.canPin && this.canPinLayout}
14695
14810
  ?force-overlay=${this.forceOverlay}
@@ -14711,7 +14826,7 @@ let CxContentBrowser = class extends CortexElement {
14711
14826
  avatar=${o$4(userInfo == null ? void 0 : userInfo.avatar)}
14712
14827
  full-name=${o$4(userInfo == null ? void 0 : userInfo.fullName)}
14713
14828
  folder-title=${o$4(this.folderTitle || void 0)}
14714
- ?can-logout=${this.canLogout}
14829
+ ?can-logout=${!this.useSiteSession && this.canLogout}
14715
14830
  ?show-close-button=${this.showCloseButton}
14716
14831
  ></cx-content-browser-header>
14717
14832
  <cx-content-browser-control-bar
@@ -14761,12 +14876,12 @@ let CxContentBrowser = class extends CortexElement {
14761
14876
  cta-text=${this.ctaText}
14762
14877
  cta-text-transform=${this.ctaTextTransform}
14763
14878
  variant=${this.isMobile ? ContentBrowserFormatDialogVariant.Drawer : ContentBrowserFormatDialogVariant.Dialog}
14764
- token=${this.token}
14879
+ token=${this.useSiteSession ? "" : this.token}
14765
14880
  ?can-custom-format=${!!(parameters == null ? void 0 : parameters.ATSEnabled)}
14766
14881
  ?can-favorite=${this.canFavorite}
14767
14882
  ?can-pin-asset=${this.canPinAsset}
14768
14883
  ?can-track=${this.canTrack}
14769
- ?can-use-proxies=${this.canUseProxies}
14884
+ ?can-use-proxies=${this.canUseProxies && !this.simplePick}
14770
14885
  ?can-view-versions=${this.canViewVersions}
14771
14886
  @cx-content-browser-format-dialog-version-history-open=${this.handleVersionHistoryOpen}
14772
14887
  @cx-content-browser-format-dialog-favorite-change=${this.handleFavoriteChange}
@@ -14864,6 +14979,9 @@ __decorateClass([
14864
14979
  __decorateClass([
14865
14980
  n$6({ attribute: "use-session", reflect: false, type: String })
14866
14981
  ], CxContentBrowser.prototype, "useSession", 2);
14982
+ __decorateClass([
14983
+ n$6({ attribute: "use-site-session", type: Boolean })
14984
+ ], CxContentBrowser.prototype, "useSiteSession", 2);
14867
14985
  __decorateClass([
14868
14986
  n$6({ attribute: "can-pin", reflect: true, type: Boolean })
14869
14987
  ], CxContentBrowser.prototype, "canPin", 2);
@@ -14876,6 +14994,9 @@ __decorateClass([
14876
14994
  __decorateClass([
14877
14995
  n$6({ attribute: "can-use-proxies", reflect: true, type: Boolean })
14878
14996
  ], CxContentBrowser.prototype, "canUseProxies", 2);
14997
+ __decorateClass([
14998
+ n$6({ attribute: "simple-pick", reflect: true, type: Boolean })
14999
+ ], CxContentBrowser.prototype, "simplePick", 2);
14879
15000
  __decorateClass([
14880
15001
  n$6({ attribute: "can-view-versions", reflect: true, type: Boolean })
14881
15002
  ], CxContentBrowser.prototype, "canViewVersions", 2);
@@ -14974,6 +15095,9 @@ __decorateClass([
14974
15095
  __decorateClass([
14975
15096
  watch(["token", "useSession"], { waitUntilFirstUpdate: true })
14976
15097
  ], CxContentBrowser.prototype, "handleAuthChange", 1);
15098
+ __decorateClass([
15099
+ watch("useSiteSession", { waitUntilFirstUpdate: true })
15100
+ ], CxContentBrowser.prototype, "handleSiteSessionChange", 1);
14977
15101
  CxContentBrowser = __decorateClass([
14978
15102
  customElement("cx-content-browser")
14979
15103
  ], CxContentBrowser);
package/build/index.d.ts CHANGED
@@ -87,6 +87,8 @@ type OrangeDAMContentBrowser = {
87
87
  * Base url. If specified, we will prefill the site URL in the authentication page
88
88
  */
89
89
  baseUrl?: string;
90
+ /** Reuse the current Cortex site's browser session without requesting credentials. */
91
+ useSiteSession?: boolean;
90
92
  /**
91
93
  * Only show IIIF prefix. When enable, instead of return full IIIF image url, we will
92
94
  * only return the url before the {region}. IIIF link will have the format like below
@@ -176,6 +178,15 @@ type OrangeDAMContentBrowser = {
176
178
  * The flag to allow the user to select proxy
177
179
  */
178
180
  allowProxy?: boolean;
181
+ /**
182
+ * Pick-only mode. Skips the available-proxies lookup and the transformation request made when
183
+ * an asset is confirmed; the preview popup shows the asset's LargeSizePreview and confirming
184
+ * emits the asset straight to `onAssetSelected`. Implies `allowProxy: false`.
185
+ *
186
+ * Note: because no GetAssetLink request is made, only the computed `extraFields`
187
+ * (`ScrubUrl`, `AllowATSLink`) can be returned in this mode.
188
+ */
189
+ simplePick?: boolean;
179
190
  /**
180
191
  * The flag to allow the user to select favorites
181
192
  */