@design.estate/dees-wcctools 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41953,6 +41953,24 @@ var WccSidebar = class extends (_a2 = DeesElement, _selectedItem_dec = [n5({ att
41953
41953
  }
41954
41954
  this.expandedElements = newSet;
41955
41955
  }
41956
+ updated(changedProperties) {
41957
+ super.updated(changedProperties);
41958
+ if (changedProperties.has("selectedItem") && this.selectedItem) {
41959
+ const elementName = Object.keys(this.dashboardRef.elements).find(
41960
+ (name) => this.dashboardRef.elements[name] === this.selectedItem
41961
+ );
41962
+ if (elementName) {
41963
+ const item = this.dashboardRef.elements[elementName];
41964
+ if (item.demo && hasMultipleDemos(item.demo)) {
41965
+ if (!this.expandedElements.has(elementName)) {
41966
+ const newSet = new Set(this.expandedElements);
41967
+ newSet.add(elementName);
41968
+ this.expandedElements = newSet;
41969
+ }
41970
+ }
41971
+ }
41972
+ }
41973
+ }
41956
41974
  selectItem(typeArg, itemNameArg, itemArg, demoIndex = 0) {
41957
41975
  console.log("selected item");
41958
41976
  console.log(itemNameArg);
@@ -44170,14 +44188,14 @@ var WccProperties = class extends (_a5 = DeesElement, _dashboardRef_dec3 = [n5({
44170
44188
  console.log(this.dashboardRef.selectedType);
44171
44189
  this.dashboardRef.buildUrl();
44172
44190
  }
44173
- async scheduleUpdate() {
44174
- try {
44175
- await this.createProperties();
44176
- } catch (error) {
44177
- console.error("Error creating properties:", error);
44178
- this.propertyContent = [];
44191
+ updated(changedProperties) {
44192
+ super.updated(changedProperties);
44193
+ if (changedProperties.has("selectedItem")) {
44194
+ this.createProperties().catch((error) => {
44195
+ console.error("Error creating properties:", error);
44196
+ this.propertyContent = [];
44197
+ });
44179
44198
  }
44180
- super.scheduleUpdate();
44181
44199
  }
44182
44200
  selectViewport(viewport) {
44183
44201
  this.selectedViewport = viewport;