@arcgis/portal-components 5.2.0-next.1 → 5.2.0-next.10
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/{AQWTJKUH.js → 3MQIRMUM.js} +9 -7
- package/dist/cdn/{CI5ENGVT.js → 462NPCQK.js} +1 -1
- package/dist/cdn/{G47ZZQYL.js → 46Q4UJRT.js} +1 -1
- package/dist/cdn/{N6G6Z7BF.js → 546F7RE5.js} +67 -67
- package/dist/cdn/{K3HS2LQ7.js → 5ZNQZDQO.js} +1 -1
- package/dist/cdn/{5DPWJ7DI.js → BEX567FX.js} +1 -1
- package/dist/cdn/BLB544VG.js +3 -0
- package/dist/cdn/{OQDPULPD.js → C4D4PGO3.js} +1 -1
- package/dist/cdn/DFTUMKSN.js +3 -0
- package/dist/cdn/E7DG4PTT.js +2 -0
- package/dist/cdn/{GNOZCQ34.js → IHKNWGHP.js} +1 -1
- package/dist/cdn/{LQ3DMZ3K.js → L46YEW4Y.js} +1 -1
- package/dist/cdn/{TMYTUOSS.js → OLRMKR7F.js} +1 -1
- package/dist/cdn/QB34ACZ2.js +2 -0
- package/dist/cdn/{YMPTDKT6.js → RXSGAKUU.js} +1 -1
- package/dist/cdn/{GHQ3ZW4U.js → SBMN77ZZ.js} +1 -1
- package/dist/cdn/SIN2A4UX.js +65 -0
- package/dist/cdn/{YG5YYL6X.js → SJC3537M.js} +1 -1
- package/dist/cdn/{BEHLBKKM.js → SV2O3ZZ7.js} +1 -1
- package/dist/cdn/T7NAWRYB.js +2 -0
- package/dist/cdn/UFM62DQ3.js +2 -0
- package/dist/cdn/{2UUZHENH.js → UPEVTVNZ.js} +1 -1
- package/dist/cdn/{JNRN6DTV.js → XHASDTZ3.js} +1 -1
- 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-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/user2.js +26 -25
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +2 -2
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +10 -10
- package/dist/components/arcgis-portal-group-badges/customElement.d.ts +102 -0
- package/dist/components/arcgis-portal-group-badges/customElement.js +58 -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 +187 -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-replacement-item-redirect/customElement.js +3 -3
- package/dist/components/arcgis-portal-user-popup/customElement.d.ts +111 -0
- package/dist/components/arcgis-portal-user-popup/customElement.js +231 -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/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 +30 -2
- package/dist/loader.js +7 -3
- package/dist/types/lumina.d.ts +25 -0
- package/dist/types/preact.d.ts +29 -0
- package/dist/types/react.d.ts +33 -0
- package/dist/types/stencil.d.ts +25 -0
- package/dist/types/tracking.d.ts +10 -0
- package/dist/types/user.d.ts +2 -2
- package/package.json +7 -7
- package/dist/cdn/KEKBRUUC.js +0 -2
- package/dist/cdn/SM4GWLRA.js +0 -66
|
@@ -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
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./UPEVTVNZ.js";import a from"./RNLVNDGG.js";import"./5VSDGPHH.js";import{c as R}from"./T7NAWRYB.js";import{A as M,B as S,E,H as P,I as g,J as D,K as v,P as L,h as k,j as d,l as A,v as u}from"./DHHSKOUY.js";import"./YIMNOUTF.js";export default $arcgis.t(([{a:O,c:U},{a:x,d:_}])=>{var F=(a,e=100)=>{let s;return(...n)=>{let i=()=>{clearTimeout(s),a(...n)};clearTimeout(s),s=setTimeout(i,e)}};var q=M(class extends S{constructor(){super(...arguments),this.key=A}render(a,e){return this.key=a,e}update(a,[e,s]){return e!==this.key&&(E(a),this.key=e),s}});var y=["@","#","$"],V=400;function Q(a,e){let s=null;for(let n of e){let i=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),r=new RegExp(`${i}"([^"\\n]*)"?$`,"u"),t=a.match(r);if(t){let c=t[0],l=a.length-c.length,h=t[1]??"";(!s||l>s.startIndex)&&(s={starter:n,mentionText:c,query:h,startIndex:l})}let o=new RegExp(`${i}[\\p{L}\\p{N}_-]+$`,"u"),m=a.match(o);if(m){let c=m[0],l=a.length-c.length,h=c.slice(n.length);(!s||l>s.startIndex)&&(s={starter:n,mentionText:c,query:h,startIndex:l})}}return s}var N=a=>y.includes(a)?a:"@",G=R(a=>{let e=[],s=async r=>await x({requester:async()=>await O(a.portal,r,{num:3}),key:"items",id:r}),n=async r=>await x({requester:async()=>await U(a.portal,{query:`title:${r}`,num:3}),key:"groups",id:r}),i=F(async(r,t)=>{a.isFetchingEntities=!0;let o=r.toLowerCase();switch(N(t)){case"@":let m=10;a.filteredItemsInfo={type:"user",items:e.filter(h=>h.username?.toLowerCase().includes(o)||h.fullName?.toLowerCase().includes(o)).slice(0,m)};break;case"#":let{result:c}=await s(o);a.filteredItemsInfo={type:"item",items:c?.results??[]};break;case"$":let{results:l}=await n(o);a.filteredItemsInfo={type:"group",items:l};break}(a.filteredItemsInfo?.items?.length??0)===0&&await a.closePopover(),a.isFetchingEntities=!1},V);return{fetchUsers:async()=>{try{let{users:r}=await _(a.portal);e=r??[]}catch(r){e=[],console.error("error fetching org users:",r)}},filterItems:i,getItemText:(r,t)=>{let o="";switch(N(t)){case"@":o=r.username;break;case"#":o=r.title??"";break;case"$":o=r.title??"";break}return o.trim()}}}),$=({id:a,label:e,selected:s,description:n,contentStart:i,onSelect:r})=>q(a,d`<calcite-list-item class=${v({selected:s})} .label=${e} .description=${n} .selected=${s} @pointerdown=${async t=>{t.preventDefault(),t.stopPropagation(),await r()}} ${g(t=>{s&&t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})})}>${i}</calcite-list-item>`),j=k`.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 D{constructor(){super(...arguments),this.calciteTextAreaRef=P(),this.mentionableEntityController=G(this),this.handleInput=e=>{let{bubbleNewValueChange:s,checkForMention:n}=this,i=e.target.value;this._value=i,s(this._value);let r=this.nativeTextAreaRef?.selectionStart??0;n(i,r)},this.handleKeyDown=e=>{if(!this.popoverOpen){this.arcgisUserMentionableTextAreaKeyDown.emit(e),this.arcgisMentionableTextAreaKeyDown.emit(e);return}switch(e.key){case"ArrowDown":e.preventDefault(),this.selectedItemIndex=Math.min(this.selectedItemIndex+1,this.filteredItems.length-1);break;case"ArrowUp":e.preventDefault(),this.selectedItemIndex=Math.max(this.selectedItemIndex-1,0);break;case"Enter":e.preventDefault(),this.selectItem(this.filteredItems[this.selectedItemIndex]);break;case"Escape":e.preventDefault(),this.closePopover.bind(this)();break}},this.handleClosePopover=()=>{this.popoverOpen=!1,this.currentMentionQuery="",this.selectedItemIndex=0,this.currentStarter=null},this.bubbleNewValueChange=e=>{this.arcgisUserMentionableTextAreaChange.emit(e),this.arcgisMentionableTextAreaChange.emit(e)},this.checkForMention=(e,s)=>{let n=e.substring(0,s),i=Q(n,this.starters??y);if(i){let{starter:r}=i;this.currentStarter=r,this.filterMentionItems(i),this.popoverOpen=!0;return}this.handleClosePopover()},this.filterMentionItems=e=>{let{mentionText:s,query:n,starter:i,startIndex:r}=e;this.currentMentionQuery=s,this.mentionStartPosition=r;let t=n.toLowerCase();this.mentionableEntityController.filterItems(t,i),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:e,selectedItemIndex:s,portal:n}=this;if(!e)return null;let{items:i,type:r}=e;switch(r){case"user":return i.map((t,o)=>$({id:t.id,label:`@${t.username}`,description:t.fullName,selected:o===s,contentStart:d`<arcgis-portal-user-avatar slot=content-start .user=${t} .portal=${n} scale=m></arcgis-portal-user-avatar>`,onSelect:async()=>await this.selectItem(t)}));case"item":return i.map((t,o)=>$({id:t.id??`item-${o}`,label:`#${t.title}`,description:t.id??void 0,selected:o===s,onSelect:async()=>await this.selectItem(t),contentStart:d`<calcite-avatar slot=content-start .fullName=${t.title??void 0} .thumbnail=${t.thumbnailUrl??void 0} scale=m></calcite-avatar>`}));case"group":return i.map((t,o)=>$({id:t.id??`group-${o}`,label:`${t.title}`,description:t.id??void 0,selected:o===s,onSelect:async()=>await this.selectItem(t),contentStart:d`<calcite-avatar slot=content-start .fullName=${t.title??void 0} .thumbnail=${t.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=j}get filteredItems(){return this.filteredItemsInfo?.items??[]}async closePopover(){this.handleClosePopover()}async focusTextArea(){await this.calciteTextAreaRef.value?.setFocus()}async selectItem(e){let{currentStarter:s,_value:n,mentionStartPosition:i,currentMentionQuery:r,handleClosePopover:t,calciteTextAreaRef:o,nativeTextAreaRef:m,bubbleNewValueChange:c}=this;if(!e||!s)return;let l=this.mentionableEntityController.getItemText(e,s).replaceAll('"',"").trim(),h=/\s/u.test(l)?`${s}"${l}"`:`${s}${l}`,f=(n??"").substring(0,i),p=(n??"").substring(i+r.length),I=`${f}${h} ${p}`;this._value=I,c(this._value);let b=i+h.length+1;t(),await this.updateComplete,o.value?.setFocus(),m&&(m.selectionEnd=b)}willUpdate(e){e.has("value")&&(this._value=this.value??""),e.has("selectedItemIndex")&&this.arcgisMentionableSelectedIndexChange.emit(this.selectedItemIndex)}loaded(){this.updateComplete.then(()=>{let e=this.calciteTextAreaRef.value?.shadowRoot?.querySelector("textarea");e&&(this.nativeTextAreaRef=e)}),this.mentionableEntityController.fetchUsers()}render(){let{popoverPlacement:e,scale:s,_value:n,maxLength:i,rows:r,placeholder:t,readOnly:o,popoverOpen:m,closePopover:c,handleInput:l,handleKeyDown:h,disabled:f,isFetchingEntities:p,filteredItemsInfo:I,renderItemInfo:b,popoverListLabel:T}=this,C=this.calciteTextAreaRef.value,K=I?.items??[];return d`<calcite-text-area .placeholder=${t} .value=${n} .maxLength=${i} .rows=${r} .scale=${s} .readOnly=${o} .disabled=${f} @blur=${c} @calciteTextAreaInput=${l} @keydown=${h} ${g(this.calciteTextAreaRef)}></calcite-text-area>${C&&d`<calcite-popover .open=${m} .placement=${e} class="mention-popover" .label=${T} .referenceElement=${C} 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>`||""}${K.length>0&&d`<calcite-list .label=${T}>${b()}</calcite-list>`||""}</div></calcite-popover>`||""}`}};L("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 m}from"./LAFNDBTQ.js";import{a as h}from"./
|
|
2
|
+
import{a as m}from"./LAFNDBTQ.js";import{a as h}from"./L46YEW4Y.js";import"./T7NAWRYB.js";import{J as b,M as a,P as d,h as c,j as i,v as u}from"./DHHSKOUY.js";import"./YIMNOUTF.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};
|