@orangelogic/orange-dam-content-browser-sdk 2.4.6 → 2.4.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.
@@ -80,6 +80,7 @@ export default class CxContentBrowser extends CortexElement {
80
80
  defaultIsSeeThrough: boolean;
81
81
  defaultSearchText: string;
82
82
  defaultFolderId: string;
83
+ defaultFolderTitle: string;
83
84
  showTitle: boolean;
84
85
  showSize: boolean;
85
86
  showDimensions: boolean;
@@ -14460,6 +14460,7 @@ let CxContentBrowser = class extends CortexElement {
14460
14460
  this.defaultIsSeeThrough = false;
14461
14461
  this.defaultSearchText = "";
14462
14462
  this.defaultFolderId = "";
14463
+ this.defaultFolderTitle = "";
14463
14464
  this.showTitle = true;
14464
14465
  this.showSize = true;
14465
14466
  this.showDimensions = true;
@@ -14522,6 +14523,7 @@ let CxContentBrowser = class extends CortexElement {
14522
14523
  sortDirection: this.defaultSortDirection,
14523
14524
  sortOrderName: this.defaultSortOrderName
14524
14525
  });
14526
+ this.folderTitle = this.defaultFolderTitle;
14525
14527
  if (!this.defaultFolderId) {
14526
14528
  this.initialFolderPending = true;
14527
14529
  this.initialFolderTimeout = setTimeout(() => this.releaseInitialFolder(), INITIAL_FOLDER_TIMEOUT_MS);
@@ -14606,6 +14608,7 @@ let CxContentBrowser = class extends CortexElement {
14606
14608
  return __async(this, null, function* () {
14607
14609
  this.emit("cx-content-browser-request-change", {
14608
14610
  detail: {
14611
+ folderTitle: this.folderTitle,
14609
14612
  request: this.lastRequest,
14610
14613
  view: this.view
14611
14614
  }
@@ -15241,6 +15244,9 @@ __decorateClass([
15241
15244
  __decorateClass([
15242
15245
  n$6({ attribute: "default-folder-id", type: String })
15243
15246
  ], CxContentBrowser.prototype, "defaultFolderId", 2);
15247
+ __decorateClass([
15248
+ n$6({ attribute: "default-folder-title", type: String })
15249
+ ], CxContentBrowser.prototype, "defaultFolderTitle", 2);
15244
15250
  __decorateClass([
15245
15251
  n$6({ attribute: "show-title", reflect: true, type: Boolean })
15246
15252
  ], CxContentBrowser.prototype, "showTitle", 2);
@@ -1,6 +1,7 @@
1
1
  import { GetAssetsRequest } from '../types/asset';
2
2
  import { GridView } from '../types/content-browser';
3
3
  export type CxContentBrowserRequestChangeEvent = CustomEvent<{
4
+ folderTitle: string | undefined;
4
5
  request: GetAssetsRequest | null;
5
6
  view: GridView;
6
7
  }>;
package/build/index.mjs CHANGED
@@ -14526,6 +14526,7 @@ let CxContentBrowser = class extends CortexElement {
14526
14526
  this.defaultIsSeeThrough = false;
14527
14527
  this.defaultSearchText = "";
14528
14528
  this.defaultFolderId = "";
14529
+ this.defaultFolderTitle = "";
14529
14530
  this.showTitle = true;
14530
14531
  this.showSize = true;
14531
14532
  this.showDimensions = true;
@@ -14588,6 +14589,7 @@ let CxContentBrowser = class extends CortexElement {
14588
14589
  sortDirection: this.defaultSortDirection,
14589
14590
  sortOrderName: this.defaultSortOrderName
14590
14591
  });
14592
+ this.folderTitle = this.defaultFolderTitle;
14591
14593
  if (!this.defaultFolderId) {
14592
14594
  this.initialFolderPending = true;
14593
14595
  this.initialFolderTimeout = setTimeout(() => this.releaseInitialFolder(), INITIAL_FOLDER_TIMEOUT_MS);
@@ -14672,6 +14674,7 @@ let CxContentBrowser = class extends CortexElement {
14672
14674
  return __async(this, null, function* () {
14673
14675
  this.emit("cx-content-browser-request-change", {
14674
14676
  detail: {
14677
+ folderTitle: this.folderTitle,
14675
14678
  request: this.lastRequest,
14676
14679
  view: this.view
14677
14680
  }
@@ -15307,6 +15310,9 @@ __decorateClass([
15307
15310
  __decorateClass([
15308
15311
  n$6({ attribute: "default-folder-id", type: String })
15309
15312
  ], CxContentBrowser.prototype, "defaultFolderId", 2);
15313
+ __decorateClass([
15314
+ n$6({ attribute: "default-folder-title", type: String })
15315
+ ], CxContentBrowser.prototype, "defaultFolderTitle", 2);
15310
15316
  __decorateClass([
15311
15317
  n$6({ attribute: "show-title", reflect: true, type: Boolean })
15312
15318
  ], CxContentBrowser.prototype, "showTitle", 2);
@@ -32197,6 +32203,8 @@ const authSlice = createSlice({
32197
32203
  deleteData("selectedIsSeeThrough");
32198
32204
  deleteData("searchText");
32199
32205
  deleteData("lastLocation");
32206
+ deleteData("lastLocationFolderId");
32207
+ deleteData("lastLocationFolderTitle");
32200
32208
  deleteData("retryCount");
32201
32209
  },
32202
32210
  /**
@@ -32538,7 +32546,8 @@ const AssetsPicker = reactExports.forwardRef(function AssetsPicker2({ accessToke
32538
32546
  selectedFacets: {},
32539
32547
  isSeeThrough: true,
32540
32548
  searchText: "",
32541
- lastLocation: ""
32549
+ lastLocation: "",
32550
+ lastLocationTitle: ""
32542
32551
  });
32543
32552
  const loadedFromStorage = reactExports.useRef(false);
32544
32553
  const fetchAssets = reactExports.useCallback((params) => __async(null, null, function* () {
@@ -32602,6 +32611,7 @@ const AssetsPicker = reactExports.forwardRef(function AssetsPicker2({ accessToke
32602
32611
  onClose == null ? void 0 : onClose();
32603
32612
  }), [onAssetSelected, onClose, persistMode]);
32604
32613
  const onFetchAndMergeAssetsSuccess = reactExports.useCallback((event) => {
32614
+ var _a2;
32605
32615
  if (!loadedFromStorage.current) {
32606
32616
  return;
32607
32617
  }
@@ -32621,6 +32631,7 @@ const AssetsPicker = reactExports.forwardRef(function AssetsPicker2({ accessToke
32621
32631
  }
32622
32632
  if (folderId !== void 0) {
32623
32633
  storeData("lastLocationFolderId", folderId);
32634
+ storeData("lastLocationFolderTitle", (_a2 = event.detail.folderTitle) != null ? _a2 : "");
32624
32635
  }
32625
32636
  if (sortDirection) {
32626
32637
  storeData("selectedSortDirection", sortDirection);
@@ -32693,8 +32704,20 @@ const AssetsPicker = reactExports.forwardRef(function AssetsPicker2({ accessToke
32693
32704
  getData("selectedIsSeeThrough"),
32694
32705
  getData("searchText"),
32695
32706
  getData("lastLocation"),
32696
- getData("lastLocationFolderId")
32697
- ]).then(([sortOrder, sortDirection, view, newFacets, selectedFilter, selectedIsSeeThrough, searchText, lastLocation, lastLocationFolderId]) => {
32707
+ getData("lastLocationFolderId"),
32708
+ getData("lastLocationFolderTitle")
32709
+ ]).then(([
32710
+ sortOrder,
32711
+ sortDirection,
32712
+ view,
32713
+ newFacets,
32714
+ selectedFilter,
32715
+ selectedIsSeeThrough,
32716
+ searchText,
32717
+ lastLocation,
32718
+ lastLocationFolderId,
32719
+ lastLocationFolderTitle
32720
+ ]) => {
32698
32721
  const newDefaultSettings = {
32699
32722
  sortOrder: sortOrder || "",
32700
32723
  sortDirection: ["ascending", "descending"].includes(sortDirection) ? sortDirection : void 0,
@@ -32707,6 +32730,7 @@ const AssetsPicker = reactExports.forwardRef(function AssetsPicker2({ accessToke
32707
32730
  newDefaultSettings.facets = parseStoredFacets(newFacets);
32708
32731
  if (lastLocationFolderId) {
32709
32732
  newDefaultSettings.lastLocation = lastLocationFolderId;
32733
+ newDefaultSettings.lastLocationTitle = lastLocationFolderTitle || "";
32710
32734
  deleteData("lastLocation");
32711
32735
  } else if (lastLocation) {
32712
32736
  newDefaultSettings.lastLocation = parseLegacyLastLocation(lastLocation);
@@ -32737,6 +32761,7 @@ const AssetsPicker = reactExports.forwardRef(function AssetsPicker2({ accessToke
32737
32761
  "default-is-see-through": defaultSettings.isSeeThrough,
32738
32762
  "default-search-text": defaultSettings.searchText,
32739
32763
  "default-folder-id": defaultSettings.lastLocation,
32764
+ "default-folder-title": defaultSettings.lastLocationTitle,
32740
32765
  token: accessToken != null ? accessToken : "",
32741
32766
  bearerToken: bearerToken != null ? bearerToken : "",
32742
32767
  "base-url": siteUrl != null ? siteUrl : "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orangelogic/orange-dam-content-browser-sdk",
3
- "version": "2.4.6",
3
+ "version": "2.4.7",
4
4
  "description": "OrangeDAM Content Browser SDK source code",
5
5
  "main": "./build/OrangeDAMContentBrowserSDK.min.js",
6
6
  "module": "./build/index.mjs",