@esri/solutions-components 0.7.25 → 0.7.27
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-alert_4.cjs.entry.js +2 -2
- package/dist/cjs/calcite-flow_4.cjs.entry.js +43 -12
- package/dist/cjs/card-manager_3.cjs.entry.js +3 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +11 -22
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{popupUtils-a73902a6.js → popupUtils-7755782a.js} +9 -12
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +0 -21
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +27 -21
- package/dist/collection/components/feature-list/feature-list.js +43 -10
- package/dist/collection/components/info-card/info-card.js +1 -1
- package/dist/collection/components/layer-list/layer-list.js +2 -1
- package/dist/collection/components/layer-table/layer-table.js +3 -1
- package/dist/collection/demos/crowdsource-reporter.html +92 -58
- package/dist/collection/demos/feature-list.html +65 -17
- package/dist/collection/demos/layer-list.html +43 -3
- package/dist/collection/utils/interfaces.ts +1 -1
- package/dist/collection/utils/popupUtils.js +9 -12
- package/dist/collection/utils/popupUtils.ts +30 -32
- package/dist/components/crowdsource-reporter.js +12 -23
- package/dist/components/feature-list2.js +42 -10
- package/dist/components/info-card2.js +1 -1
- package/dist/components/layer-list2.js +2 -1
- package/dist/components/layer-table2.js +3 -1
- package/dist/components/popupUtils.js +9 -12
- package/dist/esm/calcite-alert_4.entry.js +2 -2
- package/dist/esm/calcite-flow_4.entry.js +43 -12
- package/dist/esm/card-manager_3.entry.js +3 -1
- package/dist/esm/crowdsource-reporter.entry.js +12 -23
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{popupUtils-a593bd78.js → popupUtils-d75edf93.js} +9 -12
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-reporter.html +92 -58
- package/dist/solutions-components/demos/feature-list.html +65 -17
- package/dist/solutions-components/demos/layer-list.html +43 -3
- package/dist/solutions-components/p-515a319e.js +21 -0
- package/dist/solutions-components/p-6a452a84.entry.js +17 -0
- package/dist/solutions-components/p-8756eebb.entry.js +6 -0
- package/dist/solutions-components/{p-29f661f5.entry.js → p-934cbe40.entry.js} +2 -2
- package/dist/solutions-components/{p-5af99fd8.entry.js → p-9549b5b1.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +1 -1
- package/dist/solutions-components/utils/popupUtils.ts +30 -32
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +5 -1
- package/dist/types/components/feature-list/feature-list.d.ts +8 -0
- package/dist/types/components.d.ts +19 -0
- package/dist/types/preact.d.ts +3 -1
- package/dist/types/utils/interfaces.d.ts +1 -1
- package/dist/types/utils/popupUtils.d.ts +3 -2
- package/package.json +1 -1
- package/dist/solutions-components/p-0b619197.entry.js +0 -17
- package/dist/solutions-components/p-db868283.js +0 -21
- 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
|
-
|
46
|
-
|
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.
|
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 (
|
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
|
}
|