@esri/solutions-components 0.7.21 → 0.7.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/public-notification/resources.json +2 -3
- package/dist/assets/t9n/public-notification/resources_en.json +2 -3
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +11 -12
- package/dist/cjs/calcite-alert_3.cjs.entry.js +23 -13
- package/dist/cjs/card-manager_3.cjs.entry.js +124 -91
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/edit-card/edit-card.js +23 -13
- package/dist/collection/components/floor-filter/floor-filter.js +28 -12
- package/dist/collection/components/layer-table/layer-table.js +130 -91
- package/dist/collection/components/public-notification/public-notification.js +1 -1
- package/dist/collection/demos/crowdsource-manager.html +13 -0
- package/dist/components/edit-card2.js +23 -13
- package/dist/components/floor-filter2.js +12 -13
- package/dist/components/layer-table2.js +125 -92
- package/dist/components/public-notification.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +11 -12
- package/dist/esm/calcite-alert_3.entry.js +23 -13
- package/dist/esm/card-manager_3.entry.js +124 -91
- package/dist/esm/loader.js +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +13 -0
- package/dist/solutions-components/p-04f05bc5.entry.js +6 -0
- package/dist/solutions-components/{p-d3085b7a.entry.js → p-bacc9b0d.entry.js} +1 -1
- package/dist/solutions-components/{p-a40a1eab.entry.js → p-c634d047.entry.js} +1 -1
- package/dist/solutions-components/p-eff7f407.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/edit-card/edit-card.d.ts +2 -1
- package/dist/types/components/floor-filter/floor-filter.d.ts +13 -0
- package/dist/types/components/layer-table/layer-table.d.ts +19 -3
- package/dist/types/components.d.ts +19 -0
- package/dist/types/preact.d.ts +3 -1
- package/package.json +2 -2
- package/dist/solutions-components/p-5302f406.entry.js +0 -6
- package/dist/solutions-components/p-704da348.entry.js +0 -6
@@ -26,6 +26,7 @@ export class EditCard {
|
|
26
26
|
constructor() {
|
27
27
|
/**
|
28
28
|
* boolean: When true the Editor widget should be closed
|
29
|
+
* Without this logic we are taken to the Editors "Select" workflow step
|
29
30
|
*/
|
30
31
|
this._shouldClose = false;
|
31
32
|
this.graphics = undefined;
|
@@ -44,8 +45,8 @@ export class EditCard {
|
|
44
45
|
* Watch for changes to the graphics and update the feature widget
|
45
46
|
*/
|
46
47
|
async graphicsWatchHandler() {
|
47
|
-
if (this.graphics.length === 0) {
|
48
|
-
await this._closeEdit();
|
48
|
+
if (this.graphics.length === 0 && this.open) {
|
49
|
+
await this._closeEdit(true);
|
49
50
|
}
|
50
51
|
}
|
51
52
|
async openWatchHandler(v) {
|
@@ -59,11 +60,13 @@ export class EditCard {
|
|
59
60
|
this._editorLoading = false;
|
60
61
|
}
|
61
62
|
if (!v) {
|
62
|
-
await this._closeEdit();
|
63
|
+
await this._closeEdit(true);
|
63
64
|
}
|
64
65
|
}
|
65
66
|
async featureSelectionChange() {
|
66
|
-
|
67
|
+
if (this.open) {
|
68
|
+
await this._closeEdit(false);
|
69
|
+
}
|
67
70
|
}
|
68
71
|
//--------------------------------------------------------------------------
|
69
72
|
//
|
@@ -94,7 +97,6 @@ export class EditCard {
|
|
94
97
|
}
|
95
98
|
this._layerEditHandle = this._layer.on("edits", () => {
|
96
99
|
this.editsComplete.emit();
|
97
|
-
this.open = false;
|
98
100
|
});
|
99
101
|
}
|
100
102
|
}
|
@@ -109,7 +111,7 @@ export class EditCard {
|
|
109
111
|
!this.graphics[0].layer.editingEnabled : true;
|
110
112
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
111
113
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
112
|
-
return (h(Host, null, h("div", { class: "position-absolute" }, editDisabled ? (h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, h("div", { class: "position-absolute"
|
114
|
+
return (h(Host, null, h("div", { class: "position-absolute" }, editDisabled ? (h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, h("div", { class: "position-absolute" }, h("div", { class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), h("calcite-loader", { class: loadingClass, label: "", scale: "s" })))));
|
113
115
|
}
|
114
116
|
//--------------------------------------------------------------------------
|
115
117
|
//
|
@@ -164,10 +166,13 @@ export class EditCard {
|
|
164
166
|
this._shouldClose = false;
|
165
167
|
});
|
166
168
|
this._activeWorkflowHandle = this.reactiveUtils.watch(() => { var _a; return (_a = this._editor.viewModel.activeWorkflow) === null || _a === void 0 ? void 0 : _a.activeWorkflow; }, (activeWorkflow) => {
|
169
|
+
var _a, _b;
|
167
170
|
if ((activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "update-table-record" || (activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "create-features") {
|
168
171
|
this._shouldClose = false;
|
169
172
|
}
|
170
|
-
|
173
|
+
// Handle back click and when feature is de-selected from the table
|
174
|
+
// this ensures that we are not shown the Editors "Select" workflow step
|
175
|
+
if ((!(activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) && !(activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.hasPendingEdits) && !this._editor.activeWorkflow) || !((_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) === null || _b === void 0 ? void 0 : _b.started)) {
|
171
176
|
this.open = false;
|
172
177
|
}
|
173
178
|
});
|
@@ -178,16 +183,21 @@ export class EditCard {
|
|
178
183
|
/**
|
179
184
|
* Close the edit widget
|
180
185
|
*/
|
181
|
-
async _closeEdit() {
|
186
|
+
async _closeEdit(destroyOnClose) {
|
182
187
|
var _a, _b, _c, _d;
|
183
188
|
this._shouldClose = true;
|
184
|
-
if ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) {
|
185
|
-
|
189
|
+
if (destroyOnClose && ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow)) {
|
190
|
+
if ((_c = (_b = this._editor.activeWorkflow) === null || _b === void 0 ? void 0 : _b.activeWorkflow) === null || _c === void 0 ? void 0 : _c.hasPendingEdits) {
|
191
|
+
await this._editor.activeWorkflow.reset();
|
192
|
+
await this._editor.cancelWorkflow();
|
193
|
+
}
|
194
|
+
this._editor.destroy();
|
186
195
|
}
|
187
|
-
|
188
|
-
this.
|
196
|
+
else {
|
197
|
+
if (this.graphicIndex > -1 && ((_d = this.graphics) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
198
|
+
this.refreshGraphics.emit(this.graphics);
|
199
|
+
}
|
189
200
|
}
|
190
|
-
(_d = this._editor) === null || _d === void 0 ? void 0 : _d.destroy();
|
191
201
|
this._shouldClose = false;
|
192
202
|
this.closeEdit.emit();
|
193
203
|
}
|
@@ -38,16 +38,6 @@ export class FloorFilter {
|
|
38
38
|
}
|
39
39
|
//--------------------------------------------------------------------------
|
40
40
|
//
|
41
|
-
// Methods (public)
|
42
|
-
//
|
43
|
-
//--------------------------------------------------------------------------
|
44
|
-
//--------------------------------------------------------------------------
|
45
|
-
//
|
46
|
-
// Events (public)
|
47
|
-
//
|
48
|
-
//--------------------------------------------------------------------------
|
49
|
-
//--------------------------------------------------------------------------
|
50
|
-
//
|
51
41
|
// Functions (lifecycle)
|
52
42
|
//
|
53
43
|
//--------------------------------------------------------------------------
|
@@ -73,10 +63,12 @@ export class FloorFilter {
|
|
73
63
|
* @protected
|
74
64
|
*/
|
75
65
|
async _initModules() {
|
76
|
-
const [FloorFilter] = await loadModules([
|
77
|
-
"esri/widgets/FloorFilter"
|
66
|
+
const [FloorFilter, reactiveUtils] = await loadModules([
|
67
|
+
"esri/widgets/FloorFilter",
|
68
|
+
"esri/core/reactiveUtils"
|
78
69
|
]);
|
79
70
|
this.FloorFilter = FloorFilter;
|
71
|
+
this.reactiveUtils = reactiveUtils;
|
80
72
|
}
|
81
73
|
/**
|
82
74
|
* Initialize the floor filter or reset the current view if it already exists
|
@@ -89,6 +81,12 @@ export class FloorFilter {
|
|
89
81
|
container: this._floorFilterElement,
|
90
82
|
view
|
91
83
|
});
|
84
|
+
if (this._levelHandle) {
|
85
|
+
this._levelHandle.remove();
|
86
|
+
}
|
87
|
+
this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
|
88
|
+
this.levelChanged.emit(level);
|
89
|
+
});
|
92
90
|
}
|
93
91
|
else {
|
94
92
|
this.floorFilterWidget.view = view;
|
@@ -168,6 +166,24 @@ export class FloorFilter {
|
|
168
166
|
}
|
169
167
|
};
|
170
168
|
}
|
169
|
+
static get events() {
|
170
|
+
return [{
|
171
|
+
"method": "levelChanged",
|
172
|
+
"name": "levelChanged",
|
173
|
+
"bubbles": true,
|
174
|
+
"cancelable": true,
|
175
|
+
"composed": true,
|
176
|
+
"docs": {
|
177
|
+
"tags": [],
|
178
|
+
"text": "Emitted on demand when the Level is changed"
|
179
|
+
},
|
180
|
+
"complexType": {
|
181
|
+
"original": "string",
|
182
|
+
"resolved": "string",
|
183
|
+
"references": {}
|
184
|
+
}
|
185
|
+
}];
|
186
|
+
}
|
171
187
|
static get elementRef() { return "el"; }
|
172
188
|
static get watchers() {
|
173
189
|
return [{
|
@@ -177,8 +177,11 @@ export class LayerTable {
|
|
177
177
|
* watch for changes in layer view and verify if it has editing enabled
|
178
178
|
*/
|
179
179
|
async _layerWatchHandler() {
|
180
|
+
var _a, _b;
|
180
181
|
this._fetchingData = true;
|
181
182
|
this._definitionExpression = this._layer.definitionExpression;
|
183
|
+
this._floorField = (_b = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.floorInfo) === null || _b === void 0 ? void 0 : _b.floorField;
|
184
|
+
this._updateFloorDefinitionExpression();
|
182
185
|
await this._resetTable();
|
183
186
|
this._updateShareUrl();
|
184
187
|
this._initLayerExpressions();
|
@@ -242,14 +245,19 @@ export class LayerTable {
|
|
242
245
|
}
|
243
246
|
/**
|
244
247
|
* Refresh the table when edits are completed
|
245
|
-
*
|
246
248
|
*/
|
247
249
|
async editsComplete() {
|
248
250
|
await this._refresh();
|
249
251
|
}
|
250
252
|
/**
|
251
|
-
* Refresh the table when
|
252
|
-
|
253
|
+
* Refresh the table when floor filter level is changed
|
254
|
+
*/
|
255
|
+
async levelChanged(evt) {
|
256
|
+
this._floorLevel = evt.detail;
|
257
|
+
this._updateFloorDefinitionExpression();
|
258
|
+
}
|
259
|
+
/**
|
260
|
+
* Refresh the table when
|
253
261
|
*/
|
254
262
|
noLayersFound() {
|
255
263
|
this._layer = undefined;
|
@@ -444,93 +452,105 @@ export class LayerTable {
|
|
444
452
|
const featuresSelected = this._featuresSelected();
|
445
453
|
const featuresEmpty = this._featuresEmpty();
|
446
454
|
const hasFilterExpressions = this._hasFilterExpressions();
|
447
|
-
this.
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
455
|
+
if (this._translations) {
|
456
|
+
this._toolInfos = [{
|
457
|
+
active: false,
|
458
|
+
icon: "zoom-to-object",
|
459
|
+
indicator: false,
|
460
|
+
label: this._translations.zoom,
|
461
|
+
func: () => this._zoom(),
|
462
|
+
disabled: !featuresSelected,
|
463
|
+
isOverflow: false
|
464
|
+
},
|
465
|
+
hasFilterExpressions ? {
|
466
|
+
active: false,
|
467
|
+
icon: "filter",
|
468
|
+
indicator: false,
|
469
|
+
label: this._translations.filters,
|
470
|
+
func: () => this._toggleFilter(),
|
471
|
+
disabled: false,
|
472
|
+
isOverflow: false
|
473
|
+
} : undefined,
|
474
|
+
this._deleteEnabled ? {
|
475
|
+
active: false,
|
476
|
+
icon: "trash",
|
477
|
+
indicator: false,
|
478
|
+
label: this._translations.delete,
|
479
|
+
func: () => this._delete(),
|
480
|
+
disabled: !featuresSelected,
|
481
|
+
isDanger: true,
|
482
|
+
isOverflow: false
|
483
|
+
} : undefined, {
|
484
|
+
active: false,
|
485
|
+
icon: "erase",
|
486
|
+
indicator: false,
|
487
|
+
label: this._translations.clearSelection,
|
488
|
+
func: () => this._clearSelection(),
|
489
|
+
disabled: !featuresSelected,
|
490
|
+
isOverflow: false
|
491
|
+
}, {
|
492
|
+
active: false,
|
493
|
+
icon: "selected-items-filter",
|
494
|
+
indicator: false,
|
495
|
+
label: this._showOnlySelected ? this._translations.showAll : this._translations.showSelected,
|
496
|
+
func: () => this._toggleShowSelected(),
|
497
|
+
disabled: !featuresSelected,
|
498
|
+
isOverflow: false
|
499
|
+
}, {
|
500
|
+
active: false,
|
501
|
+
icon: "list-check-all",
|
502
|
+
indicator: false,
|
503
|
+
func: () => this._selectAll(),
|
504
|
+
label: this._translations.selectAll,
|
505
|
+
disabled: featuresEmpty,
|
506
|
+
isOverflow: false
|
507
|
+
}, {
|
508
|
+
active: false,
|
509
|
+
icon: "compare",
|
510
|
+
indicator: false,
|
511
|
+
func: () => this._switchSelected(),
|
512
|
+
label: this._translations.switchSelected,
|
513
|
+
disabled: featuresEmpty,
|
514
|
+
isOverflow: false
|
515
|
+
}, {
|
516
|
+
active: false,
|
517
|
+
icon: "refresh",
|
518
|
+
indicator: false,
|
519
|
+
func: () => this._refresh(),
|
520
|
+
label: this._translations.refresh,
|
521
|
+
disabled: false,
|
522
|
+
isOverflow: false
|
523
|
+
},
|
524
|
+
this.enableCSV ? {
|
525
|
+
active: false,
|
526
|
+
icon: "export",
|
527
|
+
indicator: false,
|
528
|
+
func: () => void this._exportToCSV(),
|
529
|
+
label: this._translations.exportCSV,
|
530
|
+
disabled: featuresEmpty,
|
531
|
+
isOverflow: false
|
532
|
+
} : undefined, {
|
533
|
+
active: false,
|
534
|
+
icon: this._showHideOpen ? "chevron-down" : "chevron-right",
|
535
|
+
indicator: false,
|
536
|
+
func: () => this._toggleShowHide(),
|
537
|
+
label: this._translations.showHideColumns,
|
538
|
+
disabled: false,
|
539
|
+
isOverflow: false,
|
540
|
+
isSublist: true
|
541
|
+
}];
|
542
|
+
this._defaultVisibleToolSizeInfos = undefined;
|
543
|
+
}
|
544
|
+
}
|
545
|
+
/**
|
546
|
+
* Applies a definition expression when floor field and level are available
|
547
|
+
*
|
548
|
+
* @returns boolean
|
549
|
+
*/
|
550
|
+
_updateFloorDefinitionExpression() {
|
551
|
+
if (this._floorField && this._floorLevel) {
|
552
|
+
this._layer.definitionExpression = `${this._floorField} = '${this._floorLevel}'`;
|
553
|
+
}
|
534
554
|
}
|
535
555
|
/**
|
536
556
|
* Returns true when one ore more features are selected
|
@@ -741,12 +761,21 @@ export class LayerTable {
|
|
741
761
|
if ((_b = this.mapInfo) === null || _b === void 0 ? void 0 : _b.id) {
|
742
762
|
urlObj.searchParams.set("webmap", this.mapInfo.id);
|
743
763
|
}
|
764
|
+
else {
|
765
|
+
urlObj.searchParams.delete("webmap");
|
766
|
+
}
|
744
767
|
if ((_c = this._layer) === null || _c === void 0 ? void 0 : _c.id) {
|
745
768
|
urlObj.searchParams.set("layer", this._layer.id);
|
746
769
|
}
|
770
|
+
else {
|
771
|
+
urlObj.searchParams.delete("layer");
|
772
|
+
}
|
747
773
|
if (((_d = this._selectedIndexes) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
748
774
|
urlObj.searchParams.set("oid", this._selectedIndexes.join(","));
|
749
775
|
}
|
776
|
+
else {
|
777
|
+
urlObj.searchParams.delete("oid");
|
778
|
+
}
|
750
779
|
if (this._filterActive) {
|
751
780
|
const filter = JSON.parse(this._filterList.urlParams.get("filter"));
|
752
781
|
const layerExpressions = this._filterList.layerExpressions.map(layerExp => {
|
@@ -760,7 +789,11 @@ export class LayerTable {
|
|
760
789
|
});
|
761
790
|
urlObj.searchParams.set("filter", JSON.stringify(layerExpressions));
|
762
791
|
}
|
792
|
+
else {
|
793
|
+
urlObj.searchParams.delete("filter");
|
794
|
+
}
|
763
795
|
this._shareNode.shareUrl = urlObj.href;
|
796
|
+
history.pushState(history.state, document.title, urlObj.href);
|
764
797
|
}
|
765
798
|
/**
|
766
799
|
* Get a tooltip
|
@@ -1080,7 +1113,7 @@ export class LayerTable {
|
|
1080
1113
|
*/
|
1081
1114
|
_filterModal() {
|
1082
1115
|
var _a, _b, _c;
|
1083
|
-
return (h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl:
|
1116
|
+
return (h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: async () => this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", (_c = this._layer) === null || _c === void 0 ? void 0 : _c.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl: true, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), layerExpressions: this._layerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(), ref: (el) => this._filterList = el, view: this.mapView, zoomBtn: false }))));
|
1084
1117
|
}
|
1085
1118
|
/**
|
1086
1119
|
* Reset the filter active prop
|
@@ -1788,6 +1821,12 @@ export class LayerTable {
|
|
1788
1821
|
"target": "window",
|
1789
1822
|
"capture": false,
|
1790
1823
|
"passive": false
|
1824
|
+
}, {
|
1825
|
+
"name": "levelChanged",
|
1826
|
+
"method": "levelChanged",
|
1827
|
+
"target": "window",
|
1828
|
+
"capture": false,
|
1829
|
+
"passive": false
|
1791
1830
|
}, {
|
1792
1831
|
"name": "noLayersFound",
|
1793
1832
|
"method": "noLayersFound",
|
@@ -519,7 +519,7 @@ export class PublicNotification {
|
|
519
519
|
const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
|
520
520
|
const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
|
521
521
|
const formatOptionsClass = this._addResults ? "" : "display-none";
|
522
|
-
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", layout: "inline" }, h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, 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.
|
522
|
+
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", layout: "inline" }, h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, 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.title)), 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))));
|
523
523
|
}
|
524
524
|
/**
|
525
525
|
* Render the refine page
|
@@ -95,6 +95,19 @@
|
|
95
95
|
active: false
|
96
96
|
}
|
97
97
|
]
|
98
|
+
}, {
|
99
|
+
id: "Requets_6608",
|
100
|
+
title: "Comments",
|
101
|
+
operator: " AND ",
|
102
|
+
expressions: [
|
103
|
+
{
|
104
|
+
definitionExpression: "OBJECTID > 1",
|
105
|
+
id: 1701793260226,
|
106
|
+
index: 0,
|
107
|
+
name: "greater than 1",
|
108
|
+
active: false
|
109
|
+
}
|
110
|
+
]
|
98
111
|
}
|
99
112
|
]
|
100
113
|
}
|
@@ -22,6 +22,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
22
22
|
this.refreshGraphics = createEvent(this, "refreshGraphics", 7);
|
23
23
|
/**
|
24
24
|
* boolean: When true the Editor widget should be closed
|
25
|
+
* Without this logic we are taken to the Editors "Select" workflow step
|
25
26
|
*/
|
26
27
|
this._shouldClose = false;
|
27
28
|
this.graphics = undefined;
|
@@ -40,8 +41,8 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
40
41
|
* Watch for changes to the graphics and update the feature widget
|
41
42
|
*/
|
42
43
|
async graphicsWatchHandler() {
|
43
|
-
if (this.graphics.length === 0) {
|
44
|
-
await this._closeEdit();
|
44
|
+
if (this.graphics.length === 0 && this.open) {
|
45
|
+
await this._closeEdit(true);
|
45
46
|
}
|
46
47
|
}
|
47
48
|
async openWatchHandler(v) {
|
@@ -55,11 +56,13 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
55
56
|
this._editorLoading = false;
|
56
57
|
}
|
57
58
|
if (!v) {
|
58
|
-
await this._closeEdit();
|
59
|
+
await this._closeEdit(true);
|
59
60
|
}
|
60
61
|
}
|
61
62
|
async featureSelectionChange() {
|
62
|
-
|
63
|
+
if (this.open) {
|
64
|
+
await this._closeEdit(false);
|
65
|
+
}
|
63
66
|
}
|
64
67
|
//--------------------------------------------------------------------------
|
65
68
|
//
|
@@ -90,7 +93,6 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
90
93
|
}
|
91
94
|
this._layerEditHandle = this._layer.on("edits", () => {
|
92
95
|
this.editsComplete.emit();
|
93
|
-
this.open = false;
|
94
96
|
});
|
95
97
|
}
|
96
98
|
}
|
@@ -105,7 +107,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
105
107
|
!this.graphics[0].layer.editingEnabled : true;
|
106
108
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
107
109
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
108
|
-
return (h(Host, null, h("div", { class: "position-absolute" }, editDisabled ? (h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, h("div", { class: "position-absolute"
|
110
|
+
return (h(Host, null, h("div", { class: "position-absolute" }, editDisabled ? (h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, h("div", { class: "position-absolute" }, h("div", { class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), h("calcite-loader", { class: loadingClass, label: "", scale: "s" })))));
|
109
111
|
}
|
110
112
|
//--------------------------------------------------------------------------
|
111
113
|
//
|
@@ -160,10 +162,13 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
160
162
|
this._shouldClose = false;
|
161
163
|
});
|
162
164
|
this._activeWorkflowHandle = this.reactiveUtils.watch(() => { var _a; return (_a = this._editor.viewModel.activeWorkflow) === null || _a === void 0 ? void 0 : _a.activeWorkflow; }, (activeWorkflow) => {
|
165
|
+
var _a, _b;
|
163
166
|
if ((activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "update-table-record" || (activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "create-features") {
|
164
167
|
this._shouldClose = false;
|
165
168
|
}
|
166
|
-
|
169
|
+
// Handle back click and when feature is de-selected from the table
|
170
|
+
// this ensures that we are not shown the Editors "Select" workflow step
|
171
|
+
if ((!(activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) && !(activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.hasPendingEdits) && !this._editor.activeWorkflow) || !((_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) === null || _b === void 0 ? void 0 : _b.started)) {
|
167
172
|
this.open = false;
|
168
173
|
}
|
169
174
|
});
|
@@ -174,16 +179,21 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
174
179
|
/**
|
175
180
|
* Close the edit widget
|
176
181
|
*/
|
177
|
-
async _closeEdit() {
|
182
|
+
async _closeEdit(destroyOnClose) {
|
178
183
|
var _a, _b, _c, _d;
|
179
184
|
this._shouldClose = true;
|
180
|
-
if ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) {
|
181
|
-
|
185
|
+
if (destroyOnClose && ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow)) {
|
186
|
+
if ((_c = (_b = this._editor.activeWorkflow) === null || _b === void 0 ? void 0 : _b.activeWorkflow) === null || _c === void 0 ? void 0 : _c.hasPendingEdits) {
|
187
|
+
await this._editor.activeWorkflow.reset();
|
188
|
+
await this._editor.cancelWorkflow();
|
189
|
+
}
|
190
|
+
this._editor.destroy();
|
182
191
|
}
|
183
|
-
|
184
|
-
this.
|
192
|
+
else {
|
193
|
+
if (this.graphicIndex > -1 && ((_d = this.graphics) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
194
|
+
this.refreshGraphics.emit(this.graphics);
|
195
|
+
}
|
185
196
|
}
|
186
|
-
(_d = this._editor) === null || _d === void 0 ? void 0 : _d.destroy();
|
187
197
|
this._shouldClose = false;
|
188
198
|
this.closeEdit.emit();
|
189
199
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
6
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { l as loadModules } from './loadModules.js';
|
8
8
|
|
9
9
|
const floorFilterCss = ":host{display:block}";
|
@@ -13,6 +13,7 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
13
13
|
super();
|
14
14
|
this.__registerHost();
|
15
15
|
this.__attachShadow();
|
16
|
+
this.levelChanged = createEvent(this, "levelChanged", 7);
|
16
17
|
this.enabled = undefined;
|
17
18
|
this.floorFilterWidget = undefined;
|
18
19
|
this.mapView = undefined;
|
@@ -29,16 +30,6 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
29
30
|
}
|
30
31
|
//--------------------------------------------------------------------------
|
31
32
|
//
|
32
|
-
// Methods (public)
|
33
|
-
//
|
34
|
-
//--------------------------------------------------------------------------
|
35
|
-
//--------------------------------------------------------------------------
|
36
|
-
//
|
37
|
-
// Events (public)
|
38
|
-
//
|
39
|
-
//--------------------------------------------------------------------------
|
40
|
-
//--------------------------------------------------------------------------
|
41
|
-
//
|
42
33
|
// Functions (lifecycle)
|
43
34
|
//
|
44
35
|
//--------------------------------------------------------------------------
|
@@ -64,10 +55,12 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
64
55
|
* @protected
|
65
56
|
*/
|
66
57
|
async _initModules() {
|
67
|
-
const [FloorFilter] = await loadModules([
|
68
|
-
"esri/widgets/FloorFilter"
|
58
|
+
const [FloorFilter, reactiveUtils] = await loadModules([
|
59
|
+
"esri/widgets/FloorFilter",
|
60
|
+
"esri/core/reactiveUtils"
|
69
61
|
]);
|
70
62
|
this.FloorFilter = FloorFilter;
|
63
|
+
this.reactiveUtils = reactiveUtils;
|
71
64
|
}
|
72
65
|
/**
|
73
66
|
* Initialize the floor filter or reset the current view if it already exists
|
@@ -80,6 +73,12 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
80
73
|
container: this._floorFilterElement,
|
81
74
|
view
|
82
75
|
});
|
76
|
+
if (this._levelHandle) {
|
77
|
+
this._levelHandle.remove();
|
78
|
+
}
|
79
|
+
this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
|
80
|
+
this.levelChanged.emit(level);
|
81
|
+
});
|
83
82
|
}
|
84
83
|
else {
|
85
84
|
this.floorFilterWidget.view = view;
|