@esri/solutions-components 0.6.45 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/cjs/card-manager_3.cjs.entry.js +1 -1
  2. package/dist/cjs/{downloadUtils-d017810f.js → downloadUtils-e3e595e9.js} +30 -52
  3. package/dist/cjs/{index.es-de35a9a4.js → index.es-047537b5.js} +1 -1
  4. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  5. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  6. package/dist/collection/demos/new-public-notification.html +16 -2
  7. package/dist/collection/utils/downloadUtils.js +28 -50
  8. package/dist/collection/utils/downloadUtils.ts +7 -13
  9. package/dist/components/downloadUtils.js +28 -50
  10. package/dist/esm/card-manager_3.entry.js +1 -1
  11. package/dist/esm/{downloadUtils-a3f28bae.js → downloadUtils-8fbd1347.js} +29 -51
  12. package/dist/esm/{index.es-e0432a23.js → index.es-b6705ce7.js} +1 -1
  13. package/dist/esm/map-select-tools_3.entry.js +1 -1
  14. package/dist/esm/public-notification.entry.js +1 -1
  15. package/dist/solutions-components/demos/new-public-notification.html +16 -2
  16. package/dist/solutions-components/{p-02b1befe.js → p-072680a5.js} +12 -12
  17. package/dist/solutions-components/{p-5d5d10d5.js → p-092fd5d9.js} +1 -1
  18. package/dist/solutions-components/{p-4fbf3997.entry.js → p-11cb7b04.entry.js} +1 -1
  19. package/dist/solutions-components/{p-94d64f05.entry.js → p-7f793144.entry.js} +1 -1
  20. package/dist/solutions-components/{p-5a5676d4.entry.js → p-f367db61.entry.js} +1 -1
  21. package/dist/solutions-components/solutions-components.esm.js +1 -1
  22. package/dist/solutions-components/utils/downloadUtils.ts +7 -13
  23. package/dist/types/utils/downloadUtils.d.ts +1 -9
  24. package/package.json +1 -1
@@ -25,7 +25,6 @@ import * as common from "@esri/solution-common";
25
25
 
26
26
  export { ILabel } from "./pdfUtils";
27
27
 
28
- /*
29
28
  interface IArcadeExecutors {
30
29
  [expressionName: string]: __esri.ArcadeExecutor;
31
30
  }
@@ -33,7 +32,6 @@ interface IArcadeExecutors {
33
32
  interface IArcadeExecutorPromises {
34
33
  [expressionName: string]: Promise<__esri.ArcadeExecutor>;
35
34
  }
36
- */
37
35
 
38
36
  export interface IAttributeOrigNames {
39
37
  [lowercaseName: string]: string;
@@ -381,7 +379,6 @@ export async function _convertPopupArcadeToLabelSpec(
381
379
  * @param layer Layer from which to fetch features
382
380
  * @return Promise resolving to a set of executors keyed using the expression name
383
381
  */
384
- /*
385
382
  async function _createArcadeExecutors(
386
383
  labelFormat: string,
387
384
  layer: __esri.FeatureLayer
@@ -453,7 +450,6 @@ async function _createArcadeExecutors(
453
450
  }
454
451
  );
455
452
  }
456
- */
457
453
 
458
454
  /**
459
455
  * Creates a title from a list of selection set names.
@@ -944,7 +940,7 @@ export async function _prepareLabels(
944
940
  const labels
945
941
  = labelFormatProps.labelFormat.type === "pattern" ?
946
942
  // Export attributes in format
947
- await _prepareLabelsFromPattern(/*layer,*/ featureSet, attributeOrigNames, attributeTypes, attributeDomains,
943
+ await _prepareLabelsFromPattern(layer, featureSet, attributeOrigNames, attributeTypes, attributeDomains,
948
944
  labelFormatProps.attributeFormats, labelFormatProps.labelFormat.format as string, includeHeaderNames)
949
945
 
950
946
  : labelFormatProps.labelFormat.type === "executor" ?
@@ -1015,7 +1011,7 @@ export async function _prepareLabelsFromAll(
1015
1011
  * @returns Promise resolving with list of labels, each of which is a list of label lines
1016
1012
  */
1017
1013
  export async function _prepareLabelsFromPattern(
1018
- //layer: __esri.FeatureLayer,
1014
+ layer: __esri.FeatureLayer,
1019
1015
  featureSet: __esri.Graphic[],
1020
1016
  attributeOrigNames: IAttributeOrigNames,
1021
1017
  attributeTypes: IAttributeTypes,
@@ -1031,26 +1027,24 @@ export async function _prepareLabelsFromPattern(
1031
1027
  const attributeNames = _getFieldNamesFromFieldExpressions(attributeExpressionMatches);
1032
1028
 
1033
1029
  // Do we need any Arcade executors?
1034
- //const arcadeExecutors = await _createArcadeExecutors(labelFormat, layer);
1035
- //const arcadeExpressionRegExp = /\{expression\/\w+\}/g;
1030
+ const arcadeExecutors = await _createArcadeExecutors(labelFormat, layer);
1031
+ const arcadeExpressionRegExp = /\{expression\/\w+\}/g;
1036
1032
 
1037
1033
  // Find the label fields that we need to replace with values
1038
- //const arcadeExpressionMatches = labelFormat.match(arcadeExpressionRegExp) ?? [];
1034
+ const arcadeExpressionMatches = labelFormat.match(arcadeExpressionRegExp) ?? [];
1039
1035
 
1040
1036
  // Convert feature attributes into an array of labels
1041
1037
  const labels = await Promise.all(featureSet.map(
1042
1038
  async feature => {
1043
1039
  let labelPrep = labelFormat;
1044
1040
 
1045
- /*
1046
- // Replace Arcade expressions in this feature
1041
+ //Replace Arcade expressions in this feature
1047
1042
  for (let i = 0; i < arcadeExpressionMatches.length; i++) {
1048
1043
  const match: string = arcadeExpressionMatches[i];
1049
1044
  const expressionName = match.substring(match.indexOf("/") + 1, match.length - 1);
1050
- const value = await arcadeExecutors[expressionName].executeAsync({"$feature": feature, "$layer", layer});
1045
+ const value = await arcadeExecutors[expressionName].executeAsync({"$feature": feature, "$layer": layer});
1051
1046
  labelPrep = labelPrep.replace(match, value);
1052
1047
  }
1053
- */
1054
1048
 
1055
1049
  // Replace non-Arcade fields in this feature
1056
1050
  const attributeValues = feature.attributes ?? feature;
@@ -142,14 +142,6 @@ export declare function _convertPopupTextToLabelSpec(popupInfo: string): ILabelF
142
142
  * @return Promise resolving to an "executor" label spec
143
143
  */
144
144
  export declare function _convertPopupArcadeToLabelSpec(expressionInfo: __esri.ElementExpressionInfo): Promise<ILabelFormat>;
145
- /**
146
- * Extracts Arcade expressions from the lines of a label format and creates an Arcade executor for each
147
- * referenced expression name.
148
- *
149
- * @param labelFormat Label to examine
150
- * @param layer Layer from which to fetch features
151
- * @return Promise resolving to a set of executors keyed using the expression name
152
- */
153
145
  /**
154
146
  * Creates a title from a list of selection set names.
155
147
  *
@@ -261,7 +253,7 @@ export declare function _prepareLabelsFromAll(featureSet: __esri.Graphic[], attr
261
253
  * @param includeHeaderNames Add the label format at the front of the list of generated labels
262
254
  * @returns Promise resolving with list of labels, each of which is a list of label lines
263
255
  */
264
- export declare function _prepareLabelsFromPattern(featureSet: __esri.Graphic[], attributeOrigNames: IAttributeOrigNames, attributeTypes: IAttributeTypes, attributeDomains: IAttributeDomains, attributeFormats: IAttributeFormats, labelFormat: string, includeHeaderNames?: boolean): Promise<string[][]>;
256
+ export declare function _prepareLabelsFromPattern(layer: __esri.FeatureLayer, featureSet: __esri.Graphic[], attributeOrigNames: IAttributeOrigNames, attributeTypes: IAttributeTypes, attributeDomains: IAttributeDomains, attributeFormats: IAttributeFormats, labelFormat: string, includeHeaderNames?: boolean): Promise<string[][]>;
265
257
  /**
266
258
  * Creates labels from attributes in an Arcade label.
267
259
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solutions-components",
3
- "version": "0.6.45",
3
+ "version": "0.7.0",
4
4
  "description": "Web Components for Esri's Solutions Applications",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",