@arcgis/common-components 5.2.0-next.102 → 5.2.0-next.104

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 (53) hide show
  1. package/dist/cdn/{KCTVPWKZ.js → 3TIDAJES.js} +1 -1
  2. package/dist/cdn/{MI3POVS3.js → 4DL4CQMD.js} +1 -1
  3. package/dist/cdn/{VILUEVNS.js → 4O3NDSCB.js} +1 -1
  4. package/dist/cdn/{2PEF5AVV.js → 76AEYDPR.js} +1 -1
  5. package/dist/cdn/{7RMMYGBW.js → 7CY3QEZW.js} +1 -1
  6. package/dist/cdn/{BEODRJOB.js → 7VETJO2V.js} +1 -1
  7. package/dist/cdn/{TXXMMPA6.js → 7XSCHHGO.js} +1 -1
  8. package/dist/cdn/AY6QNI6M.js +2 -0
  9. package/dist/cdn/{FEREAY2X.js → BOMP3AYJ.js} +1 -1
  10. package/dist/cdn/{DGU6DCZP.js → BQCBHDME.js} +1 -1
  11. package/dist/cdn/{ODCJ6CWI.js → CEXP5DLE.js} +1 -1
  12. package/dist/cdn/{6PGCMA3Z.js → EESAFFL6.js} +1 -1
  13. package/dist/cdn/{Y42WUDYP.js → EO2W4XX2.js} +1 -1
  14. package/dist/cdn/{LSIDKRJW.js → EQ7Q27AM.js} +1 -1
  15. package/dist/cdn/F55DGSXH.js +2 -0
  16. package/dist/cdn/{77PLMLQX.js → FQKMFVEL.js} +1 -1
  17. package/dist/cdn/{DJELJSO3.js → FQRP2RUU.js} +1 -1
  18. package/dist/cdn/{L5FYKALB.js → FRL73WUI.js} +1 -1
  19. package/dist/cdn/{BGE7ETFU.js → H4B7RWSC.js} +1 -1
  20. package/dist/cdn/{E6NBHGTX.js → IXISGCNR.js} +1 -1
  21. package/dist/cdn/{3NPK3XHQ.js → JH47GD45.js} +1 -1
  22. package/dist/cdn/{VENSWYOD.js → JLF6J4PV.js} +1 -1
  23. package/dist/cdn/{QSAZAXZ3.js → LLKF5IUE.js} +1 -1
  24. package/dist/cdn/{BJHMVEBH.js → M7RV4JOU.js} +1 -1
  25. package/dist/cdn/{ZLUCRCS4.js → MYCSWWIQ.js} +1 -1
  26. package/dist/cdn/{5PTU24YF.js → NANUDTUO.js} +1 -1
  27. package/dist/cdn/{3RMCUQWC.js → NUJU53OQ.js} +1 -1
  28. package/dist/cdn/{RP5JQ3O2.js → Q7X4435G.js} +1 -1
  29. package/dist/cdn/{AD4MYZ4B.js → RYAF2CEQ.js} +1 -1
  30. package/dist/cdn/SM5735TW.js +2 -0
  31. package/dist/cdn/{X3GTWZD5.js → SWYNNHSD.js} +1 -1
  32. package/dist/cdn/U4P7UKY3.js +2 -0
  33. package/dist/cdn/{HL3WXOVS.js → VL3L3YNC.js} +1 -1
  34. package/dist/cdn/WJZHHIWO.js +4 -0
  35. package/dist/cdn/{AFHSFRPM.js → XWGTFIHC.js} +1 -1
  36. package/dist/cdn/ZQJCCG4K.js +2 -0
  37. package/dist/cdn/assets/field-pick-list/t9n/messages.en.json +1 -1
  38. package/dist/cdn/index.js +1 -1
  39. package/dist/components/arcgis-field-pick-list/customElement.d.ts +8 -5
  40. package/dist/components/arcgis-field-pick-list/customElement.js +205 -118
  41. package/dist/components/arcgis-field-pick-list/index.js +4 -3
  42. package/dist/docs/api.json +1 -1
  43. package/dist/docs/docs.json +1 -1
  44. package/dist/docs/vscode.html-custom-data.json +1 -1
  45. package/dist/docs/web-types.json +1 -1
  46. package/dist/utils/types.d.ts +14 -1
  47. package/package.json +4 -4
  48. package/dist/cdn/56FZY46A.js +0 -2
  49. package/dist/cdn/7HJ55YSN.js +0 -2
  50. package/dist/cdn/B57H5R7I.js +0 -2
  51. package/dist/cdn/EWNQZP7X.js +0 -2
  52. package/dist/cdn/KMEK46VM.js +0 -4
  53. package/dist/cdn/NH4LEYDW.js +0 -2
@@ -1 +1 @@
1
- {"ok":"Replace","done":"Done","cancel":"Cancel","back":"Back","header":"Replace field","headerSelect":"Select fields","filter":"Search fields","info":"Info","edit":"Edit","delete":"Delete","displayName":"Display name","type":"Type","default":"Default","fieldName":"Field name","sort":"Sort","selectAll":"Select all","deselectAll":"Deselect all","noMatches":"No matches found."}
1
+ {"ok":"Replace","done":"Done","cancel":"Cancel","back":"Back","header":"Replace field","headerSelect":"Select fields","filter":"Search fields","info":"Info","edit":"Edit","delete":"Delete","displayName":"Display name","type":"Type","default":"Default","fieldName":"Field name","sort":"Sort","selectAll":"Select all","deselectAll":"Deselect all","subFieldsSelected":"${count} selected","noMatches":"No matches found."}
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{I as a,x as e}from"./KMEK46VM.js";var i=e(a,{"arcgis-ckeditor5":[()=>import("./DGU6DCZP.js"),"canResizeVertically,currentLanguage,customConfig,customExpressionCheck:,editorType,groupFieldsAndExpressions,intlExpressionsGroupHeading,intlFieldsGroupHeading,intlTextPlaceHolder,mentionFields:,readOnly,textData;getData,setFocus"],"arcgis-ckeditor5-popover":[()=>import("./NH4LEYDW.js"),"guid,intlCancel,intlLabel,intlOk,refElement:;reposition"],"arcgis-color-input":[()=>import("./56FZY46A.js"),"_messages:,clearable,color,compact,disabled,hideRecentColors,messageOverrides:,placement,popoverProps:,showTransparency,storageId;close,setFocus;isOpen"],"arcgis-coordinate-system-picker":[()=>import("./EWNQZP7X.js"),"_messages:,autoFilterToDefault,defaultWkid,filterEnabled,hideCategories:,value:;getSRDescription"],"arcgis-coordinate-system-picker-tree":[()=>import("./AD4MYZ4B.js"),"data:,value"],"arcgis-field-info":[()=>import("./VILUEVNS.js"),"_messages:,fieldName,hideAlias,hideNumericFormat,hideStatistics,layer:,view:;refresh"],"arcgis-field-pick-list":[()=>import("./7HJ55YSN.js"),"_messages:,customExpressionCheck:,expressionsGroupHeading,fields:,fieldsGroupHeading,filterNoResultsText,filterPlaceholderText,groupFieldsAndExpressions,heading,hideCancel,hideSort,layer:,listOnly,mapView:,multiple,okBtnText,popoverProps:,selectedFields:,showCancel,showDescription,showFieldInfo,showFieldName,showFieldTypeIcon,showFilterLength,showSelectionAll,showSort,sortBy,view:;reposition,setDisabled,setFocus"],"arcgis-histogram":[()=>import("./HL3WXOVS.js"),"_messages:,average,bins:,colorBlendingEnabled,colorStops:,dataLines:,icon,label,labelFormatter:,layout,max,messageOverrides:,min,standardDeviation,standardDeviationCount"],"arcgis-label-input":[()=>import("./2PEF5AVV.js"),"alignment,editing,labelFormatter:,readOnly,value;edit;getLabelBoundingClientRect"],"arcgis-picker-input":[()=>import("./MI3POVS3.js"),"disabled,heading,iconEnd,intlDone,label,popoverProps:;close,setFocus"],"arcgis-ramp-color":[()=>import("./QSAZAXZ3.js"),"layout,max,min,stops:"],"arcgis-ramp-color-break":[()=>import("./TXXMMPA6.js"),"layout,max,min,stops:"],"arcgis-ramp-opacity":[()=>import("./7RMMYGBW.js"),"fillColor,layout,max,min,stops:"],"arcgis-slider":[()=>import("./X3GTWZD5.js"),"activeValue:,allowValuesOverlap,autoDestroyDisabled,disabled,fillPlacement,fullRangeMax,fullRangeMin,keyboardLargeStep,labelFormatter:,layout,max,messageOverrides:,messages:,min,mirrored,popoverDisplay,popoverLabel,popoverPlacement,precision,rangeLabelsEditingEnabled,rangeLabelsPlacement,segmentsDraggingDisabled,showRangeLabels,steps,valueLabelsDisplay,valueLabelsEditingEnabled,valueLabelsPlacement,values;destroy"],"arcgis-slider-field":[()=>import("./BJHMVEBH.js"),"activeValue:,disabled,fieldType,fillPlacement,label,labelFormatter:,layout,max,messageOverrides:,messages:,min,mirrored,popoverLabel,rangeLabelsEditingEnabled,rangeLabelsPlacement,showRangeLabels,valueLabelsDisplay,valueLabelsEditingEnabled,valueLabelsPlacement,values,valuesAsDateOnly:,valuesAsFieldType:,valuesAsNumbers:,valuesAsTimeOnly:,valuesAsTimestampOffset:"],"arcgis-slider-histogram-range":[()=>import("./DJELJSO3.js"),"activeValue:,average,bins:,dataLines:,excludedBarColor:,fieldType,fillPlacement,includedBarColor:,label,labelFormatter:,layout,max,min,rangeLabelsEditingEnabled,rangeLabelsPlacement,showRangeLabels,standardDeviation,standardDeviationCount,valueLabelsDisplay,valueLabelsEditingEnabled,values;destroy,generateWhereClause,updateFromHistogramResult"],"arcgis-slider-input":[()=>import("./E6NBHGTX.js"),"disabled,flipLabels,label,max,min,scale,step,unitsLabel,value,withSteppers"],"arcgis-ticks":[()=>import("./ODCJ6CWI.js"),"interactive,interpolationExponent,labelFormatter:,labelPlacement,layout,max,min,mirrored,mode,showBaseline,showLabels,values"],"arcgis-toolbar":[()=>import("./5PTU24YF.js"),"barElement:,layout,relativePosition,scale,toolbarKind,tooltipAppearance"],"arcgis-toolbar-action":[()=>import("./Y42WUDYP.js"),"actionElement:,active,appearance,disabled,icon,iconFlipRtl,indicator,kind,labelText,loading,textEnabled,tooltipText;;measure,proxiedRender"],"arcgis-toolbar-group":[()=>import("./3RMCUQWC.js"),"preferEndSlot,priority;;measure,proxiedRender"],"arcgis-toolbar-item":[()=>import("./6PGCMA3Z.js"),"actionElement:,active,disabled,icon,iconFlipRtl,labelText,lastActivated:,loading,tooltipText;;measure,proxiedRender"],"arcgis-toolbar-more-button":[()=>import("./77PLMLQX.js"),"menuAppearance,overflowActionLabel,priority;;measure,proxiedRender"],"arcgis-toolbar-split-button":[()=>import("./RP5JQ3O2.js"),"menuAppearance,overflowActionLabel,priority;;measure,proxiedRender"],"arcgis-unique-values-list":[()=>import("./3NPK3XHQ.js"),"_messages:,fieldName,layer:,maxHeight,multiple,numberFormatOptions:,partialUniqueValues,selectedValues:,showFilterLength,sortBy,uniqueValues:,view:,visualizationSource;getUniqueValues,setFocus"],"arcgis-value-picker":[()=>import("./LSIDKRJW.js"),"autoDestroyDisabled,disabled,hideNextButton,hidePlayButton,hidePreviousButton,icon,label,layout,loop,messages:,playRate,state:;destroy;next,pause,play,previous"],"arcgis-value-picker-collection":[()=>import("./BEODRJOB.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,items:;destroy;reset,step"],"arcgis-value-picker-combobox":[()=>import("./ZLUCRCS4.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,disabled,items:,messages:;destroy;reset,step"],"arcgis-value-picker-label":[()=>import("./L5FYKALB.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,items:;destroy;reset,step"],"arcgis-value-picker-slider":[()=>import("./KCTVPWKZ.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue,disabled,labelFormatter:,labels:,layout,majorTicks:,max,min,minorTicks:,mirrored,steps:;destroy;reset,step"]});i({resourcesUrl:import.meta.url});var r=new CSSStyleSheet;r.replaceSync("@layer{:not([hydrated]):is(arcgis-ckeditor5,arcgis-ckeditor5-popover,arcgis-color-input,arcgis-coordinate-system-picker,arcgis-coordinate-system-picker-tree,arcgis-field-info,arcgis-field-pick-list,arcgis-histogram,arcgis-label-input,arcgis-picker-input,arcgis-ramp-color,arcgis-ramp-color-break,arcgis-ramp-opacity,arcgis-slider,arcgis-slider-field,arcgis-slider-histogram-range,arcgis-slider-input,arcgis-ticks,arcgis-toolbar,arcgis-toolbar-action,arcgis-toolbar-group,arcgis-toolbar-item,arcgis-toolbar-more-button,arcgis-toolbar-split-button,arcgis-unique-values-list,arcgis-value-picker,arcgis-value-picker-collection,arcgis-value-picker-combobox,arcgis-value-picker-label,arcgis-value-picker-slider){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,r];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,a)
2
+ import{O as a,y as e}from"./WJZHHIWO.js";var i=e(a,{"arcgis-ckeditor5":[()=>import("./BQCBHDME.js"),"canResizeVertically,currentLanguage,customConfig,customExpressionCheck:,editorType,groupFieldsAndExpressions,intlExpressionsGroupHeading,intlFieldsGroupHeading,intlTextPlaceHolder,mentionFields:,readOnly,textData;getData,setFocus"],"arcgis-ckeditor5-popover":[()=>import("./AY6QNI6M.js"),"guid,intlCancel,intlLabel,intlOk,refElement:;reposition"],"arcgis-color-input":[()=>import("./U4P7UKY3.js"),"_messages:,clearable,color,compact,disabled,hideRecentColors,messageOverrides:,placement,popoverProps:,showTransparency,storageId;close,setFocus;isOpen"],"arcgis-coordinate-system-picker":[()=>import("./ZQJCCG4K.js"),"_messages:,autoFilterToDefault,defaultWkid,filterEnabled,hideCategories:,value:;getSRDescription"],"arcgis-coordinate-system-picker-tree":[()=>import("./RYAF2CEQ.js"),"data:,value"],"arcgis-field-info":[()=>import("./4O3NDSCB.js"),"_messages:,fieldName,hideAlias,hideNumericFormat,hideStatistics,layer:,view:;refresh"],"arcgis-field-pick-list":[()=>import("./F55DGSXH.js"),"_messages:,customExpressionCheck:,expressionsGroupHeading,fields:,fieldsGroupHeading,filterNoResultsText,filterPlaceholderText,groupFieldsAndExpressions,heading,hideCancel,hideSort,layer:,listOnly,mapView:,multiple,okBtnText,popoverProps:,selectedFields:,showCancel,showDescription,showFieldInfo,showFieldName,showFieldTypeIcon,showFilterLength,showSelectionAll,showSort,sortBy,view:;reposition,setDisabled,setFocus"],"arcgis-histogram":[()=>import("./VL3L3YNC.js"),"_messages:,average,bins:,colorBlendingEnabled,colorStops:,dataLines:,icon,label,labelFormatter:,layout,max,messageOverrides:,min,standardDeviation,standardDeviationCount"],"arcgis-label-input":[()=>import("./76AEYDPR.js"),"alignment,editing,labelFormatter:,readOnly,value;edit;getLabelBoundingClientRect"],"arcgis-picker-input":[()=>import("./4DL4CQMD.js"),"disabled,heading,iconEnd,intlDone,label,popoverProps:;close,setFocus"],"arcgis-ramp-color":[()=>import("./LLKF5IUE.js"),"layout,max,min,stops:"],"arcgis-ramp-color-break":[()=>import("./7XSCHHGO.js"),"layout,max,min,stops:"],"arcgis-ramp-opacity":[()=>import("./7CY3QEZW.js"),"fillColor,layout,max,min,stops:"],"arcgis-slider":[()=>import("./SWYNNHSD.js"),"activeValue:,allowValuesOverlap,autoDestroyDisabled,disabled,fillPlacement,fullRangeMax,fullRangeMin,keyboardLargeStep,labelFormatter:,layout,max,messageOverrides:,messages:,min,mirrored,popoverDisplay,popoverLabel,popoverPlacement,precision,rangeLabelsEditingEnabled,rangeLabelsPlacement,segmentsDraggingDisabled,showRangeLabels,steps,valueLabelsDisplay,valueLabelsEditingEnabled,valueLabelsPlacement,values;destroy"],"arcgis-slider-field":[()=>import("./M7RV4JOU.js"),"activeValue:,disabled,fieldType,fillPlacement,label,labelFormatter:,layout,max,messageOverrides:,messages:,min,mirrored,popoverLabel,rangeLabelsEditingEnabled,rangeLabelsPlacement,showRangeLabels,valueLabelsDisplay,valueLabelsEditingEnabled,valueLabelsPlacement,values,valuesAsDateOnly:,valuesAsFieldType:,valuesAsNumbers:,valuesAsTimeOnly:,valuesAsTimestampOffset:"],"arcgis-slider-histogram-range":[()=>import("./FQRP2RUU.js"),"activeValue:,average,bins:,dataLines:,excludedBarColor:,fieldType,fillPlacement,includedBarColor:,label,labelFormatter:,layout,max,min,rangeLabelsEditingEnabled,rangeLabelsPlacement,showRangeLabels,standardDeviation,standardDeviationCount,valueLabelsDisplay,valueLabelsEditingEnabled,values;destroy,generateWhereClause,updateFromHistogramResult"],"arcgis-slider-input":[()=>import("./IXISGCNR.js"),"disabled,flipLabels,label,max,min,scale,step,unitsLabel,value,withSteppers"],"arcgis-ticks":[()=>import("./CEXP5DLE.js"),"interactive,interpolationExponent,labelFormatter:,labelPlacement,layout,max,min,mirrored,mode,showBaseline,showLabels,values"],"arcgis-toolbar":[()=>import("./NANUDTUO.js"),"barElement:,layout,relativePosition,scale,toolbarKind,tooltipAppearance"],"arcgis-toolbar-action":[()=>import("./EO2W4XX2.js"),"actionElement:,active,appearance,disabled,icon,iconFlipRtl,indicator,kind,labelText,loading,textEnabled,tooltipText;;measure,proxiedRender"],"arcgis-toolbar-group":[()=>import("./NUJU53OQ.js"),"preferEndSlot,priority;;measure,proxiedRender"],"arcgis-toolbar-item":[()=>import("./EESAFFL6.js"),"actionElement:,active,disabled,icon,iconFlipRtl,labelText,lastActivated:,loading,tooltipText;;measure,proxiedRender"],"arcgis-toolbar-more-button":[()=>import("./FQKMFVEL.js"),"menuAppearance,overflowActionLabel,priority;;measure,proxiedRender"],"arcgis-toolbar-split-button":[()=>import("./Q7X4435G.js"),"menuAppearance,overflowActionLabel,priority;;measure,proxiedRender"],"arcgis-unique-values-list":[()=>import("./JH47GD45.js"),"_messages:,fieldName,layer:,maxHeight,multiple,numberFormatOptions:,partialUniqueValues,selectedValues:,showFilterLength,sortBy,uniqueValues:,view:,visualizationSource;getUniqueValues,setFocus"],"arcgis-value-picker":[()=>import("./EQ7Q27AM.js"),"autoDestroyDisabled,disabled,hideNextButton,hidePlayButton,hidePreviousButton,icon,label,layout,loop,messages:,playRate,state:;destroy;next,pause,play,previous"],"arcgis-value-picker-collection":[()=>import("./7VETJO2V.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,items:;destroy;reset,step"],"arcgis-value-picker-combobox":[()=>import("./MYCSWWIQ.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,disabled,items:,messages:;destroy;reset,step"],"arcgis-value-picker-label":[()=>import("./FRL73WUI.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,items:;destroy;reset,step"],"arcgis-value-picker-slider":[()=>import("./3TIDAJES.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue,disabled,labelFormatter:,labels:,layout,majorTicks:,max,min,minorTicks:,mirrored,steps:;destroy;reset,step"]});i({resourcesUrl:import.meta.url});var r=new CSSStyleSheet;r.replaceSync("@layer{:not([hydrated]):is(arcgis-ckeditor5,arcgis-ckeditor5-popover,arcgis-color-input,arcgis-coordinate-system-picker,arcgis-coordinate-system-picker-tree,arcgis-field-info,arcgis-field-pick-list,arcgis-histogram,arcgis-label-input,arcgis-picker-input,arcgis-ramp-color,arcgis-ramp-color-break,arcgis-ramp-opacity,arcgis-slider,arcgis-slider-field,arcgis-slider-histogram-range,arcgis-slider-input,arcgis-ticks,arcgis-toolbar,arcgis-toolbar-action,arcgis-toolbar-group,arcgis-toolbar-item,arcgis-toolbar-more-button,arcgis-toolbar-split-button,arcgis-unique-values-list,arcgis-value-picker,arcgis-value-picker-collection,arcgis-value-picker-combobox,arcgis-value-picker-label,arcgis-value-picker-slider){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,r];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,a)
@@ -35,6 +35,7 @@ export abstract class ArcgisFieldPickList extends LitElement {
35
35
  sort: string;
36
36
  selectAll: string;
37
37
  deselectAll: string;
38
+ subFieldsSelected: string;
38
39
  noMatches: string;
39
40
  } & T9nMeta<{
40
41
  ok: string;
@@ -54,6 +55,7 @@ export abstract class ArcgisFieldPickList extends LitElement {
54
55
  sort: string;
55
56
  selectAll: string;
56
57
  deselectAll: string;
58
+ subFieldsSelected: string;
57
59
  noMatches: string;
58
60
  }>;
59
61
  /** Custom function to distinguish expressions from fields. */
@@ -87,7 +89,7 @@ export abstract class ArcgisFieldPickList extends LitElement {
87
89
  */
88
90
  accessor hideCancel: boolean;
89
91
  /**
90
- * If true, hides the sort menu button.
92
+ * If true, hides the top-level sort menu button. Sorting applies directly to any sub-fields.
91
93
  *
92
94
  * @default false
93
95
  */
@@ -95,7 +97,7 @@ export abstract class ArcgisFieldPickList extends LitElement {
95
97
  /** Layer instance. */
96
98
  accessor layer: FieldPickListLayer | undefined;
97
99
  /**
98
- * If true, renders without a popover.
100
+ * If true, renders without a popover (when true, groups of sub-fields are not supported).
99
101
  *
100
102
  * @default false
101
103
  */
@@ -145,13 +147,14 @@ export abstract class ArcgisFieldPickList extends LitElement {
145
147
  */
146
148
  accessor showFieldTypeIcon: boolean;
147
149
  /**
148
- * If true, displays the filter option based on the number of fields.
150
+ * The number of selectable fields at which to display the top-level filter option. Sub-fields are included.
149
151
  *
150
152
  * @default 10
151
153
  */
152
154
  accessor showFilterLength: number;
153
155
  /**
154
- * If true, displays a 'Select All' button on top of the list. Valid only if multiple is set to true.
156
+ * If true, displays a 'Select All' button at the top level of the list. Selection applies directly to any sub-fields.
157
+ * Valid only if multiple is set to true.
155
158
  *
156
159
  * @default false
157
160
  */
@@ -162,7 +165,7 @@ export abstract class ArcgisFieldPickList extends LitElement {
162
165
  */
163
166
  accessor showSort: boolean;
164
167
  /**
165
- * The initial sort order.
168
+ * The initial sort order. Sort order applies directly to any sub-fields.
166
169
  *
167
170
  * @default "default"
168
171
  */
@@ -1,48 +1,83 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as w } from "../../chunks/runtime.js";
3
- import { keyed as u } from "lit/directives/keyed.js";
4
- import { LitElement as y, createEvent as a, renderElement as $, nothing as h, safeStyleMap as f, safeClassMap as v } from "@arcgis/lumina";
5
- import { createRef as r, ref as c } from "lit/directives/ref.js";
6
- import { html as l, css as C } from "lit";
7
- import { Task as S } from "@lit/task";
8
- import { log as g, composeMissingPropertyMessage as x } from "@arcgis/toolkit/log";
9
- import { F } from "../../chunks/internal-types.js";
10
- import { i as b } from "../../chunks/general.js";
11
- import { u as k } from "../../chunks/useT9n.js";
12
- const n = /* @__PURE__ */ new Map();
13
- n.set("oid", "key");
14
- n.set("guid", "key");
15
- n.set("global-id", "key");
16
- n.set("blob", "binary");
17
- n.set("integer", "integer");
18
- n.set("small-integer", "integer");
19
- n.set("big-integer", "integer");
20
- n.set("single", "number");
21
- n.set("double", "number");
22
- n.set("long", "number");
23
- n.set("number", "number");
24
- n.set("date", "date-time");
25
- n.set("date-only", "calendar");
26
- n.set("time-only", "clock");
27
- n.set("timestamp-offset", "time-zone");
28
- n.set("string", "string");
29
- const B = ({ fieldType: m }) => l`<calcite-icon scale=s .icon=${n.get(m)}></calcite-icon>`, L = C`.panel{min-height:250px}.content{max-height:50vh}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`;
30
- class I extends y {
2
+ import { c as b } from "../../chunks/runtime.js";
3
+ import { keyed as v } from "lit/directives/keyed.js";
4
+ import { repeat as y } from "lit/directives/repeat.js";
5
+ import { LitElement as I, createEvent as h, renderElement as S, nothing as m, safeStyleMap as $, safeClassMap as L } from "@arcgis/lumina";
6
+ import { createRef as p, ref as d } from "lit/directives/ref.js";
7
+ import { html as o, css as x } from "lit";
8
+ import { Task as T } from "@lit/task";
9
+ import { log as w, composeMissingPropertyMessage as k } from "@arcgis/toolkit/log";
10
+ import { F as C } from "../../chunks/internal-types.js";
11
+ import { i as B } from "../../chunks/general.js";
12
+ import { u as E } from "../../chunks/useT9n.js";
13
+ const r = /* @__PURE__ */ new Map();
14
+ r.set("oid", "key");
15
+ r.set("guid", "key");
16
+ r.set("global-id", "key");
17
+ r.set("blob", "binary");
18
+ r.set("integer", "integer");
19
+ r.set("small-integer", "integer");
20
+ r.set("big-integer", "integer");
21
+ r.set("single", "number");
22
+ r.set("double", "number");
23
+ r.set("long", "number");
24
+ r.set("number", "number");
25
+ r.set("date", "date-time");
26
+ r.set("date-only", "calendar");
27
+ r.set("time-only", "clock");
28
+ r.set("timestamp-offset", "time-zone");
29
+ r.set("string", "string");
30
+ const N = ({ fieldType: n }) => o`<calcite-icon scale=s .icon=${r.get(n)}></calcite-icon>`;
31
+ function P(n) {
32
+ return !!n.length && "fields" in n[0];
33
+ }
34
+ function u(n) {
35
+ return !!n.length && "subFieldInfos" in n[0];
36
+ }
37
+ function _(n) {
38
+ return n.filter((e) => u(e.fields));
39
+ }
40
+ function D(n) {
41
+ return n.flatMap((e) => e.fields);
42
+ }
43
+ function O(n) {
44
+ return n.flatMap((e) => u(e.fields) ? [] : e.fields);
45
+ }
46
+ function f(n) {
47
+ return n.flatMap(
48
+ (e) => u(e.fields) ? e.fields.flatMap((t) => t.subFieldInfos) : e.fields
49
+ );
50
+ }
51
+ function A(n, e) {
52
+ return n.flatMap((t) => u(t.fields) ? t.fields.flatMap(
53
+ (i) => i.subFieldInfos.filter((s) => g(s, e, !0))
54
+ ) : t.fields.filter((i) => F(i, e)));
55
+ }
56
+ function F(n, e) {
57
+ return e ? "subFieldInfos" in n ? g(n, e) || n.subFieldInfos.some((t) => g(t, e, !0)) : g(n, e) : !0;
58
+ }
59
+ function g(n, e, t = !1) {
60
+ return [t ? n.name.split("/").pop() : n.name, n.alias, n.description].some(
61
+ (s) => s?.toLocaleLowerCase().includes(e.toLocaleLowerCase())
62
+ );
63
+ }
64
+ const M = x`.panel{min-height:250px}.list-wrapper{max-height:50vh;overflow:auto}.list-controls{display:grid;grid-template-columns:1fr auto}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`;
65
+ class H extends I {
31
66
  constructor() {
32
- super(...arguments), this._messages = k({ blocking: !0 }), this.popoverNode = r(), this.listNode = r(), this.flowElement = r(), this.panelElement = r(), this.dropdownNode = r(), this.fieldInfoFlowItemEl = r(), this.allLists = [], this.filterText = "", this.panelCutOffHeight = 0, this.initialized = !1, this._propWatcherTask = new S(this, {
67
+ super(...arguments), this._messages = E({ blocking: !0 }), this.popoverNode = p(), this.listWrapper = p(), this.listNode = p(), this.flowElement = p(), this.panelElement = p(), this.dropdownNode = p(), this.fieldInfoFlowItemEl = p(), this.allLists = [], this.filterText = "", this.panelCutOffHeight = 0, this.initialized = !1, this._propWatcherTask = new T(this, {
33
68
  task: async ([e]) => {
34
- if (!this.listOnly && !b(e?.refElement))
35
- throw g("error", this, x("popoverProps")), new Error();
69
+ if (!this.listOnly && !B(e?.refElement))
70
+ throw w("error", this, k("popoverProps")), new Error();
36
71
  this._propWatcherTask.autoRun = !1;
37
72
  },
38
73
  args: () => [this.popoverProps]
39
- }), this.fields = [], this.selectedFields = [], this.listOnly = !1, this.showFieldInfo = !1, this.showFieldTypeIcon = !1, this.showFieldName = !1, this.showDescription = !1, this.showSelectionAll = !1, this.showCancel = !0, this.hideCancel = !1, this.showSort = !0, this.hideSort = !1, this.showFilterLength = 10, this.multiple = !1, this.sortBy = "default", this.groupFieldsAndExpressions = !1, this.arcgisChange = a(), this.arcgisClose = a(), this.arcgisDeleteField = a(), this.arcgisEditField = a(), this.arcgisFieldPickListChange = a(), this.arcgisFieldPickListDismissed = a(), this.arcgisFieldPickListSortByChange = a(), this.arcgisSortByChange = a();
74
+ }), this.fields = [], this.selectedFields = [], this.listOnly = !1, this.showFieldInfo = !1, this.showFieldTypeIcon = !1, this.showFieldName = !1, this.showDescription = !1, this.showSelectionAll = !1, this.showCancel = !0, this.hideCancel = !1, this.showSort = !0, this.hideSort = !1, this.showFilterLength = 10, this.multiple = !1, this.sortBy = "default", this.groupFieldsAndExpressions = !1, this.arcgisChange = h(), this.arcgisClose = h(), this.arcgisDeleteField = h(), this.arcgisEditField = h(), this.arcgisFieldPickListChange = h(), this.arcgisFieldPickListDismissed = h(), this.arcgisFieldPickListSortByChange = h(), this.arcgisSortByChange = h();
40
75
  }
41
76
  static {
42
77
  this.properties = { lastSortBy: 16, filterFields: 16, mapView: 0, view: 0, layer: 0, fields: 0, selectedFields: 0, listOnly: 5, popoverProps: 0, showFieldInfo: 5, showFieldTypeIcon: 5, showFieldName: 5, showDescription: 5, showSelectionAll: 5, showCancel: 5, hideCancel: 5, showSort: 5, hideSort: 5, showFilterLength: 9, multiple: 5, heading: 1, okBtnText: 1, filterPlaceholderText: 1, filterNoResultsText: 1, sortBy: 1, groupFieldsAndExpressions: 5, fieldsGroupHeading: 1, expressionsGroupHeading: 1, customExpressionCheck: 0 };
43
78
  }
44
79
  static {
45
- this.styles = L;
80
+ this.styles = M;
46
81
  }
47
82
  async reposition() {
48
83
  await this.popoverNode.value?.reposition();
@@ -56,7 +91,7 @@ class I extends y {
56
91
  }), 1);
57
92
  }
58
93
  load() {
59
- !this.view && this.mapView && (this.view = this.mapView), !this.showCancel && !this.hideCancel && (this.hideCancel = !0), !this.showSort && !this.hideSort && (this.hideSort = !0), this.listOnly && this.showFieldInfo && (this.showFieldInfo = !1, g("info", this, "showFieldInfo is not supported if listOnly is true.")), !this.multiple && this.selectedFields.length > 1 && (this.selectedFields = [this.selectedFields[0]]), this.lastSortBy = this.sortBy ?? this.lastSortBy, this.updateGroupedLists(), this.initialized = !0;
94
+ !this.view && this.mapView && (this.view = this.mapView), !this.showCancel && !this.hideCancel && (this.hideCancel = !0), !this.showSort && !this.hideSort && (this.hideSort = !0), this.listOnly && this.showFieldInfo && (this.showFieldInfo = !1, w("info", this, "showFieldInfo is not supported if listOnly is true.")), !this.multiple && this.selectedFields.length > 1 && (this.selectedFields = [this.selectedFields[0]]), this.lastSortBy = this.sortBy ?? this.lastSortBy, this.updateGroupedLists(), this.initialized = !0;
60
95
  }
61
96
  willUpdate(e) {
62
97
  this.initialized && (e.has("fields") || e.has("sortBy") || e.has("lastSortBy") || e.has("customExpressionCheck")) && (e.has("sortBy") && (this.lastSortBy = this.sortBy ?? this.lastSortBy), this.updateGroupedLists());
@@ -81,21 +116,21 @@ class I extends y {
81
116
  const e = this.panelElement.value?.getBoundingClientRect();
82
117
  if (e && e.bottom > window.innerHeight) {
83
118
  this.panelCutOffHeight = e.height - (e.bottom - window.innerHeight) - 5;
84
- const t = this.listNode.value?.getBoundingClientRect();
85
- t && (this.listNode.value.style.maxHeight = `${t.height - (e.bottom - window.innerHeight) - 5}px`);
119
+ const t = this.listWrapper.value?.getBoundingClientRect();
120
+ t && (this.listWrapper.value.style.maxHeight = `${t.height - (e.bottom - window.innerHeight) - 5}px`);
86
121
  }
87
122
  }
88
123
  }
89
124
  getSortedList(e) {
90
125
  let t = [...e];
91
- const s = t.filter((i) => i.type === "none");
92
- return t = t.filter((i) => i.type !== "none"), this.lastSortBy === "display" ? t.sort((i, o) => i.alias.localeCompare(o.alias)) : this.lastSortBy === "field" ? t.sort((i, o) => i.name.localeCompare(o.name)) : this.lastSortBy === "type" && t.sort((i, o) => i.type.localeCompare(o.type)), t = t.concat(s), t;
126
+ const i = t.filter((s) => s.type === "none");
127
+ return t = t.filter((s) => s.type !== "none"), this.lastSortBy === "display" ? t.sort((s, l) => s.alias.localeCompare(l.alias)) : this.lastSortBy === "field" ? t.sort((s, l) => s.name.localeCompare(l.name)) : this.lastSortBy === "type" && t.sort((s, l) => s.type.localeCompare(l.type)), t = t.concat(i), t;
93
128
  }
94
129
  isExpression(e) {
95
- return this.customExpressionCheck ? this.customExpressionCheck(e) : e.name.includes(F.expression);
130
+ return this.customExpressionCheck ? this.customExpressionCheck(e) : e.name.includes(C.expression);
96
131
  }
97
132
  canDeselectAll() {
98
- const e = this.getAllFields();
133
+ const e = f(this.allLists);
99
134
  return this.filterFields?.length ? this.filterContainsAll() : this.selectedFields.length === e.length;
100
135
  }
101
136
  filterContainsAll() {
@@ -103,47 +138,75 @@ class I extends y {
103
138
  }
104
139
  showFieldInfoCheck(e) {
105
140
  const { layer: t } = this;
106
- return this.showFieldInfo ? !(!t || this.isExpression(e) || e.name.includes(F.relationship) || e.type === "none") : !1;
141
+ return this.showFieldInfo ? !(!t || this.isExpression(e) || e.name.includes(C.relationship) || e.type === "none") : !1;
107
142
  }
108
143
  updateGroupedLists() {
109
- if (!this.fields)
110
- return;
111
- if (this.allLists = [], this.usingCustomGroups())
112
- for (const t of this.fields)
113
- this.allLists.push({
114
- title: t.title,
115
- fields: [...this.getSortedList(t.fields)]
116
- });
117
- else
118
- this.allLists = this.groupFieldsAndExpressions ? [
119
- {
120
- title: this.expressionsGroupHeading,
121
- fields: [...this.getSortedList(this.fields)].filter((t) => this.isExpression(t))
122
- },
123
- {
124
- title: this.fieldsGroupHeading,
125
- fields: [...this.getSortedList(this.fields)].filter((t) => !this.isExpression(t))
126
- }
127
- ] : [
128
- {
129
- title: void 0,
130
- fields: [...this.getSortedList(this.fields)]
144
+ if (this.fields)
145
+ if (this.allLists = [], P(this.fields))
146
+ for (const e of this.fields) {
147
+ if (this.listOnly && u(e.fields)) {
148
+ w("error", this, "subFieldInfos are not supported if listOnly is true.");
149
+ continue;
150
+ }
151
+ this.allLists.push({
152
+ title: e.title,
153
+ fields: this.getSortedGroupFields(e.fields)
154
+ });
131
155
  }
132
- ];
156
+ else
157
+ this.allLists = this.groupFieldsAndExpressions ? [
158
+ {
159
+ title: this.expressionsGroupHeading,
160
+ fields: [...this.getSortedList(this.fields)].filter((e) => this.isExpression(e))
161
+ },
162
+ {
163
+ title: this.fieldsGroupHeading,
164
+ fields: [...this.getSortedList(this.fields)].filter((e) => !this.isExpression(e))
165
+ }
166
+ ] : [
167
+ {
168
+ title: void 0,
169
+ fields: this.getSortedList(this.fields)
170
+ }
171
+ ];
172
+ }
173
+ getSortedGroupFields(e) {
174
+ return u(e) ? this.getSortedList(e).map((t) => ({
175
+ ...t,
176
+ subFieldInfos: this.getSortedList(t.subFieldInfos).map((i) => ({
177
+ ...i,
178
+ // ensure uniqueness
179
+ name: `${t.name}/${i.name}`
180
+ }))
181
+ })) : this.getSortedList(e);
133
182
  }
134
183
  addFieldInfoFlowItem(e, t) {
135
- const s = this.flowElement.value, i = $(l`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.name} class="panel" style=${f(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(o) => {
136
- o.currentTarget.remove(), this.fieldInfoFlowItemEl.value.selected = !1, this.panelElement.value.selected = !0, setTimeout(() => {
184
+ const i = this.flowElement.value, s = S(o`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.name} class="panel" style=${$(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(l) => {
185
+ l.currentTarget.remove(), this.fieldInfoFlowItemEl.value.selected = !1, this.panelElement.value.selected = !0, setTimeout(() => {
137
186
  t.setFocus();
138
187
  }, 300);
139
- }} ${c(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang ?? h} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);
140
- s.appendChild(i), this.panelElement.value.selected = !1, this.fieldInfoFlowItemEl?.value.setFocus();
188
+ }} ${d(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang ?? m} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);
189
+ i.appendChild(s), this.panelElement.value.selected = !1, setTimeout(() => this.fieldInfoFlowItemEl?.value.setFocus(), 1);
141
190
  }
142
- usingCustomGroups() {
143
- return !!this.fields.length && "fields" in this.fields[0];
191
+ addSubFieldInfoFlowItem(e, t) {
192
+ const i = this.flowElement.value, s = e.subFieldInfos.filter((a) => g(a, this.filterText, !0)), l = S(o`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.description ?? void 0} class="panel" style=${$(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(a) => {
193
+ a.currentTarget.remove(), this.fieldInfoFlowItemEl.value.selected = !1, this.panelElement.value.selected = !0, setTimeout(() => {
194
+ t.setFocus();
195
+ }, 300);
196
+ }} ${d(this.fieldInfoFlowItemEl)}><calcite-list .label=${e.alias ?? e.name} .selectionMode=${this.multiple ? "multiple" : "single"} @calciteListChange=${(a) => {
197
+ this.updateSelectedFieldsForList(a.currentTarget, e.subFieldInfos), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields }), this.multiple || (this.arcgisClose.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields }));
198
+ }}>${s.map((a) => this.renderCalciteListItem(a, !1))}</calcite-list>${this.filterText && !s.length && this.filterNoResultsText?.length !== 0 ? o`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}</calcite-flow-item>`);
199
+ i.appendChild(l), this.panelElement.value.selected = !1, setTimeout(() => this.fieldInfoFlowItemEl.value?.setFocus(), 1);
144
200
  }
145
- getAllFields() {
146
- return this.allLists.map((e) => e.fields).flat();
201
+ shouldRenderSelectionButton(e) {
202
+ return this.multiple && this.showSelectionAll && (!e || !this.filterText || !!this.filterFields?.length);
203
+ }
204
+ handleListSelectionChange(e) {
205
+ this.updateSelectedFieldsForList(this.listNode.value, e), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields }), this.multiple || (this.arcgisClose.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields }));
206
+ }
207
+ updateSelectedFieldsForList(e, t) {
208
+ const i = new Set(t.map((c) => c.name)), s = e.selectedItems.map((c) => c.value), l = this.selectedFields.filter((c) => !i.has(c) || s.includes(c)), a = s.filter((c) => !this.selectedFields.includes(c));
209
+ this.selectedFields = this.multiple ? [.../* @__PURE__ */ new Set([...l, ...a])] : s, this.reorderSelectedFieldsByCurrentListOrder();
147
210
  }
148
211
  setSortBy(e) {
149
212
  this.lastSortBy = e, this.updateGroupedLists(), this.arcgisSortByChange.emit(this.lastSortBy), this.arcgisFieldPickListSortByChange.emit(this.lastSortBy), this.reorderSelectedFieldsByCurrentListOrder() && (this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields }));
@@ -151,12 +214,12 @@ class I extends y {
151
214
  reorderSelectedFieldsByCurrentListOrder() {
152
215
  if (!this.selectedFields.length)
153
216
  return !1;
154
- const e = this.getAllFields().map((o) => o.name), t = new Set(this.selectedFields), s = e.filter((o) => t.has(o)), i = (
217
+ const e = f(this.allLists).map((l) => l.name), t = new Set(this.selectedFields), i = e.filter((l) => t.has(l)), s = (
155
218
  // adding/removing fields
156
- s.length !== this.selectedFields.length || // reordering fields
157
- s.some((o, p) => o !== this.selectedFields[p])
219
+ i.length !== this.selectedFields.length || // reordering fields
220
+ i.some((l, a) => l !== this.selectedFields[a])
158
221
  );
159
- return i && (this.selectedFields = [...s]), i;
222
+ return s && (this.selectedFields = [...i]), s;
160
223
  }
161
224
  render() {
162
225
  return this._propWatcherTask.render({
@@ -164,56 +227,80 @@ class I extends y {
164
227
  if (this.listOnly)
165
228
  return this.renderList();
166
229
  const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = this.popoverProps;
167
- return this.el.classList.add("js-app-flyout"), u(`${t.autoClose}`, l`<calcite-popover .placement=${t.placement ?? "leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance ?? -Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding ?? 0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading ?? (this.multiple ? this._messages.headerSelect : this._messages.header) ?? ""} @calcitePopoverClose=${() => {
230
+ return this.el.classList.add("js-app-flyout"), v(`${t.autoClose}`, o`<calcite-popover .placement=${t.placement ?? "leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance ?? -Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding ?? 0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading ?? (this.multiple ? this._messages.headerSelect : this._messages.header) ?? ""} @calcitePopoverClose=${() => {
168
231
  this.arcgisClose.emit(), this.arcgisFieldPickListDismissed.emit();
169
- }} ${c(this.popoverNode)}><calcite-flow style=${f({
232
+ }} ${d(this.popoverNode)}><calcite-flow style=${$({
170
233
  width: `${t.popoverWidth ?? t.refElement.getBoundingClientRect().width}px`,
171
234
  ...t.maxHeight && { maxHeight: t.maxHeight }
172
- })} ${c(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${() => {
235
+ })} ${d(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${() => {
173
236
  this.arcgisClose.emit(), this.arcgisFieldPickListDismissed.emit();
174
- }} ${c(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple || !this.hideCancel) && l`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple && !this.hideCancel ? l`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>` : l`${this.renderAddButton()}${this.renderCancelButton()}`}</div>` || ""}</calcite-flow-item></calcite-flow></calcite-popover>`);
237
+ }} ${d(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple || !this.hideCancel) && o`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple && !this.hideCancel ? o`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>` : o`${this.renderAddButton()}${this.renderCancelButton()}`}</div>` || ""}</calcite-flow-item></calcite-flow></calcite-popover>`);
175
238
  },
176
239
  error: () => ""
177
240
  });
178
241
  }
179
242
  renderList() {
180
- const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = this.getAllFields(), s = t.length >= this.showFilterLength;
181
- return l`${t.length ? l`<calcite-list .label=${e} .selectionMode=${this.multiple ? "multiple" : "single"} class=${v(this.listOnly ? "" : "content")} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteListChange=${() => {
182
- const i = this.listNode.value.selectedItems.map((d) => d.value), o = this.selectedFields.filter((d) => i.includes(d)), p = i.filter((d) => !this.selectedFields.includes(d));
183
- this.selectedFields = [.../* @__PURE__ */ new Set([...o, ...p])], this.reorderSelectedFieldsByCurrentListOrder(), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields }), this.multiple || (this.arcgisClose.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields }));
184
- }} @calciteListFilter=${(i) => {
185
- i.stopPropagation(), this.filterFields = this.listNode.value.filteredItems?.map((o) => o.value), this.filterText = this.listNode.value.filterText;
186
- }} ${c(this.listNode)}>${this.renderSortButton()}<slot name=content-center></slot>${this.multiple && this.showSelectionAll && (!s || !this.filterText || this.filterFields?.length) ? this.renderSelectionButton() : null}${this.renderListItems()}</calcite-list>` : l`<slot name=no-fields></slot>`}${this.filterFields && !this.filterFields.length && this.listNode.value && this.filterNoResultsText?.length !== 0 ? l`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}`;
187
- }
188
- renderSortButton() {
189
- const e = this.getAllFields();
190
- if (!(e.length >= this.showFilterLength && !this.hideSort))
243
+ const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = O(this.allLists), i = _(this.allLists), s = f(this.allLists).length >= this.showFilterLength;
244
+ return t.length || i.length ? i.length ? this.renderSplitLists(t, i, s) : this.renderTopLevelOnlyFieldList(e, t, s) : o`<slot name=no-fields></slot>`;
245
+ }
246
+ renderSplitLists(e, t, i) {
247
+ const s = f(this.allLists), l = D(this.allLists).some((a) => F(a, this.filterText));
248
+ return o`${i ? o`<div class="list-controls"><calcite-filter .items=${s} .filterProps=${["name", "alias", "description"]} .placeholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteFilterChange=${(a) => {
249
+ this.filterText = a.currentTarget.value, this.filterFields = this.filterText ? A(this.allLists, this.filterText).map((c) => c.name) : void 0;
250
+ }}></calcite-filter>${this.renderSortButton()}</div>` : null}<div class=${L(this.listOnly ? "" : "list-wrapper")} ${d(this.listWrapper)}>${this.shouldRenderSelectionButton(i) ? this.renderSelectionButton() : null}${this.renderSplitSubFieldLists(t)}${e.length ? this.renderSplitTopLevelFieldList(e, !0) : null}</div>${this.filterText && !l && this.filterNoResultsText?.length !== 0 ? o`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}`;
251
+ }
252
+ renderSplitSubFieldLists(e) {
253
+ const t = e.map((i) => ({
254
+ ...i,
255
+ fields: i.fields.filter((s) => F(s, this.filterText))
256
+ })).filter((i) => !!i.fields.length);
257
+ return y(t, (i) => i.title, (i) => o`<calcite-list selection-mode=none .label=${i.title ?? this.heading ?? ""}><calcite-list-item-group .heading=${i.title}>${y(i.fields, (s) => s.name, (s) => o`<calcite-list-item .label=${s.alias || s.name} .description=${this.multiple ? this._messages.subFieldsSelected.replace("${count}", `${s.subFieldInfos.filter((l) => this.selectedFields.includes(l.name)).length}`) : void 0} .value=${s.name} @click=${(l) => this.addSubFieldInfoFlowItem(s, l.currentTarget)} @keydown=${(l) => {
258
+ l.key === "Enter" && this.addSubFieldInfoFlowItem(s, l.currentTarget);
259
+ }}><calcite-icon slot=actions-end icon=chevron-right flip-rtl scale=s></calcite-icon></calcite-list-item>`)}</calcite-list-item-group></calcite-list>`);
260
+ }
261
+ renderSplitTopLevelFieldList(e, t) {
262
+ return o`<calcite-list .label=${this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header)} .selectionMode=${this.multiple ? "multiple" : "single"} @calciteListChange=${() => this.handleListSelectionChange(e)} ${d(this.listNode)}><slot name=content-center></slot>${this.renderGroupedListItems(t)}</calcite-list>`;
263
+ }
264
+ renderTopLevelOnlyFieldList(e, t, i) {
265
+ return o`<div class=${L(this.listOnly ? "" : "list-wrapper")} ${d(this.listWrapper)}><calcite-list .label=${e} .selectionMode=${this.multiple ? "multiple" : "single"} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteListChange=${() => this.handleListSelectionChange(t)} @calciteListFilter=${(s) => {
266
+ s.stopPropagation(), this.filterFields = this.listNode.value.filteredItems?.map((l) => l.value), this.filterText = this.listNode.value.filterText;
267
+ }} ${d(this.listNode)}>${this.renderSortButton("filter-actions-end")}${this.shouldRenderSelectionButton(i) ? this.renderSelectionButton() : null}<slot name=content-center></slot>${this.renderGroupedListItems(!1)}</calcite-list></div>`;
268
+ }
269
+ renderSortButton(e) {
270
+ const t = f(this.allLists);
271
+ if (!(t.length >= this.showFilterLength && !this.hideSort))
191
272
  return "";
192
- const s = e.every((i) => !!i.type);
193
- return l`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed .disabled=${this.filterFields ? this.filterFields.length < 4 : !1} @calciteDropdownOpen=${() => {
273
+ const s = t.every((l) => !!l.type);
274
+ return o`<calcite-dropdown slot=${e ?? m} placement=bottom-end overlay-positioning=fixed @calciteDropdownOpen=${() => {
194
275
  this.observer?.disconnect(), this.popoverNode.value && this.observer?.observe(this.popoverNode.value, { attributes: !0 });
195
- }} @calciteDropdownClose=${() => this.observer?.disconnect()} ${c(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort ?? ""} title=${this._messages.sort ?? h}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy === "default"} @calciteDropdownItemSelect=${() => this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy === "display"} @calciteDropdownItemSelect=${() => this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${s && l`<calcite-dropdown-item .selected=${this.lastSortBy === "type"} @calciteDropdownItemSelect=${() => this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>` || ""}<calcite-dropdown-item .selected=${this.lastSortBy === "field"} @calciteDropdownItemSelect=${() => this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
276
+ }} @calciteDropdownClose=${() => this.observer?.disconnect()} ${d(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort ?? ""} title=${this._messages.sort ?? m}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy === "default"} @calciteDropdownItemSelect=${() => this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy === "display"} @calciteDropdownItemSelect=${() => this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${s && o`<calcite-dropdown-item .selected=${this.lastSortBy === "type"} @calciteDropdownItemSelect=${() => this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>` || ""}<calcite-dropdown-item .selected=${this.lastSortBy === "field"} @calciteDropdownItemSelect=${() => this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
196
277
  }
197
278
  renderSelectionButton() {
198
- return l`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${() => {
279
+ return o`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${() => {
199
280
  if (this.canDeselectAll())
200
281
  this.selectedFields = this.filterFields?.length ? this.selectedFields.filter((e) => !this.filterFields?.includes(e)) : [];
201
282
  else if (this.filterFields?.length)
202
283
  this.selectedFields = [.../* @__PURE__ */ new Set([...this.selectedFields, ...this.filterFields])];
203
284
  else {
204
- const t = this.getAllFields();
205
- this.selectedFields = t.map((s) => s.name);
285
+ const t = f(this.allLists);
286
+ this.selectedFields = t.map((i) => i.name);
206
287
  }
207
288
  this.reorderSelectedFieldsByCurrentListOrder(), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields });
208
289
  }}>${this.canDeselectAll() ? this._messages.deselectAll : this._messages.selectAll}</calcite-button></div>`;
209
290
  }
210
- renderListItems() {
211
- const e = this.allLists.filter((t) => !!t.fields.length);
212
- return e.length === 1 && !e[0].title ? e[0].fields.map((t) => this.renderCalciteListItem(t)) : e.map((s) => l`<calcite-list-item-group .heading=${s.title}>${s.fields.map((i) => this.renderCalciteListItem(i))}</calcite-list-item-group>`);
291
+ renderGroupedListItems(e) {
292
+ const t = this.allLists.filter((i) => !!i.fields.length && !u(i.fields)).map((i) => ({
293
+ ...i,
294
+ fields: e ? i.fields.filter((s) => F(s, this.filterText)) : i.fields
295
+ })).filter((i) => !!i.fields.length);
296
+ return t.length === 1 && !t[0].title ? this.renderListItems(t[0].fields) : t.map((s) => o`<calcite-list-item-group .heading=${s.title}>${this.renderListItems(s.fields)}</calcite-list-item-group>`);
297
+ }
298
+ renderListItems(e) {
299
+ return e.map((t) => this.renderCalciteListItem(t));
213
300
  }
214
- renderCalciteListItem(e) {
215
- const t = this.showFieldInfoCheck(e), s = this.showFieldTypeIcon && !!e.type;
216
- return u(e.name, l`<calcite-list-item .label=${e.alias || e.name} .description=${(() => {
301
+ renderCalciteListItem(e, t = !0) {
302
+ const i = t && this.showFieldInfoCheck(e), s = this.showFieldTypeIcon && !!e.type;
303
+ return v(e.name, o`<calcite-list-item .label=${e.alias || e.name} .description=${(() => {
217
304
  if (this.showFieldName && e.hideFieldName !== !0)
218
305
  return `{${e.name}}`;
219
306
  if (this.showDescription && e.hideDescription !== !0 && e.description)
@@ -221,40 +308,40 @@ class I extends y {
221
308
  })()} .value=${e.name} .selected=${!this.multiple && e.name === this.selectedFields[0] || this.multiple && this.selectedFields.includes(e.name)} .metadata=${{
222
309
  label: e.alias,
223
310
  fieldName: e.name
224
- }}>${s && l`<div slot=actions-end class="field-icons">${B({ fieldType: e.type })}</div>` || ""}${this.renderInfoAction(e, t)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`);
311
+ }}>${s && o`<div slot=actions-end class="field-icons">${N({ fieldType: e.type })}</div>` || ""}${this.renderInfoAction(e, i)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`);
225
312
  }
226
313
  renderInfoAction(e, t) {
227
- const { _messages: s } = this;
228
- return t ? l`<calcite-action slot=actions-end .text=${s.info} title=${s.info ?? h} scale=s icon=information @click=${(i) => {
229
- i.stopPropagation();
230
- const o = i.currentTarget;
231
- this.addFieldInfoFlowItem(e, o);
314
+ const { _messages: i } = this;
315
+ return t ? o`<calcite-action slot=actions-end .text=${i.info} title=${i.info ?? m} scale=s icon=information @click=${(s) => {
316
+ s.stopPropagation();
317
+ const l = s.currentTarget;
318
+ this.addFieldInfoFlowItem(e, l);
232
319
  }}></calcite-action>` : "";
233
320
  }
234
321
  renderEditAction(e) {
235
322
  const { _messages: t } = this;
236
- return e.showEditAction ? l`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit ?? h} scale=s icon=pencil @click=${(s) => {
237
- s.stopPropagation(), this.arcgisEditField.emit({ fieldName: e.name });
323
+ return e.showEditAction ? o`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit ?? m} scale=s icon=pencil @click=${(i) => {
324
+ i.stopPropagation(), this.arcgisEditField.emit({ fieldName: e.name });
238
325
  }}></calcite-action>` : "";
239
326
  }
240
327
  renderDeleteAction(e) {
241
328
  const { _messages: t } = this;
242
- return e.showDeleteAction ? l`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete ?? h} scale=s icon=trash @click=${(s) => {
243
- s.stopPropagation(), this.arcgisDeleteField.emit({ fieldName: e.name });
329
+ return e.showDeleteAction ? o`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete ?? m} scale=s icon=trash @click=${(i) => {
330
+ i.stopPropagation(), this.arcgisDeleteField.emit({ fieldName: e.name });
244
331
  }}></calcite-action>` : "";
245
332
  }
246
333
  renderAddButton() {
247
- return this.multiple ? l`<calcite-button .appearance=${this.hideCancel ? "outline-fill" : "solid"} .width=${this.hideCancel ? "full" : "half"} @click=${() => {
334
+ return this.multiple ? o`<calcite-button .appearance=${this.hideCancel ? "outline-fill" : "solid"} .width=${this.hideCancel ? "full" : "half"} @click=${() => {
248
335
  this.arcgisClose.emit({ selectedFields: this.selectedFields }), this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields });
249
336
  }}>${this.okBtnText || (this.multiple ? this._messages.done : this._messages.ok)}</calcite-button>` : "";
250
337
  }
251
338
  renderCancelButton() {
252
- return this.hideCancel ? "" : l`<calcite-button appearance=outline-fill .width=${this.multiple ? "half" : "full"} @click=${() => {
339
+ return this.hideCancel ? "" : o`<calcite-button appearance=outline-fill .width=${this.multiple ? "half" : "full"} @click=${() => {
253
340
  this.arcgisClose.emit(), this.arcgisFieldPickListDismissed.emit();
254
341
  }}>${this._messages.cancel}</calcite-button>`;
255
342
  }
256
343
  }
257
- w("arcgis-field-pick-list", I);
344
+ b("arcgis-field-pick-list", H);
258
345
  export {
259
- I as ArcgisFieldPickList
346
+ H as ArcgisFieldPickList
260
347
  };
@@ -1,14 +1,15 @@
1
1
  import "@esri/calcite-components/components/calcite-icon";
2
2
  import "@esri/calcite-components/components/calcite-flow-item";
3
3
  import "../arcgis-field-info/index.js";
4
+ import "@esri/calcite-components/components/calcite-list";
4
5
  import "@esri/calcite-components/components/calcite-popover";
5
6
  import "@esri/calcite-components/components/calcite-flow";
6
- import "@esri/calcite-components/components/calcite-list";
7
+ import "@esri/calcite-components/components/calcite-filter";
8
+ import "@esri/calcite-components/components/calcite-list-item-group";
9
+ import "@esri/calcite-components/components/calcite-list-item";
7
10
  import "@esri/calcite-components/components/calcite-dropdown";
8
11
  import "@esri/calcite-components/components/calcite-action";
9
12
  import "@esri/calcite-components/components/calcite-dropdown-group";
10
13
  import "@esri/calcite-components/components/calcite-dropdown-item";
11
14
  import "@esri/calcite-components/components/calcite-button";
12
- import "@esri/calcite-components/components/calcite-list-item-group";
13
- import "@esri/calcite-components/components/calcite-list-item";
14
15
  export * from "./customElement.js";