@esri/solutions-components 0.10.5 → 0.10.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +2 -1
- package/dist/cjs/instant-apps-time-filter.cjs.entry.js +40 -21
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_ar.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_bg.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_bs.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_ca.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_cs.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_da.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_de.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_el.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_es.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_et.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_fi.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_fr.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_he.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_hr.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_hu.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_id.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_it.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_ja.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_ko.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_lt.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_lv.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_nb.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_nl.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_pl.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_pt-BR.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_pt-PT.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_ro.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_ru.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_sk.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_sl.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_sr.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_sv.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_th.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_tr.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_uk.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_vi.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_zh-CN.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_zh-HK.json +1 -1
- package/dist/collection/assets/t9n/layer-list/resources_zh-TW.json +1 -1
- package/dist/components/instant-apps-control-panel.js +2 -1
- package/dist/components/instant-apps-time-filter.js +46 -23
- package/dist/esm/instant-apps-control-panel.entry.js +2 -1
- package/dist/esm/instant-apps-time-filter.entry.js +41 -22
- package/dist/esm/loader.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_ar.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_bg.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_bs.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_ca.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_cs.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_da.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_de.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_el.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_es.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_et.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_fi.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_fr.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_he.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_hr.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_hu.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_id.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_it.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_ja.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_ko.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_lt.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_lv.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_nb.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_nl.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_pl.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_pt-BR.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_pt-PT.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_ro.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_ru.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_sk.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_sl.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_sr.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_sv.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_th.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_tr.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_uk.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_vi.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_zh-CN.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_zh-HK.json +1 -1
- package/dist/solutions-components/assets/t9n/layer-list/resources_zh-TW.json +1 -1
- package/dist/solutions-components/p-1867168b.entry.js +6 -0
- package/dist/solutions-components/{p-ab2adcaf.entry.js → p-cc092b22.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/package.json +2 -2
- package/dist/solutions-components/p-72f01088.entry.js +0 -6
@@ -68,9 +68,10 @@ const InstantAppsControlPanel$1 = /*@__PURE__*/ proxyCustomElement(class Instant
|
|
68
68
|
};
|
69
69
|
}
|
70
70
|
_getExpand(component) {
|
71
|
+
var _a;
|
71
72
|
const { view } = this;
|
72
73
|
const { content } = component;
|
73
|
-
const expanded = false;
|
74
|
+
const expanded = (_a = component === null || component === void 0 ? void 0 : component.expanded) !== null && _a !== void 0 ? _a : false;
|
74
75
|
return new this.Expand({ content, view, expanded, mode: MODE, group: GROUP });
|
75
76
|
}
|
76
77
|
_getComponentsNode() {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { proxyCustomElement, HTMLElement as HTMLElement$1, h as h$2, Host
|
6
|
+
import { proxyCustomElement, HTMLElement as HTMLElement$1, h as h$2, Host } from '@stencil/core/internal/client';
|
7
7
|
import { c as createStore } from './index2.js';
|
8
8
|
import { l as loadModules } from './loadModules2.js';
|
9
9
|
import { g as getMessages } from './locale3.js';
|
@@ -21,6 +21,8 @@ const { state, onChange } = createStore({
|
|
21
21
|
timeInfoItems: [],
|
22
22
|
selectedTimeInfoItem: null,
|
23
23
|
loading: true,
|
24
|
+
timeSliderConfig: {},
|
25
|
+
autoPlay: false,
|
24
26
|
});
|
25
27
|
|
26
28
|
/*
|
@@ -239,8 +241,8 @@ class InstantAppsTimeFilterViewModel {
|
|
239
241
|
'esri/core/Handles',
|
240
242
|
'esri/core/reactiveUtils',
|
241
243
|
'esri/widgets/TimeSlider',
|
242
|
-
'esri/TimeExtent',
|
243
|
-
'esri/TimeInterval',
|
244
|
+
'esri/time/TimeExtent',
|
245
|
+
'esri/time/TimeInterval',
|
244
246
|
'esri/layers/support/FeatureFilter',
|
245
247
|
'esri/layers/support/FeatureEffect',
|
246
248
|
]);
|
@@ -255,8 +257,11 @@ class InstantAppsTimeFilterViewModel {
|
|
255
257
|
catch (_a) { }
|
256
258
|
}
|
257
259
|
async init(timeSliderRef) {
|
260
|
+
var _a, _b;
|
258
261
|
if (timeSliderRef)
|
259
262
|
timeSliderRef.innerHTML = '';
|
263
|
+
if (((_b = (_a = state === null || state === void 0 ? void 0 : state.timeSlider) === null || _a === void 0 ? void 0 : _a.viewModel) === null || _b === void 0 ? void 0 : _b.state) === 'playing')
|
264
|
+
state.timeSlider.stop();
|
260
265
|
const { view, timeInfoConfigItems } = state;
|
261
266
|
if (!view)
|
262
267
|
return;
|
@@ -268,7 +273,7 @@ class InstantAppsTimeFilterViewModel {
|
|
268
273
|
this.setupFilterModeWatcher();
|
269
274
|
return Promise.resolve();
|
270
275
|
}
|
271
|
-
catch (
|
276
|
+
catch (_c) { }
|
272
277
|
}
|
273
278
|
destroy() {
|
274
279
|
var _a, _b;
|
@@ -313,6 +318,8 @@ class InstantAppsTimeFilterViewModel {
|
|
313
318
|
state.selectedTimeInfoItem = initialTimeInfoItem;
|
314
319
|
const config = this.getTimeSliderConfig(timeSliderRef);
|
315
320
|
state.timeSlider = new TimeSlider(config);
|
321
|
+
if (state.autoPlay)
|
322
|
+
state.timeSlider.play();
|
316
323
|
if (((_b = state.view) === null || _b === void 0 ? void 0 : _b.type) === '2d')
|
317
324
|
this.initialize2DView();
|
318
325
|
}
|
@@ -327,23 +334,16 @@ class InstantAppsTimeFilterViewModel {
|
|
327
334
|
var _a;
|
328
335
|
const [{ timeExtent, rangeStart, rangeEnd, unit }] = state.timeInfoItems;
|
329
336
|
const { TimeExtent, TimeInterval } = this;
|
330
|
-
|
331
|
-
container: timeSliderRef,
|
332
|
-
fullTimeExtent: timeExtent,
|
333
|
-
timeExtent: new TimeExtent({
|
337
|
+
const config = Object.assign({ container: timeSliderRef, fullTimeExtent: timeExtent, timeExtent: new TimeExtent({
|
334
338
|
start: rangeStart,
|
335
339
|
end: rangeEnd,
|
336
|
-
}),
|
337
|
-
mode: 'time-window',
|
338
|
-
loop: true,
|
339
|
-
stops: {
|
340
|
+
}), mode: 'time-window', stops: {
|
340
341
|
interval: new TimeInterval({
|
341
342
|
unit,
|
342
343
|
value: 1,
|
343
344
|
}),
|
344
|
-
},
|
345
|
-
|
346
|
-
};
|
345
|
+
}, view: ((_a = state.view) === null || _a === void 0 ? void 0 : _a.type) === '3d' ? state.view : null }, state.timeSliderConfig);
|
346
|
+
return config;
|
347
347
|
}
|
348
348
|
initialize2DView() {
|
349
349
|
state.timeInfoItems.forEach(timeInfoItem => this.applyTimeExtent(timeInfoItem.layerView, new this.TimeExtent({ start: timeInfoItem.rangeStart, end: timeInfoItem.rangeEnd })));
|
@@ -451,6 +451,8 @@ const InstantAppsTimeFilter$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
|
|
451
451
|
this.timeInfoConfigItems = [];
|
452
452
|
this.filterMode = undefined;
|
453
453
|
this.view = undefined;
|
454
|
+
this.timeSliderConfig = undefined;
|
455
|
+
this.autoPlay = false;
|
454
456
|
}
|
455
457
|
async updateTimeInfoConfigItems() {
|
456
458
|
state.timeInfoConfigItems = this.timeInfoConfigItems;
|
@@ -459,10 +461,28 @@ const InstantAppsTimeFilter$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
|
|
459
461
|
async updateFilterMode() {
|
460
462
|
state.filterMode = this.filterMode;
|
461
463
|
}
|
464
|
+
async updateTimeSliderConfig() {
|
465
|
+
state.timeSliderConfig = this.timeSliderConfig;
|
466
|
+
await viewModel.init(this.timeSliderRef);
|
467
|
+
}
|
468
|
+
async updateAutoPlay() {
|
469
|
+
state.autoPlay = this.autoPlay;
|
470
|
+
if (state.timeSlider) {
|
471
|
+
if (state.autoPlay) {
|
472
|
+
state.timeSlider.play();
|
473
|
+
}
|
474
|
+
else {
|
475
|
+
state.timeSlider.stop();
|
476
|
+
}
|
477
|
+
}
|
478
|
+
}
|
462
479
|
async componentWillLoad() {
|
463
480
|
try {
|
464
481
|
state.view = this.view;
|
465
482
|
state.timeInfoConfigItems = this.timeInfoConfigItems;
|
483
|
+
state.autoPlay = !!this.autoPlay;
|
484
|
+
if (this.timeSliderConfig)
|
485
|
+
state.timeSliderConfig = this.timeSliderConfig;
|
466
486
|
if (this.filterMode)
|
467
487
|
state.filterMode = this.filterMode;
|
468
488
|
await getMessages(this);
|
@@ -483,17 +503,14 @@ const InstantAppsTimeFilter$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
|
|
483
503
|
viewModel.destroy();
|
484
504
|
}
|
485
505
|
render() {
|
486
|
-
return h$2(Host, { key: '
|
506
|
+
return h$2(Host, { key: '38a0569dba42d51846760bf75df36ee1c88d71b1' }, this._renderBase());
|
487
507
|
}
|
488
508
|
_renderBase() {
|
489
|
-
return (h$2("div", { class: `${CSS.base}${this.view.type !== '2d' ? CSS.threeD : ''}` }, this._renderLoader(), this.
|
490
|
-
}
|
491
|
-
_renderMain() {
|
492
|
-
return (h$2(Fragment, null, this.view.type === '2d' && this._renderTopEl(), h$2("div", { ref: (ref) => (this.timeSliderRef = ref) })));
|
509
|
+
return (h$2("div", { class: `${CSS.base}${this.view.type !== '2d' ? CSS.threeD : ''}` }, this._renderLoader(), this.view.type === '2d' && this._renderTopEl(), h$2("div", { key: "time-slider", ref: (ref) => (this.timeSliderRef = ref) })));
|
493
510
|
}
|
494
511
|
_renderLoader() {
|
495
512
|
var _a, _b;
|
496
|
-
return (state.loading && (h$2(
|
513
|
+
return (state.loading && (h$2("div", null, h$2("div", { class: CSS.background }), h$2("div", { class: CSS.loadingContainer }, h$2("calcite-loader", { scale: "m", label: (_a = this.messages) === null || _a === void 0 ? void 0 : _a.loading, text: (_b = this.messages) === null || _b === void 0 ? void 0 : _b.loading })))));
|
497
514
|
}
|
498
515
|
_renderTopEl() {
|
499
516
|
const moreThanOneTimeLayer = this.timeInfoConfigItems.length > 1;
|
@@ -523,17 +540,23 @@ const InstantAppsTimeFilter$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
|
|
523
540
|
get el() { return this; }
|
524
541
|
static get watchers() { return {
|
525
542
|
"timeInfoConfigItems": ["updateTimeInfoConfigItems"],
|
526
|
-
"filterMode": ["updateFilterMode"]
|
543
|
+
"filterMode": ["updateFilterMode"],
|
544
|
+
"timeSliderConfig": ["updateTimeSliderConfig"],
|
545
|
+
"autoPlay": ["updateAutoPlay"]
|
527
546
|
}; }
|
528
547
|
static get style() { return InstantAppsTimeFilterStyle0; }
|
529
548
|
}, [0, "instant-apps-time-filter", {
|
530
549
|
"timeInfoConfigItems": [16],
|
531
550
|
"filterMode": [16],
|
532
551
|
"view": [16],
|
552
|
+
"timeSliderConfig": [16],
|
553
|
+
"autoPlay": [4, "auto-play"],
|
533
554
|
"timeSliderRef": [32]
|
534
555
|
}, undefined, {
|
535
556
|
"timeInfoConfigItems": ["updateTimeInfoConfigItems"],
|
536
|
-
"filterMode": ["updateFilterMode"]
|
557
|
+
"filterMode": ["updateFilterMode"],
|
558
|
+
"timeSliderConfig": ["updateTimeSliderConfig"],
|
559
|
+
"autoPlay": ["updateAutoPlay"]
|
537
560
|
}]);
|
538
561
|
function defineCustomElement$1() {
|
539
562
|
if (typeof customElements === "undefined") {
|
@@ -68,9 +68,10 @@ const InstantAppsControlPanel = class {
|
|
68
68
|
};
|
69
69
|
}
|
70
70
|
_getExpand(component) {
|
71
|
+
var _a;
|
71
72
|
const { view } = this;
|
72
73
|
const { content } = component;
|
73
|
-
const expanded = false;
|
74
|
+
const expanded = (_a = component === null || component === void 0 ? void 0 : component.expanded) !== null && _a !== void 0 ? _a : false;
|
74
75
|
return new this.Expand({ content, view, expanded, mode: MODE, group: GROUP });
|
75
76
|
}
|
76
77
|
_getComponentsNode() {
|