@qaecy/cue-ui 0.0.60 → 0.0.62
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/1359.js +1 -1
- package/1837.js +1 -1
- package/1842.js +1 -0
- package/2317.js +1 -1
- package/2538.js +1 -0
- package/2713.js +7 -0
- package/2775.js +1 -1
- package/2839.js +1 -1
- package/3036.js +1 -1
- package/3202.js +1 -1
- package/3418.js +1 -1
- package/3523.js +1 -1
- package/3577.js +1 -1
- package/3614.js +1 -1
- package/3654.js +1 -0
- package/3656.js +1 -1
- package/366.js +1 -0
- package/4098.js +1 -1
- package/426.js +1 -0
- package/468.js +1 -0
- package/4791.js +1 -1
- package/5649.js +1 -1
- package/5872.js +1 -1
- package/6233.js +1 -1
- package/6419.js +1 -1
- package/6947.js +1 -1
- package/7019.js +1 -0
- package/7193.js +1 -0
- package/7719.js +1 -1
- package/7727.js +1 -1
- package/8725.js +1 -0
- package/9396.js +1 -1
- package/992.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/1701.js +0 -1
- package/2530.js +0 -1
- package/329.js +0 -1
- package/3842.js +0 -1
- package/3869.js +0 -1
- package/4311.js +0 -1
- package/6040.js +0 -1
- package/7154.js +0 -1
- package/928.js +0 -1
package/3869.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[3869],{3183(O,M,a){a.d(M,{A:()=>d});var E=a(7705),_=a(5802),u=a(9417),f=a(1359),x=a(8957),T=a(2245),k=a(5381),o=a(5547);const s=(p,l)=>l.value;function v(p,l){if(1&p){const e=o.RV6();o.j41(0,"cue-input",6),o.bIt("valueChange",function(r){_.eBV(e);const n=o.XpG();return n.searchText=r,_.Njj(n.onSearchChange())}),o.k0s()}if(2&p){const e=o.XpG();o.Y8G("value",e.searchText)}}function i(p,l){if(1&p){const e=o.RV6();o.j41(0,"cue-checkbox",7),o.bIt("checkedChange",function(r){const n=_.eBV(e).$implicit,y=o.XpG();return n.selected=r,_.Njj(y.onSelectionChange())}),o.k0s()}if(2&p){const e=l.$implicit;o.Y8G("label",e.value||"(blank)")("checked",e.selected)}}function D(p,l){1&p&&(o.j41(0,"cue-typography",5),o.EFF(1,"No results"),o.k0s())}let d=(()=>{class p{_cdr=(0,_.WQX)(E.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(e){this._params=e}afterGuiAttached(e){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(e=>!e.selected)}doesFilterPass(e){const c=new Set(this.options.filter(t=>t.selected).map(t=>t.value)),r=this._params.getValue(e.node),n=null==r?"":String(r);return"..."===n||"Loading..."===n||(""===n?c.has(""):n.split(", ").map(t=>t.trim()).some(t=>c.has(t)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(e=>e.selected).map(e=>e.value)}:null}setModel(e){if(e){const c=new Set(e.selectedValues);this.options.forEach(r=>r.selected=c.has(r.value))}else this.options.forEach(c=>c.selected=!0);this._applySearch(),this._cdr.markForCheck()}onSelectionChange(){this._params.filterChangedCallback(),this._cdr.markForCheck()}onSearchChange(){this._applySearch(),this._cdr.markForCheck()}get allSelected(){return this.options.length>0&&this.options.every(e=>e.selected)}toggleAll(e){this.options.forEach(c=>c.selected=e),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const e=new Set;this._params.api.forEachNode(r=>{const n=this._params.getValue(r);if(null==n||""===n)e.add("");else{const y=String(n);if("..."===y||"Loading..."===y)return;const t=y.split(", ").map(h=>h.trim());for(const h of t)e.add(h)}});const c=new Map(this.options.map(r=>[r.value,r.selected]));this.options=Array.from(e).sort((r,n)=>r.localeCompare(n)).map(r=>({value:r,selected:c.get(r)??!0})),this._applySearch()}_applySearch(){const e=this.searchText.toLowerCase().trim();this.filteredOptions=e?this.options.filter(c=>c.value.toLowerCase().includes(e)):this.options}static \u0275fac=function(c){return new(c||p)};static \u0275cmp=o.VBU({type:p,selectors:[["cue-multi-select-filter"]],decls:7,vars:3,consts:[["direction","column","gap","s"],["placeholder","Search...","size","s",3,"value"],["size","s","label","Select all",3,"checkedChange","checked"],[1,"msf-list"],["size","s",3,"label","checked"],["size","s"],["placeholder","Search...","size","s",3,"valueChange","value"],["size","s",3,"checkedChange","label","checked"]],template:function(c,r){1&c&&(o.j41(0,"cue-flexcontainer",0),o.nVh(1,v,1,1,"cue-input",1),o.j41(2,"cue-checkbox",2),o.bIt("checkedChange",function(y){return r.toggleAll(y)}),o.k0s(),o.j41(3,"div",3),o.Z7z(4,i,1,2,"cue-checkbox",4,s),o.nVh(6,D,2,0,"cue-typography",5),o.k0s()()),2&c&&(o.R7$(),o.vxM(r.options.length>10?1:-1),o.R7$(),o.Y8G("checked",r.allSelected),o.R7$(2),o.Dyx(r.filteredOptions),o.R7$(2),o.vxM(0===r.filteredOptions.length?6:-1))},dependencies:[u.YN,f.Checkbox,x.Input,T.Typography,k.FlexContainer],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:200px;max-width:300px;box-sizing:border-box}.msf-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;max-height:200px;overflow-y:auto}"],changeDetection:0})}return p})()},5902(O,M,a){a.d(M,{U:()=>D});var E=a(7705),_=a(5802),u=a(2271),f=a(9352),x=a(8957),T=a(63),k=a(2245),o=a(5381),s=a(5547);function v(d,p){if(1&d){const l=s.RV6();s.j41(0,"cue-input",4),s.bIt("valueChange",function(c){_.eBV(l);const r=s.XpG();return _.Njj(r.onValueChange(c))}),s.k0s()}if(2&d){const l=s.XpG();s.Y8G("value",l.filterText)}}function i(d,p){if(1&d){const l=s.RV6();s.j41(0,"cue-typography",5),s.bIt("click",function(){_.eBV(l);const c=s.XpG();return _.Njj(c.clear())}),s.EFF(1,"Clear"),s.k0s()}}let D=(()=>{class d{_cdr=(0,_.WQX)(E.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,f.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,f.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,f.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,f.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,f.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,f.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,f.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,f.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,u.EW)(()=>({contains:this._labelContains(),notContains:this._labelNotContains(),equals:this._labelEquals(),notEqual:this._labelNotEqual(),startsWith:this._labelStartsWith(),endsWith:this._labelEndsWith(),blank:this._labelBlank(),notBlank:this._labelNotBlank()}));showTextInput=(0,u.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(l){this._params=l}afterGuiAttached(l){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(l){const e=this._params.getValue(l.node),c=null==e?"":String(e),r=this.filterText.toLowerCase().trim(),n=c.toLowerCase();switch(this.filterType){case"contains":default:return n.includes(r);case"notContains":return!n.includes(r);case"equals":return n===r;case"notEqual":return n!==r;case"startsWith":return n.startsWith(r);case"endsWith":return n.endsWith(r);case"blank":return""===c;case"notBlank":return""!==c}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(l){this.filterText=l?.filter??"",this.filterType=l?.type??"contains",this._cdr.markForCheck()}onValueChange(l){this.filterText=l,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(l){this.filterType=String(l||"contains"),["blank","notBlank"].includes(this.filterType)&&(this.filterText=""),this._params.filterChangedCallback(),this._cdr.markForCheck()}clear(){this.filterText="",this.filterType="contains",this._params.filterChangedCallback(),this._cdr.markForCheck()}static \u0275fac=function(e){return new(e||d)};static \u0275cmp=s.VBU({type:d,selectors:[["cue-text-filter"]],decls:4,vars:5,consts:[["direction","column","gap","s"],["size","s",3,"valueChange","value","options","labelMap"],["placeholder","Filter...","size","s",3,"value"],["size","s",2,"cursor","pointer","text-align","right"],["placeholder","Filter...","size","s",3,"valueChange","value"],["size","s",2,"cursor","pointer","text-align","right",3,"click"]],template:function(e,c){1&e&&(s.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),s.bIt("valueChange",function(n){return c.onFilterTypeChange(n)}),s.k0s(),s.nVh(2,v,1,1,"cue-input",2),s.nVh(3,i,2,0,"cue-typography",3),s.k0s()),2&e&&(s.R7$(),s.Y8G("value",c.filterType)("options",c.filterTypeOptions)("labelMap",c.filterTypeLabelMap()),s.R7$(),s.vxM(c.showTextInput()?2:-1),s.R7$(),s.vxM(c.filterText||"contains"!==c.filterType?3:-1))},dependencies:[x.Input,T.Select,k.Typography,o.FlexContainer],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:180px;max-width:280px;box-sizing:border-box}"],changeDetection:0})}return d})()},5448(O,M,a){a.d(M,{ButtonLabel:()=>x});var E=a(7705),_=a(2245),u=a(5547);const f=["*"];let x=(()=>{class T{fontSize=(0,E.hFB)("m");italic=(0,E.hFB)(!1);noWrap=(0,E.hFB)(!0);static \u0275fac=function(s){return new(s||T)};static \u0275cmp=u.VBU({type:T,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:f,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(s,v){1&s&&(u.NAR(),u.j41(0,"div")(1,"cue-typography",0),u.SdG(2),u.k0s()()),2&s&&(u.R7$(),u.Y8G("size",v.fontSize())("italic",v.italic())("noWrap",v.noWrap()))},dependencies:[_.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return T})()},6103(O,M,a){a.d(M,{N:()=>f});var E=a(2306),_=a(140),u=a(58);function f({entityData:x,availableEntityRelationships:T}){const k=d=>T.find(p=>p.iri===d)?.label??d.split("#").pop()??d,o=[],s={};for(const[d,p]of Object.entries(x)){for(const l of p.directMapGeometries??[])o.push({iri:d,wkt:l.wkt});for(const l of p.indirectMapGeometries??[]){s[l.rel]||(s[l.rel]=[]);for(const e of l.geometries)s[l.rel].push({iri:l.entityUUID,wkt:e.wkt})}}const v=(d,p,l)=>{if(!p.length)return null;const e=new E.ux(d,d);return e.category=l,e.collection=new _.o(p.flatMap(({iri:c,wkt:r})=>{const n=(0,u.S)(r);return n?[{type:"Feature",geometry:(0,u.n)(n),properties:{iri:c}}]:[]})),e},i=[],D=v("direct",o,"Direct");D&&i.push(D);for(const[d,p]of Object.entries(s)){const l=k(d),e=v(l,p,l);e&&i.push(e)}return i}},7643(O,M,a){a.d(M,{CueEntityList:()=>r});var E=a(467),_=a(7705),u=a(5802),f=a(2271),x=a(2839),T=a(5381),k=a(2245),o=a(9769),s=a(7851),v=a(7293),i=a(5547);function D(n,y){if(1&n&&(i.j41(0,"cue-flexcontainer",2)(1,"cue-typography",4),i.EFF(2),i.k0s()()),2&n){const t=i.XpG(2);i.R7$(2),i.SpI(" ",t.errorMessage()," ")}}function d(n,y){if(1&n){const t=i.RV6();i.j41(0,"cue-ent-list-inner",7),i.bIt("rowClicked",function(g){u.eBV(t);const m=i.XpG(3);return u.Njj(m.rowClicked.emit(g))})("clickedOpen",function(g){u.eBV(t);const m=i.XpG(3);return u.Njj(m.clickedOpen.emit(g))}),i.k0s()}if(2&n){const t=i.XpG(3);i.Y8G("entities",t._displayIris())("entityData",t.entityData())("handlers",t.handlers())("mapboxToken",t.mapboxToken())("paginationPageSize",t.paginationPageSize())("size",t.size())("variant",t.variant())}}function p(n,y){1&n&&(i.j41(0,"cue-flexcontainer",2)(1,"cue-typography",8),i.EFF(2," No project connected. "),i.k0s()())}function l(n,y){if(1&n&&i.nrm(0,"cue-logo-link",6),2&n){let t;const h=i.XpG(3);i.Y8G("projectId",null==(t=h.sdkState())?null:t.projectId)}}function e(n,y){if(1&n&&(i.j41(0,"div",3),i.nVh(1,d,1,7,"cue-ent-list-inner",5)(2,p,3,0,"cue-flexcontainer",2),i.nVh(3,l,1,1,"cue-logo-link",6),i.k0s()),2&n){const t=i.XpG(2);i.Y8G("cueLogoLoader","loading"===t.state()),i.R7$(),i.vxM(t.handlers()?1:"loading"!==t.state()?2:-1),i.R7$(2),i.vxM(t.showLogo()?3:-1)}}function c(n,y){if(1&n&&i.nVh(0,D,3,1,"cue-flexcontainer",2)(1,e,4,3,"div",3),2&n){const t=i.XpG();i.vxM("error"===t.state()?0:1)}}let r=(()=>{class n{iris=(0,_.hFB)([]);categoryIris=(0,_.hFB)(void 0);sdkState=(0,_.hFB)(void 0);mapboxToken=(0,_.hFB)(void 0);paginationPageSize=(0,_.hFB)(10,{transform:_.Udg});size=(0,_.hFB)("m");variant=(0,_.hFB)("none");showLogo=(0,_.hFB)(!1,{transform:_.L39});rowClicked=(0,_.CGW)();clickedOpen=(0,_.CGW)();state=(0,u.vPA)("idle");errorMessage=(0,u.vPA)(null);entityData=(0,u.vPA)({});_entities=(0,u.vPA)(void 0);_categoryResolvedIris=(0,u.vPA)([]);_displayIris=(0,f.EW)(()=>void 0!==this.categoryIris()?this._categoryResolvedIris():this.iris());_unsubscribe;_inputWarningTimer;handlers=(0,f.EW)(()=>{var t=this;const h=this._entities();if(h)return{requestData:(g,m)=>{const C=g.map(b=>b.split("/").pop()).filter(Boolean);h.requestEntityData(C,m)},requestLocations:g=>{if(!this.mapboxToken())return void console.warn("[cue-entity-list] No mapboxToken provided \u2014 skipping map location fetch.");const m=g.map(C=>C.split("/").pop()).filter(Boolean);h.requestEntityLocations(m)},checkHasLocations:(g=(0,E.A)(function*(m){const C=t.sdkState()?.cue,b=t.sdkState()?.projectId;if(!(t.mapboxToken()&&C&&b&&m.length))return!1;const L=`PREFIX qcy: <https://dev.qaecy.com/ont#>\nASK WHERE {\n ?entity qcy:hasEntityCategory ?cat .\n FILTER(?cat IN (${m.map(S=>`<${S}>`).join(" ")}))\n { ?entity qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n UNION\n { ?entity qcy:relatedEntity ?loc . ?loc qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n}`;try{return!0===(yield C.api.sparql(L,b))?.boolean}catch{return!1}}),function(C){return g.apply(this,arguments)})};var g});constructor(){this._inputWarningTimer=setTimeout(()=>{this.sdkState()||console.warn('[cue-entity-list] Required input "sdkState" is not set. Pass a { entities: CueProjectEntities } (or include a `cue` instance) object to load entity data.')},3e3),(0,u.QZP)(()=>{this._setupEntities(this.sdkState()?.entities)}),(0,u.QZP)(()=>{const t=this.categoryIris(),h=this._entities();void 0!==t&&this._fetchByCategories(t,h)})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_setupEntities(t){if(this._teardown(),!t)return this._entities.set(void 0),this.entityData.set({}),void this.state.set("idle");this._entities.set(t),this.state.set("ready"),this._syncEntityData(t),this._unsubscribe=t.entityInfoMap.subscribe(()=>{this._syncEntityData(t)})}_syncEntityData(t){const h=t.entityInfoMap.get(),g={};for(const m of Object.keys(h)){const C=h[m],b=Array.isArray(C.documentRefs)?C.documentRefs.map(P=>"string"==typeof P?{id:P}:P):C.documentRefs;g[t.entityIri(m)]={...C,documentRefs:b}}this.entityData.set(g)}_fetchByCategories(t,h){var g=this;return(0,E.A)(function*(){if(h&&t.length){g.state.set("loading");try{const m=yield h.entitiesByCategory(t);g._categoryResolvedIris.set(m.map(C=>C.iri)),g.state.set("ready")}catch(m){console.error("[cue-entity-list] Failed to fetch entities by category",m),g.errorMessage.set("Failed to load entities for the given categories."),g.state.set("error")}}else g._categoryResolvedIris.set([])})()}_teardown(){this._unsubscribe?.(),this._unsubscribe=void 0}static \u0275fac=function(h){return new(h||n)};static \u0275cmp=i.VBU({type:n,selectors:[["cue-entity-list"]],inputs:{iris:[1,"iris"],categoryIris:[1,"categoryIris"],sdkState:[1,"sdkState"],mapboxToken:[1,"mapboxToken"],paginationPageSize:[1,"paginationPageSize"],size:[1,"size"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},decls:3,vars:1,consts:[["body",""],[3,"ngTemplateOutlet"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"height","100%",3,"entities","entityData","handlers","mapboxToken","paginationPageSize","size","variant"],[2,"position","absolute","top","12px","right","12px","z-index","5",3,"projectId"],[2,"height","100%",3,"rowClicked","clickedOpen","entities","entityData","handlers","mapboxToken","paginationPageSize","size","variant"],[2,"color","#9ca3af","font-size","13px"]],template:function(h,g){if(1&h&&(i.DNE(0,c,2,1,"ng-template",null,0,i.C5r),i.eu8(2,1)),2&h){const m=i.sdS(1);i.R7$(2),i.Y8G("ngTemplateOutlet",m)}},dependencies:[x.u,T.FlexContainer,k.Typography,o.T3,s.k,v.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
|