@esri/solutions-components 0.7.4 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/dist/assets/t9n/map-tools/resources.json +2 -2
  2. package/dist/assets/t9n/map-tools/resources_en.json +2 -2
  3. package/dist/cjs/basemap-gallery_7.cjs.entry.js +38 -20
  4. package/dist/cjs/calcite-alert_3.cjs.entry.js +17 -13
  5. package/dist/cjs/card-manager_3.cjs.entry.js +11 -9
  6. package/dist/cjs/crowdsource-manager.cjs.entry.js +33 -6
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/solutions-components.cjs.js +1 -1
  9. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +107 -6
  10. package/dist/collection/components/edit-card/edit-card.js +30 -13
  11. package/dist/collection/components/info-card/info-card.js +12 -0
  12. package/dist/collection/components/layer-table/layer-table.css +7 -1
  13. package/dist/collection/components/layer-table/layer-table.js +43 -7
  14. package/dist/collection/components/map-card/map-card.js +1 -1
  15. package/dist/collection/components/map-fullscreen/map-fullscreen.js +33 -17
  16. package/dist/collection/components/map-tools/map-tools.js +22 -3
  17. package/dist/components/crowdsource-manager.js +39 -6
  18. package/dist/components/edit-card2.js +11 -13
  19. package/dist/components/info-card2.js +7 -1
  20. package/dist/components/layer-table2.js +12 -8
  21. package/dist/components/map-card2.js +1 -1
  22. package/dist/components/map-fullscreen2.js +17 -18
  23. package/dist/components/map-tools2.js +22 -3
  24. package/dist/esm/basemap-gallery_7.entry.js +38 -20
  25. package/dist/esm/calcite-alert_3.entry.js +17 -13
  26. package/dist/esm/card-manager_3.entry.js +11 -9
  27. package/dist/esm/crowdsource-manager.entry.js +33 -6
  28. package/dist/esm/loader.js +1 -1
  29. package/dist/esm/solutions-components.js +1 -1
  30. package/dist/solutions-components/{p-3272b303.entry.js → p-14236e25.entry.js} +1 -1
  31. package/dist/solutions-components/p-3c3b48c7.entry.js +6 -0
  32. package/dist/solutions-components/p-4b3ebd24.entry.js +6 -0
  33. package/dist/solutions-components/p-7e9449c5.entry.js +6 -0
  34. package/dist/solutions-components/solutions-components.esm.js +1 -1
  35. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +35 -2
  36. package/dist/types/components/edit-card/edit-card.d.ts +5 -0
  37. package/dist/types/components/info-card/info-card.d.ts +4 -0
  38. package/dist/types/components/layer-table/layer-table.d.ts +9 -1
  39. package/dist/types/components/map-fullscreen/map-fullscreen.d.ts +14 -1
  40. package/dist/types/components/map-tools/map-tools.d.ts +8 -0
  41. package/dist/types/components.d.ts +72 -0
  42. package/dist/types/preact.d.ts +5 -2
  43. package/package.json +1 -1
  44. package/dist/solutions-components/p-089dc6bf.entry.js +0 -6
  45. package/dist/solutions-components/p-dfb33c83.entry.js +0 -6
  46. package/dist/solutions-components/p-ed254530.entry.js +0 -6
@@ -102,7 +102,7 @@ const CardManager = class {
102
102
  };
103
103
  CardManager.style = cardManagerCss;
104
104
 
105
- 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}.height-50-px{height:50px}.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}.share-action{position:absolute;right:0;margin-top:9px;margin-inline-end:4px}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}";
105
+ 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}.height-50-px{height:50px}.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}.share-action{position:absolute;right:0;margin-top:4px;margin-inline-end:4px;margin-bottom:4px}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}.instant-app-share{height:42px !important;display:inline-flex}";
106
106
 
107
107
  const LayerTable = class {
108
108
  constructor(hostRef) {
@@ -148,6 +148,8 @@ const LayerTable = class {
148
148
  this.mapInfo = undefined;
149
149
  this.mapView = undefined;
150
150
  this.onlyShowUpdatableLayers = undefined;
151
+ this.shareIncludeEmbed = undefined;
152
+ this.shareIncludeSocial = undefined;
151
153
  this.showNewestFirst = undefined;
152
154
  this.zoomAndScrollToSelected = undefined;
153
155
  this._confirmDelete = false;
@@ -695,7 +697,7 @@ const LayerTable = class {
695
697
  * @returns VNode The node representing the DOM element that will contain the action
696
698
  */
697
699
  _getShare(icon) {
698
- return (h("div", { class: "share-action", id: this._getId(icon) }, h("instant-apps-social-share", { autoUpdateShareUrl: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", socialMedia: true, view: this.mapView }), this._getToolTip("bottom", icon, this._translations.share)));
700
+ return (h("div", { class: "share-action", id: this._getId(icon) }, h("instant-apps-social-share", { autoUpdateShareUrl: false, class: "instant-app-share", embed: this.shareIncludeEmbed, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", socialMedia: this.shareIncludeSocial, view: this.mapView }), this._getToolTip("bottom", icon, this._translations.share)));
699
701
  }
700
702
  /**
701
703
  * Called each time the values that are used for custom url params change
@@ -814,11 +816,11 @@ const LayerTable = class {
814
816
  * @returns void
815
817
  */
816
818
  async _resetTable() {
817
- var _a, _b;
819
+ var _a;
818
820
  this._clearSelection();
819
821
  this._allIds = [];
820
822
  this.featureSelectionChange.emit(this._selectedIndexes);
821
- 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);
823
+ const columnTemplates = this._getColumnTemplates(this._layer.id, (_a = this._layer) === null || _a === void 0 ? void 0 : _a.fields);
822
824
  this._allIds = await queryAllIds(this._layer);
823
825
  if (!this._table) {
824
826
  await this._getTable(this._tableNode, columnTemplates);
@@ -1149,8 +1151,8 @@ const LayerTable = class {
1149
1151
  if (fieldInfos) {
1150
1152
  columnTemplates = columnTemplates ? columnTemplates.map(columnTemplate => {
1151
1153
  fieldInfos.some(fieldInfo => {
1152
- if (fieldInfo.fieldName === columnTemplate.fieldName) {
1153
- columnTemplate.label = fieldInfo.label;
1154
+ if (fieldInfo.name === columnTemplate.fieldName) {
1155
+ columnTemplate.label = fieldInfo.alias;
1154
1156
  return true;
1155
1157
  }
1156
1158
  });
@@ -1158,8 +1160,8 @@ const LayerTable = class {
1158
1160
  }) : fieldInfos.map(fieldInfo => {
1159
1161
  return {
1160
1162
  type: "field",
1161
- fieldName: fieldInfo.fieldName,
1162
- label: fieldInfo.label
1163
+ fieldName: fieldInfo.name,
1164
+ label: fieldInfo.alias
1163
1165
  };
1164
1166
  });
1165
1167
  }
@@ -1302,7 +1304,7 @@ const MapCard = class {
1302
1304
  this.mapView = new this.MapView({
1303
1305
  container: this._mapDiv,
1304
1306
  map: webMap,
1305
- resizeAlign: "top-left"
1307
+ resizeAlign: "center"
1306
1308
  });
1307
1309
  this._loadedId = id;
1308
1310
  this._searchConfiguration = this._webMapInfo.searchConfiguration;
@@ -20,8 +20,10 @@ const CrowdsourceManager = class {
20
20
  */
21
21
  this._shouldSetMapView = false;
22
22
  this.classicGrid = false;
23
+ this.defaultCenter = "";
23
24
  this.defaultGlobalId = "";
24
25
  this.defaultLayer = "";
26
+ this.defaultLevel = "";
25
27
  this.defaultOid = "";
26
28
  this.defaultWebmap = "";
27
29
  this.enableAutoRefresh = false;
@@ -42,6 +44,8 @@ const CrowdsourceManager = class {
42
44
  this.mapInfos = [];
43
45
  this.onlyShowUpdatableLayers = true;
44
46
  this.searchConfiguration = undefined;
47
+ this.shareIncludeEmbed = undefined;
48
+ this.shareIncludeSocial = undefined;
45
49
  this.theme = "light";
46
50
  this.zoomAndScrollToSelected = false;
47
51
  this._expandPopup = false;
@@ -55,6 +59,13 @@ const CrowdsourceManager = class {
55
59
  // Watch handlers
56
60
  //
57
61
  //--------------------------------------------------------------------------
62
+ /**
63
+ * Watch for center url param to be set
64
+ */
65
+ defaultCenterWatchHandler() {
66
+ this._defaultCenter = !this.defaultCenter ? undefined :
67
+ this.defaultCenter.split(";").map(v => parseFloat(v));
68
+ }
58
69
  /**
59
70
  * Watch for globalid url param to be set
60
71
  */
@@ -69,6 +80,12 @@ const CrowdsourceManager = class {
69
80
  this._defaultOid = !this.defaultOid ? undefined :
70
81
  this.defaultOid.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
71
82
  }
83
+ /**
84
+ * Watch for zoom level param to be set
85
+ */
86
+ defaultLevelWatchHandler() {
87
+ this._defaultLevel = !this.defaultLevel ? undefined : parseInt(this.defaultLevel, 10);
88
+ }
72
89
  /**
73
90
  * When true the map zoom tools will be available
74
91
  */
@@ -96,8 +113,8 @@ const CrowdsourceManager = class {
96
113
  */
97
114
  async mapChanged(evt) {
98
115
  this._mapChange = evt.detail;
99
- await this._mapChange.mapView.when(() => {
100
- this._setMapView();
116
+ await this._mapChange.mapView.when(async () => {
117
+ await this._setMapView();
101
118
  });
102
119
  }
103
120
  /**
@@ -132,10 +149,10 @@ const CrowdsourceManager = class {
132
149
  * Called after each render
133
150
  * Used to delay the setting of the mapView when the popup is expaneded and obstructs the view
134
151
  */
135
- componentDidRender() {
152
+ async componentDidRender() {
136
153
  if (this._shouldSetMapView) {
137
154
  this._shouldSetMapView = false;
138
- this._setMapView();
155
+ await this._setMapView();
139
156
  }
140
157
  }
141
158
  //--------------------------------------------------------------------------
@@ -324,7 +341,7 @@ const CrowdsourceManager = class {
324
341
  this.classicGrid && layoutMode === ELayoutMode.VERTICAL ? "panel-end" :
325
342
  layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
326
343
  const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
327
- return (h("calcite-shell", { class: tableSizeClass + " border-bottom" }, 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))), h("div", { class: "width-full height-full position-relative" }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? this._defaultGlobalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !this.defaultGlobalId ? this._defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, enableZoom: this.enableZoom, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
344
+ return (h("calcite-shell", { class: tableSizeClass + " border-bottom" }, 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))), h("div", { class: "width-full height-full position-relative" }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? this._defaultGlobalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !this.defaultGlobalId ? this._defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, enableZoom: this.enableZoom, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
328
345
  }
329
346
  /**
330
347
  * Open/Close the appropriate panel.
@@ -357,11 +374,19 @@ const CrowdsourceManager = class {
357
374
  *
358
375
  * @protected
359
376
  */
360
- _setMapView() {
377
+ async _setMapView() {
361
378
  this._mapInfo = this._getMapInfo(this._mapChange.id);
362
379
  this._mapView = this._mapChange.mapView;
363
380
  this._initMapZoom();
364
381
  this._mapView.popupEnabled = false;
382
+ if (this._defaultCenter && this._defaultLevel) {
383
+ await this._mapView.goTo({
384
+ center: this._defaultCenter,
385
+ zoom: this._defaultLevel
386
+ });
387
+ this._defaultCenter = undefined;
388
+ this._defaultLevel = undefined;
389
+ }
365
390
  }
366
391
  /**
367
392
  * Add/remove zoom tools based on enableZoom prop
@@ -392,8 +417,10 @@ const CrowdsourceManager = class {
392
417
  }
393
418
  get el() { return getElement(this); }
394
419
  static get watchers() { return {
420
+ "defaultCenter": ["defaultCenterWatchHandler"],
395
421
  "defaultGlobalId": ["defaultGlobalIdWatchHandler"],
396
422
  "defaultOid": ["defaultOidWatchHandler"],
423
+ "defaultLevel": ["defaultLevelWatchHandler"],
397
424
  "enableZoom": ["enableZoomWatchHandler"]
398
425
  }; }
399
426
  };