@qaecy/cue-ui 0.0.50 → 0.0.52
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/1138.js +1 -0
- package/1153.js +1 -0
- package/{247.js → 1247.js} +1 -1
- package/1338.js +1 -0
- package/1359.js +1 -0
- package/1520.js +1 -0
- package/1573.js +1 -0
- package/1931.js +1 -0
- package/1985.js +1 -0
- package/2245.js +1 -0
- package/2269.js +1 -0
- package/2312.js +1 -0
- package/2399.js +1 -0
- package/2724.js +1 -0
- package/2839.js +1 -0
- package/29.js +1 -0
- package/3036.js +1 -0
- package/3039.js +1 -0
- package/{418.js → 3418.js} +1 -1
- package/3523.js +1 -0
- package/4283.js +1 -0
- package/4284.js +1 -0
- package/4311.js +1 -0
- package/4613.js +1 -0
- package/4687.js +1 -0
- package/4879.js +1 -0
- package/503.js +1 -0
- package/5137.js +1 -0
- package/5187.js +1 -0
- package/5500.js +1 -0
- package/5559.js +1 -0
- package/5649.js +1 -0
- package/5738.js +1 -0
- package/5740.js +1 -0
- package/5872.js +1 -0
- package/617.js +1 -0
- package/63.js +1 -0
- package/6376.js +1 -0
- package/640.js +1 -0
- package/6419.js +1 -0
- package/6423.js +1 -0
- package/6586.js +1 -0
- package/6911.js +1 -0
- package/6947.js +1 -0
- package/7056.js +1 -0
- package/7247.js +1 -0
- package/7284.js +1 -0
- package/7441.js +1 -0
- package/7598.js +1 -0
- package/7719.js +1 -0
- package/804.js +1 -0
- package/8336.js +1 -0
- package/836.js +1 -1
- package/8560.js +1 -0
- package/8855.js +1 -0
- package/8957.js +1 -0
- package/9004.js +1 -0
- package/928.js +1 -1
- package/9396.js +1 -0
- package/9417.js +1 -0
- package/9443.js +1 -0
- package/9495.js +1 -0
- package/9695.js +1 -0
- package/9769.js +1 -0
- package/README.md +183 -0
- package/common.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/runtime.js +1 -1
- package/149.js +0 -1
- package/153.js +0 -1
- package/245.js +0 -1
- package/269.js +0 -1
- package/284.js +0 -1
- package/311.js +0 -1
- package/336.js +0 -1
- package/36.js +0 -1
- package/376.js +0 -1
- package/393.js +0 -1
- package/396.js +0 -1
- package/399.js +0 -1
- package/4.js +0 -1
- package/41.js +0 -1
- package/419.js +0 -1
- package/423.js +0 -1
- package/494.js +0 -1
- package/523.js +0 -1
- package/560.js +0 -1
- package/586.js +0 -1
- package/598.js +0 -1
- package/613.js +0 -1
- package/628.js +0 -1
- package/7.js +0 -1
- package/719.js +0 -1
- package/724.js +0 -1
- package/740.js +0 -1
- package/773.js +0 -1
- package/791.js +0 -1
- package/799.js +0 -1
- package/802.js +0 -1
- package/839.js +0 -1
- package/855.js +0 -1
- package/872.js +0 -1
- package/879.js +0 -1
- package/903.js +0 -1
- package/911.js +0 -1
- package/931.js +0 -1
package/928.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[928],{928(
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[928],{928(z,m,a){a.d(m,{CueProjectList:()=>k});var v=a(467),i=a(7705),c=a(5802),l=a(2271),h=a(2611),j=a(8017),f=a(6455),S=a(8334),u=a(2306),_=a(140),g=a(58),y=a(5187),p=a(1951),t=a(5547);function w(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-tabs",0)(1,"cue-tab",1)(2,"cue-ag-grid",2),t.bIt("selectedRows",function(s){c.eBV(e);const r=t.XpG();return c.Njj(r.onSelectedRows(s))}),t.k0s()(),t.j41(3,"cue-tab",3)(4,"cue-map",4),t.bIt("clickedFeature",function(s){c.eBV(e);const r=t.XpG();return c.Njj(r.onMapFeatureClick(s))}),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("variant",e.variant()),t.R7$(2),t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1)("size",e.size())("overlaySettings",e.overlaySettings())("overlayActions",e.overlayActions()),t.R7$(2),t.Y8G("layers",e.mapLayers())("settings",e._mapSettings())("zoomToFit",!0)("hoverTooltipFn",e.mapHoverTooltipFn)}}function x(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-card",5)(1,"cue-ag-grid",7),t.bIt("selectedRows",function(s){c.eBV(e);const r=t.XpG(2);return c.Njj(r.onSelectedRows(s))}),t.k0s()()}if(2&n){const e=t.XpG(2);t.Y8G("variant",e._cardVariant())("padded",!1),t.R7$(),t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1)("size",e.size())}}function P(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-ag-grid",7),t.bIt("selectedRows",function(s){c.eBV(e);const r=t.XpG(2);return c.Njj(r.onSelectedRows(s))}),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1)("size",e.size())}}function C(n,d){if(1&n&&t.nVh(0,x,2,7,"cue-card",5)(1,P,1,5,"cue-ag-grid",6),2&n){const e=t.XpG();t.vxM("none"!==e.variant()?0:1)}}let D=(()=>{class n{projects=(0,i.hFB)([]);mapSettings=(0,i.hFB)(new u.yY);variant=(0,i.hFB)("none");overlaySettings=(0,i.hFB)(new p.K);overlayActions=(0,i.hFB)([]);size=(0,i.hFB)("m");projectSelected=(0,i.CGW)();_cardVariant=(0,l.EW)(()=>this.variant());columnDefs=[{field:"name",headerName:"Project",flex:1}];rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};_mapSettings=(0,l.EW)(()=>({...this.mapSettings(),contextMenu:{showProperties:!1,showFlyTo:!1}}));mapHoverTooltipFn=e=>e.name??null;onSelectedRows(e){const o=e[0]?.id;o&&this.projectSelected.emit(o)}onMapFeatureClick(e){const o=e.feature.properties?.id;o&&this.projectSelected.emit(o)}hasLocations=(0,l.EW)(()=>this.projects().some(e=>!!e.location));mapLayers=(0,l.EW)(()=>{const e=this.projects().filter(s=>!!s.location);if(!e.length)return[];const o=new u.ux("Projects","projects");return o.collection=new _.o(e.flatMap(s=>{const r=(0,g.S)(s.location);return r?[{type:"Feature",geometry:(0,g.n)(r),properties:{name:s.name,id:s.id}}]:[]})),[o]});static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-proj-list"]],inputs:{projects:[1,"projects"],mapSettings:[1,"mapSettings"],variant:[1,"variant"],overlaySettings:[1,"overlaySettings"],overlayActions:[1,"overlayActions"],size:[1,"size"]},outputs:{projectSelected:"projectSelected"},decls:2,vars:1,consts:[[2,"flex","1",3,"variant"],["label","List"],[3,"selectedRows","rowData","columnDefs","rowSelection","showPaginator","size","overlaySettings","overlayActions"],["label","Map"],[3,"clickedFeature","layers","settings","zoomToFit","hoverTooltipFn"],[2,"height","100%","width","100%",3,"variant","padded"],[3,"rowData","columnDefs","rowSelection","showPaginator","size"],[3,"selectedRows","rowData","columnDefs","rowSelection","showPaginator","size"]],template:function(o,s){1&o&&t.nVh(0,w,5,12,"cue-tabs",0)(1,C,2,1),2&o&&t.vxM(s.hasLocations()?0:1)},dependencies:[h.R,j.T,f.t,S.o,y.Card],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}cue-tabs[_ngcontent-%COMP%]{flex:1}cue-ag-grid[_ngcontent-%COMP%]{flex:1}cue-map[_ngcontent-%COMP%]{flex:1;min-height:300px}"],changeDetection:0})}return n})();var M=a(5381),L=a(2245),b=a(7851),T=a(7293);function F(n,d){if(1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function N(n,d){1&n&&t.nrm(0,"cue-logo-link",4)}function R(n,d){if(1&n){const e=t.RV6();t.j41(0,"div",1)(1,"cue-proj-list",3),t.bIt("projectSelected",function(s){c.eBV(e);const r=t.XpG();return c.Njj(r.projectSelected.emit(s))}),t.k0s(),t.nVh(2,N,1,0,"cue-logo-link",4),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("cueLogoLoader","loading"===e.state()),t.R7$(),t.Y8G("projects",e.projects())("mapSettings",e.mapSettings())("variant",e.variant())("size",e.size())("overlaySettings",e._overlaySettings)("overlayActions",e._overlayActions),t.R7$(),t.vxM(e.showLogo()?2:-1)}}let k=(()=>{class n{sdkState=(0,i.hFB)(void 0);mapboxToken=(0,i.hFB)(void 0);variant=(0,i.hFB)("none");size=(0,i.hFB)("m");showLogo=(0,i.hFB)(!1,{transform:i.L39});projectSelected=(0,i.CGW)();state=(0,c.vPA)("idle");errorMessage=(0,c.vPA)(null);_rawProjects=(0,c.vPA)([]);mapSettings=(0,l.EW)(()=>({...new u.yY,mapboxToken:this.mapboxToken()}));projects=(0,l.EW)(()=>this._rawProjects().map(e=>({id:e.id,name:e.name,location:e.location??void 0})));_overlaySettings=Object.assign(new p.K,{mode:"row"});_overlayActions=[{label:"Open in Cue portal",icon:"external-link",action:e=>{const o=e.rowData.id,s=o?`https://cue.qaecy.com/home/project?p=${encodeURIComponent(o)}`:"https://cue.qaecy.com/home/projects";window.open(s,"_blank","noopener,noreferrer")}}];_lastCue;_inputWarningTimer;constructor(){this._inputWarningTimer=setTimeout(()=>{this.sdkState()?.cue||console.warn('[cue-project-list] Required input "sdkState" is not set or missing a `cue` property. Pass a { cue: Cue } object to enable project loading.')},3e3),(0,c.QZP)(()=>{const e=this.sdkState()?.cue;e!==this._lastCue&&(this._lastCue=e,e?this._loadProjects(e.projects):(this._rawProjects.set([]),this.state.set("idle"),this.errorMessage.set(null)))})}ngOnDestroy(){clearTimeout(this._inputWarningTimer)}_loadProjects(e){var o=this;return(0,v.A)(function*(){o.state.set("loading"),o.errorMessage.set(null);try{const s=yield e.listProjects();o._rawProjects.set(s),o.state.set("ready")}catch(s){console.error("[CueProjectList] Failed to load projects:",s),o.errorMessage.set(s instanceof Error?s.message:String(s)),o.state.set("error")}})()}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-project-list"]],inputs:{sdkState:[1,"sdkState"],mapboxToken:[1,"mapboxToken"],variant:[1,"variant"],size:[1,"size"],showLogo:[1,"showLogo"]},outputs:{projectSelected:"projectSelected"},decls:2,vars:1,consts:[["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,"projectSelected","projects","mapSettings","variant","size","overlaySettings","overlayActions"],[2,"position","absolute","top","12px","right","12px","z-index","5"]],template:function(o,s){1&o&&t.nVh(0,F,3,1,"cue-flexcontainer",0)(1,R,3,8,"div",1),2&o&&t.vxM("error"===s.state()?0:1)},dependencies:[D,M.n,L.Typography,b.k,T.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
|
package/9396.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{9396(P,D,s){s.d(D,{CueContextViewer:()=>W});var v=s(467),d=s(7705),c=s(5802),r=s(2271),g=s(7427),p=s(4879),x=s(2839),f=s(6455),y=s(8334),t=s(5547);function _(n,l){1&n&&(t.j41(0,"div",0),t.EFF(1,"Loading context\u2026"),t.k0s())}function C(n,l){1&n&&(t.j41(0,"div",0),t.EFF(1,"No context loaded."),t.k0s())}function I(n,l){if(1&n){const e=t.RV6();t.j41(0,"cue-tabs",1)(1,"cue-tab",4),t.nrm(2,"cue-doc-list",2),t.k0s(),t.j41(3,"cue-tab",5)(4,"cue-ent-list-inner",6),t.bIt("rowClicked",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.entityRowClicked.emit(a))}),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(2),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant()),t.R7$(2),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function w(n,l){if(1&n&&t.nrm(0,"cue-doc-list",2),2&n){const e=t.XpG();t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())}}function b(n,l){if(1&n){const e=t.RV6();t.j41(0,"cue-ent-list-inner",7),t.bIt("rowClicked",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.entityRowClicked.emit(a))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function M(n,l){1&n&&(t.j41(0,"div",0),t.EFF(1,"No items in this context."),t.k0s())}let N=(()=>{class n{contextId=(0,d.hFB)(void 0);handlers=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");contextDoc=(0,d.hFB)(void 0);documentData=(0,d.hFB)({});entityData=(0,d.hFB)({});entityRowClicked=(0,d.CGW)();loading=(0,r.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"document"===e.type));_entityItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"entity"===e.type));hasDocuments=(0,r.EW)(()=>this._docItems().length>0);hasEntities=(0,r.EW)(()=>this._entityItems().length>0);hasBoth=(0,r.EW)(()=>this.hasDocuments()&&this.hasEntities());documentRefs=(0,r.EW)(()=>this._docItems().map(e=>({id:e.id,relevance:e.relevance})));entityIris=(0,r.EW)(()=>this._entityItems().map(e=>e.id));_docHandlers=(0,r.EW)(()=>({requestData:e=>this.handlers()?.requestDocumentData?.(e),requestDownload:e=>this.handlers()?.requestDownloadDocument?.(e),requestOpen:(e,o)=>this.handlers()?.requestOpenDocument?.(e,o),requestOpenInDir:(e,o)=>this.handlers()?.requestOpenDocumentInDir?.(e,o)}));_entityHandlers=(0,r.EW)(()=>({requestData:(e,o)=>this.handlers()?.requestEntityData?.(e,o),requestOpen:e=>this.handlers()?.requestOpenEntity?.(e)}));constructor(){(0,c.QZP)(()=>{const e=this.contextId();e&&this.handlers()?.requestContext?.(e)})}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-context-viewer-inner"]],inputs:{contextId:[1,"contextId"],handlers:[1,"handlers"],variant:[1,"variant"],contextDoc:[1,"contextDoc"],documentData:[1,"documentData"],entityData:[1,"entityData"]},outputs:{entityRowClicked:"entityRowClicked"},decls:6,vars:1,consts:[[1,"cv-status"],[2,"height","100%"],[3,"documentRefs","documentData","handlers","variant"],[2,"height","400px",3,"entities","entityData","handlers"],["label","Documents"],["label","Entities"],[2,"height","100%",3,"rowClicked","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","entities","entityData","handlers"]],template:function(o,a){1&o&&t.nVh(0,_,2,0,"div",0)(1,C,2,0,"div",0)(2,I,5,7,"cue-tabs",1)(3,w,1,4,"cue-doc-list",2)(4,b,1,3,"cue-ent-list-inner",3)(5,M,2,0,"div",0),2&o&&t.vxM(a.loading()?0:a.contextDoc()?a.hasBoth()?2:a.hasDocuments()?3:a.hasEntities()?4:5:1)},dependencies:[p.g,x.u,f.t,y.o],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.cv-status[_ngcontent-%COMP%]{padding:16px;color:var(--cue-color-midgray, #888);font-size:13px}"],changeDetection:0})}return n})();var E=s(5381),R=s(2245),k=s(7851),V=s(7293);function j(n,l){if(1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function F(n,l){1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),t.EFF(2," No project connected. "),t.k0s()())}function T(n,l){if(1&n&&t.nrm(0,"cue-logo-link",5),2&n){const e=t.XpG(2);t.Y8G("projectId",e.projectId())}}function B(n,l){if(1&n){const e=t.RV6();t.j41(0,"div",1)(1,"cue-context-viewer-inner",4),t.bIt("entityRowClicked",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.entityRowClicked.emit(a))}),t.k0s(),t.nVh(2,T,1,1,"cue-logo-link",5),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("cueLogoLoader","loading"===e.state()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant()),t.R7$(),t.vxM(e.showLogo()?2:-1)}}function G(n){return{id:n.id,contentIRI:n.contentIRI??n.id,path:n.path??"",suffix:n.suffix??"",size:n.size??0,tags:n.tags??[],summary:n.summary??"",categories:n.categories??[],subject:n.subject,providerId:n.providerId,relevance:0}}let W=(()=>{class n{cue=(0,d.hFB)(void 0);projectId=(0,d.hFB)(void 0);contextId=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");showLogo=(0,d.hFB)(!1,{transform:d.L39});entityRowClicked=(0,d.CGW)();state=(0,c.vPA)("idle");errorMessage=(0,c.vPA)(null);contextDoc=(0,c.vPA)(void 0);documentData=(0,c.vPA)({});entityData=(0,c.vPA)({});_documents=(0,c.vPA)(void 0);_entities=(0,c.vPA)(void 0);_unsubDocs;_unsubEntities;_inputWarningTimer;_handlers=(0,r.EW)(()=>({requestDocumentData:e=>this._documents()?.requestDocumentData(e),requestEntityData:(e,o)=>this._entities()?.requestEntityData(e,o)}));constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-context-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-context-viewer] Required input "projectId" is not set.'),this.contextId()||console.warn('[cue-context-viewer] Required input "contextId" is not set.')},3e3),(0,c.QZP)(()=>{this._load(this.cue(),this.projectId(),this.contextId())})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_load(e,o,a){var i=this;return(0,v.A)(function*(){if(i._teardown(),i.contextDoc.set(void 0),i.documentData.set({}),i.entityData.set({}),e&&o&&a){i.state.set("loading"),i.errorMessage.set(null);try{const u=yield e.api.contexts.getContext(o,a);i.contextDoc.set(u);const h=new g.f$(e.api,o),m=new g.g8(e.api,o);i._documents.set(h),i._entities.set(m),i._unsubDocs=h.documentInfoMap.subscribe(()=>i._syncDocumentData(h)),i._unsubEntities=m.entityInfoMap.subscribe(()=>i._syncEntityData(m)),i.state.set("ready")}catch(u){console.error("[cue-context-viewer] Failed to load context",u),i.errorMessage.set(u instanceof Error?u.message:"Failed to load context."),i.state.set("error")}}else i.state.set("idle")})()}_syncDocumentData(e){const o=e.documentInfoMap.get(),a={};for(const[i,u]of Object.entries(o))a[i]=G(u);this.documentData.set(a)}_syncEntityData(e){const o=e.entityInfoMap.get(),a={};for(const[i,u]of Object.entries(o))a[i]={value:u.value??i,categories:u.categories??[],mentionCount:u.mentionCount};this.entityData.set(a)}_teardown(){this._unsubDocs?.(),this._unsubEntities?.(),this._unsubDocs=void 0,this._unsubEntities=void 0,this._documents.set(void 0),this._entities.set(void 0)}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{entityRowClicked:"entityRowClicked"},decls:3,vars:1,consts:[["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,"color","#9ca3af","font-size","13px"],[2,"height","100%",3,"entityRowClicked","contextDoc","documentData","entityData","handlers","variant"],[2,"position","absolute","top","12px","left","12px","z-index","5",3,"projectId"]],template:function(o,a){1&o&&t.nVh(0,j,3,1,"cue-flexcontainer",0)(1,F,3,0,"cue-flexcontainer",0)(2,B,3,7,"div",1),2&o&&t.vxM("error"===a.state()?0:"idle"===a.state()?1:2)},dependencies:[N,E.n,R.Typography,k.k,V.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
|
package/9417.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9417],{9417(Sn,Ct,f){f.d(Ct,{BC:()=>ke,YN:()=>On,kq:()=>h,me:()=>w,vS:()=>de});var i=f(5547),s=f(5802),A=f(7705),c=f(2271),Vt=f(1413),At=f(7468),bt=f(6648),Dt=f(6354),ge=f(6494);let me=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,r){this._renderer=e,this._elementRef=r}setProperty(e,r){this._renderer.setProperty(this._elementRef.nativeElement,e,r)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(r){return new(r||t)(i.rXU(i.sFG),i.rXU(i.aKT))};static \u0275dir=i.FsC({type:t})}return t})(),_=(()=>{class t extends me{static \u0275fac=(()=>{let e;return function(o){return(e||(e=i.xGo(t)))(o||t)}})();static \u0275dir=i.FsC({type:t,features:[i.Vt3]})}return t})();const h=new s.nKC(""),Et={provide:h,useExisting:(0,s.Rfq)(()=>w),multi:!0},wt=new s.nKC("");let w=(()=>{class t extends me{_compositionMode;_composing=!1;constructor(e,r,o){super(e,r),this._compositionMode=o,null==this._compositionMode&&(this._compositionMode=!function Ft(){const t=(0,ge.rb)()?(0,ge.rb)().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(r){return new(r||t)(i.rXU(i.sFG),i.rXU(i.aKT),i.rXU(wt,8))};static \u0275dir=i.FsC({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){1&r&&i.bIt("input",function(l){return o._handleInput(l.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(l){return o._compositionEnd(l.target.value)})},standalone:!1,features:[i.Jv_([Et]),i.Vt3]})}return t})();const u=new s.nKC(""),g=new s.nKC("");function Ee(t){return null!=t}function Fe(t){return(0,i.yLl)(t)?(0,bt.H)(t):t}function we(t){let n={};return t.forEach(e=>{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function Oe(t,n){return n.map(e=>e(t))}function Se(t){return t.map(n=>function St(t){return!t.validate}(n)?n:e=>n.validate(e))}function K(t){return null!=t?function Ne(t){if(!t)return null;const n=t.filter(Ee);return 0==n.length?null:function(e){return we(Oe(e,n))}}(Se(t)):null}function J(t){return null!=t?function xe(t){if(!t)return null;const n=t.filter(Ee);return 0==n.length?null:function(e){const r=Oe(e,n).map(Fe);return(0,At.p)(r).pipe((0,Dt.T)(we))}}(Se(t)):null}function Re(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function z(t){return t?Array.isArray(t)?t:[t]:[]}function S(t,n){return Array.isArray(t)?t.includes(n):t===n}function Pe(t,n){const e=z(n);return z(t).forEach(o=>{S(e,o)||e.push(o)}),e}function Ie(t,n){return z(n).filter(e=>!S(t,e))}class Te{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=K(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=J(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control?.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class d extends Te{name;get formDirective(){return null}get path(){return null}}class m extends Te{_parent=null;name=null;valueAccessor=null}class Ge{_cd;constructor(n){this._cd=n}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}}let ke=(()=>{class t extends Ge{constructor(e){super(e)}static \u0275fac=function(r){return new(r||t)(i.rXU(m,2))};static \u0275dir=i.FsC({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){2&r&&i.AVh("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[i.Vt3]})}return t})();const b="VALID",x="INVALID",v="PENDING",D="DISABLED";class C{}class We extends C{value;source;constructor(n,e){super(),this.value=n,this.source=e}}class Y extends C{pristine;source;constructor(n,e){super(),this.pristine=n,this.source=e}}class ee extends C{touched;source;constructor(n,e){super(),this.touched=n,this.source=e}}class R extends C{status;source;constructor(n,e){super(),this.status=n,this.source=e}}class te extends C{source;constructor(n){super(),this.source=n}}function U(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class oe{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(n,e){this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get status(){return(0,c.O8)(this.statusReactive)}set status(n){(0,c.O8)(()=>this.statusReactive.set(n))}_status=(0,c.EW)(()=>this.statusReactive());statusReactive=(0,s.vPA)(void 0);get valid(){return this.status===b}get invalid(){return this.status===x}get pending(){return this.status===v}get disabled(){return this.status===D}get enabled(){return this.status!==D}errors;get pristine(){return(0,c.O8)(this.pristineReactive)}set pristine(n){(0,c.O8)(()=>this.pristineReactive.set(n))}_pristine=(0,c.EW)(()=>this.pristineReactive());pristineReactive=(0,s.vPA)(!0);get dirty(){return!this.pristine}get touched(){return(0,c.O8)(this.touchedReactive)}set touched(n){(0,c.O8)(()=>this.touchedReactive.set(n))}_touched=(0,c.EW)(()=>this.touchedReactive());touchedReactive=(0,s.vPA)(!1);get untouched(){return!this.touched}_events=new Vt.B;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(Pe(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(Pe(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(Ie(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(Ie(n,this._rawAsyncValidators))}hasValidator(n){return S(this._rawValidators,n)}hasAsyncValidator(n){return S(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){const e=!1===this.touched;this.touched=!0;const r=n.sourceControl??this;n.onlySelf||this._parent?.markAsTouched({...n,sourceControl:r}),e&&!1!==n.emitEvent&&this._events.next(new ee(!0,r))}markAllAsDirty(n={}){this.markAsDirty({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(n))}markAllAsTouched(n={}){this.markAsTouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(n))}markAsUntouched(n={}){const e=!0===this.touched;this.touched=!1,this._pendingTouched=!1;const r=n.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:r})}),n.onlySelf||this._parent?._updateTouched(n,r),e&&!1!==n.emitEvent&&this._events.next(new ee(!1,r))}markAsDirty(n={}){const e=!0===this.pristine;this.pristine=!1;const r=n.sourceControl??this;n.onlySelf||this._parent?.markAsDirty({...n,sourceControl:r}),e&&!1!==n.emitEvent&&this._events.next(new Y(!1,r))}markAsPristine(n={}){const e=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;const r=n.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:n.emitEvent})}),n.onlySelf||this._parent?._updatePristine(n,r),e&&!1!==n.emitEvent&&this._events.next(new Y(!0,r))}markAsPending(n={}){this.status=v;const e=n.sourceControl??this;!1!==n.emitEvent&&(this._events.next(new R(this.status,e)),this.statusChanges.emit(this.status)),n.onlySelf||this._parent?.markAsPending({...n,sourceControl:e})}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=D,this.errors=null,this._forEachChild(o=>{o.disable({...n,onlySelf:!0})}),this._updateValue();const r=n.sourceControl??this;!1!==n.emitEvent&&(this._events.next(new We(this.value,r)),this._events.next(new R(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e},this),this._onDisabledChange.forEach(o=>o(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=b,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e},this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n,e){n.onlySelf||(this._parent?.updateValueAndValidity(n),n.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){const r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===b||this.status===v)&&this._runAsyncValidator(r,n.emitEvent)}const e=n.sourceControl??this;!1!==n.emitEvent&&(this._events.next(new We(this.value,e)),this._events.next(new R(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),n.onlySelf||this._parent?.updateValueAndValidity({...n,sourceControl:e})}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?D:b}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n,e){if(this.asyncValidator){this.status=v,this._hasOwnPendingAsyncValidator={emitEvent:!1!==e,shouldHaveEmitted:!1!==n};const r=Fe(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:n})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();const n=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,n}return!1}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent,this,e.shouldHaveEmitted)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((r,o)=>r&&r._find(o),this)}getError(n,e){const r=e?this.get(e):this;return r?.errors?r.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n,e,r){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),(n||r)&&this._events.next(new R(this.status,e)),this._parent&&this._parent._updateControlsErrors(n,e,r)}_initObservables(){this.valueChanges=new s.bkB,this.statusChanges=new s.bkB}_calculateStatus(){return this._allControlsDisabled()?D:this.errors?x:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(v)?v:this._anyControlsHaveStatus(x)?x:b}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n,e){const r=!this._anyControlsDirty(),o=this.pristine!==r;this.pristine=r,n.onlySelf||this._parent?._updatePristine(n,e),o&&this._events.next(new Y(this.pristine,e))}_updateTouched(n={},e){this.touched=this._anyControlsTouched(),this._events.next(new ee(this.touched,e)),n.onlySelf||this._parent?._updateTouched(n,e)}_onDisabledChange=[];_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){U(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function Tt(t){return Array.isArray(t)?K(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function Gt(t){return Array.isArray(t)?J(t):t||null}(this._rawAsyncValidators)}}const V=new s.nKC("",{factory:()=>B}),B="always";function M(t,n,e=B){(function se(t,n){const e=function Ue(t){return t._rawValidators}(t);null!==n.validator?t.setValidators(Re(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const r=function Be(t){return t._rawAsyncValidators}(t);null!==n.asyncValidator?t.setAsyncValidators(Re(r,n.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]);const o=()=>t.updateValueAndValidity();T(n._rawValidators,o),T(n._rawAsyncValidators,o)})(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function Lt(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&qe(t,n)})}(t,n),function $t(t,n){const e=(r,o)=>{n.valueAccessor.writeValue(r),o&&n.viewToModelUpdate(r)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function Wt(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&qe(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function Ht(t,n){if(n.valueAccessor.setDisabledState){const e=r=>{n.valueAccessor.setDisabledState(r)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function T(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function qe(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function ze(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function Qe(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}Promise.resolve();const Ze=class extends oe{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(n=null,e,r){super(function ne(t){return(U(t)?t.validators:t)||null}(e),function re(t,n){return(U(n)?n.asyncValidators:t)||null}(r,e)),this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),U(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Qe(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,!1!==e?.emitEvent&&this._events.next(new te(this))}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){ze(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){ze(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){Qe(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},en={provide:m,useExisting:(0,s.Rfq)(()=>de)},Ye=Promise.resolve();let de=(()=>{class t extends m{_changeDetectorRef;callSetDisabledState;control=new Ze;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new s.bkB;constructor(e,r,o,a,l,p){super(),this._changeDetectorRef=l,this.callSetDisabledState=p,this._parent=e,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=function ue(t,n){if(!n)return null;let e,r,o;return Array.isArray(n),n.forEach(a=>{a.constructor===w?e=a:function qt(t){return Object.getPrototypeOf(t.constructor)===_}(a)?r=a:o=a}),o||r||e||null}(0,a)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const r=e.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),function le(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){M(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){Ye.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const r=e.isDisabled.currentValue,o=0!==r&&(0,A.L39)(r);Ye.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?function P(t,n){return[...n.path,t]}(e,this._parent):[e]}static \u0275fac=function(r){return new(r||t)(i.rXU(d,9),i.rXU(u,10),i.rXU(g,10),i.rXU(h,10),i.rXU(A.gRc,8),i.rXU(V,8))};static \u0275dir=i.FsC({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[i.Jv_([en]),i.Vt3,i.OA$]})}return t})(),wn=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=i.$C({type:t});static \u0275inj=s.G2t({})}return t})(),On=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:V,useValue:e.callSetDisabledState??B}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=i.$C({type:t});static \u0275inj=s.G2t({imports:[wn]})}return t})()}}]);
|
package/9443.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9443],{9443(Q,p,u){u.d(p,{NestedSelect:()=>J});var a=u(7705),s=u(5802),d=u(2271),g=u(9352),f=u(2245),h=u(6117),C=u(6279),v=u(356),M=u(29),b=u(7851),O=u(1359),e=u(5547);const m=(t,l)=>l.id;function x(t,l){if(1&t&&(e.j41(0,"cue-typography",1),e.EFF(1),e.k0s()),2&t){const n=e.XpG();e.Y8G("info",n.info()),e.R7$(),e.SpI(" ",n.label()," ")}}function P(t,l){if(1&t&&e.nrm(0,"cue-svg-icon",10),2&t){const n=e.XpG(2);e.Y8G("name",n.placeholderIcon())}}function S(t,l){if(1&t){const n=e.RV6();e.j41(0,"cue-menu-item",9),e.bIt("click",function(){s.eBV(n);const i=e.XpG();return s.Njj(i._onClear())}),e.nVh(1,P,1,1,"cue-svg-icon",10),e.EFF(2),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("size",n.size())("selected",n.multiSelect()?0===n.values().length:!n.value()),e.R7$(),e.vxM(n.placeholderIcon()?1:-1),e.R7$(),e.SpI(" ",n.placeholder()," ")}}function k(t,l){if(1&t&&e.nrm(0,"cue-checkbox",13),2&t){const n=e.XpG(2).$implicit,o=e.XpG();e.Y8G("checked",o._isSelected(n))("disabled",!0)}}function F(t,l){if(1&t&&e.nrm(0,"cue-svg-icon",10),2&t){const n=e.XpG(2).$implicit;e.Y8G("name",n.icon)}}function z(t,l){1&t&&e.nrm(0,"span",14)}function G(t,l){if(1&t&&e.nrm(0,"cue-checkbox",13),2&t){const n=e.XpG(2).$implicit,o=e.XpG(3);e.Y8G("checked",o._isSelected(n))("disabled",!0)}}function N(t,l){if(1&t&&e.nrm(0,"cue-svg-icon",10),2&t){const n=e.XpG(2).$implicit;e.Y8G("name",n.icon)}}function $(t,l){1&t&&e.nrm(0,"span",14)}function R(t,l){if(1&t&&e.nrm(0,"cue-checkbox",13),2&t){const n=e.XpG().$implicit,o=e.XpG(5);e.Y8G("checked",o._isSelected(n))("disabled",!0)}}function T(t,l){if(1&t&&e.nrm(0,"cue-svg-icon",10),2&t){const n=e.XpG().$implicit;e.Y8G("name",n.icon)}}function E(t,l){if(1&t){const n=e.RV6();e.j41(0,"cue-menu-item",9),e.bIt("click",function(i){const c=s.eBV(n).$implicit,_=e.XpG(5);return s.Njj(_._onItemClick(i,c))}),e.nVh(1,R,1,2,"cue-checkbox",13),e.nVh(2,T,1,1,"cue-svg-icon",10),e.EFF(3),e.k0s()}if(2&t){const n=l.$implicit,o=e.XpG(5);e.Y8G("size",o.size())("selected",o._isSelected(n)),e.R7$(),e.vxM(o.multiSelect()?1:-1),e.R7$(),e.vxM(n.icon?2:-1),e.R7$(),e.SpI(" ",o._itemLabel(n)," ")}}function I(t,l){if(1&t&&e.nrm(0,"cue-svg-icon",10),2&t){const n=e.XpG();e.Y8G("name",n.icon)}}function D(t,l){if(1&t){const n=e.RV6();e.j41(0,"cue-menu-item",17),e.bIt("click",function(){s.eBV(n);const i=e.XpG(2).$implicit,c=e.XpG(3);return s.Njj(c._onFooterClick(i))}),e.nVh(1,I,1,1,"cue-svg-icon",10),e.EFF(2),e.k0s()}if(2&t){const n=l,o=e.XpG(5);e.Y8G("size",o.size()),e.R7$(),e.vxM(n.icon?1:-1),e.R7$(),e.SpI(" ",n.label," ")}}function X(t,l){if(1&t){const n=e.RV6();e.j41(0,"cue-menu",11)(1,"cue-menu-item",12),e.bIt("click",function(i){s.eBV(n);const c=e.XpG().$implicit,_=e.XpG(3);return s.Njj(_._onParentItemClick(i,c))}),e.nVh(2,G,1,2,"cue-checkbox",13),e.nVh(3,N,1,1,"cue-svg-icon",10),e.EFF(4),e.nVh(5,$,1,0,"span",14),e.nrm(6,"cue-svg-icon",15),e.k0s(),e.j41(7,"cue-menu-wrap",16),e.Z7z(8,E,4,5,"cue-menu-item",7,m),e.nVh(10,D,3,3,"cue-menu-item",8),e.k0s()()}if(2&t){let n;const o=e.XpG().$implicit,i=e.XpG(3);e.Y8G("size",i.size())("keepOpenOnInsideClick",i.multiSelect()),e.R7$(),e.Y8G("size",i.size())("selected",!i.leavesOnly()&&i._isSelected(o)),e.R7$(),e.vxM(i.multiSelect()&&!i.leavesOnly()?2:-1),e.R7$(),e.vxM(o.icon?3:-1),e.R7$(),e.SpI(" ",i._itemLabel(o)," "),e.R7$(),e.vxM(i._parentsWithSelection().has(o.id)?5:-1),e.R7$(2),e.Y8G("size",i.size()),e.R7$(),e.Dyx(o.children),e.R7$(2),e.vxM((n=i.footerButton())?10:-1,n)}}function B(t,l){if(1&t&&e.nrm(0,"cue-checkbox",13),2&t){const n=e.XpG(2).$implicit,o=e.XpG(3);e.Y8G("checked",o._isSelected(n))("disabled",!0)}}function V(t,l){if(1&t&&e.nrm(0,"cue-svg-icon",10),2&t){const n=e.XpG(2).$implicit;e.Y8G("name",n.icon)}}function y(t,l){if(1&t){const n=e.RV6();e.j41(0,"cue-menu-item",9),e.bIt("click",function(i){s.eBV(n);const c=e.XpG().$implicit,_=e.XpG(3);return s.Njj(_._onItemClick(i,c))}),e.nVh(1,B,1,2,"cue-checkbox",13),e.nVh(2,V,1,1,"cue-svg-icon",10),e.EFF(3),e.k0s()}if(2&t){const n=e.XpG().$implicit,o=e.XpG(3);e.Y8G("size",o.size())("selected",o._isSelected(n)),e.R7$(),e.vxM(o.multiSelect()?1:-1),e.R7$(),e.vxM(n.icon?2:-1),e.R7$(),e.SpI(" ",o._itemLabel(n)," ")}}function j(t,l){if(1&t&&e.nVh(0,X,11,10,"cue-menu",11)(1,y,4,5,"cue-menu-item",7),2&t){const n=l.$implicit;e.vxM(null!=n.children&&n.children.length?0:1)}}function Y(t,l){if(1&t&&e.nrm(0,"cue-svg-icon",10),2&t){const n=e.XpG();e.Y8G("name",n.icon)}}function L(t,l){if(1&t){const n=e.RV6();e.j41(0,"cue-menu-item",17),e.bIt("click",function(){s.eBV(n);const i=e.XpG(2).$implicit,c=e.XpG();return s.Njj(c._onFooterClick(i))}),e.nVh(1,Y,1,1,"cue-svg-icon",10),e.EFF(2),e.k0s()}if(2&t){const n=l,o=e.XpG(3);e.Y8G("size",o.size()),e.R7$(),e.vxM(n.icon?1:-1),e.R7$(),e.SpI(" ",n.label," ")}}function w(t,l){if(1&t){const n=e.RV6();e.j41(0,"cue-menu",11)(1,"cue-menu-item",12),e.bIt("click",function(i){s.eBV(n);const c=e.XpG().$implicit,_=e.XpG();return s.Njj(_._onParentItemClick(i,c))}),e.nVh(2,k,1,2,"cue-checkbox",13),e.nVh(3,F,1,1,"cue-svg-icon",10),e.EFF(4),e.nVh(5,z,1,0,"span",14),e.nrm(6,"cue-svg-icon",15),e.k0s(),e.j41(7,"cue-menu-wrap",16),e.Z7z(8,j,2,1,null,null,m),e.nVh(10,L,3,3,"cue-menu-item",8),e.k0s()()}if(2&t){let n;const o=e.XpG().$implicit,i=e.XpG();e.Y8G("size",i.size())("keepOpenOnInsideClick",i.multiSelect()),e.R7$(),e.Y8G("size",i.size())("selected",!i.leavesOnly()&&i._isSelected(o)),e.R7$(),e.vxM(i.multiSelect()&&!i.leavesOnly()?2:-1),e.R7$(),e.vxM(o.icon?3:-1),e.R7$(),e.SpI(" ",i._itemLabel(o)," "),e.R7$(),e.vxM(i._parentsWithSelection().has(o.id)?5:-1),e.R7$(2),e.Y8G("size",i.size()),e.R7$(),e.Dyx(o.children),e.R7$(2),e.vxM((n=i.footerButton())?10:-1,n)}}function W(t,l){if(1&t&&e.nrm(0,"cue-checkbox",13),2&t){const n=e.XpG(2).$implicit,o=e.XpG();e.Y8G("checked",o._isSelected(n))("disabled",!0)}}function A(t,l){if(1&t&&e.nrm(0,"cue-svg-icon",10),2&t){const n=e.XpG(2).$implicit;e.Y8G("name",n.icon)}}function U(t,l){if(1&t){const n=e.RV6();e.j41(0,"cue-menu-item",9),e.bIt("click",function(i){s.eBV(n);const c=e.XpG().$implicit,_=e.XpG();return s.Njj(_._onItemClick(i,c))}),e.nVh(1,W,1,2,"cue-checkbox",13),e.nVh(2,A,1,1,"cue-svg-icon",10),e.EFF(3),e.k0s()}if(2&t){const n=e.XpG().$implicit,o=e.XpG();e.Y8G("size",o.size())("selected",o._isSelected(n)),e.R7$(),e.vxM(o.multiSelect()?1:-1),e.R7$(),e.vxM(n.icon?2:-1),e.R7$(),e.SpI(" ",o._itemLabel(n)," ")}}function K(t,l){if(1&t&&e.nVh(0,w,11,10,"cue-menu",11)(1,U,4,5,"cue-menu-item",7),2&t){const n=l.$implicit;e.vxM(null!=n.children&&n.children.length?0:1)}}function H(t,l){if(1&t&&e.nrm(0,"cue-svg-icon",10),2&t){const n=e.XpG();e.Y8G("name",n.icon)}}function Z(t,l){if(1&t){const n=e.RV6();e.j41(0,"cue-menu-item",17),e.bIt("click",function(){s.eBV(n);const i=e.XpG();return s.Njj(i._onFooterClick(void 0))}),e.nVh(1,H,1,1,"cue-svg-icon",10),e.EFF(2),e.k0s()}if(2&t){const n=l,o=e.XpG();e.Y8G("size",o.size()),e.R7$(),e.vxM(n.icon?1:-1),e.R7$(),e.SpI(" ",n.label," ")}}let J=(()=>{class t{label=(0,a.hFB)("");info=(0,a.hFB)("");items=(0,a.hFB)([]);placeholder=(0,a.hFB)(void 0);labelMap=(0,a.hFB)({});placeholderIcon=(0,a.hFB)(void 0);menuPosition=(0,a.hFB)(void 0);size=(0,a.hFB)("m");maxHeight=(0,a.hFB)(void 0);loading=(0,a.hFB)(!1);underline=(0,a.hFB)(!0);leavesOnly=(0,a.hFB)(!0);multiSelect=(0,a.hFB)(!1);footerButton=(0,a.hFB)(void 0);value=(0,a.geq)(void 0);values=(0,a.geq)([]);footerButtonClick=(0,a.CGW)();_menuOpen=(0,s.vPA)(!1);_cdr=(0,s.WQX)(a.gRc);_multiSelectCount=(0,d.EW)(()=>this.values().length);_multiSelectLabel=(0,g.Xx)("components.input.nestedSelect.itemsSelected",(0,d.EW)(()=>({count:this._multiSelectCount()})));_labelMap=(0,d.EW)(()=>{const n=this.labelMap(),o=new Map,i=c=>{for(const _ of c)o.set(_.id,n[_.id]??_.label),_.children?.length&&i(_.children)};return i(this.items()),o});_parentsWithSelection=(0,d.EW)(()=>{const n=new Set;if(this.multiSelect())for(const _ of this.values())n.add(_);else{const _=this.value();_&&n.add(_)}const o=new Set,i=_=>_.some(r=>n.has(r.id)||!!r.children&&i(r.children)),c=_=>{for(const r of _)r.children?.length&&(i(r.children)&&o.add(r.id),c(r.children))};return c(this.items()),o});_triggerLabel=(0,d.EW)(()=>{const n=this.values(),o=this.value(),i=this._labelMap();return this.multiSelect()?n.length?1===n.length?i.get(n[0])??n[0]:this._multiSelectLabel():this.placeholder()??"":o?i.get(o)??o:this.placeholder()??""});_isSelected(n){return!!n.selected||(this.multiSelect()?this.values().includes(n.id):this.value()===n.id)}_itemLabel(n){return this._labelMap().get(n.id)??n.label}_onItemClick(n,o){if(n.stopPropagation(),this.multiSelect()){const i=this.values().includes(o.id)?this.values().filter(c=>c!==o.id):[...this.values(),o.id];this.values.set(i),this._cdr.markForCheck()}else this.value.set(o.id),this._menuOpen.set(!1)}_onClear(){this.multiSelect()?(this.values.set([]),this._cdr.markForCheck()):(this.value.set(void 0),this._menuOpen.set(!1))}_onParentItemClick(n,o){n.currentTarget.parentElement?.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!1})),!this.leavesOnly()&&this._onItemClick(n,o)}_onFooterClick(n){this._menuOpen.set(!1),this.footerButtonClick.emit(n)}_onSpace(n){n.preventDefault(),this._menuOpen.set(!0)}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=e.VBU({type:t,selectors:[["cue-nested-select"]],inputs:{label:[1,"label"],info:[1,"info"],items:[1,"items"],placeholder:[1,"placeholder"],labelMap:[1,"labelMap"],placeholderIcon:[1,"placeholderIcon"],menuPosition:[1,"menuPosition"],size:[1,"size"],maxHeight:[1,"maxHeight"],loading:[1,"loading"],underline:[1,"underline"],leavesOnly:[1,"leavesOnly"],multiSelect:[1,"multiSelect"],footerButton:[1,"footerButton"],value:[1,"value"],values:[1,"values"]},outputs:{value:"valueChange",values:"valuesChange",footerButtonClick:"footerButtonClick"},decls:12,vars:21,consts:[[1,"form-field"],["size","s",1,"label",3,"info"],[3,"menuClosed","positioning","keepOpenOnInsideClick"],["trigger","","tabindex","0",1,"select-trigger",3,"click","keydown.enter","keydown.space"],[1,"select-value"],["name","arrow-dropdown",1,"select-arrow"],["menu","",3,"size","maxHeight","cueLogoLoader"],[3,"size","selected"],[1,"footer-action",3,"size"],[3,"click","size","selected"],["before","",3,"name"],["trigger","hover",3,"size","keepOpenOnInsideClick"],["trigger","",3,"click","size","selected"],["before","",3,"checked","disabled"],[1,"child-dot"],["after","","name","paginator-next"],["menu","",3,"size"],[1,"footer-action",3,"click","size"]],template:function(o,i){if(1&o&&(e.j41(0,"div",0),e.nVh(1,x,2,2,"cue-typography",1),e.j41(2,"cue-menu",2),e.bIt("menuClosed",function(){return i._menuOpen.set(!1)}),e.j41(3,"div",3),e.bIt("click",function(){return i._menuOpen.set(!0)})("keydown.enter",function(){return i._menuOpen.set(!0)})("keydown.space",function(_){return i._onSpace(_)}),e.j41(4,"span",4),e.EFF(5),e.k0s(),e.nrm(6,"cue-svg-icon",5),e.k0s(),e.j41(7,"cue-menu-wrap",6),e.nVh(8,S,3,4,"cue-menu-item",7),e.Z7z(9,K,2,1,null,null,m),e.nVh(11,Z,3,3,"cue-menu-item",8),e.k0s()()()),2&o){let c;e.HbH("size-"+i.size()),e.AVh("focused",!!i.value()||i.values().length>0||!!i.placeholder())("menu-open",i._menuOpen())("underline",i.underline())("no-label",!i.label()),e.R7$(),e.vxM(i.label()?1:-1),e.R7$(),e.Y8G("positioning",i.menuPosition())("keepOpenOnInsideClick",i.multiSelect()),e.R7$(3),e.JRh(i._triggerLabel()),e.R7$(2),e.xc7("min-height",i.loading()?"200px":null),e.Y8G("size",i.size())("maxHeight",i.maxHeight())("cueLogoLoader",i.loading()),e.R7$(),e.vxM(i.placeholder()?8:-1),e.R7$(),e.Dyx(i.items()),e.R7$(2),e.vxM((c=i.footerButton())?11:-1,c)}},dependencies:[f.Typography,h.W,C.D,v.M,M.A,b.k,O.Checkbox],styles:["[_nghost-%COMP%]{display:block;width:100%}.form-field[_ngcontent-%COMP%]{position:relative;width:100%}cue-menu[_ngcontent-%COMP%]{width:100%}.select-trigger[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;background:none;outline:none;font-family:var(--cue-font-family);display:flex;justify-content:space-between;align-items:center;cursor:pointer;box-sizing:border-box}.form-field.underline[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{border-bottom:1px solid var(--cue-input-border-bottom-color)}.select-trigger[_ngcontent-%COMP%]:focus{outline:none}.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.form-field.no-label.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding-top:0}.select-value[_ngcontent-%COMP%]{color:var(--cue-input-value-color);font-family:var(--cue-font-family);flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.form-field[_ngcontent-%COMP%]:not(.focused) .select-value[_ngcontent-%COMP%]{color:var(--cue-input-placeholder-color)}.select-arrow[_ngcontent-%COMP%]{color:var(--cue-input-value-color);margin-left:8px;flex-shrink:0;transition:transform .2s ease}.form-field.menu-open[_ngcontent-%COMP%] .select-arrow[_ngcontent-%COMP%]{transform:rotate(180deg)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:none;transition:all .2s ease;z-index:1}.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{pointer-events:auto}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.child-dot[_ngcontent-%COMP%]{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--cue-primary);opacity:.7;margin-left:5px;vertical-align:middle;flex-shrink:0}.footer-action[_ngcontent-%COMP%]{border-top:1px solid color-mix(in srgb,var(--cue-defaultContrast) 12%,transparent);color:var(--cue-accent);font-weight:500}[_nghost-%COMP%] cue-checkbox[disabled]{cursor:not-allowed}cue-menu-wrap[_ngcontent-%COMP%]{cursor:pointer}"],changeDetection:0})}return t})()}}]);
|
package/9495.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9495],{9495(d,s,i){i.d(s,{InlineInput:()=>_});var l=i(7705),c=i(5802),a=i(5547);const p=["inputEl"];let _=(()=>{class r{value=(0,l.geq)("");placeholder=(0,l.hFB)("");autofocus=(0,l.hFB)(!1);valueChange=(0,l.CGW)();save=(0,l.CGW)();cancel=(0,l.CGW)();inputEl;constructor(){(0,c.QZP)(()=>{const e=this.value(),n=this.inputEl?.nativeElement;n&&n.innerText.replace(/\n$/,"")!==e&&(n.innerText=e)})}ngAfterViewInit(){const e=this.inputEl?.nativeElement;e&&(e.innerText=this.value()),this.autofocus()&&e&&e.focus()}onInput(e){const t=e.target.innerText.replace(/\n$/,"");this.value.set(t),this.valueChange.emit(t)}onEnter(e){e.preventDefault(),this.save.emit()}onEscape(e){e.preventDefault(),this.cancel.emit()}onBlur(){this.save.emit()}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=a.VBU({type:r,selectors:[["cue-inline-input"]],viewQuery:function(n,t){if(1&n&&a.GBs(p,5),2&n){let u;a.mGM(u=a.lsd())&&(t.inputEl=u.first)}},inputs:{value:[1,"value"],placeholder:[1,"placeholder"],autofocus:[1,"autofocus"]},outputs:{value:"valueChange",valueChange:"valueChange",save:"save",cancel:"cancel"},decls:2,vars:1,consts:[["inputEl",""],["contenteditable","true","role","textbox","aria-multiline","true",3,"input","keydown.enter","keydown.escape","blur"]],template:function(n,t){1&n&&(a.rj2(0,"span",1,0),a.VwU("input",function(o){return t.onInput(o)})("keydown.enter",function(o){return t.onEnter(o)})("keydown.escape",function(o){return t.onEscape(o)})("blur",function(){return t.onBlur()}),a.eux()),2&n&&a.BMQ("data-placeholder",t.placeholder())},styles:["[_nghost-%COMP%]{display:inline}span[contenteditable][_ngcontent-%COMP%]{outline:none;-webkit-text-decoration:underline dashed;text-decoration:underline dashed;text-underline-offset:3px;white-space:pre-wrap;word-break:break-word;cursor:text}span[contenteditable][_ngcontent-%COMP%]:empty:before{content:attr(data-placeholder);color:var(--cue-input-placeholder-color, currentColor);opacity:.5;pointer-events:none}"],changeDetection:0})}return r})()}}]);
|
package/9695.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9695],{9695(p,u,h){h.d(u,{Switch:()=>r});var c=h(7705),o=h(29),i=h(5547);function d(e,g){if(1&e&&i.nrm(0,"cue-svg-icon",2),2&e){const n=i.XpG();i.Y8G("name",n.iconChecked())}}function a(e,g){if(1&e&&i.nrm(0,"cue-svg-icon",2),2&e){const n=i.XpG();i.Y8G("name",n.icon())}}let r=(()=>{class e{size=(0,c.hFB)("m");icon=(0,c.hFB)(void 0);iconChecked=(0,c.hFB)(void 0);disabled=(0,c.hFB)(!1);checked=(0,c.geq)(!1);toggleChange=(0,c.CGW)();toggle(){this.checked.set(!this.checked()),this.toggleChange.emit(this.checked())}static \u0275fac=function(s){return new(s||e)};static \u0275cmp=i.VBU({type:e,selectors:[["cue-input-switch"]],hostVars:5,hostBindings:function(s,t){2&s&&(i.BMQ("size",t.size()),i.AVh("checked",t.checked())("disabled",t.disabled()))},inputs:{size:[1,"size"],icon:[1,"icon"],iconChecked:[1,"iconChecked"],disabled:[1,"disabled"],checked:[1,"checked"]},outputs:{checked:"checkedChange",toggleChange:"toggleChange"},decls:4,vars:3,consts:[["type","checkbox",3,"click","checked","disabled"],[1,"indicator"],[3,"name"]],template:function(s,t){1&s&&(i.j41(0,"input",0),i.bIt("click",function(){return t.toggle()}),i.k0s(),i.j41(1,"div",1),i.nVh(2,d,1,1,"cue-svg-icon",2)(3,a,1,1,"cue-svg-icon",2),i.k0s()),2&s&&(i.Y8G("checked",t.checked())("disabled",t.disabled()),i.R7$(2),i.vxM(t.checked()&&t.iconChecked()?2:t.icon()?3:-1))},dependencies:[o.A],styles:["[_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-width: calc(var(--cue-input-switch-height) * 1.7);--cue-input-switch-inset: 2px;--cue-input-switch-indicator-width: calc( var(--cue-input-switch-height) - (2 * var(--cue-input-switch-inset)) );--cue-input-switch-icon-width: calc( var(--cue-input-switch-indicator-width) - (2 * var(--cue-input-switch-inset)) );display:block;flex-shrink:0;position:relative;height:var(--cue-input-switch-height);width:var(--cue-input-switch-width);border-radius:var(--cue-input-switch-height);--cue-icon-width: var(--cue-input-switch-icon-width);background:var(--cue-input-switch-background);transition:background-color .4s ease}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 12px;--cue-input-switch-inset: 1px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 14px;--cue-input-switch-inset: 1px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-inset: 2px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 22px;--cue-input-switch-inset: 3px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 28px;--cue-input-switch-inset: 3px}@container cue-container (width < 20em){[_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 10px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 12px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 18px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 20px}}.checked[_nghost-%COMP%]{background:var(--cue-input-switch-checked-background)}.disabled[_nghost-%COMP%]{background:var(--cue-input-switch-disabled-background);cursor:default}[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{pointer-events:none;position:absolute;left:var(--cue-input-switch-inset);top:var(--cue-input-switch-inset);width:var(--cue-input-switch-indicator-width);aspect-ratio:1;border-radius:50%;display:flex;align-items:center;justify-content:center;background-color:var(--cue-input-switch-indicator-background);color:var(--cue-input-switch-indicator-foreground);transition:left .4s ease,background-color .4s ease,color .4s ease}.checked[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{left:calc(var(--cue-input-switch-width) - var(--cue-input-switch-inset) - var( --cue-input-switch-indicator-width ));background:var(--cue-input-switch-checked-indicator-background);color:var(--cue-input-switch-checked-indicator-foreground)}.disabled[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{background:var(--cue-input-switch-disabled-indicator-background);color:var(--cue-input-switch-disabled-indicator-foreground)}input[_ngcontent-%COMP%]{all:unset;position:absolute;inset:0;cursor:pointer;border-radius:var(--cue-input-switch-height)}input[_ngcontent-%COMP%]:focus-visible:not(:disabled) + .indicator[_ngcontent-%COMP%]{outline:1px solid var(--cue-input-switch-focus-color);outline-offset:2px}"]})}return e})()}}]);
|
package/9769.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9769],{9769(Jt,ve,T){T.d(ve,{B3:()=>we,MD:()=>Zt,T3:()=>Me});var P=T(7705),i=T(5547),c=T(5802);T(2271);let we=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(t,n,r){this._ngEl=t,this._differs=n,this._renderer=r}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,n){const[r,s]=t.split("."),o=-1===r.indexOf("-")?void 0:i.czy.DashCase;null!=n?this._renderer.setStyle(this._ngEl.nativeElement,r,s?`${n}${s}`:n,o):this._renderer.removeStyle(this._ngEl.nativeElement,r,o)}_applyChanges(t){t.forEachRemovedItem(n=>this._setStyle(n.key,null)),t.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),t.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static \u0275fac=function(n){return new(n||e)(i.rXU(i.aKT),i.rXU(P.MKu),i.rXU(i.sFG))};static \u0275dir=i.FsC({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),Me=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=(0,c.WQX)(c.zZn);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return"outlet"===this.ngTemplateOutletInjector?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,n,r),get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||e)(i.rXU(i.c1b))};static \u0275dir=i.FsC({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[i.OA$]})}return e})(),Zt=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=i.$C({type:e});static \u0275inj=c.G2t({})}return e})()}}]);
|
package/README.md
CHANGED
|
@@ -15,7 +15,10 @@ Drop them into any HTML page — no build step required.
|
|
|
15
15
|
| `<cue-context-viewer>` | Context document viewer — shows documents, entities, or both based on context |
|
|
16
16
|
| `<cue-project-list>` | Lists all projects the authenticated user is a member of, with an optional map |
|
|
17
17
|
| `<cue-document-charts>` | Interactive document-statistics charts (by file type and/or content category) |
|
|
18
|
+
| `<cue-document-search-bar>` | Search bar with an adaptive chip-based filter builder (mime, content, entity) |
|
|
19
|
+
| `<cue-document-filter>` | Adaptive chip-based document filter builder (mime, content, entity), SDK-connected |
|
|
18
20
|
| `<cue-sparql-table>` | Declarative, column-configurable SPARQL table with built-in Cue SDK integration |
|
|
21
|
+
| `<cue-base-*>` | Low-level primitives (card, form inputs) with no SDK dependency — see [Low-level components](#low-level-components) |
|
|
19
22
|
|
|
20
23
|
---
|
|
21
24
|
|
|
@@ -143,6 +146,7 @@ Renders a lazy-loaded entity table. Pass `iris`, a `sdkState` containing a `CueP
|
|
|
143
146
|
| `sdkState` | `{ cue?; entities? }` | ✅ | SDK context. Provide at least `entities` (`CueProjectEntities` instance). |
|
|
144
147
|
| `mapboxToken` | `string` | ❌ | Mapbox access token. Required only if entity location data should be shown on a map. |
|
|
145
148
|
| `paginationPageSize` | `number` | ❌ | Number of rows shown per page in the grid paginator. Default: `10`. |
|
|
149
|
+
| `size` | `'xs' \| 's' \| 'm' \| 'l' \| 'xl'` | ❌ | Visual density of the underlying ag-grid table. Default: `'m'`. |
|
|
146
150
|
|
|
147
151
|
> **Mapbox token** — the map view is only active when a valid `mapboxToken` is set. Without it, location fetching is skipped and the map tab is hidden. Obtain a token from [mapbox.com](https://www.mapbox.com/).
|
|
148
152
|
|
|
@@ -206,6 +210,7 @@ Renders a lazy-loaded document table. Pass a `projectId`, `uuids`, and `sdkState
|
|
|
206
210
|
| `contentCategories` | `string[]` | ❌ | Content-category IRIs to filter by. Auto-fetches matching UUIDs via `documentsByContentCategory()`. Lower precedence than `suffixes` / `mimeTypes`. |
|
|
207
211
|
| `simple` | `boolean` | ❌ | Renders a compact list + paginator instead of ag-grid/flip/settings. Default: `false`. |
|
|
208
212
|
| `pageSize` | `number` | ❌ | Host-controlled page size used by both simple and non-simple modes. Default: `10`. |
|
|
213
|
+
| `size` | `'xs' \| 's' \| 'm' \| 'l' \| 'xl'` | ❌ | Visual density of the underlying ag-grid table. Default: `'m'`. |
|
|
209
214
|
| `prefetchPages` | `number` | ❌ | Lazy-load buffer size multiplier (`pageSize * prefetchPages`). Default: `3`. |
|
|
210
215
|
| `showOpenInDocumentViewerAction` | `boolean` | ❌ | Shows "Open in document viewer" menu item. Default: `false`. |
|
|
211
216
|
| `showOpenInFileManagerAction` | `boolean` | ❌ | Shows "Open in file manager" menu item. Default: `false`. |
|
|
@@ -278,6 +283,7 @@ The component also supports an optional **row definition** — a SPARQL `SELECT`
|
|
|
278
283
|
| `columns` | `ColumnDefSPARQL[]` | ✅ | Column definitions. Two-way bindable — edits made in the built-in column-settings panel propagate back to the host. |
|
|
279
284
|
| `rowDefinition` | `string` | ❌ | SPARQL SELECT returning `?subject` IRIs. Enables pagination. Pass `''` to disable (load all rows at once). |
|
|
280
285
|
| `pageSize` | `number` | ❌ | Rows per page when a row definition is set. Default: `10`. |
|
|
286
|
+
| `size` | `'xs' \| 's' \| 'm' \| 'l' \| 'xl'` | ❌ | Visual density of the table. Default: `'m'`. |
|
|
281
287
|
| `bufferFactor` | `number` | ❌ | Pages to batch-fetch in one go (`pageSize × bufferFactor` subjects per request). Default: `5`. |
|
|
282
288
|
| `graphType` | `'fuseki' \| 'qlever'` | ❌ | SPARQL engine to query against (inside `sdkState`). Default: `'fuseki'`. |
|
|
283
289
|
|
|
@@ -433,6 +439,104 @@ charts.sdkState = { documents: myProjectDocs, availableContentCategories: myCate
|
|
|
433
439
|
|
|
434
440
|
---
|
|
435
441
|
|
|
442
|
+
## `<cue-document-search-bar>`
|
|
443
|
+
|
|
444
|
+
A search bar paired with an adaptive, chip-based **filter builder** for narrowing a document set. The user types a query and clicks **Add filter** to pick a dimension (mime category, content category, or entity), then a value; each committed filter becomes a removable chip. Submitting the query emits a single `search` event carrying both the query and the active filters — feed it to your own search logic.
|
|
445
|
+
|
|
446
|
+
Filtering is **adaptive**: after each change the available options are re-fetched against the already-committed filters, so the next dropdown only offers values that still yield results. Values already used in a dimension are also excluded from that dimension's list. Category labels are localized from the project schema; mime labels are derived by stripping the `FileContent` suffix.
|
|
447
|
+
|
|
448
|
+
| Property | Type | Required | Description |
|
|
449
|
+
| -------------- | --------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------- |
|
|
450
|
+
| `projectId` | `string` | ✅ | Cue project (space) ID to load filter options from. |
|
|
451
|
+
| `sdkState` | `{ cue: Cue; graphType? }` | ✅ | Authenticated Cue instance (+ optional `graphType`). **Set as a JS property**, not an attribute. |
|
|
452
|
+
| `placeholder` | `string` | ❌ | Search-bar placeholder. Falls back to a localized default. |
|
|
453
|
+
| `size` | `'s' \| 'l'` | ❌ | Size of the search bar. Default: `'l'`. |
|
|
454
|
+
| `graphType` | `'fuseki' \| 'qlever'` | ❌ | SPARQL engine to query against (inside `sdkState`). Default: `'fuseki'`. |
|
|
455
|
+
|
|
456
|
+
The three filter dimensions:
|
|
457
|
+
|
|
458
|
+
- **Mime category** — group of file types (PDF, CAD, BIM, …).
|
|
459
|
+
- **Content category** — semantic content category.
|
|
460
|
+
- **Entity** — first pick an entity type (category), then either a specific entity instance or **Any** to match the whole category.
|
|
461
|
+
|
|
462
|
+
The component emits one event:
|
|
463
|
+
|
|
464
|
+
| Event | Payload | Description |
|
|
465
|
+
| -------------- | -------------------------------------------- | --------------------------------------------------------------------- |
|
|
466
|
+
| `searchSubmit` | `{ query: string; filters: SearchFilter[] }` | Fires when the user submits a query, with the active filters attached. |
|
|
467
|
+
|
|
468
|
+
Each `SearchFilter` has the shape `{ type, included: string[], excluded: string[] }`, where `type` is one of `'mime'`, `'content'`, `'entity'` (an entity category), or `'entityInstance'` (a specific entity).
|
|
469
|
+
|
|
470
|
+
```js
|
|
471
|
+
await customElements.whenDefined('cue-document-search-bar');
|
|
472
|
+
|
|
473
|
+
const searchBar = document.createElement('cue-document-search-bar');
|
|
474
|
+
|
|
475
|
+
// Required: set as JS properties, not HTML attributes
|
|
476
|
+
searchBar.projectId = 'your-project-id';
|
|
477
|
+
searchBar.sdkState = { cue }; // optionally { cue, graphType: 'qlever' }
|
|
478
|
+
|
|
479
|
+
// React to a submitted search — query + active filters
|
|
480
|
+
searchBar.addEventListener('searchSubmit', (e) => {
|
|
481
|
+
const { query, filters } = e.detail;
|
|
482
|
+
console.log('Search:', query, 'with filters:', filters);
|
|
483
|
+
// run your search constrained by `filters`
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
document.getElementById('search-host').appendChild(searchBar);
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
> **Loader** — add `cue-document-search-bar` to `data-components` if you create it dynamically; otherwise it is detected automatically. See [CDN quickstart](#cdn-quickstart).
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
## `<cue-document-filter>`
|
|
494
|
+
|
|
495
|
+
The adaptive, chip-based **filter builder** on its own — the same component
|
|
496
|
+
embedded in `<cue-document-search-bar>`, exposed separately so you can place a
|
|
497
|
+
document filter independently of the search bar (e.g. in a sidebar). It owns all
|
|
498
|
+
SDK access — discovering the available mime / content / entity filter options and
|
|
499
|
+
their localized labels — so you only provide a `projectId` and an authenticated
|
|
500
|
+
`sdkState`.
|
|
501
|
+
|
|
502
|
+
Filtering is **adaptive**: after each change the available options are re-fetched
|
|
503
|
+
against the already-committed filters, so the next dropdown only offers values
|
|
504
|
+
that still yield results.
|
|
505
|
+
|
|
506
|
+
| Property | Type | Required | Description |
|
|
507
|
+
| ------------- | -------------------------- | -------- | ------------------------------------------------------------------------------------------------- |
|
|
508
|
+
| `projectId` | `string` | ✅ | Cue project (space) ID to load filter options from. |
|
|
509
|
+
| `sdkState` | `{ cue: Cue; graphType? }` | ✅ | Authenticated Cue instance (+ optional `graphType`). **Set as a JS property**, not an attribute. |
|
|
510
|
+
|
|
511
|
+
The component emits one event:
|
|
512
|
+
|
|
513
|
+
| Event | Payload | Description |
|
|
514
|
+
| --------------- | ---------------- | --------------------------------------------- |
|
|
515
|
+
| `filtersChange` | `SearchFilter[]` | Fires whenever the active filter set changes. |
|
|
516
|
+
|
|
517
|
+
Each `SearchFilter` has the shape `{ type, included: string[], excluded: string[] }`, where `type` is one of `'mime'`, `'content'`, `'entity'` (an entity category), or `'entityInstance'` (a specific entity).
|
|
518
|
+
|
|
519
|
+
```js
|
|
520
|
+
await customElements.whenDefined('cue-document-filter');
|
|
521
|
+
|
|
522
|
+
const filter = document.createElement('cue-document-filter');
|
|
523
|
+
|
|
524
|
+
// Required: set as JS properties, not HTML attributes
|
|
525
|
+
filter.projectId = 'your-project-id';
|
|
526
|
+
filter.sdkState = { cue }; // optionally { cue, graphType: 'qlever' }
|
|
527
|
+
|
|
528
|
+
filter.addEventListener('filtersChange', (e) => {
|
|
529
|
+
console.log('Active filters:', e.detail); // SearchFilter[]
|
|
530
|
+
// run your search constrained by these filters
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
document.getElementById('filter-host').appendChild(filter);
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
> **Loader** — add `cue-document-filter` to `data-components` if you create it dynamically; otherwise it is detected automatically. See [CDN quickstart](#cdn-quickstart).
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
436
540
|
## `<cue-entity-viewer>`
|
|
437
541
|
|
|
438
542
|
Renders the full detail view for a single entity: an info panel (label + categories), a relationship graph, linked documents, and an optional location map.
|
|
@@ -535,6 +639,7 @@ Fetches all projects the authenticated user is a member of via `cue.projects.lis
|
|
|
535
639
|
| `sdkState` | `{ cue: Cue }` | ✅ | Must include an authenticated `Cue` instance. Projects are fetched via `cue.projects.listProjects()`. |
|
|
536
640
|
| `mapboxToken` | `string` | ❌ | Mapbox access token. When provided, projects that have a `location` value are shown on an interactive map tab. |
|
|
537
641
|
| `variant` | `'none' \| 'default' \| 'primary' \| 'secondary' \| 'accent' \| 'fade'` | ❌ | Card styling variant. `'none'` (default) renders with no card border/background. Other values apply the named card style. |
|
|
642
|
+
| `size` | `'xs' \| 's' \| 'm' \| 'l' \| 'xl'` | ❌ | Visual density of the underlying ag-grid table. Default: `'m'`. |
|
|
538
643
|
|
|
539
644
|
> **Mapbox token** — the map tab only appears when at least one project has a `location` field **and** a `mapboxToken` is supplied. Without a token the component always shows the list-only view. Obtain a token from [mapbox.com](https://www.mapbox.com/).
|
|
540
645
|
|
|
@@ -599,6 +704,84 @@ await cue.auth.signIn('google'); // or 'microsoft', 'email', etc.
|
|
|
599
704
|
|
|
600
705
|
---
|
|
601
706
|
|
|
707
|
+
## Low-level components
|
|
708
|
+
|
|
709
|
+
In addition to the SDK-connected components above, the loader exposes a set of
|
|
710
|
+
**framework-agnostic primitives** — a card container and the full set of form
|
|
711
|
+
inputs — under the `cue-base-` prefix. These have **no SDK dependency**: they
|
|
712
|
+
render and emit events purely from their own inputs, so you can build custom
|
|
713
|
+
layouts and forms without wiring up `Cue`.
|
|
714
|
+
|
|
715
|
+
> **Why the `cue-base-` prefix?** Internally these components use bare selectors
|
|
716
|
+
> (`cue-card`, `cue-input`, …) and are nested inside the higher-level components.
|
|
717
|
+
> Registering them as custom elements under those same tags would make the
|
|
718
|
+
> browser upgrade every internal instance, conflicting with Angular. The
|
|
719
|
+
> `cue-base-` prefix is reserved for the externally exposed primitives so the two
|
|
720
|
+
> never collide.
|
|
721
|
+
|
|
722
|
+
| Custom element | Primitive | Key inputs / outputs |
|
|
723
|
+
| ----------------------------- | --------------- | ------------------------------------------------------------------------------------------ |
|
|
724
|
+
| `<cue-base-card>` | Card container | `variant`, `padded`, `shadow`, `scrollable`, `maxHeight`. Projects child content. |
|
|
725
|
+
| `<cue-base-input>` | Text field | `value`⇄, `label`, `placeholder`, `type`, `size`, `error`, `icon` · `valueChange`, `valueCommit` |
|
|
726
|
+
| `<cue-base-input-multiline>` | Textarea | `value`⇄, `size`, `error`, `icon` · `valueChange` |
|
|
727
|
+
| `<cue-base-input-date>` | Date field | `value`⇄, `size`, `error` · `valueChange` |
|
|
728
|
+
| `<cue-base-inline-input>` | Inline-edit text| `value`⇄, `placeholder`, `autofocus` · `valueChange`, `save`, `cancel` |
|
|
729
|
+
| `<cue-base-chip-input>` | Chip / token input | `values`⇄ `string[]`, `size`, `variant`, `validator` · `chipAdded`, `chipRemoved`, `clickedChip` |
|
|
730
|
+
| `<cue-base-checkbox>` | Checkbox | `checked`⇄, `label`, `size`, `disabled`, `color` · `checkedChange` |
|
|
731
|
+
| `<cue-base-input-switch>` | Toggle switch | `checked`⇄, `size`, `disabled`, `icon`, `iconChecked` · `toggleChange` |
|
|
732
|
+
| `<cue-base-darkmode-switch>` | Dark-mode toggle| `checked`⇄, `size`, `darkClass`, `applyClass` · `toggleChange` |
|
|
733
|
+
| `<cue-base-select>` | Single select | `value`⇄, `options`, `labelMap`, `iconMap`, `label`, `placeholder`, `size`, `loading` · `valueChange`, `filterChange` |
|
|
734
|
+
| `<cue-base-multi-select>` | Multi select | `value`⇄ `(string\|number)[]`, `options`, `fixedValues`, `labelMap`, `size` · `valueChange` |
|
|
735
|
+
| `<cue-base-nested-select>` | Tree select | `items`, `value`⇄ / `values`⇄, `multiSelect`, `size` · `footerButtonClick` |
|
|
736
|
+
| `<cue-base-grid-size-select>` | Grid dimensions | `cols`⇄, `rows`⇄, `size` |
|
|
737
|
+
|
|
738
|
+
`⇄` marks **two-way bound** properties (Angular `model()`s). Set them as a JS
|
|
739
|
+
property and listen to the matching `…Change` event to read updates back:
|
|
740
|
+
|
|
741
|
+
```js
|
|
742
|
+
await customElements.whenDefined('cue-base-input');
|
|
743
|
+
|
|
744
|
+
const field = document.createElement('cue-base-input');
|
|
745
|
+
field.label = 'Project name';
|
|
746
|
+
field.placeholder = 'e.g. Tower A';
|
|
747
|
+
field.value = 'Draft'; // initial value (JS property, not an attribute)
|
|
748
|
+
field.addEventListener('valueChange', (e) => console.log('typed:', e.detail));
|
|
749
|
+
document.getElementById('form-host').appendChild(field);
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
> **Object/array inputs must be set as properties.** Attributes only carry
|
|
753
|
+
> strings, so inputs like `options`, `items`, `labelMap`, `iconMap`, and
|
|
754
|
+
> `validator` have to be assigned in JavaScript (`select.options = [...]`), never
|
|
755
|
+
> as HTML attributes. Plain `string`/`boolean`/`number` inputs (`size`,
|
|
756
|
+
> `disabled`, `label`, `variant`, …) work fine as attributes.
|
|
757
|
+
|
|
758
|
+
`<cue-base-card>` projects its light-DOM children, so it wraps any markup:
|
|
759
|
+
|
|
760
|
+
```html
|
|
761
|
+
<cue-base-card variant="primary" padded>
|
|
762
|
+
<h3>Settings</h3>
|
|
763
|
+
<cue-base-input-switch checked></cue-base-input-switch>
|
|
764
|
+
</cue-base-card>
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
A `<cue-base-select>` with options supplied as a property:
|
|
768
|
+
|
|
769
|
+
```js
|
|
770
|
+
const select = document.createElement('cue-base-select');
|
|
771
|
+
select.label = 'Status';
|
|
772
|
+
select.options = ['draft', 'active', 'archived'];
|
|
773
|
+
select.labelMap = { draft: 'Draft', active: 'Active', archived: 'Archived' };
|
|
774
|
+
select.value = 'active';
|
|
775
|
+
select.addEventListener('valueChange', (e) => console.log('selected:', e.detail));
|
|
776
|
+
document.getElementById('form-host').appendChild(select);
|
|
777
|
+
```
|
|
778
|
+
|
|
779
|
+
> **Loader** — like all components, add any `cue-base-*` tags you create
|
|
780
|
+
> dynamically to `data-components`; statically placed tags are detected
|
|
781
|
+
> automatically. See [CDN quickstart](#cdn-quickstart).
|
|
782
|
+
|
|
783
|
+
---
|
|
784
|
+
|
|
602
785
|
## Theming
|
|
603
786
|
|
|
604
787
|
All visual properties are driven by CSS custom properties defined on `:root`. Because the components do **not** use Shadow DOM, you can override any variable from your own stylesheet — no `::part()` or `::slotted()` selectors needed.
|
package/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2076],{6034(v,p,o){o.d(p,{y:()=>_});var n=o(7705),u=o(7598),m=o(9769),a=o(5187),h=o(2271),e=o(5547);const C=["*"];let y=(()=>{class l{style=(0,n.hFB)("");gap=(0,n.hFB)("m");columns=(0,n.hFB)(1);getStyles=(0,h.EW)(()=>`\n grid-template-columns: repeat(${this.columns()}, minmax(0, 1fr));\n gap: var(--cue-grid-gap-${this.gap()});\n ${this.style()}\n `);static \u0275fac=function(i){return new(i||l)};static \u0275cmp=e.VBU({type:l,selectors:[["cue-grid"]],hostVars:2,hostBindings:function(i,t){2&i&&e.Aen(t.getStyles())},inputs:{style:[1,"style"],gap:[1,"gap"],columns:[1,"columns"]},ngContentSelectors:C,decls:1,vars:0,template:function(i,t){1&i&&(e.NAR(),e.SdG(0))},styles:["[_nghost-%COMP%]{display:grid}"]})}return l})();var g=o(2245),s=o(5381),c=o(29);const r=["*"];function b(l,M){if(1&l&&(e.j41(0,"cue-typography",2),e.EFF(1),e.k0s()),2&l){const d=e.XpG();e.R7$(),e.SpI(" ",d.label()," ")}}let _=(()=>{class l{label=(0,n.hFB)("");variant=(0,n.hFB)("default");shadow=(0,n.hFB)(!1);padded=(0,n.hFB)(!0);showCloseBtn=(0,n.hFB)(!0);position=(0,n.hFB)("top-left");clickedClose=(0,n.CGW)();margin=(0,n.hFB)("0.5rem");close(d){d.stopPropagation(),d.stopImmediatePropagation(),this.clickedClose.emit()}static \u0275fac=function(i){return new(i||l)};static \u0275cmp=e.VBU({type:l,selectors:[["cue-draggable-card"]],inputs:{label:[1,"label"],variant:[1,"variant"],shadow:[1,"shadow"],padded:[1,"padded"],showCloseBtn:[1,"showCloseBtn"],position:[1,"position"],margin:[1,"margin"]},outputs:{clickedClose:"clickedClose"},ngContentSelectors:r,decls:8,vars:14,consts:[["cdkDrag","",1,"panel",3,"variant","shadow","padded"],["justify","end"],["size","l"],[2,"width","100%"],["name","close",2,"cursor","pointer",3,"click"]],template:function(i,t){1&i&&(e.NAR(),e.j41(0,"cue-card",0)(1,"cue-typography")(2,"cue-grid")(3,"cue-flexcontainer",1),e.nVh(4,b,2,1,"cue-typography",2),e.nrm(5,"span",3),e.j41(6,"cue-svg-icon",4),e.bIt("click",function(f){return t.close(f)}),e.k0s()(),e.SdG(7),e.k0s()()()),2&i&&(e.xc7("top","top-left"===t.position()||"top-right"===t.position()?t.margin():"null")("bottom","bottom-left"===t.position()||"bottom-right"===t.position()?t.margin():"null")("left","top-left"===t.position()||"bottom-left"===t.position()?t.margin():"null")("right","top-right"===t.position()||"bottom-right"===t.position()?t.margin():"null"),e.Y8G("variant",t.variant())("shadow",t.shadow())("padded",t.padded()),e.R7$(3),e.xc7("padding",t.padded()?"0":"10px"),e.R7$(),e.vxM(t.label()&&"undefined"!==t.label()?4:-1))},dependencies:[m.MD,a.Card,y,g.Typography,s.n,c.A,u.T1],styles:[".panel[_ngcontent-%COMP%]{position:absolute;width:fit-content;z-index:100}"]})}return l})()},9134(v,p,o){o.d(p,{v:()=>h});var n=o(7705),u=o(6034),m=o(7517),a=o(5547);let h=(()=>{class e{title=(0,n.hFB)("Legend");layers=(0,n.hFB)([]);position=(0,n.hFB)("top-left");close=(0,n.CGW)();visibilityChange=(0,n.CGW)();layerChange=(0,n.CGW)();visibilityAll=(0,n.CGW)();static \u0275fac=function(g){return new(g||e)};static \u0275cmp=a.VBU({type:e,selectors:[["cue-color-legend-panel"]],inputs:{title:[1,"title"],layers:[1,"layers"],position:[1,"position"]},outputs:{close:"close",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:3,vars:4,consts:[[3,"clickedClose","label","padded","position"],[1,"content"],[3,"visibilityAll","layerChange","visibilityChange","layers"]],template:function(g,s){1&g&&(a.j41(0,"cue-draggable-card",0),a.bIt("clickedClose",function(){return s.close.emit()}),a.j41(1,"div",1)(2,"cue-layer-legend",2),a.bIt("visibilityAll",function(r){return s.visibilityAll.emit(r)})("layerChange",function(r){return s.layerChange.emit(r)})("visibilityChange",function(r){return s.visibilityChange.emit(r)}),a.k0s()()()),2&g&&(a.Y8G("label",s.title())("padded",!1)("position",s.position()),a.R7$(2),a.Y8G("layers",s.layers()))},dependencies:[u.y,m.P],styles:[".content[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;margin-bottom:30px;font-size:.8em;max-height:200px;max-width:180px;overflow:auto}"]})}return e})()}}]);
|