@esri/solutions-components 0.10.5 → 0.10.7
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/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
|
@@ -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 { r as registerInstance, h as h$2, H as Host,
|
|
6
|
+
import { r as registerInstance, h as h$2, H as Host, g as getElement } from './index-e3f04fa1.js';
|
|
7
7
|
import { c as createStore } from './index-1dc14abf.js';
|
|
8
8
|
import { l as loadModules } from './loadModules-03ba7abe.js';
|
|
9
9
|
import { g as getMessages } from './locale-adb5ff0b.js';
|
|
@@ -19,6 +19,8 @@ const { state, onChange } = createStore({
|
|
|
19
19
|
timeInfoItems: [],
|
|
20
20
|
selectedTimeInfoItem: null,
|
|
21
21
|
loading: true,
|
|
22
|
+
timeSliderConfig: {},
|
|
23
|
+
autoPlay: false,
|
|
22
24
|
});
|
|
23
25
|
|
|
24
26
|
/*
|
|
@@ -237,8 +239,8 @@ class InstantAppsTimeFilterViewModel {
|
|
|
237
239
|
'esri/core/Handles',
|
|
238
240
|
'esri/core/reactiveUtils',
|
|
239
241
|
'esri/widgets/TimeSlider',
|
|
240
|
-
'esri/TimeExtent',
|
|
241
|
-
'esri/TimeInterval',
|
|
242
|
+
'esri/time/TimeExtent',
|
|
243
|
+
'esri/time/TimeInterval',
|
|
242
244
|
'esri/layers/support/FeatureFilter',
|
|
243
245
|
'esri/layers/support/FeatureEffect',
|
|
244
246
|
]);
|
|
@@ -253,8 +255,11 @@ class InstantAppsTimeFilterViewModel {
|
|
|
253
255
|
catch (_a) { }
|
|
254
256
|
}
|
|
255
257
|
async init(timeSliderRef) {
|
|
258
|
+
var _a, _b;
|
|
256
259
|
if (timeSliderRef)
|
|
257
260
|
timeSliderRef.innerHTML = '';
|
|
261
|
+
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')
|
|
262
|
+
state.timeSlider.stop();
|
|
258
263
|
const { view, timeInfoConfigItems } = state;
|
|
259
264
|
if (!view)
|
|
260
265
|
return;
|
|
@@ -266,7 +271,7 @@ class InstantAppsTimeFilterViewModel {
|
|
|
266
271
|
this.setupFilterModeWatcher();
|
|
267
272
|
return Promise.resolve();
|
|
268
273
|
}
|
|
269
|
-
catch (
|
|
274
|
+
catch (_c) { }
|
|
270
275
|
}
|
|
271
276
|
destroy() {
|
|
272
277
|
var _a, _b;
|
|
@@ -311,6 +316,8 @@ class InstantAppsTimeFilterViewModel {
|
|
|
311
316
|
state.selectedTimeInfoItem = initialTimeInfoItem;
|
|
312
317
|
const config = this.getTimeSliderConfig(timeSliderRef);
|
|
313
318
|
state.timeSlider = new TimeSlider(config);
|
|
319
|
+
if (state.autoPlay)
|
|
320
|
+
state.timeSlider.play();
|
|
314
321
|
if (((_b = state.view) === null || _b === void 0 ? void 0 : _b.type) === '2d')
|
|
315
322
|
this.initialize2DView();
|
|
316
323
|
}
|
|
@@ -325,23 +332,16 @@ class InstantAppsTimeFilterViewModel {
|
|
|
325
332
|
var _a;
|
|
326
333
|
const [{ timeExtent, rangeStart, rangeEnd, unit }] = state.timeInfoItems;
|
|
327
334
|
const { TimeExtent, TimeInterval } = this;
|
|
328
|
-
|
|
329
|
-
container: timeSliderRef,
|
|
330
|
-
fullTimeExtent: timeExtent,
|
|
331
|
-
timeExtent: new TimeExtent({
|
|
335
|
+
const config = Object.assign({ container: timeSliderRef, fullTimeExtent: timeExtent, timeExtent: new TimeExtent({
|
|
332
336
|
start: rangeStart,
|
|
333
337
|
end: rangeEnd,
|
|
334
|
-
}),
|
|
335
|
-
mode: 'time-window',
|
|
336
|
-
loop: true,
|
|
337
|
-
stops: {
|
|
338
|
+
}), mode: 'time-window', stops: {
|
|
338
339
|
interval: new TimeInterval({
|
|
339
340
|
unit,
|
|
340
341
|
value: 1,
|
|
341
342
|
}),
|
|
342
|
-
},
|
|
343
|
-
|
|
344
|
-
};
|
|
343
|
+
}, view: ((_a = state.view) === null || _a === void 0 ? void 0 : _a.type) === '3d' ? state.view : null }, state.timeSliderConfig);
|
|
344
|
+
return config;
|
|
345
345
|
}
|
|
346
346
|
initialize2DView() {
|
|
347
347
|
state.timeInfoItems.forEach(timeInfoItem => this.applyTimeExtent(timeInfoItem.layerView, new this.TimeExtent({ start: timeInfoItem.rangeStart, end: timeInfoItem.rangeEnd })));
|
|
@@ -448,6 +448,8 @@ const InstantAppsTimeFilter = class {
|
|
|
448
448
|
this.timeInfoConfigItems = [];
|
|
449
449
|
this.filterMode = undefined;
|
|
450
450
|
this.view = undefined;
|
|
451
|
+
this.timeSliderConfig = undefined;
|
|
452
|
+
this.autoPlay = false;
|
|
451
453
|
}
|
|
452
454
|
async updateTimeInfoConfigItems() {
|
|
453
455
|
state.timeInfoConfigItems = this.timeInfoConfigItems;
|
|
@@ -456,10 +458,28 @@ const InstantAppsTimeFilter = class {
|
|
|
456
458
|
async updateFilterMode() {
|
|
457
459
|
state.filterMode = this.filterMode;
|
|
458
460
|
}
|
|
461
|
+
async updateTimeSliderConfig() {
|
|
462
|
+
state.timeSliderConfig = this.timeSliderConfig;
|
|
463
|
+
await viewModel.init(this.timeSliderRef);
|
|
464
|
+
}
|
|
465
|
+
async updateAutoPlay() {
|
|
466
|
+
state.autoPlay = this.autoPlay;
|
|
467
|
+
if (state.timeSlider) {
|
|
468
|
+
if (state.autoPlay) {
|
|
469
|
+
state.timeSlider.play();
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
state.timeSlider.stop();
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
459
476
|
async componentWillLoad() {
|
|
460
477
|
try {
|
|
461
478
|
state.view = this.view;
|
|
462
479
|
state.timeInfoConfigItems = this.timeInfoConfigItems;
|
|
480
|
+
state.autoPlay = !!this.autoPlay;
|
|
481
|
+
if (this.timeSliderConfig)
|
|
482
|
+
state.timeSliderConfig = this.timeSliderConfig;
|
|
463
483
|
if (this.filterMode)
|
|
464
484
|
state.filterMode = this.filterMode;
|
|
465
485
|
await getMessages(this);
|
|
@@ -480,17 +500,14 @@ const InstantAppsTimeFilter = class {
|
|
|
480
500
|
viewModel.destroy();
|
|
481
501
|
}
|
|
482
502
|
render() {
|
|
483
|
-
return h$2(Host, { key: '
|
|
503
|
+
return h$2(Host, { key: '38a0569dba42d51846760bf75df36ee1c88d71b1' }, this._renderBase());
|
|
484
504
|
}
|
|
485
505
|
_renderBase() {
|
|
486
|
-
return (h$2("div", { class: `${CSS.base}${this.view.type !== '2d' ? CSS.threeD : ''}` }, this._renderLoader(), this.
|
|
487
|
-
}
|
|
488
|
-
_renderMain() {
|
|
489
|
-
return (h$2(Fragment, null, this.view.type === '2d' && this._renderTopEl(), h$2("div", { ref: (ref) => (this.timeSliderRef = ref) })));
|
|
506
|
+
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) })));
|
|
490
507
|
}
|
|
491
508
|
_renderLoader() {
|
|
492
509
|
var _a, _b;
|
|
493
|
-
return (state.loading && (h$2(
|
|
510
|
+
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 })))));
|
|
494
511
|
}
|
|
495
512
|
_renderTopEl() {
|
|
496
513
|
const moreThanOneTimeLayer = this.timeInfoConfigItems.length > 1;
|
|
@@ -520,7 +537,9 @@ const InstantAppsTimeFilter = class {
|
|
|
520
537
|
get el() { return getElement(this); }
|
|
521
538
|
static get watchers() { return {
|
|
522
539
|
"timeInfoConfigItems": ["updateTimeInfoConfigItems"],
|
|
523
|
-
"filterMode": ["updateFilterMode"]
|
|
540
|
+
"filterMode": ["updateFilterMode"],
|
|
541
|
+
"timeSliderConfig": ["updateTimeSliderConfig"],
|
|
542
|
+
"autoPlay": ["updateAutoPlay"]
|
|
524
543
|
}; }
|
|
525
544
|
};
|
|
526
545
|
InstantAppsTimeFilter.style = InstantAppsTimeFilterStyle0;
|