@qaecy/cue-ui 0.0.36 → 0.0.37
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/112.js +1 -1
- package/376.js +1 -1
- package/382.js +1 -1
- package/493.js +1 -1
- package/5.js +1 -1
- package/675.js +1 -1
- package/package.json +1 -1
package/675.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[675],{1675(
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[675],{1675(k,g,s){s.d(g,{CueProjectList:()=>F});var m=s(467),r=s(7705),i=s(5802),l=s(2271),j=s(6950),f=s(8017),h=s(6455),v=s(8334),u=s(2306),_=s(140),p=s(58),S=s(5187),t=s(5547);function x(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(a){i.eBV(e);const c=t.XpG();return i.Njj(c.onSelectedRows(a))}),t.k0s()(),t.j41(3,"cue-tab",3)(4,"cue-map",4),t.bIt("clickedFeature",function(a){i.eBV(e);const c=t.XpG();return i.Njj(c.onMapFeatureClick(a))}),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),t.R7$(2),t.Y8G("layers",e.mapLayers())("settings",e._mapSettings())("zoomToFit",!0)("hoverTooltipFn",e.mapHoverTooltipFn)}}function P(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-card",5)(1,"cue-ag-grid",2),t.bIt("selectedRows",function(a){i.eBV(e);const c=t.XpG(2);return i.Njj(c.onSelectedRows(a))}),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)}}function C(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-ag-grid",2),t.bIt("selectedRows",function(a){i.eBV(e);const c=t.XpG(2);return i.Njj(c.onSelectedRows(a))}),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1)}}function w(n,d){if(1&n&&t.nVh(0,P,2,6,"cue-card",5)(1,C,1,4,"cue-ag-grid",6),2&n){const e=t.XpG();t.vxM("none"!==e.variant()?0:1)}}let y=(()=>{class n{projects=(0,r.hFB)([]);mapSettings=(0,r.hFB)(new u.yY);variant=(0,r.hFB)("none");projectSelected=(0,r.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(a=>!!a.location);if(!e.length)return[];const o=new u.ux("Projects","projects");return o.collection=new _.o(e.flatMap(a=>{const c=(0,p.S)(a.location);return c?[{type:"Feature",geometry:(0,p.n)(c),properties:{name:a.name,id:a.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"]},outputs:{projectSelected:"projectSelected"},decls:2,vars:1,consts:[[2,"flex","1",3,"variant"],["label","List"],[3,"selectedRows","rowData","columnDefs","rowSelection","showPaginator"],["label","Map"],[3,"clickedFeature","layers","settings","zoomToFit","hoverTooltipFn"],[2,"height","100%","width","100%",3,"variant","padded"],[3,"rowData","columnDefs","rowSelection","showPaginator"]],template:function(o,a){1&o&&t.nVh(0,x,5,9,"cue-tabs",0)(1,w,2,1),2&o&&t.vxM(a.hasLocations()?0:1)},dependencies:[j.R,f.T,h.t,v.o,S.Z],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 T=s(5381),M=s(2245);function D(n,d){1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2," Loading projects\u2026 "),t.k0s()())}function b(n,d){if(1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function L(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-proj-list",4),t.bIt("projectSelected",function(a){i.eBV(e);const c=t.XpG();return i.Njj(c.projectSelected.emit(a))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("projects",e.projects())("mapSettings",e.mapSettings())("variant",e.variant())}}let F=(()=>{class n{sdkState=(0,r.hFB)(void 0);mapboxToken=(0,r.hFB)(void 0);variant=(0,r.hFB)("none");projectSelected=(0,r.CGW)();state=(0,i.vPA)("idle");errorMessage=(0,i.vPA)(null);_rawProjects=(0,i.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})));_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,i.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,m.A)(function*(){o.state.set("loading"),o.errorMessage.set(null);try{const a=yield e.listProjects();o._rawProjects.set(a),o.state.set("ready")}catch(a){console.error("[CueProjectList] Failed to load projects:",a),o.errorMessage.set(a instanceof Error?a.message:String(a)),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"]},outputs:{projectSelected:"projectSelected"},decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"height","100%",3,"projects","mapSettings","variant"],[2,"color","var(--cue-defaultContrast)","opacity","0.5","font-size","13px"],[2,"color","#c44","font-size","13px"],[2,"height","100%",3,"projectSelected","projects","mapSettings","variant"]],template:function(o,a){1&o&&t.nVh(0,D,3,0,"cue-flexcontainer",0)(1,b,3,1,"cue-flexcontainer",0)(2,L,1,3,"cue-proj-list",1),2&o&&t.vxM("loading"===a.state()?0:"error"===a.state()?1:2)},dependencies:[y,T.n,M.Typography],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
|