@node-projects/web-component-designer 0.0.139 → 0.0.140

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.
@@ -6,7 +6,6 @@ export declare type DesignerTabControlIndexChangedEventArgs = {
6
6
  };
7
7
  export declare class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
8
8
  private _selectedIndex;
9
- private _contentObserver;
10
9
  private _panels;
11
10
  private _headerDiv;
12
11
  private _moreDiv;
@@ -1,7 +1,7 @@
1
1
  import { BaseCustomWebComponentLazyAppend, css, TypedEvent, DomHelper } from '@node-projects/base-custom-webcomponent';
2
2
  export class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
3
3
  _selectedIndex = -1;
4
- _contentObserver;
4
+ //private _contentObserver: MutationObserver;
5
5
  _panels;
6
6
  _headerDiv;
7
7
  _moreDiv;
@@ -97,15 +97,15 @@ export class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
97
97
  `;
98
98
  constructor() {
99
99
  super();
100
- this._contentObserver = new MutationObserver((mut) => {
101
- let refresh = false;
102
- for (let m of mut) {
103
- if (m.type != 'attributes' || m.attributeName == 'style')
104
- refresh = true;
105
- }
106
- if (refresh)
107
- this.refreshItems();
108
- });
100
+ /*this._contentObserver = new MutationObserver((mut) => {
101
+ let refresh = false;
102
+ for (let m of mut) {
103
+ if (m.type != 'attributes' || m.attributeName == 'style')
104
+ refresh = true;
105
+ }
106
+ if (refresh)
107
+ this.refreshItems();
108
+ });*/
109
109
  let outerDiv = document.createElement("div");
110
110
  outerDiv.className = 'outer';
111
111
  this.shadowRoot.appendChild(outerDiv);
@@ -163,7 +163,7 @@ export class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
163
163
  if (this._firstConnect) {
164
164
  this.refreshItems();
165
165
  this._firstConnect = false;
166
- this._contentObserver.observe(this, { childList: true, subtree: true, attributes: true });
166
+ //this._contentObserver.observe(this, { childList: true, subtree: true, attributes: true });
167
167
  let selectedIndexAttribute = this.getAttribute("selected-index");
168
168
  if (selectedIndexAttribute) {
169
169
  this.selectedIndex = parseInt(selectedIndexAttribute);
@@ -211,7 +211,8 @@ export class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
211
211
  if (element.style.display != 'none') {
212
212
  index++;
213
213
  if (index == this._selectedIndex) {
214
- element.slot = "panels";
214
+ if (element.slot != "panels")
215
+ element.slot = "panels";
215
216
  const headerEl = this._elementMap.get(element);
216
217
  if (headerEl) {
217
218
  headerEl.classList.add('selected');
@@ -75,6 +75,7 @@ export class PropertyGrid extends BaseCustomWebComponentLazyAppend {
75
75
  lst.createElements(items[0]);
76
76
  visibleDict.add(p.name);
77
77
  }
78
+ this._designerTabControl.refreshItems();
78
79
  if (this._designerTabControl.selectedIndex < 0)
79
80
  this._designerTabControl.selectedIndex = 0;
80
81
  for (let p of this._propertyGridPropertyLists) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "A UI designer for Polymer apps",
3
3
  "name": "@node-projects/web-component-designer",
4
- "version": "0.0.139",
4
+ "version": "0.0.140",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "",