@esri/solutions-components 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/dist/assets/t9n/crowdsource-reporter/resources.json +3 -1
  2. package/dist/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
  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 +46 -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 +1 -1
  11. package/dist/cjs/crowdsource-reporter.cjs.entry.js +122 -21
  12. package/dist/cjs/{downloadUtils-8b05d7cc.js → downloadUtils-dc349b1a.js} +2 -2
  13. package/dist/cjs/{index.es-e7587227.js → index.es-1830a1e6.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-9dc05308.js} +11 -5
  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-reporter/crowdsource-reporter.css +16 -0
  22. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +155 -35
  23. package/dist/collection/components/feature-details/feature-details.css +18 -0
  24. package/dist/collection/components/feature-details/feature-details.js +500 -0
  25. package/dist/collection/components/feature-details/test/feature-details.e2e.js +14 -0
  26. package/dist/collection/components/feature-details/test/feature-details.spec.js +22 -0
  27. package/dist/collection/components/feature-list/feature-list.js +14 -1
  28. package/dist/collection/components/info-card/info-card.css +15 -5
  29. package/dist/collection/components/info-card/info-card.js +178 -5
  30. package/dist/collection/components/layer-table/layer-table.js +2 -2
  31. package/dist/collection/components/map-card/map-card.js +1 -1
  32. package/dist/collection/components/map-select-tools/map-select-tools.js +5 -5
  33. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  34. package/dist/collection/demos/crowdsource-reporter.html +115 -1
  35. package/dist/collection/utils/mapViewUtils.js +11 -5
  36. package/dist/collection/utils/mapViewUtils.ts +13 -5
  37. package/dist/components/create-feature2.js +4 -0
  38. package/dist/components/crowdsource-reporter.js +270 -81
  39. package/dist/components/feature-details.d.ts +11 -0
  40. package/dist/components/feature-details.js +11 -0
  41. package/dist/components/feature-details2.js +449 -0
  42. package/dist/components/feature-list2.js +14 -1
  43. package/dist/components/info-card2.js +53 -5
  44. package/dist/components/layer-table2.js +2 -2
  45. package/dist/components/map-card2.js +1 -1
  46. package/dist/components/map-select-tools2.js +5 -5
  47. package/dist/components/mapViewUtils.js +11 -5
  48. package/dist/components/refine-selection2.js +1 -1
  49. package/dist/esm/{calcite-action-menu_2.entry.js → calcite-action-menu_3.entry.js} +118 -12
  50. package/dist/esm/calcite-alert_4.entry.js +46 -5
  51. package/dist/esm/{calcite-input-date-picker_3.entry.js → calcite-block_5.entry.js} +688 -12
  52. package/dist/esm/{calcite-combobox_5.entry.js → calcite-combobox_3.entry.js} +878 -844
  53. package/dist/esm/calcite-date-picker-day_3.entry.js +1 -1
  54. package/dist/esm/calcite-dropdown_4.entry.js +1016 -0
  55. package/dist/esm/{calcite-flow_5.entry.js → calcite-flow_6.entry.js} +327 -3
  56. package/dist/esm/card-manager_3.entry.js +5 -5
  57. package/dist/esm/crowdsource-manager.entry.js +1 -1
  58. package/dist/esm/crowdsource-reporter.entry.js +122 -21
  59. package/dist/esm/{date-5630530d.js → date-0c026a8b.js} +1 -1
  60. package/dist/esm/{downloadUtils-0c1e4d7b.js → downloadUtils-df4f21f6.js} +2 -2
  61. package/dist/esm/{index.es-286e3cfa.js → index.es-904fb846.js} +2 -2
  62. package/dist/esm/loader.js +1 -1
  63. package/dist/esm/map-select-tools_3.entry.js +8 -8
  64. package/dist/esm/{mapViewUtils-253178f1.js → mapViewUtils-2ec19fb0.js} +11 -5
  65. package/dist/esm/public-notification.entry.js +2 -2
  66. package/dist/esm/solutions-components.js +1 -1
  67. package/dist/solutions-components/demos/crowdsource-reporter.html +115 -1
  68. package/dist/solutions-components/{p-813fd8a4.entry.js → p-29f518fd.entry.js} +2 -2
  69. package/dist/solutions-components/{p-13ca3b00.entry.js → p-452fd697.entry.js} +1 -1
  70. package/dist/solutions-components/p-511b1c91.entry.js +23 -0
  71. package/dist/solutions-components/p-577efb16.js +36 -0
  72. package/dist/solutions-components/{p-94de9279.js → p-5817d78c.js} +1 -1
  73. package/dist/solutions-components/p-602cd811.entry.js +17 -0
  74. package/dist/solutions-components/{p-15f9624a.entry.js → p-6557b703.entry.js} +1 -1
  75. package/dist/solutions-components/p-7269c49b.entry.js +6 -0
  76. package/dist/solutions-components/p-760bd17e.entry.js +6 -0
  77. package/dist/solutions-components/p-95fea07a.entry.js +17 -0
  78. package/dist/solutions-components/{p-212b02e7.js → p-ae4d86e8.js} +1 -1
  79. package/dist/solutions-components/{p-038fcd93.entry.js → p-c273ab7a.entry.js} +1 -1
  80. package/dist/solutions-components/p-d742b915.entry.js +29 -0
  81. package/dist/solutions-components/p-dfad61a8.entry.js +24 -0
  82. package/dist/solutions-components/{p-331b5d1e.js → p-fca434c8.js} +2 -2
  83. package/dist/solutions-components/p-fd82a00f.entry.js +6 -0
  84. package/dist/solutions-components/solutions-components.esm.js +1 -1
  85. package/dist/solutions-components/utils/mapViewUtils.ts +13 -5
  86. package/dist/types/components/create-feature/create-feature.d.ts +4 -4
  87. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +91 -10
  88. package/dist/types/components/feature-details/feature-details.d.ts +151 -0
  89. package/dist/types/components/feature-list/feature-list.d.ts +6 -0
  90. package/dist/types/components/info-card/info-card.d.ts +33 -1
  91. package/dist/types/components.d.ts +129 -12
  92. package/dist/types/preact.d.ts +6 -1
  93. package/dist/types/utils/mapViewUtils.d.ts +5 -3
  94. package/package.json +1 -1
  95. package/dist/cjs/calcite-block_2.cjs.entry.js +0 -652
  96. package/dist/cjs/calcite-graph_2.cjs.entry.js +0 -1055
  97. package/dist/cjs/calcite-scrim.cjs.entry.js +0 -125
  98. package/dist/cjs/utils-7bc7f595.js +0 -64
  99. package/dist/esm/calcite-block_2.entry.js +0 -647
  100. package/dist/esm/calcite-graph_2.entry.js +0 -1050
  101. package/dist/esm/calcite-scrim.entry.js +0 -121
  102. package/dist/esm/utils-9fb4104a.js +0 -61
  103. package/dist/solutions-components/p-04c37d69.entry.js +0 -17
  104. package/dist/solutions-components/p-0b92e4b1.entry.js +0 -11
  105. package/dist/solutions-components/p-238d3b5f.entry.js +0 -6
  106. package/dist/solutions-components/p-3af79063.js +0 -36
  107. package/dist/solutions-components/p-80b11ec1.entry.js +0 -17
  108. package/dist/solutions-components/p-a3a11749.entry.js +0 -6
  109. package/dist/solutions-components/p-aec06ce4.entry.js +0 -18
  110. package/dist/solutions-components/p-bfdf89c2.js +0 -11
  111. package/dist/solutions-components/p-c4ff3b52.entry.js +0 -17
  112. package/dist/solutions-components/p-ced067bd.entry.js +0 -17
  113. package/dist/solutions-components/p-d136eab0.entry.js +0 -23
  114. package/dist/solutions-components/p-e0446d5b.entry.js +0 -6
@@ -9,10 +9,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-105cf2b9.js');
11
11
  const locale = require('./locale-3d0a4bc2.js');
12
- const mapViewUtils = require('./mapViewUtils-3e0fa457.js');
12
+ const mapViewUtils = require('./mapViewUtils-9dc05308.js');
13
13
  const interfaces = require('./interfaces-7cd0a48a.js');
14
14
  const publicNotificationStore = require('./publicNotificationStore-e790601d.js');
15
- const downloadUtils = require('./downloadUtils-8b05d7cc.js');
15
+ const downloadUtils = require('./downloadUtils-dc349b1a.js');
16
16
  require('./esri-loader-ce6c3d3d.js');
17
17
  require('./_commonjsHelpers-480c2e77.js');
18
18
  require('./index-ae65e42f.js');
@@ -190,7 +190,7 @@ const MapSelectTools = class {
190
190
  * Renders the component.
191
191
  */
192
192
  render() {
193
- return (index.h(index.Host, null, this._getMapLayerPicker(), index.h("div", { class: "border-bottom" }), index.h("div", { class: "padding-top-sides-1" }, index.h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } }), index.h("div", { class: "padding-top-1" }, index.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()), index.h("div", { class: "border-bottom" }), this._getNameInput()));
193
+ return (index.h(index.Host, null, this._getMapLayerPicker(), index.h("div", { class: "border-bottom" }), index.h("div", { class: "padding-top-sides-1" }, index.h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } }), index.h("div", { class: "padding-top-1" }, index.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()), index.h("div", { class: "border-bottom" }), this._getNameInput()));
194
194
  }
195
195
  /**
196
196
  * Renders the buffer tools component.
@@ -199,7 +199,7 @@ const MapSelectTools = class {
199
199
  var _a, _b;
200
200
  const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
201
201
  const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
202
- return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.searchDistance, index.h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "search-distance-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), index.h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), index.h("div", { class: showBufferToolsClass }, index.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 }))));
202
+ return (index.h("div", null, index.h("div", { class: "padding-top-1 display-flex" }, index.h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, index.h("div", { class: "tooltip-container" }, this._translations.searchDistance, index.h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "search-distance-icon", scale: "s" }))), index.h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, index.h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), index.h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), index.h("div", { class: showBufferToolsClass }, index.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 }))));
203
203
  }
204
204
  /**
205
205
  * Renders the map layer picker component.
@@ -235,7 +235,7 @@ const MapSelectTools = class {
235
235
  * @protected
236
236
  */
237
237
  _getMapLayerPicker() {
238
- return (index.h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, index.h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, index.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 }))));
238
+ return (index.h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, index.h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, index.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 }))));
239
239
  }
240
240
  //--------------------------------------------------------------------------
241
241
  //
@@ -307,7 +307,7 @@ const MapSelectTools = class {
307
307
  });
308
308
  this._selectionLabel = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.label;
309
309
  if (!this._useLayerFeaturesEnabled) {
310
- (_d = this._drawTools) === null || _d === void 0 ? void 0 : _d.updateGraphics();
310
+ await ((_d = this._drawTools) === null || _d === void 0 ? void 0 : _d.updateGraphics());
311
311
  }
312
312
  await mapViewUtils.goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
313
313
  }
@@ -453,7 +453,7 @@ const MapSelectTools = class {
453
453
  }
454
454
  this._workflowType = this._useLayerFeaturesEnabled ? interfaces.EWorkflowType.SELECT : interfaces.EWorkflowType.SKETCH;
455
455
  if (this._workflowType === interfaces.EWorkflowType.SKETCH) {
456
- this._drawTools.updateGraphics();
456
+ await this._drawTools.updateGraphics();
457
457
  }
458
458
  await this._updateLabel();
459
459
  this._clearSearchWidget();
@@ -1410,7 +1410,7 @@ const RefineSelection = class {
1410
1410
  });
1411
1411
  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]; }) : [];
1412
1412
  await this._updateIds(oids, this._selectionMode, this._refineSelectionSet.undoStack, this._refineLayer);
1413
- this._drawTools.clear();
1413
+ void this._drawTools.clear();
1414
1414
  }
1415
1415
  /**
1416
1416
  * Highlight any selected features in the map
@@ -351,12 +351,13 @@ async function getAllLayers(mapView) {
351
351
  * @param layerView the layer view to highlight
352
352
  * @param mapView the map view used if updateExtent is true
353
353
  * @param updateExtent optional (default false) boolean to indicate if we should zoom to the extent
354
+ * @param zoomToScale optional (default 0) zoomScale that individual points will use when zoomed to
354
355
  *
355
356
  * @returns Promise resolving with the highlight handle
356
357
  */
357
- async function highlightFeatures(ids, layerView, mapView, updateExtent = false) {
358
+ async function highlightFeatures(ids, layerView, mapView, updateExtent = false, zoomToScale = 0) {
358
359
  if (updateExtent) {
359
- await goToSelection(ids, layerView, mapView, false);
360
+ await goToSelection(ids, layerView, mapView, false, undefined, zoomToScale);
360
361
  //wait for sometime to load the feature in layerView then only the highlight will work
361
362
  await new Promise(resolve => setTimeout(resolve, 1000));
362
363
  }
@@ -442,13 +443,18 @@ async function flashSelection(ids, layerView, featureEffect) {
442
443
  * @param layerView the layer view that contains the OIDs
443
444
  * @param mapView the map view to show the extent change
444
445
  * @param flashFeatures optional (default true) boolean to indicate if we should flash the features
445
- *
446
+ * @param featureEffect optional (default undefined) feature effect when flashing the features
447
+ * @param zoomToScale optional (default to 0) zoomScale that individual points will use when zoomed to
446
448
  * @returns Promise resolving when the operation is complete
447
449
  *
448
450
  */
449
- async function goToSelection(ids, layerView, mapView, flashFeatures = true, featureEffect = undefined) {
451
+ async function goToSelection(ids, layerView, mapView, flashFeatures = true, featureEffect = undefined, zoomToScale = 0) {
450
452
  const result = await queryExtent(ids, layerView.layer);
451
- await mapView.goTo(result.extent);
453
+ const goToParams = { target: result.extent };
454
+ if (result.count === 1 && layerView.layer.geometryType === 'point' && zoomToScale) {
455
+ goToParams.scale = zoomToScale;
456
+ }
457
+ await mapView.goTo(goToParams);
452
458
  if (flashFeatures) {
453
459
  await flashSelection(ids, layerView, featureEffect);
454
460
  }
@@ -10,9 +10,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  const index = require('./index-105cf2b9.js');
11
11
  const interfaces = require('./interfaces-7cd0a48a.js');
12
12
  const locale = require('./locale-3d0a4bc2.js');
13
- const mapViewUtils = require('./mapViewUtils-3e0fa457.js');
13
+ const mapViewUtils = require('./mapViewUtils-9dc05308.js');
14
14
  const publicNotificationStore = require('./publicNotificationStore-e790601d.js');
15
- const downloadUtils = require('./downloadUtils-8b05d7cc.js');
15
+ const downloadUtils = require('./downloadUtils-dc349b1a.js');
16
16
  require('./esri-loader-ce6c3d3d.js');
17
17
  require('./_commonjsHelpers-480c2e77.js');
18
18
  require('./index-ae65e42f.js');