@arcgis/map-components 5.2.0-next.130 → 5.2.0-next.131

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/cdn/3XQAKJRR.js +2 -0
  2. package/dist/cdn/CBFS3BEX.js +2 -0
  3. package/dist/cdn/{S62FQUEJ.js → I6UNOZIU.js} +1 -1
  4. package/dist/cdn/{KY3ND2AY.js → ILB7T57D.js} +1 -1
  5. package/dist/cdn/{LA2B6YUW.js → QGJT6HJM.js} +2 -2
  6. package/dist/cdn/{MIGBO54V.js → QMTJIBIF.js} +1 -1
  7. package/dist/cdn/{KM2GXXBO.js → TXCP3D4T.js} +1 -1
  8. package/dist/cdn/YGXUS6KG.js +2 -0
  9. package/dist/cdn/assets/feature-form-next/t9n/messages.en.json +1 -1
  10. package/dist/cdn/index.js +1 -1
  11. package/dist/cdn/main.css +1 -1
  12. package/dist/chunks/attachment-utils.js +12 -0
  13. package/dist/components/arcgis-add-attachment-view/customElement.d.ts +48 -0
  14. package/dist/components/arcgis-attachment-thumbnail/customElement.d.ts +164 -0
  15. package/dist/components/arcgis-attachment-thumbnail/customElement.js +69 -0
  16. package/dist/components/arcgis-attachment-thumbnail/index.d.ts +1 -0
  17. package/dist/components/arcgis-attachment-thumbnail/index.js +2 -0
  18. package/dist/components/arcgis-attachment-validation-view/customElement.d.ts +48 -0
  19. package/dist/components/arcgis-feature-attachments/customElement.js +63 -69
  20. package/dist/components/arcgis-feature-form-field/customElement.d.ts +48 -0
  21. package/dist/docs/api.json +1 -1
  22. package/dist/docs/docs.json +1 -1
  23. package/dist/docs/vscode.html-custom-data.json +1 -1
  24. package/dist/docs/web-types.json +1 -1
  25. package/dist/index.d.ts +4 -0
  26. package/dist/loader.js +1 -0
  27. package/dist/types/lumina.d.ts +5 -0
  28. package/dist/types/preact.d.ts +6 -0
  29. package/dist/types/react.d.ts +7 -0
  30. package/dist/types/stencil.d.ts +5 -0
  31. package/package.json +6 -6
  32. package/dist/cdn/75DQILK2.js +0 -2
package/dist/index.d.ts CHANGED
@@ -50,6 +50,7 @@ import type { ArcgisExploratoryAnalysis } from "./components/arcgis-exploratory-
50
50
  import type { ArcgisFeature } from "./components/arcgis-feature/customElement.js";
51
51
  import type { ArcgisFeatureForm } from "./components/arcgis-feature-form/customElement.js";
52
52
  import type { ArcgisAddAttachmentView } from "./components/arcgis-add-attachment-view/customElement.js";
53
+ import type { ArcgisAttachmentThumbnail } from "./components/arcgis-attachment-thumbnail/customElement.js";
53
54
  import type { ArcgisAttachmentValidationView } from "./components/arcgis-attachment-validation-view/customElement.js";
54
55
  import type { ArcgisFilePicker } from "./components/arcgis-file-picker/customElement.js";
55
56
  import type { ArcgisFeatureFormFieldNumber } from "./components/arcgis-feature-form-field-number/customElement.js";
@@ -722,6 +723,7 @@ declare global {
722
723
  "arcgis-feature": ArcgisFeature;
723
724
  "arcgis-feature-form": ArcgisFeatureForm;
724
725
  "arcgis-add-attachment-view": ArcgisAddAttachmentView;
726
+ "arcgis-attachment-thumbnail": ArcgisAttachmentThumbnail;
725
727
  "arcgis-attachment-validation-view": ArcgisAttachmentValidationView;
726
728
  "arcgis-file-picker": ArcgisFilePicker;
727
729
  "arcgis-feature-form-field-number": ArcgisFeatureFormFieldNumber;
@@ -897,6 +899,8 @@ declare global {
897
899
  type HTMLArcgisAddAttachmentViewElementEventMap = ArcgisAddAttachmentView["@eventTypes"];
898
900
  type HTMLArcgisAddAttachmentViewElement = ArcgisAddAttachmentView;
899
901
 
902
+ type HTMLArcgisAttachmentThumbnailElement = ArcgisAttachmentThumbnail;
903
+
900
904
  type HTMLArcgisAttachmentValidationViewElement = ArcgisAttachmentValidationView;
901
905
 
902
906
  type HTMLArcgisFilePickerElementEventMap = ArcgisFilePicker["@eventTypes"];
package/dist/loader.js CHANGED
@@ -43,6 +43,7 @@ const s = t(e, {
43
43
  "arcgis-feature-fields": [() => import("./components/arcgis-feature-fields/customElement.js"), "description,expressionInfos:,fieldInfos:,graphic:,heading,headingLevel,isContentFieldInfos,layer:,messages:,values:"],
44
44
  "arcgis-feature-form": [() => import("./components/arcgis-feature-form/customElement.js"), "autoDestroyDisabled,disabled,editType,feature:,formTemplate:,groupDisplay,headingLevel,hideReadOnlyNotice,icon,label,layer:,map:,referenceElement,state:,timeZone,view:;destroy,getValues,submit"],
45
45
  "arcgis-add-attachment-view": [() => import("./components/arcgis-add-attachment-view/customElement.js"), "_messages:,attachment:,formDisabled,input:,messageOverrides:"],
46
+ "arcgis-attachment-thumbnail": [() => import("./components/arcgis-attachment-thumbnail/customElement.js"), "_messages:,attachment:,input:,messageOverrides:,skipFilenameAlt,visualScale"],
46
47
  "arcgis-attachment-validation-view": [() => import("./components/arcgis-attachment-validation-view/customElement.js"), "_messages:,includeCountCriteria,input:,messageOverrides:"],
47
48
  "arcgis-file-picker": [() => import("./components/arcgis-file-picker/customElement.js"), "_messages:,accept:,disabled,fileTypeCategories:,heading,icon,messageOverrides:,multipleEnabled;open"],
48
49
  "arcgis-feature-form-field": [() => import("./components/arcgis-feature-form-field/customElement.js"), "_messages:,disabled,input:,messageOverrides:,readOnly,valueChangeCallback:;setFocus"],
@@ -25,6 +25,7 @@ import type { ArcgisExploratoryAnalysis } from "../components/arcgis-exploratory
25
25
  import type { ArcgisFeature } from "../components/arcgis-feature/customElement.js";
26
26
  import type { ArcgisFeatureForm } from "../components/arcgis-feature-form/customElement.js";
27
27
  import type { ArcgisAddAttachmentView } from "../components/arcgis-add-attachment-view/customElement.js";
28
+ import type { ArcgisAttachmentThumbnail } from "../components/arcgis-attachment-thumbnail/customElement.js";
28
29
  import type { ArcgisAttachmentValidationView } from "../components/arcgis-attachment-validation-view/customElement.js";
29
30
  import type { ArcgisFilePicker } from "../components/arcgis-file-picker/customElement.js";
30
31
  import type { ArcgisFeatureFormFieldNumber } from "../components/arcgis-feature-form-field-number/customElement.js";
@@ -310,6 +311,9 @@ interface LuminaArcgisAddAttachmentView extends Partial<Pick<ArcgisAddAttachment
310
311
  onarcgisFilesSelect?: EventHandler<ArcgisAddAttachmentView["arcgisFilesSelect"]>;
311
312
  }
312
313
 
314
+ interface LuminaArcgisAttachmentThumbnail extends Partial<Pick<ArcgisAttachmentThumbnail, "attachment" | "input" | "messageOverrides" | "skipFilenameAlt" | "visualScale">>, h.JSX.HTMLAttributes<ArcgisAttachmentThumbnail> {
315
+ }
316
+
313
317
  interface LuminaArcgisAttachmentValidationView extends Partial<Pick<ArcgisAttachmentValidationView, "includeCountCriteria" | "input" | "messageOverrides">>, h.JSX.HTMLAttributes<ArcgisAttachmentValidationView> {
314
318
  }
315
319
 
@@ -962,6 +966,7 @@ declare module "@arcgis/lumina" {
962
966
  "arcgis-feature": LuminaArcgisFeature;
963
967
  "arcgis-feature-form": LuminaArcgisFeatureForm;
964
968
  "arcgis-add-attachment-view": LuminaArcgisAddAttachmentView;
969
+ "arcgis-attachment-thumbnail": LuminaArcgisAttachmentThumbnail;
965
970
  "arcgis-attachment-validation-view": LuminaArcgisAttachmentValidationView;
966
971
  "arcgis-file-picker": LuminaArcgisFilePicker;
967
972
  "arcgis-feature-form-field-number": LuminaArcgisFeatureFormFieldNumber;
@@ -25,6 +25,7 @@ import type { ArcgisExploratoryAnalysis } from "../components/arcgis-exploratory
25
25
  import type { ArcgisFeature } from "../components/arcgis-feature/customElement.js";
26
26
  import type { ArcgisFeatureForm } from "../components/arcgis-feature-form/customElement.js";
27
27
  import type { ArcgisAddAttachmentView } from "../components/arcgis-add-attachment-view/customElement.js";
28
+ import type { ArcgisAttachmentThumbnail } from "../components/arcgis-attachment-thumbnail/customElement.js";
28
29
  import type { ArcgisAttachmentValidationView } from "../components/arcgis-attachment-validation-view/customElement.js";
29
30
  import type { ArcgisFilePicker } from "../components/arcgis-file-picker/customElement.js";
30
31
  import type { ArcgisFeatureFormFieldNumber } from "../components/arcgis-feature-form-field-number/customElement.js";
@@ -311,6 +312,9 @@ interface PreactArcgisAddAttachmentView extends Partial<Pick<ArcgisAddAttachment
311
312
  onarcgisFilesSelect?: EventHandler<ArcgisAddAttachmentView["arcgisFilesSelect"]>;
312
313
  }
313
314
 
315
+ interface PreactArcgisAttachmentThumbnail extends Partial<Pick<ArcgisAttachmentThumbnail, "attachment" | "input" | "messageOverrides" | "skipFilenameAlt" | "visualScale">>, HTMLAttributes<ArcgisAttachmentThumbnail> {
316
+ }
317
+
314
318
  interface PreactArcgisAttachmentValidationView extends Partial<Pick<ArcgisAttachmentValidationView, "includeCountCriteria" | "input" | "messageOverrides">>, HTMLAttributes<ArcgisAttachmentValidationView> {
315
319
  }
316
320
 
@@ -963,6 +967,7 @@ declare module 'preact' {
963
967
  "arcgis-feature": PreactArcgisFeature;
964
968
  "arcgis-feature-form": PreactArcgisFeatureForm;
965
969
  "arcgis-add-attachment-view": PreactArcgisAddAttachmentView;
970
+ "arcgis-attachment-thumbnail": PreactArcgisAttachmentThumbnail;
966
971
  "arcgis-attachment-validation-view": PreactArcgisAttachmentValidationView;
967
972
  "arcgis-file-picker": PreactArcgisFilePicker;
968
973
  "arcgis-feature-form-field-number": PreactArcgisFeatureFormFieldNumber;
@@ -1087,6 +1092,7 @@ declare module 'preact' {
1087
1092
  "arcgis-feature": PreactArcgisFeature;
1088
1093
  "arcgis-feature-form": PreactArcgisFeatureForm;
1089
1094
  "arcgis-add-attachment-view": PreactArcgisAddAttachmentView;
1095
+ "arcgis-attachment-thumbnail": PreactArcgisAttachmentThumbnail;
1090
1096
  "arcgis-attachment-validation-view": PreactArcgisAttachmentValidationView;
1091
1097
  "arcgis-file-picker": PreactArcgisFilePicker;
1092
1098
  "arcgis-feature-form-field-number": PreactArcgisFeatureFormFieldNumber;
@@ -25,6 +25,7 @@ import type { ArcgisExploratoryAnalysis } from "../components/arcgis-exploratory
25
25
  import type { ArcgisFeature } from "../components/arcgis-feature/customElement.js";
26
26
  import type { ArcgisFeatureForm } from "../components/arcgis-feature-form/customElement.js";
27
27
  import type { ArcgisAddAttachmentView } from "../components/arcgis-add-attachment-view/customElement.js";
28
+ import type { ArcgisAttachmentThumbnail } from "../components/arcgis-attachment-thumbnail/customElement.js";
28
29
  import type { ArcgisAttachmentValidationView } from "../components/arcgis-attachment-validation-view/customElement.js";
29
30
  import type { ArcgisFilePicker } from "../components/arcgis-file-picker/customElement.js";
30
31
  import type { ArcgisFeatureFormFieldNumber } from "../components/arcgis-feature-form-field-number/customElement.js";
@@ -311,6 +312,9 @@ interface ReactArcgisAddAttachmentView extends Partial<Pick<ArcgisAddAttachmentV
311
312
  onarcgisFilesSelect?: EventHandler<ArcgisAddAttachmentView["arcgisFilesSelect"]>;
312
313
  }
313
314
 
315
+ interface ReactArcgisAttachmentThumbnail extends Partial<Pick<ArcgisAttachmentThumbnail, "attachment" | "input" | "messageOverrides" | "skipFilenameAlt" | "visualScale">>, HTMLProps<ArcgisAttachmentThumbnail> {
316
+ }
317
+
314
318
  interface ReactArcgisAttachmentValidationView extends Partial<Pick<ArcgisAttachmentValidationView, "includeCountCriteria" | "input" | "messageOverrides">>, HTMLProps<ArcgisAttachmentValidationView> {
315
319
  }
316
320
 
@@ -963,6 +967,7 @@ declare module "react" {
963
967
  "arcgis-feature": ReactArcgisFeature;
964
968
  "arcgis-feature-form": ReactArcgisFeatureForm;
965
969
  "arcgis-add-attachment-view": ReactArcgisAddAttachmentView;
970
+ "arcgis-attachment-thumbnail": ReactArcgisAttachmentThumbnail;
966
971
  "arcgis-attachment-validation-view": ReactArcgisAttachmentValidationView;
967
972
  "arcgis-file-picker": ReactArcgisFilePicker;
968
973
  "arcgis-feature-form-field-number": ReactArcgisFeatureFormFieldNumber;
@@ -1089,6 +1094,7 @@ declare module "react/jsx-runtime" {
1089
1094
  "arcgis-feature": ReactArcgisFeature;
1090
1095
  "arcgis-feature-form": ReactArcgisFeatureForm;
1091
1096
  "arcgis-add-attachment-view": ReactArcgisAddAttachmentView;
1097
+ "arcgis-attachment-thumbnail": ReactArcgisAttachmentThumbnail;
1092
1098
  "arcgis-attachment-validation-view": ReactArcgisAttachmentValidationView;
1093
1099
  "arcgis-file-picker": ReactArcgisFilePicker;
1094
1100
  "arcgis-feature-form-field-number": ReactArcgisFeatureFormFieldNumber;
@@ -1215,6 +1221,7 @@ declare module "react/jsx-dev-runtime" {
1215
1221
  "arcgis-feature": ReactArcgisFeature;
1216
1222
  "arcgis-feature-form": ReactArcgisFeatureForm;
1217
1223
  "arcgis-add-attachment-view": ReactArcgisAddAttachmentView;
1224
+ "arcgis-attachment-thumbnail": ReactArcgisAttachmentThumbnail;
1218
1225
  "arcgis-attachment-validation-view": ReactArcgisAttachmentValidationView;
1219
1226
  "arcgis-file-picker": ReactArcgisFilePicker;
1220
1227
  "arcgis-feature-form-field-number": ReactArcgisFeatureFormFieldNumber;
@@ -25,6 +25,7 @@ import type { ArcgisExploratoryAnalysis } from "../components/arcgis-exploratory
25
25
  import type { ArcgisFeature } from "../components/arcgis-feature/customElement.js";
26
26
  import type { ArcgisFeatureForm } from "../components/arcgis-feature-form/customElement.js";
27
27
  import type { ArcgisAddAttachmentView } from "../components/arcgis-add-attachment-view/customElement.js";
28
+ import type { ArcgisAttachmentThumbnail } from "../components/arcgis-attachment-thumbnail/customElement.js";
28
29
  import type { ArcgisAttachmentValidationView } from "../components/arcgis-attachment-validation-view/customElement.js";
29
30
  import type { ArcgisFilePicker } from "../components/arcgis-file-picker/customElement.js";
30
31
  import type { ArcgisFeatureFormFieldNumber } from "../components/arcgis-feature-form-field-number/customElement.js";
@@ -311,6 +312,9 @@ interface StencilArcgisAddAttachmentView extends Partial<Pick<ArcgisAddAttachmen
311
312
  onArcgisFilesSelect?: EventHandler<ArcgisAddAttachmentView["arcgisFilesSelect"]>;
312
313
  }
313
314
 
315
+ interface StencilArcgisAttachmentThumbnail extends Partial<Pick<ArcgisAttachmentThumbnail, "attachment" | "input" | "messageOverrides" | "skipFilenameAlt" | "visualScale">>, StencilJsx.HTMLAttributes<ArcgisAttachmentThumbnail> {
316
+ }
317
+
314
318
  interface StencilArcgisAttachmentValidationView extends Partial<Pick<ArcgisAttachmentValidationView, "includeCountCriteria" | "input" | "messageOverrides">>, StencilJsx.HTMLAttributes<ArcgisAttachmentValidationView> {
315
319
  }
316
320
 
@@ -961,6 +965,7 @@ interface ExposedElements {
961
965
  "arcgis-feature": StencilArcgisFeature;
962
966
  "arcgis-feature-form": StencilArcgisFeatureForm;
963
967
  "arcgis-add-attachment-view": StencilArcgisAddAttachmentView;
968
+ "arcgis-attachment-thumbnail": StencilArcgisAttachmentThumbnail;
964
969
  "arcgis-attachment-validation-view": StencilArcgisAttachmentValidationView;
965
970
  "arcgis-file-picker": StencilArcgisFilePicker;
966
971
  "arcgis-feature-form-field-number": StencilArcgisFeatureFormFieldNumber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/map-components",
3
- "version": "5.2.0-next.130",
3
+ "version": "5.2.0-next.131",
4
4
  "description": "ArcGIS Map Components",
5
5
  "keywords": [
6
6
  "2D",
@@ -43,16 +43,16 @@
43
43
  "license": "SEE LICENSE IN LICENSE.md",
44
44
  "dependencies": {
45
45
  "@amcharts/amcharts5": "~5.20.8",
46
- "@arcgis/common-components": "5.2.0-next.130",
47
- "@arcgis/lumina": "5.2.0-next.130",
48
- "@arcgis/lumina-toolkit": "5.2.0-next.130",
49
- "@arcgis/toolkit": "5.2.0-next.130",
46
+ "@arcgis/common-components": "5.2.0-next.131",
47
+ "@arcgis/lumina": "5.2.0-next.131",
48
+ "@arcgis/lumina-toolkit": "5.2.0-next.131",
49
+ "@arcgis/toolkit": "5.2.0-next.131",
50
50
  "es-toolkit": "^1.52.0",
51
51
  "lit": "^3.3.0",
52
52
  "tslib": "^2.8.1"
53
53
  },
54
54
  "peerDependencies": {
55
- "@arcgis/core": "5.2.0-next.130",
55
+ "@arcgis/core": "5.2.0-next.131",
56
56
  "@esri/calcite-components": "^5.2.0-next.80"
57
57
  },
58
58
  "css.customData": [
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import d from"./R26ZJOWO.js";import c from"./TMJX7DFH.js";import"./R2XADTZ4.js";import"./FZBSTBH3.js";import"./QUZTFUWM.js";import{b}from"./4TV72DOP.js";import"./XURWCCLX.js";import{P as k,R as w,S as $,T as l,W as _,a as A,b as a,n as x}from"./I2BIPOZQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([z,P,C,L,{watch:S},,{e:f}])=>{function I(i){let t=i.toLowerCase();return t==="image/bmp"||t==="image/emf"||t==="image/exif"||t==="image/gif"||t==="image/x-icon"||t==="image/jpeg"||t==="image/png"||t==="image/tiff"||t==="image/x-wmf"}function T(i){return i?i==="text/plain"?"file-text":i==="application/pdf"?"file-pdf":i==="text/csv"?"file-csv":i==="application/gpx+xml"?"file-gpx":i==="application/x-dwf"?"file-cad":i==="application/postscript"||i==="application/json"||i==="text/xml"||i==="model/vrml"?"file-code":i==="application/x-zip-compressed"||i==="application/x-7z-compressed"||i==="application/x-gzip"||i==="application/x-tar"||i==="application/x-gtar"||i==="application/x-bzip2"||i==="application/gzip"||i==="application/x-compress"||i==="application/x-apple-diskimage"||i==="application/x-rar-compressed"||i==="application/zip"?"file-zip":i.includes("image/")?"file-image":i.includes("audio/")?"file-sound":i.includes("video/")?"file-video":i.includes("msexcel")||i.includes("ms-excel")||i.includes("spreadsheetml")?"file-excel":i.includes("msword")||i.includes("ms-word")||i.includes("wordprocessingml")?"file-word":i.includes("powerpoint")||i.includes("presentationml")?"file-report":"file":"file"}var j=A`:host([empty]){display:none}.item-link{display:flex;flex-grow:1;color:var(--calcite-color-text-3)}.item-link:visited,.item-link:hover,.item-link:focus-visible,.item-link:active{color:var(--calcite-color-text-1)}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}calcite-card:hover,calcite-card:focus,calcite-card:focus-within{--calcite-card-border-color: var(--calcite-color-text-1)}`,E=C.ofType(z),v=class extends k{constructor(){super(...arguments),this._attachmentLayer=null,this._supportsImageOrientation=window?.CSS?.supports("image-orientation","from-image"),this.hideSection=!1,this._attachmentInfos=new E,this.headingLevel=2,this.hidePreviewImageAttachmentName=!1,this.empty=!1}static{this.properties={effectiveDisplayType:16,getAttachmentsPromise:16,hideSection:16,_attachmentInfos:16,_hasContent:16,supportsResizeAttachments:16,attachmentKeywords:0,attachmentTypes:0,description:1,displayType:1,graphic:0,heading:1,messages:0,orderByFields:0,headingLevel:9,hidePreviewImageAttachmentName:5,empty:39}}static{this.styles=j}get _supportsTypeWildcard(){let{graphic:t}=this;if(!t)return!1;let e=f(t);return e?.loaded&&"capabilities"in e&&e.capabilities&&"attachment"in e.capabilities&&e.capabilities.attachment&&"supportsResize"in e.capabilities.attachment&&e.capabilities.attachment.supportsTypeWildcard||!1}get effectiveDisplayType(){let{displayType:t}=this;return!t||t==="auto"?this.supportsResizeAttachments?"preview":"list":t}get _hasContent(){return this._attachmentInfos.length>0||this.getAttachmentsPromise!=null}get supportsResizeAttachments(){let{graphic:t}=this;if(!t)return!1;let e=f(t);return e?.loaded&&"capabilities"in e&&e.capabilities&&"attachment"in e.capabilities&&e.capabilities.attachment&&"supportsResize"in e.capabilities.attachment&&e.capabilities.attachment.supportsResize||!1}loaded(){this.manager.onLifecycle(()=>[S(()=>this.graphic,()=>this.graphicChanged(),{initial:!0})])}async getAttachments(){let{_attachmentLayer:t,_attachmentInfos:e,orderByFields:n,attachmentTypes:c,attachmentKeywords:o,_supportsTypeWildcard:m}=this;if(!t||typeof t.queryAttachments!="function")throw new L("invalid-layer","getAttachments(): A valid layer is required.");let p=this.graphic?.getObjectId();if(typeof p!="number")throw new L("invalid-object-id","getAttachments(): Numeric object id is required");let u=n?.map(s=>`${s.field} ${s.order==="descending"?"DESC":"ASC"}`),r=new P({objectIds:[p],returnMetadata:!0,orderByFields:u,attachmentTypes:m?c?.filter(Boolean).map(s=>`${s}/*`):void 0,keywords:o}),h=[],d=t.queryAttachments(r).then(s=>s[p]||h).catch(()=>h);this.getAttachmentsPromise=d,this._setEmpty(!1);let g=await d;e.destroyAll(),g.length&&e.addMany(g),this.getAttachmentsPromise=null,this._setEmpty(!this._hasContent)}_setEmpty(t){x(()=>this.empty=t)}setAttachmentLayer(){let{graphic:t}=this,e=f(t);this._attachmentLayer=e?e.type==="scene"&&e.associatedLayer!=null?e.associatedLayer:e:null}graphicChanged(){if(!this.graphic){this._attachmentInfos.destroyAll(),this.getAttachmentsPromise=null,this._setEmpty(!0);return}this.setAttachmentLayer(),this.getAttachments().catch(()=>{this._attachmentInfos.destroyAll(),this.getAttachmentsPromise=null,this._setEmpty(!0)})}getCSSTransform(t){let{orientationInfo:e}=t;return!this._supportsImageOrientation&&e?[e.rotation?`rotate(${e.rotation}deg)`:"",e.mirrored?"scaleX(-1)":""].join(" "):""}render(){return this.empty?null:a`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this.renderAttachments()}</div>`}renderAttachmentsList(t){return a`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel??""} interaction-mode=static selection-mode=none>${t.toArray().filter(Boolean).map(e=>this.renderAttachmentListItem(e))}</calcite-list>`}renderAttachmentsPreview(t){return a`<calcite-card-group .label=${this.messages?.componentLabel??""}>${this.getAttachmentsPromise?a`<calcite-card loading></calcite-card>`:t.toArray().filter(Boolean).map(e=>this.renderAttachmentPreviewItem(e))}</calcite-card-group>`}renderAttachmentsCarousel(t){let e=t.toArray().filter(Boolean);return a`<calcite-carousel .paginationDisabled=${e.length<2} .label=${this.messages?.componentLabel??""} pagination-position=top>${this.getAttachmentsPromise?a`<calcite-carousel-item .label=${this.messages?.componentLabel??""}><calcite-card loading></calcite-card></calcite-carousel-item>`:e.map(n=>a`<calcite-carousel-item .label=${n.name||this.messages?.noTitle||""}>${this.renderAttachmentPreviewItem(n,!0)}</calcite-carousel-item>`)}</calcite-carousel>`}renderAttachments(){let{effectiveDisplayType:t,_attachmentInfos:e}=this;return t==="carousel"?this.renderAttachmentsCarousel(e):t==="preview"?this.renderAttachmentsPreview(e):this.renderAttachmentsList(e)}renderAttachmentListItem(t){let{supportsResizeAttachments:e}=this,{contentType:n,name:c,url:o,size:m}=t,p=64,u=c||this.messages?.noTitle,r=T(n),h=this.getCSSTransform(t),d=h?{transform:h,"image-orientation":"none"}:{},g=e&&I(n),s=a`<a class=${w(b("item-link","item-link--list",{"item-link--list-icon":!g}))} slot=content-start href=${o??void 0??l} rel=noreferrer target=_blank>${g?a`<img alt=${c??l} src=${`${o}${o?.includes("?")?"&":"?"}w=${p}&s=${m}`} style=${$(d)} title=${c??l}>`:a`<calcite-icon .icon=${r}></calcite-icon>`}</a>`,y=a`<calcite-link slot=content .href=${o??void 0} rel=noreferrer target=_blank>${u}</calcite-link>`;return a`<calcite-list-item .label=${u}>${s}${y}</calcite-list-item>`}renderAttachmentPreviewItem(t,e=!1){let{supportsResizeAttachments:n}=this,{contentType:c,name:o,url:m,size:p}=t,u=225,r=o||this.messages?.noTitle,h=T(c),d=this.getCSSTransform(t),g=d?{transform:d,"image-orientation":"none"}:{},s=n&&I(c),y=a`<a class=${w(b("item-link","item-link--preview"))} slot=thumbnail href=${m??void 0??l} rel=noreferrer target=_blank aria-label=${r??l} title=${r??l}>${s?a`<img alt=${r??l} src=${`${m}${m?.includes("?")?"&":"?"}w=${u}&s=${p}`} style=${$(g)}>`:a`<calcite-icon scale=l .icon=${h}></calcite-icon>`}</a>`;return a`<calcite-card .label=${r}>${y}${(e||this.hidePreviewImageAttachmentName)&&s?null:a`<span class="item-description" slot=description>${r}</span>`}</calcite-card>`}};_("arcgis-feature-attachments",v);return v},"rest/query/support/AttachmentInfo","rest/support/AttachmentQuery","core/Collection","core/Error","core/reactiveUtils",c,d)