@esri/solutions-components 0.7.41 → 0.7.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/dist/cjs/card-manager_3.cjs.entry.js +20 -23
  2. package/dist/cjs/{downloadUtils-b10e3b8c.js → downloadUtils-7d4985c0.js} +5 -3
  3. package/dist/cjs/{index.es-b9d6eff6.js → index.es-8cef354a.js} +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  6. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  7. package/dist/cjs/solutions-components.cjs.js +1 -1
  8. package/dist/collection/components/layer-table/layer-table.js +21 -24
  9. package/dist/collection/utils/downloadUtils.js +4 -2
  10. package/dist/collection/utils/downloadUtils.ts +4 -2
  11. package/dist/components/downloadUtils.js +4 -2
  12. package/dist/components/layer-table2.js +20 -23
  13. package/dist/esm/card-manager_3.entry.js +20 -23
  14. package/dist/esm/{downloadUtils-20d22198.js → downloadUtils-d5928e55.js} +5 -3
  15. package/dist/esm/{index.es-8b85f68d.js → index.es-a1725c19.js} +1 -1
  16. package/dist/esm/loader.js +1 -1
  17. package/dist/esm/map-select-tools_3.entry.js +1 -1
  18. package/dist/esm/public-notification.entry.js +1 -1
  19. package/dist/esm/solutions-components.js +1 -1
  20. package/dist/solutions-components/{p-f6536eae.js → p-12fc82a9.js} +2 -2
  21. package/dist/solutions-components/{p-2283ae14.entry.js → p-3e88e0bd.entry.js} +1 -1
  22. package/dist/solutions-components/p-52945707.entry.js +6 -0
  23. package/dist/solutions-components/{p-17e328bb.js → p-7f374ec7.js} +1 -1
  24. package/dist/solutions-components/{p-69a1df0f.entry.js → p-ac9c29da.entry.js} +1 -1
  25. package/dist/solutions-components/solutions-components.esm.js +1 -1
  26. package/dist/solutions-components/utils/downloadUtils.ts +4 -2
  27. package/dist/types/components/layer-table/layer-table.d.ts +4 -4
  28. package/package.json +1 -1
  29. package/dist/solutions-components/p-aecf92f4.entry.js +0 -6
@@ -10,7 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  const index = require('./index-105cf2b9.js');
11
11
  const locale = require('./locale-8c42ba7a.js');
12
12
  const mapViewUtils = require('./mapViewUtils-290dbc9e.js');
13
- const downloadUtils = require('./downloadUtils-b10e3b8c.js');
13
+ const downloadUtils = require('./downloadUtils-7d4985c0.js');
14
14
  require('./esri-loader-a91c0ec1.js');
15
15
  require('./_commonjsHelpers-384729db.js');
16
16
  require('./interfaces-7cd0a48a.js');
@@ -209,6 +209,16 @@ const LayerTable = class {
209
209
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
210
210
  }
211
211
  }
212
+ /**
213
+ * Update the toolbar when the share button is enabled/disabled
214
+ */
215
+ enableShareWatchHandler() {
216
+ // this should be caught by component did render and is when I test locally
217
+ // however have had reported case where it is not somehow on devext so adding explicit check here
218
+ if (this._toolbar) {
219
+ this._updateToolbar();
220
+ }
221
+ }
212
222
  /**
213
223
  * watch for changes to the list of controls that will currently fit in the display
214
224
  */
@@ -234,17 +244,6 @@ const LayerTable = class {
234
244
  this._initToolInfos();
235
245
  }
236
246
  }
237
- /**
238
- * watch for changes in map info and recheck the tool infos
239
- */
240
- async mapInfoWatchHandler() {
241
- var _a;
242
- if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
243
- this._initToolInfos();
244
- }
245
- this._initLayerExpressions();
246
- this._resetColumnTemplates();
247
- }
248
247
  /**
249
248
  * watch for changes in map view and get the first layer
250
249
  */
@@ -719,7 +718,7 @@ const LayerTable = class {
719
718
  this._setControlsThatFit(controlsThatFit, skipControls);
720
719
  }
721
720
  }
722
- }, 5);
721
+ }, 250);
723
722
  }
724
723
  }
725
724
  /**
@@ -944,7 +943,6 @@ const LayerTable = class {
944
943
  },
945
944
  container: node
946
945
  });
947
- this._table.columnPerformanceModeEnabled = false;
948
946
  });
949
947
  this._initColumnsInfo();
950
948
  this._checkEditEnabled();
@@ -1077,19 +1075,17 @@ const LayerTable = class {
1077
1075
  if (!this._table) {
1078
1076
  await this._getTable(this._tableNode, columnTemplates);
1079
1077
  }
1080
- else if (columnTemplates) {
1081
- this._table.tableTemplate.columnTemplates = columnTemplates;
1082
- }
1083
1078
  this._table.layer = this._layer;
1084
1079
  this._table.view = this.mapView;
1085
1080
  this._checkEditEnabled();
1086
1081
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1087
1082
  this._initToolInfos();
1088
- await this._table.when(async () => {
1083
+ await this.reactiveUtils.once(() => this._table.state === "loaded")
1084
+ .then(async () => {
1089
1085
  var _a, _b;
1090
1086
  this._table.highlightIds.removeAll();
1091
1087
  this._table.clearSelectionFilter();
1092
- this._initColumnsInfo();
1088
+ this._resetColumnTemplates();
1093
1089
  if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
1094
1090
  this._selectDefaultFeature(this.defaultOid);
1095
1091
  this._defaultOidHonored = true;
@@ -1107,10 +1103,11 @@ const LayerTable = class {
1107
1103
  this._filterActive = true;
1108
1104
  this._defaultFilterHonored = true;
1109
1105
  }
1106
+ this._showOnlySelected = false;
1107
+ this._sortActive = false;
1108
+ await this._sortTable();
1109
+ this._updateToolbar();
1110
1110
  });
1111
- this._showOnlySelected = false;
1112
- this._sortActive = false;
1113
- await this._sortTable();
1114
1111
  }
1115
1112
  /**
1116
1113
  * Store the column names and current hidden status to support show/hide of columns
@@ -1518,9 +1515,9 @@ const LayerTable = class {
1518
1515
  static get watchers() { return {
1519
1516
  "enableCSV": ["enableCSVWatchHandler"],
1520
1517
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1518
+ "enableShare": ["enableShareWatchHandler"],
1521
1519
  "_controlsThatFit": ["_controlsThatFitWatchHandler"],
1522
1520
  "isMobile": ["isMobileWatchHandler"],
1523
- "mapInfo": ["mapInfoWatchHandler"],
1524
1521
  "mapView": ["mapViewWatchHandler"],
1525
1522
  "_layer": ["_layerWatchHandler"],
1526
1523
  "selectedIds": ["selectedIdsWatchHandler"],
@@ -1510,7 +1510,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
1510
1510
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1511
1511
  * ====================================================================
1512
1512
  */
1513
- function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-b9d6eff6.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},
1513
+ function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-8cef354a.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},
1514
1514
  /** ====================================================================
1515
1515
  * @license
1516
1516
  * jsPDF XMP metadata plugin
@@ -2927,6 +2927,9 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
2927
2927
  * @returns Promise resolving when function is done
2928
2928
  */
2929
2929
  async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = [], useFieldAliasNames = false) {
2930
+ if (fields.length === 0) {
2931
+ fields = layer.fields.map(f => f.name.toLowerCase());
2932
+ }
2930
2933
  // Get the label formatting, if any
2931
2934
  const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
2932
2935
  // Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
@@ -2985,8 +2988,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
2985
2988
  }
2986
2989
  else {
2987
2990
  // Get the features to export
2988
- const outFields = fields.length > 0 ? fields : undefined;
2989
- featureSet = await mapViewUtils.queryFeaturesByID(ids, featureLayer, [], false, undefined, outFields);
2991
+ featureSet = await mapViewUtils.queryFeaturesByID(ids, featureLayer, [], false, undefined, fields);
2990
2992
  }
2991
2993
  // Get field data types. Do we have any domain-based fields?
2992
2994
  const attributeOrigNames = {};
@@ -6,7 +6,7 @@
6
6
  'use strict';
7
7
 
8
8
  const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
9
- const downloadUtils = require('./downloadUtils-b10e3b8c.js');
9
+ const downloadUtils = require('./downloadUtils-7d4985c0.js');
10
10
  require('./index-105cf2b9.js');
11
11
  require('./locale-8c42ba7a.js');
12
12
  require('./esri-loader-a91c0ec1.js');