@esri/solutions-components 0.7.25 → 0.7.27

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 (53) hide show
  1. package/dist/cjs/calcite-alert_4.cjs.entry.js +2 -2
  2. package/dist/cjs/calcite-flow_4.cjs.entry.js +43 -12
  3. package/dist/cjs/card-manager_3.cjs.entry.js +3 -1
  4. package/dist/cjs/crowdsource-reporter.cjs.entry.js +11 -22
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/{popupUtils-a73902a6.js → popupUtils-7755782a.js} +9 -12
  7. package/dist/cjs/solutions-components.cjs.js +1 -1
  8. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +0 -21
  9. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +27 -21
  10. package/dist/collection/components/feature-list/feature-list.js +43 -10
  11. package/dist/collection/components/info-card/info-card.js +1 -1
  12. package/dist/collection/components/layer-list/layer-list.js +2 -1
  13. package/dist/collection/components/layer-table/layer-table.js +3 -1
  14. package/dist/collection/demos/crowdsource-reporter.html +92 -58
  15. package/dist/collection/demos/feature-list.html +65 -17
  16. package/dist/collection/demos/layer-list.html +43 -3
  17. package/dist/collection/utils/interfaces.ts +1 -1
  18. package/dist/collection/utils/popupUtils.js +9 -12
  19. package/dist/collection/utils/popupUtils.ts +30 -32
  20. package/dist/components/crowdsource-reporter.js +12 -23
  21. package/dist/components/feature-list2.js +42 -10
  22. package/dist/components/info-card2.js +1 -1
  23. package/dist/components/layer-list2.js +2 -1
  24. package/dist/components/layer-table2.js +3 -1
  25. package/dist/components/popupUtils.js +9 -12
  26. package/dist/esm/calcite-alert_4.entry.js +2 -2
  27. package/dist/esm/calcite-flow_4.entry.js +43 -12
  28. package/dist/esm/card-manager_3.entry.js +3 -1
  29. package/dist/esm/crowdsource-reporter.entry.js +12 -23
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/esm/{popupUtils-a593bd78.js → popupUtils-d75edf93.js} +9 -12
  32. package/dist/esm/solutions-components.js +1 -1
  33. package/dist/solutions-components/demos/crowdsource-reporter.html +92 -58
  34. package/dist/solutions-components/demos/feature-list.html +65 -17
  35. package/dist/solutions-components/demos/layer-list.html +43 -3
  36. package/dist/solutions-components/p-515a319e.js +21 -0
  37. package/dist/solutions-components/p-6a452a84.entry.js +17 -0
  38. package/dist/solutions-components/p-8756eebb.entry.js +6 -0
  39. package/dist/solutions-components/{p-29f661f5.entry.js → p-934cbe40.entry.js} +2 -2
  40. package/dist/solutions-components/{p-5af99fd8.entry.js → p-9549b5b1.entry.js} +1 -1
  41. package/dist/solutions-components/solutions-components.esm.js +1 -1
  42. package/dist/solutions-components/utils/interfaces.ts +1 -1
  43. package/dist/solutions-components/utils/popupUtils.ts +30 -32
  44. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +5 -1
  45. package/dist/types/components/feature-list/feature-list.d.ts +8 -0
  46. package/dist/types/components.d.ts +19 -0
  47. package/dist/types/preact.d.ts +3 -1
  48. package/dist/types/utils/interfaces.d.ts +1 -1
  49. package/dist/types/utils/popupUtils.d.ts +3 -2
  50. package/package.json +1 -1
  51. package/dist/solutions-components/p-0b619197.entry.js +0 -17
  52. package/dist/solutions-components/p-db868283.js +0 -21
  53. package/dist/solutions-components/p-e88a64be.entry.js +0 -6
@@ -25,12 +25,13 @@ const locale = require('./locale-a476e15d.js');
25
25
  class PopupUtils {
26
26
  /**
27
27
  * Get the popup title that honors arcade expressions
28
- *
28
+ * @param graphic selected graphic
29
+ * @param map __esri.Map
29
30
  * @returns Promise resolving with the popup title
30
31
  *
31
32
  * @protected
32
33
  */
33
- async getPopupTitle(graphic) {
34
+ async getPopupTitle(graphic, map) {
34
35
  var _a, _b, _c;
35
36
  if (!this.arcade) {
36
37
  await this._initModules();
@@ -44,22 +45,18 @@ class PopupUtils {
44
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) {
45
46
  for (let i = 0; i < ((_c = layer.popupTemplate) === null || _c === void 0 ? void 0 : _c.expressionInfos.length); i++) {
46
47
  const info = layer.popupTemplate.expressionInfos[i];
47
- const profile = {
48
- variables: [
49
- {
50
- name: "$feature",
51
- type: "feature"
52
- }
53
- ]
54
- };
48
+ //create arcade profile for popup
49
+ const profile = this.arcade.createArcadeProfile('popup');
55
50
  try {
56
51
  const arcadeExecutor = await this.arcade.createArcadeExecutor(info.expression, profile);
57
- const arcadeTitle = arcadeExecutor.execute({ $feature: graphic });
52
+ const arcadeTitle = await arcadeExecutor.executeAsync({ $feature: graphic, $layer: layer, $map: map });
58
53
  if (arcadeTitle != null || arcadeTitle !== "") {
59
54
  attributes[`{expression/${info.name}}`.toUpperCase()] = arcadeTitle;
60
55
  }
61
56
  }
62
- catch (_d) {
57
+ catch (e) {
58
+ //log error in console to understand if the arcade expressions are failing
59
+ console.error(e);
63
60
  continue;
64
61
  }
65
62
  }