@esri/solutions-components 0.11.29 → 0.11.30

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 (32) hide show
  1. package/dist/cjs/card-manager_3.cjs.entry.js +3 -4
  2. package/dist/cjs/create-feature_4.cjs.entry.js +2 -2
  3. package/dist/cjs/{downloadUtils-da9e19c6.js → downloadUtils-020884e7.js} +11 -5
  4. package/dist/cjs/feature-list.cjs.entry.js +2 -2
  5. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  6. package/dist/cjs/{popupUtils-69ad52f5.js → popupUtils-450b675a.js} +1 -1
  7. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  8. package/dist/collection/components/layer-table/layer-table.css +2 -0
  9. package/dist/collection/components/layer-table/layer-table.js +1 -2
  10. package/dist/collection/utils/downloadUtils.js +11 -5
  11. package/dist/collection/utils/downloadUtils.ts +15 -5
  12. package/dist/components/downloadUtils.js +11 -5
  13. package/dist/components/layer-table2.js +2 -3
  14. package/dist/esm/card-manager_3.entry.js +3 -4
  15. package/dist/esm/create-feature_4.entry.js +2 -2
  16. package/dist/esm/{downloadUtils-0b6677dc.js → downloadUtils-700fda94.js} +11 -5
  17. package/dist/esm/feature-list.entry.js +2 -2
  18. package/dist/esm/map-select-tools_3.entry.js +1 -1
  19. package/dist/esm/{popupUtils-9233302d.js → popupUtils-0e953f08.js} +1 -1
  20. package/dist/esm/public-notification.entry.js +1 -1
  21. package/dist/solutions-components/{p-9777c01f.entry.js → p-02c347ec.entry.js} +1 -1
  22. package/dist/solutions-components/{p-ee8fa795.entry.js → p-3c97c203.entry.js} +1 -1
  23. package/dist/solutions-components/{p-4294c7e6.entry.js → p-689fd216.entry.js} +1 -1
  24. package/dist/solutions-components/{p-4084e2d1.js → p-80c77f27.js} +2 -2
  25. package/dist/solutions-components/{p-477dbafa.entry.js → p-91b4c80e.entry.js} +1 -1
  26. package/dist/solutions-components/{p-f3003b3a.js → p-a7de6c48.js} +2 -2
  27. package/dist/solutions-components/{p-87ae2979.entry.js → p-d1d06100.entry.js} +1 -1
  28. package/dist/solutions-components/solutions-components.esm.js +1 -1
  29. package/dist/solutions-components/utils/downloadUtils.ts +15 -5
  30. package/dist/solutions-components_commit.txt +6 -6
  31. package/dist/types/utils/downloadUtils.d.ts +1 -1
  32. package/package.json +1 -1
@@ -10,7 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  const index = require('./index-af14245a.js');
11
11
  const locale = require('./locale-1c60be9c.js');
12
12
  const mapViewUtils = require('./mapViewUtils-8b26c9d0.js');
13
- const downloadUtils = require('./downloadUtils-da9e19c6.js');
13
+ const downloadUtils = require('./downloadUtils-020884e7.js');
14
14
  require('./esri-loader-08dc41bd.js');
15
15
  require('./_commonjsHelpers-baf43783.js');
16
16
  require('./interfaces-09c4c40e.js');
@@ -220,7 +220,7 @@ const CardManager = class {
220
220
  };
221
221
  CardManager.style = CardManagerStyle0;
222
222
 
223
- const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-foreground-1) !important}.search{--calcite-color-border-input:var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color:var(--calcite-color-status-danger);--calcite-color-text-1:var(--calcite-color-status-danger);--calcite-color-text-3:var(--calcite-color-status-danger)}";
223
+ const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0;left:unset}html[dir=\"rtl\"] .share-action{left:0;right:unset}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-foreground-1) !important}.search{--calcite-color-border-input:var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color:var(--calcite-color-status-danger);--calcite-color-text-1:var(--calcite-color-status-danger);--calcite-color-text-3:var(--calcite-color-status-danger)}";
224
224
  const LayerTableStyle0 = layerTableCss;
225
225
 
226
226
  const LayerTable = class {
@@ -2103,8 +2103,7 @@ const LayerTable = class {
2103
2103
  }, []);
2104
2104
  this._updateToolInfoLoading("export", true);
2105
2105
  this._csvExporting = true;
2106
- await downloadUtils.downloadCSV(null, //???
2107
- exportInfos, false, // formatUsingLayerPopup
2106
+ await downloadUtils.downloadCSV(this.mapView.map, exportInfos, false, // formatUsingLayerPopup
2108
2107
  false, // removeDuplicates
2109
2108
  true, // addColumnTitle
2110
2109
  fields, true, true);
@@ -10,11 +10,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  const index = require('./index-af14245a.js');
11
11
  const locale = require('./locale-1c60be9c.js');
12
12
  const mapViewUtils = require('./mapViewUtils-8b26c9d0.js');
13
- const popupUtils = require('./popupUtils-69ad52f5.js');
13
+ const popupUtils = require('./popupUtils-450b675a.js');
14
14
  require('./esri-loader-08dc41bd.js');
15
15
  require('./_commonjsHelpers-baf43783.js');
16
16
  require('./interfaces-09c4c40e.js');
17
- require('./downloadUtils-da9e19c6.js');
17
+ require('./downloadUtils-020884e7.js');
18
18
  require('./typeof-2a7e2dec.js');
19
19
  require('./index-5d8d6ae2.js');
20
20
  require('./solution-resource-d0a2f7fe.js');
@@ -2732,7 +2732,7 @@ function _getExpressionsFromLabel(labelFormat) {
2732
2732
  * @param objectIds Objects in the feature service whose related records are sought
2733
2733
  * @returns Promise resolving to an array of objects and their related records
2734
2734
  */
2735
- function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectIds) {
2735
+ function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectIds, token) {
2736
2736
  // See if the URL points to a service rather than a layer
2737
2737
  const endOfUrl = url.substring(url.lastIndexOf("/") + 1);
2738
2738
  if (isNaN(parseInt(endOfUrl))) {
@@ -2746,6 +2746,9 @@ function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectId
2746
2746
  relationshipId,
2747
2747
  url
2748
2748
  };
2749
+ if (token) {
2750
+ options.params = { token };
2751
+ }
2749
2752
  return _getFeatureServiceRelatedRecordsTranche(options);
2750
2753
  }
2751
2754
  /**
@@ -2757,11 +2760,13 @@ function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectId
2757
2760
  * @returns Promise resolving to an array of objects and their related records
2758
2761
  */
2759
2762
  function _getFeatureServiceRelatedRecordsTranche(options, relationships = [], resultOffset = 0) {
2763
+ const params = {
2764
+ ...options.params,
2765
+ resultOffset
2766
+ };
2760
2767
  return queryRelated({
2761
2768
  ...options,
2762
- params: {
2763
- resultOffset
2764
- }
2769
+ params
2765
2770
  })
2766
2771
  .then((response) => {
2767
2772
  relationships.push(...response.relatedRecordGroups);
@@ -3018,6 +3023,7 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
3018
3023
  * @returns Promise resolving when function is done
3019
3024
  */
3020
3025
  async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
3026
+ const token = webmap?.portalItem?.portal?.credential?.token;
3021
3027
  // Get the label formatting, if any
3022
3028
  const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
3023
3029
  // Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
@@ -3026,7 +3032,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
3026
3032
  let featureSet = [];
3027
3033
  if (typeof (labelFormatProps.relationshipId) !== "undefined") {
3028
3034
  // Get the related items for each id; we're asking for the full item
3029
- const relatedRecordGroups = await _getFeatureServiceRelatedRecords(layer.url, layer.layerId, labelFormatProps.relationshipId, ids);
3035
+ const relatedRecordGroups = await _getFeatureServiceRelatedRecords(layer.url, layer.layerId, labelFormatProps.relationshipId, ids, token);
3030
3036
  // Extract the attributes from the results and merge them into a single list. relatedRecordGroups has the form
3031
3037
  // [{
3032
3038
  // "objectId",
@@ -9,11 +9,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-af14245a.js');
11
11
  const locale = require('./locale-1c60be9c.js');
12
- const popupUtils = require('./popupUtils-69ad52f5.js');
12
+ const popupUtils = require('./popupUtils-450b675a.js');
13
13
  const mapViewUtils = require('./mapViewUtils-8b26c9d0.js');
14
14
  require('./esri-loader-08dc41bd.js');
15
15
  require('./_commonjsHelpers-baf43783.js');
16
- require('./downloadUtils-da9e19c6.js');
16
+ require('./downloadUtils-020884e7.js');
17
17
  require('./typeof-2a7e2dec.js');
18
18
  require('./index-5d8d6ae2.js');
19
19
  require('./solution-resource-d0a2f7fe.js');
@@ -12,7 +12,7 @@ const locale = require('./locale-1c60be9c.js');
12
12
  const mapViewUtils = require('./mapViewUtils-8b26c9d0.js');
13
13
  const interfaces = require('./interfaces-09c4c40e.js');
14
14
  const publicNotificationStore = require('./publicNotificationStore-beb782de.js');
15
- const downloadUtils = require('./downloadUtils-da9e19c6.js');
15
+ const downloadUtils = require('./downloadUtils-020884e7.js');
16
16
  require('./esri-loader-08dc41bd.js');
17
17
  require('./_commonjsHelpers-baf43783.js');
18
18
  require('./index-ffd12cb0.js');
@@ -5,7 +5,7 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const downloadUtils = require('./downloadUtils-da9e19c6.js');
8
+ const downloadUtils = require('./downloadUtils-020884e7.js');
9
9
  const locale = require('./locale-1c60be9c.js');
10
10
 
11
11
  /** @license
@@ -12,7 +12,7 @@ const interfaces = require('./interfaces-09c4c40e.js');
12
12
  const locale = require('./locale-1c60be9c.js');
13
13
  const mapViewUtils = require('./mapViewUtils-8b26c9d0.js');
14
14
  const publicNotificationStore = require('./publicNotificationStore-beb782de.js');
15
- const downloadUtils = require('./downloadUtils-da9e19c6.js');
15
+ const downloadUtils = require('./downloadUtils-020884e7.js');
16
16
  require('./esri-loader-08dc41bd.js');
17
17
  require('./_commonjsHelpers-baf43783.js');
18
18
  require('./index-ffd12cb0.js');
@@ -108,10 +108,12 @@ vaadin-grid-cell-content {
108
108
  .share-action {
109
109
  position: absolute;
110
110
  right: 0;
111
+ left: unset;
111
112
  }
112
113
 
113
114
  html[dir="rtl"] .share-action {
114
115
  left: 0;
116
+ right: unset;
115
117
  }
116
118
 
117
119
  .disabled {
@@ -1906,8 +1906,7 @@ export class LayerTable {
1906
1906
  }, []);
1907
1907
  this._updateToolInfoLoading("export", true);
1908
1908
  this._csvExporting = true;
1909
- await downloadUtils.downloadCSV(null, //???
1910
- exportInfos, false, // formatUsingLayerPopup
1909
+ await downloadUtils.downloadCSV(this.mapView.map, exportInfos, false, // formatUsingLayerPopup
1911
1910
  false, // removeDuplicates
1912
1911
  true, // addColumnTitle
1913
1912
  fields, true, true);
@@ -354,7 +354,7 @@ export function _getExpressionsFromLabel(labelFormat) {
354
354
  * @param objectIds Objects in the feature service whose related records are sought
355
355
  * @returns Promise resolving to an array of objects and their related records
356
356
  */
357
- export function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectIds) {
357
+ export function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectIds, token) {
358
358
  // See if the URL points to a service rather than a layer
359
359
  const endOfUrl = url.substring(url.lastIndexOf("/") + 1);
360
360
  if (isNaN(parseInt(endOfUrl))) {
@@ -368,6 +368,9 @@ export function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, o
368
368
  relationshipId,
369
369
  url
370
370
  };
371
+ if (token) {
372
+ options.params = { token };
373
+ }
371
374
  return _getFeatureServiceRelatedRecordsTranche(options);
372
375
  }
373
376
  /**
@@ -379,11 +382,13 @@ export function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, o
379
382
  * @returns Promise resolving to an array of objects and their related records
380
383
  */
381
384
  export function _getFeatureServiceRelatedRecordsTranche(options, relationships = [], resultOffset = 0) {
385
+ const params = {
386
+ ...options.params,
387
+ resultOffset
388
+ };
382
389
  return queryRelated({
383
390
  ...options,
384
- params: {
385
- resultOffset
386
- }
391
+ params
387
392
  })
388
393
  .then((response) => {
389
394
  relationships.push(...response.relatedRecordGroups);
@@ -640,6 +645,7 @@ export function _prepareAttributeValue(attributeValue, attributeType, attributeD
640
645
  * @returns Promise resolving when function is done
641
646
  */
642
647
  export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
648
+ const token = webmap?.portalItem?.portal?.credential?.token;
643
649
  // Get the label formatting, if any
644
650
  const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
645
651
  // Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
@@ -648,7 +654,7 @@ export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup =
648
654
  let featureSet = [];
649
655
  if (typeof (labelFormatProps.relationshipId) !== "undefined") {
650
656
  // Get the related items for each id; we're asking for the full item
651
- const relatedRecordGroups = await _getFeatureServiceRelatedRecords(layer.url, layer.layerId, labelFormatProps.relationshipId, ids);
657
+ const relatedRecordGroups = await _getFeatureServiceRelatedRecords(layer.url, layer.layerId, labelFormatProps.relationshipId, ids, token);
652
658
  // Extract the attributes from the results and merge them into a single list. relatedRecordGroups has the form
653
659
  // [{
654
660
  // "objectId",
@@ -540,7 +540,8 @@ export function _getFeatureServiceRelatedRecords(
540
540
  url: string,
541
541
  layerId: number,
542
542
  relationshipId?: number,
543
- objectIds?: number[]
543
+ objectIds?: number[],
544
+ token?: string
544
545
  ): Promise<IRelatedRecordGroup[]> {
545
546
  // See if the URL points to a service rather than a layer
546
547
  const endOfUrl = url.substring(url.lastIndexOf("/") + 1);
@@ -557,6 +558,10 @@ export function _getFeatureServiceRelatedRecords(
557
558
  url
558
559
  }
559
560
 
561
+ if (token) {
562
+ options.params = { token };
563
+ }
564
+
560
565
  return _getFeatureServiceRelatedRecordsTranche(options);
561
566
  }
562
567
 
@@ -573,11 +578,14 @@ export function _getFeatureServiceRelatedRecordsTranche(
573
578
  relationships: IRelatedRecordGroup[] = [],
574
579
  resultOffset = 0
575
580
  ): Promise<IRelatedRecordGroup[]> {
581
+ const params = {
582
+ ...options.params,
583
+ resultOffset
584
+ };
585
+
576
586
  return queryRelated({
577
587
  ...options,
578
- params: {
579
- resultOffset
580
- }
588
+ params
581
589
  } as IQueryRelatedOptionsOffset)
582
590
  .then(
583
591
  (response: IQueryRelatedResponseOffset) => {
@@ -893,6 +901,8 @@ export async function _prepareLabels(
893
901
  useFieldAliasNames = false,
894
902
  filterFields = false
895
903
  ): Promise<string[][]> {
904
+ const token = (webmap as any)?.portalItem?.portal?.credential?.token;
905
+
896
906
  // Get the label formatting, if any
897
907
  const labelFormatProps: ILabelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
898
908
 
@@ -904,7 +914,7 @@ export async function _prepareLabels(
904
914
  if (typeof (labelFormatProps.relationshipId) !== "undefined") {
905
915
  // Get the related items for each id; we're asking for the full item
906
916
  const relatedRecordGroups = await _getFeatureServiceRelatedRecords(
907
- layer.url, layer.layerId, labelFormatProps.relationshipId, ids);
917
+ layer.url, layer.layerId, labelFormatProps.relationshipId, ids, token);
908
918
 
909
919
  // Extract the attributes from the results and merge them into a single list. relatedRecordGroups has the form
910
920
  // [{
@@ -2730,7 +2730,7 @@ function _getExpressionsFromLabel(labelFormat) {
2730
2730
  * @param objectIds Objects in the feature service whose related records are sought
2731
2731
  * @returns Promise resolving to an array of objects and their related records
2732
2732
  */
2733
- function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectIds) {
2733
+ function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectIds, token) {
2734
2734
  // See if the URL points to a service rather than a layer
2735
2735
  const endOfUrl = url.substring(url.lastIndexOf("/") + 1);
2736
2736
  if (isNaN(parseInt(endOfUrl))) {
@@ -2744,6 +2744,9 @@ function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectId
2744
2744
  relationshipId,
2745
2745
  url
2746
2746
  };
2747
+ if (token) {
2748
+ options.params = { token };
2749
+ }
2747
2750
  return _getFeatureServiceRelatedRecordsTranche(options);
2748
2751
  }
2749
2752
  /**
@@ -2755,11 +2758,13 @@ function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectId
2755
2758
  * @returns Promise resolving to an array of objects and their related records
2756
2759
  */
2757
2760
  function _getFeatureServiceRelatedRecordsTranche(options, relationships = [], resultOffset = 0) {
2761
+ const params = {
2762
+ ...options.params,
2763
+ resultOffset
2764
+ };
2758
2765
  return queryRelated({
2759
2766
  ...options,
2760
- params: {
2761
- resultOffset
2762
- }
2767
+ params
2763
2768
  })
2764
2769
  .then((response) => {
2765
2770
  relationships.push(...response.relatedRecordGroups);
@@ -3016,6 +3021,7 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
3016
3021
  * @returns Promise resolving when function is done
3017
3022
  */
3018
3023
  async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
3024
+ const token = webmap?.portalItem?.portal?.credential?.token;
3019
3025
  // Get the label formatting, if any
3020
3026
  const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
3021
3027
  // Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
@@ -3024,7 +3030,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
3024
3030
  let featureSet = [];
3025
3031
  if (typeof (labelFormatProps.relationshipId) !== "undefined") {
3026
3032
  // Get the related items for each id; we're asking for the full item
3027
- const relatedRecordGroups = await _getFeatureServiceRelatedRecords(layer.url, layer.layerId, labelFormatProps.relationshipId, ids);
3033
+ const relatedRecordGroups = await _getFeatureServiceRelatedRecords(layer.url, layer.layerId, labelFormatProps.relationshipId, ids, token);
3028
3034
  // Extract the attributes from the results and merge them into a single list. relatedRecordGroups has the form
3029
3035
  // [{
3030
3036
  // "objectId",
@@ -13,7 +13,7 @@ import { d as defineCustomElement$3 } from './instant-apps-filter-list2.js';
13
13
  import { d as defineCustomElement$2 } from './instant-apps-social-share2.js';
14
14
  import { d as defineCustomElement$1 } from './map-layer-picker2.js';
15
15
 
16
- const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-foreground-1) !important}.search{--calcite-color-border-input:var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color:var(--calcite-color-status-danger);--calcite-color-text-1:var(--calcite-color-status-danger);--calcite-color-text-3:var(--calcite-color-status-danger)}";
16
+ const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0;left:unset}html[dir=\"rtl\"] .share-action{left:0;right:unset}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-foreground-1) !important}.search{--calcite-color-border-input:var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color:var(--calcite-color-status-danger);--calcite-color-text-1:var(--calcite-color-status-danger);--calcite-color-text-3:var(--calcite-color-status-danger)}";
17
17
  const LayerTableStyle0 = layerTableCss;
18
18
 
19
19
  const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTMLElement {
@@ -1897,8 +1897,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1897
1897
  }, []);
1898
1898
  this._updateToolInfoLoading("export", true);
1899
1899
  this._csvExporting = true;
1900
- await downloadCSV(null, //???
1901
- exportInfos, false, // formatUsingLayerPopup
1900
+ await downloadCSV(this.mapView.map, exportInfos, false, // formatUsingLayerPopup
1902
1901
  false, // removeDuplicates
1903
1902
  true, // addColumnTitle
1904
1903
  fields, true, true);
@@ -6,7 +6,7 @@
6
6
  import { r as registerInstance, c as createEvent, g as getElement, h, H as Host } from './index-df5db8e9.js';
7
7
  import { g as getLocaleComponentStrings, l as loadModules } from './locale-7874c756.js';
8
8
  import { g as getLayerOrTable, q as queryFeaturesByID, e as goToSelection, f as queryFeaturesByGlobalID, c as getFeatureLayerView } from './mapViewUtils-2682c21a.js';
9
- import { d as downloadCSV } from './downloadUtils-0b6677dc.js';
9
+ import { d as downloadCSV } from './downloadUtils-700fda94.js';
10
10
  import './esri-loader-c6842c6b.js';
11
11
  import './_commonjsHelpers-089957fe.js';
12
12
  import './interfaces-659e3836.js';
@@ -216,7 +216,7 @@ const CardManager = class {
216
216
  };
217
217
  CardManager.style = CardManagerStyle0;
218
218
 
219
- const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-foreground-1) !important}.search{--calcite-color-border-input:var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color:var(--calcite-color-status-danger);--calcite-color-text-1:var(--calcite-color-status-danger);--calcite-color-text-3:var(--calcite-color-status-danger)}";
219
+ const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0;left:unset}html[dir=\"rtl\"] .share-action{left:0;right:unset}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-foreground-1) !important}.search{--calcite-color-border-input:var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color:var(--calcite-color-status-danger);--calcite-color-text-1:var(--calcite-color-status-danger);--calcite-color-text-3:var(--calcite-color-status-danger)}";
220
220
  const LayerTableStyle0 = layerTableCss;
221
221
 
222
222
  const LayerTable = class {
@@ -2099,8 +2099,7 @@ const LayerTable = class {
2099
2099
  }, []);
2100
2100
  this._updateToolInfoLoading("export", true);
2101
2101
  this._csvExporting = true;
2102
- await downloadCSV(null, //???
2103
- exportInfos, false, // formatUsingLayerPopup
2102
+ await downloadCSV(this.mapView.map, exportInfos, false, // formatUsingLayerPopup
2104
2103
  false, // removeDuplicates
2105
2104
  true, // addColumnTitle
2106
2105
  fields, true, true);
@@ -6,11 +6,11 @@
6
6
  import { r as registerInstance, c as createEvent, g as getElement, h, F as Fragment, H as Host } from './index-df5db8e9.js';
7
7
  import { l as loadModules, g as getLocaleComponentStrings } from './locale-7874c756.js';
8
8
  import { a as getAllLayers, g as getLayerOrTable } from './mapViewUtils-2682c21a.js';
9
- import { P as PopupUtils } from './popupUtils-9233302d.js';
9
+ import { P as PopupUtils } from './popupUtils-0e953f08.js';
10
10
  import './esri-loader-c6842c6b.js';
11
11
  import './_commonjsHelpers-089957fe.js';
12
12
  import './interfaces-659e3836.js';
13
- import './downloadUtils-0b6677dc.js';
13
+ import './downloadUtils-700fda94.js';
14
14
  import './typeof-ef2a007d.js';
15
15
  import './index-d88c3eb6.js';
16
16
  import './solution-resource-30a29505.js';
@@ -2730,7 +2730,7 @@ function _getExpressionsFromLabel(labelFormat) {
2730
2730
  * @param objectIds Objects in the feature service whose related records are sought
2731
2731
  * @returns Promise resolving to an array of objects and their related records
2732
2732
  */
2733
- function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectIds) {
2733
+ function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectIds, token) {
2734
2734
  // See if the URL points to a service rather than a layer
2735
2735
  const endOfUrl = url.substring(url.lastIndexOf("/") + 1);
2736
2736
  if (isNaN(parseInt(endOfUrl))) {
@@ -2744,6 +2744,9 @@ function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectId
2744
2744
  relationshipId,
2745
2745
  url
2746
2746
  };
2747
+ if (token) {
2748
+ options.params = { token };
2749
+ }
2747
2750
  return _getFeatureServiceRelatedRecordsTranche(options);
2748
2751
  }
2749
2752
  /**
@@ -2755,11 +2758,13 @@ function _getFeatureServiceRelatedRecords(url, layerId, relationshipId, objectId
2755
2758
  * @returns Promise resolving to an array of objects and their related records
2756
2759
  */
2757
2760
  function _getFeatureServiceRelatedRecordsTranche(options, relationships = [], resultOffset = 0) {
2761
+ const params = {
2762
+ ...options.params,
2763
+ resultOffset
2764
+ };
2758
2765
  return queryRelated({
2759
2766
  ...options,
2760
- params: {
2761
- resultOffset
2762
- }
2767
+ params
2763
2768
  })
2764
2769
  .then((response) => {
2765
2770
  relationships.push(...response.relatedRecordGroups);
@@ -3016,6 +3021,7 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
3016
3021
  * @returns Promise resolving when function is done
3017
3022
  */
3018
3023
  async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = undefined, useFieldAliasNames = false, filterFields = false) {
3024
+ const token = webmap?.portalItem?.portal?.credential?.token;
3019
3025
  // Get the label formatting, if any
3020
3026
  const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
3021
3027
  // Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
@@ -3024,7 +3030,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
3024
3030
  let featureSet = [];
3025
3031
  if (typeof (labelFormatProps.relationshipId) !== "undefined") {
3026
3032
  // Get the related items for each id; we're asking for the full item
3027
- const relatedRecordGroups = await _getFeatureServiceRelatedRecords(layer.url, layer.layerId, labelFormatProps.relationshipId, ids);
3033
+ const relatedRecordGroups = await _getFeatureServiceRelatedRecords(layer.url, layer.layerId, labelFormatProps.relationshipId, ids, token);
3028
3034
  // Extract the attributes from the results and merge them into a single list. relatedRecordGroups has the form
3029
3035
  // [{
3030
3036
  // "objectId",
@@ -5,11 +5,11 @@
5
5
  */
6
6
  import { r as registerInstance, c as createEvent, g as getElement, h } from './index-df5db8e9.js';
7
7
  import { l as loadModules, g as getLocaleComponentStrings } from './locale-7874c756.js';
8
- import { P as PopupUtils } from './popupUtils-9233302d.js';
8
+ import { P as PopupUtils } from './popupUtils-0e953f08.js';
9
9
  import { g as getLayerOrTable, c as getFeatureLayerView, h as highlightFeatures } from './mapViewUtils-2682c21a.js';
10
10
  import './esri-loader-c6842c6b.js';
11
11
  import './_commonjsHelpers-089957fe.js';
12
- import './downloadUtils-0b6677dc.js';
12
+ import './downloadUtils-700fda94.js';
13
13
  import './typeof-ef2a007d.js';
14
14
  import './index-d88c3eb6.js';
15
15
  import './solution-resource-30a29505.js';
@@ -8,7 +8,7 @@ import { a as getComponentClosestLanguage, l as loadModules, g as getLocaleCompo
8
8
  import { e as goToSelection, h as highlightFeatures, i as queryObjectIds, j as getQueryGeoms, c as getFeatureLayerView, k as queryFeaturesByGeometry, l as getIdSets, m as highlightAllFeatures } from './mapViewUtils-2682c21a.js';
9
9
  import { a as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-659e3836.js';
10
10
  import { s as state } from './publicNotificationStore-9ec5e22a.js';
11
- import { d as downloadCSV, a as downloadPDF } from './downloadUtils-0b6677dc.js';
11
+ import { d as downloadCSV, a as downloadPDF } from './downloadUtils-700fda94.js';
12
12
  import './esri-loader-c6842c6b.js';
13
13
  import './_commonjsHelpers-089957fe.js';
14
14
  import './index-c247b62b.js';
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import { _ as _prepareAttributeValue } from './downloadUtils-0b6677dc.js';
6
+ import { _ as _prepareAttributeValue } from './downloadUtils-700fda94.js';
7
7
  import { l as loadModules } from './locale-7874c756.js';
8
8
 
9
9
  /** @license
@@ -8,7 +8,7 @@ import { b as EExportType, c as EPageType, a as EWorkflowType } from './interfac
8
8
  import { l as loadModules, g as getLocaleComponentStrings } from './locale-7874c756.js';
9
9
  import { e as goToSelection, h as highlightFeatures } from './mapViewUtils-2682c21a.js';
10
10
  import { s as state } from './publicNotificationStore-9ec5e22a.js';
11
- import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-0b6677dc.js';
11
+ import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-700fda94.js';
12
12
  import './esri-loader-c6842c6b.js';
13
13
  import './_commonjsHelpers-089957fe.js';
14
14
  import './index-c247b62b.js';