@esri/solutions-components 0.6.36 → 0.6.37
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +16 -0
- package/dist/cjs/calcite-alert_3.cjs.entry.js +1 -12
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/collection/components/basemap-gallery/basemap-gallery.js +8 -0
- package/dist/collection/components/edit-card/edit-card.js +1 -12
- package/dist/collection/components/map-legend/map-legend.js +9 -1
- package/dist/collection/components/public-notification/public-notification.js +1 -1
- package/dist/components/basemap-gallery2.js +8 -0
- package/dist/components/edit-card2.js +1 -12
- package/dist/components/map-legend2.js +8 -0
- package/dist/components/public-notification.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +16 -0
- package/dist/esm/calcite-alert_3.entry.js +1 -12
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/solutions-components/{p-0f50087e.entry.js → p-4ecad91c.entry.js} +2 -2
- package/dist/solutions-components/{p-1682bd0f.entry.js → p-b7804687.entry.js} +1 -1
- package/dist/solutions-components/p-fbc7fc26.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/basemap-gallery/basemap-gallery.d.ts +4 -0
- package/dist/types/components/map-legend/map-legend.d.ts +4 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-7b61f856.entry.js +0 -6
@@ -58,6 +58,14 @@ const BasemapGallery = class {
|
|
58
58
|
render() {
|
59
59
|
return (index.h(index.Host, null, index.h("div", { ref: (el) => { this._basemapElement = el; } })));
|
60
60
|
}
|
61
|
+
/**
|
62
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
63
|
+
*/
|
64
|
+
async componentDidLoad() {
|
65
|
+
if (this.mapView) {
|
66
|
+
await this.mapViewWatchHandler();
|
67
|
+
}
|
68
|
+
}
|
61
69
|
//--------------------------------------------------------------------------
|
62
70
|
//
|
63
71
|
// Functions (protected)
|
@@ -348,6 +356,14 @@ const MapLegend = class {
|
|
348
356
|
render() {
|
349
357
|
return (index.h(index.Host, null, index.h("div", { ref: (el) => { this._legendElement = el; } })));
|
350
358
|
}
|
359
|
+
/**
|
360
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
361
|
+
*/
|
362
|
+
async componentDidLoad() {
|
363
|
+
if (this.mapView) {
|
364
|
+
await this.mapViewWatchHandler();
|
365
|
+
}
|
366
|
+
}
|
351
367
|
//--------------------------------------------------------------------------
|
352
368
|
//
|
353
369
|
// Functions (protected)
|
@@ -450,11 +450,7 @@ const EditCard = class {
|
|
450
450
|
const container = document.createElement("div");
|
451
451
|
const layers = await mapViewUtils.getAllLayers(this.mapView);
|
452
452
|
const layerInfos = layers.map(layer => {
|
453
|
-
return {
|
454
|
-
layer,
|
455
|
-
geometryUpdatesEnabled: false,
|
456
|
-
addEnabled: false
|
457
|
-
};
|
453
|
+
return { layer };
|
458
454
|
});
|
459
455
|
this._editor = new this.Editor({
|
460
456
|
allowedWorkflows: "update",
|
@@ -470,7 +466,6 @@ const EditCard = class {
|
|
470
466
|
this._editHandle.remove();
|
471
467
|
this._attachmentHandle.remove();
|
472
468
|
this._activeWorkflowHandle.remove();
|
473
|
-
this._addRelatedRecordHandle.remove();
|
474
469
|
}
|
475
470
|
this._attachmentHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "adding-attachment" ||
|
476
471
|
this._editor.viewModel.state === "editing-attachment" ||
|
@@ -490,12 +485,6 @@ const EditCard = class {
|
|
490
485
|
this._shouldClose = false;
|
491
486
|
}
|
492
487
|
});
|
493
|
-
// Temp workaround until a new prop is added at 4.29
|
494
|
-
this._addRelatedRecordHandle = this.reactiveUtils.when(() => !!this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks, () => {
|
495
|
-
this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks.addRelatedRecord = null;
|
496
|
-
}, {
|
497
|
-
once: true
|
498
|
-
});
|
499
488
|
// had issues with destroy before adding like this
|
500
489
|
this._editContainer.appendChild(container);
|
501
490
|
}
|
@@ -513,7 +513,7 @@ const PublicNotification = class {
|
|
513
513
|
const displayClass = this._exportType === interfaces.EExportType.PDF ? "display-block" : "display-none";
|
514
514
|
const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
|
515
515
|
const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
|
516
|
-
return (index.h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), index.h("div", { class: "padding-sides-1" }, index.h("pdf-download", { defaultNumLabelsPerPage: this.defaultNumLabelsPerPage, disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), index.h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), index.h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
|
516
|
+
return (index.h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), index.h("div", { class: "padding-sides-1" }, index.h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), index.h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), index.h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), index.h("div", { class: "padding-top-sides-1" }, index.h("calcite-label", { class: "label-margin-0", layout: "inline" }, index.h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
|
517
517
|
}
|
518
518
|
/**
|
519
519
|
* Render the refine page
|
@@ -63,6 +63,14 @@ export class BasemapGallery {
|
|
63
63
|
render() {
|
64
64
|
return (h(Host, null, h("div", { ref: (el) => { this._basemapElement = el; } })));
|
65
65
|
}
|
66
|
+
/**
|
67
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
68
|
+
*/
|
69
|
+
async componentDidLoad() {
|
70
|
+
if (this.mapView) {
|
71
|
+
await this.mapViewWatchHandler();
|
72
|
+
}
|
73
|
+
}
|
66
74
|
//--------------------------------------------------------------------------
|
67
75
|
//
|
68
76
|
// Functions (protected)
|
@@ -142,11 +142,7 @@ export class EditCard {
|
|
142
142
|
const container = document.createElement("div");
|
143
143
|
const layers = await getAllLayers(this.mapView);
|
144
144
|
const layerInfos = layers.map(layer => {
|
145
|
-
return {
|
146
|
-
layer,
|
147
|
-
geometryUpdatesEnabled: false,
|
148
|
-
addEnabled: false
|
149
|
-
};
|
145
|
+
return { layer };
|
150
146
|
});
|
151
147
|
this._editor = new this.Editor({
|
152
148
|
allowedWorkflows: "update",
|
@@ -162,7 +158,6 @@ export class EditCard {
|
|
162
158
|
this._editHandle.remove();
|
163
159
|
this._attachmentHandle.remove();
|
164
160
|
this._activeWorkflowHandle.remove();
|
165
|
-
this._addRelatedRecordHandle.remove();
|
166
161
|
}
|
167
162
|
this._attachmentHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "adding-attachment" ||
|
168
163
|
this._editor.viewModel.state === "editing-attachment" ||
|
@@ -182,12 +177,6 @@ export class EditCard {
|
|
182
177
|
this._shouldClose = false;
|
183
178
|
}
|
184
179
|
});
|
185
|
-
// Temp workaround until a new prop is added at 4.29
|
186
|
-
this._addRelatedRecordHandle = this.reactiveUtils.when(() => !!this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks, () => {
|
187
|
-
this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks.addRelatedRecord = null;
|
188
|
-
}, {
|
189
|
-
once: true
|
190
|
-
});
|
191
180
|
// had issues with destroy before adding like this
|
192
181
|
this._editContainer.appendChild(container);
|
193
182
|
}
|
@@ -62,6 +62,14 @@ export class MapLegend {
|
|
62
62
|
render() {
|
63
63
|
return (h(Host, null, h("div", { ref: (el) => { this._legendElement = el; } })));
|
64
64
|
}
|
65
|
+
/**
|
66
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
67
|
+
*/
|
68
|
+
async componentDidLoad() {
|
69
|
+
if (this.mapView) {
|
70
|
+
await this.mapViewWatchHandler();
|
71
|
+
}
|
72
|
+
}
|
65
73
|
//--------------------------------------------------------------------------
|
66
74
|
//
|
67
75
|
// Functions (protected)
|
@@ -151,7 +159,7 @@ export class MapLegend {
|
|
151
159
|
"optional": false,
|
152
160
|
"docs": {
|
153
161
|
"tags": [],
|
154
|
-
"text": "esri/widgets/Legend: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html\n\nLegend instance"
|
162
|
+
"text": "esri/widgets/Legend: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html\r\n\r\nLegend instance"
|
155
163
|
}
|
156
164
|
}
|
157
165
|
};
|
@@ -517,7 +517,7 @@ export class PublicNotification {
|
|
517
517
|
const displayClass = this._exportType === EExportType.PDF ? "display-block" : "display-none";
|
518
518
|
const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
|
519
519
|
const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
|
520
|
-
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: this.defaultNumLabelsPerPage, disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
|
520
|
+
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
|
521
521
|
}
|
522
522
|
/**
|
523
523
|
* Render the refine page
|
@@ -54,6 +54,14 @@ const BasemapGallery = /*@__PURE__*/ proxyCustomElement(class BasemapGallery ext
|
|
54
54
|
render() {
|
55
55
|
return (h(Host, null, h("div", { ref: (el) => { this._basemapElement = el; } })));
|
56
56
|
}
|
57
|
+
/**
|
58
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
59
|
+
*/
|
60
|
+
async componentDidLoad() {
|
61
|
+
if (this.mapView) {
|
62
|
+
await this.mapViewWatchHandler();
|
63
|
+
}
|
64
|
+
}
|
57
65
|
//--------------------------------------------------------------------------
|
58
66
|
//
|
59
67
|
// Functions (protected)
|
@@ -137,11 +137,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
137
137
|
const container = document.createElement("div");
|
138
138
|
const layers = await getAllLayers(this.mapView);
|
139
139
|
const layerInfos = layers.map(layer => {
|
140
|
-
return {
|
141
|
-
layer,
|
142
|
-
geometryUpdatesEnabled: false,
|
143
|
-
addEnabled: false
|
144
|
-
};
|
140
|
+
return { layer };
|
145
141
|
});
|
146
142
|
this._editor = new this.Editor({
|
147
143
|
allowedWorkflows: "update",
|
@@ -157,7 +153,6 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
157
153
|
this._editHandle.remove();
|
158
154
|
this._attachmentHandle.remove();
|
159
155
|
this._activeWorkflowHandle.remove();
|
160
|
-
this._addRelatedRecordHandle.remove();
|
161
156
|
}
|
162
157
|
this._attachmentHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "adding-attachment" ||
|
163
158
|
this._editor.viewModel.state === "editing-attachment" ||
|
@@ -177,12 +172,6 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
177
172
|
this._shouldClose = false;
|
178
173
|
}
|
179
174
|
});
|
180
|
-
// Temp workaround until a new prop is added at 4.29
|
181
|
-
this._addRelatedRecordHandle = this.reactiveUtils.when(() => !!this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks, () => {
|
182
|
-
this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks.addRelatedRecord = null;
|
183
|
-
}, {
|
184
|
-
once: true
|
185
|
-
});
|
186
175
|
// had issues with destroy before adding like this
|
187
176
|
this._editContainer.appendChild(container);
|
188
177
|
}
|
@@ -53,6 +53,14 @@ const MapLegend = /*@__PURE__*/ proxyCustomElement(class MapLegend extends HTMLE
|
|
53
53
|
render() {
|
54
54
|
return (h(Host, null, h("div", { ref: (el) => { this._legendElement = el; } })));
|
55
55
|
}
|
56
|
+
/**
|
57
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
58
|
+
*/
|
59
|
+
async componentDidLoad() {
|
60
|
+
if (this.mapView) {
|
61
|
+
await this.mapViewWatchHandler();
|
62
|
+
}
|
63
|
+
}
|
56
64
|
//--------------------------------------------------------------------------
|
57
65
|
//
|
58
66
|
// Functions (protected)
|
@@ -550,7 +550,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
550
550
|
const displayClass = this._exportType === EExportType.PDF ? "display-block" : "display-none";
|
551
551
|
const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
|
552
552
|
const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
|
553
|
-
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: this.defaultNumLabelsPerPage, disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
|
553
|
+
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
|
554
554
|
}
|
555
555
|
/**
|
556
556
|
* Render the refine page
|
@@ -54,6 +54,14 @@ const BasemapGallery = class {
|
|
54
54
|
render() {
|
55
55
|
return (h(Host, null, h("div", { ref: (el) => { this._basemapElement = el; } })));
|
56
56
|
}
|
57
|
+
/**
|
58
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
59
|
+
*/
|
60
|
+
async componentDidLoad() {
|
61
|
+
if (this.mapView) {
|
62
|
+
await this.mapViewWatchHandler();
|
63
|
+
}
|
64
|
+
}
|
57
65
|
//--------------------------------------------------------------------------
|
58
66
|
//
|
59
67
|
// Functions (protected)
|
@@ -344,6 +352,14 @@ const MapLegend = class {
|
|
344
352
|
render() {
|
345
353
|
return (h(Host, null, h("div", { ref: (el) => { this._legendElement = el; } })));
|
346
354
|
}
|
355
|
+
/**
|
356
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
357
|
+
*/
|
358
|
+
async componentDidLoad() {
|
359
|
+
if (this.mapView) {
|
360
|
+
await this.mapViewWatchHandler();
|
361
|
+
}
|
362
|
+
}
|
347
363
|
//--------------------------------------------------------------------------
|
348
364
|
//
|
349
365
|
// Functions (protected)
|
@@ -446,11 +446,7 @@ const EditCard = class {
|
|
446
446
|
const container = document.createElement("div");
|
447
447
|
const layers = await getAllLayers(this.mapView);
|
448
448
|
const layerInfos = layers.map(layer => {
|
449
|
-
return {
|
450
|
-
layer,
|
451
|
-
geometryUpdatesEnabled: false,
|
452
|
-
addEnabled: false
|
453
|
-
};
|
449
|
+
return { layer };
|
454
450
|
});
|
455
451
|
this._editor = new this.Editor({
|
456
452
|
allowedWorkflows: "update",
|
@@ -466,7 +462,6 @@ const EditCard = class {
|
|
466
462
|
this._editHandle.remove();
|
467
463
|
this._attachmentHandle.remove();
|
468
464
|
this._activeWorkflowHandle.remove();
|
469
|
-
this._addRelatedRecordHandle.remove();
|
470
465
|
}
|
471
466
|
this._attachmentHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "adding-attachment" ||
|
472
467
|
this._editor.viewModel.state === "editing-attachment" ||
|
@@ -486,12 +481,6 @@ const EditCard = class {
|
|
486
481
|
this._shouldClose = false;
|
487
482
|
}
|
488
483
|
});
|
489
|
-
// Temp workaround until a new prop is added at 4.29
|
490
|
-
this._addRelatedRecordHandle = this.reactiveUtils.when(() => !!this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks, () => {
|
491
|
-
this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks.addRelatedRecord = null;
|
492
|
-
}, {
|
493
|
-
once: true
|
494
|
-
});
|
495
484
|
// had issues with destroy before adding like this
|
496
485
|
this._editContainer.appendChild(container);
|
497
486
|
}
|
@@ -509,7 +509,7 @@ const PublicNotification = class {
|
|
509
509
|
const displayClass = this._exportType === EExportType.PDF ? "display-block" : "display-none";
|
510
510
|
const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
|
511
511
|
const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
|
512
|
-
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: this.defaultNumLabelsPerPage, disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
|
512
|
+
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
|
513
513
|
}
|
514
514
|
/**
|
515
515
|
* Render the refine page
|
@@ -3,9 +3,9 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as t,c as i,h as n,H as e,g as s}from"./p-91c78d98.js";import{u as a,t as o,g as l,x as r}from"./p-4b9ba22d.js";import{s as c,a as h,c as d}from"./p-3a668467.js";import{c as p,d as u,n as m}from"./p-bf9d3381.js";import{o as g}from"./p-abc50d38.js";import{c as v,s as f,d as b,u as w}from"./p-29120ecd.js";import{K as
|
6
|
+
import{r as t,c as i,h as n,H as e,g as s}from"./p-91c78d98.js";import{u as a,t as o,g as l,x as r}from"./p-4b9ba22d.js";import{s as c,a as h,c as d}from"./p-3a668467.js";import{c as p,d as u,n as m}from"./p-bf9d3381.js";import{o as g}from"./p-abc50d38.js";import{c as v,s as f,d as b,u as w}from"./p-29120ecd.js";import{K as x}from"./p-c24040ec.js";import{g as y}from"./p-866837f6.js";import{c as k}from"./p-efc041d0.js";import{l as z}from"./p-05948b48.js";import{g as C}from"./p-99d8a839.js";import{k as _}from"./p-15070568.js";import"./p-361b44ed.js";import"./p-3760847f.js";import"./p-34fb2a6e.js";import"./p-e1a4994d.js";import"./p-2a58e378.js";
|
7
7
|
/*!
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
10
|
* v1.9.0
|
11
|
-
*/const j={slow:14e3,medium:1e4,fast:6e3},q="container",W=class{constructor(n){t(this,n),this.calciteAlertBeforeClose=i(this,"calciteAlertBeforeClose",6),this.calciteAlertClose=i(this,"calciteAlertClose",6),this.calciteAlertBeforeOpen=i(this,"calciteAlertBeforeOpen",6),this.calciteAlertOpen=i(this,"calciteAlertOpen",6),this.calciteInternalAlertSync=i(this,"calciteInternalAlertSync",6),this.calciteInternalAlertRegister=i(this,"calciteInternalAlertRegister",6),this.autoCloseTimeoutId=null,this.resizeObserver=k("resize",(t=>this.responsiveContainerWidth=t[0].contentRect.width)),this.totalOpenTime=0,this.totalHoverTime=0,this.openTransitionProp="opacity",this.setTransitionEl=t=>{this.transitionEl=t},this.closeAlert=()=>{this.autoCloseTimeoutId=null,this.queued=!1,this.open=!1,this.queue=this.queue.filter((t=>t!==this.el)),this.determineActiveAlert(),this.calciteInternalAlertSync.emit({queue:this.queue})},this.actionsEndSlotChangeHandler=t=>{this.hasEndActions=a(t)},this.handleMouseOver=()=>{window.clearTimeout(this.autoCloseTimeoutId),this.totalOpenTime=Date.now()-this.initialOpenTime,this.lastMouseOverBegin=Date.now()},this.handleMouseLeave=()=>{const t=Date.now()-this.lastMouseOverBegin,i=j[this.autoCloseDuration]-this.totalOpenTime+this.totalHoverTime;this.totalHoverTime=this.totalHoverTime?t+this.totalHoverTime:t,this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),i)},this.open=!1,this.autoClose=!1,this.autoCloseDuration="medium",this.kind="brand",this.icon=void 0,this.iconFlipRtl=!1,this.label=void 0,this.numberingSystem=void 0,this.placement="bottom",this.scale="m",this.messages=void 0,this.messageOverrides=void 0,this.slottedInShell=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.hasEndActions=!1,this.queue=[],this.queueLength=0,this.queued=!1,this.responsiveContainerWidth=void 0}openHandler(){g(this),this.open&&!this.queued&&this.calciteInternalAlertRegister.emit(),this.open||(this.queue=this.queue.filter((t=>t!==this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}))}onMessagesChange(){}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(window.clearTimeout(this.autoCloseTimeoutId),this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),j[this.autoCloseDuration]))}connectedCallback(){var t;p(this),v(this),this.open&&!this.queued&&this.calciteInternalAlertRegister.emit(),this.transitionEl&&(null===(t=this.resizeObserver)||void 0===t||t.observe(this.transitionEl))}async componentWillLoad(){c(this);const[,t]=await Promise.all([f(this),x()]);this.breakpoints=t,this.open&&g(this)}componentDidLoad(){var t;h(this),null===(t=this.resizeObserver)||void 0===t||t.observe(this.transitionEl)}disconnectedCallback(){var t;window.dispatchEvent(new CustomEvent("calciteInternalAlertUnregister",{detail:{alert:this.el}})),window.clearTimeout(this.autoCloseTimeoutId),window.clearTimeout(this.queueTimeout),u(this),b(this),this.slottedInShell=!1,null===(t=this.resizeObserver)||void 0===t||t.disconnect()}render(){m.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,signDisplay:"always"};const{hasEndActions:t}=this,{open:i,autoClose:s,responsiveContainerWidth:a,label:l,placement:c,queued:h}=this,d=s?"alert":"alertdialog",p=this.breakpoints.width,u=a<p.small,g=a>=p.small,v=!i,f=r(y,this.icon,this.kind),b=this.queueLength>1;return n(e,{"aria-hidden":o(v),"aria-label":l,"calcite-hydrated-hidden":v,role:d},n("div",{class:{[q]:!0,"container--queued":h,[`${q}--${c}`]:!0,"container--slotted-in-shell":this.slottedInShell},onPointerEnter:this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:null,onPointerLeave:this.autoClose&&this.autoCloseTimeoutId?this.handleMouseLeave:null,ref:this.setTransitionEl},n("div",{class:"content-container"},f&&g?this.renderIcon(f):null,n("div",{class:"content"},f&&u?this.renderIcon(f):null,n("div",{class:"text-container"},n("slot",{name:"title"}),n("slot",{name:"message"}),n("slot",{name:"link"})))),u?this.renderCloseButton():null,n("div",{class:"footer",hidden:!t&&!b},this.renderActionsEnd(),b?this.renderQueueCount():null),g?this.renderCloseButton():null,i&&!h&&s?n("div",{class:"dismiss-progress"}):null))}renderCloseButton(){return n("button",{"aria-label":this.messages.close,class:"close",key:"close",onClick:this.closeAlert,type:"button",ref:t=>this.closeButton=t},n("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":"s"}))}renderQueueCount(){const t=m.numberFormatter.format(this.queueLength>2?this.queueLength-1:1);return n("div",{class:{"queue-count":!0,"queue-count--active":this.queueLength>1},key:"queue-count"},n("calcite-chip",{scale:this.scale,value:t},t))}renderActionsEnd(){return n("div",{class:"actions-end"},n("slot",{name:"actions-end",onSlotchange:this.actionsEndSlotChangeHandler}))}renderIcon(t){return n("div",{class:"icon"},n("calcite-icon",{flipRtl:this.iconFlipRtl,icon:t,scale:"l"===this.scale?"m":"s"}))}alertSync(t){this.queue!==t.detail.queue&&(this.queue=t.detail.queue),this.queueLength=this.queue.length,this.determineActiveAlert(),t.stopPropagation()}alertRegister(){this.open&&!this.queue.includes(this.el)&&(this.queued=!0,this.queue.push(this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}),this.determineActiveAlert()}alertUnregister(t){const i=this.queue.filter((i=>i!==t.detail.alert));this.queue=i,window.dispatchEvent(new CustomEvent("calciteInternalAlertSync",{detail:{queue:i}}))}async setFocus(){await d(this);const t=l(this.el,{selector:"calcite-link"});if(this.closeButton||t)return t?t.setFocus():void(this.closeButton&&this.closeButton.focus())}effectiveLocaleChange(){w(this,this.effectiveLocale)}determineActiveAlert(){var t;(null===(t=this.queue)||void 0===t?void 0:t[0])===this.el&&(this.openAlert(),this.autoClose&&!this.autoCloseTimeoutId&&(this.initialOpenTime=Date.now(),this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),j[this.autoCloseDuration])))}onBeforeOpen(){this.calciteAlertBeforeOpen.emit()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit()}openAlert(){window.clearTimeout(this.queueTimeout),this.queueTimeout=window.setTimeout((()=>this.queued=!1),300)}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{open:["openHandler"],messageOverrides:["onMessagesChange"],autoCloseDuration:["updateDuration"],effectiveLocale:["effectiveLocaleChange"]}}};W.style='/**\n * Do not edit directly\n * Generated on Thu, 11 May 2023 18:56:13 GMT\n */\n/* mixins & extensions */\n/* helper to properly scale internal durations */\n/**\n* Currently only used in Checkbox.\n*/\n/**\n* CSS Custom Properties\n*\n* These properties can be overridden using the component\'s tag as selector.\n*\n* @prop --calcite-alert-width: Specifies the width of the component.\n*/\n:host {\n --calcite-alert-edge-distance: 2rem;\n display: block;\n}\n\n.container {\n pointer-events: none;\n position: fixed;\n z-index: var(--calcite-app-z-index-toast);\n margin-inline: auto;\n margin-block: 0px;\n box-sizing: border-box;\n display: flex;\n inline-size: 100%;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n background-color: var(--calcite-ui-foreground-1);\n text-align: start;\n opacity: 0;\n --tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);\n --tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n container: responsive-container/inline-size;\n border-radius: var(--calcite-border-radius);\n border-block-start: 0 solid transparent;\n border-inline: 1px solid var(--calcite-ui-border-3);\n border-block-end: 1px solid var(--calcite-ui-border-3);\n inline-size: var(--calcite-alert-width);\n max-inline-size: calc(100% - var(--calcite-alert-edge-distance) * 2);\n transition: var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out;\n}\n.container--bottom, .container--top {\n inset-inline-end: 0;\n inset-inline-start: 0;\n}\n.container[class*=bottom] {\n transform: translate3d(0, var(--calcite-alert-edge-distance), 0);\n inset-block-end: var(--calcite-alert-edge-distance);\n}\n.container[class*=top] {\n transform: translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), 0);\n inset-block-start: var(--calcite-alert-edge-distance);\n}\n.container[class*=start] {\n inset-inline-start: var(--calcite-alert-edge-distance);\n inset-inline-end: auto;\n}\n.container[class*=end] {\n inset-inline-end: var(--calcite-alert-edge-distance);\n inset-inline-start: auto;\n}\n\n.content {\n box-sizing: border-box;\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n transition: all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;\n padding-block: var(--calcite-alert-spacing-token-small);\n padding-inline: var(--calcite-alert-spacing-token-large) var(--calcite-alert-spacing-token-small);\n}\n\n.icon {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n padding: 0px;\n margin-block-end: var(--calcite-alert-spacing-token-large);\n margin-inline-end: auto;\n}\n\n.close {\n display: flex;\n cursor: pointer;\n align-items: flex-start;\n justify-content: flex-end;\n align-self: flex-start;\n border-style: none;\n background-color: transparent;\n color: var(--calcite-ui-text-3);\n outline: 2px solid transparent;\n outline-offset: 2px;\n -webkit-appearance: none;\n padding: var(--calcite-alert-spacing-token-large);\n outline-color: transparent;\n}\n.close:focus {\n outline: 2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));\n outline-offset: calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n );\n}\n.close:hover, .close:focus {\n background-color: var(--calcite-ui-foreground-2);\n color: var(--calcite-ui-text-1);\n}\n.close:active {\n background-color: var(--calcite-ui-foreground-3);\n}\n\n.queue-count {\n visibility: hidden;\n display: flex;\n cursor: default;\n align-items: center;\n justify-content: space-around;\n align-self: stretch;\n overflow: hidden;\n background-color: var(--calcite-ui-foreground-1);\n text-align: center;\n font-weight: var(--calcite-font-weight-medium);\n color: var(--calcite-ui-text-2);\n opacity: 0;\n transition: all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;\n border-inline: 0 solid transparent;\n border-start-end-radius: 0;\n}\n.queue-count--active {\n visibility: visible;\n opacity: 1;\n}\n\n.dismiss-progress {\n position: absolute;\n display: block;\n inline-size: 100%;\n overflow: hidden;\n inset-inline: 0;\n inset-block-start: -2px;\n block-size: 2px;\n border-radius: var(--calcite-border-radius) var(--calcite-border-radius) 0 0;\n}\n.dismiss-progress:after {\n position: absolute;\n inset-block-start: 0px;\n display: block;\n block-size: 2px;\n content: "";\n background-color: var(--calcite-alert-dismiss-progress-background);\n inset-inline-end: 0;\n}\n\n.actions-end {\n display: flex;\n align-self: stretch;\n}\n\n.text-container {\n display: flex;\n min-inline-size: 0px;\n flex: 1 1 0%;\n flex-direction: column;\n overflow-wrap: break-word;\n}\n\n.content-container {\n display: flex;\n flex: 1 1 0%;\n}\n\n.footer {\n position: relative;\n order: 1;\n display: flex;\n inline-size: 100%;\n justify-content: flex-end;\n padding-block-start: 1px;\n block-size: var(--calcite-alert-footer-height);\n}\n.footer:before {\n content: "";\n position: absolute;\n inset-block-start: 0px;\n inset-inline: var(--calcite-alert-footer-divider-gap);\n border-block-start: 1px solid var(--calcite-ui-border-3);\n}\n\n:host([scale=s]) {\n --calcite-alert-width: 40em;\n --calcite-alert-spacing-token-small: 0.5rem;\n --calcite-alert-spacing-token-large: 0.75rem;\n --calcite-alert-footer-height: 2rem;\n --calcite-alert-footer-divider-gap: 0.125rem;\n}\n:host([scale=s]) slot[name=title]::slotted(*),\n:host([scale=s]) *::slotted([slot=title]) {\n font-size: var(--calcite-font-size--1);\n line-height: 1.375;\n}\n:host([scale=s]) slot[name=message]::slotted(*),\n:host([scale=s]) *::slotted([slot=message]) {\n font-size: var(--calcite-font-size--2);\n line-height: 1.375;\n}\n:host([scale=s]) slot[name=link]::slotted(*),\n:host([scale=s]) *::slotted([slot=link]) {\n font-size: var(--calcite-font-size--2);\n line-height: 1.375;\n}\n:host([scale=s]) .queue-count {\n margin-inline: 0.5rem;\n}\n:host([scale=s]) .container {\n --calcite-alert-min-height: 3.5rem;\n}\n\n:host([scale=m]) {\n --calcite-alert-width: 50em;\n --calcite-alert-spacing-token-small: 0.75rem;\n --calcite-alert-spacing-token-large: 1rem;\n --calcite-alert-footer-height: 3rem;\n --calcite-alert-footer-divider-gap: 0.25rem;\n}\n:host([scale=m]) slot[name=title]::slotted(*),\n:host([scale=m]) *::slotted([slot=title]) {\n font-size: var(--calcite-font-size-0);\n line-height: 1.375;\n}\n:host([scale=m]) slot[name=message]::slotted(*),\n:host([scale=m]) *::slotted([slot=message]) {\n font-size: var(--calcite-font-size--1);\n line-height: 1.375;\n}\n:host([scale=m]) slot[name=link]::slotted(*),\n:host([scale=m]) *::slotted([slot=link]) {\n font-size: var(--calcite-font-size--1);\n line-height: 1.375;\n}\n:host([scale=m]) .queue-count {\n margin-inline: 0.75rem;\n}\n:host([scale=m]) .container {\n --calcite-alert-min-height: 4.1875rem;\n}\n\n:host([scale=l]) {\n --calcite-alert-width: 60em;\n --calcite-alert-spacing-token-small: 1rem;\n --calcite-alert-spacing-token-large: 1.25rem;\n --calcite-alert-footer-height: 4rem;\n --calcite-alert-footer-divider-gap: 0.5rem;\n}\n:host([scale=l]) slot[name=title]::slotted(*),\n:host([scale=l]) *::slotted([slot=title]) {\n margin-block-end: 0.25rem;\n font-size: var(--calcite-font-size-1);\n line-height: 1.375;\n}\n:host([scale=l]) slot[name=message]::slotted(*),\n:host([scale=l]) *::slotted([slot=message]) {\n font-size: var(--calcite-font-size-0);\n line-height: 1.375;\n}\n:host([scale=l]) slot[name=link]::slotted(*),\n:host([scale=l]) *::slotted([slot=link]) {\n font-size: var(--calcite-font-size-0);\n line-height: 1.375;\n}\n:host([scale=l]) .queue-count {\n margin-inline: 1rem;\n}\n:host([scale=l]) .container {\n --calcite-alert-min-height: 5.625rem;\n}\n\n:host([open]) .container:not(.container--queued) {\n border-block-start-width: 2px;\n opacity: 1;\n pointer-events: initial;\n}\n:host([open]) .container:not(.container--queued)[class*=bottom] {\n transform: translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), inherit);\n}\n:host([open]) .container:not(.container--queued)[class*=top] {\n transform: translate3d(0, var(--calcite-alert-edge-distance), inherit);\n}\n\n:host([auto-close]) > .queue-count {\n border-inline-end: 0 solid transparent;\n}\n\nslot[name=title]::slotted(*),\n*::slotted([slot=title]) {\n font-size: var(--calcite-font-size-0);\n line-height: 1.375;\n font-weight: var(--calcite-font-weight-medium);\n color: var(--calcite-ui-text-1);\n}\n\nslot[name=message]::slotted(*),\n*::slotted([slot=message]) {\n margin: 0px;\n display: inline;\n font-size: var(--calcite-font-size--1);\n line-height: 1.375;\n font-weight: var(--calcite-font-weight-normal);\n color: var(--calcite-ui-text-2);\n margin-inline-end: 0.5rem;\n}\n\nslot[name=link]::slotted(*),\n*::slotted([slot=link]) {\n display: inline-flex;\n color: var(--calcite-ui-text-link);\n}\n\n:host([kind=brand]) .container {\n border-block-start-color: var(--calcite-ui-brand);\n}\n:host([kind=brand]) .container .icon {\n color: var(--calcite-ui-brand);\n}\n\n:host([kind=info]) .container {\n border-block-start-color: var(--calcite-ui-info);\n}\n:host([kind=info]) .container .icon {\n color: var(--calcite-ui-info);\n}\n\n:host([kind=danger]) .container {\n border-block-start-color: var(--calcite-ui-danger);\n}\n:host([kind=danger]) .container .icon {\n color: var(--calcite-ui-danger);\n}\n\n:host([kind=success]) .container {\n border-block-start-color: var(--calcite-ui-success);\n}\n:host([kind=success]) .container .icon {\n color: var(--calcite-ui-success);\n}\n\n:host([kind=warning]) .container {\n border-block-start-color: var(--calcite-ui-warning);\n}\n:host([kind=warning]) .container .icon {\n color: var(--calcite-ui-warning);\n}\n\n:host([auto-close-duration=fast]) .dismiss-progress:after {\n animation: dismissProgress 6000ms ease-out;\n}\n\n:host(:hover[auto-close-duration=fast]) .dismiss-progress:after {\n animation-play-state: paused;\n}\n\n:host([auto-close-duration=medium]) .dismiss-progress:after {\n animation: dismissProgress 10000ms ease-out;\n}\n\n:host(:hover[auto-close-duration=medium]) .dismiss-progress:after {\n animation-play-state: paused;\n}\n\n:host([auto-close-duration=slow]) .dismiss-progress:after {\n animation: dismissProgress 14000ms ease-out;\n}\n\n:host(:hover[auto-close-duration=slow]) .dismiss-progress:after {\n animation-play-state: paused;\n}\n\n@keyframes dismissProgress {\n 0% {\n inline-size: 0px;\n opacity: 0.75;\n }\n 100% {\n inline-size: 100%;\n opacity: 1;\n }\n}\n/**\n * Conditional styles for when Alert is slotted in Shell\n */\n.container--slotted-in-shell {\n position: absolute;\n}\n\n@container responsive-container (min-width: 476px) {\n .content {\n flex-direction: row;\n }\n .close {\n align-items: center;\n align-self: stretch;\n }\n .icon {\n justify-content: center;\n margin-inline-end: 0;\n margin-block: 0;\n padding-inline-end: var(--calcite-alert-spacing-token-large);\n }\n}\n@container responsive-container (min-width: 768px) {\n .close {\n align-self: stretch;\n }\n .footer {\n inline-size: auto;\n align-self: stretch;\n order: initial;\n block-size: inherit;\n }\n .footer:before {\n content: none;\n }\n .icon {\n padding-inline: var(--calcite-alert-spacing-token-large) 0;\n }\n}\n:host([hidden]) {\n display: none;\n}\n\n[hidden] {\n display: none;\n}\n\n:host([calcite-hydrated-hidden]) {\n visibility: hidden !important;\n pointer-events: none;\n}';const A=class{constructor(n){t(this,n),this.closeEdit=i(this,"closeEdit",7),this.editsComplete=i(this,"editsComplete",7),this._shouldClose=!1,this.graphics=void 0,this.mapView=void 0,this.open=!1,this.graphicIndex=0,this._editorLoading=!1,this._translations=void 0}async graphicsWatchHandler(){0===this.graphics.length&&await this._closeEdit()}async openWatchHandler(t){var i;t&&(null===(i=this.graphics)||void 0===i?void 0:i.length)>0&&this.graphicIndex>-1&&(this._editorLoading=!0,await this._initEditorWidget(),this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&await this._startUpdate(),this._editorLoading=!1),t||await this._closeEdit()}async featureSelectionChange(){await this._closeEdit()}async componentWillLoad(){await this._initModules(),await this._getTranslations()}async componentWillRender(){var t,i;(null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&(null===(i=this.graphics[0])||void 0===i?void 0:i.layer)&&(this._layer=this.graphics[0].layer,this._layerEditHandle&&this._layerEditHandle.remove(),this._layerEditHandle=this._layer.on("edits",(()=>{this.editsComplete.emit(),this._closeEdit()})))}render(){var t;const i=!((null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&this.graphics[0]&&this.graphics[0].layer.editingEnabled),s=this._editorLoading?"display-none":"position-absolute",a=this._editorLoading?"":"display-none";return n(e,null,n("div",{class:"position-absolute"},i?n("calcite-notice",{kind:"warning",open:!0,slot:"content-top",width:"full"},n("div",{slot:"message"},this._translations.enableEditing)):void 0,n("div",{class:"position-absolute",slot:"content"},n("div",{class:s,id:"feature-form",ref:t=>this._editContainer=t}),n("calcite-loader",{class:a,scale:"s"}))))}async _initModules(){const[t,i]=await z(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}async _initEditorWidget(){if(this.mapView&&this.graphics&&this.graphics.length>0&&this.graphics[0]){this._editor&&this._editor.destroy();const t=document.createElement("div"),i=(await _(this.mapView)).map((t=>({layer:t,geometryUpdatesEnabled:!1,addEnabled:!1})));this._editor=new this.Editor({allowedWorkflows:"update",view:this.mapView,layerInfos:i,visibleElements:{snappingControls:!1,sketchTooltipControls:!1},container:t}),this._editHandle&&this._attachmentHandle&&this._activeWorkflowHandle&&(this._editHandle.remove(),this._attachmentHandle.remove(),this._activeWorkflowHandle.remove(),this._addRelatedRecordHandle.remove()),this._attachmentHandle=this.reactiveUtils.when((()=>"adding-attachment"===this._editor.viewModel.state||"editing-attachment"===this._editor.viewModel.state||"creating-features"===this._editor.viewModel.state),(()=>{this._shouldClose=!1})),this._editHandle=this.reactiveUtils.when((()=>"ready"===this._editor.viewModel.state),(()=>{this._shouldClose?this._closeEdit():this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&this._startUpdate()})),this._activeWorkflowHandle=this.reactiveUtils.watch((()=>{var t;return null===(t=this._editor.viewModel.activeWorkflow)||void 0===t?void 0:t.activeWorkflow}),(t=>{"update-table-record"!==(null==t?void 0:t.type)&&"create-features"!==(null==t?void 0:t.type)||(this._shouldClose=!1)})),this._addRelatedRecordHandle=this.reactiveUtils.when((()=>!!this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks),(()=>{this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks.addRelatedRecord=null}),{once:!0}),this._editContainer.appendChild(t)}}async _closeEdit(){var t,i,n;this._shouldClose=!0,(null===(t=this._editor)||void 0===t?void 0:t.activeWorkflow)&&await(null===(i=this._editor)||void 0===i?void 0:i.cancelWorkflow()),null===(n=this._editor)||void 0===n||n.destroy(),this._shouldClose=!1,this.closeEdit.emit()}async _startUpdate(){await this._editor.startUpdateWorkflowAtFeatureEdit(this.graphics[this.graphicIndex]),this._shouldClose=!0}async _getTranslations(){const t=await C(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],open:["openWatchHandler"]}}};A.style=":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{--calcite-ui-background:none;padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-ui-foreground-1) !important}.esri-feature__content-node{background-color:var(--calcite-ui-foreground-1) !important}.esri-editor__panel-toolbar{display:none !important}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}";const E=class{constructor(n){t(this,n),this.selectionChanged=i(this,"selectionChanged",7),this.graphics=void 0,this.isLoading=!1,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._alertOpen=!1,this._count="",this._editRecordOpen=!1,this._translations=void 0}async graphicsWatchHandler(){var t;if(this._features||await this._initFeaturesWidget(),this.graphics.length>0){const i=null===(t=this.graphics[0])||void 0===t?void 0:t.layer;this._editEnabled=i.editingEnabled&&i.capabilities.operations.supportsUpdate,this._features.open({features:this.graphics})}else this._features.clear(),this._features.close()}async mapViewWatchHandler(){return await this._initFeaturesWidget()}async getSelectedFeature(){return this._features.selectedFeature}async closeEdit(){this._editRecordOpen=!1}async componentWillLoad(){await this._initModules(),await this._getTranslations()}render(){var t,i,s;const a=this.isLoading||this._editRecordOpen?"display-none":"position-absolute",o=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",l=!this.isLoading&&this._editRecordOpen?"display-none":"",r=(null===(i=null===(t=this._features)||void 0===t?void 0:t.features)||void 0===i?void 0:i.length)<2;return n(e,null,n("calcite-shell",null,n("calcite-loader",{class:this.isLoading?"":"display-none",label:this._translations.fetchingData}),n("div",{class:"esri-widget "+a,id:"features-node"}),n("div",{class:`${l} width-100`,slot:"footer"},n("div",{class:"display-flex top-border padding-1-2"},n("calcite-button",{appearance:"solid","icon-start":"pencil",id:"solutions-edit",onClick:()=>this._openEditRecord(),width:"full"},this._translations.edit),n("calcite-tooltip",{label:"",placement:"bottom","reference-element":"solutions-edit"},n("span",null,this._translations.edit))),n("div",{class:"display-flex padding-1-2 button-container top-border"},n("div",{class:"min-width-100"},n("calcite-button",{appearance:"outline",disabled:r,id:"solutions-back",onClick:()=>this._back(),width:"full"},this._translations.back),n("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-back"},n("span",null,this._translations.back))),n("div",null,this._getCount()),n("div",{class:"min-width-100"},n("calcite-button",{appearance:"outline",disabled:r,id:"solutions-next",onClick:()=>this._next(),width:"full"},this._translations.next),n("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-next"},n("span",null,this._translations.next))))),n("edit-card",{class:o,graphicIndex:null===(s=this._features)||void 0===s?void 0:s.selectedFeatureIndex,graphics:this.graphics,mapView:this.mapView,open:this._editRecordOpen}),n("calcite-alert",{icon:"layer-broken",kind:"warning",label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},n("div",{slot:"title"},this._translations.editDisabled),n("div",{slot:"message"},this._translations.enableEditing))))}async _initModules(){const[t,i]=await z(["esri/widgets/Features","esri/core/reactiveUtils"]);this.Features=t,this.reactiveUtils=i}async _initFeaturesWidget(){return await this.mapView.when((()=>{this._features?this._features.view=this.mapView:(this._features=new this.Features({view:this.mapView,container:"features-node",visibleElements:{actionBar:!1,closeButton:!1,heading:!0}}),this.zoomAndScrollToSelected&&this.reactiveUtils.watch((()=>this._features.selectedFeatureIndex),(t=>{t>-1&&this.selectionChanged.emit(this._features.selectedFeature)})))}))}_alertClosed(){this._alertOpen=!1}_editRecordClosed(){this._editRecordOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}_back(){this._features.previous(),this._count=this._getCount()}_next(){this._features.next(),this._count=this._getCount()}_getCount(){var t,i,n;const e=((null===(t=this._features)||void 0===t?void 0:t.viewModel.selectedFeatureIndex)+1).toString(),s=null===(n=null===(i=this._features)||void 0===i?void 0:i.features)||void 0===n?void 0:n.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",s)}async _getTranslations(){const t=await C(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};E.style=":host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-ui-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-ui-foreground-1) !important;height:100% !important}";export{W as calcite_alert,A as edit_card,E as info_card}
|
11
|
+
*/const j={slow:14e3,medium:1e4,fast:6e3},q="container",W=class{constructor(n){t(this,n),this.calciteAlertBeforeClose=i(this,"calciteAlertBeforeClose",6),this.calciteAlertClose=i(this,"calciteAlertClose",6),this.calciteAlertBeforeOpen=i(this,"calciteAlertBeforeOpen",6),this.calciteAlertOpen=i(this,"calciteAlertOpen",6),this.calciteInternalAlertSync=i(this,"calciteInternalAlertSync",6),this.calciteInternalAlertRegister=i(this,"calciteInternalAlertRegister",6),this.autoCloseTimeoutId=null,this.resizeObserver=k("resize",(t=>this.responsiveContainerWidth=t[0].contentRect.width)),this.totalOpenTime=0,this.totalHoverTime=0,this.openTransitionProp="opacity",this.setTransitionEl=t=>{this.transitionEl=t},this.closeAlert=()=>{this.autoCloseTimeoutId=null,this.queued=!1,this.open=!1,this.queue=this.queue.filter((t=>t!==this.el)),this.determineActiveAlert(),this.calciteInternalAlertSync.emit({queue:this.queue})},this.actionsEndSlotChangeHandler=t=>{this.hasEndActions=a(t)},this.handleMouseOver=()=>{window.clearTimeout(this.autoCloseTimeoutId),this.totalOpenTime=Date.now()-this.initialOpenTime,this.lastMouseOverBegin=Date.now()},this.handleMouseLeave=()=>{const t=Date.now()-this.lastMouseOverBegin,i=j[this.autoCloseDuration]-this.totalOpenTime+this.totalHoverTime;this.totalHoverTime=this.totalHoverTime?t+this.totalHoverTime:t,this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),i)},this.open=!1,this.autoClose=!1,this.autoCloseDuration="medium",this.kind="brand",this.icon=void 0,this.iconFlipRtl=!1,this.label=void 0,this.numberingSystem=void 0,this.placement="bottom",this.scale="m",this.messages=void 0,this.messageOverrides=void 0,this.slottedInShell=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.hasEndActions=!1,this.queue=[],this.queueLength=0,this.queued=!1,this.responsiveContainerWidth=void 0}openHandler(){g(this),this.open&&!this.queued&&this.calciteInternalAlertRegister.emit(),this.open||(this.queue=this.queue.filter((t=>t!==this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}))}onMessagesChange(){}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(window.clearTimeout(this.autoCloseTimeoutId),this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),j[this.autoCloseDuration]))}connectedCallback(){var t;p(this),v(this),this.open&&!this.queued&&this.calciteInternalAlertRegister.emit(),this.transitionEl&&(null===(t=this.resizeObserver)||void 0===t||t.observe(this.transitionEl))}async componentWillLoad(){c(this);const[,t]=await Promise.all([f(this),y()]);this.breakpoints=t,this.open&&g(this)}componentDidLoad(){var t;h(this),null===(t=this.resizeObserver)||void 0===t||t.observe(this.transitionEl)}disconnectedCallback(){var t;window.dispatchEvent(new CustomEvent("calciteInternalAlertUnregister",{detail:{alert:this.el}})),window.clearTimeout(this.autoCloseTimeoutId),window.clearTimeout(this.queueTimeout),u(this),b(this),this.slottedInShell=!1,null===(t=this.resizeObserver)||void 0===t||t.disconnect()}render(){m.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,signDisplay:"always"};const{hasEndActions:t}=this,{open:i,autoClose:s,responsiveContainerWidth:a,label:l,placement:c,queued:h}=this,d=s?"alert":"alertdialog",p=this.breakpoints.width,u=a<p.small,g=a>=p.small,v=!i,f=r(x,this.icon,this.kind),b=this.queueLength>1;return n(e,{"aria-hidden":o(v),"aria-label":l,"calcite-hydrated-hidden":v,role:d},n("div",{class:{[q]:!0,"container--queued":h,[`${q}--${c}`]:!0,"container--slotted-in-shell":this.slottedInShell},onPointerEnter:this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:null,onPointerLeave:this.autoClose&&this.autoCloseTimeoutId?this.handleMouseLeave:null,ref:this.setTransitionEl},n("div",{class:"content-container"},f&&g?this.renderIcon(f):null,n("div",{class:"content"},f&&u?this.renderIcon(f):null,n("div",{class:"text-container"},n("slot",{name:"title"}),n("slot",{name:"message"}),n("slot",{name:"link"})))),u?this.renderCloseButton():null,n("div",{class:"footer",hidden:!t&&!b},this.renderActionsEnd(),b?this.renderQueueCount():null),g?this.renderCloseButton():null,i&&!h&&s?n("div",{class:"dismiss-progress"}):null))}renderCloseButton(){return n("button",{"aria-label":this.messages.close,class:"close",key:"close",onClick:this.closeAlert,type:"button",ref:t=>this.closeButton=t},n("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":"s"}))}renderQueueCount(){const t=m.numberFormatter.format(this.queueLength>2?this.queueLength-1:1);return n("div",{class:{"queue-count":!0,"queue-count--active":this.queueLength>1},key:"queue-count"},n("calcite-chip",{scale:this.scale,value:t},t))}renderActionsEnd(){return n("div",{class:"actions-end"},n("slot",{name:"actions-end",onSlotchange:this.actionsEndSlotChangeHandler}))}renderIcon(t){return n("div",{class:"icon"},n("calcite-icon",{flipRtl:this.iconFlipRtl,icon:t,scale:"l"===this.scale?"m":"s"}))}alertSync(t){this.queue!==t.detail.queue&&(this.queue=t.detail.queue),this.queueLength=this.queue.length,this.determineActiveAlert(),t.stopPropagation()}alertRegister(){this.open&&!this.queue.includes(this.el)&&(this.queued=!0,this.queue.push(this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}),this.determineActiveAlert()}alertUnregister(t){const i=this.queue.filter((i=>i!==t.detail.alert));this.queue=i,window.dispatchEvent(new CustomEvent("calciteInternalAlertSync",{detail:{queue:i}}))}async setFocus(){await d(this);const t=l(this.el,{selector:"calcite-link"});if(this.closeButton||t)return t?t.setFocus():void(this.closeButton&&this.closeButton.focus())}effectiveLocaleChange(){w(this,this.effectiveLocale)}determineActiveAlert(){var t;(null===(t=this.queue)||void 0===t?void 0:t[0])===this.el&&(this.openAlert(),this.autoClose&&!this.autoCloseTimeoutId&&(this.initialOpenTime=Date.now(),this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),j[this.autoCloseDuration])))}onBeforeOpen(){this.calciteAlertBeforeOpen.emit()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit()}openAlert(){window.clearTimeout(this.queueTimeout),this.queueTimeout=window.setTimeout((()=>this.queued=!1),300)}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{open:["openHandler"],messageOverrides:["onMessagesChange"],autoCloseDuration:["updateDuration"],effectiveLocale:["effectiveLocaleChange"]}}};W.style='/**\n * Do not edit directly\n * Generated on Thu, 11 May 2023 18:56:13 GMT\n */\n/* mixins & extensions */\n/* helper to properly scale internal durations */\n/**\n* Currently only used in Checkbox.\n*/\n/**\n* CSS Custom Properties\n*\n* These properties can be overridden using the component\'s tag as selector.\n*\n* @prop --calcite-alert-width: Specifies the width of the component.\n*/\n:host {\n --calcite-alert-edge-distance: 2rem;\n display: block;\n}\n\n.container {\n pointer-events: none;\n position: fixed;\n z-index: var(--calcite-app-z-index-toast);\n margin-inline: auto;\n margin-block: 0px;\n box-sizing: border-box;\n display: flex;\n inline-size: 100%;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n background-color: var(--calcite-ui-foreground-1);\n text-align: start;\n opacity: 0;\n --tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);\n --tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n container: responsive-container/inline-size;\n border-radius: var(--calcite-border-radius);\n border-block-start: 0 solid transparent;\n border-inline: 1px solid var(--calcite-ui-border-3);\n border-block-end: 1px solid var(--calcite-ui-border-3);\n inline-size: var(--calcite-alert-width);\n max-inline-size: calc(100% - var(--calcite-alert-edge-distance) * 2);\n transition: var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out;\n}\n.container--bottom, .container--top {\n inset-inline-end: 0;\n inset-inline-start: 0;\n}\n.container[class*=bottom] {\n transform: translate3d(0, var(--calcite-alert-edge-distance), 0);\n inset-block-end: var(--calcite-alert-edge-distance);\n}\n.container[class*=top] {\n transform: translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), 0);\n inset-block-start: var(--calcite-alert-edge-distance);\n}\n.container[class*=start] {\n inset-inline-start: var(--calcite-alert-edge-distance);\n inset-inline-end: auto;\n}\n.container[class*=end] {\n inset-inline-end: var(--calcite-alert-edge-distance);\n inset-inline-start: auto;\n}\n\n.content {\n box-sizing: border-box;\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n transition: all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;\n padding-block: var(--calcite-alert-spacing-token-small);\n padding-inline: var(--calcite-alert-spacing-token-large) var(--calcite-alert-spacing-token-small);\n}\n\n.icon {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n padding: 0px;\n margin-block-end: var(--calcite-alert-spacing-token-large);\n margin-inline-end: auto;\n}\n\n.close {\n display: flex;\n cursor: pointer;\n align-items: flex-start;\n justify-content: flex-end;\n align-self: flex-start;\n border-style: none;\n background-color: transparent;\n color: var(--calcite-ui-text-3);\n outline: 2px solid transparent;\n outline-offset: 2px;\n -webkit-appearance: none;\n padding: var(--calcite-alert-spacing-token-large);\n outline-color: transparent;\n}\n.close:focus {\n outline: 2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));\n outline-offset: calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n );\n}\n.close:hover, .close:focus {\n background-color: var(--calcite-ui-foreground-2);\n color: var(--calcite-ui-text-1);\n}\n.close:active {\n background-color: var(--calcite-ui-foreground-3);\n}\n\n.queue-count {\n visibility: hidden;\n display: flex;\n cursor: default;\n align-items: center;\n justify-content: space-around;\n align-self: stretch;\n overflow: hidden;\n background-color: var(--calcite-ui-foreground-1);\n text-align: center;\n font-weight: var(--calcite-font-weight-medium);\n color: var(--calcite-ui-text-2);\n opacity: 0;\n transition: all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;\n border-inline: 0 solid transparent;\n border-start-end-radius: 0;\n}\n.queue-count--active {\n visibility: visible;\n opacity: 1;\n}\n\n.dismiss-progress {\n position: absolute;\n display: block;\n inline-size: 100%;\n overflow: hidden;\n inset-inline: 0;\n inset-block-start: -2px;\n block-size: 2px;\n border-radius: var(--calcite-border-radius) var(--calcite-border-radius) 0 0;\n}\n.dismiss-progress:after {\n position: absolute;\n inset-block-start: 0px;\n display: block;\n block-size: 2px;\n content: "";\n background-color: var(--calcite-alert-dismiss-progress-background);\n inset-inline-end: 0;\n}\n\n.actions-end {\n display: flex;\n align-self: stretch;\n}\n\n.text-container {\n display: flex;\n min-inline-size: 0px;\n flex: 1 1 0%;\n flex-direction: column;\n overflow-wrap: break-word;\n}\n\n.content-container {\n display: flex;\n flex: 1 1 0%;\n}\n\n.footer {\n position: relative;\n order: 1;\n display: flex;\n inline-size: 100%;\n justify-content: flex-end;\n padding-block-start: 1px;\n block-size: var(--calcite-alert-footer-height);\n}\n.footer:before {\n content: "";\n position: absolute;\n inset-block-start: 0px;\n inset-inline: var(--calcite-alert-footer-divider-gap);\n border-block-start: 1px solid var(--calcite-ui-border-3);\n}\n\n:host([scale=s]) {\n --calcite-alert-width: 40em;\n --calcite-alert-spacing-token-small: 0.5rem;\n --calcite-alert-spacing-token-large: 0.75rem;\n --calcite-alert-footer-height: 2rem;\n --calcite-alert-footer-divider-gap: 0.125rem;\n}\n:host([scale=s]) slot[name=title]::slotted(*),\n:host([scale=s]) *::slotted([slot=title]) {\n font-size: var(--calcite-font-size--1);\n line-height: 1.375;\n}\n:host([scale=s]) slot[name=message]::slotted(*),\n:host([scale=s]) *::slotted([slot=message]) {\n font-size: var(--calcite-font-size--2);\n line-height: 1.375;\n}\n:host([scale=s]) slot[name=link]::slotted(*),\n:host([scale=s]) *::slotted([slot=link]) {\n font-size: var(--calcite-font-size--2);\n line-height: 1.375;\n}\n:host([scale=s]) .queue-count {\n margin-inline: 0.5rem;\n}\n:host([scale=s]) .container {\n --calcite-alert-min-height: 3.5rem;\n}\n\n:host([scale=m]) {\n --calcite-alert-width: 50em;\n --calcite-alert-spacing-token-small: 0.75rem;\n --calcite-alert-spacing-token-large: 1rem;\n --calcite-alert-footer-height: 3rem;\n --calcite-alert-footer-divider-gap: 0.25rem;\n}\n:host([scale=m]) slot[name=title]::slotted(*),\n:host([scale=m]) *::slotted([slot=title]) {\n font-size: var(--calcite-font-size-0);\n line-height: 1.375;\n}\n:host([scale=m]) slot[name=message]::slotted(*),\n:host([scale=m]) *::slotted([slot=message]) {\n font-size: var(--calcite-font-size--1);\n line-height: 1.375;\n}\n:host([scale=m]) slot[name=link]::slotted(*),\n:host([scale=m]) *::slotted([slot=link]) {\n font-size: var(--calcite-font-size--1);\n line-height: 1.375;\n}\n:host([scale=m]) .queue-count {\n margin-inline: 0.75rem;\n}\n:host([scale=m]) .container {\n --calcite-alert-min-height: 4.1875rem;\n}\n\n:host([scale=l]) {\n --calcite-alert-width: 60em;\n --calcite-alert-spacing-token-small: 1rem;\n --calcite-alert-spacing-token-large: 1.25rem;\n --calcite-alert-footer-height: 4rem;\n --calcite-alert-footer-divider-gap: 0.5rem;\n}\n:host([scale=l]) slot[name=title]::slotted(*),\n:host([scale=l]) *::slotted([slot=title]) {\n margin-block-end: 0.25rem;\n font-size: var(--calcite-font-size-1);\n line-height: 1.375;\n}\n:host([scale=l]) slot[name=message]::slotted(*),\n:host([scale=l]) *::slotted([slot=message]) {\n font-size: var(--calcite-font-size-0);\n line-height: 1.375;\n}\n:host([scale=l]) slot[name=link]::slotted(*),\n:host([scale=l]) *::slotted([slot=link]) {\n font-size: var(--calcite-font-size-0);\n line-height: 1.375;\n}\n:host([scale=l]) .queue-count {\n margin-inline: 1rem;\n}\n:host([scale=l]) .container {\n --calcite-alert-min-height: 5.625rem;\n}\n\n:host([open]) .container:not(.container--queued) {\n border-block-start-width: 2px;\n opacity: 1;\n pointer-events: initial;\n}\n:host([open]) .container:not(.container--queued)[class*=bottom] {\n transform: translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), inherit);\n}\n:host([open]) .container:not(.container--queued)[class*=top] {\n transform: translate3d(0, var(--calcite-alert-edge-distance), inherit);\n}\n\n:host([auto-close]) > .queue-count {\n border-inline-end: 0 solid transparent;\n}\n\nslot[name=title]::slotted(*),\n*::slotted([slot=title]) {\n font-size: var(--calcite-font-size-0);\n line-height: 1.375;\n font-weight: var(--calcite-font-weight-medium);\n color: var(--calcite-ui-text-1);\n}\n\nslot[name=message]::slotted(*),\n*::slotted([slot=message]) {\n margin: 0px;\n display: inline;\n font-size: var(--calcite-font-size--1);\n line-height: 1.375;\n font-weight: var(--calcite-font-weight-normal);\n color: var(--calcite-ui-text-2);\n margin-inline-end: 0.5rem;\n}\n\nslot[name=link]::slotted(*),\n*::slotted([slot=link]) {\n display: inline-flex;\n color: var(--calcite-ui-text-link);\n}\n\n:host([kind=brand]) .container {\n border-block-start-color: var(--calcite-ui-brand);\n}\n:host([kind=brand]) .container .icon {\n color: var(--calcite-ui-brand);\n}\n\n:host([kind=info]) .container {\n border-block-start-color: var(--calcite-ui-info);\n}\n:host([kind=info]) .container .icon {\n color: var(--calcite-ui-info);\n}\n\n:host([kind=danger]) .container {\n border-block-start-color: var(--calcite-ui-danger);\n}\n:host([kind=danger]) .container .icon {\n color: var(--calcite-ui-danger);\n}\n\n:host([kind=success]) .container {\n border-block-start-color: var(--calcite-ui-success);\n}\n:host([kind=success]) .container .icon {\n color: var(--calcite-ui-success);\n}\n\n:host([kind=warning]) .container {\n border-block-start-color: var(--calcite-ui-warning);\n}\n:host([kind=warning]) .container .icon {\n color: var(--calcite-ui-warning);\n}\n\n:host([auto-close-duration=fast]) .dismiss-progress:after {\n animation: dismissProgress 6000ms ease-out;\n}\n\n:host(:hover[auto-close-duration=fast]) .dismiss-progress:after {\n animation-play-state: paused;\n}\n\n:host([auto-close-duration=medium]) .dismiss-progress:after {\n animation: dismissProgress 10000ms ease-out;\n}\n\n:host(:hover[auto-close-duration=medium]) .dismiss-progress:after {\n animation-play-state: paused;\n}\n\n:host([auto-close-duration=slow]) .dismiss-progress:after {\n animation: dismissProgress 14000ms ease-out;\n}\n\n:host(:hover[auto-close-duration=slow]) .dismiss-progress:after {\n animation-play-state: paused;\n}\n\n@keyframes dismissProgress {\n 0% {\n inline-size: 0px;\n opacity: 0.75;\n }\n 100% {\n inline-size: 100%;\n opacity: 1;\n }\n}\n/**\n * Conditional styles for when Alert is slotted in Shell\n */\n.container--slotted-in-shell {\n position: absolute;\n}\n\n@container responsive-container (min-width: 476px) {\n .content {\n flex-direction: row;\n }\n .close {\n align-items: center;\n align-self: stretch;\n }\n .icon {\n justify-content: center;\n margin-inline-end: 0;\n margin-block: 0;\n padding-inline-end: var(--calcite-alert-spacing-token-large);\n }\n}\n@container responsive-container (min-width: 768px) {\n .close {\n align-self: stretch;\n }\n .footer {\n inline-size: auto;\n align-self: stretch;\n order: initial;\n block-size: inherit;\n }\n .footer:before {\n content: none;\n }\n .icon {\n padding-inline: var(--calcite-alert-spacing-token-large) 0;\n }\n}\n:host([hidden]) {\n display: none;\n}\n\n[hidden] {\n display: none;\n}\n\n:host([calcite-hydrated-hidden]) {\n visibility: hidden !important;\n pointer-events: none;\n}';const A=class{constructor(n){t(this,n),this.closeEdit=i(this,"closeEdit",7),this.editsComplete=i(this,"editsComplete",7),this._shouldClose=!1,this.graphics=void 0,this.mapView=void 0,this.open=!1,this.graphicIndex=0,this._editorLoading=!1,this._translations=void 0}async graphicsWatchHandler(){0===this.graphics.length&&await this._closeEdit()}async openWatchHandler(t){var i;t&&(null===(i=this.graphics)||void 0===i?void 0:i.length)>0&&this.graphicIndex>-1&&(this._editorLoading=!0,await this._initEditorWidget(),this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&await this._startUpdate(),this._editorLoading=!1),t||await this._closeEdit()}async featureSelectionChange(){await this._closeEdit()}async componentWillLoad(){await this._initModules(),await this._getTranslations()}async componentWillRender(){var t,i;(null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&(null===(i=this.graphics[0])||void 0===i?void 0:i.layer)&&(this._layer=this.graphics[0].layer,this._layerEditHandle&&this._layerEditHandle.remove(),this._layerEditHandle=this._layer.on("edits",(()=>{this.editsComplete.emit(),this._closeEdit()})))}render(){var t;const i=!((null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&this.graphics[0]&&this.graphics[0].layer.editingEnabled),s=this._editorLoading?"display-none":"position-absolute",a=this._editorLoading?"":"display-none";return n(e,null,n("div",{class:"position-absolute"},i?n("calcite-notice",{kind:"warning",open:!0,slot:"content-top",width:"full"},n("div",{slot:"message"},this._translations.enableEditing)):void 0,n("div",{class:"position-absolute",slot:"content"},n("div",{class:s,id:"feature-form",ref:t=>this._editContainer=t}),n("calcite-loader",{class:a,scale:"s"}))))}async _initModules(){const[t,i]=await z(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}async _initEditorWidget(){if(this.mapView&&this.graphics&&this.graphics.length>0&&this.graphics[0]){this._editor&&this._editor.destroy();const t=document.createElement("div"),i=(await _(this.mapView)).map((t=>({layer:t})));this._editor=new this.Editor({allowedWorkflows:"update",view:this.mapView,layerInfos:i,visibleElements:{snappingControls:!1,sketchTooltipControls:!1},container:t}),this._editHandle&&this._attachmentHandle&&this._activeWorkflowHandle&&(this._editHandle.remove(),this._attachmentHandle.remove(),this._activeWorkflowHandle.remove()),this._attachmentHandle=this.reactiveUtils.when((()=>"adding-attachment"===this._editor.viewModel.state||"editing-attachment"===this._editor.viewModel.state||"creating-features"===this._editor.viewModel.state),(()=>{this._shouldClose=!1})),this._editHandle=this.reactiveUtils.when((()=>"ready"===this._editor.viewModel.state),(()=>{this._shouldClose?this._closeEdit():this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&this._startUpdate()})),this._activeWorkflowHandle=this.reactiveUtils.watch((()=>{var t;return null===(t=this._editor.viewModel.activeWorkflow)||void 0===t?void 0:t.activeWorkflow}),(t=>{"update-table-record"!==(null==t?void 0:t.type)&&"create-features"!==(null==t?void 0:t.type)||(this._shouldClose=!1)})),this._editContainer.appendChild(t)}}async _closeEdit(){var t,i,n;this._shouldClose=!0,(null===(t=this._editor)||void 0===t?void 0:t.activeWorkflow)&&await(null===(i=this._editor)||void 0===i?void 0:i.cancelWorkflow()),null===(n=this._editor)||void 0===n||n.destroy(),this._shouldClose=!1,this.closeEdit.emit()}async _startUpdate(){await this._editor.startUpdateWorkflowAtFeatureEdit(this.graphics[this.graphicIndex]),this._shouldClose=!0}async _getTranslations(){const t=await C(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],open:["openWatchHandler"]}}};A.style=":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{--calcite-ui-background:none;padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-ui-foreground-1) !important}.esri-feature__content-node{background-color:var(--calcite-ui-foreground-1) !important}.esri-editor__panel-toolbar{display:none !important}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}";const E=class{constructor(n){t(this,n),this.selectionChanged=i(this,"selectionChanged",7),this.graphics=void 0,this.isLoading=!1,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._alertOpen=!1,this._count="",this._editRecordOpen=!1,this._translations=void 0}async graphicsWatchHandler(){var t;if(this._features||await this._initFeaturesWidget(),this.graphics.length>0){const i=null===(t=this.graphics[0])||void 0===t?void 0:t.layer;this._editEnabled=i.editingEnabled&&i.capabilities.operations.supportsUpdate,this._features.open({features:this.graphics})}else this._features.clear(),this._features.close()}async mapViewWatchHandler(){return await this._initFeaturesWidget()}async getSelectedFeature(){return this._features.selectedFeature}async closeEdit(){this._editRecordOpen=!1}async componentWillLoad(){await this._initModules(),await this._getTranslations()}render(){var t,i,s;const a=this.isLoading||this._editRecordOpen?"display-none":"position-absolute",o=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",l=!this.isLoading&&this._editRecordOpen?"display-none":"",r=(null===(i=null===(t=this._features)||void 0===t?void 0:t.features)||void 0===i?void 0:i.length)<2;return n(e,null,n("calcite-shell",null,n("calcite-loader",{class:this.isLoading?"":"display-none",label:this._translations.fetchingData}),n("div",{class:"esri-widget "+a,id:"features-node"}),n("div",{class:`${l} width-100`,slot:"footer"},n("div",{class:"display-flex top-border padding-1-2"},n("calcite-button",{appearance:"solid","icon-start":"pencil",id:"solutions-edit",onClick:()=>this._openEditRecord(),width:"full"},this._translations.edit),n("calcite-tooltip",{label:"",placement:"bottom","reference-element":"solutions-edit"},n("span",null,this._translations.edit))),n("div",{class:"display-flex padding-1-2 button-container top-border"},n("div",{class:"min-width-100"},n("calcite-button",{appearance:"outline",disabled:r,id:"solutions-back",onClick:()=>this._back(),width:"full"},this._translations.back),n("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-back"},n("span",null,this._translations.back))),n("div",null,this._getCount()),n("div",{class:"min-width-100"},n("calcite-button",{appearance:"outline",disabled:r,id:"solutions-next",onClick:()=>this._next(),width:"full"},this._translations.next),n("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-next"},n("span",null,this._translations.next))))),n("edit-card",{class:o,graphicIndex:null===(s=this._features)||void 0===s?void 0:s.selectedFeatureIndex,graphics:this.graphics,mapView:this.mapView,open:this._editRecordOpen}),n("calcite-alert",{icon:"layer-broken",kind:"warning",label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},n("div",{slot:"title"},this._translations.editDisabled),n("div",{slot:"message"},this._translations.enableEditing))))}async _initModules(){const[t,i]=await z(["esri/widgets/Features","esri/core/reactiveUtils"]);this.Features=t,this.reactiveUtils=i}async _initFeaturesWidget(){return await this.mapView.when((()=>{this._features?this._features.view=this.mapView:(this._features=new this.Features({view:this.mapView,container:"features-node",visibleElements:{actionBar:!1,closeButton:!1,heading:!0}}),this.zoomAndScrollToSelected&&this.reactiveUtils.watch((()=>this._features.selectedFeatureIndex),(t=>{t>-1&&this.selectionChanged.emit(this._features.selectedFeature)})))}))}_alertClosed(){this._alertOpen=!1}_editRecordClosed(){this._editRecordOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}_back(){this._features.previous(),this._count=this._getCount()}_next(){this._features.next(),this._count=this._getCount()}_getCount(){var t,i,n;const e=((null===(t=this._features)||void 0===t?void 0:t.viewModel.selectedFeatureIndex)+1).toString(),s=null===(n=null===(i=this._features)||void 0===i?void 0:i.features)||void 0===n?void 0:n.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",s)}async _getTranslations(){const t=await C(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};E.style=":host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-ui-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-ui-foreground-1) !important;height:100% !important}";export{W as calcite_alert,A as edit_card,E as info_card}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as i,c as t,a as s,h as e,H as a,g as l}from"./p-91c78d98.js";import{a as o,b as n,c as h}from"./p-2a58e378.js";import{l as c}from"./p-05948b48.js";import{g as d,h as r}from"./p-15070568.js";import{s as p}from"./p-375fd36b.js";import{g}from"./p-99d8a839.js";import{c as b,r as u}from"./p-b02eb8f4.js";import"./p-482534a7.js";import"./p-e1a4994d.js";import"./p-ecc95259.js";const m=class{constructor(s){i(this,s),this.searchConfigurationChange=t(this,"searchConfigurationChange",7),this._onboardingImageUrl="",this._titleValue=void 0,this._numSelected=0,this.addresseeLayerIds=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.defaultExportTitle="",this.defaultNumLabelsPerPage=void 0,this.featureEffect=void 0,this.featureHighlightEnabled=void 0,this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionLayerIds=[],this.showRefineSelection=!1,this.showSearchSettings=!0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._addMap=!1,this._addTitle=!1,this._downloadActive=!0,this._exportType=o.PDF,this._fetchingData=!1,this._isMobile=void 0,this._numDuplicates=0,this._pageType=n.LIST,this._saveEnabled=!1,this._selectionSets=[],this._translations=void 0}async mapViewWatchHandler(i){(null==i?void 0:i.popup)&&(this._popupsEnabled=null==i?void 0:i.popup.autoOpenEnabled)}async watchSearchConfigurationHandler(i,t){const s=JSON.stringify(i);s!==JSON.stringify(t)&&(this._searchConfiguration=JSON.parse(s),this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}async sketchLineSymbolWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._setLineSymbol(i)}async sketchPointSymbolWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._setPointSymbol(i)}async sketchPolygonSymbolWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._setPolygonSymbol(i)}async pageTypeWatchHandler(i,t){var s;if(this._checkPopups(),(null===(s=this.mapView)||void 0===s?void 0:s.popup)&&(this.mapView.popupEnabled=i===n.LIST&&this._popupsEnabled),i===n.EXPORT&&(this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1),this._clearHighlight(),t!==n.SELECT&&t!==n.REFINE||await this._clearSelection(),i!==n.SELECT)return this._highlightFeatures()}selectionSetsChanged(i){this._selectionSets=[...i.detail]}connectedCallback(){this._mediaQuery=window.matchMedia("(max-width: 600px)"),this._mediaQuery.addEventListener("change",(i=>this._setIsMobile(i)))}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initSymbols(),this._onboardingImageUrl=s("../assets/data/images/onboarding.png")}render(){return e(a,null,e("calcite-shell",null,e("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:this._isMobile?"footer":"header"},this._getActionGroup("list-check",n.LIST,this._translations.myLists),this.showRefineSelection?this._getActionGroup("test-data",n.REFINE,this._translations.refineSelection):null,this._getActionGroup("export",n.EXPORT,this._translations.export)),this._getPage(this._pageType)))}disconnectedCallback(){this._mediaQuery.removeEventListener("change",(i=>this._setIsMobile(i)))}async _initModules(){const[i,t]=await c(["esri/geometry/geometryEngine","esri/symbols/support/jsonUtils"]);this._geometryEngine=i,this._jsonUtils=t}_initSymbols(){this._setLineSymbol(this.sketchLineSymbol),this._setPointSymbol(this.sketchPointSymbol),this._setPolygonSymbol(this.sketchPolygonSymbol)}_setLineSymbol(i){this.sketchLineSymbol="simple-line"===(null==i?void 0:i.type)?i:this._jsonUtils.fromJSON(i||{type:"esriSLS",color:[130,130,130,255],width:2,style:"esriSLSSolid"})}_setPointSymbol(i){this.sketchPointSymbol="simple-marker"===(null==i?void 0:i.type)?i:this._jsonUtils.fromJSON(i||{type:"esriSMS",color:[255,255,255,255],angle:0,xoffset:0,yoffset:0,size:6,style:"esriSMSCircle",outline:{type:"esriSLS",color:[50,50,50,255],width:1,style:"esriSLSSolid"}})}_setPolygonSymbol(i){this.sketchPolygonSymbol="simple-fill"===(null==i?void 0:i.type)?i:this._jsonUtils.fromJSON(i||{type:"esriSFS",color:[150,150,150,51],outline:{type:"esriSLS",color:[50,50,50,255],width:2,style:"esriSLSSolid"},style:"esriSFSSolid"})}_setIsMobile(i){this._isMobile=i.matches}_getActionGroup(i,t,s){return e("calcite-action-group",{class:this.showRefineSelection?"w-1-3":"w-1-2",layout:"horizontal"},e("div",{class:"background-override"},e("calcite-action",{active:this._pageType===t,alignment:"center",class:"width-full height-full",compact:!1,icon:i,id:i,onClick:()=>{this._setPageType(t)},text:""})),e("calcite-tooltip",{label:"",placement:"bottom","reference-element":i},e("span",null,s)))}_setPageType(i){this._pageType=i}_getPage(i){let t;switch(i){case n.LIST:t=this._getListPage();break;case n.SELECT:t=this._getSelectPage();break;case n.EXPORT:t=this._getExportPage();break;case n.REFINE:t=this._getRefinePage()}return t}_getListPage(){const i=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.myLists),this._getNotice(i?this._translations.listHasSetsTip:this._translations.selectLayerAndAdd,"padding-sides-1 padding-bottom-1","word-wrap-anywhere"),i?this._getSelectionSetList():this._getOnboardingImage(),e("div",{class:"display-flex padding-1"},e("calcite-button",{onClick:()=>{this._setPageType(n.SELECT)},width:"full"},e("span",{class:"font-weight-500"},this._translations.add))))}_getOnboardingImage(){return e("div",{class:"display-flex padding-sides-1"},e("img",{class:"img-container",src:this._onboardingImageUrl}))}_getSelectionSetList(){return e("div",{class:"padding-top-1-2 padding-bottom-1-2"},e("calcite-list",{class:"list-border margin-sides-1"},this._selectionSets.reduce(((i,t,s)=>{var a;const l=this._getSelectionSetIds(t);let o=!0;return t.workflowType===h.REFINE&&(o=Object.keys(t.refineInfos).reduce(((i,s)=>{const e=t.refineInfos[s];return i+(e.addIds.length+e.removeIds.length)}),0)>0),o&&i.push(e("calcite-list-item",{label:t.label,onClick:()=>this._gotoSelection(t,this.mapView)},e("div",{slot:"content"},e("div",{class:"list-label"},t.label),e("div",{class:"list-description"},null===(a=null==t?void 0:t.layerView)||void 0===a?void 0:a.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",l.length.toString()))),this._getAction(!0,"pencil","",(i=>this._openSelection(t,i)),!1,"actions-end"),this._getAction(!0,"x","",(i=>this._deleteSelection(s,i)),!1,"actions-end"))),i}),[])))}_getSelectionSetIds(i){return i.workflowType!==h.REFINE?i.selectedIds:Object.keys(i.refineInfos).reduce(((t,s)=>[...t,...i.refineInfos[s].addIds]),[])}_hasSelections(i=!1){let t=[];const s=this._selectionSets.some((i=>{if(i.workflowType===h.REFINE)return t=this._getSelectionSetIds(i),!0}));return i&&s?t.length>0||this._selectionSets.length>1:this._selectionSets.length>0}async _getNumDuplicates(){const i=this._getExportInfos(),t=await b(this.mapView.map,i),s=u(t);return t.length-s.length}_getExportInfos(){return this._selectionSets.reduce(((i,t)=>(t.download&&(t.workflowType!==h.REFINE?this._updateIds(t.layerView.layer.id,t.layerView,t.selectedIds,i):Object.keys(t.refineInfos).forEach((s=>{const e=t.refineInfos[s];e.addIds.length>0&&this._updateIds(s,e.layerView,e.addIds,i)}))),i)),{})}_updateIds(i,t,s,e){return e[i]?e[i].ids=e[i].ids.concat(s):e[i]={layerView:t,ids:s},e}_getSelectPage(){const i=this._translations.selectSearchTip;return e("calcite-panel",null,this._getLabel(this._translations.stepTwoFull,!0),this._getNotice(i,"padding-1","word-wrap-anywhere"),e("div",null,e("map-select-tools",{bufferColor:this.bufferColor,bufferOutlineColor:this.bufferOutlineColor,class:"font-bold",customLabelEnabled:this.customLabelEnabled,defaultBufferDistance:this.defaultBufferDistance,defaultBufferUnit:this.defaultBufferUnit,enabledLayerIds:this.addresseeLayerIds,isUpdate:!!this._activeSelection,mapView:this.mapView,noResultText:this.noResultText,onSelectionSetChange:i=>this._updateForSelection(i),ref:i=>{this._selectTools=i},searchConfiguration:this._searchConfiguration,selectionLayerIds:this.selectionLayerIds,selectionSet:this._activeSelection,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})),this._getPageNavButtons(this._translations.done,0===this._numSelected,(()=>{this._saveSelection()}),this._translations.cancel,!1,(()=>{this._home()})))}_getExportPage(){const i=this._hasSelections(this.showRefineSelection),t=this._numDuplicates>0?"display-block":"display-none";return e("calcite-panel",null,e("div",null,this._getLabel(this._translations.export,!1),i?e("div",null,this._getNotice(this._translations.exportTip,"padding-sides-1"),this._getLabel(this._translations.exportListsLabel),this._getExportSelectionLists(),e("div",{class:"padding-sides-1 "+t},e("div",{class:"display-flex"},e("calcite-label",{layout:"inline"},e("calcite-checkbox",{ref:i=>{this._removeDuplicates=i}}),e("div",{class:"display-flex"},this._translations.removeDuplicate,e("div",{class:"info-message padding-start-1-2"},e("calcite-input-message",{class:"info-blue margin-top-0",scale:"m"},` ${this._translations.numDuplicates.replace("{{n}}",this._numDuplicates.toString())}`)))),e("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"remove-duplicates-icon",scale:"s"})),e("calcite-popover",{closable:!0,label:"",referenceElement:"remove-duplicates-icon"},e("span",{class:"tooltip-message"},this._translations.duplicatesTip))),e("div",{class:"border-bottom"}),e("div",{class:"padding-top-sides-1"},e("calcite-segmented-control",{class:"w-100",onCalciteSegmentedControlChange:i=>this._exportTypeChange(i)},e("calcite-segmented-control-item",{checked:this._exportType===o.PDF,class:"w-50 end-border",value:o.PDF},e("span",{class:"font-weight-500"},this._translations.pdf)),e("calcite-segmented-control-item",{checked:this._exportType===o.CSV,class:"w-50",value:o.CSV},e("span",{class:"font-weight-500"},this._translations.csv)))),e("div",{class:"padding-bottom-1"},this._getExportOptions()),e("div",{class:"padding-1 display-flex"},e("calcite-button",{disabled:!this._downloadActive,loading:this._fetchingData,onClick:()=>{this._export()},width:"full"},e("span",{class:"font-weight-500"},this._translations.export)))):this._getNotice(this._translations.downloadNoLists,"padding-sides-1 padding-bottom-1")))}_exportTypeChange(i){this._exportType=i.target.value}_getExportOptions(){const i=this._addTitle?"display-block":"display-none",t=this._titleValue?this._titleValue:this.defaultExportTitle?this.defaultExportTitle:"";return e("div",{class:this._exportType===o.PDF?"display-block":"display-none"},this._getLabel(this._translations.pdfOptions,!0),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0"},this._translations.selectPDFLabelOption)),e("div",{class:"padding-sides-1"},e("pdf-download",{defaultNumLabelsPerPage:this.defaultNumLabelsPerPage,disabled:!this._downloadActive,ref:i=>{this._downloadTools=i}})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addTitle,onCalciteCheckboxChange:()=>this._addTitle=!this._addTitle}),this._translations.addTitle)),e("div",{class:i},this._getLabel(this._translations.title,!0,""),e("calcite-input-text",{class:"padding-sides-1",onCalciteInputTextInput:()=>this._changeTitle(),placeholder:this._translations.titlePlaceholder,ref:i=>{this._titleElement=i},value:t})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addMap,onCalciteCheckboxChange:()=>this._addMap=!this._addMap}),this._translations.includeMap)))}_getRefinePage(){const i=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.refineSelection),i?e("div",null,this._getNotice(this._translations.refineTip,"padding-sides-1"),e("refine-selection",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,selectionSets:this._selectionSets,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})):this._getNotice(this._translations.refineTipNoSelections,"padding-sides-1"))}_getPageNavButtons(i,t,s,a,l,o){return e("div",{class:"padding-bottom-1"},e("div",{class:"display-flex padding-top-sides-1"},e("calcite-button",{disabled:t,onClick:s,width:"full"},e("span",{class:"font-weight-500"},i))),e("div",{class:"display-flex padding-top-1-2 padding-sides-1"},e("calcite-button",{appearance:"outline",disabled:l,onClick:o,width:"full"},e("span",{class:"font-weight-500"},a))))}_changeTitle(){this._titleValue=this._titleElement.value}_getNotice(i,t="padding-1",s=""){return e("calcite-notice",{class:t,icon:"lightbulb",kind:"success",open:!0},e("div",{class:s,slot:"message"},i))}_getLabel(i,t=!1,s="font-bold"){return e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:s+=t?" label-margin-0":""},i))}_getExportSelectionLists(){return this._selectionSets.reduce(((i,t)=>{var s;const a=this._getSelectionSetIds(t),l=t.workflowType!==h.REFINE||a.length>0;return!this._downloadActive&&t.download&&l&&(this._downloadActive=!0),l&&i.push(e("div",{class:"display-flex padding-sides-1 padding-bottom-1"},e("calcite-checkbox",{checked:t.download,class:"align-center",onClick:()=>{this._toggleDownload(t.id)}}),e("calcite-list",{class:"list-border margin-start-1-2 width-full",id:"download-list"},e("calcite-list-item",{disabled:!t.download,label:t.label,onClick:()=>{this._toggleDownload(t.id)}},e("div",{slot:"content"},e("div",{class:"list-label"},t.label),e("div",{class:"list-description"},null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",a.length.toString()))))))),i}),[])||e("div",null)}async _toggleDownload(i){let t=!1;this._selectionSets=this._selectionSets.map((s=>(s.download=s.id===i?!s.download:s.download,t=!!s.download||t,s))),this._downloadActive=t,this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1,await this._highlightFeatures()}async _export(){const i=this._getSelectionIdsAndViews(this._selectionSets,!0);if(this._exportType===o.PDF){let t="";if(this._addMap&&this.mapView){const i=await this.mapView.takeScreenshot({width:1500,height:2e3});t=null==i?void 0:i.dataUrl}this._fetchingData=!0,await this._downloadTools.downloadPDF(this.mapView.map,i,this._removeDuplicates.checked,this._addTitle?this._titleElement.value:"",t),this._fetchingData=!1}this._exportType===o.CSV&&(this._fetchingData=!0,await this._downloadTools.downloadCSV(this.mapView.map,i,this._removeDuplicates.checked),this._fetchingData=!1)}_getSelectionIdsAndViews(i,t=!1){return(t?i.filter((i=>i.download)):i).reduce(((i,t)=>{var s;if(t.workflowType===h.REFINE)Object.keys(t.refineInfos).forEach((s=>{const e=t.refineInfos[s];e.addIds&&(i=this._updateExportInfos(i,e.layerView.layer.id,t.label,e.addIds,e.layerView))}));else{const e=null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.id;i=this._updateExportInfos(i,e,t.label,t.selectedIds,t.layerView)}return i}),{})}_updateExportInfos(i,t,s,e,a){return t&&Object.keys(i).indexOf(t)>-1?(i[t].ids=[...new Set([...i[t].ids,...e])],i[t].selectionSetNames.push(s)):t&&(i[t]={ids:e,layerView:a,selectionSetNames:[s]}),i}_getAction(i,t,s,a,l=!1,o=""){return e("calcite-action",{disabled:!i,icon:t,indicator:l,onClick:a,slot:o,text:s})}_updateForSelection(i){this._numSelected=i.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),this._setPageType(n.LIST)}async _saveSelection(){var i,t;const s=await(null===(i=this._selectTools)||void 0===i?void 0:i.getSelection()),e=null===(t=this._selectTools)||void 0===t?void 0:t.isUpdate;return this._selectionSets=e?this._selectionSets.map((i=>i.id===s.id?s:i)):[...this._selectionSets,s],this._home()}async _clearSelection(){var i;await(null===(i=this._selectTools)||void 0===i?void 0:i.clearSelection()),this._numSelected=0,this._activeSelection=void 0}_deleteSelection(i,t){return t.stopPropagation(),this._selectionSets=this._selectionSets.filter(((t,s)=>{if(s!==i)return t})),this._highlightFeatures()}_gotoSelection(i,t){d(i.selectedIds,i.layerView,t,this.featureHighlightEnabled,this.featureEffect)}_openSelection(i,t){t.stopPropagation(),this._activeSelection=i,this._pageType=i.workflowType===h.REFINE?n.REFINE:n.SELECT}async _highlightFeatures(){this._clearHighlight();const i=this._getSelectionIdsAndViews(this._selectionSets,this._pageType===n.EXPORT),t=Object.keys(i);if(t.length>0)for(let s=0;s<t.length;s++){const e=i[t[s]];p.highlightHandles.push(await r(e.ids,e.layerView,this.mapView))}}_checkPopups(){var i;"boolean"!=typeof this._popupsEnabled&&(this._popupsEnabled=null===(i=this.mapView)||void 0===i?void 0:i.popupEnabled)}_clearHighlight(){p&&p.highlightHandles&&p.removeHandles()}async _getTranslations(){const i=await g(this.el);this._translations=i[0]}get el(){return l(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"],sketchLineSymbol:["sketchLineSymbolWatchHandler"],sketchPointSymbol:["sketchPointSymbolWatchHandler"],sketchPolygonSymbol:["sketchPolygonSymbolWatchHandler"],_pageType:["pageTypeWatchHandler"]}}};m.style=':host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-2{width:50%}.w-1-3{width:33.33%}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{padding-block-start:1rem;padding-inline-start:1rem;padding-inline-end:1rem}.padding-sides-1{padding-inline-start:1rem;padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.padding-top-1-2{padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.padding-bottom-1-2{padding-bottom:.5rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-start-1-2{padding-inline-start:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{margin-inline-start:1rem;margin-inline-end:1rem}.margin-start-1-2{margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir="rtl"]{float:left}.float-left{float:left}.float-left[dir="rtl"]{float:right}.margin-top-0{margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.position-right{position:absolute;right:1rem}.position-right[dir="rtl"]{position:absolute;left:1rem}.label-margin-0{--calcite-label-margin-bottom:0}.list-label{color:var(--calcite-ui-text-1)}.list-label,.list-description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.list-description{margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.img-container{width:100%;height:100%}.font-weight-500{font-weight:500}.background-override{height:100%;width:100%;--calcite-ui-foreground-3:var(--calcite-ui-brand);--calcite-ui-foreground-2:var(--calcite-ui-brand-hover);--calcite-ui-text-1:var(--calcite-ui-text-inverse)}.word-wrap-anywhere{word-wrap:anywhere}';export{m as public_notification}
|
6
|
+
import{r as i,c as t,a as s,h as e,H as a,g as l}from"./p-91c78d98.js";import{a as o,b as n,c as h}from"./p-2a58e378.js";import{l as c}from"./p-05948b48.js";import{g as d,h as r}from"./p-15070568.js";import{s as p}from"./p-375fd36b.js";import{g}from"./p-99d8a839.js";import{c as b,r as u}from"./p-b02eb8f4.js";import"./p-482534a7.js";import"./p-e1a4994d.js";import"./p-ecc95259.js";const m=class{constructor(s){i(this,s),this.searchConfigurationChange=t(this,"searchConfigurationChange",7),this._onboardingImageUrl="",this._titleValue=void 0,this._numSelected=0,this.addresseeLayerIds=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.defaultExportTitle="",this.defaultNumLabelsPerPage=void 0,this.featureEffect=void 0,this.featureHighlightEnabled=void 0,this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionLayerIds=[],this.showRefineSelection=!1,this.showSearchSettings=!0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._addMap=!1,this._addTitle=!1,this._downloadActive=!0,this._exportType=o.PDF,this._fetchingData=!1,this._isMobile=void 0,this._numDuplicates=0,this._pageType=n.LIST,this._saveEnabled=!1,this._selectionSets=[],this._translations=void 0}async mapViewWatchHandler(i){(null==i?void 0:i.popup)&&(this._popupsEnabled=null==i?void 0:i.popup.autoOpenEnabled)}async watchSearchConfigurationHandler(i,t){const s=JSON.stringify(i);s!==JSON.stringify(t)&&(this._searchConfiguration=JSON.parse(s),this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}async sketchLineSymbolWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._setLineSymbol(i)}async sketchPointSymbolWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._setPointSymbol(i)}async sketchPolygonSymbolWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._setPolygonSymbol(i)}async pageTypeWatchHandler(i,t){var s;if(this._checkPopups(),(null===(s=this.mapView)||void 0===s?void 0:s.popup)&&(this.mapView.popupEnabled=i===n.LIST&&this._popupsEnabled),i===n.EXPORT&&(this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1),this._clearHighlight(),t!==n.SELECT&&t!==n.REFINE||await this._clearSelection(),i!==n.SELECT)return this._highlightFeatures()}selectionSetsChanged(i){this._selectionSets=[...i.detail]}connectedCallback(){this._mediaQuery=window.matchMedia("(max-width: 600px)"),this._mediaQuery.addEventListener("change",(i=>this._setIsMobile(i)))}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initSymbols(),this._onboardingImageUrl=s("../assets/data/images/onboarding.png")}render(){return e(a,null,e("calcite-shell",null,e("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:this._isMobile?"footer":"header"},this._getActionGroup("list-check",n.LIST,this._translations.myLists),this.showRefineSelection?this._getActionGroup("test-data",n.REFINE,this._translations.refineSelection):null,this._getActionGroup("export",n.EXPORT,this._translations.export)),this._getPage(this._pageType)))}disconnectedCallback(){this._mediaQuery.removeEventListener("change",(i=>this._setIsMobile(i)))}async _initModules(){const[i,t]=await c(["esri/geometry/geometryEngine","esri/symbols/support/jsonUtils"]);this._geometryEngine=i,this._jsonUtils=t}_initSymbols(){this._setLineSymbol(this.sketchLineSymbol),this._setPointSymbol(this.sketchPointSymbol),this._setPolygonSymbol(this.sketchPolygonSymbol)}_setLineSymbol(i){this.sketchLineSymbol="simple-line"===(null==i?void 0:i.type)?i:this._jsonUtils.fromJSON(i||{type:"esriSLS",color:[130,130,130,255],width:2,style:"esriSLSSolid"})}_setPointSymbol(i){this.sketchPointSymbol="simple-marker"===(null==i?void 0:i.type)?i:this._jsonUtils.fromJSON(i||{type:"esriSMS",color:[255,255,255,255],angle:0,xoffset:0,yoffset:0,size:6,style:"esriSMSCircle",outline:{type:"esriSLS",color:[50,50,50,255],width:1,style:"esriSLSSolid"}})}_setPolygonSymbol(i){this.sketchPolygonSymbol="simple-fill"===(null==i?void 0:i.type)?i:this._jsonUtils.fromJSON(i||{type:"esriSFS",color:[150,150,150,51],outline:{type:"esriSLS",color:[50,50,50,255],width:2,style:"esriSLSSolid"},style:"esriSFSSolid"})}_setIsMobile(i){this._isMobile=i.matches}_getActionGroup(i,t,s){return e("calcite-action-group",{class:this.showRefineSelection?"w-1-3":"w-1-2",layout:"horizontal"},e("div",{class:"background-override"},e("calcite-action",{active:this._pageType===t,alignment:"center",class:"width-full height-full",compact:!1,icon:i,id:i,onClick:()=>{this._setPageType(t)},text:""})),e("calcite-tooltip",{label:"",placement:"bottom","reference-element":i},e("span",null,s)))}_setPageType(i){this._pageType=i}_getPage(i){let t;switch(i){case n.LIST:t=this._getListPage();break;case n.SELECT:t=this._getSelectPage();break;case n.EXPORT:t=this._getExportPage();break;case n.REFINE:t=this._getRefinePage()}return t}_getListPage(){const i=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.myLists),this._getNotice(i?this._translations.listHasSetsTip:this._translations.selectLayerAndAdd,"padding-sides-1 padding-bottom-1","word-wrap-anywhere"),i?this._getSelectionSetList():this._getOnboardingImage(),e("div",{class:"display-flex padding-1"},e("calcite-button",{onClick:()=>{this._setPageType(n.SELECT)},width:"full"},e("span",{class:"font-weight-500"},this._translations.add))))}_getOnboardingImage(){return e("div",{class:"display-flex padding-sides-1"},e("img",{class:"img-container",src:this._onboardingImageUrl}))}_getSelectionSetList(){return e("div",{class:"padding-top-1-2 padding-bottom-1-2"},e("calcite-list",{class:"list-border margin-sides-1"},this._selectionSets.reduce(((i,t,s)=>{var a;const l=this._getSelectionSetIds(t);let o=!0;return t.workflowType===h.REFINE&&(o=Object.keys(t.refineInfos).reduce(((i,s)=>{const e=t.refineInfos[s];return i+(e.addIds.length+e.removeIds.length)}),0)>0),o&&i.push(e("calcite-list-item",{label:t.label,onClick:()=>this._gotoSelection(t,this.mapView)},e("div",{slot:"content"},e("div",{class:"list-label"},t.label),e("div",{class:"list-description"},null===(a=null==t?void 0:t.layerView)||void 0===a?void 0:a.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",l.length.toString()))),this._getAction(!0,"pencil","",(i=>this._openSelection(t,i)),!1,"actions-end"),this._getAction(!0,"x","",(i=>this._deleteSelection(s,i)),!1,"actions-end"))),i}),[])))}_getSelectionSetIds(i){return i.workflowType!==h.REFINE?i.selectedIds:Object.keys(i.refineInfos).reduce(((t,s)=>[...t,...i.refineInfos[s].addIds]),[])}_hasSelections(i=!1){let t=[];const s=this._selectionSets.some((i=>{if(i.workflowType===h.REFINE)return t=this._getSelectionSetIds(i),!0}));return i&&s?t.length>0||this._selectionSets.length>1:this._selectionSets.length>0}async _getNumDuplicates(){const i=this._getExportInfos(),t=await b(this.mapView.map,i),s=u(t);return t.length-s.length}_getExportInfos(){return this._selectionSets.reduce(((i,t)=>(t.download&&(t.workflowType!==h.REFINE?this._updateIds(t.layerView.layer.id,t.layerView,t.selectedIds,i):Object.keys(t.refineInfos).forEach((s=>{const e=t.refineInfos[s];e.addIds.length>0&&this._updateIds(s,e.layerView,e.addIds,i)}))),i)),{})}_updateIds(i,t,s,e){return e[i]?e[i].ids=e[i].ids.concat(s):e[i]={layerView:t,ids:s},e}_getSelectPage(){const i=this._translations.selectSearchTip;return e("calcite-panel",null,this._getLabel(this._translations.stepTwoFull,!0),this._getNotice(i,"padding-1","word-wrap-anywhere"),e("div",null,e("map-select-tools",{bufferColor:this.bufferColor,bufferOutlineColor:this.bufferOutlineColor,class:"font-bold",customLabelEnabled:this.customLabelEnabled,defaultBufferDistance:this.defaultBufferDistance,defaultBufferUnit:this.defaultBufferUnit,enabledLayerIds:this.addresseeLayerIds,isUpdate:!!this._activeSelection,mapView:this.mapView,noResultText:this.noResultText,onSelectionSetChange:i=>this._updateForSelection(i),ref:i=>{this._selectTools=i},searchConfiguration:this._searchConfiguration,selectionLayerIds:this.selectionLayerIds,selectionSet:this._activeSelection,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})),this._getPageNavButtons(this._translations.done,0===this._numSelected,(()=>{this._saveSelection()}),this._translations.cancel,!1,(()=>{this._home()})))}_getExportPage(){const i=this._hasSelections(this.showRefineSelection),t=this._numDuplicates>0?"display-block":"display-none";return e("calcite-panel",null,e("div",null,this._getLabel(this._translations.export,!1),i?e("div",null,this._getNotice(this._translations.exportTip,"padding-sides-1"),this._getLabel(this._translations.exportListsLabel),this._getExportSelectionLists(),e("div",{class:"padding-sides-1 "+t},e("div",{class:"display-flex"},e("calcite-label",{layout:"inline"},e("calcite-checkbox",{ref:i=>{this._removeDuplicates=i}}),e("div",{class:"display-flex"},this._translations.removeDuplicate,e("div",{class:"info-message padding-start-1-2"},e("calcite-input-message",{class:"info-blue margin-top-0",scale:"m"},` ${this._translations.numDuplicates.replace("{{n}}",this._numDuplicates.toString())}`)))),e("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"remove-duplicates-icon",scale:"s"})),e("calcite-popover",{closable:!0,label:"",referenceElement:"remove-duplicates-icon"},e("span",{class:"tooltip-message"},this._translations.duplicatesTip))),e("div",{class:"border-bottom"}),e("div",{class:"padding-top-sides-1"},e("calcite-segmented-control",{class:"w-100",onCalciteSegmentedControlChange:i=>this._exportTypeChange(i)},e("calcite-segmented-control-item",{checked:this._exportType===o.PDF,class:"w-50 end-border",value:o.PDF},e("span",{class:"font-weight-500"},this._translations.pdf)),e("calcite-segmented-control-item",{checked:this._exportType===o.CSV,class:"w-50",value:o.CSV},e("span",{class:"font-weight-500"},this._translations.csv)))),e("div",{class:"padding-bottom-1"},this._getExportOptions()),e("div",{class:"padding-1 display-flex"},e("calcite-button",{disabled:!this._downloadActive,loading:this._fetchingData,onClick:()=>{this._export()},width:"full"},e("span",{class:"font-weight-500"},this._translations.export)))):this._getNotice(this._translations.downloadNoLists,"padding-sides-1 padding-bottom-1")))}_exportTypeChange(i){this._exportType=i.target.value}_getExportOptions(){const i=this._addTitle?"display-block":"display-none",t=this._titleValue?this._titleValue:this.defaultExportTitle?this.defaultExportTitle:"";return e("div",{class:this._exportType===o.PDF?"display-block":"display-none"},this._getLabel(this._translations.pdfOptions,!0),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0"},this._translations.selectPDFLabelOption)),e("div",{class:"padding-sides-1"},e("pdf-download",{defaultNumLabelsPerPage:parseInt(this.defaultNumLabelsPerPage.toString(),10),disabled:!this._downloadActive,ref:i=>{this._downloadTools=i}})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addTitle,onCalciteCheckboxChange:()=>this._addTitle=!this._addTitle}),this._translations.addTitle)),e("div",{class:i},this._getLabel(this._translations.title,!0,""),e("calcite-input-text",{class:"padding-sides-1",onCalciteInputTextInput:()=>this._changeTitle(),placeholder:this._translations.titlePlaceholder,ref:i=>{this._titleElement=i},value:t})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addMap,onCalciteCheckboxChange:()=>this._addMap=!this._addMap}),this._translations.includeMap)))}_getRefinePage(){const i=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.refineSelection),i?e("div",null,this._getNotice(this._translations.refineTip,"padding-sides-1"),e("refine-selection",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,selectionSets:this._selectionSets,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})):this._getNotice(this._translations.refineTipNoSelections,"padding-sides-1"))}_getPageNavButtons(i,t,s,a,l,o){return e("div",{class:"padding-bottom-1"},e("div",{class:"display-flex padding-top-sides-1"},e("calcite-button",{disabled:t,onClick:s,width:"full"},e("span",{class:"font-weight-500"},i))),e("div",{class:"display-flex padding-top-1-2 padding-sides-1"},e("calcite-button",{appearance:"outline",disabled:l,onClick:o,width:"full"},e("span",{class:"font-weight-500"},a))))}_changeTitle(){this._titleValue=this._titleElement.value}_getNotice(i,t="padding-1",s=""){return e("calcite-notice",{class:t,icon:"lightbulb",kind:"success",open:!0},e("div",{class:s,slot:"message"},i))}_getLabel(i,t=!1,s="font-bold"){return e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:s+=t?" label-margin-0":""},i))}_getExportSelectionLists(){return this._selectionSets.reduce(((i,t)=>{var s;const a=this._getSelectionSetIds(t),l=t.workflowType!==h.REFINE||a.length>0;return!this._downloadActive&&t.download&&l&&(this._downloadActive=!0),l&&i.push(e("div",{class:"display-flex padding-sides-1 padding-bottom-1"},e("calcite-checkbox",{checked:t.download,class:"align-center",onClick:()=>{this._toggleDownload(t.id)}}),e("calcite-list",{class:"list-border margin-start-1-2 width-full",id:"download-list"},e("calcite-list-item",{disabled:!t.download,label:t.label,onClick:()=>{this._toggleDownload(t.id)}},e("div",{slot:"content"},e("div",{class:"list-label"},t.label),e("div",{class:"list-description"},null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",a.length.toString()))))))),i}),[])||e("div",null)}async _toggleDownload(i){let t=!1;this._selectionSets=this._selectionSets.map((s=>(s.download=s.id===i?!s.download:s.download,t=!!s.download||t,s))),this._downloadActive=t,this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1,await this._highlightFeatures()}async _export(){const i=this._getSelectionIdsAndViews(this._selectionSets,!0);if(this._exportType===o.PDF){let t="";if(this._addMap&&this.mapView){const i=await this.mapView.takeScreenshot({width:1500,height:2e3});t=null==i?void 0:i.dataUrl}this._fetchingData=!0,await this._downloadTools.downloadPDF(this.mapView.map,i,this._removeDuplicates.checked,this._addTitle?this._titleElement.value:"",t),this._fetchingData=!1}this._exportType===o.CSV&&(this._fetchingData=!0,await this._downloadTools.downloadCSV(this.mapView.map,i,this._removeDuplicates.checked),this._fetchingData=!1)}_getSelectionIdsAndViews(i,t=!1){return(t?i.filter((i=>i.download)):i).reduce(((i,t)=>{var s;if(t.workflowType===h.REFINE)Object.keys(t.refineInfos).forEach((s=>{const e=t.refineInfos[s];e.addIds&&(i=this._updateExportInfos(i,e.layerView.layer.id,t.label,e.addIds,e.layerView))}));else{const e=null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.id;i=this._updateExportInfos(i,e,t.label,t.selectedIds,t.layerView)}return i}),{})}_updateExportInfos(i,t,s,e,a){return t&&Object.keys(i).indexOf(t)>-1?(i[t].ids=[...new Set([...i[t].ids,...e])],i[t].selectionSetNames.push(s)):t&&(i[t]={ids:e,layerView:a,selectionSetNames:[s]}),i}_getAction(i,t,s,a,l=!1,o=""){return e("calcite-action",{disabled:!i,icon:t,indicator:l,onClick:a,slot:o,text:s})}_updateForSelection(i){this._numSelected=i.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),this._setPageType(n.LIST)}async _saveSelection(){var i,t;const s=await(null===(i=this._selectTools)||void 0===i?void 0:i.getSelection()),e=null===(t=this._selectTools)||void 0===t?void 0:t.isUpdate;return this._selectionSets=e?this._selectionSets.map((i=>i.id===s.id?s:i)):[...this._selectionSets,s],this._home()}async _clearSelection(){var i;await(null===(i=this._selectTools)||void 0===i?void 0:i.clearSelection()),this._numSelected=0,this._activeSelection=void 0}_deleteSelection(i,t){return t.stopPropagation(),this._selectionSets=this._selectionSets.filter(((t,s)=>{if(s!==i)return t})),this._highlightFeatures()}_gotoSelection(i,t){d(i.selectedIds,i.layerView,t,this.featureHighlightEnabled,this.featureEffect)}_openSelection(i,t){t.stopPropagation(),this._activeSelection=i,this._pageType=i.workflowType===h.REFINE?n.REFINE:n.SELECT}async _highlightFeatures(){this._clearHighlight();const i=this._getSelectionIdsAndViews(this._selectionSets,this._pageType===n.EXPORT),t=Object.keys(i);if(t.length>0)for(let s=0;s<t.length;s++){const e=i[t[s]];p.highlightHandles.push(await r(e.ids,e.layerView,this.mapView))}}_checkPopups(){var i;"boolean"!=typeof this._popupsEnabled&&(this._popupsEnabled=null===(i=this.mapView)||void 0===i?void 0:i.popupEnabled)}_clearHighlight(){p&&p.highlightHandles&&p.removeHandles()}async _getTranslations(){const i=await g(this.el);this._translations=i[0]}get el(){return l(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"],sketchLineSymbol:["sketchLineSymbolWatchHandler"],sketchPointSymbol:["sketchPointSymbolWatchHandler"],sketchPolygonSymbol:["sketchPolygonSymbolWatchHandler"],_pageType:["pageTypeWatchHandler"]}}};m.style=':host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-2{width:50%}.w-1-3{width:33.33%}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{padding-block-start:1rem;padding-inline-start:1rem;padding-inline-end:1rem}.padding-sides-1{padding-inline-start:1rem;padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.padding-top-1-2{padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.padding-bottom-1-2{padding-bottom:.5rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-start-1-2{padding-inline-start:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{margin-inline-start:1rem;margin-inline-end:1rem}.margin-start-1-2{margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir="rtl"]{float:left}.float-left{float:left}.float-left[dir="rtl"]{float:right}.margin-top-0{margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.position-right{position:absolute;right:1rem}.position-right[dir="rtl"]{position:absolute;left:1rem}.label-margin-0{--calcite-label-margin-bottom:0}.list-label{color:var(--calcite-ui-text-1)}.list-label,.list-description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.list-description{margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.img-container{width:100%;height:100%}.font-weight-500{font-weight:500}.background-override{height:100%;width:100%;--calcite-ui-foreground-3:var(--calcite-ui-brand);--calcite-ui-foreground-2:var(--calcite-ui-brand-hover);--calcite-ui-text-1:var(--calcite-ui-text-inverse)}.word-wrap-anywhere{word-wrap:anywhere}';export{m as public_notification}
|