@arcgis/common-components 5.2.0-next.17 → 5.2.0-next.19
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/33FWZXZF.js +2 -0
- package/dist/cdn/{5U5NQ3F5.js → 5URV6773.js} +1 -1
- package/dist/cdn/GTW54IOJ.js +2 -0
- package/dist/cdn/{3V5M7OHL.js → V5SIP2PW.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-utils.js +46 -38
- package/dist/components/arcgis-ckeditor5/customElement.d.ts +6 -1
- package/dist/components/arcgis-ckeditor5/customElement.js +1 -1
- package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +6 -1
- package/dist/components/arcgis-field-info/customElement.js +129 -129
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +3 -3
- package/dist/cdn/4BJYJUMR.js +0 -2
- package/dist/cdn/MCH3WQ4X.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
function t(n,r){return n!=null&&typeof n=="object"&&"type"in n&&n.type===r}function e(n){return t(n,"annotation-feature")}function a(n){return t(n,"csv")}function o(n){return t(n,"dimension-feature")}function s(n){return u(n)&&!n.url}function u(n){return t(n,"feature")}function i(n){return t(n,"geojson")}function f(n){return t(n,"imagery")}function c(n){return t(n,"imagery-tile")}function p(n){return t(n,"map-image")}function y(n){return t(n,"ogc-feature")}function l(n){return t(n,"scene")}function b(n){return t(n,"stream")}function g(n){return t(n,"sublayer")&&"parent"in n}function m(n){return t(n,"subtype-group")&&"sublayers"in n}function j(n){return t(n,"subtype-sublayer")}function d(n){return t(n,"voxel")}function v(n){return t(n,"wcs")}function w(n){return t(n,"wfs")}export{e as a,a as b,o as c,s as d,u as e,i as f,f as g,c as h,p as i,y as j,l as k,b as l,g as m,m as n,j as o,d as p,v as q,w as r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{c as $,e as D,l as S,m as T}from"./4BJYJUMR.js";import{a as M,b as p,c as E}from"./JLPZ3OR2.js";import{a as A}from"./N7C4DINF.js";import"./WLYFLEI6.js";import"./IUJ4ILLQ.js";import{a as z}from"./5KS7T5BY.js";import{B,C as x,D as C,J as _,h as R,j as q,n as N,o as F,s as I}from"./AFBKMYU6.js";export default $arcgis.t(([{formatDate:Z,convertDateFormatToIntlOptions:y,formatDateOnly:te,formatTimeOnly:ie,formatTimestamp:W,formatNumber:se},ne,{clone:L}])=>{function P(i){return new Date(`1970-01-01T${i}Z`).getTime()}function H(i){return new Date(`${i} 00:00:00`).getTime()}function ae(i,e,s){let t;return e==="unknown"?t=Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=Z(i,{...y("short-date-short-time"),timeZone:e}),t}function oe(i){return i?te(i,y("short-date")):""}function le(i){let e;return typeof i=="string"?e=ie(i,y("short-date-long-time")):e=Z(i,{...y("long-time"),timeZone:"utc"}),e}function re(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?W(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):W(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):Z(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function j(i,e,s){if(!$(i)&&!T(i)&&!S(i)&&!D(i))return;let t;return E(i,s).fields.forEach(l=>{let n=l.name,d="domain"in l?l.domain:void 0;if(!D(i)&&i.subtypeField===n){let m;S(i)||$(i)?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{T(i)&&i.subtypeCode!==r.code||(e.name===n&&(t=t||[],t.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(a=>{if(e.name===a){let o=r.domains[a];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push({code:u.code,name:u.name})})}}))})}if(e.name===n&&($(i)||D(i))){let m=$(i)?i.typeIdField:void 0,r=$(i)?i.types:void 0;$(i)&&m&&r?(m===n?t=r.map(a=>({code:a.id,name:a.name})):(t=t||[],r.forEach(a=>{if(!a.domains?.[n]||a.domains[n].type==="inherited"){let o=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push(L(u))})}else a.domains?.[n]?.codedValues&&a.domains[n].codedValues.forEach(o=>{let u=!1;t.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||t.push(L(o))})})),!t?.length&&d?.codedValues&&(t=L(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function U(i,e){let s=e;if(s){let t="";for(let l=0;l<s.length;l++){let n=s[l];n.code==i&&(t+=(t.length?" | ":"")+n.name)}return t.length||(t=`${i}`),t}return i}function G(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function J(i){switch(i.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"blob":case"geometry":case"global-id":case"guid":case"oid":case"raster":case"xml":return;default:return i.type}}var ue=R`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`,k=class extends C{constructor(){super(...arguments),this.dropdownNode=B(),this._messages=A({blocking:!0}),this._propWatcherTask=new M(this,{task:async([e,s,t])=>{let l=p(e)&&p(s)||p(t);if(!p(t)&&!p(e)&&!p(s)?N("error",this,F("uniqueValues")):p(t)||(p(e)||N("error",this,F("layer")),p(s)||N("error",this,F("fieldName"))),p(e)&&p(s)){let{visualizationSource:n}=this;if(!E(e,n).fields?.filter(d=>d.name===s))throw N("error",this,"Field could not be found."),new Error}if(!l)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=I(),this.arcgisSortByChange=I(),this.arcgisLoad=I()}static{this.properties={initialRender:16,view:0,layer:0,visualizationSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ue}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(p(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:t}=e;return{uniqueValues:s,partialUniqueValues:t}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,n=(e?E(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(p(this.uniqueValues))this.fieldInfo={layerField:n,fieldDomains:e&&n?j(e,n,l):void 0,simpleType:e&&n?J(n):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&n){this.fieldInfo={layerField:n,fieldDomains:j(e,n,l),simpleType:J(n),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ne({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=G(n),a=m.uniqueValueInfos.filter(o=>p(o.value)?n.type==="string"&&!r||n.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(G(n)||n.type,o.value!=="<Null>"&&o.value!==""):!1);a.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{a.find(u=>u.value===o.code)||a.push({value:o.code,count:0})}),d.uniqueValueInfos=a,d.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(m){if(N("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(d)){let r=[];d.fieldDomains.forEach(a=>{r.find(o=>o.value===a.code)||r.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:s}=this;this.listNode=e,s&&e?.setAttribute("style",`max-height: ${s||400}px`)}onSortMenuSelect(e){let s=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=s||void 0,this.arcgisSortByChange.emit(s||void 0)}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==s[t])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:t,multiple:l,initialRender:n,showFilterLength:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:a,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!a?.length)return"";let g=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,K=c?["date","date-only","time-only"].includes(c):!1,Q=v=>{v.sort((h,f)=>h.count<=f.count?1:-1)},X=v=>{let h=r?.length;v.sort((f,V)=>{if(!h&&g)return(typeof f.value=="string"?Number.parseFloat(f.value):f.value)-(typeof V.value=="string"?Number.parseFloat(V.value):V.value);{let w=h?U(f.value,r):f.label??f.value,b=h?U(V.value,r):V.label??V.value;return`${w}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${w}`.localeCompare(`${b}`)}})},Y=(v,h)=>{v.sort((f,V)=>{let w=h?.indexOf(f.value)??-1,b=h?.indexOf(V.value)??-1;return w===b||w>-1&&b>-1?0:w>b?-1:1})};X(a),!t||t==="count"?Q(a):t==="selected"&&Y(a,s);let ee=a.map(v=>this.renderUniqueValue(v)),O;return o&&!n&&(O=q`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),q`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${a.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${v=>{let h=v.target.selectedItems.map(f=>f.value);!r&&c==="date-only"?h=h?.map(f=>H(f)):!r&&c==="time-only"?h=h?.map(f=>P(f)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(f=>Number.parseInt(f)):c&&["single","double"].includes(c)&&(h=h?.map(f=>Number.parseFloat(f))),!this.isSameLists(h,this.selectedValues)&&(this.selectedValues=h,this.arcgisChange.emit(h))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${x(this.setListRef)}>${a.length>=d&&!n?this.renderSort(g,K):null}${ee}</calcite-list>${O}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return q`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${x(this.dropdownNode)}><calcite-action slot=trigger .label=${l.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t==="count"||!p(t)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:t,view:l,fieldInfo:n,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:a}=n,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?U(e.value,m):a==="date"?ae(e.value,o):a==="date-only"?oe(e.value):a==="time-only"?le(e.value):a==="timestamp-offset"?re(e.value,l):typeof e.value=="number"?se(e.value,d):e.label??e.value,c=s?a==="date-only"?s.includes(m?.length?e.value:H(e.value)):a==="time-only"?s.includes(m?.length?e.value:P(e.value)):s.includes(e.value):!1;return z(`list-item_${e.value}`,q`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${p(e.count)&&(r.length>200&&!t||r.length<=200)?q`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};_("arcgis-unique-values-list",k);return k},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
2
|
+
import{e as $,g as D,n as S,o as T}from"./33FWZXZF.js";import{a as M,b as p,c as E}from"./JLPZ3OR2.js";import{a as A}from"./N7C4DINF.js";import"./WLYFLEI6.js";import"./IUJ4ILLQ.js";import{a as z}from"./5KS7T5BY.js";import{B,C as x,D as C,J as _,h as R,j as q,n as N,o as F,s as I}from"./AFBKMYU6.js";export default $arcgis.t(([{formatDate:Z,convertDateFormatToIntlOptions:y,formatDateOnly:te,formatTimeOnly:ie,formatTimestamp:W,formatNumber:se},ne,{clone:L}])=>{function P(i){return new Date(`1970-01-01T${i}Z`).getTime()}function H(i){return new Date(`${i} 00:00:00`).getTime()}function ae(i,e,s){let t;return e==="unknown"?t=Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=Z(i,{...y("short-date-short-time"),timeZone:e}),t}function oe(i){return i?te(i,y("short-date")):""}function le(i){let e;return typeof i=="string"?e=ie(i,y("short-date-long-time")):e=Z(i,{...y("long-time"),timeZone:"utc"}),e}function re(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?W(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):W(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):Z(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function j(i,e,s){if(!$(i)&&!T(i)&&!S(i)&&!D(i))return;let t;return E(i,s).fields.forEach(l=>{let n=l.name,d="domain"in l?l.domain:void 0;if(!D(i)&&i.subtypeField===n){let m;S(i)||$(i)?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{T(i)&&i.subtypeCode!==r.code||(e.name===n&&(t=t||[],t.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(a=>{if(e.name===a){let o=r.domains[a];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push({code:u.code,name:u.name})})}}))})}if(e.name===n&&($(i)||D(i))){let m=$(i)?i.typeIdField:void 0,r=$(i)?i.types:void 0;$(i)&&m&&r?(m===n?t=r.map(a=>({code:a.id,name:a.name})):(t=t||[],r.forEach(a=>{if(!a.domains?.[n]||a.domains[n].type==="inherited"){let o=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push(L(u))})}else a.domains?.[n]?.codedValues&&a.domains[n].codedValues.forEach(o=>{let u=!1;t.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||t.push(L(o))})})),!t?.length&&d?.codedValues&&(t=L(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function U(i,e){let s=e;if(s){let t="";for(let l=0;l<s.length;l++){let n=s[l];n.code==i&&(t+=(t.length?" | ":"")+n.name)}return t.length||(t=`${i}`),t}return i}function G(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function J(i){switch(i.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"blob":case"geometry":case"global-id":case"guid":case"oid":case"raster":case"xml":return;default:return i.type}}var ue=R`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`,k=class extends C{constructor(){super(...arguments),this.dropdownNode=B(),this._messages=A({blocking:!0}),this._propWatcherTask=new M(this,{task:async([e,s,t])=>{let l=p(e)&&p(s)||p(t);if(!p(t)&&!p(e)&&!p(s)?N("error",this,F("uniqueValues")):p(t)||(p(e)||N("error",this,F("layer")),p(s)||N("error",this,F("fieldName"))),p(e)&&p(s)){let{visualizationSource:n}=this;if(!E(e,n).fields?.filter(d=>d.name===s))throw N("error",this,"Field could not be found."),new Error}if(!l)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=I(),this.arcgisSortByChange=I(),this.arcgisLoad=I()}static{this.properties={initialRender:16,view:0,layer:0,visualizationSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ue}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(p(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:t}=e;return{uniqueValues:s,partialUniqueValues:t}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,n=(e?E(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(p(this.uniqueValues))this.fieldInfo={layerField:n,fieldDomains:e&&n?j(e,n,l):void 0,simpleType:e&&n?J(n):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&n){this.fieldInfo={layerField:n,fieldDomains:j(e,n,l),simpleType:J(n),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ne({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=G(n),a=m.uniqueValueInfos.filter(o=>p(o.value)?n.type==="string"&&!r||n.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(G(n)||n.type,o.value!=="<Null>"&&o.value!==""):!1);a.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{a.find(u=>u.value===o.code)||a.push({value:o.code,count:0})}),d.uniqueValueInfos=a,d.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(m){if(N("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(d)){let r=[];d.fieldDomains.forEach(a=>{r.find(o=>o.value===a.code)||r.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:s}=this;this.listNode=e,s&&e?.setAttribute("style",`max-height: ${s||400}px`)}onSortMenuSelect(e){let s=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=s||void 0,this.arcgisSortByChange.emit(s||void 0)}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==s[t])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:t,multiple:l,initialRender:n,showFilterLength:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:a,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!a?.length)return"";let g=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,K=c?["date","date-only","time-only"].includes(c):!1,Q=v=>{v.sort((h,f)=>h.count<=f.count?1:-1)},X=v=>{let h=r?.length;v.sort((f,V)=>{if(!h&&g)return(typeof f.value=="string"?Number.parseFloat(f.value):f.value)-(typeof V.value=="string"?Number.parseFloat(V.value):V.value);{let w=h?U(f.value,r):f.label??f.value,b=h?U(V.value,r):V.label??V.value;return`${w}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${w}`.localeCompare(`${b}`)}})},Y=(v,h)=>{v.sort((f,V)=>{let w=h?.indexOf(f.value)??-1,b=h?.indexOf(V.value)??-1;return w===b||w>-1&&b>-1?0:w>b?-1:1})};X(a),!t||t==="count"?Q(a):t==="selected"&&Y(a,s);let ee=a.map(v=>this.renderUniqueValue(v)),O;return o&&!n&&(O=q`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),q`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${a.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${v=>{let h=v.target.selectedItems.map(f=>f.value);!r&&c==="date-only"?h=h?.map(f=>H(f)):!r&&c==="time-only"?h=h?.map(f=>P(f)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(f=>Number.parseInt(f)):c&&["single","double"].includes(c)&&(h=h?.map(f=>Number.parseFloat(f))),!this.isSameLists(h,this.selectedValues)&&(this.selectedValues=h,this.arcgisChange.emit(h))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${x(this.setListRef)}>${a.length>=d&&!n?this.renderSort(g,K):null}${ee}</calcite-list>${O}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return q`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${x(this.dropdownNode)}><calcite-action slot=trigger .label=${l.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t==="count"||!p(t)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:t,view:l,fieldInfo:n,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:a}=n,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?U(e.value,m):a==="date"?ae(e.value,o):a==="date-only"?oe(e.value):a==="time-only"?le(e.value):a==="timestamp-offset"?re(e.value,l):typeof e.value=="number"?se(e.value,d):e.label??e.value,c=s?a==="date-only"?s.includes(m?.length?e.value:H(e.value)):a==="time-only"?s.includes(m?.length?e.value:P(e.value)):s.includes(e.value):!1;return z(`list-item_${e.value}`,q`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${p(e.count)&&(r.length>200&&!t||r.length<=200)?q`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};_("arcgis-unique-values-list",k);return k},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as x,b as j,c as k,d as E,e as v,f as z,g as $,h as y,i as B,j as N,k as R,l as F,m as K,n as X,o as L,p as S,q as w,r as A}from"./33FWZXZF.js";import{a as J,b as p}from"./JLPZ3OR2.js";import{a as Q}from"./N7C4DINF.js";import"./WLYFLEI6.js";import"./IUJ4ILLQ.js";import{a as V}from"./5KS7T5BY.js";import{C as q,D as H,E as b,J as U,h as W,j as c,n as O,o as D,s as C}from"./AFBKMYU6.js";export default $arcgis.t(([te,_,f,M,I,ie,se,ae])=>{function re(r){return r.associatedLayer?.url}var ne={dateStyle:"short",timeStyle:"short"},oe={timeStyle:"medium"};function le(r){let{layer:e,fieldName:t}=r,i,s=M.supportsFieldConfiguration(e),n;"popupTemplate"in e&&(n=e.popupTemplate);let a=n?n.fieldInfos:[];return ee(r)?.filter(o=>o.name===t).forEach(o=>{let d=!s&&a?a.filter(m=>m.fieldName===o.name):void 0,u=s?e.getFieldAlias(t):d?.length?d[0].label:o.alias;/^raster.(item|service)pixelvalue/iu.test(t)&&(o.type="double");let l={layerField:o,label:u||o.name};l.codedValues=me(t,r),ce(l),l.simpleFieldType&&(i=l)}),i}function ee(r){let{layer:e}=r;return y(e)||w(e)||$(e)&&e.rasterFields.length?e.rasterFields:e.fields}async function Y(r){r.statisticsStatus="in-progress";let{layer:e,view:t}=r;if(y(e)||w(e)||F(e)||S(e))throw new Error("could not get feature count");try{return await fe(e,t)}catch{return}}async function de(r){let{layer:e,view:t,fieldName:i,fieldInfo:s}=r;if(y(e)||w(e)||S(e))throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");if(!s||s.layerField.type==="oid"||s.layerField.type==="guid"||s.layerField.type==="global-id")return{totalCount:await Y(r),nullcount:0};try{let n=await ie({layer:e,view:t,field:i,outStatisticTypes:{exclude:["median"]}});if(!p(n.count))throw new Error("could not get statistics");let a="sourceJSON"in e&&e.sourceJSON.maxRecordCount===n.count;if(p(n.nullcount)&&!a)return{...n,totalCount:n.count+n.nullcount};{let o=await Y(r);return{...n,totalCount:o}}}catch{throw new Error("could not get statistics")}}async function ue(r){let{layer:e,view:t,fieldName:i}=r;if(y(e)||w(e)||S(e))throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");E(e)&&(e.outFields=["*"]);try{return await se({layer:e,view:t,field:i})}catch{throw new Error("could not get unique values")}}function ce(r){switch(r.layerField.type){case"string":r.simpleFieldType="string";break;case"date":r.simpleFieldType="date";break;case"timestamp-offset":r.simpleFieldType="timestamp-offset";break;case"date-only":r.simpleFieldType="date-only";break;case"time-only":r.simpleFieldType="time-only";break;case"oid":r.simpleFieldType="oid";break;case"guid":case"global-id":r.simpleFieldType="guid";break;case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":r.simpleFieldType="number";break}}function me(r,e){let{layer:t}=e;if(L(t)&&t.subtypeField===r){let d=t.parent?.subtypes?.find(u=>u.code===t.subtypeCode);if(d)return[{code:d.code,name:d.name}]}if(!v(t)&&!$(t))return;let i=v(t)?t.typeIdField:void 0,s=v(t)?t.types:void 0,n,a=ee(e)?.find(d=>d.name===r),o=a?.domain;return v(t)&&i&&s?(i===r?n=s.map(d=>({code:d.id,name:d.name})):(n=[],s.forEach(d=>{if(!d.domains[r]||d.domains[r].type==="inherited"){let u=o;u?.codedValues&&u.codedValues.forEach(l=>{let m=!1;n.forEach(h=>{h.code===l.code&&(m=!0,`, ${h.name},`.includes(`, ${l.name},`)||(h.name+=`, ${l.name}`))}),m||n.push(I.clone(l))})}else d.domains[r].codedValues&&d.domains[r].codedValues.forEach(u=>{let l=!1;n.forEach(m=>{m.code===u.code&&(l=!0,`, ${m.name},`.includes(`, ${u.name},`)||(m.name+=`, ${u.name}`))}),l||n.push(I.clone(u))})})),!n.length&&o?.codedValues&&(n=I.clone(o.codedValues))):o?.codedValues&&(n=a.domain.codedValues),n?.length?n:void 0}async function pe(r){let{view:e,layer:t}=r;if($(t)||y(t)||w(t))throw new Error("could not get feature");if(v(t)&&!t.url||A(t)){let i=t.createQuery();i.start=0,i.num=5,i.outFields=["*"];let s=await t.queryFeatures(i);if(s.features.length)return s;throw new Error("could not get feature")}else{if(!e)return await Z(r);let i;if(L(t)||K(t)){let s=t.parent;for(;X(s)||B(s);)s=s.parent;i=await e.whenLayerView(s)}else i=await e.whenLayerView(t);if(i.availableFields.length===t.fields.length||(F(t)||N(t))&&i.availableFields.length>0){let s=i.createQuery();s.start=0,s.num=5,s.outFields=["*"];let n=await i.queryFeatures(s);return n.features?.length?n:await Z(r)}else return await Z(r)}}async function Z(r){let{layer:e}=r;if($(e)||y(e)||F(e)||N(e))throw new Error("cannot get feature from service");let t=new ae({where:"1=1",outFields:["*"],returnGeometry:!1});return"sourceJSON"in e&&e.sourceJSON?.advancedQueryCapabilities?.supportsPagination&&(t.num=1),await e.queryFeatures(t)}async function fe(r,e){if(E(r))return await ge(r);if(v(r)||j(r)||R(r)||A(r)||z(r))return await r.queryFeatureCount();if(e&&(F(r)||N(r)))return await he(r,e)}async function ge(r){let e=r.createQuery();e.outFields=["*"];let t=await r.queryFeatures(e);if(t.features.length)return t.features.length;throw new Error("could not get feature count")}async function he(r,e){return await(await e.whenLayerView(r)).queryFeatureCount()}var ve=W`:host{height:100%}.container{padding:var(--calcite-space-xs);background-color:var(--calcite-color-foreground-1)}.title{font-weight:700;padding:5px 0}.missing,.data{color:#a9a9a9}.count{white-space:nowrap}.section{padding:var(--calcite-space-xs) 0}.statistics-row{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);padding:var(--calcite-space-xs) 0;display:flex;justify-content:space-between}.statistics-row-top-values{border-top:var(--calcite-border-width-sm) solid var(--calctie-color-border-2);padding:20px 0 var(--calcite-space-xs) 0;display:flex;justify-content:space-between}`,P=class extends H{constructor(){super(...arguments),this._messages=Q({blocking:!0}),this._propWatcherTask=new J(this,{task:async([e,t])=>{let i=p(e)&&p(t);if(p(e)||O("error",this,D("layer")),p(t)||O("error",this,D("fieldName")),!i)throw new Error;await this.processProps(),this._propWatcherTask.autoRun=!1},args:()=>[this.layer,this.fieldName]}),this.oneFeatureResponseStatus="missing",this.statisticsStatus="missing",this.uniqueValuesStatus="missing",this.hideAlias=!1,this.hideNumericFormat=!1,this.hideStatistics=!1,this.arcgisComplete=C(),this.arcgisFieldInfoComplete=C()}static{this.properties={oneFeatureResponseStatus:16,oneFeatureResponse:16,statisticsStatus:16,statistics:16,uniqueValuesStatus:16,uniqueValues:16,view:0,layer:0,fieldName:1,hideAlias:5,hideNumericFormat:5,hideStatistics:5}}static{this.styles=ve}async refresh(){await this.processProps(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),this.timeZoneHandle?.remove()}async processProps(){let{view:e,layer:t,fieldName:i,hideStatistics:s}=this;if(!t||!i)return;let n;if(t.declaredClass==="esri.layers.support.Sublayer"){let a=t;e&&await _.whenOnce(()=>!e.updating),n=await a.createFeatureLayer(),await n?.load()}this.props={view:e,layer:n??t,fieldName:i,hideStatistics:s},this.props.fieldInfo=le(this.props),R(t)&&te.request.interceptors?.push({urls:`${re(t)}/${t.layerId}`,before(a){a.requestOptions.authMode="no-prompt"}}),this.oneFeatureResponseStatus="in-progress";try{let a=await pe(this.props);this.oneFeatureResponse=a,this.oneFeatureResponseStatus="success"}catch{this.oneFeatureResponseStatus="failed"}if(F(t)||x(t)||k(t)){this.uniqueValuesStatus="failed",this.statisticsStatus="failed";return}if(s)this.uniqueValuesStatus="failed";else{this.uniqueValuesStatus="in-progress";try{let a=await ue(this.props);this.uniqueValues=a,a?.uniqueValueInfos?.length?this.uniqueValuesStatus="success":this.uniqueValuesStatus="failed"}catch{this.uniqueValuesStatus="failed"}}if(s)this.statisticsStatus="failed";else{this.statisticsStatus="in-progress";try{let a=await de(this.props);if(!p(a.totalCount)&&p(a.count)&&this.uniqueValuesStatus==="success"){let o=this.uniqueValues?.uniqueValueInfos??[];for(let d=0;d<o.length;d++){let u=o[d];if(u.value===null){a.totalCount=u.count+a.count;break}}a.totalCount??=a.count}this.statistics=a,this.statisticsStatus="success"}catch{this.statisticsStatus="failed"}}this.setUpTimeZoneHandle()}setUpTimeZoneHandle(){this.timeZoneHandle?.remove();let{props:e}=this,{view:t,fieldInfo:i}=e;["date","timestamp-offset"].includes(this._getStatisticsType(i))&&(this.timeZoneHandle=_.watch(()=>t?.timeZone,()=>{this.requestUpdate()}))}_getFieldTypeLabel(e){let{_messages:t}=this,i=t.fieldTypes;switch(e){case"big-integer":return i.bigInteger;case"date":return i.date;case"date-only":return i.dateOnly;case"double":return i.double;case"global-id":return i.globalId;case"guid":return i.guid;case"integer":return i.integer;case"long":return i.long;case"oid":return i.oid;case"single":return i.single;case"small-integer":return i.smallInteger;case"string":return i.string;case"time-only":return i.timeOnly;case"timestamp-offset":return i.timestampOffset;default:return i.string}}_getStatisticsType(e){switch(e.layerField.type){case"big-integer":case"double":case"integer":case"single":case"small-integer":{if(e.codedValues)return"string";switch(e.layerField.valueType){case"url":case"binary":case"description":case"location-or-place-name":case"name-or-title":case"ordered-or-ranked":case"type-or-category":return"string";default:return"number"}}case"date":return"date";case"date-only":return"date-only";case"string":return"string";case"time-only":return"time-only";case"timestamp-offset":return"timestamp-offset";default:return"string"}}_getFieldValueTypeCamelCase(e){switch(e.layerField.valueType){case"count-or-amount":return"countOrAmount";case"date-and-time":return"dateAndTime";case"location-or-place-name":return"locationOrPlaceName";case"name-or-title":return"nameOrTitle";case"ordered-or-ranked":return"orderedOrRanked";case"percentage-or-ratio":return"percentageOrRatio";case"type-or-category":return"typeOrCategory";case"unique-identifier":return"uniqueIdentifier";case"phone-number":return"phoneNumber";case"email-address":return"emailAddress";default:return e.layerField.valueType??void 0}}_getDisplayString(e,t){let{props:i}=this,{fieldInfo:s}=i;switch(s.simpleFieldType){case"date":return this._getDateString(e,t);case"date-only":return this._getDateOnlyString(e,t);case"guid":return this._getGuidString(e);case"number":return this._getNumberString(e,t);case"time-only":return this._getTimeOnlyString(e,t);case"timestamp-offset":return this._getTimestampOffsetString(e,t);default:return`${e}`}}_getDateString(e,t){let{view:i}=this.props;return i&&i.timeZone==="unknown"?f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"})}_getTimestampOffsetString(e,t){let{view:i}=this.props;return typeof e=="string"?i&&i.timeZone==="unknown"?f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):f.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"}):this._getDateString(e,t)}_getDateOnlyString(e,t){return f.formatDateOnly(e,this.getIntlDateTimeFormattingOptions("short-date",t))}_getTimeOnlyString(e,t){return typeof e=="string"?f.formatTimeOnly(e,this.getIntlDateTimeFormattingOptions("short-date-long-time",t)):f.formatDate(e,{...this.getIntlDateTimeFormattingOptions("long-time",{...t,isTimeOnly:!0}),timeZone:"utc"})}_getGuidString(e){return e.startsWith("{")?e:`{${e}}`}_getNumberString(e,t){let i=t?.useFieldFormatting?e:Math.round(e*100)/100;return f.formatNumber(i,this.getIntlNumberFormattingOptions(t))}_printNumValue(e,t){return p(e)?this._getNumberString(e,t):"--"}_setCompleteRef(){this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit()}getCurrentFieldFormat(){let{props:e}=this,{layer:t,fieldName:i}=e;return(this.originalLayerSupportsFieldConfigs()?t.getFieldConfiguration(i):void 0)?.fieldFormat??void 0}getIntlNumberFormattingOptions(e){let t=this.getCurrentFieldFormat();if(!e?.useFieldFormatting)return t?{useGrouping:["always","auto"].includes(t.useGrouping)}:f.convertNumberFormatToIntlOptions({digitSeparator:this.getPopupTemplateFieldInfo()?.format?.digitSeparator??!0});let i=t?{minimumFractionDigits:t.minimumFractionDigits,maximumFractionDigits:t.maximumFractionDigits,useGrouping:["always","auto"].includes(t.useGrouping)}:void 0;if(i)return i;let s=this.getPopupTemplateFieldInfo();return f.convertNumberFormatToIntlOptions({digitSeparator:s?.format?.digitSeparator??!0,places:s?.format?.places??2})}getIntlDateTimeFormattingOptions(e,t){let i=this.getCurrentFieldFormat();if(!t?.useFieldFormatting)return i?t?.isTimeOnly?oe:ne:f.convertDateFormatToIntlOptions(e);let s=i?{dateStyle:t?.isTimeOnly?void 0:i.dateStyle??void 0,year:i.dateStyle?void 0:i.year??void 0,month:i.dateStyle?void 0:i.month??void 0,timeStyle:i.timeStyle??void 0,hourCycle:i.hour12==="never"?"h23":"h11"}:void 0;if(s)return s;let n=this.getPopupTemplateFieldInfo();return f.convertDateFormatToIntlOptions(n?.format?.dateFormat??e)}originalLayerSupportsFieldConfigs(){let{layer:e}=this;return M.supportsFieldConfiguration(e)}getPopupTemplateFieldInfo(){let{props:e}=this,{layer:t,fieldName:i}=e;return("popupTemplate"in t?t.popupTemplate:void 0)?.fieldInfos?.find(s=>s.fieldName===i)}render(){return this._propWatcherTask.render({complete:()=>{let{props:e}=this,{fieldInfo:t}=e;return t?c`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>`:""},error:()=>""})}renderFieldType(){let{_messages:e,props:t}=this,{fieldInfo:i}=t,s=this._getFieldTypeLabel(i.layerField.type);return c`<div class="section"><div class="title">${e.fieldType}</div><div>${s}</div></div>`}renderFieldAlias(){let{_messages:e,props:t,hideAlias:i}=this,{fieldInfo:s}=t;return i?"":c`<div class="section"><div class="title">${e.fieldAlias}</div><div>${s.label}</div></div>`}renderFieldDescription(){let{_messages:e,props:t}=this,{layer:i}=t;if(!v(i))return"";let{fieldInfo:s}=t,n=s.layerField.description;return c`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${b({missing:!n})}>${n||e.fieldDescriptionNotSet}</div></div>`}renderFieldValueType(){let{_messages:e,props:t}=this,{layer:i}=t;if(!v(i))return"";let{fieldInfo:s}=t,n=this._getFieldValueTypeCamelCase(s);return c`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${b(n?"":"missing")}>${n?e.fieldValueTypes[n]:e.fieldValueTypeNotSet}</div></div>`}renderFieldSampleValue(){let{oneFeatureResponse:e,oneFeatureResponseStatus:t,statisticsStatus:i,statistics:s,uniqueValuesStatus:n,uniqueValues:a,_messages:o,props:d}=this,{layer:u,fieldName:l,fieldInfo:m}=d,{statistics:h}=o,g;if(y(u)||S(u)||!F(u)&&["string","oid","guid"].includes(this._getStatisticsType(m))&&n!=="failed")return"";t==="success"?e.features.forEach(T=>{(g===void 0||g===null&&T.attributes[l]!==null)&&(g=T.attributes[l])}):i==="success"?g=s?.min??void 0:n==="success"&&(g=a?.uniqueValueInfos?.[0]?.value??a?.uniqueValueInfos?.[1]?.value??void 0);let G=m.codedValues;return p(g)&&(G?g=G.find(T=>g===T.code)?.name||g:g=this._getDisplayString(g,{useFieldFormatting:!0})),c`<div class="section"><div class="title">${o.fieldSampleValue}</div><div class=${b(t==="failed"&&i==="failed"&&n==="failed"||!p(g)?"missing":"")}>${t==="success"||i==="success"||n==="success"?g?.toString()??h.allNulls:t==="failed"&&i==="failed"&&n==="failed"?o.fieldSampleNotAvailable:o.fieldSampleRetrieving}</div></div>`}renderFieldNumericFormat(){let{_messages:e,props:t,hideNumericFormat:i}=this,{fieldName:s,fieldInfo:n,layer:a}=t;if(i||!["double","long","single"].includes(n.layerField.type))return"";let o=this.originalLayerSupportsFieldConfigs()?a.getFieldConfiguration(s):void 0;if(o?.fieldFormat){let{minimumFractionDigits:u,maximumFractionDigits:l}=o.fieldFormat;return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}",u.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}",l.toString())}</div></div>`}let d="popupTemplate"in a?a.popupTemplate:void 0;if(d?.fieldInfos){let u=d.fieldInfos?.filter(l=>l.fieldName===s);if(u?.length){let l=u[0];if(p(l?.format?.places)){let m=l.format.places;return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}",m.toString())}</div></div>`}}}return c`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`}renderFieldStatistics(){let{statisticsStatus:e,uniqueValuesStatus:t,hideStatistics:i,_messages:s,props:n}=this,{layer:a,fieldInfo:o}=n;return i?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):x(a)||k(a)||F(a)||y(a)||S(a)||["long"].includes(o.layerField.type)?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):c`<div class="section"><div class="title">${s.fieldStatistics}</div>${!e||e==="missing"||e==="in-progress"?V("field-info-statistics-content",c`<div class="missing">${s.fieldStatisticsRetrieving}</div>`):e==="failed"&&t!=="success"?this.renderNoStatistics():V("field-info-statistics-content",c`<div ${q(this._setCompleteRef)}>${this.renderStatistics()}</div>`)}</div>`}renderNoStatistics(){let{_messages:e}=this;return V("field-info-statistics-content",c`<div class="missing" ${q(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`)}renderStatistics(){let{props:e}=this,{fieldInfo:t}=e;switch(this._getStatisticsType(t)){case"number":return this.renderNumberStatistics();case"guid":case"oid":case"string":return this.renderStringStatistics();case"date":case"date-only":case"time-only":case"timestamp-offset":return this.renderDateStatistics();default:return""}}renderNumberStatistics(){let{statistics:e,_messages:t}=this;if(!e)return this.renderNoStatistics();let{statistics:i}=t;return c`<div><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${p(e.sum)?c`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>`:null}${p(e.min)?c`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>`:null}${p(e.max)?c`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>`:null}${p(e.avg)?c`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>`:null}${p(e.stddev)?c`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>`:null}${this.renderNullValues()}</div>`}renderStringStatistics(){let{statistics:e,uniqueValuesStatus:t,_messages:i}=this,{statistics:s}=i;return c`<div><div class="statistics-row"><div>${s.numberOfValues}</div>${t!=="success"?c`<div class="missing">--</div>`:c`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`}renderDateStatistics(){let{statistics:e,view:t,props:i,_messages:s}=this,{fieldInfo:n}=i;if(!e||!p(e.max)||!p(e.min))return this.renderNoStatistics();let{statistics:a}=s,o=e.max-e.min,d=Math.floor(o/31536e6),u=Math.floor((o-d*31536e6)/2628e6),l=Math.ceil((o-u*2628e6)/864e5);l>=30&&(u+=1,l=0);let m=d===1?a.timeSpanOptions.year:d>1?a.timeSpanOptions.years.replace("${years}",d.toString()):"";m+=d>0&&(u>0||l>0)?", ":"",m+=u===1?a.timeSpanOptions.month:u>1?a.timeSpanOptions.months.replace("${months}",u.toString()):"",m+=u>0&&l>0?", ":"",m+=l===1?a.timeSpanOptions.day:l>1?a.timeSpanOptions.days.replace("${days}",l.toString()):"";let h=n.simpleFieldType!=="timestamp-offset"||!t||t.timeZone!=="unknown",g=n.simpleFieldType==="time-only";return c`<div><div class="statistics-row"><div>${a.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${h&&p(e.min)?c`<div class="statistics-row"><div>${g?a.minimumTime:a.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>`:null}${h&&p(e.max)?c`<div class="statistics-row"><div>${g?a.maximumTime:a.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>`:null}${h&&p(e.avg)?c`<div class="statistics-row"><div>${g?a.averageTime:a.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>`:null}${h&&!g&&p(e.min)&&p(e.max)&&o>0?c`<div class="statistics-row"><div>${a.timespan}</div><div class="data">${m}</div></div>`:null}${this.renderNullValues()}</div>`}renderTopValues(){let{uniqueValues:e,uniqueValuesStatus:t,_messages:i,props:s}=this,{fieldInfo:n}=s,{statistics:a}=i;if(e?.uniqueValueInfos?.length){let o=e.uniqueValueInfos;o.sort((l,m)=>l.count<m.count?1:l.count>m.count?-1:0);let d=n.codedValues,u=o.filter(l=>l.value!==null).filter((l,m)=>l&&m<10).map(l=>{let m=l.value;return d?d.forEach(h=>{m===h.code&&(m=h.name)}):m=this._getDisplayString(m),c`<div class="statistics-row"><div class="data">${`${m}`}</div><div class="count">${this._printNumValue(l.count)}</div></div>`});return u.length?c`<div><div class="statistics-row-top-values"><div>${o.length>10?a.topTenValues:a.topValues}</div><div>${a.count}</div></div>${u}</div>`:""}else return c`<div><div class="statistics-row-top-values"><div>${a.topValues}</div><div>${a.count}</div></div><div class="statistics-row"><div class="missing">${t==="failed"?i.fieldUniqueValuesNotAvailable:i.fieldSampleRetrieving}</div></div></div>`}renderNullValues(){let{statistics:e,uniqueValues:t,_messages:i}=this,{statistics:s}=i,n=e?.nullcount;if(!p(n)&&t){let a=t.uniqueValueInfos;for(let o=0;o<a.length;o++){let d=a[o];if(d.value===null){n=d.count;break}}}return c`<div class="statistics-row"><div>${s.numberOfNulls}</div>${p(n)?c`<div class="data">${this._printNumValue(n)}</div>`:c`<div class="missing">--</div>`}</div>`}};U("arcgis-field-info",P);return P},"config","core/reactiveUtils","intl","applications/PortalApp/layerUtils","core/lang","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/support/Query")
|
|
@@ -8205,4 +8205,4 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
8205
8205
|
`))+`
|
|
8206
8206
|
|
|
8207
8207
|
`}},en.tableSection={filter:["thead","tbody","tfoot"],replacement:function(n){return n}};let e4=ud.prototype.escape;function J0(n){return n=(n=e4(n)).replace(/</g,"\\<")}ud.prototype.escape=function(n){let e="",t=0;for(let o of(function*(i){for(let r of i.matchAll(t4)){let s=r[0],a=o4(s);yield Object.assign([s.substring(0,a)],{index:r.index})}})(n)){let i=o.index;i>t&&(e+=J0(n.substring(t,i)));let r=o[0];e+=r,t=i+r.length}return t<n.length&&(e+=J0(n.substring(t,n.length))),e};let md=new ud({codeBlockStyle:"fenced",hr:"---",headingStyle:"atx"});md.use([function(n){n.use([ZB,KB,JB,XB])},function(n){n.addRule("taskListItems",{filter:e=>e.type==="checkbox"&&(e.parentNode.nodeName==="LI"||e.parentNode.parentNode.nodeName==="LI"),replacement:(e,t)=>(t.checked?"[x]":"[ ]")+" "})}]);let t4=new RegExp(/\b(?:(?:https?|ftp):\/\/|www\.)/.source+/(?![-_])(?:[-_a-z0-9\u00a1-\uffff]{1,63}\.)+(?:[a-z\u00a1-\uffff]{2,63})/.source+/(?:[^\s<>]*)/.source,"gi");function o4(n){let e=n.length;for(;e>0;){let t=n[e-1];if(`?!.,:*_~'"`.includes(t))e--;else{if(t!=")")break;{let o=0;for(let i=0;i<e;i++)n[i]=="("?o++:n[i]==")"&&o--;if(!(o<0))break;e--}}}return e}class X0{constructor(e){this._htmlDP=new lm(e)}keepHtml(e){md.keep([e])}toView(e){let t=(function(o){return de.parse(o,{gfm:!0,breaks:!0,tables:!0,xhtml:!0,headerIds:!1})})(e);return this._htmlDP.toView(t)}toData(e){return(function(t){return md.turndown(t)})(this._htmlDP.toData(e))}registerRawContentMatcher(e){this._htmlDP.registerRawContentMatcher(e)}useFillerType(){}}let i4=["SPAN","BR","PRE","CODE"];class gd extends Dp{}gd.builtinPlugins=[u0,class extends L{static get requires(){return[lo]}static get pluginName(){return"Autoformat"}afterInit(){let n=this.editor,e=this.editor.t;this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats(),n.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Revert autoformatting action"),keystroke:"Backspace"}]})}_addListAutoformats(){let n=this.editor.commands;n.get("bulletedList")&&To(this.editor,this,/^[*-]\s$/,"bulletedList"),n.get("numberedList")&&To(this.editor,this,/^1[.|)]\s$/,"numberedList"),n.get("todoList")&&To(this.editor,this,/^\[\s?\]\s$/,"todoList"),n.get("checkTodoList")&&To(this.editor,this,/^\[\s?x\s?\]\s$/,(()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")}))}_addBasicStylesAutoformats(){let n=this.editor.commands;if(n.get("bold")){let e=aa(this.editor,"bold");Ji(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,e),Ji(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,e)}if(n.get("italic")){let e=aa(this.editor,"italic");Ji(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,e),Ji(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,e)}if(n.get("code")){let e=aa(this.editor,"code");Ji(this.editor,this,/(`)([^`]+)(`)$/g,e)}if(n.get("strikethrough")){let e=aa(this.editor,"strikethrough");Ji(this.editor,this,/(~~)([^~]+)(~~)$/g,e)}}_addHeadingAutoformats(){let n=this.editor.commands.get("heading");n&&n.modelElements.filter((e=>e.match(/^heading[1-6]$/))).forEach((e=>{let t=e[7],o=new RegExp(`^(#{${t}})\\s$`);To(this.editor,this,o,(()=>{if(!n.isEnabled||n.value===e)return!1;this.editor.execute("heading",{value:e})}))}))}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&To(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){let n=this.editor,e=n.model.document.selection;n.commands.get("codeBlock")&&To(n,this,/^```$/,(()=>{if(e.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})}))}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&To(this.editor,this,/^---$/,"horizontalLine")}},Qw,class extends L{static get requires(){return[TI,II]}static get pluginName(){return"Code"}},class extends L{static get requires(){return[kB,wB]}static get pluginName(){return"CodeBlock"}},class extends L{static get requires(){return[Gk]}static get pluginName(){return"DocumentList"}constructor(n){super(n),te("plugin-obsolete-documentlist",{pluginName:"DocumentList"})}},Sf,f0,qf,Xw,m0,class extends L{constructor(n){super(n),n.data.processor=new X0(n.data.viewDocument)}static get pluginName(){return"Markdown"}},db,class extends L{constructor(n){super(n),this._gfmDataProcessor=new X0(n.data.viewDocument)}static get pluginName(){return"PasteFromMarkdownExperimental"}static get requires(){return[Lt]}init(){let n=this.editor,e=n.editing.view.document,t=n.plugins.get("ClipboardPipeline"),o=!1;this.listenTo(e,"keydown",((i,r)=>{o=r.shiftKey})),this.listenTo(t,"inputTransformation",((i,r)=>{if(o)return;let s=r.dataTransfer.getData("text/html");if(!s){let l=r.dataTransfer.getData("text/plain");return void(r.content=this._gfmDataProcessor.toView(l))}let a=this._parseMarkdownFromHtml(s);a&&(r.content=this._gfmDataProcessor.toView(a))}))}_parseMarkdownFromHtml(n){let e=this._removeOsSpecificTags(n);if(!this._containsOnlyAllowedFirstLevelTags(e))return null;let t=this._removeFirstLevelWrapperTagsAndBrs(e);return this._containsAnyRemainingHtmlTags(t)?null:this._replaceHtmlReservedEntitiesWithCharacters(t)}_removeOsSpecificTags(n){return n.replace(/^<meta\b[^>]*>/,"").trim().replace(/^<html>/,"").replace(/<\/html>$/,"").trim().replace(/^<body>/,"").replace(/<\/body>$/,"").trim().replace(/^<!--StartFragment-->/,"").replace(/<!--EndFragment-->$/,"").trim()}_containsOnlyAllowedFirstLevelTags(n){let e=new DOMParser,{body:t}=e.parseFromString(n,"text/html");return Array.from(t.children).map((o=>o.tagName)).every((o=>i4.includes(o)))}_removeFirstLevelWrapperTagsAndBrs(n){let e=new DOMParser,{body:t}=e.parseFromString(n,"text/html"),o=t.querySelectorAll("br");for(let r of o)r.replaceWith(`
|
|
8208
|
-
`);let i=t.querySelectorAll(":scope > *");for(let r of i){let s=r.cloneNode(!0);r.replaceWith(...s.childNodes)}return t.innerHTML}_containsAnyRemainingHtmlTags(n){return n.includes("<")}_replaceHtmlReservedEntitiesWithCharacters(n){return n.replace(/>/g,">").replace(/</g,"<").replace(/ /g," ")}},fb,class extends L{static get requires(){return[NI,PI]}static get pluginName(){return"Strikethrough"}},Wb],gd.defaultConfig={licenseKey:"WlZCOVRvK1lBTUdYRG13dnQ3L1krYTlycHc5dTVZbm5kWmRoMkpIRS9ETHBGbzd1YzBYUGNxcTZVbVljTkprQldwTjlqbzJIa3Jidmd6SXBtdUU9LU1qQXlOREE1TWpRPQ==",codeBlock:{languages:[{language:"plaintext",label:""}]},link:{defaultProtocol:"https://"},toolbar:{items:["sourceEditing","heading","|","bold","italic","strikethrough","|","bulletedList","numberedList","insertTable","|","code","codeBlock","link","arcgis-field-expression"]},table:{defaultHeadings:{rows:1}},language:"en"};let n4={HTMLEditor:mB,MarkdownEditor:gd}})(),oe=oe.default})()))})(Aa,Aa.exports)),Aa.exports}var J4=Q4(),_a=Y4(J4),X4=i_`@layer{.arcgis-app-ckeditor{max-width:var(--arcgis-ckeditor5-max-width);font-family:var(--calcite-font-family);background:var(--calcite-color-foreground-1);border-radius:3px;.ck-source-editing-area,.ck-editor__editable_inline{height:var(--arcgis-ckeditor5-initial-height)}&.readOnly{.ck.ck-content.ck-editor__editable{border-radius:0}}&.resizable{.ck.ck-content.ck-editor__editable,.ck-source-editing-area textarea{resize:vertical}}&.generic-code-blocks{.ck.ck-editor__editable pre[data-language]:after,.ck-code-block-dropdown .ck-splitbutton__arrow{display:none}}.ck.ck-toolbar{background-color:#f3f3f3;border-color:var(--calcite-color-border-1)}.ck-editor__editable_inline{overflow-y:scroll;box-sizing:border-box}.ck-content{font-size:var(--calcite-font-size-0);h2{font-size:var(--calcite-font-size-3)}h3{font-size:var(--calcite-font-size-2)}h4{font-size:var(--calcite-font-size-1)}span.mention{background-color:inherit!important;color:inherit!important}ul,ol{padding-inline-start:2rem}}.ck-editor .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--calcite-color-border-1)}.ck-source-editing-area{overflow:hidden;textarea{overflow:unset!important}}.ck-editor .ck-source-editing-button{.ck-button__label{display:none!important}}}.ck-body .ck.ck-balloon-panel{box-shadow:val(--calcite-shadow-1);border:1px solid var(--calcite-color-border-1);border-radius:3px;.ck.ck-reset.ck-list.ck-mentions{max-width:var(--arcgis-ckeditor5-mentions-max-width)}.arcgis-app-ckeditor-mention-header{font-weight:500;line-height:1.25rem;padding-left:var(--calcite-space-lg);padding-top:var(--calcite-space-sm);padding-bottom:var(--calcite-space-sm);padding-right:var(--calcite-space-lg);width:100%;display:block;background-color:var(--calcite-color-background);font-family:var(--calcite-font-family)}}.ck.ck-balloon-panel.ck-tooltip{min-width:auto}.ck.ck-list__item .arcgis-app-ckeditor-mention-item-container.ck-button{--ck-list-button-padding: 0px;padding:0;position:relative!important;border-bottom:1px solid var(--calcite-color-foreground-3)!important;.arcgis-app-ckeditor-mention-item{cursor:pointer!important;display:flex!important;background-color:var(--calcite-color-foreground-1)!important;flex-flow:column!important;padding:var(--calcite-space-sm) var(--calcite-space-md)!important;transition:background-color calc(.25s / 3) ease-in-out!important;&:hover,&:focus{background-color:var(--calcite-color-foreground-3)!important}.heading{overflow:hidden!important;pointer-events:none!important;text-overflow:ellipsis!important;color:var(--calcite-color-neutral-blk-180)!important;font-family:var(--calcite-font-family)!important}.summary{overflow:hidden!important;pointer-events:none!important;text-overflow:ellipsis!important;color:var(--calcite-color-neutral-blk-180)!important;font-size:var(--calcite-font-size-sm)!important;font-family:var(--calcite-code-family)!important}}&.ck-on .arcgis-app-ckeditor-mention-item{background-color:var(--calcite-color-foreground-3)!important;border-color:#00619b!important;z-index:1!important}}arcgis-ckeditor5-popover{.arcgis-app-ckeditor{box-shadow:0 0 #0000;padding:var(--calcite-space-lg) var(--calcite-space-lg) 0 var(--calcite-space-lg)}}}`,wd=class extends l_{constructor(){super(),this.textAreaElement=s_(),this.actualLanguage="en",this.sanitizer=new M_({whiteList:{figure:["style","class"],thead:[]},onTagAttr:(I,E,O)=>{if((E==="src"&&I==="img"||I==="a"&&E==="href"||I==="source"&&E==="src")&&this.mentionFields?.some(H=>H.id===O))return`${E}="${O}"`}},!0),this.resizeObserver=new ResizeObserver(I=>{let E=I[0];this.currentEditableAreaHeight=E.borderBoxSize[0].blockSize}),this.sourceResizeObserver=new ResizeObserver(I=>{let E=I[0];this.currentSourceAreaHeight=E.borderBoxSize[0].blockSize,this.editor.editing.view.getDomRoot().nextSibling.style.height=`${E.borderBoxSize[0].blockSize}px`}),this.mutationObserver=new MutationObserver(I=>{for(let E of I){let O=E.addedNodes;if(O?.length){let H=Array.from(O).find(q=>q.classList.contains("ck-alignment-dropdown"));H&&this.configureAlignmentTooltips(H.parentElement)}}}),this.editorType="html",this.mentionFields=[],this.intlTextPlaceHolder="",this.intlExpressionsGroupHeading="",this.intlFieldsGroupHeading="",this.currentLanguage="en",this.canResizeVertically=!1,this.groupFieldsAndExpressions=!1,this.arcgisCkeditor5Created=hi(),this.arcgisCkeditor5DataUpdated=hi(),this.arcgisCkeditor5SourceEditingChanged=hi(),this.arcgisCreated=hi(),this.arcgisDataUpdated=hi(),this.arcgisSourceEditingChanged=hi(),this.listen("input",I=>{I.target===this.sourceTextarea&&this.editor.plugins.get("SourceEditing").updateEditorData()})}static{this.properties={editor:16,editorType:1,customConfig:1,textData:1,readOnly:5,mentionFields:0,intlTextPlaceHolder:1,intlExpressionsGroupHeading:1,intlFieldsGroupHeading:1,currentLanguage:1,canResizeVertically:5,groupFieldsAndExpressions:5,customExpressionCheck:0}}static{this.styles=X4}static{this.shadowRootOptions=r_}get propClass(){let I=this.readOnly?"readOnly":this.canResizeVertically?"resizable":"",E=this.editor?.config.codeBlock?.languages,O=E?.length===1&&E[0].language==="plaintext"?"generic-code-blocks":"";return[I,O].join(" ").trim()}get baseEditor(){return this.editorType==="html"?_a.HTMLEditor:_a.MarkdownEditor}get baseConfig(){return this.baseEditor.defaultConfig}get additionalConfig(){let I=this.getFields.bind(this),E=this.customItemRenderer.bind(this);return{language:this.actualLanguage,mention:{dropdownLimit:this.mentionFields?.length,feeds:[{marker:"{",feed:I,itemRenderer:E}]}}}async getData(){return this.editorType==="html"?this.postProcessCkeditorHtml():this.editor.getData()}async setFocus(){setTimeout(()=>{this.textAreaElement.value?.focus()},100)}async load(){let I=this.currentLanguage.toLowerCase(),E=P_.find(O=>O===I);if(!E&&I.includes("-")&&(I=I.substring(0,I.indexOf("-")),E=P_.find(O=>O===I)),this.actualLanguage=E||"en",this.actualLanguage!=="en"){let O=u_(`./assets/ckeditor5/translations/${this.actualLanguage}.js`);try{let H=await fetch(O);H.ok&&(this.languageScript=document.createElement("script"),this.languageScript.type="text/javascript",this.languageScript.text=await H.text())}catch(H){console.error("Error loading language file:",H)}}}willUpdate(I){I.has("textData")&&this.updateData(this.textData),I.has("readOnly")&&this.readOnlyWatcher(),!this.hasUpdated&&this.editor&&(this.editor.config._config.FieldExpression=this.customConfig.FieldExpression,this.editor.config._config.ArcgisColorPicker=this.customConfig.ArcgisColorPicker)}loaded(){(this.actualLanguage==="en"||this.languageScript)&&this.createEditor()}disconnectedCallback(){super.disconnectedCallback(),this.canResizeVertically&&(this.resizeObserver.unobserve(this.editor.ui.view.editable.element),this.sourceResizeObserver.disconnect()),this.mutationObserver.disconnect()}updateData(I){this.editor?.setData(I)}readOnlyWatcher(){this.updateReadOnlyStatus()}async createEditor(){let I=this.editorType==="html"?_a.HTMLEditor:_a.MarkdownEditor,E={...this.baseConfig,...this.additionalConfig,...this.customConfig};try{let O=await I.create(this.textAreaElement.value,E);this.editor=O,this.editor.model.document.on("change:data",async()=>{this.arcgisCkeditor5DataUpdated.emit(await this.getData()),this.arcgisDataUpdated.emit(await this.getData())}),this.editor.setData(this.textData??""),this.configureReadOnlySettings(),this.configureSourceEditing(),this.canResizeVertically&&this.configureResizing(),this.arcgisCkeditor5Created.emit(this.el),this.arcgisCreated.emit(this.el),this.setUpTooltipReconfiguring()}catch(O){console.error(O.stack)}}configureResizing(){this.resizeObserver.observe(this.editor.ui.view.editable.element),this.editor.ui.focusTracker.on("change:isFocused",()=>{this.editor.ui.view.editable.element.style.height=`${this.currentEditableAreaHeight}px`})}configureReadOnlySettings(){let I=this.editor.ui.view.toolbar.element;this.editor.on("change:isReadOnly",(E,O,H)=>{I.style.display=H?"none":"flex"}),this.updateReadOnlyStatus()}setUpTooltipReconfiguring(){this.configureAlignmentTooltips(this.el);let I=this.el.querySelector(".ck-toolbar__grouped-dropdown");I&&I.addEventListener("click",()=>this.configureAlignmentTooltips(I));let E=this.el.querySelector(".ck-toolbar__items");E&&this.mutationObserver.observe(E,{childList:!0})}configureAlignmentTooltips(I){let E=h_(this.el),O=I?.querySelector(".ck-alignment-dropdown");O&&O.addEventListener("click",()=>{O.querySelectorAll(".ck-button").forEach(H=>{let q=window.innerWidth-O.getBoundingClientRect().right,z=O.getBoundingClientRect().left;E==="ltr"&&H.dataset.ckeTooltipPosition==="e"?z>q&&(H.dataset.ckeTooltipPosition="w"):E==="rtl"&&H.dataset.ckeTooltipPosition==="w"&&q>z&&(H.dataset.ckeTooltipPosition="e")})})}updateReadOnlyStatus(){this.readOnly?this.editor?.enableReadOnlyMode("isReadOnlyProp"):this.editor?.disableReadOnlyMode("isReadOnlyProp")}configureSourceEditing(){let I=this.editor.plugins.get("SourceEditing");I&&I?.on("change:isSourceEditingMode",()=>{let E=I?.isSourceEditingMode;if(this.arcgisCkeditor5SourceEditingChanged.emit(E),this.arcgisSourceEditingChanged.emit(E),E){let O=this.editor.editing.view.getDomRoot()?.nextSibling;this.sourceTextarea=this.editor.editing.view.getDomRoot()?.nextSibling?.firstChild,this.canResizeVertically&&(O.style.height=`${this.currentEditableAreaHeight}px`,this.sourceTextarea.style.height=`${this.currentEditableAreaHeight}px`,this.sourceResizeObserver.observe(this.editor.editing.view.getDomRoot()?.nextSibling?.firstChild))}else this.canResizeVertically&&(this.sourceResizeObserver.disconnect(),this.editor.ui.view.editable.element.style.height=`${this.currentSourceAreaHeight}px`)})}updateMentionHeadings(){this.removeMentionHeadings();let I=this.intlExpressionsGroupHeading,E=this.intlFieldsGroupHeading;this.addMentionHeading("[data-first-expression]",I),this.addMentionHeading("[data-first-field]",E)}removeMentionHeadings(){document.querySelectorAll(`.${tn.arcgisAppCkeditorMentionHeader}`).forEach(I=>I.remove())}addMentionHeading(I,E){let O=document.querySelector(I);if(O){let H=document.createElement("div");H.setAttribute("class",tn.arcgisAppCkeditorMentionHeader),H.textContent=E,O.parentElement?.insertAdjacentElement("beforebegin",H)}}getFields(I){let E=this.isItemMatching.bind(this,I);return new Promise(O=>{setTimeout(()=>{let H=this.mentionFields?.filter(E),q=H?.filter(v=>this.isExpression(v)),z=H?.filter(v=>!this.isExpression(v));q.length&&(q[0].isFirstExpression=!0),z.length&&(z[0].isFirstField=!0);let oe=q.concat(z);this.groupFieldsAndExpressions&&setTimeout(()=>this.updateMentionHeadings(),10),O(oe)},100)})}isItemMatching(I,E){let O=I.toLowerCase();return E.name.toLowerCase().includes(O)||E.id.toLowerCase().includes(O)}customItemRenderer(I){let E=document.createElement("div");E.setAttribute("class",`custom-item ${tn.arcgisAppCkeditorMentionItemContainer}`),I.isFirstExpression&&E.setAttribute("data-first-expression",""),I.isFirstField&&E.setAttribute("data-first-field","");let O=document.createElement("div");return O.setAttribute("class",tn.arcgisAppCkeditorMentionItem),E.appendChild(O),O.innerHTML=`<span class="heading">${I.name}</span><span class="summary">${I.id}</span>`,E.id=`mention-list-item-id-${I.id}`,E.appendChild(O),E}postProcessCkeditorHtml(){let I=this.editor.getData(),E=this.sanitizer.sanitize(I),O=document.createElement("div");O.innerHTML=E;let H=O.querySelectorAll("span.mention");for(let q=0;q<H.length;++q){let z=document.createTextNode(H[q].textContent??"");H[q].parentNode?.replaceChild(z,H[q])}return O.innerHTML}isExpression(I){return this.customExpressionCheck?this.customExpressionCheck(I):this.defaultExpressionCheck(I)}defaultExpressionCheck(I){return I.id.includes(m_.expression)}render(){return n_`${this.actualLanguage!=="en"&&this.languageScript||""}<div class=${`${tn.arcgisAppCkeditor} ${this.propClass}`}><textarea placeholder=${(this.readOnly?void 0:this.intlTextPlaceHolder)??c_} ${a_(this.textAreaElement)}></textarea></div>`}},P_=["af","ar","ast","az","bg","bn","bs","ca","cs","da","de-ch","de","el","en-au","en-gb","eo","es-co","es","et","eu","fa","fi","fr","gl","gu","he","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","ku","lt","lv","ms","nb","ne","nl","no","oc","pl","pt-br","pt","ro","ru","si","sk","sl","sq","sr-latn","sr","sv","th","tk","tr","tt","ug","uk","ur","uz","vi","zh-cn","zh"];d_("arcgis-ckeditor5",wd);export{wd as ArcgisCkeditor5};
|
|
8208
|
+
`);let i=t.querySelectorAll(":scope > *");for(let r of i){let s=r.cloneNode(!0);r.replaceWith(...s.childNodes)}return t.innerHTML}_containsAnyRemainingHtmlTags(n){return n.includes("<")}_replaceHtmlReservedEntitiesWithCharacters(n){return n.replace(/>/g,">").replace(/</g,"<").replace(/ /g," ")}},fb,class extends L{static get requires(){return[NI,PI]}static get pluginName(){return"Strikethrough"}},Wb],gd.defaultConfig={licenseKey:"WlZCOVRvK1lBTUdYRG13dnQ3L1krYTlycHc5dTVZbm5kWmRoMkpIRS9ETHBGbzd1YzBYUGNxcTZVbVljTkprQldwTjlqbzJIa3Jidmd6SXBtdUU9LU1qQXlOREE1TWpRPQ==",codeBlock:{languages:[{language:"plaintext",label:""}]},link:{defaultProtocol:"https://"},toolbar:{items:["sourceEditing","heading","|","bold","italic","strikethrough","|","bulletedList","numberedList","insertTable","|","code","codeBlock","link","arcgis-field-expression"]},table:{defaultHeadings:{rows:1}},language:"en"};let n4={HTMLEditor:mB,MarkdownEditor:gd}})(),oe=oe.default})()))})(Aa,Aa.exports)),Aa.exports}var J4=Q4(),_a=Y4(J4),X4=i_`@layer{.arcgis-app-ckeditor{max-width:var(--arcgis-ckeditor5-max-width, 35vw);font-family:var(--calcite-font-family);background:var(--calcite-color-foreground-1);border-radius:3px;.ck-source-editing-area,.ck-editor__editable_inline{height:var(--arcgis-ckeditor5-initial-height, 30vh)}&.readOnly{.ck.ck-content.ck-editor__editable{border-radius:0}}&.resizable{.ck.ck-content.ck-editor__editable,.ck-source-editing-area textarea{resize:vertical}}&.generic-code-blocks{.ck.ck-editor__editable pre[data-language]:after,.ck-code-block-dropdown .ck-splitbutton__arrow{display:none}}.ck.ck-toolbar{background-color:#f3f3f3;border-color:var(--calcite-color-border-1)}.ck-editor__editable_inline{overflow-y:scroll;box-sizing:border-box}.ck-content{font-size:var(--calcite-font-size-0);h2{font-size:var(--calcite-font-size-3)}h3{font-size:var(--calcite-font-size-2)}h4{font-size:var(--calcite-font-size-1)}span.mention{background-color:inherit!important;color:inherit!important}ul,ol{padding-inline-start:2rem}}.ck-editor .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--calcite-color-border-1)}.ck-source-editing-area{overflow:hidden;textarea{overflow:unset!important}}.ck-editor .ck-source-editing-button{.ck-button__label{display:none!important}}}.ck-body .ck.ck-balloon-panel{box-shadow:val(--calcite-shadow-1);border:1px solid var(--calcite-color-border-1);border-radius:3px;.ck.ck-reset.ck-list.ck-mentions{max-width:var(--arcgis-ckeditor5-mentions-max-width, 33vw)}.arcgis-app-ckeditor-mention-header{font-weight:500;line-height:1.25rem;padding-left:var(--calcite-space-lg);padding-top:var(--calcite-space-sm);padding-bottom:var(--calcite-space-sm);padding-right:var(--calcite-space-lg);width:100%;display:block;background-color:var(--calcite-color-background);font-family:var(--calcite-font-family)}}.ck.ck-balloon-panel.ck-tooltip{min-width:auto}.ck.ck-list__item .arcgis-app-ckeditor-mention-item-container.ck-button{--ck-list-button-padding: 0px;padding:0;position:relative!important;border-bottom:1px solid var(--calcite-color-foreground-3)!important;.arcgis-app-ckeditor-mention-item{cursor:pointer!important;display:flex!important;background-color:var(--calcite-color-foreground-1)!important;flex-flow:column!important;padding:var(--calcite-space-sm) var(--calcite-space-md)!important;transition:background-color calc(.25s / 3) ease-in-out!important;&:hover,&:focus{background-color:var(--calcite-color-foreground-3)!important}.heading{overflow:hidden!important;pointer-events:none!important;text-overflow:ellipsis!important;color:var(--calcite-color-neutral-blk-180)!important;font-family:var(--calcite-font-family)!important}.summary{overflow:hidden!important;pointer-events:none!important;text-overflow:ellipsis!important;color:var(--calcite-color-neutral-blk-180)!important;font-size:var(--calcite-font-size-sm)!important;font-family:var(--calcite-code-family)!important}}&.ck-on .arcgis-app-ckeditor-mention-item{background-color:var(--calcite-color-foreground-3)!important;border-color:#00619b!important;z-index:1!important}}arcgis-ckeditor5-popover{.arcgis-app-ckeditor{box-shadow:0 0 #0000;padding:var(--calcite-space-lg) var(--calcite-space-lg) 0 var(--calcite-space-lg)}}}`,wd=class extends l_{constructor(){super(),this.textAreaElement=s_(),this.actualLanguage="en",this.sanitizer=new M_({whiteList:{figure:["style","class"],thead:[]},onTagAttr:(I,E,O)=>{if((E==="src"&&I==="img"||I==="a"&&E==="href"||I==="source"&&E==="src")&&this.mentionFields?.some(H=>H.id===O))return`${E}="${O}"`}},!0),this.resizeObserver=new ResizeObserver(I=>{let E=I[0];this.currentEditableAreaHeight=E.borderBoxSize[0].blockSize}),this.sourceResizeObserver=new ResizeObserver(I=>{let E=I[0];this.currentSourceAreaHeight=E.borderBoxSize[0].blockSize,this.editor.editing.view.getDomRoot().nextSibling.style.height=`${E.borderBoxSize[0].blockSize}px`}),this.mutationObserver=new MutationObserver(I=>{for(let E of I){let O=E.addedNodes;if(O?.length){let H=Array.from(O).find(q=>q.classList.contains("ck-alignment-dropdown"));H&&this.configureAlignmentTooltips(H.parentElement)}}}),this.editorType="html",this.mentionFields=[],this.intlTextPlaceHolder="",this.intlExpressionsGroupHeading="",this.intlFieldsGroupHeading="",this.currentLanguage="en",this.canResizeVertically=!1,this.groupFieldsAndExpressions=!1,this.arcgisCkeditor5Created=hi(),this.arcgisCkeditor5DataUpdated=hi(),this.arcgisCkeditor5SourceEditingChanged=hi(),this.arcgisCreated=hi(),this.arcgisDataUpdated=hi(),this.arcgisSourceEditingChanged=hi(),this.listen("input",I=>{I.target===this.sourceTextarea&&this.editor.plugins.get("SourceEditing").updateEditorData()})}static{this.properties={editor:16,editorType:1,customConfig:1,textData:1,readOnly:5,mentionFields:0,intlTextPlaceHolder:1,intlExpressionsGroupHeading:1,intlFieldsGroupHeading:1,currentLanguage:1,canResizeVertically:5,groupFieldsAndExpressions:5,customExpressionCheck:0}}static{this.styles=X4}static{this.shadowRootOptions=r_}get propClass(){let I=this.readOnly?"readOnly":this.canResizeVertically?"resizable":"",E=this.editor?.config.codeBlock?.languages,O=E?.length===1&&E[0].language==="plaintext"?"generic-code-blocks":"";return[I,O].join(" ").trim()}get baseEditor(){return this.editorType==="html"?_a.HTMLEditor:_a.MarkdownEditor}get baseConfig(){return this.baseEditor.defaultConfig}get additionalConfig(){let I=this.getFields.bind(this),E=this.customItemRenderer.bind(this);return{language:this.actualLanguage,mention:{dropdownLimit:this.mentionFields?.length,feeds:[{marker:"{",feed:I,itemRenderer:E}]}}}async getData(){return this.editorType==="html"?this.postProcessCkeditorHtml():this.editor.getData()}async setFocus(){setTimeout(()=>{this.textAreaElement.value?.focus()},100)}async load(){let I=this.currentLanguage.toLowerCase(),E=P_.find(O=>O===I);if(!E&&I.includes("-")&&(I=I.substring(0,I.indexOf("-")),E=P_.find(O=>O===I)),this.actualLanguage=E||"en",this.actualLanguage!=="en"){let O=u_(`./assets/ckeditor5/translations/${this.actualLanguage}.js`);try{let H=await fetch(O);H.ok&&(this.languageScript=document.createElement("script"),this.languageScript.type="text/javascript",this.languageScript.text=await H.text())}catch(H){console.error("Error loading language file:",H)}}}willUpdate(I){I.has("textData")&&this.updateData(this.textData),I.has("readOnly")&&this.readOnlyWatcher(),!this.hasUpdated&&this.editor&&(this.editor.config._config.FieldExpression=this.customConfig.FieldExpression,this.editor.config._config.ArcgisColorPicker=this.customConfig.ArcgisColorPicker)}loaded(){(this.actualLanguage==="en"||this.languageScript)&&this.createEditor()}disconnectedCallback(){super.disconnectedCallback(),this.canResizeVertically&&(this.resizeObserver.unobserve(this.editor.ui.view.editable.element),this.sourceResizeObserver.disconnect()),this.mutationObserver.disconnect()}updateData(I){this.editor?.setData(I)}readOnlyWatcher(){this.updateReadOnlyStatus()}async createEditor(){let I=this.editorType==="html"?_a.HTMLEditor:_a.MarkdownEditor,E={...this.baseConfig,...this.additionalConfig,...this.customConfig};try{let O=await I.create(this.textAreaElement.value,E);this.editor=O,this.editor.model.document.on("change:data",async()=>{this.arcgisCkeditor5DataUpdated.emit(await this.getData()),this.arcgisDataUpdated.emit(await this.getData())}),this.editor.setData(this.textData??""),this.configureReadOnlySettings(),this.configureSourceEditing(),this.canResizeVertically&&this.configureResizing(),this.arcgisCkeditor5Created.emit(this.el),this.arcgisCreated.emit(this.el),this.setUpTooltipReconfiguring()}catch(O){console.error(O.stack)}}configureResizing(){this.resizeObserver.observe(this.editor.ui.view.editable.element),this.editor.ui.focusTracker.on("change:isFocused",()=>{this.editor.ui.view.editable.element.style.height=`${this.currentEditableAreaHeight}px`})}configureReadOnlySettings(){let I=this.editor.ui.view.toolbar.element;this.editor.on("change:isReadOnly",(E,O,H)=>{I.style.display=H?"none":"flex"}),this.updateReadOnlyStatus()}setUpTooltipReconfiguring(){this.configureAlignmentTooltips(this.el);let I=this.el.querySelector(".ck-toolbar__grouped-dropdown");I&&I.addEventListener("click",()=>this.configureAlignmentTooltips(I));let E=this.el.querySelector(".ck-toolbar__items");E&&this.mutationObserver.observe(E,{childList:!0})}configureAlignmentTooltips(I){let E=h_(this.el),O=I?.querySelector(".ck-alignment-dropdown");O&&O.addEventListener("click",()=>{O.querySelectorAll(".ck-button").forEach(H=>{let q=window.innerWidth-O.getBoundingClientRect().right,z=O.getBoundingClientRect().left;E==="ltr"&&H.dataset.ckeTooltipPosition==="e"?z>q&&(H.dataset.ckeTooltipPosition="w"):E==="rtl"&&H.dataset.ckeTooltipPosition==="w"&&q>z&&(H.dataset.ckeTooltipPosition="e")})})}updateReadOnlyStatus(){this.readOnly?this.editor?.enableReadOnlyMode("isReadOnlyProp"):this.editor?.disableReadOnlyMode("isReadOnlyProp")}configureSourceEditing(){let I=this.editor.plugins.get("SourceEditing");I&&I?.on("change:isSourceEditingMode",()=>{let E=I?.isSourceEditingMode;if(this.arcgisCkeditor5SourceEditingChanged.emit(E),this.arcgisSourceEditingChanged.emit(E),E){let O=this.editor.editing.view.getDomRoot()?.nextSibling;this.sourceTextarea=this.editor.editing.view.getDomRoot()?.nextSibling?.firstChild,this.canResizeVertically&&(O.style.height=`${this.currentEditableAreaHeight}px`,this.sourceTextarea.style.height=`${this.currentEditableAreaHeight}px`,this.sourceResizeObserver.observe(this.editor.editing.view.getDomRoot()?.nextSibling?.firstChild))}else this.canResizeVertically&&(this.sourceResizeObserver.disconnect(),this.editor.ui.view.editable.element.style.height=`${this.currentSourceAreaHeight}px`)})}updateMentionHeadings(){this.removeMentionHeadings();let I=this.intlExpressionsGroupHeading,E=this.intlFieldsGroupHeading;this.addMentionHeading("[data-first-expression]",I),this.addMentionHeading("[data-first-field]",E)}removeMentionHeadings(){document.querySelectorAll(`.${tn.arcgisAppCkeditorMentionHeader}`).forEach(I=>I.remove())}addMentionHeading(I,E){let O=document.querySelector(I);if(O){let H=document.createElement("div");H.setAttribute("class",tn.arcgisAppCkeditorMentionHeader),H.textContent=E,O.parentElement?.insertAdjacentElement("beforebegin",H)}}getFields(I){let E=this.isItemMatching.bind(this,I);return new Promise(O=>{setTimeout(()=>{let H=this.mentionFields?.filter(E),q=H?.filter(v=>this.isExpression(v)),z=H?.filter(v=>!this.isExpression(v));q.length&&(q[0].isFirstExpression=!0),z.length&&(z[0].isFirstField=!0);let oe=q.concat(z);this.groupFieldsAndExpressions&&setTimeout(()=>this.updateMentionHeadings(),10),O(oe)},100)})}isItemMatching(I,E){let O=I.toLowerCase();return E.name.toLowerCase().includes(O)||E.id.toLowerCase().includes(O)}customItemRenderer(I){let E=document.createElement("div");E.setAttribute("class",`custom-item ${tn.arcgisAppCkeditorMentionItemContainer}`),I.isFirstExpression&&E.setAttribute("data-first-expression",""),I.isFirstField&&E.setAttribute("data-first-field","");let O=document.createElement("div");return O.setAttribute("class",tn.arcgisAppCkeditorMentionItem),E.appendChild(O),O.innerHTML=`<span class="heading">${I.name}</span><span class="summary">${I.id}</span>`,E.id=`mention-list-item-id-${I.id}`,E.appendChild(O),E}postProcessCkeditorHtml(){let I=this.editor.getData(),E=this.sanitizer.sanitize(I),O=document.createElement("div");O.innerHTML=E;let H=O.querySelectorAll("span.mention");for(let q=0;q<H.length;++q){let z=document.createTextNode(H[q].textContent??"");H[q].parentNode?.replaceChild(z,H[q])}return O.innerHTML}isExpression(I){return this.customExpressionCheck?this.customExpressionCheck(I):this.defaultExpressionCheck(I)}defaultExpressionCheck(I){return I.id.includes(m_.expression)}render(){return n_`${this.actualLanguage!=="en"&&this.languageScript||""}<div class=${`${tn.arcgisAppCkeditor} ${this.propClass}`}><textarea placeholder=${(this.readOnly?void 0:this.intlTextPlaceHolder)??c_} ${a_(this.textAreaElement)}></textarea></div>`}},P_=["af","ar","ast","az","bg","bn","bs","ca","cs","da","de-ch","de","el","en-au","en-gb","eo","es-co","es","et","eu","fa","fi","fr","gl","gu","he","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","ku","lt","lv","ms","nb","ne","nl","no","oc","pl","pt-br","pt","ro","ru","si","sk","sl","sq","sr-latn","sr","sv","th","tk","tr","tt","ug","uk","ur","uz","vi","zh-cn","zh"];d_("arcgis-ckeditor5",wd);export{wd as ArcgisCkeditor5};
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{I as i,x as e}from"./AFBKMYU6.js";var a=e(i,{"arcgis-ckeditor5":[()=>import("./
|
|
2
|
+
import{I as i,x as e}from"./AFBKMYU6.js";var a=e(i,{"arcgis-ckeditor5":[()=>import("./V5SIP2PW.js"),"canResizeVertically,currentLanguage,customConfig,customExpressionCheck:,editorType,groupFieldsAndExpressions,intlExpressionsGroupHeading,intlFieldsGroupHeading,intlTextPlaceHolder,mentionFields:,readOnly,textData;getData,setFocus"],"arcgis-ckeditor5-popover":[()=>import("./LBD3GPSD.js"),"guid,intlCancel,intlLabel,intlOk,refElement:;reposition"],"arcgis-color-input":[()=>import("./PSITQBDP.js"),"_messages:,clearable,color,compact,disabled,hideRecentColors,messageOverrides:,placement,popoverProps:,showTransparency,storageId;close,setFocus;isOpen"],"arcgis-coordinate-system-picker":[()=>import("./77HZGUSC.js"),"_messages:,autoFilterToDefault,defaultWkid,filterEnabled,hideCategories:,value:;getSRDescription"],"arcgis-coordinate-system-picker-tree":[()=>import("./L5RMOAO3.js"),"data:,value"],"arcgis-field-info":[()=>import("./GTW54IOJ.js"),"_messages:,fieldName,hideAlias,hideNumericFormat,hideStatistics,layer:,view:;refresh"],"arcgis-field-pick-list":[()=>import("./ZDMNUSIJ.js"),"_messages:,customExpressionCheck:,expressionsGroupHeading,fields:,fieldsGroupHeading,filterNoResultsText,filterPlaceholderText,groupFieldsAndExpressions,heading,hideCancel,hideSort,layer:,listOnly,mapView:,multiple,okBtnText,popoverProps:,selectedFields:,showCancel,showDescription,showFieldInfo,showFieldName,showFieldTypeIcon,showFilterLength,showSelectionAll,showSort,sortBy,view:;reposition,setDisabled,setFocus"],"arcgis-histogram":[()=>import("./JPD7Z3MB.js"),"_messages:,average,bins:,colorBlendingEnabled,colorStops:,dataLines:,icon,label,layout,max,messageOverrides:,min,standardDeviation"],"arcgis-label-input":[()=>import("./2XA6O2MP.js"),"alignment,editing,labelFormatter:,readOnly,value;edit;getLabelBoundingClientRect"],"arcgis-picker-input":[()=>import("./XRARFMJ7.js"),"disabled,heading,iconEnd,intlDone,label,popoverProps:;close,setFocus"],"arcgis-ramp-color":[()=>import("./WEKRF34E.js"),"layout,max,min,stops:"],"arcgis-ramp-color-break":[()=>import("./VQLI4IE7.js"),"layout,max,min,stops:"],"arcgis-ramp-opacity":[()=>import("./MCZBUYS5.js"),"fillColor,layout,max,min,stops:"],"arcgis-slider":[()=>import("./LB7I345F.js"),"activeValue:,allowValuesOverlap,autoDestroyDisabled,disabled,fillPlacement,fullRangeMax,fullRangeMin,keyboardLargeStep,labelFormatter:,layout,max,messageOverrides:,messages:,min,mirrored,popoverLabel,popoverPlacement,precision,rangeLabelsEditingEnabled,rangeLabelsPlacement,segmentsDraggingDisabled,showRangeLabels,steps,valueLabelsDisplay,valueLabelsEditingEnabled,valueLabelsPlacement,values;destroy"],"arcgis-slider-input":[()=>import("./OBIWQRXY.js"),"disabled,flipLabels,label,max,min,scale,step,unitsLabel,value,withSteppers"],"arcgis-ticks":[()=>import("./TXYPZ6MB.js"),"interactive,interpolationExponent,labelFormatter:,labelPlacement,layout,max,min,mirrored,mode,showBaseline,showLabels,values"],"arcgis-unique-values-list":[()=>import("./5URV6773.js"),"_messages:,fieldName,layer:,maxHeight,multiple,numberFormatOptions:,partialUniqueValues,selectedValues:,showFilterLength,sortBy,uniqueValues:,view:,visualizationSource;getUniqueValues,setFocus"],"arcgis-value-picker":[()=>import("./4W7JZPB6.js"),"autoDestroyDisabled,disabled,hideNextButton,hidePlayButton,hidePreviousButton,icon,label,layout,loop,messages:,playRate,state:;destroy;next,pause,play,previous"],"arcgis-value-picker-collection":[()=>import("./3P53QRGS.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,items:;destroy;reset,step"],"arcgis-value-picker-combobox":[()=>import("./L2JNUMXB.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,disabled,items:,messages:;destroy;reset,step"],"arcgis-value-picker-label":[()=>import("./LKUOAV7B.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue:,items:;destroy;reset,step"],"arcgis-value-picker-slider":[()=>import("./GVOQ2CB7.js"),"autoDestroyDisabled,canNext,canPlay,canPrevious,currentValue,disabled,labelFormatter:,labels:,layout,majorTicks:,max,min,minorTicks:,mirrored,steps:;destroy;reset,step"]});a({resourcesUrl:import.meta.url});var s=new CSSStyleSheet;s.replaceSync("@layer{:not([hydrated]):is(arcgis-ckeditor5,arcgis-ckeditor5-popover,arcgis-color-input,arcgis-coordinate-system-picker,arcgis-coordinate-system-picker-tree,arcgis-field-info,arcgis-field-pick-list,arcgis-histogram,arcgis-label-input,arcgis-picker-input,arcgis-ramp-color,arcgis-ramp-color-break,arcgis-ramp-opacity,arcgis-slider,arcgis-slider-input,arcgis-ticks,arcgis-unique-values-list,arcgis-value-picker,arcgis-value-picker-collection,arcgis-value-picker-combobox,arcgis-value-picker-label,arcgis-value-picker-slider){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,s];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,i)
|
package/dist/cdn/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer{:not([hydrated]):is(arcgis-ckeditor5,arcgis-ckeditor5-popover,arcgis-color-input,arcgis-coordinate-system-picker,arcgis-coordinate-system-picker-tree,arcgis-field-info,arcgis-field-pick-list,arcgis-histogram,arcgis-label-input,arcgis-picker-input,arcgis-ramp-color,arcgis-ramp-color-break,arcgis-ramp-opacity,arcgis-slider,arcgis-slider-input,arcgis-ticks,arcgis-unique-values-list,arcgis-value-picker,arcgis-value-picker-collection,arcgis-value-picker-combobox,arcgis-value-picker-label,arcgis-value-picker-slider){visibility:hidden}
|
|
1
|
+
@layer{:not([hydrated]):is(arcgis-ckeditor5,arcgis-ckeditor5-popover,arcgis-color-input,arcgis-coordinate-system-picker,arcgis-coordinate-system-picker-tree,arcgis-field-info,arcgis-field-pick-list,arcgis-histogram,arcgis-label-input,arcgis-picker-input,arcgis-ramp-color,arcgis-ramp-color-break,arcgis-ramp-opacity,arcgis-slider,arcgis-slider-input,arcgis-ticks,arcgis-unique-values-list,arcgis-value-picker,arcgis-value-picker-collection,arcgis-value-picker-combobox,arcgis-value-picker-label,arcgis-value-picker-slider){visibility:hidden}}
|
|
@@ -1,70 +1,78 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
function
|
|
3
|
-
return e != null && typeof e == "object" && "type" in e && e.type ===
|
|
2
|
+
function n(e, r) {
|
|
3
|
+
return e != null && typeof e == "object" && "type" in e && e.type === r;
|
|
4
4
|
}
|
|
5
5
|
function u(e) {
|
|
6
|
-
return
|
|
6
|
+
return n(e, "annotation-feature");
|
|
7
7
|
}
|
|
8
8
|
function a(e) {
|
|
9
|
-
return
|
|
9
|
+
return n(e, "csv");
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function i(e) {
|
|
12
|
+
return n(e, "dimension-feature");
|
|
13
13
|
}
|
|
14
14
|
function s(e) {
|
|
15
|
-
return
|
|
15
|
+
return t(e) && !e.url;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function t(e) {
|
|
18
|
+
return n(e, "feature");
|
|
19
19
|
}
|
|
20
20
|
function o(e) {
|
|
21
|
-
return
|
|
21
|
+
return n(e, "geojson");
|
|
22
22
|
}
|
|
23
23
|
function y(e) {
|
|
24
|
-
return
|
|
24
|
+
return n(e, "imagery");
|
|
25
25
|
}
|
|
26
26
|
function c(e) {
|
|
27
|
-
return
|
|
27
|
+
return n(e, "imagery-tile");
|
|
28
28
|
}
|
|
29
29
|
function f(e) {
|
|
30
|
-
return
|
|
30
|
+
return n(e, "map-image");
|
|
31
|
+
}
|
|
32
|
+
function L(e) {
|
|
33
|
+
return n(e, "ogc-feature");
|
|
31
34
|
}
|
|
32
35
|
function p(e) {
|
|
33
|
-
return
|
|
36
|
+
return n(e, "scene");
|
|
34
37
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
38
|
+
function m(e) {
|
|
39
|
+
return n(e, "stream");
|
|
37
40
|
}
|
|
38
41
|
function b(e) {
|
|
39
|
-
return
|
|
42
|
+
return n(e, "sublayer") && "parent" in e;
|
|
40
43
|
}
|
|
41
44
|
function g(e) {
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
function m(e) {
|
|
45
|
-
return r(e, "voxel");
|
|
45
|
+
return n(e, "subtype-group") && "sublayers" in e;
|
|
46
46
|
}
|
|
47
47
|
function S(e) {
|
|
48
|
-
return
|
|
48
|
+
return n(e, "subtype-sublayer");
|
|
49
49
|
}
|
|
50
50
|
function l(e) {
|
|
51
|
-
return
|
|
51
|
+
return n(e, "voxel");
|
|
52
|
+
}
|
|
53
|
+
function F(e) {
|
|
54
|
+
return n(e, "wcs");
|
|
55
|
+
}
|
|
56
|
+
function C(e) {
|
|
57
|
+
return n(e, "wfs");
|
|
52
58
|
}
|
|
53
59
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
F as a,
|
|
61
|
+
l as b,
|
|
62
|
+
s as c,
|
|
63
|
+
y as d,
|
|
64
|
+
S as e,
|
|
59
65
|
t as f,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
m as g,
|
|
67
|
+
C as h,
|
|
68
|
+
c as i,
|
|
69
|
+
b as j,
|
|
70
|
+
g as k,
|
|
71
|
+
f as l,
|
|
72
|
+
L as m,
|
|
73
|
+
a as n,
|
|
74
|
+
p as o,
|
|
75
|
+
o as p,
|
|
76
|
+
u as q,
|
|
77
|
+
i as r
|
|
70
78
|
};
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { EditorType, InputMentionField } from "./types.js";
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @cssproperty [--arcgis-ckeditor5-initial-height] - Specifies the initial height of the component.
|
|
7
|
+
* @cssproperty [--arcgis-ckeditor5-max-width] - Specifies the maximum width of the component.
|
|
8
|
+
* @cssproperty [--arcgis-ckeditor5-mentions-max-width] - Specifies the maximum width of the mention popover.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
6
11
|
export abstract class ArcgisCkeditor5 extends LitElement {
|
|
7
12
|
/**
|
|
8
13
|
* The editor's text area will have a vertical resize handle if set to true
|
|
@@ -35672,7 +35672,7 @@ Please report this to https://github.com/markedjs/marked.`, e.silent) return "<p
|
|
|
35672
35672
|
})(ar, ar.exports)), ar.exports;
|
|
35673
35673
|
}
|
|
35674
35674
|
var xB = yB();
|
|
35675
|
-
const la = /* @__PURE__ */ vB(xB), EB = bB`@layer{.arcgis-app-ckeditor{max-width:var(--arcgis-ckeditor5-max-width);font-family:var(--calcite-font-family);background:var(--calcite-color-foreground-1);border-radius:3px;.ck-source-editing-area,.ck-editor__editable_inline{height:var(--arcgis-ckeditor5-initial-height)}&.readOnly{.ck.ck-content.ck-editor__editable{border-radius:0}}&.resizable{.ck.ck-content.ck-editor__editable,.ck-source-editing-area textarea{resize:vertical}}&.generic-code-blocks{.ck.ck-editor__editable pre[data-language]:after,.ck-code-block-dropdown .ck-splitbutton__arrow{display:none}}.ck.ck-toolbar{background-color:#f3f3f3;border-color:var(--calcite-color-border-1)}.ck-editor__editable_inline{overflow-y:scroll;box-sizing:border-box}.ck-content{font-size:var(--calcite-font-size-0);h2{font-size:var(--calcite-font-size-3)}h3{font-size:var(--calcite-font-size-2)}h4{font-size:var(--calcite-font-size-1)}span.mention{background-color:inherit!important;color:inherit!important}ul,ol{padding-inline-start:2rem}}.ck-editor .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--calcite-color-border-1)}.ck-source-editing-area{overflow:hidden;textarea{overflow:unset!important}}.ck-editor .ck-source-editing-button{.ck-button__label{display:none!important}}}.ck-body .ck.ck-balloon-panel{box-shadow:val(--calcite-shadow-1);border:1px solid var(--calcite-color-border-1);border-radius:3px;.ck.ck-reset.ck-list.ck-mentions{max-width:var(--arcgis-ckeditor5-mentions-max-width)}.arcgis-app-ckeditor-mention-header{font-weight:500;line-height:1.25rem;padding-left:var(--calcite-space-lg);padding-top:var(--calcite-space-sm);padding-bottom:var(--calcite-space-sm);padding-right:var(--calcite-space-lg);width:100%;display:block;background-color:var(--calcite-color-background);font-family:var(--calcite-font-family)}}.ck.ck-balloon-panel.ck-tooltip{min-width:auto}.ck.ck-list__item .arcgis-app-ckeditor-mention-item-container.ck-button{--ck-list-button-padding: 0px;padding:0;position:relative!important;border-bottom:1px solid var(--calcite-color-foreground-3)!important;.arcgis-app-ckeditor-mention-item{cursor:pointer!important;display:flex!important;background-color:var(--calcite-color-foreground-1)!important;flex-flow:column!important;padding:var(--calcite-space-sm) var(--calcite-space-md)!important;transition:background-color calc(.25s / 3) ease-in-out!important;&:hover,&:focus{background-color:var(--calcite-color-foreground-3)!important}.heading{overflow:hidden!important;pointer-events:none!important;text-overflow:ellipsis!important;color:var(--calcite-color-neutral-blk-180)!important;font-family:var(--calcite-font-family)!important}.summary{overflow:hidden!important;pointer-events:none!important;text-overflow:ellipsis!important;color:var(--calcite-color-neutral-blk-180)!important;font-size:var(--calcite-font-size-sm)!important;font-family:var(--calcite-code-family)!important}}&.ck-on .arcgis-app-ckeditor-mention-item{background-color:var(--calcite-color-foreground-3)!important;border-color:#00619b!important;z-index:1!important}}arcgis-ckeditor5-popover{.arcgis-app-ckeditor{box-shadow:0 0 #0000;padding:var(--calcite-space-lg) var(--calcite-space-lg) 0 var(--calcite-space-lg)}}}`;
|
|
35675
|
+
const la = /* @__PURE__ */ vB(xB), EB = bB`@layer{.arcgis-app-ckeditor{max-width:var(--arcgis-ckeditor5-max-width, 35vw);font-family:var(--calcite-font-family);background:var(--calcite-color-foreground-1);border-radius:3px;.ck-source-editing-area,.ck-editor__editable_inline{height:var(--arcgis-ckeditor5-initial-height, 30vh)}&.readOnly{.ck.ck-content.ck-editor__editable{border-radius:0}}&.resizable{.ck.ck-content.ck-editor__editable,.ck-source-editing-area textarea{resize:vertical}}&.generic-code-blocks{.ck.ck-editor__editable pre[data-language]:after,.ck-code-block-dropdown .ck-splitbutton__arrow{display:none}}.ck.ck-toolbar{background-color:#f3f3f3;border-color:var(--calcite-color-border-1)}.ck-editor__editable_inline{overflow-y:scroll;box-sizing:border-box}.ck-content{font-size:var(--calcite-font-size-0);h2{font-size:var(--calcite-font-size-3)}h3{font-size:var(--calcite-font-size-2)}h4{font-size:var(--calcite-font-size-1)}span.mention{background-color:inherit!important;color:inherit!important}ul,ol{padding-inline-start:2rem}}.ck-editor .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--calcite-color-border-1)}.ck-source-editing-area{overflow:hidden;textarea{overflow:unset!important}}.ck-editor .ck-source-editing-button{.ck-button__label{display:none!important}}}.ck-body .ck.ck-balloon-panel{box-shadow:val(--calcite-shadow-1);border:1px solid var(--calcite-color-border-1);border-radius:3px;.ck.ck-reset.ck-list.ck-mentions{max-width:var(--arcgis-ckeditor5-mentions-max-width, 33vw)}.arcgis-app-ckeditor-mention-header{font-weight:500;line-height:1.25rem;padding-left:var(--calcite-space-lg);padding-top:var(--calcite-space-sm);padding-bottom:var(--calcite-space-sm);padding-right:var(--calcite-space-lg);width:100%;display:block;background-color:var(--calcite-color-background);font-family:var(--calcite-font-family)}}.ck.ck-balloon-panel.ck-tooltip{min-width:auto}.ck.ck-list__item .arcgis-app-ckeditor-mention-item-container.ck-button{--ck-list-button-padding: 0px;padding:0;position:relative!important;border-bottom:1px solid var(--calcite-color-foreground-3)!important;.arcgis-app-ckeditor-mention-item{cursor:pointer!important;display:flex!important;background-color:var(--calcite-color-foreground-1)!important;flex-flow:column!important;padding:var(--calcite-space-sm) var(--calcite-space-md)!important;transition:background-color calc(.25s / 3) ease-in-out!important;&:hover,&:focus{background-color:var(--calcite-color-foreground-3)!important}.heading{overflow:hidden!important;pointer-events:none!important;text-overflow:ellipsis!important;color:var(--calcite-color-neutral-blk-180)!important;font-family:var(--calcite-font-family)!important}.summary{overflow:hidden!important;pointer-events:none!important;text-overflow:ellipsis!important;color:var(--calcite-color-neutral-blk-180)!important;font-size:var(--calcite-font-size-sm)!important;font-family:var(--calcite-code-family)!important}}&.ck-on .arcgis-app-ckeditor-mention-item{background-color:var(--calcite-color-foreground-3)!important;border-color:#00619b!important;z-index:1!important}}arcgis-ckeditor5-popover{.arcgis-app-ckeditor{box-shadow:0 0 #0000;padding:var(--calcite-space-lg) var(--calcite-space-lg) 0 var(--calcite-space-lg)}}}`;
|
|
35676
35676
|
class DB extends mB {
|
|
35677
35677
|
constructor() {
|
|
35678
35678
|
super(), this.textAreaElement = fB(), this.actualLanguage = "en", this.sanitizer = new AB({
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @cssproperty [--arcgis-coordinate-system-picker-height] - Specifies the height of the component.
|
|
7
|
+
* @cssproperty [--arcgis-coordinate-system-picker-min-width] - Specifies the minimum width of the component.
|
|
8
|
+
* @cssproperty [--arcgis-coordinate-system-picker-max-width] - Specifies the maximum width of the component.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
6
11
|
export abstract class ArcgisCoordinateSystemPicker extends LitElement {
|
|
7
12
|
/**
|
|
8
13
|
* Contains the translations for this component.
|