@esri/solutions-components 0.6.36 → 0.6.38

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 (84) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +16 -0
  2. package/dist/cjs/calcite-alert_3.cjs.entry.js +2 -13
  3. package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -1
  4. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  5. package/dist/cjs/card-manager_3.cjs.entry.js +4 -3
  6. package/dist/cjs/{downloadUtils-37d9aaf3.js → downloadUtils-d8e48fbd.js} +55 -12
  7. package/dist/cjs/{index.es-d1d9b140.js → index.es-6159eedc.js} +4 -3
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-select-tools_3.cjs.entry.js +4 -3
  10. package/dist/cjs/{mapViewUtils-96172223.js → mapViewUtils-f7bbc35b.js} +5 -2
  11. package/dist/cjs/public-notification.cjs.entry.js +6 -5
  12. package/dist/cjs/{clean-url-d5326abb.js → restHelpersGet-c94617cf.js} +398 -0
  13. package/dist/cjs/solution-configuration.cjs.entry.js +565 -565
  14. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  15. package/dist/cjs/{solution-store-714601a2.js → solution-store-b40c2f46.js} +19 -383
  16. package/dist/cjs/solutions-components.cjs.js +1 -1
  17. package/dist/collection/components/basemap-gallery/basemap-gallery.js +8 -0
  18. package/dist/collection/components/edit-card/edit-card.js +1 -12
  19. package/dist/collection/components/map-legend/map-legend.js +9 -1
  20. package/dist/collection/components/public-notification/public-notification.js +7 -6
  21. package/dist/collection/utils/downloadUtils.js +50 -8
  22. package/dist/collection/utils/downloadUtils.ts +62 -9
  23. package/dist/collection/utils/queryUtils.js +5 -2
  24. package/dist/collection/utils/queryUtils.ts +4 -2
  25. package/dist/components/basemap-gallery2.js +8 -0
  26. package/dist/components/downloadUtils.js +51 -8
  27. package/dist/components/edit-card2.js +1 -12
  28. package/dist/components/map-legend2.js +8 -0
  29. package/dist/components/public-notification.js +3 -3
  30. package/dist/components/queryUtils.js +5 -2
  31. package/dist/components/{clean-url.js → restHelpersGet.js} +392 -1
  32. package/dist/components/solution-configuration.js +552 -552
  33. package/dist/components/solution-store.js +2 -365
  34. package/dist/esm/basemap-gallery_7.entry.js +16 -0
  35. package/dist/esm/calcite-alert_3.entry.js +2 -13
  36. package/dist/esm/calcite-combobox_6.entry.js +1 -1
  37. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  38. package/dist/esm/card-manager_3.entry.js +4 -3
  39. package/dist/esm/{downloadUtils-76379e4a.js → downloadUtils-d41ecba9.js} +53 -10
  40. package/dist/esm/{index.es-0d134a52.js → index.es-b226bf47.js} +4 -3
  41. package/dist/esm/loader.js +1 -1
  42. package/dist/esm/map-select-tools_3.entry.js +4 -3
  43. package/dist/esm/{mapViewUtils-08f6cfce.js → mapViewUtils-1e2befd7.js} +5 -2
  44. package/dist/esm/public-notification.entry.js +6 -5
  45. package/dist/esm/{clean-url-bce022e6.js → restHelpersGet-a5ec2192.js} +392 -1
  46. package/dist/esm/solution-configuration.entry.js +552 -552
  47. package/dist/esm/solution-contents_3.entry.js +2 -2
  48. package/dist/esm/{solution-store-3ee6c7a3.js → solution-store-17bb0a75.js} +2 -365
  49. package/dist/esm/solutions-components.js +1 -1
  50. package/dist/solutions-components/{p-9800e602.entry.js → p-091120c5.entry.js} +1 -1
  51. package/dist/solutions-components/p-1b14b687.entry.js +6 -0
  52. package/dist/solutions-components/p-20e627ed.entry.js +6 -0
  53. package/dist/solutions-components/{p-646e983f.entry.js → p-2d143359.entry.js} +1 -1
  54. package/dist/solutions-components/{p-ac7332b3.entry.js → p-40e95e2b.entry.js} +1 -1
  55. package/dist/solutions-components/p-420e1585.entry.js +36 -0
  56. package/dist/solutions-components/p-4807b2a1.js +36 -0
  57. package/dist/solutions-components/p-56a3b81e.entry.js +6 -0
  58. package/dist/solutions-components/p-5856dc4f.js +66 -0
  59. package/dist/solutions-components/p-89b4b401.js +145 -0
  60. package/dist/solutions-components/{p-0f50087e.entry.js → p-973625f8.entry.js} +2 -2
  61. package/dist/solutions-components/{p-03130804.js → p-9ecb5d66.js} +1 -1
  62. package/dist/solutions-components/{p-b02eb8f4.js → p-a8661f1f.js} +30 -30
  63. package/dist/solutions-components/p-fbc7fc26.entry.js +6 -0
  64. package/dist/solutions-components/solutions-components.esm.js +1 -1
  65. package/dist/solutions-components/utils/downloadUtils.ts +62 -9
  66. package/dist/solutions-components/utils/queryUtils.ts +4 -2
  67. package/dist/types/components/basemap-gallery/basemap-gallery.d.ts +4 -0
  68. package/dist/types/components/map-legend/map-legend.d.ts +4 -0
  69. package/dist/types/components/public-notification/public-notification.d.ts +1 -1
  70. package/dist/types/components.d.ts +2 -2
  71. package/package.json +1 -1
  72. package/dist/esm/polyfills/core-js.js +0 -11
  73. package/dist/esm/polyfills/dom.js +0 -79
  74. package/dist/esm/polyfills/es5-html-element.js +0 -1
  75. package/dist/esm/polyfills/index.js +0 -34
  76. package/dist/esm/polyfills/system.js +0 -6
  77. package/dist/solutions-components/p-13b21d19.entry.js +0 -36
  78. package/dist/solutions-components/p-15070568.js +0 -36
  79. package/dist/solutions-components/p-1682bd0f.entry.js +0 -6
  80. package/dist/solutions-components/p-7b61f856.entry.js +0 -6
  81. package/dist/solutions-components/p-81a0c88f.entry.js +0 -6
  82. package/dist/solutions-components/p-d0544f24.js +0 -192
  83. package/dist/solutions-components/p-eba875d9.entry.js +0 -6
  84. package/dist/solutions-components/p-ecc95259.js +0 -20
@@ -47,7 +47,7 @@ export class PublicNotification {
47
47
  this.defaultBufferDistance = undefined;
48
48
  this.defaultBufferUnit = undefined;
49
49
  this.defaultExportTitle = "";
50
- this.defaultNumLabelsPerPage = undefined;
50
+ this.defaultNumLabelsPerPage = 6;
51
51
  this.featureEffect = undefined;
52
52
  this.featureHighlightEnabled = undefined;
53
53
  this.mapView = undefined;
@@ -517,7 +517,7 @@ export class PublicNotification {
517
517
  const displayClass = this._exportType === EExportType.PDF ? "display-block" : "display-none";
518
518
  const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
519
519
  const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
520
- return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: this.defaultNumLabelsPerPage, disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
520
+ return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
521
521
  }
522
522
  /**
523
523
  * Render the refine page
@@ -991,11 +991,11 @@ export class PublicNotification {
991
991
  "defaultValue": "\"\""
992
992
  },
993
993
  "defaultNumLabelsPerPage": {
994
- "type": "any",
994
+ "type": "number",
995
995
  "mutable": false,
996
996
  "complexType": {
997
- "original": "any",
998
- "resolved": "any",
997
+ "original": "number",
998
+ "resolved": "number",
999
999
  "references": {}
1000
1000
  },
1001
1001
  "required": false,
@@ -1005,7 +1005,8 @@ export class PublicNotification {
1005
1005
  "text": "number: The default number of labels per page to export"
1006
1006
  },
1007
1007
  "attribute": "default-num-labels-per-page",
1008
- "reflect": false
1008
+ "reflect": false,
1009
+ "defaultValue": "6"
1009
1010
  },
1010
1011
  "featureEffect": {
1011
1012
  "type": "unknown",
@@ -23,7 +23,7 @@ import { exportCSV } from "./csvUtils";
23
23
  import { exportPDF } from "./pdfUtils";
24
24
  import { loadModules } from "./loadModules";
25
25
  import { queryFeaturesByID } from "./queryUtils";
26
- //import * as common from "@esri/solution-common";
26
+ import * as common from "@esri/solution-common";
27
27
  export { ILabel } from "./pdfUtils";
28
28
  const lineSeparatorChar = "|";
29
29
  import { queryRelated } from "@esri/arcgis-rest-feature-layer";
@@ -427,13 +427,55 @@ export async function _getLabelFormat(webmap, layer, formatUsingLayerPopup) {
427
427
  const labelFormatType = (_b = (_a = layer.popupTemplate) === null || _a === void 0 ? void 0 : _a.content[0]) === null || _b === void 0 ? void 0 : _b.type;
428
428
  if (labelFormatType === "relationship") {
429
429
  const relationshipId = layer.popupTemplate.content[0].relationshipId;
430
- const webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray())
431
- .filter((entry) => entry.type === "feature"
432
- && entry.id !== layer.id
433
- && entry.relationships
434
- && entry.relationships.some(relationship => relationship.id === relationshipId));
435
- labelFormatProps = await _getLabelFormat(webmap, webmapLayers[0], formatUsingLayerPopup);
436
- labelFormatProps.relationshipId = relationshipId;
430
+ // Get related layer
431
+ let webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray());
432
+ webmapLayers = webmapLayers.filter((webmapLayer) => webmapLayer.type === "feature"
433
+ && webmapLayer.id !== layer.id
434
+ && webmapLayer.relationships
435
+ && webmapLayer.relationships.some(relationship => relationship.id === relationshipId));
436
+ if (webmapLayers.length > 0) {
437
+ labelFormatProps = await _getLabelFormat(webmap, webmapLayers[0], formatUsingLayerPopup);
438
+ labelFormatProps.relationshipId = relationshipId;
439
+ }
440
+ else {
441
+ // Related layer info is not in webmap; get the label info from the related layer
442
+ webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray());
443
+ // Keep only feature layers and tables that have the type "feature" and whose layerId doesn't
444
+ // match the one we entered this function with and who have a URL that we can query
445
+ const relationshipCandidatePromises = [];
446
+ webmapLayers = webmapLayers.filter((webmapLayer) => {
447
+ if (webmapLayer.type === "feature" && webmapLayer.layerId != layer.layerId && webmapLayer.url) {
448
+ // Query the feature layer/table for properties missing from the webmap version
449
+ const webmapLayerUrl = webmapLayer.url + "/" + webmapLayer.layerId.toString();
450
+ relationshipCandidatePromises.push(common.getJson(webmapLayerUrl /*, authentication*/));
451
+ return true;
452
+ }
453
+ else {
454
+ return false;
455
+ }
456
+ });
457
+ // Of the queried feature layers/tables, find the one with the matching relationship id
458
+ const relationshipCandidates = await Promise.all(relationshipCandidatePromises);
459
+ let labelFormatPropsPromise;
460
+ if (!relationshipCandidates.some((candidateLayer, i) => {
461
+ if (candidateLayer.relationships
462
+ && candidateLayer.relationships.some(relationship => relationship.id === relationshipId)) {
463
+ // Found the matching relationship; get the label format from it
464
+ labelFormatPropsPromise = _getLabelFormat(webmap, webmapLayers[i], formatUsingLayerPopup);
465
+ return true;
466
+ }
467
+ else {
468
+ return false;
469
+ }
470
+ })) {
471
+ // Fallback to all fields
472
+ labelFormatProps.labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos);
473
+ }
474
+ else {
475
+ labelFormatProps = await labelFormatPropsPromise;
476
+ labelFormatProps.relationshipId = relationshipId;
477
+ }
478
+ }
437
479
  }
438
480
  else if (labelFormatType === "fields") {
439
481
  labelFormatProps.labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos);
@@ -21,7 +21,7 @@ import { ILabel, exportPDF } from "./pdfUtils";
21
21
  import { loadModules } from "./loadModules";
22
22
  import { queryFeaturesByID } from "./queryUtils";
23
23
  import { IExportInfo, IExportInfos } from "../utils/interfaces";
24
- //import * as common from "@esri/solution-common";
24
+ import * as common from "@esri/solution-common";
25
25
 
26
26
  export { ILabel } from "./pdfUtils";
27
27
 
@@ -584,15 +584,68 @@ export async function _getLabelFormat(
584
584
  if (labelFormatType === "relationship") {
585
585
  const relationshipId = layer.popupTemplate.content[0].relationshipId;
586
586
 
587
- const webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray())
588
- .filter((entry: __esri.FeatureLayer) =>
589
- entry.type === "feature"
590
- && entry.id !== layer.id
591
- && entry.relationships
592
- && entry.relationships.some(relationship => relationship.id === relationshipId));
587
+ // Get related layer
588
+ let webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray()) as __esri.FeatureLayer[];
589
+ webmapLayers = webmapLayers.filter(
590
+ (webmapLayer: __esri.FeatureLayer) =>
591
+ webmapLayer.type === "feature"
592
+ && webmapLayer.id !== layer.id
593
+ && webmapLayer.relationships
594
+ && webmapLayer.relationships.some(relationship => relationship.id === relationshipId)
595
+ );
593
596
 
594
- labelFormatProps = await _getLabelFormat(webmap, webmapLayers[0] as __esri.FeatureLayer, formatUsingLayerPopup);
595
- labelFormatProps.relationshipId = relationshipId;
597
+ if (webmapLayers.length > 0) {
598
+ labelFormatProps = await _getLabelFormat(webmap, webmapLayers[0], formatUsingLayerPopup);
599
+ labelFormatProps.relationshipId = relationshipId;
600
+
601
+ } else {
602
+ // Related layer info is not in webmap; get the label info from the related layer
603
+ webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray()) as __esri.FeatureLayer[];
604
+
605
+ // Keep only feature layers and tables that have the type "feature" and whose layerId doesn't
606
+ // match the one we entered this function with and who have a URL that we can query
607
+ const relationshipCandidatePromises: Promise<any>[] = [];
608
+ webmapLayers = webmapLayers.filter(
609
+ (webmapLayer: __esri.FeatureLayer) => {
610
+ if (webmapLayer.type === "feature" && webmapLayer.layerId != layer.layerId && webmapLayer.url) {
611
+ // Query the feature layer/table for properties missing from the webmap version
612
+ const webmapLayerUrl = webmapLayer.url + "/" + webmapLayer.layerId.toString();
613
+ relationshipCandidatePromises.push(
614
+ common.getJson(webmapLayerUrl/*, authentication*/)
615
+ );
616
+ return true;
617
+ } else {
618
+ return false;
619
+ }
620
+ }
621
+ )
622
+
623
+ // Of the queried feature layers/tables, find the one with the matching relationship id
624
+ const relationshipCandidates = await Promise.all(relationshipCandidatePromises);
625
+ let labelFormatPropsPromise: Promise<ILabelFormatProps>;
626
+ if (
627
+ !relationshipCandidates.some(
628
+ (candidateLayer: any, i: number) => {
629
+ if (
630
+ candidateLayer.relationships
631
+ && candidateLayer.relationships.some(relationship => relationship.id === relationshipId)
632
+ ) {
633
+ // Found the matching relationship; get the label format from it
634
+ labelFormatPropsPromise = _getLabelFormat(webmap, webmapLayers[i], formatUsingLayerPopup);
635
+ return true;
636
+ } else {
637
+ return false;
638
+ }
639
+ }
640
+ )
641
+ ) {
642
+ // Fallback to all fields
643
+ labelFormatProps.labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos);
644
+ } else {
645
+ labelFormatProps = await labelFormatPropsPromise;
646
+ labelFormatProps.relationshipId = relationshipId;
647
+ }
648
+ }
596
649
 
597
650
  } else if (labelFormatType === "fields") {
598
651
  labelFormatProps.labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos);
@@ -103,13 +103,16 @@ export async function queryObjectIds(geometries, layer) {
103
103
  * @returns Promise with the featureSet from the layer that match the provided ids
104
104
  */
105
105
  export async function queryFeaturesByID(ids, layer, graphics, returnGeometry, outSpatialReference) {
106
- const num = layer.capabilities.query.maxRecordCount;
106
+ var _a;
107
+ const num = (_a = layer.capabilities) === null || _a === void 0 ? void 0 : _a.query.maxRecordCount;
107
108
  const start = 0;
108
109
  const q = layer.createQuery();
109
110
  q.start = start;
110
- q.num = num;
111
111
  q.returnGeometry = returnGeometry;
112
112
  q.objectIds = ids.slice(start, num);
113
+ if (num) {
114
+ q.num = num;
115
+ }
113
116
  if (outSpatialReference) {
114
117
  q.outSpatialReference = outSpatialReference;
115
118
  }
@@ -128,14 +128,16 @@ export async function queryFeaturesByID(
128
128
  returnGeometry: boolean,
129
129
  outSpatialReference?: __esri.SpatialReference
130
130
  ): Promise<__esri.Graphic[]> {
131
- const num = layer.capabilities.query.maxRecordCount;
131
+ const num = layer.capabilities?.query.maxRecordCount;
132
132
  const start = 0;
133
133
 
134
134
  const q = layer.createQuery();
135
135
  q.start = start;
136
- q.num = num;
137
136
  q.returnGeometry = returnGeometry;
138
137
  q.objectIds = ids.slice(start, num);
138
+ if (num) {
139
+ q.num = num;
140
+ }
139
141
  if (outSpatialReference) {
140
142
  q.outSpatialReference = outSpatialReference;
141
143
  }
@@ -54,6 +54,14 @@ const BasemapGallery = /*@__PURE__*/ proxyCustomElement(class BasemapGallery ext
54
54
  render() {
55
55
  return (h(Host, null, h("div", { ref: (el) => { this._basemapElement = el; } })));
56
56
  }
57
+ /**
58
+ * StencilJS: Called once just after the component is fully loaded and the first render() occurs.
59
+ */
60
+ async componentDidLoad() {
61
+ if (this.mapView) {
62
+ await this.mapViewWatchHandler();
63
+ }
64
+ }
57
65
  //--------------------------------------------------------------------------
58
66
  //
59
67
  // Functions (protected)
@@ -7,7 +7,8 @@ import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_comm
7
7
  import { getAssetPath } from '@stencil/core/internal/client';
8
8
  import { l as loadModules } from './loadModules.js';
9
9
  import { q as queryFeaturesByID } from './queryUtils.js';
10
- import { _ as __assign$1, r as request, c as cleanUrl } from './clean-url.js';
10
+ import './solution-resource.js';
11
+ import { _ as __assign$1, r as request, c as cleanUrl, g as getJson } from './restHelpersGet.js';
11
12
 
12
13
  /** @license
13
14
  * Copyright 2022 Esri
@@ -2742,13 +2743,55 @@ async function _getLabelFormat(webmap, layer, formatUsingLayerPopup) {
2742
2743
  const labelFormatType = (_b = (_a = layer.popupTemplate) === null || _a === void 0 ? void 0 : _a.content[0]) === null || _b === void 0 ? void 0 : _b.type;
2743
2744
  if (labelFormatType === "relationship") {
2744
2745
  const relationshipId = layer.popupTemplate.content[0].relationshipId;
2745
- const webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray())
2746
- .filter((entry) => entry.type === "feature"
2747
- && entry.id !== layer.id
2748
- && entry.relationships
2749
- && entry.relationships.some(relationship => relationship.id === relationshipId));
2750
- labelFormatProps = await _getLabelFormat(webmap, webmapLayers[0], formatUsingLayerPopup);
2751
- labelFormatProps.relationshipId = relationshipId;
2746
+ // Get related layer
2747
+ let webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray());
2748
+ webmapLayers = webmapLayers.filter((webmapLayer) => webmapLayer.type === "feature"
2749
+ && webmapLayer.id !== layer.id
2750
+ && webmapLayer.relationships
2751
+ && webmapLayer.relationships.some(relationship => relationship.id === relationshipId));
2752
+ if (webmapLayers.length > 0) {
2753
+ labelFormatProps = await _getLabelFormat(webmap, webmapLayers[0], formatUsingLayerPopup);
2754
+ labelFormatProps.relationshipId = relationshipId;
2755
+ }
2756
+ else {
2757
+ // Related layer info is not in webmap; get the label info from the related layer
2758
+ webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray());
2759
+ // Keep only feature layers and tables that have the type "feature" and whose layerId doesn't
2760
+ // match the one we entered this function with and who have a URL that we can query
2761
+ const relationshipCandidatePromises = [];
2762
+ webmapLayers = webmapLayers.filter((webmapLayer) => {
2763
+ if (webmapLayer.type === "feature" && webmapLayer.layerId != layer.layerId && webmapLayer.url) {
2764
+ // Query the feature layer/table for properties missing from the webmap version
2765
+ const webmapLayerUrl = webmapLayer.url + "/" + webmapLayer.layerId.toString();
2766
+ relationshipCandidatePromises.push(getJson(webmapLayerUrl /*, authentication*/));
2767
+ return true;
2768
+ }
2769
+ else {
2770
+ return false;
2771
+ }
2772
+ });
2773
+ // Of the queried feature layers/tables, find the one with the matching relationship id
2774
+ const relationshipCandidates = await Promise.all(relationshipCandidatePromises);
2775
+ let labelFormatPropsPromise;
2776
+ if (!relationshipCandidates.some((candidateLayer, i) => {
2777
+ if (candidateLayer.relationships
2778
+ && candidateLayer.relationships.some(relationship => relationship.id === relationshipId)) {
2779
+ // Found the matching relationship; get the label format from it
2780
+ labelFormatPropsPromise = _getLabelFormat(webmap, webmapLayers[i], formatUsingLayerPopup);
2781
+ return true;
2782
+ }
2783
+ else {
2784
+ return false;
2785
+ }
2786
+ })) {
2787
+ // Fallback to all fields
2788
+ labelFormatProps.labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos);
2789
+ }
2790
+ else {
2791
+ labelFormatProps = await labelFormatPropsPromise;
2792
+ labelFormatProps.relationshipId = relationshipId;
2793
+ }
2794
+ }
2752
2795
  }
2753
2796
  else if (labelFormatType === "fields") {
2754
2797
  labelFormatProps.labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos);
@@ -137,11 +137,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
137
137
  const container = document.createElement("div");
138
138
  const layers = await getAllLayers(this.mapView);
139
139
  const layerInfos = layers.map(layer => {
140
- return {
141
- layer,
142
- geometryUpdatesEnabled: false,
143
- addEnabled: false
144
- };
140
+ return { layer };
145
141
  });
146
142
  this._editor = new this.Editor({
147
143
  allowedWorkflows: "update",
@@ -157,7 +153,6 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
157
153
  this._editHandle.remove();
158
154
  this._attachmentHandle.remove();
159
155
  this._activeWorkflowHandle.remove();
160
- this._addRelatedRecordHandle.remove();
161
156
  }
162
157
  this._attachmentHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "adding-attachment" ||
163
158
  this._editor.viewModel.state === "editing-attachment" ||
@@ -177,12 +172,6 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
177
172
  this._shouldClose = false;
178
173
  }
179
174
  });
180
- // Temp workaround until a new prop is added at 4.29
181
- this._addRelatedRecordHandle = this.reactiveUtils.when(() => !!this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks, () => {
182
- this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks.addRelatedRecord = null;
183
- }, {
184
- once: true
185
- });
186
175
  // had issues with destroy before adding like this
187
176
  this._editContainer.appendChild(container);
188
177
  }
@@ -53,6 +53,14 @@ const MapLegend = /*@__PURE__*/ proxyCustomElement(class MapLegend extends HTMLE
53
53
  render() {
54
54
  return (h(Host, null, h("div", { ref: (el) => { this._legendElement = el; } })));
55
55
  }
56
+ /**
57
+ * StencilJS: Called once just after the component is fully loaded and the first render() occurs.
58
+ */
59
+ async componentDidLoad() {
60
+ if (this.mapView) {
61
+ await this.mapViewWatchHandler();
62
+ }
63
+ }
56
64
  //--------------------------------------------------------------------------
57
65
  //
58
66
  // Functions (protected)
@@ -80,7 +80,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
80
80
  this.defaultBufferDistance = undefined;
81
81
  this.defaultBufferUnit = undefined;
82
82
  this.defaultExportTitle = "";
83
- this.defaultNumLabelsPerPage = undefined;
83
+ this.defaultNumLabelsPerPage = 6;
84
84
  this.featureEffect = undefined;
85
85
  this.featureHighlightEnabled = undefined;
86
86
  this.mapView = undefined;
@@ -550,7 +550,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
550
550
  const displayClass = this._exportType === EExportType.PDF ? "display-block" : "display-none";
551
551
  const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
552
552
  const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
553
- return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: this.defaultNumLabelsPerPage, disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
553
+ return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: "padding-sides-1" }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.addTitle)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
554
554
  }
555
555
  /**
556
556
  * Render the refine page
@@ -901,7 +901,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
901
901
  "defaultBufferDistance": [2, "default-buffer-distance"],
902
902
  "defaultBufferUnit": [1, "default-buffer-unit"],
903
903
  "defaultExportTitle": [1, "default-export-title"],
904
- "defaultNumLabelsPerPage": [8, "default-num-labels-per-page"],
904
+ "defaultNumLabelsPerPage": [2, "default-num-labels-per-page"],
905
905
  "featureEffect": [16],
906
906
  "featureHighlightEnabled": [4, "feature-highlight-enabled"],
907
907
  "mapView": [16],
@@ -60,13 +60,16 @@ async function queryObjectIds(geometries, layer) {
60
60
  * @returns Promise with the featureSet from the layer that match the provided ids
61
61
  */
62
62
  async function queryFeaturesByID(ids, layer, graphics, returnGeometry, outSpatialReference) {
63
- const num = layer.capabilities.query.maxRecordCount;
63
+ var _a;
64
+ const num = (_a = layer.capabilities) === null || _a === void 0 ? void 0 : _a.query.maxRecordCount;
64
65
  const start = 0;
65
66
  const q = layer.createQuery();
66
67
  q.start = start;
67
- q.num = num;
68
68
  q.returnGeometry = returnGeometry;
69
69
  q.objectIds = ids.slice(start, num);
70
+ if (num) {
71
+ q.num = num;
72
+ }
70
73
  if (outSpatialReference) {
71
74
  q.outSpatialReference = outSpatialReference;
72
75
  }