@esri/solutions-components 0.8.22 → 0.8.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/arcgis-login.cjs.entry.js +1 -1
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -1
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-alert_4.cjs.entry.js +12 -11
- package/dist/cjs/{calcite-avatar.cjs.entry.js → calcite-avatar_2.cjs.entry.js} +62 -0
- package/dist/cjs/calcite-block_5.cjs.entry.js +12 -3
- package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +419 -0
- package/dist/cjs/{calcite-dropdown_4.cjs.entry.js → calcite-dropdown_2.cjs.entry.js} +12 -435
- package/dist/cjs/calcite-flow_6.cjs.entry.js +25 -29
- package/dist/cjs/card-manager_3.cjs.entry.js +9 -3
- package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -4
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +57 -37
- package/dist/cjs/{downloadUtils-2e36a300.js → downloadUtils-5349717a.js} +2 -1
- package/dist/cjs/feature-list.cjs.entry.js +11 -6
- package/dist/cjs/{helpers-9347ad83.js → helpers-618a3f7d.js} +2 -1
- package/dist/cjs/{index.es-56415e48.js → index.es-aa69b58b.js} +1 -1
- package/dist/cjs/instant-apps-create.cjs.entry.js +266 -0
- package/dist/cjs/instant-apps-export.cjs.entry.js +31 -16
- package/dist/cjs/instant-apps-header.cjs.entry.js +3 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +11 -4
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-landing-page.cjs.entry.js +45 -9
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +168 -0
- package/dist/cjs/{languageSwitcher-395021d6.js → languageSwitcher-b9a1485c.js} +3 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/{popupUtils-500c1544.js → popupUtils-3e65296c.js} +17 -2
- package/dist/cjs/public-notification.cjs.entry.js +4 -4
- package/dist/cjs/resources-fa37e40f.js +26 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/arcgis-login/arcgis-login.js +1 -1
- package/dist/collection/components/basemap-gallery/basemap-gallery.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +1 -1
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/create-feature/create-feature.js +1 -1
- package/dist/collection/components/create-related-feature/create-related-feature.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +30 -8
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +57 -46
- package/dist/collection/components/feature-details/feature-details.css +2 -2
- package/dist/collection/components/feature-details/feature-details.js +56 -13
- package/dist/collection/components/feature-list/feature-list.css +1 -1
- package/dist/collection/components/feature-list/feature-list.js +23 -4
- package/dist/collection/components/info-card/info-card.js +7 -27
- package/dist/collection/components/layer-list/layer-list.js +7 -14
- package/dist/collection/components/layer-table/layer-table.js +7 -1
- package/dist/collection/components/public-notification/public-notification.js +3 -3
- package/dist/collection/demos/crowdsource-manager.html +10 -2
- package/dist/collection/demos/crowdsource-reporter.html +22 -15
- package/dist/collection/utils/interfaces.ts +1 -0
- package/dist/collection/utils/popupUtils.js +17 -2
- package/dist/collection/utils/popupUtils.ts +23 -3
- package/dist/components/arcgis-login.js +1 -1
- package/dist/components/basemap-gallery2.js +1 -1
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/calcite-navigation-user.js +1 -99
- package/dist/components/card-manager2.js +1 -1
- package/dist/components/consent-manager.js +1 -1
- package/dist/components/create-feature2.js +1 -1
- package/dist/components/create-related-feature2.js +1 -1
- package/dist/components/crowdsource-manager.js +13 -5
- package/dist/components/crowdsource-reporter.js +58 -38
- package/dist/components/downloadUtils.js +1 -1
- package/dist/components/esri-loader.js +1 -1
- package/dist/components/feature-details2.js +17 -13
- package/dist/components/feature-list2.js +7 -5
- package/dist/components/helpers.js +3 -2
- package/dist/components/html2canvas.js +1 -1
- package/dist/components/index.es.js +2 -2
- package/dist/components/info-card2.js +7 -11
- package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
- package/dist/components/instant-apps-create.js +317 -0
- package/dist/components/instant-apps-export.js +32 -16
- package/dist/components/instant-apps-filter-list2.js +6 -1
- package/dist/components/instant-apps-header2.js +3 -2
- package/dist/components/instant-apps-interactive-legend-classic2.js +13 -6
- package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
- package/dist/components/instant-apps-landing-page.js +91 -16
- package/dist/components/instant-apps-language-translator2.js +3 -1
- package/dist/components/instant-apps-sign-in.js +11 -0
- package/dist/components/instant-apps-sign-in2.js +243 -0
- package/dist/components/instant-apps-social-share2.js +8 -2
- package/dist/components/layer-list2.js +7 -14
- package/dist/components/layer-table2.js +7 -1
- package/dist/{esm/calcite-navigation-user.entry.js → components/navigation-user.js} +46 -9
- package/dist/components/popupUtils.js +17 -2
- package/dist/components/public-notification.js +3 -3
- package/dist/components/purify.js +1 -1
- package/dist/components/solution-resource.js +1 -1
- package/dist/esm/arcgis-login.entry.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +1 -1
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/calcite-alert_4.entry.js +12 -11
- package/dist/esm/{calcite-avatar.entry.js → calcite-avatar_2.entry.js} +64 -3
- package/dist/esm/calcite-block_5.entry.js +12 -3
- package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
- package/dist/esm/calcite-color-picker.entry.js +1 -1
- package/dist/esm/calcite-dropdown-group_2.entry.js +414 -0
- package/dist/esm/{calcite-dropdown_4.entry.js → calcite-dropdown_2.entry.js} +2 -423
- package/dist/esm/calcite-flow_6.entry.js +25 -29
- package/dist/esm/card-manager_3.entry.js +9 -3
- package/dist/esm/crowdsource-manager.entry.js +12 -4
- package/dist/esm/crowdsource-reporter.entry.js +57 -37
- package/dist/esm/{downloadUtils-aab31bfe.js → downloadUtils-5fa0d437.js} +2 -2
- package/dist/esm/feature-list.entry.js +11 -6
- package/dist/esm/{helpers-a5a81b9d.js → helpers-61b05164.js} +3 -2
- package/dist/esm/{index.es-43ba3006.js → index.es-57c15c9b.js} +1 -1
- package/dist/esm/instant-apps-create.entry.js +262 -0
- package/dist/esm/instant-apps-export.entry.js +31 -16
- package/dist/esm/instant-apps-header.entry.js +3 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +11 -4
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend.entry.js +1 -1
- package/dist/esm/instant-apps-landing-page.entry.js +46 -10
- package/dist/esm/instant-apps-language-switcher.entry.js +1 -1
- package/dist/esm/instant-apps-language-translator.entry.js +1 -1
- package/dist/esm/instant-apps-sign-in.entry.js +164 -0
- package/dist/esm/{languageSwitcher-a4a615e4.js → languageSwitcher-d60f03b2.js} +3 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/{popupUtils-2cc3c366.js → popupUtils-650b6bba.js} +17 -2
- package/dist/esm/public-notification.entry.js +4 -4
- package/dist/esm/resources-16800cce.js +24 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{utils-6419e941.js → utils-251cb6de.js} +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-create/instant-apps-create.css +150 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +16 -9
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +19 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-sign-in/instant-apps-sign-in.css +98 -0
- package/dist/solutions-components/demos/crowdsource-manager.html +10 -2
- package/dist/solutions-components/demos/crowdsource-reporter.html +22 -15
- package/dist/solutions-components/p-1251dcc6.entry.js +6 -0
- package/dist/solutions-components/p-16730f05.entry.js +6 -0
- package/dist/solutions-components/p-1ae3b886.entry.js +17 -0
- package/dist/solutions-components/p-1ff9eb95.entry.js +6 -0
- package/dist/solutions-components/{p-667caa6b.js → p-24bf45b7.js} +1 -1
- package/dist/solutions-components/{p-8f6e0ae5.entry.js → p-26eb1225.entry.js} +1 -1
- package/dist/solutions-components/{p-3a2e0188.entry.js → p-2c044250.entry.js} +2 -2
- package/dist/solutions-components/p-314dc933.entry.js +6 -0
- package/dist/solutions-components/p-50741707.entry.js +6 -0
- package/dist/solutions-components/p-614ebce7.js +6 -0
- package/dist/solutions-components/{p-37fc92db.js → p-6f69de4d.js} +2 -2
- package/dist/solutions-components/{p-8cff32bd.entry.js → p-72317f8e.entry.js} +2 -2
- package/dist/solutions-components/{p-df73649e.entry.js → p-77cd573b.entry.js} +1 -1
- package/dist/solutions-components/{p-c95dcdf7.entry.js → p-7883b885.entry.js} +3 -3
- package/dist/solutions-components/p-79e2e203.entry.js +6 -0
- package/dist/solutions-components/{p-968a6fd8.entry.js → p-7b17e929.entry.js} +1 -1
- package/dist/solutions-components/p-80b3eb6b.entry.js +6 -0
- package/dist/solutions-components/p-84913712.js +6 -0
- package/dist/solutions-components/p-8c500fd7.entry.js +6 -0
- package/dist/solutions-components/{p-54324eaa.entry.js → p-97e343df.entry.js} +1 -1
- package/dist/solutions-components/{p-fe9d6d06.js → p-9f56c02c.js} +1 -1
- package/dist/solutions-components/p-a1037b19.js +21 -0
- package/dist/solutions-components/{p-667c022f.entry.js → p-af4be4ce.entry.js} +1 -1
- package/dist/solutions-components/p-bb2e669d.entry.js +6 -0
- package/dist/solutions-components/p-c41997d5.js +11 -0
- package/dist/solutions-components/p-c512fcfb.entry.js +6 -0
- package/dist/solutions-components/{p-21d6360a.entry.js → p-c7f0e7a8.entry.js} +1 -1
- package/dist/solutions-components/{p-f6668347.entry.js → p-cbf0dada.entry.js} +3 -3
- package/dist/solutions-components/{p-9c7d4343.entry.js → p-cd91c3e7.entry.js} +1 -1
- package/dist/solutions-components/p-ceba37d3.entry.js +11 -0
- package/dist/solutions-components/{p-09b769b7.entry.js → p-d8a15e32.entry.js} +1 -1
- package/dist/solutions-components/p-d8da6406.entry.js +6 -0
- package/dist/solutions-components/p-da6b3c8a.entry.js +6 -0
- package/dist/solutions-components/{p-60f1055e.entry.js → p-e2400b0d.entry.js} +1 -1
- package/dist/solutions-components/p-e78be59a.entry.js +6 -0
- package/dist/solutions-components/p-f35cc7ae.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +1 -0
- package/dist/solutions-components/utils/popupUtils.ts +23 -3
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +14 -6
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +18 -7
- package/dist/types/components/feature-details/feature-details.d.ts +13 -1
- package/dist/types/components/feature-list/feature-list.d.ts +4 -0
- package/dist/types/components/info-card/info-card.d.ts +0 -4
- package/dist/types/components/layer-list/layer-list.d.ts +1 -1
- package/dist/types/components.d.ts +36 -16
- package/dist/types/preact.d.ts +10 -4
- package/dist/types/utils/interfaces.d.ts +1 -0
- package/dist/types/utils/popupUtils.d.ts +4 -0
- package/package.json +2 -2
- package/dist/cjs/calcite-navigation-user.cjs.entry.js +0 -73
- package/dist/solutions-components/p-08a1e120.js +0 -6
- package/dist/solutions-components/p-3283660c.entry.js +0 -6
- package/dist/solutions-components/p-33647277.entry.js +0 -6
- package/dist/solutions-components/p-3af0764f.entry.js +0 -6
- package/dist/solutions-components/p-48c99a48.entry.js +0 -6
- package/dist/solutions-components/p-599dcc29.js +0 -6
- package/dist/solutions-components/p-5a740f6c.entry.js +0 -6
- package/dist/solutions-components/p-64779bb2.entry.js +0 -6
- package/dist/solutions-components/p-64b4b579.entry.js +0 -11
- package/dist/solutions-components/p-88f73319.entry.js +0 -6
- package/dist/solutions-components/p-ab96dd27.entry.js +0 -6
- package/dist/solutions-components/p-bb0c7be3.entry.js +0 -17
- package/dist/solutions-components/p-bb8e3add.entry.js +0 -11
- package/dist/solutions-components/p-cbe166fc.entry.js +0 -6
- package/dist/solutions-components/p-eab95aa4.entry.js +0 -6
- package/dist/solutions-components/p-ebf82ce0.js +0 -21
- package/dist/solutions-components/p-f43d6a86.entry.js +0 -6
@@ -14,6 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
+
import { _prepareAttributeValue } from "./downloadUtils";
|
17
18
|
import { loadModules } from "./loadModules";
|
18
19
|
|
19
20
|
export class PopupUtils {
|
@@ -23,6 +24,11 @@ export class PopupUtils {
|
|
23
24
|
*/
|
24
25
|
arcade: typeof import("esri/arcade");
|
25
26
|
|
27
|
+
/**
|
28
|
+
* esri/intl: https://developers.arcgis.com/javascript/latest/api-reference/esri-intl.html
|
29
|
+
*/
|
30
|
+
intl: typeof import("esri/intl");
|
31
|
+
|
26
32
|
/**
|
27
33
|
* Get the popup title that honors arcade expressions
|
28
34
|
* @param graphic selected graphic
|
@@ -47,6 +53,7 @@ export class PopupUtils {
|
|
47
53
|
}
|
48
54
|
const layer = graphic.layer as __esri.FeatureLayer;
|
49
55
|
const popupTitle = this._removeTags(layer?.popupTemplate?.title as string);
|
56
|
+
//resolve arcade expression from the popup title
|
50
57
|
if (popupTitle.includes("{expression/expr") && layer?.popupTemplate?.expressionInfos != null) {
|
51
58
|
for (let i = 0; i < layer.popupTemplate?.expressionInfos.length; i++) {
|
52
59
|
const info = layer.popupTemplate.expressionInfos[i];
|
@@ -65,7 +72,18 @@ export class PopupUtils {
|
|
65
72
|
}
|
66
73
|
}
|
67
74
|
}
|
68
|
-
|
75
|
+
//Format field values
|
76
|
+
if (layer.popupTemplate.fieldInfos) {
|
77
|
+
layer.fields.forEach((field) => {
|
78
|
+
const attributeValue = graphic.attributes[field.name];
|
79
|
+
//get the field info from popupTemplate
|
80
|
+
const fieldInfo = layer.popupTemplate.fieldInfos.find((fInfo) => fInfo.fieldName.toLowerCase() === field.name.toLowerCase());
|
81
|
+
//format the attribute value
|
82
|
+
const formattedAttributeValue = _prepareAttributeValue(attributeValue, field.type, field.domain, fieldInfo?.format, this.intl);
|
83
|
+
attributes[`{${field.name.toUpperCase()}}`] = formattedAttributeValue;
|
84
|
+
})
|
85
|
+
}
|
86
|
+
|
69
87
|
return popupTitle?.replace(/{.*?}/g, (placeholder: string) => {
|
70
88
|
return attributes[placeholder.toUpperCase()] != null ? (attributes[placeholder.toUpperCase()] as string) : "";
|
71
89
|
});
|
@@ -93,10 +111,12 @@ export class PopupUtils {
|
|
93
111
|
* @protected
|
94
112
|
*/
|
95
113
|
protected async _initModules(): Promise<void> {
|
96
|
-
const [arcade] = await loadModules([
|
97
|
-
"esri/arcade"
|
114
|
+
const [arcade, intl] = await loadModules([
|
115
|
+
"esri/arcade",
|
116
|
+
"esri/intl"
|
98
117
|
]);
|
99
118
|
this.arcade = arcade;
|
119
|
+
this.intl = intl;
|
100
120
|
}
|
101
121
|
|
102
122
|
}
|
@@ -59,11 +59,11 @@ export declare class CrowdsourceManager {
|
|
59
59
|
*/
|
60
60
|
defaultWebmap: string;
|
61
61
|
/**
|
62
|
-
* boolean: When true a introduction
|
62
|
+
* boolean: When true a introduction window has been enabled in the consuming application.
|
63
63
|
* Also when true a floating button will be shown in the lower right of the window that
|
64
|
-
* will emit an event when clicked that the consuming application can respond to that will open the introduction
|
64
|
+
* will emit an event when clicked that the consuming application can respond to that will open the introduction window.
|
65
65
|
*/
|
66
|
-
|
66
|
+
introductionWindowEnabled: boolean;
|
67
67
|
/**
|
68
68
|
* boolean: when true the layer table will auto refresh the data
|
69
69
|
*/
|
@@ -257,9 +257,13 @@ export declare class CrowdsourceManager {
|
|
257
257
|
*/
|
258
258
|
mapInfosWatchHandler(): void;
|
259
259
|
/**
|
260
|
-
|
261
|
-
|
262
|
-
|
260
|
+
* Emitted on demand when a info button is clicked
|
261
|
+
*/
|
262
|
+
showIntroductionWindow: EventEmitter<void>;
|
263
|
+
/**
|
264
|
+
* Emitted on demand when a cover page button is clicked
|
265
|
+
*/
|
266
|
+
showCoverPage: EventEmitter<void>;
|
263
267
|
/**
|
264
268
|
* Listen for changes in feature selection and show or hide the map, popup, and table
|
265
269
|
*/
|
@@ -363,6 +367,10 @@ export declare class CrowdsourceManager {
|
|
363
367
|
* Emit the event when info button clicked
|
364
368
|
*/
|
365
369
|
protected infoButtonClick(): void;
|
370
|
+
/**
|
371
|
+
* Emit the event when cover page button clicked
|
372
|
+
*/
|
373
|
+
protected coverPageButtonClick(): void;
|
366
374
|
/**
|
367
375
|
* Get the map and card nodes based for the current layout options
|
368
376
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
*/
|
16
16
|
/// <reference types="arcgis-js-api" />
|
17
17
|
import { VNode, EventEmitter } from "../../stencil-public-runtime";
|
18
|
-
import { ILayerExpression, IMapChange, IMapClick, IMapInfo, IReportingOptions, ISearchConfiguration, ISortingInfo, theme } from "../../utils/interfaces";
|
18
|
+
import { ILayerExpression, IMapChange, IMapClick, IMapInfo, IReportingOption, IReportingOptions, ISearchConfiguration, ISortingInfo, theme } from "../../utils/interfaces";
|
19
19
|
import CrowdsourceReporter_T9n from "../../assets/t9n/crowdsource-reporter/resources.json";
|
20
20
|
import { ILayerItemsHash } from "../layer-list/layer-list";
|
21
21
|
export declare class CrowdsourceReporter {
|
@@ -145,7 +145,7 @@ export declare class CrowdsourceReporter {
|
|
145
145
|
*/
|
146
146
|
_flowItems: string[];
|
147
147
|
/**
|
148
|
-
* boolean:
|
148
|
+
* boolean: Will be true when has valid reporting layers (This will be used to show the create report button on layer list)
|
149
149
|
*/
|
150
150
|
_hasValidLayers: boolean;
|
151
151
|
/**
|
@@ -301,6 +301,10 @@ export declare class CrowdsourceReporter {
|
|
301
301
|
* __esri.FeatureLayer: Selected feature layer from the layer list
|
302
302
|
*/
|
303
303
|
protected _selectedLayer: __esri.FeatureLayer;
|
304
|
+
/**
|
305
|
+
* ILayerItemsHash: LayerDetailsHash for each layer in the map
|
306
|
+
*/
|
307
|
+
protected _layerItemsHash: ILayerItemsHash;
|
304
308
|
/**
|
305
309
|
* Called each time the mapView prop is changed.
|
306
310
|
*/
|
@@ -309,11 +313,6 @@ export declare class CrowdsourceReporter {
|
|
309
313
|
* Called each time the mapView prop is changed.
|
310
314
|
*/
|
311
315
|
mapViewWatchHandler(): Promise<void>;
|
312
|
-
/**
|
313
|
-
* On Feature details change update the Layer title and the current selected layer id
|
314
|
-
* @param evt Event hold the details of current feature graphic in the info-card
|
315
|
-
*/
|
316
|
-
selectionChanged(evt: CustomEvent): Promise<void>;
|
317
316
|
/**
|
318
317
|
* Emitted when toggle panel button is clicked in reporter
|
319
318
|
*/
|
@@ -342,6 +341,12 @@ export declare class CrowdsourceReporter {
|
|
342
341
|
* @param layerName string layerName of the selected layer
|
343
342
|
*/
|
344
343
|
protected setSelectedLayer(layerId: string, layerName: string): Promise<void>;
|
344
|
+
/**
|
345
|
+
* Returns the layers configuration
|
346
|
+
* @param layerId string layerId of the selected layer
|
347
|
+
* @returns Configuration for the layerId
|
348
|
+
*/
|
349
|
+
protected _getLayersConfig(layerId: string): IReportingOption | null;
|
345
350
|
/**
|
346
351
|
* Get the reporter app functionality
|
347
352
|
* @protected
|
@@ -512,6 +517,12 @@ export declare class CrowdsourceReporter {
|
|
512
517
|
* @param isLoading is feature detail component loading
|
513
518
|
*/
|
514
519
|
protected updatingFeatureDetails(isLoading: boolean): Promise<void>;
|
520
|
+
/**
|
521
|
+
* On Feature details change update the Layer title and the current selected layer id
|
522
|
+
* @param evt Event hold the details of current feature graphic from the feature-details
|
523
|
+
* @protected
|
524
|
+
*/
|
525
|
+
protected selectionChanged(evt: CustomEvent): Promise<void>;
|
515
526
|
/**
|
516
527
|
* When comment is selected from list store that and show comment details
|
517
528
|
* @param evt Event which has details of selected feature
|
@@ -16,6 +16,7 @@
|
|
16
16
|
/// <reference types="arcgis-js-api" />
|
17
17
|
import { EventEmitter } from '../../stencil-public-runtime';
|
18
18
|
import { IReportingOptions } from '../../components';
|
19
|
+
import { ILayerItemsHash } from "../layer-list/layer-list";
|
19
20
|
export declare class FeatureDetails {
|
20
21
|
el: HTMLFeatureDetailsElement;
|
21
22
|
/**
|
@@ -30,6 +31,10 @@ export declare class FeatureDetails {
|
|
30
31
|
* IReportingOptions: Key options for reporting
|
31
32
|
*/
|
32
33
|
reportingOptions: IReportingOptions;
|
34
|
+
/**
|
35
|
+
* ILayerItemsHash: LayerDetailsHash for each layer in the map
|
36
|
+
*/
|
37
|
+
layerItemsHash: ILayerItemsHash;
|
33
38
|
/**
|
34
39
|
* boolean: When true configured like field is available in selected layer
|
35
40
|
*/
|
@@ -127,7 +132,14 @@ export declare class FeatureDetails {
|
|
127
132
|
/**
|
128
133
|
* Emitted on demand when comment is selected using the feature-list
|
129
134
|
*/
|
130
|
-
|
135
|
+
commentSelect: EventEmitter<__esri.Graphic>;
|
136
|
+
/**
|
137
|
+
* Emitted on demand when the selected index changes
|
138
|
+
*/
|
139
|
+
featureSelectionChange: EventEmitter<{
|
140
|
+
selectedFeature: __esri.Graphic[];
|
141
|
+
selectedFeatureIndex: number;
|
142
|
+
}>;
|
131
143
|
/**
|
132
144
|
* StencilJS: Called once just after the component is first connected to the DOM.
|
133
145
|
*
|
@@ -59,6 +59,10 @@ export declare class FeatureList {
|
|
59
59
|
* boolean: Show initial loading indicator when creating list
|
60
60
|
*/
|
61
61
|
showInitialLoading?: boolean;
|
62
|
+
/**
|
63
|
+
* boolean: If true will show error msg when features are not present
|
64
|
+
*/
|
65
|
+
showErrorWhenNoFeatures?: boolean;
|
62
66
|
/**
|
63
67
|
* calcite-list-item list of features with popup titles
|
64
68
|
*/
|
@@ -35,10 +35,6 @@ export declare class InfoCard {
|
|
35
35
|
* esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
36
36
|
*/
|
37
37
|
mapView: __esri.MapView;
|
38
|
-
/**
|
39
|
-
* boolean: When true the selected feature will zoomed to in the map and the row will be scrolled to within the table
|
40
|
-
*/
|
41
|
-
zoomAndScrollToSelected: boolean;
|
42
38
|
/**
|
43
39
|
* boolean: If true will show edit button
|
44
40
|
*/
|
@@ -110,7 +110,7 @@ export declare class LayerList {
|
|
110
110
|
*/
|
111
111
|
protected handleNoLayersToDisplay(): void;
|
112
112
|
/**
|
113
|
-
* Returns the ids of
|
113
|
+
* Returns the ids of configured layers that needs to be shown in the list
|
114
114
|
* @param hash each layer item details
|
115
115
|
* @returns array of layer ids
|
116
116
|
*/
|
@@ -7,9 +7,11 @@
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
8
8
|
import { ButtonType, DistanceUnit, EditType, EDrawMode, ELayoutMode, IBasemapConfig, IConsentResponse, IExportInfos, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, IValueChange, theme } from "./utils/interfaces";
|
9
9
|
import { IReportingOptions as IReportingOptions1 } from "./components";
|
10
|
+
import { ILayerItemsHash } from "./components/layer-list/layer-list";
|
10
11
|
import { UserSession } from "@esri/solution-common";
|
11
12
|
export { ButtonType, DistanceUnit, EditType, EDrawMode, ELayoutMode, IBasemapConfig, IConsentResponse, IExportInfos, IInventoryItem, ILayerAndTableIds, ILayerExpression, IMapChange, IMapInfo, IReportingOptions, ISearchConfiguration, ISelectionSet, ISketchGraphicsChange, ISolutionSpatialReferenceInfo, ISortingInfo, ISpatialRefRepresentation, IValueChange, theme } from "./utils/interfaces";
|
12
13
|
export { IReportingOptions as IReportingOptions1 } from "./components";
|
14
|
+
export { ILayerItemsHash } from "./components/layer-list/layer-list";
|
13
15
|
export { UserSession } from "@esri/solution-common";
|
14
16
|
export namespace Components {
|
15
17
|
interface ArcgisLogin {
|
@@ -248,9 +250,9 @@ export namespace Components {
|
|
248
250
|
*/
|
249
251
|
"hideMapOnLoad": boolean;
|
250
252
|
/**
|
251
|
-
* boolean: When true a introduction
|
253
|
+
* boolean: When true a introduction window has been enabled in the consuming application. Also when true a floating button will be shown in the lower right of the window that will emit an event when clicked that the consuming application can respond to that will open the introduction window.
|
252
254
|
*/
|
253
|
-
"
|
255
|
+
"introductionWindowEnabled": boolean;
|
254
256
|
/**
|
255
257
|
* IMapInfo[]: array of map infos (name and id)
|
256
258
|
*/
|
@@ -467,6 +469,10 @@ export namespace Components {
|
|
467
469
|
* esri/Graphic: https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html
|
468
470
|
*/
|
469
471
|
"graphics": __esri.Graphic[];
|
472
|
+
/**
|
473
|
+
* ILayerItemsHash: LayerDetailsHash for each layer in the map
|
474
|
+
*/
|
475
|
+
"layerItemsHash": ILayerItemsHash;
|
470
476
|
/**
|
471
477
|
* esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
472
478
|
*/
|
@@ -521,6 +527,10 @@ export namespace Components {
|
|
521
527
|
* string: Layer id of the feature layer to show the list
|
522
528
|
*/
|
523
529
|
"selectedLayerId": string;
|
530
|
+
/**
|
531
|
+
* boolean: If true will show error msg when features are not present
|
532
|
+
*/
|
533
|
+
"showErrorWhenNoFeatures"?: boolean;
|
524
534
|
/**
|
525
535
|
* boolean: Show initial loading indicator when creating list
|
526
536
|
*/
|
@@ -613,10 +623,6 @@ export namespace Components {
|
|
613
623
|
* update the current graphics to the features widget
|
614
624
|
*/
|
615
625
|
"updateCurrentGraphic": (selectedGraphic: __esri.Graphic) => Promise<void>;
|
616
|
-
/**
|
617
|
-
* boolean: When true the selected feature will zoomed to in the map and the row will be scrolled to within the table
|
618
|
-
*/
|
619
|
-
"zoomAndScrollToSelected": boolean;
|
620
626
|
}
|
621
627
|
interface JsonEditor {
|
622
628
|
/**
|
@@ -1702,7 +1708,8 @@ declare global {
|
|
1702
1708
|
new (): HTMLCreateRelatedFeatureElement;
|
1703
1709
|
};
|
1704
1710
|
interface HTMLCrowdsourceManagerElementEventMap {
|
1705
|
-
"
|
1711
|
+
"showIntroductionWindow": void;
|
1712
|
+
"showCoverPage": void;
|
1706
1713
|
}
|
1707
1714
|
interface HTMLCrowdsourceManagerElement extends Components.CrowdsourceManager, HTMLStencilElement {
|
1708
1715
|
addEventListener<K extends keyof HTMLCrowdsourceManagerElementEventMap>(type: K, listener: (this: HTMLCrowdsourceManagerElement, ev: CrowdsourceManagerCustomEvent<HTMLCrowdsourceManagerElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
@@ -1796,7 +1803,8 @@ declare global {
|
|
1796
1803
|
};
|
1797
1804
|
interface HTMLFeatureDetailsElementEventMap {
|
1798
1805
|
"loadingStatus": boolean;
|
1799
|
-
"
|
1806
|
+
"commentSelect": __esri.Graphic;
|
1807
|
+
"featureSelectionChange": { selectedFeature: __esri.Graphic[], selectedFeatureIndex: number };
|
1800
1808
|
}
|
1801
1809
|
interface HTMLFeatureDetailsElement extends Components.FeatureDetails, HTMLStencilElement {
|
1802
1810
|
addEventListener<K extends keyof HTMLFeatureDetailsElementEventMap>(type: K, listener: (this: HTMLFeatureDetailsElement, ev: FeatureDetailsCustomEvent<HTMLFeatureDetailsElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
@@ -2592,17 +2600,21 @@ declare namespace LocalJSX {
|
|
2592
2600
|
*/
|
2593
2601
|
"hideMapOnLoad"?: boolean;
|
2594
2602
|
/**
|
2595
|
-
* boolean: When true a introduction
|
2603
|
+
* boolean: When true a introduction window has been enabled in the consuming application. Also when true a floating button will be shown in the lower right of the window that will emit an event when clicked that the consuming application can respond to that will open the introduction window.
|
2596
2604
|
*/
|
2597
|
-
"
|
2605
|
+
"introductionWindowEnabled"?: boolean;
|
2598
2606
|
/**
|
2599
2607
|
* IMapInfo[]: array of map infos (name and id)
|
2600
2608
|
*/
|
2601
2609
|
"mapInfos"?: IMapInfo[];
|
2610
|
+
/**
|
2611
|
+
* Emitted on demand when a cover page button is clicked
|
2612
|
+
*/
|
2613
|
+
"onShowCoverPage"?: (event: CrowdsourceManagerCustomEvent<void>) => void;
|
2602
2614
|
/**
|
2603
2615
|
* Emitted on demand when a info button is clicked
|
2604
2616
|
*/
|
2605
|
-
"
|
2617
|
+
"onShowIntroductionWindow"?: (event: CrowdsourceManagerCustomEvent<void>) => void;
|
2606
2618
|
/**
|
2607
2619
|
* boolean: When true only editable layers that support the update capability will be available
|
2608
2620
|
*/
|
@@ -2835,6 +2847,10 @@ declare namespace LocalJSX {
|
|
2835
2847
|
* esri/Graphic: https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html
|
2836
2848
|
*/
|
2837
2849
|
"graphics"?: __esri.Graphic[];
|
2850
|
+
/**
|
2851
|
+
* ILayerItemsHash: LayerDetailsHash for each layer in the map
|
2852
|
+
*/
|
2853
|
+
"layerItemsHash"?: ILayerItemsHash;
|
2838
2854
|
/**
|
2839
2855
|
* esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
2840
2856
|
*/
|
@@ -2842,7 +2858,11 @@ declare namespace LocalJSX {
|
|
2842
2858
|
/**
|
2843
2859
|
* Emitted on demand when comment is selected using the feature-list
|
2844
2860
|
*/
|
2845
|
-
"
|
2861
|
+
"onCommentSelect"?: (event: FeatureDetailsCustomEvent<__esri.Graphic>) => void;
|
2862
|
+
/**
|
2863
|
+
* Emitted on demand when the selected index changes
|
2864
|
+
*/
|
2865
|
+
"onFeatureSelectionChange"?: (event: FeatureDetailsCustomEvent<{ selectedFeature: __esri.Graphic[], selectedFeatureIndex: number }>) => void;
|
2846
2866
|
/**
|
2847
2867
|
* Emitted on demand when like or dislike button is clicked
|
2848
2868
|
*/
|
@@ -2883,6 +2903,10 @@ declare namespace LocalJSX {
|
|
2883
2903
|
* string: Layer id of the feature layer to show the list
|
2884
2904
|
*/
|
2885
2905
|
"selectedLayerId"?: string;
|
2906
|
+
/**
|
2907
|
+
* boolean: If true will show error msg when features are not present
|
2908
|
+
*/
|
2909
|
+
"showErrorWhenNoFeatures"?: boolean;
|
2886
2910
|
/**
|
2887
2911
|
* boolean: Show initial loading indicator when creating list
|
2888
2912
|
*/
|
@@ -2969,10 +2993,6 @@ declare namespace LocalJSX {
|
|
2969
2993
|
* string: Set the position of the feature info
|
2970
2994
|
*/
|
2971
2995
|
"position"?: string;
|
2972
|
-
/**
|
2973
|
-
* boolean: When true the selected feature will zoomed to in the map and the row will be scrolled to within the table
|
2974
|
-
*/
|
2975
|
-
"zoomAndScrollToSelected"?: boolean;
|
2976
2996
|
}
|
2977
2997
|
interface JsonEditor {
|
2978
2998
|
/**
|
package/dist/types/preact.d.ts
CHANGED
@@ -552,8 +552,9 @@ declare module "preact/src/jsx" {
|
|
552
552
|
"onisActionPending"?: (event: CustomEvent<any>) => void;
|
553
553
|
}
|
554
554
|
|
555
|
-
"crowdsource-manager": Omit<JSX.SolutionsCrowdsourceManager, "
|
556
|
-
"
|
555
|
+
"crowdsource-manager": Omit<JSX.SolutionsCrowdsourceManager, "onShowIntroductionWindow" | "onShowCoverPage"> & JSXInternal.HTMLAttributes<HTMLSolutionsCrowdsourceManagerElement> & {
|
556
|
+
"onshowIntroductionWindow"?: (event: CustomEvent<any>) => void;
|
557
|
+
"onshowCoverPage"?: (event: CustomEvent<any>) => void;
|
557
558
|
}
|
558
559
|
|
559
560
|
"crowdsource-reporter": Omit<JSX.SolutionsCrowdsourceReporter, "onTogglePanel"> & JSXInternal.HTMLAttributes<HTMLSolutionsCrowdsourceReporterElement> & {
|
@@ -576,9 +577,10 @@ declare module "preact/src/jsx" {
|
|
576
577
|
|
577
578
|
"feature-comments": JSX.SolutionsFeatureComments & JSXInternal.HTMLAttributes<HTMLSolutionsFeatureCommentsElement>
|
578
579
|
|
579
|
-
"feature-details": Omit<JSX.SolutionsFeatureDetails, "onLoadingStatus" | "
|
580
|
+
"feature-details": Omit<JSX.SolutionsFeatureDetails, "onLoadingStatus" | "onCommentSelect" | "onFeatureSelectionChange"> & JSXInternal.HTMLAttributes<HTMLSolutionsFeatureDetailsElement> & {
|
580
581
|
"onloadingStatus"?: (event: CustomEvent<any>) => void;
|
581
|
-
"
|
582
|
+
"oncommentSelect"?: (event: CustomEvent<any>) => void;
|
583
|
+
"onfeatureSelectionChange"?: (event: CustomEvent<any>) => void;
|
582
584
|
}
|
583
585
|
|
584
586
|
"feature-form-flow-item": JSX.SolutionsFeatureFormFlowItem & JSXInternal.HTMLAttributes<HTMLSolutionsFeatureFormFlowItemElement>
|
@@ -607,6 +609,8 @@ declare module "preact/src/jsx" {
|
|
607
609
|
|
608
610
|
"instant-apps-control-panel": JSX.SolutionsInstantAppsControlPanel & JSXInternal.HTMLAttributes<HTMLSolutionsInstantAppsControlPanelElement>
|
609
611
|
|
612
|
+
"instant-apps-create": JSX.SolutionsInstantAppsCreate & JSXInternal.HTMLAttributes<HTMLSolutionsInstantAppsCreateElement>
|
613
|
+
|
610
614
|
"instant-apps-export": Omit<JSX.SolutionsInstantAppsExport, "onExportOutputUpdated"> & JSXInternal.HTMLAttributes<HTMLSolutionsInstantAppsExportElement> & {
|
611
615
|
"onexportOutputUpdated"?: (event: CustomEvent<any>) => void;
|
612
616
|
}
|
@@ -684,6 +688,8 @@ declare module "preact/src/jsx" {
|
|
684
688
|
"onscoreboardItemsUpdated"?: (event: CustomEvent<any>) => void;
|
685
689
|
}
|
686
690
|
|
691
|
+
"instant-apps-sign-in": JSX.SolutionsInstantAppsSignIn & JSXInternal.HTMLAttributes<HTMLSolutionsInstantAppsSignInElement>
|
692
|
+
|
687
693
|
"instant-apps-social-share": JSX.SolutionsInstantAppsSocialShare & JSXInternal.HTMLAttributes<HTMLSolutionsInstantAppsSocialShareElement>
|
688
694
|
|
689
695
|
"instant-apps-splash": Omit<JSX.SolutionsInstantAppsSplash, "onSplashClose"> & JSXInternal.HTMLAttributes<HTMLSolutionsInstantAppsSplashElement> & {
|
@@ -19,6 +19,10 @@ export declare class PopupUtils {
|
|
19
19
|
* esri/arcade: https://developers.arcgis.com/javascript/latest/api-reference/esri-arcade.html
|
20
20
|
*/
|
21
21
|
arcade: typeof import("esri/arcade");
|
22
|
+
/**
|
23
|
+
* esri/intl: https://developers.arcgis.com/javascript/latest/api-reference/esri-intl.html
|
24
|
+
*/
|
25
|
+
intl: typeof import("esri/intl");
|
22
26
|
/**
|
23
27
|
* Get the popup title that honors arcade expressions
|
24
28
|
* @param graphic selected graphic
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@esri/solutions-components",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.24",
|
4
4
|
"description": "Web Components for Esri's Solutions Applications",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
@@ -87,7 +87,7 @@
|
|
87
87
|
"@esri/hub-initiatives": "^12.4.1",
|
88
88
|
"@esri/hub-sites": "^12.6.0",
|
89
89
|
"@esri/hub-teams": "^12.4.1",
|
90
|
-
"@esri/instant-apps-components": "1.0.0-beta.
|
90
|
+
"@esri/instant-apps-components": "1.0.0-beta.224",
|
91
91
|
"@esri/solution-common": "^5.0.9",
|
92
92
|
"templates-common-library-esm": "npm:templates-common-library@0.0.454-esm",
|
93
93
|
"@pdf-lib/fontkit": "^1.1.1",
|
@@ -1,73 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
'use strict';
|
7
|
-
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
-
|
10
|
-
const index = require('./index-79b35510.js');
|
11
|
-
const loadable = require('./loadable-b374ef4b.js');
|
12
|
-
|
13
|
-
/*!
|
14
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
15
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
16
|
-
* v2.8.2
|
17
|
-
*/
|
18
|
-
const CSS = {
|
19
|
-
textContainer: "text-container",
|
20
|
-
fullName: "full-name",
|
21
|
-
username: "username",
|
22
|
-
button: "button",
|
23
|
-
};
|
24
|
-
|
25
|
-
const navigationUserCss = ":host{display:inline-flex;outline:2px solid transparent;outline-offset:2px}:host .button{background-color:transparent;border:none;margin:0px;display:flex;cursor:pointer;align-items:center;justify-content:center;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size-0);line-height:1.25rem;outline-color:transparent;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-block-end:2px solid transparent}:host(:hover) .button,:host(:focus) .button{background-color:var(--calcite-color-foreground-2)}:host(:focus) .button{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host(:active) .button{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1)}:host([active]) .button{border-color:var(--calcite-color-brand);color:var(--calcite-color-text-1);--calcite-ui-icon-color:var(--calcite-color-brand)}.text-container{margin-block-start:0.125rem;display:flex;flex-direction:column;padding-inline:1rem;text-align:start}calcite-avatar{padding-inline:1rem}calcite-avatar~.text-container{padding-inline-start:0px}.full-name{margin-inline-start:0px;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.username{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host([hidden]){display:none}[hidden]{display:none}";
|
26
|
-
const CalciteNavigationUserStyle0 = navigationUserCss;
|
27
|
-
|
28
|
-
const CalciteNavigationUser = class {
|
29
|
-
constructor(hostRef) {
|
30
|
-
index.registerInstance(this, hostRef);
|
31
|
-
this.active = undefined;
|
32
|
-
this.fullName = undefined;
|
33
|
-
this.label = undefined;
|
34
|
-
this.textDisabled = false;
|
35
|
-
this.thumbnail = undefined;
|
36
|
-
this.userId = undefined;
|
37
|
-
this.username = undefined;
|
38
|
-
}
|
39
|
-
//--------------------------------------------------------------------------
|
40
|
-
//
|
41
|
-
// Public Methods
|
42
|
-
//
|
43
|
-
//--------------------------------------------------------------------------
|
44
|
-
/** Sets focus on the component. */
|
45
|
-
async setFocus() {
|
46
|
-
await loadable.componentFocusable(this);
|
47
|
-
this.el.focus();
|
48
|
-
}
|
49
|
-
//--------------------------------------------------------------------------
|
50
|
-
//
|
51
|
-
// Lifecycle
|
52
|
-
//
|
53
|
-
//--------------------------------------------------------------------------
|
54
|
-
componentWillLoad() {
|
55
|
-
loadable.setUpLoadableComponent(this);
|
56
|
-
}
|
57
|
-
componentDidLoad() {
|
58
|
-
loadable.setComponentLoaded(this);
|
59
|
-
}
|
60
|
-
// --------------------------------------------------------------------------
|
61
|
-
//
|
62
|
-
// Render Methods
|
63
|
-
//
|
64
|
-
// --------------------------------------------------------------------------
|
65
|
-
render() {
|
66
|
-
return (index.h(index.Host, { key: '869bc0b518ff407bf3f110ebda48571f456229a8' }, index.h("button", { key: '0cb5497ebcbf9fad2bfb6ffdd3bfad151594460d', "aria-label": this.label, class: CSS.button }, index.h("calcite-avatar", { key: '6de54637d077afa83f7520636037b6da33b24334', "full-name": this.fullName, label: this.label, thumbnail: this.thumbnail, "user-id": this.userId, username: this.username }), (this.fullName || this.username) && !this.textDisabled && (index.h("div", { key: '0d0be3d6ba276d6c3e24a67b7085dd75e56b3e5b', class: CSS.textContainer }, this.fullName && (index.h("span", { class: CSS.fullName, key: CSS.fullName }, this.fullName)), this.username && (index.h("span", { class: CSS.username, key: CSS.username }, this.username)))))));
|
67
|
-
}
|
68
|
-
static get delegatesFocus() { return true; }
|
69
|
-
get el() { return index.getElement(this); }
|
70
|
-
};
|
71
|
-
CalciteNavigationUser.style = CalciteNavigationUserStyle0;
|
72
|
-
|
73
|
-
exports.calcite_navigation_user = CalciteNavigationUser;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{l as o}from"./p-4ba6f8f0.js";async function t(o,t){var n,a,e;try{const s=null===(e=null===(a=null===(n=null==t?void 0:t.portalItem)||void 0===n?void 0:n.portal)||void 0===a?void 0:a.credential)||void 0===e?void 0:e.token,i={responseType:"json"};s&&(i.query={token:s});var r="cacheBuster="+Date.now();const l=`${t.url}?${r}`,c=await o(l,i);return Promise.resolve(c.data)}catch(o){console.error("Unable to get resource t9n data.")}}async function n(t){if(!t)return null;const[n]=await o(["esri/portal/PortalItemResource"]),a=await t.fetchResources(),e=`t9n/${null==t?void 0:t.id}.json`,r=new n({path:e,portalItem:t}),s=a.resources.filter((o=>o.resource.path===e));if(0!==s.length)return Promise.resolve(s[0].resource);{const o="application/json",n=new Blob([JSON.stringify({})],{type:o});try{await t.addResource(r,n);const o=await t.fetchResources(),a=`t9n/${null==t?void 0:t.id}.json`,e=o.resources.filter((o=>o.resource.path===a));return Promise.resolve(e[0].resource)}catch(o){return console.error("ERROR: ",o),Promise.reject(null)}}}export{t as f,n as g}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import{r as e,f as t,h as i,g as n,c as s}from"./p-6d753a3d.js";import{g as a,l,s as o,i as r,b as d,z as c,m as p,k as h,n as v,u as g,o as u,p as m}from"./p-599dcc29.js";import{l as f}from"./p-4ba6f8f0.js";import"./p-bdcf99c0.js";import"./p-82e085d0.js";const y=class{constructor(t){e(this,t),this.legendvm=void 0,this.featureCount=void 0,this.activeLayerInfo=void 0,this.messages=void 0,this.isChild=!1,this.expanded=!0}layerCaptionElementExpandUpdatedEmitted(){var e;this.expanded=!!(null===(e=this.layerCaption)||void 0===e?void 0:e.expanded)}async componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0})}render(){return i("div",{style:{borderLeft:"1px solid var(--calcite-color-border-3)"},class:"esri-legend__service esri-legend__group-layer"},i("instant-apps-interactive-legend-layer-element-caption",{ref:e=>this.layerCaption=e,class:a(this.el),legendvm:this.legendvm,"feature-count":this.featureCount,activeLayerInfo:this.activeLayerInfo,messages:this.messages,isChild:this.isChild}),i("div",{class:"esri-legend__group-content "+(!1===this.expanded?"hide":"show")},i("slot",{name:"content"})))}get el(){return n(this)}};y.style=".sc-instant-apps-interactive-legend-group-legend-element-h{display:block}.sc-instant-apps-interactive-legend-group-legend-element-h .esri-legend__service.sc-instant-apps-interactive-legend-group-legend-element{margin:0;padding:0}.sc-instant-apps-interactive-legend-group-legend-element-h .hide.sc-instant-apps-interactive-legend-group-legend-element{display:none}";const _=class{constructor(t){e(this,t),this.legendvm=void 0,this.featureCount=void 0,this.activeLayerInfo=void 0,this.messages=void 0,this.isChild=void 0,this.expanded=!0}layerCaptionElementExpandUpdatedEmitted(){this.expanded=this.layerCaption.expanded}componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0})}render(){var e,t;return i("div",{style:{borderLeft:"1px solid var(--calcite-color-border-3)"},class:"esri-legend__service"+(this.activeLayerInfo.parent?" esri-legend__group-layer-child":""),tabIndex:0},i("instant-apps-interactive-legend-layer-element-caption",{ref:e=>this.layerCaption=e,legendvm:this.legendvm,"feature-count":this.featureCount,activeLayerInfo:this.activeLayerInfo,messages:this.messages,isChild:!!this.isChild,class:a(this.el)}),i("div",{id:`${null===(t=null===(e=this.activeLayerInfo)||void 0===e?void 0:e.layer)||void 0===t?void 0:t.id}-legend-layer`,class:"esri-legend__layer"+(!1===this.expanded?" hide":" show")},i("slot",{name:"content"})))}get el(){return n(this)}};_.style=".sc-instant-apps-interactive-legend-layer-element-h{display:block}.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__service.sc-instant-apps-interactive-legend-layer-element{padding:0}.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__layer-body.sc-instant-apps-interactive-legend-layer-element,.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__layer.sc-instant-apps-interactive-legend-layer-element,.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__layer-table.sc-instant-apps-interactive-legend-layer-element,.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__group-layer-child.sc-instant-apps-interactive-legend-layer-element,.sc-instant-apps-interactive-legend-layer-element-h .esri-legend__layer-child-table.sc-instant-apps-interactive-legend-layer-element{margin:0;overflow:hidden}.sc-instant-apps-interactive-legend-layer-element-h .hide.sc-instant-apps-interactive-legend-layer-element{display:none}";const b=class{constructor(t){e(this,t),this.activeLayerInfo=void 0,this.isSizeRamp=void 0,this.isChild=void 0,this.isColorRamp=void 0,this.isRelationshipRamp=void 0,this.isInteractive=void 0,this.zoomTo=void 0,this.legendElement=void 0,this.titleText=void 0,this.legendvm=void 0,this.legendElementIndex=void 0,this.messages=void 0,this.expanded=!0}legendLayerExpandUpdatedEmitted(){this.expanded=this.legendLayerCaption.expanded}render(){var e,t,n,s,a,r,d,c,p;const h=this.isChild?"esri-legend__layer-child-table":"esri-legend__layer-table",v=1===(null===(t=null===(e=this.legendElement)||void 0===e?void 0:e.infos)||void 0===t?void 0:t.length)&&!(null===(a=null===(s=null===(n=this.activeLayerInfo)||void 0===n?void 0:n.layer)||void 0===s?void 0:s.renderer)||void 0===a?void 0:a.field),g=!this.isSizeRamp&&this.isChild||this.isColorRamp?"":" esri-legend__layer-table--size-ramp",u=this.isInteractive?"":" instant-apps-interactive-legend__non-interactive",m=l(this.activeLayerInfo)?" instant-apps-interactive-legend__nested-unique-symbol":"";let f=!(!v||this.expanded||this.zoomTo)||this.expanded;return this.isRelationshipRamp&&(f=o.get("relationshipRampExpandStates")[this.activeLayerInfo.layer.id]),i("div",{class:`${h}${g}${u}${m}`},i("div",{id:`${null===(d=null===(r=this.activeLayerInfo)||void 0===r?void 0:r.layer)||void 0===d?void 0:d.id}-legend-element-caption`,class:this.isRelationshipRamp||!this.titleText&&!this.zoomTo&&v?"hide":"show"},i("instant-apps-interactive-legend-legend-element-caption",{ref:e=>this.legendLayerCaption=e,legendvm:this.legendvm,activeLayerInfo:this.activeLayerInfo,layer:this.activeLayerInfo.layer,titleText:this.titleText,legendElement:this.legendElement,legendElementIndex:this.legendElementIndex,zoomTo:this.zoomTo,isInteractive:this.isInteractive,messages:this.messages})),i("div",{key:"content",id:`${null===(p=null===(c=this.activeLayerInfo)||void 0===c?void 0:c.layer)||void 0===p?void 0:p.id}-legend-element-content-${this.legendElementIndex}`,class:!1===f?"hide":"show"},i("slot",{name:"content"})))}};b.style=".sc-instant-apps-interactive-legend-legend-element-h{display:block}.sc-instant-apps-interactive-legend-legend-element-h .esri-legend__layer-table.sc-instant-apps-interactive-legend-legend-element,.sc-instant-apps-interactive-legend-legend-element-h .instant-apps-interactive-legend__nested-unique-symbol.sc-instant-apps-interactive-legend-legend-element{margin:0}.sc-instant-apps-interactive-legend-legend-element-h .hide.sc-instant-apps-interactive-legend-legend-element{display:none}";const L=class{constructor(t){e(this,t),this.showAllSelectedEvent=s(this,"showAllSelected",7),this.legendLayerExpandUpdatedEvent=s(this,"legendLayerExpandUpdated",7),this.legendvm=void 0,this.activeLayerInfo=void 0,this.layer=void 0,this.titleText=void 0,this.legendElementIndex=void 0,this.zoomTo=void 0,this.isInteractive=void 0,this.legendElement=void 0,this.expanded=!0,this.messages=void 0}render(){var e,t,n,s;const a=l(this.activeLayerInfo),o=p(this.activeLayerInfo),{expanded:r}=this;return a&&!this.titleText?null:i("div",{class:"esri-legend__layer-caption"},i("calcite-action",{onClick:this.toggleExpanded(),icon:!1===r?"chevron-up":"chevron-down",appearance:"transparent",text:!1===r?null===(e=this.messages)||void 0===e?void 0:e.expand:null===(t=this.messages)||void 0===t?void 0:t.collapse,label:!1===r?null===(n=this.messages)||void 0===n?void 0:n.expand:null===(s=this.messages)||void 0===s?void 0:s.collapse,scale:"s"}),this.isInteractive||o?this.renderLegendElementCaptionControls():null,this.titleText?i("span",{class:"instant-apps-interactive-legend__legend-layer-caption-text"},this.titleText):null)}renderLegendElementCaptionControls(){var e,t,n,s,a,l,o,d,c,p;const h=this.titleText?"":" instant-apps-interactive-legend__layer-caption-btn-container--no-text",v=(null===(s=null===(n=null===(e=r.data)||void 0===e?void 0:e[null===(t=this.layer)||void 0===t?void 0:t.id])||void 0===n?void 0:n.categories)||void 0===s?void 0:s.size)>1?i("calcite-button",{key:"show-all-button",id:"showAll",onClick:this.handleShowAll(),"icon-start":"list-check-all",appearance:"outline",round:!0,label:null===(a=this.messages)||void 0===a?void 0:a.showAll}):null,g=i("calcite-button",{key:"zoom-to-button",id:"zoomTo",onClick:this.handleZoomTo(),"icon-start":"magnifying-glass-plus",appearance:"outline",round:!0,label:null===(l=this.messages)||void 0===l?void 0:l.zoomTo});return i("div",{key:"layer-caption-btn-container",class:`instant-apps-interactive-legend__layer-caption-btn-container${h}`},v,i("calcite-tooltip",{"reference-element":"showAll",placement:"top",label:null===(o=this.messages)||void 0===o?void 0:o.showAll},null===(d=this.messages)||void 0===d?void 0:d.showAll),this.zoomTo?[g,i("calcite-tooltip",{"reference-element":"zoomTo",placement:"top",label:null===(c=this.messages)||void 0===c?void 0:c.zoomTo},null===(p=this.messages)||void 0===p?void 0:p.zoomTo)]:null)}toggleExpanded(){return()=>{var e,t;this.expanded=!this.expanded,this.legendLayerExpandUpdatedEvent.emit(),(null===(t=null===(e=this.activeLayerInfo)||void 0===e?void 0:e.legendElements)||void 0===t?void 0:t.filter((e=>"relationship-ramp"===e.type))).length>0&&o.set("relationshipRampExpandStates",Object.assign(Object.assign({},r.relationshipRampExpandStates),{[this.activeLayerInfo.layer.id]:this.expanded}))}}handleZoomTo(){return()=>{const e=h(this.layer),t=d(e,this.legendElement);c(e,this.legendvm.view,t)}}handleShowAll(){return()=>{var e,t;const i=null===(e=r.data)||void 0===e?void 0:e[null===(t=this.layer)||void 0===t?void 0:t.id];d(i,this.legendElement)?(()=>{const e=v(i,this.legendElement.title);g({intLegendLayerData:e,layerId:this.layer.id})})():((()=>{const e=u(i);g({intLegendLayerData:e,layerId:this.layer.id})})(),this.showAllSelectedEvent.emit())}}get el(){return n(this)}};L.style=".sc-instant-apps-interactive-legend-legend-element-caption-h{display:block;--instant-apps-interactive-legend-heading-font-size:1rem;--instant-apps-interactive-legend-heading-font-weight:normal;--instant-apps-interactive-legend-caption-font-weight:normal;--instant-apps-interactive-legend-secondary-color:var(--calcite-color-text-1);--instant-apps-interactive-legend-field-name-font-size:1rem;--instant-apps-interactive-legend-total-feature-count-font-size:0.875rem;--instant-apps-interactive-legend-info-font-size:0.875rem;--instant-apps-interactive-legend-info-item-background--selected:#c7ebff;--instant-apps-interactive-legend-info-item-color--selected:var(--calcite-color-text-2);--instant-apps-interactive-legend-secondary-background-color:var(--calcite-color-background);--instant-apps-interactive-legend-ui-padding:15px 10px}.sc-instant-apps-interactive-legend-legend-element-caption-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-legend-element-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-legend-element-caption-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-legend-element-caption calcite-action.sc-instant-apps-interactive-legend-legend-element-caption{margin-left:20px}.sc-instant-apps-interactive-legend-legend-element-caption-h .instant-apps-interactive-legend__legend-layer-caption-text.sc-instant-apps-interactive-legend-legend-element-caption{display:inline-block;margin-left:5px;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;line-height:normal}.sc-instant-apps-interactive-legend-legend-element-caption-h .instant-apps-interactive-legend__layer-caption-btn-container.sc-instant-apps-interactive-legend-legend-element-caption{white-space:nowrap}.sc-instant-apps-interactive-legend-legend-element-caption-h .instant-apps-interactive-legend__layer-caption-btn-container.sc-instant-apps-interactive-legend-legend-element-caption calcite-button.sc-instant-apps-interactive-legend-legend-element-caption{margin:2px}.sc-instant-apps-interactive-legend-legend-element-caption-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-legend-element-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight);padding:var(--instant-apps-interactive-legend-ui-padding)}html[dir=rtl] .sc-instant-apps-interactive-legend-legend-element-caption-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-legend-element-caption calcite-action.sc-instant-apps-interactive-legend-legend-element-caption{margin-left:unset;margin-right:20px}";const $=".esri-relationship-ramp--diamond__middle-column--ramp svg g",x=class{constructor(t){e(this,t),this.cellNodeCounter=0,this.filterMode=void 0,this.activeLayerInfo=void 0,this.legendElement=void 0,this.messages=void 0}applyInteractivity(){this.applyRelationshipRampInteractivity()}showAllSelectedEmitted(){const e=0===r.data[this.activeLayerInfo.layer.id].queryExpressions.length,t=this.relationshipRamp.querySelector($).children,i=t?Array.from(t):null;e&&(null==i||i.forEach((e=>{e.removeAttribute("stroke"),e.removeAttribute("stroke-width"),e.removeAttribute("stroke-opacity"),e.classList.remove("esri-interactive-legend--selected-cell")})))}async componentWillLoad(){const[e]=await f(["esri/symbols/support/symbolUtils"]);this.symbolUtils=e}render(){var e,t;return i("div",{ref:e=>{if(!(null==e?void 0:e.querySelector("relationshipStyles"))){const t=document.createElement("style");t.id="relationshipStyles",t.innerHTML="\n rect:hover {\n cursor: pointer;\n opacity: 0.8;\n }\n ",null==e||e.appendChild(t)}}},i("span",{class:"instant-apps-interactive-legend-relationship__instructional-text"},null===(t=null===(e=this.messages)||void 0===e?void 0:e.relationship)||void 0===t?void 0:t.instructionalText),this.renderRelationshipRamp())}renderRelationshipRamp(){var e;const t=(null===(e=this.activeLayerInfo)||void 0===e?void 0:e.layer).renderer,n=this.symbolUtils.renderRelationshipRampPreviewHTML(t);return i("div",{ref:e=>{this.relationshipRamp=e,this.applyRelationshipRampInteractivity()},key:"relationship-ramp-diamond",innerHTML:`${null==n?void 0:n.outerHTML}`})}applyRelationshipRampInteractivity(){if(!(this.relationshipRamp&&this.activeLayerInfo&&this.legendElement&&r.data))return;let e=setInterval((()=>{const t=this.relationshipRamp.querySelector($);t&&(clearInterval(e),this.setupRelationshipDrawingStyle(t.children))}),10)}setupRelationshipDrawingStyle(e){const t=e?Array.from(e):null;if(!t)return;t.map(((e,t)=>{var i,n;const s=(null===(n=null===(i=this.activeLayerInfo)||void 0===i?void 0:i.layer)||void 0===n?void 0:n.renderer).uniqueValueInfos;if(s[t]){const i=s[t].symbol.color;s.forEach(((t,n)=>{const s=t.symbol.color;i.r===s.r&&i.g===s.g&&i.b===s.b&&i.a===s.a&&this.setCellAttributes(e,n)})),e.classList.add("esri-interactive-legend__svg-rect-element")}}));const i=this.reorderCellNodes(t);this.attachFeatureIndexes(i),this.applyEventHandlers()}setCellAttributes(e,t){const i=this.activeLayerInfo.layer.renderer.uniqueValueInfos,n=this.generateIndexPattern(t);i[n]&&(e.setAttribute("data-color",`${i[n].symbol.color}`),e.setAttribute("data-cell-index",`${n}`),e.setAttribute("tabindex","0"))}generateIndexPattern(e){const{focus:t,numClasses:i}=this.legendElement;return"HL"===t?e:2===i?this.twoClasses(e,t):3===i?this.threeClasses(e,t):4===i?this.fourClasses(e,t):null}twoClasses(e,t){return"HH"===t||null===t?0===e||2===e?e+1:1===e||3===e?e-1:null:"LH"===t?0===e?e+3:1===e?e+1:2===e?e-1:3===e?e-3:4===e?e+0:null:"LL"===t?0===e||1===e?e+2:2===e||3===e?e-2:null:void 0}threeClasses(e,t){return"HH"===t||null===t?0===e||3===e||6===e?e+2:2===e||5===e||8===e?e-2:e:"LH"===t?0===e?e+8:1===e?e+6:2===e?e+4:3===e?e+2:5===e?e-2:6===e?e-4:7===e?e-6:8===e?e-8:e:"LL"===t?0===e||1===e||2===e?e+6:6===e||7===e||8===e?e-6:e:void 0}fourClasses(e,t){return"HH"===t||null===t?0===e||4===e||8===e||12===e?e+3:1===e||5===e||9===e||13===e?e+1:2===e||6===e||10===e||14===e?e-1:3===e||7===e||11===e||15===e?e-3:null:"LH"===t?0===e?e+15:1===e?e+13:2===e?e+11:3===e?e+9:4===e?e+7:5===e?e+5:6===e?e+3:7===e?e+1:8===e?e-1:9===e?e-3:10===e?e-5:11===e?e-7:12===e?e-9:13===e?e-11:14===e?e-13:15===e?e-15:null:"LL"===t?0===e||1===e||2===e||3===e?e+12:4===e||5===e||6===e||7===e?e+4:8===e||9===e||10===e||11===e?e-4:12===e||13===e||14===e||15===e?e-12:null:void 0}reorderCellNodes(e){const t=[];for(;this.cellNodeCounter<=e.length-1;)e.map((e=>{parseInt(e.getAttribute("data-cell-index"))===this.cellNodeCounter&&t.push(e)})),this.cellNodeCounter++;return this.cellNodeCounter=0,t}attachFeatureIndexes(e){const{focus:t,numClasses:i}=this.legendElement;"HH"===t||null===t?this.relationshipFocusIsHighHigh(e,i):"LL"===t?this.relationshipFocusIsLowLow(e,i):"LH"===t?this.relationshipFocusIsLowHigh(e,i):"HL"===t&&this.relationshipFocusIsHighLow(e,i),this.cellNodeCounter=0}relationshipFocusIsHighHigh(e,t){for(let i=t-1;i>=0;i--)for(let n=t-1;n>=0;n--)this.setDataAttributes(e,i,n,t),this.cellNodeCounter++}relationshipFocusIsLowLow(e,t){for(let i=0;i<t;i++)for(let n=0;n<t;n++)this.setDataAttributes(e,i,n,t),this.cellNodeCounter++}relationshipFocusIsLowHigh(e,t){for(let i=0;i<t;i++)for(let n=t-1;n>=0;n--)this.setDataAttributes(e,i,n,t),this.cellNodeCounter++}relationshipFocusIsHighLow(e,t){for(let i=t-1;i>=0;i--)for(let n=0;n<t;n++)this.setDataAttributes(e,n,i,t),this.cellNodeCounter++}setDataAttributes(e,t,i,n){const s=e[this.cellNodeCounter];2===n?this.twoClassAttributes(s,t,i):3===n?this.threeClassAttributes(s,t,i):this.fourClassAttributes(s,t,i)}twoClassAttributes(e,t,i){const{legendElement:n}=this;"HL"===n.focus?this.swapDataFeatureIndexes(e,t,i):this.setDataFeatureIndexes(e,t,i)}threeClassAttributes(e,t,i){const{legendElement:n}=this;1===this.cellNodeCounter||3===this.cellNodeCounter||5===this.cellNodeCounter||7===this.cellNodeCounter?"HL"===n.focus?this.swapDataFeatureIndexes(e,t,i):this.setDataFeatureIndexes(e,t,i):"HL"!==n.focus?this.setDataFeatureIndexes(e,t,i):this.swapDataFeatureIndexes(e,t,i)}fourClassAttributes(e,t,i){const{legendElement:n}=this,{focus:s}=n;1===this.cellNodeCounter||2===this.cellNodeCounter||4===this.cellNodeCounter||5===this.cellNodeCounter||7===this.cellNodeCounter||8===this.cellNodeCounter||10===this.cellNodeCounter||11===this.cellNodeCounter||13===this.cellNodeCounter||14===this.cellNodeCounter?"HL"===s?this.swapDataFeatureIndexes(e,t,i):this.setDataFeatureIndexes(e,t,i):"HL"!==s?this.setDataFeatureIndexes(e,t,i):this.swapDataFeatureIndexes(e,t,i)}setDataFeatureIndexes(e,t,i){e.setAttribute("data-feature-i",`${t}`),e.setAttribute("data-feature-j",`${i}`),this.setDataCellFocus(e,t,i)}swapDataFeatureIndexes(e,t,i){e.setAttribute("data-feature-i",`${i}`),e.setAttribute("data-feature-j",`${t}`),this.setDataCellFocus(e,i,t)}setDataCellFocus(e,t,i){const{numClasses:n}=this.legendElement;2===n?this.setDataCellFocusForTwoClasses(e,t,i):3===n?this.setDataCellFocusForThreeClasses(e,t,i):4===n&&this.setDataCellFocusForFourClasses(e,t,i)}setDataCellFocusForTwoClasses(e,t,i){0===t&&0===i?e.setAttribute("data-cell-focus","LL"):0===t&&1===i?e.setAttribute("data-cell-focus","LH"):1===t&&0===i?e.setAttribute("data-cell-focus","HL"):1===t&&1===i&&e.setAttribute("data-cell-focus","HH")}setDataCellFocusForThreeClasses(e,t,i){0===t&&0===i?e.setAttribute("data-cell-focus","LL"):0===t&&1===i?e.setAttribute("data-cell-focus","LM"):0===t&&2===i?e.setAttribute("data-cell-focus","LH"):1===t&&0===i?e.setAttribute("data-cell-focus","ML"):1===t&&1===i?e.setAttribute("data-cell-focus","MM"):1===t&&2===i?e.setAttribute("data-cell-focus","MH"):2===t&&0===i?e.setAttribute("data-cell-focus","HL"):2===t&&1===i?e.setAttribute("data-cell-focus","HM"):2===t&&2===i&&e.setAttribute("data-cell-focus","HH")}setDataCellFocusForFourClasses(e,t,i){0===t&&0===i?e.setAttribute("data-cell-focus","LL"):0===t&&1===i?e.setAttribute("data-cell-focus","LM1"):0===t&&2===i?e.setAttribute("data-cell-focus","LM2"):0===t&&3===i?e.setAttribute("data-cell-focus","LH"):1===t&&0===i?e.setAttribute("data-cell-focus","M1L"):1===t&&1===i?e.setAttribute("data-cell-focus","M1M1"):1===t&&2===i?e.setAttribute("data-cell-focus","M1M2"):1===t&&3===i?e.setAttribute("data-cell-focus","M1H"):2===t&&0===i?e.setAttribute("data-cell-focus","M2L"):2===t&&1===i?e.setAttribute("data-cell-focus","M2M1"):2===t&&2===i?e.setAttribute("data-cell-focus","M2M2"):2===t&&3===i?e.setAttribute("data-cell-focus","M2H"):3===t&&0===i?e.setAttribute("data-cell-focus","HL"):3===t&&1===i?e.setAttribute("data-cell-focus","HM1"):3===t&&2===i?e.setAttribute("data-cell-focus","HM2"):3===t&&3===i&&e.setAttribute("data-cell-focus","HH")}applyEventHandlers(){const e=document.querySelectorAll(".esri-interactive-legend__svg-rect-element");Array.from(e).map((e=>{const t=e.getAttribute("data-feature-i"),i=e.getAttribute("data-feature-j"),n=e.getAttribute("data-cell-focus");e.onclick=()=>{this.handleFilter(t,i,n),this.handleSelectedElement(e)},e.onkeydown=s=>{const{key:a}=s;("Enter"===a||"Space"===a)&&(this.handleFilter(t,i,n),this.handleSelectedElement(e))}}))}async handleFilter(e,t,i){var n,s,a,l,o;const d=this.activeLayerInfo.layer,{authoringInfo:c}=d.renderer,{field1:p,field2:h}=c,{queryExpressions:v,fLayerView:g}=r.data[this.activeLayerInfo.layer.id];if("relationship-ramp"===this.legendElement.type&&c&&p&&h){const r=this.generateExpressionParams(p,h,c,e,t,i),d=this.generateExpressionForRelationship(r);0===v.length?v[0]=d:-1===v.indexOf(d)?v.push(d):v.splice(v.indexOf(d),1);const u=v.join(" OR "),y=null!==(s=null===(n=null==g?void 0:g.filter)||void 0===n?void 0:n.timeExtent)&&void 0!==s?s:null,[_,b]=await f(["esri/layers/support/FeatureFilter","esri/layers/support/FeatureEffect"]);if("filter"===(null===(a=this.filterMode)||void 0===a?void 0:a.type))g.filter=new _({where:u,timeExtent:(null===(l=null==g?void 0:g.filter)||void 0===l?void 0:l.timeExtent)?g.filter.timeExtent:null});else if(null===(o=this.filterMode)||void 0===o?void 0:o.effect){const{includedEffect:e,excludedEffect:t}=this.filterMode.effect,i=await m(t,g,"excludedEffect"),n=await m(e,g,"includedEffect");g.featureEffect=new b({filter:new _({where:u,timeExtent:y}),includedEffect:n,excludedEffect:i})}}}generateExpressionParams(e,t,i,n,s,a){const l=[],o=e.field,r=t.field,d=e.classBreakInfos,c=t.classBreakInfos,p=i.field1.hasOwnProperty("normalizationField")?i.field1.normalizationField:null,h=i.field2.hasOwnProperty("normalizationField")?i.field2.normalizationField:null;return d.forEach(((e,t)=>{const i=[];c.forEach(((e,n)=>{i.push([d[t],c[n]])})),l.push(i)})),{data:l,i:n,j:s,field1:p?`(${o}/${p})`:`${o}`,field2:h?`(${r}/${h})`:`${r}`,focus:a}}generateExpressionForRelationship(e){const{focus:t,field1:i,field2:n,data:s,i:a,j:l}=e;return"LL"===t?`${i} >= ${s[a][l][0].minValue} AND ${i} <= ${s[a][l][0].maxValue} AND ${n} >= ${s[a][l][1].minValue} AND ${n} <= ${s[a][l][1].maxValue}`:"LM"===t||"LM1"===t||"LM2"===t||"LH"===t?`${i} >= ${s[a][l][0].minValue} AND ${i} <= ${s[a][l][0].maxValue} AND ${n} > ${s[a][l][1].minValue} AND ${n} <= ${s[a][l][1].maxValue}`:"ML"===t||"M1L"===t||"M2L"===t||"HL"===t?`${i} > ${s[a][l][0].minValue} AND ${i} <= ${s[a][l][0].maxValue} AND ${n} >= ${s[a][l][1].minValue} AND ${n} <= ${s[a][l][1].maxValue}`:`${i} > ${s[a][l][0].minValue} AND ${i} <= ${s[a][l][0].maxValue} AND ${n} > ${s[a][l][1].minValue} AND ${n} <= ${s[a][l][1].maxValue}`}handleSelectedElement(e){const t=e.classList;t.contains("esri-interactive-legend--selected-cell")?(e.removeAttribute("stroke"),e.removeAttribute("stroke-width"),e.removeAttribute("stroke-opacity"),t.remove("esri-interactive-legend--selected-cell")):(t.add("esri-interactive-legend--selected-cell"),e.setAttribute("stroke","black"),e.setAttribute("stroke-width","3px"),e.setAttribute("stroke-opacity","1"))}};x.style=".sc-instant-apps-interactive-legend-relationship-h{display:block}.sc-instant-apps-interactive-legend-relationship-h .instant-apps-interactive-legend-relationship__instructional-text.sc-instant-apps-interactive-legend-relationship{display:inline-block;width:100%;text-align:center;margin-bottom:10px;background-color:#d2e9f9}.calcite-mode-dark .sc-instant-apps-interactive-legend-relationship-h .instant-apps-interactive-legend-relationship__instructional-text.sc-instant-apps-interactive-legend-relationship{background-color:var(--calcite-color-brand);color:#151515}";export{y as instant_apps_interactive_legend_group_legend_element,_ as instant_apps_interactive_legend_layer_element,b as instant_apps_interactive_legend_legend_element,L as instant_apps_interactive_legend_legend_element_caption,x as instant_apps_interactive_legend_relationship}
|