@esri/solutions-components 0.10.42 → 0.10.43

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 (112) hide show
  1. package/dist/cjs/calcite-action-pad_2.cjs.entry.js +1 -1
  2. package/dist/cjs/calcite-block_5.cjs.entry.js +25 -26
  3. package/dist/cjs/{constants-51cf394f.js → constants-bed33322.js} +3 -11
  4. package/dist/cjs/crowdsource-reporter.cjs.entry.js +112 -49
  5. package/dist/cjs/{helpers-afcac967.js → helpers-0493759d.js} +1 -1
  6. package/dist/cjs/instant-apps-app-guide.cjs.entry.js +2 -2
  7. package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +3 -3
  8. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +1 -1
  9. package/dist/cjs/instant-apps-create.cjs.entry.js +2 -2
  10. package/dist/cjs/instant-apps-export-views.cjs.entry.js +2 -2
  11. package/dist/cjs/instant-apps-export.cjs.entry.js +2 -2
  12. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +2 -2
  13. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +2 -2
  14. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +2 -2
  15. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +21 -7
  16. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +3 -3
  17. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +2 -2
  18. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +7 -7
  19. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +6 -6
  20. package/dist/cjs/instant-apps-measurement.cjs.entry.js +2 -2
  21. package/dist/cjs/instant-apps-popover.cjs.entry.js +2 -2
  22. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +2 -2
  23. package/dist/cjs/instant-apps-sign-in.cjs.entry.js +2 -2
  24. package/dist/cjs/instant-apps-splash.cjs.entry.js +6 -5
  25. package/dist/cjs/instant-apps-time-filter.cjs.entry.js +2 -2
  26. package/dist/cjs/{loadModules-8567855e.js → loadModules-df8b13ca.js} +1 -1
  27. package/dist/cjs/loader.cjs.js +1 -1
  28. package/dist/cjs/{locale-4a18a858.js → locale-4b820602.js} +1 -1
  29. package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
  30. package/dist/cjs/solutions-components.cjs.js +1 -1
  31. package/dist/cjs/{utils-fa7ad44b.js → utils-3f10ea6b.js} +2 -2
  32. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +112 -49
  33. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +2 -2
  34. package/dist/components/crowdsource-reporter.js +112 -49
  35. package/dist/components/instant-apps-filter-list2.js +25 -26
  36. package/dist/components/instant-apps-interactive-legend-relationship2.js +19 -5
  37. package/dist/components/instant-apps-language-switcher.js +3 -3
  38. package/dist/components/instant-apps-language-translator2.js +4 -12
  39. package/dist/components/instant-apps-splash.js +4 -3
  40. package/dist/components/loadModules2.js +1 -1
  41. package/dist/components/solution-spatial-ref2.js +2 -2
  42. package/dist/components/utils4.js +1 -1
  43. package/dist/esm/calcite-action-pad_2.entry.js +1 -1
  44. package/dist/esm/calcite-block_5.entry.js +25 -26
  45. package/dist/esm/{constants-886c7c2c.js → constants-637a40f5.js} +3 -11
  46. package/dist/esm/crowdsource-reporter.entry.js +112 -49
  47. package/dist/esm/{helpers-91087955.js → helpers-91ca0f44.js} +1 -1
  48. package/dist/esm/instant-apps-app-guide.entry.js +2 -2
  49. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +3 -3
  50. package/dist/esm/instant-apps-control-panel.entry.js +1 -1
  51. package/dist/esm/instant-apps-create.entry.js +2 -2
  52. package/dist/esm/instant-apps-export-views.entry.js +2 -2
  53. package/dist/esm/instant-apps-export.entry.js +2 -2
  54. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +2 -2
  55. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +2 -2
  56. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +2 -2
  57. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +21 -7
  58. package/dist/esm/instant-apps-interactive-legend.entry.js +3 -3
  59. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +2 -2
  60. package/dist/esm/instant-apps-language-switcher.entry.js +7 -7
  61. package/dist/esm/instant-apps-language-translator.entry.js +6 -6
  62. package/dist/esm/instant-apps-measurement.entry.js +2 -2
  63. package/dist/esm/instant-apps-popover.entry.js +2 -2
  64. package/dist/esm/instant-apps-scoreboard.entry.js +2 -2
  65. package/dist/esm/instant-apps-sign-in.entry.js +2 -2
  66. package/dist/esm/instant-apps-splash.entry.js +6 -5
  67. package/dist/esm/instant-apps-time-filter.entry.js +2 -2
  68. package/dist/esm/{loadModules-03ba7abe.js → loadModules-d5a25252.js} +1 -1
  69. package/dist/esm/loader.js +1 -1
  70. package/dist/esm/{locale-ce177eb8.js → locale-77038bee.js} +1 -1
  71. package/dist/esm/solution-contents_3.entry.js +1 -1
  72. package/dist/esm/solutions-components.js +1 -1
  73. package/dist/esm/{utils-3fc29543.js → utils-0a78d3c9.js} +2 -2
  74. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-splash/instant-apps-splash.css +7 -0
  75. package/dist/solutions-components/{p-b739f26d.entry.js → p-053effee.entry.js} +1 -1
  76. package/dist/solutions-components/{p-af573e0d.js → p-09543b4e.js} +1 -1
  77. package/dist/solutions-components/p-1b1ff60a.entry.js +6 -0
  78. package/dist/solutions-components/{p-e4107150.entry.js → p-2291bf3f.entry.js} +1 -1
  79. package/dist/solutions-components/p-2cf41651.entry.js +6 -0
  80. package/dist/solutions-components/{p-fe3aea1a.entry.js → p-351c7cbf.entry.js} +1 -1
  81. package/dist/solutions-components/{p-90fc786f.entry.js → p-3d999f0f.entry.js} +1 -1
  82. package/dist/solutions-components/p-3fe6c230.entry.js +6 -0
  83. package/dist/solutions-components/p-4695cfab.js +6 -0
  84. package/dist/solutions-components/{p-43699470.entry.js → p-499489c5.entry.js} +1 -1
  85. package/dist/solutions-components/{p-5ff711ee.js → p-5104cc98.js} +1 -1
  86. package/dist/solutions-components/p-5e694bcc.entry.js +29 -0
  87. package/dist/solutions-components/{p-cbb86cf2.entry.js → p-6a3f2249.entry.js} +1 -1
  88. package/dist/solutions-components/{p-a7f56b28.entry.js → p-6e5ea1cb.entry.js} +1 -1
  89. package/dist/solutions-components/{p-9c170b30.entry.js → p-76a1236d.entry.js} +1 -1
  90. package/dist/solutions-components/{p-1e14b3d0.entry.js → p-78b6d3fe.entry.js} +1 -1
  91. package/dist/solutions-components/{p-c48be45f.entry.js → p-8a1a0f9b.entry.js} +1 -1
  92. package/dist/solutions-components/{p-5cbf3eed.entry.js → p-8d4a4498.entry.js} +1 -1
  93. package/dist/solutions-components/{p-4a02fd45.entry.js → p-9d9e0e74.entry.js} +1 -1
  94. package/dist/solutions-components/{p-50fb7f47.js → p-b49e1a78.js} +1 -1
  95. package/dist/solutions-components/{p-c551ffc5.entry.js → p-c399f2b8.entry.js} +1 -1
  96. package/dist/solutions-components/p-cb27611e.entry.js +6 -0
  97. package/dist/solutions-components/{p-4cd4cb85.js → p-d001e961.js} +1 -1
  98. package/dist/solutions-components/{p-523dcf4b.entry.js → p-d37a68f7.entry.js} +1 -1
  99. package/dist/solutions-components/{p-a2cf9fdc.entry.js → p-db7d5db8.entry.js} +1 -1
  100. package/dist/solutions-components/{p-6438d1ea.entry.js → p-e29e57db.entry.js} +1 -1
  101. package/dist/solutions-components/{p-a5b751e2.entry.js → p-e625aa69.entry.js} +1 -1
  102. package/dist/solutions-components/{p-2542d5c9.entry.js → p-e9fcc194.entry.js} +1 -1
  103. package/dist/solutions-components/{p-374ddead.entry.js → p-f4880179.entry.js} +1 -1
  104. package/dist/solutions-components/solutions-components.esm.js +1 -1
  105. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +43 -17
  106. package/package.json +7 -7
  107. package/dist/solutions-components/p-3fc18283.entry.js +0 -6
  108. package/dist/solutions-components/p-442dd59c.entry.js +0 -6
  109. package/dist/solutions-components/p-5585dcd3.entry.js +0 -6
  110. package/dist/solutions-components/p-953afbb3.entry.js +0 -29
  111. package/dist/solutions-components/p-ceb1030b.js +0 -6
  112. package/dist/solutions-components/p-f728af86.entry.js +0 -6
@@ -15,7 +15,7 @@ const locale = require('./locale-da840314.js');
15
15
  const t9n = require('./t9n-ed5c03a7.js');
16
16
  const ExpandToggle = require('./ExpandToggle-2cdd9a8e.js');
17
17
  const observers = require('./observers-18d87cb5.js');
18
- const loadModules = require('./loadModules-8567855e.js');
18
+ const loadModules = require('./loadModules-df8b13ca.js');
19
19
  require('./guid-e84a8375.js');
20
20
  require('./resources-18f799c7.js');
21
21
  require('./browser-333a21c5.js');
@@ -27,8 +27,8 @@ const guid = require('./guid-e84a8375.js');
27
27
  const component = require('./component-5d190962.js');
28
28
  const Validation = require('./Validation-55fc2417.js');
29
29
  const input = require('./input-8c28213d.js');
30
- const loadModules = require('./loadModules-8567855e.js');
31
- const locale$1 = require('./locale-4a18a858.js');
30
+ const loadModules = require('./loadModules-df8b13ca.js');
31
+ const locale$1 = require('./locale-4b820602.js');
32
32
  const mode = require('./mode-3478ba36.js');
33
33
  require('./observers-18d87cb5.js');
34
34
  require('./resources-18f799c7.js');
@@ -1538,7 +1538,6 @@ const InstantAppsFilterList = class {
1538
1538
  this.filterLayerExpressions = undefined;
1539
1539
  this.messages = undefined;
1540
1540
  this.baseClass = baseClassLight;
1541
- this.disabled = true;
1542
1541
  this.initDefExpressions = undefined;
1543
1542
  this.initMapImageExpressions = undefined;
1544
1543
  this.initPointCloudFilters = undefined;
@@ -1559,31 +1558,27 @@ const InstantAppsFilterList = class {
1559
1558
  });
1560
1559
  }
1561
1560
  forceReset() {
1562
- this.handleResetFilter();
1563
- return this.initExpressions();
1561
+ this.resetExpressions();
1562
+ return Promise.resolve();
1564
1563
  }
1565
- restoreFilters(filterParamString, filterInitState) {
1566
- this.filterLayerExpressions = structuredClone(this.layerExpressions);
1564
+ updateInitDefExpressions(filterInitState) {
1567
1565
  this.initDefExpressions = filterInitState.initDefExpressions;
1568
1566
  this.initMapImageExpressions = filterInitState.initMapImageExpressions;
1569
1567
  this.initPointCloudFilters = filterInitState.initPointCloudFilters;
1570
- const filters = filterParamString === null || filterParamString === void 0 ? void 0 : filterParamString.split(';').map(filter => JSON.parse(filter));
1571
- if (filters) {
1572
- this.filterCount = this.applyFilters(filters);
1573
- }
1574
- return this.initExpressions();
1568
+ return Promise.resolve();
1569
+ }
1570
+ getCurrentLayerExpressions() {
1571
+ const currentLayerExpressions = structuredClone(this.filterLayerExpressions);
1572
+ return Promise.resolve(currentLayerExpressions);
1575
1573
  }
1576
1574
  connectedCallback() {
1577
- var _a;
1578
1575
  if (this.layerExpressions == null && this.view == null)
1579
1576
  return;
1580
1577
  this.isLayerExpUpdated = true;
1581
1578
  this.filterLayerExpressions = structuredClone(this.layerExpressions);
1582
- this.disabled = ((_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.length) ? undefined : true;
1583
1579
  this.handleLayerExpressionsUpdate();
1584
1580
  }
1585
1581
  async componentWillLoad() {
1586
- var _a;
1587
1582
  this.baseClass = mode.getMode(this.el) === 'dark' ? baseClassDark : baseClassLight;
1588
1583
  await this.initializeModules();
1589
1584
  locale$1.getMessages(this);
@@ -1591,14 +1586,15 @@ const InstantAppsFilterList = class {
1591
1586
  return;
1592
1587
  this.isLayerExpUpdated = true;
1593
1588
  this.filterLayerExpressions = this.layerExpressions != null ? structuredClone(this.layerExpressions) : [];
1594
- this.disabled = ((_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.length) ? undefined : true;
1595
1589
  if (this.view == null)
1596
1590
  return;
1597
1591
  this.handleLayerExpressionsUpdate();
1598
1592
  }
1599
- componentWillRender() {
1593
+ componentDidRender() {
1600
1594
  var _a;
1601
- this.disabled = ((_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? undefined : true;
1595
+ if (this.resetBtnEl != null) {
1596
+ this.resetBtnEl.disabled = ((_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? false : true;
1597
+ }
1602
1598
  }
1603
1599
  disconnectedCallback() {
1604
1600
  if (this.resetFiltersOnDisconnect) {
@@ -1616,7 +1612,7 @@ const InstantAppsFilterList = class {
1616
1612
  render() {
1617
1613
  const filterConfig = this.loading ? this.renderLoading() : this.initFilterConfig();
1618
1614
  const footer = this.renderFooter();
1619
- return (index.h(index.Host, { key: '055d2a02c5118e59462af8759c6bf2f39304fd75' }, index.h("calcite-panel", { key: '0335c9b28101257551902737ef373543aebee1f6', class: this.baseClass, ref: el => (this.panelEl = el) }, index.h("slot", { key: '4b471e66583b3f2fd733688d65ce8d3b2acbeb66', slot: "header-content", name: "filter-header-content" }), index.h("slot", { key: 'f5832075687a6812b902643fd057587b438b38cf', slot: "header-actions-end", name: "filter-header-actions-end" }), index.h("div", { key: "filter-container", class: CSS$1.filterContainer }, filterConfig, footer))));
1615
+ return (index.h(index.Host, { key: '92daa28c3cada3360d3b3d4202f54842e2e42923' }, index.h("calcite-panel", { key: '43ed17c41f1c42dcb25a19423e1638885a4ca64b', class: this.baseClass, ref: el => (this.panelEl = el) }, index.h("slot", { key: 'df4bc6bdf21127e781f930cf476af2a5d8199c87', slot: "header-content", name: "filter-header-content" }), index.h("slot", { key: 'c2e6744535fb85e40ddd4de215f693258bf31e87', slot: "header-actions-end", name: "filter-header-actions-end" }), index.h("div", { key: "filter-container", class: CSS$1.filterContainer }, filterConfig, footer))));
1620
1616
  }
1621
1617
  renderLoading() {
1622
1618
  return index.h("calcite-loader", { label: "Loading filters..." });
@@ -1689,7 +1685,7 @@ const InstantAppsFilterList = class {
1689
1685
  var _a, _b, _c;
1690
1686
  const closeText = this.closeBtnText != null ? this.closeBtnText : (_a = this.messages) === null || _a === void 0 ? void 0 : _a.close;
1691
1687
  const btnWidth = this.closeBtn && this.resetBtn ? 'half' : 'full';
1692
- return (index.h("div", { class: CSS$1.footer, slot: "footer" }, this.resetBtn ? (index.h("calcite-button", { appearance: "outline", width: btnWidth, disabled: this.disabled, onClick: this.handleResetFilter.bind(this) }, (_b = this.messages) === null || _b === void 0 ? void 0 : _b.resetFilter)) : undefined, this.closeBtn ? (index.h("calcite-button", { appearance: "solid", width: btnWidth, kind: "brand", onClick: (_c = this.closeBtnOnClick) === null || _c === void 0 ? void 0 : _c.bind(this) }, closeText)) : undefined));
1688
+ return (index.h("div", { class: CSS$1.footer, slot: "footer" }, this.resetBtn ? (index.h("calcite-button", { appearance: "outline", width: btnWidth, ref: (el) => (this.resetBtnEl = el), onClick: this.handleResetFilter.bind(this) }, (_b = this.messages) === null || _b === void 0 ? void 0 : _b.resetFilter)) : undefined, this.closeBtn ? (index.h("calcite-button", { appearance: "solid", width: btnWidth, kind: "brand", onClick: (_c = this.closeBtnOnClick) === null || _c === void 0 ? void 0 : _c.bind(this) }, closeText)) : undefined));
1693
1689
  }
1694
1690
  renderZoomTo(layerExpression) {
1695
1691
  var _a;
@@ -1720,23 +1716,29 @@ const InstantAppsFilterList = class {
1720
1716
  }
1721
1717
  async initExpressions() {
1722
1718
  this.loading = true;
1723
- if (this.filterLayerExpressions == null || this.view == null)
1719
+ if (this.filterLayerExpressions == null || this.view == null) {
1720
+ this.loading = false;
1724
1721
  return;
1722
+ }
1725
1723
  await this.processExpressions();
1726
1724
  this.loading = false;
1727
1725
  }
1728
1726
  async processExpressions() {
1729
- var _a;
1730
1727
  if (!this.filterLayerExpressions)
1731
1728
  return;
1732
1729
  for (const layerExpression of this.filterLayerExpressions) {
1733
1730
  for (const expression of layerExpression.expressions || []) {
1734
- expression.active = (_a = expression.active) !== null && _a !== void 0 ? _a : expression.definitionExpression != null;
1735
1731
  await this.setInitExpression(layerExpression, expression);
1736
1732
  }
1737
1733
  }
1738
1734
  }
1739
1735
  handleResetFilter() {
1736
+ this.resetExpressions();
1737
+ this.resetAllFilters();
1738
+ this.generateURLParams();
1739
+ this.filterListReset.emit();
1740
+ }
1741
+ resetExpressions() {
1740
1742
  var _a;
1741
1743
  (_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.forEach(layerExpression => {
1742
1744
  var _a;
@@ -1764,9 +1766,6 @@ const InstantAppsFilterList = class {
1764
1766
  expression.active = false;
1765
1767
  });
1766
1768
  });
1767
- this.resetAllFilters();
1768
- this.generateURLParams();
1769
- this.filterListReset.emit();
1770
1769
  }
1771
1770
  resetExpressionUI(type, expression) {
1772
1771
  const { id } = expression;
@@ -5,19 +5,11 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const loadModules = require('./loadModules-8567855e.js');
8
+ const loadModules = require('./loadModules-df8b13ca.js');
9
9
 
10
- async function fetchResourceData(request, resource) {
11
- var _a, _b, _c;
10
+ async function fetchResourceData(resource) {
12
11
  try {
13
- const token = (_c = (_b = (_a = resource === null || resource === void 0 ? void 0 : resource.portalItem) === null || _a === void 0 ? void 0 : _a.portal) === null || _b === void 0 ? void 0 : _b['credential']) === null || _c === void 0 ? void 0 : _c['token'];
14
- const reqConfig = { responseType: 'json' };
15
- if (token)
16
- reqConfig.query = { token };
17
- var cacheBuster = 'cacheBuster=' + Date.now();
18
- const url = `${resource.url}?${cacheBuster}`;
19
- const reqRes = await request(url, reqConfig);
20
- const t9nData = reqRes.data;
12
+ const t9nData = await resource.fetch('json', { cacheBust: true });
21
13
  return Promise.resolve(t9nData);
22
14
  }
23
15
  catch (err) {
@@ -204,17 +204,17 @@ const CrowdsourceReporter = class {
204
204
  */
205
205
  _formElements = [];
206
206
  /**
207
- * string[]: URL params set by using filters.
207
+ * string: Previous selected layer id
208
208
  */
209
- _filterUrlParams;
209
+ _prevSelectedLayerId;
210
210
  /**
211
- * FilterInitState: filter's init state
211
+ * ILayerExpression[]: current LayerExpressions based on the selected layer
212
212
  */
213
- _filterInitState;
213
+ _currentLayerExpressions;
214
214
  /**
215
- * string: Previous selected layer id
215
+ * { [key: string]: string }: definitionExpressions for each layer
216
216
  */
217
- _prevSelectedLayerId;
217
+ _initDefExpressions;
218
218
  //--------------------------------------------------------------------------
219
219
  //
220
220
  // Watch handlers
@@ -239,6 +239,7 @@ const CrowdsourceReporter = class {
239
239
  */
240
240
  async mapViewWatchHandler() {
241
241
  await this.mapView.when(async () => {
242
+ this.setInitExpressions();
242
243
  await this.setMapView();
243
244
  });
244
245
  }
@@ -317,15 +318,25 @@ const CrowdsourceReporter = class {
317
318
  this._layers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
318
319
  return this.reportingOptions[layerId].visible;
319
320
  }) : [];
321
+ this.setInitExpressions();
320
322
  await this.setMapView();
321
323
  });
322
324
  }
325
+ /**
326
+ * StencilJS: Called before every render().
327
+ * Update the filter list's initial definition expressions when the filter list component is available
328
+ */
329
+ componentWillRender() {
330
+ if (this._flowItems.includes('filter-panel')) {
331
+ void this._filterList?.updateInitDefExpressions({ initDefExpressions: this._initDefExpressions });
332
+ }
333
+ }
323
334
  /**
324
335
  * Renders the component.
325
336
  */
326
337
  render() {
327
338
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
328
- return (index.h(index.Host, { key: 'fbe7fdc13c462e0fe155107ac784f03b3922d624' }, this._reportSubmitted && index.h("calcite-alert", { key: '9bcf7856ad01e7bc59142a862c50b9d84c443268', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, index.h("div", { key: '7b81a7c8b3d66159a790ab3d13be9f1b65a6202e', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && index.h("calcite-alert", { key: 'ee2f17e3326ef7c60fb2ee06ed313fd28cf7084a', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, index.h("div", { key: 'b356832ee6d4d16a84cdea0abb6b1c677f9ca1f6', slot: "title" }, this._translations.error), index.h("div", { key: '8aa16df1114b75b6a3e2a76de7fb5c7cbc5d3632', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && index.h("calcite-alert", { key: 'e99693c23ef18b62daf892fccaacbbfe2486702d', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, index.h("div", { key: '58ccda0d3782dbe70d346b973b7648f8ae4c8c8f', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && index.h("calcite-alert", { key: 'e49e9e3b33df17dd90b3263bec6c17566f6f7b1b', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, index.h("div", { key: 'cfb88dd323ead1398cd73849f68a9c2846ef9d14', slot: "title" }, this._translations.error), index.h("div", { key: 'b27e8983a74c8613e569400b7c7ad0b14d43f323', slot: "message" }, this._translations.addingCommentFailedMsg)), index.h("div", { key: '7ac3d49d6383d2a88e54d91fa00e2c81aa91a890' }, index.h("calcite-shell", { key: '709e673f4e9261b4283c7593926d605c8a049abd', "content-behind": true }, this._getReporter()))));
339
+ return (index.h(index.Host, { key: 'f1dd6d85210210a73fff30a5d98370da1834be7b' }, this._reportSubmitted && index.h("calcite-alert", { key: 'b84760fcbf4bfcf0f038be272f74eda97ce17bd9', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, index.h("div", { key: '27aa04dd8575ad27898f7848bc2733a03a33e70f', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && index.h("calcite-alert", { key: '3fc2721bed573ad10bbb1c81af126e2e8ca90b12', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, index.h("div", { key: '4993e5c5b52d650b094c2890d0e4516cc87ffb69', slot: "title" }, this._translations.error), index.h("div", { key: '272b17f4c0239d8b295d6f2c0c02f1ba236d840d', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && index.h("calcite-alert", { key: '5b9e1a2bd129888ec0764ad9b05e5056653d3c33', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, index.h("div", { key: 'bd428297f5fe85cbf7edc42c61c64c299d7954b7', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && index.h("calcite-alert", { key: '2aa1927ca27f9ec15a16f8e68905a1cf203ef833', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, index.h("div", { key: '4bff5fb03586edf0f9ea21649d1de4c34034e539', slot: "title" }, this._translations.error), index.h("div", { key: '7ea6c71dbbac15c2f43242ba00c9e461177051a1', slot: "message" }, this._translations.addingCommentFailedMsg)), index.h("div", { key: '3aa6bfc19a1e82ab90d2ab42aa9a577b3a2b6d8f' }, index.h("calcite-shell", { key: 'f27355d4f655c0a0931158f38f0be3eb28f6c4d4', "content-behind": true }, this._getReporter()))));
329
340
  }
330
341
  //--------------------------------------------------------------------------
331
342
  //
@@ -389,7 +400,6 @@ const CrowdsourceReporter = class {
389
400
  break;
390
401
  case "filter-panel":
391
402
  renderLists.push(this.getFilterPanel());
392
- void this._restoreFilters();
393
403
  break;
394
404
  case "feature-details":
395
405
  renderLists.push(this.getFeatureDetailsFlowItem());
@@ -436,20 +446,6 @@ const CrowdsourceReporter = class {
436
446
  return (index.h("calcite-popover", { autoClose: true, label: "", offsetDistance: 0, placement: this.isMobile ? "leading-start" : "bottom-start", pointerDisabled: true, referenceElement: "sort-popover" }, index.h("calcite-list", { "selection-mode": "single" }, index.h("calcite-list-item", { label: this._translations.sortNewest, onCalciteListItemSelect: () => { void this.sortOptionClick(this._selectedLayer.objectIdField, "desc", "sortNewest"); }, selected: this._updatedSortOption === "sortNewest", value: "sortNewest" }), index.h("calcite-list-item", { label: this._translations.sortOldest, onCalciteListItemSelect: () => { void this.sortOptionClick(this._selectedLayer.objectIdField, "asc", "sortOldest"); }, selected: this._updatedSortOption === "sortOldest", value: "sortOldest" }), canSortByVotes &&
437
447
  index.h(index.Fragment, null, index.h("calcite-list-item", { label: this._translations.sortHighestVoted, onCalciteListItemSelect: () => { void this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField, "desc", "sortHighestVoted"); }, selected: this._updatedSortOption === "sortHighestVoted", value: "sortHighestVoted" }), index.h("calcite-list-item", { label: this._translations.sortLowestVoted, onCalciteListItemSelect: () => { void this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField, "asc", "sortLowestVoted"); }, selected: this._updatedSortOption === "sortLowestVoted", value: "sortLowestVoted" })))));
438
448
  }
439
- /**
440
- * Restores the applied filters
441
- * @protected
442
- */
443
- _restoreFilters() {
444
- // call the restore function when instant-apps-filter-list is ready
445
- setTimeout(() => {
446
- const canRestoreFilter = this._filterList && this._filterUrlParams && this._filterInitState;
447
- if (canRestoreFilter) {
448
- void this._filterList.restoreFilters(this._filterUrlParams[0], this._filterInitState);
449
- }
450
- this._filterInitState = null;
451
- }, 200);
452
- }
453
449
  /**
454
450
  * Reset the filter
455
451
  * @protected
@@ -457,8 +453,6 @@ const CrowdsourceReporter = class {
457
453
  async _handleFilterListReset() {
458
454
  //on reset filter list reset the filter states
459
455
  this._filterActive = false;
460
- this._filterUrlParams = null;
461
- this._filterInitState = null;
462
456
  }
463
457
  /**
464
458
  * Check if the layers definitionExpression has been modified and update the feature list depending on the applied filters
@@ -466,9 +460,7 @@ const CrowdsourceReporter = class {
466
460
  */
467
461
  async _handleFilterUpdate(active) {
468
462
  this._showLoadingIndicator = true;
469
- //if filters are applied the url params will be generated
470
463
  this._filterActive = active;
471
- this._filterUrlParams = this._filterList.urlParams.getAll('filter');
472
464
  await this._featureList.refresh();
473
465
  this._showLoadingIndicator = false;
474
466
  }
@@ -635,10 +627,6 @@ const CrowdsourceReporter = class {
635
627
  if (evt.detail.layerId && evt.detail.layerName) {
636
628
  await this.setSelectedLayer(evt.detail.layerId, evt.detail.layerName);
637
629
  }
638
- // reset the applied filter when switching to another layer
639
- if (this._selectedLayerId !== this._prevSelectedLayerId && this._filterActive) {
640
- await this.resetFilter();
641
- }
642
630
  void this.updateNonVisibleLayersOnMap(true);
643
631
  // get the form template elements to pass in create-feature to create a LEVELID field in feature-form
644
632
  this._getFormElements();
@@ -710,28 +698,18 @@ const CrowdsourceReporter = class {
710
698
  };
711
699
  this._updatedSortOption = "sortNewest";
712
700
  await this.setSelectedLayer(evt.detail.layerId, evt.detail.layerName);
701
+ void this.handleSelectedLayersFilter();
713
702
  this._flowItems = [...this._flowItems, "feature-list"];
714
- // reset the applied filter when switching to another layer
715
- if (this._selectedLayerId !== this._prevSelectedLayerId && this._filterActive) {
716
- await this.resetFilter();
717
- }
718
703
  this._prevSelectedLayerId = this._selectedLayerId;
719
704
  }
720
- /**
721
- * Reset's the applied filter
722
- * @protected
723
- */
724
- async resetFilter() {
725
- const prevLayer = await mapViewUtils.getLayerOrTable(this.mapView, this._prevSelectedLayerId);
726
- prevLayer.definitionExpression = this._filterInitState.initDefExpressions[this._prevSelectedLayerId];
727
- void this._handleFilterListReset();
728
- }
729
705
  /**
730
706
  * On back from filter panel get the filter's init state
731
707
  * @protected
732
708
  */
733
709
  async backFromFilterPanel() {
734
- this._filterInitState = await this._filterList.getFilterInitState();
710
+ if (this._filterList != null) {
711
+ this._currentLayerExpressions = await this._filterList.getCurrentLayerExpressions();
712
+ }
735
713
  await this._featureList.refresh();
736
714
  this.backFromSelectedPanel();
737
715
  }
@@ -846,9 +824,8 @@ const CrowdsourceReporter = class {
846
824
  * @protected
847
825
  */
848
826
  getFeatureListFlowItem(layerId, layerName) {
849
- const layerExpressions = this.layerExpressions?.filter((exp) => exp.id === this._selectedLayerId);
850
827
  const canCreateReports = this._getLayersConfig(this._selectedLayerId)?.reporting && this._layerItemsHash[this._selectedLayerId].supportsAdd;
851
- const showFilterIcon = layerExpressions?.length > 0;
828
+ const showFilterIcon = this._currentLayerExpressions?.length > 0;
852
829
  return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this._toggleSort(), index.h("calcite-action", { icon: "sort-ascending-arrow", id: "sort-popover", slot: "header-actions-end", text: this._translations.sort, title: this._translations.sort }), showFilterIcon && index.h("calcite-action", { icon: "filter", indicator: this._filterActive, onClick: () => { this._flowItems = [...this._flowItems, "filter-panel"]; }, slot: "header-actions-end", text: this._translations.filter, title: this._translations.filter }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports && canCreateReports &&
853
830
  index.h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText), index.h("calcite-panel", { "full-height": true }, index.h("feature-list", { applyLayerViewFilter: this.showMyReportsOnly, class: "height-full", highlightOnHover: true, locale: this.locale, mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 30, ref: el => this._featureList = el, reportingOptions: this.reportingOptions, selectedLayerId: layerId, showFeatureSymbol: this.showFeatureSymbol, sortingInfo: this._updatedSorting }))));
854
831
  }
@@ -858,8 +835,7 @@ const CrowdsourceReporter = class {
858
835
  * @protected
859
836
  */
860
837
  getFilterPanel() {
861
- const currentLayersExpressions = this.layerExpressions ? this.layerExpressions.filter((exp) => exp.id === this._selectedLayerId) : [];
862
- return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations?.filterLayerTitle?.replace("{{title}}", this._selectedLayerName), loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromFilterPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("div", { class: "width-full", slot: "footer" }, index.h("div", { class: "width-full", slot: "footer" }, index.h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._filterActive, onClick: () => { void this._filterList?.forceReset(); }, width: "full" }, this._translations.resetFilter), index.h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromFilterPanel.bind(this), width: "full" }, this._translations.close))), index.h("calcite-panel", { "full-height": true }, index.h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtnOnClick: () => undefined, comboboxOverlayPositioning: "fixed", layerExpressions: currentLayersExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(this._filterList.filterCount > 0), ref: (el) => this._filterList = el, resetBtn: false, resetFiltersOnDisconnect: false, view: this.mapView, zoomBtn: false }))));
838
+ return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations?.filterLayerTitle?.replace("{{title}}", this._selectedLayerName), loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromFilterPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("div", { class: "width-full", slot: "footer" }, index.h("div", { class: "width-full", slot: "footer" }, index.h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._filterActive, onClick: this.resetFilterList.bind(this), width: "full" }, this._translations.resetFilter), index.h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromFilterPanel.bind(this), width: "full" }, this._translations.close))), index.h("calcite-panel", { "full-height": true }, index.h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtnOnClick: () => undefined, comboboxOverlayPositioning: "fixed", layerExpressions: this._currentLayerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(this._filterList.filterCount > 0), ref: (el) => this._filterList = el, resetBtn: false, resetFiltersOnDisconnect: false, view: this.mapView, zoomBtn: false }))));
863
839
  }
864
840
  /**
865
841
  * Returns the calcite-flow item for feature details
@@ -919,6 +895,7 @@ const CrowdsourceReporter = class {
919
895
  else {
920
896
  if (this._editableLayerIds.length > 1) {
921
897
  void this.setSelectedLayer('', '');
898
+ void this.handlePrevLayersFilter();
922
899
  }
923
900
  this._currentFeatureId = '';
924
901
  }
@@ -1175,7 +1152,8 @@ const CrowdsourceReporter = class {
1175
1152
  detail: this._editableLayerIds
1176
1153
  };
1177
1154
  await this.layerListLoaded(evt);
1178
- void this.setSelectedLayer(this._validLayers[0].id, this._validLayers[0].title);
1155
+ await this.setSelectedLayer(this._validLayers[0].id, this._validLayers[0].title);
1156
+ void this.handleSelectedLayersFilter();
1179
1157
  }
1180
1158
  /**
1181
1159
  * Updates the share url for current selected feature
@@ -1235,6 +1213,91 @@ const CrowdsourceReporter = class {
1235
1213
  }
1236
1214
  }
1237
1215
  }
1216
+ /**
1217
+ * Handles updating the current layer expressions and definition expression for the selected layer
1218
+ * @protected
1219
+ */
1220
+ async handleSelectedLayersFilter() {
1221
+ if (this._selectedLayer) {
1222
+ this._currentLayerExpressions = this.layerExpressions ? this.layerExpressions.filter(exp => exp.id === this._selectedLayerId) : [];
1223
+ this.setActiveDefinitionExpressions();
1224
+ }
1225
+ }
1226
+ /**
1227
+ * Handles updating the previous layer's definition expression to it's initial definition expression
1228
+ * @protected
1229
+ */
1230
+ async handlePrevLayersFilter() {
1231
+ if (this._prevSelectedLayerId) {
1232
+ const prevLayer = await mapViewUtils.getLayerOrTable(this.mapView, this._prevSelectedLayerId);
1233
+ if (prevLayer) {
1234
+ prevLayer.definitionExpression = this._initDefExpressions[this._prevSelectedLayerId];
1235
+ }
1236
+ }
1237
+ }
1238
+ /**
1239
+ * Resets the selected layer's definition expression with the initial definition expression
1240
+ * @protected
1241
+ */
1242
+ resetFilterList() {
1243
+ void this._filterList?.forceReset();
1244
+ if (this._selectedLayer != null) {
1245
+ this._selectedLayer.definitionExpression = this._initDefExpressions[this._selectedLayerId];
1246
+ this._filterActive = false;
1247
+ }
1248
+ }
1249
+ /**
1250
+ * Sets the active definition expressions for the selected layer
1251
+ * @protected
1252
+ */
1253
+ setActiveDefinitionExpressions() {
1254
+ if (this._selectedLayer == null) {
1255
+ return;
1256
+ }
1257
+ const defExpressions = [];
1258
+ if (this._currentLayerExpressions?.length > 0) {
1259
+ const layerExpression = this._currentLayerExpressions[0];
1260
+ for (const expression of layerExpression.expressions) {
1261
+ const { active, definitionExpression } = expression;
1262
+ if (active && definitionExpression) {
1263
+ defExpressions.push(`(${definitionExpression})`);
1264
+ }
1265
+ }
1266
+ this._filterActive = defExpressions.length > 0;
1267
+ this.updateFilterLayerDefExpression(defExpressions, layerExpression.operator);
1268
+ }
1269
+ }
1270
+ /**
1271
+ * Updates the selected layer's definition expression based on the active expressions
1272
+ * @protected
1273
+ */
1274
+ updateFilterLayerDefExpression(defExpressions, operator) {
1275
+ const initDefExpression = this._initDefExpressions[this._selectedLayerId];
1276
+ const combinedExpressions = defExpressions?.length > 0 && initDefExpression != null
1277
+ ? `(${defExpressions.join(operator)}) AND (${initDefExpression})`
1278
+ : defExpressions.length > 0
1279
+ ? defExpressions.join(operator)
1280
+ : initDefExpression;
1281
+ this._selectedLayer.definitionExpression = combinedExpressions;
1282
+ }
1283
+ /**
1284
+ * Sets the initial definition expressions for all the feature layers
1285
+ * @protected
1286
+ */
1287
+ setInitExpressions() {
1288
+ this._initDefExpressions = {};
1289
+ if (this.mapView == null) {
1290
+ return;
1291
+ }
1292
+ const map = this.mapView.map;
1293
+ map.allLayers.concat(map.allTables).forEach(layer => {
1294
+ if (layer.type !== "feature") {
1295
+ return;
1296
+ }
1297
+ const fl = layer;
1298
+ this._initDefExpressions[fl.id] = fl.definitionExpression;
1299
+ });
1300
+ }
1238
1301
  static get watchers() { return {
1239
1302
  "isMobile": ["isMobileWatchHandler"],
1240
1303
  "locale": ["localeWatchHandler"],
@@ -5,7 +5,7 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const loadModules = require('./loadModules-8567855e.js');
8
+ const loadModules = require('./loadModules-df8b13ca.js');
9
9
  const index = require('./index-2b13a4d5.js');
10
10
 
11
11
  async function getMergedEffect(presetLayerEffect, featureLayerView, type) {
@@ -8,8 +8,8 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const locale = require('./locale-4a18a858.js');
12
- require('./loadModules-8567855e.js');
11
+ const locale = require('./locale-4b820602.js');
12
+ require('./loadModules-df8b13ca.js');
13
13
  require('./esri-loader-08dc41bd.js');
14
14
  require('./_commonjsHelpers-baf43783.js');
15
15
  require('./languageUtil-a3e1eafd.js');
@@ -8,9 +8,9 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const utils = require('./utils-fa7ad44b.js');
12
- require('./locale-4a18a858.js');
13
- require('./loadModules-8567855e.js');
11
+ const utils = require('./utils-3f10ea6b.js');
12
+ require('./locale-4b820602.js');
13
+ require('./loadModules-df8b13ca.js');
14
14
  require('./esri-loader-08dc41bd.js');
15
15
  require('./_commonjsHelpers-baf43783.js');
16
16
  require('./languageUtil-a3e1eafd.js');
@@ -8,7 +8,7 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const loadModules = require('./loadModules-8567855e.js');
11
+ const loadModules = require('./loadModules-df8b13ca.js');
12
12
  require('./esri-loader-08dc41bd.js');
13
13
  require('./_commonjsHelpers-baf43783.js');
14
14
 
@@ -8,8 +8,8 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const locale = require('./locale-4a18a858.js');
12
- const loadModules = require('./loadModules-8567855e.js');
11
+ const locale = require('./locale-4b820602.js');
12
+ const loadModules = require('./loadModules-df8b13ca.js');
13
13
  const mode = require('./mode-3478ba36.js');
14
14
  require('./languageUtil-a3e1eafd.js');
15
15
  require('./esri-loader-08dc41bd.js');
@@ -8,8 +8,8 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const loadModules = require('./loadModules-8567855e.js');
12
- const locale = require('./locale-4a18a858.js');
11
+ const loadModules = require('./loadModules-df8b13ca.js');
12
+ const locale = require('./locale-4b820602.js');
13
13
  const mode = require('./mode-3478ba36.js');
14
14
  require('./esri-loader-08dc41bd.js');
15
15
  require('./_commonjsHelpers-baf43783.js');
@@ -8,8 +8,8 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const loadModules = require('./loadModules-8567855e.js');
12
- const locale = require('./locale-4a18a858.js');
11
+ const loadModules = require('./loadModules-df8b13ca.js');
12
+ const locale = require('./locale-4b820602.js');
13
13
  const mode = require('./mode-3478ba36.js');
14
14
  require('./esri-loader-08dc41bd.js');
15
15
  require('./_commonjsHelpers-baf43783.js');
@@ -8,9 +8,9 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const helpers = require('./helpers-afcac967.js');
11
+ const helpers = require('./helpers-0493759d.js');
12
12
  const _commonjsHelpers = require('./_commonjsHelpers-baf43783.js');
13
- const loadModules = require('./loadModules-8567855e.js');
13
+ const loadModules = require('./loadModules-df8b13ca.js');
14
14
  require('./index-2b13a4d5.js');
15
15
  require('./esri-loader-08dc41bd.js');
16
16
 
@@ -8,8 +8,8 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const loadModules = require('./loadModules-8567855e.js');
12
- const helpers = require('./helpers-afcac967.js');
11
+ const loadModules = require('./loadModules-df8b13ca.js');
12
+ const helpers = require('./helpers-0493759d.js');
13
13
  require('./esri-loader-08dc41bd.js');
14
14
  require('./_commonjsHelpers-baf43783.js');
15
15
  require('./index-2b13a4d5.js');
@@ -8,8 +8,8 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const helpers = require('./helpers-afcac967.js');
12
- require('./loadModules-8567855e.js');
11
+ const helpers = require('./helpers-0493759d.js');
12
+ require('./loadModules-df8b13ca.js');
13
13
  require('./esri-loader-08dc41bd.js');
14
14
  require('./_commonjsHelpers-baf43783.js');
15
15
  require('./index-2b13a4d5.js');
@@ -8,8 +8,8 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-4b68e4b4.js');
11
- const helpers = require('./helpers-afcac967.js');
12
- const loadModules = require('./loadModules-8567855e.js');
11
+ const helpers = require('./helpers-0493759d.js');
12
+ const loadModules = require('./loadModules-df8b13ca.js');
13
13
  require('./index-2b13a4d5.js');
14
14
  require('./esri-loader-08dc41bd.js');
15
15
  require('./_commonjsHelpers-baf43783.js');
@@ -349,15 +349,29 @@ const InstantAppsInteractiveLegendRelationship = class {
349
349
  if (!cellGroup)
350
350
  return;
351
351
  cellGroup.map((cell, cellIndex) => {
352
- var _a, _b;
352
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
353
353
  const uvInfos = ((_b = (_a = this.activeLayerInfo) === null || _a === void 0 ? void 0 : _a.layer) === null || _b === void 0 ? void 0 : _b.renderer).uniqueValueInfos;
354
354
  if (uvInfos[cellIndex]) {
355
- const color = uvInfos[cellIndex].symbol.color;
355
+ const CIMSymbolColor_Index = (_g = (_f = (_e = (_d = (_c = uvInfos === null || uvInfos === void 0 ? void 0 : uvInfos[cellIndex]) === null || _c === void 0 ? void 0 : _c.symbol) === null || _d === void 0 ? void 0 : _d['data']) === null || _e === void 0 ? void 0 : _e.symbol) === null || _f === void 0 ? void 0 : _f.symbolLayers) === null || _g === void 0 ? void 0 : _g[1].color;
356
+ const colorFromUVInfo_Index = (_j = (_h = uvInfos === null || uvInfos === void 0 ? void 0 : uvInfos[cellIndex]) === null || _h === void 0 ? void 0 : _h.symbol) === null || _j === void 0 ? void 0 : _j.color;
356
357
  uvInfos.forEach((uvInfo, index) => {
357
- const itemColor = uvInfo.symbol.color;
358
- const match = color.r === itemColor.r && color.g === itemColor.g && color.b === itemColor.b && color.a === itemColor.a;
359
- if (match)
358
+ var _a, _b, _c, _d, _e;
359
+ const colorFromUVInfo = (_a = uvInfo === null || uvInfo === void 0 ? void 0 : uvInfo.symbol) === null || _a === void 0 ? void 0 : _a.color;
360
+ const CIMSymbolColor = (_e = (_d = (_c = (_b = uvInfo === null || uvInfo === void 0 ? void 0 : uvInfo.symbol) === null || _b === void 0 ? void 0 : _b['data']) === null || _c === void 0 ? void 0 : _c.symbol) === null || _d === void 0 ? void 0 : _d.symbolLayers) === null || _e === void 0 ? void 0 : _e[1].color;
361
+ let match = false;
362
+ if (CIMSymbolColor) {
363
+ match = CIMSymbolColor.every((value, i) => value === CIMSymbolColor_Index[i]);
364
+ }
365
+ else {
366
+ match =
367
+ colorFromUVInfo.r === colorFromUVInfo_Index.r &&
368
+ colorFromUVInfo.g === colorFromUVInfo_Index.g &&
369
+ colorFromUVInfo.b === colorFromUVInfo_Index.b &&
370
+ colorFromUVInfo.a === colorFromUVInfo_Index.a;
371
+ }
372
+ if (match) {
360
373
  this.setCellAttributes(cell, index);
374
+ }
361
375
  });
362
376
  cell.classList.add('esri-interactive-legend__svg-rect-element');
363
377
  }