@esri/solutions-components 0.7.22 → 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 +21 -3
- 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 +27 -3
- 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 +22 -4
- 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 +21 -3
- 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-630e274b.entry.js +0 -6
- package/dist/solutions-components/p-704da348.entry.js +0 -6
@@ -29,10 +29,9 @@
|
|
29
29
|
"export": "Export",
|
30
30
|
"exportTip": "Select lists to include in the exported file. Export lists as CSV and PDF.",
|
31
31
|
"title": "Title",
|
32
|
-
"
|
33
|
-
"addResults": "Include results",
|
32
|
+
"addResults": "Results",
|
34
33
|
"titlePlaceholder": "Enter title here",
|
35
|
-
"includeMap": "
|
34
|
+
"includeMap": "Map",
|
36
35
|
"pdfOptions": "PDF Options",
|
37
36
|
"csvOptions": "CSV Options",
|
38
37
|
"refineSelection": "Refine selection",
|
@@ -29,10 +29,9 @@
|
|
29
29
|
"export": "Export",
|
30
30
|
"exportTip": "Select lists to include in the exported file. Export lists as CSV and PDF.",
|
31
31
|
"title": "Title",
|
32
|
-
"
|
33
|
-
"addResults": "Include results",
|
32
|
+
"addResults": "Results",
|
34
33
|
"titlePlaceholder": "Enter title here",
|
35
|
-
"includeMap": "
|
34
|
+
"includeMap": "Map",
|
36
35
|
"pdfOptions": "PDF Options",
|
37
36
|
"csvOptions": "CSV Options",
|
38
37
|
"refineSelection": "Refine selection",
|
@@ -124,6 +124,7 @@ const floorFilterCss = ":host{display:block}";
|
|
124
124
|
const FloorFilter = class {
|
125
125
|
constructor(hostRef) {
|
126
126
|
index.registerInstance(this, hostRef);
|
127
|
+
this.levelChanged = index.createEvent(this, "levelChanged", 7);
|
127
128
|
this.enabled = undefined;
|
128
129
|
this.floorFilterWidget = undefined;
|
129
130
|
this.mapView = undefined;
|
@@ -140,16 +141,6 @@ const FloorFilter = class {
|
|
140
141
|
}
|
141
142
|
//--------------------------------------------------------------------------
|
142
143
|
//
|
143
|
-
// Methods (public)
|
144
|
-
//
|
145
|
-
//--------------------------------------------------------------------------
|
146
|
-
//--------------------------------------------------------------------------
|
147
|
-
//
|
148
|
-
// Events (public)
|
149
|
-
//
|
150
|
-
//--------------------------------------------------------------------------
|
151
|
-
//--------------------------------------------------------------------------
|
152
|
-
//
|
153
144
|
// Functions (lifecycle)
|
154
145
|
//
|
155
146
|
//--------------------------------------------------------------------------
|
@@ -175,10 +166,12 @@ const FloorFilter = class {
|
|
175
166
|
* @protected
|
176
167
|
*/
|
177
168
|
async _initModules() {
|
178
|
-
const [FloorFilter] = await loadModules.loadModules([
|
179
|
-
"esri/widgets/FloorFilter"
|
169
|
+
const [FloorFilter, reactiveUtils] = await loadModules.loadModules([
|
170
|
+
"esri/widgets/FloorFilter",
|
171
|
+
"esri/core/reactiveUtils"
|
180
172
|
]);
|
181
173
|
this.FloorFilter = FloorFilter;
|
174
|
+
this.reactiveUtils = reactiveUtils;
|
182
175
|
}
|
183
176
|
/**
|
184
177
|
* Initialize the floor filter or reset the current view if it already exists
|
@@ -191,6 +184,12 @@ const FloorFilter = class {
|
|
191
184
|
container: this._floorFilterElement,
|
192
185
|
view
|
193
186
|
});
|
187
|
+
if (this._levelHandle) {
|
188
|
+
this._levelHandle.remove();
|
189
|
+
}
|
190
|
+
this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
|
191
|
+
this.levelChanged.emit(level);
|
192
|
+
});
|
194
193
|
}
|
195
194
|
else {
|
196
195
|
this.floorFilterWidget.view = view;
|
@@ -321,6 +321,7 @@ const EditCard = class {
|
|
321
321
|
this.refreshGraphics = index.createEvent(this, "refreshGraphics", 7);
|
322
322
|
/**
|
323
323
|
* boolean: When true the Editor widget should be closed
|
324
|
+
* Without this logic we are taken to the Editors "Select" workflow step
|
324
325
|
*/
|
325
326
|
this._shouldClose = false;
|
326
327
|
this.graphics = undefined;
|
@@ -339,8 +340,8 @@ const EditCard = class {
|
|
339
340
|
* Watch for changes to the graphics and update the feature widget
|
340
341
|
*/
|
341
342
|
async graphicsWatchHandler() {
|
342
|
-
if (this.graphics.length === 0) {
|
343
|
-
await this._closeEdit();
|
343
|
+
if (this.graphics.length === 0 && this.open) {
|
344
|
+
await this._closeEdit(true);
|
344
345
|
}
|
345
346
|
}
|
346
347
|
async openWatchHandler(v) {
|
@@ -354,11 +355,13 @@ const EditCard = class {
|
|
354
355
|
this._editorLoading = false;
|
355
356
|
}
|
356
357
|
if (!v) {
|
357
|
-
await this._closeEdit();
|
358
|
+
await this._closeEdit(true);
|
358
359
|
}
|
359
360
|
}
|
360
361
|
async featureSelectionChange() {
|
361
|
-
|
362
|
+
if (this.open) {
|
363
|
+
await this._closeEdit(false);
|
364
|
+
}
|
362
365
|
}
|
363
366
|
//--------------------------------------------------------------------------
|
364
367
|
//
|
@@ -389,7 +392,6 @@ const EditCard = class {
|
|
389
392
|
}
|
390
393
|
this._layerEditHandle = this._layer.on("edits", () => {
|
391
394
|
this.editsComplete.emit();
|
392
|
-
this.open = false;
|
393
395
|
});
|
394
396
|
}
|
395
397
|
}
|
@@ -404,7 +406,7 @@ const EditCard = class {
|
|
404
406
|
!this.graphics[0].layer.editingEnabled : true;
|
405
407
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
406
408
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
407
|
-
return (index.h(index.Host, null, index.h("div", { class: "position-absolute" }, editDisabled ? (index.h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, index.h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, index.h("div", { class: "position-absolute"
|
409
|
+
return (index.h(index.Host, null, index.h("div", { class: "position-absolute" }, editDisabled ? (index.h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, index.h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, index.h("div", { class: "position-absolute" }, index.h("div", { class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), index.h("calcite-loader", { class: loadingClass, label: "", scale: "s" })))));
|
408
410
|
}
|
409
411
|
//--------------------------------------------------------------------------
|
410
412
|
//
|
@@ -459,10 +461,13 @@ const EditCard = class {
|
|
459
461
|
this._shouldClose = false;
|
460
462
|
});
|
461
463
|
this._activeWorkflowHandle = this.reactiveUtils.watch(() => { var _a; return (_a = this._editor.viewModel.activeWorkflow) === null || _a === void 0 ? void 0 : _a.activeWorkflow; }, (activeWorkflow) => {
|
464
|
+
var _a, _b;
|
462
465
|
if ((activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "update-table-record" || (activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "create-features") {
|
463
466
|
this._shouldClose = false;
|
464
467
|
}
|
465
|
-
|
468
|
+
// Handle back click and when feature is de-selected from the table
|
469
|
+
// this ensures that we are not shown the Editors "Select" workflow step
|
470
|
+
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)) {
|
466
471
|
this.open = false;
|
467
472
|
}
|
468
473
|
});
|
@@ -473,16 +478,21 @@ const EditCard = class {
|
|
473
478
|
/**
|
474
479
|
* Close the edit widget
|
475
480
|
*/
|
476
|
-
async _closeEdit() {
|
481
|
+
async _closeEdit(destroyOnClose) {
|
477
482
|
var _a, _b, _c, _d;
|
478
483
|
this._shouldClose = true;
|
479
|
-
if ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) {
|
480
|
-
|
484
|
+
if (destroyOnClose && ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow)) {
|
485
|
+
if ((_c = (_b = this._editor.activeWorkflow) === null || _b === void 0 ? void 0 : _b.activeWorkflow) === null || _c === void 0 ? void 0 : _c.hasPendingEdits) {
|
486
|
+
await this._editor.activeWorkflow.reset();
|
487
|
+
await this._editor.cancelWorkflow();
|
488
|
+
}
|
489
|
+
this._editor.destroy();
|
481
490
|
}
|
482
|
-
|
483
|
-
this.
|
491
|
+
else {
|
492
|
+
if (this.graphicIndex > -1 && ((_d = this.graphics) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
493
|
+
this.refreshGraphics.emit(this.graphics);
|
494
|
+
}
|
484
495
|
}
|
485
|
-
(_d = this._editor) === null || _d === void 0 ? void 0 : _d.destroy();
|
486
496
|
this._shouldClose = false;
|
487
497
|
this.closeEdit.emit();
|
488
498
|
}
|
@@ -263,8 +263,11 @@ const LayerTable = class {
|
|
263
263
|
* watch for changes in layer view and verify if it has editing enabled
|
264
264
|
*/
|
265
265
|
async _layerWatchHandler() {
|
266
|
+
var _a, _b;
|
266
267
|
this._fetchingData = true;
|
267
268
|
this._definitionExpression = this._layer.definitionExpression;
|
269
|
+
this._floorField = (_b = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.floorInfo) === null || _b === void 0 ? void 0 : _b.floorField;
|
270
|
+
this._updateFloorDefinitionExpression();
|
268
271
|
await this._resetTable();
|
269
272
|
this._updateShareUrl();
|
270
273
|
this._initLayerExpressions();
|
@@ -328,14 +331,19 @@ const LayerTable = class {
|
|
328
331
|
}
|
329
332
|
/**
|
330
333
|
* Refresh the table when edits are completed
|
331
|
-
*
|
332
334
|
*/
|
333
335
|
async editsComplete() {
|
334
336
|
await this._refresh();
|
335
337
|
}
|
336
338
|
/**
|
337
|
-
* Refresh the table when
|
338
|
-
|
339
|
+
* Refresh the table when floor filter level is changed
|
340
|
+
*/
|
341
|
+
async levelChanged(evt) {
|
342
|
+
this._floorLevel = evt.detail;
|
343
|
+
this._updateFloorDefinitionExpression();
|
344
|
+
}
|
345
|
+
/**
|
346
|
+
* Refresh the table when
|
339
347
|
*/
|
340
348
|
noLayersFound() {
|
341
349
|
this._layer = undefined;
|
@@ -620,6 +628,16 @@ const LayerTable = class {
|
|
620
628
|
this._defaultVisibleToolSizeInfos = undefined;
|
621
629
|
}
|
622
630
|
}
|
631
|
+
/**
|
632
|
+
* Applies a definition expression when floor field and level are available
|
633
|
+
*
|
634
|
+
* @returns boolean
|
635
|
+
*/
|
636
|
+
_updateFloorDefinitionExpression() {
|
637
|
+
if (this._floorField && this._floorLevel) {
|
638
|
+
this._layer.definitionExpression = `${this._floorField} = '${this._floorLevel}'`;
|
639
|
+
}
|
640
|
+
}
|
623
641
|
/**
|
624
642
|
* Returns true when one ore more features are selected
|
625
643
|
*
|