@esri/solutions-components 0.10.42 → 0.10.44
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/calcite-action-pad_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-block_5.cjs.entry.js +25 -26
- package/dist/cjs/card-manager_3.cjs.entry.js +32 -4
- package/dist/cjs/{constants-51cf394f.js → constants-bed33322.js} +3 -11
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +112 -49
- package/dist/cjs/{helpers-afcac967.js → helpers-0493759d.js} +1 -1
- package/dist/cjs/instant-apps-app-guide.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-create.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-export-views.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-export.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +21 -7
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +7 -7
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-measurement.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-popover.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-splash.cjs.entry.js +6 -5
- package/dist/cjs/instant-apps-time-filter.cjs.entry.js +2 -2
- package/dist/cjs/{loadModules-8567855e.js → loadModules-df8b13ca.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-4a18a858.js → locale-4b820602.js} +1 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/{utils-fa7ad44b.js → utils-3f10ea6b.js} +2 -2
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +112 -49
- package/dist/collection/components/layer-table/layer-table.js +32 -4
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +2 -2
- package/dist/components/crowdsource-reporter.js +112 -49
- package/dist/components/instant-apps-filter-list2.js +25 -26
- package/dist/components/instant-apps-interactive-legend-relationship2.js +19 -5
- package/dist/components/instant-apps-language-switcher.js +3 -3
- package/dist/components/instant-apps-language-translator2.js +4 -12
- package/dist/components/instant-apps-splash.js +4 -3
- package/dist/components/layer-table2.js +32 -4
- package/dist/components/loadModules2.js +1 -1
- package/dist/components/solution-spatial-ref2.js +2 -2
- package/dist/components/utils4.js +1 -1
- package/dist/esm/calcite-action-pad_2.entry.js +1 -1
- package/dist/esm/calcite-block_5.entry.js +25 -26
- package/dist/esm/card-manager_3.entry.js +32 -4
- package/dist/esm/{constants-886c7c2c.js → constants-637a40f5.js} +3 -11
- package/dist/esm/crowdsource-reporter.entry.js +112 -49
- package/dist/esm/{helpers-91087955.js → helpers-91ca0f44.js} +1 -1
- package/dist/esm/instant-apps-app-guide.entry.js +2 -2
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +3 -3
- package/dist/esm/instant-apps-control-panel.entry.js +1 -1
- package/dist/esm/instant-apps-create.entry.js +2 -2
- package/dist/esm/instant-apps-export-views.entry.js +2 -2
- package/dist/esm/instant-apps-export.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +21 -7
- package/dist/esm/instant-apps-interactive-legend.entry.js +3 -3
- package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +2 -2
- package/dist/esm/instant-apps-language-switcher.entry.js +7 -7
- package/dist/esm/instant-apps-language-translator.entry.js +6 -6
- package/dist/esm/instant-apps-measurement.entry.js +2 -2
- package/dist/esm/instant-apps-popover.entry.js +2 -2
- package/dist/esm/instant-apps-scoreboard.entry.js +2 -2
- package/dist/esm/instant-apps-sign-in.entry.js +2 -2
- package/dist/esm/instant-apps-splash.entry.js +6 -5
- package/dist/esm/instant-apps-time-filter.entry.js +2 -2
- package/dist/esm/{loadModules-03ba7abe.js → loadModules-d5a25252.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-ce177eb8.js → locale-77038bee.js} +1 -1
- package/dist/esm/solution-contents_3.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{utils-3fc29543.js → utils-0a78d3c9.js} +2 -2
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-splash/instant-apps-splash.css +7 -0
- package/dist/solutions-components/{p-b739f26d.entry.js → p-053effee.entry.js} +1 -1
- package/dist/solutions-components/{p-af573e0d.js → p-09543b4e.js} +1 -1
- package/dist/solutions-components/p-1b1ff60a.entry.js +6 -0
- package/dist/solutions-components/{p-e4107150.entry.js → p-2291bf3f.entry.js} +1 -1
- package/dist/solutions-components/p-2cf41651.entry.js +6 -0
- package/dist/solutions-components/{p-fe3aea1a.entry.js → p-351c7cbf.entry.js} +1 -1
- package/dist/solutions-components/{p-90fc786f.entry.js → p-3d999f0f.entry.js} +1 -1
- package/dist/solutions-components/p-3fe6c230.entry.js +6 -0
- package/dist/solutions-components/p-4695cfab.js +6 -0
- package/dist/solutions-components/{p-43699470.entry.js → p-499489c5.entry.js} +1 -1
- package/dist/solutions-components/{p-5ff711ee.js → p-5104cc98.js} +1 -1
- package/dist/solutions-components/p-5e694bcc.entry.js +29 -0
- package/dist/solutions-components/{p-cbb86cf2.entry.js → p-6a3f2249.entry.js} +1 -1
- package/dist/solutions-components/{p-a7f56b28.entry.js → p-6e5ea1cb.entry.js} +1 -1
- package/dist/solutions-components/{p-9c170b30.entry.js → p-76a1236d.entry.js} +1 -1
- package/dist/solutions-components/{p-1e14b3d0.entry.js → p-78b6d3fe.entry.js} +1 -1
- package/dist/solutions-components/{p-c48be45f.entry.js → p-8a1a0f9b.entry.js} +1 -1
- package/dist/solutions-components/{p-5cbf3eed.entry.js → p-8d4a4498.entry.js} +1 -1
- package/dist/solutions-components/{p-4a02fd45.entry.js → p-9d9e0e74.entry.js} +1 -1
- package/dist/solutions-components/{p-50fb7f47.js → p-b49e1a78.js} +1 -1
- package/dist/solutions-components/{p-c551ffc5.entry.js → p-c399f2b8.entry.js} +1 -1
- package/dist/solutions-components/p-cb27611e.entry.js +6 -0
- package/dist/solutions-components/{p-4cd4cb85.js → p-d001e961.js} +1 -1
- package/dist/solutions-components/{p-523dcf4b.entry.js → p-d37a68f7.entry.js} +1 -1
- package/dist/solutions-components/{p-a2cf9fdc.entry.js → p-db7d5db8.entry.js} +1 -1
- package/dist/solutions-components/{p-6438d1ea.entry.js → p-e29e57db.entry.js} +1 -1
- package/dist/solutions-components/{p-a5b751e2.entry.js → p-e625aa69.entry.js} +1 -1
- package/dist/solutions-components/{p-2542d5c9.entry.js → p-e9fcc194.entry.js} +1 -1
- package/dist/solutions-components/p-f0509d41.entry.js +6 -0
- package/dist/solutions-components/{p-374ddead.entry.js → p-f4880179.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +43 -17
- package/dist/types/components/layer-table/layer-table.d.ts +4 -0
- package/package.json +7 -7
- package/dist/solutions-components/p-3fc18283.entry.js +0 -6
- package/dist/solutions-components/p-442dd59c.entry.js +0 -6
- package/dist/solutions-components/p-5585dcd3.entry.js +0 -6
- package/dist/solutions-components/p-953afbb3.entry.js +0 -29
- package/dist/solutions-components/p-a1d8aed8.entry.js +0 -6
- package/dist/solutions-components/p-ceb1030b.js +0 -6
- package/dist/solutions-components/p-f728af86.entry.js +0 -6
|
@@ -200,17 +200,17 @@ const CrowdsourceReporter = class {
|
|
|
200
200
|
*/
|
|
201
201
|
_formElements = [];
|
|
202
202
|
/**
|
|
203
|
-
* string
|
|
203
|
+
* string: Previous selected layer id
|
|
204
204
|
*/
|
|
205
|
-
|
|
205
|
+
_prevSelectedLayerId;
|
|
206
206
|
/**
|
|
207
|
-
*
|
|
207
|
+
* ILayerExpression[]: current LayerExpressions based on the selected layer
|
|
208
208
|
*/
|
|
209
|
-
|
|
209
|
+
_currentLayerExpressions;
|
|
210
210
|
/**
|
|
211
|
-
* string:
|
|
211
|
+
* { [key: string]: string }: definitionExpressions for each layer
|
|
212
212
|
*/
|
|
213
|
-
|
|
213
|
+
_initDefExpressions;
|
|
214
214
|
//--------------------------------------------------------------------------
|
|
215
215
|
//
|
|
216
216
|
// Watch handlers
|
|
@@ -235,6 +235,7 @@ const CrowdsourceReporter = class {
|
|
|
235
235
|
*/
|
|
236
236
|
async mapViewWatchHandler() {
|
|
237
237
|
await this.mapView.when(async () => {
|
|
238
|
+
this.setInitExpressions();
|
|
238
239
|
await this.setMapView();
|
|
239
240
|
});
|
|
240
241
|
}
|
|
@@ -313,15 +314,25 @@ const CrowdsourceReporter = class {
|
|
|
313
314
|
this._layers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
|
|
314
315
|
return this.reportingOptions[layerId].visible;
|
|
315
316
|
}) : [];
|
|
317
|
+
this.setInitExpressions();
|
|
316
318
|
await this.setMapView();
|
|
317
319
|
});
|
|
318
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* StencilJS: Called before every render().
|
|
323
|
+
* Update the filter list's initial definition expressions when the filter list component is available
|
|
324
|
+
*/
|
|
325
|
+
componentWillRender() {
|
|
326
|
+
if (this._flowItems.includes('filter-panel')) {
|
|
327
|
+
void this._filterList?.updateInitDefExpressions({ initDefExpressions: this._initDefExpressions });
|
|
328
|
+
}
|
|
329
|
+
}
|
|
319
330
|
/**
|
|
320
331
|
* Renders the component.
|
|
321
332
|
*/
|
|
322
333
|
render() {
|
|
323
334
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
324
|
-
return (h(Host, { key: '
|
|
335
|
+
return (h(Host, { key: 'f1dd6d85210210a73fff30a5d98370da1834be7b' }, this._reportSubmitted && h("calcite-alert", { key: 'b84760fcbf4bfcf0f038be272f74eda97ce17bd9', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '27aa04dd8575ad27898f7848bc2733a03a33e70f', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '3fc2721bed573ad10bbb1c81af126e2e8ca90b12', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '4993e5c5b52d650b094c2890d0e4516cc87ffb69', slot: "title" }, this._translations.error), h("div", { key: '272b17f4c0239d8b295d6f2c0c02f1ba236d840d', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '5b9e1a2bd129888ec0764ad9b05e5056653d3c33', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: 'bd428297f5fe85cbf7edc42c61c64c299d7954b7', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '2aa1927ca27f9ec15a16f8e68905a1cf203ef833', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '4bff5fb03586edf0f9ea21649d1de4c34034e539', slot: "title" }, this._translations.error), h("div", { key: '7ea6c71dbbac15c2f43242ba00c9e461177051a1', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '3aa6bfc19a1e82ab90d2ab42aa9a577b3a2b6d8f' }, h("calcite-shell", { key: 'f27355d4f655c0a0931158f38f0be3eb28f6c4d4', "content-behind": true }, this._getReporter()))));
|
|
325
336
|
}
|
|
326
337
|
//--------------------------------------------------------------------------
|
|
327
338
|
//
|
|
@@ -385,7 +396,6 @@ const CrowdsourceReporter = class {
|
|
|
385
396
|
break;
|
|
386
397
|
case "filter-panel":
|
|
387
398
|
renderLists.push(this.getFilterPanel());
|
|
388
|
-
void this._restoreFilters();
|
|
389
399
|
break;
|
|
390
400
|
case "feature-details":
|
|
391
401
|
renderLists.push(this.getFeatureDetailsFlowItem());
|
|
@@ -432,20 +442,6 @@ const CrowdsourceReporter = class {
|
|
|
432
442
|
return (h("calcite-popover", { autoClose: true, label: "", offsetDistance: 0, placement: this.isMobile ? "leading-start" : "bottom-start", pointerDisabled: true, referenceElement: "sort-popover" }, h("calcite-list", { "selection-mode": "single" }, h("calcite-list-item", { label: this._translations.sortNewest, onCalciteListItemSelect: () => { void this.sortOptionClick(this._selectedLayer.objectIdField, "desc", "sortNewest"); }, selected: this._updatedSortOption === "sortNewest", value: "sortNewest" }), h("calcite-list-item", { label: this._translations.sortOldest, onCalciteListItemSelect: () => { void this.sortOptionClick(this._selectedLayer.objectIdField, "asc", "sortOldest"); }, selected: this._updatedSortOption === "sortOldest", value: "sortOldest" }), canSortByVotes &&
|
|
433
443
|
h(Fragment, null, h("calcite-list-item", { label: this._translations.sortHighestVoted, onCalciteListItemSelect: () => { void this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField, "desc", "sortHighestVoted"); }, selected: this._updatedSortOption === "sortHighestVoted", value: "sortHighestVoted" }), h("calcite-list-item", { label: this._translations.sortLowestVoted, onCalciteListItemSelect: () => { void this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField, "asc", "sortLowestVoted"); }, selected: this._updatedSortOption === "sortLowestVoted", value: "sortLowestVoted" })))));
|
|
434
444
|
}
|
|
435
|
-
/**
|
|
436
|
-
* Restores the applied filters
|
|
437
|
-
* @protected
|
|
438
|
-
*/
|
|
439
|
-
_restoreFilters() {
|
|
440
|
-
// call the restore function when instant-apps-filter-list is ready
|
|
441
|
-
setTimeout(() => {
|
|
442
|
-
const canRestoreFilter = this._filterList && this._filterUrlParams && this._filterInitState;
|
|
443
|
-
if (canRestoreFilter) {
|
|
444
|
-
void this._filterList.restoreFilters(this._filterUrlParams[0], this._filterInitState);
|
|
445
|
-
}
|
|
446
|
-
this._filterInitState = null;
|
|
447
|
-
}, 200);
|
|
448
|
-
}
|
|
449
445
|
/**
|
|
450
446
|
* Reset the filter
|
|
451
447
|
* @protected
|
|
@@ -453,8 +449,6 @@ const CrowdsourceReporter = class {
|
|
|
453
449
|
async _handleFilterListReset() {
|
|
454
450
|
//on reset filter list reset the filter states
|
|
455
451
|
this._filterActive = false;
|
|
456
|
-
this._filterUrlParams = null;
|
|
457
|
-
this._filterInitState = null;
|
|
458
452
|
}
|
|
459
453
|
/**
|
|
460
454
|
* Check if the layers definitionExpression has been modified and update the feature list depending on the applied filters
|
|
@@ -462,9 +456,7 @@ const CrowdsourceReporter = class {
|
|
|
462
456
|
*/
|
|
463
457
|
async _handleFilterUpdate(active) {
|
|
464
458
|
this._showLoadingIndicator = true;
|
|
465
|
-
//if filters are applied the url params will be generated
|
|
466
459
|
this._filterActive = active;
|
|
467
|
-
this._filterUrlParams = this._filterList.urlParams.getAll('filter');
|
|
468
460
|
await this._featureList.refresh();
|
|
469
461
|
this._showLoadingIndicator = false;
|
|
470
462
|
}
|
|
@@ -631,10 +623,6 @@ const CrowdsourceReporter = class {
|
|
|
631
623
|
if (evt.detail.layerId && evt.detail.layerName) {
|
|
632
624
|
await this.setSelectedLayer(evt.detail.layerId, evt.detail.layerName);
|
|
633
625
|
}
|
|
634
|
-
// reset the applied filter when switching to another layer
|
|
635
|
-
if (this._selectedLayerId !== this._prevSelectedLayerId && this._filterActive) {
|
|
636
|
-
await this.resetFilter();
|
|
637
|
-
}
|
|
638
626
|
void this.updateNonVisibleLayersOnMap(true);
|
|
639
627
|
// get the form template elements to pass in create-feature to create a LEVELID field in feature-form
|
|
640
628
|
this._getFormElements();
|
|
@@ -706,28 +694,18 @@ const CrowdsourceReporter = class {
|
|
|
706
694
|
};
|
|
707
695
|
this._updatedSortOption = "sortNewest";
|
|
708
696
|
await this.setSelectedLayer(evt.detail.layerId, evt.detail.layerName);
|
|
697
|
+
void this.handleSelectedLayersFilter();
|
|
709
698
|
this._flowItems = [...this._flowItems, "feature-list"];
|
|
710
|
-
// reset the applied filter when switching to another layer
|
|
711
|
-
if (this._selectedLayerId !== this._prevSelectedLayerId && this._filterActive) {
|
|
712
|
-
await this.resetFilter();
|
|
713
|
-
}
|
|
714
699
|
this._prevSelectedLayerId = this._selectedLayerId;
|
|
715
700
|
}
|
|
716
|
-
/**
|
|
717
|
-
* Reset's the applied filter
|
|
718
|
-
* @protected
|
|
719
|
-
*/
|
|
720
|
-
async resetFilter() {
|
|
721
|
-
const prevLayer = await getLayerOrTable(this.mapView, this._prevSelectedLayerId);
|
|
722
|
-
prevLayer.definitionExpression = this._filterInitState.initDefExpressions[this._prevSelectedLayerId];
|
|
723
|
-
void this._handleFilterListReset();
|
|
724
|
-
}
|
|
725
701
|
/**
|
|
726
702
|
* On back from filter panel get the filter's init state
|
|
727
703
|
* @protected
|
|
728
704
|
*/
|
|
729
705
|
async backFromFilterPanel() {
|
|
730
|
-
this.
|
|
706
|
+
if (this._filterList != null) {
|
|
707
|
+
this._currentLayerExpressions = await this._filterList.getCurrentLayerExpressions();
|
|
708
|
+
}
|
|
731
709
|
await this._featureList.refresh();
|
|
732
710
|
this.backFromSelectedPanel();
|
|
733
711
|
}
|
|
@@ -842,9 +820,8 @@ const CrowdsourceReporter = class {
|
|
|
842
820
|
* @protected
|
|
843
821
|
*/
|
|
844
822
|
getFeatureListFlowItem(layerId, layerName) {
|
|
845
|
-
const layerExpressions = this.layerExpressions?.filter((exp) => exp.id === this._selectedLayerId);
|
|
846
823
|
const canCreateReports = this._getLayersConfig(this._selectedLayerId)?.reporting && this._layerItemsHash[this._selectedLayerId].supportsAdd;
|
|
847
|
-
const showFilterIcon =
|
|
824
|
+
const showFilterIcon = this._currentLayerExpressions?.length > 0;
|
|
848
825
|
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this._toggleSort(), h("calcite-action", { icon: "sort-ascending-arrow", id: "sort-popover", slot: "header-actions-end", text: this._translations.sort, title: this._translations.sort }), showFilterIcon && h("calcite-action", { icon: "filter", indicator: this._filterActive, onClick: () => { this._flowItems = [...this._flowItems, "filter-panel"]; }, slot: "header-actions-end", text: this._translations.filter, title: this._translations.filter }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports && canCreateReports &&
|
|
849
826
|
h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { applyLayerViewFilter: this.showMyReportsOnly, class: "height-full", highlightOnHover: true, locale: this.locale, mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 30, ref: el => this._featureList = el, reportingOptions: this.reportingOptions, selectedLayerId: layerId, showFeatureSymbol: this.showFeatureSymbol, sortingInfo: this._updatedSorting }))));
|
|
850
827
|
}
|
|
@@ -854,8 +831,7 @@ const CrowdsourceReporter = class {
|
|
|
854
831
|
* @protected
|
|
855
832
|
*/
|
|
856
833
|
getFilterPanel() {
|
|
857
|
-
|
|
858
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations?.filterLayerTitle?.replace("{{title}}", this._selectedLayerName), loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromFilterPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._filterActive, onClick: () => { void this._filterList?.forceReset(); }, width: "full" }, this._translations.resetFilter), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromFilterPanel.bind(this), width: "full" }, this._translations.close))), h("calcite-panel", { "full-height": true }, h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtnOnClick: () => undefined, comboboxOverlayPositioning: "fixed", layerExpressions: currentLayersExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(this._filterList.filterCount > 0), ref: (el) => this._filterList = el, resetBtn: false, resetFiltersOnDisconnect: false, view: this.mapView, zoomBtn: false }))));
|
|
834
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations?.filterLayerTitle?.replace("{{title}}", this._selectedLayerName), loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromFilterPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._filterActive, onClick: this.resetFilterList.bind(this), width: "full" }, this._translations.resetFilter), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromFilterPanel.bind(this), width: "full" }, this._translations.close))), h("calcite-panel", { "full-height": true }, h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtnOnClick: () => undefined, comboboxOverlayPositioning: "fixed", layerExpressions: this._currentLayerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(this._filterList.filterCount > 0), ref: (el) => this._filterList = el, resetBtn: false, resetFiltersOnDisconnect: false, view: this.mapView, zoomBtn: false }))));
|
|
859
835
|
}
|
|
860
836
|
/**
|
|
861
837
|
* Returns the calcite-flow item for feature details
|
|
@@ -915,6 +891,7 @@ const CrowdsourceReporter = class {
|
|
|
915
891
|
else {
|
|
916
892
|
if (this._editableLayerIds.length > 1) {
|
|
917
893
|
void this.setSelectedLayer('', '');
|
|
894
|
+
void this.handlePrevLayersFilter();
|
|
918
895
|
}
|
|
919
896
|
this._currentFeatureId = '';
|
|
920
897
|
}
|
|
@@ -1171,7 +1148,8 @@ const CrowdsourceReporter = class {
|
|
|
1171
1148
|
detail: this._editableLayerIds
|
|
1172
1149
|
};
|
|
1173
1150
|
await this.layerListLoaded(evt);
|
|
1174
|
-
|
|
1151
|
+
await this.setSelectedLayer(this._validLayers[0].id, this._validLayers[0].title);
|
|
1152
|
+
void this.handleSelectedLayersFilter();
|
|
1175
1153
|
}
|
|
1176
1154
|
/**
|
|
1177
1155
|
* Updates the share url for current selected feature
|
|
@@ -1231,6 +1209,91 @@ const CrowdsourceReporter = class {
|
|
|
1231
1209
|
}
|
|
1232
1210
|
}
|
|
1233
1211
|
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Handles updating the current layer expressions and definition expression for the selected layer
|
|
1214
|
+
* @protected
|
|
1215
|
+
*/
|
|
1216
|
+
async handleSelectedLayersFilter() {
|
|
1217
|
+
if (this._selectedLayer) {
|
|
1218
|
+
this._currentLayerExpressions = this.layerExpressions ? this.layerExpressions.filter(exp => exp.id === this._selectedLayerId) : [];
|
|
1219
|
+
this.setActiveDefinitionExpressions();
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* Handles updating the previous layer's definition expression to it's initial definition expression
|
|
1224
|
+
* @protected
|
|
1225
|
+
*/
|
|
1226
|
+
async handlePrevLayersFilter() {
|
|
1227
|
+
if (this._prevSelectedLayerId) {
|
|
1228
|
+
const prevLayer = await getLayerOrTable(this.mapView, this._prevSelectedLayerId);
|
|
1229
|
+
if (prevLayer) {
|
|
1230
|
+
prevLayer.definitionExpression = this._initDefExpressions[this._prevSelectedLayerId];
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
/**
|
|
1235
|
+
* Resets the selected layer's definition expression with the initial definition expression
|
|
1236
|
+
* @protected
|
|
1237
|
+
*/
|
|
1238
|
+
resetFilterList() {
|
|
1239
|
+
void this._filterList?.forceReset();
|
|
1240
|
+
if (this._selectedLayer != null) {
|
|
1241
|
+
this._selectedLayer.definitionExpression = this._initDefExpressions[this._selectedLayerId];
|
|
1242
|
+
this._filterActive = false;
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Sets the active definition expressions for the selected layer
|
|
1247
|
+
* @protected
|
|
1248
|
+
*/
|
|
1249
|
+
setActiveDefinitionExpressions() {
|
|
1250
|
+
if (this._selectedLayer == null) {
|
|
1251
|
+
return;
|
|
1252
|
+
}
|
|
1253
|
+
const defExpressions = [];
|
|
1254
|
+
if (this._currentLayerExpressions?.length > 0) {
|
|
1255
|
+
const layerExpression = this._currentLayerExpressions[0];
|
|
1256
|
+
for (const expression of layerExpression.expressions) {
|
|
1257
|
+
const { active, definitionExpression } = expression;
|
|
1258
|
+
if (active && definitionExpression) {
|
|
1259
|
+
defExpressions.push(`(${definitionExpression})`);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
this._filterActive = defExpressions.length > 0;
|
|
1263
|
+
this.updateFilterLayerDefExpression(defExpressions, layerExpression.operator);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* Updates the selected layer's definition expression based on the active expressions
|
|
1268
|
+
* @protected
|
|
1269
|
+
*/
|
|
1270
|
+
updateFilterLayerDefExpression(defExpressions, operator) {
|
|
1271
|
+
const initDefExpression = this._initDefExpressions[this._selectedLayerId];
|
|
1272
|
+
const combinedExpressions = defExpressions?.length > 0 && initDefExpression != null
|
|
1273
|
+
? `(${defExpressions.join(operator)}) AND (${initDefExpression})`
|
|
1274
|
+
: defExpressions.length > 0
|
|
1275
|
+
? defExpressions.join(operator)
|
|
1276
|
+
: initDefExpression;
|
|
1277
|
+
this._selectedLayer.definitionExpression = combinedExpressions;
|
|
1278
|
+
}
|
|
1279
|
+
/**
|
|
1280
|
+
* Sets the initial definition expressions for all the feature layers
|
|
1281
|
+
* @protected
|
|
1282
|
+
*/
|
|
1283
|
+
setInitExpressions() {
|
|
1284
|
+
this._initDefExpressions = {};
|
|
1285
|
+
if (this.mapView == null) {
|
|
1286
|
+
return;
|
|
1287
|
+
}
|
|
1288
|
+
const map = this.mapView.map;
|
|
1289
|
+
map.allLayers.concat(map.allTables).forEach(layer => {
|
|
1290
|
+
if (layer.type !== "feature") {
|
|
1291
|
+
return;
|
|
1292
|
+
}
|
|
1293
|
+
const fl = layer;
|
|
1294
|
+
this._initDefExpressions[fl.id] = fl.definitionExpression;
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1234
1297
|
static get watchers() { return {
|
|
1235
1298
|
"isMobile": ["isMobileWatchHandler"],
|
|
1236
1299
|
"locale": ["localeWatchHandler"],
|
|
@@ -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 { l as loadModules } from './loadModules-
|
|
6
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
7
7
|
import { c as createStore } from './index-39bc2e6d.js';
|
|
8
8
|
|
|
9
9
|
async function getMergedEffect(presetLayerEffect, featureLayerView, type) {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { g as getMessages } from './locale-
|
|
8
|
-
import './loadModules-
|
|
7
|
+
import { g as getMessages } from './locale-77038bee.js';
|
|
8
|
+
import './loadModules-d5a25252.js';
|
|
9
9
|
import './esri-loader-c6842c6b.js';
|
|
10
10
|
import './_commonjsHelpers-089957fe.js';
|
|
11
11
|
import './languageUtil-2b6e191a.js';
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, F as Fragment } from './index-904bc599.js';
|
|
7
|
-
import { d as ESettingType, e as isCalciteModeDark, f as ECalciteMode, s as store, h as EInputType, E as EIcons, l as languageTranslatorState, j as getT9nData, c as getUIDataKeys } from './utils-
|
|
8
|
-
import './locale-
|
|
9
|
-
import './loadModules-
|
|
7
|
+
import { d as ESettingType, e as isCalciteModeDark, f as ECalciteMode, s as store, h as EInputType, E as EIcons, l as languageTranslatorState, j as getT9nData, c as getUIDataKeys } from './utils-0a78d3c9.js';
|
|
8
|
+
import './locale-77038bee.js';
|
|
9
|
+
import './loadModules-d5a25252.js';
|
|
10
10
|
import './esri-loader-c6842c6b.js';
|
|
11
11
|
import './_commonjsHelpers-089957fe.js';
|
|
12
12
|
import './languageUtil-2b6e191a.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { l as loadModules } from './loadModules-
|
|
7
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
8
8
|
import './esri-loader-c6842c6b.js';
|
|
9
9
|
import './_commonjsHelpers-089957fe.js';
|
|
10
10
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { g as getMessages } from './locale-
|
|
8
|
-
import { l as loadModules } from './loadModules-
|
|
7
|
+
import { g as getMessages } from './locale-77038bee.js';
|
|
8
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
9
9
|
import { g as getMode } from './mode-8c5f5dc9.js';
|
|
10
10
|
import './languageUtil-2b6e191a.js';
|
|
11
11
|
import './esri-loader-c6842c6b.js';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { l as loadModules } from './loadModules-
|
|
8
|
-
import { g as getMessages } from './locale-
|
|
7
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
8
|
+
import { g as getMessages } from './locale-77038bee.js';
|
|
9
9
|
import { g as getMode } from './mode-8c5f5dc9.js';
|
|
10
10
|
import './esri-loader-c6842c6b.js';
|
|
11
11
|
import './_commonjsHelpers-089957fe.js';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { l as loadModules } from './loadModules-
|
|
8
|
-
import { g as getMessages } from './locale-
|
|
7
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
8
|
+
import { g as getMessages } from './locale-77038bee.js';
|
|
9
9
|
import { g as getMode } from './mode-8c5f5dc9.js';
|
|
10
10
|
import './esri-loader-c6842c6b.js';
|
|
11
11
|
import './_commonjsHelpers-089957fe.js';
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { h, r as registerInstance, f as forceUpdate, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { h as handleFilterChange, s as store, g as getTheme, v as validateInteractivity, a as getParentLegendElementInfoData, i as interactiveLegendState, b as getCategoryData, c as checkNoneSelected, d as handleFeatureCount, e as generateData, f as getAllActiveLayerInfos, j as createInteractiveLegendDataForLayer, u as updateStore, k as handleFilter, l as getIntLegendLayerData } from './helpers-
|
|
7
|
+
import { h as handleFilterChange, s as store, g as getTheme, v as validateInteractivity, a as getParentLegendElementInfoData, i as interactiveLegendState, b as getCategoryData, c as checkNoneSelected, d as handleFeatureCount, e as generateData, f as getAllActiveLayerInfos, j as createInteractiveLegendDataForLayer, u as updateStore, k as handleFilter, l as getIntLegendLayerData } from './helpers-91ca0f44.js';
|
|
8
8
|
import { c as commonjsGlobal } from './_commonjsHelpers-089957fe.js';
|
|
9
|
-
import { l as loadModules } from './loadModules-
|
|
9
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
10
10
|
import './index-39bc2e6d.js';
|
|
11
11
|
import './esri-loader-c6842c6b.js';
|
|
12
12
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, f as forceUpdate, h, g as getElement, c as createEvent } from './index-904bc599.js';
|
|
7
|
-
import { l as loadModules } from './loadModules-
|
|
8
|
-
import { s as store, g as getTheme, i as interactiveLegendState, r as getCategoriesArray, t as checkNestedUniqueSymbol, w as calculateTotalFeatureCountForNestedSymbols, n as checkRelationshipRamp, x as calculateTotalCount, y as getNestedInfoData, l as getIntLegendLayerData, v as validateInteractivity } from './helpers-
|
|
7
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
8
|
+
import { s as store, g as getTheme, i as interactiveLegendState, r as getCategoriesArray, t as checkNestedUniqueSymbol, w as calculateTotalFeatureCountForNestedSymbols, n as checkRelationshipRamp, x as calculateTotalCount, y as getNestedInfoData, l as getIntLegendLayerData, v as validateInteractivity } from './helpers-91ca0f44.js';
|
|
9
9
|
import './esri-loader-c6842c6b.js';
|
|
10
10
|
import './_commonjsHelpers-089957fe.js';
|
|
11
11
|
import './index-39bc2e6d.js';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { v as validateInteractivity, g as getTheme } from './helpers-
|
|
8
|
-
import './loadModules-
|
|
7
|
+
import { v as validateInteractivity, g as getTheme } from './helpers-91ca0f44.js';
|
|
8
|
+
import './loadModules-d5a25252.js';
|
|
9
9
|
import './esri-loader-c6842c6b.js';
|
|
10
10
|
import './_commonjsHelpers-089957fe.js';
|
|
11
11
|
import './index-39bc2e6d.js';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, f as forceUpdate, h, g as getElement, c as createEvent } from './index-904bc599.js';
|
|
7
|
-
import { g as getTheme, m as checkNestedUniqueSymbolLegendElement, s as store, i as interactiveLegendState, a as getParentLegendElementInfoData, z as zoomTo, n as checkRelationshipRamp, l as getIntLegendLayerData, o as showAllNestedUniqueSymbol, u as updateStore, p as showAll, q as getMergedEffect } from './helpers-
|
|
8
|
-
import { l as loadModules } from './loadModules-
|
|
7
|
+
import { g as getTheme, m as checkNestedUniqueSymbolLegendElement, s as store, i as interactiveLegendState, a as getParentLegendElementInfoData, z as zoomTo, n as checkRelationshipRamp, l as getIntLegendLayerData, o as showAllNestedUniqueSymbol, u as updateStore, p as showAll, q as getMergedEffect } from './helpers-91ca0f44.js';
|
|
8
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
9
9
|
import './index-39bc2e6d.js';
|
|
10
10
|
import './esri-loader-c6842c6b.js';
|
|
11
11
|
import './_commonjsHelpers-089957fe.js';
|
|
@@ -345,15 +345,29 @@ const InstantAppsInteractiveLegendRelationship = class {
|
|
|
345
345
|
if (!cellGroup)
|
|
346
346
|
return;
|
|
347
347
|
cellGroup.map((cell, cellIndex) => {
|
|
348
|
-
var _a, _b;
|
|
348
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
349
349
|
const uvInfos = ((_b = (_a = this.activeLayerInfo) === null || _a === void 0 ? void 0 : _a.layer) === null || _b === void 0 ? void 0 : _b.renderer).uniqueValueInfos;
|
|
350
350
|
if (uvInfos[cellIndex]) {
|
|
351
|
-
const
|
|
351
|
+
const CIMSymbolColor_Index = (_g = (_f = (_e = (_d = (_c = uvInfos === null || uvInfos === void 0 ? void 0 : uvInfos[cellIndex]) === null || _c === void 0 ? void 0 : _c.symbol) === null || _d === void 0 ? void 0 : _d['data']) === null || _e === void 0 ? void 0 : _e.symbol) === null || _f === void 0 ? void 0 : _f.symbolLayers) === null || _g === void 0 ? void 0 : _g[1].color;
|
|
352
|
+
const colorFromUVInfo_Index = (_j = (_h = uvInfos === null || uvInfos === void 0 ? void 0 : uvInfos[cellIndex]) === null || _h === void 0 ? void 0 : _h.symbol) === null || _j === void 0 ? void 0 : _j.color;
|
|
352
353
|
uvInfos.forEach((uvInfo, index) => {
|
|
353
|
-
|
|
354
|
-
const
|
|
355
|
-
|
|
354
|
+
var _a, _b, _c, _d, _e;
|
|
355
|
+
const colorFromUVInfo = (_a = uvInfo === null || uvInfo === void 0 ? void 0 : uvInfo.symbol) === null || _a === void 0 ? void 0 : _a.color;
|
|
356
|
+
const CIMSymbolColor = (_e = (_d = (_c = (_b = uvInfo === null || uvInfo === void 0 ? void 0 : uvInfo.symbol) === null || _b === void 0 ? void 0 : _b['data']) === null || _c === void 0 ? void 0 : _c.symbol) === null || _d === void 0 ? void 0 : _d.symbolLayers) === null || _e === void 0 ? void 0 : _e[1].color;
|
|
357
|
+
let match = false;
|
|
358
|
+
if (CIMSymbolColor) {
|
|
359
|
+
match = CIMSymbolColor.every((value, i) => value === CIMSymbolColor_Index[i]);
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
match =
|
|
363
|
+
colorFromUVInfo.r === colorFromUVInfo_Index.r &&
|
|
364
|
+
colorFromUVInfo.g === colorFromUVInfo_Index.g &&
|
|
365
|
+
colorFromUVInfo.b === colorFromUVInfo_Index.b &&
|
|
366
|
+
colorFromUVInfo.a === colorFromUVInfo_Index.a;
|
|
367
|
+
}
|
|
368
|
+
if (match) {
|
|
356
369
|
this.setCellAttributes(cell, index);
|
|
370
|
+
}
|
|
357
371
|
});
|
|
358
372
|
cell.classList.add('esri-interactive-legend__svg-rect-element');
|
|
359
373
|
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, f as forceUpdate, h, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { l as loadModules } from './loadModules-
|
|
8
|
-
import { g as getMessages } from './locale-
|
|
9
|
-
import { s as store, g as getTheme } from './helpers-
|
|
7
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
8
|
+
import { g as getMessages } from './locale-77038bee.js';
|
|
9
|
+
import { s as store, g as getTheme } from './helpers-91ca0f44.js';
|
|
10
10
|
import './esri-loader-c6842c6b.js';
|
|
11
11
|
import './_commonjsHelpers-089957fe.js';
|
|
12
12
|
import './languageUtil-2b6e191a.js';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { g as getMessages } from './locale-
|
|
8
|
-
import './loadModules-
|
|
7
|
+
import { g as getMessages } from './locale-77038bee.js';
|
|
8
|
+
import './loadModules-d5a25252.js';
|
|
9
9
|
import './esri-loader-c6842c6b.js';
|
|
10
10
|
import './_commonjsHelpers-089957fe.js';
|
|
11
11
|
import './languageUtil-2b6e191a.js';
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { g as getMessages } from './utils-
|
|
8
|
-
import { l as loadModules } from './loadModules-
|
|
9
|
-
import { a as getDefaultLanguage } from './locale-
|
|
10
|
-
import { g as getPortalItemResource, f as fetchResourceData, L as LANGUAGE_DATA } from './constants-
|
|
7
|
+
import { g as getMessages } from './utils-0a78d3c9.js';
|
|
8
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
9
|
+
import { a as getDefaultLanguage } from './locale-77038bee.js';
|
|
10
|
+
import { g as getPortalItemResource, f as fetchResourceData, L as LANGUAGE_DATA } from './constants-637a40f5.js';
|
|
11
11
|
import './index-39bc2e6d.js';
|
|
12
12
|
import './esri-loader-c6842c6b.js';
|
|
13
13
|
import './_commonjsHelpers-089957fe.js';
|
|
@@ -38,7 +38,7 @@ const InstantAppsLanguageSwitcher = class {
|
|
|
38
38
|
this.messages = await getMessages(document.createElement('instant-apps-language-translator'));
|
|
39
39
|
try {
|
|
40
40
|
this.portalItemResource = (await getPortalItemResource(this.portalItem));
|
|
41
|
-
const t9nData = await fetchResourceData(
|
|
41
|
+
const t9nData = await fetchResourceData(this.portalItemResource);
|
|
42
42
|
this.t9nData = t9nData !== null && t9nData !== void 0 ? t9nData : {};
|
|
43
43
|
}
|
|
44
44
|
catch (err) {
|
|
@@ -79,7 +79,7 @@ const InstantAppsLanguageSwitcher = class {
|
|
|
79
79
|
const trigger = this.renderTrigger();
|
|
80
80
|
const dropdown = this.renderDropdownItems();
|
|
81
81
|
const defaultLocale = this.renderDefaultLocale();
|
|
82
|
-
return (h("calcite-dropdown", { key: '
|
|
82
|
+
return (h("calcite-dropdown", { key: '7f9b97b70ec4a84ebd17d0d41ba598ae15304f10', onCalciteDropdownBeforeOpen: () => (this.trigger.iconEnd = 'chevron-up'), onCalciteDropdownBeforeClose: () => (this.trigger.iconEnd = 'chevron-down'), "overlay-positioning": this.calciteDropdownOverlayPositioning, "width-scale": "m" }, trigger, defaultLocale, dropdown));
|
|
83
83
|
}
|
|
84
84
|
renderDefaultLocale() {
|
|
85
85
|
const { userLocale } = this;
|
|
@@ -161,7 +161,7 @@ const InstantAppsLanguageSwitcher = class {
|
|
|
161
161
|
async refresh() {
|
|
162
162
|
try {
|
|
163
163
|
const resource = (await getPortalItemResource(this.portalItem));
|
|
164
|
-
const t9nData = await fetchResourceData(
|
|
164
|
+
const t9nData = await fetchResourceData(resource);
|
|
165
165
|
this.t9nData = t9nData;
|
|
166
166
|
const refreshedData = { locale: this.selectedLanguage, data: t9nData[this.selectedLanguage] };
|
|
167
167
|
this.selectedLanguageUpdated.emit(refreshedData);
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { i as initExternalCKEditorStyles, g as getMessages, a as generateUIData, s as store, E as EIcons, b as getLocales, l as languageTranslatorState, c as getUIDataKeys, u as updateLastSave } from './utils-
|
|
8
|
-
import { l as loadModules } from './loadModules-
|
|
9
|
-
import { c as getComponentClosestLanguage } from './locale-
|
|
10
|
-
import { g as getPortalItemResource, f as fetchResourceData, L as LANGUAGE_DATA } from './constants-
|
|
7
|
+
import { i as initExternalCKEditorStyles, g as getMessages, a as generateUIData, s as store, E as EIcons, b as getLocales, l as languageTranslatorState, c as getUIDataKeys, u as updateLastSave } from './utils-0a78d3c9.js';
|
|
8
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
9
|
+
import { c as getComponentClosestLanguage } from './locale-77038bee.js';
|
|
10
|
+
import { g as getPortalItemResource, f as fetchResourceData, L as LANGUAGE_DATA } from './constants-637a40f5.js';
|
|
11
11
|
import './index-39bc2e6d.js';
|
|
12
12
|
import './esri-loader-c6842c6b.js';
|
|
13
13
|
import './_commonjsHelpers-089957fe.js';
|
|
@@ -109,14 +109,14 @@ const InstantAppsLanguageTranslator = class {
|
|
|
109
109
|
try {
|
|
110
110
|
const portalItemResource = (await getPortalItemResource(this.portalItem));
|
|
111
111
|
store.set('portalItemResource', portalItemResource);
|
|
112
|
-
const t9nData = await fetchResourceData(
|
|
112
|
+
const t9nData = await fetchResourceData(portalItemResource);
|
|
113
113
|
store.set('lastSave', t9nData.lastSave);
|
|
114
114
|
store.set('portalItemResourceT9n', t9nData !== null && t9nData !== void 0 ? t9nData : {});
|
|
115
115
|
}
|
|
116
116
|
catch (_a) { }
|
|
117
117
|
}
|
|
118
118
|
render() {
|
|
119
|
-
return (h(Host, { key: '
|
|
119
|
+
return (h(Host, { key: 'bbd0cf37c4aa5e145ee14cc17f8a005bcc28ac9c' }, this.renderModal(), this.renderPopoverTip()));
|
|
120
120
|
}
|
|
121
121
|
renderModal() {
|
|
122
122
|
return (h("calcite-modal", { open: this.open, scale: "l", fullscreen: true, onCalciteModalClose: this.close.bind(this) }, this.renderHeader(), this.renderContent(), this.renderPrimaryContent()));
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { g as getMessages } from './locale-
|
|
8
|
-
import './loadModules-
|
|
7
|
+
import { g as getMessages } from './locale-77038bee.js';
|
|
8
|
+
import './loadModules-d5a25252.js';
|
|
9
9
|
import './esri-loader-c6842c6b.js';
|
|
10
10
|
import './_commonjsHelpers-089957fe.js';
|
|
11
11
|
import './languageUtil-2b6e191a.js';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { g as getMessages } from './locale-
|
|
8
|
-
import './loadModules-
|
|
7
|
+
import { g as getMessages } from './locale-77038bee.js';
|
|
8
|
+
import './loadModules-d5a25252.js';
|
|
9
9
|
import './esri-loader-c6842c6b.js';
|
|
10
10
|
import './_commonjsHelpers-089957fe.js';
|
|
11
11
|
import './languageUtil-2b6e191a.js';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-904bc599.js';
|
|
7
|
-
import { l as loadModules } from './loadModules-
|
|
8
|
-
import { b as getLocaleComponentStrings } from './locale-
|
|
7
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
8
|
+
import { b as getLocaleComponentStrings } from './locale-77038bee.js';
|
|
9
9
|
import { w as widthBreakpoints } from './breakpoints-3afa0fd9.js';
|
|
10
10
|
import './esri-loader-c6842c6b.js';
|
|
11
11
|
import './_commonjsHelpers-089957fe.js';
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, g as getElement, H as Host } from './index-904bc599.js';
|
|
7
|
-
import { l as loadModules } from './loadModules-
|
|
8
|
-
import { g as getMessages } from './locale-
|
|
7
|
+
import { l as loadModules } from './loadModules-d5a25252.js';
|
|
8
|
+
import { g as getMessages } from './locale-77038bee.js';
|
|
9
9
|
import './esri-loader-c6842c6b.js';
|
|
10
10
|
import './_commonjsHelpers-089957fe.js';
|
|
11
11
|
import './languageUtil-2b6e191a.js';
|