@esri/solutions-components 0.8.31 → 0.8.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +23 -7
- package/dist/cjs/card-manager_3.cjs.entry.js +17 -4
- package/dist/cjs/crowdsource-manager.cjs.entry.js +4 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +4 -2
- package/dist/collection/components/floor-filter/floor-filter.js +23 -7
- package/dist/collection/components/layer-table/layer-table.js +36 -4
- package/dist/collection/demos/crowdsource-manager.html +1 -1
- package/dist/components/crowdsource-manager.js +4 -2
- package/dist/components/floor-filter2.js +23 -7
- package/dist/components/layer-table2.js +19 -4
- package/dist/esm/basemap-gallery_7.entry.js +23 -7
- package/dist/esm/card-manager_3.entry.js +17 -4
- package/dist/esm/crowdsource-manager.entry.js +4 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +1 -1
- package/dist/solutions-components/p-21cbb55d.entry.js +6 -0
- package/dist/solutions-components/p-5862de8d.entry.js +6 -0
- package/dist/solutions-components/p-c91b2153.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/layer-table/layer-table.d.ts +8 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-1bdf0ba0.entry.js +0 -6
- package/dist/solutions-components/p-61bf98bc.entry.js +0 -6
- package/dist/solutions-components/p-a0616647.entry.js +0 -6
@@ -211,7 +211,9 @@ export class CrowdsourceManager {
|
|
211
211
|
async componentDidRender() {
|
212
212
|
if (this._shouldSetMapView) {
|
213
213
|
this._shouldSetMapView = false;
|
214
|
-
|
214
|
+
if (this._mapChange) {
|
215
|
+
await this._setMapView();
|
216
|
+
}
|
215
217
|
}
|
216
218
|
}
|
217
219
|
/**
|
@@ -431,7 +433,7 @@ export class CrowdsourceManager {
|
|
431
433
|
((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
|
432
434
|
const defaultOid = !this.defaultOid ? undefined :
|
433
435
|
((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
434
|
-
return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
|
436
|
+
return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapHidden: this._expandPopup, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
|
435
437
|
}
|
436
438
|
/**
|
437
439
|
* Update the component layout when its size changes
|
@@ -35,12 +35,17 @@ export class FloorFilter {
|
|
35
35
|
* Watch for changes to the mapView and re-init the floor filter
|
36
36
|
*/
|
37
37
|
async mapViewWatchHandler() {
|
38
|
+
console.log("mapViewWatchHandler");
|
39
|
+
console.log(`this.mapView: ${this.mapView}`);
|
38
40
|
await this._initFloorFilter(this.mapView);
|
39
41
|
}
|
40
42
|
/**
|
41
43
|
* Watch for changes to the enabled property and re-init or destroy the floor filter
|
42
44
|
*/
|
43
45
|
async enabledWatchHandler() {
|
46
|
+
console.log("enabledWatchHandler");
|
47
|
+
console.log(`this.enabled: ${this.enabled}`);
|
48
|
+
console.log(`this.mapView: ${this.mapView}`);
|
44
49
|
if (this.enabled) {
|
45
50
|
await this._initFloorFilter(this.mapView);
|
46
51
|
}
|
@@ -63,7 +68,9 @@ export class FloorFilter {
|
|
63
68
|
* Renders the component.
|
64
69
|
*/
|
65
70
|
render() {
|
66
|
-
|
71
|
+
console.log("render");
|
72
|
+
console.log(`this._floorFilterElement: ${this._floorFilterElement}`);
|
73
|
+
return (h(Host, { key: '01b71c71af2a183b85c8620c338512fd338f19ef' }, h("div", { key: '752d397c6e3b6a2257d0a8a05051ed821eca4b94', ref: (el) => { this._floorFilterElement = el; } })));
|
67
74
|
}
|
68
75
|
//--------------------------------------------------------------------------
|
69
76
|
//
|
@@ -91,6 +98,7 @@ export class FloorFilter {
|
|
91
98
|
* @protected
|
92
99
|
*/
|
93
100
|
_destroyWidget() {
|
101
|
+
console.log("_destroyWidget");
|
94
102
|
if (this.floorFilterWidget) {
|
95
103
|
this.floorFilterWidget.destroy();
|
96
104
|
this.floorFilterWidget = undefined;
|
@@ -105,6 +113,7 @@ export class FloorFilter {
|
|
105
113
|
* @protected
|
106
114
|
*/
|
107
115
|
_initContainer() {
|
116
|
+
console.log("_initContainer");
|
108
117
|
this._destroyWidget();
|
109
118
|
this._floorFilterElement = document.createElement("div");
|
110
119
|
}
|
@@ -112,11 +121,18 @@ export class FloorFilter {
|
|
112
121
|
* Initialize the floor filter or reset the current view if it already exists
|
113
122
|
*/
|
114
123
|
async _initFloorFilter(view) {
|
124
|
+
console.log("_initFloorFilter");
|
115
125
|
const webMap = view === null || view === void 0 ? void 0 : view.map;
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
126
|
+
await webMap.when(() => {
|
127
|
+
var _a, _b, _c;
|
128
|
+
console.log("webMap.when");
|
129
|
+
console.log("_initFloorFilter");
|
130
|
+
console.log(`view: ${view}`);
|
131
|
+
console.log(`this.enabled: ${this.enabled}`);
|
132
|
+
console.log(`this.FloorFilter: ${this.FloorFilter}`);
|
133
|
+
console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
|
134
|
+
if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
|
135
|
+
this._initContainer();
|
120
136
|
this.floorFilterWidget = new this.FloorFilter({
|
121
137
|
container: this._floorFilterElement,
|
122
138
|
view
|
@@ -133,8 +149,8 @@ export class FloorFilter {
|
|
133
149
|
this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
|
134
150
|
this.siteChanged.emit(site);
|
135
151
|
});
|
136
|
-
}
|
137
|
-
}
|
152
|
+
}
|
153
|
+
});
|
138
154
|
}
|
139
155
|
static get is() { return "floor-filter"; }
|
140
156
|
static get encapsulation() { return "shadow"; }
|
@@ -73,6 +73,7 @@ export class LayerTable {
|
|
73
73
|
this.enableInlineEdit = undefined;
|
74
74
|
this.enableShare = undefined;
|
75
75
|
this.isMobile = undefined;
|
76
|
+
this.mapHidden = undefined;
|
76
77
|
this.mapInfo = undefined;
|
77
78
|
this.mapView = undefined;
|
78
79
|
this.onlyShowUpdatableLayers = undefined;
|
@@ -156,6 +157,15 @@ export class LayerTable {
|
|
156
157
|
}
|
157
158
|
});
|
158
159
|
}
|
160
|
+
/**
|
161
|
+
* Reset the toolInfos when mapHidden prop changes so we can show/hide any map dependant tool(s)
|
162
|
+
*/
|
163
|
+
mapHiddenWatchHandler() {
|
164
|
+
var _a;
|
165
|
+
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
166
|
+
this._initToolInfos();
|
167
|
+
}
|
168
|
+
}
|
159
169
|
/**
|
160
170
|
* When isMobile is false we need to init the tool infos for the dynamic toolbar
|
161
171
|
*/
|
@@ -319,7 +329,7 @@ export class LayerTable {
|
|
319
329
|
const selected = this.selectedIds.length.toString();
|
320
330
|
const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
|
321
331
|
this._validateActiveActions();
|
322
|
-
return (h(Host, { key: '
|
332
|
+
return (h(Host, { key: '9692c6f764d078c22e1d6271deb3844ef65b1fca' }, h("calcite-shell", { key: 'a37b9fcfdd8450fea4a994738bf833c331bb168a' }, this._getTableControlRow("header"), h("div", { key: 'e0e82e0bb5441286d5cd3bdda3c55d77515fbcb0', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: '4890c168eba3db34a291121f633c0d69ab8a1517', class: "height-full width-full" }, h("calcite-loader", { key: '19f85ec47a03731fe4c9ebb13d91cad66a8637fa', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '53d1c8bce2e2d464a141fabfcf13ee41aaf02168', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
|
323
333
|
.replace("{{total}}", total)
|
324
334
|
.replace("{{selected}}", selected))) : undefined)), this._filterModal()));
|
325
335
|
}
|
@@ -482,7 +492,8 @@ export class LayerTable {
|
|
482
492
|
const featuresEmpty = this._featuresEmpty();
|
483
493
|
const hasFilterExpressions = this._hasFilterExpressions();
|
484
494
|
if (this._translations) {
|
485
|
-
this._toolInfos = [
|
495
|
+
this._toolInfos = [
|
496
|
+
!this.mapHidden ? {
|
486
497
|
active: false,
|
487
498
|
icon: "zoom-to-object",
|
488
499
|
indicator: false,
|
@@ -490,7 +501,7 @@ export class LayerTable {
|
|
490
501
|
func: () => this._zoom(),
|
491
502
|
disabled: !featuresSelected,
|
492
503
|
isOverflow: false
|
493
|
-
},
|
504
|
+
} : undefined,
|
494
505
|
hasFilterExpressions ? {
|
495
506
|
active: false,
|
496
507
|
icon: "filter",
|
@@ -568,7 +579,8 @@ export class LayerTable {
|
|
568
579
|
disabled: false,
|
569
580
|
isOverflow: false,
|
570
581
|
isSublist: true
|
571
|
-
}
|
582
|
+
}
|
583
|
+
];
|
572
584
|
this._defaultVisibleToolSizeInfos = undefined;
|
573
585
|
}
|
574
586
|
}
|
@@ -1664,6 +1676,23 @@ export class LayerTable {
|
|
1664
1676
|
"attribute": "is-mobile",
|
1665
1677
|
"reflect": false
|
1666
1678
|
},
|
1679
|
+
"mapHidden": {
|
1680
|
+
"type": "boolean",
|
1681
|
+
"mutable": false,
|
1682
|
+
"complexType": {
|
1683
|
+
"original": "boolean",
|
1684
|
+
"resolved": "boolean",
|
1685
|
+
"references": {}
|
1686
|
+
},
|
1687
|
+
"required": false,
|
1688
|
+
"optional": false,
|
1689
|
+
"docs": {
|
1690
|
+
"tags": [],
|
1691
|
+
"text": "boolean: when true the map is hidden and map specific controls should be hidden"
|
1692
|
+
},
|
1693
|
+
"attribute": "map-hidden",
|
1694
|
+
"reflect": false
|
1695
|
+
},
|
1667
1696
|
"mapInfo": {
|
1668
1697
|
"type": "unknown",
|
1669
1698
|
"mutable": false,
|
@@ -1879,6 +1908,9 @@ export class LayerTable {
|
|
1879
1908
|
}, {
|
1880
1909
|
"propName": "_controlsThatFit",
|
1881
1910
|
"methodName": "_controlsThatFitWatchHandler"
|
1911
|
+
}, {
|
1912
|
+
"propName": "mapHidden",
|
1913
|
+
"methodName": "mapHiddenWatchHandler"
|
1882
1914
|
}, {
|
1883
1915
|
"propName": "isMobile",
|
1884
1916
|
"methodName": "isMobileWatchHandler"
|
@@ -261,7 +261,9 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
261
261
|
async componentDidRender() {
|
262
262
|
if (this._shouldSetMapView) {
|
263
263
|
this._shouldSetMapView = false;
|
264
|
-
|
264
|
+
if (this._mapChange) {
|
265
|
+
await this._setMapView();
|
266
|
+
}
|
265
267
|
}
|
266
268
|
}
|
267
269
|
/**
|
@@ -481,7 +483,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
481
483
|
((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
|
482
484
|
const defaultOid = !this.defaultOid ? undefined :
|
483
485
|
((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
484
|
-
return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
|
486
|
+
return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapHidden: this._expandPopup, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
|
485
487
|
}
|
486
488
|
/**
|
487
489
|
* Update the component layout when its size changes
|
@@ -30,12 +30,17 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
30
30
|
* Watch for changes to the mapView and re-init the floor filter
|
31
31
|
*/
|
32
32
|
async mapViewWatchHandler() {
|
33
|
+
console.log("mapViewWatchHandler");
|
34
|
+
console.log(`this.mapView: ${this.mapView}`);
|
33
35
|
await this._initFloorFilter(this.mapView);
|
34
36
|
}
|
35
37
|
/**
|
36
38
|
* Watch for changes to the enabled property and re-init or destroy the floor filter
|
37
39
|
*/
|
38
40
|
async enabledWatchHandler() {
|
41
|
+
console.log("enabledWatchHandler");
|
42
|
+
console.log(`this.enabled: ${this.enabled}`);
|
43
|
+
console.log(`this.mapView: ${this.mapView}`);
|
39
44
|
if (this.enabled) {
|
40
45
|
await this._initFloorFilter(this.mapView);
|
41
46
|
}
|
@@ -58,7 +63,9 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
58
63
|
* Renders the component.
|
59
64
|
*/
|
60
65
|
render() {
|
61
|
-
|
66
|
+
console.log("render");
|
67
|
+
console.log(`this._floorFilterElement: ${this._floorFilterElement}`);
|
68
|
+
return (h(Host, { key: '01b71c71af2a183b85c8620c338512fd338f19ef' }, h("div", { key: '752d397c6e3b6a2257d0a8a05051ed821eca4b94', ref: (el) => { this._floorFilterElement = el; } })));
|
62
69
|
}
|
63
70
|
//--------------------------------------------------------------------------
|
64
71
|
//
|
@@ -86,6 +93,7 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
86
93
|
* @protected
|
87
94
|
*/
|
88
95
|
_destroyWidget() {
|
96
|
+
console.log("_destroyWidget");
|
89
97
|
if (this.floorFilterWidget) {
|
90
98
|
this.floorFilterWidget.destroy();
|
91
99
|
this.floorFilterWidget = undefined;
|
@@ -100,6 +108,7 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
100
108
|
* @protected
|
101
109
|
*/
|
102
110
|
_initContainer() {
|
111
|
+
console.log("_initContainer");
|
103
112
|
this._destroyWidget();
|
104
113
|
this._floorFilterElement = document.createElement("div");
|
105
114
|
}
|
@@ -107,11 +116,18 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
107
116
|
* Initialize the floor filter or reset the current view if it already exists
|
108
117
|
*/
|
109
118
|
async _initFloorFilter(view) {
|
119
|
+
console.log("_initFloorFilter");
|
110
120
|
const webMap = view === null || view === void 0 ? void 0 : view.map;
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
121
|
+
await webMap.when(() => {
|
122
|
+
var _a, _b, _c;
|
123
|
+
console.log("webMap.when");
|
124
|
+
console.log("_initFloorFilter");
|
125
|
+
console.log(`view: ${view}`);
|
126
|
+
console.log(`this.enabled: ${this.enabled}`);
|
127
|
+
console.log(`this.FloorFilter: ${this.FloorFilter}`);
|
128
|
+
console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
|
129
|
+
if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
|
130
|
+
this._initContainer();
|
115
131
|
this.floorFilterWidget = new this.FloorFilter({
|
116
132
|
container: this._floorFilterElement,
|
117
133
|
view
|
@@ -128,8 +144,8 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
128
144
|
this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
|
129
145
|
this.siteChanged.emit(site);
|
130
146
|
});
|
131
|
-
}
|
132
|
-
}
|
147
|
+
}
|
148
|
+
});
|
133
149
|
}
|
134
150
|
get el() { return this; }
|
135
151
|
static get watchers() { return {
|
@@ -103,6 +103,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
103
103
|
this.enableInlineEdit = undefined;
|
104
104
|
this.enableShare = undefined;
|
105
105
|
this.isMobile = undefined;
|
106
|
+
this.mapHidden = undefined;
|
106
107
|
this.mapInfo = undefined;
|
107
108
|
this.mapView = undefined;
|
108
109
|
this.onlyShowUpdatableLayers = undefined;
|
@@ -186,6 +187,15 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
186
187
|
}
|
187
188
|
});
|
188
189
|
}
|
190
|
+
/**
|
191
|
+
* Reset the toolInfos when mapHidden prop changes so we can show/hide any map dependant tool(s)
|
192
|
+
*/
|
193
|
+
mapHiddenWatchHandler() {
|
194
|
+
var _a;
|
195
|
+
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
196
|
+
this._initToolInfos();
|
197
|
+
}
|
198
|
+
}
|
189
199
|
/**
|
190
200
|
* When isMobile is false we need to init the tool infos for the dynamic toolbar
|
191
201
|
*/
|
@@ -349,7 +359,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
349
359
|
const selected = this.selectedIds.length.toString();
|
350
360
|
const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
|
351
361
|
this._validateActiveActions();
|
352
|
-
return (h(Host, { key: '
|
362
|
+
return (h(Host, { key: '9692c6f764d078c22e1d6271deb3844ef65b1fca' }, h("calcite-shell", { key: 'a37b9fcfdd8450fea4a994738bf833c331bb168a' }, this._getTableControlRow("header"), h("div", { key: 'e0e82e0bb5441286d5cd3bdda3c55d77515fbcb0', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: '4890c168eba3db34a291121f633c0d69ab8a1517', class: "height-full width-full" }, h("calcite-loader", { key: '19f85ec47a03731fe4c9ebb13d91cad66a8637fa', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '53d1c8bce2e2d464a141fabfcf13ee41aaf02168', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
|
353
363
|
.replace("{{total}}", total)
|
354
364
|
.replace("{{selected}}", selected))) : undefined)), this._filterModal()));
|
355
365
|
}
|
@@ -512,7 +522,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
512
522
|
const featuresEmpty = this._featuresEmpty();
|
513
523
|
const hasFilterExpressions = this._hasFilterExpressions();
|
514
524
|
if (this._translations) {
|
515
|
-
this._toolInfos = [
|
525
|
+
this._toolInfos = [
|
526
|
+
!this.mapHidden ? {
|
516
527
|
active: false,
|
517
528
|
icon: "zoom-to-object",
|
518
529
|
indicator: false,
|
@@ -520,7 +531,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
520
531
|
func: () => this._zoom(),
|
521
532
|
disabled: !featuresSelected,
|
522
533
|
isOverflow: false
|
523
|
-
},
|
534
|
+
} : undefined,
|
524
535
|
hasFilterExpressions ? {
|
525
536
|
active: false,
|
526
537
|
icon: "filter",
|
@@ -598,7 +609,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
598
609
|
disabled: false,
|
599
610
|
isOverflow: false,
|
600
611
|
isSublist: true
|
601
|
-
}
|
612
|
+
}
|
613
|
+
];
|
602
614
|
this._defaultVisibleToolSizeInfos = undefined;
|
603
615
|
}
|
604
616
|
}
|
@@ -1539,6 +1551,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1539
1551
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1540
1552
|
"enableShare": ["enableShareWatchHandler"],
|
1541
1553
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1554
|
+
"mapHidden": ["mapHiddenWatchHandler"],
|
1542
1555
|
"isMobile": ["isMobileWatchHandler"],
|
1543
1556
|
"mapInfo": ["mapInfoWatchHandler"],
|
1544
1557
|
"mapView": ["mapViewWatchHandler"],
|
@@ -1556,6 +1569,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1556
1569
|
"enableInlineEdit": [4, "enable-inline-edit"],
|
1557
1570
|
"enableShare": [4, "enable-share"],
|
1558
1571
|
"isMobile": [4, "is-mobile"],
|
1572
|
+
"mapHidden": [4, "map-hidden"],
|
1559
1573
|
"mapInfo": [16],
|
1560
1574
|
"mapView": [16],
|
1561
1575
|
"onlyShowUpdatableLayers": [4, "only-show-updatable-layers"],
|
@@ -1584,6 +1598,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1584
1598
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1585
1599
|
"enableShare": ["enableShareWatchHandler"],
|
1586
1600
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1601
|
+
"mapHidden": ["mapHiddenWatchHandler"],
|
1587
1602
|
"isMobile": ["isMobileWatchHandler"],
|
1588
1603
|
"mapInfo": ["mapInfoWatchHandler"],
|
1589
1604
|
"mapView": ["mapViewWatchHandler"],
|
@@ -136,12 +136,17 @@ const FloorFilter = class {
|
|
136
136
|
* Watch for changes to the mapView and re-init the floor filter
|
137
137
|
*/
|
138
138
|
async mapViewWatchHandler() {
|
139
|
+
console.log("mapViewWatchHandler");
|
140
|
+
console.log(`this.mapView: ${this.mapView}`);
|
139
141
|
await this._initFloorFilter(this.mapView);
|
140
142
|
}
|
141
143
|
/**
|
142
144
|
* Watch for changes to the enabled property and re-init or destroy the floor filter
|
143
145
|
*/
|
144
146
|
async enabledWatchHandler() {
|
147
|
+
console.log("enabledWatchHandler");
|
148
|
+
console.log(`this.enabled: ${this.enabled}`);
|
149
|
+
console.log(`this.mapView: ${this.mapView}`);
|
145
150
|
if (this.enabled) {
|
146
151
|
await this._initFloorFilter(this.mapView);
|
147
152
|
}
|
@@ -164,7 +169,9 @@ const FloorFilter = class {
|
|
164
169
|
* Renders the component.
|
165
170
|
*/
|
166
171
|
render() {
|
167
|
-
|
172
|
+
console.log("render");
|
173
|
+
console.log(`this._floorFilterElement: ${this._floorFilterElement}`);
|
174
|
+
return (h(Host, { key: '01b71c71af2a183b85c8620c338512fd338f19ef' }, h("div", { key: '752d397c6e3b6a2257d0a8a05051ed821eca4b94', ref: (el) => { this._floorFilterElement = el; } })));
|
168
175
|
}
|
169
176
|
//--------------------------------------------------------------------------
|
170
177
|
//
|
@@ -192,6 +199,7 @@ const FloorFilter = class {
|
|
192
199
|
* @protected
|
193
200
|
*/
|
194
201
|
_destroyWidget() {
|
202
|
+
console.log("_destroyWidget");
|
195
203
|
if (this.floorFilterWidget) {
|
196
204
|
this.floorFilterWidget.destroy();
|
197
205
|
this.floorFilterWidget = undefined;
|
@@ -206,6 +214,7 @@ const FloorFilter = class {
|
|
206
214
|
* @protected
|
207
215
|
*/
|
208
216
|
_initContainer() {
|
217
|
+
console.log("_initContainer");
|
209
218
|
this._destroyWidget();
|
210
219
|
this._floorFilterElement = document.createElement("div");
|
211
220
|
}
|
@@ -213,11 +222,18 @@ const FloorFilter = class {
|
|
213
222
|
* Initialize the floor filter or reset the current view if it already exists
|
214
223
|
*/
|
215
224
|
async _initFloorFilter(view) {
|
225
|
+
console.log("_initFloorFilter");
|
216
226
|
const webMap = view === null || view === void 0 ? void 0 : view.map;
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
227
|
+
await webMap.when(() => {
|
228
|
+
var _a, _b, _c;
|
229
|
+
console.log("webMap.when");
|
230
|
+
console.log("_initFloorFilter");
|
231
|
+
console.log(`view: ${view}`);
|
232
|
+
console.log(`this.enabled: ${this.enabled}`);
|
233
|
+
console.log(`this.FloorFilter: ${this.FloorFilter}`);
|
234
|
+
console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
|
235
|
+
if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
|
236
|
+
this._initContainer();
|
221
237
|
this.floorFilterWidget = new this.FloorFilter({
|
222
238
|
container: this._floorFilterElement,
|
223
239
|
view
|
@@ -234,8 +250,8 @@ const FloorFilter = class {
|
|
234
250
|
this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
|
235
251
|
this.siteChanged.emit(site);
|
236
252
|
});
|
237
|
-
}
|
238
|
-
}
|
253
|
+
}
|
254
|
+
});
|
239
255
|
}
|
240
256
|
get el() { return getElement(this); }
|
241
257
|
static get watchers() { return {
|
@@ -155,6 +155,7 @@ const LayerTable = class {
|
|
155
155
|
this.enableInlineEdit = undefined;
|
156
156
|
this.enableShare = undefined;
|
157
157
|
this.isMobile = undefined;
|
158
|
+
this.mapHidden = undefined;
|
158
159
|
this.mapInfo = undefined;
|
159
160
|
this.mapView = undefined;
|
160
161
|
this.onlyShowUpdatableLayers = undefined;
|
@@ -238,6 +239,15 @@ const LayerTable = class {
|
|
238
239
|
}
|
239
240
|
});
|
240
241
|
}
|
242
|
+
/**
|
243
|
+
* Reset the toolInfos when mapHidden prop changes so we can show/hide any map dependant tool(s)
|
244
|
+
*/
|
245
|
+
mapHiddenWatchHandler() {
|
246
|
+
var _a;
|
247
|
+
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
248
|
+
this._initToolInfos();
|
249
|
+
}
|
250
|
+
}
|
241
251
|
/**
|
242
252
|
* When isMobile is false we need to init the tool infos for the dynamic toolbar
|
243
253
|
*/
|
@@ -401,7 +411,7 @@ const LayerTable = class {
|
|
401
411
|
const selected = this.selectedIds.length.toString();
|
402
412
|
const tableHeightClass = this.isMobile ? "height-full" : "height-full-adjusted";
|
403
413
|
this._validateActiveActions();
|
404
|
-
return (h(Host, { key: '
|
414
|
+
return (h(Host, { key: '9692c6f764d078c22e1d6271deb3844ef65b1fca' }, h("calcite-shell", { key: 'a37b9fcfdd8450fea4a994738bf833c331bb168a' }, this._getTableControlRow("header"), h("div", { key: 'e0e82e0bb5441286d5cd3bdda3c55d77515fbcb0', class: `width-full ${tableHeightClass}` }, h("calcite-panel", { key: '4890c168eba3db34a291121f633c0d69ab8a1517', class: "height-full width-full" }, h("calcite-loader", { key: '19f85ec47a03731fe4c9ebb13d91cad66a8637fa', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { key: '53d1c8bce2e2d464a141fabfcf13ee41aaf02168', class: tableNodeClass, ref: this.onTableNodeCreate })), !this.isMobile ? (h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
|
405
415
|
.replace("{{total}}", total)
|
406
416
|
.replace("{{selected}}", selected))) : undefined)), this._filterModal()));
|
407
417
|
}
|
@@ -564,7 +574,8 @@ const LayerTable = class {
|
|
564
574
|
const featuresEmpty = this._featuresEmpty();
|
565
575
|
const hasFilterExpressions = this._hasFilterExpressions();
|
566
576
|
if (this._translations) {
|
567
|
-
this._toolInfos = [
|
577
|
+
this._toolInfos = [
|
578
|
+
!this.mapHidden ? {
|
568
579
|
active: false,
|
569
580
|
icon: "zoom-to-object",
|
570
581
|
indicator: false,
|
@@ -572,7 +583,7 @@ const LayerTable = class {
|
|
572
583
|
func: () => this._zoom(),
|
573
584
|
disabled: !featuresSelected,
|
574
585
|
isOverflow: false
|
575
|
-
},
|
586
|
+
} : undefined,
|
576
587
|
hasFilterExpressions ? {
|
577
588
|
active: false,
|
578
589
|
icon: "filter",
|
@@ -650,7 +661,8 @@ const LayerTable = class {
|
|
650
661
|
disabled: false,
|
651
662
|
isOverflow: false,
|
652
663
|
isSublist: true
|
653
|
-
}
|
664
|
+
}
|
665
|
+
];
|
654
666
|
this._defaultVisibleToolSizeInfos = undefined;
|
655
667
|
}
|
656
668
|
}
|
@@ -1591,6 +1603,7 @@ const LayerTable = class {
|
|
1591
1603
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1592
1604
|
"enableShare": ["enableShareWatchHandler"],
|
1593
1605
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1606
|
+
"mapHidden": ["mapHiddenWatchHandler"],
|
1594
1607
|
"isMobile": ["isMobileWatchHandler"],
|
1595
1608
|
"mapInfo": ["mapInfoWatchHandler"],
|
1596
1609
|
"mapView": ["mapViewWatchHandler"],
|
@@ -204,7 +204,9 @@ const CrowdsourceManager = class {
|
|
204
204
|
async componentDidRender() {
|
205
205
|
if (this._shouldSetMapView) {
|
206
206
|
this._shouldSetMapView = false;
|
207
|
-
|
207
|
+
if (this._mapChange) {
|
208
|
+
await this._setMapView();
|
209
|
+
}
|
208
210
|
}
|
209
211
|
}
|
210
212
|
/**
|
@@ -424,7 +426,7 @@ const CrowdsourceManager = class {
|
|
424
426
|
((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
|
425
427
|
const defaultOid = !this.defaultOid ? undefined :
|
426
428
|
((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
427
|
-
return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
|
429
|
+
return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapHidden: this._expandPopup, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
|
428
430
|
}
|
429
431
|
/**
|
430
432
|
* Update the component layout when its size changes
|