@esri/solutions-components 0.5.0 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. package/dist/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  2. package/dist/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  3. package/dist/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  4. package/dist/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  5. package/dist/assets/arcgis-pdf-creator/grid.js +1 -1
  6. package/dist/assets/data/images/grid.png +0 -0
  7. package/dist/assets/data/images/horizontal.png +0 -0
  8. package/dist/assets/data/images/vertical.png +0 -0
  9. package/dist/assets/t9n/crowdsource-manager/resources.json +7 -1
  10. package/dist/assets/t9n/crowdsource-manager/resources_en.json +7 -1
  11. package/dist/cjs/buffer-tools_6.cjs.entry.js +88 -92
  12. package/dist/cjs/{calcite-block_2.cjs.entry.js → calcite-action-bar_4.cjs.entry.js} +307 -18
  13. package/dist/cjs/{calcite-action.cjs.entry.js → calcite-action_2.cjs.entry.js} +84 -1
  14. package/dist/cjs/{calcite-combobox_3.cjs.entry.js → calcite-chip_4.cjs.entry.js} +131 -5
  15. package/dist/cjs/{calcite-dropdown-group_4.cjs.entry.js → calcite-dropdown_5.cjs.entry.js} +467 -1
  16. package/dist/cjs/calcite-input-message_5.cjs.entry.js +19 -17
  17. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  18. package/dist/cjs/{calcite-action-bar_2.cjs.entry.js → calcite-tooltip.cjs.entry.js} +2 -208
  19. package/dist/cjs/crowdsource-manager.cjs.entry.js +88 -14
  20. package/dist/cjs/{downloadUtils-415ab342.js → downloadUtils-9359e9ff.js} +135 -44
  21. package/dist/cjs/{index.es-98008aa0.js → index.es-9c0d0ed6.js} +3 -3
  22. package/dist/cjs/{interfaces-17c631bf.js → interfaces-cac36920.js} +6 -0
  23. package/dist/cjs/layer-table_2.cjs.entry.js +512 -0
  24. package/dist/cjs/loader.cjs.js +1 -1
  25. package/dist/cjs/{mapViewUtils-f617ae9a.js → mapViewUtils-090f4d4d.js} +3 -3
  26. package/dist/cjs/public-notification.cjs.entry.js +173 -48
  27. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  28. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  29. package/dist/cjs/{solution-store-b86759b2.js → solution-store-d28c332e.js} +1 -1
  30. package/dist/cjs/solutions-components.cjs.js +1 -1
  31. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator.js +6 -3
  32. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_jsPDF.js +1 -1
  33. package/dist/collection/assets/arcgis-pdf-creator/PDFCreator_pdf_lib.js +1 -1
  34. package/dist/collection/assets/arcgis-pdf-creator/PDFLabels.js +54 -3
  35. package/dist/collection/assets/arcgis-pdf-creator/grid.js +1 -1
  36. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +122 -0
  37. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +130 -14
  38. package/dist/collection/components/layer-table/layer-table.css +2 -70
  39. package/dist/collection/components/layer-table/layer-table.js +66 -106
  40. package/dist/collection/components/map-card/map-card.css +4 -7
  41. package/dist/collection/components/map-card/map-card.js +44 -10
  42. package/dist/collection/components/map-draw-tools/map-draw-tools.js +4 -8
  43. package/dist/collection/components/map-select-tools/map-select-tools.js +75 -15
  44. package/dist/collection/components/public-notification/public-notification.js +217 -25
  45. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +1 -1
  46. package/dist/collection/demos/crowdsource-manager.html +14 -41
  47. package/dist/collection/utils/csvDownload.js +41 -0
  48. package/dist/collection/utils/csvDownload.ts +42 -0
  49. package/dist/collection/utils/csvUtils.js +6 -23
  50. package/dist/collection/utils/csvUtils.ts +8 -27
  51. package/dist/collection/utils/downloadUtils.js +30 -14
  52. package/dist/collection/utils/downloadUtils.ts +36 -14
  53. package/dist/collection/utils/interfaces.js +6 -0
  54. package/dist/collection/utils/interfaces.ts +6 -0
  55. package/dist/collection/utils/pdfUtils.js +9 -6
  56. package/dist/collection/utils/pdfUtils.ts +13 -8
  57. package/dist/collection/utils/queryUtils.js +2 -2
  58. package/dist/collection/utils/queryUtils.ts +2 -2
  59. package/dist/collection/utils/test/csvUtils.spec.tsx +56 -0
  60. package/dist/collection/utils/test/downloadUtils.spec.tsx +133 -0
  61. package/dist/components/crowdsource-manager.js +293 -17
  62. package/dist/components/downloadUtils.js +133 -42
  63. package/dist/components/interfaces3.js +7 -1
  64. package/dist/components/layer-table.js +1 -443
  65. package/dist/components/layer-table2.js +429 -0
  66. package/dist/components/map-card.js +1 -339
  67. package/dist/{esm/map-card.entry.js → components/map-card2.js} +118 -22
  68. package/dist/components/map-draw-tools2.js +19 -23
  69. package/dist/components/map-layer-picker2.js +1 -1
  70. package/dist/components/map-select-tools2.js +21 -16
  71. package/dist/components/public-notification.js +209 -81
  72. package/dist/components/queryUtils.js +2 -2
  73. package/dist/components/refine-selection-tools2.js +3 -3
  74. package/dist/components/refine-selection2.js +1 -1
  75. package/dist/components/solution-resource-item2.js +1 -1
  76. package/dist/components/solution-store.js +1 -1
  77. package/dist/esm/buffer-tools_6.entry.js +79 -83
  78. package/dist/esm/{calcite-block_2.entry.js → calcite-action-bar_4.entry.js} +307 -20
  79. package/dist/esm/{calcite-action.entry.js → calcite-action_2.entry.js} +84 -2
  80. package/dist/esm/{calcite-combobox_3.entry.js → calcite-chip_4.entry.js} +134 -9
  81. package/dist/esm/{calcite-dropdown-group_4.entry.js → calcite-dropdown_5.entry.js} +468 -3
  82. package/dist/esm/calcite-input-message_5.entry.js +19 -17
  83. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  84. package/dist/esm/{calcite-action-bar_2.entry.js → calcite-tooltip.entry.js} +4 -209
  85. package/dist/esm/crowdsource-manager.entry.js +88 -14
  86. package/dist/esm/{downloadUtils-606b0f0e.js → downloadUtils-a8f139c5.js} +135 -44
  87. package/dist/esm/{index.es-c736c805.js → index.es-a75412ff.js} +3 -3
  88. package/dist/esm/{interfaces-d0d83efa.js → interfaces-cd4054e5.js} +7 -1
  89. package/dist/esm/layer-table_2.entry.js +507 -0
  90. package/dist/esm/loader.js +1 -1
  91. package/dist/esm/{mapViewUtils-4e945e07.js → mapViewUtils-8ffcd36d.js} +4 -4
  92. package/dist/esm/public-notification.entry.js +169 -44
  93. package/dist/esm/solution-configuration.entry.js +2 -2
  94. package/dist/esm/solution-contents_3.entry.js +2 -2
  95. package/dist/esm/{solution-store-477288ac.js → solution-store-1b67f2c8.js} +1 -1
  96. package/dist/esm/solutions-components.js +1 -1
  97. package/dist/solutions-components/demos/crowdsource-manager.html +14 -41
  98. package/dist/solutions-components/{p-dd11eeb2.js → p-1395b0ef.js} +1 -1
  99. package/dist/solutions-components/{p-4f5641b4.entry.js → p-1affd711.entry.js} +18 -18
  100. package/dist/solutions-components/p-30de8da1.entry.js +17 -0
  101. package/dist/solutions-components/{p-91cad71e.entry.js → p-439c878d.entry.js} +3 -9
  102. package/dist/solutions-components/{p-72117a18.js → p-765a27f3.js} +1 -1
  103. package/dist/solutions-components/p-813a04c3.entry.js +6 -0
  104. package/dist/solutions-components/{p-9e8a371f.entry.js → p-874b39a7.entry.js} +3 -3
  105. package/dist/solutions-components/p-8cece97f.js +21 -0
  106. package/dist/solutions-components/{p-dd0241fb.entry.js → p-97aa7211.entry.js} +1 -1
  107. package/dist/solutions-components/{p-0e459cc7.entry.js → p-a955a3e6.entry.js} +10 -4
  108. package/dist/solutions-components/{p-6a657ff6.js → p-bb64bd47.js} +25 -9
  109. package/dist/solutions-components/p-c392dd95.entry.js +17 -0
  110. package/dist/solutions-components/p-ca386a72.entry.js +6 -0
  111. package/dist/solutions-components/p-d47d74a6.entry.js +23 -0
  112. package/dist/solutions-components/p-db846ee2.entry.js +11 -0
  113. package/dist/solutions-components/p-dc53c9c1.js +36 -0
  114. package/dist/solutions-components/p-e1c93241.entry.js +6 -0
  115. package/dist/solutions-components/{p-4cbaf0f1.entry.js → p-e6d235d6.entry.js} +1 -1
  116. package/dist/solutions-components/solutions-components.esm.js +6 -6
  117. package/dist/solutions-components/utils/csvDownload.ts +42 -0
  118. package/dist/solutions-components/utils/csvUtils.ts +8 -27
  119. package/dist/solutions-components/utils/downloadUtils.ts +36 -14
  120. package/dist/solutions-components/utils/interfaces.ts +6 -0
  121. package/dist/solutions-components/utils/pdfUtils.ts +13 -8
  122. package/dist/solutions-components/utils/queryUtils.ts +2 -2
  123. package/dist/solutions-components/utils/test/csvUtils.spec.tsx +56 -0
  124. package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +133 -0
  125. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +39 -0
  126. package/dist/types/components/layer-table/layer-table.d.ts +35 -48
  127. package/dist/types/components/map-card/map-card.d.ts +10 -6
  128. package/dist/types/components/map-select-tools/map-select-tools.d.ts +16 -1
  129. package/dist/types/components/public-notification/public-notification.d.ts +86 -4
  130. package/dist/types/components.d.ts +68 -0
  131. package/dist/types/preact.d.ts +2 -1
  132. package/dist/types/utils/csvDownload.d.ts +24 -0
  133. package/dist/types/utils/csvUtils.d.ts +2 -1
  134. package/dist/types/utils/downloadUtils.d.ts +25 -0
  135. package/dist/types/utils/interfaces.d.ts +5 -0
  136. package/dist/types/utils/pdfUtils.d.ts +2 -1
  137. package/package.json +4 -4
  138. package/dist/cjs/calcite-chip.cjs.entry.js +0 -142
  139. package/dist/cjs/calcite-dropdown.cjs.entry.js +0 -481
  140. package/dist/cjs/calcite-handle.cjs.entry.js +0 -99
  141. package/dist/cjs/calcite-loader.cjs.entry.js +0 -95
  142. package/dist/cjs/layer-table.cjs.entry.js +0 -317
  143. package/dist/cjs/map-card.cjs.entry.js +0 -252
  144. package/dist/esm/calcite-chip.entry.js +0 -138
  145. package/dist/esm/calcite-dropdown.entry.js +0 -477
  146. package/dist/esm/calcite-handle.entry.js +0 -95
  147. package/dist/esm/calcite-loader.entry.js +0 -91
  148. package/dist/esm/layer-table.entry.js +0 -313
  149. package/dist/solutions-components/p-11132485.entry.js +0 -11
  150. package/dist/solutions-components/p-15b43c29.entry.js +0 -11
  151. package/dist/solutions-components/p-5034aabc.entry.js +0 -11
  152. package/dist/solutions-components/p-5ee7b022.entry.js +0 -12
  153. package/dist/solutions-components/p-6f012424.entry.js +0 -6
  154. package/dist/solutions-components/p-7fd10eb3.entry.js +0 -11
  155. package/dist/solutions-components/p-84bbaebf.entry.js +0 -6
  156. package/dist/solutions-components/p-88e28de2.js +0 -36
  157. package/dist/solutions-components/p-a57ef371.entry.js +0 -6
  158. package/dist/solutions-components/p-ac76d270.entry.js +0 -17
  159. package/dist/solutions-components/p-dbc9a5a8.js +0 -21
  160. package/dist/solutions-components/p-e162304e.entry.js +0 -6
  161. package/dist/solutions-components/p-f5c70be2.entry.js +0 -6
  162. package/dist/solutions-components/p-f6b17cc6.entry.js +0 -11
@@ -8,11 +8,11 @@ import { s as setRequestedIcon, g as getElementProp, a as getSlotted } from './d
8
8
  import { S as StatusIcons } from './interfaces-4ae145eb.js';
9
9
  import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d09506c4.js';
10
10
  import { l as loadModules } from './loadModules-b299cd43.js';
11
- import { g as goToSelection, h as highlightFeatures, d as queryObjectIds, e as getQueryGeoms } from './mapViewUtils-4e945e07.js';
12
- import { E as EWorkflowType, f as ESelectionMode, g as ERefineMode, c as ESketchType } from './interfaces-d0d83efa.js';
11
+ import { b as goToSelection, h as highlightFeatures, q as queryObjectIds, c as getQueryGeoms } from './mapViewUtils-8ffcd36d.js';
12
+ import { c as EWorkflowType, f as ESelectionMode, g as ERefineMode, b as ESketchType } from './interfaces-cd4054e5.js';
13
13
  import { s as state } from './publicNotificationStore-b9daaee4.js';
14
14
  import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
15
- import { d as downloadCSV, a as downloadPDF } from './downloadUtils-606b0f0e.js';
15
+ import { d as downloadCSV, a as downloadPDF } from './downloadUtils-a8f139c5.js';
16
16
  import { a as getSelectionIds, g as getTotal } from './publicNotificationUtils-5cb5a607.js';
17
17
  import './resources-436ae282.js';
18
18
  import './guid-15fce7c0.js';
@@ -254,13 +254,16 @@ const MapSelectTools = class {
254
254
  this.enabledLayerIds = [];
255
255
  this.defaultBufferDistance = undefined;
256
256
  this.defaultBufferUnit = undefined;
257
- this.geometries = undefined;
257
+ this.geometries = [];
258
258
  this.isUpdate = false;
259
259
  this.mapView = undefined;
260
260
  this.searchConfiguration = undefined;
261
261
  this.selectionSet = undefined;
262
262
  this.selectLayerView = undefined;
263
263
  this.showBufferTools = true;
264
+ this.sketchLineSymbol = undefined;
265
+ this.sketchPointSymbol = undefined;
266
+ this.sketchPolygonSymbol = undefined;
264
267
  this._layerSelectChecked = undefined;
265
268
  this._searchTerm = undefined;
266
269
  this._translations = undefined;
@@ -407,7 +410,7 @@ const MapSelectTools = class {
407
410
  const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
408
411
  const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
409
412
  const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
410
- return (h(Host, null, h("div", { class: "padding-bottom-1" }, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, h("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: EWorkflowType.SEARCH }, this._translations.search), h("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: EWorkflowType.SKETCH }, this._translations.sketch))), h("div", { class: showSearchClass }, h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), h("div", { class: showLayerChoiceClass }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { checked: this._layerSelectChecked, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), h("div", { class: useDrawClass }, h("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), h("div", { class: useSelectClass }, h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerView: this.selectLayerView, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET })), h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h("buffer-tools", { 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 })), h("slot", null)));
413
+ return (h(Host, null, h("div", { class: "padding-bottom-1" }, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, h("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: EWorkflowType.SEARCH }, this._translations.search), h("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: EWorkflowType.SKETCH }, this._translations.sketch))), h("div", { class: showSearchClass }, h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), h("div", { class: showLayerChoiceClass }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { checked: this._layerSelectChecked, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), h("div", { class: useDrawClass }, h("map-draw-tools", { active: true, border: true, mapView: this.mapView, pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), h("div", { class: useSelectClass }, h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerView: this.selectLayerView, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET })), h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h("buffer-tools", { 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 })), h("slot", null)));
411
414
  }
412
415
  //--------------------------------------------------------------------------
413
416
  //
@@ -442,7 +445,7 @@ const MapSelectTools = class {
442
445
  */
443
446
  async _init() {
444
447
  this._initGraphicsLayer();
445
- this._initSelectionSet();
448
+ await this._initSelectionSet();
446
449
  this._initSearchWidget();
447
450
  }
448
451
  /**
@@ -450,7 +453,7 @@ const MapSelectTools = class {
450
453
  *
451
454
  * @protected
452
455
  */
453
- _initSelectionSet() {
456
+ async _initSelectionSet() {
454
457
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
455
458
  if (this.selectionSet) {
456
459
  this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
@@ -465,7 +468,7 @@ const MapSelectTools = class {
465
468
  ];
466
469
  // reset selection label base
467
470
  this._selectionLabel = ((_k = this.selectionSet) === null || _k === void 0 ? void 0 : _k.label) || this._getSelectionBaseLabel();
468
- void goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
471
+ await goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
469
472
  }
470
473
  else {
471
474
  this._workflowType = EWorkflowType.SEARCH;
@@ -572,7 +575,7 @@ const MapSelectTools = class {
572
575
  this._bufferGraphicsLayer = this.mapView.map.layers.getItemAt(bufferIndex);
573
576
  }
574
577
  else {
575
- this._bufferGraphicsLayer = new this.GraphicsLayer({ title });
578
+ this._bufferGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
576
579
  state.managedLayers.push(title);
577
580
  const sketchIndex = this.mapView.map.layers.findIndex((l) => l.title === this._translations.sketchLayer);
578
581
  if (sketchIndex > -1) {
@@ -641,17 +644,16 @@ const MapSelectTools = class {
641
644
  this.selectionLoadingChange.emit(false);
642
645
  // Add geometries used for selecting features as graphics
643
646
  this._drawTools.graphics = this.geometries.map(geom => {
644
- var _a, _b, _c;
645
647
  const props = {
646
648
  "geometry": geom,
647
649
  "symbol": geom.type === "point" ?
648
- (_a = this._drawTools) === null || _a === void 0 ? void 0 : _a.pointSymbol : geom.type === "polyline" ?
649
- (_b = this._drawTools) === null || _b === void 0 ? void 0 : _b.polylineSymbol : geom.type === "polygon" ?
650
- (_c = this._drawTools) === null || _c === void 0 ? void 0 : _c.polygonSymbol : undefined
650
+ this.sketchPointSymbol : geom.type === "polyline" ?
651
+ this.sketchLineSymbol : geom.type === "polygon" ?
652
+ this.sketchPolygonSymbol : undefined
651
653
  };
652
654
  return new this.Graphic(props);
653
655
  });
654
- void this._highlightFeatures(this._selectedIds);
656
+ await this._highlightFeatures(this._selectedIds);
655
657
  }
656
658
  /**
657
659
  * Query the selectLayerView based on any user drawn geometries or buffers
@@ -680,8 +682,8 @@ const MapSelectTools = class {
680
682
  });
681
683
  this._bufferGraphicsLayer.removeAll();
682
684
  this._bufferGraphicsLayer.add(polygonGraphic);
683
- void this._selectFeatures([this._bufferGeometry]);
684
- void this.mapView.goTo(polygonGraphic.geometry.extent);
685
+ await this._selectFeatures([this._bufferGeometry]);
686
+ await this.mapView.goTo(polygonGraphic.geometry.extent);
685
687
  }
686
688
  else {
687
689
  if (this._bufferGraphicsLayer) {
@@ -725,7 +727,7 @@ const MapSelectTools = class {
725
727
  // for sketch
726
728
  // checking for clear as it would throw off tests
727
729
  if ((_b = this._drawTools) === null || _b === void 0 ? void 0 : _b.clear) {
728
- void this._drawTools.clear();
730
+ await this._drawTools.clear();
729
731
  }
730
732
  this.selectionSetChange.emit(this._selectedIds.length);
731
733
  }
@@ -15,8 +15,8 @@ import { o as getItemIndex, m as mutationObserverCallback, d as deselectRemovedI
15
15
  import { I as ICON_TYPES$1 } from './resources-2235e4ff.js';
16
16
  import { C as CSS$2, S as SLOTS$3 } from './resources-e3a5cf27.js';
17
17
  import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
18
- import { s as state, E as EFileType } from './solution-store-477288ac.js';
19
- import { e as EUpdateType } from './interfaces-d0d83efa.js';
18
+ import { s as state, E as EFileType } from './solution-store-1b67f2c8.js';
19
+ import { e as EUpdateType } from './interfaces-cd4054e5.js';
20
20
  import './resources-436ae282.js';
21
21
  import './array-2ab3b18f.js';
22
22
  import './resources-78132e50.js';
@@ -3,218 +3,13 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c246d90e.js';
7
- import { t as toggleChildActionText, o as overflowActionsDebounceInMs, q as queryActions, g as geActionDimensions, a as overflowActions, E as ExpandToggle, b as getOverflowCount } from './ExpandToggle-5f4b222f.js';
8
- import { f as focusElement, a as getSlotted, i as isPrimaryPointerButton, q as queryElementRoots, t as toAriaBoolean } from './dom-3bdc69ee.js';
9
- import { c as createObserver } from './observers-31601001.js';
10
- import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d09506c4.js';
11
- import { d as debounce } from './debounce-4c884e5c.js';
6
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
12
7
  import { g as guid } from './guid-15fce7c0.js';
13
8
  import { b as defaultOffsetDistance, c as connectFloatingUI, u as updateAfterClose, a as disconnectFloatingUI, r as reposition, F as FloatingCSS } from './floating-ui-63460291.js';
14
- import './resources-d60362c3.js';
15
- import './resources-3d641588.js';
9
+ import { i as isPrimaryPointerButton, q as queryElementRoots, t as toAriaBoolean } from './dom-3bdc69ee.js';
10
+ import './debounce-4c884e5c.js';
16
11
  import './resources-436ae282.js';
17
12
 
18
- /*!
19
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
20
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
21
- * v1.0.0-beta.97
22
- */
23
- const CSS$1 = {
24
- actionGroupBottom: "action-group--bottom"
25
- };
26
- const SLOTS = {
27
- bottomActions: "bottom-actions",
28
- expandTooltip: "expand-tooltip"
29
- };
30
- const TEXT = {
31
- expand: "Expand",
32
- collapse: "Collapse"
33
- };
34
-
35
- const actionBarCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{pointer-events:auto;display:inline-flex;align-self:stretch;background:transparent;--calcite-action-bar-expanded-max-width:auto}:host([layout=vertical]){flex-direction:column}:host([layout=horizontal]){flex-direction:row}:host([layout=vertical][overflow-actions-disabled]){overflow-y:auto}:host([layout=horizontal][overflow-actions-disabled]){overflow-x:auto}:host([layout=vertical][expanded]){max-inline-size:var(--calcite-action-bar-expanded-max-width)}::slotted(calcite-action-group){border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-width:0px;border-inline-end-width:1px;border-style:solid}::slotted(calcite-action-group:last-child){border-block-end-width:0px;border-inline-end-width:0px}.action-group--bottom{flex-grow:1;justify-content:flex-end;-webkit-padding-after:0px;padding-block-end:0px;-webkit-padding-end:0px;padding-inline-end:0px}";
36
-
37
- const ActionBar = class {
38
- constructor(hostRef) {
39
- registerInstance(this, hostRef);
40
- this.calciteActionBarToggle = createEvent(this, "calciteActionBarToggle", 6);
41
- // --------------------------------------------------------------------------
42
- //
43
- // Properties
44
- //
45
- // --------------------------------------------------------------------------
46
- /**
47
- * When `true`, the expand-toggling behavior is disabled.
48
- */
49
- this.expandDisabled = false;
50
- /**
51
- * When `true`, the component is expanded.
52
- */
53
- this.expanded = false;
54
- /**
55
- * The layout direction of the actions.
56
- */
57
- this.layout = "vertical";
58
- /**
59
- * Disables automatically overflowing `calcite-action`s that won't fit into menus.
60
- */
61
- this.overflowActionsDisabled = false;
62
- this.mutationObserver = createObserver("mutation", () => {
63
- const { el, expanded } = this;
64
- toggleChildActionText({ parent: el, expanded });
65
- this.conditionallyOverflowActions();
66
- });
67
- this.resizeObserver = createObserver("resize", (entries) => this.resizeHandlerEntries(entries));
68
- // --------------------------------------------------------------------------
69
- //
70
- // Private Methods
71
- //
72
- // --------------------------------------------------------------------------
73
- this.actionMenuOpenChangeHandler = (event) => {
74
- if (event.detail) {
75
- const composedPath = event.composedPath();
76
- Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((group) => {
77
- if (!composedPath.includes(group)) {
78
- group.menuOpen = false;
79
- }
80
- });
81
- }
82
- };
83
- this.resizeHandlerEntries = (entries) => {
84
- entries.forEach(this.resizeHandler);
85
- };
86
- this.resizeHandler = (entry) => {
87
- const { width, height } = entry.contentRect;
88
- this.resize({ width, height });
89
- };
90
- this.resize = debounce(({ width, height }) => {
91
- const { el, expanded, expandDisabled, layout } = this;
92
- if ((layout === "vertical" && !height) || (layout === "horizontal" && !width)) {
93
- return;
94
- }
95
- const actions = queryActions(el);
96
- const actionCount = expandDisabled ? actions.length : actions.length + 1;
97
- const actionGroups = Array.from(el.querySelectorAll("calcite-action-group"));
98
- const groupCount = getSlotted(el, SLOTS.bottomActions) || !expandDisabled
99
- ? actionGroups.length + 1
100
- : actionGroups.length;
101
- const { actionHeight, actionWidth } = geActionDimensions(actions);
102
- const overflowCount = getOverflowCount({
103
- layout,
104
- actionCount,
105
- actionHeight,
106
- actionWidth,
107
- height,
108
- width,
109
- groupCount
110
- });
111
- overflowActions({
112
- actionGroups,
113
- expanded,
114
- overflowCount
115
- });
116
- }, overflowActionsDebounceInMs);
117
- this.conditionallyOverflowActions = () => {
118
- if (!this.overflowActionsDisabled) {
119
- this.overflowActions();
120
- }
121
- };
122
- this.toggleExpand = () => {
123
- this.expanded = !this.expanded;
124
- this.calciteActionBarToggle.emit();
125
- };
126
- this.setExpandToggleRef = (el) => {
127
- this.expandToggleEl = el;
128
- };
129
- }
130
- expandHandler() {
131
- this.conditionallyOverflowActions();
132
- }
133
- expandedHandler(expanded) {
134
- toggleChildActionText({ parent: this.el, expanded });
135
- this.conditionallyOverflowActions();
136
- }
137
- overflowDisabledHandler(overflowActionsDisabled) {
138
- overflowActionsDisabled
139
- ? this.resizeObserver.disconnect()
140
- : this.resizeObserver.observe(this.el);
141
- }
142
- // --------------------------------------------------------------------------
143
- //
144
- // Lifecycle
145
- //
146
- // --------------------------------------------------------------------------
147
- componentDidLoad() {
148
- this.conditionallyOverflowActions();
149
- }
150
- connectedCallback() {
151
- var _a, _b;
152
- const { el, expanded } = this;
153
- toggleChildActionText({ parent: el, expanded });
154
- (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(el, { childList: true, subtree: true });
155
- if (!this.overflowActionsDisabled) {
156
- (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(el);
157
- }
158
- this.conditionallyOverflowActions();
159
- connectConditionalSlotComponent(this);
160
- }
161
- disconnectedCallback() {
162
- var _a, _b;
163
- (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
164
- (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
165
- disconnectConditionalSlotComponent(this);
166
- }
167
- // --------------------------------------------------------------------------
168
- //
169
- // Methods
170
- //
171
- // --------------------------------------------------------------------------
172
- /**
173
- * Overflows actions that won't fit into menus.
174
- *
175
- * @internal
176
- */
177
- async overflowActions() {
178
- this.resize({ width: this.el.clientWidth, height: this.el.clientHeight });
179
- }
180
- /**
181
- * Sets focus on the component.
182
- *
183
- * @param focusId
184
- */
185
- async setFocus(focusId) {
186
- var _a;
187
- if (focusId === "expand-toggle") {
188
- await focusElement(this.expandToggleEl);
189
- return;
190
- }
191
- (_a = this.el) === null || _a === void 0 ? void 0 : _a.focus();
192
- }
193
- // --------------------------------------------------------------------------
194
- //
195
- // Render Methods
196
- //
197
- // --------------------------------------------------------------------------
198
- renderBottomActionGroup() {
199
- const { expanded, expandDisabled, intlExpand, intlCollapse, el, position, toggleExpand, scale, layout } = this;
200
- const tooltip = getSlotted(el, SLOTS.expandTooltip);
201
- const expandLabel = intlExpand || TEXT.expand;
202
- const collapseLabel = intlCollapse || TEXT.collapse;
203
- const expandToggleNode = !expandDisabled ? (h(ExpandToggle, { el: el, expanded: expanded, intlCollapse: collapseLabel, intlExpand: expandLabel, position: position, ref: this.setExpandToggleRef, scale: scale, toggle: toggleExpand, tooltip: tooltip })) : null;
204
- return getSlotted(el, SLOTS.bottomActions) || expandToggleNode ? (h("calcite-action-group", { class: CSS$1.actionGroupBottom, layout: layout, scale: scale }, h("slot", { name: SLOTS.bottomActions }), h("slot", { name: SLOTS.expandTooltip }), expandToggleNode)) : null;
205
- }
206
- render() {
207
- return (h(Host, { onCalciteActionMenuOpenChange: this.actionMenuOpenChangeHandler }, h("slot", null), this.renderBottomActionGroup()));
208
- }
209
- get el() { return getElement(this); }
210
- static get watchers() { return {
211
- "expandDisabled": ["expandHandler"],
212
- "expanded": ["expandedHandler"],
213
- "overflowActionsDisabled": ["overflowDisabledHandler"]
214
- }; }
215
- };
216
- ActionBar.style = actionBarCss;
217
-
218
13
  /*!
219
14
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
220
15
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
@@ -576,4 +371,4 @@ const Tooltip = class {
576
371
  };
577
372
  Tooltip.style = tooltipCss;
578
373
 
579
- export { ActionBar as calcite_action_bar, Tooltip as calcite_tooltip };
374
+ export { Tooltip as calcite_tooltip };
@@ -4,25 +4,23 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
6
  import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
7
+ import { g as getLocaleComponentStrings } from './locale-7bf10e0a.js';
8
+ import { E as ELayoutMode } from './interfaces-cd4054e5.js';
9
+ import './_commonjsHelpers-d5f9d613.js';
7
10
 
8
- const crowdsourceManagerCss = ":host{display:block}";
11
+ const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.pad-top-51{padding-top:51px}.header-title{display:flex;float:left}.header-controls-label{display:flex;float:right}.header-controls{height:50px}.img-background{background-repeat:no-repeat;background-size:100% 100%;width:38px;height:26px}.grid-background{background-image:url('../../assets/data/images/grid.png')}.vertical-background{background-image:url('../../assets/data/images/horizontal.png')}.horizontal-background{background-image:url('../../assets/data/images/vertical.png')}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.background-transparent{background-color:transparent}.display-flex{display:flex}.header-text{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);padding-inline:0.75rem;padding-block:0.875rem;line-height:1.25rem}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:48px;height:48px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.position-relative{position:relative}";
9
12
 
10
13
  const CrowdsourceManager = class {
11
14
  constructor(hostRef) {
12
15
  registerInstance(this, hostRef);
16
+ this.mapInfos = [];
17
+ this._translations = undefined;
18
+ this._layoutMode = ELayoutMode.GRID;
19
+ this._mapView = undefined;
20
+ this._panelOpen = true;
13
21
  }
14
22
  //--------------------------------------------------------------------------
15
23
  //
16
- // Properties (public)
17
- //
18
- //--------------------------------------------------------------------------
19
- //--------------------------------------------------------------------------
20
- //
21
- // State (internal)
22
- //
23
- //--------------------------------------------------------------------------
24
- //--------------------------------------------------------------------------
25
- //
26
24
  // Properties (protected)
27
25
  //
28
26
  //--------------------------------------------------------------------------
@@ -41,19 +39,95 @@ const CrowdsourceManager = class {
41
39
  // Events (public)
42
40
  //
43
41
  //--------------------------------------------------------------------------
42
+ /**
43
+ * Handle changes to the buffer distance value
44
+ */
45
+ mapChanged(event) {
46
+ this._mapView = event.detail;
47
+ }
44
48
  //--------------------------------------------------------------------------
45
49
  //
46
50
  // Functions (lifecycle)
47
51
  //
48
52
  //--------------------------------------------------------------------------
53
+ async componentWillLoad() {
54
+ await this._getTranslations();
55
+ }
49
56
  render() {
50
- return (h(Host, null, h("slot", null)));
57
+ return (h(Host, null, h("calcite-panel", { class: "width-full height-full", heading: this._translations.header }, h("div", { class: "display-flex", slot: "header-actions-end" }, h("div", { class: "header-text" }, "Layout"), this._getAction("grid-background", ELayoutMode.GRID, this._translations.grid), this._getAction("horizontal-background", ELayoutMode.VERTICAL, this._translations.horizontal), this._getAction("vertical-background", ELayoutMode.HORIZONTAL, this._translations.vertical)), this._getBody(this._layoutMode, this._panelOpen))));
51
58
  }
52
59
  //--------------------------------------------------------------------------
53
60
  //
54
61
  // Functions (protected)
55
62
  //
56
63
  //--------------------------------------------------------------------------
64
+ _getAction(imgClass, layoutMode, tip) {
65
+ return (h("div", null, h("calcite-action", { alignment: "center", appearance: "transparent", compact: false, id: imgClass, indicator: layoutMode === this._layoutMode, onClick: () => { this._setLayoutMode(layoutMode); }, text: "" }, h("div", { class: imgClass + " img-background" })), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": imgClass }, h("span", null, tip))));
66
+ }
67
+ _getDividerIcon(layoutMode, panelOpen) {
68
+ let icon = "";
69
+ switch (layoutMode) {
70
+ case ELayoutMode.HORIZONTAL:
71
+ icon = panelOpen ? "chevrons-up" : "chevrons-down";
72
+ break;
73
+ default:
74
+ icon = panelOpen ? "chevrons-left" : "chevrons-right";
75
+ break;
76
+ }
77
+ return icon;
78
+ }
79
+ _getMapSizeClass(layoutMode, panelOpen) {
80
+ let sizeClass = "";
81
+ switch (layoutMode) {
82
+ case ELayoutMode.HORIZONTAL:
83
+ sizeClass = `${panelOpen ? "height-1-2" : "height-0"} width-full position-relative`;
84
+ break;
85
+ case ELayoutMode.GRID:
86
+ sizeClass = `height-full position-relative ${panelOpen ? "width-1-3" : "width-0"}`;
87
+ break;
88
+ case ELayoutMode.VERTICAL:
89
+ sizeClass = `height-full position-relative ${panelOpen ? "width-1-2" : "width-0"}`;
90
+ break;
91
+ }
92
+ return sizeClass;
93
+ }
94
+ _getTableSizeClass(layoutMode, panelOpen) {
95
+ let sizeClass = "";
96
+ switch (layoutMode) {
97
+ case ELayoutMode.HORIZONTAL:
98
+ sizeClass = `${panelOpen ? "height-1-2" : "height-full"} width-full display-flex flex-column`;
99
+ break;
100
+ case ELayoutMode.GRID:
101
+ sizeClass = `${panelOpen ? "width-2-3" : "width-full"} height-full display-flex`;
102
+ break;
103
+ case ELayoutMode.VERTICAL:
104
+ sizeClass = `${panelOpen ? "width-1-2" : "width-full"} height-full display-flex`;
105
+ break;
106
+ }
107
+ return sizeClass;
108
+ }
109
+ _getBody(layoutMode, panelOpen) {
110
+ const displayFlex = layoutMode === ELayoutMode.HORIZONTAL ? "" : "display-flex";
111
+ return (h("calcite-shell", { class: "width-full height-full pad-top-51" }, h("div", { class: `width-full height-full ${displayFlex}` }, this._getMap(layoutMode, panelOpen), this._getTable(layoutMode, panelOpen))));
112
+ }
113
+ _getMap(layoutMode, panelOpen) {
114
+ const mapSizeClass = this._getMapSizeClass(layoutMode, panelOpen);
115
+ return (h("div", { class: `${mapSizeClass} overflow-hidden` }, h("div", { style: { "overflow": "hidden" } }, h("map-card", { mapInfos: this.mapInfos }))));
116
+ }
117
+ _getTable(layoutMode, panelOpen) {
118
+ const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
119
+ const icon = this._getDividerIcon(layoutMode, panelOpen);
120
+ const tooltip = panelOpen ? this._translations.close : this._translations.open;
121
+ const id = "toggle-layout";
122
+ const toggleSizeClass = layoutMode === ELayoutMode.HORIZONTAL ? "divider-h" : "divider-w";
123
+ return (h("div", { class: tableSizeClass }, h("div", { class: `border ${toggleSizeClass}` }, h("div", { class: "toggle-node" }, 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" }, h("layer-table", { mapView: this === null || this === void 0 ? void 0 : this._mapView }))));
124
+ }
125
+ _setLayoutMode(layoutMode) {
126
+ this._layoutMode = layoutMode;
127
+ }
128
+ _toggleLayout() {
129
+ this._panelOpen = !this._panelOpen;
130
+ }
57
131
  /**
58
132
  * Fetches the component's translations
59
133
  *
@@ -61,8 +135,8 @@ const CrowdsourceManager = class {
61
135
  * @protected
62
136
  */
63
137
  async _getTranslations() {
64
- // const messages = await getLocaleComponentStrings(this.el);
65
- // this._translations = messages[0] as typeof BufferTools_T9n;
138
+ const messages = await getLocaleComponentStrings(this.el);
139
+ this._translations = messages[0];
66
140
  }
67
141
  get el() { return getElement(this); }
68
142
  };