@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
@@ -23,12 +23,13 @@ import { l as loadModules } from './locale-731e75a8.js';
23
23
  class PopupUtils {
24
24
  /**
25
25
  * Get the popup title that honors arcade expressions
26
- *
26
+ * @param graphic selected graphic
27
+ * @param map __esri.Map
27
28
  * @returns Promise resolving with the popup title
28
29
  *
29
30
  * @protected
30
31
  */
31
- async getPopupTitle(graphic) {
32
+ async getPopupTitle(graphic, map) {
32
33
  var _a, _b, _c;
33
34
  if (!this.arcade) {
34
35
  await this._initModules();
@@ -42,22 +43,18 @@ class PopupUtils {
42
43
  if (popupTitle.includes("{expression/expr") && ((_b = layer === null || layer === void 0 ? void 0 : layer.popupTemplate) === null || _b === void 0 ? void 0 : _b.expressionInfos) != null) {
43
44
  for (let i = 0; i < ((_c = layer.popupTemplate) === null || _c === void 0 ? void 0 : _c.expressionInfos.length); i++) {
44
45
  const info = layer.popupTemplate.expressionInfos[i];
45
- const profile = {
46
- variables: [
47
- {
48
- name: "$feature",
49
- type: "feature"
50
- }
51
- ]
52
- };
46
+ //create arcade profile for popup
47
+ const profile = this.arcade.createArcadeProfile('popup');
53
48
  try {
54
49
  const arcadeExecutor = await this.arcade.createArcadeExecutor(info.expression, profile);
55
- const arcadeTitle = arcadeExecutor.execute({ $feature: graphic });
50
+ const arcadeTitle = await arcadeExecutor.executeAsync({ $feature: graphic, $layer: layer, $map: map });
56
51
  if (arcadeTitle != null || arcadeTitle !== "") {
57
52
  attributes[`{expression/${info.name}}`.toUpperCase()] = arcadeTitle;
58
53
  }
59
54
  }
60
- catch (_d) {
55
+ catch (e) {
56
+ //log error in console to understand if the arcade expressions are failing
57
+ console.error(e);
61
58
  continue;
62
59
  }
63
60
  }