@arcgis/portal-components 5.2.0-next.4 → 5.2.0-next.41
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.
- package/dist/cdn/2C475EKD.js +2 -0
- package/dist/cdn/3J46PXFF.js +3 -0
- package/dist/cdn/3MBOA5WF.js +2 -0
- package/dist/cdn/{GQFWFZXP.js → 3OBIA66A.js} +1 -1
- package/dist/cdn/3Z3ZPFGJ.js +2 -0
- package/dist/cdn/5NMFQE4U.js +2 -0
- package/dist/cdn/{7WZHZP6U.js → 63THOLAY.js} +9 -3
- package/dist/cdn/6AGZRMJC.js +2 -0
- package/dist/cdn/6DYBW2C6.js +2 -0
- package/dist/cdn/6RK4FBHZ.js +2 -0
- package/dist/cdn/6W2IHKCA.js +2 -0
- package/dist/cdn/7E5GJIZV.js +2 -0
- package/dist/cdn/AL57LV4E.js +2 -0
- package/dist/cdn/{LQ3DMZ3K.js → AXM6XCZD.js} +1 -1
- package/dist/cdn/AYR65LXN.js +65 -0
- package/dist/cdn/BUJPYZSX.js +2 -0
- package/dist/cdn/{DKBTJJMW.js → C7ZFXRPS.js} +1 -1
- package/dist/cdn/D76KMXZD.js +2 -0
- package/dist/cdn/DFTUMKSN.js +3 -0
- package/dist/cdn/DZJMNZY6.js +451 -0
- package/dist/cdn/EI6BAXCQ.js +2 -0
- package/dist/cdn/EVMYGWC6.js +637 -0
- package/dist/cdn/FXIP4QXJ.js +2 -0
- package/dist/cdn/GE75KDIM.js +2 -0
- package/dist/cdn/GJTJLK6T.js +2 -0
- package/dist/cdn/GKOXTQHB.js +2 -0
- package/dist/cdn/GQMPPCEL.js +2 -0
- package/dist/cdn/GXJU3U7U.js +2 -0
- package/dist/cdn/HMBSJR37.js +2 -0
- package/dist/cdn/HZ5W3DBR.js +2 -0
- package/dist/cdn/{V2EOXGK2.js → I234NUZ5.js} +1 -1
- package/dist/cdn/I5HSJRM3.js +2 -0
- package/dist/cdn/IBP5XPD5.js +2 -0
- package/dist/cdn/IC65R4QE.js +2 -0
- package/dist/cdn/IHSJ4MKS.js +2 -0
- package/dist/cdn/IJ3CLFAU.js +22 -0
- package/dist/cdn/IWUJRI4G.js +2 -0
- package/dist/cdn/{ZTHTFEYA.js → IXVR3KMC.js} +1 -1
- package/dist/cdn/{QNUYUNEY.js → JS45DWQ3.js} +1 -1
- package/dist/cdn/{DHHSKOUY.js → JV23HJTE.js} +1 -1
- package/dist/cdn/{LAFNDBTQ.js → JYIPREIH.js} +1 -1
- package/dist/cdn/JZKBUYPV.js +2 -0
- package/dist/cdn/KM5XGRXL.js +2 -0
- package/dist/cdn/{3PAHY5KA.js → KNRJ3WXR.js} +1 -1
- package/dist/cdn/L4DRNGOL.js +2 -0
- package/dist/cdn/{F6V7MLPY.js → L6KBBJEC.js} +1 -1
- package/dist/cdn/NJ2WDAJM.js +2 -0
- package/dist/cdn/NWIIOJEG.js +2 -0
- package/dist/cdn/{53MSUMA3.js → OT4PZJNB.js} +17 -1
- package/dist/cdn/POIXW2OA.js +2 -0
- package/dist/cdn/QE4CNVDQ.js +34 -0
- package/dist/cdn/{AQWTJKUH.js → QKCV7CY2.js} +10 -8
- package/dist/cdn/RKNDXSVK.js +2 -0
- package/dist/cdn/SLTFLCVR.js +99 -0
- package/dist/cdn/SUPKZF5M.js +2 -0
- package/dist/cdn/{GT26WGJS.js → SXZRHHXC.js} +1 -1
- package/dist/cdn/TJAX7J4T.js +2 -0
- package/dist/cdn/{DXCPWJU4.js → TKCE4WYE.js} +1 -1
- package/dist/cdn/U3FVMN32.js +2 -0
- package/dist/cdn/UZLQALHY.js +2 -0
- package/dist/cdn/{RR4BIAPA.js → V4EYW3O6.js} +1 -1
- package/dist/cdn/{74XFARCV.js → VW7DSKPH.js} +1 -1
- package/dist/cdn/W2SYL7IJ.js +71 -0
- package/dist/cdn/{W6PSG4GX.js → W4FGRGLV.js} +10 -5
- package/dist/cdn/{SYJSVUUR.js → W4SAWMXS.js} +1 -1
- package/dist/cdn/WBZLQZYR.js +134 -0
- package/dist/cdn/WGZZB2DJ.js +2 -0
- package/dist/cdn/WO23VQK3.js +2 -0
- package/dist/cdn/{2UUZHENH.js → WSNLUGEP.js} +1 -1
- package/dist/cdn/WSWHK6LB.js +2 -0
- package/dist/cdn/{WOZDQW3S.js → WX65MRDH.js} +1 -1
- package/dist/cdn/XEK22IDA.js +2 -0
- package/dist/cdn/ZPIXIG3Z.js +2 -0
- package/dist/cdn/ZVFNCDG5.js +2 -0
- package/dist/cdn/assets/portal-browser/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-group-badges/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-group-card/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer16.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer32.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/storymapframe16.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/storymapframe32.svg +1 -0
- package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-user-popup/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/dom.js +36 -0
- package/dist/chunks/functionalities.js +5 -4
- package/dist/chunks/groups.js +7 -83
- package/dist/chunks/item2.js +86 -0
- package/dist/chunks/portal.js +48 -8
- package/dist/chunks/store.js +18 -0
- package/dist/chunks/ui.js +10 -0
- package/dist/chunks/user2.js +26 -25
- package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +11 -2
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +4 -2
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +797 -488
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +10 -10
- package/dist/components/arcgis-portal-browser/customElement.d.ts +235 -0
- package/dist/components/arcgis-portal-browser/customElement.js +201 -0
- package/dist/components/arcgis-portal-browser/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser/index.js +6 -0
- package/dist/components/arcgis-portal-browser/utils/store.d.ts +31 -0
- package/dist/components/arcgis-portal-browser/utils/types.d.ts +18 -0
- package/dist/components/arcgis-portal-browser-actions/customElement.d.ts +187 -0
- package/dist/components/arcgis-portal-browser-actions/customElement.js +70 -0
- package/dist/components/arcgis-portal-browser-actions/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-actions/index.js +6 -0
- package/dist/components/arcgis-portal-browser-actions/types.d.ts +9 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.d.ts +226 -0
- package/dist/components/arcgis-portal-browser-filter/customElement.js +32 -0
- package/dist/components/arcgis-portal-browser-filter/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter/index.js +4 -0
- package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +233 -0
- package/dist/components/arcgis-portal-browser-filter-date/customElement.js +117 -0
- package/dist/components/arcgis-portal-browser-filter-date/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter-date/index.js +5 -0
- package/dist/components/arcgis-portal-browser-filter-status/customElement.d.ts +193 -0
- package/dist/components/arcgis-portal-browser-filter-status/customElement.js +56 -0
- package/dist/components/arcgis-portal-browser-filter-status/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filter-status/index.js +5 -0
- package/dist/components/arcgis-portal-browser-filters/customElement.d.ts +7 -0
- package/dist/components/arcgis-portal-browser-filters/customElement.js +29 -0
- package/dist/components/arcgis-portal-browser-filters/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-filters/index.js +2 -0
- package/dist/components/arcgis-portal-browser-pagination/customElement.d.ts +194 -0
- package/dist/components/arcgis-portal-browser-pagination/customElement.js +51 -0
- package/dist/components/arcgis-portal-browser-pagination/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-pagination/index.js +2 -0
- package/dist/components/arcgis-portal-browser-search/customElement.d.ts +195 -0
- package/dist/components/arcgis-portal-browser-search/customElement.js +65 -0
- package/dist/components/arcgis-portal-browser-search/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-search/index.js +3 -0
- package/dist/components/arcgis-portal-browser-sort/customElement.d.ts +196 -0
- package/dist/components/arcgis-portal-browser-sort/customElement.js +93 -0
- package/dist/components/arcgis-portal-browser-sort/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-sort/index.js +9 -0
- package/dist/components/arcgis-portal-browser-sort/utils.d.ts +3 -0
- package/dist/components/arcgis-portal-browser-top-bar/customElement.d.ts +184 -0
- package/dist/components/arcgis-portal-browser-top-bar/customElement.js +51 -0
- package/dist/components/arcgis-portal-browser-top-bar/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-top-bar/index.js +3 -0
- package/dist/components/arcgis-portal-browser-view/customElement.d.ts +21 -0
- package/dist/components/arcgis-portal-browser-view/customElement.js +30 -0
- package/dist/components/arcgis-portal-browser-view/index.d.ts +1 -0
- package/dist/components/arcgis-portal-browser-view/index.js +5 -0
- package/dist/components/arcgis-portal-group-badges/customElement.d.ts +102 -0
- package/dist/components/arcgis-portal-group-badges/customElement.js +50 -0
- package/dist/components/arcgis-portal-group-badges/index.d.ts +1 -0
- package/dist/components/arcgis-portal-group-badges/index.js +3 -0
- package/dist/components/arcgis-portal-group-badges/types.d.ts +3 -0
- package/dist/components/arcgis-portal-group-card/customElement.d.ts +167 -0
- package/dist/components/arcgis-portal-group-card/customElement.js +183 -0
- package/dist/components/arcgis-portal-group-card/index.d.ts +1 -0
- package/dist/components/arcgis-portal-group-card/index.js +8 -0
- package/dist/components/arcgis-portal-group-thumbnail/customElement.d.ts +32 -0
- package/dist/components/arcgis-portal-group-thumbnail/customElement.js +153 -0
- package/dist/components/arcgis-portal-group-thumbnail/index.d.ts +1 -0
- package/dist/components/arcgis-portal-group-thumbnail/index.js +3 -0
- package/dist/components/arcgis-portal-item-type/customElement.d.ts +2 -0
- package/dist/components/arcgis-portal-item-type/customElement.js +45 -37
- package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +53 -42
- package/dist/components/arcgis-portal-user-popup/customElement.d.ts +111 -0
- package/dist/components/arcgis-portal-user-popup/customElement.js +224 -0
- package/dist/components/arcgis-portal-user-popup/index.d.ts +1 -0
- package/dist/components/arcgis-portal-user-popup/index.js +5 -0
- package/dist/components/arcgis-portal-voice-input/customElement.d.ts +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +122 -2
- package/dist/loader.js +19 -4
- package/dist/types/group.d.ts +13 -13
- package/dist/types/item.d.ts +77 -2
- package/dist/types/lumina.d.ts +93 -1
- package/dist/types/preact.d.ts +108 -1
- package/dist/types/react.d.ts +123 -1
- package/dist/types/search.d.ts +27 -0
- package/dist/types/stencil.d.ts +93 -1
- package/dist/types/tracking.d.ts +10 -0
- package/dist/types/user.d.ts +2 -2
- package/package.json +11 -11
- package/dist/cdn/5DPWJ7DI.js +0 -2
- package/dist/cdn/5VSDGPHH.js +0 -2
- package/dist/cdn/72N3KAXN.js +0 -2
- package/dist/cdn/ANPXRYLV.js +0 -5
- package/dist/cdn/B7633S2A.js +0 -422
- package/dist/cdn/BEHLBKKM.js +0 -2
- package/dist/cdn/CI5ENGVT.js +0 -2
- package/dist/cdn/EVDOPN3G.js +0 -54
- package/dist/cdn/G47ZZQYL.js +0 -2
- package/dist/cdn/GAHILDQF.js +0 -45
- package/dist/cdn/GHQ3ZW4U.js +0 -2
- package/dist/cdn/GNOZCQ34.js +0 -2
- package/dist/cdn/JNRN6DTV.js +0 -2
- package/dist/cdn/K3HS2LQ7.js +0 -2
- package/dist/cdn/KEKBRUUC.js +0 -2
- package/dist/cdn/N6G6Z7BF.js +0 -516
- package/dist/cdn/OQDPULPD.js +0 -2
- package/dist/cdn/RNLVNDGG.js +0 -2
- package/dist/cdn/SM4GWLRA.js +0 -66
- package/dist/cdn/TMYTUOSS.js +0 -2
- package/dist/cdn/YG5YYL6X.js +0 -2
- package/dist/cdn/YIMNOUTF.js +0 -2
- package/dist/cdn/YL7PGYWC.js +0 -5
- package/dist/cdn/YMPTDKT6.js +0 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"./UZLQALHY.js";var e=`## Membership Bind Parameters
|
|
3
|
+
|
|
4
|
+
The current map contains a subset of entities and relationships from the database. Their membership is available to Cypher queries as lists of string identifiers through these bind parameters:
|
|
5
|
+
|
|
6
|
+
- $entityIds
|
|
7
|
+
- $relationshipIds
|
|
8
|
+
|
|
9
|
+
Included Types:
|
|
10
|
+
{nonDynamicTypes}
|
|
11
|
+
|
|
12
|
+
Filtering rules:
|
|
13
|
+
|
|
14
|
+
- Apply membership filtering only when BOTH are true:
|
|
15
|
+
- The user is asking for data to be limited by the records already on 'the current map', 'my map', 'the knowledge graph layer' or similar.
|
|
16
|
+
- The variable in the cypher query is a type in Included Types above.
|
|
17
|
+
- IMPORTANT: In all other cases, DO NOT apply membership filtering. DO NOT include membership filters for any type not listed in Included Types above.
|
|
18
|
+
|
|
19
|
+
### START EXAMPLES
|
|
20
|
+
|
|
21
|
+
User request: 'Add all records that are connected to people on this map to the map'
|
|
22
|
+
Context: 'Person' entity in data model and included in the bind parameter types above.
|
|
23
|
+
Expected Result: MATCH (n:Person)-[r]->(m) WHERE id(n) IN $entityIds return r, m
|
|
24
|
+
|
|
25
|
+
User request: 'Add all the suppliers to the map'
|
|
26
|
+
Context: 'Supplier' entity in the data model.
|
|
27
|
+
Expected Result: MATCH (s:Supplier) RETURN s
|
|
28
|
+
|
|
29
|
+
User request: 'Add all suppliers connected to plants on my map'
|
|
30
|
+
Context: 'Plant' entity in data model but not included in the bind parameter types above.
|
|
31
|
+
Expected Result: MATCH (p:Plant)-[r]->(s:Supplier) return r, s
|
|
32
|
+
|
|
33
|
+
### END EXAMPLES
|
|
34
|
+
`;export{e as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./
|
|
2
|
+
import"./UZLQALHY.js";var e=`## Task: Summarize Geographic Features
|
|
3
3
|
|
|
4
4
|
You are given features from ArcGIS Feature layer for multiple layers:
|
|
5
5
|
{queryResponse}
|
|
@@ -22,13 +22,15 @@ Use chat history only when necessary to understand conversational references, an
|
|
|
22
22
|
|
|
23
23
|
### Your goal:
|
|
24
24
|
|
|
25
|
-
1. If the assigned task is about a **specific calculation** (e.g., average, total, count, min, max), return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
1. If the assigned task is about a **specific calculation** (e.g., average, total, count, min, max), return a **single concise sentence** that includes the numeric result.
|
|
26
|
+
|
|
27
|
+
- Example: \u201CThe average price is $4.00.\u201D
|
|
28
|
+
- Never return a bare number by itself (for example: \`4\`).
|
|
29
|
+
- When a value is already present in \`queryResponse\` (for example in \`details.value\` or \`summary\`), copy that value **verbatim**.
|
|
30
|
+
- Do NOT reformat values (including numbers, dates, and times):
|
|
31
|
+
- Do not add/remove grouping commas.
|
|
32
|
+
- Do not change decimals, round values, or change numeric type/text.
|
|
33
|
+
- Do not change date/time format, timezone notation, separators, or precision.
|
|
32
34
|
|
|
33
35
|
2. If the question is more general or there are **multiple features with varying attributes**, write a **brief summary** (2\u20133 sentences max) that highlights key patterns or insights.
|
|
34
36
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as m}from"./JYIPREIH.js";import{a as h}from"./AXM6XCZD.js";import"./IBP5XPD5.js";import"./D76KMXZD.js";import{L as b,O as a,R as d,h as c,j as i,v as u}from"./JV23HJTE.js";import"./UZLQALHY.js";var g=c`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;function s(o,e){return o.uiElement===e}var n=class extends b{constructor(){super(...arguments),this.messages=h(),this.isRequiredErrors=new Set,this.arcgisAttributeValueChange=u()}static{this.properties={validationMsg:16,attributeKey:1,attribute:0,value:0,renderingInfo:0,isRequiredErrors:0}}static{this.styles=g}willUpdate(e){(e.has("renderingInfo")||e.has("isRequiredErrors"))&&(this.validationMsg=this._getValidationMessage())}_getValidationMessage(){if(this.renderingInfo?.attributeValidationResult)return this.renderingInfo.attributeValidationResult;if(this.isRequiredErrors.has(this.attributeKey))return this.messages.requiredfield??"This is a required field."}renderCheckbox(){return s(this.attribute,"checkbox")?i`<calcite-label class="spacing-y" .for=${this.attributeKey} layout=inline><calcite-checkbox .checked=${this.value} id=${this.attributeKey??a} @calciteCheckboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.checked})} .required=${this.attribute.isRequired??!1} .status=${this.validationMsg?"invalid":"valid"}></calcite-checkbox>${this.attribute.label}</calcite-label>`:null}renderDateInput(){return s(this.attribute,"date")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-input-date-picker id=${this.attributeKey??a} .name=${this.attribute.label} @calciteInputDatePickerChange=${e=>this.isConnected&&this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} overlay-positioning=fixed .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-date-picker></calcite-label>`:null}renderTextInput(){if(!s(this.attribute,"text"))return null;let e=this.attribute.label,t=this.attribute.description;return i`<calcite-label .for=${this.attributeKey}><div class="portal-classification-form-element-tooltip">${e}${this.attribute.labelTooltip&&i`<div><calcite-icon scale=s icon=information .id=${`tooltip-button-${this.attribute.bannerLabel}`} text-label=${this.messages.information??"Information"??a}></calcite-icon><calcite-tooltip .referenceElement=${`tooltip-button-${this.attribute.bannerLabel}`} placement=right>${this.attribute.labelTooltip}</calcite-tooltip></div>`||""}</div><calcite-input-text id=${this.attributeKey??a} .label=${e} .name=${this.attributeKey} @calciteInputTextChange=${r=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:r.target.value})} .placeholder=${t} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-text></calcite-label>`}renderSingleSelect(){return s(this.attribute,"single-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox selection-mode=single id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} .placeholder=${this.attribute.description??this.messages.selectanoption} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} overlay-positioning=fixed validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value} data-testid=${`single-select-${this.attributeKey}`}>${this._renderSingleSelectComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderSingleSelectComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return m(this.renderingInfo?.valueExpressionResult,t=>t.label,t=>i`<calcite-combobox-item .selected=${e===t.value} .heading=${t.label} .value=${t.value} data-testid=${`single-combobox-item-${t.value}`}></calcite-combobox-item>`)}_renderComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return this.renderingInfo?.valueExpressionResult.map(t=>i`<calcite-combobox-item .selected=${e?.includes(t.value)} .heading=${t.label} .value=${t.value} data-testid=${`combobox-item-${t.value}`}></calcite-combobox-item>`)}renderMultiSelect(){return s(this.attribute,"multi-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderGroupedComboboxOptions(){if(!this.renderingInfo?.valueExpressionResult||Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return Object.entries(this.renderingInfo?.valueExpressionResult).map(([t,r])=>i`<calcite-combobox-item .selected=${e?.includes(t)} .heading=${t} .value=${t}>${r.map(l=>i`<calcite-combobox-item .selected=${e?.includes(l.value)} .heading=${l.label} .value=${l.value} data-testid=${`grouped-combobox-item-${l.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`)}renderMultiGroupedSelectNested(){return s(this.attribute,"multi-grouped-select-nested")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderGroupedComboboxOptions()}</calcite-combobox></calcite-label>`:null}render(){switch(this.attribute.uiElement){case"checkbox":return this.renderCheckbox();case"date":return this.renderDateInput();case"multi-select":return this.renderMultiSelect();case"multi-grouped-select-nested":return this.renderMultiGroupedSelectNested();case"single-select":return this.renderSingleSelect();case"text":return this.renderTextInput();default:return i`<div>Not Implemented Yet.</div>`}}};d("arcgis-portal-classification-form-element",n);export{n as ArcgisPortalClassificationFormElement};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"./UZLQALHY.js";var e=`# ArcGIS Knowledge Graph Cypher Rules
|
|
3
|
+
|
|
4
|
+
## GOAL
|
|
5
|
+
|
|
6
|
+
Generate a Cypher query that answers the user\u2019s request and conforms to the data model.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. USER OVERRIDES (HIGHEST PRIORITY)
|
|
11
|
+
|
|
12
|
+
If the user specifies any of the following, ALWAYS follow their instructions over defaults:
|
|
13
|
+
|
|
14
|
+
- LIMIT (or no limit)
|
|
15
|
+
- Output columns / data model
|
|
16
|
+
- Inclusion/exclusion of globalid
|
|
17
|
+
- Ordering, grouping, filtering, projection
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 2. DATA MODEL CONFORMANCE (NON-NEGOTIABLE)
|
|
22
|
+
|
|
23
|
+
Use ONLY valid data model elements.
|
|
24
|
+
|
|
25
|
+
### Required
|
|
26
|
+
|
|
27
|
+
- Use only valid entity types, relationship types, and properties
|
|
28
|
+
- Ensure relationships connect valid entity types
|
|
29
|
+
- infer direction from user prompt. if not clear use the least restrictive valid form supported by the model.
|
|
30
|
+
|
|
31
|
+
### VALIDATION RULES (STRICT)
|
|
32
|
+
|
|
33
|
+
- Enforce exact schema match: all entities, relationships, and properties must exist exactly in the data model
|
|
34
|
+
- Validate relationship integrity: types, source\u2192target pairing, and direction must match schema
|
|
35
|
+
- Enforce field correctness: properties and filters must exist on the referenced type and use valid data types
|
|
36
|
+
- Ensure alias consistency: each alias maps to one type only and cannot change meaning
|
|
37
|
+
- Apply strict failure: if any component is invalid, do NOT generate the query and do NOT infer or repair
|
|
38
|
+
|
|
39
|
+
## 4. PATH RESOLUTION
|
|
40
|
+
|
|
41
|
+
- First attempt a direct relationship
|
|
42
|
+
- If none exists \u2192 use a valid multi-hop path
|
|
43
|
+
- Each hop MUST be valid in the data model
|
|
44
|
+
- Max path length: 3 (unless user requests more)
|
|
45
|
+
|
|
46
|
+
### Path selection
|
|
47
|
+
|
|
48
|
+
- Prefer shortest valid path
|
|
49
|
+
- If multiple valid paths exist \u2192 choose best match to user intent
|
|
50
|
+
- If no valid path exists \u2192 do not speculate
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 5. PERFORMANCE
|
|
55
|
+
|
|
56
|
+
- Use the minimal number of entities and relationships
|
|
57
|
+
- Prefer shortest valid path
|
|
58
|
+
- Avoid unnecessary patterns or complexity
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 6. CYPHER RULES
|
|
63
|
+
|
|
64
|
+
- UNION queries must return identical columns
|
|
65
|
+
- Apply LIMIT only after UNION (not inside subqueries)
|
|
66
|
+
- Do NOT use: OVER, REDUCE()
|
|
67
|
+
- Do NOT use reserved keywords as variables (call, match, return, as etc.)
|
|
68
|
+
- Use only valid openCypher syntax
|
|
69
|
+
- After OPTIONAL MATCH, always add:
|
|
70
|
+
WITH ...
|
|
71
|
+
WHERE var IS NOT NULL
|
|
72
|
+
before using var in any MATCH or relationship pattern.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 7. SPATIAL RULES
|
|
77
|
+
|
|
78
|
+
- Prefer graph relationships over spatial functions
|
|
79
|
+
- Use spatial functions only when necessary
|
|
80
|
+
- Always ensure geometry is not null if using spatial functions
|
|
81
|
+
- for example: WHERE n.shape IS NOT NULL
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 9. DEFAULT OUTPUT (IF NOT SPECIFIED)
|
|
86
|
+
|
|
87
|
+
- Add LIMIT 50 unless results are clearly small
|
|
88
|
+
- Use descriptive aliases with AS
|
|
89
|
+
- ALWAYS Return full entities and relationships unless user requests specific properties
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 11. OUTPUT FORMAT
|
|
94
|
+
|
|
95
|
+
- Valid \u2192 return ONLY Cypher query
|
|
96
|
+
- No explanation
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
`;export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import b from"./WSNLUGEP.js";import{a as D}from"./GKOXTQHB.js";import a from"./HMBSJR37.js";import"./6W2IHKCA.js";import{a as R}from"./XEK22IDA.js";import{b as E}from"./IBP5XPD5.js";import"./D76KMXZD.js";import{J as M,K as g,L as S,M as v,R as k,h as A,j as d,v as u}from"./JV23HJTE.js";import"./UZLQALHY.js";export default $arcgis.t(([{a:P,d:L},{a:x,d:O}])=>{var y=["@","#","$"],F=400;function q(n,t){let a=null;for(let l of t){let r=l.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),s=new RegExp(`${r}"([^"\\n]*)"?$`,"u"),e=n.match(s);if(e){let c=e[0],o=n.length-c.length,h=e[1]??"";(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}let i=new RegExp(`${r}[\\p{L}\\p{N}_-]+$`,"u"),m=n.match(i);if(m){let c=m[0],o=n.length-c.length,h=c.slice(l.length);(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}}return a}var U=n=>y.includes(n)?n:"@",N=E(n=>{let t=[],a=async s=>await x({requester:async()=>await L(n.portal,s,{num:3}),key:"items",id:s}),l=async s=>await x({requester:async()=>await P(n.portal,{query:`title:${s}`,num:3}),key:"groups",id:s}),r=R(async(s,e)=>{n.isFetchingEntities=!0;let i=s.toLowerCase();switch(U(e)){case"@":let m=10;n.filteredItemsInfo={type:"user",items:t.filter(h=>h.username?.toLowerCase().includes(i)||h.fullName?.toLowerCase().includes(i)).slice(0,m)};break;case"#":let{result:c}=await a(i);n.filteredItemsInfo={type:"item",items:c?.results??[]};break;case"$":let{results:o}=await l(i);n.filteredItemsInfo={type:"group",items:o};break}(n.filteredItemsInfo?.items?.length??0)===0&&await n.closePopover(),n.isFetchingEntities=!1},F);return{fetchUsers:async()=>{try{let{users:s}=await O(n.portal);t=s??[]}catch(s){t=[],console.error("error fetching org users:",s)}},filterItems:r,getItemText:(s,e)=>{let i="";switch(U(e)){case"@":i=s.username;break;case"#":i=s.title??"";break;case"$":i=s.title??"";break}return i.trim()}}}),$=({id:n,label:t,selected:a,description:l,contentStart:r,onSelect:s})=>D(n,d`<calcite-list-item class=${v({selected:a})} .label=${t} .description=${l} .selected=${a} @pointerdown=${async e=>{e.preventDefault(),e.stopPropagation(),await s()}} ${g(e=>{a&&e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})})}>${r}</calcite-list-item>`),K=A`.selected{--calcite-list-background-color: var(--calcite-color-foreground-2)}.mentionable-list{max-height:13rem;overflow-y:auto;padding:.25rem;width:min(100vw,24rem)}.mentionable-list--loading{min-height:10rem}`,w=class extends S{constructor(){super(...arguments),this.calciteTextAreaRef=M(),this.mentionableEntityController=N(this),this.handleInput=t=>{let{bubbleNewValueChange:a,checkForMention:l}=this,r=t.target.value;this._value=r,a(this._value);let s=this.nativeTextAreaRef?.selectionStart??0;l(r,s)},this.handleKeyDown=t=>{if(!this.popoverOpen){this.arcgisUserMentionableTextAreaKeyDown.emit(t),this.arcgisMentionableTextAreaKeyDown.emit(t);return}switch(t.key){case"ArrowDown":t.preventDefault(),this.selectedItemIndex=Math.min(this.selectedItemIndex+1,this.filteredItems.length-1);break;case"ArrowUp":t.preventDefault(),this.selectedItemIndex=Math.max(this.selectedItemIndex-1,0);break;case"Enter":t.preventDefault(),this.selectItem(this.filteredItems[this.selectedItemIndex]);break;case"Escape":t.preventDefault(),this.closePopover.bind(this)();break}},this.handleClosePopover=()=>{this.popoverOpen=!1,this.currentMentionQuery="",this.selectedItemIndex=0,this.currentStarter=null},this.bubbleNewValueChange=t=>{this.arcgisUserMentionableTextAreaChange.emit(t),this.arcgisMentionableTextAreaChange.emit(t)},this.checkForMention=(t,a)=>{let l=t.substring(0,a),r=q(l,this.starters??y);if(r){let{starter:s}=r;this.currentStarter=s,this.filterMentionItems(r),this.popoverOpen=!0;return}this.handleClosePopover()},this.filterMentionItems=t=>{let{mentionText:a,query:l,starter:r,startIndex:s}=t;this.currentMentionQuery=a,this.mentionStartPosition=s;let e=l.toLowerCase();this.mentionableEntityController.filterItems(e,r),this.selectedItemIndex=0},this.popoverOpen=!1,this.currentMentionQuery="",this.mentionStartPosition=0,this.selectedItemIndex=0,this.currentStarter=null,this._value="",this.filteredItemsInfo=null,this.isFetchingEntities=!1,this.popoverPlacement="bottom-start",this.disabled=!1,this.scale="m",this.rows=3,this.starters=y,this.readOnly=!1,this.arcgisMentionableSelectedIndexChange=u(),this.arcgisMentionableTextAreaChange=u(),this.arcgisMentionableTextAreaKeyDown=u(),this.arcgisUserMentionableTextAreaChange=u(),this.arcgisUserMentionableTextAreaKeyDown=u(),this.renderItemInfo=()=>{let{filteredItemsInfo:t,selectedItemIndex:a,portal:l}=this;if(!t)return null;let{items:r,type:s}=t;switch(s){case"user":return r.map((e,i)=>$({id:e.id,label:`@${e.username}`,description:e.fullName,selected:i===a,contentStart:d`<arcgis-portal-user-avatar slot=content-start .user=${e} .portal=${l} scale=m></arcgis-portal-user-avatar>`,onSelect:async()=>await this.selectItem(e)}));case"item":return r.map((e,i)=>$({id:e.id??`item-${i}`,label:`#${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}));case"group":return r.map((e,i)=>$({id:e.id??`group-${i}`,label:`${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}))}}}static{this.properties={popoverOpen:16,currentMentionQuery:16,mentionStartPosition:16,selectedItemIndex:16,currentStarter:16,_value:16,filteredItemsInfo:16,isFetchingEntities:16,popoverListLabel:1,popoverPlacement:1,disabled:5,portal:0,user:0,scale:1,value:1,maxLength:9,rows:9,starters:0,placeholder:1,readOnly:5}}static{this.styles=K}get filteredItems(){return this.filteredItemsInfo?.items??[]}async closePopover(){this.handleClosePopover()}async focusTextArea(){await this.calciteTextAreaRef.value?.setFocus()}async selectItem(t){let{currentStarter:a,_value:l,mentionStartPosition:r,currentMentionQuery:s,handleClosePopover:e,calciteTextAreaRef:i,nativeTextAreaRef:m,bubbleNewValueChange:c}=this;if(!t||!a)return;let o=this.mentionableEntityController.getItemText(t,a).replaceAll('"',"").trim(),h=/\s/u.test(o)?`${a}"${o}"`:`${a}${o}`,f=(l??"").substring(0,r),p=(l??"").substring(r+s.length),I=`${f}${h} ${p}`;this._value=I,c(this._value);let b=r+h.length+1;e(),await this.updateComplete,i.value?.setFocus(),m&&(m.selectionEnd=b)}willUpdate(t){t.has("value")&&(this._value=this.value??""),t.has("selectedItemIndex")&&this.arcgisMentionableSelectedIndexChange.emit(this.selectedItemIndex)}loaded(){this.updateComplete.then(()=>{let t=this.calciteTextAreaRef.value?.shadowRoot?.querySelector("textarea");t&&(this.nativeTextAreaRef=t)}),this.mentionableEntityController.fetchUsers()}render(){let{popoverPlacement:t,scale:a,_value:l,maxLength:r,rows:s,placeholder:e,readOnly:i,popoverOpen:m,closePopover:c,handleInput:o,handleKeyDown:h,disabled:f,isFetchingEntities:p,filteredItemsInfo:I,renderItemInfo:b,popoverListLabel:C}=this,T=this.calciteTextAreaRef.value,_=I?.items??[];return d`<calcite-text-area .placeholder=${e} .value=${l} .maxLength=${r} .rows=${s} .scale=${a} .readOnly=${i} .disabled=${f} @blur=${c} @calciteTextAreaInput=${o} @keydown=${h} ${g(this.calciteTextAreaRef)}></calcite-text-area>${T&&d`<calcite-popover .open=${m} .placement=${t} class="mention-popover" .label=${C} .referenceElement=${T} trigger-disabled pointer-disabled focus-trap-disabled><div class=${v({"mentionable-list":!0,"mentionable-list--loading":p})}>${p&&d`<calcite-scrim .loading=${p}></calcite-scrim>`||""}${_.length>0&&d`<calcite-list .label=${C}>${b()}</calcite-list>`||""}</div></calcite-popover>`||""}`}};k("arcgis-portal-mentionable-text-area",w);return w},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as i}from"./
|
|
2
|
+
import{a as i}from"./6W2IHKCA.js";export default $arcgis.t(([a])=>{function w(e){return e.typeKeywords?.includes("Hosted Service")&&e.type!=="Insights Workbook"&&e.type!=="Insights Data Engineering Workbook"&&e.type!=="Insights Page"}function g(e){return e.typeKeywords?.includes("View Service")}function h(e){return e.typeKeywords?.includes("Service Proxy")&&e.typeKeywords.includes("Geocoding filter")}function v(e){return e.type==="Image Collection"&&e.typeKeywords?.includes("Photo locations")}function p(e){return e?.sourceType==="mosaic-dataset"||e?.serviceSourceType==="esriImageServiceSourceTypeMosaicDataset"}function P(e,t){return e.typeKeywords?.includes("Managed Image Collection")||p(t)&&!e.typeKeywords?.includes("Tiled Imagery")}function I(e,t){return!!((e.sourceJSON?.serviceProperties?.tags||e?.serviceProperties?.tags)?.includes("hasMultidimensions")||t?.hasMultidimensions)}function S(e,t){return c(e,t)||y(e,t)}function c(e,t){return e.owner===t.username}function y(e,t){let r=e.owner,n=e.itemControl==="admin",s=["esri_livingatlas","esri_demographics","esri_boundaries"];return e.portal?.isPortal&&!c(e,t)&&n&&r?.includes("esri_")&&!s.includes(r)?!1:n}var K=(e,t)=>!!t.orgId&&e.every(r=>r.isOrgItem);function j(e){return e.typeKeywords?.includes("Spatiotemporal")}function k(e){return e.typeKeywords?.includes("View Service")}function T(e){return e.typeKeywords?.includes("Hosted Service")}function b(e){return e.typeKeywords?.includes("Multi Services View")}function M(e){return e?.hasViews&&!e.sourceSchemaChangesAllowed}async function $(e){let t=e?.portalItem;if(!t)return await Promise.resolve(null);let r=t.portal;if(r?.user){let n=`${i(r)}community/users/${r.user.username}`;return await a(n,{query:{f:"json",token:t.portal.credential?.token},responseType:"json"}).then(async s=>{let o=s.data?.groups??[];return await Promise.resolve(o)},async()=>await Promise.reject(new Error("Failed to fetch user groups")))}return await Promise.resolve(null)}async function C(e){let t=e?.portalItem;if(!t)return await Promise.resolve(null);let r=t.portal,n=`${i(r)}content/items/${t.id}/groups`;return await a(n,{query:{f:"json",token:t.portal.credential?.token},responseType:"json"}).then(async s=>{let o=s.data?.admin??[],u=s.data?.member??[],l=s.data?.other??[],d=[...o,...u,...l];return await Promise.resolve(d)},async()=>await Promise.reject(new Error("Failed to fetch item groups")))}async function V(e,t,{relationshipType:r,direction:n},s=!1){let o=`${i(t)}content/items/${e}/relatedItems`;return await a(o,{query:{f:"json",relationshipType:r,direction:n,includeRecycleBin:s},responseType:"json"})}function _(e,t){return e?.some(r=>t?.some(n=>r.id===n.id&&r.capabilities.includes("updateitemcontrol")))}return{a:w,b:g,c:h,d:v,e:P,f:I,g:S,h:K,i:j,j:k,k:T,l:b,m:M,n:$,o:C,p:V,q:_}},"request")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as b,b as k}from"./6W2IHKCA.js";import{J as c,K as h,L as g,N as f,O as $,R as d,h as m,j as l}from"./JV23HJTE.js";import"./UZLQALHY.js";var E=/^#[0-9a-f]{3}$/iu,x=/^#[0-9a-f]{6}$/iu;function u(o){return I(o)||v(o)}function I(o){return o?.length===4&&E.test(o)}function v(o){return o?.length===7&&x.test(o)}function O(o){if(!u(o))return null;let t=o.replace("#","");if(t.length===3){let[e,i,r]=t.split("");return{r:Number.parseInt(`${e}${e}`,16),g:Number.parseInt(`${i}${i}`,16),b:Number.parseInt(`${r}${r}`,16)}}return{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}}function w(o){let t=0;for(let i=0;i<o.length;i++)t=o.charCodeAt(i)+((t<<5)-t);let e="#";for(let i=0;i<3;i++){let r=t>>i*8&255;e+=`00${r.toString(16)}`.slice(-2)}return e}function y(o){let{r:t,g:e,b:i}=o;t/=255,e/=255,i/=255;let r=Math.max(t,e,i),n=Math.min(t,e,i),s=r-n;if(s===0)return 0;let a=0;switch(r){case t:a=(e-i)/s+(e<i?6:0);break;case e:a=(i-t)/s+2;break;default:a=(t-e)/s+4;break}return Math.round(a*60)}function M(o){let t=O(o);return t?y(t):0}var T=m`:host{display:inline-block}:host([scale="s"]){height:1.5rem;width:1.5rem;font-size:.625rem}:host([scale="m"]){height:2rem;width:2rem;font-size:.75rem}:host([scale="l"]){font-size:1rem;height:2.75rem;width:2.75rem}:host([scale="xl"]){font-size:1.25rem;height:4rem;width:4rem}.icon{display:flex;color:var(--calcite-color-text-3)}.background{position:relative;display:flex;height:100%;width:100%;align-items:center;justify-content:center}.initials{position:absolute;font-weight:700;text-transform:uppercase;color:var(--calcite-color-text-2)}.thumbnail{height:100%;width:100%}.tooltip-text{margin:0;padding:0;font-size:.75rem;color:var(--calcite-color-text-2)}calcite-tooltip{pointer-events:none}`,p=class extends g{constructor(){super(...arguments),this.imageEl=c(),this.fallbackEl=c(),this.tooltipEl=c(),this.imageError=!1,this.tooltipOpen=!1,this.tooltip=!1,this.scale="m"}static{this.properties={imageError:16,tooltipOpen:16,group:0,portal:0,tooltip:5,scale:3}}static{this.styles=T}willUpdate(t){t.has("group")&&(this.imageError=!1)}updated(){let t=this.tooltipEl.value,e=this.imageEl.value||this.fallbackEl.value;t&&e&&(t.referenceElement=e)}isDarkMode(){return!!this.el.closest(".calcite-mode-dark")}getThumbnailURI(){let{group:t,portal:e}=this;if(!t)return null;if(t.thumbnailUrl)return t.thumbnailUrl;let i=t.thumbnail;if(!i)return null;if(i.startsWith("http"))return i;if(!e||!t.id)return null;let r=k(e),n=r?`?token=${r}`:"";return`${b(e)}community/groups/${t.id}/info/${i}${n}`}generateFillColor(){let{id:t,title:e}=this.group||{},i=t?`#${t.slice(Math.max(0,t.length-6))}`:"",r=t&&u(i)?i:w(e||"");if(!t&&!e||!u(r))return"var(--calcite-color-foreground-2)";let n=M(r),s=this.isDarkMode()?20:90;return`hsl(${n}, 60%, ${s}%)`}generateInitials(){let t=this.group?.title?.trim().charAt(0);return t?.match(/^\w+$/u)?t:null}getIconScale(){return this.scale==="xl"?"l":this.scale==="xs"?"s":this.scale}renderTooltip(){return!this.tooltip||!this.group?.title?null:l`<calcite-tooltip .open=${this.tooltipOpen} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0 ${h(this.tooltipEl)}><p class="tooltip-text">${this.group.title}</p></calcite-tooltip>`}render(){let t=this.getThumbnailURI();if(t&&!this.imageError)return l`<img class="thumbnail" src=${t??$} alt @error=${()=>{this.imageError=!0}} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.imageEl)}>${this.renderTooltip()}`;let e=this.generateInitials();return l`<span class="background" style=${f({backgroundColor:this.generateFillColor()})} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.fallbackEl)}>${e?l`<span aria-hidden=true class="initials">${e}</span>`:l`<calcite-icon class="icon" icon=users .scale=${this.getIconScale()}></calcite-icon>`}</span>${this.renderTooltip()}`}};d("arcgis-portal-group-thumbnail",p);export{p as ArcgisPortalGroupThumbnail};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./
|
|
2
|
+
import"./UZLQALHY.js";var o=`(function(){"use strict";const h=(a,r)=>{if(a.length!==r.length)throw new Error("Vectors must be the same length");let c=0,t=0,e=0;for(let n=0;n<a.length;++n){const s=a[n],l=r[n];c+=s*l,t+=s*s,e+=l*l}const i=Math.sqrt(t*e);if(i===0)return 0;const m=c/i;return Math.max(-1,Math.min(1,m))},f=(a,r,c=.6)=>{const t=[],e=[...a];for(;t.length<r&&e.length>0;){let i=-1,m=-1/0;for(let n=0;n<e.length;n++){const s=e[n].score,l=t.length===0?0:Math.max(...t.map(o=>h(e[n].vector,o.vector))),d=c*s-(1-c)*l;d>m&&(m=d,i=n)}t.push(e[i]),e.splice(i,1)}return t.map(({name:i,score:m})=>({name:i,score:m}))};let p=[];const u=new Map,v=12,y=10,M=a=>{p=a.layers.map(r=>({id:r.id,vector:r.vector}))},E=a=>{u.clear();for(const r of a.layers){const c=r.fields.map(t=>({name:t.name,vector:t.vector}));u.set(r.id,c)}};globalThis.addEventListener("message",a=>{(async()=>{const{type:r,webmapEmbeddings:c,layerIdForFieldsSearch:t=[],requestId:e,precomputedEmbedding:i,minScore:m=0,topResults:n=v}=a.data;switch(r){case"generateEmbeddings":{c&&(M(c),E(c)),globalThis.postMessage("completed");break}case"layerSearch":{if(p.length>0)try{const s=p.map(o=>({id:o.id,vector:o.vector,score:h(i,o.vector)})),d=f(s.map(o=>({name:o.id,vector:o.vector,score:o.score})),y).map(({name:o,score:b})=>({id:o,score:b}));globalThis.postMessage({requestId:e,results:d})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Calculation error"})}else globalThis.postMessage({requestId:e,results:[],error:"Layer embeddings not initialized"});break}case"fieldSearch":{if(t.length>0)try{const s=t.map(l=>{const d=u.get(l);if(!d)return{layerId:l,results:[]};const o=d.map(g=>({name:g.name,vector:g.vector,score:h(i,g.vector)})).filter(({score:g})=>g>=m),b=f(o,n);return{layerId:l,results:b}});globalThis.postMessage({requestId:e,results:s})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Field search calculation error"})}break}default:console.warn("Unknown message type:",r)}})()})})();
|
|
3
3
|
`,r=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",o],{type:"text/javascript;charset=utf-8"});function a(t){let e;try{if(e=r&&(self.URL||self.webkitURL).createObjectURL(r),!e)throw"";let s=new Worker(e,{name:t?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),s}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(o),{name:t?.name})}}export{a as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as c}from"./DFTUMKSN.js";function a(n){return new c().sanitize(n)}function f(n){let e=a(n),t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}function m(n,e){let t=n;for(;t;){if(t.matches?.(e))return t;let i=t.closest(e);if(i)return i;let s=t.getRootNode?.();t=s instanceof ShadowRoot?s.host:t.parentElement}}var r=document.createElement("canvas").getContext("2d"),o={},d=({text:n,font:e})=>{if(e&&(o[e]=o[e]||{},o[e][n]))return o[e][n];if(!r)return n.length*8;r.font=e||"14px 'Avenir Next'";let t=r.measureText(n);return e&&(o[e][n]=t.width),t.width};export{a,f as b,m as c,d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>{try{return a||b((a={exports:{}}).exports,a),a.exports}catch(c){throw a=0,c}},n=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var o=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./
|
|
2
|
+
import"./UZLQALHY.js";var e=`This Feature Layer is part of a Feature Service. The Feature Layer contains various fields, each with its own name, type, and description.
|
|
3
3
|
The Feature Layer is a collection of geographic features that represent real-world entities. Each feature in the layer has attributes that provide additional information about the feature. The layer may include point, line, or polygon geometries, depending on the type of data it represents.
|
|
4
4
|
The geometry type for this layer is {layerGeometryType}.
|
|
5
5
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"./UZLQALHY.js";var e=`## Who you are
|
|
3
|
+
|
|
4
|
+
You are a map assistant embedded inside a GIS application. You have no knowledge of history, science, people, events, cooking, or anything outside of this map and its data. You only know what is described in the Map Context below.
|
|
5
|
+
|
|
6
|
+
If asked anything outside of that context, you simply don't have that information \u2014 respond naturally and redirect to something you _can_ help with, using specific layer and field names from the map context.
|
|
7
|
+
|
|
8
|
+
Example of how to handle unknown topics:
|
|
9
|
+
"I don't have information on that \u2014 I only know about this map. You could ask me to list all layers in the map, or capabilities of this assistant."
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Your capabilities
|
|
14
|
+
|
|
15
|
+
You can help users with:
|
|
16
|
+
|
|
17
|
+
- Listing the layers in this map
|
|
18
|
+
- Listing the fields in a specific layer (use the tool)
|
|
19
|
+
- Suggesting specific queries using actual layer and field names
|
|
20
|
+
- Summarizing what this map contains and what users can do with it
|
|
21
|
+
- Letting users know when a map-related action isn't supported (e.g. charts, tables), and that it may be added in the future
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Input
|
|
26
|
+
|
|
27
|
+
Assigned task:
|
|
28
|
+
{assignedTask}
|
|
29
|
+
|
|
30
|
+
Latest user request:
|
|
31
|
+
{userRequest}
|
|
32
|
+
|
|
33
|
+
Prior steps:
|
|
34
|
+
{priorSteps}
|
|
35
|
+
|
|
36
|
+
Use the assigned task as the primary instruction. The question will **not** be restated again here.
|
|
37
|
+
Use the latest user request as supporting context.
|
|
38
|
+
Use prior steps only to explain a previous result, failure, or likely next action.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Map Context
|
|
43
|
+
|
|
44
|
+
{layerSummary}
|
|
45
|
+
|
|
46
|
+
## Available agents (capabilities)
|
|
47
|
+
|
|
48
|
+
{agents}
|
|
49
|
+
|
|
50
|
+
### Response Guidelines
|
|
51
|
+
|
|
52
|
+
When suggesting what users can ask, be SPECIFIC using actual layer names:
|
|
53
|
+
|
|
54
|
+
- "Show me water sources with elevation above 500"
|
|
55
|
+
- "Filter Protected Areas in Panama by protection level"
|
|
56
|
+
- "Zoom to Watershed Boundaries"
|
|
57
|
+
|
|
58
|
+
For "what can I ask" responses, provide 3-5 specific example queries using fields from the context.
|
|
59
|
+
|
|
60
|
+
For off-topic questions:
|
|
61
|
+
"I can only help with this map. Try asking me to filter [LayerName] by [FieldName], or zoom to a location."
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Format
|
|
66
|
+
|
|
67
|
+
- Keep responses concise
|
|
68
|
+
- Use bullet points for lists
|
|
69
|
+
- Use new lines (\\n) and appropriate formatting in your response
|
|
70
|
+
- Use actual layer and field names from the map context in any suggestions
|
|
71
|
+
`;export{e as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./
|
|
2
|
+
import"./UZLQALHY.js";var e=`# ArcGIS JavaScript SDK FeatureLayerView Query Assistant
|
|
3
3
|
|
|
4
4
|
You are a GIS assistant that generates query parameters for the ArcGIS JavaScript SDK FeatureLayerView \`queryFeatures()\` method.
|
|
5
5
|
|
|
@@ -39,10 +39,13 @@ Prior steps:
|
|
|
39
39
|
Last navigated features from shared state (if available):
|
|
40
40
|
{lastNavigatedFeatures}
|
|
41
41
|
|
|
42
|
+
Last resolved location from shared state (if available):
|
|
43
|
+
{lastResolvedLocation}
|
|
44
|
+
|
|
42
45
|
Use the assigned task as the primary instruction for the current query.
|
|
43
46
|
Use the latest user request as supporting context when needed.
|
|
44
47
|
Use prior steps only when the assigned task or user request clearly depends on earlier results.
|
|
45
|
-
Use
|
|
48
|
+
Use shared-state context (\`lastResolvedLocation\`, \`lastNavigatedFeatures\`) for referential follow-ups when relevant.
|
|
46
49
|
Use chat history only when necessary to understand conversational references, and do not override the assigned task.
|
|
47
50
|
|
|
48
51
|
### Anchor selection rule (strict, single source of truth)
|
|
@@ -50,8 +53,9 @@ Use chat history only when necessary to understand conversational references, an
|
|
|
50
53
|
When the request is referential (for example: "this", "it", "that", "those", "them", "of those", "the same one(s)"), choose exactly one anchor using this priority order:
|
|
51
54
|
|
|
52
55
|
1. Explicit entity named in the current request (if present)
|
|
53
|
-
2. \`
|
|
54
|
-
3.
|
|
56
|
+
2. \`lastResolvedLocation\` (if present and the request refers to a place/location)
|
|
57
|
+
3. \`lastNavigatedFeatures\` (if present)
|
|
58
|
+
4. The immediately previous successful relevant step from \`priorSteps\`
|
|
55
59
|
|
|
56
60
|
After selecting the anchor, keep that anchor for this query and do not switch to an older entity.
|
|
57
61
|
If \`lastNavigatedFeatures\` is used as the anchor, reuse its \`layerId\` and \`where\` for query scope unless the current request explicitly overrides it.
|
|
@@ -78,7 +82,8 @@ Start with a fresh WHERE clause for each new question. Do not inherit filters fr
|
|
|
78
82
|
|
|
79
83
|
This is an exception to the "fresh WHERE clause" rule above.
|
|
80
84
|
|
|
81
|
-
- If the anchored context
|
|
85
|
+
- If the anchored context is \`lastResolvedLocation\` with a point, prefer \`geometryFilter.point\` and use \`where: "1=1"\` unless the user asked for additional attribute filters.
|
|
86
|
+
- Only use \`useCurrentExtent: true\` when the user explicitly asks about the current view/map extent (for example: "in my view", "on my map", "visible now").
|
|
82
87
|
- If the anchored context includes specific feature IDs/objectIds, scope to those IDs.
|
|
83
88
|
- Otherwise, use the anchored \`layerId\` + \`where\` combination.
|
|
84
89
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./
|
|
2
|
+
import"./UZLQALHY.js";var e=`# ArcgisKnowledge Tool Instructions
|
|
3
3
|
|
|
4
4
|
You are an assistant that helps users answer questions and perform operations on their knowledge graph, map or link chart. You have been assigned the task below, which must be achieved by calling a single tool.
|
|
5
5
|
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"./UZLQALHY.js";var e=`# ArcGIS Knowledge Agent \u2014 Action Summary
|
|
3
|
+
|
|
4
|
+
You are a Knowledge Graph assistant that has executed tool calls to answer a user request.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
**Data model**
|
|
9
|
+
{dataModelSummary}
|
|
10
|
+
|
|
11
|
+
**Assigned task**
|
|
12
|
+
{assignedTask}
|
|
13
|
+
|
|
14
|
+
**User request**
|
|
15
|
+
{userRequest}
|
|
16
|
+
|
|
17
|
+
**Tool result**
|
|
18
|
+
{toolResult}
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Goal
|
|
23
|
+
|
|
24
|
+
Generate a concise, complete Markdown response using the tool results.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Priority Rules (Strict Order)
|
|
29
|
+
|
|
30
|
+
### 1. User Formatting Override (Highest Priority)
|
|
31
|
+
|
|
32
|
+
- If the user specifies a format (table, list, bullets, etc.):
|
|
33
|
+
- Use that format exactly
|
|
34
|
+
- Ignore ALL default formatting rules below
|
|
35
|
+
- Do NOT add summaries or extra sections unless requested
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### 2. Default Output (When no override)
|
|
40
|
+
|
|
41
|
+
Produce:
|
|
42
|
+
|
|
43
|
+
- **Summary**: 1\u20132 sentences (no header, no bullets)
|
|
44
|
+
- **Results**: Minimal, well-formatted data
|
|
45
|
+
- **Note (optional)**:
|
|
46
|
+
- 1\u20132 italicized sentences describing tool limitations
|
|
47
|
+
|
|
48
|
+
#### Limits
|
|
49
|
+
|
|
50
|
+
- maxPreviewItems: 5
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
### 3. Output Constraints (Non-Negotiable)
|
|
55
|
+
|
|
56
|
+
- Output **valid Markdown only** (no JSON)
|
|
57
|
+
- Do NOT hallucinate data (entities, fields, counts, relationships)
|
|
58
|
+
- Do NOT include:
|
|
59
|
+
- reasoning
|
|
60
|
+
- classification labels
|
|
61
|
+
- follow-up questions
|
|
62
|
+
- next steps
|
|
63
|
+
- intro phrases (\u201CHere are\u2026\u201D)
|
|
64
|
+
- restating the question
|
|
65
|
+
- End immediately after the response
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### 4. Data Handling Rules
|
|
70
|
+
|
|
71
|
+
- If results are empty \u2192 clearly state no results returned
|
|
72
|
+
- If insufficient data \u2192 state limitation, do NOT speculate
|
|
73
|
+
- Do NOT output:
|
|
74
|
+
- raw nested objects
|
|
75
|
+
- large arrays
|
|
76
|
+
- geometry
|
|
77
|
+
- Summarize complex structures
|
|
78
|
+
- Truncate long values with \`\u2026\`
|
|
79
|
+
- Show entities/relationships only once
|
|
80
|
+
- Use:
|
|
81
|
+
- \u201Centity\u201D (not node)
|
|
82
|
+
- \u201Crelationship\u201D (not edge)
|
|
83
|
+
- Hide \`globalid\` and \`objectid\` unless explicitly requested
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### 5. Formatting Rules (Default Mode Only)
|
|
88
|
+
|
|
89
|
+
- No headers; use _italic labels_ if needed
|
|
90
|
+
- Use:
|
|
91
|
+
- bullets \u2192 single item summaries
|
|
92
|
+
- tables \u2192 multiple results (limit to 5 rows)
|
|
93
|
+
- Reduce columns to key fields only
|
|
94
|
+
- Format:
|
|
95
|
+
- dates \u2192 \u201Cday month year\u201D
|
|
96
|
+
- time separate from date
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### 6. Result-Type Formatting
|
|
101
|
+
|
|
102
|
+
**SEARCH_HITS**
|
|
103
|
+
|
|
104
|
+
- Highlight top match (bullets)
|
|
105
|
+
- Table for remaining results
|
|
106
|
+
|
|
107
|
+
**ENTITIES**
|
|
108
|
+
|
|
109
|
+
- Group by type (if multiple)
|
|
110
|
+
- Show key properties only
|
|
111
|
+
|
|
112
|
+
**RELATIONSHIPS**
|
|
113
|
+
|
|
114
|
+
- Format: \`(entity) \u2014[relationship]\u2192 (entity)\`
|
|
115
|
+
|
|
116
|
+
**PATHS**
|
|
117
|
+
|
|
118
|
+
- Summary + 1-3 examples
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Internal Processing (Do NOT output)
|
|
123
|
+
|
|
124
|
+
Classify results into:
|
|
125
|
+
|
|
126
|
+
- SEARCH_HITS, ENTITIES, RELATIONSHIPS, PATHS
|
|
127
|
+
|
|
128
|
+
## Failure Handling
|
|
129
|
+
|
|
130
|
+
- If data is insufficient \u2192 clearly state limitation
|
|
131
|
+
- Never infer or fabricate missing information
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
`;export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{c as m}from"./IBP5XPD5.js";import"./D76KMXZD.js";import{J as d,K as p,L as u,M as s,O as o,R as h,h as n,j as a,v as c}from"./JV23HJTE.js";import"./UZLQALHY.js";var v=n`.coord-field{margin-bottom:var(--calcite-spacing-sm)}.coord-label{display:block;margin-bottom:var(--calcite-spacing-sm);font-size:14px}.coordinate-input{width:100%;block-size:var(--calcite-spacing-xxxl);box-sizing:border-box;padding-inline:var(--calcite-spacing-md);font-size:14px;color:var(--calcite-color-text-3);outline-color:var(--calcite-color-brand)}.coordinate-input--error{border:1px solid var(--calcite-color-status-danger)}.coord-error-message{position:relative;max-width:100%;margin:var(--calcite-spacing-sm) 0;display:flex;font-size:14px;padding:6px 7px;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-status-danger);box-shadow:0 1px 2px #00000054}.coord-error-message:before{pointer-events:none;content:"";position:absolute;left:11px;top:-16px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-status-danger)}.coord-error-message:after{position:absolute;pointer-events:none;content:"";left:11px;top:-15px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-foreground-1)}.is-rtl .coord-error-message:before,.is-rtl .coord-error-message:after{left:initial;right:11px}.coord-error-message calcite-icon{color:var(--calcite-color-status-danger)}.coord-error-message__text{margin-left:var(--calcite-spacing-sm);margin-right:var(--calcite-spacing-sm);line-height:var(--calcite-spacing-xl)}`,l=class extends u{constructor(){super(...arguments),this._direction=m(),this.inputEl=d(),this.isInvalid=!1,this.currentError="",this.inputValue="",this.label="",this.value="",this.errorMessage="",this.min=-180,this.max=180,this.validateRelated=()=>!0,this.relatedErrorMessage="",this.inputId="",this.arcgisCoordChange=c()}static{this.properties={isInvalid:16,currentError:16,inputValue:16,label:1,value:1,errorMessage:1,min:9,max:9,validateRelated:0,relatedErrorMessage:1,inputId:1}}static{this.styles=v}checkRelatedField(){return!this.inputValue||!this.isInvalid||!this.validate(this.inputValue)?"":this.inputValue}isValid(){return!this.isInvalid}setFocus(){this.inputEl.value?.focus()}willUpdate(t){t.has("value")&&this.validate(t.get("value"))}isValidCoord(t,r,i){if(!t?.match(/^-?[0-9]*(\.|,)?[0-9]+$/u))return!1;let e=this.parseNumber(t);return e>=r&&e<=i}validate(t){if(this.isInvalid=!this.isValidCoord(t,this.min,this.max),this.isInvalid)return this.currentError=this.errorMessage,!1;let r=this.parseNumber(t);return this.isInvalid=!this.validateRelated(r),this.isInvalid?(this.currentError=this.relatedErrorMessage,!1):!0}parseNumber(t){let r=`-${Array.from({length:10},(e,g)=>g.toString()).join("")}`,i=t.replace(",",".");return i=Array.from(i).filter(e=>r.includes(e)||e===".").join(""),parseFloat(i)}render(){return a`<div class=${s({"coord-field":!0,"is-rtl":this._direction==="rtl"})}><label class="coord-label" for=${this.inputId??o}>${this.label}</label><calcite-input-number number-button-type=none id=${this.inputId??o} class=${s({"coordinate-input":!0})} .value=${`${this.parseNumber(this.value)}`} @calciteInputNumberChange=${t=>{this.inputValue=t.target.value,this.validate(this.inputValue)&&this.arcgisCoordChange.emit(this.inputValue)}} .status=${this.isInvalid?"invalid":"valid"} ${p(this.inputEl)}></calcite-input-number>${this.isInvalid&&a`<div class="coord-error-message"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon><div class="coord-error-message__text">${this.currentError}</div></div>`||""}</div>`}};h("arcgis-portal-extent-picker-coord-field",l);export{l as ArcgisPortalExtentPickerCoordField};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as g}from"./GKOXTQHB.js";import{d as b}from"./U3FVMN32.js";import{a as m}from"./AXM6XCZD.js";import{a as f}from"./NWIIOJEG.js";import{L as p,R as u,h,j as s,v as r}from"./JV23HJTE.js";var w=h`:host{display:flex;align-items:center}.status-list{display:flex;align-items:center;max-width:100%}.status-chip{max-width:100%;--calcite-color-foreground-2: var(--calcite-color-foreground-1)}.chip-group{max-width:100%;min-width:0}.status-chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-content{max-width:28rem;padding:.75rem}.clear-button{margin-inline-start:.25rem}`,o=class extends p{constructor(){super(...arguments),this._messages=m({name:"portal-browser",blocking:!0}),this.inBounds=[],this.outOfBounds=[],this.filters={},this.hiddenFilterIds=[],this.arcgisBrowserFilterClear=r(),this.arcgisBrowserFilterRemove=r()}static{this.properties={inBounds:16,outOfBounds:16,filters:0,hiddenFilterIds:0,componentWidth:9,browserWidth:9}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.processValidFilters()}willUpdate(t){(t.has("filters")||t.has("hiddenFilterIds")||t.has("componentWidth")||t.has("browserWidth"))&&this.processValidFilters()}isFilterValid(t){return this.hiddenFilterIds.includes(t.id)?!1:t.id==="collaborations"&&"additionalParams"in t?!!(t.additionalParams&&t.label):!!(t.value&&t.label)}processValidFilters(){let t=Object.values(this.filters).filter(this.isFilterValid.bind(this)),i=this.componentWidth??0;if((this.browserWidth??window.innerWidth)<f.sm){this.inBounds=t,this.outOfBounds=[];return}let a=Math.max(i-460,0),e=0,n=[],c=[];t.forEach(l=>{let d=b({text:l.label});!i||e+d<=a?(n.push(l),e+=d):c.push(l)}),this.inBounds=n,this.outOfBounds=c}renderChip(t){return g(t.id,s`<calcite-chip class="status-chip" scale=s .label=${t.label} .value=${t.id} closable appearance=outline @calciteChipClose=${()=>{this.arcgisBrowserFilterRemove.emit(t.id)}}><span class="status-chip__label">${t.label}</span></calcite-chip>`)}render(){let t=this._messages.filterStatus,i=this.outOfBounds.length>0,a=this.inBounds.length+this.outOfBounds.length;return a?s`<div class="status-list"><calcite-chip-group class="chip-group" .label=${t.filters} scale=s>${this.inBounds.map(e=>this.renderChip(e))}${i&&s`<calcite-button id=popover-button round kind=neutral appearance=outline scale=s>+ ${this.outOfBounds.length}</calcite-button>`||""}</calcite-chip-group>${i&&s`<calcite-popover .label=${t.additional} reference-element=popover-button placement=bottom-end><div class="popover-content"><calcite-chip-group .label=${t.additional} scale=s>${this.outOfBounds.map(e=>this.renderChip(e))}</calcite-chip-group></div></calcite-popover>`||""}${a>1&&s`<calcite-button class="clear-button" scale=s appearance=transparent kind=brand @click=${()=>this.arcgisBrowserFilterClear.emit(null)}>${t.clearAllFilters}</calcite-button>`||""}</div>`:null}};u("arcgis-portal-browser-filter-status",o);export{o as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as u,b as g,c as k}from"./
|
|
2
|
+
import{a as u,b as g,c as k}from"./6W2IHKCA.js";export default $arcgis.t(([q,x])=>{var c={},l={},d={};async function y({requester:t,key:r,id:o,cacheOption:a}){let e=d[r]?.[o]?.expireAt,n=!!e&&new Date().getTime()>e;if(c[r]?.[o]&&!n)return c[r][o];l[r]||(l[r]={}),(!l[r][o]||n)&&(l[r][o]=t());let i=await l[r][o];if(c[r]||(c[r]={}),d[r]||(d[r]={}),c[r][o]=i,a){let{expireAfter:m,getExpireAfterFromResult:s}=a,f=s||m?new Date().getTime()+(s?.(i)??m??0):null;d[r][o]={...d[r][o],expireAt:f}}return i}async function A({url:t,portal:r,params:o={},options:a={},method:e,abortControllerId:n,excludeJson:i}){let m=T(n)?.signal,{customToken:s,addTokenManually:f,addSSL:S,useProxy:b}=a,w={...o};if(!t.includes("f=")&&!i&&(w.f="json"),s)w.token=s;else if(f!==!1){let h=await E(r);h&&(w.token=h)}let C=S?M(t,r):t,P={query:w,method:e||"auto",...a,timeout:a.timeout||0,useProxy:b,...a?.disableIdentityLookup?{authMode:"anonymous"}:{}},$=await x(C,{signal:m,...P});return n&&(p[n]=void 0),$.data}var p={};function T(t){if(t)return p[t]&&p[t].abort(),p[t]=new AbortController,p[t]}var E=async t=>{let r=k(t);if(!t?.isPortal||!r)return g(t);let o=t?.user;if(!o&&r)return;let{token:a}=await y({requester:async()=>await I(t),key:"platformSelf",id:o?.id??t.id??"<unknown>",cacheOption:{getExpireAfterFromResult:e=>e.expires_in}});return a},I=async t=>{let r={"X-Esri-Auth-Client-Id":await L(t),"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/u,"")};return(await x(`${u(t)}/oauth2/platformSelf`,{authMode:"no-prompt",headers:r,withCredentials:!0,method:"post"})).data},L=async t=>(await y({requester:async()=>await q.getCredential(u(t),{oAuthPopupConfirmation:!1}),key:"credential",id:t.user?.id??"<unknown>"})).oAuthState?.appId??"arcgisonline";function M(t,r){return window.location.protocol==="https:"||r.allSSL?t.replace("http:","https:"):t}async function D(t,r,o){let a=`${o?"https://www.arcgis.com/sharing/rest/":u(r)}community/users/${t}`,e=a?.includes("www.arcgis.com")&&r.isPortal,n=a?.includes(".arcgis.com")&&!r.isPortal&&!r.user,i=e||n?{disableIdentityLookup:!0,addTokenManually:!1}:{};return await y({requester:async()=>{try{return await A({url:a,portal:r,options:i})}catch{return{username:t}}},key:"user",id:a})}var U=async t=>{let r=`${u(t)}/portals/${t.id}/users`;return await A({url:r,portal:t,params:{num:100,sortField:"lastlogin",sortOrder:"desc"}})};return{a:y,b:A,c:D,d:U}},"identity/IdentityManager","request")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as p}from"./NWIIOJEG.js";import{J as r,K as i,L as a,M as l,R as c,h as e,j as o}from"./JV23HJTE.js";var d=e`:host{display:block}.filters-shell{display:block}.filters-shell__top{padding:0}.filters-shell__top--padded{padding:0 1rem 1rem}`,t=class extends a{constructor(){super(...arguments),this._accordionRef=r()}static{this.properties={store:0}}static{this.styles=d}updated(){this.store&&this._accordionRef.value&&(this.store.filterElement=this._accordionRef.value)}render(){let s=this.store,n=!!s?.panel||(s?.width??0)<p.sm;return o`<div class="filters-shell" .inert=${!!s?.preview}><div class=${l({"filters-shell__top":!0,"filters-shell__top--padded":n})}><slot name=top></slot></div><slot name=primary></slot><slot name=title></slot><calcite-accordion appearance=transparent icon-type=chevron icon-position=start scale=m ${i(this._accordionRef)}><slot></slot></calcite-accordion><slot name=bottom></slot></div>`}};c("arcgis-portal-browser-filters",t);export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{A as
|
|
2
|
+
import{A as n,B as o,C as a,k as r,l as s}from"./JV23HJTE.js";var i=class extends a{constructor(t){if(super(t),this.it=s,t.type!==n.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s||t==null)return this._t=void 0,this.it=t;if(t===r)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var f=o(i);export{f as a};
|