@esri/solutions-components 0.6.29 → 0.6.32
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-alert_3.cjs.entry.js +17 -8
- package/dist/cjs/card-manager_3.cjs.entry.js +28 -44
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/edit-card/edit-card.css +9 -0
- package/dist/collection/components/edit-card/edit-card.js +25 -7
- package/dist/collection/components/layer-table/layer-table.css +4 -2
- package/dist/collection/components/layer-table/layer-table.js +27 -43
- package/dist/components/edit-card2.js +18 -9
- package/dist/components/layer-table2.js +28 -44
- package/dist/esm/calcite-alert_3.entry.js +17 -8
- package/dist/esm/card-manager_3.entry.js +28 -44
- package/dist/esm/loader.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-3c702004.entry.js → p-792e171f.entry.js} +1 -1
- package/dist/solutions-components/{p-f8687049.entry.js → p-e05cf92d.entry.js} +2 -2
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/edit-card/edit-card.d.ts +2 -1
- package/package.json +1 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
@@ -323,7 +323,7 @@ const Alert = class {
|
|
323
323
|
};
|
324
324
|
Alert.style = alertCss;
|
325
325
|
|
326
|
-
const editCardCss = ":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}";
|
326
|
+
const editCardCss = ":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}";
|
327
327
|
|
328
328
|
const EditCard = class {
|
329
329
|
constructor(hostRef) {
|
@@ -351,7 +351,7 @@ const EditCard = class {
|
|
351
351
|
*/
|
352
352
|
async graphicsWatchHandler() {
|
353
353
|
if (this.graphics.length === 0) {
|
354
|
-
this._closeEdit();
|
354
|
+
await this._closeEdit();
|
355
355
|
}
|
356
356
|
}
|
357
357
|
async openWatchHandler(v) {
|
@@ -365,9 +365,12 @@ const EditCard = class {
|
|
365
365
|
this._editorLoading = false;
|
366
366
|
}
|
367
367
|
if (!v) {
|
368
|
-
this._closeEdit();
|
368
|
+
await this._closeEdit();
|
369
369
|
}
|
370
370
|
}
|
371
|
+
async featureSelectionChange() {
|
372
|
+
await this._closeEdit();
|
373
|
+
}
|
371
374
|
//--------------------------------------------------------------------------
|
372
375
|
//
|
373
376
|
// Functions (lifecycle)
|
@@ -397,7 +400,7 @@ const EditCard = class {
|
|
397
400
|
}
|
398
401
|
this._layerEditHandle = this._layer.on("edits", () => {
|
399
402
|
this.editsComplete.emit();
|
400
|
-
this._closeEdit();
|
403
|
+
void this._closeEdit();
|
401
404
|
});
|
402
405
|
}
|
403
406
|
}
|
@@ -410,9 +413,9 @@ const EditCard = class {
|
|
410
413
|
// when you use MULTI edit mode...is fine in SINGLE
|
411
414
|
const editDisabled = ((_a = this.graphics) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.graphics[0] ?
|
412
415
|
!this.graphics[0].layer.editingEnabled : true;
|
413
|
-
const tableNodeClass = this._editorLoading ? "display-none" : "";
|
416
|
+
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
414
417
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
415
|
-
return (index.h(index.Host, null, index.h("div", { class: "position-
|
418
|
+
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", slot: "content" }, index.h("div", { class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), index.h("calcite-loader", { class: loadingClass, scale: "s" })))));
|
416
419
|
}
|
417
420
|
//--------------------------------------------------------------------------
|
418
421
|
//
|
@@ -468,7 +471,7 @@ const EditCard = class {
|
|
468
471
|
});
|
469
472
|
this._editHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "ready", () => {
|
470
473
|
if (this._shouldClose) {
|
471
|
-
this._closeEdit();
|
474
|
+
void this._closeEdit();
|
472
475
|
}
|
473
476
|
else if (this.graphicIndex > -1 && this.graphics.length > 0 && this.open && !this._shouldClose) {
|
474
477
|
void this._startUpdate();
|
@@ -488,7 +491,13 @@ const EditCard = class {
|
|
488
491
|
*
|
489
492
|
* @returns void
|
490
493
|
*/
|
491
|
-
_closeEdit() {
|
494
|
+
async _closeEdit() {
|
495
|
+
var _a, _b, _c;
|
496
|
+
this._shouldClose = true;
|
497
|
+
if ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) {
|
498
|
+
await ((_b = this._editor) === null || _b === void 0 ? void 0 : _b.cancelWorkflow());
|
499
|
+
}
|
500
|
+
(_c = this._editor) === null || _c === void 0 ? void 0 : _c.destroy();
|
492
501
|
this._shouldClose = false;
|
493
502
|
this.closeEdit.emit();
|
494
503
|
}
|
@@ -103,7 +103,7 @@ const CardManager = class {
|
|
103
103
|
};
|
104
104
|
CardManager.style = cardManagerCss;
|
105
105
|
|
106
|
-
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.bottom-left{position:absolute;left:
|
106
|
+
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}";
|
107
107
|
|
108
108
|
const LayerTable = class {
|
109
109
|
constructor(hostRef) {
|
@@ -683,33 +683,30 @@ const LayerTable = class {
|
|
683
683
|
* @returns void
|
684
684
|
*/
|
685
685
|
async _resetTable() {
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
this._checkEditEnabled();
|
698
|
-
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
699
|
-
this._initToolInfos();
|
700
|
-
});
|
701
|
-
await this._table.when(() => {
|
702
|
-
this._table.clearSelectionFilter();
|
703
|
-
});
|
704
|
-
this._showOnlySelected = false;
|
705
|
-
this._sortActive = false;
|
706
|
-
await this._sortTable();
|
707
|
-
}
|
708
|
-
else {
|
709
|
-
this._table.view = this.mapView;
|
710
|
-
this._table.layer = this._layer;
|
711
|
-
}
|
686
|
+
var _a, _b;
|
687
|
+
this._clearSelection();
|
688
|
+
this._allIds = [];
|
689
|
+
this.featureSelectionChange.emit(this._selectedIndexes);
|
690
|
+
const columnTemplates = this._getColumnTemplates(this._layer.id, (_b = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.popupTemplate) === null || _b === void 0 ? void 0 : _b.fieldInfos);
|
691
|
+
this._allIds = await mapViewUtils.queryAllIds(this._layer);
|
692
|
+
if (!this._table) {
|
693
|
+
await this._getTable(this._tableNode, columnTemplates);
|
694
|
+
}
|
695
|
+
else if (columnTemplates) {
|
696
|
+
this._table.tableTemplate.columnTemplates = columnTemplates;
|
712
697
|
}
|
698
|
+
this._table.layer = this._layer;
|
699
|
+
this._table.view = this.mapView;
|
700
|
+
this._checkEditEnabled();
|
701
|
+
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
702
|
+
this._initToolInfos();
|
703
|
+
await this._table.when(() => {
|
704
|
+
this._table.highlightIds.removeAll();
|
705
|
+
this._table.clearSelectionFilter();
|
706
|
+
});
|
707
|
+
this._showOnlySelected = false;
|
708
|
+
this._sortActive = false;
|
709
|
+
await this._sortTable();
|
713
710
|
}
|
714
711
|
/**
|
715
712
|
* Verify edit capabilities of the layer
|
@@ -911,28 +908,15 @@ const LayerTable = class {
|
|
911
908
|
* @returns a promise that will resolve when the operation is complete
|
912
909
|
*/
|
913
910
|
async _layerSelectionChanged(evt) {
|
914
|
-
var _a
|
911
|
+
var _a;
|
915
912
|
const id = evt.detail[0];
|
916
913
|
if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this._allIds.length === 0) {
|
917
914
|
this._fetchingData = true;
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
if (!this._table) {
|
922
|
-
await this._getTable(this._tableNode, columnTemplates);
|
923
|
-
}
|
924
|
-
else if (columnTemplates) {
|
925
|
-
this._table.tableTemplate.columnTemplates = columnTemplates;
|
926
|
-
}
|
927
|
-
await this._table.when(() => {
|
928
|
-
this._table.highlightIds.removeAll();
|
915
|
+
const layer = await mapViewUtils.getLayerOrTable(this.mapView, id);
|
916
|
+
await layer.when(() => {
|
917
|
+
this._layer = layer;
|
929
918
|
});
|
930
|
-
this._selectedIndexes = [];
|
931
|
-
this._table.layer = this._layer;
|
932
|
-
this._table.render();
|
933
919
|
}
|
934
|
-
this._sortActive = false;
|
935
|
-
await this._sortTable();
|
936
920
|
this._fetchingData = false;
|
937
921
|
}
|
938
922
|
/**
|