@esri/solutions-components 0.5.6 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/dist/assets/t9n/map-select-tools/resources.json +2 -2
  2. package/dist/assets/t9n/map-select-tools/resources_en.json +2 -2
  3. package/dist/assets/t9n/public-notification/resources.json +1 -1
  4. package/dist/assets/t9n/public-notification/resources_en.json +1 -1
  5. package/dist/cjs/calcite-input-text_5.cjs.entry.js +4 -4
  6. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +1 -1
  7. package/dist/cjs/{downloadUtils-06876768.js → downloadUtils-8d66f03e.js} +95 -21
  8. package/dist/cjs/{index.es-d07646b4.js → index.es-4f5dfcc6.js} +1 -1
  9. package/dist/cjs/layer-table_2.cjs.entry.js +1 -1
  10. package/dist/cjs/public-notification.cjs.entry.js +12 -1
  11. package/dist/cjs/solution-configuration.cjs.entry.js +1 -1
  12. package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
  13. package/dist/cjs/{solution-store-70002b57.js → solution-store-ca4639d5.js} +3 -3
  14. package/dist/collection/components/map-select-tools/map-select-tools.css +7 -2
  15. package/dist/collection/components/map-select-tools/map-select-tools.js +2 -2
  16. package/dist/collection/components/public-notification/public-notification.js +12 -1
  17. package/dist/collection/components/refine-selection/refine-selection.css +85 -85
  18. package/dist/collection/utils/downloadUtils.js +94 -20
  19. package/dist/collection/utils/downloadUtils.ts +147 -27
  20. package/dist/components/downloadUtils.js +94 -20
  21. package/dist/components/map-select-tools2.js +14 -14
  22. package/dist/components/public-notification.js +12 -1
  23. package/dist/components/solution-store.js +3 -3
  24. package/dist/esm/calcite-input-text_5.entry.js +4 -4
  25. package/dist/esm/calcite-shell-panel_14.entry.js +1 -1
  26. package/dist/esm/{downloadUtils-046ce0aa.js → downloadUtils-b9785635.js} +95 -21
  27. package/dist/esm/{index.es-3fd0e8f6.js → index.es-70994c40.js} +1 -1
  28. package/dist/esm/layer-table_2.entry.js +1 -1
  29. package/dist/esm/public-notification.entry.js +12 -1
  30. package/dist/esm/solution-configuration.entry.js +1 -1
  31. package/dist/esm/solution-contents_3.entry.js +1 -1
  32. package/dist/esm/{solution-store-5d068b07.js → solution-store-70f874f8.js} +3 -3
  33. package/dist/solutions-components/{p-1850a763.entry.js → p-10336554.entry.js} +1 -1
  34. package/dist/solutions-components/{p-41802f6b.entry.js → p-16dfb254.entry.js} +1 -1
  35. package/dist/solutions-components/{p-99aec087.js → p-5d5e10d4.js} +1 -1
  36. package/dist/solutions-components/{p-4769a2a5.entry.js → p-5ed755a2.entry.js} +1 -1
  37. package/dist/solutions-components/{p-826a814d.js → p-78719506.js} +2 -2
  38. package/dist/solutions-components/{p-9f620303.entry.js → p-b4b19fd3.entry.js} +1 -1
  39. package/dist/solutions-components/{p-2e0db581.js → p-be943993.js} +11 -11
  40. package/dist/solutions-components/{p-7e409786.entry.js → p-c3e3d0bb.entry.js} +3 -3
  41. package/dist/solutions-components/p-f66a7ea7.entry.js +6 -0
  42. package/dist/solutions-components/solutions-components.esm.js +1 -1
  43. package/dist/solutions-components/utils/downloadUtils.ts +147 -27
  44. package/dist/solutions-components_commit.txt +8 -0
  45. package/dist/types/utils/downloadUtils.d.ts +21 -0
  46. package/package.json +1 -1
  47. package/dist/solutions-components/p-6e87198f.entry.js +0 -6
@@ -342,7 +342,18 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
342
342
  return (h("div", { class: "padding-top-1-2 padding-bottom-1-2" }, h("calcite-list", { class: "list-border margin-sides-1" }, this._selectionSets.reduce((prev, cur, i) => {
343
343
  var _a;
344
344
  const ids = this._getSelectionSetIds(cur);
345
- prev.push((h("calcite-list-item", { description: this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()), label: cur.label, onClick: () => this._gotoSelection(cur, this.mapView) }, h("div", { slot: "content" }, h("div", { class: "list-label" }, cur.label), h("div", { class: "list-description" }, (_a = cur === null || cur === void 0 ? void 0 : cur.layerView) === null || _a === void 0 ? void 0 : _a.layer.title), h("div", { class: "list-description" }, this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()))), this._getAction(true, "pencil", "", (evt) => this._openSelection(cur, evt), false, "actions-end"), this._getAction(true, "x", "", (evt) => this._deleteSelection(i, evt), false, "actions-end"))));
345
+ let validSet = true;
346
+ if (cur.workflowType === EWorkflowType.REFINE) {
347
+ const numIds = Object.keys(cur.refineInfos).reduce((_prev, _cur) => {
348
+ const refineInfo = cur.refineInfos[_cur];
349
+ _prev += refineInfo.addIds.length + refineInfo.removeIds.length;
350
+ return _prev;
351
+ }, 0);
352
+ validSet = numIds > 0;
353
+ }
354
+ if (validSet) {
355
+ prev.push((h("calcite-list-item", { description: this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()), label: cur.label, onClick: () => this._gotoSelection(cur, this.mapView) }, h("div", { slot: "content" }, h("div", { class: "list-label" }, cur.label), h("div", { class: "list-description" }, (_a = cur === null || cur === void 0 ? void 0 : cur.layerView) === null || _a === void 0 ? void 0 : _a.layer.title), h("div", { class: "list-description" }, this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()))), this._getAction(true, "pencil", "", (evt) => this._openSelection(cur, evt), false, "actions-end"), this._getAction(true, "x", "", (evt) => this._deleteSelection(i, evt), false, "actions-end"))));
356
+ }
346
357
  return prev;
347
358
  }, []))));
348
359
  }
@@ -897,7 +897,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
897
897
  });
898
898
 
899
899
  /*!
900
- * @esri/arcgis-html-sanitizer - v3.0.0 - Mon Aug 22 2022 11:29:01 GMT-0400 (Eastern Daylight Time)
900
+ * @esri/arcgis-html-sanitizer - v3.0.1 - Tue Nov 15 2022 09:46:54 GMT-0800 (Pacific Standard Time)
901
901
  * Copyright (c) 2022 - Environmental Systems Research Institute, Inc.
902
902
  * Apache-2.0
903
903
  *
@@ -2132,7 +2132,7 @@ function parseTag$1(html, onTag, escapeHtml) {
2132
2132
  lastPos = currentPos;
2133
2133
  continue;
2134
2134
  }
2135
- if (c === ">" || currentPos === len - 1) {
2135
+ if (c === ">") {
2136
2136
  rethtml += escapeHtml(html.slice(lastPos, tagStart));
2137
2137
  currentHtml = html.slice(tagStart, currentPos + 1);
2138
2138
  currentTagName = getTagName(currentHtml);
@@ -2167,7 +2167,7 @@ function parseTag$1(html, onTag, escapeHtml) {
2167
2167
  }
2168
2168
  }
2169
2169
  }
2170
- if (lastPos < len) {
2170
+ if (lastPos < html.length) {
2171
2171
  rethtml += escapeHtml(html.substr(lastPos));
2172
2172
  }
2173
2173
 
@@ -20,7 +20,7 @@ import { g as goToSelection, h as highlightFeatures, q as queryObjectIds, a as g
20
20
  import { c as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-523c6558.js';
21
21
  import { s as state } from './publicNotificationStore-c36d95bf.js';
22
22
  import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale-54cac39a.js';
23
- import { d as downloadCSV, a as downloadPDF } from './downloadUtils-046ce0aa.js';
23
+ import { d as downloadCSV, a as downloadPDF } from './downloadUtils-b9785635.js';
24
24
  import './guid-2069664e.js';
25
25
  import './key-218d8d4d.js';
26
26
  import './index-4c4a4f3d.js';
@@ -470,7 +470,7 @@ const Notice = class {
470
470
  };
471
471
  Notice.style = noticeCss;
472
472
 
473
- const mapSelectToolsCss = ":host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:\"1rem\" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.tooltip-container{justify-content:center;display:flex}.padding-start-1-2{-webkit-padding-start:0.5rem;padding-inline-start:0.5rem}.icon{--calcite-ui-icon-color:var(--calcite-ui-brand)}";
473
+ const mapSelectToolsCss = ":host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:\"1rem\" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.tooltip-container{display:flex}.padding-start-1-2{-webkit-padding-start:0.5rem;padding-inline-start:0.5rem}.icon{--calcite-ui-icon-color:var(--calcite-ui-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}";
474
474
 
475
475
  const MapSelectTools = class {
476
476
  constructor(hostRef) {
@@ -640,14 +640,14 @@ const MapSelectTools = class {
640
640
  var _a, _b;
641
641
  const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
642
642
  const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
643
- 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-tooltip", { label: "Data disclaimer", placement: "auto", "reference-element": "search-distance-icon" }, h("span", null, 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 }))));
643
+ 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 }))));
644
644
  }
645
645
  /**
646
646
  * Renders the map layer picker component.
647
647
  */
648
648
  _getUseLayerFeaturesOptions() {
649
649
  const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
650
- 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.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }), h("calcite-tooltip", { label: "Data disclaimer", placement: "auto", "reference-element": "use-layer-features-icon" }, h("span", null, this._translations.useLayerFeaturesTooltip))), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } }))), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }))));
650
+ 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.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }))));
651
651
  }
652
652
  /**
653
653
  * Renders the number of selected features
@@ -18,7 +18,7 @@ import { q as getItemIndex, m as mutationObserverCallback, d as deselectRemovedI
18
18
  import { C as CSS$3, S as SLOTS$3 } from './resources-34a756bf.js';
19
19
  import { I as ICON_TYPES$1 } from './resources-b9ac23e3.js';
20
20
  import { g as getLocaleComponentStrings } from './locale-54cac39a.js';
21
- import { s as state, E as EFileType } from './solution-store-5d068b07.js';
21
+ import { s as state, E as EFileType } from './solution-store-70f874f8.js';
22
22
  import { d as EUpdateType } from './interfaces-523c6558.js';
23
23
  import './resources-e83f65b3.js';
24
24
  import './key-218d8d4d.js';
@@ -1505,7 +1505,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
1505
1505
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1506
1506
  * ====================================================================
1507
1507
  */
1508
- function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-3fd0e8f6.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1508
+ function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-70994c40.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1509
1509
  /** ====================================================================
1510
1510
  * @license
1511
1511
  * jsPDF XMP metadata plugin
@@ -2425,6 +2425,38 @@ function _createFilename(selectionSetNames) {
2425
2425
  const title = selectionSetNames.length > 0 ? selectionSetNames.join(", ") : "download";
2426
2426
  return title;
2427
2427
  }
2428
+ /**
2429
+ * Creates relationship queries for each relationship flag in a popup.
2430
+ * @param layer Layer whose popup is to be examined
2431
+ * @return Hash of relationships by their id, or null if there are no relationship flags in the
2432
+ * popup; each relationship has the properties layer and relatedQuery for the related layer
2433
+ * and the query for that layer
2434
+ */
2435
+ function _createRelationshipQueries(layer) {
2436
+ const relationships = {};
2437
+ const relationshipFieldPattern = /\{relationships\/\d+\//gm;
2438
+ const relationshipIdPattern = /\d+/;
2439
+ // Test if this popup has any relationship references
2440
+ const matches = layer.popupTemplate.content[0].text.match(relationshipFieldPattern);
2441
+ if (matches) {
2442
+ matches.forEach(match => {
2443
+ // Add a query to a found relationship if we don't already have one
2444
+ const id = match.match(relationshipIdPattern)[0];
2445
+ if (!relationships.hasOwnProperty(id)) {
2446
+ const relatedQuery = {
2447
+ outFields: ['*'],
2448
+ relationshipId: id,
2449
+ returnGeometry: false
2450
+ };
2451
+ relationships[id] = {
2452
+ layer,
2453
+ relatedQuery
2454
+ };
2455
+ }
2456
+ });
2457
+ }
2458
+ return relationships;
2459
+ }
2428
2460
  /**
2429
2461
  * Prepares an attribute's value by applying domain and type information.
2430
2462
  *
@@ -2485,7 +2517,7 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
2485
2517
  * @returns Promise resolving when function is done
2486
2518
  */
2487
2519
  async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLayerPopup = true, includeHeaderNames = false) {
2488
- var _a, _b, _c, _d;
2520
+ var _a, _b, _c, _d, _e, _f;
2489
2521
  const [intl] = await loadModules(["esri/intl"]);
2490
2522
  // Get the features to export
2491
2523
  const featureSet = await queryFeaturesByID(ids, layer);
@@ -2499,6 +2531,7 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
2499
2531
  const attributeFormats = {};
2500
2532
  // Get the label formatting, if any
2501
2533
  let labelFormat;
2534
+ let relationshipQueries = {};
2502
2535
  let arcadeExecutors = {};
2503
2536
  if (layer.popupEnabled) {
2504
2537
  layer.popupTemplate.fieldInfos.forEach(
@@ -2527,6 +2560,8 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
2527
2560
  }
2528
2561
  else if (formatUsingLayerPopup && ((_d = (_c = layer.popupTemplate) === null || _c === void 0 ? void 0 : _c.content[0]) === null || _d === void 0 ? void 0 : _d.type) === "text") {
2529
2562
  labelFormat = _convertPopupTextToLabelSpec(layer.popupTemplate.content[0].text);
2563
+ // Do we need any relationship queries?
2564
+ relationshipQueries = _createRelationshipQueries(layer);
2530
2565
  // Do we need any Arcade executors?
2531
2566
  arcadeExecutors = await _createArcadeExecutors(labelFormat, layer);
2532
2567
  }
@@ -2535,36 +2570,75 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
2535
2570
  let labels;
2536
2571
  // eslint-disable-next-line unicorn/prefer-ternary
2537
2572
  if (labelFormat) {
2573
+ console.log("labelFormat", labelFormat); //???
2538
2574
  const arcadeExpressionRegExp = /\{expression\/\w+\}/g;
2539
2575
  const attributeRegExp = /\{\w+\}/g;
2540
2576
  // Find the label fields that we need to replace with values
2541
- const arcadeExpressionMatches = labelFormat.match(arcadeExpressionRegExp);
2542
- const attributeMatches = labelFormat.match(attributeRegExp);
2577
+ const arcadeExpressionMatches = (_e = labelFormat.match(arcadeExpressionRegExp)) !== null && _e !== void 0 ? _e : [];
2578
+ const attributeMatches = (_f = labelFormat.match(attributeRegExp)) !== null && _f !== void 0 ? _f : [];
2543
2579
  // Convert feature attributes into an array of labels
2544
- labels = featureSet.features.map(feature => {
2580
+ const relationshipKeys = Object.keys(relationshipQueries);
2581
+ labels = await Promise.all(featureSet.features.map(async (feature) => {
2545
2582
  let labelPrep = labelFormat;
2546
- // Replace Arcade expressions
2547
- if (arcadeExpressionMatches) {
2548
- arcadeExpressionMatches.forEach((match) => {
2549
- const expressionName = match.substring(match.indexOf("/") + 1, match.length - 1);
2550
- const value = arcadeExecutors[expressionName].execute({ "$feature": feature });
2551
- labelPrep = labelPrep.replace(match, value);
2552
- });
2553
- }
2554
- // Replace non-Arcade fields
2555
- if (attributeMatches) {
2556
- attributeMatches.forEach((match) => {
2557
- const attributeName = match.substring(1, match.length - 1);
2558
- const value = _prepareAttributeValue(feature.attributes[attributeName], attributeTypes[attributeName], attributeDomains[attributeName], attributeFormats[attributeName], intl);
2559
- labelPrep = labelPrep.replace(match, value);
2583
+ // Replace Arcade expressions in this feature
2584
+ arcadeExpressionMatches.forEach((match) => {
2585
+ const expressionName = match.substring(match.indexOf("/") + 1, match.length - 1);
2586
+ const value = arcadeExecutors[expressionName].execute({ "$feature": feature });
2587
+ labelPrep = labelPrep.replace(match, value);
2588
+ });
2589
+ // Replace relationship expressions in this feature
2590
+ const relatedFeatureQueries = [];
2591
+ const relationshipIds = [];
2592
+ relationshipKeys.forEach((relationshipId) => {
2593
+ const relationship = relationshipQueries[relationshipId];
2594
+ const objectId = feature.attributes[relationship.layer.objectIdField];
2595
+ const relatedQuery = Object.assign(Object.assign({}, relationship.relatedQuery), { objectIds: [objectId] });
2596
+ relatedFeatureQueries.push(relationship.layer.queryRelatedFeatures(relatedQuery));
2597
+ relationshipIds.push(relationshipId);
2598
+ });
2599
+ // Wait for all of the queries for related records for this label
2600
+ const relatedFeatureQueryResults = await Promise.all(relatedFeatureQueries);
2601
+ console.log("relatedFeatureQueryResults", relatedFeatureQueryResults); //???
2602
+ relatedFeatureQueryResults.forEach((relatedFeatureQueryResult, i) => {
2603
+ // We have an object with FeatureSets grouped by source layer or table objectIds
2604
+ const relationshipId = relationshipIds[i];
2605
+ console.log("relationshipId", relationshipId); //???
2606
+ console.log("relatedFeatureQueryResult", relatedFeatureQueryResult); //???
2607
+ // Run through the source layer or table objectIds
2608
+ Object.keys(relatedFeatureQueryResult).forEach(relatedFeatureSetId => {
2609
+ console.log("relatedFeatureSetId", relatedFeatureSetId); //???
2610
+ // We have a feature set
2611
+ const relatedFeatures = relatedFeatureQueryResult[relatedFeatureSetId].features;
2612
+ console.log("relatedFeatures", relatedFeatures); //???
2613
+ // Get the values from each feature and replace them in the label
2614
+ relatedFeatures.forEach(feature => {
2615
+ // Merge the base and related feature attributes and create the label
2616
+ // Prefix related feature's attributes with "relationships/<id>/" to match popup
2617
+ const rePrefix = "\{relationships/" + relationshipId + "/";
2618
+ const reSuffix = "\}";
2619
+ console.log("/rePrefix + attributeName + reSuffix/g", rePrefix + "attributeName" + reSuffix); //???
2620
+ const attributes = feature.attributes;
2621
+ Object.keys(attributes).forEach(attributeName => {
2622
+ console.log("/rePrefix + attributeName + reSuffix/g", rePrefix + attributeName + reSuffix); //???
2623
+ // Replace the value using the attribute name as a relationship
2624
+ const attributeRelationshipRegExp = new RegExp(rePrefix + attributeName + reSuffix, "g");
2625
+ labelPrep = labelPrep.replaceAll(attributeRelationshipRegExp, attributes[attributeName]);
2626
+ });
2627
+ });
2560
2628
  });
2561
- }
2629
+ });
2630
+ // Replace non-Arcade fields in this feature
2631
+ attributeMatches.forEach((match) => {
2632
+ const attributeName = match.substring(1, match.length - 1);
2633
+ const value = _prepareAttributeValue(feature.attributes[attributeName], attributeTypes[attributeName], attributeDomains[attributeName], attributeFormats[attributeName], intl);
2634
+ labelPrep = labelPrep.replace(match, value);
2635
+ });
2562
2636
  // Split label into lines
2563
2637
  let label = labelPrep.split(lineSeparatorChar);
2564
2638
  // Trim lines
2565
2639
  label = label.map(line => line.trim());
2566
2640
  return label;
2567
- });
2641
+ }));
2568
2642
  }
2569
2643
  else {
2570
2644
  // Export all attributes
@@ -4,7 +4,7 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
6
  import { a as commonjsGlobal, c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
7
- import { _ as _typeof_1 } from './downloadUtils-046ce0aa.js';
7
+ import { _ as _typeof_1 } from './downloadUtils-b9785635.js';
8
8
  import './index-d298aca9.js';
9
9
  import './loadModules-cd3569de.js';
10
10
  import './locale-54cac39a.js';
@@ -7,7 +7,7 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
7
7
  import { l as loadModules } from './loadModules-cd3569de.js';
8
8
  import { g as getLocaleComponentStrings } from './locale-54cac39a.js';
9
9
  import { i as getMapLayerIds, b as getMapLayerView, g as goToSelection, j as queryAllFeatures } from './mapViewUtils-ebbd4733.js';
10
- import { d as downloadCSV } from './downloadUtils-046ce0aa.js';
10
+ import { d as downloadCSV } from './downloadUtils-b9785635.js';
11
11
  import { g as EExpandType } from './interfaces-523c6558.js';
12
12
  import './_commonjsHelpers-d5f9d613.js';
13
13
 
@@ -306,7 +306,18 @@ const PublicNotification = class {
306
306
  return (h("div", { class: "padding-top-1-2 padding-bottom-1-2" }, h("calcite-list", { class: "list-border margin-sides-1" }, this._selectionSets.reduce((prev, cur, i) => {
307
307
  var _a;
308
308
  const ids = this._getSelectionSetIds(cur);
309
- prev.push((h("calcite-list-item", { description: this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()), label: cur.label, onClick: () => this._gotoSelection(cur, this.mapView) }, h("div", { slot: "content" }, h("div", { class: "list-label" }, cur.label), h("div", { class: "list-description" }, (_a = cur === null || cur === void 0 ? void 0 : cur.layerView) === null || _a === void 0 ? void 0 : _a.layer.title), h("div", { class: "list-description" }, this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()))), this._getAction(true, "pencil", "", (evt) => this._openSelection(cur, evt), false, "actions-end"), this._getAction(true, "x", "", (evt) => this._deleteSelection(i, evt), false, "actions-end"))));
309
+ let validSet = true;
310
+ if (cur.workflowType === EWorkflowType.REFINE) {
311
+ const numIds = Object.keys(cur.refineInfos).reduce((_prev, _cur) => {
312
+ const refineInfo = cur.refineInfos[_cur];
313
+ _prev += refineInfo.addIds.length + refineInfo.removeIds.length;
314
+ return _prev;
315
+ }, 0);
316
+ validSet = numIds > 0;
317
+ }
318
+ if (validSet) {
319
+ prev.push((h("calcite-list-item", { description: this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()), label: cur.label, onClick: () => this._gotoSelection(cur, this.mapView) }, h("div", { slot: "content" }, h("div", { class: "list-label" }, cur.label), h("div", { class: "list-description" }, (_a = cur === null || cur === void 0 ? void 0 : cur.layerView) === null || _a === void 0 ? void 0 : _a.layer.title), h("div", { class: "list-description" }, this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()))), this._getAction(true, "pencil", "", (evt) => this._openSelection(cur, evt), false, "actions-end"), this._getAction(true, "x", "", (evt) => this._deleteSelection(i, evt), false, "actions-end"))));
320
+ }
310
321
  return prev;
311
322
  }, []))));
312
323
  }
@@ -4,7 +4,7 @@
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-d298aca9.js';
7
- import { r as request, N as NODEJS_DEFAULT_REFERER_HEADER, c as cleanUrl, e as encodeQueryString, A as ArcGISAuthError, g as getProp, s as state } from './solution-store-5d068b07.js';
7
+ import { r as request, N as NODEJS_DEFAULT_REFERER_HEADER, c as cleanUrl, e as encodeQueryString, A as ArcGISAuthError, g as getProp, s as state } from './solution-store-70f874f8.js';
8
8
  import { g as getLocaleComponentStrings } from './locale-54cac39a.js';
9
9
  import './index-4c4a4f3d.js';
10
10
  import './interfaces-523c6558.js';
@@ -4,7 +4,7 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
6
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-d298aca9.js';
7
- import { s as state } from './solution-store-5d068b07.js';
7
+ import { s as state } from './solution-store-70f874f8.js';
8
8
  import { g as getLocaleComponentStrings } from './locale-54cac39a.js';
9
9
  import './interfaces-523c6558.js';
10
10
  import './index-4c4a4f3d.js';
@@ -897,7 +897,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
897
897
  });
898
898
 
899
899
  /*!
900
- * @esri/arcgis-html-sanitizer - v3.0.0 - Mon Aug 22 2022 11:29:01 GMT-0400 (Eastern Daylight Time)
900
+ * @esri/arcgis-html-sanitizer - v3.0.1 - Tue Nov 15 2022 09:46:54 GMT-0800 (Pacific Standard Time)
901
901
  * Copyright (c) 2022 - Environmental Systems Research Institute, Inc.
902
902
  * Apache-2.0
903
903
  *
@@ -2132,7 +2132,7 @@ function parseTag$1(html, onTag, escapeHtml) {
2132
2132
  lastPos = currentPos;
2133
2133
  continue;
2134
2134
  }
2135
- if (c === ">" || currentPos === len - 1) {
2135
+ if (c === ">") {
2136
2136
  rethtml += escapeHtml(html.slice(lastPos, tagStart));
2137
2137
  currentHtml = html.slice(tagStart, currentPos + 1);
2138
2138
  currentTagName = getTagName(currentHtml);
@@ -2167,7 +2167,7 @@ function parseTag$1(html, onTag, escapeHtml) {
2167
2167
  }
2168
2168
  }
2169
2169
  }
2170
- if (lastPos < len) {
2170
+ if (lastPos < html.length) {
2171
2171
  rethtml += escapeHtml(html.substr(lastPos));
2172
2172
  }
2173
2173
 
@@ -3,4 +3,4 @@
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 t,h as i,H as e,g as s,c as a}from"./p-f8be5d5f.js";import{l as o}from"./p-d7ddd3a2.js";import{g as l}from"./p-fc2277fe.js";import{i as n,b as c,g as h,j as r}from"./p-390d7de8.js";import{d}from"./p-2e0db581.js";import{g as p}from"./p-92de1de9.js";import"./p-e1a4994d.js";const m=class{constructor(i){t(this,i),this._fieldNames=[],this._graphics=[],this.onTableNodeCreate=t=>{this._tableNode=t,this._getTable(t)},this.mapView=void 0,this._layerView=void 0,this._selectedIndexes=[],this._translations=void 0}async mapViewWatchHandler(){const t=await n(this.mapView);this._layerView=await c(this.mapView,t[0])}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return this._layerView?i(e,null,this._getTableControlRow(),i("div",{class:"table-div width-full"},i("calcite-panel",{class:"height-full width-full"},i("div",{ref:this.onTableNodeCreate}))),i("edit-record-modal",{ref:t=>this._editMultipleMpdal=t})):null}async _initModules(){const[t]=await o(["esri/widgets/FeatureTable"]);this.FeatureTable=t}_getTableControlRow(){const t=this._selectedIndexes.length>0,e=this._selectedIndexes.length>1;return i("div",{class:"display-flex table-border"},i("map-layer-picker",{mapView:this.mapView,onLayerSelectionChange:t=>this._layerSelectionChanged(t)}),i("div",null,i("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"magnifying-glass",onClick:()=>this._zoom()},this._translations.zoom),i("calcite-button",{appearance:"transparent",color:"neutral",disabled:!e,iconStart:"pencil",onClick:()=>this._editMultiple()},this._translations.editMultiple),i("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"trash",onClick:()=>this._delete()},this._translations.delete),i("calcite-split-button",{appearance:"transparent",color:"neutral","primary-text":this._translations.more},i("calcite-dropdown-group",{"selection-mode":"none"},i("calcite-dropdown-item",{iconStart:"list-check-all",onClick:()=>this._selectAll(!0)},this._translations.selectAll),i("calcite-dropdown-item",{iconStart:"selected-items-filter",onClick:()=>this._showSelected()},this._translations.showSelected),i("calcite-dropdown-item",{iconStart:"erase",onClick:()=>this._clearSelection()},this._translations.clearSelection),i("calcite-dropdown-item",{iconStart:"refresh",onClick:()=>this._switchSelected()},this._translations.switchSelected),i("calcite-dropdown-item",{iconStart:"export",onClick:()=>this._exportToCSV()},this._translations.exportCSV)))))}_getTable(t){var i;(null===(i=this._layerView)||void 0===i?void 0:i.layer)&&(this._table=new this.FeatureTable({layer:this._layerView.layer,view:this.mapView,editingEnabled:!0,highlightOnRowSelectEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},container:t}))}_selectAll(t){this._selectedIndexes=t?this._graphics.map(((t,i)=>i)):[]}_showSelected(){console.log("_showSelected")}_clearSelection(){this._selectedIndexes=[]}_switchSelected(){const t=[...this._selectedIndexes];this._selectedIndexes=this._graphics.reduce(((i,e,s)=>(t.indexOf(s)<0&&i.push(s),i)),[])}_exportToCSV(){d([],this._layerView.layer,this._getSelectedIds(),!1,!1,!0)}_zoom(){const t=this._getSelectedIds();h(t,this._layerView,this.mapView,!0)}_editMultiple(){this._editMultipleMpdal.open=!0}_delete(){console.log("delete")}_getGraphics(t){return this._graphics.filter(((i,e)=>t.indexOf(e)>-1))}_getSelectedIds(){return this._getGraphics(this._selectedIndexes).map((t=>t.getObjectId()))}_rowSelected(t){const i=this._selectedIndexes.indexOf(t);i>-1?(this._selectedIndexes.splice(i,1),this._selectedIndexes=[...this._selectedIndexes]):this._selectedIndexes=[...this._selectedIndexes,t]}async _layerSelectionChanged(t){const i=t.detail[0];this._layerView=await c(this.mapView,i),this._fieldNames=this._layerView.layer.fields.map((t=>t.alias||t.name)),this._graphics=await r(0,this._layerView.layer,[]),this._selectedIndexes=[],this._table.layer=this._layerView.layer,this._table.render()}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};m.style=":host{display:block}.table-div{height:calc(100% - 35px)}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}";const u=class{constructor(i){t(this,i),this.expandMap=a(this,"expandMap",7),this.mapChanged=a(this,"mapChanged",7),this._loadedId="",this.mapInfos=[],this.mapView=void 0,this._mapListExpanded=!1,this._translations=void 0,this._webMapId=""}_webMapIdWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._loadMap(t)}mapInfosWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._loadMap(t[0].id)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}componentDidRender(){this._loadMap(this._webMapId)}render(){return i(e,null,this._getToolbar(),this._getMapNameList(this._mapListExpanded),i("div",{class:"map-height",ref:t=>this._mapDiv=t}))}async _initModules(){const[t,i]=await o(["esri/WebMap","esri/views/MapView"]);this.WebMap=t,this.MapView=i}_getToolbar(){return i("div",{class:"display-flex"},i("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getMapPicker(),this._getActionGroup("home",!1,this._translations.home,(()=>this._goHome())),this._getActionGroup("list",!1,this._translations.list,(()=>this._showList())),this._getActionGroup("magnifying-glass-plus",!1,this._translations.search,(()=>this._search())),this._getActionGroup("plus",!1,this._translations.zoomIn,(()=>this._zoomIn())),this._getActionGroup("minus",!1,this._translations.zoomOut,(()=>this._zoomOut())),this._getActionGroup("expand",!1,this._translations.expand,(()=>this._expand()))))}_loadMap(t){if(""===t&&this.mapInfos.length>0&&(t=this.mapInfos[0].id),this._loadedId!==t){const i=new this.WebMap({portalItem:{id:t}});this.mapView=new this.MapView({container:this._mapDiv,map:i,resizeAlign:"top-left"}),this._loadedId=t,this.mapChanged.emit(this.mapView)}}_getActionGroup(t,e,s,a){return i("calcite-action-group",{class:"action-center width-1-6",layout:"horizontal"},i("calcite-action",{alignment:"center",class:"width-full height-full",compact:!1,disabled:e,icon:t,id:t,onClick:a,text:""},i("calcite-icon",{icon:"cheveron-up",scale:"s",slot:"icon"})),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":t},i("span",null,s)))}_getMapPicker(){const t=this._mapListExpanded?"chevron-up":"chevron-down";return i("calcite-action-group",{class:"action-center width-1-6",layout:"horizontal"},i("calcite-block",{class:"action-center block-button width-full height-full display-grid",heading:"",onClick:()=>this._chooseMap()},i("calcite-icon",{icon:"map",scale:"s",slot:"icon"}),i("calcite-icon",{icon:t,scale:"s",slot:"icon"}),i("calcite-tooltip",{label:"",placement:"bottom"},i("span",null,this._translations.mapName))))}_getMapNameList(t){return i("div",{class:t?"map-list":"display-none"},i("calcite-pick-list",{id:"mapList"},this.mapInfos.map((t=>i("calcite-pick-list-item",{label:t.name,onClick:()=>this._webMapSelected(t.id),selected:t.id===this._loadedId,value:t.id})))))}_webMapSelected(t){this._mapListExpanded=!1,this._webMapId=t}_chooseMap(){this._mapListExpanded=!this._mapListExpanded}_goHome(){alert("go home")}_showList(){alert("show list")}_search(){alert("search")}_zoomIn(){alert("zoom in")}_zoomOut(){alert("zoom out")}_expand(){this.expandMap.emit(p.EXPAND)}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{_webMapId:["_webMapIdWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};u.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.action-bar-size{height:3.5rem;width:100%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.width-1-7{width:14.28%}.width-1-6{width:16.66%}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.display-grid{display:inline-grid}.block-button{border-bottom:0}.block-button:hover{background-color:var(--calcite-ui-foreground-2)}.block-button:active{background-color:var(--calcite-ui-foreground-3)}.map-list{position:absolute;inset:3.5rem 0 0 0;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1;width:100%;height:-moz-fit-content;height:fit-content}.map-height{height:calc(100% - 58px)}.display-none{display:none}.esri-zoom{display:none !important}";export{m as layer_table,u as map_card}
6
+ import{r as t,h as i,H as e,g as s,c as a}from"./p-f8be5d5f.js";import{l as o}from"./p-d7ddd3a2.js";import{g as l}from"./p-fc2277fe.js";import{i as n,b as c,g as h,j as r}from"./p-390d7de8.js";import{d}from"./p-be943993.js";import{g as p}from"./p-92de1de9.js";import"./p-e1a4994d.js";const m=class{constructor(i){t(this,i),this._fieldNames=[],this._graphics=[],this.onTableNodeCreate=t=>{this._tableNode=t,this._getTable(t)},this.mapView=void 0,this._layerView=void 0,this._selectedIndexes=[],this._translations=void 0}async mapViewWatchHandler(){const t=await n(this.mapView);this._layerView=await c(this.mapView,t[0])}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return this._layerView?i(e,null,this._getTableControlRow(),i("div",{class:"table-div width-full"},i("calcite-panel",{class:"height-full width-full"},i("div",{ref:this.onTableNodeCreate}))),i("edit-record-modal",{ref:t=>this._editMultipleMpdal=t})):null}async _initModules(){const[t]=await o(["esri/widgets/FeatureTable"]);this.FeatureTable=t}_getTableControlRow(){const t=this._selectedIndexes.length>0,e=this._selectedIndexes.length>1;return i("div",{class:"display-flex table-border"},i("map-layer-picker",{mapView:this.mapView,onLayerSelectionChange:t=>this._layerSelectionChanged(t)}),i("div",null,i("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"magnifying-glass",onClick:()=>this._zoom()},this._translations.zoom),i("calcite-button",{appearance:"transparent",color:"neutral",disabled:!e,iconStart:"pencil",onClick:()=>this._editMultiple()},this._translations.editMultiple),i("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"trash",onClick:()=>this._delete()},this._translations.delete),i("calcite-split-button",{appearance:"transparent",color:"neutral","primary-text":this._translations.more},i("calcite-dropdown-group",{"selection-mode":"none"},i("calcite-dropdown-item",{iconStart:"list-check-all",onClick:()=>this._selectAll(!0)},this._translations.selectAll),i("calcite-dropdown-item",{iconStart:"selected-items-filter",onClick:()=>this._showSelected()},this._translations.showSelected),i("calcite-dropdown-item",{iconStart:"erase",onClick:()=>this._clearSelection()},this._translations.clearSelection),i("calcite-dropdown-item",{iconStart:"refresh",onClick:()=>this._switchSelected()},this._translations.switchSelected),i("calcite-dropdown-item",{iconStart:"export",onClick:()=>this._exportToCSV()},this._translations.exportCSV)))))}_getTable(t){var i;(null===(i=this._layerView)||void 0===i?void 0:i.layer)&&(this._table=new this.FeatureTable({layer:this._layerView.layer,view:this.mapView,editingEnabled:!0,highlightOnRowSelectEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},container:t}))}_selectAll(t){this._selectedIndexes=t?this._graphics.map(((t,i)=>i)):[]}_showSelected(){console.log("_showSelected")}_clearSelection(){this._selectedIndexes=[]}_switchSelected(){const t=[...this._selectedIndexes];this._selectedIndexes=this._graphics.reduce(((i,e,s)=>(t.indexOf(s)<0&&i.push(s),i)),[])}_exportToCSV(){d([],this._layerView.layer,this._getSelectedIds(),!1,!1,!0)}_zoom(){const t=this._getSelectedIds();h(t,this._layerView,this.mapView,!0)}_editMultiple(){this._editMultipleMpdal.open=!0}_delete(){console.log("delete")}_getGraphics(t){return this._graphics.filter(((i,e)=>t.indexOf(e)>-1))}_getSelectedIds(){return this._getGraphics(this._selectedIndexes).map((t=>t.getObjectId()))}_rowSelected(t){const i=this._selectedIndexes.indexOf(t);i>-1?(this._selectedIndexes.splice(i,1),this._selectedIndexes=[...this._selectedIndexes]):this._selectedIndexes=[...this._selectedIndexes,t]}async _layerSelectionChanged(t){const i=t.detail[0];this._layerView=await c(this.mapView,i),this._fieldNames=this._layerView.layer.fields.map((t=>t.alias||t.name)),this._graphics=await r(0,this._layerView.layer,[]),this._selectedIndexes=[],this._table.layer=this._layerView.layer,this._table.render()}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};m.style=":host{display:block}.table-div{height:calc(100% - 35px)}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}";const u=class{constructor(i){t(this,i),this.expandMap=a(this,"expandMap",7),this.mapChanged=a(this,"mapChanged",7),this._loadedId="",this.mapInfos=[],this.mapView=void 0,this._mapListExpanded=!1,this._translations=void 0,this._webMapId=""}_webMapIdWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._loadMap(t)}mapInfosWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._loadMap(t[0].id)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}componentDidRender(){this._loadMap(this._webMapId)}render(){return i(e,null,this._getToolbar(),this._getMapNameList(this._mapListExpanded),i("div",{class:"map-height",ref:t=>this._mapDiv=t}))}async _initModules(){const[t,i]=await o(["esri/WebMap","esri/views/MapView"]);this.WebMap=t,this.MapView=i}_getToolbar(){return i("div",{class:"display-flex"},i("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getMapPicker(),this._getActionGroup("home",!1,this._translations.home,(()=>this._goHome())),this._getActionGroup("list",!1,this._translations.list,(()=>this._showList())),this._getActionGroup("magnifying-glass-plus",!1,this._translations.search,(()=>this._search())),this._getActionGroup("plus",!1,this._translations.zoomIn,(()=>this._zoomIn())),this._getActionGroup("minus",!1,this._translations.zoomOut,(()=>this._zoomOut())),this._getActionGroup("expand",!1,this._translations.expand,(()=>this._expand()))))}_loadMap(t){if(""===t&&this.mapInfos.length>0&&(t=this.mapInfos[0].id),this._loadedId!==t){const i=new this.WebMap({portalItem:{id:t}});this.mapView=new this.MapView({container:this._mapDiv,map:i,resizeAlign:"top-left"}),this._loadedId=t,this.mapChanged.emit(this.mapView)}}_getActionGroup(t,e,s,a){return i("calcite-action-group",{class:"action-center width-1-6",layout:"horizontal"},i("calcite-action",{alignment:"center",class:"width-full height-full",compact:!1,disabled:e,icon:t,id:t,onClick:a,text:""},i("calcite-icon",{icon:"cheveron-up",scale:"s",slot:"icon"})),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":t},i("span",null,s)))}_getMapPicker(){const t=this._mapListExpanded?"chevron-up":"chevron-down";return i("calcite-action-group",{class:"action-center width-1-6",layout:"horizontal"},i("calcite-block",{class:"action-center block-button width-full height-full display-grid",heading:"",onClick:()=>this._chooseMap()},i("calcite-icon",{icon:"map",scale:"s",slot:"icon"}),i("calcite-icon",{icon:t,scale:"s",slot:"icon"}),i("calcite-tooltip",{label:"",placement:"bottom"},i("span",null,this._translations.mapName))))}_getMapNameList(t){return i("div",{class:t?"map-list":"display-none"},i("calcite-pick-list",{id:"mapList"},this.mapInfos.map((t=>i("calcite-pick-list-item",{label:t.name,onClick:()=>this._webMapSelected(t.id),selected:t.id===this._loadedId,value:t.id})))))}_webMapSelected(t){this._mapListExpanded=!1,this._webMapId=t}_chooseMap(){this._mapListExpanded=!this._mapListExpanded}_goHome(){alert("go home")}_showList(){alert("show list")}_search(){alert("search")}_zoomIn(){alert("zoom in")}_zoomOut(){alert("zoom out")}_expand(){this.expandMap.emit(p.EXPAND)}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{_webMapId:["_webMapIdWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};u.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.action-bar-size{height:3.5rem;width:100%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.width-1-7{width:14.28%}.width-1-6{width:16.66%}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.display-grid{display:inline-grid}.block-button{border-bottom:0}.block-button:hover{background-color:var(--calcite-ui-foreground-2)}.block-button:active{background-color:var(--calcite-ui-foreground-3)}.map-list{position:absolute;inset:3.5rem 0 0 0;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1;width:100%;height:-moz-fit-content;height:fit-content}.map-height{height:calc(100% - 58px)}.display-none{display:none}.esri-zoom{display:none !important}";export{m as layer_table,u as map_card}
@@ -3,7 +3,7 @@
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 t,h as i,f as e,g as a,c as o,H as s,F as n}from"./p-f8be5d5f.js";import{c as l,d as c}from"./p-a4f08a98.js";import{b as r,i as h,a as d,n as m,j as p,l as u,g as b,t as g}from"./p-dd3d070d.js";import{c as f,d as w}from"./p-0d207a2c.js";import{c as v}from"./p-56fd542b.js";import{c as x,s as k,d as y,u as _}from"./p-6bbf6f62.js";import{g as C}from"./p-d1bcb992.js";import{c as z}from"./p-631b6461.js";import{u as D}from"./p-c0d3537c.js";import{S as L}from"./p-77182c3a.js";import{s as T,a as I,c as A}from"./p-5b5ad89d.js";import{q as j,m as H,d as M,a as W,s as S,h as R,b as $,g as F,k as E,t as U,i as O,c as B,f as N,e as P,n as V,r as J,j as K,l as q,o as G,p as X,L as Q}from"./p-325b39d1.js";import{C as Y,S as Z}from"./p-4281be43.js";import{I as tt}from"./p-14da4ba2.js";import{g as it}from"./p-fc2277fe.js";import{s as et,E as at}from"./p-826a814d.js";import{d as ot}from"./p-92de1de9.js";import"./p-062f1fe7.js";import"./p-89e6a976.js";import"./p-a458e487.js";import"./p-96397baa.js";import"./p-4e32bf8c.js";import"./p-e1a4994d.js";import"./p-4ff653eb.js";
6
+ import{r as t,h as i,f as e,g as a,c as o,H as s,F as n}from"./p-f8be5d5f.js";import{c as l,d as c}from"./p-a4f08a98.js";import{b as r,i as h,a as d,n as m,j as p,l as u,g as b,t as g}from"./p-dd3d070d.js";import{c as f,d as w}from"./p-0d207a2c.js";import{c as v}from"./p-56fd542b.js";import{c as x,s as k,d as y,u as _}from"./p-6bbf6f62.js";import{g as C}from"./p-d1bcb992.js";import{c as z}from"./p-631b6461.js";import{u as D}from"./p-c0d3537c.js";import{S as L}from"./p-77182c3a.js";import{s as T,a as I,c as A}from"./p-5b5ad89d.js";import{q as j,m as H,d as M,a as W,s as S,h as R,b as $,g as F,k as E,t as U,i as O,c as B,f as N,e as P,n as V,r as J,j as K,l as q,o as G,p as X,L as Q}from"./p-325b39d1.js";import{C as Y,S as Z}from"./p-4281be43.js";import{I as tt}from"./p-14da4ba2.js";import{g as it}from"./p-fc2277fe.js";import{s as et,E as at}from"./p-78719506.js";import{d as ot}from"./p-92de1de9.js";import"./p-062f1fe7.js";import"./p-89e6a976.js";import"./p-a458e487.js";import"./p-96397baa.js";import"./p-4e32bf8c.js";import"./p-e1a4994d.js";import"./p-4ff653eb.js";
7
7
  /*!
8
8
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
9
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.