@esri/solutions-components 0.8.21 → 0.8.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/dist/cjs/calcite-alert_4.cjs.entry.js +12 -11
  2. package/dist/cjs/calcite-flow_6.cjs.entry.js +8 -8
  3. package/dist/cjs/card-manager_3.cjs.entry.js +13 -7
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +13 -5
  5. package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
  6. package/dist/cjs/{downloadUtils-2e36a300.js → downloadUtils-5349717a.js} +2 -1
  7. package/dist/cjs/feature-list.cjs.entry.js +7 -3
  8. package/dist/cjs/{index.es-56415e48.js → index.es-aa69b58b.js} +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  11. package/dist/cjs/{popupUtils-500c1544.js → popupUtils-3e65296c.js} +17 -2
  12. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/components/card-manager/card-manager.js +1 -1
  15. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +31 -9
  16. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +1 -1
  17. package/dist/collection/components/feature-details/feature-details.css +2 -2
  18. package/dist/collection/components/feature-details/feature-details.js +6 -6
  19. package/dist/collection/components/feature-list/feature-list.css +1 -1
  20. package/dist/collection/components/feature-list/feature-list.js +1 -1
  21. package/dist/collection/components/info-card/info-card.js +7 -27
  22. package/dist/collection/components/layer-list/layer-list.js +1 -1
  23. package/dist/collection/components/layer-table/layer-table.js +11 -5
  24. package/dist/collection/demos/crowdsource-manager.html +10 -2
  25. package/dist/collection/utils/popupUtils.js +17 -2
  26. package/dist/collection/utils/popupUtils.ts +23 -3
  27. package/dist/components/card-manager2.js +1 -1
  28. package/dist/components/consent-manager.js +1 -1
  29. package/dist/components/crowdsource-manager.js +14 -6
  30. package/dist/components/crowdsource-reporter.js +1 -1
  31. package/dist/components/downloadUtils.js +1 -1
  32. package/dist/components/esri-loader.js +1 -1
  33. package/dist/components/feature-details2.js +7 -7
  34. package/dist/components/feature-list2.js +2 -2
  35. package/dist/components/html2canvas.js +1 -1
  36. package/dist/components/index.es.js +2 -2
  37. package/dist/components/info-card2.js +7 -11
  38. package/dist/components/instant-apps-interactive-legend-classic2.js +1 -1
  39. package/dist/components/layer-list2.js +1 -1
  40. package/dist/components/layer-table2.js +11 -5
  41. package/dist/components/popupUtils.js +17 -2
  42. package/dist/components/purify.js +1 -1
  43. package/dist/components/solution-resource.js +1 -1
  44. package/dist/esm/calcite-alert_4.entry.js +12 -11
  45. package/dist/esm/calcite-flow_6.entry.js +8 -8
  46. package/dist/esm/card-manager_3.entry.js +13 -7
  47. package/dist/esm/crowdsource-manager.entry.js +13 -5
  48. package/dist/esm/crowdsource-reporter.entry.js +1 -1
  49. package/dist/esm/{downloadUtils-aab31bfe.js → downloadUtils-5fa0d437.js} +2 -2
  50. package/dist/esm/feature-list.entry.js +7 -3
  51. package/dist/esm/{index.es-43ba3006.js → index.es-57c15c9b.js} +1 -1
  52. package/dist/esm/loader.js +1 -1
  53. package/dist/esm/map-select-tools_3.entry.js +1 -1
  54. package/dist/esm/{popupUtils-2cc3c366.js → popupUtils-650b6bba.js} +17 -2
  55. package/dist/esm/public-notification.entry.js +1 -1
  56. package/dist/esm/solutions-components.js +1 -1
  57. package/dist/solutions-components/demos/crowdsource-manager.html +10 -2
  58. package/dist/solutions-components/{p-667caa6b.js → p-24bf45b7.js} +1 -1
  59. package/dist/solutions-components/{p-88f73319.entry.js → p-41d288c0.entry.js} +1 -1
  60. package/dist/solutions-components/p-63460d51.entry.js +6 -0
  61. package/dist/solutions-components/{p-f6668347.entry.js → p-64da5bb8.entry.js} +3 -3
  62. package/dist/solutions-components/{p-37fc92db.js → p-6f69de4d.js} +2 -2
  63. package/dist/solutions-components/{p-8cff32bd.entry.js → p-72317f8e.entry.js} +2 -2
  64. package/dist/solutions-components/p-88495699.entry.js +6 -0
  65. package/dist/solutions-components/{p-54324eaa.entry.js → p-97e343df.entry.js} +1 -1
  66. package/dist/solutions-components/p-a1037b19.js +21 -0
  67. package/dist/solutions-components/{p-48c99a48.entry.js → p-c36bb8ca.entry.js} +1 -1
  68. package/dist/solutions-components/p-f6a1673c.entry.js +6 -0
  69. package/dist/solutions-components/solutions-components.esm.js +1 -1
  70. package/dist/solutions-components/utils/popupUtils.ts +23 -3
  71. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +14 -6
  72. package/dist/types/components/info-card/info-card.d.ts +0 -4
  73. package/dist/types/components.d.ts +11 -14
  74. package/dist/types/preact.d.ts +3 -2
  75. package/dist/types/utils/popupUtils.d.ts +4 -0
  76. package/package.json +1 -1
  77. package/dist/solutions-components/p-1cf1a4d5.entry.js +0 -6
  78. package/dist/solutions-components/p-51d2370c.entry.js +0 -6
  79. package/dist/solutions-components/p-64779bb2.entry.js +0 -6
  80. package/dist/solutions-components/p-ebf82ce0.js +0 -21
@@ -8,7 +8,7 @@ import { a as getComponentClosestLanguage, l as loadModules, g as getLocaleCompo
8
8
  import { e as goToSelection, h as highlightFeatures, k as queryObjectIds, l as getQueryGeoms, c as getFeatureLayerView, m as queryFeaturesByGeometry, n as getIdSets, o as highlightAllFeatures } from './mapViewUtils-4618ddb8.js';
9
9
  import { a as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-586e863c.js';
10
10
  import { s as state } from './publicNotificationStore-74c7e9f4.js';
11
- import { d as downloadCSV, a as downloadPDF } from './downloadUtils-aab31bfe.js';
11
+ import { d as downloadCSV, a as downloadPDF } from './downloadUtils-5fa0d437.js';
12
12
  import './esri-loader-2bf735ed.js';
13
13
  import './index-c06194fa.js';
14
14
  import './solution-resource-0d0eb597.js';
@@ -3,6 +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 { _ as _prepareAttributeValue } from './downloadUtils-5fa0d437.js';
6
7
  import { l as loadModules } from './locale-a490c4f6.js';
7
8
 
8
9
  /** @license
@@ -40,6 +41,7 @@ class PopupUtils {
40
41
  }
41
42
  const layer = graphic.layer;
42
43
  const popupTitle = this._removeTags((_a = layer === null || layer === void 0 ? void 0 : layer.popupTemplate) === null || _a === void 0 ? void 0 : _a.title);
44
+ //resolve arcade expression from the popup title
43
45
  if (popupTitle.includes("{expression/expr") && ((_b = layer === null || layer === void 0 ? void 0 : layer.popupTemplate) === null || _b === void 0 ? void 0 : _b.expressionInfos) != null) {
44
46
  for (let i = 0; i < ((_c = layer.popupTemplate) === null || _c === void 0 ? void 0 : _c.expressionInfos.length); i++) {
45
47
  const info = layer.popupTemplate.expressionInfos[i];
@@ -59,6 +61,17 @@ class PopupUtils {
59
61
  }
60
62
  }
61
63
  }
64
+ //Format field values
65
+ if (layer.popupTemplate.fieldInfos) {
66
+ layer.fields.forEach((field) => {
67
+ const attributeValue = graphic.attributes[field.name];
68
+ //get the field info from popupTemplate
69
+ const fieldInfo = layer.popupTemplate.fieldInfos.find((fInfo) => fInfo.fieldName.toLowerCase() === field.name.toLowerCase());
70
+ //format the attribute value
71
+ const formattedAttributeValue = _prepareAttributeValue(attributeValue, field.type, field.domain, fieldInfo === null || fieldInfo === void 0 ? void 0 : fieldInfo.format, this.intl);
72
+ attributes[`{${field.name.toUpperCase()}}`] = formattedAttributeValue;
73
+ });
74
+ }
62
75
  return popupTitle === null || popupTitle === void 0 ? void 0 : popupTitle.replace(/{.*?}/g, (placeholder) => {
63
76
  return attributes[placeholder.toUpperCase()] != null ? attributes[placeholder.toUpperCase()] : "";
64
77
  });
@@ -84,10 +97,12 @@ class PopupUtils {
84
97
  * @protected
85
98
  */
86
99
  async _initModules() {
87
- const [arcade] = await loadModules([
88
- "esri/arcade"
100
+ const [arcade, intl] = await loadModules([
101
+ "esri/arcade",
102
+ "esri/intl"
89
103
  ]);
90
104
  this.arcade = arcade;
105
+ this.intl = intl;
91
106
  }
92
107
  }
93
108
 
@@ -8,7 +8,7 @@ import { b as EExportType, c as EPageType, a as EWorkflowType } from './interfac
8
8
  import { l as loadModules, g as getLocaleComponentStrings } from './locale-a490c4f6.js';
9
9
  import { e as goToSelection, h as highlightFeatures } from './mapViewUtils-4618ddb8.js';
10
10
  import { s as state } from './publicNotificationStore-74c7e9f4.js';
11
- import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-aab31bfe.js';
11
+ import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-5fa0d437.js';
12
12
  import './esri-loader-2bf735ed.js';
13
13
  import './index-c06194fa.js';
14
14
  import './solution-resource-0d0eb597.js';