@qaecy/cue-ui 0.0.56 → 0.0.58

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 (76) hide show
  1. package/1051.js +1 -1
  2. package/1138.js +1 -1
  3. package/1153.js +1 -1
  4. package/1338.js +1 -1
  5. package/1520.js +1 -0
  6. package/1837.js +1 -1
  7. package/1985.js +1 -1
  8. package/2003.js +1 -0
  9. package/2014.js +1 -0
  10. package/2021.js +1 -1
  11. package/2081.js +1 -1
  12. package/2245.js +1 -1
  13. package/2283.js +1 -0
  14. package/2317.js +1 -1
  15. package/2775.js +1 -1
  16. package/2839.js +1 -1
  17. package/29.js +1 -1
  18. package/3036.js +1 -1
  19. package/3039.js +1 -1
  20. package/3288.js +1 -1
  21. package/3319.js +1 -0
  22. package/3577.js +1 -1
  23. package/3614.js +1 -1
  24. package/4098.js +1 -0
  25. package/4283.js +1 -1
  26. package/4311.js +1 -1
  27. package/4791.js +1 -0
  28. package/5277.js +1 -0
  29. package/5381.js +1 -0
  30. package/5448.js +1 -0
  31. package/5559.js +1 -1
  32. package/5649.js +1 -1
  33. package/5738.js +1 -1
  34. package/5872.js +1 -1
  35. package/5971.js +1 -0
  36. package/6027.js +1 -0
  37. package/617.js +1 -1
  38. package/6233.js +1 -1
  39. package/63.js +1 -1
  40. package/6419.js +1 -1
  41. package/6423.js +1 -1
  42. package/650.js +1 -1
  43. package/6947.js +1 -1
  44. package/7089.js +1 -0
  45. package/7154.js +1 -0
  46. package/7313.js +1 -0
  47. package/7441.js +1 -1
  48. package/7719.js +1 -1
  49. package/7802.js +1 -0
  50. package/7851.js +1 -0
  51. package/804.js +1 -1
  52. package/8194.js +1 -0
  53. package/8560.js +1 -1
  54. package/8659.js +1 -0
  55. package/880.js +1 -0
  56. package/8855.js +1 -1
  57. package/8957.js +1 -1
  58. package/928.js +1 -1
  59. package/9396.js +1 -1
  60. package/992.js +1 -0
  61. package/README.md +5 -5
  62. package/common.js +1 -1
  63. package/index.js +1 -1
  64. package/main.js +1 -1
  65. package/package.json +1 -1
  66. package/2399.js +0 -1
  67. package/2516.js +0 -1
  68. package/3537.js +0 -1
  69. package/4687.js +0 -1
  70. package/4879.js +0 -1
  71. package/5041.js +0 -1
  72. package/5071.js +0 -1
  73. package/5137.js +0 -1
  74. package/7056.js +0 -1
  75. package/8336.js +0 -1
  76. package/8791.js +0 -1
package/8957.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[1338,8957],{8957(b,d,a){a.d(d,{Input:()=>P});var l=a(7705),u=a(5802),_=a(9417),g=a(2245),f=a(5381),v=a(29),e=a(5547);const M=["inputField"];function C(o,r){1&o&&e.EFF(0," * ")}function h(o,r){if(1&o&&(e.j41(0,"span",4),e.nrm(1,"cue-svg-icon",7),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("name",n.icon())}}function O(o,r){if(1&o&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.JRh(n.error())}}let P=(()=>{class o{value=(0,l.geq)("");_displayValue=(0,u.vPA)("");info=(0,l.hFB)("");label=(0,l.hFB)("");placeholder=(0,l.hFB)("");error=(0,l.hFB)(void 0);required=(0,l.hFB)(!1);icon=(0,l.hFB)();type=(0,l.hFB)("text");size=(0,l.hFB)("m");isFocused=!1;disabled=!1;inputField;valueChange=(0,l.CGW)();valueCommit=(0,l.CGW)();_syncDisplay=(0,u.QZP)(()=>{const n=this.value()||"";!this.isFocused&&n!==this._displayValue()&&this._displayValue.set(n)});onChange=n=>{};onTouched=()=>{};writeValue(n){const i=n||"";this.value.set(i),this.isFocused||this._displayValue.set(i)}registerOnChange(n){this.onChange=n}registerOnTouched(n){this.onTouched=n}setDisabledState(n){this.disabled=n}emitValue(n){const i=n.target.value;this.valueChange.emit(i),this.onChange(i)}focus(){this.isFocused=!0,this._displayValue.set(this.value()||""),this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1;const n=this.inputField?.nativeElement.value??this._displayValue();this._displayValue.set(n),this.valueCommit.emit(n),this.onTouched()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-input"]],viewQuery:function(i,t){if(1&i&&e.GBs(M,5),2&i){let s;e.mGM(s=e.lsd())&&(t.inputField=s.first)}},inputs:{value:[1,"value"],info:[1,"info"],label:[1,"label"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],icon:[1,"icon"],type:[1,"type"],size:[1,"size"]},outputs:{value:"valueChange",valueChange:"valueChange",valueCommit:"valueCommit"},features:[e.Jv_([{provide:_.kq,useExisting:(0,u.Rfq)(()=>o),multi:!0}])],decls:9,vars:13,consts:[["inputField",""],[1,"form-field"],["size","s",1,"label",3,"click","info"],["align","center","gap","s"],[2,"height","12px"],[1,"input",3,"input","focus","blur","type","value","placeholder","disabled"],["size","s",1,"error-text"],[3,"name"]],template:function(i,t){if(1&i){const s=e.RV6();e.j41(0,"div",1)(1,"cue-typography",2),e.bIt("click",function(){u.eBV(s);const p=e.sdS(7);return u.Njj(p.focus())}),e.EFF(2),e.nVh(3,C,1,0),e.k0s(),e.j41(4,"cue-flexcontainer",3),e.nVh(5,h,2,1,"span",4),e.j41(6,"input",5,0),e.bIt("input",function(p){return t.emitValue(p)})("focus",function(){return t.isFocused=!0})("blur",function(){return t.onBlur()}),e.k0s()(),e.nVh(8,O,2,1,"cue-typography",6),e.k0s()}2&i&&(e.HbH("size-"+t.size()),e.AVh("focused",t.isFocused||t._displayValue()||t.placeholder()),e.R7$(),e.Y8G("info",t.info()),e.R7$(),e.SpI(" ",t.label()," "),e.R7$(),e.vxM(t.required()?3:-1),e.R7$(2),e.vxM(t.icon()?5:-1),e.R7$(),e.Y8G("type",t.type())("value",t._displayValue())("placeholder",t.placeholder())("disabled",t.disabled),e.R7$(2),e.vxM(t.error()?8:-1))},dependencies:[g.Typography,f.n,v.A],styles:['.form-field[_ngcontent-%COMP%]{position:relative}.input[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family)}.size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family);opacity:.5}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;transition:all .2s ease;cursor:text}.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)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .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[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .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[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .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[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.underline[_ngcontent-%COMP%]{content:"";position:absolute;bottom:0;left:0;height:1px;width:0;background-color:var(--cue-input-border-bottom-color);transition:width .3s ease}.form-field.focused[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}'],changeDetection:0})}return o})()}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[1338,2245,8957,9495],{9495(O,v,u){u.d(v,{InlineInput:()=>m});var a=u(7705),r=u(5802),d=u(5547);const M=["inputEl"];let m=(()=>{class f{value=(0,a.geq)("");placeholder=(0,a.hFB)("");autofocus=(0,a.hFB)(!1);valueChange=(0,a.CGW)();save=(0,a.CGW)();cancel=(0,a.CGW)();inputEl;constructor(){(0,r.QZP)(()=>{const e=this.value(),c=this.inputEl?.nativeElement;c&&c.innerText.replace(/\n$/,"")!==e&&(c.innerText=e)})}ngAfterViewInit(){const e=this.inputEl?.nativeElement;e&&(e.innerText=this.value()),this.autofocus()&&e&&e.focus()}onInput(e){const _=e.target.innerText.replace(/\n$/,"");this.value.set(_),this.valueChange.emit(_)}onEnter(e){e.preventDefault(),this.save.emit()}onEscape(e){e.preventDefault(),this.cancel.emit()}onBlur(){this.save.emit()}static \u0275fac=function(c){return new(c||f)};static \u0275cmp=d.VBU({type:f,selectors:[["cue-inline-input"]],viewQuery:function(c,_){if(1&c&&d.GBs(M,5),2&c){let g;d.mGM(g=d.lsd())&&(_.inputEl=g.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(c,_){1&c&&(d.rj2(0,"span",1,0),d.VwU("input",function(h){return _.onInput(h)})("keydown.enter",function(h){return _.onEnter(h)})("keydown.escape",function(h){return _.onEscape(h)})("blur",function(){return _.onBlur()}),d.eux()),2&c&&d.BMQ("data-placeholder",_.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 f})()},8957(O,v,u){u.d(v,{Input:()=>p});var a=u(7705),r=u(5802),d=u(2271),M=u(9417),m=u(2245),f=u(5381),t=u(29),e=u(5547);const c=["inputField"];function _(s,l){1&s&&e.EFF(0," * ")}function g(s,l){if(1&s&&(e.j41(0,"span",4),e.nrm(1,"cue-svg-icon",8),e.k0s()),2&s){const n=e.XpG();e.R7$(),e.Y8G("name",n.icon())}}function h(s,l){if(1&s){const n=e.RV6();e.j41(0,"button",9),e.bIt("click",function(){r.eBV(n);const i=e.XpG();return r.Njj(i.showPassword.set(!i.showPassword()))}),e.nrm(1,"cue-svg-icon",8),e.k0s()}if(2&s){const n=e.XpG();e.BMQ("aria-label",n.showPassword()?"Hide password":"Show password"),e.R7$(),e.Y8G("name",n.showPassword()?"eye-off":"eye")}}function y(s,l){if(1&s&&(e.j41(0,"cue-typography",7),e.EFF(1),e.k0s()),2&s){const n=e.XpG();e.R7$(),e.JRh(n.error())}}let p=(()=>{class s{value=(0,a.geq)("");_displayValue=(0,r.vPA)("");info=(0,a.hFB)("");label=(0,a.hFB)("");placeholder=(0,a.hFB)("");error=(0,a.hFB)(void 0);required=(0,a.hFB)(!1);icon=(0,a.hFB)();type=(0,a.hFB)("text");size=(0,a.hFB)("m");showPassword=(0,r.vPA)(!1);effectiveType=(0,d.EW)(()=>"password"===this.type()&&this.showPassword()?"text":this.type());isFocused=!1;disabled=!1;autofilled=(0,r.vPA)(!1);inputField;valueChange=(0,a.CGW)();valueCommit=(0,a.CGW)();_lastSyncedValue="";_syncDisplay=(0,r.QZP)(()=>{const n=this.value()||"";n!==this._lastSyncedValue&&(this._lastSyncedValue=n,!this.isFocused&&n!==this._displayValue()&&this._displayValue.set(n))});onChange=n=>{};onTouched=()=>{};writeValue(n){const o=n||"";this.value.set(o),this.isFocused||this._displayValue.set(o)}registerOnChange(n){this.onChange=n}registerOnTouched(n){this.onTouched=n}setDisabledState(n){this.disabled=n}onAnimationStart(n){if(n.animationName.endsWith("cue-autofill-start")){this.autofilled.set(!0);const o=this.inputField?.nativeElement.value??"";o&&o!==this.value()&&(this._displayValue.set(o),this.valueChange.emit(o),this.onChange(o),this.onTouched())}else n.animationName.endsWith("cue-autofill-cancel")&&this.autofilled.set(!1)}emitValue(n){const o=n.target.value;this.valueChange.emit(o),this.onChange(o)}focus(){this.isFocused=!0,this.value()&&this._displayValue.set(this.value()),this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1;const n=this.inputField?.nativeElement.value??this._displayValue();this._displayValue.set(n),this.valueCommit.emit(n),this.onTouched()}static \u0275fac=function(o){return new(o||s)};static \u0275cmp=e.VBU({type:s,selectors:[["cue-input"]],viewQuery:function(o,i){if(1&o&&e.GBs(c,5),2&o){let b;e.mGM(b=e.lsd())&&(i.inputField=b.first)}},inputs:{value:[1,"value"],info:[1,"info"],label:[1,"label"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],icon:[1,"icon"],type:[1,"type"],size:[1,"size"]},outputs:{value:"valueChange",valueChange:"valueChange",valueCommit:"valueCommit"},features:[e.Jv_([{provide:M.kq,useExisting:(0,r.Rfq)(()=>s),multi:!0}])],decls:10,vars:14,consts:[["inputField",""],[1,"form-field"],["size","s",1,"label",3,"click","info"],["align","center","gap","s"],[2,"height","12px"],[1,"input",3,"input","focus","blur","animationstart","type","value","placeholder","disabled"],["type","button",1,"toggle-visibility"],["size","s",1,"error-text"],[3,"name"],["type","button",1,"toggle-visibility",3,"click"]],template:function(o,i){if(1&o){const b=e.RV6();e.j41(0,"div",1)(1,"cue-typography",2),e.bIt("click",function(){r.eBV(b);const C=e.sdS(7);return r.Njj(C.focus())}),e.EFF(2),e.nVh(3,_,1,0),e.k0s(),e.j41(4,"cue-flexcontainer",3),e.nVh(5,g,2,1,"span",4),e.j41(6,"input",5,0),e.bIt("input",function(C){return i.emitValue(C)})("focus",function(){return i.isFocused=!0})("blur",function(){return i.onBlur()})("animationstart",function(C){return i.onAnimationStart(C)}),e.k0s(),e.nVh(8,h,2,2,"button",6),e.k0s(),e.nVh(9,y,2,1,"cue-typography",7),e.k0s()}2&o&&(e.HbH("size-"+i.size()),e.AVh("focused",i.isFocused||i._displayValue()||i.placeholder()||i.autofilled()),e.R7$(),e.Y8G("info",i.info()),e.R7$(),e.SpI(" ",i.label()," "),e.R7$(),e.vxM(i.required()?3:-1),e.R7$(2),e.vxM(i.icon()?5:-1),e.R7$(),e.Y8G("type",i.effectiveType())("value",i._displayValue())("placeholder",i.placeholder())("disabled",i.disabled),e.R7$(2),e.vxM("password"===i.type()?8:-1),e.R7$(),e.vxM(i.error()?9:-1))},dependencies:[m.Typography,f.FlexContainer,t.A],styles:['.form-field[_ngcontent-%COMP%]{position:relative}.toggle-visibility[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;width:16px;height:16px;padding:0;border:none;background:none;color:var(--cue-input-value-color);cursor:pointer;opacity:.6}.toggle-visibility[_ngcontent-%COMP%]:hover{opacity:1}.input[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family)}.size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family);opacity:.5}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}@keyframes _ngcontent-%COMP%_cue-autofill-start{}@keyframes _ngcontent-%COMP%_cue-autofill-cancel{}.input[_ngcontent-%COMP%]:-webkit-autofill{animation-name:_ngcontent-%COMP%_cue-autofill-start}.input[_ngcontent-%COMP%]:not(:-webkit-autofill){animation-name:_ngcontent-%COMP%_cue-autofill-cancel}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;transition:all .2s ease;cursor:text}.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)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .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[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .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[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .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[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.underline[_ngcontent-%COMP%]{content:"";position:absolute;bottom:0;left:0;height:1px;width:0;background-color:var(--cue-input-border-bottom-color);transition:width .3s ease}.form-field.focused[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}'],changeDetection:0})}return s})()},2245(O,v,u){u.r(v),u.d(v,{Typography:()=>y});var a=u(7705),r=u(2271),d=u(7089),M=u(5381),m=u(29),f=u(9495),t=u(5547),e=u(5802);const c=["*"];function _(p,s){if(1&p){const l=t.RV6();t.j41(0,"div",2),t.bIt("input",function(o){e.eBV(l);const i=t.XpG();return e.Njj(i.onInput(o))})("blur",function(o){e.eBV(l);const i=t.XpG();return e.Njj(i.onInput(o))}),t.k0s()}if(2&p){const l=t.XpG();t.Aen(l.getStyles()),t.xc7("font-style",l.italic()?"italic":"normal"),t.Y8G("innerHTML",l.innerHTML(),t.npT)("contentEditable",l.editable())}}function g(p,s){if(1&p&&t.nrm(0,"cue-svg-icon",5),2&p){const l=t.XpG(2);t.xc7("--cue-icon-width",l.infoSize()+"px"),t.Y8G("cueTooltip",l.info())}}function h(p,s){if(1&p){const l=t.RV6();t.j41(0,"div",3),t.bIt("input",function(o){e.eBV(l);const i=t.XpG();return e.Njj(i.onInput(o))})("blur",function(o){e.eBV(l);const i=t.XpG();return e.Njj(i.onInput(o))}),t.SdG(1),t.k0s(),t.nVh(2,g,1,3,"cue-svg-icon",4)}if(2&p){const l=t.XpG();t.Aen(l.getStyles()),t.xc7("font-style",l.italic()?"italic":"normal"),t.Y8G("contentEditable",l.editable()),t.R7$(2),t.vxM(l.info()?2:-1)}}let y=(()=>{class p{_inlineInput=(0,a.sbv)(f.InlineInput);hasInlineInput=(0,r.EW)(()=>!!this._inlineInput());as=(0,a.hFB)("div");size=(0,a.hFB)("m");weight=(0,a.hFB)("regular");align=(0,a.hFB)("start");noWrap=(0,a.hFB)(!1);italic=(0,a.hFB)(!1);innerHTML=(0,a.hFB)(null);info=(0,a.hFB)("");editable=(0,a.hFB)(!1);change=(0,a.CGW)();onInput(l){this.editable()&&this.change.emit(l.target.innerText)}getStyles=(0,r.EW)(()=>`\n font-family: var(--cue-font-family);\n font-size: var(--cue-font-${this.size()}-size);\n line-height: var(--cue-font-${this.size()}-line-height);\n letter-spacing: var(--cue-font-${this.size()}-letter-spacing);\n font-weight: var(--cue-font-weight-${this.weight()});\n text-align: ${this.align()};\n ${this.noWrap()?"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;":""}\n `);infoSize=(0,r.EW)(()=>{switch(this.size()){case"xs":return 10;case"s":return 12;case"m":default:return 14;case"l":return 16;case"xl":return 18}});static \u0275fac=function(n){return new(n||p)};static \u0275cmp=t.VBU({type:p,selectors:[["cue-typography"]],contentQueries:function(n,o,i){1&n&&t.C6U(i,o._inlineInput,f.InlineInput,5),2&n&&t.NyB()},inputs:{as:[1,"as"],size:[1,"size"],weight:[1,"weight"],align:[1,"align"],noWrap:[1,"noWrap"],italic:[1,"italic"],innerHTML:[1,"innerHTML"],info:[1,"info"],editable:[1,"editable"]},outputs:{change:"change"},ngContentSelectors:c,decls:3,vars:2,consts:[["justify","start","align","center",3,"noGap"],[3,"style","font-style","innerHTML","contentEditable"],[3,"input","blur","innerHTML","contentEditable"],[3,"input","blur","contentEditable"],["name","info",2,"margin-left","4px","vertical-align","super","cursor","pointer",3,"cueTooltip","--cue-icon-width"],["name","info",2,"margin-left","4px","vertical-align","super","cursor","pointer",3,"cueTooltip"]],template:function(n,o){1&n&&(t.NAR(),t.j41(0,"cue-flexcontainer",0),t.nVh(1,_,1,6,"div",1)(2,h,3,6),t.k0s()),2&n&&(t.Y8G("noGap",!0),t.R7$(),t.vxM(o.innerHTML()?1:2))},dependencies:[m.A,d.d,M.FlexContainer],encapsulation:2})}return p})()}}]);
package/928.js CHANGED
@@ -1 +1 @@
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})()}}]);
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 C(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 P(n,d){if(1&n&&t.nVh(0,x,2,7,"cue-card",5)(1,C,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,P,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.FlexContainer,L.Typography,b.k,T.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
package/9396.js CHANGED
@@ -1 +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(3537),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})()}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{9396(W,x,c){c.d(x,{CueContextViewer:()=>L});var p=c(467),d=c(7705),a=c(5802),r=c(2271),g=c(1492),v=c(2283),_=c(2839),f=c(6455),C=c(8334),y=c(9352),D=c(7851),e=c(5547);function I(n,l){1&n&&(e.j41(0,"div",1),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"components.contextViewer.infoNoContext")))}function w(n,l){if(1&n){const t=e.RV6();e.j41(0,"cue-tabs",2)(1,"cue-tab",5),e.nI1(2,"transloco"),e.j41(3,"cue-doc-list",6),e.bIt("clickedDocument",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onDocumentClicked(s))}),e.k0s()(),e.j41(4,"cue-tab",5),e.nI1(5,"transloco"),e.j41(6,"cue-ent-list-inner",7),e.bIt("rowClicked",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onEntityRowClicked(s))}),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("label",e.bMT(2,9,"components.contextViewer.tabDocuments")),e.R7$(2),e.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t._docHandlers())("variant",t.variant()),e.R7$(),e.Y8G("label",e.bMT(5,11,"components.contextViewer.tabEntities")),e.R7$(2),e.Y8G("entities",t.entityIris())("entityData",t.entityData())("handlers",t._entityHandlers())}}function b(n,l){if(1&n){const t=e.RV6();e.j41(0,"cue-doc-list",6),e.bIt("clickedDocument",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onDocumentClicked(s))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t._docHandlers())("variant",t.variant())}}function M(n,l){if(1&n){const t=e.RV6();e.j41(0,"cue-ent-list-inner",8),e.bIt("rowClicked",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onEntityRowClicked(s))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("entities",t.entityIris())("entityData",t.entityData())("handlers",t._entityHandlers())}}function R(n,l){1&n&&(e.j41(0,"div",1),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"components.contextViewer.infoNoItems")))}let k=(()=>{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)({});itemRowClicked=(0,d.CGW)();loading=(0,r.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(t=>"document"===t.type));_entityItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(t=>"entity"===t.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(t=>({id:t.id,relevance:t.relevance})));entityIris=(0,r.EW)(()=>this._entityItems().map(t=>t.id));_docHandlers=(0,r.EW)(()=>({requestData:t=>this.handlers()?.requestDocumentData?.(t),requestDownload:t=>this.handlers()?.requestDownloadDocument?.(t),requestOpen:(t,o)=>this.handlers()?.requestOpenDocument?.(t,o),requestOpenInDir:(t,o)=>this.handlers()?.requestOpenDocumentInDir?.(t,o)}));_entityHandlers=(0,r.EW)(()=>({requestData:(t,o)=>this.handlers()?.requestEntityData?.(t,o),requestOpen:t=>this.handlers()?.requestOpenEntity?.(t)}));onEntityRowClicked({row:t}){this.itemRowClicked.emit({type:"entity",row:t,index:this._originalIndex(t.entity)})}onDocumentClicked(t){this.itemRowClicked.emit({type:"document",row:t,index:this._originalIndex(t.id)})}_originalIndex(t){return(this.contextDoc()?.items??[]).findIndex(o=>o.id===t)}constructor(){(0,a.QZP)(()=>{const t=this.contextId();t&&this.handlers()?.requestContext?.(t)})}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=e.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:{itemRowClicked:"itemRowClicked"},decls:7,vars:5,consts:[[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader","cueLogoLoaderMessage"],[1,"cv-status"],[2,"height","100%"],[3,"documentRefs","documentData","handlers","variant"],[2,"height","400px",3,"entities","entityData","handlers"],[3,"label"],[3,"clickedDocument","documentRefs","documentData","handlers","variant"],[2,"height","100%",3,"rowClicked","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","entities","entityData","handlers"]],template:function(o,s){1&o&&(e.j41(0,"div",0),e.nI1(1,"transloco"),e.nVh(2,I,3,3,"div",1)(3,w,7,13,"cue-tabs",2)(4,b,1,4,"cue-doc-list",3)(5,M,1,3,"cue-ent-list-inner",4)(6,R,3,3,"div",1),e.k0s()),2&o&&(e.Y8G("cueLogoLoader",s.loading())("cueLogoLoaderMessage",e.bMT(1,3,"components.contextViewer.infoLoading")),e.R7$(2),e.vxM(s.contextDoc()?s.hasBoth()?3:s.hasDocuments()?4:s.hasEntities()?5:6:2))},dependencies:[v.g,_.u,f.t,C.o,D.k,y.Kj],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 V=c(5381),j=c(2245),N=c(7293);function E(n,l){if(1&n&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),e.EFF(2),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.SpI(" ",t.errorMessage()," ")}}function T(n,l){1&n&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),e.EFF(2," No project connected. "),e.k0s()())}function F(n,l){if(1&n&&e.nrm(0,"cue-logo-link",5),2&n){const t=e.XpG(2);e.Y8G("projectId",t.projectId())}}function G(n,l){if(1&n){const t=e.RV6();e.j41(0,"div",1)(1,"cue-context-viewer-inner",4),e.bIt("itemRowClicked",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.itemRowClicked.emit(s))}),e.k0s(),e.nVh(2,F,1,1,"cue-logo-link",5),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("cueLogoLoader","loading"===t.state()),e.R7$(),e.Y8G("contextDoc",t.contextDoc())("documentData",t.documentData())("entityData",t.entityData())("handlers",t._handlers())("variant",t.variant()),e.R7$(),e.vxM(t.showLogo()?2:-1)}}function B(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 L=(()=>{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});itemRowClicked=(0,d.CGW)();state=(0,a.vPA)("idle");errorMessage=(0,a.vPA)(null);contextDoc=(0,a.vPA)(void 0);documentData=(0,a.vPA)({});entityData=(0,a.vPA)({});_documents=(0,a.vPA)(void 0);_entities=(0,a.vPA)(void 0);_unsubDocs;_unsubEntities;_inputWarningTimer;_handlers=(0,r.EW)(()=>({requestDocumentData:t=>this._documents()?.requestDocumentData(t),requestEntityData:(t,o)=>this._entities()?.requestEntityData(t,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,a.QZP)(()=>{this._load(this.cue(),this.projectId(),this.contextId())})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_load(t,o,s){var i=this;return(0,p.A)(function*(){if(i._teardown(),i.contextDoc.set(void 0),i.documentData.set({}),i.entityData.set({}),t&&o&&s){i.state.set("loading"),i.errorMessage.set(null);try{const u=yield t.api.contexts.getContext(o,s);i.contextDoc.set(u);const m=new g.f$(t.api,o),h=new g.g8(t.api,o);i._documents.set(m),i._entities.set(h),i._unsubDocs=m.documentInfoMap.subscribe(()=>i._syncDocumentData(m)),i._unsubEntities=h.entityInfoMap.subscribe(()=>i._syncEntityData(h)),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(t){const o=t.documentInfoMap.get(),s={};for(const[i,u]of Object.entries(o))s[i]=B(u);this.documentData.set(s)}_syncEntityData(t){const o=t.entityInfoMap.get(),s={};for(const[i,u]of Object.entries(o))s[i]={value:u.value??i,categories:u.categories??[],mentionCount:u.mentionCount};this.entityData.set(s)}_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=e.VBU({type:n,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{itemRowClicked:"itemRowClicked"},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,"itemRowClicked","contextDoc","documentData","entityData","handlers","variant"],[2,"position","absolute","top","12px","left","12px","z-index","5",3,"projectId"]],template:function(o,s){1&o&&e.nVh(0,E,3,1,"cue-flexcontainer",0)(1,T,3,0,"cue-flexcontainer",0)(2,G,3,7,"div",1),2&o&&e.vxM("error"===s.state()?0:"idle"===s.state()?1:2)},dependencies:[k,V.FlexContainer,j.Typography,D.k,N.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
package/992.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[992],{4152(ue,x,k){k.d(x,{B:()=>P});var w=k(2065),_=k(7284),F=k.n(_);function P(R,A,M="table.csv"){const p=A.map(v=>v.label),b=R.map(v=>A.map(O=>O.formatter?O.formatter(v[O.key]):v[O.key])),$=F().unparse({fields:p,data:b});(0,w.YN)($,M,"text/csv")}},992(ue,x,k){k.d(x,{a:()=>ct});var w=k(2271),_=k(5802);function F(e){return Array.isArray?Array.isArray(e):"[object Array]"===ae(e)}function R(e){return null==e?"":function P(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();const t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function A(e){return"string"==typeof e}function M(e){return"number"==typeof e}function b(e){return"object"==typeof e}function v(e){return null!=e}function O(e){return!e.trim().length}function ae(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Y="Invalid doc index: must be a non-negative integer within the bounds of the docs array",he=Object.prototype.hasOwnProperty;var Ie=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(s=>{const n=le(s);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(s=>{s.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function le(e){let t=null,s=null,n=null,i=1,r=null;if(A(e)||F(e))n=e,t=de(e),s=K(e);else{if(!he.call(e,"name"))throw new Error("Missing name property in key");const c=e.name;if(n=c,he.call(e,"weight")&&void 0!==e.weight&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(K(c)));t=de(c),s=K(c),r=e.getFn??null}return{path:t,id:s,weight:i,src:n,getFn:r}}function de(e){return F(e)?e:e.split(".")}function K(e){return F(e)?e.join("."):e}const f=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:function Be(e,t){const s=[];let n=!1;const i=(r,c,u,o)=>{if(v(r))if(c[u]){const h=r[c[u]];if(!v(h))return;if(u===c.length-1&&(A(h)||M(h)||function p(e){return!0===e||!1===e||function $(e){return b(e)&&null!==e}(e)&&"[object Boolean]"==ae(e)}(h)||"bigint"==typeof h))s.push(void 0!==o?{v:R(h),i:o}:R(h));else if(F(h)){n=!0;for(let a=0,l=h.length;a<l;a+=1)i(h[a],c,u+1,a)}else c.length&&i(h,c,u+1,o)}else s.push(void 0!==o?{v:r,i:o}:r)};return i(e,A(t)?t.split("."):t,0),n?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1});var Q=class{constructor({getFn:e=f.getFn,fieldNormWeight:t=f.fieldNormWeight}={}){this.norm=function Oe(e=1,t=3){const s=new Map,n=Math.pow(10,t);return{get(i){let r=1,c=!1;for(let o=0;o<i.length;o++)32===i.charCodeAt(o)?c||(r++,c=!0):c=!1;if(s.has(r))return s.get(r);const u=Math.round(n/Math.pow(r,.5*e))/n;return s.set(r,u),u},clear(){s.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,s)=>{this._keysMap[t.id]=s})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(A(this.docs[0]))for(let s=0;s<e;s++){const n=this._createStringRecord(this.docs[s],s);n&&(this.records[t++]=n)}else for(let s=0;s<e;s++)this.records[t++]=this._createObjectRecord(this.docs[s],s);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(Y);if(A(e)){const n=this._createStringRecord(e,t);return n&&this.records.push(n),n}const s=this._createObjectRecord(e,t);return this.records.push(s),s}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(Y);for(let t=0,s=this.records.length;t<s;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,s=this.records.length;t<s;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(0===t.size)return;this.records=this.records.filter(n=>!t.has(n.i));const s=Array.from(t).sort((n,i)=>n-i);for(const n of this.records){let i=0,r=s.length;for(;i<r;){const c=i+r>>>1;s[c]<n.i?i=c+1:r=c}n.i-=i}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!v(e)||O(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const s={i:t,$:{}};for(let n=0,i=this.keys.length;n<i;n++){const r=this.keys[n],c=r.getFn?r.getFn(e):this.getFn(e,r.path);if(v(c))if(F(c)){const u=[];for(let o=0,h=c.length;o<h;o+=1){const a=c[o];if(v(a))if(A(a)){if(!O(a)){const l={v:a,i:o,n:this.norm.get(a)};u.push(l)}}else if(v(a.v)){const l=A(a.v)?a.v:R(a.v);if(!O(l)){const d={v:l,i:a.i,n:this.norm.get(l)};u.push(d)}}}s.$[n]=u}else if(A(c)&&!O(c)){const u={v:c,n:this.norm.get(c)};s.$[n]=u}}return s}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function fe(e,t,{getFn:s=f.getFn,fieldNormWeight:n=f.fieldNormWeight}={}){const i=new Q({getFn:s,fieldNormWeight:n});return i.setKeys(e.map(le)),i.setSources(t),i.create(),i}function Te(e,{getFn:t=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const{keys:n,records:i}=e,r=new Q({getFn:t,fieldNormWeight:s});return r.setKeys(n),r.setIndexRecords(i),r}function Ne(e){const t={};for(let s=0,n=e.length;s<n;s+=1){const i=e.charAt(s);t[i]=(t[i]||0)|1<<n-s-1}return t}function G(e){if(e.length<=1)return e;e.sort((s,n)=>s[0]-n[0]||s[1]-n[1]);const t=[e[0]];for(let s=1,n=e.length;s<n;s+=1){const i=t[t.length-1],r=e[s];r[0]<=i[1]+1?i[1]=Math.max(i[1],r[1]):t.push(r)}return t}const ge={\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u00f8:"o",\u00d8:"O",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0131:"i",\u00df:"ss"},xe=new RegExp("["+Object.keys(ge).join("")+"]","g"),z="function"==typeof String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(xe,t=>ge[t]):e=>e;var J=class{constructor(e,{location:t=f.location,threshold:s=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:r=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:u=f.isCaseSensitive,ignoreDiacritics:o=f.ignoreDiacritics,ignoreLocation:h=f.ignoreLocation}={}){if(this.options={location:t,threshold:s,distance:n,includeMatches:i,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:o,ignoreLocation:h},e=u?e:e.toLowerCase(),e=o?z(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const a=(d,m)=>{this.chunks.push({pattern:d,alphabet:Ne(d),startIndex:m})},l=this.pattern.length;if(l>32){let d=0;const m=l%32,g=l-m;for(;d<g;)a(this.pattern.substr(d,32),d),d+=32;if(m){const C=l-32;a(this.pattern.substr(C),C)}}else a(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=s?z(e):e,this.pattern===e){const g={isMatch:!0,score:0};return n&&(g.indices=[[0,e.length-1]]),g}const{location:i,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,ignoreLocation:h}=this.options,a=[];let l=0,d=!1;this.chunks.forEach(({pattern:g,alphabet:C,startIndex:E})=>{const{isMatch:I,score:L,indices:T}=function Le(e,t,s,{location:n=f.location,distance:i=f.distance,threshold:r=f.threshold,findAllMatches:c=f.findAllMatches,minMatchCharLength:u=f.minMatchCharLength,includeMatches:o=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(t.length>32)throw new Error("Pattern length exceeds max of 32.");const a=t.length,l=e.length,d=Math.max(0,Math.min(n,l));let m=r,g=d;const C=(D,y)=>{const S=D/a;if(h)return S;const j=Math.abs(d-y);return i?S+j/i:j?1:S},E=u>1||o,I=E?Array(l):[];let L;for(;(L=e.indexOf(t,g))>-1;){const D=C(0,L);if(m=Math.min(D,m),g=L+a,E){let y=0;for(;y<a;)I[L+y]=1,y+=1}}g=-1;let T=[],U=1,_e=0,V=a+l;const ut=1<<a-1;for(let D=0;D<a;D+=1){let y=0,S=V;for(;y<S;)C(D,d+S)<=m?y=S:V=S,S=Math.floor((V-y)/2+y);V=S;let j=Math.max(1,d-S+1);const oe=c?l:Math.min(d+S,l)+a,N=Array(oe+2);N[oe+1]=(1<<D)-1;for(let B=oe;B>=j;B-=1){const ce=B-1;if(N[B]=(N[B+1]<<1|1)&s[e[ce]],D&&(N[B]|=(T[B+1]|T[B])<<1|1|T[B+1]),N[B]&ut&&(U=C(D,ce),U<=m)){if(m=U,g=ce,_e=D,g<=d)break;j=Math.max(1,2*d-g)}}if(C(D+1,d)>m)break;T=N}if(E&&g>=0){const D=Math.min(l-1,g+a-1+_e);for(let y=g;y<=D;y+=1)s[e[y]]&&(I[y]=1)}const re={isMatch:g>=0,score:Math.max(.001,U)};if(E){const D=function Re(e=[],t=f.minMatchCharLength){const s=[];let n=-1,i=-1,r=0;for(let c=e.length;r<c;r+=1){const u=e[r];u&&-1===n?n=r:!u&&-1!==n&&(i=r-1,i-n+1>=t&&s.push([n,i]),n=-1)}return e[r-1]&&r-n>=t&&s.push([n,r-1]),s}(I,u);D.length?o&&(re.indices=D):re.isMatch=!1}return re}(e,g,C,{location:i+E,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,includeMatches:n,ignoreLocation:h});I&&(d=!0),l+=L,I&&T&&a.push(...T)});const m={isMatch:d,score:d?l/this.chunks.length:1};return d&&n&&(m.indices=G(a)),m}};const Pe=new Set(["fuzzy","include"]);function $e(e){return e.startsWith("inverse")}const X=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const s=t===e;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n,s=0;const i=[],r=e.length;for(;(n=t.indexOf(e,s))>-1;)s=n+r,i.push([n,s-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const s=t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const s=!t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const s=!t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const s=t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const s=-1===t.indexOf(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const s=new J(e,{location:t.location??f.location,threshold:t.threshold??f.threshold,distance:t.distance??f.distance,includeMatches:t.includeMatches??f.includeMatches,findAllMatches:t.findAllMatches??f.findAllMatches,minMatchCharLength:t.minMatchCharLength??f.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??f.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??f.ignoreDiacritics,ignoreLocation:t.ignoreLocation??f.ignoreLocation});return{type:"fuzzy",search:n=>s.searchIn(n)}}}],me=X.length;function Ae(e,t){const s=e.match(t);return s?s[1]:null}const Z=[];function q(...e){Z.push(...e)}function W(e,t){for(let s=0,n=Z.length;s<n;s+=1){const i=Z[s];if(i.condition(e,t))return new i(e,t)}return new J(e,t)}const H_AND="$and",te=e=>!(!e.$and&&!e.$or),pe=e=>({[H_AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Ce(e,t,{auto:s=!0}={}){const n=i=>{if(A(i)){const o={keyId:null,pattern:i};return s&&(o.searcher=W(i,t)),o}const r=Object.keys(i),c=(e=>!!e.$path)(i);if(!c&&r.length>1&&!te(i))return n(pe(i));if((e=>!F(e)&&b(e)&&!te(e))(i)){const o=c?i.$path:r[0],h=c?i.$val:i[o];if(!A(h))throw new Error((e=>`Invalid value for key ${e}`)(o));const a={keyId:K(o),pattern:h};return s&&(a.searcher=W(h,t)),a}const u={children:[],operator:r[0]};return r.forEach(o=>{const h=i[o];F(h)&&h.forEach(a=>{u.children.push(n(a))})}),u};return te(e)||(e=pe(e)),n(e)}function se(e,{ignoreFieldNorm:t=f.ignoreFieldNorm}){let s=1;return e.forEach(({key:n,norm:i,score:r})=>{const c=n?n.weight:null;s*=Math.pow(0===r&&c?Number.EPSILON:r,(c||1)*(t?1:i))}),s}var Qe=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){const t=this.heap;for(;e>0;){const s=e-1>>1;if(t[e].score<=t[s].score)break;const n=t[e];t[e]=t[s],t[s]=n,e=s}}_sinkDown(e){const t=this.heap,s=t.length;let n=e;do{const i=2*(e=n)+1,r=2*e+2;if(i<s&&t[i].score>t[n].score&&(n=i),r<s&&t[r].score>t[n].score&&(n=r),n!==e){const c=t[e];t[e]=t[n],t[n]=c}}while(n!==e)}};const Xe=/[\p{L}\p{M}\p{N}_]+/gu,Me=new WeakSet;function ne({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:s}={}){const n=function qe(e){if("function"==typeof e){let t=!1;return s=>{const n=e(s);if(!t&&(t=!0,!Array.isArray(n)||n.some(i=>"string"!=typeof i)))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(n)?"array containing non-strings":typeof n}.`);return n}}return e instanceof RegExp?(e.global||function Ze(e){Me.has(e)||(Me.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}(e),t=>t.match(e)||[]):t=>t.match(Xe)||[]}(s);return{tokenize:i=>(e||(i=i.toLowerCase()),t&&(i=z(i)),n(i))}}function ie(e,t,s,n){const i=n.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(s,(e.docFieldCount.get(s)||0)+1);const r=new Set(i);let c=e.docTermFieldHits.get(s);c||(c=new Map,e.docTermFieldHits.set(s,c));for(const u of r)c.set(u,(c.get(u)||0)+1),e.df.set(u,(e.df.get(u)||0)+1)}function ve(e,t,s,n){const{i,v:r,$:c}=t;if(void 0===r){if(c)for(let u=0;u<s;u++){const o=c[u];if(o)if(Array.isArray(o))for(const h of o)ie(e,h.v,i,n);else ie(e,o.v,i,n)}}else ie(e,r,i,n)}function nt(e,t){const s=e.docFieldCount.get(t);if(void 0===s)return;e.fieldCount-=s,e.docFieldCount.delete(t);const n=e.docTermFieldHits.get(t);if(n){for(const[i,r]of n){const c=(e.df.get(i)||0)-r;c<=0?e.df.delete(i):e.df.set(i,c)}e.docTermFieldHits.delete(t)}}function Ee(e,t){if(0===t.length)return;const s=Array.from(new Set(t)).sort((u,o)=>u-o);for(const u of s)nt(e,u);const n=u=>{let o=0,h=s.length;for(;o<h;){const a=o+h>>>1;s[a]<u?o=a+1:h=a}return u-o},i=s[0],r=new Map;for(const[u,o]of e.docFieldCount)r.set(u>i?n(u):u,o);e.docFieldCount=r;const c=new Map;for(const[u,o]of e.docTermFieldHits)c.set(u>i?n(u):u,o);e.docTermFieldHits=c}var De=(()=>{let e=class{constructor(t,s,n){this.options={...f,...s},this._keyStore=new Ie(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const s=W(t,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=t,this._lastSearcher=s,s}setCollection(t,s){if(this._docs=t,s&&!(s instanceof Q))throw new Error("Incorrect 'index' type");if(this._myIndex=s||fe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function tt(e,t,s){const n={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of e)ve(n,i,t,s);return n}(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(t){if(!v(t))return;this._docs.push(t);const s=this._myIndex.add(t,this._docs.length-1);if(this._invertedIndex&&s){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function st(e,t,s,n){ve(e,t,s,n)}(this._invertedIndex,s,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(t=()=>!1){const s=[],n=[];for(let i=0,r=this._docs.length;i<r;i+=1)t(this._docs[i],i)&&(s.push(this._docs[i]),n.push(i));if(n.length){this._invertedIndex&&Ee(this._invertedIndex,n);const i=new Set(n);this._docs=this._docs.filter((r,c)=>!i.has(c)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return s}removeAt(t){if(!Number.isInteger(t)||t<0||t>=this._docs.length)throw new Error(Y);this._invertedIndex&&Ee(this._invertedIndex,[t]);const s=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),this._invalidateSearcherCache(),s}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(t,s){const{limit:n=-1}=s||{},{includeMatches:i,includeScore:r,shouldSort:c,sortFn:u,ignoreFieldNorm:o}=this.options;if(A(t)&&!t.trim()){let l=this._docs.map((d,m)=>({item:d,refIndex:m}));return M(n)&&n>-1&&(l=l.slice(0,n)),l}let a;if(M(n)&&n>0&&A(t)){const l=new Qe(n);A(this._docs[0])?this._searchStringList(t,{heap:l,ignoreFieldNorm:o}):this._searchObjectList(t,{heap:l,ignoreFieldNorm:o}),a=l.extractSorted(u)}else a=A(t)?A(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),function Ye(e,{ignoreFieldNorm:t=f.ignoreFieldNorm}){e.forEach(s=>{s.score=se(s.matches,{ignoreFieldNorm:t})})}(a,{ignoreFieldNorm:o}),c&&a.sort(u),M(n)&&n>-1&&(a=a.slice(0,n));return function Je(e,t,{includeMatches:s=f.includeMatches,includeScore:n=f.includeScore}={}){return e.map(i=>{const{idx:r}=i,c={item:t[r],refIndex:r};return s&&(c.matches=function Ge(e){const t=[];return e.matches.forEach(s=>{if(!v(s.indices)||!s.indices.length)return;const n={indices:s.indices,value:s.value};s.key&&(n.key=s.key.id),s.idx>-1&&(n.refIndex=s.idx),t.push(n)}),t}(i)),n&&(c.score=i.score),c})}(a,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:c}=this._myIndex,u=s?null:[];return c.forEach(({v:o,i:h,n:a})=>{if(!v(o))return;const l=i.searchIn(o);if(l.isMatch){const d={score:l.score,value:o,norm:a,indices:l.indices};r&&(d.matchedMask=l.matchedMask,d.matchedTerms=l.matchedTerms,d.termCount=l.termCount);const m=[d];if(!r||this._coversAllTokens(m)){const g={item:o,idx:h,matches:m};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):u.push(g)}}}),u}_searchLogical(t){const s=Ce(t,this.options),n=(u,o,h)=>{if(!("children"in u)){const{keyId:m,searcher:g}=u;let C;return null===m?(C=[],this._myIndex.keys.forEach((E,I)=>{C.push(...this._findMatches({key:E,value:o[I],searcher:g}))})):C=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(o,m),searcher:g}),C&&C.length?[{idx:h,item:o,matches:C}]:[]}const{children:a,operator:l}=u,d=[];for(let m=0,g=a.length;m<g;m+=1){const E=n(a[m],o,h);if(E.length)d.push(...E);else if("$and"===l)return[]}return d},i=this._myIndex.records,r=new Map,c=[];return i.forEach(({$:u,i:o})=>{if(v(u)){const h=n(s,u,o);h.length&&(r.has(o)||(r.set(o,{idx:o,item:u,matches:[]}),c.push(r.get(o))),h.forEach(({matches:a})=>{r.get(o).matches.push(...a)}))}}),c}_searchObjectList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{keys:c,records:u}=this._myIndex,o=s?null:[];return u.forEach(({$:h,i:a})=>{if(!v(h))return;const l=[];let d=!1,m=!1;if(c.forEach((g,C)=>{const E=this._findMatches({key:g,value:h[C],searcher:i});E.length?(l.push(...E),E[0].hasInverse&&(m=!0)):d=!0}),(!m||!d)&&l.length&&(!r||this._coversAllTokens(l))){const g={idx:a,item:h,matches:l};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):o.push(g)}}),o}_findMatches({key:t,value:s,searcher:n}){if(!v(s))return[];const i=[];if(F(s))s.forEach(({v:r,i:c,n:u})=>{if(!v(r))return;const o=n.searchIn(r);if(o.isMatch){const h={score:o.score,key:t,value:r,idx:c,norm:u,indices:o.indices,hasInverse:o.hasInverse};void 0!==o.termCount&&(h.matchedMask=o.matchedMask,h.matchedTerms=o.matchedTerms,h.termCount=o.termCount),i.push(h)}});else{const{v:r,n:c}=s,u=n.searchIn(r);if(u.isMatch){const o={score:u.score,key:t,value:r,norm:c,indices:u.indices,hasInverse:u.hasInverse};void 0!==u.termCount&&(o.matchedMask=u.matchedMask,o.matchedTerms=u.matchedTerms,o.termCount=u.termCount),i.push(o)}}return i}_coversAllTokens(t){const s=t.length?t[0].termCount:void 0;if(void 0===s)return!0;if(s<=31){let i=0;for(let r=0;r<t.length;r++)i|=t[r].matchedMask||0;return i===2**s-1}const n=new Set;for(let i=0;i<t.length;i++){const r=t[i].matchedTerms;if(r)for(const c of r)n.add(c)}return n.size===s}};return e.version="7.4.2",e.createIndex=fe,e.parseIndex=Te,e.config=f,e.match=function(t,s,n){if(n&&n.useTokenSearch)throw new Error("Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.");return W(t,{...f,...n}).searchIn(s)},e.parseQuery=Ce,e})();q(class{constructor(e,{isCaseSensitive:t=f.isCaseSensitive,ignoreDiacritics:s=f.ignoreDiacritics,includeMatches:n=f.includeMatches,minMatchCharLength:i=f.minMatchCharLength,ignoreLocation:r=f.ignoreLocation,findAllMatches:c=f.findAllMatches,location:u=f.location,threshold:o=f.threshold,distance:h=f.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n,minMatchCharLength:i,findAllMatches:c,ignoreLocation:r,location:u,threshold:o,distance:h},e=t?e:e.toLowerCase(),e=s?z(e):e,this.pattern=e,this.query=function We(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(s=>{const n=function Ke(e){const t=[],s=e.length;let n=0;for(;n<s;){for(;n<s&&" "===e[n];)n++;if(n>=s)break;let i=n;for(;i<s&&" "!==e[i]&&'"'!==e[i];)i++;if(i<s&&'"'===e[i]){for(i++;i<s;){if('"'===e[i]){const r=i+1;if(r>=s||" "===e[r]){i++;break}if("$"===e[r]&&(r+1>=s||" "===e[r+1])){i+=2;break}}i++}t.push(e.substring(n,i)),n=i}else{for(;i<s&&" "!==e[i];)i++;t.push(e.substring(n,i)),n=i}}return t}(s.replace(/\u0000/g,"|").trim()).filter(r=>r&&!!r.trim()),i=[];for(let r=0,c=n.length;r<c;r+=1){const u=n[r];let o=!1,h=-1;for(;!o&&++h<me;){const a=X[h],l=Ae(u,a.multiRegex);l&&(i.push(a.create(l,t)),o=!0)}if(!o)for(h=-1;++h<me;){const a=X[h],l=Ae(u,a.singleRegex);if(l){i.push(a.create(l,t));break}}}return i})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?z(e):e;let r=0;const c=[];let u=0,o=!1;for(let h=0,a=t.length;h<a;h+=1){const l=t[h];c.length=0,r=0,o=!1;for(let d=0,m=l.length;d<m;d+=1){const g=l[d],{isMatch:C,indices:E,score:I}=g.search(e);if(!C){u=0,r=0,c.length=0,o=!1;break}r+=1,u+=I,$e(g.type)&&(o=!0),s&&(Pe.has(g.type)?c.push(...E):c.push(E))}if(r){const d={isMatch:!0,score:u/r};return o&&(d.hasInverse=!0),s&&(d.indices=G(c)),d}}return{isMatch:!1,score:1}}}),q(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=ne({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const s=this.analyzer.tokenize(e),{df:n,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const r of s){this.termSearchers.push(new J(r,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const c=n.get(r)||0,u=Math.log(1+(i-c+.5)/(c+.5));this.idfWeights.push(u)}this.combineAll="all"===t.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let s=0,n=0,i=0,r=0;const c=this.combineAll&&!this.useMask?new Set:null;for(let h=0;h<this.termSearchers.length;h++){const a=this.termSearchers[h].searchIn(e),l=this.idfWeights[h];n+=l,a.isMatch&&(i++,s+=l*(1-a.score),a.indices&&t.push(...a.indices),this.combineAll&&(this.useMask?r|=1<<h:c.add(h)))}if(0===i)return{isMatch:!1,score:1};const o={isMatch:!0,score:Math.max(.001,n>0?1-s/n:0)};return this.options.includeMatches&&t.length&&(o.indices=G(t)),this.combineAll&&(this.useMask?o.matchedMask=r:o.matchedTerms=c,o.termCount=this.numTerms),o}}),De.use=function(...e){e.forEach(t=>q(t))};var it=De,ot=k(4152);let ct=(()=>{class e{filterOptions=(0,w.uu)(()=>({isCaseSensitive:!!this.filterExactMatch(),includeScore:!1,ignoreDiacritics:!1,shouldSort:!0,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:this.filterExactMatch()?0:.3,distance:100,useExtendedSearch:!1,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1,keys:this.filterKeys()}));fuse=(0,w.EW)(()=>new it(this.sorted(),this.filterOptions()));columnDefs=(0,_.vPA)([]);data=(0,_.vPA)([]);sortCol=(0,_.vPA)(void 0);sortOrder=(0,_.vPA)("ASC");filterValue=(0,_.vPA)(void 0);filterOnlyVisible=(0,_.vPA)(!0);paginatorStartIndex=(0,_.vPA)(1);paginatorEndIndex=(0,_.vPA)(5);showColumnSettings=(0,_.vPA)(!1);totalRows=(0,w.EW)(()=>this.sortedAndFiltered().length);sorted=(0,w.EW)(()=>function rt(e,t,s){if(void 0===e)return[...t];const n=e.split(",").map(r=>r.trim()),i=s.split(",").map(r=>r.trim());return[...t].sort((r,c)=>{for(let u=0;u<n.length;u++){const o=n[u],h=i[u]||i[0];if(!(o in r))continue;let a=r[o],l=c[o];if("object"==typeof a&&(a=r[o].value,l=c[o].value),null==a)return 1;if(null==l)return-1;let d=0;if(d="string"==typeof a&&"string"==typeof l?a.localeCompare(l):a>l?1:a<l?-1:0,"DESC"===h&&(d*=-1),0!==d)return d}return 0})}(this.sortCol(),this.data(),this.sortOrder()));filterCol=(0,_.vPA)(void 0);filterExactMatch=(0,_.vPA)(!1);filterKeys=(0,w.EW)(()=>{const s=this.filterCol();return void 0!==s?[s]:this.filterOnlyVisible()?this.columnDefs().map(n=>n.key):Object.keys(this.sorted()[0]||{})});sortedAndFiltered=(0,w.EW)(()=>{const s=this.filterValue()??"";return""===s?this.sorted():this.fuse().search(s).map(i=>i.item)});sortedFilteredAndPaginated=(0,w.EW)(()=>this.sortedAndFiltered().slice(this.paginatorStartIndex(),this.paginatorEndIndex()));downloadCSV(){const s=this.sortedFilteredAndPaginated(),n=this.columnDefs();(0,ot.B)(s,n)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})()},2065(ue,x,k){function F(A,M,p="text/plain"){return function w(A,M="data.zip"){const p=document.createElement("a"),b=URL.createObjectURL(A);p.href=b,p.download=M,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(b)}(new Blob([A],{type:p}),M)}function P(A,M){const p=document.createElement("a");p.style.display="hidden",p.setAttribute("href",window.URL.createObjectURL(A)),p.setAttribute("download",M),document.body.appendChild(p),p.click(),p.remove()}k.d(x,{KE:()=>P,YN:()=>F})}}]);
package/README.md CHANGED
@@ -605,9 +605,9 @@ The component automatically determines which view to render:
605
605
 
606
606
  The component emits one event:
607
607
 
608
- | Event | Payload | Description |
609
- | ------------------ | ----------- | ----------------------------------------- |
610
- | `entityRowClicked` | `EntityRow` | Fires when the user clicks an entity row. |
608
+ | Event | Payload | Description |
609
+ | ---------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
610
+ | `itemRowClicked` | `ContextItemRowClickEvent` | Fires when the user clicks a row. Shape: `{ type: 'entity'; row: EntityRow; index } \| { type: 'document'; row: DocumentResults; index }`. |
611
611
 
612
612
  ```js
613
613
  await customElements.whenDefined('cue-context-viewer');
@@ -619,8 +619,8 @@ viewer.cue = cue;
619
619
  viewer.projectId = 'your-project-id';
620
620
  viewer.contextId = 'your-context-id';
621
621
 
622
- viewer.addEventListener('entityRowClicked', (e) => {
623
- console.log('Entity clicked:', e.detail);
622
+ viewer.addEventListener('itemRowClicked', (e) => {
623
+ console.log('Row clicked:', e.detail);
624
624
  });
625
625
 
626
626
  document.getElementById('viewer-host').appendChild(viewer);
package/common.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2076],{6019(l,u,e){e.d(u,{t:()=>s});var r=e(6593);function s(a){const n=new r.Parser({sparqlStar:!0});try{return n.parse(a)}catch(t){if(-1!=t.toString().indexOf("SPARQL*"))return{type:"query",queryType:"CONSTRUCT",sparqlStar:!0};throw"Couldn't get query details: "+t.toString()}}}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2076],{2716(v,f,a){a.d(f,{OX:()=>n,QA:()=>u,d9:()=>o});class u{menuDisplaySettings=new o;columnSelectSettings=new n}class o{hide=!0;buttonVariant="tertiary";buttonSize="s";showColumnSelect=!0;showDownload=!0}class n{allowEditing=!0;allowToggleEditable=!0;allowToggleHideOnHover=!0;allowSettingTextAlign=!0;allowSettingLabel=!0}},9457(v,f,a){a.d(f,{F:()=>d});var u=a(467),o=a(7705),n=a(5547);let d=(()=>{class t{appendClassToParentRow=(0,o.hFB)(!0);fileOverClass=(0,o.hFB)("file-hover");dropEnabled=(0,o.hFB)(!0);filesDropped=(0,o.CGW)();filesHovered=(0,o.CGW)();onDragOver(e){this.dropEnabled()&&(e.preventDefault(),e.stopPropagation(),this._appendFileHoverClass(e.target),this.filesHovered.emit(!0))}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this._removeFileHoverClass(e.target),this.filesHovered.emit(!1)}onDrop(e){var s=this;return(0,u.A)(function*(){if(e instanceof DragEvent&&e.dataTransfer){e.preventDefault(),s._removeFileHoverClass(e.target);const i=yield function p(t){function c(s,i=""){return new Promise(l=>{s&&(s.isFile?s.file(r=>{r.filepath=i+r.name,e.push(r),l(r)}):s.isDirectory&&s.createReader().readEntries(g=>{const h=[];for(const D of g)h.push(c(D,i+s.name+"/"));l(Promise.all(h))}))})}const e=[];return new Promise(s=>{const i=[];for(const l of t)i.push(c(l.webkitGetAsEntry()));Promise.all(i).then(()=>{const l=[".DS_Store"],r=e.filter(g=>!l.includes(g.name));console.info(`${r.length} files dropped`),s(r)})})}(e.dataTransfer.items);s.filesDropped.emit(i),s.filesHovered.emit(!1)}})()}_appendFileHoverClass(e){if(this.appendClassToParentRow()){const s=this._getParentRow(e);s?s.classList.add(this.fileOverClass()):e.classList.add(this.fileOverClass())}else e.classList.add(this.fileOverClass())}_removeFileHoverClass(e){if(this.appendClassToParentRow()){const s=this._getParentRow(e);s?s.classList.remove(this.fileOverClass()):e.classList.remove(this.fileOverClass())}else e.classList.remove(this.fileOverClass())}_getParentRow(e){for(;e;){if("TR"===e.tagName)return e;e=e.parentNode}return null}static \u0275fac=function(s){return new(s||t)};static \u0275dir=n.FsC({type:t,selectors:[["","cueFileDrop",""]],hostBindings:function(s,i){1&s&&n.bIt("dragover",function(r){return i.onDragOver(r)})("dragleave",function(r){return i.onDragLeave(r)})("drop",function(r){return i.onDrop(r)})},inputs:{appendClassToParentRow:[1,"appendClassToParentRow"],fileOverClass:[1,"fileOverClass"],dropEnabled:[1,"dropEnabled"]},outputs:{filesDropped:"filesDropped",filesHovered:"filesHovered"}})}return t})()},6019(v,f,a){a.d(f,{t:()=>p});var u=a(6593);function p(n){const d=new u.Parser({sparqlStar:!0});try{return d.parse(n)}catch(t){if(-1!=t.toString().indexOf("SPARQL*"))return{type:"query",queryType:"CONSTRUCT",sparqlStar:!0};throw"Couldn't get query details: "+t.toString()}}}}]);