@esri/solutions-components 0.8.8 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. package/dist/assets/t9n/crowdsource-reporter/resources.json +11 -2
  2. package/dist/assets/t9n/crowdsource-reporter/resources_en.json +11 -2
  3. package/dist/cjs/{calcite-action-menu_2.cjs.entry.js → calcite-action-menu_3.cjs.entry.js} +114 -7
  4. package/dist/cjs/calcite-alert_4.cjs.entry.js +47 -5
  5. package/dist/cjs/{calcite-input-date-picker_3.cjs.entry.js → calcite-block_5.cjs.entry.js} +691 -13
  6. package/dist/cjs/{calcite-combobox_5.cjs.entry.js → calcite-combobox_3.cjs.entry.js} +876 -844
  7. package/dist/cjs/calcite-dropdown_4.cjs.entry.js +1023 -0
  8. package/dist/cjs/{calcite-flow_5.cjs.entry.js → calcite-flow_6.cjs.entry.js} +327 -2
  9. package/dist/cjs/card-manager_3.cjs.entry.js +5 -5
  10. package/dist/cjs/crowdsource-manager.cjs.entry.js +25 -17
  11. package/dist/cjs/crowdsource-reporter.cjs.entry.js +122 -21
  12. package/dist/cjs/{downloadUtils-8b05d7cc.js → downloadUtils-dd787ddf.js} +2 -2
  13. package/dist/cjs/{index.es-e7587227.js → index.es-29fa176d.js} +2 -2
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/map-select-tools_3.cjs.entry.js +8 -8
  16. package/dist/cjs/{mapViewUtils-3e0fa457.js → mapViewUtils-82018df6.js} +12 -6
  17. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  18. package/dist/cjs/solutions-components.cjs.js +1 -1
  19. package/dist/collection/collection-manifest.json +1 -0
  20. package/dist/collection/components/create-feature/create-feature.js +18 -0
  21. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +15 -0
  22. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +48 -16
  23. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +16 -0
  24. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +155 -35
  25. package/dist/collection/components/feature-details/feature-details.css +18 -0
  26. package/dist/collection/components/feature-details/feature-details.js +500 -0
  27. package/dist/collection/components/feature-details/test/feature-details.e2e.js +14 -0
  28. package/dist/collection/components/feature-details/test/feature-details.spec.js +22 -0
  29. package/dist/collection/components/feature-list/feature-list.js +14 -1
  30. package/dist/collection/components/info-card/info-card.css +15 -5
  31. package/dist/collection/components/info-card/info-card.js +179 -5
  32. package/dist/collection/components/layer-table/layer-table.js +2 -2
  33. package/dist/collection/components/map-card/map-card.js +1 -1
  34. package/dist/collection/components/map-select-tools/map-select-tools.js +5 -5
  35. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  36. package/dist/collection/demos/crowdsource-manager.html +7 -2
  37. package/dist/collection/demos/crowdsource-reporter.html +115 -1
  38. package/dist/collection/utils/mapViewUtils.js +12 -6
  39. package/dist/collection/utils/mapViewUtils.ts +14 -6
  40. package/dist/components/create-feature2.js +4 -0
  41. package/dist/components/crowdsource-manager.js +26 -18
  42. package/dist/components/crowdsource-reporter.js +270 -81
  43. package/dist/components/feature-details.d.ts +11 -0
  44. package/dist/components/feature-details.js +11 -0
  45. package/dist/components/feature-details2.js +449 -0
  46. package/dist/components/feature-list2.js +14 -1
  47. package/dist/components/info-card2.js +54 -5
  48. package/dist/components/layer-table2.js +2 -2
  49. package/dist/components/map-card2.js +1 -1
  50. package/dist/components/map-select-tools2.js +5 -5
  51. package/dist/components/mapViewUtils.js +12 -6
  52. package/dist/components/refine-selection2.js +1 -1
  53. package/dist/esm/{calcite-action-menu_2.entry.js → calcite-action-menu_3.entry.js} +118 -12
  54. package/dist/esm/calcite-alert_4.entry.js +47 -5
  55. package/dist/esm/{calcite-input-date-picker_3.entry.js → calcite-block_5.entry.js} +688 -12
  56. package/dist/esm/{calcite-combobox_5.entry.js → calcite-combobox_3.entry.js} +878 -844
  57. package/dist/esm/calcite-date-picker-day_3.entry.js +1 -1
  58. package/dist/esm/calcite-dropdown_4.entry.js +1016 -0
  59. package/dist/esm/{calcite-flow_5.entry.js → calcite-flow_6.entry.js} +327 -3
  60. package/dist/esm/card-manager_3.entry.js +5 -5
  61. package/dist/esm/crowdsource-manager.entry.js +26 -18
  62. package/dist/esm/crowdsource-reporter.entry.js +122 -21
  63. package/dist/esm/{date-5630530d.js → date-0c026a8b.js} +1 -1
  64. package/dist/esm/{downloadUtils-0c1e4d7b.js → downloadUtils-25aa808f.js} +2 -2
  65. package/dist/esm/{index.es-286e3cfa.js → index.es-a16c9db4.js} +2 -2
  66. package/dist/esm/loader.js +1 -1
  67. package/dist/esm/map-select-tools_3.entry.js +8 -8
  68. package/dist/esm/{mapViewUtils-253178f1.js → mapViewUtils-c83c03a4.js} +12 -6
  69. package/dist/esm/public-notification.entry.js +2 -2
  70. package/dist/esm/solutions-components.js +1 -1
  71. package/dist/solutions-components/demos/crowdsource-manager.html +7 -2
  72. package/dist/solutions-components/demos/crowdsource-reporter.html +115 -1
  73. package/dist/solutions-components/p-2f687975.entry.js +17 -0
  74. package/dist/solutions-components/{p-813fd8a4.entry.js → p-3e5085ae.entry.js} +2 -2
  75. package/dist/solutions-components/p-40039b84.entry.js +6 -0
  76. package/dist/solutions-components/p-511b1c91.entry.js +23 -0
  77. package/dist/solutions-components/{p-94de9279.js → p-5817d78c.js} +1 -1
  78. package/dist/solutions-components/{p-15f9624a.entry.js → p-58997cc1.entry.js} +1 -1
  79. package/dist/solutions-components/p-82e398cb.entry.js +17 -0
  80. package/dist/solutions-components/p-ae75d7d7.entry.js +6 -0
  81. package/dist/solutions-components/{p-331b5d1e.js → p-b1376c75.js} +2 -2
  82. package/dist/solutions-components/p-b5acfcd8.entry.js +6 -0
  83. package/dist/solutions-components/{p-212b02e7.js → p-bdd77f17.js} +1 -1
  84. package/dist/solutions-components/{p-038fcd93.entry.js → p-c273ab7a.entry.js} +1 -1
  85. package/dist/solutions-components/p-d742b915.entry.js +29 -0
  86. package/dist/solutions-components/p-d9c89479.js +36 -0
  87. package/dist/solutions-components/p-dfad61a8.entry.js +24 -0
  88. package/dist/solutions-components/p-fffc9e08.entry.js +6 -0
  89. package/dist/solutions-components/solutions-components.esm.js +1 -1
  90. package/dist/solutions-components/utils/mapViewUtils.ts +14 -6
  91. package/dist/types/components/create-feature/create-feature.d.ts +4 -4
  92. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +13 -1
  93. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +91 -10
  94. package/dist/types/components/feature-details/feature-details.d.ts +151 -0
  95. package/dist/types/components/feature-list/feature-list.d.ts +6 -0
  96. package/dist/types/components/info-card/info-card.d.ts +33 -1
  97. package/dist/types/components.d.ts +148 -12
  98. package/dist/types/preact.d.ts +9 -2
  99. package/dist/types/utils/mapViewUtils.d.ts +5 -3
  100. package/package.json +1 -1
  101. package/dist/cjs/calcite-block_2.cjs.entry.js +0 -652
  102. package/dist/cjs/calcite-graph_2.cjs.entry.js +0 -1055
  103. package/dist/cjs/calcite-scrim.cjs.entry.js +0 -125
  104. package/dist/cjs/utils-7bc7f595.js +0 -64
  105. package/dist/esm/calcite-block_2.entry.js +0 -647
  106. package/dist/esm/calcite-graph_2.entry.js +0 -1050
  107. package/dist/esm/calcite-scrim.entry.js +0 -121
  108. package/dist/esm/utils-9fb4104a.js +0 -61
  109. package/dist/solutions-components/p-04c37d69.entry.js +0 -17
  110. package/dist/solutions-components/p-0b92e4b1.entry.js +0 -11
  111. package/dist/solutions-components/p-13ca3b00.entry.js +0 -6
  112. package/dist/solutions-components/p-238d3b5f.entry.js +0 -6
  113. package/dist/solutions-components/p-3af79063.js +0 -36
  114. package/dist/solutions-components/p-80b11ec1.entry.js +0 -17
  115. package/dist/solutions-components/p-a3a11749.entry.js +0 -6
  116. package/dist/solutions-components/p-aec06ce4.entry.js +0 -18
  117. package/dist/solutions-components/p-bfdf89c2.js +0 -11
  118. package/dist/solutions-components/p-c4ff3b52.entry.js +0 -17
  119. package/dist/solutions-components/p-ced067bd.entry.js +0 -17
  120. package/dist/solutions-components/p-d136eab0.entry.js +0 -23
  121. package/dist/solutions-components/p-e0446d5b.entry.js +0 -6
@@ -5,10 +5,10 @@
5
5
  */
6
6
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-164d485a.js';
7
7
  import { a as getComponentClosestLanguage, l as loadModules, g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
8
- import { d as goToSelection, h as highlightFeatures, j as queryObjectIds, k as getQueryGeoms, b as getFeatureLayerView, l as queryFeaturesByGeometry, m as getIdSets, n as highlightAllFeatures } from './mapViewUtils-253178f1.js';
8
+ import { d as goToSelection, h as highlightFeatures, j as queryObjectIds, k as getQueryGeoms, b as getFeatureLayerView, l as queryFeaturesByGeometry, m as getIdSets, n as highlightAllFeatures } from './mapViewUtils-c83c03a4.js';
9
9
  import { a as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-586e863c.js';
10
10
  import { s as state } from './publicNotificationStore-223faed2.js';
11
- import { d as downloadCSV, a as downloadPDF } from './downloadUtils-0c1e4d7b.js';
11
+ import { d as downloadCSV, a as downloadPDF } from './downloadUtils-25aa808f.js';
12
12
  import './esri-loader-1b324844.js';
13
13
  import './_commonjsHelpers-0f74c230.js';
14
14
  import './index-477ea182.js';
@@ -186,7 +186,7 @@ const MapSelectTools = class {
186
186
  * Renders the component.
187
187
  */
188
188
  render() {
189
- return (h(Host, null, this._getMapLayerPicker(), h("div", { class: "border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } }), h("div", { class: "padding-top-1" }, h("map-draw-tools", { active: true, editGraphicsEnabled: !this._useLayerFeaturesEnabled, graphics: this._graphics, mapView: this.mapView, onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this._getBufferOptions(), this._getUseLayerFeaturesOptions(), this._getNumSelected()), h("div", { class: "border-bottom" }), this._getNameInput()));
189
+ return (h(Host, null, this._getMapLayerPicker(), h("div", { class: "border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } }), h("div", { class: "padding-top-1" }, h("map-draw-tools", { active: true, editGraphicsEnabled: !this._useLayerFeaturesEnabled, graphics: this._graphics, mapView: this.mapView, onSketchGraphicsChange: (evt) => void this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this._getBufferOptions(), this._getUseLayerFeaturesOptions(), this._getNumSelected()), h("div", { class: "border-bottom" }), this._getNameInput()));
190
190
  }
191
191
  /**
192
192
  * Renders the buffer tools component.
@@ -195,7 +195,7 @@ const MapSelectTools = class {
195
195
  var _a, _b;
196
196
  const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
197
197
  const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
198
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
198
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
199
199
  }
200
200
  /**
201
201
  * Renders the map layer picker component.
@@ -231,7 +231,7 @@ const MapSelectTools = class {
231
231
  * @protected
232
232
  */
233
233
  _getMapLayerPicker() {
234
- return (h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => this._inputLayerSelectionChange(evt), selectedIds: this.selectLayerView ? [this.selectLayerView.layer.id] : this.selectionSet ? [this.selectionSet.layerView.layer.id] : [], showTables: false }))));
234
+ return (h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => void this._inputLayerSelectionChange(evt), selectedIds: this.selectLayerView ? [this.selectLayerView.layer.id] : this.selectionSet ? [this.selectionSet.layerView.layer.id] : [], showTables: false }))));
235
235
  }
236
236
  //--------------------------------------------------------------------------
237
237
  //
@@ -303,7 +303,7 @@ const MapSelectTools = class {
303
303
  });
304
304
  this._selectionLabel = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.label;
305
305
  if (!this._useLayerFeaturesEnabled) {
306
- (_d = this._drawTools) === null || _d === void 0 ? void 0 : _d.updateGraphics();
306
+ await ((_d = this._drawTools) === null || _d === void 0 ? void 0 : _d.updateGraphics());
307
307
  }
308
308
  await goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
309
309
  }
@@ -449,7 +449,7 @@ const MapSelectTools = class {
449
449
  }
450
450
  this._workflowType = this._useLayerFeaturesEnabled ? EWorkflowType.SELECT : EWorkflowType.SKETCH;
451
451
  if (this._workflowType === EWorkflowType.SKETCH) {
452
- this._drawTools.updateGraphics();
452
+ await this._drawTools.updateGraphics();
453
453
  }
454
454
  await this._updateLabel();
455
455
  this._clearSearchWidget();
@@ -1406,7 +1406,7 @@ const RefineSelection = class {
1406
1406
  });
1407
1407
  const oids = Array.isArray(graphics) ? graphics.map(g => { var _a; return g.attributes[(_a = g === null || g === void 0 ? void 0 : g.layer) === null || _a === void 0 ? void 0 : _a.objectIdField]; }) : [];
1408
1408
  await this._updateIds(oids, this._selectionMode, this._refineSelectionSet.undoStack, this._refineLayer);
1409
- this._drawTools.clear();
1409
+ void this._drawTools.clear();
1410
1410
  }
1411
1411
  /**
1412
1412
  * Highlight any selected features in the map
@@ -228,7 +228,7 @@ async function getMapLayerHash(mapView, onlyShowUpdatableLayers) {
228
228
  let layerHash;
229
229
  await mapView.when(() => {
230
230
  layerHash = mapView.map.allLayers.toArray().reduce((prev, cur) => {
231
- if (cur.type === "feature") {
231
+ if (cur.type === "feature" || (cur === null || cur === void 0 ? void 0 : cur.type) === "subtype-group") {
232
232
  prev[cur.id] = {
233
233
  name: cur.title,
234
234
  supportsUpdate: undefined
@@ -349,12 +349,13 @@ async function getAllLayers(mapView) {
349
349
  * @param layerView the layer view to highlight
350
350
  * @param mapView the map view used if updateExtent is true
351
351
  * @param updateExtent optional (default false) boolean to indicate if we should zoom to the extent
352
+ * @param zoomToScale optional (default 0) zoomScale that individual points will use when zoomed to
352
353
  *
353
354
  * @returns Promise resolving with the highlight handle
354
355
  */
355
- async function highlightFeatures(ids, layerView, mapView, updateExtent = false) {
356
+ async function highlightFeatures(ids, layerView, mapView, updateExtent = false, zoomToScale = 0) {
356
357
  if (updateExtent) {
357
- await goToSelection(ids, layerView, mapView, false);
358
+ await goToSelection(ids, layerView, mapView, false, undefined, zoomToScale);
358
359
  //wait for sometime to load the feature in layerView then only the highlight will work
359
360
  await new Promise(resolve => setTimeout(resolve, 1000));
360
361
  }
@@ -440,13 +441,18 @@ async function flashSelection(ids, layerView, featureEffect) {
440
441
  * @param layerView the layer view that contains the OIDs
441
442
  * @param mapView the map view to show the extent change
442
443
  * @param flashFeatures optional (default true) boolean to indicate if we should flash the features
443
- *
444
+ * @param featureEffect optional (default undefined) feature effect when flashing the features
445
+ * @param zoomToScale optional (default to 0) zoomScale that individual points will use when zoomed to
444
446
  * @returns Promise resolving when the operation is complete
445
447
  *
446
448
  */
447
- async function goToSelection(ids, layerView, mapView, flashFeatures = true, featureEffect = undefined) {
449
+ async function goToSelection(ids, layerView, mapView, flashFeatures = true, featureEffect = undefined, zoomToScale = 0) {
448
450
  const result = await queryExtent(ids, layerView.layer);
449
- await mapView.goTo(result.extent);
451
+ const goToParams = { target: result.extent };
452
+ if (result.count === 1 && layerView.layer.geometryType === 'point' && zoomToScale) {
453
+ goToParams.scale = zoomToScale;
454
+ }
455
+ await mapView.goTo(goToParams);
450
456
  if (flashFeatures) {
451
457
  await flashSelection(ids, layerView, featureEffect);
452
458
  }
@@ -6,9 +6,9 @@
6
6
  import { r as registerInstance, c as createEvent, a as getAssetPath, h, H as Host, g as getElement } from './index-164d485a.js';
7
7
  import { b as EExportType, c as EPageType, a as EWorkflowType } from './interfaces-586e863c.js';
8
8
  import { l as loadModules, g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
9
- import { d as goToSelection, h as highlightFeatures } from './mapViewUtils-253178f1.js';
9
+ import { d as goToSelection, h as highlightFeatures } from './mapViewUtils-c83c03a4.js';
10
10
  import { s as state } from './publicNotificationStore-223faed2.js';
11
- import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-0c1e4d7b.js';
11
+ import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-25aa808f.js';
12
12
  import './esri-loader-1b324844.js';
13
13
  import './_commonjsHelpers-0f74c230.js';
14
14
  import './index-477ea182.js';