@qaecy/cue-ui 0.0.40 → 0.0.41

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.
Files changed (3) hide show
  1. package/614.js +1 -1
  2. package/7.js +1 -1
  3. package/package.json +1 -1
package/614.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[614],{5448(b,g,a){a.d(g,{L:()=>m});var s=a(7705),c=a(2245),u=a(5547);const h=["*"];let m=(()=>{class r{fontSize=(0,s.hFB)("m");italic=(0,s.hFB)(!1);noWrap=(0,s.hFB)(!0);static \u0275fac=function(l){return new(l||r)};static \u0275cmp=u.VBU({type:r,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:h,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(l,d){1&l&&(u.NAR(),u.j41(0,"div")(1,"cue-typography",0),u.SdG(2),u.k0s()()),2&l&&(u.R7$(),u.Y8G("size",d.fontSize())("italic",d.italic())("noWrap",d.noWrap()))},dependencies:[c.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return r})()},2614(b,g,a){a.d(g,{CueDocumentCharts:()=>T});var s=a(7705),c=a(5802),u=a(2271),h=a(3615),m=a(7993),r=a(1519),p=a(9811),C=a(5381),l=a(2245),d=a(5971),D=a(9352),v=a(3319),y=a(5448),M=a(2014),t=a(5547);const E=o=>({suffix:o}),x=o=>({type:o});function B(o,_){if(1&o&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",1),t.EFF(2),t.k0s()()),2&o){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function O(o,_){1&o&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2," Loading\u2026 "),t.k0s()())}function w(o,_){if(1&o){const e=t.RV6();t.j41(0,"div",6)(1,"cue-block-documents-by-suffix",7),t.bIt("navigated",function(i){c.eBV(e);const f=t.XpG(2);return c.Njj(f.handleNavigated(i,"suffix"))}),t.k0s()()}if(2&o){const e=t.XpG(2);t.xc7("height",e.chartHeight(),"px"),t.R7$(),t.Y8G("data",_)("config",e.blockConfig())}}function S(o,_){if(1&o){const e=t.RV6();t.j41(0,"div",6)(1,"cue-block-documents-by-content-category",7),t.bIt("navigated",function(i){c.eBV(e);const f=t.XpG(2);return c.Njj(f.handleNavigated(i,"content-category"))}),t.k0s()()}if(2&o){const e=t.XpG(2);t.xc7("height",e.chartHeight(),"px"),t.R7$(),t.Y8G("data",_)("config",e.blockConfig())}}function P(o,_){if(1&o&&(t.EFF(0),t.nI1(1,"transloco")),2&o){const e=t.XpG(3);t.SpI(" ",t.i5U(1,1,"components.documentCharts.listDocumentsBySuffix",t.eq3(4,E,e._activeSelection().label))," ")}}function I(o,_){if(1&o&&(t.EFF(0),t.nI1(1,"transloco")),2&o){const e=t.XpG(3);t.SpI(" ",t.i5U(1,1,"components.documentCharts.listDocumentsByType",t.eq3(4,x,e._activeSelection().label))," ")}}function L(o,_){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",5)(1,"cue-button",8),t.bIt("click",function(){c.eBV(e);const i=t.XpG(2);return c.Njj(i.onShowListButtonClick())}),t.nrm(2,"cue-button-padder")(3,"cue-button-icon",9),t.j41(4,"cue-button-label"),t.nVh(5,P,2,6)(6,I,2,6),t.k0s(),t.nrm(7,"cue-button-padder"),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(5),t.vxM("suffix"===e._activeSelection().filterBy&&e._activeSelection().label.startsWith(".")?5:6)}}function R(o,_){if(1&o&&(t.j41(0,"cue-flexcontainer",3),t.nVh(1,w,2,4,"div",4),t.nVh(2,S,2,4,"div",4),t.k0s(),t.nVh(3,L,8,1,"cue-flexcontainer",5)),2&o){let e,n;const i=t.XpG();t.Y8G("direction",i.stackCharts()?"column":"row"),t.R7$(),t.vxM((e="content-category"!==i.mode()&&i.bySuffix())?1:-1,e),t.R7$(),t.vxM((n="suffix"!==i.mode()&&i.byContentCategory())?2:-1,n),t.R7$(),t.vxM(i.showDocumentListButton()&&i._activeSelection()?3:-1)}}let T=(()=>{class o{_blockCtx=(0,c.WQX)(p.z);projectId=(0,s.hFB)(void 0);sdkState=(0,s.hFB)(void 0);mode=(0,s.hFB)("both");stackCharts=(0,s.hFB)(!1);chartHeight=(0,s.hFB)(400);selected=(0,s.CGW)();selectionCleared=(0,s.CGW)();showDocumentListButton=(0,s.hFB)(!1);showInDocumentList=(0,s.CGW)();state=(0,c.vPA)("idle");errorMessage=(0,c.vPA)(null);_activeSelection=(0,c.vPA)(null);_rawData=(0,c.vPA)(void 0);bySuffix=(0,u.EW)(()=>{const e=this._rawData();if(e?.documentsBySuffix&&0!==Object.keys(e.documentsBySuffix).length)return{documents:e.documentsBySuffix}});byContentCategory=(0,u.EW)(()=>{const e=this._rawData();if(e?.documentsByContentCategory&&0!==Object.keys(e.documentsByContentCategory).length)return{documents:e.documentsByContentCategory}});blockConfig=(0,u.EW)(()=>({projectId:this.projectId()??"",portalBaseURL:"",resourceBaseURL:"",graphIsSaturated:!1,privileges:new r.c,handlers:new r.$}));_ownedView;_unsubscribeCategories;_unsubscribeDocumentsData;_lastSetupSignature;constructor(){(0,c.QZP)(()=>{const e=this.projectId(),n=this.sdkState();if(!n)return this._clearRuntimeState(),void this.state.set("idle");const i={projectId:e,cue:n.cue,view:n.view,documents:n.documents,language:n.language};this._isSameSetupSignature(i)||(this._setupFromSdkState(e,n),this._lastSetupSignature=i)})}ngOnDestroy(){this._cleanupSubscriptions(),this._cleanupOwnedView()}handleNavigated(e,n){if(!e)return this._activeSelection.set(null),void this.selectionCleared.emit({chart:n});const i={filterBy:"suffix"===e.filterBy?"suffix":"content-category",values:e.values,label:e.label};this._activeSelection.set(i),this.selected.emit(i)}onShowListButtonClick(){const e=this._activeSelection();e&&this.showInDocumentList.emit(e)}_setupFromSdkState(e,n){if(this._cleanupSubscriptions(),this._cleanupOwnedView(),this._rawData.set(void 0),n.availableContentCategories&&this._blockCtx.availableContentCategories.set(n.availableContentCategories),n.documents)return n.documents.setLanguage(n.language??"en"),void this._bindDocumentsData(n.documents);if(n.view)return n.view.setLanguage(n.language??"en"),this._bindDocumentsData(n.view.documents),void(n.availableContentCategories||this._bindCategoriesFromView(n.view));if(n.cue&&e){const i=n.cue.createProjectView(e,{language:n.language??"en"});return this._ownedView=i,this._bindDocumentsData(i.documents),void(n.availableContentCategories||this._bindCategoriesFromView(i))}this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindDocumentsData(e){this.state.set("loading");const n=()=>{const i=e.projectDocumentsData.get();i&&Object.keys(i.documentsBySuffix).length>0&&(0,u.O8)(()=>{this._rawData.set(i),this.state.set("ready")})};n(),this._unsubscribeDocumentsData=e.projectDocumentsData.subscribe(()=>n())}_bindCategoriesFromView(e){const n=()=>{this._blockCtx.availableContentCategories.set(e.availableContentCategories.get())};n(),this._unsubscribeCategories=e.availableContentCategories.subscribe(n)}_clearRuntimeState(){this._cleanupSubscriptions(),this._cleanupOwnedView(),this._rawData.set(void 0),this._blockCtx.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupSubscriptions(){this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._unsubscribeDocumentsData?.(),this._unsubscribeDocumentsData=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_isSameSetupSignature(e){const n=this._lastSetupSignature;return!!n&&n.projectId===e.projectId&&n.cue===e.cue&&n.view===e.view&&n.documents===e.documents&&n.language===e.language}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-document-charts"]],inputs:{projectId:[1,"projectId"],sdkState:[1,"sdkState"],mode:[1,"mode"],stackCharts:[1,"stackCharts"],chartHeight:[1,"chartHeight"],showDocumentListButton:[1,"showDocumentListButton"]},outputs:{selected:"selected",selectionCleared:"selectionCleared",showInDocumentList:"showInDocumentList"},features:[t.Jv_([p.z])],decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],["align","stretch",2,"width","100%",3,"direction"],[1,"chart-wrapper",3,"height"],["justify","center"],[1,"chart-wrapper"],[3,"navigated","data","config"],["size","s","variant","secondary",3,"click"],["icon","filter"]],template:function(n,i){1&n&&t.nVh(0,B,3,1,"cue-flexcontainer",0)(1,O,3,0,"cue-flexcontainer",0)(2,R,4,4),2&n&&t.vxM("error"===i.state()?0:"loading"===i.state()?1:2)},dependencies:[h.Y,m.o,C.n,l.Typography,d.$,y.L,M.z,v.a,D.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%}.chart-wrapper[_ngcontent-%COMP%]{flex:1;min-width:0;position:relative}cue-block-documents-by-suffix[_ngcontent-%COMP%], cue-block-documents-by-content-category[_ngcontent-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return o})()}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[614],{5448(b,h,a){a.d(h,{L:()=>C});var s=a(7705),c=a(2245),u=a(5547);const m=["*"];let C=(()=>{class r{fontSize=(0,s.hFB)("m");italic=(0,s.hFB)(!1);noWrap=(0,s.hFB)(!0);static \u0275fac=function(l){return new(l||r)};static \u0275cmp=u.VBU({type:r,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:m,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(l,d){1&l&&(u.NAR(),u.j41(0,"div")(1,"cue-typography",0),u.SdG(2),u.k0s()()),2&l&&(u.R7$(),u.Y8G("size",d.fontSize())("italic",d.italic())("noWrap",d.noWrap()))},dependencies:[c.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return r})()},2614(b,h,a){a.d(h,{CueDocumentCharts:()=>T});var s=a(7705),c=a(5802),u=a(2271),m=a(3615),C=a(7993),r=a(1519),p=a(9811),f=a(5381),l=a(2245),d=a(5971),D=a(9352),v=a(3319),y=a(5448),M=a(2014),t=a(5547);const E=o=>({suffix:o}),x=o=>({type:o});function B(o,_){if(1&o&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",1),t.EFF(2),t.k0s()()),2&o){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function O(o,_){1&o&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2," Loading\u2026 "),t.k0s()())}function w(o,_){if(1&o){const e=t.RV6();t.j41(0,"div",6)(1,"cue-block-documents-by-suffix",7),t.bIt("navigated",function(i){c.eBV(e);const g=t.XpG(2);return c.Njj(g.handleNavigated(i,"suffix"))}),t.k0s()()}if(2&o){const e=t.XpG(2);t.xc7("height",e.chartHeight(),"px"),t.R7$(),t.Y8G("data",_)("config",e.blockConfig())}}function S(o,_){if(1&o){const e=t.RV6();t.j41(0,"div",6)(1,"cue-block-documents-by-content-category",7),t.bIt("navigated",function(i){c.eBV(e);const g=t.XpG(2);return c.Njj(g.handleNavigated(i,"content-category"))}),t.k0s()()}if(2&o){const e=t.XpG(2);t.xc7("height",e.chartHeight(),"px"),t.R7$(),t.Y8G("data",_)("config",e.blockConfig())}}function P(o,_){if(1&o&&(t.EFF(0),t.nI1(1,"transloco")),2&o){const e=t.XpG(3);t.SpI(" ",t.i5U(1,1,"components.documentCharts.listDocumentsBySuffix",t.eq3(4,E,e._activeSelection().label))," ")}}function I(o,_){if(1&o&&(t.EFF(0),t.nI1(1,"transloco")),2&o){const e=t.XpG(3);t.SpI(" ",t.i5U(1,1,"components.documentCharts.listDocumentsByType",t.eq3(4,x,e._activeSelection().label))," ")}}function L(o,_){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",5)(1,"cue-button",8),t.bIt("click",function(){c.eBV(e);const i=t.XpG(2);return c.Njj(i.onShowListButtonClick())}),t.nrm(2,"cue-button-padder")(3,"cue-button-icon",9),t.j41(4,"cue-button-label"),t.nVh(5,P,2,6)(6,I,2,6),t.k0s(),t.nrm(7,"cue-button-padder"),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(5),t.vxM("suffix"===e._activeSelection().filterBy&&e._activeSelection().label.startsWith(".")?5:6)}}function R(o,_){if(1&o&&(t.j41(0,"cue-flexcontainer",3),t.nVh(1,w,2,4,"div",4),t.nVh(2,S,2,4,"div",4),t.k0s(),t.nVh(3,L,8,1,"cue-flexcontainer",5)),2&o){let e,n;const i=t.XpG();t.Y8G("direction",i.stackCharts()?"column":"row"),t.R7$(),t.vxM((e="content-category"!==i.mode()&&i.bySuffix())?1:-1,e),t.R7$(),t.vxM((n="suffix"!==i.mode()&&i.byContentCategory())?2:-1,n),t.R7$(),t.vxM(i.showDocumentListButton()&&i._activeSelection()?3:-1)}}let T=(()=>{class o{_blockCtx=(0,c.WQX)(p.z);projectId=(0,s.hFB)(void 0);sdkState=(0,s.hFB)(void 0);mode=(0,s.hFB)("both");stackCharts=(0,s.hFB)(!1);chartHeight=(0,s.hFB)(400);selected=(0,s.CGW)();selectionCleared=(0,s.CGW)();showDocumentListButton=(0,s.hFB)(!1);showInDocumentList=(0,s.CGW)();state=(0,c.vPA)("idle");errorMessage=(0,c.vPA)(null);_activeSelection=(0,c.vPA)(null);_rawData=(0,c.vPA)(void 0);bySuffix=(0,u.EW)(()=>{const e=this._rawData();if(e?.documentsBySuffix&&0!==Object.keys(e.documentsBySuffix).length)return{documents:e.documentsBySuffix}});byContentCategory=(0,u.EW)(()=>{const e=this._rawData();if(e?.documentsByContentCategory&&0!==Object.keys(e.documentsByContentCategory).length)return{documents:e.documentsByContentCategory}});blockConfig=(0,u.EW)(()=>({projectId:this.projectId()??"",portalBaseURL:"",resourceBaseURL:"",graphIsSaturated:!1,privileges:new r.c,handlers:new r.$}));_ownedView;_unsubscribeCategories;_unsubscribeDocumentsData;_lastSetupSignature;constructor(){(0,c.QZP)(()=>{const e=this.projectId(),n=this.sdkState();if(!n)return this._clearRuntimeState(),void this.state.set("idle");const i={projectId:e,cue:n.cue,view:n.view,documents:n.documents,language:n.language};this._isSameSetupSignature(i)||(this._setupFromSdkState(e,n),this._lastSetupSignature=i)})}ngOnDestroy(){this._cleanupSubscriptions(),this._cleanupOwnedView()}handleNavigated(e,n){if(!e)return this._activeSelection.set(null),void this.selectionCleared.emit({chart:n});const i={filterBy:"suffix"===e.filterBy?"suffix":"content-category",values:e.values.filter(g=>"__grouped_small__"!==g),label:e.label};this._activeSelection.set(i),this.selected.emit(i)}onShowListButtonClick(){const e=this._activeSelection();e&&this.showInDocumentList.emit(e)}_setupFromSdkState(e,n){if(this._cleanupSubscriptions(),this._cleanupOwnedView(),this._rawData.set(void 0),n.availableContentCategories&&this._blockCtx.availableContentCategories.set(n.availableContentCategories),n.documents)return n.documents.setLanguage(n.language??"en"),void this._bindDocumentsData(n.documents);if(n.view)return n.view.setLanguage(n.language??"en"),this._bindDocumentsData(n.view.documents),void(n.availableContentCategories||this._bindCategoriesFromView(n.view));if(n.cue&&e){const i=n.cue.createProjectView(e,{language:n.language??"en"});return this._ownedView=i,this._bindDocumentsData(i.documents),void(n.availableContentCategories||this._bindCategoriesFromView(i))}this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindDocumentsData(e){this.state.set("loading");const n=()=>{const i=e.projectDocumentsData.get();i&&Object.keys(i.documentsBySuffix).length>0&&(0,u.O8)(()=>{this._rawData.set(i),this.state.set("ready")})};n(),this._unsubscribeDocumentsData=e.projectDocumentsData.subscribe(()=>n())}_bindCategoriesFromView(e){const n=()=>{this._blockCtx.availableContentCategories.set(e.availableContentCategories.get())};n(),this._unsubscribeCategories=e.availableContentCategories.subscribe(n)}_clearRuntimeState(){this._cleanupSubscriptions(),this._cleanupOwnedView(),this._rawData.set(void 0),this._blockCtx.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupSubscriptions(){this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._unsubscribeDocumentsData?.(),this._unsubscribeDocumentsData=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_isSameSetupSignature(e){const n=this._lastSetupSignature;return!!n&&n.projectId===e.projectId&&n.cue===e.cue&&n.view===e.view&&n.documents===e.documents&&n.language===e.language}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-document-charts"]],inputs:{projectId:[1,"projectId"],sdkState:[1,"sdkState"],mode:[1,"mode"],stackCharts:[1,"stackCharts"],chartHeight:[1,"chartHeight"],showDocumentListButton:[1,"showDocumentListButton"]},outputs:{selected:"selected",selectionCleared:"selectionCleared",showInDocumentList:"showInDocumentList"},features:[t.Jv_([p.z])],decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],["align","stretch",2,"width","100%",3,"direction"],[1,"chart-wrapper",3,"height"],["justify","center"],[1,"chart-wrapper"],[3,"navigated","data","config"],["size","s","variant","secondary",3,"click"],["icon","filter"]],template:function(n,i){1&n&&t.nVh(0,B,3,1,"cue-flexcontainer",0)(1,O,3,0,"cue-flexcontainer",0)(2,R,4,4),2&n&&t.vxM("error"===i.state()?0:"loading"===i.state()?1:2)},dependencies:[m.Y,C.o,f.n,l.Typography,d.$,y.L,M.z,v.a,D.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%}.chart-wrapper[_ngcontent-%COMP%]{flex:1;min-width:0;position:relative}cue-block-documents-by-suffix[_ngcontent-%COMP%], cue-block-documents-by-content-category[_ngcontent-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return o})()}}]);