@luzmo/embed 6.1.0-beta.7 → 6.1.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.
- package/CHANGELOG.md +143 -2
- package/README.md +2 -2
- package/index.cjs +1440 -1271
- package/index.d.ts +1 -1
- package/index.js +1450 -1286
- package/libs/dashboard-contents-types/index.d.ts +1 -1
- package/libs/dashboard-contents-types/json-schemas.d.ts +42023 -1
- package/libs/embed-libs/embed/src/index.d.ts +1 -1
- package/luzmo-embed.min.js +5844 -6038
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -39,1158 +39,294 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
39
39
|
// libs/embed-libs/embed/src/index.ts
|
|
40
40
|
var src_exports = {};
|
|
41
41
|
__export(src_exports, {
|
|
42
|
+
ColumnChartModes: () => ColumnChartModes,
|
|
43
|
+
JSON_SCHEMAS: () => json_schemas_default,
|
|
42
44
|
LuzmoEmbedDashboard: () => LuzmoEmbedDashboard,
|
|
43
45
|
LuzmoEmbedVizItem: () => LuzmoEmbedVizItem,
|
|
46
|
+
RegularTableSortingMode: () => RegularTableSortingMode,
|
|
44
47
|
selectedDataUtils: () => import_shared_embed2.selectedDataUtils
|
|
45
48
|
});
|
|
46
49
|
module.exports = __toCommonJS(src_exports);
|
|
47
|
-
var import_shared_embed2 = require("@luzmo/shared-embed");
|
|
48
|
-
|
|
49
|
-
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
|
|
50
|
-
var import_decorators2 = require("lit/decorators.js");
|
|
51
50
|
|
|
52
|
-
// libs/
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
// libs/dashboard-contents-types/src/lib/column-chart/column-chart-options.ts
|
|
52
|
+
var ColumnChartModes = /* @__PURE__ */ ((ColumnChartModes2) => {
|
|
53
|
+
ColumnChartModes2["Grouped"] = "grouped";
|
|
54
|
+
ColumnChartModes2["Stacked"] = "stacked";
|
|
55
|
+
ColumnChartModes2["Percentage"] = "100";
|
|
56
|
+
return ColumnChartModes2;
|
|
57
|
+
})(ColumnChartModes || {});
|
|
58
58
|
|
|
59
|
-
// libs/
|
|
60
|
-
var
|
|
59
|
+
// libs/dashboard-contents-types/src/lib/regular-table/regular-table-options.ts
|
|
60
|
+
var RegularTableSortingMode = /* @__PURE__ */ ((RegularTableSortingMode2) => {
|
|
61
|
+
RegularTableSortingMode2["SingleColumn"] = "singleColumn";
|
|
62
|
+
RegularTableSortingMode2["MultiColumn"] = "multiColumn";
|
|
63
|
+
return RegularTableSortingMode2;
|
|
64
|
+
})(RegularTableSortingMode || {});
|
|
61
65
|
|
|
62
|
-
// libs/
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
// libs/dashboard-contents-types/assets/json-schemas/viz-item-type.schema.json
|
|
67
|
+
var viz_item_type_schema_default = {
|
|
68
|
+
$id: "https://developer.luzmo.com/assets/json-schemas/0.1.88/viz-item-type.schema.json",
|
|
69
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
70
|
+
enum: [
|
|
71
|
+
"area-chart",
|
|
72
|
+
"bar-chart",
|
|
73
|
+
"box-plot",
|
|
74
|
+
"bubble-chart",
|
|
75
|
+
"bullet-chart",
|
|
76
|
+
"choropleth-map",
|
|
77
|
+
"circle-pack-chart",
|
|
78
|
+
"circular-gauge",
|
|
79
|
+
"column-chart",
|
|
80
|
+
"combination-chart",
|
|
81
|
+
"conditional-number",
|
|
82
|
+
"date-filter",
|
|
83
|
+
"donut-chart",
|
|
84
|
+
"dropdown-filter",
|
|
85
|
+
"dynamic-imageobject",
|
|
86
|
+
"evolution-number",
|
|
87
|
+
"funnel-chart",
|
|
88
|
+
"heat-map",
|
|
89
|
+
"heat-table",
|
|
90
|
+
"hexbin-map",
|
|
91
|
+
"iframeobject",
|
|
92
|
+
"image",
|
|
93
|
+
"line-chart",
|
|
94
|
+
"line-chart-forecast",
|
|
95
|
+
"marker-map",
|
|
96
|
+
"ohlc-chart",
|
|
97
|
+
"parallel-coordinates-plot",
|
|
98
|
+
"pivot-table",
|
|
99
|
+
"pyramid-chart",
|
|
100
|
+
"radar-chart",
|
|
101
|
+
"regular-table",
|
|
102
|
+
"route-map",
|
|
103
|
+
"sankey-diagram",
|
|
104
|
+
"scatter-plot",
|
|
105
|
+
"slicer-filter",
|
|
106
|
+
"slider-filter",
|
|
107
|
+
"spacer",
|
|
108
|
+
"speedometer-chart",
|
|
109
|
+
"spike-map",
|
|
110
|
+
"strip-plot",
|
|
111
|
+
"sunburst-chart",
|
|
112
|
+
"symbol-map",
|
|
113
|
+
"text",
|
|
114
|
+
"treemap-chart",
|
|
115
|
+
"venn-diagram",
|
|
116
|
+
"video",
|
|
117
|
+
"wordcloud-chart"
|
|
118
|
+
],
|
|
119
|
+
type: "string"
|
|
67
120
|
};
|
|
68
|
-
var luzmo_service_default = new LuzmoService();
|
|
69
121
|
|
|
70
|
-
// libs/
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
event.data
|
|
144
|
-
);
|
|
145
|
-
} else {
|
|
146
|
-
dashboardComponent.dispatchEvent(
|
|
147
|
-
new CustomEvent("exported", { detail: { data: event.data } })
|
|
148
|
-
);
|
|
149
|
-
SharedLib.resolvePromise(
|
|
150
|
-
dashboardComponent,
|
|
151
|
-
event.data.requestId,
|
|
152
|
-
event.data
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
break;
|
|
156
|
-
}
|
|
157
|
-
case "changedFilters": {
|
|
158
|
-
dashboardComponent.dispatchEvent(
|
|
159
|
-
new CustomEvent("changedFilters", { detail: { data: event.data } })
|
|
160
|
-
);
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
case "customEvent": {
|
|
164
|
-
dashboardComponent.dispatchEvent(
|
|
165
|
-
new CustomEvent("customEvent", { detail: { data: event.data } })
|
|
166
|
-
);
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
case "chartsRendered":
|
|
170
|
-
case "itemsRendered": {
|
|
171
|
-
event.data.type = "itemsRendered";
|
|
172
|
-
dashboardComponent.dispatchEvent(
|
|
173
|
-
new CustomEvent("itemsRendered", { detail: { data: event.data } })
|
|
174
|
-
);
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
case "setEditMode": {
|
|
178
|
-
if (event.data.error) {
|
|
179
|
-
SharedLib.rejectPromise(
|
|
180
|
-
dashboardComponent,
|
|
181
|
-
event.data.requestId,
|
|
182
|
-
event.data
|
|
183
|
-
);
|
|
184
|
-
} else {
|
|
185
|
-
SharedLib.resolvePromise(
|
|
186
|
-
dashboardComponent,
|
|
187
|
-
event.data.requestId,
|
|
188
|
-
event.data
|
|
189
|
-
);
|
|
190
|
-
dashboardComponent.params.editMode = event.data.editMode;
|
|
191
|
-
dashboardComponent._containerStyle = SharedLib.containerStyles(dashboardComponent);
|
|
192
|
-
if (dashboardComponent.dimensions) {
|
|
193
|
-
SharedLib._setCalculatedDimensions(dashboardComponent);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
case "setSelectedData":
|
|
199
|
-
case "setFilters": {
|
|
200
|
-
event.data.error ? SharedLib.rejectPromise(
|
|
201
|
-
dashboardComponent,
|
|
202
|
-
event.data.requestId,
|
|
203
|
-
event.data
|
|
204
|
-
) : SharedLib.resolvePromise(
|
|
205
|
-
dashboardComponent,
|
|
206
|
-
event.data.requestId,
|
|
207
|
-
event.data
|
|
208
|
-
);
|
|
209
|
-
break;
|
|
210
|
-
}
|
|
211
|
-
case "setPreview": {
|
|
212
|
-
event.data.error ? SharedLib.rejectPromise(
|
|
213
|
-
dashboardComponent,
|
|
214
|
-
event.data.requestId,
|
|
215
|
-
event.data
|
|
216
|
-
) : SharedLib.resolvePromise(
|
|
217
|
-
dashboardComponent,
|
|
218
|
-
event.data.requestId,
|
|
219
|
-
event.data
|
|
220
|
-
);
|
|
221
|
-
break;
|
|
222
|
-
}
|
|
122
|
+
// libs/dashboard-contents-types/assets/json-schemas/options.schema.json
|
|
123
|
+
var options_schema_default = {
|
|
124
|
+
$id: "https://developer.luzmo.com/assets/json-schemas/0.1.88/options.schema.json",
|
|
125
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
126
|
+
anyOf: [
|
|
127
|
+
{
|
|
128
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/area-chart-options.schema.json"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bar-chart-options.schema.json"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/box-plot-options.schema.json"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bubble-chart-options.schema.json"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bullet-chart-options.schema.json"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/choropleth-map-options.schema.json"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/circular-gauge-options.schema.json"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/column-chart-options.schema.json"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/combination-chart-options.schema.json"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/date-filter-options.schema.json"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/donut-chart-options.schema.json"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/dropdown-filter-options.schema.json"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/evolution-number-options.schema.json"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/funnel-chart-options.schema.json"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/image-options.schema.json"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/line-chart-options.schema.json"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/pivot-table-options.schema.json"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/regular-table-options.schema.json"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/sankey-diagram-options.schema.json"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/scatter-plot-options.schema.json"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slicer-filter-options.schema.json"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slider-filter-options.schema.json"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/text-options.schema.json"
|
|
223
195
|
}
|
|
224
|
-
|
|
225
|
-
window.addEventListener("message", window.__luzmoMessageHandler, false);
|
|
196
|
+
]
|
|
226
197
|
};
|
|
227
198
|
|
|
228
|
-
// libs/
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
199
|
+
// libs/dashboard-contents-types/assets/json-schemas/slots.schema.json
|
|
200
|
+
var slots_schema_default = {
|
|
201
|
+
$id: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slots.schema.json",
|
|
202
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
203
|
+
anyOf: [
|
|
204
|
+
{
|
|
205
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/area-chart-slots.schema.json"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bar-chart-slots.schema.json"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/box-plot-slots.schema.json"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bubble-chart-slots.schema.json"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bullet-chart-slots.schema.json"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/choropleth-map-slots.schema.json"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/circular-gauge-slots.schema.json"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/column-chart-slots.schema.json"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/combination-chart-slots.schema.json"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/date-filter-slots.schema.json"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/donut-chart-slots.schema.json"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/dropdown-filter-slots.schema.json"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/evolution-number-slots.schema.json"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/funnel-chart-slots.schema.json"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/line-chart-slots.schema.json"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/pivot-table-slots.schema.json"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/regular-table-slots.schema.json"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/sankey-diagram-slots.schema.json"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/scatter-plot-slots.schema.json"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slicer-filter-slots.schema.json"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slider-filter-slots.schema.json"
|
|
244
266
|
}
|
|
245
|
-
|
|
267
|
+
]
|
|
268
|
+
};
|
|
246
269
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
270
|
+
// libs/dashboard-contents-types/assets/json-schemas/area-chart.schema.json
|
|
271
|
+
var area_chart_schema_default = {
|
|
272
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
273
|
+
$id: "https://developer.luzmo.com/assets/json-schemas/0.1.88/area-chart.schema.json",
|
|
274
|
+
type: "object",
|
|
275
|
+
description: "Area Chart item",
|
|
276
|
+
properties: {
|
|
277
|
+
type: {
|
|
278
|
+
description: "Type of the item",
|
|
279
|
+
type: "string",
|
|
280
|
+
const: "area-chart"
|
|
281
|
+
},
|
|
282
|
+
options: {
|
|
283
|
+
description: "Options of the Area Chart item",
|
|
284
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/area-chart-options.schema.json"
|
|
285
|
+
},
|
|
286
|
+
slots: {
|
|
287
|
+
description: "Data definition of the Area Chart item",
|
|
288
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/area-chart-slots.schema.json"
|
|
255
289
|
}
|
|
256
290
|
}
|
|
257
|
-
|
|
258
|
-
position: relative;
|
|
259
|
-
width: 100%;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.luzmo-embed-dashboard {
|
|
263
|
-
background: transparent;
|
|
264
|
-
padding: 0;
|
|
265
|
-
border: 0;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.luzmo-embed-dashboard-ede {
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.luzmo-embed-container-ede {
|
|
272
|
-
width: 100%;
|
|
273
|
-
height: 100%;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.luzmo-container-loader {
|
|
277
|
-
width: 100%;
|
|
278
|
-
position: relative;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.luzmo-lc {
|
|
282
|
-
margin: 0 auto;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.luzmo-loading-message {
|
|
286
|
-
width: 100%;
|
|
287
|
-
height: 20px;
|
|
288
|
-
text-align: center;
|
|
289
|
-
margin-bottom: 16px;
|
|
290
|
-
font-family: Helvetica, Arial, sans-serif;
|
|
291
|
-
font-size: 14px;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.luzmo-loading-circle {
|
|
295
|
-
box-sizing: border-box;
|
|
296
|
-
margin: 16px auto;
|
|
297
|
-
position: relative;
|
|
298
|
-
text-indent: -9999em;
|
|
299
|
-
animation: spin 0.6s infinite linear;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.luzmo-loading-circle,
|
|
303
|
-
.luzmo-loading-circle:after {
|
|
304
|
-
border-radius: 50%;
|
|
305
|
-
width: 32px;
|
|
306
|
-
height: 32px;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.itemEmbedding:after {
|
|
310
|
-
width: 24px;
|
|
311
|
-
height: 24px;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.luzmo-error {
|
|
315
|
-
background: transparent;
|
|
316
|
-
padding: 48px 0;
|
|
317
|
-
margin: 0 auto;
|
|
318
|
-
width: 80%;
|
|
319
|
-
border: 0;
|
|
320
|
-
text-align: center;
|
|
321
|
-
min-height: 192px;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.dashboard-error {
|
|
325
|
-
font-size: 30px;
|
|
326
|
-
background: transparent;
|
|
327
|
-
padding: 48px 0;
|
|
328
|
-
margin: 0 auto;
|
|
329
|
-
width: 80%;
|
|
330
|
-
border: 0;
|
|
331
|
-
text-align: center;
|
|
332
|
-
min-height: 192px;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.luzmo-loader {
|
|
336
|
-
top: 0;
|
|
337
|
-
left: 0;
|
|
338
|
-
width: 100%;
|
|
339
|
-
min-height: 400px;
|
|
340
|
-
position: absolute;
|
|
341
|
-
transition-duration: 0.3s;
|
|
342
|
-
}
|
|
343
|
-
`;
|
|
291
|
+
};
|
|
344
292
|
|
|
345
|
-
// libs/
|
|
346
|
-
var
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
mainColor: "main-color",
|
|
383
|
-
accentColor: "accent-color",
|
|
384
|
-
loaderBackground: "loader-background",
|
|
385
|
-
loaderFontColor: "loader-font-color",
|
|
386
|
-
loaderSpinnerColor: "loader-spinner-color",
|
|
387
|
-
loaderSpinnerBackground: "loader-spinner-background",
|
|
388
|
-
appServer: "app-server",
|
|
389
|
-
apiHost: "api-host",
|
|
390
|
-
itemDimensions: "item-dimensions",
|
|
391
|
-
timezoneId: "timezone-id"
|
|
392
|
-
};
|
|
393
|
-
this.loaderSize = 32;
|
|
394
|
-
this.borderWidth = 3;
|
|
395
|
-
this.minHeight = 400;
|
|
396
|
-
this._containerId = SharedLib2.uuidv4();
|
|
397
|
-
this._iframeId = `luzmo-dashboard-${this._containerId}`;
|
|
398
|
-
this.iframeLoaded = false;
|
|
399
|
-
this.promises = {};
|
|
400
|
-
this.params = this._setOptions();
|
|
401
|
-
this._onResize = () => {
|
|
402
|
-
if (this.shadowRoot?.querySelector(".dashboard-container")) {
|
|
403
|
-
this.containerWidth = this.luzmoEmbedContainer.offsetWidth;
|
|
404
|
-
if (this.params.switchScreenModeOnResize && this.params.screenMode === "auto") {
|
|
405
|
-
for (const d of SharedLib2.EXTENTS) {
|
|
406
|
-
if (d.width[0] <= window.innerWidth && window.innerWidth <= d.width[1]) {
|
|
407
|
-
this.currentScreenMode = d.mode;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
if (this.iframeLoaded) {
|
|
412
|
-
this._calculateDimAfterDashboardLoaded();
|
|
413
|
-
} else {
|
|
414
|
-
if (this.dimensions) {
|
|
415
|
-
this.containerWidth = this.luzmoEmbedContainer.offsetWidth;
|
|
416
|
-
SharedLib2._setCalculatedDimensions(this);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
this._resizeObserver = new ResizeObserver((entries) => {
|
|
422
|
-
window.requestAnimationFrame(() => {
|
|
423
|
-
if (!Array.isArray(entries) || entries.length === 0) {
|
|
424
|
-
return;
|
|
425
|
-
}
|
|
426
|
-
this._onResize();
|
|
427
|
-
});
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
// Set resize event listener
|
|
431
|
-
connectedCallback() {
|
|
432
|
-
super.connectedCallback();
|
|
433
|
-
}
|
|
434
|
-
// Set resize event listener
|
|
435
|
-
disconnectedCallback() {
|
|
436
|
-
super.disconnectedCallback();
|
|
437
|
-
this._resizeObserver.disconnect();
|
|
438
|
-
for (const promiseKey of Object.keys(this.promises)) {
|
|
439
|
-
this.promises[promiseKey].reject(
|
|
440
|
-
new Error("Dashboard component was removed")
|
|
441
|
-
);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
firstUpdated() {
|
|
445
|
-
this._loaderMsg = SharedLib2.getLoader(this)?.loadingMsg;
|
|
446
|
-
this._loaderStyles();
|
|
447
|
-
luzmo_service_default._components.push(this);
|
|
448
|
-
if (this.luzmoEmbedContainer) {
|
|
449
|
-
this._resizeObserver.observe(this.luzmoEmbedContainer);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
initComponent() {
|
|
453
|
-
this.params = this._setOptions();
|
|
454
|
-
if (this.getIsViewMode()) {
|
|
455
|
-
SharedLib2.loadLibrary(this.params.appServer).then(async () => {
|
|
456
|
-
this.isLibraryLoaded = true;
|
|
457
|
-
await this.updateComplete;
|
|
458
|
-
const oldReference = this.renderRoot.querySelector("dashboard-component");
|
|
459
|
-
this.dashboardReference = oldReference.cloneNode(true);
|
|
460
|
-
oldReference.replaceWith(this.dashboardReference);
|
|
461
|
-
this.dashboardReference.addEventListener("load", (payload) => {
|
|
462
|
-
this.containerWidth = this.dashboardReference.offsetWidth;
|
|
463
|
-
this.dimensions = payload.detail.dimensions;
|
|
464
|
-
SharedLib2._setCalculatedDimensions(this);
|
|
465
|
-
window.dispatchEvent(new Event("resize"));
|
|
466
|
-
this.dispatchEvent(new CustomEvent("load", payload));
|
|
467
|
-
});
|
|
468
|
-
this.dashboardReference.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
|
|
469
|
-
this.dashboardReference.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
|
|
470
|
-
this.dashboardReference.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
|
|
471
|
-
this.dashboardReference.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
|
|
472
|
-
this.dashboardReference.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
|
|
473
|
-
this.setAllAttributes();
|
|
474
|
-
});
|
|
475
|
-
} else {
|
|
476
|
-
this.containerWidth = this.container?.clientWidth;
|
|
477
|
-
SharedLib2._extendAndValidate(this);
|
|
478
|
-
SharedLib2._browserCheck(this);
|
|
479
|
-
this._setupLoader();
|
|
480
|
-
if (!this.params.error) {
|
|
481
|
-
this._loaderStyles();
|
|
482
|
-
_setEventHandler();
|
|
483
|
-
this._iframeUrl = SharedLib2.createIframeUrl(this);
|
|
484
|
-
this.iframe?.setAttribute("src", this._iframeUrl);
|
|
485
|
-
this.iframeStyle = SharedLib2.calculateIframeStyles(this);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
setAllAttributes() {
|
|
490
|
-
if (this.dashboardReference) {
|
|
491
|
-
for (const key in this.attributesMap) {
|
|
492
|
-
if (!["authKey", "authToken", "apiHost", "itemDimensions"].includes(key) && this.params[key]) {
|
|
493
|
-
this.dashboardReference.setAttribute(this.attributesMap[key], this.params[key]);
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
if (this.params.itemDimensions) {
|
|
497
|
-
this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
|
|
498
|
-
}
|
|
499
|
-
if (this.params.apiHost) {
|
|
500
|
-
this.dashboardReference.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
|
|
501
|
-
}
|
|
502
|
-
if (this.params.key) {
|
|
503
|
-
this.dashboardReference.setAttribute("auth-key", this.params.key);
|
|
504
|
-
}
|
|
505
|
-
if (this.params.token) {
|
|
506
|
-
this.dashboardReference.setAttribute("auth-token", this.params.token);
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
// Reload dashboard when triggerproperty changes
|
|
511
|
-
updated(changedProperties) {
|
|
512
|
-
const triggerProperties = /* @__PURE__ */ new Set([
|
|
513
|
-
"dashboardId",
|
|
514
|
-
"dashboardSlug",
|
|
515
|
-
"itemId",
|
|
516
|
-
"language",
|
|
517
|
-
"qeVersion",
|
|
518
|
-
"editMode",
|
|
519
|
-
"screenMode",
|
|
520
|
-
"switchScreenModeOnResize",
|
|
521
|
-
"authToken",
|
|
522
|
-
"authKey",
|
|
523
|
-
"appServer",
|
|
524
|
-
"timezoneId",
|
|
525
|
-
"itemDimensions"
|
|
526
|
-
]);
|
|
527
|
-
const conditionsToCheck = ["dashboardId", "dashboardSlug", "itemId"];
|
|
528
|
-
let callInitComponent = false;
|
|
529
|
-
for (const condition of conditionsToCheck) {
|
|
530
|
-
callInitComponent = callInitComponent || changedProperties.get(condition) === void 0 && this[condition] !== void 0;
|
|
531
|
-
}
|
|
532
|
-
if (callInitComponent && !this.isInitCalled) {
|
|
533
|
-
this.initComponent();
|
|
534
|
-
this.isInitCalled = true;
|
|
535
|
-
return;
|
|
536
|
-
}
|
|
537
|
-
if (this.getIsViewMode()) {
|
|
538
|
-
if (this.dashboardReference) {
|
|
539
|
-
for (const [propertyName] of changedProperties.entries()) {
|
|
540
|
-
if (propertyName === "appSever") {
|
|
541
|
-
SharedLib2.loadLibrary(changedProperties[propertyName]).then(async () => {
|
|
542
|
-
this.isLibraryLoaded = true;
|
|
543
|
-
await this.updateComplete;
|
|
544
|
-
this.dashboardReference = this.renderRoot.querySelector("dashboard-component");
|
|
545
|
-
this.setAllAttributes();
|
|
546
|
-
});
|
|
547
|
-
} else if (this.attributesMap[propertyName]) {
|
|
548
|
-
const mappedAttributeName = this.attributesMap[propertyName] ?? propertyName;
|
|
549
|
-
const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() || this[propertyName];
|
|
550
|
-
this.dashboardReference.setAttribute(mappedAttributeName, attributeValue);
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
} else {
|
|
555
|
-
for (const [propertyName] of changedProperties.entries()) {
|
|
556
|
-
if (triggerProperties.has(propertyName) && propertyName !== "editMode") {
|
|
557
|
-
this.iframeLoaded = false;
|
|
558
|
-
if (this._loadTimeoutHandle) {
|
|
559
|
-
clearTimeout(this._loadTimeoutHandle);
|
|
560
|
-
}
|
|
561
|
-
this._loadTimeoutHandle = setTimeout(() => {
|
|
562
|
-
console.warn(
|
|
563
|
-
"Failed to load dashboard, appServer is likely down or unreachable."
|
|
564
|
-
);
|
|
565
|
-
}, 15 * 1e3);
|
|
566
|
-
this.params = this._setOptions();
|
|
567
|
-
SharedLib2._extendAndValidate(this);
|
|
568
|
-
this._setupLoader();
|
|
569
|
-
this._loaderStyles();
|
|
570
|
-
this._iframeUrl = SharedLib2.createIframeUrl(this);
|
|
571
|
-
if (this.iframe) {
|
|
572
|
-
this._updateIframeUrl();
|
|
573
|
-
}
|
|
574
|
-
this.iframeStyle = SharedLib2.calculateIframeStyles(this);
|
|
575
|
-
} else if (triggerProperties.has(propertyName) && propertyName === "editMode") {
|
|
576
|
-
if (this.iframeLoaded) {
|
|
577
|
-
this.setEditMode(this.editMode);
|
|
578
|
-
}
|
|
579
|
-
this.params = this._setOptions();
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
// Set params
|
|
585
|
-
_setOptions() {
|
|
586
|
-
const defaultParameters = {
|
|
587
|
-
dashboardId: this.dashboardId,
|
|
588
|
-
dashboardSlug: this.dashboardSlug
|
|
589
|
-
};
|
|
590
|
-
if (this.itemId) {
|
|
591
|
-
defaultParameters.itemId = this.itemId;
|
|
592
|
-
this._itemEmbedding = true;
|
|
593
|
-
} else {
|
|
594
|
-
this._itemEmbedding = false;
|
|
595
|
-
}
|
|
596
|
-
if (this.language) {
|
|
597
|
-
defaultParameters.language = this.language;
|
|
598
|
-
}
|
|
599
|
-
if (this.qeVersion) {
|
|
600
|
-
defaultParameters.qeVersion = this.qeVersion;
|
|
601
|
-
}
|
|
602
|
-
if (this.screenMode) {
|
|
603
|
-
defaultParameters.screenMode = this.screenMode;
|
|
604
|
-
}
|
|
605
|
-
defaultParameters.switchScreenModeOnResize = this.switchScreenModeOnResize;
|
|
606
|
-
if (this.authToken) {
|
|
607
|
-
defaultParameters.token = this.authToken;
|
|
608
|
-
}
|
|
609
|
-
if (this.authKey) {
|
|
610
|
-
defaultParameters.key = this.authKey;
|
|
611
|
-
}
|
|
612
|
-
if (this.editMode) {
|
|
613
|
-
defaultParameters.editMode = this.editMode;
|
|
614
|
-
}
|
|
615
|
-
if (this.mainColor) {
|
|
616
|
-
defaultParameters.mainColor = this.mainColor;
|
|
617
|
-
}
|
|
618
|
-
if (this.accentColor) {
|
|
619
|
-
defaultParameters.accentColor = this.accentColor;
|
|
620
|
-
}
|
|
621
|
-
if (this.loaderBackground) {
|
|
622
|
-
defaultParameters.loaderBackground = this.loaderBackground;
|
|
623
|
-
}
|
|
624
|
-
if (this.loaderFontColor) {
|
|
625
|
-
defaultParameters.loaderFontColor = this.loaderFontColor;
|
|
626
|
-
}
|
|
627
|
-
if (this.loaderSpinnerColor) {
|
|
628
|
-
defaultParameters.loaderSpinnerColor = this.loaderSpinnerColor;
|
|
629
|
-
}
|
|
630
|
-
if (this.loaderSpinnerBackground) {
|
|
631
|
-
defaultParameters.loaderSpinnerBackground = this.loaderSpinnerBackground;
|
|
632
|
-
}
|
|
633
|
-
if (this.timezoneId) {
|
|
634
|
-
defaultParameters.timezoneId = this.timezoneId;
|
|
635
|
-
}
|
|
636
|
-
if (this.itemDimensions) {
|
|
637
|
-
defaultParameters.itemDimensions = this.itemDimensions;
|
|
638
|
-
}
|
|
639
|
-
if (this.appServer) {
|
|
640
|
-
this.appServer = this.getIsViewMode() ? SharedLib2.removeTrailingSlash(this.appServer) : SharedLib2.addTrailingSlash(this.appServer);
|
|
641
|
-
defaultParameters.appServer = this.appServer;
|
|
642
|
-
} else {
|
|
643
|
-
this.appServer = SharedLib2.addTrailingSlash(
|
|
644
|
-
SharedLib2.DEFAULT_PARAMETERS.appServer
|
|
645
|
-
);
|
|
646
|
-
defaultParameters.appServer = this.appServer;
|
|
647
|
-
}
|
|
648
|
-
if (this.apiHost) {
|
|
649
|
-
this.apiHost = this.getIsViewMode() ? SharedLib2.removeTrailingSlash(this.apiHost) : SharedLib2.addTrailingSlash(this.apiHost);
|
|
650
|
-
defaultParameters.apiHost = this.apiHost;
|
|
651
|
-
} else {
|
|
652
|
-
this.apiHost = this.appServer.includes("luzmo.com") ? this.appServer.replace("app", "api") : this.appServer;
|
|
653
|
-
defaultParameters.apiHost = this.apiHost;
|
|
654
|
-
}
|
|
655
|
-
this.currentAuthKey = this.authKey;
|
|
656
|
-
this.currentAuthToken = this.authToken;
|
|
657
|
-
return defaultParameters;
|
|
658
|
-
}
|
|
659
|
-
_updateIframeUrl() {
|
|
660
|
-
SharedLib2.updateIframeUrl(this.iframe, this._iframeUrl);
|
|
661
|
-
}
|
|
662
|
-
// Setup loader / browser error
|
|
663
|
-
_setupLoader() {
|
|
664
|
-
const data = SharedLib2.getLoader(this);
|
|
665
|
-
this._loaderMsg = data.loadingMsg;
|
|
666
|
-
if (data.errorMsg) {
|
|
667
|
-
this.browserError = true;
|
|
668
|
-
this.browserErrorMsg = data.errorMsg;
|
|
669
|
-
this._displayError();
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
_displayError() {
|
|
673
|
-
if (this.dashboardError) {
|
|
674
|
-
this._loaderStyles();
|
|
675
|
-
this.iframeStyle.opacity = 1;
|
|
676
|
-
}
|
|
677
|
-
if (this.browserError) {
|
|
678
|
-
this._containerStyle.display = "none";
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
_calculateDimAfterDashboardLoaded() {
|
|
682
|
-
this.dashboardError = false;
|
|
683
|
-
this._loaderStyles();
|
|
684
|
-
SharedLib2._setCalculatedDimensions(this);
|
|
685
|
-
}
|
|
686
|
-
// Set loader styles
|
|
687
|
-
_loaderStyles() {
|
|
688
|
-
this._containerStyle = SharedLib2.containerStyles(this);
|
|
689
|
-
this._loaderStyle = SharedLib2.loaderStyles(this);
|
|
690
|
-
this._loadingCircleStyle = SharedLib2.plStyles(this);
|
|
691
|
-
this._containerLoaderStyle = SharedLib2.containerLoaderStyles(this);
|
|
692
|
-
this._lcStyle = SharedLib2.lcStyles(this);
|
|
693
|
-
}
|
|
694
|
-
static get styles() {
|
|
695
|
-
return [dashboardStyles];
|
|
696
|
-
}
|
|
697
|
-
render() {
|
|
698
|
-
let toBeRenderedHTML;
|
|
699
|
-
const loader = import_lit2.html`
|
|
700
|
-
<div
|
|
701
|
-
class="luzmo-container-loader"
|
|
702
|
-
id="luzmo-container-loader-${this._containerId}"
|
|
703
|
-
style=${(0, import_style_map.styleMap)(
|
|
704
|
-
this._containerLoaderStyle
|
|
705
|
-
)}
|
|
706
|
-
>
|
|
707
|
-
<div
|
|
708
|
-
class="luzmo-loader"
|
|
709
|
-
id="luzmo-loader-${this._containerId}"
|
|
710
|
-
style=${(0, import_style_map.styleMap)(this._loaderStyle)}
|
|
711
|
-
>
|
|
712
|
-
<div
|
|
713
|
-
class="luzmo-lc"
|
|
714
|
-
style=${(0, import_style_map.styleMap)(this._lcStyle)}
|
|
715
|
-
>
|
|
716
|
-
<div
|
|
717
|
-
class="luzmo-loading-circle"
|
|
718
|
-
style=${(0, import_style_map.styleMap)(
|
|
719
|
-
this._loadingCircleStyle
|
|
720
|
-
)}
|
|
721
|
-
></div>
|
|
722
|
-
${this._itemEmbedding ? "" : import_lit2.html`
|
|
723
|
-
<div
|
|
724
|
-
class="luzmo-loading-message"
|
|
725
|
-
style=${(0, import_style_map.styleMap)({ color: this.loaderFontColor })}
|
|
726
|
-
>
|
|
727
|
-
${this._loaderMsg}
|
|
728
|
-
</div>
|
|
729
|
-
`}
|
|
730
|
-
</div>
|
|
731
|
-
</div>
|
|
732
|
-
</div>
|
|
733
|
-
`;
|
|
734
|
-
if (this.getIsViewMode()) {
|
|
735
|
-
toBeRenderedHTML = this.isLibraryLoaded ? import_lit2.html`
|
|
736
|
-
${this.dashboardId || this.dashboardSlug ? import_lit2.html`
|
|
737
|
-
<dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}"
|
|
738
|
-
api-host="${this.params.apiHost}"></dashboard-component>` : import_lit2.html`
|
|
739
|
-
<div id="luzmo-error-${this._containerId}">
|
|
740
|
-
<h3 class="luzmo-error">${this.browserErrorMsg}</h3>
|
|
741
|
-
</div>
|
|
742
|
-
`}
|
|
743
|
-
` : import_lit2.html`${loader}`;
|
|
744
|
-
} else {
|
|
745
|
-
toBeRenderedHTML = import_lit2.html`
|
|
746
|
-
${this.dashboardId || this.dashboardSlug ? import_lit2.html`
|
|
747
|
-
${loader}
|
|
748
|
-
<iframe
|
|
749
|
-
class="luzmo-embed-dashboard ${!this.getIsViewMode() ? `luzmo-embed-dashboard-ede` : ""}"
|
|
750
|
-
id="${this._iframeId}"
|
|
751
|
-
name="${this._iframeId}"
|
|
752
|
-
style=${(0, import_style_map.styleMap)(this.iframeStyle)}
|
|
753
|
-
src="${this._iframeUrl}"
|
|
754
|
-
frameborder="0"
|
|
755
|
-
></iframe>
|
|
756
|
-
` : import_lit2.html`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
|
|
757
|
-
${this.browserError ? import_lit2.html`
|
|
758
|
-
<div id="luzmo-error-${this._containerId}">
|
|
759
|
-
<h3 class="luzmo-error">${this.browserErrorMsg}</h3>
|
|
760
|
-
</div>
|
|
761
|
-
` : ""}
|
|
762
|
-
`;
|
|
763
|
-
}
|
|
764
|
-
return import_lit2.html`
|
|
765
|
-
<div class="${import_shared_embed.luzmoEmbedContainerClass} ${!this.getIsViewMode() ? `${import_shared_embed.luzmoEmbedContainerClass}-ede` : ""}">
|
|
766
|
-
<div
|
|
767
|
-
class="dashboard-container"
|
|
768
|
-
style=${(0, import_style_map.styleMap)(Object.assign({}, this._containerStyle, {
|
|
769
|
-
width: this.iframeStyle.width ?? "100%",
|
|
770
|
-
height: this.iframeStyle.height ?? "100%"
|
|
771
|
-
}))}
|
|
772
|
-
>
|
|
773
|
-
${toBeRenderedHTML}
|
|
774
|
-
</div>
|
|
775
|
-
</div>
|
|
776
|
-
|
|
777
|
-
`;
|
|
778
|
-
}
|
|
779
|
-
getDashboards() {
|
|
780
|
-
return new Promise(
|
|
781
|
-
(resolve) => resolve(luzmo_service_default._components)
|
|
782
|
-
);
|
|
783
|
-
}
|
|
784
|
-
// Public methods
|
|
785
|
-
getData(itemId) {
|
|
786
|
-
if (this.getIsViewMode() && this.dashboardReference) {
|
|
787
|
-
return this.dashboardReference.getData(itemId);
|
|
788
|
-
}
|
|
789
|
-
if (!this.getIsViewMode()) {
|
|
790
|
-
return SharedLib2.getData(this, this.iframe, itemId);
|
|
791
|
-
}
|
|
792
|
-
return Promise.reject();
|
|
793
|
-
}
|
|
794
|
-
getFilters() {
|
|
795
|
-
if (this.getIsViewMode() && this.dashboardReference) {
|
|
796
|
-
return this.dashboardReference.getFilters();
|
|
797
|
-
}
|
|
798
|
-
if (!this.getIsViewMode()) {
|
|
799
|
-
return SharedLib2.getFilters(this, this.iframe);
|
|
800
|
-
}
|
|
801
|
-
return Promise.reject();
|
|
802
|
-
}
|
|
803
|
-
setSelectedData(itemId, filters) {
|
|
804
|
-
if (this.getIsViewMode() && this.dashboardReference) {
|
|
805
|
-
return this.dashboardReference.setSelectedData(itemId, filters);
|
|
806
|
-
}
|
|
807
|
-
if (!this.getIsViewMode()) {
|
|
808
|
-
return SharedLib2.setSelectedData(this, this.iframe, itemId, filters);
|
|
809
|
-
}
|
|
810
|
-
return Promise.reject();
|
|
811
|
-
}
|
|
812
|
-
setAuthorization(key, token) {
|
|
813
|
-
this.currentAuthKey = key;
|
|
814
|
-
this.currentAuthToken = token;
|
|
815
|
-
if (this.getIsViewMode() && this.dashboardReference) {
|
|
816
|
-
return this.dashboardReference.setAuthorization(key, token);
|
|
817
|
-
}
|
|
818
|
-
if (!this.getIsViewMode()) {
|
|
819
|
-
return SharedLib2.setAuthorization(this, this.iframe, key, token);
|
|
820
|
-
}
|
|
821
|
-
return Promise.reject();
|
|
822
|
-
}
|
|
823
|
-
refreshData(itemId) {
|
|
824
|
-
if (this.getIsViewMode() && this.dashboardReference) {
|
|
825
|
-
return this.dashboardReference.refreshData(itemId);
|
|
826
|
-
}
|
|
827
|
-
if (!this.getIsViewMode()) {
|
|
828
|
-
return itemId ? SharedLib2.refreshData(this, this.iframe, itemId) : SharedLib2.refreshData(this, this.iframe);
|
|
829
|
-
}
|
|
830
|
-
return Promise.reject();
|
|
831
|
-
}
|
|
832
|
-
reloadDashboard() {
|
|
833
|
-
if (this.getIsViewMode() && this.dashboardReference) {
|
|
834
|
-
return this.dashboardReference.reloadDashboard();
|
|
835
|
-
}
|
|
836
|
-
if (!this.getIsViewMode()) {
|
|
837
|
-
return SharedLib2.reloadDashboard(this, this.iframe);
|
|
838
|
-
}
|
|
839
|
-
return Promise.reject();
|
|
840
|
-
}
|
|
841
|
-
exportDashboard(format) {
|
|
842
|
-
if (this.getIsViewMode() && this.dashboardReference) {
|
|
843
|
-
return this.dashboardReference.exportDashboard(format);
|
|
844
|
-
}
|
|
845
|
-
if (!this.getIsViewMode()) {
|
|
846
|
-
return format ? SharedLib2.exportDashboard(this, this.iframe, format) : SharedLib2.exportDashboard(this, this.iframe);
|
|
847
|
-
}
|
|
848
|
-
return Promise.reject();
|
|
849
|
-
}
|
|
850
|
-
getAccessibleDashboards() {
|
|
851
|
-
return SharedLib2.getAccessibleDashboards(this);
|
|
852
|
-
}
|
|
853
|
-
addFilters(itemId, filters) {
|
|
854
|
-
return this.dashboardReference.addFilters(itemId, filters);
|
|
855
|
-
}
|
|
856
|
-
setEditMode(editMode) {
|
|
857
|
-
if (this.dashboardReference && editMode === "view") {
|
|
858
|
-
this.editMode = "view";
|
|
859
|
-
this.params.editMode = "view";
|
|
860
|
-
this.initComponent();
|
|
861
|
-
return Promise.resolve({
|
|
862
|
-
type: "setEditMode",
|
|
863
|
-
editMode
|
|
864
|
-
});
|
|
865
|
-
}
|
|
866
|
-
if (this.dashboardReference && ["editFull", "editLimited"].includes(editMode)) {
|
|
867
|
-
this.editMode = editMode;
|
|
868
|
-
this.params.editMode = editMode;
|
|
869
|
-
this.initComponent();
|
|
870
|
-
return Promise.resolve({
|
|
871
|
-
type: "setEditMode",
|
|
872
|
-
editMode
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
if (this.getIsViewMode() && this.dashboardReference) {
|
|
876
|
-
return this.dashboardReference.setEditMode(editMode);
|
|
877
|
-
}
|
|
878
|
-
if (!this.getIsViewMode()) {
|
|
879
|
-
return SharedLib2.setEditMode(this, this.iframe, editMode);
|
|
880
|
-
}
|
|
881
|
-
return Promise.reject();
|
|
882
|
-
}
|
|
883
|
-
setPreview(preview) {
|
|
884
|
-
if (this.getIsViewMode() && this.dashboardReference) {
|
|
885
|
-
return this.dashboardReference.setPreview(preview);
|
|
886
|
-
}
|
|
887
|
-
return SharedLib2.setPreview(this, this.iframe, preview);
|
|
888
|
-
}
|
|
889
|
-
getIsViewMode() {
|
|
890
|
-
return this.experimental && this.params.editMode === "view" || this.params.editMode === void 0;
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
__decorateClass([
|
|
894
|
-
(0, import_decorators.query)(".dashboard-container")
|
|
895
|
-
], LuzmoDashboard.prototype, "container", 2);
|
|
896
|
-
__decorateClass([
|
|
897
|
-
(0, import_decorators.query)(`.${import_shared_embed.luzmoEmbedContainerClass}`)
|
|
898
|
-
], LuzmoDashboard.prototype, "luzmoEmbedContainer", 2);
|
|
899
|
-
__decorateClass([
|
|
900
|
-
(0, import_decorators.query)("iframe")
|
|
901
|
-
], LuzmoDashboard.prototype, "iframe", 2);
|
|
902
|
-
__decorateClass([
|
|
903
|
-
(0, import_decorators.property)()
|
|
904
|
-
], LuzmoDashboard.prototype, "dashboardId", 2);
|
|
905
|
-
__decorateClass([
|
|
906
|
-
(0, import_decorators.property)()
|
|
907
|
-
], LuzmoDashboard.prototype, "dashboardSlug", 2);
|
|
908
|
-
__decorateClass([
|
|
909
|
-
(0, import_decorators.property)()
|
|
910
|
-
], LuzmoDashboard.prototype, "itemId", 2);
|
|
911
|
-
__decorateClass([
|
|
912
|
-
(0, import_decorators.property)()
|
|
913
|
-
], LuzmoDashboard.prototype, "language", 2);
|
|
914
|
-
__decorateClass([
|
|
915
|
-
(0, import_decorators.property)()
|
|
916
|
-
], LuzmoDashboard.prototype, "qeVersion", 2);
|
|
917
|
-
__decorateClass([
|
|
918
|
-
(0, import_decorators.property)()
|
|
919
|
-
], LuzmoDashboard.prototype, "screenMode", 2);
|
|
920
|
-
__decorateClass([
|
|
921
|
-
(0, import_decorators.property)({
|
|
922
|
-
converter: {
|
|
923
|
-
fromAttribute: (value) => value === "true",
|
|
924
|
-
toAttribute: String
|
|
925
|
-
}
|
|
926
|
-
})
|
|
927
|
-
], LuzmoDashboard.prototype, "switchScreenModeOnResize", 2);
|
|
928
|
-
__decorateClass([
|
|
929
|
-
(0, import_decorators.property)()
|
|
930
|
-
], LuzmoDashboard.prototype, "editMode", 2);
|
|
931
|
-
__decorateClass([
|
|
932
|
-
(0, import_decorators.property)()
|
|
933
|
-
], LuzmoDashboard.prototype, "mainColor", 2);
|
|
934
|
-
__decorateClass([
|
|
935
|
-
(0, import_decorators.property)()
|
|
936
|
-
], LuzmoDashboard.prototype, "accentColor", 2);
|
|
937
|
-
__decorateClass([
|
|
938
|
-
(0, import_decorators.property)()
|
|
939
|
-
], LuzmoDashboard.prototype, "authToken", 2);
|
|
940
|
-
__decorateClass([
|
|
941
|
-
(0, import_decorators.property)()
|
|
942
|
-
], LuzmoDashboard.prototype, "authKey", 2);
|
|
943
|
-
__decorateClass([
|
|
944
|
-
(0, import_decorators.property)()
|
|
945
|
-
], LuzmoDashboard.prototype, "loaderBackground", 2);
|
|
946
|
-
__decorateClass([
|
|
947
|
-
(0, import_decorators.property)()
|
|
948
|
-
], LuzmoDashboard.prototype, "loaderFontColor", 2);
|
|
949
|
-
__decorateClass([
|
|
950
|
-
(0, import_decorators.property)()
|
|
951
|
-
], LuzmoDashboard.prototype, "loaderSpinnerColor", 2);
|
|
952
|
-
__decorateClass([
|
|
953
|
-
(0, import_decorators.property)()
|
|
954
|
-
], LuzmoDashboard.prototype, "loaderSpinnerBackground", 2);
|
|
955
|
-
__decorateClass([
|
|
956
|
-
(0, import_decorators.property)()
|
|
957
|
-
], LuzmoDashboard.prototype, "appServer", 2);
|
|
958
|
-
__decorateClass([
|
|
959
|
-
(0, import_decorators.property)()
|
|
960
|
-
], LuzmoDashboard.prototype, "timezoneId", 2);
|
|
961
|
-
__decorateClass([
|
|
962
|
-
(0, import_decorators.property)()
|
|
963
|
-
], LuzmoDashboard.prototype, "apiHost", 2);
|
|
964
|
-
__decorateClass([
|
|
965
|
-
(0, import_decorators.property)({ type: Object })
|
|
966
|
-
], LuzmoDashboard.prototype, "itemDimensions", 2);
|
|
967
|
-
__decorateClass([
|
|
968
|
-
(0, import_decorators.property)({
|
|
969
|
-
converter: {
|
|
970
|
-
fromAttribute: (value) => value === "true",
|
|
971
|
-
toAttribute: String
|
|
972
|
-
}
|
|
973
|
-
})
|
|
974
|
-
], LuzmoDashboard.prototype, "experimental", 2);
|
|
975
|
-
__decorateClass([
|
|
976
|
-
(0, import_decorators.property)({ attribute: false })
|
|
977
|
-
], LuzmoDashboard.prototype, "_containerId", 2);
|
|
978
|
-
__decorateClass([
|
|
979
|
-
(0, import_decorators.property)({ attribute: false })
|
|
980
|
-
], LuzmoDashboard.prototype, "_iframeId", 2);
|
|
981
|
-
__decorateClass([
|
|
982
|
-
(0, import_decorators.property)({ attribute: false })
|
|
983
|
-
], LuzmoDashboard.prototype, "params", 2);
|
|
984
|
-
__decorateClass([
|
|
985
|
-
(0, import_decorators.property)({ attribute: false })
|
|
986
|
-
], LuzmoDashboard.prototype, "_iframeUrl", 2);
|
|
987
|
-
__decorateClass([
|
|
988
|
-
(0, import_decorators.property)({ attribute: false })
|
|
989
|
-
], LuzmoDashboard.prototype, "iframeLoaded", 2);
|
|
990
|
-
__decorateClass([
|
|
991
|
-
(0, import_decorators.property)({ attribute: false })
|
|
992
|
-
], LuzmoDashboard.prototype, "promises", 2);
|
|
993
|
-
__decorateClass([
|
|
994
|
-
(0, import_decorators.property)({ attribute: false })
|
|
995
|
-
], LuzmoDashboard.prototype, "iframeStyle", 2);
|
|
996
|
-
__decorateClass([
|
|
997
|
-
(0, import_decorators.property)({ attribute: false })
|
|
998
|
-
], LuzmoDashboard.prototype, "_containerStyle", 2);
|
|
999
|
-
__decorateClass([
|
|
1000
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1001
|
-
], LuzmoDashboard.prototype, "_loaderStyle", 2);
|
|
1002
|
-
__decorateClass([
|
|
1003
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1004
|
-
], LuzmoDashboard.prototype, "_lcStyle", 2);
|
|
1005
|
-
__decorateClass([
|
|
1006
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1007
|
-
], LuzmoDashboard.prototype, "_loadingCircleStyle", 2);
|
|
1008
|
-
__decorateClass([
|
|
1009
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1010
|
-
], LuzmoDashboard.prototype, "_containerLoaderStyle", 2);
|
|
1011
|
-
__decorateClass([
|
|
1012
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1013
|
-
], LuzmoDashboard.prototype, "_loaderMsg", 2);
|
|
1014
|
-
__decorateClass([
|
|
1015
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1016
|
-
], LuzmoDashboard.prototype, "containerWidth", 2);
|
|
1017
|
-
__decorateClass([
|
|
1018
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1019
|
-
], LuzmoDashboard.prototype, "dimensions", 2);
|
|
1020
|
-
__decorateClass([
|
|
1021
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1022
|
-
], LuzmoDashboard.prototype, "currentScreenMode", 2);
|
|
1023
|
-
__decorateClass([
|
|
1024
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1025
|
-
], LuzmoDashboard.prototype, "_itemEmbedding", 2);
|
|
1026
|
-
__decorateClass([
|
|
1027
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1028
|
-
], LuzmoDashboard.prototype, "browserError", 2);
|
|
1029
|
-
__decorateClass([
|
|
1030
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1031
|
-
], LuzmoDashboard.prototype, "browserErrorMsg", 2);
|
|
1032
|
-
__decorateClass([
|
|
1033
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1034
|
-
], LuzmoDashboard.prototype, "dashboardError", 2);
|
|
1035
|
-
__decorateClass([
|
|
1036
|
-
(0, import_decorators.property)({ attribute: false })
|
|
1037
|
-
], LuzmoDashboard.prototype, "browserNotSupported", 2);
|
|
1038
|
-
__decorateClass([
|
|
1039
|
-
(0, import_decorators.property)()
|
|
1040
|
-
], LuzmoDashboard.prototype, "libVersion", 2);
|
|
1041
|
-
__decorateClass([
|
|
1042
|
-
(0, import_decorators.state)()
|
|
1043
|
-
], LuzmoDashboard.prototype, "isLibraryLoaded", 2);
|
|
1044
|
-
__decorateClass([
|
|
1045
|
-
(0, import_decorators.state)()
|
|
1046
|
-
], LuzmoDashboard.prototype, "dashboardReference", 2);
|
|
1047
|
-
__decorateClass([
|
|
1048
|
-
(0, import_decorators.state)()
|
|
1049
|
-
], LuzmoDashboard.prototype, "currentAuthKey", 2);
|
|
1050
|
-
__decorateClass([
|
|
1051
|
-
(0, import_decorators.state)()
|
|
1052
|
-
], LuzmoDashboard.prototype, "currentAuthToken", 2);
|
|
1053
|
-
__decorateClass([
|
|
1054
|
-
(0, import_decorators.state)()
|
|
1055
|
-
], LuzmoDashboard.prototype, "isInitCalled", 2);
|
|
1056
|
-
|
|
1057
|
-
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
|
|
1058
|
-
var LuzmoEmbedDashboard = class extends LuzmoDashboard {
|
|
1059
|
-
};
|
|
1060
|
-
LuzmoEmbedDashboard = __decorateClass([
|
|
1061
|
-
(0, import_decorators2.customElement)("luzmo-embed-dashboard")
|
|
1062
|
-
], LuzmoEmbedDashboard);
|
|
1063
|
-
|
|
1064
|
-
// libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
|
|
1065
|
-
var import_decorators4 = require("lit/decorators.js");
|
|
1066
|
-
|
|
1067
|
-
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
1068
|
-
var import_decorators3 = require("lit/decorators.js");
|
|
1069
|
-
var import_lit3 = require("lit");
|
|
1070
|
-
var import_ajv = __toESM(require("ajv"), 1);
|
|
1071
|
-
var import_ajv_formats = __toESM(require("ajv-formats"), 1);
|
|
1072
|
-
var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
1073
|
-
|
|
1074
|
-
// libs/dashboard-contents-types/assets/json-schemas/options.schema.json
|
|
1075
|
-
var options_schema_default = {
|
|
1076
|
-
$id: "https://developer.luzmo.com/assets/json-schemas/0.1.88/options.schema.json",
|
|
1077
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
1078
|
-
anyOf: [
|
|
1079
|
-
{ $ref: "area-chart-options.schema.json" },
|
|
1080
|
-
{ $ref: "bar-chart-options.schema.json" },
|
|
1081
|
-
{ $ref: "box-plot-options.schema.json" },
|
|
1082
|
-
{ $ref: "bubble-chart-options.schema.json" },
|
|
1083
|
-
{ $ref: "bullet-chart-options.schema.json" },
|
|
1084
|
-
{ $ref: "choropleth-map-options.schema.json" },
|
|
1085
|
-
{ $ref: "circular-gauge-options.schema.json" },
|
|
1086
|
-
{ $ref: "column-chart-options.schema.json" },
|
|
1087
|
-
{ $ref: "combination-chart-options.schema.json" },
|
|
1088
|
-
{ $ref: "date-filter-options.schema.json" },
|
|
1089
|
-
{ $ref: "donut-chart-options.schema.json" },
|
|
1090
|
-
{ $ref: "dropdown-filter-options.schema.json" },
|
|
1091
|
-
{ $ref: "evolution-number-options.schema.json" },
|
|
1092
|
-
{ $ref: "funnel-chart-options.schema.json" },
|
|
1093
|
-
{ $ref: "image-options.schema.json" },
|
|
1094
|
-
{ $ref: "line-chart-options.schema.json" },
|
|
1095
|
-
{ $ref: "pivot-table-options.schema.json" },
|
|
1096
|
-
{ $ref: "regular-table-options.schema.json" },
|
|
1097
|
-
{ $ref: "sankey-diagram-options.schema.json" },
|
|
1098
|
-
{ $ref: "scatter-plot-options.schema.json" },
|
|
1099
|
-
{ $ref: "slicer-filter-options.schema.json" },
|
|
1100
|
-
{ $ref: "slider-filter-options.schema.json" },
|
|
1101
|
-
{ $ref: "text-options.schema.json" }
|
|
1102
|
-
]
|
|
1103
|
-
};
|
|
1104
|
-
|
|
1105
|
-
// libs/dashboard-contents-types/assets/json-schemas/slots.schema.json
|
|
1106
|
-
var slots_schema_default = {
|
|
1107
|
-
$id: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slots.schema.json",
|
|
1108
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
1109
|
-
anyOf: [
|
|
1110
|
-
{ $ref: "area-chart-slots.schema.json" },
|
|
1111
|
-
{ $ref: "bar-chart-slots.schema.json" },
|
|
1112
|
-
{ $ref: "box-plot-slots.schema.json" },
|
|
1113
|
-
{ $ref: "bubble-chart-slots.schema.json" },
|
|
1114
|
-
{ $ref: "bullet-chart-slots.schema.json" },
|
|
1115
|
-
{ $ref: "choropleth-map-slots.schema.json" },
|
|
1116
|
-
{ $ref: "circular-gauge-slots.schema.json" },
|
|
1117
|
-
{ $ref: "column-chart-slots.schema.json" },
|
|
1118
|
-
{ $ref: "combination-chart-slots.schema.json" },
|
|
1119
|
-
{ $ref: "date-filter-slots.schema.json" },
|
|
1120
|
-
{ $ref: "donut-chart-slots.schema.json" },
|
|
1121
|
-
{ $ref: "dropdown-filter-slots.schema.json" },
|
|
1122
|
-
{ $ref: "evolution-number-slots.schema.json" },
|
|
1123
|
-
{ $ref: "funnel-chart-slots.schema.json" },
|
|
1124
|
-
{ $ref: "line-chart-slots.schema.json" },
|
|
1125
|
-
{ $ref: "pivot-table-slots.schema.json" },
|
|
1126
|
-
{ $ref: "regular-table-slots.schema.json" },
|
|
1127
|
-
{ $ref: "sankey-diagram-slots.schema.json" },
|
|
1128
|
-
{ $ref: "scatter-plot-slots.schema.json" },
|
|
1129
|
-
{ $ref: "slicer-filter-slots.schema.json" },
|
|
1130
|
-
{ $ref: "slider-filter-slots.schema.json" }
|
|
1131
|
-
]
|
|
1132
|
-
};
|
|
1133
|
-
|
|
1134
|
-
// libs/dashboard-contents-types/assets/json-schemas/area-chart.schema.json
|
|
1135
|
-
var area_chart_schema_default = {
|
|
1136
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
1137
|
-
$id: "https://developer.luzmo.com/assets/json-schemas/0.1.88/area-chart.schema.json",
|
|
1138
|
-
type: "object",
|
|
1139
|
-
description: "Area Chart item",
|
|
1140
|
-
properties: {
|
|
1141
|
-
type: {
|
|
1142
|
-
description: "Type of the item",
|
|
1143
|
-
type: "string",
|
|
1144
|
-
const: "area-chart"
|
|
1145
|
-
},
|
|
1146
|
-
options: {
|
|
1147
|
-
description: "Options of the Area Chart item",
|
|
1148
|
-
$ref: "area-chart-options.schema.json"
|
|
1149
|
-
},
|
|
1150
|
-
slots: {
|
|
1151
|
-
description: "Data definition of the Area Chart item",
|
|
1152
|
-
$ref: "area-chart-slots.schema.json"
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
};
|
|
1156
|
-
|
|
1157
|
-
// libs/dashboard-contents-types/assets/json-schemas/area-chart-options.schema.json
|
|
1158
|
-
var area_chart_options_schema_default = {
|
|
1159
|
-
$id: "https://developer.luzmo.com/assets/json-schemas/0.1.88/area-chart-options.schema.json",
|
|
1160
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
1161
|
-
properties: {
|
|
1162
|
-
axis: {
|
|
1163
|
-
description: "Axes options",
|
|
1164
|
-
properties: {
|
|
1165
|
-
x: {
|
|
1166
|
-
description: "X-axis options",
|
|
1167
|
-
properties: {
|
|
1168
|
-
color: {
|
|
1169
|
-
description: "X-axis color",
|
|
1170
|
-
examples: [
|
|
1171
|
-
"#000000",
|
|
1172
|
-
"black",
|
|
1173
|
-
"rgba(0,0,0,1)"
|
|
1174
|
-
],
|
|
1175
|
-
type: "string"
|
|
1176
|
-
},
|
|
1177
|
-
ticksMode: {
|
|
1178
|
-
default: "ticks",
|
|
1179
|
-
description: "Ticks mode of the X-axis: hide, ticks, or gridlines",
|
|
1180
|
-
enum: [
|
|
1181
|
-
"gridlines",
|
|
1182
|
-
"hide",
|
|
1183
|
-
"ticks"
|
|
1184
|
-
],
|
|
1185
|
-
type: "string"
|
|
1186
|
-
},
|
|
1187
|
-
ticksStyle: {
|
|
1188
|
-
description: "Ticks style of the X-axis: auto or user defined",
|
|
1189
|
-
enum: [
|
|
1190
|
-
"auto",
|
|
1191
|
-
"userDefined"
|
|
1192
|
-
],
|
|
1193
|
-
type: "string"
|
|
293
|
+
// libs/dashboard-contents-types/assets/json-schemas/area-chart-options.schema.json
|
|
294
|
+
var area_chart_options_schema_default = {
|
|
295
|
+
$id: "https://developer.luzmo.com/assets/json-schemas/0.1.88/area-chart-options.schema.json",
|
|
296
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
297
|
+
properties: {
|
|
298
|
+
axis: {
|
|
299
|
+
description: "Axes options",
|
|
300
|
+
properties: {
|
|
301
|
+
x: {
|
|
302
|
+
description: "X-axis options",
|
|
303
|
+
properties: {
|
|
304
|
+
color: {
|
|
305
|
+
description: "X-axis color",
|
|
306
|
+
examples: [
|
|
307
|
+
"#000000",
|
|
308
|
+
"black",
|
|
309
|
+
"rgba(0,0,0,1)"
|
|
310
|
+
],
|
|
311
|
+
type: "string"
|
|
312
|
+
},
|
|
313
|
+
ticksMode: {
|
|
314
|
+
default: "ticks",
|
|
315
|
+
description: "Ticks mode of the X-axis: hide, ticks, or gridlines",
|
|
316
|
+
enum: [
|
|
317
|
+
"gridlines",
|
|
318
|
+
"hide",
|
|
319
|
+
"ticks"
|
|
320
|
+
],
|
|
321
|
+
type: "string"
|
|
322
|
+
},
|
|
323
|
+
ticksStyle: {
|
|
324
|
+
description: "Ticks style of the X-axis: auto or user defined",
|
|
325
|
+
enum: [
|
|
326
|
+
"auto",
|
|
327
|
+
"userDefined"
|
|
328
|
+
],
|
|
329
|
+
type: "string"
|
|
1194
330
|
}
|
|
1195
331
|
},
|
|
1196
332
|
type: "object"
|
|
@@ -3469,11 +2605,11 @@ var bar_chart_schema_default = {
|
|
|
3469
2605
|
},
|
|
3470
2606
|
options: {
|
|
3471
2607
|
description: "Options of the Bar Chart item",
|
|
3472
|
-
$ref: "bar-chart-options.schema.json"
|
|
2608
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bar-chart-options.schema.json"
|
|
3473
2609
|
},
|
|
3474
2610
|
slots: {
|
|
3475
2611
|
description: "Data definition of the Bar Chart item",
|
|
3476
|
-
$ref: "bar-chart-slots.schema.json"
|
|
2612
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bar-chart-slots.schema.json"
|
|
3477
2613
|
}
|
|
3478
2614
|
}
|
|
3479
2615
|
};
|
|
@@ -7792,11 +6928,11 @@ var box_plot_schema_default = {
|
|
|
7792
6928
|
},
|
|
7793
6929
|
options: {
|
|
7794
6930
|
description: "Options of the Box Plot item",
|
|
7795
|
-
$ref: "box-plot-options.schema.json"
|
|
6931
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/box-plot-options.schema.json"
|
|
7796
6932
|
},
|
|
7797
6933
|
slots: {
|
|
7798
6934
|
description: "Data definition of the Box Plot item",
|
|
7799
|
-
$ref: "box-plot-slots.schema.json"
|
|
6935
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/box-plot-slots.schema.json"
|
|
7800
6936
|
}
|
|
7801
6937
|
}
|
|
7802
6938
|
};
|
|
@@ -9919,11 +9055,11 @@ var bubble_chart_schema_default = {
|
|
|
9919
9055
|
},
|
|
9920
9056
|
options: {
|
|
9921
9057
|
description: "Options of the Bubble Chart item",
|
|
9922
|
-
$ref: "bubble-chart-options.schema.json"
|
|
9058
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bubble-chart-options.schema.json"
|
|
9923
9059
|
},
|
|
9924
9060
|
slots: {
|
|
9925
9061
|
description: "Data definition of the Bubble Chart item",
|
|
9926
|
-
$ref: "bubble-chart-slots.schema.json"
|
|
9062
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bubble-chart-slots.schema.json"
|
|
9927
9063
|
}
|
|
9928
9064
|
}
|
|
9929
9065
|
};
|
|
@@ -13835,11 +12971,11 @@ var bullet_chart_schema_default = {
|
|
|
13835
12971
|
},
|
|
13836
12972
|
options: {
|
|
13837
12973
|
description: "Options of the Bullet Chart item",
|
|
13838
|
-
$ref: "bullet-chart-options.schema.json"
|
|
12974
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bullet-chart-options.schema.json"
|
|
13839
12975
|
},
|
|
13840
12976
|
slots: {
|
|
13841
12977
|
description: "Data definition of the Bullet Chart item",
|
|
13842
|
-
$ref: "bullet-chart-slots.schema.json"
|
|
12978
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/bullet-chart-slots.schema.json"
|
|
13843
12979
|
}
|
|
13844
12980
|
}
|
|
13845
12981
|
};
|
|
@@ -15749,11 +14885,11 @@ var choropleth_map_schema_default = {
|
|
|
15749
14885
|
},
|
|
15750
14886
|
options: {
|
|
15751
14887
|
description: "Options of the Choropleth Map item",
|
|
15752
|
-
$ref: "choropleth-map-options.schema.json"
|
|
14888
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/choropleth-map-options.schema.json"
|
|
15753
14889
|
},
|
|
15754
14890
|
slots: {
|
|
15755
14891
|
description: "Data definition of the Choropleth Map item",
|
|
15756
|
-
$ref: "choropleth-map-slots.schema.json"
|
|
14892
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/choropleth-map-slots.schema.json"
|
|
15757
14893
|
}
|
|
15758
14894
|
}
|
|
15759
14895
|
};
|
|
@@ -17840,11 +16976,11 @@ var circular_gauge_schema_default = {
|
|
|
17840
16976
|
},
|
|
17841
16977
|
options: {
|
|
17842
16978
|
description: "Options of the Circular Gauge item",
|
|
17843
|
-
$ref: "circular-gauge-options.schema.json"
|
|
16979
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/circular-gauge-options.schema.json"
|
|
17844
16980
|
},
|
|
17845
16981
|
slots: {
|
|
17846
16982
|
description: "Data definition of the Circular Gauge item",
|
|
17847
|
-
$ref: "circular-gauge-slots.schema.json"
|
|
16983
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/circular-gauge-slots.schema.json"
|
|
17848
16984
|
}
|
|
17849
16985
|
}
|
|
17850
16986
|
};
|
|
@@ -19672,11 +18808,11 @@ var column_chart_schema_default = {
|
|
|
19672
18808
|
},
|
|
19673
18809
|
options: {
|
|
19674
18810
|
description: "Options of the Column Chart item",
|
|
19675
|
-
$ref: "column-chart-options.schema.json"
|
|
18811
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/column-chart-options.schema.json"
|
|
19676
18812
|
},
|
|
19677
18813
|
slots: {
|
|
19678
18814
|
description: "Data definition of the Column Chart item",
|
|
19679
|
-
$ref: "column-chart-slots.schema.json"
|
|
18815
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/column-chart-slots.schema.json"
|
|
19680
18816
|
}
|
|
19681
18817
|
}
|
|
19682
18818
|
};
|
|
@@ -23994,11 +23130,11 @@ var combination_chart_schema_default = {
|
|
|
23994
23130
|
},
|
|
23995
23131
|
options: {
|
|
23996
23132
|
description: "Options of the Combination Chart item",
|
|
23997
|
-
$ref: "combination-chart-options.schema.json"
|
|
23133
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/combination-chart-options.schema.json"
|
|
23998
23134
|
},
|
|
23999
23135
|
slots: {
|
|
24000
23136
|
description: "Data definition of the Combination Chart item",
|
|
24001
|
-
$ref: "combination-chart-slots.schema.json"
|
|
23137
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/combination-chart-slots.schema.json"
|
|
24002
23138
|
}
|
|
24003
23139
|
}
|
|
24004
23140
|
};
|
|
@@ -26370,11 +25506,11 @@ var date_filter_schema_default = {
|
|
|
26370
25506
|
},
|
|
26371
25507
|
options: {
|
|
26372
25508
|
description: "Options of the Date Filter item",
|
|
26373
|
-
$ref: "date-filter-options.schema.json"
|
|
25509
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/date-filter-options.schema.json"
|
|
26374
25510
|
},
|
|
26375
25511
|
slots: {
|
|
26376
25512
|
description: "Data definition of the Date Filter item",
|
|
26377
|
-
$ref: "date-filter-slots.schema.json"
|
|
25513
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/date-filter-slots.schema.json"
|
|
26378
25514
|
}
|
|
26379
25515
|
}
|
|
26380
25516
|
};
|
|
@@ -27797,11 +26933,11 @@ var donut_chart_schema_default = {
|
|
|
27797
26933
|
},
|
|
27798
26934
|
options: {
|
|
27799
26935
|
description: "Options of the Donut Chart item",
|
|
27800
|
-
$ref: "donut-chart-options.schema.json"
|
|
26936
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/donut-chart-options.schema.json"
|
|
27801
26937
|
},
|
|
27802
26938
|
slots: {
|
|
27803
26939
|
description: "Data definition of the Donut Chart item",
|
|
27804
|
-
$ref: "donut-chart-slots.schema.json"
|
|
26940
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/donut-chart-slots.schema.json"
|
|
27805
26941
|
}
|
|
27806
26942
|
}
|
|
27807
26943
|
};
|
|
@@ -31790,11 +30926,11 @@ var dropdown_filter_schema_default = {
|
|
|
31790
30926
|
},
|
|
31791
30927
|
options: {
|
|
31792
30928
|
description: "Options of the Dropdown Filter item",
|
|
31793
|
-
$ref: "dropdown-filter-options.schema.json"
|
|
30929
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/dropdown-filter-options.schema.json"
|
|
31794
30930
|
},
|
|
31795
30931
|
slots: {
|
|
31796
30932
|
description: "Data definition of the Dropdown Filter item",
|
|
31797
|
-
$ref: "dropdown-filter-slots.schema.json"
|
|
30933
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/dropdown-filter-slots.schema.json"
|
|
31798
30934
|
}
|
|
31799
30935
|
}
|
|
31800
30936
|
};
|
|
@@ -33501,11 +32637,11 @@ var evolution_number_schema_default = {
|
|
|
33501
32637
|
},
|
|
33502
32638
|
options: {
|
|
33503
32639
|
description: "Options of the Evolution Number item",
|
|
33504
|
-
$ref: "evolution-number-options.schema.json"
|
|
32640
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/evolution-number-options.schema.json"
|
|
33505
32641
|
},
|
|
33506
32642
|
slots: {
|
|
33507
32643
|
description: "Data definition of the Evolution Number item",
|
|
33508
|
-
$ref: "evolution-number-slots.schema.json"
|
|
32644
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/evolution-number-slots.schema.json"
|
|
33509
32645
|
}
|
|
33510
32646
|
}
|
|
33511
32647
|
};
|
|
@@ -35451,11 +34587,11 @@ var funnel_chart_schema_default = {
|
|
|
35451
34587
|
},
|
|
35452
34588
|
options: {
|
|
35453
34589
|
description: "Options of the Funnel Chart item",
|
|
35454
|
-
$ref: "funnel-chart-options.schema.json"
|
|
34590
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/funnel-chart-options.schema.json"
|
|
35455
34591
|
},
|
|
35456
34592
|
slots: {
|
|
35457
34593
|
description: "Data definition of the Funnel Chart item",
|
|
35458
|
-
$ref: "funnel-chart-slots.schema.json"
|
|
34594
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/funnel-chart-slots.schema.json"
|
|
35459
34595
|
}
|
|
35460
34596
|
}
|
|
35461
34597
|
};
|
|
@@ -39430,7 +38566,7 @@ var image_schema_default = {
|
|
|
39430
38566
|
},
|
|
39431
38567
|
options: {
|
|
39432
38568
|
description: "Options of the Image item",
|
|
39433
|
-
$ref: "image-options.schema.json"
|
|
38569
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/image-options.schema.json"
|
|
39434
38570
|
}
|
|
39435
38571
|
}
|
|
39436
38572
|
};
|
|
@@ -40026,11 +39162,11 @@ var line_chart_schema_default = {
|
|
|
40026
39162
|
},
|
|
40027
39163
|
options: {
|
|
40028
39164
|
description: "Options of the Line Chart item",
|
|
40029
|
-
$ref: "line-chart-options.schema.json"
|
|
39165
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/line-chart-options.schema.json"
|
|
40030
39166
|
},
|
|
40031
39167
|
slots: {
|
|
40032
39168
|
description: "Data definition of the Line Chart item",
|
|
40033
|
-
$ref: "line-chart-slots.schema.json"
|
|
39169
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/line-chart-slots.schema.json"
|
|
40034
39170
|
}
|
|
40035
39171
|
}
|
|
40036
39172
|
};
|
|
@@ -42359,11 +41495,11 @@ var pivot_table_schema_default = {
|
|
|
42359
41495
|
},
|
|
42360
41496
|
options: {
|
|
42361
41497
|
description: "Options of the Pivot Table item",
|
|
42362
|
-
$ref: "pivot-table-options.schema.json"
|
|
41498
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/pivot-table-options.schema.json"
|
|
42363
41499
|
},
|
|
42364
41500
|
slots: {
|
|
42365
41501
|
description: "Data definition of the Pivot Table item",
|
|
42366
|
-
$ref: "pivot-table-slots.schema.json"
|
|
41502
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/pivot-table-slots.schema.json"
|
|
42367
41503
|
}
|
|
42368
41504
|
}
|
|
42369
41505
|
};
|
|
@@ -44360,11 +43496,11 @@ var regular_table_schema_default = {
|
|
|
44360
43496
|
},
|
|
44361
43497
|
options: {
|
|
44362
43498
|
description: "Options of the Regular Table item",
|
|
44363
|
-
$ref: "regular-table-options.schema.json"
|
|
43499
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/regular-table-options.schema.json"
|
|
44364
43500
|
},
|
|
44365
43501
|
slots: {
|
|
44366
43502
|
description: "Data definition of the Regular Table item",
|
|
44367
|
-
$ref: "regular-table-slots.schema.json"
|
|
43503
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/regular-table-slots.schema.json"
|
|
44368
43504
|
}
|
|
44369
43505
|
}
|
|
44370
43506
|
};
|
|
@@ -46329,11 +45465,11 @@ var sankey_diagram_schema_default = {
|
|
|
46329
45465
|
},
|
|
46330
45466
|
options: {
|
|
46331
45467
|
description: "Options of the Sankey Diagram item",
|
|
46332
|
-
$ref: "sankey-diagram-options.schema.json"
|
|
45468
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/sankey-diagram-options.schema.json"
|
|
46333
45469
|
},
|
|
46334
45470
|
slots: {
|
|
46335
45471
|
description: "Data definition of the Sankey Diagram item",
|
|
46336
|
-
$ref: "sankey-diagram-slots.schema.json"
|
|
45472
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/sankey-diagram-slots.schema.json"
|
|
46337
45473
|
}
|
|
46338
45474
|
}
|
|
46339
45475
|
};
|
|
@@ -48226,11 +47362,11 @@ var scatter_plot_schema_default = {
|
|
|
48226
47362
|
},
|
|
48227
47363
|
options: {
|
|
48228
47364
|
description: "Options of the Scatter Plot item",
|
|
48229
|
-
$ref: "scatter-plot-options.schema.json"
|
|
47365
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/scatter-plot-options.schema.json"
|
|
48230
47366
|
},
|
|
48231
47367
|
slots: {
|
|
48232
47368
|
description: "Data definition of the Scatter Plot item",
|
|
48233
|
-
$ref: "scatter-plot-slots.schema.json"
|
|
47369
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/scatter-plot-slots.schema.json"
|
|
48234
47370
|
}
|
|
48235
47371
|
}
|
|
48236
47372
|
};
|
|
@@ -50457,11 +49593,11 @@ var slicer_filter_schema_default = {
|
|
|
50457
49593
|
},
|
|
50458
49594
|
options: {
|
|
50459
49595
|
description: "Options of the Slicer Filter item",
|
|
50460
|
-
$ref: "slicer-filter-options.schema.json"
|
|
49596
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slicer-filter-options.schema.json"
|
|
50461
49597
|
},
|
|
50462
49598
|
slots: {
|
|
50463
49599
|
description: "Data definition of the Slicer Filter item",
|
|
50464
|
-
$ref: "slicer-filter-slots.schema.json"
|
|
49600
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slicer-filter-slots.schema.json"
|
|
50465
49601
|
}
|
|
50466
49602
|
}
|
|
50467
49603
|
};
|
|
@@ -52365,11 +51501,11 @@ var slider_filter_schema_default = {
|
|
|
52365
51501
|
},
|
|
52366
51502
|
options: {
|
|
52367
51503
|
description: "Options of the Slider Filter item",
|
|
52368
|
-
$ref: "slider-filter-options.schema.json"
|
|
51504
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slider-filter-options.schema.json"
|
|
52369
51505
|
},
|
|
52370
51506
|
slots: {
|
|
52371
51507
|
description: "Data definition of the Slider Filter item",
|
|
52372
|
-
$ref: "slider-filter-slots.schema.json"
|
|
51508
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/slider-filter-slots.schema.json"
|
|
52373
51509
|
}
|
|
52374
51510
|
}
|
|
52375
51511
|
};
|
|
@@ -53859,7 +52995,7 @@ var text_schema_default = {
|
|
|
53859
52995
|
},
|
|
53860
52996
|
options: {
|
|
53861
52997
|
description: "Options of the Text item",
|
|
53862
|
-
$ref: "text-options.schema.json"
|
|
52998
|
+
$ref: "https://developer.luzmo.com/assets/json-schemas/0.1.88/text-options.schema.json"
|
|
53863
52999
|
}
|
|
53864
53000
|
}
|
|
53865
53001
|
};
|
|
@@ -54367,109 +53503,1139 @@ var text_options_schema_default = {
|
|
|
54367
53503
|
],
|
|
54368
53504
|
type: "number"
|
|
54369
53505
|
}
|
|
54370
|
-
},
|
|
54371
|
-
type: "object"
|
|
54372
|
-
},
|
|
54373
|
-
type: {
|
|
54374
|
-
description: "Theme type",
|
|
54375
|
-
examples: [
|
|
54376
|
-
"custom"
|
|
54377
|
-
],
|
|
54378
|
-
type: "string"
|
|
53506
|
+
},
|
|
53507
|
+
type: "object"
|
|
53508
|
+
},
|
|
53509
|
+
type: {
|
|
53510
|
+
description: "Theme type",
|
|
53511
|
+
examples: [
|
|
53512
|
+
"custom"
|
|
53513
|
+
],
|
|
53514
|
+
type: "string"
|
|
53515
|
+
}
|
|
53516
|
+
},
|
|
53517
|
+
type: "object"
|
|
53518
|
+
},
|
|
53519
|
+
title: {
|
|
53520
|
+
description: 'Title in format {locale: "title"}, for example, {en: "Title"}',
|
|
53521
|
+
examples: [
|
|
53522
|
+
{
|
|
53523
|
+
en: "Title"
|
|
53524
|
+
}
|
|
53525
|
+
],
|
|
53526
|
+
type: "object"
|
|
53527
|
+
}
|
|
53528
|
+
},
|
|
53529
|
+
type: "object"
|
|
53530
|
+
};
|
|
53531
|
+
|
|
53532
|
+
// libs/dashboard-contents-types/json-schemas.ts
|
|
53533
|
+
var json_schemas_default = {
|
|
53534
|
+
"viz-item-type.schema.json": viz_item_type_schema_default,
|
|
53535
|
+
"options.schema.json": options_schema_default,
|
|
53536
|
+
"slots.schema.json": slots_schema_default,
|
|
53537
|
+
"area-chart.schema.json": area_chart_schema_default,
|
|
53538
|
+
"area-chart-options.schema.json": area_chart_options_schema_default,
|
|
53539
|
+
"area-chart-slots.schema.json": area_chart_slots_schema_default,
|
|
53540
|
+
"bar-chart.schema.json": bar_chart_schema_default,
|
|
53541
|
+
"bar-chart-options.schema.json": bar_chart_options_schema_default,
|
|
53542
|
+
"bar-chart-slots.schema.json": bar_chart_slots_schema_default,
|
|
53543
|
+
"box-plot.schema.json": box_plot_schema_default,
|
|
53544
|
+
"box-plot-options.schema.json": box_plot_options_schema_default,
|
|
53545
|
+
"box-plot-slots.schema.json": box_plot_slots_schema_default,
|
|
53546
|
+
"bubble-chart.schema.json": bubble_chart_schema_default,
|
|
53547
|
+
"bubble-chart-options.schema.json": bubble_chart_options_schema_default,
|
|
53548
|
+
"bubble-chart-slots.schema.json": bubble_chart_slots_schema_default,
|
|
53549
|
+
"bullet-chart.schema.json": bullet_chart_schema_default,
|
|
53550
|
+
"bullet-chart-options.schema.json": bullet_chart_options_schema_default,
|
|
53551
|
+
"bullet-chart-slots.schema.json": bullet_chart_slots_schema_default,
|
|
53552
|
+
"choropleth-map.schema.json": choropleth_map_schema_default,
|
|
53553
|
+
"choropleth-map-options.schema.json": choropleth_map_options_schema_default,
|
|
53554
|
+
"choropleth-map-slots.schema.json": choropleth_map_slots_schema_default,
|
|
53555
|
+
"circular-gauge.schema.json": circular_gauge_schema_default,
|
|
53556
|
+
"circular-gauge-options.schema.json": circular_gauge_options_schema_default,
|
|
53557
|
+
"circular-gauge-slots.schema.json": circular_gauge_slots_schema_default,
|
|
53558
|
+
"column-chart.schema.json": column_chart_schema_default,
|
|
53559
|
+
"column-chart-options.schema.json": column_chart_options_schema_default,
|
|
53560
|
+
"column-chart-slots.schema.json": column_chart_slots_schema_default,
|
|
53561
|
+
"combination-chart.schema.json": combination_chart_schema_default,
|
|
53562
|
+
"combination-chart-options.schema.json": combination_chart_options_schema_default,
|
|
53563
|
+
"combination-chart-slots.schema.json": combination_chart_slots_schema_default,
|
|
53564
|
+
"date-filter.schema.json": date_filter_schema_default,
|
|
53565
|
+
"date-filter-options.schema.json": date_filter_options_schema_default,
|
|
53566
|
+
"date-filter-slots.schema.json": date_filter_slots_schema_default,
|
|
53567
|
+
"donut-chart.schema.json": donut_chart_schema_default,
|
|
53568
|
+
"donut-chart-options.schema.json": donut_chart_options_schema_default,
|
|
53569
|
+
"donut-chart-slots.schema.json": donut_chart_slots_schema_default,
|
|
53570
|
+
"dropdown-filter.schema.json": dropdown_filter_schema_default,
|
|
53571
|
+
"dropdown-filter-options.schema.json": dropdown_filter_options_schema_default,
|
|
53572
|
+
"dropdown-filter-slots.schema.json": dropdown_filter_slots_schema_default,
|
|
53573
|
+
"evolution-number.schema.json": evolution_number_schema_default,
|
|
53574
|
+
"evolution-number-options.schema.json": evolution_number_options_schema_default,
|
|
53575
|
+
"evolution-number-slots.schema.json": evolution_number_slots_schema_default,
|
|
53576
|
+
"funnel-chart.schema.json": funnel_chart_schema_default,
|
|
53577
|
+
"funnel-chart-options.schema.json": funnel_chart_options_schema_default,
|
|
53578
|
+
"funnel-chart-slots.schema.json": funnel_chart_slots_schema_default,
|
|
53579
|
+
"image.schema.json": image_schema_default,
|
|
53580
|
+
"image-options.schema.json": image_options_schema_default,
|
|
53581
|
+
"line-chart.schema.json": line_chart_schema_default,
|
|
53582
|
+
"line-chart-options.schema.json": line_chart_options_schema_default,
|
|
53583
|
+
"line-chart-slots.schema.json": line_chart_slots_schema_default,
|
|
53584
|
+
"pivot-table.schema.json": pivot_table_schema_default,
|
|
53585
|
+
"pivot-table-options.schema.json": pivot_table_options_schema_default,
|
|
53586
|
+
"pivot-table-slots.schema.json": pivot_table_slots_schema_default,
|
|
53587
|
+
"regular-table.schema.json": regular_table_schema_default,
|
|
53588
|
+
"regular-table-options.schema.json": regular_table_options_schema_default,
|
|
53589
|
+
"regular-table-slots.schema.json": regular_table_slots_schema_default,
|
|
53590
|
+
"sankey-diagram.schema.json": sankey_diagram_schema_default,
|
|
53591
|
+
"sankey-diagram-options.schema.json": sankey_diagram_options_schema_default,
|
|
53592
|
+
"sankey-diagram-slots.schema.json": sankey_diagram_slots_schema_default,
|
|
53593
|
+
"scatter-plot.schema.json": scatter_plot_schema_default,
|
|
53594
|
+
"scatter-plot-options.schema.json": scatter_plot_options_schema_default,
|
|
53595
|
+
"scatter-plot-slots.schema.json": scatter_plot_slots_schema_default,
|
|
53596
|
+
"slicer-filter.schema.json": slicer_filter_schema_default,
|
|
53597
|
+
"slicer-filter-options.schema.json": slicer_filter_options_schema_default,
|
|
53598
|
+
"slicer-filter-slots.schema.json": slicer_filter_slots_schema_default,
|
|
53599
|
+
"slider-filter.schema.json": slider_filter_schema_default,
|
|
53600
|
+
"slider-filter-options.schema.json": slider_filter_options_schema_default,
|
|
53601
|
+
"slider-filter-slots.schema.json": slider_filter_slots_schema_default,
|
|
53602
|
+
"text.schema.json": text_schema_default,
|
|
53603
|
+
"text-options.schema.json": text_options_schema_default
|
|
53604
|
+
};
|
|
53605
|
+
|
|
53606
|
+
// libs/embed-libs/embed/src/index.ts
|
|
53607
|
+
var import_shared_embed2 = require("@luzmo/shared-embed");
|
|
53608
|
+
|
|
53609
|
+
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
|
|
53610
|
+
var import_decorators2 = require("lit/decorators.js");
|
|
53611
|
+
|
|
53612
|
+
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
|
|
53613
|
+
var SharedLib2 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
53614
|
+
var import_lit2 = require("lit");
|
|
53615
|
+
var import_decorators = require("lit/decorators.js");
|
|
53616
|
+
var import_style_map = require("lit/directives/style-map.js");
|
|
53617
|
+
var import_shared_embed = require("@luzmo/shared-embed");
|
|
53618
|
+
|
|
53619
|
+
// libs/embed-libs/embed/package.json
|
|
53620
|
+
var version = "6.1.0";
|
|
53621
|
+
|
|
53622
|
+
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
53623
|
+
var LuzmoService = class {
|
|
53624
|
+
constructor() {
|
|
53625
|
+
this._components = [];
|
|
53626
|
+
}
|
|
53627
|
+
};
|
|
53628
|
+
var luzmo_service_default = new LuzmoService();
|
|
53629
|
+
|
|
53630
|
+
// libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
|
|
53631
|
+
var SharedLib = __toESM(require("@luzmo/shared-embed"), 1);
|
|
53632
|
+
var _setEventHandler = () => {
|
|
53633
|
+
if (typeof window.__luzmoMessageHandler === "function") {
|
|
53634
|
+
return;
|
|
53635
|
+
}
|
|
53636
|
+
window.__luzmoMessageHandler = (event) => {
|
|
53637
|
+
const dashboardComponent = luzmo_service_default._components.find(
|
|
53638
|
+
(c) => event.data.name === c._iframeId
|
|
53639
|
+
);
|
|
53640
|
+
if (!dashboardComponent) {
|
|
53641
|
+
return;
|
|
53642
|
+
}
|
|
53643
|
+
switch (event.data?.type) {
|
|
53644
|
+
case "load": {
|
|
53645
|
+
dashboardComponent.dispatchEvent(
|
|
53646
|
+
new CustomEvent("load", { detail: { data: event.data } })
|
|
53647
|
+
);
|
|
53648
|
+
if (dashboardComponent._loadTimeoutHandle) {
|
|
53649
|
+
clearTimeout(dashboardComponent._loadTimeoutHandle);
|
|
53650
|
+
dashboardComponent._loadTimeoutHandle = void 0;
|
|
53651
|
+
}
|
|
53652
|
+
dashboardComponent.iframeLoaded = true;
|
|
53653
|
+
dashboardComponent.dimensions = event.data.dimensions;
|
|
53654
|
+
dashboardComponent._calculateDimAfterDashboardLoaded();
|
|
53655
|
+
break;
|
|
53656
|
+
}
|
|
53657
|
+
case "error": {
|
|
53658
|
+
dashboardComponent.dashboardError = true;
|
|
53659
|
+
if (dashboardComponent._loadTimeoutHandle) {
|
|
53660
|
+
clearTimeout(dashboardComponent._loadTimeoutHandle);
|
|
53661
|
+
dashboardComponent._loadTimeoutHandle = void 0;
|
|
53662
|
+
}
|
|
53663
|
+
dashboardComponent.iframeLoaded = true;
|
|
53664
|
+
dashboardComponent._displayError();
|
|
53665
|
+
console.error("Dashboard error: ", event.data.errorMsg ?? event.data.error?.msg);
|
|
53666
|
+
break;
|
|
53667
|
+
}
|
|
53668
|
+
case "data": {
|
|
53669
|
+
SharedLib.resolvePromise(
|
|
53670
|
+
dashboardComponent,
|
|
53671
|
+
event.data.requestId,
|
|
53672
|
+
event.data.data
|
|
53673
|
+
);
|
|
53674
|
+
break;
|
|
53675
|
+
}
|
|
53676
|
+
case "filters": {
|
|
53677
|
+
SharedLib.resolvePromise(
|
|
53678
|
+
dashboardComponent,
|
|
53679
|
+
event.data.requestId,
|
|
53680
|
+
event.data.filters
|
|
53681
|
+
);
|
|
53682
|
+
break;
|
|
53683
|
+
}
|
|
53684
|
+
case "getAccessibleDashboards": {
|
|
53685
|
+
SharedLib.resolvePromise(
|
|
53686
|
+
dashboardComponent,
|
|
53687
|
+
event.data.requestId,
|
|
53688
|
+
event.data.accessibleDashboards
|
|
53689
|
+
);
|
|
53690
|
+
break;
|
|
53691
|
+
}
|
|
53692
|
+
case "dashboardAction": {
|
|
53693
|
+
dashboardComponent.dispatchEvent(
|
|
53694
|
+
new CustomEvent("dashboardAction", { detail: { data: event.data } })
|
|
53695
|
+
);
|
|
53696
|
+
break;
|
|
53697
|
+
}
|
|
53698
|
+
case "export": {
|
|
53699
|
+
if (event.data.error) {
|
|
53700
|
+
SharedLib.rejectPromise(
|
|
53701
|
+
dashboardComponent,
|
|
53702
|
+
event.data.requestId,
|
|
53703
|
+
event.data
|
|
53704
|
+
);
|
|
53705
|
+
} else {
|
|
53706
|
+
dashboardComponent.dispatchEvent(
|
|
53707
|
+
new CustomEvent("exported", { detail: { data: event.data } })
|
|
53708
|
+
);
|
|
53709
|
+
SharedLib.resolvePromise(
|
|
53710
|
+
dashboardComponent,
|
|
53711
|
+
event.data.requestId,
|
|
53712
|
+
event.data
|
|
53713
|
+
);
|
|
53714
|
+
}
|
|
53715
|
+
break;
|
|
53716
|
+
}
|
|
53717
|
+
case "changedFilters": {
|
|
53718
|
+
dashboardComponent.dispatchEvent(
|
|
53719
|
+
new CustomEvent("changedFilters", { detail: { data: event.data } })
|
|
53720
|
+
);
|
|
53721
|
+
break;
|
|
53722
|
+
}
|
|
53723
|
+
case "customEvent": {
|
|
53724
|
+
dashboardComponent.dispatchEvent(
|
|
53725
|
+
new CustomEvent("customEvent", { detail: { data: event.data } })
|
|
53726
|
+
);
|
|
53727
|
+
break;
|
|
53728
|
+
}
|
|
53729
|
+
case "chartsRendered":
|
|
53730
|
+
case "itemsRendered": {
|
|
53731
|
+
event.data.type = "itemsRendered";
|
|
53732
|
+
dashboardComponent.dispatchEvent(
|
|
53733
|
+
new CustomEvent("itemsRendered", { detail: { data: event.data } })
|
|
53734
|
+
);
|
|
53735
|
+
break;
|
|
53736
|
+
}
|
|
53737
|
+
case "setEditMode": {
|
|
53738
|
+
if (event.data.error) {
|
|
53739
|
+
SharedLib.rejectPromise(
|
|
53740
|
+
dashboardComponent,
|
|
53741
|
+
event.data.requestId,
|
|
53742
|
+
event.data
|
|
53743
|
+
);
|
|
53744
|
+
} else {
|
|
53745
|
+
SharedLib.resolvePromise(
|
|
53746
|
+
dashboardComponent,
|
|
53747
|
+
event.data.requestId,
|
|
53748
|
+
event.data
|
|
53749
|
+
);
|
|
53750
|
+
dashboardComponent.params.editMode = event.data.editMode;
|
|
53751
|
+
dashboardComponent._containerStyle = SharedLib.containerStyles(dashboardComponent);
|
|
53752
|
+
if (dashboardComponent.dimensions) {
|
|
53753
|
+
SharedLib._setCalculatedDimensions(dashboardComponent);
|
|
53754
|
+
}
|
|
53755
|
+
}
|
|
53756
|
+
break;
|
|
53757
|
+
}
|
|
53758
|
+
case "setSelectedData":
|
|
53759
|
+
case "setFilters": {
|
|
53760
|
+
event.data.error ? SharedLib.rejectPromise(
|
|
53761
|
+
dashboardComponent,
|
|
53762
|
+
event.data.requestId,
|
|
53763
|
+
event.data
|
|
53764
|
+
) : SharedLib.resolvePromise(
|
|
53765
|
+
dashboardComponent,
|
|
53766
|
+
event.data.requestId,
|
|
53767
|
+
event.data
|
|
53768
|
+
);
|
|
53769
|
+
break;
|
|
53770
|
+
}
|
|
53771
|
+
case "setPreview": {
|
|
53772
|
+
event.data.error ? SharedLib.rejectPromise(
|
|
53773
|
+
dashboardComponent,
|
|
53774
|
+
event.data.requestId,
|
|
53775
|
+
event.data
|
|
53776
|
+
) : SharedLib.resolvePromise(
|
|
53777
|
+
dashboardComponent,
|
|
53778
|
+
event.data.requestId,
|
|
53779
|
+
event.data
|
|
53780
|
+
);
|
|
53781
|
+
break;
|
|
53782
|
+
}
|
|
53783
|
+
}
|
|
53784
|
+
};
|
|
53785
|
+
window.addEventListener("message", window.__luzmoMessageHandler, false);
|
|
53786
|
+
};
|
|
53787
|
+
|
|
53788
|
+
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-styles.ts
|
|
53789
|
+
var import_lit = require("lit");
|
|
53790
|
+
var dashboardStyles = import_lit.css`
|
|
53791
|
+
:host {
|
|
53792
|
+
display: block;
|
|
53793
|
+
height: 100%;
|
|
53794
|
+
}
|
|
53795
|
+
|
|
53796
|
+
@-webkit-keyframes spin {
|
|
53797
|
+
0% {
|
|
53798
|
+
-webkit-transform: rotate(0deg);
|
|
53799
|
+
transform: rotate(0deg);
|
|
53800
|
+
}
|
|
53801
|
+
100% {
|
|
53802
|
+
-webkit-transform: rotate(360deg);
|
|
53803
|
+
transform: rotate(360deg);
|
|
53804
|
+
}
|
|
53805
|
+
}
|
|
53806
|
+
|
|
53807
|
+
@keyframes spin {
|
|
53808
|
+
0% {
|
|
53809
|
+
-webkit-transform: rotate(0deg);
|
|
53810
|
+
transform: rotate(0deg);
|
|
53811
|
+
}
|
|
53812
|
+
100% {
|
|
53813
|
+
-webkit-transform: rotate(360deg);
|
|
53814
|
+
transform: rotate(360deg);
|
|
53815
|
+
}
|
|
53816
|
+
}
|
|
53817
|
+
:host {
|
|
53818
|
+
position: relative;
|
|
53819
|
+
width: 100%;
|
|
53820
|
+
}
|
|
53821
|
+
|
|
53822
|
+
.luzmo-embed-dashboard {
|
|
53823
|
+
background: transparent;
|
|
53824
|
+
padding: 0;
|
|
53825
|
+
border: 0;
|
|
53826
|
+
}
|
|
53827
|
+
|
|
53828
|
+
.luzmo-embed-dashboard-ede {
|
|
53829
|
+
}
|
|
53830
|
+
|
|
53831
|
+
.luzmo-embed-container-ede {
|
|
53832
|
+
width: 100%;
|
|
53833
|
+
height: 100%;
|
|
53834
|
+
}
|
|
53835
|
+
|
|
53836
|
+
.luzmo-container-loader {
|
|
53837
|
+
width: 100%;
|
|
53838
|
+
position: relative;
|
|
53839
|
+
}
|
|
53840
|
+
|
|
53841
|
+
.luzmo-lc {
|
|
53842
|
+
margin: 0 auto;
|
|
53843
|
+
}
|
|
53844
|
+
|
|
53845
|
+
.luzmo-loading-message {
|
|
53846
|
+
width: 100%;
|
|
53847
|
+
height: 20px;
|
|
53848
|
+
text-align: center;
|
|
53849
|
+
margin-bottom: 16px;
|
|
53850
|
+
font-family: Helvetica, Arial, sans-serif;
|
|
53851
|
+
font-size: 14px;
|
|
53852
|
+
}
|
|
53853
|
+
|
|
53854
|
+
.luzmo-loading-circle {
|
|
53855
|
+
box-sizing: border-box;
|
|
53856
|
+
margin: 16px auto;
|
|
53857
|
+
position: relative;
|
|
53858
|
+
text-indent: -9999em;
|
|
53859
|
+
animation: spin 0.6s infinite linear;
|
|
53860
|
+
}
|
|
53861
|
+
|
|
53862
|
+
.luzmo-loading-circle,
|
|
53863
|
+
.luzmo-loading-circle:after {
|
|
53864
|
+
border-radius: 50%;
|
|
53865
|
+
width: 32px;
|
|
53866
|
+
height: 32px;
|
|
53867
|
+
}
|
|
53868
|
+
|
|
53869
|
+
.itemEmbedding:after {
|
|
53870
|
+
width: 24px;
|
|
53871
|
+
height: 24px;
|
|
53872
|
+
}
|
|
53873
|
+
|
|
53874
|
+
.luzmo-error {
|
|
53875
|
+
background: transparent;
|
|
53876
|
+
padding: 48px 0;
|
|
53877
|
+
margin: 0 auto;
|
|
53878
|
+
width: 80%;
|
|
53879
|
+
border: 0;
|
|
53880
|
+
text-align: center;
|
|
53881
|
+
min-height: 192px;
|
|
53882
|
+
}
|
|
53883
|
+
|
|
53884
|
+
.dashboard-error {
|
|
53885
|
+
font-size: 30px;
|
|
53886
|
+
background: transparent;
|
|
53887
|
+
padding: 48px 0;
|
|
53888
|
+
margin: 0 auto;
|
|
53889
|
+
width: 80%;
|
|
53890
|
+
border: 0;
|
|
53891
|
+
text-align: center;
|
|
53892
|
+
min-height: 192px;
|
|
53893
|
+
}
|
|
53894
|
+
|
|
53895
|
+
.luzmo-loader {
|
|
53896
|
+
top: 0;
|
|
53897
|
+
left: 0;
|
|
53898
|
+
width: 100%;
|
|
53899
|
+
min-height: 400px;
|
|
53900
|
+
position: absolute;
|
|
53901
|
+
transition-duration: 0.3s;
|
|
53902
|
+
}
|
|
53903
|
+
`;
|
|
53904
|
+
|
|
53905
|
+
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
|
|
53906
|
+
var LuzmoDashboard = class extends import_lit2.LitElement {
|
|
53907
|
+
constructor() {
|
|
53908
|
+
super();
|
|
53909
|
+
this.language = "auto";
|
|
53910
|
+
this.screenMode = "auto";
|
|
53911
|
+
this.switchScreenModeOnResize = true;
|
|
53912
|
+
this.editMode = "view";
|
|
53913
|
+
this.experimental = false;
|
|
53914
|
+
this.iframeStyle = {};
|
|
53915
|
+
this._containerStyle = {};
|
|
53916
|
+
this._loaderStyle = {};
|
|
53917
|
+
this._lcStyle = {};
|
|
53918
|
+
this._loadingCircleStyle = {};
|
|
53919
|
+
this._containerLoaderStyle = {};
|
|
53920
|
+
this._loaderMsg = "";
|
|
53921
|
+
this._itemEmbedding = false;
|
|
53922
|
+
this.browserError = false;
|
|
53923
|
+
this.browserErrorMsg = "";
|
|
53924
|
+
this.dashboardError = false;
|
|
53925
|
+
this.browserNotSupported = [];
|
|
53926
|
+
this.libVersion = version + "-wc-luzmo";
|
|
53927
|
+
this.isLibraryLoaded = false;
|
|
53928
|
+
this.currentAuthKey = null;
|
|
53929
|
+
this.currentAuthToken = null;
|
|
53930
|
+
this.isInitCalled = false;
|
|
53931
|
+
this.attributesMap = {
|
|
53932
|
+
dashboardId: "dashboard-id",
|
|
53933
|
+
dashboardSlug: "dashboard-slug",
|
|
53934
|
+
itemId: "item-id",
|
|
53935
|
+
language: "language",
|
|
53936
|
+
qeVersion: "qe-version",
|
|
53937
|
+
screenMode: "screen-mode",
|
|
53938
|
+
switchScreenModeOnResize: "switch-screen-mode-on-resize",
|
|
53939
|
+
authKey: "auth-key",
|
|
53940
|
+
authToken: "auth-token",
|
|
53941
|
+
editMode: "edit-mode",
|
|
53942
|
+
mainColor: "main-color",
|
|
53943
|
+
accentColor: "accent-color",
|
|
53944
|
+
loaderBackground: "loader-background",
|
|
53945
|
+
loaderFontColor: "loader-font-color",
|
|
53946
|
+
loaderSpinnerColor: "loader-spinner-color",
|
|
53947
|
+
loaderSpinnerBackground: "loader-spinner-background",
|
|
53948
|
+
appServer: "app-server",
|
|
53949
|
+
apiHost: "api-host",
|
|
53950
|
+
itemDimensions: "item-dimensions",
|
|
53951
|
+
timezoneId: "timezone-id"
|
|
53952
|
+
};
|
|
53953
|
+
this.loaderSize = 32;
|
|
53954
|
+
this.borderWidth = 3;
|
|
53955
|
+
this.minHeight = 400;
|
|
53956
|
+
this._containerId = SharedLib2.uuidv4();
|
|
53957
|
+
this._iframeId = `luzmo-dashboard-${this._containerId}`;
|
|
53958
|
+
this.iframeLoaded = false;
|
|
53959
|
+
this.promises = {};
|
|
53960
|
+
this.params = this._setOptions();
|
|
53961
|
+
this._onResize = () => {
|
|
53962
|
+
if (this.shadowRoot?.querySelector(".dashboard-container")) {
|
|
53963
|
+
this.containerWidth = this.luzmoEmbedContainer.offsetWidth;
|
|
53964
|
+
if (this.params.switchScreenModeOnResize && this.params.screenMode === "auto") {
|
|
53965
|
+
for (const d of SharedLib2.EXTENTS) {
|
|
53966
|
+
if (d.width[0] <= window.innerWidth && window.innerWidth <= d.width[1]) {
|
|
53967
|
+
this.currentScreenMode = d.mode;
|
|
53968
|
+
}
|
|
53969
|
+
}
|
|
54379
53970
|
}
|
|
54380
|
-
|
|
54381
|
-
|
|
54382
|
-
|
|
54383
|
-
|
|
54384
|
-
|
|
54385
|
-
|
|
54386
|
-
|
|
54387
|
-
en: "Title"
|
|
53971
|
+
if (this.iframeLoaded) {
|
|
53972
|
+
this._calculateDimAfterDashboardLoaded();
|
|
53973
|
+
} else {
|
|
53974
|
+
if (this.dimensions) {
|
|
53975
|
+
this.containerWidth = this.luzmoEmbedContainer.offsetWidth;
|
|
53976
|
+
SharedLib2._setCalculatedDimensions(this);
|
|
53977
|
+
}
|
|
54388
53978
|
}
|
|
54389
|
-
|
|
54390
|
-
|
|
53979
|
+
}
|
|
53980
|
+
};
|
|
53981
|
+
this._resizeObserver = new ResizeObserver((entries) => {
|
|
53982
|
+
window.requestAnimationFrame(() => {
|
|
53983
|
+
if (!Array.isArray(entries) || entries.length === 0) {
|
|
53984
|
+
return;
|
|
53985
|
+
}
|
|
53986
|
+
this._onResize();
|
|
53987
|
+
});
|
|
53988
|
+
});
|
|
53989
|
+
}
|
|
53990
|
+
// Set resize event listener
|
|
53991
|
+
connectedCallback() {
|
|
53992
|
+
super.connectedCallback();
|
|
53993
|
+
}
|
|
53994
|
+
// Set resize event listener
|
|
53995
|
+
disconnectedCallback() {
|
|
53996
|
+
super.disconnectedCallback();
|
|
53997
|
+
this._resizeObserver.disconnect();
|
|
53998
|
+
for (const promiseKey of Object.keys(this.promises)) {
|
|
53999
|
+
this.promises[promiseKey].reject(
|
|
54000
|
+
new Error("Dashboard component was removed")
|
|
54001
|
+
);
|
|
54002
|
+
}
|
|
54003
|
+
}
|
|
54004
|
+
firstUpdated() {
|
|
54005
|
+
this._loaderMsg = SharedLib2.getLoader(this)?.loadingMsg;
|
|
54006
|
+
this._loaderStyles();
|
|
54007
|
+
luzmo_service_default._components.push(this);
|
|
54008
|
+
if (this.luzmoEmbedContainer) {
|
|
54009
|
+
this._resizeObserver.observe(this.luzmoEmbedContainer);
|
|
54010
|
+
}
|
|
54011
|
+
}
|
|
54012
|
+
initComponent() {
|
|
54013
|
+
this.params = this._setOptions();
|
|
54014
|
+
if (this.getIsViewMode()) {
|
|
54015
|
+
SharedLib2.loadLibrary(this.params.appServer).then(async () => {
|
|
54016
|
+
this.isLibraryLoaded = true;
|
|
54017
|
+
await this.updateComplete;
|
|
54018
|
+
const oldReference = this.renderRoot.querySelector("dashboard-component");
|
|
54019
|
+
this.dashboardReference = oldReference.cloneNode(true);
|
|
54020
|
+
oldReference.replaceWith(this.dashboardReference);
|
|
54021
|
+
this.dashboardReference.addEventListener("load", (payload) => {
|
|
54022
|
+
this.containerWidth = this.dashboardReference.offsetWidth;
|
|
54023
|
+
this.dimensions = payload.detail.dimensions;
|
|
54024
|
+
SharedLib2._setCalculatedDimensions(this);
|
|
54025
|
+
window.dispatchEvent(new Event("resize"));
|
|
54026
|
+
this.dispatchEvent(new CustomEvent("load", payload));
|
|
54027
|
+
});
|
|
54028
|
+
this.dashboardReference.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
|
|
54029
|
+
this.dashboardReference.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
|
|
54030
|
+
this.dashboardReference.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
|
|
54031
|
+
this.dashboardReference.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
|
|
54032
|
+
this.dashboardReference.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
|
|
54033
|
+
this.setAllAttributes();
|
|
54034
|
+
});
|
|
54035
|
+
} else {
|
|
54036
|
+
this.containerWidth = this.container?.clientWidth;
|
|
54037
|
+
SharedLib2._extendAndValidate(this);
|
|
54038
|
+
SharedLib2._browserCheck(this);
|
|
54039
|
+
this._setupLoader();
|
|
54040
|
+
if (!this.params.error) {
|
|
54041
|
+
this._loaderStyles();
|
|
54042
|
+
_setEventHandler();
|
|
54043
|
+
this._iframeUrl = SharedLib2.createIframeUrl(this);
|
|
54044
|
+
this.iframe?.setAttribute("src", this._iframeUrl);
|
|
54045
|
+
this.iframeStyle = SharedLib2.calculateIframeStyles(this);
|
|
54046
|
+
}
|
|
54047
|
+
}
|
|
54048
|
+
}
|
|
54049
|
+
setAllAttributes() {
|
|
54050
|
+
if (this.dashboardReference) {
|
|
54051
|
+
for (const key in this.attributesMap) {
|
|
54052
|
+
if (!["authKey", "authToken", "apiHost", "itemDimensions"].includes(key) && this.params[key]) {
|
|
54053
|
+
this.dashboardReference.setAttribute(this.attributesMap[key], this.params[key]);
|
|
54054
|
+
}
|
|
54055
|
+
}
|
|
54056
|
+
if (this.params.itemDimensions) {
|
|
54057
|
+
this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
|
|
54058
|
+
}
|
|
54059
|
+
if (this.params.apiHost) {
|
|
54060
|
+
this.dashboardReference.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
|
|
54061
|
+
}
|
|
54062
|
+
if (this.params.key) {
|
|
54063
|
+
this.dashboardReference.setAttribute("auth-key", this.params.key);
|
|
54064
|
+
}
|
|
54065
|
+
if (this.params.token) {
|
|
54066
|
+
this.dashboardReference.setAttribute("auth-token", this.params.token);
|
|
54067
|
+
}
|
|
54068
|
+
}
|
|
54069
|
+
}
|
|
54070
|
+
// Reload dashboard when triggerproperty changes
|
|
54071
|
+
updated(changedProperties) {
|
|
54072
|
+
const triggerProperties = /* @__PURE__ */ new Set([
|
|
54073
|
+
"dashboardId",
|
|
54074
|
+
"dashboardSlug",
|
|
54075
|
+
"itemId",
|
|
54076
|
+
"language",
|
|
54077
|
+
"qeVersion",
|
|
54078
|
+
"editMode",
|
|
54079
|
+
"screenMode",
|
|
54080
|
+
"switchScreenModeOnResize",
|
|
54081
|
+
"authToken",
|
|
54082
|
+
"authKey",
|
|
54083
|
+
"appServer",
|
|
54084
|
+
"timezoneId",
|
|
54085
|
+
"itemDimensions"
|
|
54086
|
+
]);
|
|
54087
|
+
const conditionsToCheck = ["dashboardId", "dashboardSlug", "itemId"];
|
|
54088
|
+
let callInitComponent = false;
|
|
54089
|
+
for (const condition of conditionsToCheck) {
|
|
54090
|
+
callInitComponent = callInitComponent || changedProperties.get(condition) === void 0 && this[condition] !== void 0;
|
|
54091
|
+
}
|
|
54092
|
+
if (callInitComponent && !this.isInitCalled) {
|
|
54093
|
+
this.initComponent();
|
|
54094
|
+
this.isInitCalled = true;
|
|
54095
|
+
return;
|
|
54096
|
+
}
|
|
54097
|
+
if (this.getIsViewMode()) {
|
|
54098
|
+
if (this.dashboardReference) {
|
|
54099
|
+
for (const [propertyName] of changedProperties.entries()) {
|
|
54100
|
+
if (propertyName === "appSever") {
|
|
54101
|
+
SharedLib2.loadLibrary(changedProperties[propertyName]).then(async () => {
|
|
54102
|
+
this.isLibraryLoaded = true;
|
|
54103
|
+
await this.updateComplete;
|
|
54104
|
+
this.dashboardReference = this.renderRoot.querySelector("dashboard-component");
|
|
54105
|
+
this.setAllAttributes();
|
|
54106
|
+
});
|
|
54107
|
+
} else if (this.attributesMap[propertyName]) {
|
|
54108
|
+
const mappedAttributeName = this.attributesMap[propertyName] ?? propertyName;
|
|
54109
|
+
const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() || this[propertyName];
|
|
54110
|
+
this.dashboardReference.setAttribute(mappedAttributeName, attributeValue);
|
|
54111
|
+
}
|
|
54112
|
+
}
|
|
54113
|
+
}
|
|
54114
|
+
} else {
|
|
54115
|
+
for (const [propertyName] of changedProperties.entries()) {
|
|
54116
|
+
if (triggerProperties.has(propertyName) && propertyName !== "editMode") {
|
|
54117
|
+
this.iframeLoaded = false;
|
|
54118
|
+
if (this._loadTimeoutHandle) {
|
|
54119
|
+
clearTimeout(this._loadTimeoutHandle);
|
|
54120
|
+
}
|
|
54121
|
+
this._loadTimeoutHandle = setTimeout(() => {
|
|
54122
|
+
console.warn(
|
|
54123
|
+
"Failed to load dashboard, appServer is likely down or unreachable."
|
|
54124
|
+
);
|
|
54125
|
+
}, 15 * 1e3);
|
|
54126
|
+
this.params = this._setOptions();
|
|
54127
|
+
SharedLib2._extendAndValidate(this);
|
|
54128
|
+
this._setupLoader();
|
|
54129
|
+
this._loaderStyles();
|
|
54130
|
+
this._iframeUrl = SharedLib2.createIframeUrl(this);
|
|
54131
|
+
if (this.iframe) {
|
|
54132
|
+
this._updateIframeUrl();
|
|
54133
|
+
}
|
|
54134
|
+
this.iframeStyle = SharedLib2.calculateIframeStyles(this);
|
|
54135
|
+
} else if (triggerProperties.has(propertyName) && propertyName === "editMode") {
|
|
54136
|
+
if (this.iframeLoaded) {
|
|
54137
|
+
this.setEditMode(this.editMode);
|
|
54138
|
+
}
|
|
54139
|
+
this.params = this._setOptions();
|
|
54140
|
+
}
|
|
54141
|
+
}
|
|
54142
|
+
}
|
|
54143
|
+
}
|
|
54144
|
+
// Set params
|
|
54145
|
+
_setOptions() {
|
|
54146
|
+
const defaultParameters = {
|
|
54147
|
+
dashboardId: this.dashboardId,
|
|
54148
|
+
dashboardSlug: this.dashboardSlug
|
|
54149
|
+
};
|
|
54150
|
+
if (this.itemId) {
|
|
54151
|
+
defaultParameters.itemId = this.itemId;
|
|
54152
|
+
this._itemEmbedding = true;
|
|
54153
|
+
} else {
|
|
54154
|
+
this._itemEmbedding = false;
|
|
54155
|
+
}
|
|
54156
|
+
if (this.language) {
|
|
54157
|
+
defaultParameters.language = this.language;
|
|
54158
|
+
}
|
|
54159
|
+
if (this.qeVersion) {
|
|
54160
|
+
defaultParameters.qeVersion = this.qeVersion;
|
|
54161
|
+
}
|
|
54162
|
+
if (this.screenMode) {
|
|
54163
|
+
defaultParameters.screenMode = this.screenMode;
|
|
54164
|
+
}
|
|
54165
|
+
defaultParameters.switchScreenModeOnResize = this.switchScreenModeOnResize;
|
|
54166
|
+
if (this.authToken) {
|
|
54167
|
+
defaultParameters.token = this.authToken;
|
|
54168
|
+
}
|
|
54169
|
+
if (this.authKey) {
|
|
54170
|
+
defaultParameters.key = this.authKey;
|
|
54171
|
+
}
|
|
54172
|
+
if (this.editMode) {
|
|
54173
|
+
defaultParameters.editMode = this.editMode;
|
|
54174
|
+
}
|
|
54175
|
+
if (this.mainColor) {
|
|
54176
|
+
defaultParameters.mainColor = this.mainColor;
|
|
54177
|
+
}
|
|
54178
|
+
if (this.accentColor) {
|
|
54179
|
+
defaultParameters.accentColor = this.accentColor;
|
|
54180
|
+
}
|
|
54181
|
+
if (this.loaderBackground) {
|
|
54182
|
+
defaultParameters.loaderBackground = this.loaderBackground;
|
|
54183
|
+
}
|
|
54184
|
+
if (this.loaderFontColor) {
|
|
54185
|
+
defaultParameters.loaderFontColor = this.loaderFontColor;
|
|
54186
|
+
}
|
|
54187
|
+
if (this.loaderSpinnerColor) {
|
|
54188
|
+
defaultParameters.loaderSpinnerColor = this.loaderSpinnerColor;
|
|
54391
54189
|
}
|
|
54392
|
-
|
|
54393
|
-
|
|
54190
|
+
if (this.loaderSpinnerBackground) {
|
|
54191
|
+
defaultParameters.loaderSpinnerBackground = this.loaderSpinnerBackground;
|
|
54192
|
+
}
|
|
54193
|
+
if (this.timezoneId) {
|
|
54194
|
+
defaultParameters.timezoneId = this.timezoneId;
|
|
54195
|
+
}
|
|
54196
|
+
if (this.itemDimensions) {
|
|
54197
|
+
defaultParameters.itemDimensions = this.itemDimensions;
|
|
54198
|
+
}
|
|
54199
|
+
if (this.appServer) {
|
|
54200
|
+
this.appServer = this.getIsViewMode() ? SharedLib2.removeTrailingSlash(this.appServer) : SharedLib2.addTrailingSlash(this.appServer);
|
|
54201
|
+
defaultParameters.appServer = this.appServer;
|
|
54202
|
+
} else {
|
|
54203
|
+
this.appServer = SharedLib2.addTrailingSlash(
|
|
54204
|
+
SharedLib2.DEFAULT_PARAMETERS.appServer
|
|
54205
|
+
);
|
|
54206
|
+
defaultParameters.appServer = this.appServer;
|
|
54207
|
+
}
|
|
54208
|
+
if (this.apiHost) {
|
|
54209
|
+
this.apiHost = this.getIsViewMode() ? SharedLib2.removeTrailingSlash(this.apiHost) : SharedLib2.addTrailingSlash(this.apiHost);
|
|
54210
|
+
defaultParameters.apiHost = this.apiHost;
|
|
54211
|
+
} else {
|
|
54212
|
+
this.apiHost = this.appServer.includes("luzmo.com") ? this.appServer.replace("app", "api") : this.appServer;
|
|
54213
|
+
defaultParameters.apiHost = this.apiHost;
|
|
54214
|
+
}
|
|
54215
|
+
this.currentAuthKey = this.authKey;
|
|
54216
|
+
this.currentAuthToken = this.authToken;
|
|
54217
|
+
return defaultParameters;
|
|
54218
|
+
}
|
|
54219
|
+
_updateIframeUrl() {
|
|
54220
|
+
SharedLib2.updateIframeUrl(this.iframe, this._iframeUrl);
|
|
54221
|
+
}
|
|
54222
|
+
// Setup loader / browser error
|
|
54223
|
+
_setupLoader() {
|
|
54224
|
+
const data = SharedLib2.getLoader(this);
|
|
54225
|
+
this._loaderMsg = data.loadingMsg;
|
|
54226
|
+
if (data.errorMsg) {
|
|
54227
|
+
this.browserError = true;
|
|
54228
|
+
this.browserErrorMsg = data.errorMsg;
|
|
54229
|
+
this._displayError();
|
|
54230
|
+
}
|
|
54231
|
+
}
|
|
54232
|
+
_displayError() {
|
|
54233
|
+
if (this.dashboardError) {
|
|
54234
|
+
this._loaderStyles();
|
|
54235
|
+
this.iframeStyle.opacity = 1;
|
|
54236
|
+
}
|
|
54237
|
+
if (this.browserError) {
|
|
54238
|
+
this._containerStyle.display = "none";
|
|
54239
|
+
}
|
|
54240
|
+
}
|
|
54241
|
+
_calculateDimAfterDashboardLoaded() {
|
|
54242
|
+
this.dashboardError = false;
|
|
54243
|
+
this._loaderStyles();
|
|
54244
|
+
SharedLib2._setCalculatedDimensions(this);
|
|
54245
|
+
}
|
|
54246
|
+
// Set loader styles
|
|
54247
|
+
_loaderStyles() {
|
|
54248
|
+
this._containerStyle = SharedLib2.containerStyles(this);
|
|
54249
|
+
this._loaderStyle = SharedLib2.loaderStyles(this);
|
|
54250
|
+
this._loadingCircleStyle = SharedLib2.plStyles(this);
|
|
54251
|
+
this._containerLoaderStyle = SharedLib2.containerLoaderStyles(this);
|
|
54252
|
+
this._lcStyle = SharedLib2.lcStyles(this);
|
|
54253
|
+
}
|
|
54254
|
+
static get styles() {
|
|
54255
|
+
return [dashboardStyles];
|
|
54256
|
+
}
|
|
54257
|
+
render() {
|
|
54258
|
+
let toBeRenderedHTML;
|
|
54259
|
+
const loader = import_lit2.html`
|
|
54260
|
+
<div
|
|
54261
|
+
class="luzmo-container-loader"
|
|
54262
|
+
id="luzmo-container-loader-${this._containerId}"
|
|
54263
|
+
style=${(0, import_style_map.styleMap)(
|
|
54264
|
+
this._containerLoaderStyle
|
|
54265
|
+
)}
|
|
54266
|
+
>
|
|
54267
|
+
<div
|
|
54268
|
+
class="luzmo-loader"
|
|
54269
|
+
id="luzmo-loader-${this._containerId}"
|
|
54270
|
+
style=${(0, import_style_map.styleMap)(this._loaderStyle)}
|
|
54271
|
+
>
|
|
54272
|
+
<div
|
|
54273
|
+
class="luzmo-lc"
|
|
54274
|
+
style=${(0, import_style_map.styleMap)(this._lcStyle)}
|
|
54275
|
+
>
|
|
54276
|
+
<div
|
|
54277
|
+
class="luzmo-loading-circle"
|
|
54278
|
+
style=${(0, import_style_map.styleMap)(
|
|
54279
|
+
this._loadingCircleStyle
|
|
54280
|
+
)}
|
|
54281
|
+
></div>
|
|
54282
|
+
${this._itemEmbedding ? "" : import_lit2.html`
|
|
54283
|
+
<div
|
|
54284
|
+
class="luzmo-loading-message"
|
|
54285
|
+
style=${(0, import_style_map.styleMap)({ color: this.loaderFontColor })}
|
|
54286
|
+
>
|
|
54287
|
+
${this._loaderMsg}
|
|
54288
|
+
</div>
|
|
54289
|
+
`}
|
|
54290
|
+
</div>
|
|
54291
|
+
</div>
|
|
54292
|
+
</div>
|
|
54293
|
+
`;
|
|
54294
|
+
if (this.getIsViewMode()) {
|
|
54295
|
+
toBeRenderedHTML = this.isLibraryLoaded ? import_lit2.html`
|
|
54296
|
+
${this.dashboardId || this.dashboardSlug ? import_lit2.html`
|
|
54297
|
+
<dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}"
|
|
54298
|
+
api-host="${this.params.apiHost}"></dashboard-component>` : import_lit2.html`
|
|
54299
|
+
<div id="luzmo-error-${this._containerId}">
|
|
54300
|
+
<h3 class="luzmo-error">${this.browserErrorMsg}</h3>
|
|
54301
|
+
</div>
|
|
54302
|
+
`}
|
|
54303
|
+
` : import_lit2.html`${loader}`;
|
|
54304
|
+
} else {
|
|
54305
|
+
toBeRenderedHTML = import_lit2.html`
|
|
54306
|
+
${this.dashboardId || this.dashboardSlug ? import_lit2.html`
|
|
54307
|
+
${loader}
|
|
54308
|
+
<iframe
|
|
54309
|
+
class="luzmo-embed-dashboard ${!this.getIsViewMode() ? `luzmo-embed-dashboard-ede` : ""}"
|
|
54310
|
+
id="${this._iframeId}"
|
|
54311
|
+
name="${this._iframeId}"
|
|
54312
|
+
style=${(0, import_style_map.styleMap)(this.iframeStyle)}
|
|
54313
|
+
src="${this._iframeUrl}"
|
|
54314
|
+
frameborder="0"
|
|
54315
|
+
></iframe>
|
|
54316
|
+
` : import_lit2.html`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
|
|
54317
|
+
${this.browserError ? import_lit2.html`
|
|
54318
|
+
<div id="luzmo-error-${this._containerId}">
|
|
54319
|
+
<h3 class="luzmo-error">${this.browserErrorMsg}</h3>
|
|
54320
|
+
</div>
|
|
54321
|
+
` : ""}
|
|
54322
|
+
`;
|
|
54323
|
+
}
|
|
54324
|
+
return import_lit2.html`
|
|
54325
|
+
<div class="${import_shared_embed.luzmoEmbedContainerClass} ${!this.getIsViewMode() ? `${import_shared_embed.luzmoEmbedContainerClass}-ede` : ""}">
|
|
54326
|
+
<div
|
|
54327
|
+
class="dashboard-container"
|
|
54328
|
+
style=${(0, import_style_map.styleMap)(Object.assign({}, this._containerStyle, {
|
|
54329
|
+
width: this.iframeStyle.width ?? "100%",
|
|
54330
|
+
height: this.iframeStyle.height ?? "100%"
|
|
54331
|
+
}))}
|
|
54332
|
+
>
|
|
54333
|
+
${toBeRenderedHTML}
|
|
54334
|
+
</div>
|
|
54335
|
+
</div>
|
|
54336
|
+
|
|
54337
|
+
`;
|
|
54338
|
+
}
|
|
54339
|
+
getDashboards() {
|
|
54340
|
+
return new Promise(
|
|
54341
|
+
(resolve) => resolve(luzmo_service_default._components)
|
|
54342
|
+
);
|
|
54343
|
+
}
|
|
54344
|
+
// Public methods
|
|
54345
|
+
getData(itemId) {
|
|
54346
|
+
if (this.getIsViewMode() && this.dashboardReference) {
|
|
54347
|
+
return this.dashboardReference.getData(itemId);
|
|
54348
|
+
}
|
|
54349
|
+
if (!this.getIsViewMode()) {
|
|
54350
|
+
return SharedLib2.getData(this, this.iframe, itemId);
|
|
54351
|
+
}
|
|
54352
|
+
return Promise.reject();
|
|
54353
|
+
}
|
|
54354
|
+
getFilters() {
|
|
54355
|
+
if (this.getIsViewMode() && this.dashboardReference) {
|
|
54356
|
+
return this.dashboardReference.getFilters();
|
|
54357
|
+
}
|
|
54358
|
+
if (!this.getIsViewMode()) {
|
|
54359
|
+
return SharedLib2.getFilters(this, this.iframe);
|
|
54360
|
+
}
|
|
54361
|
+
return Promise.reject();
|
|
54362
|
+
}
|
|
54363
|
+
setSelectedData(itemId, filters) {
|
|
54364
|
+
if (this.getIsViewMode() && this.dashboardReference) {
|
|
54365
|
+
return this.dashboardReference.setSelectedData(itemId, filters);
|
|
54366
|
+
}
|
|
54367
|
+
if (!this.getIsViewMode()) {
|
|
54368
|
+
return SharedLib2.setSelectedData(this, this.iframe, itemId, filters);
|
|
54369
|
+
}
|
|
54370
|
+
return Promise.reject();
|
|
54371
|
+
}
|
|
54372
|
+
setAuthorization(key, token) {
|
|
54373
|
+
this.currentAuthKey = key;
|
|
54374
|
+
this.currentAuthToken = token;
|
|
54375
|
+
if (this.getIsViewMode() && this.dashboardReference) {
|
|
54376
|
+
return this.dashboardReference.setAuthorization(key, token);
|
|
54377
|
+
}
|
|
54378
|
+
if (!this.getIsViewMode()) {
|
|
54379
|
+
return SharedLib2.setAuthorization(this, this.iframe, key, token);
|
|
54380
|
+
}
|
|
54381
|
+
return Promise.reject();
|
|
54382
|
+
}
|
|
54383
|
+
refreshData(itemId) {
|
|
54384
|
+
if (this.getIsViewMode() && this.dashboardReference) {
|
|
54385
|
+
return this.dashboardReference.refreshData(itemId);
|
|
54386
|
+
}
|
|
54387
|
+
if (!this.getIsViewMode()) {
|
|
54388
|
+
return itemId ? SharedLib2.refreshData(this, this.iframe, itemId) : SharedLib2.refreshData(this, this.iframe);
|
|
54389
|
+
}
|
|
54390
|
+
return Promise.reject();
|
|
54391
|
+
}
|
|
54392
|
+
reloadDashboard() {
|
|
54393
|
+
if (this.getIsViewMode() && this.dashboardReference) {
|
|
54394
|
+
return this.dashboardReference.reloadDashboard();
|
|
54395
|
+
}
|
|
54396
|
+
if (!this.getIsViewMode()) {
|
|
54397
|
+
return SharedLib2.reloadDashboard(this, this.iframe);
|
|
54398
|
+
}
|
|
54399
|
+
return Promise.reject();
|
|
54400
|
+
}
|
|
54401
|
+
exportDashboard(format) {
|
|
54402
|
+
if (this.getIsViewMode() && this.dashboardReference) {
|
|
54403
|
+
return this.dashboardReference.exportDashboard(format);
|
|
54404
|
+
}
|
|
54405
|
+
if (!this.getIsViewMode()) {
|
|
54406
|
+
return format ? SharedLib2.exportDashboard(this, this.iframe, format) : SharedLib2.exportDashboard(this, this.iframe);
|
|
54407
|
+
}
|
|
54408
|
+
return Promise.reject();
|
|
54409
|
+
}
|
|
54410
|
+
getAccessibleDashboards() {
|
|
54411
|
+
return SharedLib2.getAccessibleDashboards(this);
|
|
54412
|
+
}
|
|
54413
|
+
addFilters(itemId, filters) {
|
|
54414
|
+
return this.dashboardReference.addFilters(itemId, filters);
|
|
54415
|
+
}
|
|
54416
|
+
setEditMode(editMode) {
|
|
54417
|
+
if (this.dashboardReference && editMode === "view") {
|
|
54418
|
+
this.editMode = "view";
|
|
54419
|
+
this.params.editMode = "view";
|
|
54420
|
+
this.initComponent();
|
|
54421
|
+
return Promise.resolve({
|
|
54422
|
+
type: "setEditMode",
|
|
54423
|
+
editMode
|
|
54424
|
+
});
|
|
54425
|
+
}
|
|
54426
|
+
if (this.dashboardReference && ["editFull", "editLimited"].includes(editMode)) {
|
|
54427
|
+
this.editMode = editMode;
|
|
54428
|
+
this.params.editMode = editMode;
|
|
54429
|
+
this.initComponent();
|
|
54430
|
+
return Promise.resolve({
|
|
54431
|
+
type: "setEditMode",
|
|
54432
|
+
editMode
|
|
54433
|
+
});
|
|
54434
|
+
}
|
|
54435
|
+
if (this.getIsViewMode() && this.dashboardReference) {
|
|
54436
|
+
return this.dashboardReference.setEditMode(editMode);
|
|
54437
|
+
}
|
|
54438
|
+
if (!this.getIsViewMode()) {
|
|
54439
|
+
return SharedLib2.setEditMode(this, this.iframe, editMode);
|
|
54440
|
+
}
|
|
54441
|
+
return Promise.reject();
|
|
54442
|
+
}
|
|
54443
|
+
setPreview(preview) {
|
|
54444
|
+
if (this.getIsViewMode() && this.dashboardReference) {
|
|
54445
|
+
return this.dashboardReference.setPreview(preview);
|
|
54446
|
+
}
|
|
54447
|
+
return SharedLib2.setPreview(this, this.iframe, preview);
|
|
54448
|
+
}
|
|
54449
|
+
getIsViewMode() {
|
|
54450
|
+
return this.experimental && this.params.editMode === "view" || this.params.editMode === void 0;
|
|
54451
|
+
}
|
|
54394
54452
|
};
|
|
54453
|
+
__decorateClass([
|
|
54454
|
+
(0, import_decorators.query)(".dashboard-container")
|
|
54455
|
+
], LuzmoDashboard.prototype, "container", 2);
|
|
54456
|
+
__decorateClass([
|
|
54457
|
+
(0, import_decorators.query)(`.${import_shared_embed.luzmoEmbedContainerClass}`)
|
|
54458
|
+
], LuzmoDashboard.prototype, "luzmoEmbedContainer", 2);
|
|
54459
|
+
__decorateClass([
|
|
54460
|
+
(0, import_decorators.query)("iframe")
|
|
54461
|
+
], LuzmoDashboard.prototype, "iframe", 2);
|
|
54462
|
+
__decorateClass([
|
|
54463
|
+
(0, import_decorators.property)()
|
|
54464
|
+
], LuzmoDashboard.prototype, "dashboardId", 2);
|
|
54465
|
+
__decorateClass([
|
|
54466
|
+
(0, import_decorators.property)()
|
|
54467
|
+
], LuzmoDashboard.prototype, "dashboardSlug", 2);
|
|
54468
|
+
__decorateClass([
|
|
54469
|
+
(0, import_decorators.property)()
|
|
54470
|
+
], LuzmoDashboard.prototype, "itemId", 2);
|
|
54471
|
+
__decorateClass([
|
|
54472
|
+
(0, import_decorators.property)()
|
|
54473
|
+
], LuzmoDashboard.prototype, "language", 2);
|
|
54474
|
+
__decorateClass([
|
|
54475
|
+
(0, import_decorators.property)()
|
|
54476
|
+
], LuzmoDashboard.prototype, "qeVersion", 2);
|
|
54477
|
+
__decorateClass([
|
|
54478
|
+
(0, import_decorators.property)()
|
|
54479
|
+
], LuzmoDashboard.prototype, "screenMode", 2);
|
|
54480
|
+
__decorateClass([
|
|
54481
|
+
(0, import_decorators.property)({
|
|
54482
|
+
converter: {
|
|
54483
|
+
fromAttribute: (value) => value === "true",
|
|
54484
|
+
toAttribute: String
|
|
54485
|
+
}
|
|
54486
|
+
})
|
|
54487
|
+
], LuzmoDashboard.prototype, "switchScreenModeOnResize", 2);
|
|
54488
|
+
__decorateClass([
|
|
54489
|
+
(0, import_decorators.property)()
|
|
54490
|
+
], LuzmoDashboard.prototype, "editMode", 2);
|
|
54491
|
+
__decorateClass([
|
|
54492
|
+
(0, import_decorators.property)()
|
|
54493
|
+
], LuzmoDashboard.prototype, "mainColor", 2);
|
|
54494
|
+
__decorateClass([
|
|
54495
|
+
(0, import_decorators.property)()
|
|
54496
|
+
], LuzmoDashboard.prototype, "accentColor", 2);
|
|
54497
|
+
__decorateClass([
|
|
54498
|
+
(0, import_decorators.property)()
|
|
54499
|
+
], LuzmoDashboard.prototype, "authToken", 2);
|
|
54500
|
+
__decorateClass([
|
|
54501
|
+
(0, import_decorators.property)()
|
|
54502
|
+
], LuzmoDashboard.prototype, "authKey", 2);
|
|
54503
|
+
__decorateClass([
|
|
54504
|
+
(0, import_decorators.property)()
|
|
54505
|
+
], LuzmoDashboard.prototype, "loaderBackground", 2);
|
|
54506
|
+
__decorateClass([
|
|
54507
|
+
(0, import_decorators.property)()
|
|
54508
|
+
], LuzmoDashboard.prototype, "loaderFontColor", 2);
|
|
54509
|
+
__decorateClass([
|
|
54510
|
+
(0, import_decorators.property)()
|
|
54511
|
+
], LuzmoDashboard.prototype, "loaderSpinnerColor", 2);
|
|
54512
|
+
__decorateClass([
|
|
54513
|
+
(0, import_decorators.property)()
|
|
54514
|
+
], LuzmoDashboard.prototype, "loaderSpinnerBackground", 2);
|
|
54515
|
+
__decorateClass([
|
|
54516
|
+
(0, import_decorators.property)()
|
|
54517
|
+
], LuzmoDashboard.prototype, "appServer", 2);
|
|
54518
|
+
__decorateClass([
|
|
54519
|
+
(0, import_decorators.property)()
|
|
54520
|
+
], LuzmoDashboard.prototype, "timezoneId", 2);
|
|
54521
|
+
__decorateClass([
|
|
54522
|
+
(0, import_decorators.property)()
|
|
54523
|
+
], LuzmoDashboard.prototype, "apiHost", 2);
|
|
54524
|
+
__decorateClass([
|
|
54525
|
+
(0, import_decorators.property)({ type: Object })
|
|
54526
|
+
], LuzmoDashboard.prototype, "itemDimensions", 2);
|
|
54527
|
+
__decorateClass([
|
|
54528
|
+
(0, import_decorators.property)({
|
|
54529
|
+
converter: {
|
|
54530
|
+
fromAttribute: (value) => value === "true",
|
|
54531
|
+
toAttribute: String
|
|
54532
|
+
}
|
|
54533
|
+
})
|
|
54534
|
+
], LuzmoDashboard.prototype, "experimental", 2);
|
|
54535
|
+
__decorateClass([
|
|
54536
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54537
|
+
], LuzmoDashboard.prototype, "_containerId", 2);
|
|
54538
|
+
__decorateClass([
|
|
54539
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54540
|
+
], LuzmoDashboard.prototype, "_iframeId", 2);
|
|
54541
|
+
__decorateClass([
|
|
54542
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54543
|
+
], LuzmoDashboard.prototype, "params", 2);
|
|
54544
|
+
__decorateClass([
|
|
54545
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54546
|
+
], LuzmoDashboard.prototype, "_iframeUrl", 2);
|
|
54547
|
+
__decorateClass([
|
|
54548
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54549
|
+
], LuzmoDashboard.prototype, "iframeLoaded", 2);
|
|
54550
|
+
__decorateClass([
|
|
54551
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54552
|
+
], LuzmoDashboard.prototype, "promises", 2);
|
|
54553
|
+
__decorateClass([
|
|
54554
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54555
|
+
], LuzmoDashboard.prototype, "iframeStyle", 2);
|
|
54556
|
+
__decorateClass([
|
|
54557
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54558
|
+
], LuzmoDashboard.prototype, "_containerStyle", 2);
|
|
54559
|
+
__decorateClass([
|
|
54560
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54561
|
+
], LuzmoDashboard.prototype, "_loaderStyle", 2);
|
|
54562
|
+
__decorateClass([
|
|
54563
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54564
|
+
], LuzmoDashboard.prototype, "_lcStyle", 2);
|
|
54565
|
+
__decorateClass([
|
|
54566
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54567
|
+
], LuzmoDashboard.prototype, "_loadingCircleStyle", 2);
|
|
54568
|
+
__decorateClass([
|
|
54569
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54570
|
+
], LuzmoDashboard.prototype, "_containerLoaderStyle", 2);
|
|
54571
|
+
__decorateClass([
|
|
54572
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54573
|
+
], LuzmoDashboard.prototype, "_loaderMsg", 2);
|
|
54574
|
+
__decorateClass([
|
|
54575
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54576
|
+
], LuzmoDashboard.prototype, "containerWidth", 2);
|
|
54577
|
+
__decorateClass([
|
|
54578
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54579
|
+
], LuzmoDashboard.prototype, "dimensions", 2);
|
|
54580
|
+
__decorateClass([
|
|
54581
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54582
|
+
], LuzmoDashboard.prototype, "currentScreenMode", 2);
|
|
54583
|
+
__decorateClass([
|
|
54584
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54585
|
+
], LuzmoDashboard.prototype, "_itemEmbedding", 2);
|
|
54586
|
+
__decorateClass([
|
|
54587
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54588
|
+
], LuzmoDashboard.prototype, "browserError", 2);
|
|
54589
|
+
__decorateClass([
|
|
54590
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54591
|
+
], LuzmoDashboard.prototype, "browserErrorMsg", 2);
|
|
54592
|
+
__decorateClass([
|
|
54593
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54594
|
+
], LuzmoDashboard.prototype, "dashboardError", 2);
|
|
54595
|
+
__decorateClass([
|
|
54596
|
+
(0, import_decorators.property)({ attribute: false })
|
|
54597
|
+
], LuzmoDashboard.prototype, "browserNotSupported", 2);
|
|
54598
|
+
__decorateClass([
|
|
54599
|
+
(0, import_decorators.property)()
|
|
54600
|
+
], LuzmoDashboard.prototype, "libVersion", 2);
|
|
54601
|
+
__decorateClass([
|
|
54602
|
+
(0, import_decorators.state)()
|
|
54603
|
+
], LuzmoDashboard.prototype, "isLibraryLoaded", 2);
|
|
54604
|
+
__decorateClass([
|
|
54605
|
+
(0, import_decorators.state)()
|
|
54606
|
+
], LuzmoDashboard.prototype, "dashboardReference", 2);
|
|
54607
|
+
__decorateClass([
|
|
54608
|
+
(0, import_decorators.state)()
|
|
54609
|
+
], LuzmoDashboard.prototype, "currentAuthKey", 2);
|
|
54610
|
+
__decorateClass([
|
|
54611
|
+
(0, import_decorators.state)()
|
|
54612
|
+
], LuzmoDashboard.prototype, "currentAuthToken", 2);
|
|
54613
|
+
__decorateClass([
|
|
54614
|
+
(0, import_decorators.state)()
|
|
54615
|
+
], LuzmoDashboard.prototype, "isInitCalled", 2);
|
|
54395
54616
|
|
|
54396
|
-
// libs/dashboard-
|
|
54397
|
-
var
|
|
54398
|
-
"options.schema.json": options_schema_default,
|
|
54399
|
-
"slots.schema.json": slots_schema_default,
|
|
54400
|
-
"area-chart.schema.json": area_chart_schema_default,
|
|
54401
|
-
"area-chart-options.schema.json": area_chart_options_schema_default,
|
|
54402
|
-
"area-chart-slots.schema.json": area_chart_slots_schema_default,
|
|
54403
|
-
"bar-chart.schema.json": bar_chart_schema_default,
|
|
54404
|
-
"bar-chart-options.schema.json": bar_chart_options_schema_default,
|
|
54405
|
-
"bar-chart-slots.schema.json": bar_chart_slots_schema_default,
|
|
54406
|
-
"box-plot.schema.json": box_plot_schema_default,
|
|
54407
|
-
"box-plot-options.schema.json": box_plot_options_schema_default,
|
|
54408
|
-
"box-plot-slots.schema.json": box_plot_slots_schema_default,
|
|
54409
|
-
"bubble-chart.schema.json": bubble_chart_schema_default,
|
|
54410
|
-
"bubble-chart-options.schema.json": bubble_chart_options_schema_default,
|
|
54411
|
-
"bubble-chart-slots.schema.json": bubble_chart_slots_schema_default,
|
|
54412
|
-
"bullet-chart.schema.json": bullet_chart_schema_default,
|
|
54413
|
-
"bullet-chart-options.schema.json": bullet_chart_options_schema_default,
|
|
54414
|
-
"bullet-chart-slots.schema.json": bullet_chart_slots_schema_default,
|
|
54415
|
-
"choropleth-map.schema.json": choropleth_map_schema_default,
|
|
54416
|
-
"choropleth-map-options.schema.json": choropleth_map_options_schema_default,
|
|
54417
|
-
"choropleth-map-slots.schema.json": choropleth_map_slots_schema_default,
|
|
54418
|
-
"circular-gauge.schema.json": circular_gauge_schema_default,
|
|
54419
|
-
"circular-gauge-options.schema.json": circular_gauge_options_schema_default,
|
|
54420
|
-
"circular-gauge-slots.schema.json": circular_gauge_slots_schema_default,
|
|
54421
|
-
"column-chart.schema.json": column_chart_schema_default,
|
|
54422
|
-
"column-chart-options.schema.json": column_chart_options_schema_default,
|
|
54423
|
-
"column-chart-slots.schema.json": column_chart_slots_schema_default,
|
|
54424
|
-
"combination-chart.schema.json": combination_chart_schema_default,
|
|
54425
|
-
"combination-chart-options.schema.json": combination_chart_options_schema_default,
|
|
54426
|
-
"combination-chart-slots.schema.json": combination_chart_slots_schema_default,
|
|
54427
|
-
"date-filter.schema.json": date_filter_schema_default,
|
|
54428
|
-
"date-filter-options.schema.json": date_filter_options_schema_default,
|
|
54429
|
-
"date-filter-slots.schema.json": date_filter_slots_schema_default,
|
|
54430
|
-
"donut-chart.schema.json": donut_chart_schema_default,
|
|
54431
|
-
"donut-chart-options.schema.json": donut_chart_options_schema_default,
|
|
54432
|
-
"donut-chart-slots.schema.json": donut_chart_slots_schema_default,
|
|
54433
|
-
"dropdown-filter.schema.json": dropdown_filter_schema_default,
|
|
54434
|
-
"dropdown-filter-options.schema.json": dropdown_filter_options_schema_default,
|
|
54435
|
-
"dropdown-filter-slots.schema.json": dropdown_filter_slots_schema_default,
|
|
54436
|
-
"evolution-number.schema.json": evolution_number_schema_default,
|
|
54437
|
-
"evolution-number-options.schema.json": evolution_number_options_schema_default,
|
|
54438
|
-
"evolution-number-slots.schema.json": evolution_number_slots_schema_default,
|
|
54439
|
-
"funnel-chart.schema.json": funnel_chart_schema_default,
|
|
54440
|
-
"funnel-chart-options.schema.json": funnel_chart_options_schema_default,
|
|
54441
|
-
"funnel-chart-slots.schema.json": funnel_chart_slots_schema_default,
|
|
54442
|
-
"image.schema.json": image_schema_default,
|
|
54443
|
-
"image-options.schema.json": image_options_schema_default,
|
|
54444
|
-
"line-chart.schema.json": line_chart_schema_default,
|
|
54445
|
-
"line-chart-options.schema.json": line_chart_options_schema_default,
|
|
54446
|
-
"line-chart-slots.schema.json": line_chart_slots_schema_default,
|
|
54447
|
-
"pivot-table.schema.json": pivot_table_schema_default,
|
|
54448
|
-
"pivot-table-options.schema.json": pivot_table_options_schema_default,
|
|
54449
|
-
"pivot-table-slots.schema.json": pivot_table_slots_schema_default,
|
|
54450
|
-
"regular-table.schema.json": regular_table_schema_default,
|
|
54451
|
-
"regular-table-options.schema.json": regular_table_options_schema_default,
|
|
54452
|
-
"regular-table-slots.schema.json": regular_table_slots_schema_default,
|
|
54453
|
-
"sankey-diagram.schema.json": sankey_diagram_schema_default,
|
|
54454
|
-
"sankey-diagram-options.schema.json": sankey_diagram_options_schema_default,
|
|
54455
|
-
"sankey-diagram-slots.schema.json": sankey_diagram_slots_schema_default,
|
|
54456
|
-
"scatter-plot.schema.json": scatter_plot_schema_default,
|
|
54457
|
-
"scatter-plot-options.schema.json": scatter_plot_options_schema_default,
|
|
54458
|
-
"scatter-plot-slots.schema.json": scatter_plot_slots_schema_default,
|
|
54459
|
-
"slicer-filter.schema.json": slicer_filter_schema_default,
|
|
54460
|
-
"slicer-filter-options.schema.json": slicer_filter_options_schema_default,
|
|
54461
|
-
"slicer-filter-slots.schema.json": slicer_filter_slots_schema_default,
|
|
54462
|
-
"slider-filter.schema.json": slider_filter_schema_default,
|
|
54463
|
-
"slider-filter-options.schema.json": slider_filter_options_schema_default,
|
|
54464
|
-
"slider-filter-slots.schema.json": slider_filter_slots_schema_default,
|
|
54465
|
-
"text.schema.json": text_schema_default,
|
|
54466
|
-
"text-options.schema.json": text_options_schema_default
|
|
54617
|
+
// libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
|
|
54618
|
+
var LuzmoEmbedDashboard = class extends LuzmoDashboard {
|
|
54467
54619
|
};
|
|
54620
|
+
LuzmoEmbedDashboard = __decorateClass([
|
|
54621
|
+
(0, import_decorators2.customElement)("luzmo-embed-dashboard")
|
|
54622
|
+
], LuzmoEmbedDashboard);
|
|
54623
|
+
|
|
54624
|
+
// libs/embed-libs/embed/src/lib/viz-item/viz-item-component.ts
|
|
54625
|
+
var import_decorators4 = require("lit/decorators.js");
|
|
54468
54626
|
|
|
54469
54627
|
// libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
|
|
54628
|
+
var import_decorators3 = require("lit/decorators.js");
|
|
54629
|
+
var import_lit3 = require("lit");
|
|
54630
|
+
var import_ajv = __toESM(require("ajv"), 1);
|
|
54631
|
+
var import_ajv_formats = __toESM(require("ajv-formats"), 1);
|
|
54632
|
+
var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
|
|
54470
54633
|
var dashboardContentsVersion = "0.1.88";
|
|
54634
|
+
if (!json_schemas_default || !Object.keys(json_schemas_default).length) {
|
|
54635
|
+
console.warn("Validation JSON schemas for charts are not found.");
|
|
54636
|
+
}
|
|
54471
54637
|
var ajv = new import_ajv.default({
|
|
54472
|
-
schemas: Object.keys(
|
|
54638
|
+
schemas: Object.keys(json_schemas_default).map((key) => json_schemas_default[key]),
|
|
54473
54639
|
allowUnionTypes: true,
|
|
54474
54640
|
strictTuples: false
|
|
54475
54641
|
});
|
|
@@ -54615,7 +54781,7 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
|
54615
54781
|
}
|
|
54616
54782
|
const validate = ajv.getSchema(jsonSchemaForValidation);
|
|
54617
54783
|
if (!validate) {
|
|
54618
|
-
console.
|
|
54784
|
+
console.warn(`Validation JSON schema ${jsonSchemaForValidation} was not found.`);
|
|
54619
54785
|
return;
|
|
54620
54786
|
}
|
|
54621
54787
|
const valid = validate(this[key]);
|
|
@@ -54623,7 +54789,7 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
|
|
|
54623
54789
|
const humanReadableErrors = validate.errors.map((error, index) => {
|
|
54624
54790
|
return `${index + 1}. Validation error at '${error.instancePath || "root"}': ${error.message}`;
|
|
54625
54791
|
});
|
|
54626
|
-
console.
|
|
54792
|
+
console.warn(`<luzmo-viz-item> or <luzmo-embed-viz-item> has an invalid "${key}" value:`, humanReadableErrors.join(" "));
|
|
54627
54793
|
}
|
|
54628
54794
|
}
|
|
54629
54795
|
}
|
|
@@ -54696,7 +54862,10 @@ LuzmoEmbedVizItem = __decorateClass([
|
|
|
54696
54862
|
], LuzmoEmbedVizItem);
|
|
54697
54863
|
// Annotate the CommonJS export names for ESM import in node:
|
|
54698
54864
|
0 && (module.exports = {
|
|
54865
|
+
ColumnChartModes,
|
|
54866
|
+
JSON_SCHEMAS,
|
|
54699
54867
|
LuzmoEmbedDashboard,
|
|
54700
54868
|
LuzmoEmbedVizItem,
|
|
54869
|
+
RegularTableSortingMode,
|
|
54701
54870
|
selectedDataUtils
|
|
54702
54871
|
});
|