@luzmo/embed 5.1.3-beta.4 → 5.1.3-beta.5

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.
package/index.cjs CHANGED
@@ -56,7 +56,7 @@ var import_style_map = require("lit/directives/style-map.js");
56
56
  var import_shared_embed = require("@luzmo/shared-embed");
57
57
 
58
58
  // libs/embed-libs/embed/package.json
59
- var version = "5.1.3-beta.4";
59
+ var version = "5.1.3-beta.5";
60
60
 
61
61
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
62
62
  var LuzmoService = class {
@@ -1092,9 +1092,12 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1092
1092
  }
1093
1093
  `;
1094
1094
  }
1095
+ canInitializeVizItem() {
1096
+ return !!(this.type || this.dashboardId && this.itemId);
1097
+ }
1095
1098
  async firstUpdated(_changedProperties) {
1096
1099
  super.firstUpdated(_changedProperties);
1097
- if (this.type) {
1100
+ if (this.canInitializeVizItem()) {
1098
1101
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1099
1102
  this.createAndAppendElement();
1100
1103
  }
@@ -1131,8 +1134,10 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1131
1134
  this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1132
1135
  }
1133
1136
  } else {
1134
- if (this.type) {
1135
- this.parseAndValidate("type");
1137
+ if (this.canInitializeVizItem()) {
1138
+ if (this.type) {
1139
+ this.parseAndValidate("type");
1140
+ }
1136
1141
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1137
1142
  this.createAndAppendElement();
1138
1143
  }
package/index.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  } from "@luzmo/shared-embed";
35
35
 
36
36
  // libs/embed-libs/embed/package.json
37
- var version = "5.1.3-beta.4";
37
+ var version = "5.1.3-beta.5";
38
38
 
39
39
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
40
40
  var LuzmoService = class {
@@ -1070,9 +1070,12 @@ var LuzmoBaseVizItem = class extends LitElement2 {
1070
1070
  }
1071
1071
  `;
1072
1072
  }
1073
+ canInitializeVizItem() {
1074
+ return !!(this.type || this.dashboardId && this.itemId);
1075
+ }
1073
1076
  async firstUpdated(_changedProperties) {
1074
1077
  super.firstUpdated(_changedProperties);
1075
- if (this.type) {
1078
+ if (this.canInitializeVizItem()) {
1076
1079
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1077
1080
  this.createAndAppendElement();
1078
1081
  }
@@ -1109,8 +1112,10 @@ var LuzmoBaseVizItem = class extends LitElement2 {
1109
1112
  this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1110
1113
  }
1111
1114
  } else {
1112
- if (this.type) {
1113
- this.parseAndValidate("type");
1115
+ if (this.canInitializeVizItem()) {
1116
+ if (this.type) {
1117
+ this.parseAndValidate("type");
1118
+ }
1114
1119
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1115
1120
  this.createAndAppendElement();
1116
1121
  }
package/index.libs.cjs CHANGED
@@ -55,7 +55,7 @@ var import_style_map = require("lit/directives/style-map.js");
55
55
  var import_shared_embed = require("@luzmo/shared-embed");
56
56
 
57
57
  // libs/embed-libs/embed/package.json
58
- var version = "5.1.3-beta.4";
58
+ var version = "5.1.3-beta.5";
59
59
 
60
60
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
61
61
  var LuzmoService = class {
@@ -1086,9 +1086,12 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1086
1086
  }
1087
1087
  `;
1088
1088
  }
1089
+ canInitializeVizItem() {
1090
+ return !!(this.type || this.dashboardId && this.itemId);
1091
+ }
1089
1092
  async firstUpdated(_changedProperties) {
1090
1093
  super.firstUpdated(_changedProperties);
1091
- if (this.type) {
1094
+ if (this.canInitializeVizItem()) {
1092
1095
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1093
1096
  this.createAndAppendElement();
1094
1097
  }
@@ -1125,8 +1128,10 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1125
1128
  this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1126
1129
  }
1127
1130
  } else {
1128
- if (this.type) {
1129
- this.parseAndValidate("type");
1131
+ if (this.canInitializeVizItem()) {
1132
+ if (this.type) {
1133
+ this.parseAndValidate("type");
1134
+ }
1130
1135
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1131
1136
  this.createAndAppendElement();
1132
1137
  }
package/index.libs.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  } from "@luzmo/shared-embed";
33
33
 
34
34
  // libs/embed-libs/embed/package.json
35
- var version = "5.1.3-beta.4";
35
+ var version = "5.1.3-beta.5";
36
36
 
37
37
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
38
38
  var LuzmoService = class {
@@ -1063,9 +1063,12 @@ var LuzmoBaseVizItem = class extends LitElement2 {
1063
1063
  }
1064
1064
  `;
1065
1065
  }
1066
+ canInitializeVizItem() {
1067
+ return !!(this.type || this.dashboardId && this.itemId);
1068
+ }
1066
1069
  async firstUpdated(_changedProperties) {
1067
1070
  super.firstUpdated(_changedProperties);
1068
- if (this.type) {
1071
+ if (this.canInitializeVizItem()) {
1069
1072
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1070
1073
  this.createAndAppendElement();
1071
1074
  }
@@ -1102,8 +1105,10 @@ var LuzmoBaseVizItem = class extends LitElement2 {
1102
1105
  this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1103
1106
  }
1104
1107
  } else {
1105
- if (this.type) {
1106
- this.parseAndValidate("type");
1108
+ if (this.canInitializeVizItem()) {
1109
+ if (this.type) {
1110
+ this.parseAndValidate("type");
1111
+ }
1107
1112
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1108
1113
  this.createAndAppendElement();
1109
1114
  }
@@ -17,6 +17,7 @@ export declare class LuzmoBaseVizItem extends LitElement implements SharedLib.Lu
17
17
  chartElement: HTMLElement;
18
18
  static styles: import("lit").CSSResult;
19
19
  constructor();
20
+ canInitializeVizItem(): boolean;
20
21
  protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
21
22
  private createAndAppendElement;
22
23
  private updateVizItemProperties;
@@ -5970,7 +5970,7 @@ var o5 = e6(class extends i4 {
5970
5970
  });
5971
5971
 
5972
5972
  // libs/embed-libs/embed/package.json
5973
- var version = "5.1.3-beta.4";
5973
+ var version = "5.1.3-beta.5";
5974
5974
 
5975
5975
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
5976
5976
  var LuzmoService = class {
@@ -7150,9 +7150,12 @@ var LuzmoBaseVizItem = class extends s3 {
7150
7150
  }
7151
7151
  `;
7152
7152
  }
7153
+ canInitializeVizItem() {
7154
+ return !!(this.type || this.dashboardId && this.itemId);
7155
+ }
7153
7156
  async firstUpdated(_changedProperties) {
7154
7157
  super.firstUpdated(_changedProperties);
7155
- if (this.type) {
7158
+ if (this.canInitializeVizItem()) {
7156
7159
  await loadLibrary(this.appServer, "DashboardApp");
7157
7160
  this.createAndAppendElement();
7158
7161
  }
@@ -7189,8 +7192,10 @@ var LuzmoBaseVizItem = class extends s3 {
7189
7192
  this.chartElement.setAttribute(mappedAttributeName, attributeValue);
7190
7193
  }
7191
7194
  } else {
7192
- if (this.type) {
7193
- this.parseAndValidate("type");
7195
+ if (this.canInitializeVizItem()) {
7196
+ if (this.type) {
7197
+ this.parseAndValidate("type");
7198
+ }
7194
7199
  await loadLibrary(this.appServer, "DashboardApp");
7195
7200
  this.createAndAppendElement();
7196
7201
  }
@@ -5971,7 +5971,7 @@ var o5 = e6(class extends i4 {
5971
5971
  });
5972
5972
 
5973
5973
  // libs/embed-libs/embed/package.json
5974
- var version = "5.1.3-beta.4";
5974
+ var version = "5.1.3-beta.5";
5975
5975
 
5976
5976
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
5977
5977
  var LuzmoService = class {
@@ -7156,9 +7156,12 @@ var LuzmoBaseVizItem = class extends s3 {
7156
7156
  }
7157
7157
  `;
7158
7158
  }
7159
+ canInitializeVizItem() {
7160
+ return !!(this.type || this.dashboardId && this.itemId);
7161
+ }
7159
7162
  async firstUpdated(_changedProperties) {
7160
7163
  super.firstUpdated(_changedProperties);
7161
- if (this.type) {
7164
+ if (this.canInitializeVizItem()) {
7162
7165
  await loadLibrary(this.appServer, "DashboardApp");
7163
7166
  this.createAndAppendElement();
7164
7167
  }
@@ -7195,8 +7198,10 @@ var LuzmoBaseVizItem = class extends s3 {
7195
7198
  this.chartElement.setAttribute(mappedAttributeName, attributeValue);
7196
7199
  }
7197
7200
  } else {
7198
- if (this.type) {
7199
- this.parseAndValidate("type");
7201
+ if (this.canInitializeVizItem()) {
7202
+ if (this.type) {
7203
+ this.parseAndValidate("type");
7204
+ }
7200
7205
  await loadLibrary(this.appServer, "DashboardApp");
7201
7206
  this.createAndAppendElement();
7202
7207
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luzmo/embed",
3
- "version": "5.1.3-beta.4",
3
+ "version": "5.1.3-beta.5",
4
4
  "dependencies": {
5
5
  "lit": "3.1.2",
6
6
  "@luzmo/shared-embed": "5.0.8-beta.5",
@@ -17,6 +17,7 @@ export declare class LuzmoBaseVizItem extends LitElement implements SharedLib.Lu
17
17
  chartElement: HTMLElement;
18
18
  static styles: import("lit").CSSResult;
19
19
  constructor();
20
+ canInitializeVizItem(): boolean;
20
21
  protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
21
22
  private createAndAppendElement;
22
23
  private updateVizItemProperties;