@arcgis/portal-components 5.2.0-next.24 → 5.2.0-next.25

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.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as o}from"./HIRM34QB.js";import b from"./Q75EBGI2.js";import a from"./O3KBWLGU.js";import{a as f}from"./5VHBNEN3.js";import"./EKO6SVAF.js";import{K as n,Q as r,h as c,j as e}from"./WJ2NMHDE.js";import"./YIMNOUTF.js";export default $arcgis.t(([{c:d,d:h},{f:v}])=>{var C=c`.select-favorite-label{display:flex;justify-content:space-between;align-items:center}.favorite-actions{display:flex;justify-content:flex-end;gap:1.5rem;align-items:center}.classification-favorite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: "var(--calcite-color-foreground-2)"}.save-new-favorite-button{display:flex;justify-content:flex-end;margin-top:.25rem;margin-bottom:1rem}.classification-favorite-item{display:flex;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem;border-bottom:1px solid var(--calcite-color-border-1)}.classification-favorite-list,.classification-favorite-input-section{margin:1.75rem 1rem}`,l=class extends n{constructor(){super(...arguments),this.messages=f(),this.selectFavoriteClassification=i=>{let a=i.target.value;if(a){this.hasUpdateError=!1;let t=this.favoriteClassifications.find(({name:s})=>s===a);t&&this.updateClassificationData(t)}},this.uploadFavoriteClassificationValueHandle=async i=>{let a=await h(this.portalItem,this.favoriteClassifications);if(this.renderFavoriteClassificationError({alertIndicatorType:"success",alertIndicatorIcon:"check",alertIndicatorInfo:i}),a){let{result:t,error:s}=a;if(s){console.error(s),this.renderFavoriteClassificationError({alertIndicatorType:"danger",alertIndicatorIcon:"exclamation-mark-triangle",alertIndicatorInfo:this.messages.uploadClassificationFavoriteError??"Failed to upload classification favorites"});return}t&&this.renderFavoriteClassificationError({alertIndicatorType:"success",alertIndicatorIcon:"check",alertIndicatorInfo:i})}},this.retrieveFavoriteClassificationHandle=async()=>{let i=await d(this.portalItem);if(i){let{result:a,error:t}=i;if(t){console.error(t),this.renderFavoriteClassificationError({alertIndicatorType:"danger",alertIndicatorIcon:"exclamation-mark-triangle",alertIndicatorInfo:this.messages.retrieveClassificationFavoriteError??"Failed to retrieve classification favorites"});return}a&&this.resetFavoriteClassification(a.favorites)}},this.changeFavoriteClassificationName=i=>{let a=i.target.value;this.newFavoriteClassificationName=a,this.hasDuplicatedClassificationError=this.favoriteClassifications.some(t=>t.name===a)},this.saveNewFavoriteClassification=async()=>{let i=this.newFavoriteClassificationName;if(this.favoriteClassifications.some(s=>s.name===i)){this.hasDuplicatedClassificationError=!0;return}if(!i)return;let a=this.deleteNonEnabledAttributes(),t={name:i,classification:a};this.favoriteClassifications=[...this.favoriteClassifications,t],await this.uploadFavoriteClassificationValueHandle(this.messages.addClassificationFavoriteSuccessMessage??"Classification Favorite added successfully"),await this.retrieveFavoriteClassificationHandle(),this.showSaveClassificationDialog=!1},this.updateFavoriteClassification=async()=>{if(!this.selectedFavoriteClassificationName){this.hasUpdateError=!0;return}await this.addFavoriteClassification(this.selectedFavoriteClassificationName),await this.retrieveFavoriteClassificationHandle()},this.deleteNonEnabledAttributes=()=>{let i=structuredClone(this.portalItem?.classification??{}),a=Object.fromEntries(Object.entries(i).filter(([t])=>this.attributeExpressionResults?.get(t)?.enabled!==!1));return{...a,...v(this.portalItem,a)}},this.addFavoriteClassification=async i=>{let a=this.deleteNonEnabledAttributes(),t={name:i,classification:a},s=this.favoriteClassifications.findIndex(m=>m.name===i);s>=0?this.favoriteClassifications[s].classification=a:this.favoriteClassifications=[...this.favoriteClassifications,t],await this.uploadFavoriteClassificationValueHandle(this.messages.updateClassificationFavoriteSuccessMessage??"Classification Favorite updated successfully")},this.removeFavoriteClassification=async i=>{this.favoriteClassifications=this.favoriteClassifications.filter(a=>a.name!==i),this.favoriteClassifications.length===0&&(this.showManageClassificationDialog=!1),await this.uploadFavoriteClassificationValueHandle(this.messages.removeClassificationFavoriteSuccessMessage??"Classification Favorite removed successfully"),await this.retrieveFavoriteClassificationHandle()},this.newFavoriteClassificationName="",this.showManageClassificationDialog=!1,this.showSaveClassificationDialog=!1,this.hasDuplicatedClassificationError=!1,this.hasUpdateError=!1,this.alertIndicator={alertIndicatorType:"danger",alertIndicatorIcon:"exclamation-mark-triangle",alertIndicatorInfo:""},this.isNotificationModalActive=!1,this.favoriteClassifications=[],this.selectedFavoriteClassificationName="",this.resetFavoriteClassification=()=>{},this.updateClassificationData=()=>{},this.renderFavoriteClassificationError=i=>{let{alertIndicatorType:a,alertIndicatorIcon:t,alertIndicatorInfo:s}=i;return e`<calcite-alert .icon=${t} .label=${this.messages.classificationNotificationHandler??"Classification notification handler"} auto-close-duration=medium open .kind=${a} @calciteAlertClose=${()=>this.alertIndicator===null}><div slot=message>${s}</div></calcite-alert>`}}static{this.properties={newFavoriteClassificationName:16,showManageClassificationDialog:16,showSaveClassificationDialog:16,hasDuplicatedClassificationError:16,hasUpdateError:16,alertIndicator:16,isNotificationModalActive:16,portalItem:0,classificationValue:0,favoriteClassifications:0,selectedFavoriteClassificationName:1,attributeExpressionResults:0,resetFavoriteClassification:0,updateClassificationData:0}}static{this.styles=C}load(){this.newFavoriteClassificationName=this.classificationValue?.banner??""}onOpenFavoriteClassificationModal(){this.newFavoriteClassificationName=this.classificationValue?.banner??"",this.showSaveClassificationDialog=!0}getValidationMessage(){return this.newFavoriteClassificationName?this.hasDuplicatedClassificationError?this.messages.duplicatedClassificationError:"":this.messages.emptyFavoriteError}render(){return e`<div>${this.favoriteClassifications.length>0?e`<div><calcite-label><div class="select-favorite-label">${this.messages.applyClassificationFavoriteLabel}<calcite-link @click=${()=>this.showManageClassificationDialog=!0}>${this.messages.manageClassificationFavoriteBtn}</calcite-link></div><calcite-combobox label=select-calcite-combobox selection-mode=single .placeholder=${this.messages.selectFavoritePlaceholder} placeholder-icon=folder-star @calciteComboboxChange=${this.selectFavoriteClassification} .status=${this.hasUpdateError?"invalid":"idle"} .validationIcon=${this.hasUpdateError?"exclamation-mark-triangle":void 0} .validationMessage=${this.hasUpdateError?this.messages.updateWarning:""}>${o(this.favoriteClassifications,({name:i})=>i,({name:i})=>e`<calcite-combobox-item .selected=${this.selectedFavoriteClassificationName===i} icon=folder-star .value=${i} .heading=${i}></calcite-combobox-item>`)}</calcite-combobox></calcite-label><div class="favorite-actions"><calcite-link icon-start=refresh @click=${this.updateFavoriteClassification}>${this.messages.updateClassificationFavoriteBtn}</calcite-link><calcite-link icon-start=star @click=${this.onOpenFavoriteClassificationModal}>${this.messages.saveNewClassificationBtn}</calcite-link></div></div>`:e`<div class="save-new-favorite-button"><calcite-link icon-start=folder-star @click=${this.onOpenFavoriteClassificationModal}>${this.messages.saveNewClassificationFavoriteBtn}</calcite-link></div>`}<calcite-dialog class="classification-favorite-dialog" overlay-positioning=fixed .heading=${this.messages.manageClassificationFavoriteLabel} .open=${this.showManageClassificationDialog} modal placement=center scale=m outside-close-disabled @calciteDialogClose=${()=>this.showManageClassificationDialog=!1}><calcite-list class="classification-favorite-list" .label=${this.messages.classificationFavoriteListLabel??"Classification Favorite list label"} selection-appearance=border selection-mode=single-persist>${o(this.favoriteClassifications,({name:i})=>i,({name:i})=>e`<calcite-list-item .label=${i} .value=${i} class="classification-favorite-item"><div slot=content-end><calcite-icon icon=trash scale=s @click=${async()=>await this.removeFavoriteClassification(i)}></calcite-icon></div></calcite-list-item>`)}</calcite-list><calcite-button slot=footer-end scale=l @click=${()=>this.showManageClassificationDialog=!1}><div>${this.messages.favoriteClassificationBtnDone}</div></calcite-button></calcite-dialog><calcite-dialog class="classification-favorite-dialog" overlay-positioning=fixed .heading=${this.messages.addFavoriteDialogHeading} .open=${this.showSaveClassificationDialog} modal placement=center scale=m outside-close-disabled @calciteDialogClose=${()=>this.showSaveClassificationDialog=!1}><calcite-label class="classification-favorite-input-section">${this.messages.addClassificationFavorite}<calcite-input id=classification-favorite-name name=classification-favorite-name scale=m .value=${this.newFavoriteClassificationName} @calciteInputInput=${this.changeFavoriteClassificationName} .status=${!this.newFavoriteClassificationName||this.hasDuplicatedClassificationError?"invalid":"idle"} validation-icon=exclamation-mark-triangle .validationMessage=${this.getValidationMessage()}></calcite-input></calcite-label><calcite-button scale=l slot=footer-end @click=${this.saveNewFavoriteClassification}>${this.messages.favoriteClassificationBtnDone}</calcite-button></calcite-dialog></div>`}};r("arcgis-portal-classification-favorite",l);return l},a,b)
2
+ import b from"./Q75EBGI2.js";import{a as o}from"./HIRM34QB.js";import a from"./O3KBWLGU.js";import{a as f}from"./5VHBNEN3.js";import"./EKO6SVAF.js";import{K as n,Q as r,h as c,j as e}from"./WJ2NMHDE.js";import"./YIMNOUTF.js";export default $arcgis.t(([{c:d,d:h},{f:v}])=>{var C=c`.select-favorite-label{display:flex;justify-content:space-between;align-items:center}.favorite-actions{display:flex;justify-content:flex-end;gap:1.5rem;align-items:center}.classification-favorite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: "var(--calcite-color-foreground-2)"}.save-new-favorite-button{display:flex;justify-content:flex-end;margin-top:.25rem;margin-bottom:1rem}.classification-favorite-item{display:flex;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem;border-bottom:1px solid var(--calcite-color-border-1)}.classification-favorite-list,.classification-favorite-input-section{margin:1.75rem 1rem}`,l=class extends n{constructor(){super(...arguments),this.messages=f(),this.selectFavoriteClassification=i=>{let a=i.target.value;if(a){this.hasUpdateError=!1;let t=this.favoriteClassifications.find(({name:s})=>s===a);t&&this.updateClassificationData(t)}},this.uploadFavoriteClassificationValueHandle=async i=>{let a=await h(this.portalItem,this.favoriteClassifications);if(this.renderFavoriteClassificationError({alertIndicatorType:"success",alertIndicatorIcon:"check",alertIndicatorInfo:i}),a){let{result:t,error:s}=a;if(s){console.error(s),this.renderFavoriteClassificationError({alertIndicatorType:"danger",alertIndicatorIcon:"exclamation-mark-triangle",alertIndicatorInfo:this.messages.uploadClassificationFavoriteError??"Failed to upload classification favorites"});return}t&&this.renderFavoriteClassificationError({alertIndicatorType:"success",alertIndicatorIcon:"check",alertIndicatorInfo:i})}},this.retrieveFavoriteClassificationHandle=async()=>{let i=await d(this.portalItem);if(i){let{result:a,error:t}=i;if(t){console.error(t),this.renderFavoriteClassificationError({alertIndicatorType:"danger",alertIndicatorIcon:"exclamation-mark-triangle",alertIndicatorInfo:this.messages.retrieveClassificationFavoriteError??"Failed to retrieve classification favorites"});return}a&&this.resetFavoriteClassification(a.favorites)}},this.changeFavoriteClassificationName=i=>{let a=i.target.value;this.newFavoriteClassificationName=a,this.hasDuplicatedClassificationError=this.favoriteClassifications.some(t=>t.name===a)},this.saveNewFavoriteClassification=async()=>{let i=this.newFavoriteClassificationName;if(this.favoriteClassifications.some(s=>s.name===i)){this.hasDuplicatedClassificationError=!0;return}if(!i)return;let a=this.deleteNonEnabledAttributes(),t={name:i,classification:a};this.favoriteClassifications=[...this.favoriteClassifications,t],await this.uploadFavoriteClassificationValueHandle(this.messages.addClassificationFavoriteSuccessMessage??"Classification Favorite added successfully"),await this.retrieveFavoriteClassificationHandle(),this.showSaveClassificationDialog=!1},this.updateFavoriteClassification=async()=>{if(!this.selectedFavoriteClassificationName){this.hasUpdateError=!0;return}await this.addFavoriteClassification(this.selectedFavoriteClassificationName),await this.retrieveFavoriteClassificationHandle()},this.deleteNonEnabledAttributes=()=>{let i=structuredClone(this.portalItem?.classification??{}),a=Object.fromEntries(Object.entries(i).filter(([t])=>this.attributeExpressionResults?.get(t)?.enabled!==!1));return{...a,...v(this.portalItem,a)}},this.addFavoriteClassification=async i=>{let a=this.deleteNonEnabledAttributes(),t={name:i,classification:a},s=this.favoriteClassifications.findIndex(m=>m.name===i);s>=0?this.favoriteClassifications[s].classification=a:this.favoriteClassifications=[...this.favoriteClassifications,t],await this.uploadFavoriteClassificationValueHandle(this.messages.updateClassificationFavoriteSuccessMessage??"Classification Favorite updated successfully")},this.removeFavoriteClassification=async i=>{this.favoriteClassifications=this.favoriteClassifications.filter(a=>a.name!==i),this.favoriteClassifications.length===0&&(this.showManageClassificationDialog=!1),await this.uploadFavoriteClassificationValueHandle(this.messages.removeClassificationFavoriteSuccessMessage??"Classification Favorite removed successfully"),await this.retrieveFavoriteClassificationHandle()},this.newFavoriteClassificationName="",this.showManageClassificationDialog=!1,this.showSaveClassificationDialog=!1,this.hasDuplicatedClassificationError=!1,this.hasUpdateError=!1,this.alertIndicator={alertIndicatorType:"danger",alertIndicatorIcon:"exclamation-mark-triangle",alertIndicatorInfo:""},this.isNotificationModalActive=!1,this.favoriteClassifications=[],this.selectedFavoriteClassificationName="",this.resetFavoriteClassification=()=>{},this.updateClassificationData=()=>{},this.renderFavoriteClassificationError=i=>{let{alertIndicatorType:a,alertIndicatorIcon:t,alertIndicatorInfo:s}=i;return e`<calcite-alert .icon=${t} .label=${this.messages.classificationNotificationHandler??"Classification notification handler"} auto-close-duration=medium open .kind=${a} @calciteAlertClose=${()=>this.alertIndicator===null}><div slot=message>${s}</div></calcite-alert>`}}static{this.properties={newFavoriteClassificationName:16,showManageClassificationDialog:16,showSaveClassificationDialog:16,hasDuplicatedClassificationError:16,hasUpdateError:16,alertIndicator:16,isNotificationModalActive:16,portalItem:0,classificationValue:0,favoriteClassifications:0,selectedFavoriteClassificationName:1,attributeExpressionResults:0,resetFavoriteClassification:0,updateClassificationData:0}}static{this.styles=C}load(){this.newFavoriteClassificationName=this.classificationValue?.banner??""}onOpenFavoriteClassificationModal(){this.newFavoriteClassificationName=this.classificationValue?.banner??"",this.showSaveClassificationDialog=!0}getValidationMessage(){return this.newFavoriteClassificationName?this.hasDuplicatedClassificationError?this.messages.duplicatedClassificationError:"":this.messages.emptyFavoriteError}render(){return e`<div>${this.favoriteClassifications.length>0?e`<div><calcite-label><div class="select-favorite-label">${this.messages.applyClassificationFavoriteLabel}<calcite-link @click=${()=>this.showManageClassificationDialog=!0}>${this.messages.manageClassificationFavoriteBtn}</calcite-link></div><calcite-combobox label=select-calcite-combobox selection-mode=single .placeholder=${this.messages.selectFavoritePlaceholder} placeholder-icon=folder-star @calciteComboboxChange=${this.selectFavoriteClassification} .status=${this.hasUpdateError?"invalid":"idle"} .validationIcon=${this.hasUpdateError?"exclamation-mark-triangle":void 0} .validationMessage=${this.hasUpdateError?this.messages.updateWarning:""}>${o(this.favoriteClassifications,({name:i})=>i,({name:i})=>e`<calcite-combobox-item .selected=${this.selectedFavoriteClassificationName===i} icon=folder-star .value=${i} .heading=${i}></calcite-combobox-item>`)}</calcite-combobox></calcite-label><div class="favorite-actions"><calcite-link icon-start=refresh @click=${this.updateFavoriteClassification}>${this.messages.updateClassificationFavoriteBtn}</calcite-link><calcite-link icon-start=star @click=${this.onOpenFavoriteClassificationModal}>${this.messages.saveNewClassificationBtn}</calcite-link></div></div>`:e`<div class="save-new-favorite-button"><calcite-link icon-start=folder-star @click=${this.onOpenFavoriteClassificationModal}>${this.messages.saveNewClassificationFavoriteBtn}</calcite-link></div>`}<calcite-dialog class="classification-favorite-dialog" overlay-positioning=fixed .heading=${this.messages.manageClassificationFavoriteLabel} .open=${this.showManageClassificationDialog} modal placement=center scale=m outside-close-disabled @calciteDialogClose=${()=>this.showManageClassificationDialog=!1}><calcite-list class="classification-favorite-list" .label=${this.messages.classificationFavoriteListLabel??"Classification Favorite list label"} selection-appearance=border selection-mode=single-persist>${o(this.favoriteClassifications,({name:i})=>i,({name:i})=>e`<calcite-list-item .label=${i} .value=${i} class="classification-favorite-item"><div slot=content-end><calcite-icon icon=trash scale=s @click=${async()=>await this.removeFavoriteClassification(i)}></calcite-icon></div></calcite-list-item>`)}</calcite-list><calcite-button slot=footer-end scale=l @click=${()=>this.showManageClassificationDialog=!1}><div>${this.messages.favoriteClassificationBtnDone}</div></calcite-button></calcite-dialog><calcite-dialog class="classification-favorite-dialog" overlay-positioning=fixed .heading=${this.messages.addFavoriteDialogHeading} .open=${this.showSaveClassificationDialog} modal placement=center scale=m outside-close-disabled @calciteDialogClose=${()=>this.showSaveClassificationDialog=!1}><calcite-label class="classification-favorite-input-section">${this.messages.addClassificationFavorite}<calcite-input id=classification-favorite-name name=classification-favorite-name scale=m .value=${this.newFavoriteClassificationName} @calciteInputInput=${this.changeFavoriteClassificationName} .status=${!this.newFavoriteClassificationName||this.hasDuplicatedClassificationError?"invalid":"idle"} validation-icon=exclamation-mark-triangle .validationMessage=${this.getValidationMessage()}></calcite-input></calcite-label><calcite-button scale=l slot=footer-end @click=${this.saveNewFavoriteClassification}>${this.messages.favoriteClassificationBtnDone}</calcite-button></calcite-dialog></div>`}};r("arcgis-portal-classification-favorite",l);return l},a,b)
@@ -0,0 +1,134 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"./YIMNOUTF.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,99 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"./YIMNOUTF.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,34 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"./YIMNOUTF.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};
@@ -0,0 +1,22 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"./YIMNOUTF.js";var e=`## Membership Bind Parameters
3
+
4
+ The current link chart 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
+ If, and ONLY if, the user is asking for data to be limited by the records already on 'the current link chart', 'my link chart', or similar, the generated Cypher should filter using these parameters.
10
+
11
+ ### START EXAMPLES
12
+
13
+ User request: 'Add all records that are connected to people on this link chart to the link chart'
14
+ Context: 'Person' entity in data model.
15
+ Expected Result: MATCH (n:Person)-[r]->(m) WHERE id(n) IN $entityIds return r, m
16
+
17
+ User request: 'Add all the suppliers to the link chart'
18
+ Context: 'Supplier' entity in the data model.
19
+ Expected Result: MATCH (s:Supplier) RETURN s
20
+
21
+ ### END EXAMPLES
22
+ `;export{e as default};