@datorama/core 22.15.0 → 22.15.3

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 (38) hide show
  1. package/bundle.scss +122 -50
  2. package/bundles/datorama-core.umd.js +167 -47
  3. package/bundles/datorama-core.umd.js.map +1 -1
  4. package/bundles/datorama-core.umd.min.js +27 -27
  5. package/bundles/datorama-core.umd.min.js.map +1 -1
  6. package/datorama-core.metadata.json +1 -1
  7. package/esm2015/lib/grid/grid/grid.component.js +4 -4
  8. package/esm2015/lib/grid/grid-sort.utils.js +7 -2
  9. package/esm2015/lib/grid-v2/grid/grid-v2.component.js +10 -3
  10. package/esm2015/lib/grid-v2/grid/grid-v2.config.js +30 -4
  11. package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +58 -24
  12. package/esm2015/lib/grid-v2/grid-header/grid-header.component.js +3 -2
  13. package/esm2015/lib/grid-v2/grid-store/grid.query.js +9 -5
  14. package/esm2015/lib/grid-v2/grid-store/grid.service.js +3 -2
  15. package/esm2015/lib/grid-v2/grid-store/util.js +27 -1
  16. package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +22 -16
  17. package/esm2015/lib/version.js +2 -2
  18. package/esm5/lib/grid/grid/grid.component.js +4 -4
  19. package/esm5/lib/grid/grid-sort.utils.js +7 -2
  20. package/esm5/lib/grid-v2/grid/grid-v2.component.js +14 -3
  21. package/esm5/lib/grid-v2/grid/grid-v2.config.js +30 -4
  22. package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +62 -24
  23. package/esm5/lib/grid-v2/grid-header/grid-header.component.js +3 -2
  24. package/esm5/lib/grid-v2/grid-store/grid.query.js +9 -5
  25. package/esm5/lib/grid-v2/grid-store/grid.service.js +3 -2
  26. package/esm5/lib/grid-v2/grid-store/util.js +28 -1
  27. package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +22 -16
  28. package/esm5/lib/version.js +2 -2
  29. package/fesm2015/datorama-core.js +160 -48
  30. package/fesm2015/datorama-core.js.map +1 -1
  31. package/fesm5/datorama-core.js +168 -48
  32. package/fesm5/datorama-core.js.map +1 -1
  33. package/lib/grid-v2/grid/grid-v2.component.d.ts +4 -0
  34. package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +15 -0
  35. package/lib/grid-v2/grid-store/grid.service.d.ts +1 -1
  36. package/lib/grid-v2/grid-store/util.d.ts +7 -0
  37. package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +1 -0
  38. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("@angular/forms"),require("ngx-take-until-destroy"),require("rxjs/operators"),require("@angular/cdk/keycodes"),require("@angular/common"),require("lodash.isempty"),require("lodash.isequal"),require("lodash.intersection"),require("lodash.union"),require("lodash.difference"),require("lodash.differenceby"),require("lodash.findindex"),require("lodash.minby"),require("lodash.uniqby"),require("lodash.sortby"),require("lodash.find"),require("lodash.foreach"),require("lodash.map"),require("lodash.keyby"),require("lodash.reject"),require("lodash.groupby"),require("lodash.filter"),require("lodash.findkey"),require("lodash.debounce"),require("lodash.throttle"),require("lodash.curry"),require("lodash.partial"),require("lodash.get"),require("lodash.has"),require("lodash.mapvalues"),require("lodash.mapkeys"),require("lodash.values"),require("lodash.merge"),require("lodash.transform"),require("lodash.clonedeep"),require("lodash.omitby"),require("deep-equal"),require("lodash.invert"),require("lodash.escape"),require("lodash.unescape"),require("lodash.escaperegexp"),require("date-fns"),require("date-fns-tz"),require("date-fns/locale/de"),require("date-fns/locale/en-US"),require("date-fns/locale/es"),require("date-fns/locale/fr"),require("date-fns/locale/ja"),require("@datorama/akita"),require("tooltip.js"),require("@popperjs/core/lib/popper-lite.js"),require("@popperjs/core/lib/modifiers/preventOverflow.js"),require("@popperjs/core/lib/modifiers/flip.js"),require("@popperjs/core/lib/modifiers/offset.js"),require("dompurify"),require("tippy.js"),require("@angular/cdk/coercion"),require("helpful-decorators"),require("@ag-grid-community/angular"),require("@ag-grid-community/core"),require("@angular/animations"),require("@angular/cdk/a11y"),require("ngx-sortablejs"),require("@angular/platform-browser"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@datorama/core",["exports","@angular/core","rxjs","@angular/forms","ngx-take-until-destroy","rxjs/operators","@angular/cdk/keycodes","@angular/common","lodash.isempty","lodash.isequal","lodash.intersection","lodash.union","lodash.difference","lodash.differenceby","lodash.findindex","lodash.minby","lodash.uniqby","lodash.sortby","lodash.find","lodash.foreach","lodash.map","lodash.keyby","lodash.reject","lodash.groupby","lodash.filter","lodash.findkey","lodash.debounce","lodash.throttle","lodash.curry","lodash.partial","lodash.get","lodash.has","lodash.mapvalues","lodash.mapkeys","lodash.values","lodash.merge","lodash.transform","lodash.clonedeep","lodash.omitby","deep-equal","lodash.invert","lodash.escape","lodash.unescape","lodash.escaperegexp","date-fns","date-fns-tz","date-fns/locale/de","date-fns/locale/en-US","date-fns/locale/es","date-fns/locale/fr","date-fns/locale/ja","@datorama/akita","tooltip.js","@popperjs/core/lib/popper-lite.js","@popperjs/core/lib/modifiers/preventOverflow.js","@popperjs/core/lib/modifiers/flip.js","@popperjs/core/lib/modifiers/offset.js","dompurify","tippy.js","@angular/cdk/coercion","helpful-decorators","@ag-grid-community/angular","@ag-grid-community/core","@angular/animations","@angular/cdk/a11y","ngx-sortablejs","@angular/platform-browser","@angular/common/http"],e):e(((t=t||self).datorama=t.datorama||{},t.datorama.core={}),t.ng.core,t.rxjs,t.ng.forms,t.ngxTakeUntilDestroy,t.rxjs.operators,t.ng.cdk.keycodes,t.ng.common,t._.isEmpty,t._.isEqual,t._.intersection,t._.union,t._.difference,t._.differenceBy,t._.findIndex,t._.minBy,t._.uniqBy,t._.sortBy,t._.find,t._.forEach,t._.map,t._.keyBy,t._.reject,t._.groupBy,t._.filter,t._.findKey,t._.debounce,t._.throttle,t._.curry,t._.partial,t._.get,t._.has,t._.mapValues,t._.mapKeys,t._.values,t._.merge,t._.transform,t._.cloneDeep,t._.omitBy,t.deepEqual,t._.invert,t._.escape,t._.unescape,t._.escapeRegExp,t.dateFns,t.dateFnsTz,t.de,t.enUS,t.es,t.fr,t.ja,t.dato.akita,t.tooltip,t.popperjs.lite,t.popperjs.modifiers.preventOverflow,t.popperjs.modifiers.flip,t.popperjs.modifiers.offset,t.DOMPurify,t.tippy,t.ng.cdk.coercion,t.helpfulDecorators,t.angular,t.core$1,t.ng.animations,t.ng.cdk.a11y,t.ngxSortablejs,t.ng.platformBrowser,t.ng.common.http)}(this,(function(t,e,n,o,i,r,a,s,l,c,p,d,u,h,g,f,m,y,v,b,C,w,S,x,O,D,I,T,R,A,E,P,k,_,j,M,L,N,F,G,V,z,B,H,U,K,W,Q,$,q,Y,Z,X,J,tt,et,nt,ot,it,rt,at,st,lt,ct,pt,dt,ut,ht){"use strict";l=l&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l,c=c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c,p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p,d=d&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d,u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,h=h&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h,g=g&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g,f=f&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f,m=m&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m,y=y&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y,v=v&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v,b=b&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b,C=C&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C,w=w&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w,S=S&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S,x=x&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x,O=O&&Object.prototype.hasOwnProperty.call(O,"default")?O.default:O,D=D&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D,I=I&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I,T=T&&Object.prototype.hasOwnProperty.call(T,"default")?T.default:T,R=R&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R,A=A&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A,E=E&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E,P=P&&Object.prototype.hasOwnProperty.call(P,"default")?P.default:P,k=k&&Object.prototype.hasOwnProperty.call(k,"default")?k.default:k,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_,j=j&&Object.prototype.hasOwnProperty.call(j,"default")?j.default:j,M=M&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M,L=L&&Object.prototype.hasOwnProperty.call(L,"default")?L.default:L,N=N&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N,F=F&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F,G=G&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G,V=V&&Object.prototype.hasOwnProperty.call(V,"default")?V.default:V,z=z&&Object.prototype.hasOwnProperty.call(z,"default")?z.default:z,B=B&&Object.prototype.hasOwnProperty.call(B,"default")?B.default:B,H=H&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H,W=W&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W,Q=Q&&Object.prototype.hasOwnProperty.call(Q,"default")?Q.default:Q,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$,q=q&&Object.prototype.hasOwnProperty.call(q,"default")?q.default:q,Y=Y&&Object.prototype.hasOwnProperty.call(Y,"default")?Y.default:Y,X=X&&Object.prototype.hasOwnProperty.call(X,"default")?X.default:X,tt=tt&&Object.prototype.hasOwnProperty.call(tt,"default")?tt.default:tt,et=et&&Object.prototype.hasOwnProperty.call(et,"default")?et.default:et,nt=nt&&Object.prototype.hasOwnProperty.call(nt,"default")?nt.default:nt,ot=ot&&Object.prototype.hasOwnProperty.call(ot,"default")?ot.default:ot,it=it&&Object.prototype.hasOwnProperty.call(it,"default")?it.default:it;
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("@angular/forms"),require("ngx-take-until-destroy"),require("rxjs/operators"),require("@angular/cdk/keycodes"),require("@angular/common"),require("lodash.isempty"),require("lodash.isequal"),require("lodash.intersection"),require("lodash.union"),require("lodash.difference"),require("lodash.differenceby"),require("lodash.findindex"),require("lodash.minby"),require("lodash.uniqby"),require("lodash.sortby"),require("lodash.find"),require("lodash.foreach"),require("lodash.map"),require("lodash.keyby"),require("lodash.reject"),require("lodash.groupby"),require("lodash.filter"),require("lodash.findkey"),require("lodash.debounce"),require("lodash.throttle"),require("lodash.curry"),require("lodash.partial"),require("lodash.get"),require("lodash.has"),require("lodash.mapvalues"),require("lodash.mapkeys"),require("lodash.values"),require("lodash.merge"),require("lodash.transform"),require("lodash.clonedeep"),require("lodash.omitby"),require("deep-equal"),require("lodash.invert"),require("lodash.escape"),require("lodash.unescape"),require("lodash.escaperegexp"),require("date-fns"),require("date-fns-tz"),require("date-fns/locale/de"),require("date-fns/locale/en-US"),require("date-fns/locale/es"),require("date-fns/locale/fr"),require("date-fns/locale/ja"),require("@datorama/akita"),require("tooltip.js"),require("@popperjs/core/lib/popper-lite.js"),require("@popperjs/core/lib/modifiers/preventOverflow.js"),require("@popperjs/core/lib/modifiers/flip.js"),require("@popperjs/core/lib/modifiers/offset.js"),require("dompurify"),require("tippy.js"),require("@angular/cdk/coercion"),require("helpful-decorators"),require("@ag-grid-community/angular"),require("@ag-grid-community/core"),require("@angular/animations"),require("@angular/cdk/a11y"),require("ngx-sortablejs"),require("@angular/platform-browser"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@datorama/core",["exports","@angular/core","rxjs","@angular/forms","ngx-take-until-destroy","rxjs/operators","@angular/cdk/keycodes","@angular/common","lodash.isempty","lodash.isequal","lodash.intersection","lodash.union","lodash.difference","lodash.differenceby","lodash.findindex","lodash.minby","lodash.uniqby","lodash.sortby","lodash.find","lodash.foreach","lodash.map","lodash.keyby","lodash.reject","lodash.groupby","lodash.filter","lodash.findkey","lodash.debounce","lodash.throttle","lodash.curry","lodash.partial","lodash.get","lodash.has","lodash.mapvalues","lodash.mapkeys","lodash.values","lodash.merge","lodash.transform","lodash.clonedeep","lodash.omitby","deep-equal","lodash.invert","lodash.escape","lodash.unescape","lodash.escaperegexp","date-fns","date-fns-tz","date-fns/locale/de","date-fns/locale/en-US","date-fns/locale/es","date-fns/locale/fr","date-fns/locale/ja","@datorama/akita","tooltip.js","@popperjs/core/lib/popper-lite.js","@popperjs/core/lib/modifiers/preventOverflow.js","@popperjs/core/lib/modifiers/flip.js","@popperjs/core/lib/modifiers/offset.js","dompurify","tippy.js","@angular/cdk/coercion","helpful-decorators","@ag-grid-community/angular","@ag-grid-community/core","@angular/animations","@angular/cdk/a11y","ngx-sortablejs","@angular/platform-browser","@angular/common/http"],e):e(((t=t||self).datorama=t.datorama||{},t.datorama.core={}),t.ng.core,t.rxjs,t.ng.forms,t.ngxTakeUntilDestroy,t.rxjs.operators,t.ng.cdk.keycodes,t.ng.common,t._.isEmpty,t._.isEqual,t._.intersection,t._.union,t._.difference,t._.differenceBy,t._.findIndex,t._.minBy,t._.uniqBy,t._.sortBy,t._.find,t._.forEach,t._.map,t._.keyBy,t._.reject,t._.groupBy,t._.filter,t._.findKey,t._.debounce,t._.throttle,t._.curry,t._.partial,t._.get,t._.has,t._.mapValues,t._.mapKeys,t._.values,t._.merge,t._.transform,t._.cloneDeep,t._.omitBy,t.deepEqual,t._.invert,t._.escape,t._.unescape,t._.escapeRegExp,t.dateFns,t.dateFnsTz,t.de,t.enUS,t.es,t.fr,t.ja,t.dato.akita,t.tooltip,t.popperjs.lite,t.popperjs.modifiers.preventOverflow,t.popperjs.modifiers.flip,t.popperjs.modifiers.offset,t.DOMPurify,t.tippy,t.ng.cdk.coercion,t.helpfulDecorators,t.angular,t.core$1,t.ng.animations,t.ng.cdk.a11y,t.ngxSortablejs,t.ng.platformBrowser,t.ng.common.http)}(this,(function(t,e,n,o,i,r,a,s,l,c,p,d,u,h,g,f,m,y,v,b,C,w,S,x,O,D,I,T,R,A,E,P,k,_,j,M,L,N,F,G,V,z,B,H,U,K,W,$,Q,q,Y,Z,X,J,tt,et,nt,ot,it,rt,at,st,lt,ct,pt,dt,ut,ht){"use strict";l=l&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l,c=c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c,p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p,d=d&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d,u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,h=h&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h,g=g&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g,f=f&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f,m=m&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m,y=y&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y,v=v&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v,b=b&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b,C=C&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C,w=w&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w,S=S&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S,x=x&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x,O=O&&Object.prototype.hasOwnProperty.call(O,"default")?O.default:O,D=D&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D,I=I&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I,T=T&&Object.prototype.hasOwnProperty.call(T,"default")?T.default:T,R=R&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R,A=A&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A,E=E&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E,P=P&&Object.prototype.hasOwnProperty.call(P,"default")?P.default:P,k=k&&Object.prototype.hasOwnProperty.call(k,"default")?k.default:k,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_,j=j&&Object.prototype.hasOwnProperty.call(j,"default")?j.default:j,M=M&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M,L=L&&Object.prototype.hasOwnProperty.call(L,"default")?L.default:L,N=N&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N,F=F&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F,G=G&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G,V=V&&Object.prototype.hasOwnProperty.call(V,"default")?V.default:V,z=z&&Object.prototype.hasOwnProperty.call(z,"default")?z.default:z,B=B&&Object.prototype.hasOwnProperty.call(B,"default")?B.default:B,H=H&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H,W=W&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W,$=$&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$,Q=Q&&Object.prototype.hasOwnProperty.call(Q,"default")?Q.default:Q,q=q&&Object.prototype.hasOwnProperty.call(q,"default")?q.default:q,Y=Y&&Object.prototype.hasOwnProperty.call(Y,"default")?Y.default:Y,X=X&&Object.prototype.hasOwnProperty.call(X,"default")?X.default:X,tt=tt&&Object.prototype.hasOwnProperty.call(tt,"default")?tt.default:tt,et=et&&Object.prototype.hasOwnProperty.call(et,"default")?et.default:et,nt=nt&&Object.prototype.hasOwnProperty.call(nt,"default")?nt.default:nt,ot=ot&&Object.prototype.hasOwnProperty.call(ot,"default")?ot.default:ot,it=it&&Object.prototype.hasOwnProperty.call(it,"default")?it.default:it;
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -31,7 +31,7 @@ var Ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}r
31
31
  * Use of this source code is governed by an Apache License 2.0 license that can be
32
32
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
33
33
  */
34
- function Et(t){return"function"==typeof t}function Pt(t){return"[object Object]"===Object.prototype.toString.call(t)}function kt(t){return l(t)}function _t(t){return!isNaN(parseFloat(t))&&!Number.isNaN(Number(t))}function jt(t,e){return c(t,e)}function Mt(t){return"string"==typeof t}function Lt(t){return null==t}function Nt(t){return"boolean"==typeof t}function Ft(t,e){return void 0===e&&(e=document),e.querySelector(t)}function Gt(t,e){return void 0===e&&(e=document),e.querySelectorAll(t)}function Vt(t,e,n){t.style[e]=n?n.toString():n}function zt(t,e,n){t.setAttribute(e,n)}function Bt(t,e){return t.getAttribute(e)}function Ht(t,e){var n,o;try{for(var i=wt(Object.keys(e)),r=i.next();!r.done;r=i.next()){var a=r.value;Vt(t,a,e[a])}}catch(t){n={error:t}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}}function Ut(t,e){Array.isArray(e)?e.forEach((function(e){return t.classList.add(e)})):t.classList.add(e)}function Kt(t,e,n){n?Ut(t,e):Wt(t,e)}function Wt(t,e){t.classList.remove(e)}function Qt(t,e,n){var o,i;if(Mt(e))t.setAttribute(e,n);else try{for(var r=wt(Object.keys(e)),a=r.next();!a.done;a=r.next()){var s=a.value;t.setAttribute(s,e[s])}}catch(t){o={error:t}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}}function $t(t){return document.createElement(t)}function qt(t,e){return t.appendChild(e)}function Yt(t,e){t.insertBefore(e,t.firstChild)}function Zt(t){return qt(document.body,t),function(){t&&(document.body.removeChild(t),t=null)}}function Xt(t,e){var n=$t("script");n.innerHTML=t,n.id=e,Zt(n)}function Jt(t,e){var n=$t("style");n.innerHTML=t,n.id=e,Zt(n)}function te(t){var e=t.getBoundingClientRect(),n=document.body,o=document.documentElement,i=window.pageYOffset||o.scrollTop||n.scrollTop,r=window.pageXOffset||o.scrollLeft||n.scrollLeft,a=o.clientTop||n.clientTop||0,s=o.clientLeft||n.clientLeft||0,l=e.top+i-a,c=e.left+r-s,p=e.width,d=e.height;return{top:Math.round(l),left:Math.round(c),width:p,height:d}}function ee(t,e){return window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(t){var e,n=(this.document||this.ownerDocument).querySelectorAll(t),o=this;do{for(e=n.length;--e>=0&&n.item(e)!==o;);}while(e<0&&(o=o.parentElement));return o}),t.closest(e)}function ne(){}
34
+ function Et(t){return"function"==typeof t}function Pt(t){return"[object Object]"===Object.prototype.toString.call(t)}function kt(t){return l(t)}function _t(t){return!isNaN(parseFloat(t))&&!Number.isNaN(Number(t))}function jt(t,e){return c(t,e)}function Mt(t){return"string"==typeof t}function Lt(t){return null==t}function Nt(t){return"boolean"==typeof t}function Ft(t,e){return void 0===e&&(e=document),e.querySelector(t)}function Gt(t,e){return void 0===e&&(e=document),e.querySelectorAll(t)}function Vt(t,e,n){t.style[e]=n?n.toString():n}function zt(t,e,n){t.setAttribute(e,n)}function Bt(t,e){return t.getAttribute(e)}function Ht(t,e){var n,o;try{for(var i=wt(Object.keys(e)),r=i.next();!r.done;r=i.next()){var a=r.value;Vt(t,a,e[a])}}catch(t){n={error:t}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}}function Ut(t,e){Array.isArray(e)?e.forEach((function(e){return t.classList.add(e)})):t.classList.add(e)}function Kt(t,e,n){n?Ut(t,e):Wt(t,e)}function Wt(t,e){t.classList.remove(e)}function $t(t,e,n){var o,i;if(Mt(e))t.setAttribute(e,n);else try{for(var r=wt(Object.keys(e)),a=r.next();!a.done;a=r.next()){var s=a.value;t.setAttribute(s,e[s])}}catch(t){o={error:t}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}}function Qt(t){return document.createElement(t)}function qt(t,e){return t.appendChild(e)}function Yt(t,e){t.insertBefore(e,t.firstChild)}function Zt(t){return qt(document.body,t),function(){t&&(document.body.removeChild(t),t=null)}}function Xt(t,e){var n=Qt("script");n.innerHTML=t,n.id=e,Zt(n)}function Jt(t,e){var n=Qt("style");n.innerHTML=t,n.id=e,Zt(n)}function te(t){var e=t.getBoundingClientRect(),n=document.body,o=document.documentElement,i=window.pageYOffset||o.scrollTop||n.scrollTop,r=window.pageXOffset||o.scrollLeft||n.scrollLeft,a=o.clientTop||n.clientTop||0,s=o.clientLeft||n.clientLeft||0,l=e.top+i-a,c=e.left+r-s,p=e.width,d=e.height;return{top:Math.round(l),left:Math.round(c),width:p,height:d}}function ee(t,e){return window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(t){var e,n=(this.document||this.ownerDocument).querySelectorAll(t),o=this;do{for(e=n.length;--e>=0&&n.item(e)!==o;);}while(e<0&&(o=o.parentElement));return o}),t.closest(e)}function ne(){}
35
35
  /**
36
36
  * @license
37
37
  * Copyright Datorama. All Rights Reserved.
@@ -53,7 +53,7 @@ var re,ae=function(){function t(t,e,n){this.host=t,this.width=e,this.height=n,th
53
53
  *
54
54
  * Use of this source code is governed by an Apache License 2.0 license that can be
55
55
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
56
- */function le(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u.apply(void 0,xt(t))}function ce(t,e,n){return Array.prototype.findIndex?t.findIndex(e):g(t,e,n)}function pe(t){var e=Array.from(t);return e&&e.length?e[e.length-1]:void 0}function de(t){return Array.from(new Set(t))}function ue(t,e){return m(t,e)}function he(t,e){void 0===t&&(t=[]),void 0===e&&(e=[]);var n=t.every((function(t){return e.find((function(e){return e===t}))})),o=e.every((function(e){return t.find((function(t){return t===e}))}));return n&&o&&t.length===e.length}function ge(t,e){return void 0===e&&(e=!1),null!=t&&""+t!="false"&&(e&&0!==t||!e)}function fe(t,e){return void 0===e&&(e=0),_t(t)?Number(t):e}function me(t){return Array.isArray(t)?t:[t]}function ye(t){return Lt(t)?0:Array.isArray(t)?t.length:Pt(t)?Object.keys(t).length:ge(t)?t.length:0}function ve(t,e){return void 0===e&&(e=t.length),R(t,e)}function be(t){if(null==t||"function"!=typeof t)return"";if(t.hasOwnProperty("name"))return t.name;var e=t.toString();return e=(e=e.substr("function ".length)).substr(0,e.indexOf("("))}function Ce(t,e){if(void 0===e&&(e=0),!_t(t))return"";if(t<1e3)return t.toString();for(var n=[{suffix:"Q",minValue:Math.pow(10,15)},{suffix:"T",minValue:Math.pow(10,12)},{suffix:"B",minValue:Math.pow(10,9)},{suffix:"M",minValue:Math.pow(10,6)},{suffix:"K",minValue:1e3}],o=function(t){return Number(t.toFixed(e))},i=0;i<n.length;i++){var r=n[i],a=r.minValue,s=r.suffix;if(t>=a)return""+o(t/a)+s}return""+o(t)}function we(t){return j(t)}function Se(t,e){return function t(e,n){return L(e,(function(e,o,i){c(o,n[i])||(e[i]=Pt(o)&&Pt(n[i])?t(o,n[i]):o)}))}(t,e)}function xe(t,e){var n=mt({},t),o=St(e.split(".")),i=o[0],r=o.slice(1);if(t.hasOwnProperty(i)){if(!r.length){var a=n,s=i;a[s];return yt(a,["symbol"==typeof s?s:s+""])}n[i]=xe(n[i],r.join("."))}else console.warn(i+" doesn't exists in given object");return n}function Oe(t){return z(t)}function De(t){return H(t)}function Ie(t){if(t)return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Te(t){var e=t.toLowerCase().replace(/[^A-Za-z0-9]/g," ").split(" ").reduce((function(t,e){return t+Ie(e.toLowerCase())}));return e.charAt(0).toLowerCase()+e.slice(1)}function Re(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}function Ae(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}function Ee(t){var e=t.match(/[A-Z,a-z,0-9]/g);return e?e.join("").slice(0,2):null}(t.ContentType||(t.ContentType={})).JSON="application/json",(re=t.KeyCodes||(t.KeyCodes={}))[re.BACKSPACE=8]="BACKSPACE",re[re.TAB=9]="TAB",re[re.ENTER=13]="ENTER",re[re.ESCAPE=27]="ESCAPE",re[re.SPACE=32]="SPACE",re[re.PAGE_UP=33]="PAGE_UP",re[re.PAGE_DOWN=34]="PAGE_DOWN",re[re.END=35]="END",re[re.HOME=36]="HOME",re[re.LEFT_ARROW=37]="LEFT_ARROW",re[re.UP_ARROW=38]="UP_ARROW",re[re.RIGHT_ARROW=39]="RIGHT_ARROW",re[re.DOWN_ARROW=40]="DOWN_ARROW",re[re.DELETE=46]="DELETE",re[re.ZERO=48]="ZERO",re[re.A=65]="A",re[re.Z=90]="Z",re[re.NINE=91]="NINE",re[re.F11=122]="F11",re[re.COMMA=188]="COMMA";var Pe=new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"),ke=new RegExp("^data:image\\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}");function _e(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}function je(t,e,n){var o=_e(t)-_e(e);return n?-1*o:o}var Me=function(t){this.contents=null,this.appliedAttributes=!1,this.contents=t},Le=function(){function t(){this.svgMap=new Map}return Object.defineProperty(t.prototype,"lazyXMLSerializer",{get:function(){return this._XMLSerializer||(this._XMLSerializer=new XMLSerializer),this._XMLSerializer},enumerable:!0,configurable:!0}),t.prototype.register=function(t){var e,n;if(t){var o=Object.keys(t);try{for(var i=wt(o),r=i.next();!r.done;r=i.next()){var a=r.value;this.addIcon(a,t[a])}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}},t.prototype.getSvg=function(t,e){void 0===e&&(e={setDimensions:!0});var n,o=this.svgMap.get(t);return o&&(o.appliedAttributes||this.applySagAttributes(o,e),n=o.contents),n},t.prototype.getSvgElement=function(t){var e=this.getSvg(t),n=document.createElement("DIV");n.innerHTML=e;var o=n.querySelector("svg");if(!o)throw Error("<svg> tag not found");return o},t.prototype.hasSvg=function(t){return this.svgMap.has(t)},t.prototype.applySagAttributes=function(t,e){var n=this.svgElementFromString(t.contents);this.setSvgAttributes(n,e),t.contents=this.getSvgContents(n),t.appliedAttributes=!0},t.prototype.getSvgContents=function(t){var e=t.outerHTML;return void 0===e&&(e=this.lazyXMLSerializer.serializeToString(t)),e},t.prototype.svgElementFromString=function(t){var e=document.createElement("DIV");e.innerHTML=t;var n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n},t.prototype.setSvgAttributes=function(t,e){return t.getAttribute("xmlns")||t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("fit",""),e.setDimensions&&(t.setAttribute("height","100%"),t.setAttribute("width","100%")),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),t},t.prototype.validateSvgKey=function(t){if(!(t&&Re(t)===t))throw new Error("The SVG key '"+t+"' should be in kebabCase.")},t.prototype.getAll=function(){return Array.from(this.svgMap.keys())},t.prototype.addIcon=function(t,e){this.validateSvgKey(t);var n=new Me(e);this.svgMap.set(t,n)},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"})],t)}(),Ne=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ft(n,t),n.prototype.register=function(e){var n,o;if(e){var i=Object.values(e);try{for(var r=wt(i),a=r.next();!a.done;a=r.next()){var s=a.value,l=s.data,c=s.name;t.prototype.addIcon.call(this,c,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}}},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n},token:n,providedIn:"root"}),n=vt([e.Injectable({providedIn:"root"})],n)}(Le),Fe=function(){function t(t,e,n,o,i){this.host=t,this.iconRegistry=e,this.svgRegistry=n,this.width=o,this.height=i,this.registry=this.svgRegistry,this.datoSize="md"}return t.prototype.ngOnInit=function(){Qt(this.element,"role","img"),oe(this.width,this.height,this.element)},t.prototype.ngOnChanges=function(){this.datoIcon&&(this.registry=this.iconRegistry),"xs"===this.datoSize&&this.datoIcon&&(this.datoSize="sm",e.isDevMode()&&console.warn("⚠️ 'xs' size isn't supported for old icons (datoIcon), 'sm' will be used instead")),this.render(this.icon||this.datoIcon)},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.injectSvg=function(){this.element.innerHTML=this.registry.getSvg(this.iconKey),this.lastIconClass&&Wt(this.element,this.lastIconClass),this.lastIconClass=this.getIconClass();var t=(this.icon?"icon":"dato-icon")+"-"+this.datoSize;Ut(this.element,[this.lastIconClass,t])},t.prototype.getIconClass=function(){return Re("dato-icon-"+this.iconKey)},t.prototype.render=function(t){this.iconKey=t,t&&(this.registry.hasSvg(t)?this.injectSvg():e.isDevMode()&&console.warn("⚠️ "+t+" is missing."))},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Le},{type:Ne},{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoIcon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoSize",void 0),t=vt([e.Component({selector:"dato-icon",template:"",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;align-items:center;justify-content:center;fill:currentColor;width:24px;height:24px}:host[datoSize=xs],dato-button[datoSize=xs] :host{width:12px;height:12px}:host[datoSize=sm],dato-button[datoSize=sm] :host{width:12px;height:12px}:host[datoSize=md],dato-button[datoSize=md] :host{width:24px;height:24px}:host[datoSize=lg],dato-button[datoSize=lg] :host{width:36px;height:36px}:host.icon-xs{width:16px;height:16px}:host.icon-sm{width:18px;height:18px}:host.icon-md{width:24px;height:24px}:host.icon-lg{width:36px;height:36px}"]}),bt(3,e.Attribute("width")),bt(4,e.Attribute("height")),Ct("design:paramtypes",[e.ElementRef,Le,Ne,Object,Object])],t)}(),Ge=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Fe],exports:[Fe]})],t)}(),Ve=function(){function t(t,e,n,o){this.host=t,this.svgRegistry=e,this.width=n,this.height=o,this.datoSize="md"}return t.prototype.ngOnInit=function(){this.iconStyle={width:this.width,height:this.height,fontSize:this.width||this.height}},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(){this.render()},t.prototype.render=function(){if(this.icon)if(this.svgRegistry.hasSvg(this.icon)){this.iconClass="dato-icon-font-"+this.icon+" icon-"+this.datoSize;var t=this.width||this.height;!Lt(t)&&Vt(this.element,"font-size",t+"px")}else e.isDevMode()&&console.warn("⚠️ "+this.icon+" is missing.")},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Ne},{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoSize",void 0),t=vt([e.Component({selector:"dato-font-icon",template:'<span role="img" class="dato-icon-font" [ngClass]="iconClass" [ngStyle]="iconStyle"></span>',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;align-items:center;justify-content:center;fill:currentColor}:host span{width:24px;height:24px;font-size:24px}:host[datoSize=xs] span,:host[ng-reflect-dato-size=xs] span{width:16px;height:16px;font-size:16px}:host[datoSize=sm] span,:host[ng-reflect-dato-size=sm] span{width:18px;height:18px;font-size:18px}:host[datoSize=md] span,:host[ng-reflect-dato-size=md] span{width:24px;height:24px;font-size:24px}:host[datoSize=lg] span,:host[ng-reflect-dato-size=lg] span{width:36px;height:36px;font-size:36px}"]}),bt(2,e.Attribute("width")),bt(3,e.Attribute("height")),Ct("design:paramtypes",[e.ElementRef,Ne,Object,Object])],t)}(),ze=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Ve],exports:[Ve]})],t)}();
56
+ */function le(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u.apply(void 0,xt(t))}function ce(t,e,n){return Array.prototype.findIndex?t.findIndex(e):g(t,e,n)}function pe(t){var e=Array.from(t);return e&&e.length?e[e.length-1]:void 0}function de(t){return Array.from(new Set(t))}function ue(t,e){return m(t,e)}function he(t,e){void 0===t&&(t=[]),void 0===e&&(e=[]);var n=t.every((function(t){return e.find((function(e){return e===t}))})),o=e.every((function(e){return t.find((function(t){return t===e}))}));return n&&o&&t.length===e.length}function ge(t,e){return void 0===e&&(e=!1),null!=t&&""+t!="false"&&(e&&0!==t||!e)}function fe(t,e){return void 0===e&&(e=0),_t(t)?Number(t):e}function me(t){return Array.isArray(t)?t:[t]}function ye(t){return Lt(t)?0:Array.isArray(t)?t.length:Pt(t)?Object.keys(t).length:ge(t)?t.length:0}function ve(t,e){return void 0===e&&(e=t.length),R(t,e)}function be(t){if(null==t||"function"!=typeof t)return"";if(t.hasOwnProperty("name"))return t.name;var e=t.toString();return e=(e=e.substr("function ".length)).substr(0,e.indexOf("("))}function Ce(t,e){if(void 0===e&&(e=0),!_t(t))return"";if(t<1e3)return t.toString();for(var n=[{suffix:"Q",minValue:Math.pow(10,15)},{suffix:"T",minValue:Math.pow(10,12)},{suffix:"B",minValue:Math.pow(10,9)},{suffix:"M",minValue:Math.pow(10,6)},{suffix:"K",minValue:1e3}],o=function(t){return Number(t.toFixed(e))},i=0;i<n.length;i++){var r=n[i],a=r.minValue,s=r.suffix;if(t>=a)return""+o(t/a)+s}return""+o(t)}function we(t){return j(t)}function Se(t,e){return function t(e,n){return L(e,(function(e,o,i){c(o,n[i])||(e[i]=Pt(o)&&Pt(n[i])?t(o,n[i]):o)}))}(t,e)}function xe(t,e){var n=mt({},t),o=St(e.split(".")),i=o[0],r=o.slice(1);if(t.hasOwnProperty(i)){if(!r.length){var a=n,s=i;a[s];return yt(a,["symbol"==typeof s?s:s+""])}n[i]=xe(n[i],r.join("."))}else console.warn(i+" doesn't exists in given object");return n}function Oe(t){return z(t)}function De(t){return H(t)}function Ie(t){if(t)return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Te(t){var e=t.toLowerCase().replace(/[^A-Za-z0-9]/g," ").split(" ").reduce((function(t,e){return t+Ie(e.toLowerCase())}));return e.charAt(0).toLowerCase()+e.slice(1)}function Re(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}function Ae(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}function Ee(t){var e=t.match(/[A-Z,a-z,0-9]/g);return e?e.join("").slice(0,2):null}(t.ContentType||(t.ContentType={})).JSON="application/json",(re=t.KeyCodes||(t.KeyCodes={}))[re.BACKSPACE=8]="BACKSPACE",re[re.TAB=9]="TAB",re[re.ENTER=13]="ENTER",re[re.ESCAPE=27]="ESCAPE",re[re.SPACE=32]="SPACE",re[re.PAGE_UP=33]="PAGE_UP",re[re.PAGE_DOWN=34]="PAGE_DOWN",re[re.END=35]="END",re[re.HOME=36]="HOME",re[re.LEFT_ARROW=37]="LEFT_ARROW",re[re.UP_ARROW=38]="UP_ARROW",re[re.RIGHT_ARROW=39]="RIGHT_ARROW",re[re.DOWN_ARROW=40]="DOWN_ARROW",re[re.DELETE=46]="DELETE",re[re.ZERO=48]="ZERO",re[re.A=65]="A",re[re.Z=90]="Z",re[re.NINE=91]="NINE",re[re.F11=122]="F11",re[re.COMMA=188]="COMMA";var Pe=new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"),ke=new RegExp("^data:image\\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}");function _e(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}function je(t,e,n){var o=_e(t)-_e(e);return n?-1*o:o}var Me=function(t){this.contents=null,this.appliedAttributes=!1,this.contents=t},Le=function(){function t(){this.svgMap=new Map}return Object.defineProperty(t.prototype,"lazyXMLSerializer",{get:function(){return this._XMLSerializer||(this._XMLSerializer=new XMLSerializer),this._XMLSerializer},enumerable:!0,configurable:!0}),t.prototype.register=function(t){var e,n;if(t){var o=Object.keys(t);try{for(var i=wt(o),r=i.next();!r.done;r=i.next()){var a=r.value;this.addIcon(a,t[a])}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}},t.prototype.getSvg=function(t,e){void 0===e&&(e={setDimensions:!0});var n,o=this.svgMap.get(t);return o&&(o.appliedAttributes||this.applySagAttributes(o,e),n=o.contents),n},t.prototype.getSvgElement=function(t){var e=this.getSvg(t),n=document.createElement("DIV");n.innerHTML=e;var o=n.querySelector("svg");if(!o)throw Error("<svg> tag not found");return o},t.prototype.hasSvg=function(t){return this.svgMap.has(t)},t.prototype.applySagAttributes=function(t,e){var n=this.svgElementFromString(t.contents);this.setSvgAttributes(n,e),t.contents=this.getSvgContents(n),t.appliedAttributes=!0},t.prototype.getSvgContents=function(t){var e=t.outerHTML;return void 0===e&&(e=this.lazyXMLSerializer.serializeToString(t)),e},t.prototype.svgElementFromString=function(t){var e=document.createElement("DIV");e.innerHTML=t;var n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n},t.prototype.setSvgAttributes=function(t,e){return t.getAttribute("xmlns")||t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("fit",""),e.setDimensions&&(t.setAttribute("height","100%"),t.setAttribute("width","100%")),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),t},t.prototype.validateSvgKey=function(t){if(!(t&&Re(t)===t))throw new Error("The SVG key '"+t+"' should be in kebabCase.")},t.prototype.getAll=function(){return Array.from(this.svgMap.keys())},t.prototype.addIcon=function(t,e){this.validateSvgKey(t);var n=new Me(e);this.svgMap.set(t,n)},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"})],t)}(),Ne=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ft(n,t),n.prototype.register=function(e){var n,o;if(e){var i=Object.values(e);try{for(var r=wt(i),a=r.next();!a.done;a=r.next()){var s=a.value,l=s.data,c=s.name;t.prototype.addIcon.call(this,c,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}}},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n},token:n,providedIn:"root"}),n=vt([e.Injectable({providedIn:"root"})],n)}(Le),Fe=function(){function t(t,e,n,o,i){this.host=t,this.iconRegistry=e,this.svgRegistry=n,this.width=o,this.height=i,this.registry=this.svgRegistry,this.datoSize="md"}return t.prototype.ngOnInit=function(){$t(this.element,"role","img"),oe(this.width,this.height,this.element)},t.prototype.ngOnChanges=function(){this.datoIcon&&(this.registry=this.iconRegistry),"xs"===this.datoSize&&this.datoIcon&&(this.datoSize="sm",e.isDevMode()&&console.warn("⚠️ 'xs' size isn't supported for old icons (datoIcon), 'sm' will be used instead")),this.render(this.icon||this.datoIcon)},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.injectSvg=function(){this.element.innerHTML=this.registry.getSvg(this.iconKey),this.lastIconClass&&Wt(this.element,this.lastIconClass),this.lastIconClass=this.getIconClass();var t=(this.icon?"icon":"dato-icon")+"-"+this.datoSize;Ut(this.element,[this.lastIconClass,t])},t.prototype.getIconClass=function(){return Re("dato-icon-"+this.iconKey)},t.prototype.render=function(t){this.iconKey=t,t&&(this.registry.hasSvg(t)?this.injectSvg():e.isDevMode()&&console.warn("⚠️ "+t+" is missing."))},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Le},{type:Ne},{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoIcon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoSize",void 0),t=vt([e.Component({selector:"dato-icon",template:"",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;align-items:center;justify-content:center;fill:currentColor;width:24px;height:24px}:host[datoSize=xs],dato-button[datoSize=xs] :host{width:12px;height:12px}:host[datoSize=sm],dato-button[datoSize=sm] :host{width:12px;height:12px}:host[datoSize=md],dato-button[datoSize=md] :host{width:24px;height:24px}:host[datoSize=lg],dato-button[datoSize=lg] :host{width:36px;height:36px}:host.icon-xs{width:16px;height:16px}:host.icon-sm{width:18px;height:18px}:host.icon-md{width:24px;height:24px}:host.icon-lg{width:36px;height:36px}"]}),bt(3,e.Attribute("width")),bt(4,e.Attribute("height")),Ct("design:paramtypes",[e.ElementRef,Le,Ne,Object,Object])],t)}(),Ge=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Fe],exports:[Fe]})],t)}(),Ve=function(){function t(t,e,n,o){this.host=t,this.svgRegistry=e,this.width=n,this.height=o,this.datoSize="md"}return t.prototype.ngOnInit=function(){this.iconStyle={width:this.width,height:this.height,fontSize:this.width||this.height}},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(){this.render()},t.prototype.render=function(){if(this.icon)if(this.svgRegistry.hasSvg(this.icon)){this.iconClass="dato-icon-font-"+this.icon+" icon-"+this.datoSize;var t=this.width||this.height;!Lt(t)&&Vt(this.element,"font-size",t+"px")}else e.isDevMode()&&console.warn("⚠️ "+this.icon+" is missing.")},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Ne},{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoSize",void 0),t=vt([e.Component({selector:"dato-font-icon",template:'<span role="img" class="dato-icon-font" [ngClass]="iconClass" [ngStyle]="iconStyle"></span>',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;align-items:center;justify-content:center;fill:currentColor}:host span{width:24px;height:24px;font-size:24px}:host[datoSize=xs] span,:host[ng-reflect-dato-size=xs] span{width:16px;height:16px;font-size:16px}:host[datoSize=sm] span,:host[ng-reflect-dato-size=sm] span{width:18px;height:18px;font-size:18px}:host[datoSize=md] span,:host[ng-reflect-dato-size=md] span{width:24px;height:24px;font-size:24px}:host[datoSize=lg] span,:host[ng-reflect-dato-size=lg] span{width:36px;height:36px;font-size:36px}"]}),bt(2,e.Attribute("width")),bt(3,e.Attribute("height")),Ct("design:paramtypes",[e.ElementRef,Ne,Object,Object])],t)}(),ze=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Ve],exports:[Ve]})],t)}();
57
57
  /**
58
58
  * @license
59
59
  * Copyright Datorama. All Rights Reserved.
@@ -68,21 +68,21 @@ var re,ae=function(){function t(t,e,n){this.host=t,this.width=e,this.height=n,th
68
68
  * Use of this source code is governed by an Apache License 2.0 license that can be
69
69
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
70
70
  */
71
- function Be(t){return void 0===t&&(t=void 0),function(e){return ge(t)?e.pipe(r.debounceTime(t)):e}}var He,Ue,Ke,We,Qe=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,$e=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,qe=/(tablet|ipad|playbook|silk)|(android(?!.*mobile))/i,Ye=/Trident.*rv\:11\./;function Ze(){return window.navigator.userAgent}function Xe(){var t=!1;return function(e){(function(t){return qe.test(t)}(e)||Qe.test(e)||$e.test(e.substr(0,4)))&&(t=!0)}(Ze()||navigator.vendor||window.opera),t&&!Je()}function Je(){var t=Ze();return t.indexOf("MSIE ")>0||!!t.match(Ye)}function tn(){if(Je()){var t=new UIEvent("resize");window.dispatchEvent(t)}else window.dispatchEvent(new Event("resize"))}
71
+ function Be(t){return void 0===t&&(t=void 0),function(e){return ge(t)?e.pipe(r.debounceTime(t)):e}}var He,Ue,Ke,We,$e=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,Qe=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,qe=/(tablet|ipad|playbook|silk)|(android(?!.*mobile))/i,Ye=/Trident.*rv\:11\./;function Ze(){return window.navigator.userAgent}function Xe(){var t=!1;return function(e){(function(t){return qe.test(t)}(e)||$e.test(e)||Qe.test(e.substr(0,4)))&&(t=!0)}(Ze()||navigator.vendor||window.opera),t&&!Je()}function Je(){var t=Ze();return t.indexOf("MSIE ")>0||!!t.match(Ye)}function tn(){if(Je()){var t=new UIEvent("resize");window.dispatchEvent(t)}else window.dispatchEvent(new Event("resize"))}
72
72
  /**
73
73
  * @license
74
74
  * Copyright Datorama. All Rights Reserved.
75
75
  *
76
76
  * Use of this source code is governed by an Apache License 2.0 license that can be
77
77
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
78
- */(Ue=t.Dimensions||(t.Dimensions={})).LG="lg",Ue.MD="md",Ue.SM="sm",(Ke=t.Types||(t.Types={})).PRIMARY="primary",Ke.SECONDARY="secondary",(We=t.SUPPORTED_LOCALES||(t.SUPPORTED_LOCALES={})).en_US="en_US",We.ja_JP="ja_JP",We.de_DE="de_DE",We.fr_FR="fr_FR",We.es_ES="es_ES";var en,nn,on=((He={})[t.SUPPORTED_LOCALES.en_US]=Q,He[t.SUPPORTED_LOCALES.ja_JP]=Y,He[t.SUPPORTED_LOCALES.de_DE]=W,He[t.SUPPORTED_LOCALES.fr_FR]=q,He[t.SUPPORTED_LOCALES.es_ES]=$,He);
78
+ */(Ue=t.Dimensions||(t.Dimensions={})).LG="lg",Ue.MD="md",Ue.SM="sm",(Ke=t.Types||(t.Types={})).PRIMARY="primary",Ke.SECONDARY="secondary",(We=t.SUPPORTED_LOCALES||(t.SUPPORTED_LOCALES={})).en_US="en_US",We.ja_JP="ja_JP",We.de_DE="de_DE",We.fr_FR="fr_FR",We.es_ES="es_ES";var en,nn,on=((He={})[t.SUPPORTED_LOCALES.en_US]=$,He[t.SUPPORTED_LOCALES.ja_JP]=Y,He[t.SUPPORTED_LOCALES.de_DE]=W,He[t.SUPPORTED_LOCALES.fr_FR]=q,He[t.SUPPORTED_LOCALES.es_ES]=Q,He);
79
79
  /**
80
80
  * @license
81
81
  * Copyright Datorama. All Rights Reserved.
82
82
  *
83
83
  * Use of this source code is governed by an Apache License 2.0 license that can be
84
84
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
85
- */(en=t.DateType||(t.DateType={}))[en.STANDARD=0]="STANDARD",en[en.CUSTOM=1]="CUSTOM",function(t){t.SHORT="short",t.MEDIUM="medium",t.LONG="long"}(nn||(nn={}));var rn;function an(t,e){return t.id.startsWith(e)}function sn(t,e){return t.find((function(t){return t.id===e}))}function ln(e,n){if(void 0===n&&(n=on[t.SUPPORTED_LOCALES.en_US]),Je())return"string"==typeof e?new Date(e):e;var o=null;if(e)if("string"==typeof e){var i=e;if(!U.isMatch(e,"yyyy-LL-dd")){var r=new Date(e),a=r.getFullYear(),s=r.getMonth()+1,l=s<10?"0"+s:s,c=r.getDate();i=a+"-"+l+"-"+(c<10?"0"+c:c)}o=K.utcToZonedTime(new Date(i),"UTC")}else U.isValid(e)&&(o=K.utcToZonedTime(cn(e,n)+"T00:00:00.000Z","UTC"));return o}function cn(e,n){return void 0===n&&(n=on[t.SUPPORTED_LOCALES.en_US]),K.format(e,"yyyy-LL-dd",{locale:n})}function pn(e){var n=[on[t.SUPPORTED_LOCALES.ja_JP].code].includes(e.code)?nn.LONG:nn.MEDIUM;return e.formatLong.date({width:n})}function dn(t,e,n){if("string"==typeof t){var o=un(t,e,n);if(U.isValid(o))return o;var i=un(t,e,"yyyy-LL-dd");return U.isValid(i)?i:new Date(t)}return t}function un(t,e,n){var o=pn(e);return U.parse(hn(t),hn(n||o),new Date,{locale:e})}function hn(t){return t.replace(/\s+/g,"")}(rn=t.RelativeDateType||(t.RelativeDateType={})).TODAY="TODAY",rn.PAGE_START="PAGE_START",rn.PAGE_END="PAGE_END";var gn,fn=t.RelativeDateType.TODAY,mn=t.RelativeDateType.PAGE_START,yn=t.RelativeDateType.PAGE_END,vn=[{id:fn,label:"core.today"},{id:mn,label:"core.page-start"},{id:yn,label:"core.page-end"}],bn=function(){function e(t){this.config=t}return Object.defineProperty(e.prototype,"customRangeID",{get:function(){return this.config.customRangeID},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ranges",{get:function(){return this.config.ranges},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstDayOfWeek",{get:function(){return this.config.firstDayOfWeek||0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timeZone",{get:function(){return this.config.timeZone||"UTC"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locale",{get:function(){return on[this.config.locale]||on[t.SUPPORTED_LOCALES.en_US]},enumerable:!0,configurable:!0}),e}(),Cn=new e.InjectionToken("DATE_PICKER_CONFIG"),wn={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Sn})),multi:!0},Sn=function(t){function o(e,o,i,r,a,s){var l=t.call(this)||this;return l.width=e,l.height=o,l.config=i,l.renderer=r,l.cdr=a,l.host=s,l.showDelete=!1,l._datoSize="md",l.placeholder="",l.isFocused=!1,l.isLoading=!1,l.type="text",l.maxLength=524288,l.withClear=!0,l.isPopperOrigin=!1,l.valueChanges=new n.Subject,l.valueChanges$=l.valueChanges.asObservable(),l.keydown=new n.Subject,l.keydown$=l.keydown.asObservable(),l}return ft(o,t),o.prototype.markTouched=function(){this.onTouched()},Object.defineProperty(o.prototype,"datoSize",{set:function(t){this._datoSize=t,Qt(this.host.nativeElement,"datoSize",t)},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this;Qt(this.host.nativeElement,"datoSize",this._datoSize),oe(this.width,this.height,this.host.nativeElement),oe(this.width,this.height,this.inputElement),n.fromEvent(this.inputElement,"input").pipe(r.pluck("target","value"),r.tap((function(e){return t.activateDeleteIcon(e)})),Be(this.debounceTime),i.untilDestroyed(this)).subscribe((function(e){t.valueChanges.next(e);var n=t.isDate(e)?U.format(ln(e,t.config.locale),pn(t.config.locale),{locale:t.config.locale}):e;t.onChange(n),t.cdr.markForCheck()}))},o.prototype.ngOnChanges=function(t){var e,n,o,i,r=t.attrs;if(r){var a=r.previousValue,s=r.currentValue;if(a)try{for(var l=wt(Object.keys(a)),c=l.next();!c.done;c=l.next()){var p=c.value;this.inputElement.removeAttribute(p)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}if(s)try{for(var d=wt(Object.keys(s)),u=d.next();!u.done;u=d.next()){p=u.value;this.inputElement.setAttribute(p,s[p])}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}},Object.defineProperty(o.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"showSearch",{get:function(){return"search"===this.type&&!this.showDelete},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isNumber",{get:function(){return"number"===this.type},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isDateType",{get:function(){return"date"===this.type},enumerable:!0,configurable:!0}),o.prototype.blur=function(){this.inputElement.blur()},o.prototype.clear=function(){if(this.showDelete){this.activateDeleteIcon(""),this.setInputValue(""),this.onChange(""),this.focus(),this.valueChanges.next("")}},o.prototype.writeValue=function(t){var e=null==t?"":t;this.isDate(t)&&(e=cn(ln(new Date(t),this.config.locale),this.config.locale)),this.activateDeleteIcon(e),this.setInputValue(e)},o.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},o.prototype.focus=function(){this.inputElement.focus()},o.prototype.onKeydown=function(t){this.keydown.next(t)},o.prototype.ngOnDestroy=function(){},o.prototype.disableClear=function(){this.withClear=!1,this.cdr.detectChanges()},o.prototype.setPopperOrigin=function(){this.isPopperOrigin=!0,this.cdr.detectChanges()},Object.defineProperty(o.prototype,"value",{get:function(){return this.inputElement.value},enumerable:!0,configurable:!0}),o.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"value",t)},o.prototype.activateDeleteIcon=function(t){this.showDelete=!!t,this.cdr.markForCheck()},o.prototype.isDate=function(t){return this.isDateType&&!isNaN(Date.parse(t))},o.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]},{type:bn,decorators:[{type:e.Inject,args:[Cn]}]},{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.HostListener("focusout"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],o.prototype,"markTouched",null),vt([e.Input(),Ct("design:type",Object)],o.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"debounceTime",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"isFocused",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"isLoading",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"type",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"attrs",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"maxLength",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"withClear",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],o.prototype,"datoSize",null),vt([e.Input(),Ct("design:type",Object)],o.prototype,"isPopperOrigin",void 0),vt([e.Input(),Ct("design:type",String)],o.prototype,"icon",void 0),o=vt([e.Component({selector:"dato-input",template:'<div [class.has-icon]="icon">\n <input [placeholder]="placeholder | translate"\n class="dato-input"\n [class.no-clear-btn]="!withClear"\n datoErrorValidationBorderAnchor\n [ngStyle]="isNumber && {paddingRight: \'5px\'}"\n [attr.data-popover-origin]="isPopperOrigin"\n [datoAutoFocus]="isFocused" [type]="type"\n (keydown)="onKeydown($event)"\n [maxLength]="maxLength">\n <dato-icon icon="close" (click)="clear()" [datoSize]="_datoSize" data-auto-id="clear-input"\n *ngIf="withClear && showDelete && !isLoading && !isNumber" class="mr-3"></dato-icon>\n <dato-icon icon="search" *ngIf="showSearch && !isLoading" class="mr-3" [datoSize]="_datoSize"></dato-icon>\n <span class="dato-input__spinner mr-3" *ngIf="isLoading"></span>\n <dato-icon [datoIcon]="icon" *ngIf="icon" [datoSize]="_datoSize" class="dato-input-icon"></dato-icon>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[wn],styles:[":host{display:inline-block;width:100%}:host input[type=search]::-webkit-search-cancel-button{display:none!important}:host .only-on-focus:not(:hover){display:none}:host input:focus~.only-on-focus{display:block}:host input{box-sizing:border-box;height:30px;min-height:30px;line-height:30px;font-size:14px;border-radius:2px;padding:0 25px 0 10px;min-width:0;width:100%}:host input.no-clear-btn{padding-right:10px}:host input:focus{outline:0;box-shadow:none}:host input:hover{transition:.3s}:host div{position:relative;overflow:hidden}:host dato-icon{position:absolute;right:2px;top:50%;transform:translateY(-50%)}:host .icon-lg{right:5px;height:24px}:host .icon-sm{right:3px;height:18px}:host .dato-icon-close.icon-lg{right:5px;height:24px;width:24px;padding:7px}:host .dato-icon-close.icon-md{padding:7px}:host .dato-icon-close.icon-sm{right:3px;height:18px;padding:5px}:host .dato-icon-search.icon-lg{right:5px;height:24px;width:24px;padding:2px}:host .dato-icon-search.icon-md{padding:2px}:host .dato-icon-search.icon-sm{right:3px;height:18px;padding:1.5px}.dato-input-icon{left:6px}.has-icon input{padding-left:35px}:host .dato-icon-close{cursor:pointer}:host input:disabled~.dato-icon-close{display:none}:host input:disabled{cursor:default}.disabled{pointer-events:none}:host[datoSize=sm] input{height:25px;min-height:25px;line-height:25px;font-size:12px}:host[datoSize=lg] input{height:35px;min-height:35px;line-height:35px;font-size:14px}"]}),bt(0,e.Attribute("width")),bt(1,e.Attribute("height")),bt(2,e.Inject(Cn)),Ct("design:paramtypes",[Object,Object,bn,e.Renderer2,e.ChangeDetectorRef,e.ElementRef])],o)}(Dt),xn=function(){function t(t){this.host=t,this.postFixedProperties=["background","border"]}return Object.defineProperty(t.prototype,"datoColor",{set:function(t){var e=this;if(t){var n=this.addNewClasses(t);this.lastClass&&this.lastClass.forEach((function(t){-1!==n.indexOf(t)||Wt(e.hostElement,t)})),this.lastClass=n}else this.lastClass&&this.lastClass.forEach((function(t){return Wt(e.hostElement,t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostElement",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.addNewClasses=function(t){var e=this,n=t.split(","),o=[];return n.forEach((function(t){var n=t.trim().split(" "),i=St(n,1)[0];if(1===n.length){var r=i+"-color";return Ut(e.hostElement,r),void o.push(r)}n.slice(1).forEach((function(t){var n=i+"-"+t;e.postFixedProperties.indexOf(t)>-1&&(n+="-color"),Ut(e.hostElement,n),o.push(n)}))})),o},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoColor",null),t=vt([e.Directive({selector:"[datoColor]"}),Ct("design:paramtypes",[e.ElementRef])],t)}();(
85
+ */(en=t.DateType||(t.DateType={}))[en.STANDARD=0]="STANDARD",en[en.CUSTOM=1]="CUSTOM",function(t){t.SHORT="short",t.MEDIUM="medium",t.LONG="long"}(nn||(nn={}));var rn;function an(t,e){return t.id.startsWith(e)}function sn(t,e){return t.find((function(t){return t.id===e}))}function ln(e,n){if(void 0===n&&(n=on[t.SUPPORTED_LOCALES.en_US]),Je())return"string"==typeof e?new Date(e):e;var o=null;if(e)if("string"==typeof e){var i=e;if(!U.isMatch(e,"yyyy-LL-dd")){var r=new Date(e),a=r.getFullYear(),s=r.getMonth()+1,l=s<10?"0"+s:s,c=r.getDate();i=a+"-"+l+"-"+(c<10?"0"+c:c)}o=K.utcToZonedTime(new Date(i),"UTC")}else U.isValid(e)&&(o=K.utcToZonedTime(cn(e,n)+"T00:00:00.000Z","UTC"));return o}function cn(e,n){return void 0===n&&(n=on[t.SUPPORTED_LOCALES.en_US]),K.format(e,"yyyy-LL-dd",{locale:n})}function pn(e){var n=[on[t.SUPPORTED_LOCALES.ja_JP].code].includes(e.code)?nn.LONG:nn.MEDIUM;return e.formatLong.date({width:n})}function dn(t,e,n){if("string"==typeof t){var o=un(t,e,n);if(U.isValid(o))return o;var i=un(t,e,"yyyy-LL-dd");return U.isValid(i)?i:new Date(t)}return t}function un(t,e,n){var o=pn(e);return U.parse(hn(t),hn(n||o),new Date,{locale:e})}function hn(t){return t.replace(/\s+/g,"")}(rn=t.RelativeDateType||(t.RelativeDateType={})).TODAY="TODAY",rn.PAGE_START="PAGE_START",rn.PAGE_END="PAGE_END";var gn,fn=t.RelativeDateType.TODAY,mn=t.RelativeDateType.PAGE_START,yn=t.RelativeDateType.PAGE_END,vn=[{id:fn,label:"core.today"},{id:mn,label:"core.page-start"},{id:yn,label:"core.page-end"}],bn=function(){function e(t){this.config=t}return Object.defineProperty(e.prototype,"customRangeID",{get:function(){return this.config.customRangeID},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ranges",{get:function(){return this.config.ranges},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstDayOfWeek",{get:function(){return this.config.firstDayOfWeek||0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timeZone",{get:function(){return this.config.timeZone||"UTC"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locale",{get:function(){return on[this.config.locale]||on[t.SUPPORTED_LOCALES.en_US]},enumerable:!0,configurable:!0}),e}(),Cn=new e.InjectionToken("DATE_PICKER_CONFIG"),wn={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Sn})),multi:!0},Sn=function(t){function o(e,o,i,r,a,s){var l=t.call(this)||this;return l.width=e,l.height=o,l.config=i,l.renderer=r,l.cdr=a,l.host=s,l.showDelete=!1,l._datoSize="md",l.placeholder="",l.isFocused=!1,l.isLoading=!1,l.type="text",l.maxLength=524288,l.withClear=!0,l.isPopperOrigin=!1,l.valueChanges=new n.Subject,l.valueChanges$=l.valueChanges.asObservable(),l.keydown=new n.Subject,l.keydown$=l.keydown.asObservable(),l}return ft(o,t),o.prototype.markTouched=function(){this.onTouched()},Object.defineProperty(o.prototype,"datoSize",{set:function(t){this._datoSize=t,$t(this.host.nativeElement,"datoSize",t)},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this;$t(this.host.nativeElement,"datoSize",this._datoSize),oe(this.width,this.height,this.host.nativeElement),oe(this.width,this.height,this.inputElement),n.fromEvent(this.inputElement,"input").pipe(r.pluck("target","value"),r.tap((function(e){return t.activateDeleteIcon(e)})),Be(this.debounceTime),i.untilDestroyed(this)).subscribe((function(e){t.valueChanges.next(e);var n=t.isDate(e)?U.format(ln(e,t.config.locale),pn(t.config.locale),{locale:t.config.locale}):e;t.onChange(n),t.cdr.markForCheck()}))},o.prototype.ngOnChanges=function(t){var e,n,o,i,r=t.attrs;if(r){var a=r.previousValue,s=r.currentValue;if(a)try{for(var l=wt(Object.keys(a)),c=l.next();!c.done;c=l.next()){var p=c.value;this.inputElement.removeAttribute(p)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}if(s)try{for(var d=wt(Object.keys(s)),u=d.next();!u.done;u=d.next()){p=u.value;this.inputElement.setAttribute(p,s[p])}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}},Object.defineProperty(o.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"showSearch",{get:function(){return"search"===this.type&&!this.showDelete},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isNumber",{get:function(){return"number"===this.type},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isDateType",{get:function(){return"date"===this.type},enumerable:!0,configurable:!0}),o.prototype.blur=function(){this.inputElement.blur()},o.prototype.clear=function(){if(this.showDelete){this.activateDeleteIcon(""),this.setInputValue(""),this.onChange(""),this.focus(),this.valueChanges.next("")}},o.prototype.writeValue=function(t){var e=null==t?"":t;this.isDate(t)&&(e=cn(ln(new Date(t),this.config.locale),this.config.locale)),this.activateDeleteIcon(e),this.setInputValue(e)},o.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},o.prototype.focus=function(){this.inputElement.focus()},o.prototype.onKeydown=function(t){this.keydown.next(t)},o.prototype.ngOnDestroy=function(){},o.prototype.disableClear=function(){this.withClear=!1,this.cdr.detectChanges()},o.prototype.setPopperOrigin=function(){this.isPopperOrigin=!0,this.cdr.detectChanges()},Object.defineProperty(o.prototype,"value",{get:function(){return this.inputElement.value},enumerable:!0,configurable:!0}),o.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"value",t)},o.prototype.activateDeleteIcon=function(t){this.showDelete=!!t,this.cdr.markForCheck()},o.prototype.isDate=function(t){return this.isDateType&&!isNaN(Date.parse(t))},o.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]},{type:bn,decorators:[{type:e.Inject,args:[Cn]}]},{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.HostListener("focusout"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],o.prototype,"markTouched",null),vt([e.Input(),Ct("design:type",Object)],o.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"debounceTime",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"isFocused",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"isLoading",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"type",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"attrs",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"maxLength",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"withClear",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],o.prototype,"datoSize",null),vt([e.Input(),Ct("design:type",Object)],o.prototype,"isPopperOrigin",void 0),vt([e.Input(),Ct("design:type",String)],o.prototype,"icon",void 0),o=vt([e.Component({selector:"dato-input",template:'<div [class.has-icon]="icon">\n <input [placeholder]="placeholder | translate"\n class="dato-input"\n [class.no-clear-btn]="!withClear"\n datoErrorValidationBorderAnchor\n [ngStyle]="isNumber && {paddingRight: \'5px\'}"\n [attr.data-popover-origin]="isPopperOrigin"\n [datoAutoFocus]="isFocused" [type]="type"\n (keydown)="onKeydown($event)"\n [maxLength]="maxLength">\n <dato-icon icon="close" (click)="clear()" [datoSize]="_datoSize" data-auto-id="clear-input"\n *ngIf="withClear && showDelete && !isLoading && !isNumber" class="mr-3"></dato-icon>\n <dato-icon icon="search" *ngIf="showSearch && !isLoading" class="mr-3" [datoSize]="_datoSize"></dato-icon>\n <span class="dato-input__spinner mr-3" *ngIf="isLoading"></span>\n <dato-icon [datoIcon]="icon" *ngIf="icon" [datoSize]="_datoSize" class="dato-input-icon"></dato-icon>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[wn],styles:[":host{display:inline-block;width:100%}:host input[type=search]::-webkit-search-cancel-button{display:none!important}:host .only-on-focus:not(:hover){display:none}:host input:focus~.only-on-focus{display:block}:host input{box-sizing:border-box;height:30px;min-height:30px;line-height:30px;font-size:14px;border-radius:2px;padding:0 25px 0 10px;min-width:0;width:100%}:host input.no-clear-btn{padding-right:10px}:host input:focus{outline:0;box-shadow:none}:host input:hover{transition:.3s}:host div{position:relative;overflow:hidden}:host dato-icon{position:absolute;right:2px;top:50%;transform:translateY(-50%)}:host .icon-lg{right:5px;height:24px}:host .icon-sm{right:3px;height:18px}:host .dato-icon-close.icon-lg{right:5px;height:24px;width:24px;padding:7px}:host .dato-icon-close.icon-md{padding:7px}:host .dato-icon-close.icon-sm{right:3px;height:18px;padding:5px}:host .dato-icon-search.icon-lg{right:5px;height:24px;width:24px;padding:2px}:host .dato-icon-search.icon-md{padding:2px}:host .dato-icon-search.icon-sm{right:3px;height:18px;padding:1.5px}.dato-input-icon{left:6px}.has-icon input{padding-left:35px}:host .dato-icon-close{cursor:pointer}:host input:disabled~.dato-icon-close{display:none}:host input:disabled{cursor:default}.disabled{pointer-events:none}:host[datoSize=sm] input{height:25px;min-height:25px;line-height:25px;font-size:12px}:host[datoSize=lg] input{height:35px;min-height:35px;line-height:35px;font-size:14px}"]}),bt(0,e.Attribute("width")),bt(1,e.Attribute("height")),bt(2,e.Inject(Cn)),Ct("design:paramtypes",[Object,Object,bn,e.Renderer2,e.ChangeDetectorRef,e.ElementRef])],o)}(Dt),xn=function(){function t(t){this.host=t,this.postFixedProperties=["background","border"]}return Object.defineProperty(t.prototype,"datoColor",{set:function(t){var e=this;if(t){var n=this.addNewClasses(t);this.lastClass&&this.lastClass.forEach((function(t){-1!==n.indexOf(t)||Wt(e.hostElement,t)})),this.lastClass=n}else this.lastClass&&this.lastClass.forEach((function(t){return Wt(e.hostElement,t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostElement",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.addNewClasses=function(t){var e=this,n=t.split(","),o=[];return n.forEach((function(t){var n=t.trim().split(" "),i=St(n,1)[0];if(1===n.length){var r=i+"-color";return Ut(e.hostElement,r),void o.push(r)}n.slice(1).forEach((function(t){var n=i+"-"+t;e.postFixedProperties.indexOf(t)>-1&&(n+="-color"),Ut(e.hostElement,n),o.push(n)}))})),o},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoColor",null),t=vt([e.Directive({selector:"[datoColor]"}),Ct("design:paramtypes",[e.ElementRef])],t)}();(
86
86
  /**
87
87
  * @license
88
88
  * Copyright Datorama. All Rights Reserved.
@@ -97,7 +97,7 @@ gn=t.ColorPalette||(t.ColorPalette={})).Light="light",gn.Dark="dark";var On=func
97
97
  *
98
98
  * Use of this source code is governed by an Apache License 2.0 license that can be
99
99
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
100
- */function En(t){return t.onStable.pipe(r.take(1))}var Pn=function(){function t(t){this.zone=t}return t.prototype.create=function(t,e,n){var o=this;return En(this.zone).pipe(r.map((function(){var i;return o.zone.runOutsideAngular((function(){i=J.createPopper(t,e,mt(mt({},n),{modifiers:xt([tt,et,nt,{name:"hide",enabled:!1,phase:"main"}],n.modifiers||[])}))})),i})))},t.ctorParameters=function(){return[{type:e.NgZone}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(e.NgZone))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[e.NgZone])],t)}(),kn=function(){function t(t,e,o){this.appRef=t,this.ngZone=e,this.popper=o,this.attached=!1,this.created=!1,this.backDropClick=new n.Subject}return t.prototype.create=function(t,e,o){var i=this;this.created=!0,this.origin=t,this.tplPortal=e,this.ngZone.runOutsideAngular((function(){i.onClickSubscription=n.fromEvent(document.body,"click",{capture:!0}).subscribe(i.handleClick.bind(i)),i.onResizeSubscription=n.fromEvent(window,"resize").pipe(r.debounceTime(100)).subscribe(i.handleResize.bind(i,t))})),this.appendTo=o||document.body,this.ignoreClick=document.querySelector("[overlay-ignore-click]")},t.prototype.attach=function(t,e){void 0===e&&(e=[]),this.appRef.attachView(this.tplPortal.viewRef),this.createPopper(this.createOverlay(e),t),this.attached=!0},t.prototype.scheduleUpdate=function(){this.popperInstance&&this.popperInstance.update()},Object.defineProperty(t.prototype,"backDropClick$",{get:function(){return this.backDropClick.asObservable()},enumerable:!0,configurable:!0}),t.prototype.handleClick=function(t){var e=this,n=t.target;!1!==this.origin.contains(n)||!1!==this.overlay.contains(n)||this.ignoreClick&&!1!==this.ignoreClick.contains(n)||this.ngZone.run((function(){e.backDropClick.next(t)}))},t.prototype.handleResize=function(t){if(this.attached){var e=t.getBoundingClientRect().width;Vt(this.tplPortal.elementRef,"width",e+"px"),this.scheduleUpdate()}},t.prototype.createOverlay=function(t){return this.overlay=$t("div"),Ut(this.overlay,xt(["dato-overlay","absolute"],t)),qt(this.overlay,this.tplPortal.elementRef),qt(this.appendTo,this.overlay),this.overlay},t.prototype.createPopper=function(t,e){var n=this;this.popper.create(this.origin,t,e).subscribe((function(t){n.popperInstance=t}))},t.prototype.detach=function(){this.popperInstance&&this.popperInstance.destroy(),this.attached=!1,this.appendTo.removeChild(this.overlay)},t.prototype.destroy=function(){this.popperInstance.destroy(),this.appRef.detachView(this.tplPortal.viewRef),this.onClickSubscription&&this.onClickSubscription.unsubscribe(),this.onResizeSubscription&&this.onResizeSubscription.unsubscribe(),this.ignoreClick=null,this.appendTo.removeChild(this.overlay)},t.ctorParameters=function(){return[{type:e.ApplicationRef},{type:e.NgZone},{type:Pn}]},t=vt([e.Injectable(),Ct("design:paramtypes",[e.ApplicationRef,e.NgZone,Pn])],t)}(),_n=function(){function t(t){this.viewRef=t.createEmbeddedView({}),this.viewRef.detectChanges()}return Object.defineProperty(t.prototype,"elementRef",{get:function(){return this.viewRef.rootNodes[0]},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.viewRef.destroy()},t}(),jn=new e.InjectionToken("APP_TRANSLATE"),Mn=function(){function t(t){this.injector=t,this.delegate=t.get(jn)}return t.prototype.transform=function(t,e){return this.delegate.transform(t,e)},t.ctorParameters=function(){return[{type:e.Injector}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(e.INJECTOR))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[e.Injector])],t)}(),Ln=1e5;function Nn(){return Ln++}
100
+ */function En(t){return t.onStable.pipe(r.take(1))}var Pn=function(){function t(t){this.zone=t}return t.prototype.create=function(t,e,n){var o=this;return En(this.zone).pipe(r.map((function(){var i;return o.zone.runOutsideAngular((function(){i=J.createPopper(t,e,mt(mt({},n),{modifiers:xt([tt,et,nt,{name:"hide",enabled:!1,phase:"main"}],n.modifiers||[])}))})),i})))},t.ctorParameters=function(){return[{type:e.NgZone}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(e.NgZone))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[e.NgZone])],t)}(),kn=function(){function t(t,e,o){this.appRef=t,this.ngZone=e,this.popper=o,this.attached=!1,this.created=!1,this.backDropClick=new n.Subject}return t.prototype.create=function(t,e,o){var i=this;this.created=!0,this.origin=t,this.tplPortal=e,this.ngZone.runOutsideAngular((function(){i.onClickSubscription=n.fromEvent(document.body,"click",{capture:!0}).subscribe(i.handleClick.bind(i)),i.onResizeSubscription=n.fromEvent(window,"resize").pipe(r.debounceTime(100)).subscribe(i.handleResize.bind(i,t))})),this.appendTo=o||document.body,this.ignoreClick=document.querySelector("[overlay-ignore-click]")},t.prototype.attach=function(t,e){void 0===e&&(e=[]),this.appRef.attachView(this.tplPortal.viewRef),this.createPopper(this.createOverlay(e),t),this.attached=!0},t.prototype.scheduleUpdate=function(){this.popperInstance&&this.popperInstance.update()},Object.defineProperty(t.prototype,"backDropClick$",{get:function(){return this.backDropClick.asObservable()},enumerable:!0,configurable:!0}),t.prototype.handleClick=function(t){var e=this,n=t.target;!1!==this.origin.contains(n)||!1!==this.overlay.contains(n)||this.ignoreClick&&!1!==this.ignoreClick.contains(n)||this.ngZone.run((function(){e.backDropClick.next(t)}))},t.prototype.handleResize=function(t){if(this.attached){var e=t.getBoundingClientRect().width;Vt(this.tplPortal.elementRef,"width",e+"px"),this.scheduleUpdate()}},t.prototype.createOverlay=function(t){return this.overlay=Qt("div"),Ut(this.overlay,xt(["dato-overlay","absolute"],t)),qt(this.overlay,this.tplPortal.elementRef),qt(this.appendTo,this.overlay),this.overlay},t.prototype.createPopper=function(t,e){var n=this;this.popper.create(this.origin,t,e).subscribe((function(t){n.popperInstance=t}))},t.prototype.detach=function(){this.popperInstance&&this.popperInstance.destroy(),this.attached=!1,this.appendTo.removeChild(this.overlay)},t.prototype.destroy=function(){this.popperInstance.destroy(),this.appRef.detachView(this.tplPortal.viewRef),this.onClickSubscription&&this.onClickSubscription.unsubscribe(),this.onResizeSubscription&&this.onResizeSubscription.unsubscribe(),this.ignoreClick=null,this.appendTo.removeChild(this.overlay)},t.ctorParameters=function(){return[{type:e.ApplicationRef},{type:e.NgZone},{type:Pn}]},t=vt([e.Injectable(),Ct("design:paramtypes",[e.ApplicationRef,e.NgZone,Pn])],t)}(),_n=function(){function t(t){this.viewRef=t.createEmbeddedView({}),this.viewRef.detectChanges()}return Object.defineProperty(t.prototype,"elementRef",{get:function(){return this.viewRef.rootNodes[0]},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.viewRef.destroy()},t}(),jn=new e.InjectionToken("APP_TRANSLATE"),Mn=function(){function t(t){this.injector=t,this.delegate=t.get(jn)}return t.prototype.transform=function(t,e){return this.delegate.transform(t,e)},t.ctorParameters=function(){return[{type:e.Injector}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(e.INJECTOR))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[e.Injector])],t)}(),Ln=1e5;function Nn(){return Ln++}
101
101
  /**
102
102
  * @license
103
103
  * Copyright Datorama. All Rights Reserved.
@@ -111,7 +111,7 @@ gn=t.ColorPalette||(t.ColorPalette={})).Light="light",gn.Dark="dark";var On=func
111
111
  *
112
112
  * Use of this source code is governed by an Apache License 2.0 license that can be
113
113
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
114
- */function Bn(t){navigator.clipboard.writeText(t)}var Hn=function(){function t(){this.copied=new e.EventEmitter}return Object.defineProperty(t.prototype,"datoClipboard",{set:function(t){this.value=t},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){Bn(this.value),this.copied.emit(this.value)},vt([e.Output(),Ct("design:type",Object)],t.prototype,"copied",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoClipboard",null),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"onClick",null),t=vt([e.Directive({selector:"[datoClipboard]"})],t)}(),Un=new e.InjectionToken("DATO_CORE_CONFIG"),Kn=function(){function t(t,e){this.host=t,this.config=e}return Object.defineProperty(t.prototype,"datoStaticSrc",{set:function(t){Qt(this.host.nativeElement,"src",this.config.paths.staticImages+"/"+t)},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[Un]}]}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoStaticSrc",null),t=vt([e.Directive({selector:"[datoStaticSrc]"}),bt(1,e.Inject(Un)),Ct("design:paramtypes",[e.ElementRef,Object])],t)}(),Wn=function(){function t(){}return t=vt([e.NgModule({declarations:[Kn],exports:[Kn]})],t)}(),Qn="IntersectionObserver"in window;function $n(t,e){return void 0===e&&(e={root:null,threshold:.3}),new n.Observable((function(n){Qn||(n.next(),n.complete());var o=new IntersectionObserver((function(t){St(t,1)[0].isIntersecting&&(n.next(),n.complete())}),e);return o.observe(t),function(){return o.disconnect()}}))}var qn="ResizeObserver"in window;function Yn(t,e){return qn?function(t,e){void 0===e&&(e={box:"border-box"});return new n.Observable((function(n){var o=new ResizeObserver((function(t){var e=St(t,1)[0];e.borderBoxSize?n.next({width:e.borderBoxSize.inlineSize,height:e.borderBoxSize.blockSize}):n.next({width:e.target.offsetWidth,height:e.target.offsetHeight})}));return o.observe(t,e),function(){return o.disconnect()}}))}(t,e).pipe(r.auditTime(150)):function(t){return n.fromEvent(window,"resize").pipe(r.auditTime(150),r.map((function(){return{width:t.offsetWidth,height:t.offsetHeight}})),r.distinctUntilChanged((function(t,e){return t.width===e.width&&t.height===e.height})))}(t)}var Zn,Xn=function(){function t(t,e,n,o,i){this.host=t,this.appRef=e,this.translate=n,this.zone=o,this.iconRegistry=i,this.options={},this.showOnlyOnTextOverflow=!1,this.appendTo=document.body,this.tooltipCheckInView=!0,this._placement="top",this._disabled=!1,this._variation="tooltip"}return Object.defineProperty(t.prototype,"placement",{set:function(t){this._placement=t,this.setProps({placement:t})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"variation",{set:function(t){this._variation=t,this.setProps(this.resolveTheme())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoTooltipDisabled",{set:function(t){this._disabled=t,this.markDisabled(this._disabled)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{set:function(t){this.datoTooltipDisabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sticky",{set:function(t){this.instance&&(t?(this.setProps({trigger:"manual",hideOnClick:!1}),this.show()):(this.hide(),this.setProps({trigger:this.trigger})))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoTooltipV2",{set:function(t){var o,r=this;if(o=t instanceof e.TemplateRef?this.resolveTemplate(t):ot.sanitize(this.translate.transform(t),{ADD_ATTR:["target"]}),this.instance)this.instance.setContent(o),this.checkOverflow();else{var a=En(this.zone),s=this.tooltipCheckInView?[$n(this.host.nativeElement),a]:[a];n.forkJoin(s).pipe(i.untilDestroyed(this)).subscribe((function(){return r.create(o)}))}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_tooltipTarget",{get:function(){return rt.coerceElement(this.triggerTarget)||this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_tooltipHost",{get:function(){return rt.coerceElement(this.tooltipHost)||this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTooltip",{get:function(){return"tooltip"===this._variation},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPopper",{get:function(){return"popper"===this._variation},enumerable:!0,configurable:!0}),t.prototype.setProps=function(t){this.instance&&this.instance.setProps(t)},t.prototype.hide=function(){this.instance.hide()},t.prototype.show=function(){this.instance.show()},t.prototype.destroy=function(){this.tplPortal&&this.destroyTemplate(),this.instance&&this.instance.destroy(),this.instance=null},t.prototype.ngOnDestroy=function(){this.destroy()},t.prototype.create=function(t){var e=this;this.zone.runOutsideAngular((function(){return e.createInstance(t)}))},t.prototype.createInstance=function(t){var e=this;this.showOnlyOnTextOverflow&&Yn(this._tooltipHost).pipe(i.untilDestroyed(this)).subscribe((function(){e.markDisabled(!1===e.isElementOverflow())})),this.trigger=this.resolveTrigger(),this.instance=it(this._tooltipHost,mt(mt({content:t,appendTo:this.getParent(),arrow:!this.isTooltip,allowHTML:!0,zIndex:1e6,trigger:this.trigger,placement:this._placement,triggerTarget:this._tooltipTarget,onCreate:function(t){e.tooltipClass&&Ut(t.popper,e.tooltipClass)},onShow:function(t){e.isPopper&&e.addCloseButton(t)},onHidden:function(t){e.isPopper&&e.removeCloseButton(t)}},this.resolveTheme()),this.options)),this.markDisabled(this._disabled||kt(t))},t.prototype.resolveTrigger=function(){return this.trigger||(this.isPopper?"click":"mouseenter")},t.prototype.resolveTemplate=function(t){return this.tplPortal&&this.destroyTemplate(),this.tplPortal=new _n(t),this.appRef.attachView(this.tplPortal.viewRef),this.tplPortal.elementRef},t.prototype.isElementOverflow=function(){var t=this._tooltipTarget,e=t.parentElement,n=t.offsetWidth>e.offsetWidth,o=t.offsetWidth<t.scrollWidth;return n||o},t.prototype.getParent=function(){return(Mt(this.appendTo)?ee(this.host.nativeElement,this.appendTo):this.appendTo)||document.body},t.prototype.markDisabled=function(t){void 0===t&&(t=!0),this.instance&&(t?this.instance.disable():this.instance.enable())},t.prototype.resolveTheme=function(){var t=null;switch(this._variation){case"popper":t="light";break;case"information":t="light-info"}return{offset:this.offset||[0,this.isTooltip?5:10],theme:t,arrow:!1===this.isTooltip,animation:this.isTooltip?"scale":null,interactive:this.isPopper}},t.prototype.addCloseButton=function(t){var e=this,o=t.popper,i=this.iconRegistry.getSvg("close"),r=$t("div");Ut(r,"tippy-close"),r.innerHTML=i;var a=n.fromEvent(r,"click").subscribe((function(){return e.hide()}));o.appendChild(r),t.closeButtonElement=r,t.closeButtonSubcription=a},t.prototype.removeCloseButton=function(t){t.popper.removeChild(t.closeButtonElement),t.closeButtonSubcription.unsubscribe(),t.closeButtonElement=null,t.closeButtonSubcription=null},t.prototype.checkOverflow=function(){var t=this;this.showOnlyOnTextOverflow&&En(this.zone).subscribe((function(){return t.markDisabled(!1===t.isElementOverflow())}))},t.prototype.destroyTemplate=function(){this.appRef.detachView(this.tplPortal.viewRef),this.tplPortal.destroy()},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ApplicationRef},{type:Mn},{type:e.NgZone},{type:Le}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"options",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showOnlyOnTextOverflow",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"triggerTarget",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltipHost",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"appendTo",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"trigger",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltipClass",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"offset",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltipCheckInView",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"placement",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"variation",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"datoTooltipDisabled",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"sticky",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoTooltipV2",null),t=vt([e.Directive({selector:"[datoTooltipV2]",exportAs:"datoTooltipV2"}),Ct("design:paramtypes",[e.ElementRef,e.ApplicationRef,Mn,e.NgZone,Le])],t)}(),Jn=[Tn,Rn,An,Fn,Vn,Hn,zn,Xn],to=function(){function t(){}return t=vt([e.NgModule({imports:[Wn],declarations:Jn,exports:[Jn,Wn]})],t)}(),eo=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,no=function(){function t(){}return t.prototype.transform=function(t,e,n){var o=Oe(t||""),i=Oe(e||"").replace(eo,"\\$&");i=i.split(" ").filter((function(t){return t.length>0})).join("|");var r=new RegExp(i,"gi");return i?o.replace(r,(function(t){return'<span class="'+(n||"")+' dato-highlight">'+t+"</span>"})):o},t=vt([e.Pipe({name:"datoHighlight"})],t)}(),oo=function(){function t(t){this.translate=t}return t.prototype.transform=function(t,e){return this.translate.transform(t,e)},t.ctorParameters=function(){return[{type:Mn}]},t=vt([e.Pipe({name:"translate"}),Ct("design:paramtypes",[Mn])],t)}(),io=function(){function t(){}return t.prototype.transform=function(t){return Re(t)},vt([at.memo(),Ct("design:type",Function),Ct("design:paramtypes",[String]),Ct("design:returntype",String)],t.prototype,"transform",null),t=vt([e.Pipe({name:"kebabCase"})],t)}(),ro=function(){function t(){}return t.prototype.transform=function(t){return Te(t)},t=vt([e.Pipe({name:"camelCase"})],t)}();
114
+ */function Bn(t){navigator.clipboard.writeText(t)}var Hn=function(){function t(){this.copied=new e.EventEmitter}return Object.defineProperty(t.prototype,"datoClipboard",{set:function(t){this.value=t},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){Bn(this.value),this.copied.emit(this.value)},vt([e.Output(),Ct("design:type",Object)],t.prototype,"copied",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoClipboard",null),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"onClick",null),t=vt([e.Directive({selector:"[datoClipboard]"})],t)}(),Un=new e.InjectionToken("DATO_CORE_CONFIG"),Kn=function(){function t(t,e){this.host=t,this.config=e}return Object.defineProperty(t.prototype,"datoStaticSrc",{set:function(t){$t(this.host.nativeElement,"src",this.config.paths.staticImages+"/"+t)},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[Un]}]}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoStaticSrc",null),t=vt([e.Directive({selector:"[datoStaticSrc]"}),bt(1,e.Inject(Un)),Ct("design:paramtypes",[e.ElementRef,Object])],t)}(),Wn=function(){function t(){}return t=vt([e.NgModule({declarations:[Kn],exports:[Kn]})],t)}(),$n="IntersectionObserver"in window;function Qn(t,e){return void 0===e&&(e={root:null,threshold:.3}),new n.Observable((function(n){$n||(n.next(),n.complete());var o=new IntersectionObserver((function(t){St(t,1)[0].isIntersecting&&(n.next(),n.complete())}),e);return o.observe(t),function(){return o.disconnect()}}))}var qn="ResizeObserver"in window;function Yn(t,e){return qn?function(t,e){void 0===e&&(e={box:"border-box"});return new n.Observable((function(n){var o=new ResizeObserver((function(t){var e=St(t,1)[0];e.borderBoxSize?n.next({width:e.borderBoxSize.inlineSize,height:e.borderBoxSize.blockSize}):n.next({width:e.target.offsetWidth,height:e.target.offsetHeight})}));return o.observe(t,e),function(){return o.disconnect()}}))}(t,e).pipe(r.auditTime(150)):function(t){return n.fromEvent(window,"resize").pipe(r.auditTime(150),r.map((function(){return{width:t.offsetWidth,height:t.offsetHeight}})),r.distinctUntilChanged((function(t,e){return t.width===e.width&&t.height===e.height})))}(t)}var Zn,Xn=function(){function t(t,e,n,o,i){this.host=t,this.appRef=e,this.translate=n,this.zone=o,this.iconRegistry=i,this.options={},this.showOnlyOnTextOverflow=!1,this.appendTo=document.body,this.tooltipCheckInView=!0,this._placement="top",this._disabled=!1,this._variation="tooltip"}return Object.defineProperty(t.prototype,"placement",{set:function(t){this._placement=t,this.setProps({placement:t})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"variation",{set:function(t){this._variation=t,this.setProps(this.resolveTheme())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoTooltipDisabled",{set:function(t){this._disabled=t,this.markDisabled(this._disabled)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{set:function(t){this.datoTooltipDisabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sticky",{set:function(t){this.instance&&(t?(this.setProps({trigger:"manual",hideOnClick:!1}),this.show()):(this.hide(),this.setProps({trigger:this.trigger})))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoTooltipV2",{set:function(t){var o,r=this;if(o=t instanceof e.TemplateRef?this.resolveTemplate(t):ot.sanitize(this.translate.transform(t),{ADD_ATTR:["target"]}),this.instance)this.instance.setContent(o),this.checkOverflow();else{var a=En(this.zone),s=this.tooltipCheckInView?[Qn(this.host.nativeElement),a]:[a];n.forkJoin(s).pipe(i.untilDestroyed(this)).subscribe((function(){return r.create(o)}))}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_tooltipTarget",{get:function(){return rt.coerceElement(this.triggerTarget)||this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_tooltipHost",{get:function(){return rt.coerceElement(this.tooltipHost)||this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTooltip",{get:function(){return"tooltip"===this._variation},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPopper",{get:function(){return"popper"===this._variation},enumerable:!0,configurable:!0}),t.prototype.setProps=function(t){this.instance&&this.instance.setProps(t)},t.prototype.hide=function(){this.instance.hide()},t.prototype.show=function(){this.instance.show()},t.prototype.destroy=function(){this.tplPortal&&this.destroyTemplate(),this.instance&&this.instance.destroy(),this.instance=null},t.prototype.ngOnDestroy=function(){this.destroy()},t.prototype.create=function(t){var e=this;this.zone.runOutsideAngular((function(){return e.createInstance(t)}))},t.prototype.createInstance=function(t){var e=this;this.showOnlyOnTextOverflow&&Yn(this._tooltipHost).pipe(i.untilDestroyed(this)).subscribe((function(){e.markDisabled(!1===e.isElementOverflow())})),this.trigger=this.resolveTrigger(),this.instance=it(this._tooltipHost,mt(mt({content:t,appendTo:this.getParent(),arrow:!this.isTooltip,allowHTML:!0,zIndex:1e6,trigger:this.trigger,placement:this._placement,triggerTarget:this._tooltipTarget,onCreate:function(t){e.tooltipClass&&Ut(t.popper,e.tooltipClass)},onShow:function(t){e.isPopper&&e.addCloseButton(t)},onHidden:function(t){e.isPopper&&e.removeCloseButton(t)}},this.resolveTheme()),this.options)),this.markDisabled(this._disabled||kt(t))},t.prototype.resolveTrigger=function(){return this.trigger||(this.isPopper?"click":"mouseenter")},t.prototype.resolveTemplate=function(t){return this.tplPortal&&this.destroyTemplate(),this.tplPortal=new _n(t),this.appRef.attachView(this.tplPortal.viewRef),this.tplPortal.elementRef},t.prototype.isElementOverflow=function(){var t=this._tooltipTarget,e=t.parentElement,n=t.offsetWidth>e.offsetWidth,o=t.offsetWidth<t.scrollWidth;return n||o},t.prototype.getParent=function(){return(Mt(this.appendTo)?ee(this.host.nativeElement,this.appendTo):this.appendTo)||document.body},t.prototype.markDisabled=function(t){void 0===t&&(t=!0),this.instance&&(t?this.instance.disable():this.instance.enable())},t.prototype.resolveTheme=function(){var t=null;switch(this._variation){case"popper":t="light";break;case"information":t="light-info"}return{offset:this.offset||[0,this.isTooltip?5:10],theme:t,arrow:!1===this.isTooltip,animation:this.isTooltip?"scale":null,interactive:this.isPopper}},t.prototype.addCloseButton=function(t){var e=this,o=t.popper,i=this.iconRegistry.getSvg("close"),r=Qt("div");Ut(r,"tippy-close"),r.innerHTML=i;var a=n.fromEvent(r,"click").subscribe((function(){return e.hide()}));o.appendChild(r),t.closeButtonElement=r,t.closeButtonSubcription=a},t.prototype.removeCloseButton=function(t){t.popper.removeChild(t.closeButtonElement),t.closeButtonSubcription.unsubscribe(),t.closeButtonElement=null,t.closeButtonSubcription=null},t.prototype.checkOverflow=function(){var t=this;this.showOnlyOnTextOverflow&&En(this.zone).subscribe((function(){return t.markDisabled(!1===t.isElementOverflow())}))},t.prototype.destroyTemplate=function(){this.appRef.detachView(this.tplPortal.viewRef),this.tplPortal.destroy()},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ApplicationRef},{type:Mn},{type:e.NgZone},{type:Le}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"options",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showOnlyOnTextOverflow",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"triggerTarget",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltipHost",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"appendTo",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"trigger",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltipClass",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"offset",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltipCheckInView",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"placement",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"variation",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"datoTooltipDisabled",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"sticky",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoTooltipV2",null),t=vt([e.Directive({selector:"[datoTooltipV2]",exportAs:"datoTooltipV2"}),Ct("design:paramtypes",[e.ElementRef,e.ApplicationRef,Mn,e.NgZone,Le])],t)}(),Jn=[Tn,Rn,An,Fn,Vn,Hn,zn,Xn],to=function(){function t(){}return t=vt([e.NgModule({imports:[Wn],declarations:Jn,exports:[Jn,Wn]})],t)}(),eo=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,no=function(){function t(){}return t.prototype.transform=function(t,e,n){var o=Oe(t||""),i=Oe(e||"").replace(eo,"\\$&");i=i.split(" ").filter((function(t){return t.length>0})).join("|");var r=new RegExp(i,"gi");return i?o.replace(r,(function(t){return'<span class="'+(n||"")+' dato-highlight">'+t+"</span>"})):o},t=vt([e.Pipe({name:"datoHighlight"})],t)}(),oo=function(){function t(t){this.translate=t}return t.prototype.transform=function(t,e){return this.translate.transform(t,e)},t.ctorParameters=function(){return[{type:Mn}]},t=vt([e.Pipe({name:"translate"}),Ct("design:paramtypes",[Mn])],t)}(),io=function(){function t(){}return t.prototype.transform=function(t){return Re(t)},vt([at.memo(),Ct("design:type",Function),Ct("design:paramtypes",[String]),Ct("design:returntype",String)],t.prototype,"transform",null),t=vt([e.Pipe({name:"kebabCase"})],t)}(),ro=function(){function t(){}return t.prototype.transform=function(t){return Te(t)},t=vt([e.Pipe({name:"camelCase"})],t)}();
115
115
  /**
116
116
  * @license
117
117
  * Copyright Datorama. All Rights Reserved.
@@ -154,7 +154,7 @@ Zn=t.COMPARE_RESULT||(t.COMPARE_RESULT={}))[Zn.EXACT=1]="EXACT",Zn[Zn.STARTS_WIT
154
154
  *
155
155
  * Use of this source code is governed by an Apache License 2.0 license that can be
156
156
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
157
- */function ho(t){var e=t.array,n=void 0===e?[]:e,o=t.searchTerm,i=void 0===o?"":o,r=t.labelKey,a=void 0===r?"label":r,s=so(i);return n.sort((function(t,e){return s(t[a])-s(e[a])}))}var go=function(){function t(){}return t.prototype.transform=function(t,e,n){void 0===n&&(n={});var o=n.labelKey,i=void 0===o?"label":o,r=n.sortFn,a=n.labelType,s=void 0===a?"string":a;return e?ho({array:t,searchTerm:e,labelKey:i}):(r||(r=this.getSortFn({labelKey:i,labelType:s})),r({array:t,labelKey:i}))},t.prototype.getSortFn=function(t){var e,n=t.labelKey;switch(t.labelType){case"string":e=function(t,e){return t[n].localeCompare(e[n])};break;case"number":e=function(t,e){return+t[n]-+e[n]};break;case"date":e=function(t,e){return je(t[n],e[n])}}return function(t){var n=t.array;return(void 0===n?[]:n).sort(e)}},t=vt([e.Pipe({name:"searchResultsSort"})],t)}(),fo=Object.create(null),mo=function(){function t(){}return t.prototype.transform=function(t){var e=t;return Array.isArray(t)?(e=t.join("->"),fo[e]||(fo[e]=function(e,n){return t.map((function(t){return n[t]})).join("->")})):"index"===t?fo[e]||(fo[e]=function(t){return t}):fo[e]||(fo[e]=function(e,n){return n[t]}),fo[e]},t=vt([e.Pipe({name:"trackByProp"})],t)}(),yo=function(){function t(){}return t.prototype.transform=function(t,e){return void 0===e&&(e="group"),t?t.reduce((function(t,n){var o=t.find((function(t){return t.label===n[e]}));return o?o.children.push(n):t.push({label:n[e],children:[n]}),t}),[]):[]},t=vt([e.Pipe({name:"tree"})],t)}(),vo=function(){function t(){}return t.prototype.transform=function(t,e){return void 0===e&&(e=0),Ce(t,e)},t=vt([e.Pipe({name:"shortNumber"})],t)}(),bo=[no,oo,io,ro,uo,go,mo,yo,vo],Co=function(){function t(){}return t=vt([e.NgModule({declarations:bo,exports:bo})],t)}(),wo=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,In,to,Co],declarations:[Sn],exports:[Sn]})],t)}(),So=function(){function t(t,e){this.host=t,this.target=e,this.disabled=!1}return Object.defineProperty(t.prototype,"datoType",{set:function(t){Qt(this.element,"datoType",t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.target&&Qt(this.linkElement,"target",this.target),(this.href||this.download)&&Qt(this.linkElement,"href",this.href),rt.coerceBooleanProperty(this.download)&&(Qt(this.linkElement,"download",this.download),Qt(this.linkElement,"target","_blank"))},Object.defineProperty(t.prototype,"linkElement",{get:function(){return this.element.querySelector("a")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["target"]}]}]},vt([e.HostBinding("class.disabled"),e.Input(),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"href",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"download",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoType",null),t=vt([e.Component({selector:"dato-link",template:'<a class="d-flex-row items-center" [class.disabled]="disabled">\n <ng-content></ng-content>\n</a>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block;white-space:nowrap}:host a{font-size:14px;cursor:pointer;font-weight:600;text-decoration:none}:host[datoSize=sm] a{font-size:12px}:host[datoSize=lg] a{font-size:16px}:host a:focus{outline:0}:host ::ng-deep dato-icon{margin-right:7px}.disabled,:host.disabled{pointer-events:none}"]}),bt(1,e.Attribute("target")),Ct("design:paramtypes",[e.ElementRef,Object])],t)}(),xo=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[So],exports:[So]})],t)}(),Oo=function(){function t(t){this.host=t,this.currentFont=null}return Object.defineProperty(t.prototype,"datoFont",{set:function(t){this.currentFont!==t&&(this.currentFont&&Wt(this.element,this.currentFont),this.currentFont=t||"simple",this.currentFont.startsWith("dato-")||(this.currentFont="dato-"+this.currentFont),Ut(this.element,this.currentFont))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoFont",null),t=vt([e.Directive({selector:"[datoFont]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),Do=[Oo],Io=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Do],exports:[Do]})],t)}(),To=function(){function t(t,e,n,o,i,r,a,s){this.datoSize=t,this.datoType=e,this.datoCircle=n,this.width=o,this.height=i,this.iconWidth=r,this.iconHeight=a,this.host=s,this._disabled=!1}return Object.defineProperty(t.prototype,"disabled",{set:function(t){this._disabled=!!t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t,e;(this.width||this.height)&&(t=Ft("button",this.host.nativeElement),oe(this.width,this.height,t)),(this.iconWidth||this.iconHeight||this.width||this.height)&&(e=Ft("dato-icon",this.host.nativeElement),oe(this.iconWidth||this.width,this.iconHeight||this.height,e)),this.tabIndex&&(t=t||Ft("button",this.host.nativeElement)).setAttribute("tabindex",this.tabIndex),this.host.nativeElement.hasAttribute("removeIconPadding")&&Vt(e=e||Ft("dato-icon",this.host.nativeElement),"padding","0")},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoType"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoCircle"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["iconWidth"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["iconHeight"]}]},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"disabled",null),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoIcon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoIconColor",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"tabIndex",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],t.prototype,"_disabled",void 0),t=vt([e.Component({selector:"dato-icon-button",template:'<dato-button [disabled]="_disabled" [attr.datoSize]="datoSize" [attr.datoType]="datoType" [attr.datoCircle]="datoCircle" class="dato-icon-button">\n <dato-icon [datoIcon]="datoIcon" [icon]="icon" [datoColor]="datoIconColor"></dato-icon>\n</dato-button>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex}:host dato-icon{padding:3px}:host[datoSize=md] dato-icon{padding:5px}:host[datoSize=sm] dato-icon{padding:2px}:host.disabled{pointer-events:none}"]}),bt(0,e.Attribute("datoSize")),bt(1,e.Attribute("datoType")),bt(2,e.Attribute("datoCircle")),bt(3,e.Attribute("width")),bt(4,e.Attribute("height")),bt(5,e.Attribute("iconWidth")),bt(6,e.Attribute("iconHeight")),Ct("design:paramtypes",[Object,Object,Object,Object,Object,Object,Object,e.ElementRef])],t)}(),Ro=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,Ge,In],declarations:[To],exports:[To,se,Ge]})],t)}();
157
+ */function ho(t){var e=t.array,n=void 0===e?[]:e,o=t.searchTerm,i=void 0===o?"":o,r=t.labelKey,a=void 0===r?"label":r,s=so(i);return n.sort((function(t,e){return s(t[a])-s(e[a])}))}var go=function(){function t(){}return t.prototype.transform=function(t,e,n){void 0===n&&(n={});var o=n.labelKey,i=void 0===o?"label":o,r=n.sortFn,a=n.labelType,s=void 0===a?"string":a;return e?ho({array:t,searchTerm:e,labelKey:i}):(r||(r=this.getSortFn({labelKey:i,labelType:s})),r({array:t,labelKey:i}))},t.prototype.getSortFn=function(t){var e,n=t.labelKey;switch(t.labelType){case"string":e=function(t,e){return t[n].localeCompare(e[n])};break;case"number":e=function(t,e){return+t[n]-+e[n]};break;case"date":e=function(t,e){return je(t[n],e[n])}}return function(t){var n=t.array;return(void 0===n?[]:n).sort(e)}},t=vt([e.Pipe({name:"searchResultsSort"})],t)}(),fo=Object.create(null),mo=function(){function t(){}return t.prototype.transform=function(t){var e=t;return Array.isArray(t)?(e=t.join("->"),fo[e]||(fo[e]=function(e,n){return t.map((function(t){return n[t]})).join("->")})):"index"===t?fo[e]||(fo[e]=function(t){return t}):fo[e]||(fo[e]=function(e,n){return n[t]}),fo[e]},t=vt([e.Pipe({name:"trackByProp"})],t)}(),yo=function(){function t(){}return t.prototype.transform=function(t,e){return void 0===e&&(e="group"),t?t.reduce((function(t,n){var o=t.find((function(t){return t.label===n[e]}));return o?o.children.push(n):t.push({label:n[e],children:[n]}),t}),[]):[]},t=vt([e.Pipe({name:"tree"})],t)}(),vo=function(){function t(){}return t.prototype.transform=function(t,e){return void 0===e&&(e=0),Ce(t,e)},t=vt([e.Pipe({name:"shortNumber"})],t)}(),bo=[no,oo,io,ro,uo,go,mo,yo,vo],Co=function(){function t(){}return t=vt([e.NgModule({declarations:bo,exports:bo})],t)}(),wo=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,In,to,Co],declarations:[Sn],exports:[Sn]})],t)}(),So=function(){function t(t,e){this.host=t,this.target=e,this.disabled=!1}return Object.defineProperty(t.prototype,"datoType",{set:function(t){$t(this.element,"datoType",t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.target&&$t(this.linkElement,"target",this.target),(this.href||this.download)&&$t(this.linkElement,"href",this.href),rt.coerceBooleanProperty(this.download)&&($t(this.linkElement,"download",this.download),$t(this.linkElement,"target","_blank"))},Object.defineProperty(t.prototype,"linkElement",{get:function(){return this.element.querySelector("a")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["target"]}]}]},vt([e.HostBinding("class.disabled"),e.Input(),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"href",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"download",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoType",null),t=vt([e.Component({selector:"dato-link",template:'<a class="d-flex-row items-center" [class.disabled]="disabled">\n <ng-content></ng-content>\n</a>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block;white-space:nowrap}:host a{font-size:14px;cursor:pointer;font-weight:600;text-decoration:none}:host[datoSize=sm] a{font-size:12px}:host[datoSize=lg] a{font-size:16px}:host a:focus{outline:0}:host ::ng-deep dato-icon{margin-right:7px}.disabled,:host.disabled{pointer-events:none}"]}),bt(1,e.Attribute("target")),Ct("design:paramtypes",[e.ElementRef,Object])],t)}(),xo=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[So],exports:[So]})],t)}(),Oo=function(){function t(t){this.host=t,this.currentFont=null}return Object.defineProperty(t.prototype,"datoFont",{set:function(t){this.currentFont!==t&&(this.currentFont&&Wt(this.element,this.currentFont),this.currentFont=t||"simple",this.currentFont.startsWith("dato-")||(this.currentFont="dato-"+this.currentFont),Ut(this.element,this.currentFont))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoFont",null),t=vt([e.Directive({selector:"[datoFont]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),Do=[Oo],Io=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Do],exports:[Do]})],t)}(),To=function(){function t(t,e,n,o,i,r,a,s){this.datoSize=t,this.datoType=e,this.datoCircle=n,this.width=o,this.height=i,this.iconWidth=r,this.iconHeight=a,this.host=s,this._disabled=!1}return Object.defineProperty(t.prototype,"disabled",{set:function(t){this._disabled=!!t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t,e;(this.width||this.height)&&(t=Ft("button",this.host.nativeElement),oe(this.width,this.height,t)),(this.iconWidth||this.iconHeight||this.width||this.height)&&(e=Ft("dato-icon",this.host.nativeElement),oe(this.iconWidth||this.width,this.iconHeight||this.height,e)),this.tabIndex&&(t=t||Ft("button",this.host.nativeElement)).setAttribute("tabindex",this.tabIndex),this.host.nativeElement.hasAttribute("removeIconPadding")&&Vt(e=e||Ft("dato-icon",this.host.nativeElement),"padding","0")},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoType"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoCircle"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["iconWidth"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["iconHeight"]}]},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"disabled",null),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoIcon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoIconColor",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"tabIndex",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],t.prototype,"_disabled",void 0),t=vt([e.Component({selector:"dato-icon-button",template:'<dato-button [disabled]="_disabled" [attr.datoSize]="datoSize" [attr.datoType]="datoType" [attr.datoCircle]="datoCircle" class="dato-icon-button">\n <dato-icon [datoIcon]="datoIcon" [icon]="icon" [datoColor]="datoIconColor"></dato-icon>\n</dato-button>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex}:host dato-icon{padding:3px}:host[datoSize=md] dato-icon{padding:5px}:host[datoSize=sm] dato-icon{padding:2px}:host.disabled{pointer-events:none}"]}),bt(0,e.Attribute("datoSize")),bt(1,e.Attribute("datoType")),bt(2,e.Attribute("datoCircle")),bt(3,e.Attribute("width")),bt(4,e.Attribute("height")),bt(5,e.Attribute("iconWidth")),bt(6,e.Attribute("iconHeight")),Ct("design:paramtypes",[Object,Object,Object,Object,Object,Object,Object,e.ElementRef])],t)}(),Ro=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,Ge,In],declarations:[To],exports:[To,se,Ge]})],t)}();
158
158
  /**
159
159
  * @license
160
160
  * Copyright Datorama. All Rights Reserved.
@@ -162,7 +162,7 @@ Zn=t.COMPARE_RESULT||(t.COMPARE_RESULT={}))[Zn.EXACT=1]="EXACT",Zn[Zn.STARTS_WIT
162
162
  * Use of this source code is governed by an Apache License 2.0 license that can be
163
163
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
164
164
  */
165
- var Ao=function(){function t(t){this.gridApi=t}return Object.defineProperty(t.prototype,"ready",{get:function(){return!Lt(this.gridApi)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridApi",{get:function(){return this._gridApi},set:function(t){this._gridApi=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnApi",{get:function(){return this._columnApi},set:function(t){this._columnApi=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridRef",{get:function(){return this._gridRef},set:function(t){this._gridRef=t},enumerable:!0,configurable:!0}),t.prototype.setSelectedRows=function(t){var e=Z.coerceArray(t);this.gridApi.forEachNode((function(t){var n=e.some((function(e){return e===t.data}));t.isSelected()!==n&&t.setSelected(n)}))},t.prototype.getSelectedRows=function(t){void 0===t&&(t=!1);var e=this.gridApi.getSelectedRows();return t?e.length?e[0]:null:e},t.prototype.setRows=function(t){this.gridApi.setRowData(t),this.gridApi.sizeColumnsToFit()},t.prototype.addRows=function(t,e){void 0===e&&(e=null);var n={add:Z.coerceArray(t)};return Lt(e)||(n.addIndex=e),this.gridApi.updateRowData(n)},t.prototype.updateRows=function(t){var e=Z.coerceArray(t);return this.gridApi.updateRowData({update:e})},t.prototype.updateRowValue=function(t,e,n){this.gridApi.getRowNode(t).setDataValue(e,n)},t.prototype.removeRows=function(t){var e=Z.coerceArray(t);return this.gridApi.updateRowData({remove:e})},t.prototype.removeSelectedRows=function(){var t=this.getSelectedRows();return this.removeRows(t)},t.prototype.clearTable=function(){this.setRows([])},t.prototype.updateColumns=function(t){this._gridRef.updateColumns(t)},t}(),Eo=function(t){function e(e){return t.call(this,e)||this}return ft(e,t),e}(Error);var Po,ko,_o,jo=function(){function t(t){this.translate=t}return t.prototype.normalizeColumns=function(t){return this.translateColumns(t)},t.prototype.updateColumns=function(t,e){if(!e)throw new Eo("No columnDefs were provided.");e=this.normalizeColumns(e),t.setColumnDefs(e)},t.prototype.translateColumns=function(t){var e=this;return t.map((function(t){return mt(mt({},t),{headerName:e.translate.transform(t.headerName)})}))},t.ctorParameters=function(){return[{type:Mn}]},t=vt([e.Injectable(),Ct("design:paramtypes",[Mn])],t)}(),Mo=function(){function t(t,n){this.cdr=t,this.translate=n,this.showFitToContent=!0,this.infinitePagination=!1,this.alignTable=new e.EventEmitter,this.toggleRowGroup=new e.EventEmitter,this.translations={of:this.translate.transform("core.of"),items:this.translate.transform("core.items")},this.MINI_DISPLAY_LENGTH=2,this.DISPLAY_LENGTH=5,this.XS_DISPLAY_SIZE=160,this.SMALL_DISPLAY_SIZE=390,this.disableButtons=null,this.smallVersion=null,this.showCollapseExpand=!1,this.pageNumbersDisplay={currentPage:1,pages:[],showFirstEllipsis:!1,showLastPage:!1}}return Object.defineProperty(t.prototype,"agGridColumnApi",{set:function(t){this.showCollapseExpand=t&&t.getRowGroupColumns().length>=1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"content",{set:function(t){this.navigationElement=t,t&&null===this.smallVersion&&this.calculateNavigationSize()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prevPageDisabled",{get:function(){return!this.infinitePagination&&1===this.pageNumbersDisplay.currentPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextPageDisabled",{get:function(){return!this.infinitePagination&&this.pageNumbersDisplay.currentPage===this.totalPages},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.rowDataChanged.pipe(r.throttleTime(100),i.untilDestroyed(this)).subscribe((function(){return t.initPagination()}))},t.prototype.calculateRowsCount=function(){this.totalPages=this.infinitePagination?this.pageNumbersDisplay.currentPage+1:this.agGridApi.paginationGetTotalPages(),this.rowCount=this.agGridApi.paginationGetRowCount(),this.setRowsDisplayRange(this.pageNumbersDisplay.currentPage),this.cdr.detectChanges()},t.prototype.initPagination=function(t){void 0===t&&(t=0),this.rowsPerPage=this.agGridApi.paginationGetPageSize(),this.calculateRowsCount(),this.pagesInView=this.DISPLAY_LENGTH,this.navigatePage(t)},Object.defineProperty(t.prototype,"pagesInView",{set:function(t){this._pagesInView=t,this.pagesOnSides=Math.floor(this._pagesInView/2),this.pagesFitView=this._pagesInView+1>=this.totalPages,this.pageNumbersDisplay.pages=[]},enumerable:!0,configurable:!0}),t.prototype.calculateNavigationSize=function(){if(this.navigationElement){var t=this.navigationElement.nativeElement.parentElement.clientWidth;this.disableButtons=t<this.XS_DISPLAY_SIZE,t<this.SMALL_DISPLAY_SIZE?this._pagesInView!==this.MINI_DISPLAY_LENGTH&&(this.smallVersion=!0,this.pagesInView=this.MINI_DISPLAY_LENGTH):this._pagesInView!==this.DISPLAY_LENGTH&&(this.smallVersion=!1,this.pagesInView=this.DISPLAY_LENGTH),this.cdr.detectChanges()}},t.prototype.navigatePage=function(t){if(t>=0&&t<=this.totalPages-1){this.agGridApi.paginationGoToPage(t);var e=t+1;this.pageNumbersDisplay.currentPage=e,0!==this.pageNumbersDisplay.pages.length&&this.pagesFitView||(this.pageNumbersDisplay.pages=this.getPages(e)),this.setRowsDisplayRange(e),this.cdr.detectChanges()}},t.prototype.navigateFirstPage=function(){this.infinitePagination?this.agGridApi.paginationGoToFirstPage():this.navigatePage(0)},t.prototype.navigateNextPage=function(){this.infinitePagination?this.agGridApi.paginationGoToNextPage():this.navigatePage(this.pageNumbersDisplay.currentPage)},t.prototype.navigatePrevPage=function(){if(this.infinitePagination)this.agGridApi.paginationGoToPreviousPage();else{var t=this.pageNumbersDisplay.currentPage-2;this.navigatePage(t)}},t.prototype.showNextBatch=function(){var t=this.pageNumbersDisplay.pages[0]+this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.showPreviousBatch=function(){var t=this.pageNumbersDisplay.pages[0]-this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.fitToContainer=function(){this.alignTable.emit(0)},t.prototype.fitToContent=function(){this.alignTable.emit(1)},t.prototype.toggleExpand=function(){this.toggleRowGroup.emit()},t.prototype.trackByFunc=function(t,e){return e},t.prototype.ngOnDestroy=function(){},t.prototype.setRowsDisplayRange=function(t){var e=t-1,n=1+e*this.rowsPerPage,o=(e+1)*this.rowsPerPage,i=this.rowCount>o?o:this.rowCount;this.rowsRange=this.translate.transform("core.itemsRange",{range:n+" - "+i,number:this.rowCount})},t.prototype.getPages=function(t){var e=[];this.pageNumbersDisplay.showLastPage=!this.pagesFitView&&t+this.pagesOnSides<this.totalPages,this.pageNumbersDisplay.showFirstEllipsis=!this.pagesFitView&&t-this.pagesOnSides>1;for(var n=this.getFirstPageNumber(t),o=this.pagesFitView?this.totalPages:this._pagesInView,i=0;i<o;i++)e.push(n+i);return this.smallVersion||e[o-1]+1!==this.totalPages||(e.push(this.totalPages),this.pageNumbersDisplay.showLastPage=!1),e},t.prototype.getFirstPageNumber=function(t){var e=t-this.pagesOnSides;return this.smallVersion&&t>1?t!==this.totalPages&&(e=t):this.pageNumbersDisplay.showFirstEllipsis?this.pageNumbersDisplay.showLastPage||(e=this.totalPages-(this._pagesInView-1)):e=1,e},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn}]},vt([e.Input(),Ct("design:type",lt.GridApi)],t.prototype,"agGridApi",void 0),vt([e.Input(),Ct("design:type",lt.ColumnApi),Ct("design:paramtypes",[lt.ColumnApi])],t.prototype,"agGridColumnApi",null),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"isCollapsed",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showFitToContent",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"infinitePagination",void 0),vt([e.Input(),Ct("design:type",n.Subject)],t.prototype,"rowDataChanged",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],t.prototype,"alignTable",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],t.prototype,"toggleRowGroup",void 0),vt([e.ViewChild("navigation",{static:!0}),Ct("design:type",e.ElementRef),Ct("design:paramtypes",[e.ElementRef])],t.prototype,"content",null),t=vt([e.Component({selector:"dato-grid-pagination",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<div class="d-flex-row d-flex-auto d-flex-wrap container" [class.small]="smallVersion">\n <div *ngIf="totalPages > 1 || infinitePagination" #navigation\n class="navigation d-flex-row d-flex-0-0-auto align-center">\n\n \x3c!-- First Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="mr-4"\n datoIcon="arrow-left-double"\n datoType="secondary"\n datoSize="md"\n [disabled]="prevPageDisabled"\n (click)="navigateFirstPage()">\n </dato-icon-button>\n\n \x3c!-- Previous Page --\x3e\n <dato-icon-button datoIcon="arrow-left" datoType="secondary" datoSize="md"\n [disabled]="prevPageDisabled"\n (click)="navigatePrevPage()">\n </dato-icon-button>\n\n\n <div class="d-flex-row mx-5">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n *ngIf="pageNumbersDisplay.showFirstEllipsis && !smallVersion"\n (click)="showPreviousBatch()">...\n </dato-link>\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n *ngFor="let page of pageNumbersDisplay.pages; trackBy: trackByFunc;"\n [ngClass]="{\'current-page\': page === pageNumbersDisplay.currentPage,\n \'note-bold\': page === pageNumbersDisplay.currentPage}"\n (click)="navigatePage(page - 1)">\n {{page}}\n </dato-link>\n\n <div class="d-flex-row" *ngIf="pageNumbersDisplay.showLastPage && !smallVersion">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n (click)="showNextBatch()">...</dato-link>\n <dato-link *ngIf="!infinitePagination" class="page-number mx-5" datoType="secondary" datoSize="sm"\n (click)="navigatePage(totalPages - 1)">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n \x3c!-- Next Page --\x3e\n <dato-icon-button datoIcon="arrow-right" datoType="secondary" datoSize="md"\n (click)="navigateNextPage()"\n [disabled]="nextPageDisabled">\n </dato-icon-button>\n\n \x3c!-- Last Page --\x3e\n <dato-icon-button *ngIf="!disableButtons && !infinitePagination"\n class="ml-4" datoIcon="arrow-right-double"\n datoType="secondary" datoSize="md"\n [disabled]="nextPageDisabled"\n (click)="navigatePage(totalPages - 1)">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf="totalPages > 1 && !smallVersion"\n class="separator mx-10 my-auto" datoColor="primary-100 background">\n </div>\n\n <div class="total d-flex-0-0-auto d-flex-row align-center">\n <span class="dato-note primary-300-color">{{rowsRange}}</span>\n </div>\n\n</div>\n\n<div class="d-flex-0-0-auto d-flex-row align-center" *ngIf="!smallVersion">\n\n \x3c!-- Expend / Collapse --\x3e\n <dato-icon-button *ngIf="showCollapseExpand"\n [datoIcon]="isCollapsed ? \'expand\' : \'collapse\'"\n class="mr-5"\n datoType="secondary"\n datoSize="md"\n [datoTooltip]="\'grid.\' + (isCollapsed ? \'expand\' : \'collapse\') + \'-rows\'"\n (click)="toggleExpand()">\n </dato-icon-button>\n\n \x3c!-- Fit Columns to Content --\x3e\n <dato-icon-button *ngIf="showFitToContent"\n class="mr-5"\n datoIcon="fit-to-content"\n datoType="secondary"\n datoSize="md"\n datoTooltip="core.fit-to-content"\n (click)="fitToContainer()">\n </dato-icon-button>\n\n \x3c!-- Fit Columns to Container --\x3e\n <dato-icon-button datoIcon="fit-to-container"\n datoType="secondary" datoSize="md"\n datoTooltip="core.fit-to-container"\n (click)="fitToContent()">\n </dato-icon-button>\n\n</div>\n',styles:[":host{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:25px}.navigation .page-number.current-page{transition:color .3s ease-in-out}.navigation .page-number:first-of-type{margin-left:7px}.navigation .page-number:last-of-type{margin-right:7px}.separator{width:1px;height:25px}.container.small .navigation,.container.small .total{margin-top:8px;margin-left:auto;margin-right:auto}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,Mn])],t)}(),Lo={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return No})),multi:!0},No=function(t){function o(o,i,r,a){var s=t.call(this)||this;return s.gridHelper=o,s.element=i,s.iconRegistry=r,s.cdr=a,s.rowDataChanged=new n.Subject,s.hasPagination=!0,s.gridReady=new e.EventEmitter,s.defaultGridOptions={suppressPaginationPanel:!0,pagination:!0,defaultColDef:{sortable:!0,resizable:!0,filter:"agTextColumnFilter",menuTabs:["filterMenuTab"]},rowHeight:35,headerHeight:30,onRowDataChanged:function(t){s.rowDataChanged.next(t)},onRowDataUpdated:function(t){s.rowDataChanged.next(t)},onSelectionChanged:function(t){var e=s.api.getSelectedRows();s.onChange(e)},rowSelection:"multiple",rowDeselection:!0,unSortIcon:!0,animateRows:!0,rememberGroupStateWhenNewData:!0},s.infinitePagination=!1,s.isRowsCollapsed=!0,s.api=new Ao,s.defaultGridOptions.icons={sortAscending:'<span class="da-grid-icon sort-icon"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M0 30.081c0-1.024 0.59-1.921 1.264-1.921h29.474c0.672 0 1.262 0.897 1.262 1.921s-0.59 1.919-1.264 1.919h-29.474c-0.672 0-1.262-0.895-1.262-1.919z"></path><path d="M1.2 15.36h19.999c0.64 0 1.2 0.896 1.2 1.92s-0.561 1.92-1.2 1.92h-19.999c-0.64 0-1.2-0.896-1.2-1.92s0.56-1.92 1.2-1.92z"></path><path d="M1.334 2.56h13.332c0.711 0 1.334 0.896 1.334 1.92s-0.623 1.92-1.334 1.92h-13.332c-0.711-0.002-1.334-0.898-1.334-1.922s0.623-1.918 1.334-1.918z"></path></svg></span>',sortDescending:'<span class="da-grid-icon sort-icon"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><g fill-rule="nonzero"><path d="M0 .6c0 .32.184.6.395.6h9.21c.21 0 .395-.28.395-.6 0-.32-.184-.6-.395-.6H.395C.185 0 0 .28 0 .6zM.375 5.2h6.25c.2 0 .375-.28.375-.6 0-.32-.175-.6-.375-.6H.375C.175 4 0 4.28 0 4.6c0 .32.175.6.375.6zM.417 9.2h4.166c.222 0 .417-.28.417-.6 0-.32-.195-.6-.417-.6H.417C.195 8 0 8.28 0 8.6c0 .32.195.6.417.6z"/></g></svg></span>',sortUnSort:'<span class="da-grid-icon sort-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 19">\n <g fill-rule="evenodd">\n <path stroke-width=".3" d="M5.93109443,17.9423639 C6.13758962,17.9423639 6.30517991,17.7747736 6.30517991,17.5682784 L6.30517991,13.2662954 C6.30517991,13.0598003 6.13758962,12.89221 5.93109443,12.89221 L1.62911144,12.89221 C1.42261626,12.89221 1.25502596,13.0598003 1.25502596,13.2662954 C1.25502596,13.4727906 1.42261626,13.6403809 1.62911144,13.6403809 L5.02131855,13.6403809 L1.55648567,17.1049644 C1.41034294,17.2511071 1.41034294,17.4877786 1.55648567,17.6339213 C1.62955703,17.7069926 1.72507352,17.7431542 1.82059001,17.7431542 C1.91610651,17.7431542 2.01237117,17.7069926 2.08469436,17.6339213 L5.55700895,14.1626042 L5.55700895,17.5682784 C5.55700895,17.7747736 5.72459925,17.9423639 5.93109443,17.9423639 Z" transform="rotate(135 3.78 15.417)"/>\n <path stroke-width=".3" d="M6.05457833,1.93008935 C5.9084356,1.78394663 5.6715148,1.78394663 5.52562147,1.93008935 L2.02188369,5.43382713 L2.02188369,2.03488648 C2.02188369,1.8283913 1.8542934,1.660801 1.64779821,1.660801 C1.44130303,1.660801 1.27371274,1.8283913 1.27371274,2.03488648 L1.27371274,6.33686947 C1.27371274,6.54336465 1.44130303,6.71095495 1.64779821,6.71095495 L5.94978121,6.71095495 C6.15627639,6.71095495 6.32386668,6.54336465 6.32386668,6.33686947 C6.32386668,6.13037429 6.15627639,5.96278399 5.94978121,5.96278399 L2.55084056,5.96278399 L6.05457833,2.45829805 C6.20072106,2.31315288 6.20072106,2.07523452 6.05457833,1.93008935 Z" transform="rotate(135 3.799 4.186)"/>\n </g>\n </svg></span>',filter:'<span class="da-grid-icon filter-icon active"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13">\n <path fill-rule="nonzero" d="M1.4 1l4.079 6.57a.5.5 0 0 1 .075.263V12h2V7.833a.5.5 0 0 1 .072-.26L11.612 1H1.4zm3.154 6.976L.076.764A.5.5 0 0 1 .501 0h11.998a.5.5 0 0 1 .428.76L8.554 7.972V12.5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V7.976z"/>\n </svg></span>',menu:'<span class="da-grid-icon menu-icon"><svg viewBox="0 0 4 18" xmlns="http://www.w3.org/2000/svg"><g><path fill-rule="evenodd" d="M2,3.5A1.5,1.5,0,1,0,.5,2,1.5,1.5,0,0,0,2,3.5Zm0,4A1.5,1.5,0,1,0,3.5,9,1.5,1.5,0,0,0,2,7.5Zm0,7A1.5,1.5,0,1,0,3.5,16,1.5,1.5,0,0,0,2,14.5Z"/></g></svg></span>',columns:'<span class="da-grid-icon columns-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 14"><defs><style>.\\35 6e72ebd-313d-4e34-8347-a1f70fc57a3a{fill-rule:evenodd;}</style></defs><g><path class="56e72ebd-313d-4e34-8347-a1f70fc57a3a" d="M4,0.5H2a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1H4a1,1,0,0,0,1-1v-1A1,1,0,0,0,4,.5Zm6,0H8a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,10,.5Zm6,0H14a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,16,.5ZM4,5.5H2a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1H4a1,1,0,0,0,1-1v-1A1,1,0,0,0,4,5.5Zm6,0H8a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,10,5.5Zm6,0H14a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,16,5.5Zm-12,5H2a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1H4a1,1,0,0,0,1-1v-1A1,1,0,0,0,4,10.5Zm6,0H8a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,10,10.5Zm6,0H14a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,16,10.5Z"/></g></svg></span>',groupExpanded:'<span class="da-grid-icon pointer group-expanded-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 10"><path d="M0.92,9.41A0.5,0.5,0,0,1,.57,8.56L4.23,5,0.57,1.46A0.5,0.5,0,1,1,1.27.74l4,3.91a0.5,0.5,0,0,1,0,.72l-4,3.91A0.5,0.5,0,0,1,.92,9.41Z"/></svg></span>',groupContracted:'<span class="da-grid-icon pointer group-contracted-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 10"><path d="M0.92,9.41A0.5,0.5,0,0,1,.57,8.56L4.23,5,0.57,1.46A0.5,0.5,0,1,1,1.27.74l4,3.91a0.5,0.5,0,0,1,0,.72l-4,3.91A0.5,0.5,0,0,1,.92,9.41Z"/></svg></span>'},s.gridOptions=mt({},s.defaultGridOptions),s}return ft(o,t),Object.defineProperty(o.prototype,"options",{get:function(){return this.gridOptions},set:function(t){t.columnDefs=this.gridHelper.normalizeColumns(t.columnDefs),this.gridOptions=mt(mt(mt({},this.defaultGridOptions),t),{defaultColDef:mt(mt({},this.defaultGridOptions.defaultColDef),t.defaultColDef||{})}),this.gridOptions.suppressRowClickSelection||(this.gridOptions.rowClass="selectable"),this.hasPagination=this.gridOptions.pagination,(this.hasPagination?Ut:Wt)(this.hostElement,"grid-pagination"),"infinite"!==this.gridOptions.rowModelType&&"serverSide"!==this.gridOptions.rowModelType||(this.infinitePagination=!0)},enumerable:!0,configurable:!0}),o.prototype.ngOnDestroy=function(){this.rowDataChanged.complete()},o.prototype.onGridReady=function(t){var e=this;this.api.gridApi=t.api,this.gridColumnApi=t.columnApi,this.gridColumnApi.getRowGroupColumns().length>=1&&(this.gridComponent.rowGroupOpened.pipe(i.untilDestroyed(this)).subscribe((function(t){return e.rowGroupStateChange(t)})),this.paginationComponent&&this.paginationComponent.toggleRowGroup.pipe(i.untilDestroyed(this)).subscribe((function(){return e.toggleCollapseState()}))),this.cdr.detectChanges(),this.gridReady.emit(t)},o.prototype.alignTable=function(t){0===t?this.fitToContainer():this.fitToContent()},o.prototype.updateColumns=function(t){this.gridHelper.updateColumns(this.api.gridApi,t)},o.prototype.writeValue=function(t){var e=this,o=t?Z.coerceArray(t):[];this.api.ready?this.api.setSelectedRows(o):n.combineLatest(this.rowDataChanged,this.gridReady).pipe(r.take(1),i.untilDestroyed(this)).subscribe((function(){return e.api.setSelectedRows(o)}))},o.prototype.fitToContainer=function(){this.gridOptions.api.sizeColumnsToFit()},o.prototype.fitToContent=function(){this.gridOptions.columnApi.autoSizeAllColumns();var t=this.hostElement.getBoundingClientRect().width,e=this.hostElement.querySelector(".ag-body-container");t>(e?e.clientWidth:0)&&this.fitToContainer()},o.prototype.rowGroupStateChange=function(t){if(0===t.node.rowGroupIndex){var e=!0;t.api.forEachNode((function(t){0===t.rowGroupIndex&&t.expanded&&(e=!1)})),this.isRowsCollapsed=e,this.paginationComponent.initPagination()}},o.prototype.toggleCollapseState=function(){this.isRowsCollapsed?this.api.gridApi.expandAll():this.api.gridApi.collapseAll(),this.isRowsCollapsed=!this.isRowsCollapsed,this.paginationComponent.initPagination()},Object.defineProperty(o.prototype,"hostElement",{get:function(){return this.element.nativeElement},enumerable:!0,configurable:!0}),o.prototype.hideMenuIcon=function(){Wt(this.activeMenu,"menu-active"),this.activeMenu=null},o.ctorParameters=function(){return[{type:jo},{type:e.ElementRef},{type:Le},{type:e.ChangeDetectorRef}]},vt([e.ViewChild(st.AgGridAngular,{static:!0}),Ct("design:type",st.AgGridAngular)],o.prototype,"gridComponent",void 0),vt([e.ViewChild(Mo,{static:!0}),Ct("design:type",Mo)],o.prototype,"paginationComponent",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],o.prototype,"options",null),vt([e.Output(),Ct("design:type",Object)],o.prototype,"gridReady",void 0),o=vt([e.Component({selector:"dato-grid",template:'<ag-grid-angular class="ag-dato-core ag-theme-material"\n [gridOptions]="gridOptions"\n multiSortKey="ctrl"\n (gridReady)="onGridReady($event)">\n</ag-grid-angular>\n<dato-grid-pagination *ngIf="hasPagination"\n class="d-flex-row flex-0-0-100"\n (alignTable)="alignTable($event)"\n [isCollapsed]="isRowsCollapsed"\n [rowDataChanged]="rowDataChanged"\n [agGridApi]="api.gridApi"\n [agGridColumnApi]="gridColumnApi"\n [infinitePagination]="infinitePagination">\n</dato-grid-pagination>\n\n\n\x3c!--<dato-grid-container> /// store, query--\x3e\n\x3c!-- <dato-toolbar>--\x3e\n\x3c!-- <dato-toolbar-item [action]="delete"></dato-toolbar-item>--\x3e\n\x3c!-- <dato-toolbar-more>--\x3e\n\x3c!-- <dato-toolbar-item></dato-toolbar-item>--\x3e\n\x3c!-- </dato-toolbar-more>--\x3e\n\x3c!-- </dato-toolbar>--\x3e\n\n\x3c!-- <dato-grid options="["></dato-grid>--\x3e\n\x3c!--</dato-grid-container>--\x3e\n\n\x3c!--@ViewChild(DatoGridcontainer) container: DatoGridcontainer;--\x3e\n\n\x3c!--this.container.query.getSelctec()--\x3e\n\x3c!--this.container.gridReady.subscribe()--\x3e\n\n\x3c!--delete(){--\x3e\n\n\x3c!--sercer.call().sub(() => )--\x3e\n\x3c!--}--\x3e',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,providers:[Lo],styles:["dato-grid{display:block;width:100%;height:100%;overflow:hidden}dato-grid.grid-pagination{padding-bottom:0;display:flex;flex-direction:column}dato-grid.grid-pagination ag-grid-angular{margin-bottom:7px;height:calc(100% - 32px)}.ag-dato-core{width:100%;height:100%}.ag-dato-core .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle}.ag-dato-core .ag-menu .da-grid-icon svg{vertical-align:middle}.ag-dato-core .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}.ag-dato-core .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}.ag-dato-core .sort-icon svg{width:14px;height:16px}.ag-dato-core .filter-icon svg{width:13px}.ag-dato-core .menu-icon svg{width:4px;height:14px}.ag-dato-core .menu-auto-size-icon svg,.ag-dato-core .menu-group-icon,.ag-dato-core .menu-pin-icon,.ag-dato-core .menu-un-group-icon{width:16px;height:16px}.ag-dato-core .menu-check-icon svg{width:15px;height:18px}.ag-dato-core .group-contracted-icon,.ag-dato-core .group-expanded-icon{width:7px}.ag-dato-core .group-expanded-icon{transform:rotate(90deg)}"]}),Ct("design:paramtypes",[jo,e.ElementRef,Le,e.ChangeDetectorRef])],o)}(Dt),Fo=function(){function t(){}return Object.defineProperty(t.prototype,"grid",{set:function(t){this.rowCount||(this.rowCount=t.rowDataChanged.pipe(i.untilDestroyed(this)).pipe(r.map((function(t){return t.api.getDisplayedRowCount()}))))},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){},vt([e.Input(),Ct("design:type",No),Ct("design:paramtypes",[No])],t.prototype,"grid",null),t=vt([e.Component({selector:"dato-grid-header",template:'<div class="d-flex-row justify-between items-center">\n <p class="dato-headline">\n <ng-content></ng-content>\n <span>({{rowCount | async}})</span>\n </p>\n \x3c!--walk-me--\x3e\n</div>',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[""]})],t)}();
165
+ var Ao=function(){function t(t){this.gridApi=t}return Object.defineProperty(t.prototype,"ready",{get:function(){return!Lt(this.gridApi)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridApi",{get:function(){return this._gridApi},set:function(t){this._gridApi=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnApi",{get:function(){return this._columnApi},set:function(t){this._columnApi=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridRef",{get:function(){return this._gridRef},set:function(t){this._gridRef=t},enumerable:!0,configurable:!0}),t.prototype.setSelectedRows=function(t){var e=Z.coerceArray(t);this.gridApi.forEachNode((function(t){var n=e.some((function(e){return e===t.data}));t.isSelected()!==n&&t.setSelected(n)}))},t.prototype.getSelectedRows=function(t){void 0===t&&(t=!1);var e=this.gridApi.getSelectedRows();return t?e.length?e[0]:null:e},t.prototype.setRows=function(t){this.gridApi.setRowData(t),this.gridApi.sizeColumnsToFit()},t.prototype.addRows=function(t,e){void 0===e&&(e=null);var n={add:Z.coerceArray(t)};return Lt(e)||(n.addIndex=e),this.gridApi.updateRowData(n)},t.prototype.updateRows=function(t){var e=Z.coerceArray(t);return this.gridApi.updateRowData({update:e})},t.prototype.updateRowValue=function(t,e,n){this.gridApi.getRowNode(t).setDataValue(e,n)},t.prototype.removeRows=function(t){var e=Z.coerceArray(t);return this.gridApi.updateRowData({remove:e})},t.prototype.removeSelectedRows=function(){var t=this.getSelectedRows();return this.removeRows(t)},t.prototype.clearTable=function(){this.setRows([])},t.prototype.updateColumns=function(t){this._gridRef.updateColumns(t)},t}(),Eo=function(t){function e(e){return t.call(this,e)||this}return ft(e,t),e}(Error);var Po,ko,_o,jo=function(){function t(t){this.translate=t}return t.prototype.normalizeColumns=function(t){return this.translateColumns(t)},t.prototype.updateColumns=function(t,e){if(!e)throw new Eo("No columnDefs were provided.");e=this.normalizeColumns(e),t.setColumnDefs(e)},t.prototype.translateColumns=function(t){var e=this;return t.map((function(t){return mt(mt({},t),{headerName:e.translate.transform(t.headerName)})}))},t.ctorParameters=function(){return[{type:Mn}]},t=vt([e.Injectable(),Ct("design:paramtypes",[Mn])],t)}(),Mo=function(){function t(t,n){this.cdr=t,this.translate=n,this.showFitToContent=!0,this.infinitePagination=!1,this.alignTable=new e.EventEmitter,this.toggleRowGroup=new e.EventEmitter,this.translations={of:this.translate.transform("core.of"),items:this.translate.transform("core.items")},this.MINI_DISPLAY_LENGTH=2,this.DISPLAY_LENGTH=5,this.XS_DISPLAY_SIZE=160,this.SMALL_DISPLAY_SIZE=390,this.disableButtons=null,this.smallVersion=null,this.showCollapseExpand=!1,this.pageNumbersDisplay={currentPage:1,pages:[],showFirstEllipsis:!1,showLastPage:!1}}return Object.defineProperty(t.prototype,"agGridColumnApi",{set:function(t){this.showCollapseExpand=t&&t.getRowGroupColumns().length>=1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"content",{set:function(t){this.navigationElement=t,t&&null===this.smallVersion&&this.calculateNavigationSize()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prevPageDisabled",{get:function(){return!this.infinitePagination&&1===this.pageNumbersDisplay.currentPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextPageDisabled",{get:function(){return!this.infinitePagination&&this.pageNumbersDisplay.currentPage===this.totalPages},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.rowDataChanged.pipe(r.throttleTime(100),i.untilDestroyed(this)).subscribe((function(){return t.initPagination()}))},t.prototype.calculateRowsCount=function(){this.totalPages=this.infinitePagination?this.pageNumbersDisplay.currentPage+1:this.agGridApi.paginationGetTotalPages(),this.rowCount=this.agGridApi.paginationGetRowCount(),this.setRowsDisplayRange(this.pageNumbersDisplay.currentPage),this.cdr.detectChanges()},t.prototype.initPagination=function(t){void 0===t&&(t=0),this.rowsPerPage=this.agGridApi.paginationGetPageSize(),this.calculateRowsCount(),this.pagesInView=this.DISPLAY_LENGTH,this.navigatePage(t)},Object.defineProperty(t.prototype,"pagesInView",{set:function(t){this._pagesInView=t,this.pagesOnSides=Math.floor(this._pagesInView/2),this.pagesFitView=this._pagesInView+1>=this.totalPages,this.pageNumbersDisplay.pages=[]},enumerable:!0,configurable:!0}),t.prototype.calculateNavigationSize=function(){if(this.navigationElement){var t=this.navigationElement.nativeElement.parentElement.clientWidth;this.disableButtons=t<this.XS_DISPLAY_SIZE,t<this.SMALL_DISPLAY_SIZE?this._pagesInView!==this.MINI_DISPLAY_LENGTH&&(this.smallVersion=!0,this.pagesInView=this.MINI_DISPLAY_LENGTH):this._pagesInView!==this.DISPLAY_LENGTH&&(this.smallVersion=!1,this.pagesInView=this.DISPLAY_LENGTH),this.cdr.detectChanges()}},t.prototype.navigatePage=function(t){if(t>=0&&t<=this.totalPages-1){this.agGridApi.paginationGoToPage(t);var e=t+1;this.pageNumbersDisplay.currentPage=e,0!==this.pageNumbersDisplay.pages.length&&this.pagesFitView||(this.pageNumbersDisplay.pages=this.getPages(e)),this.setRowsDisplayRange(e),this.cdr.detectChanges()}},t.prototype.navigateFirstPage=function(){this.infinitePagination?this.agGridApi.paginationGoToFirstPage():this.navigatePage(0)},t.prototype.navigateNextPage=function(){this.infinitePagination?this.agGridApi.paginationGoToNextPage():this.navigatePage(this.pageNumbersDisplay.currentPage)},t.prototype.navigatePrevPage=function(){if(this.infinitePagination)this.agGridApi.paginationGoToPreviousPage();else{var t=this.pageNumbersDisplay.currentPage-2;this.navigatePage(t)}},t.prototype.showNextBatch=function(){var t=this.pageNumbersDisplay.pages[0]+this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.showPreviousBatch=function(){var t=this.pageNumbersDisplay.pages[0]-this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.fitToContainer=function(){this.alignTable.emit(0)},t.prototype.fitToContent=function(){this.alignTable.emit(1)},t.prototype.toggleExpand=function(){this.toggleRowGroup.emit()},t.prototype.trackByFunc=function(t,e){return e},t.prototype.ngOnDestroy=function(){},t.prototype.setRowsDisplayRange=function(t){var e=t-1,n=1+e*this.rowsPerPage,o=(e+1)*this.rowsPerPage,i=this.rowCount>o?o:this.rowCount;this.rowsRange=this.translate.transform("core.itemsRange",{range:n+" - "+i,number:this.rowCount})},t.prototype.getPages=function(t){var e=[];this.pageNumbersDisplay.showLastPage=!this.pagesFitView&&t+this.pagesOnSides<this.totalPages,this.pageNumbersDisplay.showFirstEllipsis=!this.pagesFitView&&t-this.pagesOnSides>1;for(var n=this.getFirstPageNumber(t),o=this.pagesFitView?this.totalPages:this._pagesInView,i=0;i<o;i++)e.push(n+i);return this.smallVersion||e[o-1]+1!==this.totalPages||(e.push(this.totalPages),this.pageNumbersDisplay.showLastPage=!1),e},t.prototype.getFirstPageNumber=function(t){var e=t-this.pagesOnSides;return this.smallVersion&&t>1?t!==this.totalPages&&(e=t):this.pageNumbersDisplay.showFirstEllipsis?this.pageNumbersDisplay.showLastPage||(e=this.totalPages-(this._pagesInView-1)):e=1,e},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn}]},vt([e.Input(),Ct("design:type",lt.GridApi)],t.prototype,"agGridApi",void 0),vt([e.Input(),Ct("design:type",lt.ColumnApi),Ct("design:paramtypes",[lt.ColumnApi])],t.prototype,"agGridColumnApi",null),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"isCollapsed",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showFitToContent",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"infinitePagination",void 0),vt([e.Input(),Ct("design:type",n.Subject)],t.prototype,"rowDataChanged",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],t.prototype,"alignTable",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],t.prototype,"toggleRowGroup",void 0),vt([e.ViewChild("navigation",{static:!0}),Ct("design:type",e.ElementRef),Ct("design:paramtypes",[e.ElementRef])],t.prototype,"content",null),t=vt([e.Component({selector:"dato-grid-pagination",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<div class="d-flex-row d-flex-auto d-flex-wrap container" [class.small]="smallVersion">\n <div *ngIf="totalPages > 1 || infinitePagination" #navigation\n class="navigation d-flex-row d-flex-0-0-auto align-center">\n\n \x3c!-- First Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="mr-4"\n datoIcon="arrow-left-double"\n datoType="secondary"\n datoSize="md"\n [disabled]="prevPageDisabled"\n (click)="navigateFirstPage()">\n </dato-icon-button>\n\n \x3c!-- Previous Page --\x3e\n <dato-icon-button datoIcon="arrow-left" datoType="secondary" datoSize="md"\n [disabled]="prevPageDisabled"\n (click)="navigatePrevPage()">\n </dato-icon-button>\n\n\n <div class="d-flex-row mx-5">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n *ngIf="pageNumbersDisplay.showFirstEllipsis && !smallVersion"\n (click)="showPreviousBatch()">...\n </dato-link>\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n *ngFor="let page of pageNumbersDisplay.pages; trackBy: trackByFunc;"\n [ngClass]="{\'current-page\': page === pageNumbersDisplay.currentPage,\n \'note-bold\': page === pageNumbersDisplay.currentPage}"\n (click)="navigatePage(page - 1)">\n {{page}}\n </dato-link>\n\n <div class="d-flex-row" *ngIf="pageNumbersDisplay.showLastPage && !smallVersion">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n (click)="showNextBatch()">...</dato-link>\n <dato-link *ngIf="!infinitePagination" class="page-number mx-5" datoType="secondary" datoSize="sm"\n (click)="navigatePage(totalPages - 1)">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n \x3c!-- Next Page --\x3e\n <dato-icon-button datoIcon="arrow-right" datoType="secondary" datoSize="md"\n (click)="navigateNextPage()"\n [disabled]="nextPageDisabled">\n </dato-icon-button>\n\n \x3c!-- Last Page --\x3e\n <dato-icon-button *ngIf="!disableButtons && !infinitePagination"\n class="ml-4" datoIcon="arrow-right-double"\n datoType="secondary" datoSize="md"\n [disabled]="nextPageDisabled"\n (click)="navigatePage(totalPages - 1)">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf="totalPages > 1 && !smallVersion"\n class="separator mx-10 my-auto" datoColor="primary-100 background">\n </div>\n\n <div class="total d-flex-0-0-auto d-flex-row align-center">\n <span class="dato-note primary-300-color">{{rowsRange}}</span>\n </div>\n\n</div>\n\n<div class="d-flex-0-0-auto d-flex-row align-center" *ngIf="!smallVersion">\n\n \x3c!-- Expend / Collapse --\x3e\n <dato-icon-button *ngIf="showCollapseExpand"\n [datoIcon]="isCollapsed ? \'expand\' : \'collapse\'"\n class="mr-5"\n datoType="secondary"\n datoSize="md"\n [datoTooltip]="\'grid.\' + (isCollapsed ? \'expand\' : \'collapse\') + \'-rows\'"\n (click)="toggleExpand()">\n </dato-icon-button>\n\n \x3c!-- Fit Columns to Content --\x3e\n <dato-icon-button *ngIf="showFitToContent"\n class="mr-5"\n datoIcon="fit-to-content"\n datoType="secondary"\n datoSize="md"\n datoTooltip="core.fit-to-content"\n (click)="fitToContainer()">\n </dato-icon-button>\n\n \x3c!-- Fit Columns to Container --\x3e\n <dato-icon-button datoIcon="fit-to-container"\n datoType="secondary" datoSize="md"\n datoTooltip="core.fit-to-container"\n (click)="fitToContent()">\n </dato-icon-button>\n\n</div>\n',styles:[":host{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:25px}.navigation .page-number.current-page{transition:color .3s ease-in-out}.navigation .page-number:first-of-type{margin-left:7px}.navigation .page-number:last-of-type{margin-right:7px}.separator{width:1px;height:25px}.container.small .navigation,.container.small .total{margin-top:8px;margin-left:auto;margin-right:auto}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,Mn])],t)}(),Lo={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return No})),multi:!0},No=function(t){function o(o,i,r,a){var s=t.call(this)||this;return s.gridHelper=o,s.element=i,s.iconRegistry=r,s.cdr=a,s.rowDataChanged=new n.Subject,s.hasPagination=!0,s.gridReady=new e.EventEmitter,s.defaultGridOptions={suppressPaginationPanel:!0,pagination:!0,defaultColDef:{sortable:!0,resizable:!0,filter:"agTextColumnFilter",menuTabs:["filterMenuTab"]},rowHeight:35,headerHeight:30,onRowDataChanged:function(t){s.rowDataChanged.next(t)},onRowDataUpdated:function(t){s.rowDataChanged.next(t)},onSelectionChanged:function(t){var e=s.api.getSelectedRows();s.onChange(e)},rowSelection:"multiple",unSortIcon:!0,animateRows:!0},s.infinitePagination=!1,s.isRowsCollapsed=!0,s.api=new Ao,s.defaultGridOptions.icons={sortAscending:'<span class="da-grid-icon sort-icon"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M0 30.081c0-1.024 0.59-1.921 1.264-1.921h29.474c0.672 0 1.262 0.897 1.262 1.921s-0.59 1.919-1.264 1.919h-29.474c-0.672 0-1.262-0.895-1.262-1.919z"></path><path d="M1.2 15.36h19.999c0.64 0 1.2 0.896 1.2 1.92s-0.561 1.92-1.2 1.92h-19.999c-0.64 0-1.2-0.896-1.2-1.92s0.56-1.92 1.2-1.92z"></path><path d="M1.334 2.56h13.332c0.711 0 1.334 0.896 1.334 1.92s-0.623 1.92-1.334 1.92h-13.332c-0.711-0.002-1.334-0.898-1.334-1.922s0.623-1.918 1.334-1.918z"></path></svg></span>',sortDescending:'<span class="da-grid-icon sort-icon"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><g fill-rule="nonzero"><path d="M0 .6c0 .32.184.6.395.6h9.21c.21 0 .395-.28.395-.6 0-.32-.184-.6-.395-.6H.395C.185 0 0 .28 0 .6zM.375 5.2h6.25c.2 0 .375-.28.375-.6 0-.32-.175-.6-.375-.6H.375C.175 4 0 4.28 0 4.6c0 .32.175.6.375.6zM.417 9.2h4.166c.222 0 .417-.28.417-.6 0-.32-.195-.6-.417-.6H.417C.195 8 0 8.28 0 8.6c0 .32.195.6.417.6z"/></g></svg></span>',sortUnSort:'<span class="da-grid-icon sort-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 19">\n <g fill-rule="evenodd">\n <path stroke-width=".3" d="M5.93109443,17.9423639 C6.13758962,17.9423639 6.30517991,17.7747736 6.30517991,17.5682784 L6.30517991,13.2662954 C6.30517991,13.0598003 6.13758962,12.89221 5.93109443,12.89221 L1.62911144,12.89221 C1.42261626,12.89221 1.25502596,13.0598003 1.25502596,13.2662954 C1.25502596,13.4727906 1.42261626,13.6403809 1.62911144,13.6403809 L5.02131855,13.6403809 L1.55648567,17.1049644 C1.41034294,17.2511071 1.41034294,17.4877786 1.55648567,17.6339213 C1.62955703,17.7069926 1.72507352,17.7431542 1.82059001,17.7431542 C1.91610651,17.7431542 2.01237117,17.7069926 2.08469436,17.6339213 L5.55700895,14.1626042 L5.55700895,17.5682784 C5.55700895,17.7747736 5.72459925,17.9423639 5.93109443,17.9423639 Z" transform="rotate(135 3.78 15.417)"/>\n <path stroke-width=".3" d="M6.05457833,1.93008935 C5.9084356,1.78394663 5.6715148,1.78394663 5.52562147,1.93008935 L2.02188369,5.43382713 L2.02188369,2.03488648 C2.02188369,1.8283913 1.8542934,1.660801 1.64779821,1.660801 C1.44130303,1.660801 1.27371274,1.8283913 1.27371274,2.03488648 L1.27371274,6.33686947 C1.27371274,6.54336465 1.44130303,6.71095495 1.64779821,6.71095495 L5.94978121,6.71095495 C6.15627639,6.71095495 6.32386668,6.54336465 6.32386668,6.33686947 C6.32386668,6.13037429 6.15627639,5.96278399 5.94978121,5.96278399 L2.55084056,5.96278399 L6.05457833,2.45829805 C6.20072106,2.31315288 6.20072106,2.07523452 6.05457833,1.93008935 Z" transform="rotate(135 3.799 4.186)"/>\n </g>\n </svg></span>',filter:'<span class="da-grid-icon filter-icon active"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13">\n <path fill-rule="nonzero" d="M1.4 1l4.079 6.57a.5.5 0 0 1 .075.263V12h2V7.833a.5.5 0 0 1 .072-.26L11.612 1H1.4zm3.154 6.976L.076.764A.5.5 0 0 1 .501 0h11.998a.5.5 0 0 1 .428.76L8.554 7.972V12.5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V7.976z"/>\n </svg></span>',menu:'<span class="da-grid-icon menu-icon"><svg viewBox="0 0 4 18" xmlns="http://www.w3.org/2000/svg"><g><path fill-rule="evenodd" d="M2,3.5A1.5,1.5,0,1,0,.5,2,1.5,1.5,0,0,0,2,3.5Zm0,4A1.5,1.5,0,1,0,3.5,9,1.5,1.5,0,0,0,2,7.5Zm0,7A1.5,1.5,0,1,0,3.5,16,1.5,1.5,0,0,0,2,14.5Z"/></g></svg></span>',columns:'<span class="da-grid-icon columns-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 14"><defs><style>.\\35 6e72ebd-313d-4e34-8347-a1f70fc57a3a{fill-rule:evenodd;}</style></defs><g><path class="56e72ebd-313d-4e34-8347-a1f70fc57a3a" d="M4,0.5H2a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1H4a1,1,0,0,0,1-1v-1A1,1,0,0,0,4,.5Zm6,0H8a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,10,.5Zm6,0H14a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,16,.5ZM4,5.5H2a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1H4a1,1,0,0,0,1-1v-1A1,1,0,0,0,4,5.5Zm6,0H8a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,10,5.5Zm6,0H14a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,16,5.5Zm-12,5H2a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1H4a1,1,0,0,0,1-1v-1A1,1,0,0,0,4,10.5Zm6,0H8a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,10,10.5Zm6,0H14a1,1,0,0,0-1,1v1a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1v-1A1,1,0,0,0,16,10.5Z"/></g></svg></span>',groupExpanded:'<span class="da-grid-icon pointer group-expanded-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 10"><path d="M0.92,9.41A0.5,0.5,0,0,1,.57,8.56L4.23,5,0.57,1.46A0.5,0.5,0,1,1,1.27.74l4,3.91a0.5,0.5,0,0,1,0,.72l-4,3.91A0.5,0.5,0,0,1,.92,9.41Z"/></svg></span>',groupContracted:'<span class="da-grid-icon pointer group-contracted-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 10"><path d="M0.92,9.41A0.5,0.5,0,0,1,.57,8.56L4.23,5,0.57,1.46A0.5,0.5,0,1,1,1.27.74l4,3.91a0.5,0.5,0,0,1,0,.72l-4,3.91A0.5,0.5,0,0,1,.92,9.41Z"/></svg></span>'},s.gridOptions=mt({},s.defaultGridOptions),s}return ft(o,t),Object.defineProperty(o.prototype,"options",{get:function(){return this.gridOptions},set:function(t){t.columnDefs=this.gridHelper.normalizeColumns(t.columnDefs),this.gridOptions=mt(mt(mt({},this.defaultGridOptions),t),{defaultColDef:mt(mt({},this.defaultGridOptions.defaultColDef),t.defaultColDef||{})}),this.gridOptions.suppressRowClickSelection||(this.gridOptions.rowClass="selectable"),this.hasPagination=this.gridOptions.pagination,(this.hasPagination?Ut:Wt)(this.hostElement,"grid-pagination"),"infinite"!==this.gridOptions.rowModelType&&"serverSide"!==this.gridOptions.rowModelType||(this.infinitePagination=!0)},enumerable:!0,configurable:!0}),o.prototype.ngOnDestroy=function(){this.rowDataChanged.complete()},o.prototype.onGridReady=function(t){var e=this;this.api.gridApi=t.api,this.gridColumnApi=t.columnApi,this.gridColumnApi.getRowGroupColumns().length>=1&&(this.gridComponent.rowGroupOpened.pipe(i.untilDestroyed(this)).subscribe((function(t){return e.rowGroupStateChange(t)})),this.paginationComponent&&this.paginationComponent.toggleRowGroup.pipe(i.untilDestroyed(this)).subscribe((function(){return e.toggleCollapseState()}))),this.cdr.detectChanges(),this.gridReady.emit(t)},o.prototype.alignTable=function(t){0===t?this.fitToContainer():this.fitToContent()},o.prototype.updateColumns=function(t){this.gridHelper.updateColumns(this.api.gridApi,t)},o.prototype.writeValue=function(t){var e=this,o=t?Z.coerceArray(t):[];this.api.ready?this.api.setSelectedRows(o):n.combineLatest(this.rowDataChanged,this.gridReady).pipe(r.take(1),i.untilDestroyed(this)).subscribe((function(){return e.api.setSelectedRows(o)}))},o.prototype.fitToContainer=function(){this.gridOptions.api.sizeColumnsToFit()},o.prototype.fitToContent=function(){this.gridOptions.columnApi.autoSizeAllColumns();var t=this.hostElement.getBoundingClientRect().width,e=this.hostElement.querySelector(".ag-body-container");t>(e?e.clientWidth:0)&&this.fitToContainer()},o.prototype.rowGroupStateChange=function(t){if(0===t.node.rowGroupIndex){var e=!0;t.api.forEachNode((function(t){0===t.rowGroupIndex&&t.expanded&&(e=!1)})),this.isRowsCollapsed=e,this.paginationComponent.initPagination()}},o.prototype.toggleCollapseState=function(){this.isRowsCollapsed?this.api.gridApi.expandAll():this.api.gridApi.collapseAll(),this.isRowsCollapsed=!this.isRowsCollapsed,this.paginationComponent.initPagination()},Object.defineProperty(o.prototype,"hostElement",{get:function(){return this.element.nativeElement},enumerable:!0,configurable:!0}),o.prototype.hideMenuIcon=function(){Wt(this.activeMenu,"menu-active"),this.activeMenu=null},o.ctorParameters=function(){return[{type:jo},{type:e.ElementRef},{type:Le},{type:e.ChangeDetectorRef}]},vt([e.ViewChild(st.AgGridAngular,{static:!0}),Ct("design:type",st.AgGridAngular)],o.prototype,"gridComponent",void 0),vt([e.ViewChild(Mo,{static:!0}),Ct("design:type",Mo)],o.prototype,"paginationComponent",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],o.prototype,"options",null),vt([e.Output(),Ct("design:type",Object)],o.prototype,"gridReady",void 0),o=vt([e.Component({selector:"dato-grid",template:'<ag-grid-angular class="ag-dato-core ag-theme-material"\n [gridOptions]="gridOptions"\n multiSortKey="ctrl"\n (gridReady)="onGridReady($event)">\n</ag-grid-angular>\n<dato-grid-pagination *ngIf="hasPagination"\n class="d-flex-row flex-0-0-100"\n (alignTable)="alignTable($event)"\n [isCollapsed]="isRowsCollapsed"\n [rowDataChanged]="rowDataChanged"\n [agGridApi]="api.gridApi"\n [agGridColumnApi]="gridColumnApi"\n [infinitePagination]="infinitePagination">\n</dato-grid-pagination>\n\n\n\x3c!--<dato-grid-container> /// store, query--\x3e\n\x3c!-- <dato-toolbar>--\x3e\n\x3c!-- <dato-toolbar-item [action]="delete"></dato-toolbar-item>--\x3e\n\x3c!-- <dato-toolbar-more>--\x3e\n\x3c!-- <dato-toolbar-item></dato-toolbar-item>--\x3e\n\x3c!-- </dato-toolbar-more>--\x3e\n\x3c!-- </dato-toolbar>--\x3e\n\n\x3c!-- <dato-grid options="["></dato-grid>--\x3e\n\x3c!--</dato-grid-container>--\x3e\n\n\x3c!--@ViewChild(DatoGridcontainer) container: DatoGridcontainer;--\x3e\n\n\x3c!--this.container.query.getSelctec()--\x3e\n\x3c!--this.container.gridReady.subscribe()--\x3e\n\n\x3c!--delete(){--\x3e\n\n\x3c!--sercer.call().sub(() => )--\x3e\n\x3c!--}--\x3e',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,providers:[Lo],styles:["dato-grid{display:block;width:100%;height:100%;overflow:hidden}dato-grid.grid-pagination{padding-bottom:0;display:flex;flex-direction:column}dato-grid.grid-pagination ag-grid-angular{margin-bottom:7px;height:calc(100% - 32px)}.ag-dato-core{width:100%;height:100%}.ag-dato-core .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle}.ag-dato-core .ag-menu .da-grid-icon svg{vertical-align:middle}.ag-dato-core .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}.ag-dato-core .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}.ag-dato-core .sort-icon svg{width:14px;height:16px}.ag-dato-core .filter-icon svg{width:13px}.ag-dato-core .menu-icon svg{width:4px;height:14px}.ag-dato-core .menu-auto-size-icon svg,.ag-dato-core .menu-group-icon,.ag-dato-core .menu-pin-icon,.ag-dato-core .menu-un-group-icon{width:16px;height:16px}.ag-dato-core .menu-check-icon svg{width:15px;height:18px}.ag-dato-core .group-contracted-icon,.ag-dato-core .group-expanded-icon{width:7px}.ag-dato-core .group-expanded-icon{transform:rotate(90deg)}"]}),Ct("design:paramtypes",[jo,e.ElementRef,Le,e.ChangeDetectorRef])],o)}(Dt),Fo=function(){function t(){}return Object.defineProperty(t.prototype,"grid",{set:function(t){this.rowCount||(this.rowCount=t.rowDataChanged.pipe(i.untilDestroyed(this)).pipe(r.map((function(t){return t.api.getDisplayedRowCount()}))))},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){},vt([e.Input(),Ct("design:type",No),Ct("design:paramtypes",[No])],t.prototype,"grid",null),t=vt([e.Component({selector:"dato-grid-header",template:'<div class="d-flex-row justify-between items-center">\n <p class="dato-headline">\n <ng-content></ng-content>\n <span>({{rowCount | async}})</span>\n </p>\n \x3c!--walk-me--\x3e\n</div>',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[""]})],t)}();
166
166
  /**
167
167
  * @license
168
168
  * Copyright Datorama. All Rights Reserved.
@@ -185,7 +185,7 @@ Po=t.RowSelectionType||(t.RowSelectionType={})).SINGLE="single",Po.MULTI="multi"
185
185
  * Use of this source code is governed by an Apache License 2.0 license that can be
186
186
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
187
187
  */
188
- var Go,Vo=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"showWhen",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"actionType",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"order",void 0),t=vt([e.Directive({selector:"[datoGridToolbarItem]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),zo=function(){function t(t){this.element=t}return t.ctorParameters=function(){return[{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoGridToolbarItemElement]"}),Ct("design:paramtypes",[e.ElementRef])],t)}();function Bo(){return{id:null,backdrop:!0,container:document.body,windowClass:"",enableClose:!0,width:null,height:null,size:t.Dimensions.SM,draggable:!1,fullScreen:!1}}var Ho,Uo=((Go={})[t.Dimensions.SM]=["400px","200px"],Go[t.Dimensions.MD]=["560px","280px"],Go[t.Dimensions.LG]=["800px","350px"],Go);(Ho=t.DialogResultStatus||(t.DialogResultStatus={})).SUCCESS="SUCCESS",Ho.DISMISSED="DISMISSED";var Ko,Wo,Qo=function(){function o(){this._beforeClose=[],this._afterClose=new n.Subject,this._destroySubject=new n.Subject}return Object.defineProperty(o.prototype,"$destroyed",{get:function(){return this._destroySubject.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"options",{get:function(){return this._dialogOptions},set:function(t){this._dialogOptions=t},enumerable:!0,configurable:!0}),o.prototype.close=function(e){this.tryClose({status:t.DialogResultStatus.SUCCESS,data:e})},o.prototype.dismiss=function(e){this.tryClose({status:t.DialogResultStatus.DISMISSED,data:e})},o.prototype.beforeClosed=function(t){this._beforeClose.push(t)},o.prototype.afterClosed=function(){return this._afterClose.asObservable().pipe(r.take(1))},o.prototype.tryClose=function(t){var e=this;this.canClose(t).subscribe((function(n){n&&(e.destroy(),e._afterClose.next(t),e._afterClose.complete())}))},o.prototype.canClose=function(t){if(!this._beforeClose.length)return n.of(!0);var e=this._beforeClose.map((function(e){var o=e(t);return Nt(o)?n.of(o):void 0===o?n.of(!0):o}));return n.forkJoin(e).pipe(r.map((function(t){return!t.some((function(t){return!ge(t)}))})))},o.prototype.destroy=function(){this._beforeClose=[],this._destroy(),this._destroySubject.next(),this._destroySubject.complete()},o.prototype._setData=function(t){this._data=t},o.prototype._onDestroy=function(t){this._destroy=t},o=vt([e.Injectable(),Ct("design:paramtypes",[])],o)}(),$o=function(){function t(t,e){this.element=t,this.dialogRef=e,this.hasOverlay=!1}return Object.defineProperty(t.prototype,"lightning",{get:function(){return this.options.lightning},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=Ft(".dato-dialog-projection",this.element.nativeElement),e=this.dialogRef.options;this.hasOverlay=e.backdrop||e.enableClose;var n=e.width,o=e.height,i=Uo[e.size];n=n||i[0],o=o||i[1],e.dataAutoId&&zt(this.element.nativeElement,"data-auto-id",e.dataAutoId),oe(n,null,t),ie(null,o,t)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Qo}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"options",void 0),t=vt([e.Component({selector:"dato-dialog",template:'<div class="dato-dialog" [ngClass]="options.windowClass" [class.lightning]=\'lightning\'\n [class.backdrop]="options.backdrop" [class.no-overlay]="!hasOverlay">\n\n <div #projectionContent class="dato-dialog-projection d-flex">\n <ng-content></ng-content>\n </div>\n\n</div>',encapsulation:e.ViewEncapsulation.None,host:{tabindex:"-1",role:"dialog"},styles:['.dato-dialog{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:30px;overflow:auto;display:flex;justify-content:center;align-items:center}.dato-dialog.no-overlay{pointer-events:none}.dato-dialog.no-overlay .dato-dialog-projection{pointer-events:all}.lightning{font-family:"Salesforce Sans","Open Sans",sans-serif!important}.lightning .dato-dialog-projection{border-radius:4px!important}.dato-dialog-projection{max-height:100%;max-width:100%;min-height:160px;position:relative;transform:none;border-radius:2px;opacity:1;-webkit-animation:.4s cubic-bezier(.25,.8,.25,1) core-open;animation:.4s cubic-bezier(.25,.8,.25,1) core-open}.dato-dialog-projection>*{display:flex;flex-direction:column;flex:0 1 100%;max-width:100%}.dato-dialog-projection:after{content:"&nbsp;";display:inline;min-height:inherit;font-size:0}@-webkit-keyframes core-open{0%{opacity:0;transform:translate3d(0,25%,0) scale(.9)}100%{opacity:1;transform:none}}@keyframes core-open{0%{opacity:0;transform:translate3d(0,25%,0) scale(.9)}100%{opacity:1;transform:none}}']}),Ct("design:paramtypes",[e.ElementRef,Qo])],t)}(),qo=function(){function t(t){this._dialogRef=t}return Object.defineProperty(t.prototype,"dialogRef",{get:function(){return this._dialogRef},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewRef",{get:function(){return this._viewRef},set:function(t){this._viewRef=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"innerComponentRef",{get:function(){return this._innerComponentRef},set:function(t){this._innerComponentRef=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dialogElement",{get:function(){return this._dialogElement},set:function(t){this._dialogElement=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRef",{get:function(){return this._componentRef},set:function(t){this._componentRef=t},enumerable:!0,configurable:!0}),t}();(Ko=t.DatoActionType||(t.DatoActionType={})).SUCCESS="SUCCESS",Ko.DISMISSED="DISMISSED",(Wo=t.ConfirmationType||(t.ConfirmationType={})).WARNING="warning",Wo.DISRUPTIVE_WARNING="disruptive_warning";var Yo=[{type:t.DatoActionType.DISMISSED,caption:"core.cancel",datoType:"secondary"},{type:t.DatoActionType.SUCCESS,caption:"core.ok",datoType:"primary"}];function Zo(){var e={title:"",content:"",actions:xt(Yo),confirmationType:t.ConfirmationType.WARNING};return mt(mt({},Bo()),e)}var Xo,Jo=function(){function n(e){this.dialogRef=e,this.isDisruptive=!1,this.options=e.options,this.isDisruptive=this.options.confirmationType===t.ConfirmationType.DISRUPTIVE_WARNING}return Object.defineProperty(n.prototype,"lightning",{get:function(){return this.options.lightning},enumerable:!0,configurable:!0}),n.ctorParameters=function(){return[{type:Qo}]},vt([e.HostBinding("class.disruptive"),Ct("design:type",Object)],n.prototype,"isDisruptive",void 0),n=vt([e.Component({selector:"dato-confirmation-dialog",template:'<dato-dialog-header>\n <div class="d-flex-row">\n <dato-icon datoIcon="alert" class="title-icon mr-7"></dato-icon>\n <div class="ellipsis">{{options.title}}</div>\n </div>\n</dato-dialog-header>\n<dato-dialog-content>\n <dato-dynamic-content [content]="options.content"></dato-dynamic-content>\n</dato-dialog-content>\n<dato-dialog-footer>\n <ng-container *ngIf="lightning; else regularFooter">\n <ng-container *ngFor="let action of options.actions">\n <dato-button [attr.datoType]="action.datoType || \'lightning-brand\'" data-auto-id="confirmation-dialog-success"\n [datoDialogClose]="action.data || action.type" *ngIf="action.type === \'SUCCESS\'; else cancelBtn">\n {{action.caption}}\n </dato-button>\n <ng-template #cancelBtn>\n <dato-button [attr.datoType]="action.datoType || \'lightning-neutral\'" [datoDialogDismiss]="action.data || action.type"\n data-auto-id="confirmation-dialog-cancel">\n {{action.caption}}\n </dato-button>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #regularFooter>\n <ng-container *ngFor="let action of options.actions">\n <dato-button [attr.datoType]="action.datoType || \'primary\'" data-auto-id="confirmation-dialog-success"\n [datoDialogClose]="action.data || action.type" *ngIf="action.type === \'SUCCESS\'; else cancelBtn">\n {{action.caption}}\n </dato-button>\n <ng-template #cancelBtn>\n <dato-button [attr.datoType]="action.datoType || \'secondary\'" [datoDialogDismiss]="action.data || action.type"\n data-auto-id="confirmation-dialog-cancel">\n {{action.caption}}\n </dato-button>\n </ng-template>\n </ng-container>\n </ng-template>\n</dato-dialog-footer>',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[Qo])],n)}(),ti=function(){function t(t,e,n,o){this.resolver=t,this.applicationRef=e,this.injector=n,this.translate=o,this.dialogs=new Map,this.dialogsStack=[]}return t.prototype.isOpen=function(t){return this.dialogs.has(t)},t.prototype.open=function(t,e){void 0===e&&(e={});var n=this.getOptions(e),o=this.createDialogRef(n),i=n.container,r=new qo(o);if(this.dialogs.has(n.id))throw new Eo("A dialog with the key '"+n.id+"' already exist.");return o._onDestroy(this.onDestroy.bind(this,r)),this.createDialogComponent(t,r),this.injectToDOM(i,r),this.registerEvents(r),this.dialogs.set(n.id,r),this.dialogsStack.push(r),o},t.prototype.confirm=function(t){var e=this;void 0===t&&(t={});var n=mt(mt({},Zo()),t);return n.title=n.title?this.translate.transform(n.title):"",n.actions.forEach((function(t){t.caption=t.caption?e.translate.transform(t.caption):""})),this.open(Jo,n)},t.prototype.closeAll=function(t){this.dialogsStack.forEach((function(e){e.dialogRef.close(t)}))},t.prototype.closeAllExcept=function(t,e){this.dialogsStack.forEach((function(n){-1===t.indexOf(n.dialogRef.options.id)&&n.dialogRef.close(e)}))},t.prototype.dismissAll=function(t){this.dialogsStack.forEach((function(e){e.dialogRef.dismiss(t)}))},t.prototype.getClosestDialogElement=function(t){for(var e=t.parentElement;e&&!e.classList.contains("dato-dialog-projection");)e=e.parentElement;return e},t.prototype.getOptions=function(t){var e=mt(mt({},Bo()),t);return e.fullScreen&&(e.width=e.height="100%"),e},t.prototype.createDialogRef=function(t){ge(t.id)||(t.id=Ae());var e=new Qo;return e.options=t,e._setData(t.data),e},t.prototype.createDialogComponent=function(t,e){var n=this.resolver.resolveComponentFactory($o),o=e.dialogRef,i=this.createInjector(o),r=this.generateNgContent(e,t,this.resolver,i,o),a=n.create(i,r);a.instance.options=o.options,a.changeDetectorRef.detectChanges(),e.componentRef=a},t.prototype.injectToDOM=function(t,e){var n=e.componentRef.location.nativeElement,o=t.appendChild(n);e.dialogElement=o,e.viewRef&&e.viewRef.detectChanges()},t.prototype.createInjector=function(t){return e.Injector.create({parent:t.options.viewContainerRef?t.options.viewContainerRef.injector:this.injector,providers:[{provide:Qo,useValue:t}]})},t.prototype.registerEvents=function(t){var e=t.dialogElement.querySelector(".dato-dialog");if(e.style.zIndex=Nn().toString(),!1!==t.dialogRef.options.enableClose){var o=n.fromEvent(e,"click").pipe(r.filter((function(t){var e=t.target.classList.contains("dato-dialog"),n=""===window.getSelection().toString();return e&&n}))),i=n.fromEvent(document,"keyup").pipe(r.filter((function(t){return 27===t.keyCode})));n.merge(o,i).pipe(r.takeUntil(t.dialogRef.$destroyed)).subscribe((function(){t.dialogRef.dismiss()}))}},t.prototype.onDestroy=function(t){t.viewRef&&this.applicationRef.detachView(t.viewRef),t.innerComponentRef?t.innerComponentRef.destroy():t.viewRef&&t.viewRef.destroy(),t.componentRef&&t.componentRef.destroy(),t.dialogRef.options.container.removeChild(t.dialogElement);var e=t.dialogRef.options.id;this.dialogs.has(e)&&(this.dialogs.delete(e),this.dialogsStack=this.dialogsStack.filter((function(e){return e!==t})))},t.prototype.generateNgContent=function(t,n,o,i,r){if(void 0===r&&(r={}),"string"==typeof n){var a=document.createElement("text");return a.textContent=this.translate.transform(n),[[a]]}if(n instanceof e.TemplateRef)return t.viewRef=n.createEmbeddedView({$implicit:r}),this.applicationRef.attachView(t.viewRef),[t.viewRef.rootNodes];var s=o.resolveComponentFactory(n);return t.innerComponentRef=s.create(i),t.viewRef=t.innerComponentRef.hostView,this.applicationRef.attachView(t.viewRef),[[t.innerComponentRef.location.nativeElement]]},t.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:e.ApplicationRef},{type:e.Injector},{type:Mn}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(Mn))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[e.ComponentFactoryResolver,e.ApplicationRef,e.Injector,Mn])],t)}(),ei=function(){},ni=function(t){function e(e){var n=t.call(this)||this;return n.options=e,n.options=n.options||{},n}return ft(e,t),e.prototype.beforeHandle=function(t){},e.prototype.handle=function(t){var e=this.options.afterClosed;e&&e.call(this,t)},e}(ei),oi=function(e){function n(t){var n=e.call(this,t)||this;return n.title="core.delete",n.content="Are you sure you want to delete the selected rows?",n}return ft(n,e),n.prototype.beforeHandle=function(t){this.options.dialogOptions=mt(mt({},this.options.dialogOptions),{title:this.title,content:this.content}),e.prototype.beforeHandle.call(this,t)},n.prototype.handle=function(n){n.dialogResult.status===t.DialogResultStatus.SUCCESS&&n.gridApi.removeRows(n.selectedRows),e.prototype.handle.call(this,n)},n}(ni),ii=function(){function t(t){this.dialog=t}return t.prototype.executeAction=function(t,e){if(t.click){var n=e.getSelectedRows();if(t.click instanceof ei){var o={gridApi:e,selectedRows:n};this.executeHandler(t.click,o)}else Et(t.click)&&t.click(n)}},t.prototype.executeHandler=function(t,e){t instanceof ni?this.showConfirmation(t,e):(t.beforeHandle(e),t.handle(e))},t.prototype.showConfirmation=function(t,e){var n=mt(mt({},e),{dialog:this.dialog,dialogResult:null});t.beforeHandle(n),this.dialog.confirm(t.options.dialogOptions).afterClosed().subscribe((function(e){n.dialogResult=e,t.handle(n)}))},t.ctorParameters=function(){return[{type:ti}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(ti))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[ti])],t)}(),ri=function(){function n(e,n,o){var i,r;this.cdr=e,this.translate=n,this.gridToolbarService=o,this.areaActions=((i={})[t.ToolbarActionType.Button]=t.ToolbarArea.Left,i[t.ToolbarActionType.Add]=t.ToolbarArea.InternalArea,i[t.ToolbarActionType.Copy]=t.ToolbarArea.PreservedArea,i[t.ToolbarActionType.Edit]=t.ToolbarArea.PreservedArea,i[t.ToolbarActionType.Delete]=t.ToolbarArea.PreservedArea,i[t.ToolbarActionType.MenuItem]=t.ToolbarArea.Menu,i),this.selectedRowsCount=0,this._actions=[],this.open=!1,this.filteredItems=((r={})[t.ToolbarArea.Menu]=[],r[t.ToolbarArea.Left]=[],r[t.ToolbarArea.PreservedArea]=[],r[t.ToolbarArea.InternalArea]=[],r)}return Object.defineProperty(n.prototype,"actions",{get:function(){return this._actions},set:function(t){this._actions=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"grid",{set:function(t){var e=this;t&&!this.api&&(this.api=new Ao,t.gridReady.pipe(i.untilDestroyed(this),r.first()).subscribe((function(t){e.api.gridApi=t.api,e.onGridReady()})))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"leftAreaItems",{get:function(){return this.filteredItems[t.ToolbarArea.Left]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"preservedAreaItems",{get:function(){return this.filteredItems[t.ToolbarArea.PreservedArea]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"internalAreaItems",{get:function(){return this.filteredItems[t.ToolbarArea.InternalArea]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemTemplates",{get:function(){return xt(this.items.toArray(),this.actionItems.toArray())},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.translateActions()},n.prototype.translateActions=function(){var t=this;this.actions=this.actions.map((function(e){return mt(mt({},e),{text:t.translate.transform(e.text)})}))},n.prototype.resize=function(){this.api.gridApi.sizeColumnsToFit()},n.prototype.ngOnDestroy=function(){this.api&&this.api.gridApi.removeEventListener(lt.Events.EVENT_SELECTION_CHANGED,this.eventHandler)},n.prototype.actionClick=function(t){this.gridToolbarService.executeAction(t,this.api)},n.prototype.onGridReady=function(){this.eventHandler=this.rowSelectionChange.bind(this),this.api.gridApi.addEventListener(lt.Events.EVENT_SELECTION_CHANGED,this.eventHandler),this._filterItems(!0),this.fitGridSizeOnInit()},n.prototype.rowSelectionChange=function(){var t=this.api.getSelectedRows(),e=t.length;this.open=!1,this._shouldNotRerender(e)||(this.selectedRowsCount=e,this._filterItems(!1,e,t),this.cdr.detectChanges())},n.prototype._shouldNotRerender=function(t){return this.selectedRowsCount===t&&!this._hasCustomFunctions()},n.prototype._hasCustomFunctions=function(){return this.itemTemplates.filter((function(t){return Et(t.showWhen)})).length},n.prototype._filterItems=function(e,n,o){var i,r=this,a=((i={})[t.ToolbarArea.Menu]=[],i[t.ToolbarArea.Left]=[],i[t.ToolbarArea.PreservedArea]=[],i[t.ToolbarArea.InternalArea]=[],i);this.filteredItems=this.itemTemplates.filter((function(t){var e=t.showWhen||"always";return Et(e)?r._handleCustomFunction(e,o):r._isSingle(e,n)||r._isMultiple(e,n)||r._isNone(e,n)||r._showAlways(e)})).sort((function(t,e){return t.order-e.order})).reduce((function(e,n){var o=n.actionType||t.ToolbarActionType.Button;return e[r.areaActions[o]].push(n),e}),a)},n.prototype._showAlways=function(e){return e===t.RowSelectionType.ALWAYS},n.prototype._handleCustomFunction=function(t,e){return!!Et(t)&&t(e||[])},n.prototype._isSingle=function(e,n){return e===t.RowSelectionType.SINGLE&&1===n},n.prototype._isNone=function(e,n){return e===t.RowSelectionType.NONE&&!n},n.prototype._isMultiple=function(e,n){return e===t.RowSelectionType.MULTI&&n>=1},n.prototype.fitGridSizeOnInit=function(){this.api.gridApi.sizeColumnsToFit()},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn},{type:ii}]},vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],n.prototype,"actions",null),vt([e.Input(),Ct("design:type",No),Ct("design:paramtypes",[No])],n.prototype,"grid",null),vt([e.ContentChildren(Vo),Ct("design:type",e.QueryList)],n.prototype,"items",void 0),vt([e.ViewChildren(Vo),Ct("design:type",e.QueryList)],n.prototype,"actionItems",void 0),vt([e.ViewChild("container",{static:!0}),Ct("design:type",e.ElementRef)],n.prototype,"container",void 0),vt([e.HostListener("window:resize"),at.debounce(300),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"resize",null),vt([at.delay(),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"fitGridSizeOnInit",null),n=vt([e.Component({selector:"dato-grid-toolbar",template:'<div class="grid-toolbar__container d-flex-row-rev" #container>\n\n <div class="d-flex-row-rev">\n <div *ngFor="let item of internalAreaItems;">\n <div class="mr-4">\n <ng-container *ngTemplateOutlet="item?.tpl"></ng-container>\n </div>\n </div>\n\n <div class="separator mx-8" *ngIf="internalAreaItems.length && (preservedAreaItems.length || leftAreaItems.length)"\n datoColor="primary-100 background"></div>\n\n <div *ngFor="let item of preservedAreaItems;">\n <div class="mr-4">\n <ng-container *ngTemplateOutlet="item?.tpl"></ng-container>\n </div>\n </div>\n\n <div class="separator mx-8" *ngIf="preservedAreaItems.length && leftAreaItems.length"\n datoColor="primary-100 background"></div>\n\n <ng-container *ngFor="let item of leftAreaItems;">\n <div class="mr-4">\n <ng-container *ngTemplateOutlet="item?.tpl"></ng-container>\n </div>\n </ng-container>\n\n \x3c!-- Provide built-in template for the actions --\x3e\n <ng-container *ngFor="let action of actions">\n <ng-container [ngSwitch]="action.actionType">\n\n <ng-template datoGridToolbarItem [showWhen]="action.showWhen" *ngSwitchDefault>\n <dato-button datoType="secondary" datoSize="sm" datoGridToolbarItemElement\n (click)="actionClick(action)">\n <dato-icon *ngIf="action.icon" [datoIcon]="action.icon"></dato-icon>\n <span class="ml-4">{{action.text}}</span>\n </dato-button>\n </ng-template>\n\n <ng-template datoGridToolbarItem\n [showWhen]="action.showWhen"\n [actionType]="action.actionType"\n order="1"\n *ngSwitchCase="\'Add\'">\n <dato-icon-button datoCircle datoSize="md"\n [datoIcon]="action.icon || \'plus-add\'"\n datoGridToolbarItemElement\n (click)="actionClick(action)">\n </dato-icon-button>\n </ng-template>\n\n <ng-template datoGridToolbarItem\n [showWhen]="action.showWhen || \'multi\'"\n [actionType]="action.actionType"\n order="3"\n *ngSwitchCase="\'Edit\'">\n <dato-icon-button datoSize="md" datoType="none"\n [datoIcon]="action.icon || \'edit\'"\n datoGridToolbarItemElement\n (click)="actionClick(action)">\n </dato-icon-button>\n </ng-template>\n\n <ng-template datoGridToolbarItem\n [showWhen]="action.showWhen || \'multi\'"\n [actionType]="action.actionType"\n order="2"\n *ngSwitchCase="\'Delete\'">\n <dato-icon-button datoSize="md" datoType="none"\n [datoIcon]="action.icon || \'delete\'"\n datoGridToolbarItemElement\n (click)="actionClick(action)">\n </dato-icon-button>\n </ng-template>\n\n <ng-template datoGridToolbarItem\n [showWhen]="action.showWhen || \'single\'"\n [actionType]="action.actionType"\n order="1"\n *ngSwitchCase="\'Copy\'">\n <dato-icon-button datoSize="md" datoType="none"\n [datoIcon]="action.icon || \'duplicate\'"\n datoGridToolbarItemElement\n (click)="actionClick(action)">\n </dato-icon-button>\n </ng-template>\n\n </ng-container>\n </ng-container>\n </div>\n\n <div class="d-flex d-flex-1 align-start-center">\n <ng-content select=".toolbar-title"></ng-content>\n </div>\n\n</div>\n',styles:[":host{display:block;min-height:30px}.separator{width:2px;height:24px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,Mn,ii])],n)}(),ai=function(){function t(){this.searchables=[],this.searchablesHighlight=[],this.contentInit=!1,this._count=0,this._term=""}return Object.defineProperty(t.prototype,"count",{get:function(){return this._count},set:function(t){this._count=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"term",{get:function(){return this._term},set:function(t){this._term=t||"",this.contentInit&&this.search(this._term)},enumerable:!0,configurable:!0}),t.prototype.search=function(t){this.handleSearchables(t),this.handleHighlighters(t)},t.prototype.register=function(t,e){void 0===e&&(e=!1),e?this.searchablesHighlight.push(t):this.searchables.push(t),this.contentInit&&(e?t.highlight(t.token,this._term):this.match(t)?(t.show(),this.count++):t.hide())},t.prototype.unregister=function(t,e){void 0===e&&(e=!1),e?this.searchablesHighlight=this.searchablesHighlight.filter((function(e){return e!==t})):this.searchables=this.searchables.filter((function(e){return e!==t}))},t.prototype.ngAfterContentInit=function(){this.contentInit=!0,this.search(this.term)},t.prototype.ngOnDestroy=function(){this.searchables=[],this.searchablesHighlight=[]},t.prototype.match=function(t){return t.token.toLowerCase().indexOf(this._term.toLowerCase())>-1},t.prototype.handleSearchables=function(t){var e,n,o=0;try{for(var i=wt(this.searchables),r=i.next();!r.done;r=i.next()){var a=r.value;t?this.match(a)?(a.show(),o++):a.hide():(a.show(),o++)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.count=o},t.prototype.handleHighlighters=function(t){var e,n;try{for(var o=wt(this.searchablesHighlight),i=o.next();!i.done;i=o.next()){var r=i.value;r.highlight(r.token,t)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},vt([e.Input("datoSearchTerm"),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"term",null),t=vt([e.Component({selector:"dato-searchable-container",template:"\n <ng-content></ng-content>\n ",exportAs:"datoSearchableContainer",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),si=function(){function t(t,e){if(this.container=t,this.host=e,this.token="",!t)throw new Eo("Missing <dato-searchable-container> wrapper component")}return Object.defineProperty(t.prototype,"datoSearchable",{set:function(t){this.token=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHidden",{get:function(){return this.element.classList.contains("force-hide")},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.container.register(this)},t.prototype.hide=function(){this.element.classList.add("force-hide")},t.prototype.show=function(){this.element.classList.remove("force-hide")},t.prototype.ngOnDestroy=function(){this.container.unregister(this)},t.ctorParameters=function(){return[{type:ai,decorators:[{type:e.Optional}]},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSearchable",null),t=vt([e.Directive({selector:"[datoSearchable]"}),bt(0,e.Optional()),Ct("design:paramtypes",[ai,e.ElementRef])],t)}(),li=function(){function t(t){this.cdr=t,this._expanded=!1,this._disableAnimation=!1}return Object.defineProperty(t.prototype,"disableAnimation",{get:function(){return this._disableAnimation},set:function(t){this._disableAnimation=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expanded",{set:function(t){this._expanded!==t&&(this._expanded=t,this.cdr.detectChanges())},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input("tpl"),Ct("design:type",e.TemplateRef)],t.prototype,"template",void 0),vt([e.ContentChildren(si),Ct("design:type",e.QueryList)],t.prototype,"searchables",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"expanded",null),t=vt([e.Component({selector:"dato-accordion-content",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'\n <div [@slideInOut] *ngIf="_expanded" [@.disabled]="disableAnimation">\n <ng-container [ngTemplateOutlet]="template"></ng-container>\n <ng-content></ng-content>\n </div>\n ',animations:[ct.trigger("slideInOut",[ct.transition(":enter",[ct.style({height:"0px"}),ct.animate("200ms",ct.style({height:"*"}))]),ct.transition(":leave",[ct.style({height:"*"}),ct.animate("200ms",ct.style({height:"0px"}))])])],styles:["\n :host {\n overflow: hidden;\n display: block;\n }\n "]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),ci=function(){function t(t,e){this.host=t,this.cdr=e,this._expanded=!1,this.click$=n.fromEvent(this.element,"click"),this._searchResultLength=0,this._includeArrow=!1,this._arrowType="standard"}return Object.defineProperty(t.prototype,"expanded",{set:function(t){this._expanded!==t&&(this._expanded=t,this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"includeArrow",{get:function(){return this._includeArrow},set:function(t){this._includeArrow=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"arrowType",{get:function(){return this._arrowType},set:function(t){this._arrowType=t||"standard",this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._expanded},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"searchResultLength",{get:function(){return this._searchResultLength},set:function(t){this._searchResultLength=t},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},vt([e.HostBinding("class.dato-accordion-open"),Ct("design:type",Object)],t.prototype,"_expanded",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"searchable",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"expanded",null),t=vt([e.Component({selector:"dato-accordion-header",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<div class="d-flex align-space-between-center">\n <div class="d-flex items-center d-flex-1-1-auto min-width-0">\n <ng-container *ngIf="includeArrow && this.arrowType === \'standard\'">\n <dato-icon [datoIcon]=" _expanded ? \'arrow-down\' : \'arrow-right\'" datoSize="sm" class="mx-8"></dato-icon>\n </ng-container>\n <ng-content></ng-content>\n </div>\n <ng-container *ngIf="includeArrow && this.arrowType === \'double\'">\n <dato-icon [datoIcon]=" _expanded ? \'collapse\' : \'expand\'" class="primary-300-color mx-10"\n width="11px" height="17px"></dato-icon>\n </ng-container>\n</div>\n',exportAs:"datoAccordionHeader",styles:["\n :host {\n display: block;\n }\n "]}),Ct("design:paramtypes",[e.ElementRef,e.ChangeDetectorRef])],t)}(),pi=function(){function t(t){this.cdr=t,this._disabled=!1,this._hidden=!1,this.toggle=new e.EventEmitter}return Object.defineProperty(t.prototype,"disabled",{set:function(t){this._disabled=t,this.content.expanded=!1,this.header.expanded=!1,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expanded",{get:function(){return this.content&&this.content._expanded},enumerable:!0,configurable:!0}),t.prototype.expand=function(t){this.content.expanded=t,this.header.expanded=t},t.prototype.hide=function(t){void 0===t&&(t=!0),t!==this._hidden&&(this._hidden=t,this.cdr.detectChanges())},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.ContentChild(li,{static:!0}),Ct("design:type",li)],t.prototype,"content",void 0),vt([e.ContentChild(ci,{static:!0}),Ct("design:type",ci)],t.prototype,"header",void 0),vt([e.HostBinding("class.dato-accordion-disabled"),Ct("design:type",Object)],t.prototype,"_disabled",void 0),vt([e.HostBinding("class.force-hide"),Ct("design:type",Object)],t.prototype,"_hidden",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"toggle",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"disabled",null),t=vt([e.Component({selector:"dato-accordion-group",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}:host ::ng-deep dato-accordion-header{cursor:pointer}:host(.dato-accordion-disabled) ::ng-deep dato-accordion-header{cursor:not-allowed}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),di=function(t,e,n){var o=t.option||t;if(o[n]){var i=o[n].toString().toLowerCase(),r=e.toLowerCase();return i.indexOf(r)>-1}return!1},ui=function(){function t(){this.list=[],this.noop=ne,this.datoOptions={},this.orderUpdated=new e.EventEmitter,this.defaultOptions={handle:".dato-sortable-handler",ghostClass:"dato-sortable-ghost",chosenClass:"dato-sortable-chosen",dragClass:"dato-sortable-drag"}}return Object.defineProperty(t.prototype,"datoList",{set:function(t){var e=Array.isArray(t);if(!(e||t instanceof o.FormControl&&Array.isArray(t.value)))throw new Error("DatoSortable - datoList expected array or form control but got "+typeof t);e?this.list=t:(this.formControl=t,this.list=xt(this.formControl.value))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e=this.datoOptions,n=e.dynamicGhostHeight,o=e.hasStaticItems,i=yt(e,["dynamicGhostHeight","hasStaticItems"]),r=mt(mt(mt({},this.defaultOptions),i),{onUpdate:function(e){return i.onUpdate?i.onUpdate(e):t.emitUpdate(e)}});n&&(r.onStart=function(e){return t.setGhostHeight(e)}),o&&(r.onMove=function(t){return!t.related.classList.contains("dato-sortable-static-item")&&(!i.onMove||i.onMove(t))}),this.mergedOptions=r},t.prototype.emitUpdate=function(t){this.formControl&&this.formControl.setValue(this.list),this.orderUpdated.emit(t)},t.prototype.setGhostHeight=function(t){var e=t.from.children[t.oldIndex];Vt(e,"display","block");var n=e.getBoundingClientRect().height;Vt(e,"display","none"),Vt(Ft(".dato-sortable-ghost"),"height",n+"px")},vt([e.ContentChildren(pi),Ct("design:type",e.QueryList)],t.prototype,"accordionGroups",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoList",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoOptions",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"containerClass",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"orderUpdated",void 0),t=vt([e.Component({selector:"dato-sortable",template:'<section [sortablejs]="list" [sortablejsOptions]="mergedOptions" [ngClass]="containerClass"\n (update.stop)="noop()" (add.stop)="noop()" (sort.stop)="noop()" (remove.stop)="noop()"\n (filter.stop)="noop()" (change.stop)="noop()" (drag.stop)="noop()">\n <ng-content></ng-content>\n</section>',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-sortable{display:inline-block}dato-sortable .dato-sortable-handler{cursor:move;cursor:-webkit-grabbing}.dato-sortable-ghost>*{display:none!important}.dato-sortable-drag{box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}"]})],t)}(),hi=function(){function t(t,e,n){this.parent=t,this.parentGroup=e,this.cdr=n,this.closeOthers=!1,this.expandAll=!1,this.includeArrows=!1,this.arrowType="standard",this.activeIds=[],this.showSearchUponNoResults=!1,this._hasSearch=!1}var o;return o=t,Object.defineProperty(t.prototype,"searchTerm",{set:function(t){if(this._hasSearch=!0,this.groups){t=t||"";for(var e=this.asArray,n=0;n<e.length;n++){var o=e[n],i=o.header;if(t){var r=n+1===e.length;this.checkGroupContent(o,t,r)}else this.toggleGroup(o,this.showSearchUponNoResults&&o.expanded),o.hide(!1),i.searchResultLength=0}}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"groups",{get:function(){return this.sortable&&this.sortable.accordionGroups.length>0?this.sortable.accordionGroups:this.childGroups},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){var e=this;if(t.expandAll&&!t.expandAll.firstChange&&this.setExpandAll(),t.activeIds&&!t.activeIds.firstChange){var n=this.groups.toArray().reduce((function(n,o,i){return t.activeIds.currentValue.includes(i)?!o.expanded&&n.push(i):e.toggleGroup(o,!1),n}),[]);this.setExpandAll(n)}},t.prototype.toggle=function(t){var e=this.groups.toArray()[t];ge(e)?this.onGroupClick(e):console.error("Group "+t+" doesn't exists")},t.prototype.setExpandAll=function(t){var e,n,o=t,i=this.groups.toArray();o||(o=i.map((function(t,e){return e})));try{for(var r=wt(o),a=r.next();!a.done;a=r.next()){var s=i[a.value];this.parent||s._disabled||this.onGroupClick(s,!0)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},Object.defineProperty(t.prototype,"asArray",{get:function(){return this.groups.toArray()},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this.groups.changes.pipe(i.untilDestroyed(this)).subscribe((function(){t.register()})),this.register(),this.includeArrows&&(this.updateIncludeArrows(),this.groups.changes.pipe(i.untilDestroyed(this)).subscribe(this.updateIncludeArrows.bind(this))),setTimeout((function(){return t.initialOpen(t.activeIds)}))},t.prototype.ngOnDestroy=function(){this.groupsSubscription&&this.groupsSubscription.unsubscribe()},t.prototype.updateIncludeArrows=function(){var t,e;try{for(var n=wt(this.groups.toArray()),o=n.next();!o.done;o=n.next()){var i=o.value;i.header.includeArrow=!0,i.header.arrowType=this.arrowType}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.register=function(){var t=this;this.groupsSubscription&&this.groupsSubscription.unsubscribe(),this.groupsSubscription=n.merge.apply(void 0,xt(this.groups.map((function(t){return t.header.click$.pipe(r.mapTo(t))})))).subscribe((function(e){t.onGroupClick(e)}))},t.prototype.onGroupClick=function(t,e){var n,o,i=this;if(void 0===e&&(e=!1),!t._disabled){if(this.closeOthers&&!t.content._expanded)try{for(var r=wt(this.groups.toArray()),a=r.next();!a.done;a=r.next()){var s=a.value;s!==t&&this.closeAndEmit(s)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}this.toggleGroup(t,!!e||!t.content._expanded);var l=this.getChildAccordionsComponents();l.length&&l.forEach((function(t){return t.groups.forEach((function(t){return i.closeAndEmit(t)}))})),this.emitToggle(t),this.cdr.markForCheck()}},t.prototype.toggleGroup=function(t,e){void 0===e&&(e=!0),t.content.expanded=e,t.header.expanded=e},t.prototype.getChildAccordionsComponents=function(){var t=this;return this.childAccordion.filter((function(e){return e!==t}))},t.prototype.coerceArray=function(t){return Array.isArray(t)?t:[t]},t.prototype.initialOpen=function(t){var e=this.expandAll?this.groups.toArray().map((function(t,e){return e})):this.coerceArray(t);this.setExpandAll(e)},t.prototype.emitToggle=function(t,e){if(t.toggle.observers.length){var n=null==e?t.content._expanded:e;t.toggle.next({expanded:n})}},t.prototype.closeAndEmit=function(t){t.content._expanded&&this.emitToggle(t,!1),this.toggleGroup(t,!1)},t.prototype.checkGroupContent=function(t,e,n){var o,i=this;Lt(t.header.searchable)?this.checkGroupSearchableContent(t):(o=di(t.header,e,"searchable"))?this.showEntireGroup(t):this.checkGroupSearchableContent(t),this.parentGroup&&this.parent._hasSearch&&setTimeout((function(){if(i.parentGroup.header.searchResultLength+=t.header.searchResultLength,o&&(i.parentGroup.header.searchResultLength+=1),n){var e=i.parentGroup.header.searchResultLength>0;i.expandGroup(i.parentGroup,e)}}))},t.prototype.checkGroupSearchableContent=function(t){var e=t.content.searchables.filter((function(t){return!t.isHidden}));t.header.searchResultLength=e.length,this.expandGroup(t,e.length>0)},t.prototype.showEntireGroup=function(t){t.content.searchables.forEach((function(t){return t.show()})),t.header.searchResultLength=t.content.searchables.length,this.expandGroup(t)},t.prototype.expandGroup=function(t,e){void 0===e&&(e=!0),t.expand(e),t.hide(!e)},t.ctorParameters=function(){return[{type:t,decorators:[{type:e.SkipSelf},{type:e.Optional}]},{type:pi,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef}]},vt([e.ContentChildren(pi),Ct("design:type",e.QueryList)],t.prototype,"childGroups",void 0),vt([e.ContentChildren(o,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"childAccordion",void 0),vt([e.ContentChild(ui,{static:!0}),Ct("design:type",ui)],t.prototype,"sortable",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"closeOthers",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"expandAll",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"includeArrows",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"arrowType",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"activeIds",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showSearchUponNoResults",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"searchTerm",null),t=o=vt([e.Component({selector:"dato-accordion",template:"<ng-content></ng-content>",exportAs:"datoAccordion",styles:["\n :host {\n display: block;\n }\n "]}),bt(0,e.SkipSelf()),bt(0,e.Optional()),bt(1,e.Optional()),Ct("design:paramtypes",[t,pi,e.ChangeDetectorRef])],t)}(),gi=[hi,li,pi,ci],fi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge],declarations:[gi],exports:[gi]})],t)}();(
188
+ var Go,Vo=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"showWhen",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"actionType",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"order",void 0),t=vt([e.Directive({selector:"[datoGridToolbarItem]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),zo=function(){function t(t){this.element=t}return t.ctorParameters=function(){return[{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoGridToolbarItemElement]"}),Ct("design:paramtypes",[e.ElementRef])],t)}();function Bo(){return{id:null,backdrop:!0,container:document.body,windowClass:"",enableClose:!0,width:null,height:null,size:t.Dimensions.SM,draggable:!1,fullScreen:!1}}var Ho,Uo=((Go={})[t.Dimensions.SM]=["400px","200px"],Go[t.Dimensions.MD]=["560px","280px"],Go[t.Dimensions.LG]=["800px","350px"],Go);(Ho=t.DialogResultStatus||(t.DialogResultStatus={})).SUCCESS="SUCCESS",Ho.DISMISSED="DISMISSED";var Ko,Wo,$o=function(){function o(){this._beforeClose=[],this._afterClose=new n.Subject,this._destroySubject=new n.Subject}return Object.defineProperty(o.prototype,"$destroyed",{get:function(){return this._destroySubject.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"options",{get:function(){return this._dialogOptions},set:function(t){this._dialogOptions=t},enumerable:!0,configurable:!0}),o.prototype.close=function(e){this.tryClose({status:t.DialogResultStatus.SUCCESS,data:e})},o.prototype.dismiss=function(e){this.tryClose({status:t.DialogResultStatus.DISMISSED,data:e})},o.prototype.beforeClosed=function(t){this._beforeClose.push(t)},o.prototype.afterClosed=function(){return this._afterClose.asObservable().pipe(r.take(1))},o.prototype.tryClose=function(t){var e=this;this.canClose(t).subscribe((function(n){n&&(e.destroy(),e._afterClose.next(t),e._afterClose.complete())}))},o.prototype.canClose=function(t){if(!this._beforeClose.length)return n.of(!0);var e=this._beforeClose.map((function(e){var o=e(t);return Nt(o)?n.of(o):void 0===o?n.of(!0):o}));return n.forkJoin(e).pipe(r.map((function(t){return!t.some((function(t){return!ge(t)}))})))},o.prototype.destroy=function(){this._beforeClose=[],this._destroy(),this._destroySubject.next(),this._destroySubject.complete()},o.prototype._setData=function(t){this._data=t},o.prototype._onDestroy=function(t){this._destroy=t},o=vt([e.Injectable(),Ct("design:paramtypes",[])],o)}(),Qo=function(){function t(t,e){this.element=t,this.dialogRef=e,this.hasOverlay=!1}return Object.defineProperty(t.prototype,"lightning",{get:function(){return this.options.lightning},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=Ft(".dato-dialog-projection",this.element.nativeElement),e=this.dialogRef.options;this.hasOverlay=e.backdrop||e.enableClose;var n=e.width,o=e.height,i=Uo[e.size];n=n||i[0],o=o||i[1],e.dataAutoId&&zt(this.element.nativeElement,"data-auto-id",e.dataAutoId),oe(n,null,t),ie(null,o,t)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:$o}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"options",void 0),t=vt([e.Component({selector:"dato-dialog",template:'<div class="dato-dialog" [ngClass]="options.windowClass" [class.lightning]=\'lightning\'\n [class.backdrop]="options.backdrop" [class.no-overlay]="!hasOverlay">\n\n <div #projectionContent class="dato-dialog-projection d-flex">\n <ng-content></ng-content>\n </div>\n\n</div>',encapsulation:e.ViewEncapsulation.None,host:{tabindex:"-1",role:"dialog"},styles:['.dato-dialog{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:30px;overflow:auto;display:flex;justify-content:center;align-items:center}.dato-dialog.no-overlay{pointer-events:none}.dato-dialog.no-overlay .dato-dialog-projection{pointer-events:all}.lightning{font-family:"Salesforce Sans","Open Sans",sans-serif!important}.lightning .dato-dialog-projection{border-radius:4px!important}.dato-dialog-projection{max-height:100%;max-width:100%;min-height:160px;position:relative;transform:none;border-radius:2px;opacity:1;-webkit-animation:.4s cubic-bezier(.25,.8,.25,1) core-open;animation:.4s cubic-bezier(.25,.8,.25,1) core-open}.dato-dialog-projection>*{display:flex;flex-direction:column;flex:0 1 100%;max-width:100%}.dato-dialog-projection:after{content:"&nbsp;";display:inline;min-height:inherit;font-size:0}@-webkit-keyframes core-open{0%{opacity:0;transform:translate3d(0,25%,0) scale(.9)}100%{opacity:1;transform:none}}@keyframes core-open{0%{opacity:0;transform:translate3d(0,25%,0) scale(.9)}100%{opacity:1;transform:none}}']}),Ct("design:paramtypes",[e.ElementRef,$o])],t)}(),qo=function(){function t(t){this._dialogRef=t}return Object.defineProperty(t.prototype,"dialogRef",{get:function(){return this._dialogRef},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewRef",{get:function(){return this._viewRef},set:function(t){this._viewRef=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"innerComponentRef",{get:function(){return this._innerComponentRef},set:function(t){this._innerComponentRef=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dialogElement",{get:function(){return this._dialogElement},set:function(t){this._dialogElement=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRef",{get:function(){return this._componentRef},set:function(t){this._componentRef=t},enumerable:!0,configurable:!0}),t}();(Ko=t.DatoActionType||(t.DatoActionType={})).SUCCESS="SUCCESS",Ko.DISMISSED="DISMISSED",(Wo=t.ConfirmationType||(t.ConfirmationType={})).WARNING="warning",Wo.DISRUPTIVE_WARNING="disruptive_warning";var Yo=[{type:t.DatoActionType.DISMISSED,caption:"core.cancel",datoType:"secondary"},{type:t.DatoActionType.SUCCESS,caption:"core.ok",datoType:"primary"}];function Zo(){var e={title:"",content:"",actions:xt(Yo),confirmationType:t.ConfirmationType.WARNING};return mt(mt({},Bo()),e)}var Xo,Jo=function(){function n(e){this.dialogRef=e,this.isDisruptive=!1,this.options=e.options,this.isDisruptive=this.options.confirmationType===t.ConfirmationType.DISRUPTIVE_WARNING}return Object.defineProperty(n.prototype,"lightning",{get:function(){return this.options.lightning},enumerable:!0,configurable:!0}),n.ctorParameters=function(){return[{type:$o}]},vt([e.HostBinding("class.disruptive"),Ct("design:type",Object)],n.prototype,"isDisruptive",void 0),n=vt([e.Component({selector:"dato-confirmation-dialog",template:'<dato-dialog-header>\n <div class="d-flex-row">\n <dato-icon datoIcon="alert" class="title-icon mr-7"></dato-icon>\n <div class="ellipsis">{{options.title}}</div>\n </div>\n</dato-dialog-header>\n<dato-dialog-content>\n <dato-dynamic-content [content]="options.content"></dato-dynamic-content>\n</dato-dialog-content>\n<dato-dialog-footer>\n <ng-container *ngIf="lightning; else regularFooter">\n <ng-container *ngFor="let action of options.actions">\n <dato-button [attr.datoType]="action.datoType || \'lightning-brand\'" data-auto-id="confirmation-dialog-success"\n [datoDialogClose]="action.data || action.type" *ngIf="action.type === \'SUCCESS\'; else cancelBtn">\n {{action.caption}}\n </dato-button>\n <ng-template #cancelBtn>\n <dato-button [attr.datoType]="action.datoType || \'lightning-neutral\'" [datoDialogDismiss]="action.data || action.type"\n data-auto-id="confirmation-dialog-cancel">\n {{action.caption}}\n </dato-button>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-template #regularFooter>\n <ng-container *ngFor="let action of options.actions">\n <dato-button [attr.datoType]="action.datoType || \'primary\'" data-auto-id="confirmation-dialog-success"\n [datoDialogClose]="action.data || action.type" *ngIf="action.type === \'SUCCESS\'; else cancelBtn">\n {{action.caption}}\n </dato-button>\n <ng-template #cancelBtn>\n <dato-button [attr.datoType]="action.datoType || \'secondary\'" [datoDialogDismiss]="action.data || action.type"\n data-auto-id="confirmation-dialog-cancel">\n {{action.caption}}\n </dato-button>\n </ng-template>\n </ng-container>\n </ng-template>\n</dato-dialog-footer>',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[$o])],n)}(),ti=function(){function t(t,e,n,o){this.resolver=t,this.applicationRef=e,this.injector=n,this.translate=o,this.dialogs=new Map,this.dialogsStack=[]}return t.prototype.isOpen=function(t){return this.dialogs.has(t)},t.prototype.open=function(t,e){void 0===e&&(e={});var n=this.getOptions(e),o=this.createDialogRef(n),i=n.container,r=new qo(o);if(this.dialogs.has(n.id))throw new Eo("A dialog with the key '"+n.id+"' already exist.");return o._onDestroy(this.onDestroy.bind(this,r)),this.createDialogComponent(t,r),this.injectToDOM(i,r),this.registerEvents(r),this.dialogs.set(n.id,r),this.dialogsStack.push(r),o},t.prototype.confirm=function(t){var e=this;void 0===t&&(t={});var n=mt(mt({},Zo()),t);return n.title=n.title?this.translate.transform(n.title):"",n.actions.forEach((function(t){t.caption=t.caption?e.translate.transform(t.caption):""})),this.open(Jo,n)},t.prototype.closeAll=function(t){this.dialogsStack.forEach((function(e){e.dialogRef.close(t)}))},t.prototype.closeAllExcept=function(t,e){this.dialogsStack.forEach((function(n){-1===t.indexOf(n.dialogRef.options.id)&&n.dialogRef.close(e)}))},t.prototype.dismissAll=function(t){this.dialogsStack.forEach((function(e){e.dialogRef.dismiss(t)}))},t.prototype.getClosestDialogElement=function(t){for(var e=t.parentElement;e&&!e.classList.contains("dato-dialog-projection");)e=e.parentElement;return e},t.prototype.getOptions=function(t){var e=mt(mt({},Bo()),t);return e.fullScreen&&(e.width=e.height="100%"),e},t.prototype.createDialogRef=function(t){ge(t.id)||(t.id=Ae());var e=new $o;return e.options=t,e._setData(t.data),e},t.prototype.createDialogComponent=function(t,e){var n=this.resolver.resolveComponentFactory(Qo),o=e.dialogRef,i=this.createInjector(o),r=this.generateNgContent(e,t,this.resolver,i,o),a=n.create(i,r);a.instance.options=o.options,a.changeDetectorRef.detectChanges(),e.componentRef=a},t.prototype.injectToDOM=function(t,e){var n=e.componentRef.location.nativeElement,o=t.appendChild(n);e.dialogElement=o,e.viewRef&&e.viewRef.detectChanges()},t.prototype.createInjector=function(t){return e.Injector.create({parent:t.options.viewContainerRef?t.options.viewContainerRef.injector:this.injector,providers:[{provide:$o,useValue:t}]})},t.prototype.registerEvents=function(t){var e=t.dialogElement.querySelector(".dato-dialog");if(e.style.zIndex=Nn().toString(),!1!==t.dialogRef.options.enableClose){var o=n.fromEvent(e,"click").pipe(r.filter((function(t){var e=t.target.classList.contains("dato-dialog"),n=""===window.getSelection().toString();return e&&n}))),i=n.fromEvent(document,"keyup").pipe(r.filter((function(t){return 27===t.keyCode})));n.merge(o,i).pipe(r.takeUntil(t.dialogRef.$destroyed)).subscribe((function(){t.dialogRef.dismiss()}))}},t.prototype.onDestroy=function(t){t.viewRef&&this.applicationRef.detachView(t.viewRef),t.innerComponentRef?t.innerComponentRef.destroy():t.viewRef&&t.viewRef.destroy(),t.componentRef&&t.componentRef.destroy(),t.dialogRef.options.container.removeChild(t.dialogElement);var e=t.dialogRef.options.id;this.dialogs.has(e)&&(this.dialogs.delete(e),this.dialogsStack=this.dialogsStack.filter((function(e){return e!==t})))},t.prototype.generateNgContent=function(t,n,o,i,r){if(void 0===r&&(r={}),"string"==typeof n){var a=document.createElement("text");return a.textContent=this.translate.transform(n),[[a]]}if(n instanceof e.TemplateRef)return t.viewRef=n.createEmbeddedView({$implicit:r}),this.applicationRef.attachView(t.viewRef),[t.viewRef.rootNodes];var s=o.resolveComponentFactory(n);return t.innerComponentRef=s.create(i),t.viewRef=t.innerComponentRef.hostView,this.applicationRef.attachView(t.viewRef),[[t.innerComponentRef.location.nativeElement]]},t.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:e.ApplicationRef},{type:e.Injector},{type:Mn}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(Mn))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[e.ComponentFactoryResolver,e.ApplicationRef,e.Injector,Mn])],t)}(),ei=function(){},ni=function(t){function e(e){var n=t.call(this)||this;return n.options=e,n.options=n.options||{},n}return ft(e,t),e.prototype.beforeHandle=function(t){},e.prototype.handle=function(t){var e=this.options.afterClosed;e&&e.call(this,t)},e}(ei),oi=function(e){function n(t){var n=e.call(this,t)||this;return n.title="core.delete",n.content="Are you sure you want to delete the selected rows?",n}return ft(n,e),n.prototype.beforeHandle=function(t){this.options.dialogOptions=mt(mt({},this.options.dialogOptions),{title:this.title,content:this.content}),e.prototype.beforeHandle.call(this,t)},n.prototype.handle=function(n){n.dialogResult.status===t.DialogResultStatus.SUCCESS&&n.gridApi.removeRows(n.selectedRows),e.prototype.handle.call(this,n)},n}(ni),ii=function(){function t(t){this.dialog=t}return t.prototype.executeAction=function(t,e){if(t.click){var n=e.getSelectedRows();if(t.click instanceof ei){var o={gridApi:e,selectedRows:n};this.executeHandler(t.click,o)}else Et(t.click)&&t.click(n)}},t.prototype.executeHandler=function(t,e){t instanceof ni?this.showConfirmation(t,e):(t.beforeHandle(e),t.handle(e))},t.prototype.showConfirmation=function(t,e){var n=mt(mt({},e),{dialog:this.dialog,dialogResult:null});t.beforeHandle(n),this.dialog.confirm(t.options.dialogOptions).afterClosed().subscribe((function(e){n.dialogResult=e,t.handle(n)}))},t.ctorParameters=function(){return[{type:ti}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(ti))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[ti])],t)}(),ri=function(){function n(e,n,o){var i,r;this.cdr=e,this.translate=n,this.gridToolbarService=o,this.areaActions=((i={})[t.ToolbarActionType.Button]=t.ToolbarArea.Left,i[t.ToolbarActionType.Add]=t.ToolbarArea.InternalArea,i[t.ToolbarActionType.Copy]=t.ToolbarArea.PreservedArea,i[t.ToolbarActionType.Edit]=t.ToolbarArea.PreservedArea,i[t.ToolbarActionType.Delete]=t.ToolbarArea.PreservedArea,i[t.ToolbarActionType.MenuItem]=t.ToolbarArea.Menu,i),this.selectedRowsCount=0,this._actions=[],this.open=!1,this.filteredItems=((r={})[t.ToolbarArea.Menu]=[],r[t.ToolbarArea.Left]=[],r[t.ToolbarArea.PreservedArea]=[],r[t.ToolbarArea.InternalArea]=[],r)}return Object.defineProperty(n.prototype,"actions",{get:function(){return this._actions},set:function(t){this._actions=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"grid",{set:function(t){var e=this;t&&!this.api&&(this.api=new Ao,t.gridReady.pipe(i.untilDestroyed(this),r.first()).subscribe((function(t){e.api.gridApi=t.api,e.onGridReady()})))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"leftAreaItems",{get:function(){return this.filteredItems[t.ToolbarArea.Left]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"preservedAreaItems",{get:function(){return this.filteredItems[t.ToolbarArea.PreservedArea]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"internalAreaItems",{get:function(){return this.filteredItems[t.ToolbarArea.InternalArea]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemTemplates",{get:function(){return xt(this.items.toArray(),this.actionItems.toArray())},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.translateActions()},n.prototype.translateActions=function(){var t=this;this.actions=this.actions.map((function(e){return mt(mt({},e),{text:t.translate.transform(e.text)})}))},n.prototype.resize=function(){this.api.gridApi.sizeColumnsToFit()},n.prototype.ngOnDestroy=function(){this.api&&this.api.gridApi.removeEventListener(lt.Events.EVENT_SELECTION_CHANGED,this.eventHandler)},n.prototype.actionClick=function(t){this.gridToolbarService.executeAction(t,this.api)},n.prototype.onGridReady=function(){this.eventHandler=this.rowSelectionChange.bind(this),this.api.gridApi.addEventListener(lt.Events.EVENT_SELECTION_CHANGED,this.eventHandler),this._filterItems(!0),this.fitGridSizeOnInit()},n.prototype.rowSelectionChange=function(){var t=this.api.getSelectedRows(),e=t.length;this.open=!1,this._shouldNotRerender(e)||(this.selectedRowsCount=e,this._filterItems(!1,e,t),this.cdr.detectChanges())},n.prototype._shouldNotRerender=function(t){return this.selectedRowsCount===t&&!this._hasCustomFunctions()},n.prototype._hasCustomFunctions=function(){return this.itemTemplates.filter((function(t){return Et(t.showWhen)})).length},n.prototype._filterItems=function(e,n,o){var i,r=this,a=((i={})[t.ToolbarArea.Menu]=[],i[t.ToolbarArea.Left]=[],i[t.ToolbarArea.PreservedArea]=[],i[t.ToolbarArea.InternalArea]=[],i);this.filteredItems=this.itemTemplates.filter((function(t){var e=t.showWhen||"always";return Et(e)?r._handleCustomFunction(e,o):r._isSingle(e,n)||r._isMultiple(e,n)||r._isNone(e,n)||r._showAlways(e)})).sort((function(t,e){return t.order-e.order})).reduce((function(e,n){var o=n.actionType||t.ToolbarActionType.Button;return e[r.areaActions[o]].push(n),e}),a)},n.prototype._showAlways=function(e){return e===t.RowSelectionType.ALWAYS},n.prototype._handleCustomFunction=function(t,e){return!!Et(t)&&t(e||[])},n.prototype._isSingle=function(e,n){return e===t.RowSelectionType.SINGLE&&1===n},n.prototype._isNone=function(e,n){return e===t.RowSelectionType.NONE&&!n},n.prototype._isMultiple=function(e,n){return e===t.RowSelectionType.MULTI&&n>=1},n.prototype.fitGridSizeOnInit=function(){this.api.gridApi.sizeColumnsToFit()},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn},{type:ii}]},vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],n.prototype,"actions",null),vt([e.Input(),Ct("design:type",No),Ct("design:paramtypes",[No])],n.prototype,"grid",null),vt([e.ContentChildren(Vo),Ct("design:type",e.QueryList)],n.prototype,"items",void 0),vt([e.ViewChildren(Vo),Ct("design:type",e.QueryList)],n.prototype,"actionItems",void 0),vt([e.ViewChild("container",{static:!0}),Ct("design:type",e.ElementRef)],n.prototype,"container",void 0),vt([e.HostListener("window:resize"),at.debounce(300),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"resize",null),vt([at.delay(),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"fitGridSizeOnInit",null),n=vt([e.Component({selector:"dato-grid-toolbar",template:'<div class="grid-toolbar__container d-flex-row-rev" #container>\n\n <div class="d-flex-row-rev">\n <div *ngFor="let item of internalAreaItems;">\n <div class="mr-4">\n <ng-container *ngTemplateOutlet="item?.tpl"></ng-container>\n </div>\n </div>\n\n <div class="separator mx-8" *ngIf="internalAreaItems.length && (preservedAreaItems.length || leftAreaItems.length)"\n datoColor="primary-100 background"></div>\n\n <div *ngFor="let item of preservedAreaItems;">\n <div class="mr-4">\n <ng-container *ngTemplateOutlet="item?.tpl"></ng-container>\n </div>\n </div>\n\n <div class="separator mx-8" *ngIf="preservedAreaItems.length && leftAreaItems.length"\n datoColor="primary-100 background"></div>\n\n <ng-container *ngFor="let item of leftAreaItems;">\n <div class="mr-4">\n <ng-container *ngTemplateOutlet="item?.tpl"></ng-container>\n </div>\n </ng-container>\n\n \x3c!-- Provide built-in template for the actions --\x3e\n <ng-container *ngFor="let action of actions">\n <ng-container [ngSwitch]="action.actionType">\n\n <ng-template datoGridToolbarItem [showWhen]="action.showWhen" *ngSwitchDefault>\n <dato-button datoType="secondary" datoSize="sm" datoGridToolbarItemElement\n (click)="actionClick(action)">\n <dato-icon *ngIf="action.icon" [datoIcon]="action.icon"></dato-icon>\n <span class="ml-4">{{action.text}}</span>\n </dato-button>\n </ng-template>\n\n <ng-template datoGridToolbarItem\n [showWhen]="action.showWhen"\n [actionType]="action.actionType"\n order="1"\n *ngSwitchCase="\'Add\'">\n <dato-icon-button datoCircle datoSize="md"\n [datoIcon]="action.icon || \'plus-add\'"\n datoGridToolbarItemElement\n (click)="actionClick(action)">\n </dato-icon-button>\n </ng-template>\n\n <ng-template datoGridToolbarItem\n [showWhen]="action.showWhen || \'multi\'"\n [actionType]="action.actionType"\n order="3"\n *ngSwitchCase="\'Edit\'">\n <dato-icon-button datoSize="md" datoType="none"\n [datoIcon]="action.icon || \'edit\'"\n datoGridToolbarItemElement\n (click)="actionClick(action)">\n </dato-icon-button>\n </ng-template>\n\n <ng-template datoGridToolbarItem\n [showWhen]="action.showWhen || \'multi\'"\n [actionType]="action.actionType"\n order="2"\n *ngSwitchCase="\'Delete\'">\n <dato-icon-button datoSize="md" datoType="none"\n [datoIcon]="action.icon || \'delete\'"\n datoGridToolbarItemElement\n (click)="actionClick(action)">\n </dato-icon-button>\n </ng-template>\n\n <ng-template datoGridToolbarItem\n [showWhen]="action.showWhen || \'single\'"\n [actionType]="action.actionType"\n order="1"\n *ngSwitchCase="\'Copy\'">\n <dato-icon-button datoSize="md" datoType="none"\n [datoIcon]="action.icon || \'duplicate\'"\n datoGridToolbarItemElement\n (click)="actionClick(action)">\n </dato-icon-button>\n </ng-template>\n\n </ng-container>\n </ng-container>\n </div>\n\n <div class="d-flex d-flex-1 align-start-center">\n <ng-content select=".toolbar-title"></ng-content>\n </div>\n\n</div>\n',styles:[":host{display:block;min-height:30px}.separator{width:2px;height:24px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,Mn,ii])],n)}(),ai=function(){function t(){this.searchables=[],this.searchablesHighlight=[],this.contentInit=!1,this._count=0,this._term=""}return Object.defineProperty(t.prototype,"count",{get:function(){return this._count},set:function(t){this._count=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"term",{get:function(){return this._term},set:function(t){this._term=t||"",this.contentInit&&this.search(this._term)},enumerable:!0,configurable:!0}),t.prototype.search=function(t){this.handleSearchables(t),this.handleHighlighters(t)},t.prototype.register=function(t,e){void 0===e&&(e=!1),e?this.searchablesHighlight.push(t):this.searchables.push(t),this.contentInit&&(e?t.highlight(t.token,this._term):this.match(t)?(t.show(),this.count++):t.hide())},t.prototype.unregister=function(t,e){void 0===e&&(e=!1),e?this.searchablesHighlight=this.searchablesHighlight.filter((function(e){return e!==t})):this.searchables=this.searchables.filter((function(e){return e!==t}))},t.prototype.ngAfterContentInit=function(){this.contentInit=!0,this.search(this.term)},t.prototype.ngOnDestroy=function(){this.searchables=[],this.searchablesHighlight=[]},t.prototype.match=function(t){return t.token.toLowerCase().indexOf(this._term.toLowerCase())>-1},t.prototype.handleSearchables=function(t){var e,n,o=0;try{for(var i=wt(this.searchables),r=i.next();!r.done;r=i.next()){var a=r.value;t?this.match(a)?(a.show(),o++):a.hide():(a.show(),o++)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.count=o},t.prototype.handleHighlighters=function(t){var e,n;try{for(var o=wt(this.searchablesHighlight),i=o.next();!i.done;i=o.next()){var r=i.value;r.highlight(r.token,t)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},vt([e.Input("datoSearchTerm"),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"term",null),t=vt([e.Component({selector:"dato-searchable-container",template:"\n <ng-content></ng-content>\n ",exportAs:"datoSearchableContainer",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),si=function(){function t(t,e){if(this.container=t,this.host=e,this.token="",!t)throw new Eo("Missing <dato-searchable-container> wrapper component")}return Object.defineProperty(t.prototype,"datoSearchable",{set:function(t){this.token=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHidden",{get:function(){return this.element.classList.contains("force-hide")},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.container.register(this)},t.prototype.hide=function(){this.element.classList.add("force-hide")},t.prototype.show=function(){this.element.classList.remove("force-hide")},t.prototype.ngOnDestroy=function(){this.container.unregister(this)},t.ctorParameters=function(){return[{type:ai,decorators:[{type:e.Optional}]},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSearchable",null),t=vt([e.Directive({selector:"[datoSearchable]"}),bt(0,e.Optional()),Ct("design:paramtypes",[ai,e.ElementRef])],t)}(),li=function(){function t(t){this.cdr=t,this._expanded=!1,this._disableAnimation=!1}return Object.defineProperty(t.prototype,"disableAnimation",{get:function(){return this._disableAnimation},set:function(t){this._disableAnimation=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expanded",{set:function(t){this._expanded!==t&&(this._expanded=t,this.cdr.detectChanges())},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input("tpl"),Ct("design:type",e.TemplateRef)],t.prototype,"template",void 0),vt([e.ContentChildren(si),Ct("design:type",e.QueryList)],t.prototype,"searchables",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"expanded",null),t=vt([e.Component({selector:"dato-accordion-content",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'\n <div [@slideInOut] *ngIf="_expanded" [@.disabled]="disableAnimation">\n <ng-container [ngTemplateOutlet]="template"></ng-container>\n <ng-content></ng-content>\n </div>\n ',animations:[ct.trigger("slideInOut",[ct.transition(":enter",[ct.style({height:"0px"}),ct.animate("200ms",ct.style({height:"*"}))]),ct.transition(":leave",[ct.style({height:"*"}),ct.animate("200ms",ct.style({height:"0px"}))])])],styles:["\n :host {\n overflow: hidden;\n display: block;\n }\n "]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),ci=function(){function t(t,e){this.host=t,this.cdr=e,this._expanded=!1,this.click$=n.fromEvent(this.element,"click"),this._searchResultLength=0,this._includeArrow=!1,this._arrowType="standard"}return Object.defineProperty(t.prototype,"expanded",{set:function(t){this._expanded!==t&&(this._expanded=t,this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"includeArrow",{get:function(){return this._includeArrow},set:function(t){this._includeArrow=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"arrowType",{get:function(){return this._arrowType},set:function(t){this._arrowType=t||"standard",this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._expanded},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"searchResultLength",{get:function(){return this._searchResultLength},set:function(t){this._searchResultLength=t},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},vt([e.HostBinding("class.dato-accordion-open"),Ct("design:type",Object)],t.prototype,"_expanded",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"searchable",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"expanded",null),t=vt([e.Component({selector:"dato-accordion-header",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<div class="d-flex align-space-between-center">\n <div class="d-flex items-center d-flex-1-1-auto min-width-0">\n <ng-container *ngIf="includeArrow && this.arrowType === \'standard\'">\n <dato-icon [datoIcon]=" _expanded ? \'arrow-down\' : \'arrow-right\'" datoSize="sm" class="mx-8"></dato-icon>\n </ng-container>\n <ng-content></ng-content>\n </div>\n <ng-container *ngIf="includeArrow && this.arrowType === \'double\'">\n <dato-icon [datoIcon]=" _expanded ? \'collapse\' : \'expand\'" class="primary-300-color mx-10"\n width="11px" height="17px"></dato-icon>\n </ng-container>\n</div>\n',exportAs:"datoAccordionHeader",styles:["\n :host {\n display: block;\n }\n "]}),Ct("design:paramtypes",[e.ElementRef,e.ChangeDetectorRef])],t)}(),pi=function(){function t(t){this.cdr=t,this._disabled=!1,this._hidden=!1,this.toggle=new e.EventEmitter}return Object.defineProperty(t.prototype,"disabled",{set:function(t){this._disabled=t,this.content.expanded=!1,this.header.expanded=!1,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expanded",{get:function(){return this.content&&this.content._expanded},enumerable:!0,configurable:!0}),t.prototype.expand=function(t){this.content.expanded=t,this.header.expanded=t},t.prototype.hide=function(t){void 0===t&&(t=!0),t!==this._hidden&&(this._hidden=t,this.cdr.detectChanges())},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.ContentChild(li,{static:!0}),Ct("design:type",li)],t.prototype,"content",void 0),vt([e.ContentChild(ci,{static:!0}),Ct("design:type",ci)],t.prototype,"header",void 0),vt([e.HostBinding("class.dato-accordion-disabled"),Ct("design:type",Object)],t.prototype,"_disabled",void 0),vt([e.HostBinding("class.force-hide"),Ct("design:type",Object)],t.prototype,"_hidden",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"toggle",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"disabled",null),t=vt([e.Component({selector:"dato-accordion-group",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}:host ::ng-deep dato-accordion-header{cursor:pointer}:host(.dato-accordion-disabled) ::ng-deep dato-accordion-header{cursor:not-allowed}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),di=function(t,e,n){var o=t.option||t;if(o[n]){var i=o[n].toString().toLowerCase(),r=e.toLowerCase();return i.indexOf(r)>-1}return!1},ui=function(){function t(){this.list=[],this.noop=ne,this.datoOptions={},this.orderUpdated=new e.EventEmitter,this.defaultOptions={handle:".dato-sortable-handler",ghostClass:"dato-sortable-ghost",chosenClass:"dato-sortable-chosen",dragClass:"dato-sortable-drag"}}return Object.defineProperty(t.prototype,"datoList",{set:function(t){var e=Array.isArray(t);if(!(e||t instanceof o.FormControl&&Array.isArray(t.value)))throw new Error("DatoSortable - datoList expected array or form control but got "+typeof t);e?this.list=t:(this.formControl=t,this.list=xt(this.formControl.value))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e=this.datoOptions,n=e.dynamicGhostHeight,o=e.hasStaticItems,i=yt(e,["dynamicGhostHeight","hasStaticItems"]),r=mt(mt(mt({},this.defaultOptions),i),{onUpdate:function(e){return i.onUpdate?i.onUpdate(e):t.emitUpdate(e)}});n&&(r.onStart=function(e){return t.setGhostHeight(e)}),o&&(r.onMove=function(t){return!t.related.classList.contains("dato-sortable-static-item")&&(!i.onMove||i.onMove(t))}),this.mergedOptions=r},t.prototype.emitUpdate=function(t){this.formControl&&this.formControl.setValue(this.list),this.orderUpdated.emit(t)},t.prototype.setGhostHeight=function(t){var e=t.from.children[t.oldIndex];Vt(e,"display","block");var n=e.getBoundingClientRect().height;Vt(e,"display","none"),Vt(Ft(".dato-sortable-ghost"),"height",n+"px")},vt([e.ContentChildren(pi),Ct("design:type",e.QueryList)],t.prototype,"accordionGroups",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoList",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoOptions",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"containerClass",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"orderUpdated",void 0),t=vt([e.Component({selector:"dato-sortable",template:'<section [sortablejs]="list" [sortablejsOptions]="mergedOptions" [ngClass]="containerClass"\n (update.stop)="noop()" (add.stop)="noop()" (sort.stop)="noop()" (remove.stop)="noop()"\n (filter.stop)="noop()" (change.stop)="noop()" (drag.stop)="noop()">\n <ng-content></ng-content>\n</section>',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-sortable{display:inline-block}dato-sortable .dato-sortable-handler{cursor:move;cursor:-webkit-grabbing}.dato-sortable-ghost>*{display:none!important}.dato-sortable-drag{box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}"]})],t)}(),hi=function(){function t(t,e,n){this.parent=t,this.parentGroup=e,this.cdr=n,this.closeOthers=!1,this.expandAll=!1,this.includeArrows=!1,this.arrowType="standard",this.activeIds=[],this.showSearchUponNoResults=!1,this._hasSearch=!1}var o;return o=t,Object.defineProperty(t.prototype,"searchTerm",{set:function(t){if(this._hasSearch=!0,this.groups){t=t||"";for(var e=this.asArray,n=0;n<e.length;n++){var o=e[n],i=o.header;if(t){var r=n+1===e.length;this.checkGroupContent(o,t,r)}else this.toggleGroup(o,this.showSearchUponNoResults&&o.expanded),o.hide(!1),i.searchResultLength=0}}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"groups",{get:function(){return this.sortable&&this.sortable.accordionGroups.length>0?this.sortable.accordionGroups:this.childGroups},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){var e=this;if(t.expandAll&&!t.expandAll.firstChange&&this.setExpandAll(),t.activeIds&&!t.activeIds.firstChange){var n=this.groups.toArray().reduce((function(n,o,i){return t.activeIds.currentValue.includes(i)?!o.expanded&&n.push(i):e.toggleGroup(o,!1),n}),[]);this.setExpandAll(n)}},t.prototype.toggle=function(t){var e=this.groups.toArray()[t];ge(e)?this.onGroupClick(e):console.error("Group "+t+" doesn't exists")},t.prototype.setExpandAll=function(t){var e,n,o=t,i=this.groups.toArray();o||(o=i.map((function(t,e){return e})));try{for(var r=wt(o),a=r.next();!a.done;a=r.next()){var s=i[a.value];this.parent||s._disabled||this.onGroupClick(s,!0)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},Object.defineProperty(t.prototype,"asArray",{get:function(){return this.groups.toArray()},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this.groups.changes.pipe(i.untilDestroyed(this)).subscribe((function(){t.register()})),this.register(),this.includeArrows&&(this.updateIncludeArrows(),this.groups.changes.pipe(i.untilDestroyed(this)).subscribe(this.updateIncludeArrows.bind(this))),setTimeout((function(){return t.initialOpen(t.activeIds)}))},t.prototype.ngOnDestroy=function(){this.groupsSubscription&&this.groupsSubscription.unsubscribe()},t.prototype.updateIncludeArrows=function(){var t,e;try{for(var n=wt(this.groups.toArray()),o=n.next();!o.done;o=n.next()){var i=o.value;i.header.includeArrow=!0,i.header.arrowType=this.arrowType}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.register=function(){var t=this;this.groupsSubscription&&this.groupsSubscription.unsubscribe(),this.groupsSubscription=n.merge.apply(void 0,xt(this.groups.map((function(t){return t.header.click$.pipe(r.mapTo(t))})))).subscribe((function(e){t.onGroupClick(e)}))},t.prototype.onGroupClick=function(t,e){var n,o,i=this;if(void 0===e&&(e=!1),!t._disabled){if(this.closeOthers&&!t.content._expanded)try{for(var r=wt(this.groups.toArray()),a=r.next();!a.done;a=r.next()){var s=a.value;s!==t&&this.closeAndEmit(s)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}this.toggleGroup(t,!!e||!t.content._expanded);var l=this.getChildAccordionsComponents();l.length&&l.forEach((function(t){return t.groups.forEach((function(t){return i.closeAndEmit(t)}))})),this.emitToggle(t),this.cdr.markForCheck()}},t.prototype.toggleGroup=function(t,e){void 0===e&&(e=!0),t.content.expanded=e,t.header.expanded=e},t.prototype.getChildAccordionsComponents=function(){var t=this;return this.childAccordion.filter((function(e){return e!==t}))},t.prototype.coerceArray=function(t){return Array.isArray(t)?t:[t]},t.prototype.initialOpen=function(t){var e=this.expandAll?this.groups.toArray().map((function(t,e){return e})):this.coerceArray(t);this.setExpandAll(e)},t.prototype.emitToggle=function(t,e){if(t.toggle.observers.length){var n=null==e?t.content._expanded:e;t.toggle.next({expanded:n})}},t.prototype.closeAndEmit=function(t){t.content._expanded&&this.emitToggle(t,!1),this.toggleGroup(t,!1)},t.prototype.checkGroupContent=function(t,e,n){var o,i=this;Lt(t.header.searchable)?this.checkGroupSearchableContent(t):(o=di(t.header,e,"searchable"))?this.showEntireGroup(t):this.checkGroupSearchableContent(t),this.parentGroup&&this.parent._hasSearch&&setTimeout((function(){if(i.parentGroup.header.searchResultLength+=t.header.searchResultLength,o&&(i.parentGroup.header.searchResultLength+=1),n){var e=i.parentGroup.header.searchResultLength>0;i.expandGroup(i.parentGroup,e)}}))},t.prototype.checkGroupSearchableContent=function(t){var e=t.content.searchables.filter((function(t){return!t.isHidden}));t.header.searchResultLength=e.length,this.expandGroup(t,e.length>0)},t.prototype.showEntireGroup=function(t){t.content.searchables.forEach((function(t){return t.show()})),t.header.searchResultLength=t.content.searchables.length,this.expandGroup(t)},t.prototype.expandGroup=function(t,e){void 0===e&&(e=!0),t.expand(e),t.hide(!e)},t.ctorParameters=function(){return[{type:t,decorators:[{type:e.SkipSelf},{type:e.Optional}]},{type:pi,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef}]},vt([e.ContentChildren(pi),Ct("design:type",e.QueryList)],t.prototype,"childGroups",void 0),vt([e.ContentChildren(o,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"childAccordion",void 0),vt([e.ContentChild(ui,{static:!0}),Ct("design:type",ui)],t.prototype,"sortable",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"closeOthers",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"expandAll",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"includeArrows",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"arrowType",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"activeIds",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showSearchUponNoResults",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"searchTerm",null),t=o=vt([e.Component({selector:"dato-accordion",template:"<ng-content></ng-content>",exportAs:"datoAccordion",styles:["\n :host {\n display: block;\n }\n "]}),bt(0,e.SkipSelf()),bt(0,e.Optional()),bt(1,e.Optional()),Ct("design:paramtypes",[t,pi,e.ChangeDetectorRef])],t)}(),gi=[hi,li,pi,ci],fi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge],declarations:[gi],exports:[gi]})],t)}();(
189
189
  /**
190
190
  * @license
191
191
  * Copyright Datorama. All Rights Reserved.
@@ -243,7 +243,7 @@ function mi(){return'\n <div class="dato-checkbox"><label><p class="dato-si
243
243
  *
244
244
  * Use of this source code is governed by an Apache License 2.0 license that can be
245
245
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
246
- */function zi(t){return void 0===t&&(t=!1),'\n <div data-is-floating class="dato-select__option \n dato-select__option--simple\n ellipsis \n dato-select__option--hover"\n >\n '+(t?'\n <dato-checkbox [checked]="checked" [disabled]="disabled" (check)="toggleChecked($event)" [indeterminatelyChecked]="indeterminatelyChecked">\n <ng-content></ng-content>\n </dato-checkbox>\n ':"<ng-content></ng-content>")+" \n </div>\n "}var Bi=[Ci,bi,Ni,Fi,Gi,Vi],Hi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,wo,Ge,o.ReactiveFormsModule,Mi,se,xo,Io],declarations:[Bi],exports:[Bi],entryComponents:[Bi]})],t)}(),Ui=function(){function t(t,e){this.renderer=t,this.host=e,t.addClass(e.nativeElement,"dato-sortable-handler")}return t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoSortableHandle]"}),Ct("design:paramtypes",[e.Renderer2,e.ElementRef])],t)}(),Ki=[ui,Ui],Wi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,dt.SortablejsModule],declarations:[Ki],exports:[Ki]})],t)}(),Qi=[ki,Ei,Li],$i=[wi],qi=function(){function t(){}return t=vt([e.NgModule({imports:[Co,s.CommonModule,wo,Ge,o.ReactiveFormsModule,Mi,se,xo,Io,Hi,to,Wi],declarations:[Qi,$i],exports:[Qi,$i,Hi],entryComponents:[Qi]})],t)}();
246
+ */function zi(t){return void 0===t&&(t=!1),'\n <div data-is-floating class="dato-select__option \n dato-select__option--simple\n ellipsis \n dato-select__option--hover"\n >\n '+(t?'\n <dato-checkbox [checked]="checked" [disabled]="disabled" (check)="toggleChecked($event)" [indeterminatelyChecked]="indeterminatelyChecked">\n <ng-content></ng-content>\n </dato-checkbox>\n ':"<ng-content></ng-content>")+" \n </div>\n "}var Bi=[Ci,bi,Ni,Fi,Gi,Vi],Hi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,wo,Ge,o.ReactiveFormsModule,Mi,se,xo,Io],declarations:[Bi],exports:[Bi],entryComponents:[Bi]})],t)}(),Ui=function(){function t(t,e){this.renderer=t,this.host=e,t.addClass(e.nativeElement,"dato-sortable-handler")}return t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoSortableHandle]"}),Ct("design:paramtypes",[e.Renderer2,e.ElementRef])],t)}(),Ki=[ui,Ui],Wi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,dt.SortablejsModule],declarations:[Ki],exports:[Ki]})],t)}(),$i=[ki,Ei,Li],Qi=[wi],qi=function(){function t(){}return t=vt([e.NgModule({imports:[Co,s.CommonModule,wo,Ge,o.ReactiveFormsModule,Mi,se,xo,Io,Hi,to,Wi],declarations:[$i,Qi],exports:[$i,Qi,Hi],entryComponents:[$i]})],t)}();
247
247
  /**
248
248
  * @license
249
249
  * Copyright Datorama. All Rights Reserved.
@@ -258,7 +258,7 @@ var Yi=function(t,e,n){var o=Lt(t[n])?"":(""+t[n]).toLocaleLowerCase();return!!o
258
258
  *
259
259
  * Use of this source code is governed by an Apache License 2.0 license that can be
260
260
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
261
- */function rr(){return mt({},ir)}function ar(){var t=localStorage.getItem("GRID_STORE");return t?JSON.parse(t):{}}function sr(t,e){if(!t)throw new Error("gridName required.");var n=lr(t),o=mt(mt({},n),e),i=rr(),r=ar();r[i.cacheKey]=r[i.cacheKey]||{},r[i.cacheKey][t]=o,localStorage.setItem("GRID_STORE",JSON.stringify(r))}function lr(t){if(!t)throw new Error("gridName required.");var e=ar(),n=rr();return n.cacheKey&&e?(e=e[n.cacheKey])&&e[t]||{}:{filter:null,sort:null}}function cr(t){var e={},n=t.getColumnState().filter((function(t){return null!=t.sort}));return n.forEach((function(t){e[t.colId]=t.sortIndex})),n.map((function(t){return{colId:t.colId,sort:t.sort}})).sort((function(t,n){return e[t.colId]-e[n.colId]}))}function pr(t,e){void 0===e&&(e=[]);var n=e.map((function(t,e){return{colId:t.colId,sort:t.sort,sortIndex:e}}));return t.applyColumnState({state:n,defaultState:{sort:null}})}
261
+ */function rr(){return mt({},ir)}function ar(){var t=localStorage.getItem("GRID_STORE");return t?JSON.parse(t):{}}function sr(t,e){if(!t)throw new Error("gridName required.");var n=lr(t),o=mt(mt({},n),e),i=rr(),r=ar();r[i.cacheKey]=r[i.cacheKey]||{},r[i.cacheKey][t]=o,localStorage.setItem("GRID_STORE",JSON.stringify(r))}function lr(t){if(!t)throw new Error("gridName required.");var e=ar(),n=rr();return n.cacheKey&&e?(e=e[n.cacheKey])&&e[t]||{}:{filter:null,sort:null}}function cr(t){var e={},n=(t.getColumnState()||[]).filter((function(t){return null!=t.sort}));return n.forEach((function(t){e[t.colId]=t.sortIndex})),n.map((function(t){return{colId:t.colId,sort:t.sort}})).sort((function(t,n){return e[t.colId]-e[n.colId]}))}function pr(t,e){void 0===e&&(e=[]);var n=e.map((function(t,e){return{colId:t.colId,sort:t.sort,sortIndex:e}}));return t.applyColumnState({state:n,defaultState:{sort:null}})}
262
262
  /**
263
263
  * @license
264
264
  * Copyright Datorama. All Rights Reserved.
@@ -272,14 +272,14 @@ var Yi=function(t,e,n){var o=Lt(t[n])?"":(""+t[n]).toLocaleLowerCase();return!!o
272
272
  *
273
273
  * Use of this source code is governed by an Apache License 2.0 license that can be
274
274
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
275
- */var ur=function(t){function n(){return t.call(this,{settings:{sort:void 0,filter:{},groupedColumns:[],columnsOrder:[],pinnedColumns:[],hiddenColumns:[],columnsSizes:null,gridAlignment:0,searchTerm:null},serverSidePagination:{enabled:!1,totalRows:null,hasError:!1,selectAllRowsEnabled:!1,excludedFromSelectAll:[]}})||this}return ft(n,t),n=vt([e.Injectable(),Z.StoreConfig({name:"grid"}),Ct("design:paramtypes",[])],n)}(Z.Store);function hr(t,e){return t.reduce((function(t,n){var o=n.getColDef();return t[n.getColId()]=e&&o.originalWidth||o.width||n.getActualWidth(),t}),{})}function gr(t){var e=t.field,n=t.showRowGroup,o=t.pivotValueColumn;return o?o.getColId():e||n}function fr(t){var e;try{e=JSON.parse(t)}catch(t){}return e}function mr(t,e){return!t.disabledHTMLRenderingFields||!t.disabledHTMLRenderingFields.includes(gr(e))}var yr,vr,br,Cr,wr=function(t){function o(e){var o=t.call(this,e)||this;return o.store=e,o._gridReady=new n.BehaviorSubject(!1),o.gridReady$=o._gridReady.asObservable().pipe(r.filter((function(t){return t}))),o._serverDataLoaded=new n.Subject,o.serverDataLoaded$=o._serverDataLoaded.asObservable(),o._rowActionVisibilityChanged=new n.Subject,o.rowActionVisibilityChanged$=o._rowActionVisibilityChanged.asObservable(),o.rowDataChanged$=o.waitForGrid((function(){return n.merge(o.gridRef.rowDataChanged,o.gridRef.rowDataUpdated,o.gridRef.filterChanged,o.serverDataLoaded$)})),o.selectedRowsChange$=o.waitForGrid((function(){return n.fromEvent(o.api.grid,lt.Events.EVENT_SELECTION_CHANGED).pipe(r.map((function(t){return t.api.getSelectedRows()})))})),o.rowsSelectionData$=o.waitForGrid((function(){return n.merge(o.selectedRowsChange$,o.rowDataChanged$,o.selectServerPaginationConfig(),o.waitForGrid((function(){return n.merge(o.gridRef.sortChanged,o.gridRef.paginationChanged)}))).pipe(r.map((function(){var t=o.isServerSide?o.serverSideConfig.totalRows:o.api.grid.getDisplayedRowCount(),e=o.getSelectedRowsCount(),n=o.getCurrentPageRows(),i=ye(n.filter((function(t){return t.isSelected()})));return{totalRowsCount:t,selectedRowsCount:e,selectedPageRowsCount:i,isAllPageRowsSelected:i>0&&i===ye(n)||o.isServerSelectAllRowsEnabled&&Z.isEmpty(o.serverSideConfig.excludedFromSelectAll)}})))})),o.filterActive$=o.select((function(t){return t.settings})).pipe(r.map((function(t){var e=t.filter,n=t.searchTerm;return ye(e)>0||!!n}))),o.serverSideError$=o.select((function(t){return t.serverSidePagination.hasError})),o}return ft(o,t),Object.defineProperty(o.prototype,"serverSideConfig",{get:function(){return this.getValue().serverSidePagination},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isServerSide",{get:function(){return this.serverSideConfig.enabled},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isServerSelectAllRowsEnabled",{get:function(){return this.serverSideConfig.selectAllRowsEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"gridAlignment",{get:function(){return this.getValue().settings.gridAlignment},enumerable:!0,configurable:!0}),o.prototype.getColumnSizes=function(){return this.getValue().settings.columnsSizes},o.prototype.getCurrentGridSettings=function(){var t=function(t){return t.getColId()},e=this.api.columns,n=e.getRowGroupColumns(),o=e.getAllColumns(),i=e.getAllGridColumns(),r=o.filter((function(t){return!t.isVisible()&&!n.includes(t)})).map(t),a=this.getValue().settings,s={gridAlignment:a.gridAlignment,sort:this.getGridOptions().sortByStore?this.getSavedSort():this.getSortModel(),hiddenColumns:r,groupedColumns:n.map(t),filter:this.getFilter(),pinnedColumns:e.getDisplayedLeftColumns().map(t),columnsOrder:i.map(t),columnsSizes:null,searchTerm:null};return 2===a.gridAlignment&&(s.columnsSizes=hr(i)),s},o.prototype.getSortModel=function(){return cr(this.api.columns).pop()},o.prototype.getSavedSort=function(){return this.getValue().settings.sort||this.getSortModel()},o.prototype.getSort=function(t){if(void 0===t&&(t=this.getSavedSort()),t){var e=t.colId,n=t.sort,o=t.sortIndex,i=this.api.columns.getColumn(e),r=this.api.columns.getAllGridColumns();if(i)return{colId:e,sort:n,field:gr(i.getColDef())};var a=this.getSecondaryColumn(e);if(a){var s=o||r.indexOf(a);return{colId:e,sort:n,field:gr(a.getColDef()),sortIndex:s}}}return{colId:null,sort:null}},o.prototype._setApi=function(t,e){this.api=t,this.gridRef=e},o.prototype.getSelectedRows=function(t){var e=this.api.grid.getSelectedRows();return t?e[0]:e},o.prototype.getSelectedRowNodes=function(t){var e=this.api.grid.getSelectedNodes();return t?e[0]:e},o.prototype.getFilter=function(){return this.getValue().settings.filter},o.prototype.selectFilter=function(){return this.select((function(t){return t.settings.filter}))},o.prototype.getExternalFilter=function(){var t=this.getFilter();return t?Object.keys(t).reduce((function(e,n){var o=t[n];return o&&e.push({field:n,filter:o}),e}),[]):[]},o.prototype.getSearchTerm=function(){return this.getValue().settings.searchTerm},o.prototype.selectSearchTerm=function(){return this.select((function(t){return t.settings.searchTerm}))},o.prototype.waitForGrid=function(t){return t?this.gridReady$.pipe(r.switchMap(t)):this.gridReady$},o.prototype.ngOnDestroy=function(){this._gridReady.complete(),this._serverDataLoaded.complete()},o.prototype.getGridOptions=function(){return this.gridRef?this.gridRef.gridOptions:null},o.prototype.selectServerPaginationConfig=function(){return this.select((function(t){return t.serverSidePagination}))},o.prototype.getSelectedRowsCount=function(){if(this.isServerSelectAllRowsEnabled){var t=this.serverSideConfig;return t.totalRows-ye(t.excludedFromSelectAll)}return ye(this.getSelectedRows())},o.prototype.getCurrentPageRows=function(){var t=[],e=this.api.grid,n=e.paginationGetPageSize(),o=e.paginationGetCurrentPage(),i=e.paginationGetRowCount(),r=o*n,a=r+n;a>i&&(a=i);var s=function(e){e.rowIndex<a&&e.rowIndex>=r&&function(e){t.push(e)}(e)};return this.isServerSide?e.forEachNode(s):e.forEachNodeAfterFilterAndSort(s),t},o.prototype.getAllColumns=function(){return this.filterCheckboxSelectionColumn(this.api.columns.getAllColumns())},o.prototype.getAllDisplayedColumns=function(){return this.filterCheckboxSelectionColumn(this.api.columns.getAllDisplayedColumns())},o.prototype.getAllPivotColumns=function(){return this.getAllColumns().filter((function(t){return t.isPivotActive()}))},o.prototype.selectIsSelectAllRowsEnabled=function(){return this.select((function(t){return t.serverSidePagination.selectAllRowsEnabled}))},o.prototype.getSecondaryColumn=function(t){var e=this.api.columns.getSecondaryColumns();return e?e.find((function(e){return e.getColId()===t})):null},o.prototype.filterCheckboxSelectionColumn=function(t){return t.filter((function(t){return!t.getUserProvidedColDef()||!t.getUserProvidedColDef().checkboxSelection}))},o.ctorParameters=function(){return[{type:ur}]},o=vt([e.Injectable(),Ct("design:paramtypes",[ur])],o)}(Z.Query);
275
+ */var ur=function(t){function n(){return t.call(this,{settings:{sort:void 0,filter:{},groupedColumns:[],columnsOrder:[],pinnedColumns:[],hiddenColumns:[],columnsSizes:null,gridAlignment:0,searchTerm:null},serverSidePagination:{enabled:!1,totalRows:null,hasError:!1,selectAllRowsEnabled:!1,excludedFromSelectAll:[]}})||this}return ft(n,t),n=vt([e.Injectable(),Z.StoreConfig({name:"grid"}),Ct("design:paramtypes",[])],n)}(Z.Store);function hr(t,e){return t.reduce((function(t,n){var o=n.getColDef();return t[n.getColId()]=e&&o.originalWidth||o.width||n.getActualWidth(),t}),{})}function gr(t){var e=t.field,n=t.showRowGroup,o=t.pivotValueColumn;return o?o.getColId():e||n}function fr(t){var e;try{e=JSON.parse(t)}catch(t){}return e}function mr(t,e){return!t.disabledHTMLRenderingFields||!t.disabledHTMLRenderingFields.includes(gr(e))}var yr,vr,br,Cr,wr=function(t){function o(e){var o=t.call(this,e)||this;return o.store=e,o._gridReady=new n.BehaviorSubject(!1),o.gridReady$=o._gridReady.asObservable().pipe(r.filter((function(t){return t}))),o._serverDataLoaded=new n.Subject,o.serverDataLoaded$=o._serverDataLoaded.asObservable(),o._rowActionVisibilityChanged=new n.Subject,o.rowActionVisibilityChanged$=o._rowActionVisibilityChanged.asObservable(),o.rowDataChanged$=o.waitForGrid((function(){return n.merge(o.gridRef.rowDataChanged,o.gridRef.rowDataUpdated,o.gridRef.filterChanged,o.serverDataLoaded$)})),o.selectedRowsChange$=o.waitForGrid((function(){return n.fromEvent(o.api.grid,lt.Events.EVENT_SELECTION_CHANGED).pipe(r.map((function(t){return t.api.getSelectedRows()})))})),o.rowsSelectionData$=o.waitForGrid((function(){return n.merge(o.selectedRowsChange$,o.rowDataChanged$,o.selectServerPaginationConfig(),o.waitForGrid((function(){return n.merge(o.gridRef.sortChanged,o.gridRef.paginationChanged)}))).pipe(r.map((function(){var t=o.isServerSide?o.serverSideConfig.totalRows:o.api.grid.getDisplayedRowCount(),e=o.getSelectedRowsCount(),n=o.getCurrentPageRows(),i=ye(n.filter((function(t){return t.isSelected()})));return{totalRowsCount:t,selectedRowsCount:e,selectedPageRowsCount:i,isAllPageRowsSelected:i>0&&i===ye(n)||o.isServerSelectAllRowsEnabled&&Z.isEmpty(o.serverSideConfig.excludedFromSelectAll)}})))})),o.filterActive$=o.select((function(t){return t.settings})).pipe(r.map((function(t){var e=t.filter,n=t.searchTerm;return ye(e)>0||!!n}))),o.serverSideError$=o.select((function(t){return t.serverSidePagination.hasError})),o}return ft(o,t),Object.defineProperty(o.prototype,"serverSideConfig",{get:function(){return this.getValue().serverSidePagination},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isServerSide",{get:function(){return this.serverSideConfig.enabled},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isServerSelectAllRowsEnabled",{get:function(){return this.serverSideConfig.selectAllRowsEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"gridAlignment",{get:function(){return this.getValue().settings.gridAlignment},enumerable:!0,configurable:!0}),o.prototype.getColumnSizes=function(){return this.getValue().settings.columnsSizes},o.prototype.getCurrentGridSettings=function(){var t=function(t){return t.getColId()},e=this.api.columns,n=e.getRowGroupColumns()||[],o=e.getAllColumns()||[],i=e.getAllGridColumns()||[],r=o.filter((function(t){return!t.isVisible()&&!n.includes(t)})).map(t),a=this.getValue().settings,s={gridAlignment:a.gridAlignment,sort:this.getGridOptions().sortByStore?this.getSavedSort():this.getSortModel(),hiddenColumns:r,groupedColumns:n.map(t),filter:this.getFilter(),pinnedColumns:(e.getDisplayedLeftColumns()||[]).map(t),columnsOrder:i.map(t),columnsSizes:null,searchTerm:null};return 2===a.gridAlignment&&(s.columnsSizes=hr(i)),s},o.prototype.getSortModel=function(){return cr(this.api.columns).pop()},o.prototype.getSavedSort=function(){return this.getValue().settings.sort||this.getSortModel()},o.prototype.getSort=function(t){if(void 0===t&&(t=this.getSavedSort()),t){var e=t.colId,n=t.sort,o=t.sortIndex,i=this.api.columns.getColumn(e),r=this.api.columns.getAllGridColumns();if(i)return{colId:e,sort:n,field:gr(i.getColDef())};var a=this.getSecondaryColumn(e);if(a){var s=o||r.indexOf(a);return{colId:e,sort:n,field:gr(a.getColDef()),sortIndex:s}}}return{colId:null,sort:null}},o.prototype._setApi=function(t,e){this.api=t,this.gridRef=e},o.prototype.getSelectedRows=function(t){var e=this.api.grid.getSelectedRows();return t?e[0]:e},o.prototype.getSelectedRowNodes=function(t){var e=this.api.grid.getSelectedNodes();return t?e[0]:e},o.prototype.getFilter=function(){return this.getValue().settings.filter},o.prototype.selectFilter=function(){return this.select((function(t){return t.settings.filter}))},o.prototype.getExternalFilter=function(){var t=this.getFilter();return t?Object.keys(t).reduce((function(e,n){var o=t[n];return o&&e.push({field:n,filter:o}),e}),[]):[]},o.prototype.getSearchTerm=function(){return this.getValue().settings.searchTerm},o.prototype.selectSearchTerm=function(){return this.select((function(t){return t.settings.searchTerm}))},o.prototype.waitForGrid=function(t){return t?this.gridReady$.pipe(r.switchMap(t)):this.gridReady$},o.prototype.ngOnDestroy=function(){this._gridReady.complete(),this._serverDataLoaded.complete()},o.prototype.getGridOptions=function(){return this.gridRef?this.gridRef.gridOptions:null},o.prototype.selectServerPaginationConfig=function(){return this.select((function(t){return t.serverSidePagination}))},o.prototype.getSelectedRowsCount=function(){if(this.isServerSelectAllRowsEnabled){var t=this.serverSideConfig;return t.totalRows-ye(t.excludedFromSelectAll)}return ye(this.getSelectedRows())},o.prototype.getCurrentPageRows=function(){var t=[],e=this.api.grid,n=e.paginationGetPageSize(),o=e.paginationGetCurrentPage(),i=e.paginationGetRowCount(),r=o*n,a=r+n;a>i&&(a=i);var s=function(e){e.rowIndex<a&&e.rowIndex>=r&&function(e){t.push(e)}(e)};return this.isServerSide?e.forEachNode(s):e.forEachNodeAfterFilterAndSort(s),t},o.prototype.getAllColumns=function(){return this.filterCheckboxSelectionColumn(this.api.columns.getAllColumns())},o.prototype.getAllDisplayedColumns=function(){return this.filterCheckboxSelectionColumn(this.api.columns.getAllDisplayedColumns())},o.prototype.getAllPivotColumns=function(){return this.getAllColumns().filter((function(t){return t.isPivotActive()}))},o.prototype.selectIsSelectAllRowsEnabled=function(){return this.select((function(t){return t.serverSidePagination.selectAllRowsEnabled}))},o.prototype.getSecondaryColumn=function(t){var e=this.api.columns.getSecondaryColumns();return e?e.find((function(e){return e.getColId()===t})):null},o.prototype.filterCheckboxSelectionColumn=function(t){return t.filter((function(t){return!t.getUserProvidedColDef()||!t.getUserProvidedColDef().checkboxSelection}))},o.ctorParameters=function(){return[{type:ur}]},o=vt([e.Injectable(),Ct("design:paramtypes",[ur])],o)}(Z.Query);
276
276
  /**
277
277
  * @license
278
278
  * Copyright Datorama. All Rights Reserved.
279
279
  *
280
280
  * Use of this source code is governed by an Apache License 2.0 license that can be
281
281
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
282
- */(vr=t.DatoGridFilterTypes||(t.DatoGridFilterTypes={})).String="String",vr.Number="Number",vr.Date="Date",vr.None="None",(br=t.DatoGridFilterSections||(t.DatoGridFilterSections={})).By_Value="By_Value",br.Conditional="Conditional",(Cr=t.DatoFilterConditions||(t.DatoFilterConditions={})).EQUALS="EQUALS",Cr.NOT_EQUALS="NOT_EQUALS",Cr.GREATER_THAN="GREATER_THAN",Cr.GREATER_EQUALS="GREATER_EQUALS",Cr.LESS_THAN="LESS_THAN",Cr.LESS_EQUALS="LESS_EQUALS",Cr.IN_RANGE="IN_RANGE",Cr.CONTAINS="CONTAINS",Cr.NOT_CONTAINS="NOT_CONTAINS",Cr.STARTS_WITH="STARTS_WITH",Cr.ENDS_WITH="ENDS_WITH",Cr.IN_LIST="IN_LIST",Cr.NOT_IN_LIST="NOT_IN_LIST",Cr.IS_EMPTY="IS_EMPTY",Cr.NOT_EMPTY="NOT_EMPTY",Cr.IS_NULL="IS_NULL",Cr.NOT_NULL="NOT_NULL";var Sr,xr,Or,Dr=[t.DatoFilterConditions.IN_RANGE,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.LESS_THAN,t.DatoFilterConditions.GREATER_THAN],Ir=[t.DatoFilterConditions.CONTAINS,t.DatoFilterConditions.NOT_CONTAINS,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.NOT_EQUALS,t.DatoFilterConditions.STARTS_WITH,t.DatoFilterConditions.ENDS_WITH],Tr=[t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.NOT_EQUALS,t.DatoFilterConditions.LESS_THAN,t.DatoFilterConditions.LESS_EQUALS,t.DatoFilterConditions.GREATER_THAN,t.DatoFilterConditions.GREATER_EQUALS,t.DatoFilterConditions.IN_RANGE],Rr=((yr={})[t.DatoGridFilterTypes.String]=Ir,yr[t.DatoGridFilterTypes.Number]=Tr,yr[t.DatoGridFilterTypes.Date]=Dr,yr);function Ar(e){return e.condition===t.DatoFilterConditions.IN_RANGE}function Er(e,n){var o=n.condition,i=n.value,r=i?i.toLowerCase():"",a=e?(""+e).toLowerCase():"";switch(o){case t.DatoFilterConditions.EQUALS:return a===r;case t.DatoFilterConditions.NOT_EQUALS:return a!==r;case t.DatoFilterConditions.CONTAINS:return a.indexOf(r)>-1;case t.DatoFilterConditions.NOT_CONTAINS:return-1===a.indexOf(r);case t.DatoFilterConditions.STARTS_WITH:return a.startsWith(r);case t.DatoFilterConditions.ENDS_WITH:return a.endsWith(r);case t.DatoFilterConditions.IS_EMPTY:return kt(a);case t.DatoFilterConditions.NOT_EMPTY:return!kt(a)}}function Pr(e,n,o){var i=n.condition,r=n.value,a=n.rangeEnd;void 0===o&&(o="");var s=e?parseFloat(e[o]||e):null,l=parseFloat(r);switch(i){case t.DatoFilterConditions.EQUALS:return s===l;case t.DatoFilterConditions.NOT_EQUALS:return s!==l;case t.DatoFilterConditions.LESS_THAN:return s<l;case t.DatoFilterConditions.LESS_EQUALS:return s<=l;case t.DatoFilterConditions.GREATER_THAN:return s>l;case t.DatoFilterConditions.GREATER_EQUALS:return s>=l;case t.DatoFilterConditions.IN_RANGE:return s>=l&&s<=parseFloat(a);case t.DatoFilterConditions.IS_EMPTY:case t.DatoFilterConditions.IS_NULL:return Lt(s);case t.DatoFilterConditions.NOT_EMPTY:case t.DatoFilterConditions.NOT_NULL:return!Lt(s)}}function kr(e,n){var o=n.condition,i=n.value,r=n.rangeEnd,a=e?ln(U.startOfDay(new Date(e))):null,s=ln(new Date(i));switch(o){case t.DatoFilterConditions.EQUALS:return U.isEqual(a,s);case t.DatoFilterConditions.NOT_EQUALS:return!U.isEqual(a,s);case t.DatoFilterConditions.GREATER_THAN:return U.isAfter(a,s);case t.DatoFilterConditions.LESS_THAN:return U.isBefore(a,s);case t.DatoFilterConditions.IN_RANGE:var l=ln(U.endOfDay(new Date(r)));return U.isEqual(a,s)||U.isEqual(a,l)||U.isAfter(a,s)&&U.isBefore(a,l);case t.DatoFilterConditions.IS_EMPTY:return Lt(e);case t.DatoFilterConditions.NOT_EMPTY:return!Lt(e)}}function _r(e){var n=e.rowValue,o=e.condition,i=e.type,r=e.filterKey;switch(i){case t.DatoGridFilterTypes.Date:return kr(n,o);case t.DatoGridFilterTypes.Number:return Pr(n,o,r);default:return Er(n,o)}}function jr(e,n){var o,i,r=e.row,a=e.api;if(n){var s=Object.keys(n),l=function(e){var o=!0,i=n[e],s=i.byValue,l=i.conditional,c=i.pivotKeys,p=r.parent&&r.parent.childrenMapped&&function t(e,n){void 0===n&&(n=[]);var o=Object.keys(e)[0],i=fr(o);i&&(n=t(e[o],xt(n,[i.value])));return n}(r.parent.childrenMapped)||[],d=a.getValue(e,r);if(c&&c.length>0&&!he(c,p))return{value:!0};if(l){var u=l.operator,h=l.conditions,g=l.type;o=h[u===t.OperatorTypes.AND?"every":"some"]((function(t){return _r({rowValue:d,condition:t,type:g,filterKey:e})}))}if(o&&s){var f=s.values.includes(d);o=s.condition===t.DatoFilterConditions.IN_LIST?f:!f}return o?void 0:{value:!1}};try{for(var c=wt(s),p=c.next();!p.done;p=c.next()){var d=l(p.value);if("object"==typeof d)return d.value}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}return!0}function Mr(t,e,n,o){return t.map((function(t){return mt(mt({},t),{visible:Lr(t,e,n,o)})}))}function Lr(t,e,n,o){var i=t.visibleWhen;return[zr(i,n,o),Nr(i),Fr(i,e),Gr(i,e),Vr(i,e)].some(Boolean)}function Nr(e){return e===t.RowSelectionTypeV2.ALWAYS||void 0===e}function Fr(e,n){return e===t.RowSelectionTypeV2.ANY&&n>0}function Gr(e,n){return e===t.RowSelectionTypeV2.SINGLE&&1===n}function Vr(e,n){return e===t.RowSelectionTypeV2.MULTI&&n>1}function zr(t,e,n){return Et(t)&&!!t(e,n)}function Br(t){var e,n,o=t.toolbarActions,i=t.selectedRows,r=t.iconRegistry,a=t.node,s=t.logger,l=me(o).filter((function(t){return Lt(t.template)})),c=a.isSelected()?de(xt([a],i)):[a],p=[],d=function(e){var n=e.label,o=e.icon,i=e.onClick,a=e.subMenu,l=e.separator;r.getSvg(o);p.push({name:n,action:function(){s&&s.log("Grids - Table Action",{action:e.key,numOfItems:c.length,from:s.eventOrigin||"Context Menu"}),i&&i(c)},icon:'<span class="da-grid-icon pointer context-item-icon '+o+'-icon">'+r.getSvg(o)+"</span>",subMenu:a?Br(mt(mt({},t),{toolbarActions:a})):null}),l&&p.push("separator")};try{for(var u=wt(l),h=u.next();!h.done;h=u.next()){d(h.value)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return p}(Sr=t.OperatorTypes||(t.OperatorTypes={})).AND="AND",Sr.OR="OR",(xr=t.GridActionType||(t.GridActionType={})).CUSTOM="CUSTOM",xr.CREATE="CREATE",xr.EXPORT="EXPORT",(Or=t.RowSelectionTypeV2||(t.RowSelectionTypeV2={}))[Or.SINGLE=0]="SINGLE",Or[Or.MULTI=1]="MULTI",Or[Or.ANY=2]="ANY",Or[Or.ALWAYS=3]="ALWAYS";var Hr,Ur,Kr,Wr,Qr=new e.InjectionToken("DATO_GRID_STORAGE_API"),$r=function(t,e,n){return t&&t.value?'<div class="value-wrapper ellipsis">'+qr(t,e,n)+"</div>":null},qr=function(t,e,n){void 0===n&&(n=!0);var o=(t.valueFormatted||t.value||"").toString();return o=n?ot.sanitize(o):Oe(o),(e=(e||"").trim())?o.replace(new RegExp(De(e),"gi"),(function(t){return'<span class="search-highlight">'+t+"</span>"})):o};(Hr=t.GridMinWidths||(t.GridMinWidths={}))[Hr.Default=107]="Default",Hr[Hr.With_Info=131]="With_Info",(Ur=t.DatoGridColumnTypes||(t.DatoGridColumnTypes={})).String="String",Ur.Number="Number",Ur.Date="Date",Ur.Status="Status",Ur.Items="Items",Ur.ItemsCount="ItemsCount",Ur.Initials="Initials",Ur.Avatar="Avatar",(Kr=t.GridRowSelectionType||(t.GridRowSelectionType={})).SINGLE="single",Kr.MULTIPLE="multiple",(Wr=t.GridStatusColumnTypes||(t.GridStatusColumnTypes={})).SUCCESS="SUCCESS",Wr.FAILURE="FAILURE",Wr.IN_PROGRESS="IN_PROGRESS",Wr.PENDING="PENDING",Wr.WAITING="WAITING";
282
+ */(vr=t.DatoGridFilterTypes||(t.DatoGridFilterTypes={})).String="String",vr.Number="Number",vr.Date="Date",vr.None="None",(br=t.DatoGridFilterSections||(t.DatoGridFilterSections={})).By_Value="By_Value",br.Conditional="Conditional",(Cr=t.DatoFilterConditions||(t.DatoFilterConditions={})).EQUALS="EQUALS",Cr.NOT_EQUALS="NOT_EQUALS",Cr.GREATER_THAN="GREATER_THAN",Cr.GREATER_EQUALS="GREATER_EQUALS",Cr.LESS_THAN="LESS_THAN",Cr.LESS_EQUALS="LESS_EQUALS",Cr.IN_RANGE="IN_RANGE",Cr.CONTAINS="CONTAINS",Cr.NOT_CONTAINS="NOT_CONTAINS",Cr.STARTS_WITH="STARTS_WITH",Cr.ENDS_WITH="ENDS_WITH",Cr.IN_LIST="IN_LIST",Cr.NOT_IN_LIST="NOT_IN_LIST",Cr.IS_EMPTY="IS_EMPTY",Cr.NOT_EMPTY="NOT_EMPTY",Cr.IS_NULL="IS_NULL",Cr.NOT_NULL="NOT_NULL";var Sr,xr,Or,Dr=[t.DatoFilterConditions.IN_RANGE,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.LESS_THAN,t.DatoFilterConditions.GREATER_THAN],Ir=[t.DatoFilterConditions.CONTAINS,t.DatoFilterConditions.NOT_CONTAINS,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.NOT_EQUALS,t.DatoFilterConditions.STARTS_WITH,t.DatoFilterConditions.ENDS_WITH],Tr=[t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.NOT_EQUALS,t.DatoFilterConditions.LESS_THAN,t.DatoFilterConditions.LESS_EQUALS,t.DatoFilterConditions.GREATER_THAN,t.DatoFilterConditions.GREATER_EQUALS,t.DatoFilterConditions.IN_RANGE],Rr=((yr={})[t.DatoGridFilterTypes.String]=Ir,yr[t.DatoGridFilterTypes.Number]=Tr,yr[t.DatoGridFilterTypes.Date]=Dr,yr);function Ar(e){return e.condition===t.DatoFilterConditions.IN_RANGE}function Er(e,n){var o=n.condition,i=n.value,r=i?i.toLowerCase():"",a=e?(""+e).toLowerCase():"";switch(o){case t.DatoFilterConditions.EQUALS:return a===r;case t.DatoFilterConditions.NOT_EQUALS:return a!==r;case t.DatoFilterConditions.CONTAINS:return a.indexOf(r)>-1;case t.DatoFilterConditions.NOT_CONTAINS:return-1===a.indexOf(r);case t.DatoFilterConditions.STARTS_WITH:return a.startsWith(r);case t.DatoFilterConditions.ENDS_WITH:return a.endsWith(r);case t.DatoFilterConditions.IS_EMPTY:return kt(a);case t.DatoFilterConditions.NOT_EMPTY:return!kt(a)}}function Pr(e,n,o){var i=n.condition,r=n.value,a=n.rangeEnd;void 0===o&&(o="");var s=e?parseFloat(e[o]||e):null,l=parseFloat(r);switch(i){case t.DatoFilterConditions.EQUALS:return s===l;case t.DatoFilterConditions.NOT_EQUALS:return s!==l;case t.DatoFilterConditions.LESS_THAN:return s<l;case t.DatoFilterConditions.LESS_EQUALS:return s<=l;case t.DatoFilterConditions.GREATER_THAN:return s>l;case t.DatoFilterConditions.GREATER_EQUALS:return s>=l;case t.DatoFilterConditions.IN_RANGE:return s>=l&&s<=parseFloat(a);case t.DatoFilterConditions.IS_EMPTY:case t.DatoFilterConditions.IS_NULL:return Lt(s);case t.DatoFilterConditions.NOT_EMPTY:case t.DatoFilterConditions.NOT_NULL:return!Lt(s)}}function kr(e,n){var o=n.condition,i=n.value,r=n.rangeEnd,a=e?ln(U.startOfDay(new Date(e))):null,s=ln(new Date(i));switch(o){case t.DatoFilterConditions.EQUALS:return U.isEqual(a,s);case t.DatoFilterConditions.NOT_EQUALS:return!U.isEqual(a,s);case t.DatoFilterConditions.GREATER_THAN:return U.isAfter(a,s);case t.DatoFilterConditions.LESS_THAN:return U.isBefore(a,s);case t.DatoFilterConditions.IN_RANGE:var l=ln(U.endOfDay(new Date(r)));return U.isEqual(a,s)||U.isEqual(a,l)||U.isAfter(a,s)&&U.isBefore(a,l);case t.DatoFilterConditions.IS_EMPTY:return Lt(e);case t.DatoFilterConditions.NOT_EMPTY:return!Lt(e)}}function _r(e){var n=e.rowValue,o=e.condition,i=e.type,r=e.filterKey;switch(i){case t.DatoGridFilterTypes.Date:return kr(n,o);case t.DatoGridFilterTypes.Number:return Pr(n,o,r);default:return Er(n,o)}}function jr(e,n){var o,i,r=e.row,a=e.api;if(n){var s=Object.keys(n),l=function(e){var o=!0,i=n[e],s=i.byValue,l=i.conditional,c=i.pivotKeys,p=r.parent&&r.parent.childrenMapped&&function t(e,n){void 0===n&&(n=[]);var o=Object.keys(e)[0],i=fr(o);i&&(n=t(e[o],xt(n,[i.value])));return n}(r.parent.childrenMapped)||[],d=a.getValue(e,r);if(c&&c.length>0&&!he(c,p))return{value:!0};if(l){var u=l.operator,h=l.conditions,g=l.type;o=h[u===t.OperatorTypes.AND?"every":"some"]((function(t){return _r({rowValue:d,condition:t,type:g,filterKey:e})}))}if(o&&s){var f=s.values.includes(d);o=s.condition===t.DatoFilterConditions.IN_LIST?f:!f}return o?void 0:{value:!1}};try{for(var c=wt(s),p=c.next();!p.done;p=c.next()){var d=l(p.value);if("object"==typeof d)return d.value}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}return!0}function Mr(t,e,n,o){return t.map((function(t){return mt(mt({},t),{visible:Lr(t,e,n,o)})}))}function Lr(t,e,n,o){var i=t.visibleWhen;return[zr(i,n,o),Nr(i),Fr(i,e),Gr(i,e),Vr(i,e)].some(Boolean)}function Nr(e){return e===t.RowSelectionTypeV2.ALWAYS||void 0===e}function Fr(e,n){return e===t.RowSelectionTypeV2.ANY&&n>0}function Gr(e,n){return e===t.RowSelectionTypeV2.SINGLE&&1===n}function Vr(e,n){return e===t.RowSelectionTypeV2.MULTI&&n>1}function zr(t,e,n){return Et(t)&&!!t(e,n)}function Br(t){var e,n,o=t.toolbarActions,i=t.selectedRows,r=t.iconRegistry,a=t.node,s=t.logger,l=me(o).filter((function(t){return Lt(t.template)})),c=a.isSelected()?de(xt([a],i)):[a],p=[],d=function(e){var n=e.label,o=e.icon,i=e.onClick,a=e.subMenu,l=e.separator;r.getSvg(o);p.push({name:n,action:function(){s&&s.log("Grids - Table Action",{action:e.key,numOfItems:c.length,from:s.eventOrigin||"Context Menu"}),i&&i(c)},icon:'<span class="da-grid-icon pointer context-item-icon '+o+'-icon">'+r.getSvg(o)+"</span>",subMenu:a?Br(mt(mt({},t),{toolbarActions:a})):null}),l&&p.push("separator")};try{for(var u=wt(l),h=u.next();!h.done;h=u.next()){d(h.value)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return p}(Sr=t.OperatorTypes||(t.OperatorTypes={})).AND="AND",Sr.OR="OR",(xr=t.GridActionType||(t.GridActionType={})).CUSTOM="CUSTOM",xr.CREATE="CREATE",xr.EXPORT="EXPORT",(Or=t.RowSelectionTypeV2||(t.RowSelectionTypeV2={}))[Or.SINGLE=0]="SINGLE",Or[Or.MULTI=1]="MULTI",Or[Or.ANY=2]="ANY",Or[Or.ALWAYS=3]="ALWAYS";var Hr,Ur,Kr,Wr,$r=new e.InjectionToken("DATO_GRID_STORAGE_API"),Qr=function(t,e,n){return t&&t.value?'<div class="value-wrapper ellipsis">'+qr(t,e,n)+"</div>":null},qr=function(t,e,n){void 0===n&&(n=!0);var o=(t.valueFormatted||t.value||"").toString();return o=n?ot.sanitize(o):Oe(o),(e=(e||"").trim())?o.replace(new RegExp(De(e),"gi"),(function(t){return'<span class="search-highlight">'+t+"</span>"})):o};(Hr=t.GridMinWidths||(t.GridMinWidths={}))[Hr.Default=107]="Default",Hr[Hr.With_Info=131]="With_Info",(Ur=t.DatoGridColumnTypes||(t.DatoGridColumnTypes={})).String="String",Ur.Number="Number",Ur.Date="Date",Ur.Status="Status",Ur.Items="Items",Ur.ItemsCount="ItemsCount",Ur.Initials="Initials",Ur.Avatar="Avatar",(Kr=t.GridRowSelectionType||(t.GridRowSelectionType={})).SINGLE="single",Kr.MULTIPLE="multiple",(Wr=t.GridStatusColumnTypes||(t.GridStatusColumnTypes={})).SUCCESS="SUCCESS",Wr.FAILURE="FAILURE",Wr.IN_PROGRESS="IN_PROGRESS",Wr.PENDING="PENDING",Wr.WAITING="WAITING";
283
283
  /**
284
284
  * @license
285
285
  * Copyright Datorama. All Rights Reserved.
@@ -323,7 +323,7 @@ var sa,la=function(){function t(t){this.host=t}return t.prototype.ngOnInit=funct
323
323
  *
324
324
  * Use of this source code is governed by an Apache License 2.0 license that can be
325
325
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
326
- */var ya,va=function(t){return t.value},ba=function(t){return{id:t,label:Lt(t)?"(Empty)":(""+t).trim(),value:t}},Ca=function(t,e){var n=t.value,o=t.formattedValue;return{id:e&&n?n[e]:n,label:Lt(o)?"(Empty)":(""+(e?o[e]:o)).trim(),value:e&&n?n[e]:n}},wa=function(){function a(e,n,i,r,a){var s,l=this;this.host=e,this.popover=n,this.fb=i,this.translate=r,this.cdr=a,this.gridFilterTypes=t.DatoGridFilterTypes,this.columnValues=[],this.listOptions=[],this.filterSections=((s={})[t.DatoGridFilterSections.By_Value]=!0,s[t.DatoGridFilterSections.Conditional]=!0,s),this.rangeOperand=t.DatoFilterConditions.IN_RANGE,this.isClientSideGrid=!1,this.listSearchControl=new o.FormControl,this.loadingList=!1,this.serverSearchErrored=!1,this.applyHotKeyConfig={keys:"meta.enter",handler:function(){return l.closePopUp()},description:"core.apply-filters"},this.hotKeyTooltip=ma(this.applyHotKeyConfig.keys),this.activeAccordionId=0,this.showClearFiltersButton=!0,this.excludedValues=new Set}return Object.defineProperty(a.prototype,"operatorToggler",{set:function(t){t&&this.inputConditionsOperator&&(t.forEach((function(t){t.isDisabled||t.setDisabledState(!0)})),this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"byValueControl",{get:function(){return this.filterForm.get("byValue")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditionsControls",{get:function(){return this.conditions.controls},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditionsOperator",{get:function(){return this.filterForm.get("conditional.operator").value},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultOperand",{get:function(){return this.fb.group({type:[this.conditionalFilterOptions[0]],value:[null,o.Validators.required],rangeEnd:[null]})},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isPredefinedListItems",{get:function(){var t=this.colDef.filtersConfig,e=void 0===t?{}:t;return e.predefinedListValues&&"object"==typeof e.predefinedListValues[0]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultConditional",{get:function(){return this.fb.group({operator:[this.inputConditionsOperator||t.OperatorTypes.AND],conditions:this.fb.array([this.defaultOperand])})},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultByValue",{get:function(){return[this.columnValues]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultForm",{get:function(){var t={};return this.filterSections.By_Value&&(t.byValue=this.defaultByValue),this.filterSections.Conditional&&(t.conditional=this.defaultConditional),this.fb.group(t)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditions",{get:function(){return this.filterForm.get("conditional.conditions")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"colFilter",{get:function(){var t=this.gridQuery.getFilter()[this.colField];return t&&he(this.pivotKeys,t.pivotKeys)?t:null},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"colDef",{get:function(){return this.popover.data.column.getColDef()},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pivotKeys",{get:function(){return this.colDef.pivotKeys||[]},enumerable:!0,configurable:!0}),a.prototype.ngOnInit=function(){var e,n=this,o=this.popover.data,a=o.gridService,s=o.gridQuery,l=this.colDef,c=l.filter,p=l.pivotValueColumn,d=l.pivotKeys,u=s.api.columns.getAllColumns().map((function(t){return t.getColDef()}));this.colField=gr(this.colDef);var h,g=u.find((function(t){return t.field===n.colField})),f=g.filtersConfig||this.colDef.filtersConfig||{},m=c||g.filter,y=Rr[m];if(this.pivotColumn=s.api.columns.getSecondaryPivotColumn(d,p),this.inputConditionsOperator=f.inputConditionsOperator,Lt(f.showClearFiltersButton)||(this.showClearFiltersButton=f.showClearFiltersButton),f.sections&&(this.filterSections=((e={})[f.sections]=!0,e)),this.keepPredefinedListOriginalOrder=f.keepPredefinedListOriginalOrder&&!kt(f.predefinedListValues),this.filterType=y?m:t.DatoGridFilterTypes.String,this.listLabelType=this.filterType.toLowerCase(),this.listSortByKey=this.filterType===t.DatoGridFilterTypes.Number&&this.colDef.valueFormatter?"id":"label",this.gridQuery=s,this.gridService=a,this.hasFilter$=this.gridQuery.select((function(t){return t.settings.filter[n.colField]})).pipe(r.map((function(t){return!Lt(t)&&he(t.pivotKeys,n.pivotKeys)}))),this.filterSections.Conditional){var v=y||Ir;if(f.showEmptyConditions){var b=[t.DatoFilterConditions.IS_EMPTY,t.DatoFilterConditions.NOT_EMPTY];this.filterType===t.DatoGridFilterTypes.Number&&(b=[t.DatoFilterConditions.IS_NULL,t.DatoFilterConditions.NOT_NULL]),v=xt(v,b)}this.conditionalFilterOptions=v.map((function(e,o){return{id:o,operand:e,label:n.translate.transform("core."+(n.filterType===t.DatoGridFilterTypes.Date?"DATE_":"")+e)}}))}if(this.filterSections.By_Value){var C=f.predefinedListValues;if(this.isClientSideGrid=!Lt(C)||!s.isServerSide,!C||this.isStringArray(C)){if(S=C)this.columnValues=S,this.listOptions=S.map(ba);else{var w=this.getColumnValues().filter((function(t){return!Lt(t.value)}));this.columnValues=w.map((function(t){var e=t.value;return!Lt(n.pivotColumn)&&e?e[n.colField]:e})),this.listOptions=w.map((function(t){return Ca(t,!Lt(n.pivotColumn)&&n.colField)}))}}else{var S=C;this.columnValues=S.map(va),this.listOptions=S}h=this.listOptions,this.isClientSideGrid||this.listSearchControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(t){n.serverSearchErrored=!1,""===t.trim()?(n.loadingList=!1,n.listOptions=h,n.patchAndReRegister(n.columnValues),n.cdr.detectChanges()):n.getValuesFromServer(t)}))}this.initForm()},a.prototype.closePopUp=function(){this.applyFilters(),this.popover.close()},a.prototype.applyFilters=function(){if(this.filterForm.valid&&this.filterForm.updateValueAndValidity(),this.filterForm.dirty&&(this.filterForm.valid||this.filterForm.get("conditional").pristine)){var t=this.popover.data.column,e=this.buildFilter();kt(e)?this.gridService.clearColumnFilter(this.colField):this.gridService.setColumnFilter(t,e),this.gridService.notifyFilterUpdate()}},a.prototype.clearFilters=function(){this.gridService.clearColumnFilter(this.colField),this.resetForm()},a.prototype.removeCondition=function(t){this.conditions.removeAt(t),this.filterForm.markAsDirty()},a.prototype.addCondition=function(){this.filterForm.markAsPristine(),this.conditions.push(this.defaultOperand)},a.prototype.getOperandType=function(t){var e=this.conditions.at(t).value.type;return e?e.operand:null},a.prototype.isConditionalEmpty=function(t){var e=t&&t.value&&t.value.type?t.value.type.operand:null;return this.isEmptyOperand(e)},a.prototype.ngOnDestroy=function(){this.byValueSubscription&&this.byValueSubscription.unsubscribe()},a.prototype.getByValueExcludeValues=function(t,e){var n;if(void 0===e&&(e=!1),this.isPredefinedListItems){var o=this.colDef.filtersConfig.predefinedListValues;n=new Set(t.map((function(t){return o.find((function(e){return e.value===t})).id})))}else n=new Set(t.map((function(t){return Pt(t)?t.value:t})));return e?this.listOptions.filter((function(t){var e=t.value;return!n.has(e)})):this.columnValues.filter((function(t){return!n.has(t)}))},a.prototype.buildFilter=function(){var t=this,e=this.filterForm.value,n=e.byValue,o=e.conditional,i={};return this.filterSections.Conditional&&this.setConditionalFilter(i,o),this.filterSections.By_Value&&this.setByValueFilter(i,n),(i.byValue||i.conditional)&&(i.colId=this.colDef.colId,i.pivotKeys=this.pivotKeys,this.pivotColumn&&(i.pivotFieldsMap=this.getPivotFields(this.pivotColumn.getParent()).reduce((function(e,n,o){return t.pivotKeys[o]&&(e[n]=t.pivotKeys[o]),e}),{}))),i},a.prototype.initForm=function(){var t=this.colFilter;this.filterForm=t?this.buildFormFromFilter(t):this.defaultForm,this.registerOperandListeners(),!this.isClientSideGrid&&this.filterSections.By_Value&&this.registerByValueListener()},a.prototype.buildFormFromFilter=function(t){var e={};return this.filterSections.Conditional&&(e.conditional=this.buildConditionalFilter(t.conditional)),this.filterSections.By_Value&&(e.byValue=this.buildByValueFilter(t.byValue)),this.fb.group(e)},a.prototype.resetForm=function(){this.filterForm.setErrors(null);var e={};if(this.filterSections.By_Value&&(e={byValue:this.columnValues}),this.filterSections.Conditional){e=mt(mt({},e),{conditional:{operator:t.OperatorTypes.AND,conditions:[{type:this.conditionalFilterOptions[0],value:null,rangeEnd:null}]}});var n=this.filterForm.controls.conditional;n.removeControl("conditions"),n.addControl("conditions",this.fb.array([this.defaultOperand]))}this.filterForm.reset(e,{emitEvent:!1}),this.filterForm.updateValueAndValidity()},a.prototype.getColumnValues=function(){var e,n=[],o=this.colFilter,i={},r=o&&o.byValue&&o.byValue.condition,a=this.gridQuery.api.grid,s=ve(this.getValueAndFormattedValue)(this.colField,a,this.colDef.valueFormatter);if(this.isClientSideGrid)a.forEachNodeAfterFilterAndSort((function(t){n.push(s(t)),i[t.id]=!0}));else{var l=a.paginationGetPageSize(),c=l*a.paginationGetCurrentPage(),p=c+l;a.forEachNode((function(t){var e=t.rowIndex;e>=c&&e<p&&n.push(s(t))}))}if(r)if(r===t.DatoFilterConditions.NOT_IN_LIST){var d=this.colDef.valueFormatter,u=o.byValue.values.map((function(t){return{value:t,formattedValue:d?d({value:t}):t}}));n=n.concat(u)}else{var h=this.colFilter.conditional,g=mt(mt({},this.gridQuery.getFilter()),((e={})[this.colField]={conditional:h},e));a.forEachLeafNode((function(t){!i.hasOwnProperty(t.id)&&jr({row:t,api:a},g)&&n.push(s(t))}))}return ue(n,"value")},a.prototype.getValueAndFormattedValue=function(t,e,n,o){var i=e.getValue(t,o);return{value:i,formattedValue:n?n({value:i}):i}},a.prototype.setConditionalFilter=function(e,n){var o=this,i=n.operator,r=n.conditions;r.filter((function(t){var e=t.value,n=t.type;return!Lt(e)||o.isEmptyOperand(n.operand)})).length&&(e.conditional={type:this.colDef.filter||t.DatoGridFilterTypes.String,operator:i,conditions:r.map((function(e){var n=e.value,i=e.type,r=e.rangeEnd,a={condition:i.operand,value:n};if(i.operand===t.DatoFilterConditions.IN_RANGE){var s=mt(mt({},a),{rangeEnd:r});if(o.filterType===t.DatoGridFilterTypes.Date){var l=n,c=l.from,p=l.to;s={condition:i.operand,value:c,rangeEnd:p}}return s}return a}))})},a.prototype.setByValueFilter=function(e,n){if(this.isClientSideGrid){var o=this.columnValues.length;if(n.length!==o){var i=n.length<o/2?t.DatoFilterConditions.IN_LIST:t.DatoFilterConditions.NOT_IN_LIST;e.byValue={condition:i,values:i===t.DatoFilterConditions.IN_LIST?n:this.getByValueExcludeValues(n)}}}else{var r=Array.from(this.excludedValues.values());r.length>0&&(e.byValue={condition:t.DatoFilterConditions.NOT_IN_LIST,values:r})}},a.prototype.buildByValueFilter=function(e){return e?(e.values.length&&this.filterSections.Conditional&&(this.activeAccordionId=1),e.condition===t.DatoFilterConditions.NOT_IN_LIST?(this.isClientSideGrid||(this.excludedValues=new Set(e.values)),[this.getByValueExcludeValues(e.values)]):[e.values]):this.defaultByValue},a.prototype.buildConditionalFilter=function(t){return t?this.fb.group({operator:[this.inputConditionsOperator||t.operator],conditions:this.fb.array(this.buildConditions(t.conditions))}):this.defaultConditional},a.prototype.buildConditions=function(t){var e=this;return t.map((function(t){var n=t.condition,i=t.value,r={type:[{id:e.conditionalFilterOptions.findIndex((function(t){return t.operand===n})),operand:n,label:"core."+n}],value:[i,o.Validators.required],rangeEnd:null};return Ar(t)&&(r.rangeEnd=[t.rangeEnd,o.Validators.required],r.value=[{from:t.value,to:t.rangeEnd},o.Validators.required]),e.fb.group(r)}))},a.prototype.registerOperandListeners=function(){var e=this;this.conditions&&this.conditions.valueChanges.pipe(r.startWith(this.conditions.length),r.map((function(){return e.conditions.length})),r.distinctUntilChanged(),r.switchMap((function(){var t=e.conditions.controls.map((function(t,e){return t.get("type").valueChanges.pipe(r.map((function(t){return{value:t,index:e}})))}));return n.merge.apply(void 0,xt(t))})),i.untilDestroyed(this)).subscribe((function(n){var o=n.value.operand,i=n.index,r={index:i,inRange:o===t.DatoFilterConditions.IN_RANGE};e.filterType===t.DatoGridFilterTypes.Date?e.updateDateInput(r):e.filterType===t.DatoGridFilterTypes.Number&&e.updateNumberInput(r),e.updateValueControlValidator(o,i)}))},a.prototype.updateDateInput=function(t){var e=t.inRange,n=t.index,o=this.conditions.at(n).get("value"),i=o.value;e&&"string"==typeof i?o.patchValue({from:i,to:i,id:"CUSTOM"}):!e&&i&&"object"==typeof i&&o.patchValue(i.from)},a.prototype.updateNumberInput=function(t){var e=t.inRange,n=t.index,i=e?o.Validators.required:null,r=this.conditions.at(n).get("rangeEnd");r.setValidators(i),r.updateValueAndValidity()},a.prototype.updateValueControlValidator=function(t,e){var n=this.isEmptyOperand(t)?null:o.Validators.required,i=this.conditions.at(e).get("value");i.setValidators(n),i.updateValueAndValidity()},a.prototype.isEmptyOperand=function(e){return e===t.DatoFilterConditions.IS_EMPTY||e===t.DatoFilterConditions.NOT_EMPTY||e===t.DatoFilterConditions.IS_NULL||e===t.DatoFilterConditions.NOT_NULL},a.prototype.isStringArray=function(t){return Mt(t[0])},a.prototype.getValuesFromServer=function(e){var n,o=this;this.loadingList=!0,this.listOptions=[];var i={failCallback:function(){o.loadingList=!1,o.serverSearchErrored=!0,o.listOptions=[],o.cdr.detectChanges()},successCallback:function(t){o.loadingList=!1;var e=t.map((function(t){return t[o.colField]}));o.listOptions=e.map(ba),o.patchAndReRegister(e),o.cdr.detectChanges()},serverConfig:{pageSize:30,pageNumber:1,columnFilters:(n={},n[this.colField]={operator:t.OperatorTypes.AND,filters:[{condition:t.DatoFilterConditions.CONTAINS,value:e}]},n),sort:[],columnsToReturn:[this.colField],distinctResults:!0}};this.gridService._originalGetRows(i),this.cdr.detectChanges()},a.prototype.patchAndReRegister=function(t){this.byValueSubscription.unsubscribe(),this.byValueControl.patchValue(this.getNonExcludedValues(t)),this.registerByValueListener()},a.prototype.registerByValueListener=function(){var t=this,e=this.byValueControl;this.byValueSubscription=e.valueChanges.pipe(r.startWith(e.value),r.pairwise()).subscribe((function(e){var n=St(e,2),o=n[0],i=n[1],r=i.length<o.length;(r?le(o,i):le(i,o)).forEach((function(e){return r?t.excludedValues.add(e):t.excludedValues.delete(e)}))}))},a.prototype.getNonExcludedValues=function(t){var e=this;return t.filter((function(t){return!e.excludedValues.has(t)}))},a.prototype.getPivotFields=function(t,e){void 0===e&&(e=[]);var n=t.getParent(),o=t.getOriginalColumnGroup().getColGroupDef().headerClass;return n&&this.getPivotFields(n,e),o&&e.push(o[0]),e},a.ctorParameters=function(){return[{type:e.ElementRef},{type:ca},{type:o.FormBuilder},{type:Mn},{type:e.ChangeDetectorRef}]},vt([e.ViewChildren("operatorToggler"),Ct("design:type",e.QueryList),Ct("design:paramtypes",[e.QueryList])],a.prototype,"operatorToggler",null),a=vt([e.Component({selector:"dato-grid-filter",template:'<form class="container primary-0-background-color" [formGroup]="filterForm" datoForm\n *datoSubscribe="hasFilter$ as hasFilter">\n <ng-container>\n <dato-accordion closeOthers="true" class="filter-options" [activeIds]="activeAccordionId">\n <ng-container *ngIf="filterSections.Conditional">\n\n <dato-accordion-group>\n <dato-accordion-header class="dato-note-bold primary-600-color" data-auto-id="conditional-filters"\n [class.primary-100-background-color]="header_1.isOpen" #header_1>\n <div class="px-10 d-flex align-start-center">\n <div class="filter-title d-flex-grow d-flex align-start-center">{{\'core.filterByCondition\' | translate}}</div>\n <dato-icon class="primary-200-color" height="18px"\n [icon]="header_1.isOpen ? \'collapse\' : \'expand\'"></dato-icon>\n </div>\n </dato-accordion-header>\n <dato-accordion-content #conditionalContent>\n <div class="conditional-content-container d-flex-column" formGroupName="conditional"\n [class.multi-conditions]="conditionsControls.length > 1">\n <div class="operand d-flex-column mb-10"\n [attr.data-auto-id]="\'condition-\' + i"\n *ngFor="let operand of conditionsControls; index as i; last as last">\n <div class="d-flex">\n <div class="d-flex-column d-flex-grow min-width-0">\n <ng-container formArrayName="conditions">\n\n <ng-container [formGroupName]="i">\n <dato-select datoSize="sm" class="mb-10" [attr.data-auto-id]="\'condition-\' + i + \'-operand\'" formControlName="type"\n datoSelectClass="operand-select"\n [dataSet]="conditionalFilterOptions"\n [isCombo]="false" #select>\n <dato-option *ngFor="let option of select.data; index as index"\n [option]="option">\n {{ option.label }}\n </dato-option>\n </dato-select>\n <ng-container [ngSwitch]="filterType">\n <div class="d-flex" *ngSwitchCase="gridFilterTypes.Date">\n <dato-date-picker [attr.data-auto-id]="\'condition-date-\' + i + \'-value\'"\n formControlName="value" class="d-flex-grow range-calendar">\n <ng-template>\n <dato-date-picker-range *ngIf="getOperandType(i) === rangeOperand; else singleDate"></dato-date-picker-range>\n <ng-template #singleDate>\n <dato-date-picker-single></dato-date-picker-single>\n </ng-template>\n </ng-template>\n </dato-date-picker>\n </div>\n <ng-container *ngIf="!isConditionalEmpty(operand)">\n <dato-input *ngSwitchCase="gridFilterTypes.String" datoSize="sm"\n (keydown.enter.stop.prevent)="closePopUp()"\n datoControlErrors [attr.data-auto-id]="\'condition-string-\' + i + \'-value\'"\n [datoControlErrorsOnBlur]="false"\n class="condition-value"\n placeholder="core.filter" formControlName="value"\n [isFocused]="conditionalContent._expanded"\n ></dato-input>\n <div class="d-flex" *ngSwitchCase="gridFilterTypes.Number">\n <dato-input-number (keydown.enter.stop.prevent)="closePopUp()" [showControls]="false"\n class="width-100 condition-value" allowNegative="true">\n <input type="number" formControlName="value" [attr.data-auto-id]="\'condition-number-\' + i + \'-value\'"\n datoInputNumber datoSize="sm" datoControlErrors [datoAutoFocus]="conditionalContent._expanded"\n [datoControlErrorsOnBlur]="false"/>\n </dato-input-number>\n <ng-container *ngIf="getOperandType(i) === rangeOperand">\n <div class="mx-5">-</div>\n <dato-input-number (keydown.enter.stop.prevent)="closePopUp()"\n class="width-100 condition-value" allowNegative="true">\n <input type="number" formControlName="rangeEnd" [attr.data-auto-id]="\'condition-number-\' + i + \'-range-end\'"\n datoInputNumber datoSize="sm" datoControlErrors\n [datoControlErrorsOnBlur]="false"/>\n </dato-input-number>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div>\n\n <dato-icon-button datoSize="md"\n datoType="none" icon="trash"\n class="overflow-hidden delete"\n datoTooltip="core.deleteFilterCondition"\n [attr.data-auto-id]="\'condition-\' + i + \'-remove\'"\n (click)="removeCondition(i)"\n datoTooltipPosition="right-start"></dato-icon-button>\n </div>\n </div>\n <dato-operator-toggler class="mt-10 justify-center width-100 d-flex" data-auto-id="operator-toggler"\n expanded="true" [datoTogglerValue]="conditionsOperator"\n *ngIf="conditionsControls.length > 1 && !last"\n formControlName="operator" #operatorToggler></dato-operator-toggler>\n </div>\n <div class="d-flex align-center">\n <dato-link *ngIf="conditionsControls.length < 3" class="no-select" datoSize="sm" data-auto-id="add-condition"\n datoType="secondary" (click)="addCondition()">\n <dato-icon height="10px" width="10px" icon="plus-simple"></dato-icon>\n {{ \'core.condition\' | translate }}\n </dato-link>\n </div>\n </div>\n </dato-accordion-content>\n </dato-accordion-group>\n <div class="separator"></div>\n </ng-container>\n <ng-container *ngIf="filterSections.By_Value">\n <dato-accordion-group class="list-content">\n <dato-accordion-header class="dato-note-bold primary-600-color" data-auto-id="by-value-filters"\n [class.primary-100-background-color]="header_2.isOpen" #header_2>\n <div class="px-10 d-flex align-start-center">\n <div class="filter-title d-flex d-flex-grow align-start-center">{{\'core.filterByValue\' | translate}}</div>\n <dato-icon class="primary-200-color" height="18px"\n [icon]="header_2.isOpen ? \'collapse\' : \'expand\'"></dato-icon>\n </div>\n </dato-accordion-header>\n <dato-accordion-content #byValueContent>\n <div class="value-content-container d-flex-column">\n <dato-input datoSize="sm" placeholder="core.search-all-values" [debounceTime]="300" #search [formControl]="listSearchControl" [isFocused]="byValueContent._expanded"></dato-input>\n <dato-list-v2 class="primary-0-background-color"\n containerHeight="195px"\n [withSelectAll]="true"\n [clientSearch]="isClientSideGrid"\n [sortByKey]="listSortByKey"\n [labelType]="listLabelType"\n [searchController]="search"\n [options]="listOptions"\n [isSortList]="!keepPredefinedListOriginalOrder"\n [loading]="loadingList"\n [noDataTpl]="isClientSideGrid ? null : noData"\n formControlName="byValue"\n data-auto-id="by-value-filters-list">\n </dato-list-v2>\n <ng-template #noData>\n <div *ngIf="serverSearchErrored; else noResults" class="mb-10 d-flex-1 d-flex-column align-center" data-auto-id="by-value-server-error">\n <img class="mt-20" datoStaticSrc="core/grid/filter-server-error.svg"/>\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ \'core.something-went-wrong\' | translate }}</p>\n <p class="dato-note-italic primary-300-color">{{ \'core.try-again-later\' | translate }}</p>\n </div>\n <ng-template #noResults>\n <dato-list-no-result class="mb-10 block" data-auto-id="by-value-no-results"></dato-list-no-result>\n </ng-template>\n </ng-template>\n </div>\n </dato-accordion-content>\n </dato-accordion-group>\n <div class="separator"></div>\n </ng-container>\n </dato-accordion>\n </ng-container>\n <div class="actions no-select px-10 py-12 d-flex align-end-center">\n <dato-link *ngIf="showClearFiltersButton" class="mr-30" datoType="secondary" datoSize="sm"\n (click)="clearFilters()" data-auto-id="clear-filters" [disabled]="!hasFilter">\n {{ \'core.clearFilters\' | translate }}\n </dato-link>\n <dato-button datoSize="sm" [datoTooltip]="hotKeyTooltip" [datoHotkeys]="applyHotKeyConfig" (click)="closePopUp()" data-auto-id="apply-filters">{{\'core.apply\' | translate}}</dato-button>\n </div>\n</form>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host dato-accordion-header{transition:background-color .2s ease-in-out}:host>.container{width:242px}:host .value-content-container dato-input{padding:10px}:host .conditional-content-container{padding:10px;transition:padding-right .2s ease-in-out}:host .conditional-content-container.multi-conditions{padding-right:0}:host .conditional-content-container.multi-conditions .delete{width:24px}:host .filter-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:40px;transition:color .2s ease-in-out}:host .separator{height:1px;width:100%}:host .delete{transition:width .2s ease-in-out;width:0}"]}),Ct("design:paramtypes",[e.ElementRef,ca,o.FormBuilder,Mn,e.ChangeDetectorRef])],a)}(),Sa=function(){function t(t){this.popover=t}return t.prototype.openMoreMenu=function(t,e,n){return void 0===n&&(n=ha),this.openMenu({tpl:n,origin:t,params:e,menuType:"more"})},t.prototype.openFilterMenu=function(t,e,n){return void 0===n&&(n=wa),this.openMenu({tpl:n,origin:t,params:e,menuType:"filter"})},t.prototype.popoverConfig=function(t,e){return{popper:{placement:"bottom-end"},className:e,data:{api:{grid:t.api,columns:t.columnApi},column:t.column,gridQuery:t.gridQuery,gridService:t.gridService}}},t.prototype.openMenu=function(t){var e=t.tpl,n=t.origin,o=t.params,i=t.menuType;return o.api.hidePopupMenu(),this.popover.open(e,n,this.popoverConfig(o,"dato-grid-"+i+"-menu"))},t.ctorParameters=function(){return[{type:da}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(da))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[da])],t)}(),xa=function(){function o(t,e,n,o){this.vcr=t,this.controller=e,this.host=n,this.cdr=o,this.moreMenuOpen=!1,this.filtersMenuOpen=!1}return o.prototype.afterGuiAttached=function(t){},o.prototype.refresh=function(t){return!1},o.prototype.agInit=function(e){var o=this;this.params=e,this.column=e.column;var a=e.column.getColDef();this.headerInfo=a.info,this.headerName=a.headerName,this.showFilter=a.filter!==t.DatoGridFilterTypes.None,this.showMoreMenu=Lt(a.moreMenuActions)||a.moreMenuActions.length>0,this.field=gr(a),this.headerTooltip=this.getHeaderTooltip(a),this.context={api:{grid:e.api,columns:e.columnApi},column:this.column};var s=this.params,l=s.gridQuery,c=s.gridService;this.customTemplates=c.getCustomHeader(this.field),this.filterActive$=l.select((function(t){return t.settings.filter[o.field]})).pipe(r.map((function(t){var e=t&&he(t.pivotKeys,a.pivotKeys);return ye(t)>0&&e}))),this.params.enableSorting&&(n.fromEvent(this.host.nativeElement,"click").pipe(i.untilDestroyed(this)).subscribe((function(){var t,e=o.column.getColDef()?o.column.getColDef().sortingOrder:null,n=o.column.getSort(),i=o.column.getColId();if(e&&e.length>0){var r=e.indexOf(n);t=e[-1===r||r===e.length-1?0:r+1]}else t="asc"!==n?"asc":"desc";c._logEvent("Grids - Column Action",{action:"Sort",column:i}),l.isServerSide&&c.setLoading(!0),l.getGridOptions().sortByStore?c.setSortByColumn(i,t):o.params.setSort(t)})),this.sortingInfo$=l.waitForGrid((function(){return l.gridRef.sortChanged})).pipe(r.startWith({}),r.map((function(){return{active:o.column.isSorting(),icon:!o.column.isSorting()||o.column.isSortAscending()?"sort-ascending":"sort-descending"}}))))},o.prototype.openFilters=function(t){var e=this;this.filtersMenuOpen=!0,this.controller.openFilterMenu(t.host.nativeElement,this.params).pipe(i.untilDestroyed(this)).subscribe((function(){e.filtersMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.openMoreMenu=function(t){var e=this;this.moreMenuOpen=!0,this.controller.openMoreMenu(t.host.nativeElement,this.params,this.customTemplates.moreMenu).pipe(i.untilDestroyed(this)).subscribe((function(){e.moreMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.ngOnDestroy=function(){},o.prototype.getHeaderTooltip=function(t){if(this.params){var e=t;if(e.showRowGroup){var n=this.params.columnApi.getRowGroupColumns(),o=n&&n.find((function(t){return t.getColId()===e.showRowGroup})),i=o&&o.getColDef();e=i||e}return e.customHeaderTooltip||e.headerName}return""},o.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:Sa},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},o=vt([e.Component({selector:"dato-grid-column-header",template:'<div class="d-flex align-start-center" [attr.data-auto-id]="field + \'-column-header\'" [attr.data-field]="field">\n <ng-container *ngIf="customTemplates && customTemplates.customHeader as customHeader">\n <div class="mr-5" [attr.data-auto-id]="field + \'-dynamic-section\'">\n <ng-container *ngTemplateOutlet="customHeader; context: context"></ng-container>\n </div>\n </ng-container>\n <div class="d-flex d-flex-grow align-start-center min-width-0 items-center">\n <span class="dato-simple-bold primary-400-color ellipsis min-width-0 mr-5" [datoTooltip]="headerTooltip"\n datoTooltipPosition="bottom">{{headerName}}</span>\n <div>\n <dato-icon class="primary-300-color" *ngIf="headerInfo" [datoTooltip]="headerInfo" datoTooltipPosition="bottom" datoIcon="question"></dato-icon>\n </div>\n </div>\n <div class="sort-icon opacity-0" *ngIf="params.enableSorting && (sortingInfo$ | async) as sortingInfo"\n [class.active]="sortingInfo.active">\n <dato-icon width="24px" height="16px" class="primary-300-color"\n [attr.data-auto-id]="field + \'-sort\'"\n [icon]="sortingInfo.icon"></dato-icon>\n </div>\n <ng-container *ngIf="showFilter">\n <div class="filter relative" *datoSubscribe="filterActive$ as filterActive">\n <dato-icon-button (click.stop)="openFilters(filters)" datoTooltip="core.filters" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-filter\'" class="filter-icon opacity-0"\n [class.active]="filtersMenuOpen || filterActive"\n datoSize="md" icon="filter"\n #filters></dato-icon-button>\n <div [class.opacity-100]="filterActive"\n class="opacity-0 filter-active-circle accent-400-background-color absolute"></div>\n </div>\n </ng-container>\n <dato-icon-button *ngIf="showMoreMenu" (click.stop)="openMoreMenu(moreMenu)" datoTooltip="core.more-options" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-more-menu\'" [class.active]="moreMenuOpen"\n datoSize="md" icon="more-vertical" #moreMenu></dato-icon-button>\n</div>\n',styles:[":host{width:100%}:host .filter-icon,:host .sort-icon{transition:opacity .25s linear,width .25s ease-in-out;width:0}:host .sort-icon{height:16px}:host .filter-icon.active,:host .sort-icon.active{opacity:1;width:24px}:host:hover .filter-icon,:host:hover .sort-icon{opacity:1;width:24px}:host .filter-active-circle{pointer-events:none;transition:opacity .2s ease-in-out;position:absolute;height:8px;width:8px;top:2px;right:2px;border-radius:4px;border:1px solid #fff}:host ::ng-deep .filter dato-icon-button dato-icon{transition:color .2s ease-in-out}"]}),Ct("design:paramtypes",[e.ViewContainerRef,Sa,e.ElementRef,e.ChangeDetectorRef])],o)}();function Oa(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}var Da=function(t){return t[ja]},Ia={getDataPath:Da,components:{fileCellRenderer:function(t){var e=t.data,n=t.eGridCell,o=t.colDef,i=e.icon,r=e.isFolder,a=e.initials,s=void 0===a||a,l=function(t,e,n){if(null===t)return null;var o=function(t,e){var n=e.expanded,o=e.collapsed;return t.parentElement.classList.contains("ag-row-group-expanded")?n:o};return void 0===t?n?o(e,{expanded:"folder-open",collapsed:"folder-closed"}):null:"string"==typeof t?t:o(e,t)}(i,n,r),c=e[o.field],p=o.gridService.svgRegistry;if(l)return'<span class="dato-simple-bold"> <span class="da-grid-icon folder d-flex">'+p.getSvg(l)+'</span><span class="entity-display-name"></span> '+c+"</span>";if(r)return'<span class="entity-display-name dato-simple-bold">'+c+"</span>";if(s){var d=Ee(c);return d?'<span class="entity-display-name dato-simple-bold"><span class="initials">'+d+"</span>"+c+"</span>":'<span class="entity-display-name dato-simple-bold">'+c+"</span>"}return'<span class="entity-display-name dato-simple-bold">'+c+"</span>"}},onRowDragMove:function(t){var e,n=t.overNode,o=(t.node,t.api);e=n?n.data.isFolder?n:n.parent:Fa(o);if(Ma){if(Ma.id===e.id)return;var i=Na(Ma.id);i&&i.classList.remove("ag-row-hover"),Ma=null}else Ma=e;if(e){var r=Na(e.id);r&&r.classList.add("ag-row-hover")}},onRowSelected:function(t){if(La)return;La=!0,e=t.node,n=t.node.selected,e.allChildrenCount>0&&e.allLeafChildren.forEach((function(t){t.setSelected(n)})),function(t){var e=t.parent;for(;e&&"ROOT_NODE_ID"!==e.id;)Ga(e),e=e.parent}(t.node),setTimeout((function(){La=!1}),0);var e,n},onRowGroupOpened:function(t){var e=t.node;this.api.refreshCells({force:!0,rowNodes:[e]})},suppressRowClickSelection:!0,groupSelectsChildren:!0,icons:{rowDrag:'<dato-icon icon="drag" class="dato-icon-font-drag primary-400-color"></dato-icon>'}};function Ta(t){return void 0===t&&(t=-1),mt(mt({},Ia),{onRowDragEnd:function(e){return function(t,e){var n,o,i=t.overNode,r=t.node,a=t.api;i?(n=r.parent,o=i.data.isFolder?i:i.parent):(n=Fa(a),o=Fa(a));var s=r.data;if(s.isFolder&&-1!==e&&"ROOT_NODE_ID"!==n.id&&i.data.agGridFilePath.length>e)return;var l=o.data?o.data[ja]:[],c=!jt(l,s[ja]),p=function t(e,n){for(var o=e.childrenAfterGroup,i=0;i<o.length;i++){if(n&&o[i].key===n.key)return!0;t(o[i],n)}return!1}(r,o);p&&console.log("invalid move");if(c&&!p){var d=[],u=this.autoGroupColumnDef.gridService.treeConfig.idKey;!function t(e,n,o,i){var r=n.data,a=n.childrenAfterGroup,s=e.slice();r[ja]=s,o.push(r),ye(a)>0&&a.forEach((function(e){t(xt(s,[r[i]]),e,o,i)}));r[ja].push(r[i])}(l,r,d,u);var h=this.autoGroupColumnDef.gridService.updateRows(d);f=xt(h.update,[i,n]),m=["ag-row-level-1","ag-row-level-2","ag-row-level-3"],f.forEach((function(t){var e,n,o=document.querySelectorAll('[row-id="'+t.id+'"]')[1];if(o){try{for(var i=wt(m),r=i.next();!r.done;r=i.next()){var a=r.value;if(o.classList.contains(a)){o.classList.remove(a);break}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}o.classList.add("ag-row-level-"+t.level)}}));var g=Na(Ma.id);g&&g.classList.remove("ag-row-hover"),Ma=null,this.api.redrawRows({rowNodes:[n,o]}),this.api.clearFocusedCell()}var f,m}(e,t)}})}var Ra=Ta(),Aa=function(t,e){return(t||"").toLowerCase().localeCompare((e||"").toLowerCase())},Ea={filter:t.DatoGridFilterTypes.String,comparator:Aa},Pa=mt({hoverConfig:{enabled:!0,maxDisplayedItems:3},enableV2_1:!1,enableSearch:!1,enableSearchHighlight:!0,columnsIncludedInSearchByDefault:!0,includeHiddenColumnsInSearch:!1,enableAllPagesSelection:!0,idColumnKey:"id",enableBackground:!0,columnTypes:(ya={},ya[t.DatoGridColumnTypes.Date]={filter:t.DatoGridFilterTypes.Date,comparator:function(t,e){return Oa(t)-Oa(e)}},ya[t.DatoGridColumnTypes.Number]={filter:t.DatoGridFilterTypes.Number},ya[t.DatoGridColumnTypes.String]=Ea,ya[t.DatoGridColumnTypes.Status]=mt(mt({},Ea),{cellRenderer:"DatoGridStatusCellComponent"}),ya[t.DatoGridColumnTypes.Items]=mt(mt({},Ea),{cellRenderer:"DatoGridItemsCellComponent"}),ya[t.DatoGridColumnTypes.ItemsCount]=mt(mt({},Ea),{cellRenderer:"DatoGridItemsCountCellComponent"}),ya[t.DatoGridColumnTypes.Initials]=mt(mt({},Ea),{cellRenderer:"DatoGridInitialsCellComponent"}),ya[t.DatoGridColumnTypes.Avatar]=mt(mt({},Ea),{cellRenderer:"DatoGridAvatarCellComponent"}),ya),multiSortKey:"ctrl",suppressPaginationPanel:!0,pagination:!0,paginateChildRows:!0,deltaColumnMode:!0,loadingOverlayComponentFramework:Yr,noRowsOverlayComponentFramework:na,defaultColDef:{minWidth:t.GridMinWidths.Default,sortable:!0,resizable:!0,type:t.DatoGridColumnTypes.String,menuTabs:["filterMenuTab"],headerComponentFramework:xa},suppressCellSelection:!0,suppressPropertyNamesCheck:!0,rowHeight:35,headerHeight:30,rowSelection:t.GridRowSelectionType.MULTIPLE,rowDeselection:!0,unSortIcon:!0,animateRows:!0,rememberGroupStateWhenNewData:!0,groupDisplayType:"multipleColumns",groupDefaultExpanded:-1,usePivotGridStyle:!1,disabledHTMLRenderingFields:[]},Ai()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),ka={CLIENT:200,SERVER:250},_a={idKey:"id",parentIDKey:"parentID"},ja="agGridFilePath";var Ma=null,La=!1;function Na(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function Fa(t){return t.getModel().getRootNode()}function Ga(t){var e=t.allLeafChildren.map((function(t){return t.selected}));if(!e.every((function(t){return!0===t||void 0===t}))){e.shift();var n=e.reduce((function(t,e){if(t===e)return t}));t.selectThisNode(n)}}function Va(t,e){var n=e.parentIDKey,o=e.idKey,i=function(e,r){void 0===r&&(r=!1);var a=r?[e[o]]:[],s=t.find((function(t){return t[o]===e[n]}));if(a.unshift(s[o]),s[n]){var l=i(s);a.unshift.apply(a,xt(l))}return a};return t.map((function(t){var e,r;return t[n]?mt(mt({},t),((e={})[ja]=i(t,!0),e)):mt(mt({},t),((r={})[ja]=[t[o]],r))}))}function za(t,e){return t.map((function(t){var n,o=yt(t,[]),i=o[ja],r=ye(i)>1?i[i.length-2]:0;return delete o[ja],mt(mt({},o),((n={})[e.parentIDKey]=r,n))}))}var Ba=new e.InjectionToken("DATO_CORE_LOGGER"),Ha=function(){function t(t,e,n){this.gridService=t,this.gridQuery=e,this.cdr=n,this.checkboxControl=new o.FormControl(!1)}return t.prototype.agInit=function(t){var e=this;this.gridApi=t.api,this.gridOptions=this.gridQuery.getGridOptions(),this.subscribeRowsSelectionData(),this.checkboxControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(t){e.toggleMultiSelection(t)}))},t.prototype.refresh=function(t){return!1},t.prototype.subscribeRowsSelectionData=function(){var t=this;this.gridQuery.gridReady$.pipe(r.take(1),r.switchMap((function(){return t.gridQuery.rowsSelectionData$})),i.untilDestroyed(this)).subscribe((function(e){var n=e.selectedPageRowsCount,o=e.isAllPageRowsSelected;t.indeterminatelyChecked=n>0&&!o,t.checkboxControl.patchValue(o,{emitEvent:!1}),t.cdr.detectChanges()}))},t.prototype.toggleMultiSelection=function(t){if(this.gridService.selectAllCurrentPageRows(t),!t&&this.gridQuery.isServerSelectAllRowsEnabled){var e=this.gridQuery.serverSideConfig,n=e.excludedFromSelectAll,o=e.totalRows,i=de(xt(n,this.gridQuery.getCurrentPageRows().map((function(t){return t.id}))));ye(i)===o?this.gridService.setServerSidePagination({selectAllRowsEnabled:!1}):this.gridService.setServerSidePagination({excludedFromSelectAll:i})}},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:Ua},{type:wr},{type:e.ChangeDetectorRef}]},t=vt([e.Component({selector:"dato-grid-multi-select-column-header",template:'<dato-checkbox [formControl]="checkboxControl" [indeterminatelyChecked]="indeterminatelyChecked"></dato-checkbox>',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{height:100%;display:flex;align-items:center}"]}),Ct("design:paramtypes",[Ua,wr,e.ChangeDetectorRef])],t)}(),Ua=function(){function o(t,e,o,i,r,a,s){this.store=t,this.gridQuery=e,this.translate=o,this.iconRegistry=i,this.svgRegistry=r,this.storageAPI=a,this.logger=s,this.treeConfig=_a,this.pageNumberToReturnAfterRefresh=-1,this.reloadGridActionsSubject=new n.Subject,this.CHECKBOX_SELECTION_COL_ID="grid-checkbox-selection"}return Object.defineProperty(o.prototype,"treeData",{get:function(){return this.isTreeData},set:function(t){this.isTreeData=t},enumerable:!0,configurable:!0}),o.prototype.ngOnDestroy=function(){},o.prototype._setApi=function(t,e){this.api=t,this.gridRef=e,this.gridName=e.gridOptions.gridName,this.setServerSidePagination({enabled:this.isServerSidePagination(e.gridOptions)})},o.prototype.isServerSidePagination=function(t){return"infinite"===t.rowModelType},o.prototype.updateGridContext=function(t,e){void 0===t&&(t={}),void 0===e&&(e=!1),this.gridQuery.getGridOptions().context=e?t:ea(this.gridRef.gridOptions.context||{},t)},o.prototype.reloadGridActions=function(){this.reloadGridActionsSubject.next()},o.prototype.onReloadGridActions=function(){return this.reloadGridActionsSubject.asObservable()},o.prototype.setSelectedRows=function(t){this.selectRows(t)},o.prototype.selectRows=function(t){var e=me(t).filter((function(t){return!t.isSelected()})),n=e.pop();e.forEach((function(t){return t.setSelected(!0,!1,!0)})),n&&n.setSelected(!0)},o.prototype.deselectRows=function(t){var e=me(t).filter((function(t){return t.isSelected()})),n=e.pop();e.forEach((function(t){return t.setSelected(!1,!1,!0)})),n&&n.setSelected(!1)},o.prototype.setRows=function(t,e,n){var o=this;void 0===e&&(e=!1),void 0===n&&(n={}),this.gridQuery.gridReady$.pipe(r.take(1)).subscribe((function(){if(o.isTreeData){o.treeConfig=mt(mt({},_a),n);var i=Va(t,o.treeConfig);o.api.grid.setRowData(i)}else o.isPivotMode?o.setPivotModeRows(t):o.api.grid.setRowData(t);e?o.fitGrid("container"):tn()}))},o.prototype.setDatasource=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1),e&&this.updatePageToKeepOnRefreshServerData(),n&&this.setLoading(!0),this._originalGetRows=t,this.api.grid.setDatasource({getRows:this.wrapGetRows(this.gridQuery.getGridOptions(),t)})},o.prototype.refreshServerData=function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),t&&this.updatePageToKeepOnRefreshServerData(),e&&this.setLoading(!0),this.api.grid.setDatasource({getRows:this.gridQuery.getGridOptions().datasource.getRows})},o.prototype.updatePageToKeepOnRefreshServerData=function(){1===this.gridQuery.getGridOptions().maxBlocksInCache&&(this.pageNumberToReturnAfterRefresh=this.api.grid.paginationGetCurrentPage())},o.prototype.addRows=function(t,e){var n={add:me(t)};return Lt(e)||(n.addIndex=e),this.api.grid.updateRowData(n)},o.prototype.updateRows=function(t){var e=me(t);return this.api.grid.updateRowData({update:e})},o.prototype.updateRowValue=function(t,e,n){(Mt(t)?this.api.grid.getRowNode(t):t).setDataValue(e,n)},o.prototype.removeRows=function(t){var e=me(t).map((function(t){return t.data}));return this.api.grid.updateRowData({remove:e})},o.prototype.removeSelectedRows=function(){var t=this.gridQuery.getSelectedRowNodes();return this.removeRows(t)},o.prototype.clearTable=function(){this.setRows([])},o.prototype.updateColumns=function(t,e){if(void 0===e&&(e=!1),!t)throw new Eo("No columnDefs were provided. 🕵🏻‍♀️");var n=this.normalizeColumns(me(t)),o=e&&this.gridQuery.getCurrentGridSettings();this.api.grid.setColumnDefs(n),o&&this.loadSavedSettings(o)},o.prototype.initGridOptions=function(e){var n=mt({},e);if(void 0===e.enableSearch&&(n.enableSearch=n.enableV2_1),void 0===e.enableBackground&&(n.enableBackground=n.enableV2_1),void 0===e.showMultiSelectionCheckboxes&&(n.showMultiSelectionCheckboxes=e.enableV2_1&&n.rowSelection!==t.GridRowSelectionType.SINGLE),void 0===e.enableSearchHighlight&&(n.enableSearchHighlight=n.enableSearch&&Pa.enableSearchHighlight),e.usePivotGridStyle){n.rowHeight=30,n.defaultColDef=mt(mt({},n.defaultColDef),{cellClassRules:this.getPivotModeCellClassRules(),headerClass:this.getPivotHeaderClass.bind(this),cellStyle:function(e){var n={lineHeight:"30px"};return e.colDef.type===t.DatoGridColumnTypes.Number&&(n.textAlign="end"),n}}),n.autoGroupColumnDef=mt(mt({},n.autoGroupColumnDef),{cellClassRules:this.getPivotModeCellClassRules(),headerClass:this.getPivotHeaderClass.bind(this)})}return n},o.prototype.normalizeOptions=function(t){var e=this;this.customHeadersTemplates=t.customHeadersTemplates;var n={gridService:this,gridQuery:this.gridQuery};if(t.gridOptions.autoGroupColumnDef=mt(mt({},n),t.gridOptions.autoGroupColumnDef),t.gridOptions.defaultColDef=mt(mt({},t.gridOptions.defaultColDef),{headerComponentParams:n}),t.gridOptions.columnDefs=this.normalizeColumns(t.gridOptions.columnDefs,t.gridOptions),t.gridOptions.isExternalFilterPresent=function(){return!0},t.gridOptions.doesExternalFilterPass=function(t){return jr({row:t,api:e.gridQuery.api.grid},e.gridQuery.getFilter())&&e.rowMatchesSearch(t)},this.isServerSidePagination(t.gridOptions)){t.gridOptions.blockLoadDebounceMillis=300,this._originalGetRows=t.gridOptions.datasource.getRows,t.gridOptions.datasource.getRows=this.wrapGetRows(t.gridOptions);var o=t.gridOptions.paginationPageSize;o&&(t.gridOptions.cacheBlockSize=o)}this.initEditableColumnsCellClass(t),t.gridOptions.getContextMenuItems=this.wrapContextMenuBuilder(t);var i=t.gridOptions,r=i.saveSettings,a=i.gridName;if(t.gridOptions.saveSettings=!1!==r&&!Lt(a),this.initOnRowSelectedForServerSidePagination(t),this.isTreeData){var s=t.gridOptions.rowClassRules;t.gridOptions.rowClassRules=mt(mt({},s),{"ag-empty-folder":function(t){return t.data.isFolder&&0===ye(t.node.childrenAfterGroup)}})}return this.isPivotMode&&(this.initPivotSecondaryColsProcess(t),t.gridOptions.saveSettings=!1),t.gridOptions},o.prototype.getPivotHeaderClass=function(t){var e=t.colDef.headerComponentParams.gridQuery,n="";if(e&&e.api){var o=e.api.columns.getSecondaryColumns();o&&o.length>0&&(n+="top-border")}return n},o.prototype.normalizeColumns=function(e,n){var o=this;void 0===n&&(n=null),n||(n=this.gridQuery.getGridOptions());var i=e.map((function(e){var i=mt(mt({},e),{headerName:o.translate.transform(e.headerName)});return e.info&&(i.minWidth=e.minWidth||t.GridMinWidths.With_Info),e.colId||(i.colId=e.field),i.type!==t.DatoGridColumnTypes.Items||i.filtersConfig||(i.filtersConfig={sections:t.DatoGridFilterSections.Conditional}),o.normalizeColumnSearchConfig(n,e,i),i}));return this.addMultiSelectHeaderColumnIfRequired(i,n)},o.prototype.normalizeColumnSearchConfig=function(e,n,o){var i=this,r=this.isServerSidePagination(e);void 0===n.includeInSearch&&(r&&n.type===t.DatoGridColumnTypes.Date?o.includeInSearch=!1:o.includeInSearch=void 0!==e.columnsIncludedInSearchByDefault?e.columnsIncludedInSearchByDefault:Pa.columnsIncludedInSearchByDefault),o.includeInSearch&&!this.hasCellRenderer(o,e)&&e.enableSearchHighlight&&(o.cellRenderer=function(t){var n=mr(e,t.colDef),r=t.column,a=t.colDef,s=r&&a?{api:t.api,columnApi:t.columnApi,context:t.context,node:t.node,data:t.data,column:r,colDef:a}:null;return(Et(o.editable)?s&&o.editable(s):o.editable)?$r(t,i.gridQuery.getSearchTerm(),n):qr(t,i.gridQuery.getSearchTerm(),n)})},o.prototype.hasCellRenderer=function(t,e){if(t.cellRenderer)return!0;var n=t.type,o=function(t){return t.columnTypes&&!!t.columnTypes[n]&&!!t.columnTypes[n].cellRenderer};return o(e)||o(Pa)},o.prototype.addMultiSelectHeaderColumnIfRequired=function(e,n){var o=n&&n.showMultiSelectionCheckboxes,i=n&&n.rowSelection?n.rowSelection:Pa.rowSelection;return o&&i===t.GridRowSelectionType.MULTIPLE?xt([{colId:this.CHECKBOX_SELECTION_COL_ID,checkboxSelection:!0,headerComponentFramework:Ha,minWidth:29,width:29,maxWidth:29,suppressSizeToFit:!0,cellClass:"checkbox-selection-cell",headerClass:"header-checkbox-selection-cell",resizable:!1,pinned:"left",lockPosition:!0,includeInSearch:!1}],e):e},o.prototype.initOnRowSelectedForServerSidePagination=function(t){var e=this,n=t.gridOptions;if(this.isServerSidePagination(n)){var o=n.onRowSelected;n.onRowSelected=function(t){if(e.gridQuery.isServerSelectAllRowsEnabled){var n=t.node,i=n.isSelected(),r=e.gridQuery.serverSideConfig.excludedFromSelectAll,a=r.includes(n.id);i&&a?e.setServerSidePagination({excludedFromSelectAll:r.filter((function(t){return t!==n.id}))}):i||a||e.setServerSidePagination({excludedFromSelectAll:xt(r,[n.id])})}o&&o(t)}}},o.prototype.rowMatchesSearch=function(t){var e,n,o=(this.gridQuery.getSearchTerm()||"").toLowerCase().trim();if(kt(o))return!0;var i=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch?this.gridQuery.getAllColumns():this.gridQuery.getAllDisplayedColumns();try{for(var r=wt(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(this.api.grid.getColumnDef(s.getColId()).includeInSearch)if((this.api.grid.getValue(s.getColId(),t)||"").toString().toLowerCase().includes(o))return!0}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!1},o.prototype.fitToContainer=function(){this.api.grid.sizeColumnsToFit()},o.prototype.getCustomHeader=function(t){if(this.customHeadersTemplates){var e=this.customHeadersTemplates.find((function(e){return e.column===t})),n=this.customHeadersTemplates.find((function(t){return!t.column}));if(e||n){var o={moreMenu:e&&e.moreMenu||n&&n.moreMenu,customHeader:e&&e.customHeader||n&&n.customHeader},i=o.moreMenu,r=o.customHeader;return{moreMenu:i&&i.tpl,customHeader:r&&r.tpl}}}return{}},o.prototype.clearAllFilters=function(){this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:{},searchTerm:null})}})),this.notifyFilterUpdate()},o.prototype.clearColumnFilter=function(t){var e=this.gridQuery.getFilter(),n=t,o=(e[n],yt(e,["symbol"==typeof n?n:n+""]));this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:o})}})),this.notifyFilterUpdate()},o.prototype.setColumnFilter=function(t,e,n){void 0===n&&(n=!0),this._logEvent("Grids - Filter Applied",{column:t.getColId(),numOfConditions:e.conditional&&e.conditional.conditions.length||0,byValue:e.byValue?"Yes":"No"}),this.updateFilter(t,e),n&&this.notifyFilterUpdate()},o.prototype.setGridFilters=function(t){var e,n;if(this.api&&t){var o={};try{for(var i=wt(t),r=i.next();!r.done;r=i.next()){var a=r.value,s=a.filter;o[a.field]=s}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.updateSettings({filter:o}),this.notifyFilterUpdate()}},o.prototype.setSortByColumn=function(t,e){var n=this.gridQuery.getSort({colId:t,sort:e});this.setGridSort(n)},o.prototype.setGridSort=function(t){if(t&&this.api&&this.api.grid.getDisplayedRowCount()>0){var e=t.colId,n=t.sort,o=t.sortIndex,i=this.api.columns.getAllGridColumns();if(i){var r=t,a=i.find((function(t){return(t.getColDef().showRowGroup||t.getColId())===e}));if(a)r={colId:a.getColId(),sort:n};else if(!Lt(o)){var s=this.api.columns.getValueColumns().find((function(t){return t.getColId()===e}));if(e.startsWith("pivot")||s)r={colId:i[o].getColId(),sort:n,sortIndex:o}}this.updateSettings({sort:r}),pr(this.api.columns,[r]),this.gridRef.gridOptions.usePivotGridStyle&&this.api.grid.redrawRows()}}},o.prototype.updateFilter=function(t,e){var n=gr(t.getColDef());this.store.update((function(t){var o;return{settings:mt(mt({},t.settings),{filter:mt(mt({},t.settings.filter),(o={},o[n]=e,o))})}}))},o.prototype.setSearchTerm=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),{searchTerm:t})}})),this.notifyFilterUpdate()},o.prototype.setServerSidePagination=function(t){this.store.update((function(e){return{serverSidePagination:mt(mt({},e.serverSidePagination),t)}}))},o.prototype.setLoading=function(t){t?this.api.grid.showLoadingOverlay():0===this.api.grid.getDisplayedRowCount()?this.setOverlay(!0):this.setOverlay(!1)},o.prototype.setNoData=function(t){this.setOverlay(t)},o.prototype.setOverlay=function(t){t?this.api.grid.showNoRowsOverlay():this.api.grid.hideOverlay()},o.prototype.updateSettings=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),t)}}))},o.prototype.fitGrid=function(t){"container"===t?this.api.grid.sizeColumnsToFit():this.api.columns.autoSizeAllColumns();var e="container"===t?0:1;this.updateSettings({gridAlignment:e,columnsSizes:null})},o.prototype.saveSettingsToServer=function(t){this.storageAPI.set(this.gridName,t)},o.prototype._logEvent=function(t,e){this.logger.logEvent(t,mt({table:this.gridName},e))},o.prototype.wrapSuccessCallback=function(t){var e=this,n=t.successCb,o=t.pageNumber,i=t.isPendingReturnToPage;return function(t,r){e.setServerSidePagination({totalRows:r,hasError:!1}),n(t,r),e.gridQuery._serverDataLoaded.next({api:e.api.grid,columnApi:e.api.columns,type:"ServerDataLoaded",paginationPage:o}),i||(e.setLoading(!1),tn()),e.lastTotalRows=r}},o.prototype.wrapGetRows=function(t,e){var n=this,o=e||t.datasource.getRows;return function(e){var i=e.startRow,r=e.endRow,a=e.sortModel,s=e.successCallback,l=t.paginationPageSize||100,c=n.pageNumberToReturnAfterRefresh>0,p=c&&0===i,d=c?n.pageNumberToReturnAfterRefresh+1:Math.ceil(r/l);n.pageNumberToReturnAfterRefresh=-1;var u=n.gridQuery.getFilter(),h=mt(mt({},e),{failCallback:function(){n.setServerSidePagination({hasError:!0}),n.setOverlay(!0)},successCallback:n.wrapSuccessCallback({pageNumber:d,successCb:s,isPendingReturnToPage:p}),serverConfig:{pageSize:l,pageNumber:d,columnFilters:kt(u)||t.enableV2_1?null:n.buildServerRequestFilters(u),filter:t.enableV2_1?n.buildServerRequestFilters_v2_1(t.columnDefs):null,sort:n.buildServerRequestSort(a)}});if(p){!function(t){(0,t.successCallback)([],n.lastTotalRows)}(h)}else o(h)}},o.prototype.initEditableColumnsCellClass=function(t){var e=this;t.gridOptions.columnDefs.forEach((function(t){if(t.editable)if(Et(t.editable)){var n=t.cellClass;t.cellClass=function(o){if(t.editable(o)){var i=e.addEditableCellClass(n);return Et(i)?i(o):i}return Et(n)?n(o):n}}else t.cellClass=e.addEditableCellClass(t.cellClass)}))},o.prototype.wrapContextMenuBuilder=function(t){var e=this,n=t.gridOptions.customContextMenu,o=Et(n)?n(t.rowActions):t.rowActions;this.translateActionLabels(o);var i={label:this.translate.transform("core.copy-cell"),icon:"copy",key:"Copy Cell"};return function(t){var n=t.node,r=t.column,a=t.context,s=a&&a.contextMenu&&a.contextMenu.fromOnHover;if(!n)return[];var l=[n],c=1;s?e.updateGridContext({contextMenu:{fromOnHover:!1}}):(i.onClick=function(t){var n=St(t,1)[0],o=e.api.grid.getValue(r.getColId(),n),i=r.getColDef().valueFormatter;Bn(i&&"string"!=typeof i?i(o):o)},n.isSelected()&&(c=ye(l=e.gridQuery.getSelectedRowNodes())));var p=Mr(o,c,l,e.gridQuery.isServerSelectAllRowsEnabled).filter((function(t){return t.visible})),d=[i];return s?d=p:p.length>0&&(d=xt([mt(mt({},i),{separator:!0})],p)),Br({toolbarActions:d,selectedRows:l,iconRegistry:e.svgRegistry,node:n,logger:{log:e._logEvent.bind(e),eventOrigin:s?"On Hover":"Context Menu"}})}},o.prototype.translateActionLabels=function(t){var e=this;t.forEach((function(t){t.label=e.translate.transform(t.label),t.subMenu&&e.translateActionLabels(t.subMenu)}))},o.prototype.loadSavedSettings=function(t){var e=this,n=t.sort,o=t.hiddenColumns,i=t.filter,r=t.groupedColumns,a=t.columnsSizes,s=t.pinnedColumns,l=t.columnsOrder,c=t.gridAlignment,p=this.api,d=p.grid,u=p.columns;u.setColumnsVisible(this.initialSettings.columnsOrder,!0);var h=Lt(o)?this.initialSettings.hiddenColumns:o;u.setColumnsVisible(h,!1),i&&d.onFilterChanged();var g,f=u.getRowGroupColumns();r&&(g=f.filter((function(t){return!r.includes(t.getColId())})),u.addRowGroupColumns(r),u.setColumnsVisible(r,!1)),u.removeRowGroupColumns(g),u.setColumnsVisible(g,!0);var m=n||this.initialSettings.sort;pr(u,m?[m]:[]),2===c?a&&Object.keys(a).forEach((function(t){1===a[t]?u.autoSizeColumn(t):u.setColumnWidth(t,a[t])})):1===c?u.autoSizeAllColumns():d.sizeColumnsToFit();var y=s?s.filter((function(t){return t!==e.CHECKBOX_SELECTION_COL_ID})):null,v=l?l.filter((function(t){return t!==e.CHECKBOX_SELECTION_COL_ID})):null;ye(y)>0?u.setColumnsPinned(y,"left"):v&&u.setColumnsPinned(v,null),l&&u.moveColumns(l,0)},o.prototype.getSettingsDiff=function(){return Se(this.gridQuery.getCurrentGridSettings(),this.initialSettings)},o.prototype.resetTableSettings=function(){var t=this.initialSettings,e=t.filter,n=yt(t,["filter"]),o=hr(this.api.columns.getAllGridColumns(),!0),i=kt(o)?n.gridAlignment:2,r=mt(mt({},n),{columnsSizes:o,gridAlignment:i});this.updateSettings(r),this.loadSavedSettings(r),this.saveSettingsToServer({filter:e})},o.prototype.initSettings=function(t){this.initialSettings=this.gridQuery.getCurrentGridSettings(),this.updateSettings(t),this.loadSavedSettings(t)},o.prototype.notifyFilterUpdate=function(){var t=this,e=[this.gridRef.filterChanged.asObservable()];this.gridQuery.isServerSide&&(e.push(this.gridQuery.serverDataLoaded$),this.setLoading(!0)),n.combineLatest(e).pipe(r.take(1),i.untilDestroyed(this)).subscribe((function(){var e=t.api.grid.getDisplayedRowCount();t.setOverlay(0===e)})),this.api.grid.onFilterChanged()},o.prototype.buildServerRequestFilters=function(e){var n,o,i={};try{for(var r=wt(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=St(a.value,2),l=s[0],c=s[1],p=c.byValue,d=c.conditional;if(p&&(i[l]={operator:t.OperatorTypes.AND,filters:[p]}),d){var u={operator:d.operator,filters:d.conditions.map((function(e){var n=e.condition,o=e.value;return n===t.DatoFilterConditions.IN_RANGE?{condition:n,start:o,end:e.rangeEnd}:e}))};p?i[l].filters.push(u):i[l]=u}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},o.prototype.buildServerRequestFilters_v2_1=function(e){var n=this,o=this.gridQuery.getFilter(),i=this.gridQuery.getSearchTerm(),r=this.buildServerColumnFilters_v2_1(o);if(r.every((function(e){return e.operator===t.OperatorTypes.AND}))){var a=r.map((function(t){return t.filters})).reduce((function(t,e){return e.concat(t)}),[]);r=[{operator:t.OperatorTypes.AND,filters:a}]}var s=ye(r)>1?{operator:t.OperatorTypes.AND,filters:r}:1===ye(r)?r[0]:null;if(!i)return s;var l=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch,c=e.filter((function(t){return t.includeInSearch&&(l||n.api.columns.getColumn(t.colId).isVisible())})).map((function(e){var n=e.field;return{condition:t.DatoFilterConditions.CONTAINS,value:i,column:n}})),p=ye(c)>0?{operator:t.OperatorTypes.OR,filters:c}:null;return s?{operator:t.OperatorTypes.AND,filters:[s,p]}:p},o.prototype.buildServerColumnFilters_v2_1=function(e){var n,o,i=[];try{for(var r=wt(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=St(a.value,2),l=s[0],c=s[1],p=null,d=c.byValue,u=c.conditional;if(d&&(p={operator:t.OperatorTypes.AND,filters:[mt({column:l},d)]}),u){var h=this.getServerConditionalFilter(u,l);p?p.filters.push(h):p=h}i.push(p)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},o.prototype.getFilterForServerActionOnSelectAll=function(){var e=this.gridQuery.serverSideConfig.excludedFromSelectAll,n=this.gridQuery.getGridOptions(),o=n.columnDefs,i=n.idColumnKey,r=this.buildServerRequestFilters_v2_1(o);if(kt(e))return r;var a={condition:t.DatoFilterConditions.NOT_IN_LIST,values:e,column:i},s=r?[r,a]:[a];return{operator:t.OperatorTypes.AND,filters:s}},o.prototype.getServerConditionalFilter=function(e,n){return{operator:e.operator,filters:e.conditions.map((function(e){var o=e.condition,i=e.value;return o===t.DatoFilterConditions.IN_RANGE?{condition:o,start:i,end:e.rangeEnd,column:n}:o===t.DatoFilterConditions.IS_EMPTY||o===t.DatoFilterConditions.NOT_EMPTY?{condition:t.DatoFilterConditions.IS_EMPTY,value:o===t.DatoFilterConditions.IS_EMPTY?"true":"false",column:n}:o===t.DatoFilterConditions.IS_NULL||o===t.DatoFilterConditions.NOT_NULL?{condition:t.DatoFilterConditions.IS_NULL,value:o===t.DatoFilterConditions.IS_NULL?"true":"false",column:n}:mt(mt({},e),{column:n})}))}},o.prototype.buildServerRequestSort=function(t){return t.map((function(t){return{column:t.colId,sortOrder:t.sort.toUpperCase()}}))},o.prototype.addEditableCellClass=function(t){var e=this;return Lt(t)?"dato-editable-cell":Et(t)?function(n){return e.getEditableClassArray(t(n))}:this.getEditableClassArray(t)},o.prototype.getEditableClassArray=function(t){var e=me(t);return e.push("dato-editable-cell"),e},o.prototype.selectAllCurrentPageRows=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);var n=this.gridQuery.getCurrentPageRows();if(e){var o=this.gridQuery.serverSideConfig.excludedFromSelectAll;kt(o)||(n=n.filter((function(t){var e=t.id;return!o.includes(e)})))}t?this.selectRows(n):this.deselectRows(n)},o.prototype.deselectAllRows=function(){this.api.grid.deselectAll(),this.gridQuery.isServerSelectAllRowsEnabled&&this.setServerSidePagination({selectAllRowsEnabled:!1,excludedFromSelectAll:[]})},o.prototype.resolveRowActionsVisibility=function(){this.gridQuery._rowActionVisibilityChanged.next()},o.prototype.initPivotSecondaryColsProcess=function(t){var e=this,n=t.gridOptions;n.processSecondaryColDef=function(t){var e=t.pivotValueColumn&&t.pivotValueColumn.getUserProvidedColDef();e&&(t.filter=e.filter),t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=fr(t);return e&&e.value||""})))},n.processSecondaryColGroupDef=function(t){if(t.headerName){var n=fr(t.headerName);if(n){var o=n.field,i=n.value;t.headerClass=[o],t.headerName=i,t.children&&t.children.length>0&&t.headerClass.push("group-pivot-cell")}}else if(t.children){var r=St(t.children,1)[0],a=r&&r.pivotTotalColumnIds;a&&a.length>0&&(t.headerClass=["total-pivot-cell"],t.headerName=e.translate.transform("core.total"))}else t.headerClass=["empty-pivot-header"];t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=fr(t);return e&&e.value||""})))}},o.prototype.setPivotModeRows=function(t){var e=this.gridQuery.getAllPivotColumns(),n=t.map((function(t,n){var o,i,r=mt({},t);try{for(var a=wt(e),s=a.next();!s.done;s=a.next()){var l=s.value.getColDef().field,c={field:l,value:t[l]};r[l]=JSON.stringify(c)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r}));this.api.grid.setRowData(n)},o.prototype.getPivotModeCellClassRules=function(){return{"even-row-group-leaf-cell":this.isLeafGroupEvenCell.bind(this),"row-group-root-cell":this.isRowGroupValuedCell.bind(this)}},o.prototype.isLeafGroupEvenCell=function(t){var e=t.node,n=e.leafGroup,o=e.childIndex;return e.rowGroupIndex<=this.getCellClassRuleColIndex(t)&&n&&o%2==0},o.prototype.isRowGroupValuedCell=function(t){var e=t.node,n=e.leafGroup;return e.rowGroupIndex<=this.getCellClassRuleColIndex(t)&&!n},o.prototype.getCellClassRuleColIndex=function(t){var e=t.colDef.headerComponentParams.gridQuery;if(e&&e.api){var n=e.api.columns.getAllDisplayedColumns(),o=n.find((function(e){return e.getColId()===t.colDef.colId}));return n.indexOf(o)}return-1},o.ctorParameters=function(){return[{type:ur},{type:wr},{type:Mn},{type:Le},{type:Ne},{type:void 0,decorators:[{type:e.Inject,args:[Qr]}]},{type:void 0,decorators:[{type:e.Inject,args:[Ba]}]}]},o=vt([e.Injectable(),bt(5,e.Inject(Qr)),bt(6,e.Inject(Ba)),Ct("design:paramtypes",[ur,wr,Mn,Le,Ne,Object,Object])],o)}(),Ka=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCustomHeader]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Wa=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCustomMoreMenu]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Qa=function(){function t(){}return vt([e.Input(),Ct("design:type",String)],t.prototype,"column",void 0),vt([e.ContentChild(Ka),Ct("design:type",Object)],t.prototype,"customHeader",void 0),vt([e.ContentChild(Wa),Ct("design:type",Object)],t.prototype,"moreMenu",void 0),t=vt([e.Component({selector:"dato-custom-header-template",template:"",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),$a={light:{"primary-700":"#2E2F30","primary-600":"#37383A","primary-500":"#4F5053","primary-400":"#67696F","primary-300":"#9EA0A5","primary-200":"#CCCED3","primary-100":"#F1F2F5","primary-50":"#F7F8FA","primary-0":"#ffffff","accent-800":"#072A60","accent-700":"#0D47A1","accent-600":"#1C61D7","accent-500":"#317EEB","accent-400":"#09A0FF","accent-350":"#40B2FE","accent-300":"#77C5FD","accent-200":"#BBDEFB","accent-180":"#C7E3FB","accent-100":"#E3F2FD","fg-100":"#37383A","fg-200":"#ffffff"},dark:{"primary-700":"#ffffff","primary-600":"#F7F8FA","primary-500":"#F1F2F5","primary-400":"#CCCED3","primary-300":"#9EA0A5","primary-200":"#67696F","primary-100":"#4F5053","primary-50":"#37383A","primary-0":"#2E2F30","accent-800":"#E3F2FD","accent-700":"#BBDEFB","accent-600":"#77C5FD","accent-500":"#40B2FE","accent-400":"#09A0FF","accent-350":"#317EEB","accent-300":"#1C61D7","accent-200":"#0D47A1","accent-180":"#C7E3FB","accent-100":"#072A60","fg-100":"#ffffff","fg-200":"#37383A"}},qa=function(){function t(t,e,n){this.host=t,this.gridService=e,this.cdr=n,this.displayedActions=[],this.setBgColorBound=this.setBackgroundColor.bind(this)}return Object.defineProperty(t.prototype,"hostEl",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.show=function(t){this.removeSelectedListener(),this.params=t,this.row=t.node,this.row.addEventListener("rowSelected",this.setBgColorBound),this.setRowActions(),this.setBackgroundColor({node:this.row}),Ht(this.hostEl,{top:this.row.rowTop+"px",height:this.row.rowHeight+"px",opacity:1,zIndex:1,pointerEvents:"all"})},t.prototype.hide=function(){Ht(this.hostEl,{opacity:0,pointerEvents:"none",zIndex:-1})},t.prototype.openActionMenu=function(t){this.gridService.updateGridContext({contextMenu:{fromOnHover:!0}});var e=this.params.event&&this.params.event.target;if(e instanceof Element){var n=e.closest(".ag-cell");n&&n.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY}))}},t.prototype.updateScrollPos=function(t){Ht(this.hostEl,{left:t-this.hostEl.scrollWidth-1+"px"})},t.prototype.callAction=function(t){Et(t.onClick)&&(this.gridService._logEvent("Grids - Table Action",{action:t.key,numOfItems:1,from:"On Hover"}),t.onClick([this.row]))},t.prototype.ngOnDestroy=function(){this.removeSelectedListener()},t.prototype.setRowActions=function(){var t=this.config,e=t.actions,n=t.maxDisplayedItems,o=Mr(e,1,[this.row],!1).filter((function(t){var e=t.template,n=t.icon,o=t.visible;return Lt(e)&&Mt(n)&&o}));this.displayedActions=o.filter((function(t){return _t(t.onHoverIndex)})).slice(0,n).sort((function(t,e){return t.onHoverIndex-e.onHoverIndex})),0===this.displayedActions.length&&(this.displayedActions=o.slice(0,n)),this.showMore=this.displayedActions.length<o.length,this.cdr.detectChanges()},t.prototype.removeSelectedListener=function(){this.row&&this.row.removeEventListener("rowSelected",this.setBgColorBound)},t.prototype.setBackgroundColor=function(t){var e=t.node,n="accent-100";e.isSelected()&&(n=e.rowIndex%2==0?"accent-180":"accent-200");var o=$a.light[n],i="linear-gradient(to right, "+o+"B3 0%, "+o+" 17%, "+o+" 100%)";Ht(this.hostEl,{backgroundImage:i})},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Ua},{type:e.ChangeDetectorRef}]},t=vt([e.Component({selector:"dato-grid-on-hover",template:'<div class="d-flex">\n <div class="gradient"></div>\n <div class="actions d-flex align-end-center">\n <dato-icon-button (click)="callAction(action)" datoSize="md" datoType="none" *ngFor="let action of displayedActions" [icon]="action.icon" [datoTooltip]="action.tooltip || action.label" datoTooltipOffset="[-80,5]"></dato-icon-button>\n <dato-icon-button *ngIf="showMore" (click)="openActionMenu($event)" datoSize="md" datoType="none" icon="more-vertical"></dato-icon-button>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;justify-content:flex-end;align-content:center;align-items:center;position:absolute;max-width:150px;transition:opacity .3s ease-in-out;opacity:0}:host .gradient{min-width:20px}"]}),Ct("design:paramtypes",[e.ElementRef,Ua,e.ChangeDetectorRef])],t)}(),Ya=function(){function t(t){var e=this;this.ref=t,this.groups=[],this.groups=Object.keys(t.data).map((function(n){return{scope:n,children:e.resolveKeys(t.data[n])}}))}return t.prototype.resolveKeys=function(t){return t.reduce((function(t,e){var n=e.description,o=e.keys;return t.push({keys:ma(o),description:n}),t}),[])},t.ctorParameters=function(){return[{type:Qo}]},t=vt([e.Component({template:' <dato-dialog-header>{{ \'core.available-shortcuts\' | translate }}</dato-dialog-header>\n <dato-dialog-content>\n <section>\n <ng-container *ngFor="let group of groups">\n <section *ngIf="group.children.length" class="flex-1 hotkeys-group">\n <header>{{ group.scope | translate }}</header>\n <table>\n <tbody>\n <tr *ngFor="let child of group.children">\n <td>{{ child.description | translate }}</td>\n\n <td class="text-right">\n <kbd [innerHTML]="child.keys"></kbd>\n </td>\n </tr>\n </tbody>\n </table>\n </section>\n </ng-container>\n\n </section>\n\n\n </dato-dialog-content>\n <dato-dialog-footer> <dato-button datoType="secondary" datoDialogDismiss>{{ \'core.close\' | translate }}</dato-button> </dato-dialog-footer>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host header{background-color:#f6f8fa;border-top-left-radius:2px;border-top-right-radius:2px;border:1px solid #d1d5da;font-weight:500;font-size:14px;padding:8px 16px;border-bottom:0}:host table{border:1px solid #e1e4e8;border-collapse:collapse;width:100%;margin-bottom:1rem;color:#212529}:host th{font-weight:500;text-align:left;vertical-align:bottom;padding:.75rem;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6}:host td{padding:8px 16px;border-top:1px solid #dee2e6}:host kbd{margin-right:6px;background-color:#fafbfc;border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1;color:#444d56;font-size:12px;padding:3px 5px}"]}),Ct("design:paramtypes",[Qo])],t)}(),Za=function(){function o(t,e,n){var o,i=this;this.eventManager=t,this.document=e,this.dialog=n,this.callbacks=[],this.defaults={preventDefault:!0,event:"keydown",element:this.document,scope:"core.general",ignoreInEditable:!1},this.hotkeys=((o={})[this.defaults.scope]=[],o),this.addShortcut({keys:"shift.?",preventDefault:!1,ignoreInEditable:!0}).subscribe((function(t){i.isActiveElementEditable(t)||ye(i.hotkeys)&&i.openHelpModal()}))}return o.prototype.isActiveElementEditable=function(t){return/^(input|textarea)$/i.test(document.activeElement.nodeName)||t.target.isContentEditable},o.prototype.onShortcut=function(t){var e=this;return this.callbacks.push(t),function(){return e.callbacks.filter((function(e){return e!==t}))}},o.prototype.addShortcut=function(t){var e=this,o=mt(mt({},this.defaults),t),i=o.scope,r=o.keys,a=o.description,s=o.element,l=o.event,c=o.preventDefault,p=o.target,d=o.ignoreInEditable,u=r,h=St(r.split(".")),g=h[0],f=h.slice(1);return"meta"===g&&!1===fa()&&(u=xt(["control"],f).join(".")),this.hotkeys[i]||(this.hotkeys[i]=[]),a&&this.hotkeys[i].push({keys:u,description:a}),new n.Observable((function(t){var n=e.eventManager.addEventListener(s,l+"."+u,(function(n){d&&e.isActiveElementEditable(n)||(c&&n.preventDefault(),e.dialog.isOpen&&e.dialog.closeAll(),e.callbacks.forEach((function(t){return t(n,u,p)})),t.next(n))}));return function(){n(),o.target=null,a&&(e.hotkeys[i]=e.hotkeys[i].filter((function(t){return t.keys!==u})))}}))},o.prototype.openHelpModal=function(){this.dialog.open(Ya,{data:this.hotkeys,size:t.Dimensions.MD})},o.ctorParameters=function(){return[{type:ut.EventManager},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]},{type:ti}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(ut.EventManager),e.ɵɵinject(s.DOCUMENT),e.ɵɵinject(ti))},token:o,providedIn:"root"}),o=vt([e.Injectable({providedIn:"root"}),bt(1,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[ut.EventManager,Object,ti])],o)}(),Xa=function(){function t(t,o,i,r,a,s,l,c,p,d){this.gridService=t,this.gridQuery=o,this.cdr=i,this.iconRegistry=r,this.translate=a,this.host=s,this.injector=l,this.resolver=c,this.hotkeys=p,this.storageAPI=d,this.onGridChange=new e.EventEmitter,this.rowActions=[],this.gridActions=[],this.gridReady$=this.gridQuery.gridReady$,this.contentInit=new n.Subject,this.gridElements={centerViewport:null,centerContainer:null,bodyViewport:null},this.treeGridClass="tree"}return Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this._gridOptions},set:function(t){this._gridOptions=this.gridService.initGridOptions(t),this.gridService.treeData=t.treeData,this.gridService.isPivotMode=t.pivotMode,this.agGridEl&&(t.treeData?!this.agGridEl.classList.contains(this.treeGridClass)&&this.agGridEl.classList.add(this.treeGridClass):t.enableV2_1||this.agGridEl.classList.add(this.treeGridClass))},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.contentInit.complete(),this.clearTooltip(),this.rowHoverComponent&&this.rowHoverComponent.destroy(),this.rowHoverComponent=null},t.prototype.initializeGrid=function(t,e){this.contentInit.isStopped||(this._initializeGrid(t,e),this.contentInit.next(),this.contentInit.complete())},t.prototype._initializeGrid=function(t,e){var o=this;this.agGridEl=e,this.contentInit.asObservable().pipe(r.switchMap((function(){o.gridOptions=o.normalizeOptions(),t.gridOptions=o.gridOptions;var e=!1===o.gridOptions.saveSettings?n.of(null):o.storageAPI.get(o.gridOptions.gridName);return n.combineLatest([t.gridReady,e])})),i.untilDestroyed(this)).subscribe((function(n){var i=St(n,2),r=i[0],a=r.api,s=r.columnApi,l=i[1],c=void 0===l?{}:l;(o.gridOptions.rowData||a.showLoadingOverlay(),o.gridOptions.statusBar)||Ut(e.querySelector(".ag-status-bar"),"ag-hidden");var p={grid:a,columns:s};o.gridService._setApi(p,t),o.gridQuery._setApi(p,t),o.gridService.initSettings(c||{}),o.registerSettingsListeners(p,t),o.registerGridListeners(p,t),o.registerEventsTriggeringClearSelectedRows(t),o.registerPaginationChanged(t),o.gridQuery._gridReady.next(!0),o.gridOptions.treeData&&o.agGridEl.classList.add("tree"),o.gridOptions.rowHeight&&o.agGridEl.classList.add("row-height-"+o.gridOptions.rowHeight)}))},t.prototype.normalizeOptions=function(){var t={gridOptions:this.gridOptions,customHeadersTemplates:this.customHeadersTemplates,rowActions:this.rowActions},e=this.gridService.normalizeOptions(t);return ea(mt(mt(mt({},Pa),this.gridOptions.treeData?Ta(this.gridOptions.maxDepth):{}),{icons:this.getGridIcons(),disabledHTMLRenderingFields:e.disabledHTMLRenderingFields||Pa.disabledHTMLRenderingFields}),e)},t.prototype.setGridRows=function(t){this.gridService.setRows(t)},t.prototype.setGridFilters=function(t){this.gridService.setGridFilters(t)},t.prototype.setGridSort=function(t){this.gridService.setGridSort(t)},t.prototype.getGridIcons=function(){var t='<span class="da-grid-icon pointer d-flex column-move">'+this.iconRegistry.getSvg("move-column")+"</span>";return{groupExpanded:'<span class="da-grid-icon pointer group-expanded-icon">'+this.iconRegistry.getSvg("arrow-right")+"</span>",groupContracted:'<span class="da-grid-icon pointer group-contracted-icon">'+this.iconRegistry.getSvg("arrow-right")+"</span>",columnMovePin:'<span class="da-grid-icon pointer d-flex primary-300-fill column-move-pin">'+this.iconRegistry.getSvg("pin")+"</span>",columnMoveHide:'<span class="da-grid-icon pointer d-flex column-move-hide">'+this.iconRegistry.getSvg("eye-hide")+"</span>",columnMoveMove:t,columnMoveLeft:t,columnMoveRight:t,rowDrag:'<span class="da-grid-icon drag d-flex">'+this.iconRegistry.getSvg("drag-01")+"</span>"}},t.prototype.registerSettingsListeners=function(t,e){this.listenToColumnResize(t,e),this.listenToGridEvents(e),this.listenToStoreSettingsChanges()},t.prototype.listenToColumnResize=function(t,e){var n=this,o=e.columnResized.asObservable();this.onHoverEnabled()&&(o=o.pipe(r.filter((function(t){return"uiColumnDragged"===t.source})),r.tap((function(){return n.updateOnHoverPos()})))),o.pipe(r.auditTime(100),r.filter((function(t){var e=t.finished,n=t.source;return e&&"uiColumnDragged"===n})),i.untilDestroyed(this)).subscribe((function(e){var o=St(e.columns,1)[0],i=mt({},n.gridQuery.getColumnSizes());i?i[o.getColId()]=o.getActualWidth():i=hr(t.columns.getAllGridColumns()),n.gridService.updateSettings({gridAlignment:2,columnsSizes:i})}))},t.prototype.listenToGridEvents=function(t){var e=this,o=t.columnVisible,a=t.sortChanged,s=t.columnRowGroupChanged,l=t.columnPinned,c=t.dragStopped,p=t.filterChanged;n.merge(o,a,s,l,c,p).pipe(r.skip(1),i.untilDestroyed(this)).subscribe((function(t){var n=t.type,o=e.gridService.getSettingsDiff();e.gridService.updateSettings(o);var i=e.getGridData();e.onGridChange.emit({filter:e.gridQuery.getExternalFilter(),sort:e.gridQuery.getSort(),type:n,data:i})}))},t.prototype.listenToStoreSettingsChanges=function(){var t=this;this.gridQuery.select((function(t){return t.settings})).pipe(r.skip(1),r.debounceTime(1e3),i.untilDestroyed(this)).subscribe((function(){var e=t.gridService.getSettingsDiff();t.gridService.saveSettingsToServer(e)}))},t.prototype.registerGridListeners=function(t,e){this.gridElements={centerContainer:Ft(".ag-center-cols-container",this.agGridEl),centerViewport:Ft(".ag-center-cols-viewport",this.agGridEl),bodyViewport:Ft(".ag-body-viewport",this.agGridEl)},this.registerGridClickListener(t.grid),this.registerGridGroupListeners(e),this.registerGridMouseListeners(e),this.registerGridKeyboardListener(t),this.registerWindowResizeListener()},t.prototype.registerGridGroupListeners=function(t){var e=this;t.columnRowGroupChanged.pipe(r.switchMap((function(e){return 0===e.columns.length?n.EMPTY:t.cellClicked.pipe(r.filter((function(t){var e=t.value,n=t.node;return void 0!==e&&!0===n.group})))})),i.untilDestroyed(this)).subscribe((function(t){var e=t.node;e.setExpanded(!e.expanded)})),this.onHoverEnabled()&&t.rowGroupOpened.pipe(r.filter((function(t){return!1===t.node.expanded})),i.untilDestroyed(this)).subscribe((function(){e.lastHoveredRow=null,e.setOnHoverState(!1)}))},t.prototype.registerGridClickListener=function(t){var e=this.gridElements,o=e.bodyViewport,a=e.centerViewport;n.fromEvent(o,"click").pipe(r.filter((function(e){return(e.target===o||e.target===a)&&t.getSelectedRows().length>0})),i.untilDestroyed(this)).subscribe((function(){return t.deselectAll()}))},t.prototype.onHoverEnabled=function(){return this.gridOptions.hoverConfig.enabled&&this.rowActions.length>0},t.prototype.registerGridMouseListeners=function(t){var e,o=this,a=this.gridElements,s=a.bodyViewport,l=a.centerContainer,c=this.onHoverEnabled();c&&(n.fromEvent(l,"mouseleave").pipe(i.untilDestroyed(this)).subscribe((function(){o.toggleRowHoverClass(o.lastHoveredRow),o.lastHoveredRow=null,o.setOnHoverState(!1),e=null})),n.merge(t.bodyScroll.pipe(r.filter((function(t){return"horizontal"===t.direction}))),t.rowDataChanged).pipe(i.untilDestroyed(this)).subscribe((function(){o.updateOnHoverPos()})),this.addOnHoverElement()),t.cellMouseOver.pipe(i.untilDestroyed(this)).subscribe((function(t){var n=t.node,i=t.column;if(e!==n.id+"-"+i.getColId()){e=n.id+"-"+i.getColId(),o.showTooltip(t);var r=t.event.target.parentElement;if(c&&(!1===n.group||Lt(n.group))&&o.lastHoveredRow!==r){var a=o.lastHoveredRow;o.lastHoveredRow=r,o.toggleRowHoverClass([a,o.lastHoveredRow]),o.setOnHoverState(!0,t)}}else clearTimeout(o.cellMouseOutTimer)})),n.merge(n.fromEvent(s,"scroll"),n.fromEvent(this.agGridEl,"mouseleave")).pipe(i.untilDestroyed(this)).subscribe((function(){e=null,o.clearTooltip()})),t.cellMouseOut.pipe(r.filter((function(){return!Lt(o.tooltip)})),i.untilDestroyed(this)).subscribe((function(){o.cellMouseOutTimer=window.setTimeout((function(){return o.clearTooltip()}))}))},t.prototype.clearTooltip=function(){this.tooltip&&this.tooltip.dispose(),this.tooltip=null},t.prototype.showTooltip=function(t){var e=t.event.target;if("SPAN"===e.tagName&&0===e.scrollWidth&&(e=e.parentElement),t.colDef.editable&&(e=e.querySelector(".value-wrapper")||e),e.offsetWidth<e.scrollWidth){clearTimeout(this.cellMouseOutTimer);var n=mr(this.gridOptions,t.colDef),o={cell:e,value:e.innerText,allowHTML:n};Lt(this.tooltip)?this.createAndShowTooltip(o):this.updateTooltip(o)}},t.prototype.createAndShowTooltip=function(t){var e=t.cell,n=t.value,o=t.allowHTML;this.tooltip=new X(e,{placement:"top",container:document.body,trigger:"manual",title:o?ot.sanitize(n):n,html:o,popperOptions:{modifiers:{preventOverflow:{enabled:!1}}},template:'<div class="tooltip dato-tooltip common-tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}),this.tooltip.show()},t.prototype.updateTooltip=function(t){var e=t.cell,n=t.value;e!==this.tooltip.reference&&(this.tooltip.reference=e,this.tooltip.popperInstance.reference=e,this.tooltip.updateTitleContent(n)),this.tooltip.show()},t.prototype.addOnHoverElement=function(){this.rowHoverComponent=oa({component:qa,injector:this.injector,resolver:this.resolver});var t=this.rowHoverComponent,e=t.instance,n=t.hostView;e.config=mt(mt({},this.gridOptions.hoverConfig),{actions:this.rowActions.slice()}),n.detectChanges(),qt(this.gridElements.centerContainer,this.rowHoverEl)},Object.defineProperty(t.prototype,"rowHoverEl",{get:function(){return this.rowHoverComponent.location.nativeElement},enumerable:!0,configurable:!0}),t.prototype.setOnHoverState=function(t,e){var n=this.rowHoverComponent.instance;t?(n.show(e),this.updateOnHoverPos()):n.hide()},t.prototype.updateOnHoverPos=function(){var t=this.gridElements,e=t.centerViewport,n=t.centerContainer,o=n.clientWidth>e.clientWidth?e:n,i=o.clientWidth,r=o.scrollLeft;this.rowHoverComponent.instance.updateScrollPos(i+r)},t.prototype.toggleRowHoverClass=function(t){me(t).forEach((function(t){return t&&t.classList.toggle("actions-hovered")}))},t.prototype.registerGridKeyboardListener=function(t){var e=this;t.grid,t.columns;this.hotkeys.addShortcut({element:this.agGridEl,keys:"meta.a",ignoreInEditable:!0}).pipe(i.untilDestroyed(this)).subscribe((function(){e.gridService.selectAllCurrentPageRows()}))},t.prototype.registerWindowResizeListener=function(){var t=this;n.fromEvent(window,"resize").pipe(r.debounceTime(100),r.filter((function(){return 2!==t.gridQuery.gridAlignment})),i.untilDestroyed(this)).subscribe((function(){var e=0===t.gridQuery.gridAlignment?"container":"content";t.gridService.fitGrid(e)}))},t.prototype.getGridData=function(){var t=this.gridService.api.grid.getModel();return this.gridOptions.treeData?za(t.rowsToDisplay.map((function(t){return t.data})),this.gridService.treeConfig):t.rowsToDisplay},t.prototype.registerEventsTriggeringClearSelectedRows=function(t){var e=this;(this.gridQuery.isServerSide?n.merge(t.sortChanged,t.filterChanged):t.filterChanged).pipe(i.untilDestroyed(this)).subscribe((function(){e.gridService.deselectAllRows()}))},t.prototype.registerPaginationChanged=function(t){var e=this;this.gridQuery.isServerSide&&t.paginationChanged.pipe(i.untilDestroyed(this)).subscribe((function(){e.gridQuery.isServerSelectAllRowsEnabled&&e.gridService.selectAllCurrentPageRows(!0,!0)}))},t.ctorParameters=function(){return[{type:Ua},{type:wr},{type:e.ChangeDetectorRef},{type:Le},{type:Mn},{type:e.ElementRef},{type:e.Injector},{type:e.ComponentFactoryResolver},{type:Za},{type:void 0,decorators:[{type:e.Inject,args:[Qr]}]}]},vt([e.ContentChildren(Qa),Ct("design:type",e.QueryList)],t.prototype,"customHeadersTemplates",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"onGridChange",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"rowActions",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"gridActions",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"gridOptions",null),t=vt([e.Component({selector:"dato-grid-controller",template:"\n <ng-content></ng-content>\n ",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[wr,Ua,ur],styles:[":host{display:flex;flex-direction:column;flex-grow:1}"]}),bt(9,e.Inject(Qr)),Ct("design:paramtypes",[Ua,wr,e.ChangeDetectorRef,Le,Mn,e.ElementRef,e.Injector,e.ComponentFactoryResolver,Za,Object])],t)}(),Ja=function(){function t(t,e){this.controller=t,this.host=e}return Object.defineProperty(t.prototype,"grid",{set:function(t){if(t){var e=Ft("ag-grid-angular",this.host.nativeElement);this.controller.initializeGrid(t,e)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this.controller?this.controller.gridOptions:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableBackground",{get:function(){return!!this.gridOptions&&this.gridOptions.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableV2_1",{get:function(){return!!this.gridOptions&&this.gridOptions.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPivotStyle",{get:function(){return this.gridOptions&&this.gridOptions.usePivotGridStyle},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:Xa},{type:e.ElementRef}]},vt([e.ViewChild(st.AgGridAngular,{static:!1}),Ct("design:type",st.AgGridAngular),Ct("design:paramtypes",[st.AgGridAngular])],t.prototype,"grid",null),t=vt([e.Component({selector:"dato-grid-v2",template:'<ag-grid-angular data-auto-id="grid" class="dato-grid ag-theme-material" [class.has-background]="enableBackground" [class.enable-v2_1]="enableV2_1"\n [class.with-multi-selection-col]="gridOptions?.showMultiSelectionCheckboxes" [class.pivot-style]="isPivotStyle">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]="enableBackground"></dato-grid-pagination-v2>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:['dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important;min-width:auto!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-icon-checkbox-indeterminate:before{text-align:center;content:"-";display:inline-block;position:absolute;top:0;left:0;right:0;bottom:0;line-height:.5;color:#fff}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell{line-height:33px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.dato-editable-cell{line-height:29px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.ag-cell-inline-editing{height:35px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell{line-height:42px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.dato-editable-cell{line-height:38px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.ag-cell-inline-editing{height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell{line-height:48px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.dato-editable-cell{line-height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.ag-cell-inline-editing{height:50px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell{line-height:57px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.dato-editable-cell{line-height:53px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.ag-cell-inline-editing{height:59px}dato-grid-v2 ag-grid-angular .ag-cell.checkbox-selection-cell{display:flex;padding-right:0}dato-grid-v2 .ag-menu .da-grid-icon svg{vertical-align:middle}dato-grid-v2 .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}dato-grid-v2 .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}dato-grid-v2 .group-contracted-icon,dato-grid-v2 .group-expanded-icon{width:7px}dato-grid-v2 .group-expanded-icon{transform:rotate(90deg)}dato-grid-v2 .dato-grid .ag-cell{border-top:0;border-bottom:0}dato-grid-v2 .ag-overlay-wrapper ng-component{display:flex}.ag-dnd-ghost{min-width:100px;border:none;display:flex;justify-content:flex-start;align-content:center;align-items:center;cursor:-webkit-grabbing;cursor:grabbing;z-index:10000000}.ag-dnd-ghost .da-grid-icon.column-move-hide svg{height:18px;width:18px}.ag-dnd-ghost .da-grid-icon.column-move svg,.ag-dnd-ghost .da-grid-icon.column-move-pin svg{height:16px;width:16px}']}),Ct("design:paramtypes",[Xa,e.ElementRef])],t)}(),ts=function(){function t(t){this.popover=t}return t.prototype.ngOnInit=function(){var t=this,e=this.popover.data,n=e.api,r=e.gridQuery,a=e.gridService;this.api=n.columns;var s=this.api.getRowGroupColumns();this.columns=this.popover.data.gridQuery.getAllColumns().filter((function(t){return!s.includes(t)})).map((function(t){return{label:t.getColDef().headerName,column:t,id:t.getColId()}})).sort((function(t,e){var n=r.getCurrentGridSettings().columnsOrder;return n.indexOf(t.id)-n.indexOf(e.id)}));var l=this.columns.filter((function(t){return t.column.isVisible()})).map((function(t){return t.id}));this.columnControl=new o.FormControl(l),this.columnControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.api.setColumnsVisible(r.getAllColumns(),!1),t.api.setColumnsVisible(e,!0),a.fitGrid("container");var n=r.getGridOptions(),o=n.enableSearch,i=n.includeHiddenColumnsInSearch;o&&!i&&r.getSearchTerm()&&a.notifyFilterUpdate()}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:ca}]},t=vt([e.Component({selector:"dato-grid-columns-display-menu",template:'<div class="pl-10 pr-10 pt-10 list-section overflow-hidden">\n <div class="dato-sub-headline mb-15">{{ \'core.columns\' | translate }}</div>\n <dato-input placeholder="core.search-columns" #search></dato-input>\n <dato-list-v2 [searchController]="search" [options]="columns" [formControl]="columnControl" [isSortList]="false"></dato-list-v2>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;flex-direction:column;max-height:inherit}.list-section{max-height:305px}"]}),Ct("design:paramtypes",[ca])],t)}(),es=function(){function t(t){this.popover=t,this.addGroup=new o.FormControl,this.activeGroups=[]}return t.prototype.ngOnInit=function(){var t=this;this.api=this.popover.data.api.columns,this.initMenu(),this.addGroup.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){var n=e.column;t.api.addRowGroupColumn(n),t.api.setColumnVisible(n,!1),t.popover.data.gridService._logEvent("Grids - Group Added",{totalNumOfGroups:t.api.getRowGroupColumns().length,column:n.getColId(),groupedFrom:"Table Toolbar"}),t.initMenu()}))},t.prototype.ngOnDestroy=function(){},t.prototype.reorderGroups=function(t){var e=this,n=t.oldIndex,o=t.newIndex;this.api.moveRowGroupColumn(n,o);var i=this.api.getAllDisplayedColumns().find((function(t){return e.activeGroups[o].getColId()===t.getColDef().showRowGroup}));this.api.moveColumn(i,0)},t.prototype.clearGrouping=function(){this.activeGroups.length>0&&(this.api.setRowGroupColumns([]),this.initMenu())},t.prototype.removeColumn=function(t){this.api.removeRowGroupColumn(t),this.initMenu()},t.prototype.initMenu=function(){var t=this;this.addGroup.reset(null,{emitEvent:!1}),this.activeGroups=xt(this.api.getRowGroupColumns()),this.optionalColumns=this.api.getAllDisplayedColumns().filter((function(e){return!t.activeGroups.find((function(t){return t.getColId()===e.getColDef().showRowGroup}))})).map((function(t){return{label:t.getColDef().headerName,id:t.getColId(),column:t}}))},t.ctorParameters=function(){return[{type:ca}]},t=vt([e.Component({selector:"dato-grid-groups-menu",template:'<div class="header dato-simple-bold pl-10 primary-600-color primary-0-background-color d-flex align-start-center">{{ \'core.group-by\' | translate }}</div>\n<div class="body p-10">\n <dato-sortable *ngIf="activeGroups.length > 0" class="width-100" [datoList]="activeGroups"\n (orderUpdated)="reorderGroups($event)">\n <div *ngFor="let column of activeGroups; index as i"\n class="d-flex align-start-center primary-0-background-color group-item mb-5">\n <dato-icon height="18px" [attr.data-auto-id]="\'grid-group-menu-drag-\' + column.getColId()" datoIcon="drag-01" class="handler primary-300-color" datoSortableHandle></dato-icon>\n <div class="d-flex-grow ellipsis dato-note column-name" [datoTooltip]="column.getColDef().headerName"\n datoTooltipOnTextOverflow="true" datoTooltipPosition="bottom"> {{ column.getColDef().headerName }}</div>\n <dato-icon-button [attr.data-auto-id]="\'grid-group-menu-remove-\' + column.getColId()" datoSize="md"\n datoType="none"\n icon="close" class="ml-10 pointer mr-5 remove-group"\n (click)="removeColumn(column)"></dato-icon-button>\n </div>\n </dato-sortable>\n <dato-select *ngIf="activeGroups.length < 3 && optionalColumns.length > 0" [formControl]="addGroup" [dataSet]="optionalColumns"\n placeholder="core.create-new-group" datoSize="md" #select data-auto-id="grid-group-column-selection">\n <dato-option *ngFor="let option of select.data" [option]="option"\n [attr.data-auto-id]="\'grid-group-column-selection-option-\' + option.id"> {{ option.label }} </dato-option>\n </dato-select>\n</div>\n<div class="footer primary-0-background-color d-flex align-end-center">\n <dato-link class="mr-30 no-select" datoType="secondary" datoSize="sm" data-auto-id="grid-group-menu-clear-groups"\n (click)="clearGrouping()">{{ \'core.clear-grouping\' | translate }}</dato-link>\n <dato-button class="mr-10" datoType="primary" datoSize="sm" data-auto-id="grid-group-menu-done"\n datoPopoverClose>{{ \'core.done\' | translate }}</dato-button>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".header{height:40px}.body{height:120px}.footer{height:46px}.group-item{height:30px}.handler{min-width:24px}"]}),Ct("design:paramtypes",[ca])],t)}(),ns=function(){function t(t,e){this.controller=t,this.gridQuery=e,this.displayRowCount=!0}return Object.defineProperty(t.prototype,"enableBackground",{get:function(){return this.controller.gridOptions.enableBackground},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.rowCount$=this.gridQuery.gridReady$.pipe(r.switchMap((function(){return t.rowsCount()})))},t.prototype.rowsCount=function(){var t=this;return this.gridQuery.isServerSide?this.gridQuery.serverDataLoaded$.pipe(r.map((function(){return t.gridQuery.serverSideConfig.totalRows}))):this.gridQuery.rowDataChanged$.pipe(r.map((function(t){return t.api.getDisplayedRowCount()})))},t.ctorParameters=function(){return[{type:Xa},{type:wr}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"displayRowCount",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"headerClass",void 0),t=vt([e.Component({selector:"dato-grid-header-v2",template:'<div class="d-flex justify-start items-center mb-20" [class.mx-30]="enableBackground">\n <span class="dato-mid-headline" [ngClass]="headerClass" data-auto-id="grid-header">\n <ng-content></ng-content>\n <ng-container *ngIf="displayRowCount">\n <span *ngIf="(rowCount$ | async)as rowCount" class="ml-5 mr-10">({{rowCount | number}})</span>\n </ng-container>\n </span>\n <ng-content select=".after-title"></ng-content>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[Xa,wr])],t)}();
326
+ */var ya,va=function(t){return t.value},ba=function(t){return{id:t,label:Lt(t)?"(Empty)":(""+t).trim(),value:t}},Ca=function(t,e){var n=t.value,o=t.formattedValue;return{id:e&&n?n[e]:n,label:Lt(o)?"(Empty)":(""+(e?o[e]:o)).trim(),value:e&&n?n[e]:n}},wa=function(){function a(e,n,i,r,a){var s,l=this;this.host=e,this.popover=n,this.fb=i,this.translate=r,this.cdr=a,this.gridFilterTypes=t.DatoGridFilterTypes,this.columnValues=[],this.listOptions=[],this.filterSections=((s={})[t.DatoGridFilterSections.By_Value]=!0,s[t.DatoGridFilterSections.Conditional]=!0,s),this.rangeOperand=t.DatoFilterConditions.IN_RANGE,this.isClientSideGrid=!1,this.listSearchControl=new o.FormControl,this.loadingList=!1,this.serverSearchErrored=!1,this.applyHotKeyConfig={keys:"meta.enter",handler:function(){return l.closePopUp()},description:"core.apply-filters"},this.hotKeyTooltip=ma(this.applyHotKeyConfig.keys),this.activeAccordionId=0,this.showClearFiltersButton=!0,this.excludedValues=new Set}return Object.defineProperty(a.prototype,"operatorToggler",{set:function(t){t&&this.inputConditionsOperator&&(t.forEach((function(t){t.isDisabled||t.setDisabledState(!0)})),this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"byValueControl",{get:function(){return this.filterForm.get("byValue")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditionsControls",{get:function(){return this.conditions.controls},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditionsOperator",{get:function(){return this.filterForm.get("conditional.operator").value},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultOperand",{get:function(){return this.fb.group({type:[this.conditionalFilterOptions[0]],value:[null,o.Validators.required],rangeEnd:[null]})},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isPredefinedListItems",{get:function(){var t=this.colDef.filtersConfig,e=void 0===t?{}:t;return e.predefinedListValues&&"object"==typeof e.predefinedListValues[0]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultConditional",{get:function(){return this.fb.group({operator:[this.inputConditionsOperator||t.OperatorTypes.AND],conditions:this.fb.array([this.defaultOperand])})},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultByValue",{get:function(){return[this.columnValues]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultForm",{get:function(){var t={};return this.filterSections.By_Value&&(t.byValue=this.defaultByValue),this.filterSections.Conditional&&(t.conditional=this.defaultConditional),this.fb.group(t)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditions",{get:function(){return this.filterForm.get("conditional.conditions")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"colFilter",{get:function(){var t=this.gridQuery.getFilter()[this.colField];return t&&he(this.pivotKeys,t.pivotKeys)?t:null},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"colDef",{get:function(){return this.popover.data.column.getColDef()},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pivotKeys",{get:function(){return this.colDef.pivotKeys||[]},enumerable:!0,configurable:!0}),a.prototype.ngOnInit=function(){var e,n=this,o=this.popover.data,a=o.gridService,s=o.gridQuery,l=this.colDef,c=l.filter,p=l.pivotValueColumn,d=l.pivotKeys,u=s.api.columns.getAllColumns().map((function(t){return t.getColDef()}));this.colField=gr(this.colDef);var h,g=u.find((function(t){return t.field===n.colField})),f=g.filtersConfig||this.colDef.filtersConfig||{},m=c||g.filter,y=Rr[m];if(this.pivotColumn=s.api.columns.getSecondaryPivotColumn(d,p),this.inputConditionsOperator=f.inputConditionsOperator,Lt(f.showClearFiltersButton)||(this.showClearFiltersButton=f.showClearFiltersButton),f.sections&&(this.filterSections=((e={})[f.sections]=!0,e)),this.keepPredefinedListOriginalOrder=f.keepPredefinedListOriginalOrder&&!kt(f.predefinedListValues),this.filterType=y?m:t.DatoGridFilterTypes.String,this.listLabelType=this.filterType.toLowerCase(),this.listSortByKey=this.filterType===t.DatoGridFilterTypes.Number&&this.colDef.valueFormatter?"id":"label",this.gridQuery=s,this.gridService=a,this.hasFilter$=this.gridQuery.select((function(t){return t.settings.filter[n.colField]})).pipe(r.map((function(t){return!Lt(t)&&he(t.pivotKeys,n.pivotKeys)}))),this.filterSections.Conditional){var v=y||Ir;if(f.showEmptyConditions){var b=[t.DatoFilterConditions.IS_EMPTY,t.DatoFilterConditions.NOT_EMPTY];this.filterType===t.DatoGridFilterTypes.Number&&(b=[t.DatoFilterConditions.IS_NULL,t.DatoFilterConditions.NOT_NULL]),v=xt(v,b)}this.conditionalFilterOptions=v.map((function(e,o){return{id:o,operand:e,label:n.translate.transform("core."+(n.filterType===t.DatoGridFilterTypes.Date?"DATE_":"")+e)}}))}if(this.filterSections.By_Value){var C=f.predefinedListValues;if(this.isClientSideGrid=!Lt(C)||!s.isServerSide,!C||this.isStringArray(C)){if(S=C)this.columnValues=S,this.listOptions=S.map(ba);else{var w=this.getColumnValues().filter((function(t){return!Lt(t.value)}));this.columnValues=w.map((function(t){var e=t.value;return!Lt(n.pivotColumn)&&e?e[n.colField]:e})),this.listOptions=w.map((function(t){return Ca(t,!Lt(n.pivotColumn)&&n.colField)}))}}else{var S=C;this.columnValues=S.map(va),this.listOptions=S}h=this.listOptions,this.isClientSideGrid||this.listSearchControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(t){n.serverSearchErrored=!1,""===t.trim()?(n.loadingList=!1,n.listOptions=h,n.patchAndReRegister(n.columnValues),n.cdr.detectChanges()):n.getValuesFromServer(t)}))}this.initForm()},a.prototype.closePopUp=function(){this.applyFilters(),this.popover.close()},a.prototype.applyFilters=function(){if(this.filterForm.valid&&this.filterForm.updateValueAndValidity(),this.filterForm.dirty&&(this.filterForm.valid||this.filterForm.get("conditional").pristine)){var t=this.popover.data.column,e=this.buildFilter();kt(e)?this.gridService.clearColumnFilter(this.colField):this.gridService.setColumnFilter(t,e),this.gridService.notifyFilterUpdate()}},a.prototype.clearFilters=function(){this.gridService.clearColumnFilter(this.colField),this.resetForm()},a.prototype.removeCondition=function(t){this.conditions.removeAt(t),this.filterForm.markAsDirty()},a.prototype.addCondition=function(){this.filterForm.markAsPristine(),this.conditions.push(this.defaultOperand)},a.prototype.getOperandType=function(t){var e=this.conditions.at(t).value.type;return e?e.operand:null},a.prototype.isConditionalEmpty=function(t){var e=t&&t.value&&t.value.type?t.value.type.operand:null;return this.isEmptyOperand(e)},a.prototype.ngOnDestroy=function(){this.byValueSubscription&&this.byValueSubscription.unsubscribe()},a.prototype.getByValueExcludeValues=function(t,e){var n;if(void 0===e&&(e=!1),this.isPredefinedListItems){var o=this.colDef.filtersConfig.predefinedListValues;n=new Set(t.map((function(t){return o.find((function(e){return e.value===t})).id})))}else n=new Set(t.map((function(t){return Pt(t)?t.value:t})));return e?this.listOptions.filter((function(t){var e=t.value;return!n.has(e)})):this.columnValues.filter((function(t){return!n.has(t)}))},a.prototype.buildFilter=function(){var t=this,e=this.filterForm.value,n=e.byValue,o=e.conditional,i={};return this.filterSections.Conditional&&this.setConditionalFilter(i,o),this.filterSections.By_Value&&this.setByValueFilter(i,n),(i.byValue||i.conditional)&&(i.colId=this.colDef.colId,i.pivotKeys=this.pivotKeys,this.pivotColumn&&(i.pivotFieldsMap=this.getPivotFields(this.pivotColumn.getParent()).reduce((function(e,n,o){return t.pivotKeys[o]&&(e[n]=t.pivotKeys[o]),e}),{}))),i},a.prototype.initForm=function(){var t=this.colFilter;this.filterForm=t?this.buildFormFromFilter(t):this.defaultForm,this.registerOperandListeners(),!this.isClientSideGrid&&this.filterSections.By_Value&&this.registerByValueListener()},a.prototype.buildFormFromFilter=function(t){var e={};return this.filterSections.Conditional&&(e.conditional=this.buildConditionalFilter(t.conditional)),this.filterSections.By_Value&&(e.byValue=this.buildByValueFilter(t.byValue)),this.fb.group(e)},a.prototype.resetForm=function(){this.filterForm.setErrors(null);var e={};if(this.filterSections.By_Value&&(e={byValue:this.columnValues}),this.filterSections.Conditional){e=mt(mt({},e),{conditional:{operator:t.OperatorTypes.AND,conditions:[{type:this.conditionalFilterOptions[0],value:null,rangeEnd:null}]}});var n=this.filterForm.controls.conditional;n.removeControl("conditions"),n.addControl("conditions",this.fb.array([this.defaultOperand]))}this.filterForm.reset(e,{emitEvent:!1}),this.filterForm.updateValueAndValidity()},a.prototype.getColumnValues=function(){var e,n=[],o=this.colFilter,i={},r=o&&o.byValue&&o.byValue.condition,a=this.gridQuery.api.grid,s=ve(this.getValueAndFormattedValue)(this.colField,a,this.colDef.valueFormatter);if(this.isClientSideGrid)a.forEachNodeAfterFilterAndSort((function(t){n.push(s(t)),i[t.id]=!0}));else{var l=a.paginationGetPageSize(),c=l*a.paginationGetCurrentPage(),p=c+l;a.forEachNode((function(t){var e=t.rowIndex;e>=c&&e<p&&n.push(s(t))}))}if(r)if(r===t.DatoFilterConditions.NOT_IN_LIST){var d=this.colDef.valueFormatter,u=o.byValue.values.map((function(t){return{value:t,formattedValue:d?d({value:t}):t}}));n=n.concat(u)}else{var h=this.colFilter.conditional,g=mt(mt({},this.gridQuery.getFilter()),((e={})[this.colField]={conditional:h},e));a.forEachLeafNode((function(t){!i.hasOwnProperty(t.id)&&jr({row:t,api:a},g)&&n.push(s(t))}))}return ue(n,"value")},a.prototype.getValueAndFormattedValue=function(t,e,n,o){var i=e.getValue(t,o);return{value:i,formattedValue:n?n({value:i}):i}},a.prototype.setConditionalFilter=function(e,n){var o=this,i=n.operator,r=n.conditions;r.filter((function(t){var e=t.value,n=t.type;return!Lt(e)||o.isEmptyOperand(n.operand)})).length&&(e.conditional={type:this.colDef.filter||t.DatoGridFilterTypes.String,operator:i,conditions:r.map((function(e){var n=e.value,i=e.type,r=e.rangeEnd,a={condition:i.operand,value:n};if(i.operand===t.DatoFilterConditions.IN_RANGE){var s=mt(mt({},a),{rangeEnd:r});if(o.filterType===t.DatoGridFilterTypes.Date){var l=n,c=l.from,p=l.to;s={condition:i.operand,value:c,rangeEnd:p}}return s}return a}))})},a.prototype.setByValueFilter=function(e,n){if(this.isClientSideGrid){var o=this.columnValues.length;if(n.length!==o){var i=n.length<o/2?t.DatoFilterConditions.IN_LIST:t.DatoFilterConditions.NOT_IN_LIST;e.byValue={condition:i,values:i===t.DatoFilterConditions.IN_LIST?n:this.getByValueExcludeValues(n)}}}else{var r=Array.from(this.excludedValues.values());r.length>0&&(e.byValue={condition:t.DatoFilterConditions.NOT_IN_LIST,values:r})}},a.prototype.buildByValueFilter=function(e){return e?(e.values.length&&this.filterSections.Conditional&&(this.activeAccordionId=1),e.condition===t.DatoFilterConditions.NOT_IN_LIST?(this.isClientSideGrid||(this.excludedValues=new Set(e.values)),[this.getByValueExcludeValues(e.values)]):[e.values]):this.defaultByValue},a.prototype.buildConditionalFilter=function(t){return t?this.fb.group({operator:[this.inputConditionsOperator||t.operator],conditions:this.fb.array(this.buildConditions(t.conditions))}):this.defaultConditional},a.prototype.buildConditions=function(t){var e=this;return t.map((function(t){var n=t.condition,i=t.value,r={type:[{id:e.conditionalFilterOptions.findIndex((function(t){return t.operand===n})),operand:n,label:"core."+n}],value:[i,o.Validators.required],rangeEnd:null};return Ar(t)&&(r.rangeEnd=[t.rangeEnd,o.Validators.required],r.value=[{from:t.value,to:t.rangeEnd},o.Validators.required]),e.fb.group(r)}))},a.prototype.registerOperandListeners=function(){var e=this;this.conditions&&this.conditions.valueChanges.pipe(r.startWith(this.conditions.length),r.map((function(){return e.conditions.length})),r.distinctUntilChanged(),r.switchMap((function(){var t=e.conditions.controls.map((function(t,e){return t.get("type").valueChanges.pipe(r.map((function(t){return{value:t,index:e}})))}));return n.merge.apply(void 0,xt(t))})),i.untilDestroyed(this)).subscribe((function(n){var o=n.value.operand,i=n.index,r={index:i,inRange:o===t.DatoFilterConditions.IN_RANGE};e.filterType===t.DatoGridFilterTypes.Date?e.updateDateInput(r):e.filterType===t.DatoGridFilterTypes.Number&&e.updateNumberInput(r),e.updateValueControlValidator(o,i)}))},a.prototype.updateDateInput=function(t){var e=t.inRange,n=t.index,o=this.conditions.at(n).get("value"),i=o.value;e&&"string"==typeof i?o.patchValue({from:i,to:i,id:"CUSTOM"}):!e&&i&&"object"==typeof i&&o.patchValue(i.from)},a.prototype.updateNumberInput=function(t){var e=t.inRange,n=t.index,i=e?o.Validators.required:null,r=this.conditions.at(n).get("rangeEnd");r.setValidators(i),r.updateValueAndValidity()},a.prototype.updateValueControlValidator=function(t,e){var n=this.isEmptyOperand(t)?null:o.Validators.required,i=this.conditions.at(e).get("value");i.setValidators(n),i.updateValueAndValidity()},a.prototype.isEmptyOperand=function(e){return e===t.DatoFilterConditions.IS_EMPTY||e===t.DatoFilterConditions.NOT_EMPTY||e===t.DatoFilterConditions.IS_NULL||e===t.DatoFilterConditions.NOT_NULL},a.prototype.isStringArray=function(t){return Mt(t[0])},a.prototype.getValuesFromServer=function(e){var n,o=this;this.loadingList=!0,this.listOptions=[];var i={failCallback:function(){o.loadingList=!1,o.serverSearchErrored=!0,o.listOptions=[],o.cdr.detectChanges()},successCallback:function(t){o.loadingList=!1;var e=t.map((function(t){return t[o.colField]}));o.listOptions=e.map(ba),o.patchAndReRegister(e),o.cdr.detectChanges()},serverConfig:{pageSize:30,pageNumber:1,columnFilters:(n={},n[this.colField]={operator:t.OperatorTypes.AND,filters:[{condition:t.DatoFilterConditions.CONTAINS,value:e}]},n),sort:[],columnsToReturn:[this.colField],distinctResults:!0}};this.gridService._originalGetRows(i),this.cdr.detectChanges()},a.prototype.patchAndReRegister=function(t){this.byValueSubscription.unsubscribe(),this.byValueControl.patchValue(this.getNonExcludedValues(t)),this.registerByValueListener()},a.prototype.registerByValueListener=function(){var t=this,e=this.byValueControl;this.byValueSubscription=e.valueChanges.pipe(r.startWith(e.value),r.pairwise()).subscribe((function(e){var n=St(e,2),o=n[0],i=n[1],r=i.length<o.length;(r?le(o,i):le(i,o)).forEach((function(e){return r?t.excludedValues.add(e):t.excludedValues.delete(e)}))}))},a.prototype.getNonExcludedValues=function(t){var e=this;return t.filter((function(t){return!e.excludedValues.has(t)}))},a.prototype.getPivotFields=function(t,e){void 0===e&&(e=[]);var n=t.getParent(),o=t.getOriginalColumnGroup().getColGroupDef().headerClass;return n&&this.getPivotFields(n,e),o&&e.push(o[0]),e},a.ctorParameters=function(){return[{type:e.ElementRef},{type:ca},{type:o.FormBuilder},{type:Mn},{type:e.ChangeDetectorRef}]},vt([e.ViewChildren("operatorToggler"),Ct("design:type",e.QueryList),Ct("design:paramtypes",[e.QueryList])],a.prototype,"operatorToggler",null),a=vt([e.Component({selector:"dato-grid-filter",template:'<form class="container primary-0-background-color" [formGroup]="filterForm" datoForm\n *datoSubscribe="hasFilter$ as hasFilter">\n <ng-container>\n <dato-accordion closeOthers="true" class="filter-options" [activeIds]="activeAccordionId">\n <ng-container *ngIf="filterSections.Conditional">\n\n <dato-accordion-group>\n <dato-accordion-header class="dato-note-bold primary-600-color" data-auto-id="conditional-filters"\n [class.primary-100-background-color]="header_1.isOpen" #header_1>\n <div class="px-10 d-flex align-start-center">\n <div class="filter-title d-flex-grow d-flex align-start-center">{{\'core.filterByCondition\' | translate}}</div>\n <dato-icon class="primary-200-color" height="18px"\n [icon]="header_1.isOpen ? \'collapse\' : \'expand\'"></dato-icon>\n </div>\n </dato-accordion-header>\n <dato-accordion-content #conditionalContent>\n <div class="conditional-content-container d-flex-column" formGroupName="conditional"\n [class.multi-conditions]="conditionsControls.length > 1">\n <div class="operand d-flex-column mb-10"\n [attr.data-auto-id]="\'condition-\' + i"\n *ngFor="let operand of conditionsControls; index as i; last as last">\n <div class="d-flex">\n <div class="d-flex-column d-flex-grow min-width-0">\n <ng-container formArrayName="conditions">\n\n <ng-container [formGroupName]="i">\n <dato-select datoSize="sm" class="mb-10" [attr.data-auto-id]="\'condition-\' + i + \'-operand\'" formControlName="type"\n datoSelectClass="operand-select"\n [dataSet]="conditionalFilterOptions"\n [isCombo]="false" #select>\n <dato-option *ngFor="let option of select.data; index as index"\n [option]="option">\n {{ option.label }}\n </dato-option>\n </dato-select>\n <ng-container [ngSwitch]="filterType">\n <div class="d-flex" *ngSwitchCase="gridFilterTypes.Date">\n <dato-date-picker [attr.data-auto-id]="\'condition-date-\' + i + \'-value\'"\n formControlName="value" class="d-flex-grow range-calendar">\n <ng-template>\n <dato-date-picker-range *ngIf="getOperandType(i) === rangeOperand; else singleDate"></dato-date-picker-range>\n <ng-template #singleDate>\n <dato-date-picker-single></dato-date-picker-single>\n </ng-template>\n </ng-template>\n </dato-date-picker>\n </div>\n <ng-container *ngIf="!isConditionalEmpty(operand)">\n <dato-input *ngSwitchCase="gridFilterTypes.String" datoSize="sm"\n (keydown.enter.stop.prevent)="closePopUp()"\n datoControlErrors [attr.data-auto-id]="\'condition-string-\' + i + \'-value\'"\n [datoControlErrorsOnBlur]="false"\n class="condition-value"\n placeholder="core.filter" formControlName="value"\n [isFocused]="conditionalContent._expanded"\n ></dato-input>\n <div class="d-flex" *ngSwitchCase="gridFilterTypes.Number">\n <dato-input-number (keydown.enter.stop.prevent)="closePopUp()" [showControls]="false"\n class="width-100 condition-value" allowNegative="true">\n <input type="number" formControlName="value" [attr.data-auto-id]="\'condition-number-\' + i + \'-value\'"\n datoInputNumber datoSize="sm" datoControlErrors [datoAutoFocus]="conditionalContent._expanded"\n [datoControlErrorsOnBlur]="false"/>\n </dato-input-number>\n <ng-container *ngIf="getOperandType(i) === rangeOperand">\n <div class="mx-5">-</div>\n <dato-input-number (keydown.enter.stop.prevent)="closePopUp()"\n class="width-100 condition-value" allowNegative="true">\n <input type="number" formControlName="rangeEnd" [attr.data-auto-id]="\'condition-number-\' + i + \'-range-end\'"\n datoInputNumber datoSize="sm" datoControlErrors\n [datoControlErrorsOnBlur]="false"/>\n </dato-input-number>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div>\n\n <dato-icon-button datoSize="md"\n datoType="none" icon="trash"\n class="overflow-hidden delete"\n datoTooltip="core.deleteFilterCondition"\n [attr.data-auto-id]="\'condition-\' + i + \'-remove\'"\n (click)="removeCondition(i)"\n datoTooltipPosition="right-start"></dato-icon-button>\n </div>\n </div>\n <dato-operator-toggler class="mt-10 justify-center width-100 d-flex" data-auto-id="operator-toggler"\n expanded="true" [datoTogglerValue]="conditionsOperator"\n *ngIf="conditionsControls.length > 1 && !last"\n formControlName="operator" #operatorToggler></dato-operator-toggler>\n </div>\n <div class="d-flex align-center">\n <dato-link *ngIf="conditionsControls.length < 3" class="no-select" datoSize="sm" data-auto-id="add-condition"\n datoType="secondary" (click)="addCondition()">\n <dato-icon height="10px" width="10px" icon="plus-simple"></dato-icon>\n {{ \'core.condition\' | translate }}\n </dato-link>\n </div>\n </div>\n </dato-accordion-content>\n </dato-accordion-group>\n <div class="separator"></div>\n </ng-container>\n <ng-container *ngIf="filterSections.By_Value">\n <dato-accordion-group class="list-content">\n <dato-accordion-header class="dato-note-bold primary-600-color" data-auto-id="by-value-filters"\n [class.primary-100-background-color]="header_2.isOpen" #header_2>\n <div class="px-10 d-flex align-start-center">\n <div class="filter-title d-flex d-flex-grow align-start-center">{{\'core.filterByValue\' | translate}}</div>\n <dato-icon class="primary-200-color" height="18px"\n [icon]="header_2.isOpen ? \'collapse\' : \'expand\'"></dato-icon>\n </div>\n </dato-accordion-header>\n <dato-accordion-content #byValueContent>\n <div class="value-content-container d-flex-column">\n <dato-input datoSize="sm" placeholder="core.search-all-values" [debounceTime]="300" #search [formControl]="listSearchControl" [isFocused]="byValueContent._expanded"></dato-input>\n <dato-list-v2 class="primary-0-background-color"\n containerHeight="195px"\n [withSelectAll]="true"\n [clientSearch]="isClientSideGrid"\n [sortByKey]="listSortByKey"\n [labelType]="listLabelType"\n [searchController]="search"\n [options]="listOptions"\n [isSortList]="!keepPredefinedListOriginalOrder"\n [loading]="loadingList"\n [noDataTpl]="isClientSideGrid ? null : noData"\n formControlName="byValue"\n data-auto-id="by-value-filters-list">\n </dato-list-v2>\n <ng-template #noData>\n <div *ngIf="serverSearchErrored; else noResults" class="mb-10 d-flex-1 d-flex-column align-center" data-auto-id="by-value-server-error">\n <img class="mt-20" datoStaticSrc="core/grid/filter-server-error.svg"/>\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ \'core.something-went-wrong\' | translate }}</p>\n <p class="dato-note-italic primary-300-color">{{ \'core.try-again-later\' | translate }}</p>\n </div>\n <ng-template #noResults>\n <dato-list-no-result class="mb-10 block" data-auto-id="by-value-no-results"></dato-list-no-result>\n </ng-template>\n </ng-template>\n </div>\n </dato-accordion-content>\n </dato-accordion-group>\n <div class="separator"></div>\n </ng-container>\n </dato-accordion>\n </ng-container>\n <div class="actions no-select px-10 py-12 d-flex align-end-center">\n <dato-link *ngIf="showClearFiltersButton" class="mr-30" datoType="secondary" datoSize="sm"\n (click)="clearFilters()" data-auto-id="clear-filters" [disabled]="!hasFilter">\n {{ \'core.clearFilters\' | translate }}\n </dato-link>\n <dato-button datoSize="sm" [datoTooltip]="hotKeyTooltip" [datoHotkeys]="applyHotKeyConfig" (click)="closePopUp()" data-auto-id="apply-filters">{{\'core.apply\' | translate}}</dato-button>\n </div>\n</form>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host dato-accordion-header{transition:background-color .2s ease-in-out}:host>.container{width:242px}:host .value-content-container dato-input{padding:10px}:host .conditional-content-container{padding:10px;transition:padding-right .2s ease-in-out}:host .conditional-content-container.multi-conditions{padding-right:0}:host .conditional-content-container.multi-conditions .delete{width:24px}:host .filter-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:40px;transition:color .2s ease-in-out}:host .separator{height:1px;width:100%}:host .delete{transition:width .2s ease-in-out;width:0}"]}),Ct("design:paramtypes",[e.ElementRef,ca,o.FormBuilder,Mn,e.ChangeDetectorRef])],a)}(),Sa=function(){function t(t){this.popover=t}return t.prototype.openMoreMenu=function(t,e,n){return void 0===n&&(n=ha),this.openMenu({tpl:n,origin:t,params:e,menuType:"more"})},t.prototype.openFilterMenu=function(t,e,n){return void 0===n&&(n=wa),this.openMenu({tpl:n,origin:t,params:e,menuType:"filter"})},t.prototype.popoverConfig=function(t,e){return{popper:{placement:"bottom-end"},className:e,data:{api:{grid:t.api,columns:t.columnApi},column:t.column,gridQuery:t.gridQuery,gridService:t.gridService}}},t.prototype.openMenu=function(t){var e=t.tpl,n=t.origin,o=t.params,i=t.menuType;return o.api.hidePopupMenu(),this.popover.open(e,n,this.popoverConfig(o,"dato-grid-"+i+"-menu"))},t.ctorParameters=function(){return[{type:da}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(da))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[da])],t)}(),xa=function(){function o(t,e,n,o){this.vcr=t,this.controller=e,this.host=n,this.cdr=o,this.moreMenuOpen=!1,this.filtersMenuOpen=!1}return o.prototype.afterGuiAttached=function(t){},o.prototype.refresh=function(t){return!1},o.prototype.agInit=function(e){var o=this;this.params=e,this.column=e.column;var a=e.column.getColDef();this.headerInfo=a.info,this.headerName=a.headerName,this.showFilter=a.filter!==t.DatoGridFilterTypes.None,this.showMoreMenu=Lt(a.moreMenuActions)||a.moreMenuActions.length>0,this.field=gr(a),this.headerTooltip=this.getHeaderTooltip(a),this.context={api:{grid:e.api,columns:e.columnApi},column:this.column};var s=this.params,l=s.gridQuery,c=s.gridService;this.customTemplates=c.getCustomHeader(this.field),this.filterActive$=l.select((function(t){return t.settings.filter[o.field]})).pipe(r.map((function(t){var e=t&&he(t.pivotKeys,a.pivotKeys);return ye(t)>0&&e}))),this.params.enableSorting&&(n.fromEvent(this.host.nativeElement,"click").pipe(i.untilDestroyed(this)).subscribe((function(){var t,e=o.column.getColDef()?o.column.getColDef().sortingOrder:null,n=o.column.getSort(),i=o.column.getColId();if(e&&e.length>0){var r=e.indexOf(n);t=e[-1===r||r===e.length-1?0:r+1]}else t="asc"!==n?"asc":"desc";c._logEvent("Grids - Column Action",{action:"Sort",column:i}),l.isServerSide&&c.setLoading(!0),l.getGridOptions().sortByStore?c.setSortByColumn(i,t):o.params.setSort(t)})),this.sortingInfo$=l.waitForGrid((function(){return l.gridRef.sortChanged})).pipe(r.startWith({}),r.map((function(){return{active:o.column.isSorting(),icon:!o.column.isSorting()||o.column.isSortAscending()?"sort-ascending":"sort-descending"}}))))},o.prototype.openFilters=function(t){var e=this;this.filtersMenuOpen=!0,this.controller.openFilterMenu(t.host.nativeElement,this.params).pipe(i.untilDestroyed(this)).subscribe((function(){e.filtersMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.openMoreMenu=function(t){var e=this;this.moreMenuOpen=!0,this.controller.openMoreMenu(t.host.nativeElement,this.params,this.customTemplates.moreMenu).pipe(i.untilDestroyed(this)).subscribe((function(){e.moreMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.ngOnDestroy=function(){},o.prototype.getHeaderTooltip=function(t){if(this.params){var e=t;if(e.showRowGroup){var n=this.params.columnApi.getRowGroupColumns(),o=n&&n.find((function(t){return t.getColId()===e.showRowGroup})),i=o&&o.getColDef();e=i||e}return e.customHeaderTooltip||e.headerName}return""},o.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:Sa},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},o=vt([e.Component({selector:"dato-grid-column-header",template:'<div class="d-flex align-start-center" [attr.data-auto-id]="field + \'-column-header\'" [attr.data-field]="field">\n <ng-container *ngIf="customTemplates && customTemplates.customHeader as customHeader">\n <div class="mr-5" [attr.data-auto-id]="field + \'-dynamic-section\'">\n <ng-container *ngTemplateOutlet="customHeader; context: context"></ng-container>\n </div>\n </ng-container>\n <div class="d-flex d-flex-grow align-start-center min-width-0 items-center">\n <span class="dato-simple-bold primary-400-color ellipsis min-width-0 mr-5" [datoTooltip]="headerTooltip"\n datoTooltipPosition="bottom">{{headerName}}</span>\n <div>\n <dato-icon class="primary-300-color" *ngIf="headerInfo" [datoTooltip]="headerInfo" datoTooltipPosition="bottom" datoIcon="question"></dato-icon>\n </div>\n </div>\n <div class="sort-icon opacity-0" *ngIf="params.enableSorting && (sortingInfo$ | async) as sortingInfo"\n [class.active]="sortingInfo.active">\n <dato-icon width="24px" height="16px" class="primary-300-color"\n [attr.data-auto-id]="field + \'-sort\'"\n [icon]="sortingInfo.icon"></dato-icon>\n </div>\n <ng-container *ngIf="showFilter">\n <div class="filter relative" *datoSubscribe="filterActive$ as filterActive">\n <dato-icon-button (click.stop)="openFilters(filters)" datoTooltip="core.filters" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-filter\'" class="filter-icon opacity-0"\n [class.active]="filtersMenuOpen || filterActive"\n datoSize="md" icon="filter"\n #filters></dato-icon-button>\n <div [class.opacity-100]="filterActive"\n class="opacity-0 filter-active-circle accent-400-background-color absolute"></div>\n </div>\n </ng-container>\n <dato-icon-button *ngIf="showMoreMenu" (click.stop)="openMoreMenu(moreMenu)" datoTooltip="core.more-options" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-more-menu\'" [class.active]="moreMenuOpen"\n datoSize="md" icon="more-vertical" #moreMenu></dato-icon-button>\n</div>\n',styles:[":host{width:100%}:host .filter-icon,:host .sort-icon{transition:opacity .25s linear,width .25s ease-in-out;width:0}:host .sort-icon{height:16px}:host .filter-icon.active,:host .sort-icon.active{opacity:1;width:24px}:host:hover .filter-icon,:host:hover .sort-icon{opacity:1;width:24px}:host .filter-active-circle{pointer-events:none;transition:opacity .2s ease-in-out;position:absolute;height:8px;width:8px;top:2px;right:2px;border-radius:4px;border:1px solid #fff}:host ::ng-deep .filter dato-icon-button dato-icon{transition:color .2s ease-in-out}"]}),Ct("design:paramtypes",[e.ViewContainerRef,Sa,e.ElementRef,e.ChangeDetectorRef])],o)}();function Oa(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}var Da=function(t){return t[ja]},Ia={getDataPath:Da,components:{fileCellRenderer:function(t){var e=t.data,n=t.eGridCell,o=t.colDef,i=e.icon,r=e.isFolder,a=e.initials,s=void 0===a||a,l=function(t,e,n){if(null===t)return null;var o=function(t,e){var n=e.expanded,o=e.collapsed;return t.parentElement.classList.contains("ag-row-group-expanded")?n:o};return void 0===t?n?o(e,{expanded:"folder-open",collapsed:"folder-closed"}):null:"string"==typeof t?t:o(e,t)}(i,n,r),c=e[o.field],p=o.gridService.svgRegistry;if(l)return'<span class="dato-simple-bold"> <span class="da-grid-icon folder d-flex">'+p.getSvg(l)+'</span><span class="entity-display-name"></span> '+c+"</span>";if(r)return'<span class="entity-display-name dato-simple-bold">'+c+"</span>";if(s){var d=Ee(c);return d?'<span class="entity-display-name dato-simple-bold"><span class="initials">'+d+"</span>"+c+"</span>":'<span class="entity-display-name dato-simple-bold">'+c+"</span>"}return'<span class="entity-display-name dato-simple-bold">'+c+"</span>"}},onRowDragMove:function(t){var e,n=t.overNode,o=(t.node,t.api);e=n?n.data.isFolder?n:n.parent:Fa(o);if(Ma){if(Ma.id===e.id)return;var i=Na(Ma.id);i&&i.classList.remove("ag-row-hover"),Ma=null}else Ma=e;if(e){var r=Na(e.id);r&&r.classList.add("ag-row-hover")}},onRowSelected:function(t){if(La)return;La=!0,e=t.node,n=t.node.selected,e.allChildrenCount>0&&e.allLeafChildren.forEach((function(t){t.setSelected(n)})),function(t){var e=t.parent;for(;e&&"ROOT_NODE_ID"!==e.id;)Ga(e),e=e.parent}(t.node),setTimeout((function(){La=!1}),0);var e,n},onRowGroupOpened:function(t){var e=t.node;this.api.refreshCells({force:!0,rowNodes:[e]})},suppressRowClickSelection:!0,groupSelectsChildren:!0,icons:{rowDrag:'<dato-icon icon="drag" class="dato-icon-font-drag primary-400-color"></dato-icon>'}};function Ta(t){return void 0===t&&(t=-1),mt(mt({},Ia),{onRowDragEnd:function(e){return function(t,e){var n,o,i=t.overNode,r=t.node,a=t.api;i?(n=r.parent,o=i.data.isFolder?i:i.parent):(n=Fa(a),o=Fa(a));var s=r.data;if(s.isFolder&&-1!==e&&"ROOT_NODE_ID"!==n.id&&i.data.agGridFilePath.length>e)return;var l=o.data?o.data[ja]:[],c=!jt(l,s[ja]),p=function t(e,n){for(var o=e.childrenAfterGroup,i=0;i<o.length;i++){if(n&&o[i].key===n.key)return!0;t(o[i],n)}return!1}(r,o);p&&console.log("invalid move");if(c&&!p){var d=[],u=this.autoGroupColumnDef.gridService.treeConfig.idKey;!function t(e,n,o,i){var r=n.data,a=n.childrenAfterGroup,s=e.slice();r[ja]=s,o.push(r),ye(a)>0&&a.forEach((function(e){t(xt(s,[r[i]]),e,o,i)}));r[ja].push(r[i])}(l,r,d,u);var h=this.autoGroupColumnDef.gridService.updateRows(d);f=xt(h.update,[i,n]),m=["ag-row-level-1","ag-row-level-2","ag-row-level-3"],f.forEach((function(t){var e,n,o=document.querySelectorAll('[row-id="'+t.id+'"]')[1];if(o){try{for(var i=wt(m),r=i.next();!r.done;r=i.next()){var a=r.value;if(o.classList.contains(a)){o.classList.remove(a);break}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}o.classList.add("ag-row-level-"+t.level)}}));var g=Na(Ma.id);g&&g.classList.remove("ag-row-hover"),Ma=null,this.api.redrawRows({rowNodes:[n,o]}),this.api.clearFocusedCell()}var f,m}(e,t)}})}var Ra=Ta(),Aa=function(t,e){return(t||"").toLowerCase().localeCompare((e||"").toLowerCase())},Ea={filter:t.DatoGridFilterTypes.String,comparator:Aa},Pa=mt({hoverConfig:{enabled:!0,maxDisplayedItems:3},enableV2_1:!1,enableSearch:!1,enableSearchHighlight:!0,columnsIncludedInSearchByDefault:!0,includeHiddenColumnsInSearch:!1,enableAllPagesSelection:!0,idColumnKey:"id",enableBackground:!0,columnTypes:(ya={},ya[t.DatoGridColumnTypes.Date]={filter:t.DatoGridFilterTypes.Date,comparator:function(t,e){return Oa(t)-Oa(e)}},ya[t.DatoGridColumnTypes.Number]={filter:t.DatoGridFilterTypes.Number,comparator:function(t,e){var n=function(t){var e=null==t||""===t?NaN:Number(t);return isNaN(e)?-1/0:e},o=n(t),i=n(e);return o===i?0:o<i?-1:1}},ya[t.DatoGridColumnTypes.String]=Ea,ya[t.DatoGridColumnTypes.Status]=mt(mt({},Ea),{cellRenderer:"DatoGridStatusCellComponent"}),ya[t.DatoGridColumnTypes.Items]=mt(mt({},Ea),{cellRenderer:"DatoGridItemsCellComponent"}),ya[t.DatoGridColumnTypes.ItemsCount]=mt(mt({},Ea),{cellRenderer:"DatoGridItemsCountCellComponent"}),ya[t.DatoGridColumnTypes.Initials]=mt(mt({},Ea),{cellRenderer:"DatoGridInitialsCellComponent"}),ya[t.DatoGridColumnTypes.Avatar]=mt(mt({},Ea),{cellRenderer:"DatoGridAvatarCellComponent"}),ya),multiSortKey:"ctrl",suppressPaginationPanel:!0,pagination:!0,paginateChildRows:!0,loadingOverlayComponentFramework:Yr,noRowsOverlayComponentFramework:na,defaultColDef:{minWidth:t.GridMinWidths.Default,sortable:!0,resizable:!0,type:t.DatoGridColumnTypes.String,menuTabs:["filterMenuTab"],headerComponentFramework:xa},suppressCellFocus:!0,suppressPropertyNamesCheck:!0,rowHeight:35,headerHeight:30,rowSelection:t.GridRowSelectionType.MULTIPLE,unSortIcon:!0,animateRows:!0,groupDisplayType:"multipleColumns",groupDefaultExpanded:-1,usePivotGridStyle:!1,disabledHTMLRenderingFields:[]},Ai()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),ka={CLIENT:200,SERVER:250},_a={idKey:"id",parentIDKey:"parentID"},ja="agGridFilePath";var Ma=null,La=!1;function Na(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function Fa(t){return t.getModel().getRootNode()}function Ga(t){var e=t.allLeafChildren.map((function(t){return t.selected}));if(!e.every((function(t){return!0===t||void 0===t}))){e.shift();var n=e.reduce((function(t,e){if(t===e)return t}));t.selectThisNode(n)}}function Va(t,e){var n=e.parentIDKey,o=e.idKey,i=function(e,r){void 0===r&&(r=!1);var a=r?[e[o]]:[],s=t.find((function(t){return t[o]===e[n]}));if(a.unshift(s[o]),s[n]){var l=i(s);a.unshift.apply(a,xt(l))}return a};return t.map((function(t){var e,r;return t[n]?mt(mt({},t),((e={})[ja]=i(t,!0),e)):mt(mt({},t),((r={})[ja]=[t[o]],r))}))}function za(t,e){return t.map((function(t){var n,o=yt(t,[]),i=o[ja],r=ye(i)>1?i[i.length-2]:0;return delete o[ja],mt(mt({},o),((n={})[e.parentIDKey]=r,n))}))}var Ba=new e.InjectionToken("DATO_CORE_LOGGER"),Ha=function(){function t(t,e,n){this.gridService=t,this.gridQuery=e,this.cdr=n,this.checkboxControl=new o.FormControl(!1)}return t.prototype.agInit=function(t){var e=this;this.gridApi=t.api,this.gridOptions=this.gridQuery.getGridOptions(),this.subscribeRowsSelectionData(),this.checkboxControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(t){e.toggleMultiSelection(t)}))},t.prototype.refresh=function(t){return!1},t.prototype.subscribeRowsSelectionData=function(){var t=this;this.gridQuery.gridReady$.pipe(r.take(1),r.switchMap((function(){return t.gridQuery.rowsSelectionData$})),i.untilDestroyed(this)).subscribe((function(e){var n=e.selectedPageRowsCount,o=e.isAllPageRowsSelected;t.indeterminatelyChecked=n>0&&!o,t.checkboxControl.patchValue(o,{emitEvent:!1}),t.cdr.detectChanges()}))},t.prototype.toggleMultiSelection=function(t){if(this.gridService.selectAllCurrentPageRows(t),!t&&this.gridQuery.isServerSelectAllRowsEnabled){var e=this.gridQuery.serverSideConfig,n=e.excludedFromSelectAll,o=e.totalRows,i=de(xt(n,this.gridQuery.getCurrentPageRows().map((function(t){return t.id}))));ye(i)===o?this.gridService.setServerSidePagination({selectAllRowsEnabled:!1}):this.gridService.setServerSidePagination({excludedFromSelectAll:i})}},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:Ua},{type:wr},{type:e.ChangeDetectorRef}]},t=vt([e.Component({selector:"dato-grid-multi-select-column-header",template:'<dato-checkbox [formControl]="checkboxControl" [indeterminatelyChecked]="indeterminatelyChecked"></dato-checkbox>',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{height:100%;display:flex;align-items:center}"]}),Ct("design:paramtypes",[Ua,wr,e.ChangeDetectorRef])],t)}(),Ua=function(){function o(t,e,o,i,r,a,s){this.store=t,this.gridQuery=e,this.translate=o,this.iconRegistry=i,this.svgRegistry=r,this.storageAPI=a,this.logger=s,this.treeConfig=_a,this.pageNumberToReturnAfterRefresh=-1,this.reloadGridActionsSubject=new n.Subject,this.CHECKBOX_SELECTION_COL_ID="grid-checkbox-selection"}return Object.defineProperty(o.prototype,"treeData",{get:function(){return this.isTreeData},set:function(t){this.isTreeData=t},enumerable:!0,configurable:!0}),o.prototype.ngOnDestroy=function(){},o.prototype._setApi=function(t,e){this.api=t,this.gridRef=e,this.gridName=e.gridOptions.gridName,this.setServerSidePagination({enabled:this.isServerSidePagination(e.gridOptions)})},o.prototype.isServerSidePagination=function(t){return"infinite"===t.rowModelType},o.prototype.updateGridContext=function(t,e){void 0===t&&(t={}),void 0===e&&(e=!1),this.gridQuery.getGridOptions().context=e?t:ea(this.gridRef.gridOptions.context||{},t)},o.prototype.reloadGridActions=function(){this.reloadGridActionsSubject.next()},o.prototype.onReloadGridActions=function(){return this.reloadGridActionsSubject.asObservable()},o.prototype.setSelectedRows=function(t){this.selectRows(t)},o.prototype.selectRows=function(t){var e=me(t).filter((function(t){return!t.isSelected()})),n=e.pop();e.forEach((function(t){return t.setSelected(!0,!1,!0)})),n&&n.setSelected(!0)},o.prototype.deselectRows=function(t){var e=me(t).filter((function(t){return t.isSelected()})),n=e.pop();e.forEach((function(t){return t.setSelected(!1,!1,!0)})),n&&n.setSelected(!1)},o.prototype.setRows=function(t,e,n){var o=this;void 0===e&&(e=!1),void 0===n&&(n={}),this.gridQuery.gridReady$.pipe(r.take(1)).subscribe((function(){if(o.isTreeData){o.treeConfig=mt(mt({},_a),n);var i=Va(t,o.treeConfig);o.api.grid.setRowData(i)}else o.isPivotMode?o.setPivotModeRows(t):o.api.grid.setRowData(t);e?o.fitGrid("container"):tn()}))},o.prototype.setDatasource=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1),e&&this.updatePageToKeepOnRefreshServerData(),n&&this.setLoading(!0),this._originalGetRows=t,this.api.grid.setDatasource({getRows:this.wrapGetRows(this.gridQuery.getGridOptions(),t)})},o.prototype.refreshServerData=function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),t&&this.updatePageToKeepOnRefreshServerData(),e&&this.setLoading(!0),this.api.grid.setDatasource({getRows:this.gridQuery.getGridOptions().datasource.getRows})},o.prototype.updatePageToKeepOnRefreshServerData=function(){1===this.gridQuery.getGridOptions().maxBlocksInCache&&(this.pageNumberToReturnAfterRefresh=this.api.grid.paginationGetCurrentPage())},o.prototype.addRows=function(t,e){var n={add:me(t)};return Lt(e)||(n.addIndex=e),this.api.grid.updateRowData(n)},o.prototype.updateRows=function(t){var e=me(t);return this.api.grid.updateRowData({update:e})},o.prototype.updateRowValue=function(t,e,n){(Mt(t)?this.api.grid.getRowNode(t):t).setDataValue(e,n)},o.prototype.removeRows=function(t){var e=me(t).map((function(t){return t.data}));return this.api.grid.updateRowData({remove:e})},o.prototype.removeSelectedRows=function(){var t=this.gridQuery.getSelectedRowNodes();return this.removeRows(t)},o.prototype.clearTable=function(){this.setRows([])},o.prototype.updateColumns=function(t,e){if(void 0===e&&(e=!1),!t)throw new Eo("No columnDefs were provided. 🕵🏻‍♀️");var n=this.normalizeColumns(me(t)),o=e&&this.gridQuery.getCurrentGridSettings();this.api.grid.setColumnDefs(n),o&&this.loadSavedSettings(o)},o.prototype.initGridOptions=function(e){var n=mt({},e);if(void 0===e.enableSearch&&(n.enableSearch=n.enableV2_1),void 0===e.enableBackground&&(n.enableBackground=n.enableV2_1),void 0===e.showMultiSelectionCheckboxes&&(n.showMultiSelectionCheckboxes=e.enableV2_1&&n.rowSelection!==t.GridRowSelectionType.SINGLE),void 0===e.enableSearchHighlight&&(n.enableSearchHighlight=n.enableSearch&&Pa.enableSearchHighlight),e.usePivotGridStyle){n.rowHeight=30,n.defaultColDef=mt(mt({},n.defaultColDef),{cellClassRules:this.getPivotModeCellClassRules(),headerClass:this.getPivotHeaderClass.bind(this),cellStyle:function(e){var n={lineHeight:"30px"};return e.colDef.type===t.DatoGridColumnTypes.Number&&(n.textAlign="end"),n}}),n.autoGroupColumnDef=mt(mt({},n.autoGroupColumnDef),{cellClassRules:this.getPivotModeCellClassRules(),headerClass:this.getPivotHeaderClass.bind(this)})}return n},o.prototype.normalizeOptions=function(t){var e=this;this.customHeadersTemplates=t.customHeadersTemplates;var n={gridService:this,gridQuery:this.gridQuery};if(t.gridOptions.autoGroupColumnDef=mt(mt({},n),t.gridOptions.autoGroupColumnDef),t.gridOptions.defaultColDef=mt(mt({},t.gridOptions.defaultColDef),{headerComponentParams:n}),t.gridOptions.columnDefs=this.normalizeColumns(t.gridOptions.columnDefs,t.gridOptions),t.gridOptions.isExternalFilterPresent=function(){return!0},t.gridOptions.doesExternalFilterPass=function(t){return jr({row:t,api:e.gridQuery.api.grid},e.gridQuery.getFilter())&&e.rowMatchesSearch(t)},this.isServerSidePagination(t.gridOptions)){t.gridOptions.blockLoadDebounceMillis=300,this._originalGetRows=t.gridOptions.datasource.getRows,t.gridOptions.datasource.getRows=this.wrapGetRows(t.gridOptions);var o=t.gridOptions.paginationPageSize;o&&(t.gridOptions.cacheBlockSize=o)}this.initEditableColumnsCellClass(t),t.gridOptions.getContextMenuItems=this.wrapContextMenuBuilder(t);var i=t.gridOptions,r=i.saveSettings,a=i.gridName;if(t.gridOptions.saveSettings=!1!==r&&!Lt(a),this.initOnRowSelectedForServerSidePagination(t),this.isTreeData){var s=t.gridOptions.rowClassRules;t.gridOptions.rowClassRules=mt(mt({},s),{"ag-empty-folder":function(t){return t.data.isFolder&&0===ye(t.node.childrenAfterGroup)}})}return this.isPivotMode&&(this.initPivotSecondaryColsProcess(t),t.gridOptions.saveSettings=!1),t.gridOptions},o.prototype.getPivotHeaderClass=function(t){var e=t.colDef.headerComponentParams.gridQuery,n="";if(e&&e.api){var o=e.api.columns.getSecondaryColumns();o&&o.length>0&&(n+="top-border")}return n},o.prototype.normalizeColumns=function(e,n){var o=this;void 0===n&&(n=null),n||(n=this.gridQuery.getGridOptions());var i=e.map((function(e){var i=mt(mt({},e),{headerName:o.translate.transform(e.headerName)});return e.info&&(i.minWidth=e.minWidth||t.GridMinWidths.With_Info),e.colId||(i.colId=e.field),i.type!==t.DatoGridColumnTypes.Items||i.filtersConfig||(i.filtersConfig={sections:t.DatoGridFilterSections.Conditional}),o.normalizeColumnSearchConfig(n,e,i),i}));return this.addMultiSelectHeaderColumnIfRequired(i,n)},o.prototype.normalizeColumnSearchConfig=function(e,n,o){var i=this,r=this.isServerSidePagination(e);void 0===n.includeInSearch&&(r&&n.type===t.DatoGridColumnTypes.Date?o.includeInSearch=!1:o.includeInSearch=void 0!==e.columnsIncludedInSearchByDefault?e.columnsIncludedInSearchByDefault:Pa.columnsIncludedInSearchByDefault),o.includeInSearch&&!this.hasCellRenderer(o,e)&&e.enableSearchHighlight&&(o.cellRenderer=function(t){var n=mr(e,t.colDef),r=t.column,a=t.colDef,s=r&&a?{api:t.api,columnApi:t.columnApi,context:t.context,node:t.node,data:t.data,column:r,colDef:a}:null;return(Et(o.editable)?s&&o.editable(s):o.editable)?Qr(t,i.gridQuery.getSearchTerm(),n):qr(t,i.gridQuery.getSearchTerm(),n)})},o.prototype.hasCellRenderer=function(t,e){if(t.cellRenderer)return!0;var n=t.type,o=function(t){return t.columnTypes&&!!t.columnTypes[n]&&!!t.columnTypes[n].cellRenderer};return o(e)||o(Pa)},o.prototype.addMultiSelectHeaderColumnIfRequired=function(e,n){var o=n&&n.showMultiSelectionCheckboxes,i=n&&n.rowSelection?n.rowSelection:Pa.rowSelection;return o&&i===t.GridRowSelectionType.MULTIPLE?xt([{colId:this.CHECKBOX_SELECTION_COL_ID,checkboxSelection:!0,headerComponentFramework:Ha,minWidth:29,width:29,maxWidth:29,suppressSizeToFit:!0,cellClass:"checkbox-selection-cell",headerClass:"header-checkbox-selection-cell",resizable:!1,pinned:"left",lockPosition:!0,includeInSearch:!1}],e):e},o.prototype.initOnRowSelectedForServerSidePagination=function(t){var e=this,n=t.gridOptions;if(this.isServerSidePagination(n)){var o=n.onRowSelected;n.onRowSelected=function(t){if(e.gridQuery.isServerSelectAllRowsEnabled){var n=t.node,i=n.isSelected(),r=e.gridQuery.serverSideConfig.excludedFromSelectAll,a=r.includes(n.id);i&&a?e.setServerSidePagination({excludedFromSelectAll:r.filter((function(t){return t!==n.id}))}):i||a||e.setServerSidePagination({excludedFromSelectAll:xt(r,[n.id])})}o&&o(t)}}},o.prototype.rowMatchesSearch=function(t){var e,n,o=(this.gridQuery.getSearchTerm()||"").toLowerCase().trim();if(kt(o))return!0;var i=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch?this.gridQuery.getAllColumns():this.gridQuery.getAllDisplayedColumns();try{for(var r=wt(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(this.api.grid.getColumnDef(s.getColId()).includeInSearch)if((this.api.grid.getValue(s.getColId(),t)||"").toString().toLowerCase().includes(o))return!0}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!1},o.prototype.fitToContainer=function(){this.api.grid.sizeColumnsToFit()},o.prototype.getCustomHeader=function(t){if(this.customHeadersTemplates){var e=this.customHeadersTemplates.find((function(e){return e.column===t})),n=this.customHeadersTemplates.find((function(t){return!t.column}));if(e||n){var o={moreMenu:e&&e.moreMenu||n&&n.moreMenu,customHeader:e&&e.customHeader||n&&n.customHeader},i=o.moreMenu,r=o.customHeader;return{moreMenu:i&&i.tpl,customHeader:r&&r.tpl}}}return{}},o.prototype.clearAllFilters=function(){this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:{},searchTerm:null})}})),this.notifyFilterUpdate()},o.prototype.clearColumnFilter=function(t){var e=this.gridQuery.getFilter(),n=t,o=(e[n],yt(e,["symbol"==typeof n?n:n+""]));this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:o})}})),this.notifyFilterUpdate()},o.prototype.setColumnFilter=function(t,e,n){void 0===n&&(n=!0),this._logEvent("Grids - Filter Applied",{column:t.getColId(),numOfConditions:e.conditional&&e.conditional.conditions.length||0,byValue:e.byValue?"Yes":"No"}),this.updateFilter(t,e),n&&this.notifyFilterUpdate()},o.prototype.setGridFilters=function(t){var e,n;if(this.api&&t){var o={};try{for(var i=wt(t),r=i.next();!r.done;r=i.next()){var a=r.value,s=a.filter;o[a.field]=s}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.updateSettings({filter:o}),this.notifyFilterUpdate()}},o.prototype.setSortByColumn=function(t,e){var n=this.gridQuery.getSort({colId:t,sort:e});this.setGridSort(n)},o.prototype.setGridSort=function(t){if(t&&this.api&&this.api.grid.getDisplayedRowCount()>0){var e=t.colId,n=t.sort,o=t.sortIndex,i=this.api.columns.getAllGridColumns();if(i){var r=t,a=i.find((function(t){return(t.getColDef().showRowGroup||t.getColId())===e}));if(a)r={colId:a.getColId(),sort:n};else if(!Lt(o)){var s=this.api.columns.getValueColumns().find((function(t){return t.getColId()===e}));if(e.startsWith("pivot")||s)r={colId:i[o].getColId(),sort:n,sortIndex:o}}this.updateSettings({sort:r}),pr(this.api.columns,[r]),this.gridRef.gridOptions.usePivotGridStyle&&this.api.grid.redrawRows()}}},o.prototype.updateFilter=function(t,e){var n=gr(t.getColDef());this.store.update((function(t){var o;return{settings:mt(mt({},t.settings),{filter:mt(mt({},t.settings.filter),(o={},o[n]=e,o))})}}))},o.prototype.setSearchTerm=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),{searchTerm:t})}})),this.notifyFilterUpdate()},o.prototype.setServerSidePagination=function(t){this.store.update((function(e){return{serverSidePagination:mt(mt({},e.serverSidePagination),t)}}))},o.prototype.setLoading=function(t){t?this.api.grid.showLoadingOverlay():0===this.api.grid.getDisplayedRowCount()?this.setOverlay(!0):this.setOverlay(!1)},o.prototype.setNoData=function(t){this.setOverlay(t)},o.prototype.setOverlay=function(t){t?this.api.grid.showNoRowsOverlay():this.api.grid.hideOverlay()},o.prototype.updateSettings=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),t)}}))},o.prototype.fitGrid=function(t){"container"===t?this.api.grid.sizeColumnsToFit():this.api.columns.autoSizeAllColumns();var e="container"===t?0:1;this.updateSettings({gridAlignment:e,columnsSizes:null})},o.prototype.saveSettingsToServer=function(t){this.storageAPI.set(this.gridName,t)},o.prototype._logEvent=function(t,e){this.logger.logEvent(t,mt({table:this.gridName},e))},o.prototype.wrapSuccessCallback=function(t){var e=this,n=t.successCb,o=t.pageNumber,i=t.isPendingReturnToPage;return function(t,r){e.setServerSidePagination({totalRows:r,hasError:!1}),n(t,r),e.gridQuery._serverDataLoaded.next({api:e.api.grid,columnApi:e.api.columns,type:"ServerDataLoaded",paginationPage:o}),i||(e.setLoading(!1),tn()),e.lastTotalRows=r}},o.prototype.wrapGetRows=function(t,e){var n=this,o=e||t.datasource.getRows;return function(e){var i=e.startRow,r=e.endRow,a=e.sortModel,s=e.successCallback,l=t.paginationPageSize||100,c=n.pageNumberToReturnAfterRefresh>0,p=c&&0===i,d=c?n.pageNumberToReturnAfterRefresh+1:Math.ceil(r/l);n.pageNumberToReturnAfterRefresh=-1;var u=n.gridQuery.getFilter(),h=mt(mt({},e),{failCallback:function(){n.setServerSidePagination({hasError:!0}),n.setOverlay(!0)},successCallback:n.wrapSuccessCallback({pageNumber:d,successCb:s,isPendingReturnToPage:p}),serverConfig:{pageSize:l,pageNumber:d,columnFilters:kt(u)||t.enableV2_1?null:n.buildServerRequestFilters(u),filter:t.enableV2_1?n.buildServerRequestFilters_v2_1(t.columnDefs):null,sort:n.buildServerRequestSort(a)}});if(p){!function(t){(0,t.successCallback)([],n.lastTotalRows)}(h)}else o(h)}},o.prototype.initEditableColumnsCellClass=function(t){var e=this;t.gridOptions.columnDefs.forEach((function(t){if(t.editable)if(Et(t.editable)){var n=t.cellClass;t.cellClass=function(o){if(t.editable(o)){var i=e.addEditableCellClass(n);return Et(i)?i(o):i}return Et(n)?n(o):n}}else t.cellClass=e.addEditableCellClass(t.cellClass)}))},o.prototype.wrapContextMenuBuilder=function(t){var e=this,n=t.gridOptions.customContextMenu,o=Et(n)?n(t.rowActions):t.rowActions;this.translateActionLabels(o);var i={label:this.translate.transform("core.copy-cell"),icon:"copy",key:"Copy Cell"};return function(t){var n=t.node,r=t.column,a=t.context,s=a&&a.contextMenu&&a.contextMenu.fromOnHover;if(!n)return[];var l=[n],c=1;s?e.updateGridContext({contextMenu:{fromOnHover:!1}}):(i.onClick=function(t){var n=St(t,1)[0],o=e.api.grid.getValue(r.getColId(),n),i=r.getColDef().valueFormatter;Bn(i&&"string"!=typeof i?i(o):o)},n.isSelected()&&(c=ye(l=e.gridQuery.getSelectedRowNodes())));var p=Mr(o,c,l,e.gridQuery.isServerSelectAllRowsEnabled).filter((function(t){return t.visible})),d=[i];return s?d=p:p.length>0&&(d=xt([mt(mt({},i),{separator:!0})],p)),Br({toolbarActions:d,selectedRows:l,iconRegistry:e.svgRegistry,node:n,logger:{log:e._logEvent.bind(e),eventOrigin:s?"On Hover":"Context Menu"}})}},o.prototype.translateActionLabels=function(t){var e=this;t.forEach((function(t){t.label=e.translate.transform(t.label),t.subMenu&&e.translateActionLabels(t.subMenu)}))},o.prototype.loadSavedSettings=function(t){var e=this,n=t.sort,o=t.hiddenColumns,i=t.filter,r=t.groupedColumns,a=t.columnsSizes,s=t.pinnedColumns,l=t.columnsOrder,c=t.gridAlignment,p=this.api,d=p.grid,u=p.columns;u.setColumnsVisible(this.initialSettings.columnsOrder,!0);var h=Lt(o)?this.initialSettings.hiddenColumns:o;u.setColumnsVisible(h,!1),i&&d.onFilterChanged();var g,f=u.getRowGroupColumns();r&&(g=f.filter((function(t){return!r.includes(t.getColId())})),u.addRowGroupColumns(r),u.setColumnsVisible(r,!1)),u.removeRowGroupColumns(g),u.setColumnsVisible(g,!0);var m=n||this.initialSettings.sort;pr(u,m?[m]:[]),2===c?a&&Object.keys(a).forEach((function(t){1===a[t]?u.autoSizeColumn(t):u.setColumnWidth(t,a[t])})):1===c?u.autoSizeAllColumns():d.sizeColumnsToFit();var y=s?s.filter((function(t){return t!==e.CHECKBOX_SELECTION_COL_ID})):null,v=l?l.filter((function(t){return t!==e.CHECKBOX_SELECTION_COL_ID})):null;ye(y)>0?u.setColumnsPinned(y,"left"):v&&u.setColumnsPinned(v,null),l&&u.moveColumns(l,0)},o.prototype.getSettingsDiff=function(){return Se(this.gridQuery.getCurrentGridSettings(),this.initialSettings)},o.prototype.resetTableSettings=function(){var t=this.initialSettings,e=t.filter,n=yt(t,["filter"]),o=hr(this.api.columns.getAllGridColumns(),!0),i=kt(o)?n.gridAlignment:2,r=mt(mt({},n),{columnsSizes:o,gridAlignment:i});this.updateSettings(r),this.loadSavedSettings(r),this.saveSettingsToServer({filter:e})},o.prototype.initSettings=function(t){this.initialSettings=this.gridQuery.getCurrentGridSettings(),this.updateSettings(t),this.loadSavedSettings(t)},o.prototype.notifyFilterUpdate=function(){var t=this,e=[this.gridRef.filterChanged.asObservable()];this.gridQuery.isServerSide&&(e.push(this.gridQuery.serverDataLoaded$),this.setLoading(!0)),n.combineLatest(e).pipe(r.take(1),i.untilDestroyed(this)).subscribe((function(){var e=t.api.grid.getDisplayedRowCount();t.setOverlay(0===e)})),this.api.grid.onFilterChanged()},o.prototype.buildServerRequestFilters=function(e){var n,o,i={};try{for(var r=wt(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=St(a.value,2),l=s[0],c=s[1],p=c.byValue,d=c.conditional;if(p&&(i[l]={operator:t.OperatorTypes.AND,filters:[p]}),d){var u={operator:d.operator,filters:d.conditions.map((function(e){var n=e.condition,o=e.value;return n===t.DatoFilterConditions.IN_RANGE?{condition:n,start:o,end:e.rangeEnd}:e}))};p?i[l].filters.push(u):i[l]=u}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},o.prototype.buildServerRequestFilters_v2_1=function(e){var n=this,o=this.gridQuery.getFilter(),i=this.gridQuery.getSearchTerm(),r=this.buildServerColumnFilters_v2_1(o);if(r.every((function(e){return e.operator===t.OperatorTypes.AND}))){var a=r.map((function(t){return t.filters})).reduce((function(t,e){return e.concat(t)}),[]);r=[{operator:t.OperatorTypes.AND,filters:a}]}var s=ye(r)>1?{operator:t.OperatorTypes.AND,filters:r}:1===ye(r)?r[0]:null;if(!i)return s;var l=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch,c=e.filter((function(t){return t.includeInSearch&&(l||n.api.columns.getColumn(t.colId).isVisible())})).map((function(e){var n=e.field;return{condition:t.DatoFilterConditions.CONTAINS,value:i,column:n}})),p=ye(c)>0?{operator:t.OperatorTypes.OR,filters:c}:null;return s?{operator:t.OperatorTypes.AND,filters:[s,p]}:p},o.prototype.buildServerColumnFilters_v2_1=function(e){var n,o,i=[];try{for(var r=wt(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=St(a.value,2),l=s[0],c=s[1],p=null,d=c.byValue,u=c.conditional;if(d&&(p={operator:t.OperatorTypes.AND,filters:[mt({column:l},d)]}),u){var h=this.getServerConditionalFilter(u,l);p?p.filters.push(h):p=h}i.push(p)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},o.prototype.getFilterForServerActionOnSelectAll=function(){var e=this.gridQuery.serverSideConfig.excludedFromSelectAll,n=this.gridQuery.getGridOptions(),o=n.columnDefs,i=n.idColumnKey,r=this.buildServerRequestFilters_v2_1(o);if(kt(e))return r;var a={condition:t.DatoFilterConditions.NOT_IN_LIST,values:e,column:i},s=r?[r,a]:[a];return{operator:t.OperatorTypes.AND,filters:s}},o.prototype.getServerConditionalFilter=function(e,n){return{operator:e.operator,filters:e.conditions.map((function(e){var o=e.condition,i=e.value;return o===t.DatoFilterConditions.IN_RANGE?{condition:o,start:i,end:e.rangeEnd,column:n}:o===t.DatoFilterConditions.IS_EMPTY||o===t.DatoFilterConditions.NOT_EMPTY?{condition:t.DatoFilterConditions.IS_EMPTY,value:o===t.DatoFilterConditions.IS_EMPTY?"true":"false",column:n}:o===t.DatoFilterConditions.IS_NULL||o===t.DatoFilterConditions.NOT_NULL?{condition:t.DatoFilterConditions.IS_NULL,value:o===t.DatoFilterConditions.IS_NULL?"true":"false",column:n}:mt(mt({},e),{column:n})}))}},o.prototype.buildServerRequestSort=function(t){return t.map((function(t){return{column:t.colId,sortOrder:t.sort.toUpperCase()}}))},o.prototype.addEditableCellClass=function(t){var e=this;return Lt(t)?"dato-editable-cell":Et(t)?function(n){return e.getEditableClassArray(t(n))}:this.getEditableClassArray(t)},o.prototype.getEditableClassArray=function(t){var e=me(t);return e.push("dato-editable-cell"),e},o.prototype.selectAllCurrentPageRows=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);var n=this.gridQuery.getCurrentPageRows();if(e){var o=this.gridQuery.serverSideConfig.excludedFromSelectAll;kt(o)||(n=n.filter((function(t){var e=t.id;return!o.includes(e)})))}t?this.selectRows(n):this.deselectRows(n)},o.prototype.deselectAllRows=function(){this.api.grid.deselectAll(),this.gridQuery.isServerSelectAllRowsEnabled&&this.setServerSidePagination({selectAllRowsEnabled:!1,excludedFromSelectAll:[]})},o.prototype.resolveRowActionsVisibility=function(){this.gridQuery._rowActionVisibilityChanged.next()},o.prototype.initPivotSecondaryColsProcess=function(t){var e=this,n=t.gridOptions;n.processSecondaryColDef=function(t){var n=t.pivotValueColumn&&t.pivotValueColumn.getUserProvidedColDef();n&&(t.filter=n.filter),t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=fr(t);return e&&e.value||""}))),function(t,e,n){if(t.colId&&t.colId.startsWith("PivotRowTotal_")){for(var o=mt({},t),i={groupId:"group_"+o.colId,headerName:e,headerClass:["total-pivot-cell"],children:[o]},r=1;r<n;r++)i={groupId:"group_"+o.colId+"_"+r,children:[i]};Object.keys(t).forEach((function(e){return delete t[e]})),Object.assign(t,i)}}(t,e.translate.transform("core.total"),e.api?e.api.columns.getPivotColumns().length:1)},n.processSecondaryColGroupDef=function(t){if(t.headerName){var n=fr(t.headerName);if(n){var o=n.field,i=n.value;t.headerClass=[o],t.headerName=i,t.children&&t.children.length>0&&t.headerClass.push("group-pivot-cell")}}else if(t.children){var r=St(t.children,1)[0],a=r&&r.pivotTotalColumnIds;a&&a.length>0&&(t.headerClass=["total-pivot-cell"],t.headerName=e.translate.transform("core.total"))}else t.headerClass=["empty-pivot-header"];t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=fr(t);return e&&e.value||""})))}},o.prototype.setPivotModeRows=function(t){var e=this.gridQuery.getAllPivotColumns(),n=t.map((function(t,n){var o,i,r=mt({},t);try{for(var a=wt(e),s=a.next();!s.done;s=a.next()){var l=s.value.getColDef().field,c={field:l,value:t[l]};r[l]=JSON.stringify(c)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r}));this.api.grid.setRowData(n)},o.prototype.getPivotModeCellClassRules=function(){return{"even-row-group-leaf-cell":this.isLeafGroupEvenCell.bind(this),"row-group-root-cell":this.isRowGroupValuedCell.bind(this)}},o.prototype.isLeafGroupEvenCell=function(t){var e=t.node,n=e.leafGroup,o=e.childIndex;return e.rowGroupIndex<=this.getCellClassRuleColIndex(t)&&n&&o%2==0},o.prototype.isRowGroupValuedCell=function(t){var e=t.node,n=e.leafGroup;return e.rowGroupIndex<=this.getCellClassRuleColIndex(t)&&!n},o.prototype.getCellClassRuleColIndex=function(t){var e=t.colDef.headerComponentParams.gridQuery;if(e&&e.api){var n=e.api.columns.getAllDisplayedColumns(),o=n.find((function(e){return e.getColId()===t.colDef.colId}));return n.indexOf(o)}return-1},o.ctorParameters=function(){return[{type:ur},{type:wr},{type:Mn},{type:Le},{type:Ne},{type:void 0,decorators:[{type:e.Inject,args:[$r]}]},{type:void 0,decorators:[{type:e.Inject,args:[Ba]}]}]},o=vt([e.Injectable(),bt(5,e.Inject($r)),bt(6,e.Inject(Ba)),Ct("design:paramtypes",[ur,wr,Mn,Le,Ne,Object,Object])],o)}(),Ka=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCustomHeader]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Wa=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCustomMoreMenu]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),$a=function(){function t(){}return vt([e.Input(),Ct("design:type",String)],t.prototype,"column",void 0),vt([e.ContentChild(Ka),Ct("design:type",Object)],t.prototype,"customHeader",void 0),vt([e.ContentChild(Wa),Ct("design:type",Object)],t.prototype,"moreMenu",void 0),t=vt([e.Component({selector:"dato-custom-header-template",template:"",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Qa={light:{"primary-700":"#2E2F30","primary-600":"#37383A","primary-500":"#4F5053","primary-400":"#67696F","primary-300":"#9EA0A5","primary-200":"#CCCED3","primary-100":"#F1F2F5","primary-50":"#F7F8FA","primary-0":"#ffffff","accent-800":"#072A60","accent-700":"#0D47A1","accent-600":"#1C61D7","accent-500":"#317EEB","accent-400":"#09A0FF","accent-350":"#40B2FE","accent-300":"#77C5FD","accent-200":"#BBDEFB","accent-180":"#C7E3FB","accent-100":"#E3F2FD","fg-100":"#37383A","fg-200":"#ffffff"},dark:{"primary-700":"#ffffff","primary-600":"#F7F8FA","primary-500":"#F1F2F5","primary-400":"#CCCED3","primary-300":"#9EA0A5","primary-200":"#67696F","primary-100":"#4F5053","primary-50":"#37383A","primary-0":"#2E2F30","accent-800":"#E3F2FD","accent-700":"#BBDEFB","accent-600":"#77C5FD","accent-500":"#40B2FE","accent-400":"#09A0FF","accent-350":"#317EEB","accent-300":"#1C61D7","accent-200":"#0D47A1","accent-180":"#C7E3FB","accent-100":"#072A60","fg-100":"#ffffff","fg-200":"#37383A"}},qa=function(){function t(t,e,n){this.host=t,this.gridService=e,this.cdr=n,this.displayedActions=[],this.setBgColorBound=this.setBackgroundColor.bind(this)}return Object.defineProperty(t.prototype,"hostEl",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.show=function(t){this.removeSelectedListener(),this.params=t,this.row=t.node,this.row.addEventListener("rowSelected",this.setBgColorBound),this.setRowActions(),this.setBackgroundColor({node:this.row}),Ht(this.hostEl,{top:this.row.rowTop+"px",height:this.row.rowHeight+"px",opacity:1,zIndex:1,pointerEvents:"all"})},t.prototype.hide=function(){Ht(this.hostEl,{opacity:0,pointerEvents:"none",zIndex:-1})},t.prototype.openActionMenu=function(t){this.gridService.updateGridContext({contextMenu:{fromOnHover:!0}});var e=this.params.event&&this.params.event.target;if(e instanceof Element){var n=e.closest(".ag-cell");n&&n.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY}))}},t.prototype.updateScrollPos=function(t){Ht(this.hostEl,{left:t-this.hostEl.scrollWidth-1+"px"})},t.prototype.callAction=function(t){Et(t.onClick)&&(this.gridService._logEvent("Grids - Table Action",{action:t.key,numOfItems:1,from:"On Hover"}),t.onClick([this.row]))},t.prototype.ngOnDestroy=function(){this.removeSelectedListener()},t.prototype.setRowActions=function(){var t=this.config,e=t.actions,n=t.maxDisplayedItems,o=Mr(e,1,[this.row],!1).filter((function(t){var e=t.template,n=t.icon,o=t.visible;return Lt(e)&&Mt(n)&&o}));this.displayedActions=o.filter((function(t){return _t(t.onHoverIndex)})).slice(0,n).sort((function(t,e){return t.onHoverIndex-e.onHoverIndex})),0===this.displayedActions.length&&(this.displayedActions=o.slice(0,n)),this.showMore=this.displayedActions.length<o.length,this.cdr.detectChanges()},t.prototype.removeSelectedListener=function(){this.row&&this.row.removeEventListener("rowSelected",this.setBgColorBound)},t.prototype.setBackgroundColor=function(t){var e=t.node,n="accent-100";e.isSelected()&&(n=e.rowIndex%2==0?"accent-180":"accent-200");var o=Qa.light[n],i="linear-gradient(to right, "+o+"B3 0%, "+o+" 17%, "+o+" 100%)";Ht(this.hostEl,{backgroundImage:i})},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Ua},{type:e.ChangeDetectorRef}]},t=vt([e.Component({selector:"dato-grid-on-hover",template:'<div class="d-flex">\n <div class="gradient"></div>\n <div class="actions d-flex align-end-center">\n <dato-icon-button (click)="callAction(action)" datoSize="md" datoType="none" *ngFor="let action of displayedActions" [icon]="action.icon" [datoTooltip]="action.tooltip || action.label" datoTooltipOffset="[-80,5]"></dato-icon-button>\n <dato-icon-button *ngIf="showMore" (click)="openActionMenu($event)" datoSize="md" datoType="none" icon="more-vertical"></dato-icon-button>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;justify-content:flex-end;align-content:center;align-items:center;position:absolute;max-width:150px;transition:opacity .3s ease-in-out;opacity:0}:host .gradient{min-width:20px}"]}),Ct("design:paramtypes",[e.ElementRef,Ua,e.ChangeDetectorRef])],t)}(),Ya=function(){function t(t){var e=this;this.ref=t,this.groups=[],this.groups=Object.keys(t.data).map((function(n){return{scope:n,children:e.resolveKeys(t.data[n])}}))}return t.prototype.resolveKeys=function(t){return t.reduce((function(t,e){var n=e.description,o=e.keys;return t.push({keys:ma(o),description:n}),t}),[])},t.ctorParameters=function(){return[{type:$o}]},t=vt([e.Component({template:' <dato-dialog-header>{{ \'core.available-shortcuts\' | translate }}</dato-dialog-header>\n <dato-dialog-content>\n <section>\n <ng-container *ngFor="let group of groups">\n <section *ngIf="group.children.length" class="flex-1 hotkeys-group">\n <header>{{ group.scope | translate }}</header>\n <table>\n <tbody>\n <tr *ngFor="let child of group.children">\n <td>{{ child.description | translate }}</td>\n\n <td class="text-right">\n <kbd [innerHTML]="child.keys"></kbd>\n </td>\n </tr>\n </tbody>\n </table>\n </section>\n </ng-container>\n\n </section>\n\n\n </dato-dialog-content>\n <dato-dialog-footer> <dato-button datoType="secondary" datoDialogDismiss>{{ \'core.close\' | translate }}</dato-button> </dato-dialog-footer>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host header{background-color:#f6f8fa;border-top-left-radius:2px;border-top-right-radius:2px;border:1px solid #d1d5da;font-weight:500;font-size:14px;padding:8px 16px;border-bottom:0}:host table{border:1px solid #e1e4e8;border-collapse:collapse;width:100%;margin-bottom:1rem;color:#212529}:host th{font-weight:500;text-align:left;vertical-align:bottom;padding:.75rem;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6}:host td{padding:8px 16px;border-top:1px solid #dee2e6}:host kbd{margin-right:6px;background-color:#fafbfc;border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1;color:#444d56;font-size:12px;padding:3px 5px}"]}),Ct("design:paramtypes",[$o])],t)}(),Za=function(){function o(t,e,n){var o,i=this;this.eventManager=t,this.document=e,this.dialog=n,this.callbacks=[],this.defaults={preventDefault:!0,event:"keydown",element:this.document,scope:"core.general",ignoreInEditable:!1},this.hotkeys=((o={})[this.defaults.scope]=[],o),this.addShortcut({keys:"shift.?",preventDefault:!1,ignoreInEditable:!0}).subscribe((function(t){i.isActiveElementEditable(t)||ye(i.hotkeys)&&i.openHelpModal()}))}return o.prototype.isActiveElementEditable=function(t){return/^(input|textarea)$/i.test(document.activeElement.nodeName)||t.target.isContentEditable},o.prototype.onShortcut=function(t){var e=this;return this.callbacks.push(t),function(){return e.callbacks.filter((function(e){return e!==t}))}},o.prototype.addShortcut=function(t){var e=this,o=mt(mt({},this.defaults),t),i=o.scope,r=o.keys,a=o.description,s=o.element,l=o.event,c=o.preventDefault,p=o.target,d=o.ignoreInEditable,u=r,h=St(r.split(".")),g=h[0],f=h.slice(1);return"meta"===g&&!1===fa()&&(u=xt(["control"],f).join(".")),this.hotkeys[i]||(this.hotkeys[i]=[]),a&&this.hotkeys[i].push({keys:u,description:a}),new n.Observable((function(t){var n=e.eventManager.addEventListener(s,l+"."+u,(function(n){d&&e.isActiveElementEditable(n)||(c&&n.preventDefault(),e.dialog.isOpen&&e.dialog.closeAll(),e.callbacks.forEach((function(t){return t(n,u,p)})),t.next(n))}));return function(){n(),o.target=null,a&&(e.hotkeys[i]=e.hotkeys[i].filter((function(t){return t.keys!==u})))}}))},o.prototype.openHelpModal=function(){this.dialog.open(Ya,{data:this.hotkeys,size:t.Dimensions.MD})},o.ctorParameters=function(){return[{type:ut.EventManager},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]},{type:ti}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(ut.EventManager),e.ɵɵinject(s.DOCUMENT),e.ɵɵinject(ti))},token:o,providedIn:"root"}),o=vt([e.Injectable({providedIn:"root"}),bt(1,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[ut.EventManager,Object,ti])],o)}(),Xa=function(){function t(t,o,i,r,a,s,l,c,p,d){this.gridService=t,this.gridQuery=o,this.cdr=i,this.iconRegistry=r,this.translate=a,this.host=s,this.injector=l,this.resolver=c,this.hotkeys=p,this.storageAPI=d,this.onGridChange=new e.EventEmitter,this.rowActions=[],this.gridActions=[],this.gridReady$=this.gridQuery.gridReady$,this.contentInit=new n.Subject,this.destroy$=new n.Subject,this.hasGridOptions=new n.BehaviorSubject(!1),this.agGridReady=new n.ReplaySubject(1),this.gridElements={centerViewport:null,centerContainer:null,bodyViewport:null},this.treeGridClass="tree",this.hasGridOptions$=this.hasGridOptions.asObservable()}return Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this._gridOptions},set:function(t){t&&(this._gridOptions=this.gridService.initGridOptions(t),this.gridService.treeData=t.treeData,this.gridService.isPivotMode=t.pivotMode,this.agGridEl&&(t.treeData?!this.agGridEl.classList.contains(this.treeGridClass)&&this.agGridEl.classList.add(this.treeGridClass):t.enableV2_1||this.agGridEl.classList.add(this.treeGridClass)),!this.hasGridOptions.value&&this.hasGridOptions.next(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"agGridOptions",{get:function(){return!this._agGridOptions&&this._gridOptions&&(this.gridOptions=this.normalizeOptions(),this._agGridOptions=this.gridOptions),this._agGridOptions},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete(),this.contentInit.complete(),this.hasGridOptions.complete(),this.agGridReady.complete(),this.clearTooltip(),this.rowHoverComponent&&this.rowHoverComponent.destroy(),this.rowHoverComponent=null},t.prototype.onAgGridReady=function(t){this.agGridReady.next(t)},t.prototype.initializeGrid=function(t,e){this.contentInit.isStopped||(this._initializeGrid(t,e),this.contentInit.next(),this.contentInit.complete())},t.prototype._initializeGrid=function(t,e){var o=this;this.agGridEl=e,this.contentInit.asObservable().pipe(r.switchMap((function(){if(!o.agGridOptions)return n.EMPTY;var t=!1===o.gridOptions.saveSettings?n.of(null):o.storageAPI.get(o.gridOptions.gridName);return n.combineLatest([o.agGridReady,t])})),r.takeUntil(this.destroy$)).subscribe((function(n){var i=St(n,2),r=i[0],a=r.api,s=r.columnApi,l=i[1],c=void 0===l?{}:l;(o.gridOptions.rowData||a.showLoadingOverlay(),o.gridOptions.statusBar)||Ut(e.querySelector(".ag-status-bar"),"ag-hidden");var p={grid:a,columns:s};o.gridService._setApi(p,t),o.gridQuery._setApi(p,t),o.gridService.initSettings(c||{}),o.registerSettingsListeners(p,t),o.registerGridListeners(p,t),o.registerEventsTriggeringClearSelectedRows(t),o.registerPaginationChanged(t),o.gridQuery._gridReady.next(!0),o.gridOptions.treeData&&o.agGridEl.classList.add("tree"),o.gridOptions.rowHeight&&o.agGridEl.classList.add("row-height-"+o.gridOptions.rowHeight)}))},t.prototype.normalizeOptions=function(){var t={gridOptions:this.gridOptions,customHeadersTemplates:this.customHeadersTemplates,rowActions:this.rowActions},e=this.gridService.normalizeOptions(t);return ea(mt(mt(mt({},Pa),this.gridOptions.treeData?Ta(this.gridOptions.maxDepth):{}),{icons:this.getGridIcons(),disabledHTMLRenderingFields:e.disabledHTMLRenderingFields||Pa.disabledHTMLRenderingFields}),e)},t.prototype.setGridRows=function(t){this.gridService.setRows(t)},t.prototype.setGridFilters=function(t){this.gridService.setGridFilters(t)},t.prototype.setGridSort=function(t){this.gridService.setGridSort(t)},t.prototype.getGridIcons=function(){var t='<span class="da-grid-icon pointer d-flex column-move">'+this.iconRegistry.getSvg("move-column")+"</span>";return{groupExpanded:'<span class="da-grid-icon pointer group-expanded-icon">'+this.iconRegistry.getSvg("arrow-right")+"</span>",groupContracted:'<span class="da-grid-icon pointer group-contracted-icon">'+this.iconRegistry.getSvg("arrow-right")+"</span>",columnMovePin:'<span class="da-grid-icon pointer d-flex primary-300-fill column-move-pin">'+this.iconRegistry.getSvg("pin")+"</span>",columnMoveHide:'<span class="da-grid-icon pointer d-flex column-move-hide">'+this.iconRegistry.getSvg("eye-hide")+"</span>",columnMoveMove:t,columnMoveLeft:t,columnMoveRight:t,rowDrag:'<span class="da-grid-icon drag d-flex">'+this.iconRegistry.getSvg("drag-01")+"</span>"}},t.prototype.registerSettingsListeners=function(t,e){this.listenToColumnResize(t,e),this.listenToGridEvents(e),this.listenToStoreSettingsChanges()},t.prototype.listenToColumnResize=function(t,e){var n=this,o=e.columnResized.asObservable();this.onHoverEnabled()&&(o=o.pipe(r.filter((function(t){return"uiColumnDragged"===t.source})),r.tap((function(){return n.updateOnHoverPos()})))),o.pipe(r.auditTime(100),r.filter((function(t){var e=t.finished,n=t.source;return e&&"uiColumnDragged"===n})),r.takeUntil(this.destroy$)).subscribe((function(e){var o=St(e.columns,1)[0],i=mt({},n.gridQuery.getColumnSizes());i?i[o.getColId()]=o.getActualWidth():i=hr(t.columns.getAllGridColumns()),n.gridService.updateSettings({gridAlignment:2,columnsSizes:i})}))},t.prototype.listenToGridEvents=function(t){var e=this,o=t.columnVisible,i=t.sortChanged,a=t.columnRowGroupChanged,s=t.columnPinned,l=t.dragStopped,c=t.filterChanged;n.merge(o,i,a,s,l,c).pipe(r.skip(1),r.takeUntil(this.destroy$)).subscribe((function(t){var n=t.type,o=e.gridService.getSettingsDiff();e.gridService.updateSettings(o);var i=e.getGridData();e.onGridChange.emit({filter:e.gridQuery.getExternalFilter(),sort:e.gridQuery.getSort(),type:n,data:i})}))},t.prototype.listenToStoreSettingsChanges=function(){var t=this;this.gridQuery.select((function(t){return t.settings})).pipe(r.skip(1),r.debounceTime(1e3),r.takeUntil(this.destroy$)).subscribe((function(){var e=t.gridService.getSettingsDiff();t.gridService.saveSettingsToServer(e)}))},t.prototype.registerGridListeners=function(t,e){this.gridElements={centerContainer:Ft(".ag-center-cols-container",this.agGridEl),centerViewport:Ft(".ag-center-cols-viewport",this.agGridEl),bodyViewport:Ft(".ag-body-viewport",this.agGridEl)},this.registerGridClickListener(t.grid),this.registerGridGroupListeners(e),this.registerGridMouseListeners(e),this.registerGridKeyboardListener(t),this.registerWindowResizeListener()},t.prototype.registerGridGroupListeners=function(t){var e=this;t.columnRowGroupChanged.pipe(r.switchMap((function(e){return 0===e.columns.length?n.EMPTY:t.cellClicked.pipe(r.filter((function(t){var e=t.value,n=t.node;return void 0!==e&&!0===n.group})))})),r.takeUntil(this.destroy$)).subscribe((function(t){var e=t.node;e.setExpanded(!e.expanded)})),this.onHoverEnabled()&&t.rowGroupOpened.pipe(r.filter((function(t){return!1===t.node.expanded})),r.takeUntil(this.destroy$)).subscribe((function(){e.lastHoveredRow=null,e.setOnHoverState(!1)}))},t.prototype.registerGridClickListener=function(t){var e=this.gridElements,o=e.bodyViewport,i=e.centerViewport;n.fromEvent(o,"click").pipe(r.filter((function(e){return(e.target===o||e.target===i)&&t.getSelectedRows().length>0})),r.takeUntil(this.destroy$)).subscribe((function(){return t.deselectAll()}))},t.prototype.onHoverEnabled=function(){return this.gridOptions.hoverConfig.enabled&&this.rowActions.length>0},t.prototype.registerGridMouseListeners=function(t){var e,o=this,i=this.gridElements,a=i.bodyViewport,s=i.centerContainer,l=this.onHoverEnabled();l&&(n.fromEvent(s,"mouseleave").pipe(r.takeUntil(this.destroy$)).subscribe((function(){o.toggleRowHoverClass(o.lastHoveredRow),o.lastHoveredRow=null,o.setOnHoverState(!1),e=null})),n.merge(t.bodyScroll.pipe(r.filter((function(t){return"horizontal"===t.direction}))),t.rowDataChanged).pipe(r.takeUntil(this.destroy$)).subscribe((function(){o.updateOnHoverPos()})),this.addOnHoverElement()),t.cellMouseOver.pipe(r.takeUntil(this.destroy$)).subscribe((function(t){var n=t.node,i=t.column;if(e!==n.id+"-"+i.getColId()){e=n.id+"-"+i.getColId(),o.showTooltip(t);var r=t.event.target.parentElement;if(l&&(!1===n.group||Lt(n.group))&&o.lastHoveredRow!==r){var a=o.lastHoveredRow;o.lastHoveredRow=r,o.toggleRowHoverClass([a,o.lastHoveredRow]),o.setOnHoverState(!0,t)}}else clearTimeout(o.cellMouseOutTimer)})),n.merge(n.fromEvent(a,"scroll"),n.fromEvent(this.agGridEl,"mouseleave")).pipe(r.takeUntil(this.destroy$)).subscribe((function(){e=null,o.clearTooltip()})),t.cellMouseOut.pipe(r.filter((function(){return!Lt(o.tooltip)})),r.takeUntil(this.destroy$)).subscribe((function(){o.cellMouseOutTimer=window.setTimeout((function(){return o.clearTooltip()}))}))},t.prototype.clearTooltip=function(){this.tooltip&&this.tooltip.dispose(),this.tooltip=null},t.prototype.showTooltip=function(t){var e=t.event.target;if(("SPAN"===e.tagName&&0===e.scrollWidth&&(e=e.parentElement),t.colDef.editable&&e&&(e=e.querySelector(".value-wrapper")||e),e)&&e.offsetWidth<e.scrollWidth){clearTimeout(this.cellMouseOutTimer);var n=mr(this.gridOptions,t.colDef),o={cell:e,value:e.innerText,allowHTML:n};Lt(this.tooltip)?this.createAndShowTooltip(o):this.updateTooltip(o)}},t.prototype.createAndShowTooltip=function(t){var e=t.cell,n=t.value,o=t.allowHTML;this.tooltip=new X(e,{placement:"top",container:document.body,trigger:"manual",title:o?ot.sanitize(n):n,html:o,popperOptions:{modifiers:{preventOverflow:{enabled:!1}}},template:'<div class="tooltip dato-tooltip common-tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}),this.tooltip.show()},t.prototype.updateTooltip=function(t){var e=t.cell,n=t.value;e!==this.tooltip.reference&&(this.tooltip.reference=e,this.tooltip.popperInstance.reference=e,this.tooltip.updateTitleContent(n)),this.tooltip.show()},t.prototype.addOnHoverElement=function(){this.rowHoverComponent=oa({component:qa,injector:this.injector,resolver:this.resolver});var t=this.rowHoverComponent,e=t.instance,n=t.hostView;e.config=mt(mt({},this.gridOptions.hoverConfig),{actions:this.rowActions.slice()}),n.detectChanges(),qt(this.gridElements.centerContainer,this.rowHoverEl)},Object.defineProperty(t.prototype,"rowHoverEl",{get:function(){return this.rowHoverComponent.location.nativeElement},enumerable:!0,configurable:!0}),t.prototype.setOnHoverState=function(t,e){var n=this.rowHoverComponent.instance;t?(n.show(e),this.updateOnHoverPos()):n.hide()},t.prototype.updateOnHoverPos=function(){var t=this.gridElements,e=t.centerViewport,n=t.centerContainer,o=n.clientWidth>e.clientWidth?e:n,i=o.clientWidth,r=o.scrollLeft;this.rowHoverComponent.instance.updateScrollPos(i+r)},t.prototype.toggleRowHoverClass=function(t){me(t).forEach((function(t){return t&&t.classList.toggle("actions-hovered")}))},t.prototype.registerGridKeyboardListener=function(t){var e=this;t.grid,t.columns;this.hotkeys.addShortcut({element:this.agGridEl,keys:"meta.a",ignoreInEditable:!0}).pipe(r.takeUntil(this.destroy$)).subscribe((function(){e.gridService.selectAllCurrentPageRows()}))},t.prototype.registerWindowResizeListener=function(){var t=this;n.fromEvent(window,"resize").pipe(r.debounceTime(100),r.filter((function(){return 2!==t.gridQuery.gridAlignment})),r.takeUntil(this.destroy$)).subscribe((function(){var e=0===t.gridQuery.gridAlignment?"container":"content";t.gridService.fitGrid(e)}))},t.prototype.getGridData=function(){var t=this.gridService.api.grid.getModel();return this.gridOptions.treeData?za(t.rowsToDisplay.map((function(t){return t.data})),this.gridService.treeConfig):t.rowsToDisplay},t.prototype.registerEventsTriggeringClearSelectedRows=function(t){var e=this;(this.gridQuery.isServerSide?n.merge(t.sortChanged,t.filterChanged):t.filterChanged).pipe(r.takeUntil(this.destroy$)).subscribe((function(){e.gridService.deselectAllRows()}))},t.prototype.registerPaginationChanged=function(t){var e=this;this.gridQuery.isServerSide&&t.paginationChanged.pipe(r.takeUntil(this.destroy$)).subscribe((function(){e.gridQuery.isServerSelectAllRowsEnabled&&e.gridService.selectAllCurrentPageRows(!0,!0)}))},t.ctorParameters=function(){return[{type:Ua},{type:wr},{type:e.ChangeDetectorRef},{type:Le},{type:Mn},{type:e.ElementRef},{type:e.Injector},{type:e.ComponentFactoryResolver},{type:Za},{type:void 0,decorators:[{type:e.Inject,args:[$r]}]}]},vt([e.ContentChildren($a),Ct("design:type",e.QueryList)],t.prototype,"customHeadersTemplates",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"onGridChange",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"rowActions",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"gridActions",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"gridOptions",null),t=vt([e.Component({selector:"dato-grid-controller",template:"\n <ng-content></ng-content>\n ",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[wr,Ua,ur],styles:[":host{display:flex;flex-direction:column;flex-grow:1}"]}),bt(9,e.Inject($r)),Ct("design:paramtypes",[Ua,wr,e.ChangeDetectorRef,Le,Mn,e.ElementRef,e.Injector,e.ComponentFactoryResolver,Za,Object])],t)}(),Ja=function(){function t(t,e){this.controller=t,this.host=e,this.hasGridOptions$=this.controller.hasGridOptions$}return Object.defineProperty(t.prototype,"grid",{set:function(t){if(t){var e=Ft("ag-grid-angular",this.host.nativeElement);this.controller.initializeGrid(t,e)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"agGridOptions",{get:function(){return this.controller.agGridOptions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this.controller?this.controller.gridOptions:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableBackground",{get:function(){return!!this.gridOptions&&this.gridOptions.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableV2_1",{get:function(){return!!this.gridOptions&&this.gridOptions.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPivotStyle",{get:function(){return this.gridOptions&&this.gridOptions.usePivotGridStyle},enumerable:!0,configurable:!0}),t.prototype.onGridReady=function(t){this.controller.onAgGridReady(t)},t.ctorParameters=function(){return[{type:Xa},{type:e.ElementRef}]},vt([e.ViewChild(st.AgGridAngular,{static:!1}),Ct("design:type",st.AgGridAngular),Ct("design:paramtypes",[st.AgGridAngular])],t.prototype,"grid",null),t=vt([e.Component({selector:"dato-grid-v2",template:'<ag-grid-angular *ngIf="hasGridOptions$ | async" [gridOptions]="agGridOptions" (gridReady)="onGridReady($event)"\n data-auto-id="grid" class="dato-grid ag-theme-material" [class.has-background]="enableBackground" [class.enable-v2_1]="enableV2_1"\n [class.with-multi-selection-col]="gridOptions?.showMultiSelectionCheckboxes" [class.pivot-style]="isPivotStyle">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]="enableBackground"></dato-grid-pagination-v2>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:['dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important;min-width:auto!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-checkbox-input-wrapper.ag-indeterminate:before{text-align:center;content:"-";display:inline-block;position:absolute;top:0;left:0;right:0;bottom:0;line-height:.5;color:#fff}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell{line-height:33px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.dato-editable-cell{line-height:29px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.ag-cell-inline-editing{height:35px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell{line-height:42px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.dato-editable-cell{line-height:38px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.ag-cell-inline-editing{height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell{line-height:48px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.dato-editable-cell{line-height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.ag-cell-inline-editing{height:50px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell{line-height:57px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.dato-editable-cell{line-height:53px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.ag-cell-inline-editing{height:59px}dato-grid-v2 ag-grid-angular .ag-cell.checkbox-selection-cell{display:flex;padding-right:0}dato-grid-v2 .ag-menu .da-grid-icon svg{vertical-align:middle}dato-grid-v2 .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}dato-grid-v2 .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}dato-grid-v2 .group-contracted-icon,dato-grid-v2 .group-expanded-icon{width:7px}dato-grid-v2 .group-expanded-icon{transform:rotate(90deg)}dato-grid-v2 .dato-grid .ag-cell{border-top:0;border-bottom:0}dato-grid-v2 .ag-overlay-wrapper ng-component{display:flex}.ag-dnd-ghost{min-width:100px;border:none;display:flex;justify-content:flex-start;align-content:center;align-items:center;cursor:-webkit-grabbing;cursor:grabbing;z-index:10000000}.ag-dnd-ghost .da-grid-icon.column-move-hide svg{height:18px;width:18px}.ag-dnd-ghost .da-grid-icon.column-move svg,.ag-dnd-ghost .da-grid-icon.column-move-pin svg{height:16px;width:16px}']}),Ct("design:paramtypes",[Xa,e.ElementRef])],t)}(),ts=function(){function t(t){this.popover=t}return t.prototype.ngOnInit=function(){var t=this,e=this.popover.data,n=e.api,r=e.gridQuery,a=e.gridService;this.api=n.columns;var s=this.api.getRowGroupColumns();this.columns=this.popover.data.gridQuery.getAllColumns().filter((function(t){return!s.includes(t)})).map((function(t){return{label:t.getColDef().headerName,column:t,id:t.getColId()}})).sort((function(t,e){var n=r.getCurrentGridSettings().columnsOrder;return n.indexOf(t.id)-n.indexOf(e.id)}));var l=this.columns.filter((function(t){return t.column.isVisible()})).map((function(t){return t.id}));this.columnControl=new o.FormControl(l),this.columnControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.api.setColumnsVisible(r.getAllColumns(),!1),t.api.setColumnsVisible(e,!0),a.fitGrid("container");var n=r.getGridOptions(),o=n.enableSearch,i=n.includeHiddenColumnsInSearch;o&&!i&&r.getSearchTerm()&&a.notifyFilterUpdate()}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:ca}]},t=vt([e.Component({selector:"dato-grid-columns-display-menu",template:'<div class="pl-10 pr-10 pt-10 list-section overflow-hidden">\n <div class="dato-sub-headline mb-15">{{ \'core.columns\' | translate }}</div>\n <dato-input placeholder="core.search-columns" #search></dato-input>\n <dato-list-v2 [searchController]="search" [options]="columns" [formControl]="columnControl" [isSortList]="false"></dato-list-v2>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;flex-direction:column;max-height:inherit}.list-section{max-height:305px}"]}),Ct("design:paramtypes",[ca])],t)}(),es=function(){function t(t){this.popover=t,this.addGroup=new o.FormControl,this.activeGroups=[]}return t.prototype.ngOnInit=function(){var t=this;this.api=this.popover.data.api.columns,this.initMenu(),this.addGroup.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){var n=e.column;t.api.addRowGroupColumn(n),t.api.setColumnVisible(n,!1),t.popover.data.gridService._logEvent("Grids - Group Added",{totalNumOfGroups:t.api.getRowGroupColumns().length,column:n.getColId(),groupedFrom:"Table Toolbar"}),t.initMenu()}))},t.prototype.ngOnDestroy=function(){},t.prototype.reorderGroups=function(t){var e=this,n=t.oldIndex,o=t.newIndex;this.api.moveRowGroupColumn(n,o);var i=this.api.getAllDisplayedColumns().find((function(t){return e.activeGroups[o].getColId()===t.getColDef().showRowGroup}));this.api.moveColumn(i,0)},t.prototype.clearGrouping=function(){this.activeGroups.length>0&&(this.api.setRowGroupColumns([]),this.initMenu())},t.prototype.removeColumn=function(t){this.api.removeRowGroupColumn(t),this.initMenu()},t.prototype.initMenu=function(){var t=this;this.addGroup.reset(null,{emitEvent:!1}),this.activeGroups=xt(this.api.getRowGroupColumns()),this.optionalColumns=this.api.getAllDisplayedColumns().filter((function(e){return!t.activeGroups.find((function(t){return t.getColId()===e.getColDef().showRowGroup}))})).map((function(t){return{label:t.getColDef().headerName,id:t.getColId(),column:t}}))},t.ctorParameters=function(){return[{type:ca}]},t=vt([e.Component({selector:"dato-grid-groups-menu",template:'<div class="header dato-simple-bold pl-10 primary-600-color primary-0-background-color d-flex align-start-center">{{ \'core.group-by\' | translate }}</div>\n<div class="body p-10">\n <dato-sortable *ngIf="activeGroups.length > 0" class="width-100" [datoList]="activeGroups"\n (orderUpdated)="reorderGroups($event)">\n <div *ngFor="let column of activeGroups; index as i"\n class="d-flex align-start-center primary-0-background-color group-item mb-5">\n <dato-icon height="18px" [attr.data-auto-id]="\'grid-group-menu-drag-\' + column.getColId()" datoIcon="drag-01" class="handler primary-300-color" datoSortableHandle></dato-icon>\n <div class="d-flex-grow ellipsis dato-note column-name" [datoTooltip]="column.getColDef().headerName"\n datoTooltipOnTextOverflow="true" datoTooltipPosition="bottom"> {{ column.getColDef().headerName }}</div>\n <dato-icon-button [attr.data-auto-id]="\'grid-group-menu-remove-\' + column.getColId()" datoSize="md"\n datoType="none"\n icon="close" class="ml-10 pointer mr-5 remove-group"\n (click)="removeColumn(column)"></dato-icon-button>\n </div>\n </dato-sortable>\n <dato-select *ngIf="activeGroups.length < 3 && optionalColumns.length > 0" [formControl]="addGroup" [dataSet]="optionalColumns"\n placeholder="core.create-new-group" datoSize="md" #select data-auto-id="grid-group-column-selection">\n <dato-option *ngFor="let option of select.data" [option]="option"\n [attr.data-auto-id]="\'grid-group-column-selection-option-\' + option.id"> {{ option.label }} </dato-option>\n </dato-select>\n</div>\n<div class="footer primary-0-background-color d-flex align-end-center">\n <dato-link class="mr-30 no-select" datoType="secondary" datoSize="sm" data-auto-id="grid-group-menu-clear-groups"\n (click)="clearGrouping()">{{ \'core.clear-grouping\' | translate }}</dato-link>\n <dato-button class="mr-10" datoType="primary" datoSize="sm" data-auto-id="grid-group-menu-done"\n datoPopoverClose>{{ \'core.done\' | translate }}</dato-button>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".header{height:40px}.body{height:120px}.footer{height:46px}.group-item{height:30px}.handler{min-width:24px}"]}),Ct("design:paramtypes",[ca])],t)}(),ns=function(){function t(t,e){this.controller=t,this.gridQuery=e,this.displayRowCount=!0}return Object.defineProperty(t.prototype,"enableBackground",{get:function(){var t=this.controller.gridOptions;return!!t&&t.enableBackground},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.rowCount$=this.gridQuery.gridReady$.pipe(r.switchMap((function(){return t.rowsCount()})))},t.prototype.rowsCount=function(){var t=this;return this.gridQuery.isServerSide?this.gridQuery.serverDataLoaded$.pipe(r.map((function(){return t.gridQuery.serverSideConfig.totalRows}))):this.gridQuery.rowDataChanged$.pipe(r.map((function(t){return t.api.getDisplayedRowCount()})))},t.ctorParameters=function(){return[{type:Xa},{type:wr}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"displayRowCount",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"headerClass",void 0),t=vt([e.Component({selector:"dato-grid-header-v2",template:'<div class="d-flex justify-start items-center mb-20" [class.mx-30]="enableBackground">\n <span class="dato-mid-headline" [ngClass]="headerClass" data-auto-id="grid-header">\n <ng-content></ng-content>\n <ng-container *ngIf="displayRowCount">\n <span *ngIf="(rowCount$ | async)as rowCount" class="ml-5 mr-10">({{rowCount | number}})</span>\n </ng-container>\n </span>\n <ng-content select=".after-title"></ng-content>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[Xa,wr])],t)}();
327
327
  /**
328
328
  * @license
329
329
  * Copyright Datorama. All Rights Reserved.
@@ -337,7 +337,7 @@ var sa,la=function(){function t(t){this.host=t}return t.prototype.ngOnInit=funct
337
337
  *
338
338
  * Use of this source code is governed by an Apache License 2.0 license that can be
339
339
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
340
- */var is=function(){function t(t,e,n,o,i,r){this.cdr=t,this.translate=e,this.gridQuery=n,this.gridService=o,this.controller=i,this.decimalPipe=r,this.disableButtons=null,this.smallVersion=null,this.pageNumbersDisplay={currentPage:1,pages:[],showFirstEllipsis:!1,showLastPage:!1},this.showBottomControls=!1,this.isExpanded=!0,this.hasRowGroupColumns=!1,this.isServerSidePagination=!1,this.MINI_DISPLAY_LENGTH=2,this.DISPLAY_LENGTH=5,this.XS_DISPLAY_SIZE=160,this.SMALL_DISPLAY_SIZE=390}return Object.defineProperty(t.prototype,"content",{set:function(t){this.navigationElement=t,t&&null===this.smallVersion&&this.calculateNavigationSize()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prevPageDisabled",{get:function(){return 1===this.pageNumbersDisplay.currentPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextPageDisabled",{get:function(){return this.pageNumbersDisplay.currentPage===this.totalPages},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.gridQuery.waitForGrid((function(){return n.merge(t.gridQuery.gridRef.filterChanged,t.gridQuery.gridRef.rowGroupOpened,t.gridQuery.gridRef.expandOrCollapseAll)})).pipe(i.untilDestroyed(this)).subscribe((function(){t.gridApi.paginationGoToPage(0),t.initPagination()})),this.gridQuery.gridReady$.pipe(r.tap((function(){var e=t.gridQuery.api.columns.getRowGroupColumns();t.gridApi=t.gridQuery.api.grid,t.showBottomControls=t.gridQuery.getGridOptions().showBottomControls,t.hasRowGroupColumns=e&&e.length>0})),r.switchMap((function(){return t.isServerSidePagination=t.gridQuery.isServerSide,t.isServerSidePagination?t.gridQuery.serverDataLoaded$:t.gridQuery.rowDataChanged$})),r.throttleTime(100),os((function(){return t.initPagination()})),i.untilDestroyed(this)).subscribe((function(e){var n=e.paginationPage,o=void 0===n?1:n;t.initPagination(o-1)}))},t.prototype.calculateRowsCount=function(t){this.totalPages=t?Math.ceil(t/this.rowsPerPage):this.gridApi.paginationGetTotalPages(),this.rowCount=this.gridApi.paginationGetRowCount(),this.setRowsDisplayRange(this.pageNumbersDisplay.currentPage),this.cdr.detectChanges()},t.prototype.initPagination=function(t){void 0===t&&(t=0);var e=this.gridQuery.serverSideConfig,n=e.totalRows;e.enabled&&Lt(n)||(this.rowsPerPage=this.gridApi.paginationGetPageSize(),this.calculateRowsCount(n),this.pagesInView=this.DISPLAY_LENGTH,this.navigatePage(t))},Object.defineProperty(t.prototype,"pagesInView",{set:function(t){this._pagesInView=t,this.pagesOnSides=Math.floor(this._pagesInView/2),this.pagesFitView=this._pagesInView+1>=this.totalPages,this.pageNumbersDisplay.pages=[]},enumerable:!0,configurable:!0}),t.prototype.calculateNavigationSize=function(){if(this.navigationElement){var t=this.navigationElement.nativeElement.parentElement.clientWidth;this.disableButtons=t<this.XS_DISPLAY_SIZE,t<this.SMALL_DISPLAY_SIZE?this._pagesInView!==this.MINI_DISPLAY_LENGTH&&(this.smallVersion=!0,this.pagesInView=this.MINI_DISPLAY_LENGTH):this._pagesInView!==this.DISPLAY_LENGTH&&(this.smallVersion=!1,this.pagesInView=this.DISPLAY_LENGTH),this.cdr.detectChanges()}},t.prototype.navigatePage=function(t){if(t>=0&&t<=this.totalPages-1){this.shouldShowLoader(t)&&this.gridService.setLoading(!0),this.gridApi.paginationGoToPage(t);var e=t+1;this.pageNumbersDisplay.currentPage=e,0!==this.pageNumbersDisplay.pages.length&&this.pagesFitView||(this.pageNumbersDisplay.pages=this.getPages(e)),this.setRowsDisplayRange(e),this.cdr.detectChanges()}},t.prototype.navigateFirstPage=function(){this.navigatePage(0)},t.prototype.navigateNextPage=function(){this.navigatePage(this.pageNumbersDisplay.currentPage)},t.prototype.navigatePrevPage=function(){var t=this.pageNumbersDisplay.currentPage-2;this.navigatePage(t)},t.prototype.showNextBatch=function(){var t=this.pageNumbersDisplay.pages[0]+this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.showPreviousBatch=function(){var t=this.pageNumbersDisplay.pages[0]-this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.trackByPage=function(t,e){return e},t.prototype.toggleGroupsState=function(){this.isExpanded?this.gridApi.collapseAll():this.gridApi.expandAll(),this.isExpanded=!this.isExpanded},t.prototype.autoFitGrid=function(t){this.gridService.fitGrid(t)},t.prototype.ngOnDestroy=function(){},t.prototype.setRowsDisplayRange=function(t){var e=t-1,n=1+e*this.rowsPerPage,o=(e+1)*this.rowsPerPage,i=this.rowCount>o?o:this.rowCount;this.rowsRange=this.rowCount>0?this.translate.transform("core.itemsRange",{range:this.decimalPipe.transform(n)+" - "+this.decimalPipe.transform(i),number:this.decimalPipe.transform(this.rowCount)}):this.translate.transform("core.numberOfItems",{number:0})},t.prototype.getPages=function(t){var e=[];this.pageNumbersDisplay.showLastPage=!this.pagesFitView&&t+this.pagesOnSides<this.totalPages,this.pageNumbersDisplay.showFirstEllipsis=!this.pagesFitView&&t-this.pagesOnSides>1;for(var n=this.getFirstPageNumber(t),o=this.pagesFitView?this.totalPages:this._pagesInView,i=0;i<o;i++)e.push(n+i);return this.smallVersion||e[o-1]+1!==this.totalPages||(e.push(this.totalPages),this.pageNumbersDisplay.showLastPage=!1),e},t.prototype.getFirstPageNumber=function(t){var e=t-this.pagesOnSides;return this.smallVersion&&t>1?t!==this.totalPages&&(e=t):this.pageNumbersDisplay.showFirstEllipsis?this.pageNumbersDisplay.showLastPage||(e=this.totalPages-(this._pagesInView-1)):e=1,e},t.prototype.shouldShowLoader=function(t){return this.isServerSidePagination&&Lt(this.gridApi.getCacheBlockState()[t])},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn},{type:wr},{type:Ua},{type:Xa},{type:s.DecimalPipe}]},vt([e.ViewChild("navigation",{static:!0}),Ct("design:type",e.ElementRef),Ct("design:paramtypes",[e.ElementRef])],t.prototype,"content",null),t=vt([e.Component({selector:"dato-grid-pagination-v2",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<div class="d-flex-row d-flex-auto d-flex-wrap container" [class.small]="smallVersion"\n [attr.data-pages-count]="totalPages"\n [attr.data-current-page]="pageNumbersDisplay.currentPage"\n [attr.data-page-size]="rowsPerPage"\n [attr.data-rows-count]="rowCount">\n <div *ngIf="totalPages > 1" #navigation\n class="navigation d-flex-row d-flex-0-0-auto align-center">\n\n \x3c!-- First Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="mr-4" data-auto-id="pagiantion-first-page"\n icon="chevron-left-double"\n datoType="secondary"\n datoSize="md"\n [disabled]="prevPageDisabled"\n (click)="navigateFirstPage()">\n </dato-icon-button>\n\n \x3c!-- Previous Page --\x3e\n <dato-icon-button icon="arrow-left" datoType="secondary" datoSize="md"\n [disabled]="prevPageDisabled" data-auto-id="pagiantion-previous-page"\n (click)="navigatePrevPage()">\n </dato-icon-button>\n\n\n <div class="d-flex mx-5 align-center number-container">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm" data-auto-id="pagiantion-previous-batch"\n *ngIf="pageNumbersDisplay.showFirstEllipsis && !smallVersion"\n (click)="showPreviousBatch()">...\n </dato-link>\n <dato-link class="page-number mx-5" [datoType]="page === pageNumbersDisplay.currentPage ? \'primary\' : \'secondary\'" datoSize="sm"\n *ngFor="let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;" [attr.data-auto-id]="\'pagiantion-page-\' + i"\n (click)="navigatePage(page - 1)">\n {{page}}\n </dato-link>\n\n <div class="d-flex" *ngIf="pageNumbersDisplay.showLastPage && !smallVersion">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm" data-auto-id="pagiantion-next-batch"\n (click)="showNextBatch()">...</dato-link>\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n [attr.data-auto-id]="\'pagiantion-page-\' + totalPages"\n (click)="navigatePage(totalPages - 1)">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n \x3c!-- Next Page --\x3e\n <dato-icon-button icon="arrow-right" datoType="secondary" datoSize="md"\n (click)="navigateNextPage()" data-auto-id="pagiantion-next-page"\n [disabled]="nextPageDisabled">\n </dato-icon-button>\n\n \x3c!-- Last Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="ml-4" icon="chevron-right-double"\n datoType="secondary" datoSize="md" data-auto-id="pagiantion-last-page"\n [disabled]="nextPageDisabled"\n (click)="navigatePage(totalPages - 1)">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf="totalPages > 1 && !smallVersion"\n class="separator mx-10 my-auto primary-100-background-color">\n </div>\n\n <div class="total d-flex-0-0-auto d-flex-row align-center">\n <span class="dato-note primary-300-color">{{rowsRange}}</span>\n </div>\n\n <div *ngIf="showBottomControls" class="grid-controls d-flex d-flex-1 justify-end">\n <dato-icon-button *ngIf="hasRowGroupColumns" [icon]="isExpanded ? \'collapse\' : \'expand\'" datoType="secondary"\n datoSize="md" (click)="toggleGroupsState()" data-auto-id="pagination-expand-collapse"\n [datoTooltipV2]="isExpanded ? \'core.collapse-rows\' : \'core.expand-rows\'">\n </dato-icon-button>\n\n <dato-icon-button class="mx-4" icon="maximize-horizontal" datoType="secondary" datoSize="md"\n (click)="autoFitGrid(\'content\')" [datoTooltipV2]="\'core.fit-to-text\'"\n data-auto-id="pagination-fit-to-content">\n </dato-icon-button>\n\n <dato-icon-button icon="minimize-horizontal" datoType="secondary" datoSize="md"\n (click)="autoFitGrid(\'container\')" [datoTooltipV2]="\'core.revert-to-default-size\'"\n data-auto-id="pagination-fit-to-container">\n </dato-icon-button>\n </div>\n</div>\n',providers:[s.DecimalPipe],styles:[":host{padding:12px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:25px}:host .container{height:25px}:host .navigation .page-number{transition:color .3s ease-in-out}:host .navigation .page-number:first-of-type{margin-left:7px}:host .navigation .page-number:last-of-type{margin-right:7px}:host .separator{width:1px;height:25px}:host .container.small .navigation,:host .container.small .total{margin-top:8px;margin-left:auto;margin-right:auto}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,Mn,wr,Ua,Xa,s.DecimalPipe])],t)}(),rs=function(){function t(){this.widthToHideLabel=1439,this.widthForShortLabel=1539}return Object.defineProperty(t.prototype,"menu",{get:function(){return this.getMenu?this.getMenu():null},enumerable:!0,configurable:!0}),vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"label",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"shortLabel",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"enableV2_1",void 0),vt([e.Input(),Ct("design:type",Function)],t.prototype,"getMenu",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"isLast",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"widthToHideLabel",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"widthForShortLabel",void 0),t=vt([e.Component({selector:"dato-grid-toolbar-button",template:'<div *ngIf="menu else button" [datoMenuTriggerFor]="menu">\n <ng-container [ngTemplateOutlet]="button"></ng-container>\n</div>\n\n<ng-template #button>\n <dato-link datoType="secondary" [class.mr-16]="!isLast" [datoTooltip]="tooltip" datoTooltipPosition="bottom" [disabled]="disabled"\n [datoTooltipDisabled]="!tooltip" [class.full-button]="enableV2_1" [ngClass]="enableV2_1 ? \'full-button-\' + widthToHideLabel + \'px\' : \'\'">\n <dato-icon [icon]="icon" height="18px" width="18px"></dato-icon>\n <ng-container *ngIf="!shortLabel else labelAndShortLabel">\n {{ label | translate }}\n </ng-container>\n <ng-template #labelAndShortLabel>\n <span [class]="\'full-label-\' + widthForShortLabel + \'px\'">{{ label | translate }}</span>\n <span [class]="\'short-label short-label-\' + widthForShortLabel + \'px\'">{{ shortLabel | translate }}</span>\n </ng-template>\n </dato-link>\n\n <dato-icon *ngIf="enableV2_1" [icon]="icon" datoSize="sm" class="mr-16 pointer icon-button" [ngClass]="\'icon-button-\' + widthToHideLabel + \'px\'"\n [datoTooltip]="tooltip || label" datoTooltipPosition="bottom" [datoTooltipDisabled]="!tooltip && !label">\n </dato-icon>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),as=function(){function o(t,e,n,o,i,r){this.gridController=t,this.cdr=e,this.translate=n,this.popover=o,this.gridQuery=i,this.gridService=r,this.MAX_VISIBLE_ROW_ACTIONS=5,this.MAX_VISIBLE_GRID_ACTIONS=2,this._maxRowActions=this.MAX_VISIBLE_ROW_ACTIONS,this.displayExport=!0,this.rowActions={mainList:[],moreMenu:[]},this.gridActions={mainList:[],moreMenu:[]},this.searchPlaceholder=this.translate.transform("core.search"),this.rowActionsShortLabelThreshold=1539,this.displayCustomGridActionsSeparator=!0,this.openMenus={group:!1,settings:!1},this.rowGroupsCollapsed=!1,this.groupsAllowed=!this.hideGrouping,this.isSelectedRow=!1,this.isTreeMode=this.gridService.treeData,this.totalRowsCount=0,this.selectedRowsCount=0,this.allPageRowsSelected=!1,this.widthToHideActionsLabels=1439}return Object.defineProperty(o.prototype,"maxRowActions",{set:function(t){this.enableV2_1?(this._maxRowActions=Math.min(t,this.MAX_VISIBLE_ROW_ACTIONS),t>this.MAX_VISIBLE_ROW_ACTIONS&&e.isDevMode()&&console.warn("DatoGrid V2.1 - maxRowActions cannot be over "+this.MAX_VISIBLE_ROW_ACTIONS)):this._maxRowActions=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableV2_1",{get:function(){return this.gridController.gridOptions.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableSearch",{get:function(){return this.gridController.gridOptions.enableSearch},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableBackground",{get:function(){return this.gridController.gridOptions.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isRowActionsVisible",{get:function(){return!this.enableV2_1||this.enableV2_1&&this.isSelectedRow},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasRowActions",{get:function(){return ye(this.rowActions.mainList)>0||ye(this.rowActions.moreMenu)>0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hiddenColumns",{get:function(){return"("+this.gridQuery.getAllDisplayedColumns().length+"/"+this.gridQuery.getAllColumns().length+")"},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasActiveMoreActions",{get:function(){return this.rowActions.moreMenu.some((function(t){return t.visible}))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"api",{get:function(){return this.gridController.gridQuery.api},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this,e=this.gridController.gridQuery.waitForGrid((function(){return n.merge(t.gridQuery.gridRef.cellValueChanged,t.gridQuery.gridRef.rowDataUpdated,t.gridQuery.rowActionVisibilityChanged$).pipe(r.debounceTime(100),i.untilDestroyed(t))})),o=this.gridQuery.gridReady$.pipe(r.take(1));o.pipe(i.untilDestroyed(this)).subscribe((function(){t.groupsAllowed=!t.hideGrouping&&!t.gridQuery.getValue().serverSidePagination.enabled})),this.initGridActions();var a=this.gridQuery.selectedRowsChange$,s=this.gridQuery.selectIsSelectAllRowsEnabled();n.merge(e,o,a,s).pipe(r.filter((function(){return!!t.api})),i.untilDestroyed(this)).subscribe((function(){t.resolveVisibleActions(),t.cdr.detectChanges()})),this.registerGroupListeners(),this.subscribeRowsSelectionData(),this.subscribeReloadGridActions()},o.prototype.onActionClick=function(e){if(Et(e.onClick)){var n=this.gridController.gridQuery.getSelectedRowsCount();if(this.gridService._logEvent("Grids - Table Action",{action:e.key,numOfItems:n,from:"Toolbar"}),this.gridQuery.isServerSelectAllRowsEnabled){var o=this.gridService.getFilterForServerActionOnSelectAll();e.onClick(null,!0,o)}else{var i=this.gridController.gridQuery.getSelectedRowNodes();e.onClick(i)}}else e.actionType===t.GridActionType.EXPORT&&this.executeTableAction("Export")},o.prototype.resolveVisibleActions=function(){var t=this,e=this.gridQuery.getSelectedRowNodes();this.isSelectedRow=e.length>0||this.gridQuery.isServerSelectAllRowsEnabled;var n=Mr(this.gridController.rowActions,this.gridQuery.getSelectedRowsCount(),e,this.gridQuery.isServerSelectAllRowsEnabled).filter((function(e){return!t.isRowActionHidden(e)}));this.rowActions={mainList:n.slice(0,this._maxRowActions),moreMenu:n.slice(this._maxRowActions,n.length)},this.initWidthToHideActionsLabels()},o.prototype.initWidthToHideActionsLabels=function(){var t=this.rowActions.mainList.length+(this.rowActions.moreMenu.length>0?1:0)+(this.gridActions.moreMenu.length>0?1:0)+(this.createAction?1:0),e=[1239,1339,1439,1539];this.widthToHideActionsLabels=e[Math.min(Math.max(t-5,0),e.length-1)]},o.prototype.initGridActions=function(){var t=this.gridController.gridActions;this.initCreateAction(t),this.initExportAction(t);var e=this.MAX_VISIBLE_GRID_ACTIONS-(this.displayExport?1:0);ye(t)===e+1&&e++,this.gridActions={mainList:t.slice(0,e),moreMenu:t.slice(e,t.length)}},o.prototype.initCreateAction=function(e){var n=e.findIndex((function(e){return e.actionType===t.GridActionType.CREATE}));this.createAction=n>=0?e.splice(n,1)[0]:null,this.createAction&&(this.createAction.label=this.createAction.label||"core.create-new",this.createAction.key=this.createAction.key||"create-new")},o.prototype.initExportAction=function(e){var n=this,o=e.find((function(e){return e.actionType===t.GridActionType.EXPORT}));if(o){var i=o.onClick,r=o.icon,a=o.label,s=o.tooltip,l=o.key;o.onClick=i||function(){return n.executeTableAction("Export")},o.icon=r||"export",o.label=a||"core.export-table",o.tooltip=s||"core.export-table",o.key=l||"export"}},o.prototype.executeTableAction=function(t){switch(this.gridService._logEvent("Grids - General Table Action",{action:t}),t){case"Autofit to Content":this.gridService.fitGrid("content");break;case"Autofit to Page":this.gridService.fitGrid("container");break;case"Collapse Expand":this.toggleExpanded();break;case"Export":this.exportTable();break;case"Group from Settings":case"Group from Toolbar":this.openGroupMenu();break;case"Reset Filters":this.resetFilters();break;case"Reset Settings":this.resetSettings();break;case"Show Hide Column":this.openColumnMenu()}},o.prototype.toggleExpanded=function(){this.rowGroupsCollapsed?this.api.grid.expandAll():this.api.grid.collapseAll(),this.rowGroupsCollapsed=!this.rowGroupsCollapsed},Object.defineProperty(o.prototype,"hasGroups",{get:function(){return this.api.columns.getRowGroupColumns().length>0},enumerable:!0,configurable:!0}),o.prototype.exportTable=function(){var t=this.gridController.gridOptions,e=t.gridName,n=t.exportGrid;if(Et(n))n(mt(mt({},this.api),this.gridQuery.getValue().settings));else{var o=U.format(new Date,"LLL d, yyyy");this.api.grid.exportDataAsExcel({fileName:e+" - "+o,processCellCallback:function(t){var e=t.column,n=t.value,o=e.getColDef().valueFormatter;return Et(o)?o({value:n}):n}})}},o.prototype.resetSettings=function(){this.gridController.gridService.resetTableSettings()},o.prototype.openColumnMenu=function(){this.popover.open(ts,this.settingsTrigger.nativeElement,{width:220,className:"dato-grid-columns-display-menu",popper:{placement:"bottom-end"},data:{api:this.api,gridService:this.gridService,gridQuery:this.gridQuery}})},o.prototype.resetFilters=function(){this.gridController.gridService.clearAllFilters()},o.prototype.openGroupMenu=function(){var t=this;this.openMenus.group=!0;var e=this.hasGroups?0:200,n=this.gridQuery.gridRef.columnRowGroupChanged.pipe(r.take(1),i.untilDestroyed(this)).subscribe((function(){t.rowGroupsCollapsed=!1,t.cdr.detectChanges()}));setTimeout((function(){t.popover.open(es,t.groupTrigger.nativeElement,{height:206,width:250,className:"dato-grid-groups-menu",popper:{placement:"bottom-end"},data:{api:t.api,gridService:t.gridService}}).pipe(i.untilDestroyed(t)).subscribe((function(){n.unsubscribe(),t.openMenus.group=!1,t.cdr.detectChanges()}))}),e)},o.prototype.isActionDisabled=function(t){return!t.visible},o.prototype.isRowActionHidden=function(t){return!t.visible&&this.enableV2_1},o.prototype.clearSelectedRows=function(){this.gridService.deselectAllRows()},o.prototype.ngOnDestroy=function(){},o.prototype.getCollapseState=function(t){var e=t.node,n=t.api,o=!0;return 0===e.rowGroupIndex&&n.forEachNodeAfterFilterAndSort((function(t){var e=t.expanded;0===t.rowGroupIndex&&e&&(o=!1)})),o},o.prototype.registerGroupListeners=function(){var t=this;this.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.columnRowGroupChanged})).pipe(r.filter((function(){return!t.openMenus.group})),i.untilDestroyed(this)).subscribe((function(){t.rowGroupsCollapsed=!1,t.cdr.detectChanges()})),this.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.rowGroupOpened})).pipe(i.untilDestroyed(this)).subscribe((function(e){var n=t.getCollapseState(e);n!==t.rowGroupsCollapsed&&(t.rowGroupsCollapsed=n,t.cdr.detectChanges())}))},o.prototype.subscribeRowsSelectionData=function(){var t=this;this.gridQuery.rowsSelectionData$.pipe(i.untilDestroyed(this)).subscribe((function(e){var n=e.totalRowsCount,o=e.selectedRowsCount,i=e.selectedPageRowsCount,r=e.isAllPageRowsSelected;t.totalRowsCount=n,t.selectedRowsCount=o;var a=t.gridQuery.getGridOptions().enableAllPagesSelection;t.allPageRowsSelected=a&&r&&o===i&&o<n,t.cdr.detectChanges()}))},o.prototype.subscribeReloadGridActions=function(){var t=this;this.gridService.onReloadGridActions().subscribe((function(){t.initGridActions()}))},o.prototype.selectAllPages=function(){this.gridQuery.isServerSide?this.gridService.setServerSidePagination({selectAllRowsEnabled:!0,excludedFromSelectAll:[]}):this.gridService.api.grid.selectAllFiltered()},o.ctorParameters=function(){return[{type:Xa},{type:e.ChangeDetectorRef},{type:Mn},{type:da},{type:wr},{type:Ua}]},vt([e.ViewChild("groupTrigger",{read:e.ElementRef,static:!1}),Ct("design:type",e.ElementRef)],o.prototype,"groupTrigger",void 0),vt([e.ViewChild("settingsTrigger",{read:e.ElementRef,static:!1}),Ct("design:type",e.ElementRef)],o.prototype,"settingsTrigger",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"displayExport",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],o.prototype,"maxRowActions",null),vt([e.Input(),Ct("design:type",Boolean)],o.prototype,"hideGrouping",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"searchPlaceholder",void 0),vt([e.Input(),Ct("design:type",Number)],o.prototype,"rowActionsShortLabelThreshold",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"displayCustomGridActionsSeparator",void 0),o=vt([e.Component({selector:"dato-grid-toolbar-v2",template:'<section *ngIf="gridController.gridQuery.gridReady$ | async" class="d-flex mb-20 justify-between items-center main-container" [class.mx-30]="enableBackground">\n\n <section [ngClass]="{ \'d-flex items-center right-section\': enableV2_1 }">\n \x3c!-- Dynamic content for the left area --\x3e\n <div data-auto-id="grid-toolbar-dynamic-left">\n <ng-content select="[toolbarLeftArea]"></ng-content>\n </div>\n\n <div class="d-flex items-center">\n <dato-grid-search-bar *ngIf="enableSearch" [searchPlaceholder]="searchPlaceholder"></dato-grid-search-bar>\n <ng-container *ngIf="enableV2_1 && selectedRowsCount > 0">\n <div class="d-flex items-center">\n <div class="chip align-center d-flex dato-note px-9 nowrap ml-16">\n <span data-auto-id="grid-selected-items-text">{{ (allPageRowsSelected ? \'core.all-items-in-page-selected\' : \'core.selected-items\') | translate:{ itemsCount: selectedRowsCount } }}</span>\n <dato-icon datoType="primary" datoIcon="close" datoSize="md" class="ml-6 pointer" (click)="clearSelectedRows()"\n data-auto-id="grid-clear-selected-rows"></dato-icon>\n </div>\n <dato-link *ngIf="allPageRowsSelected" (click)="selectAllPages()" datoSize="sm" class="ml-10"\n data-auto-id="grid-select-all-pages">\n <span>{{\'core.select-all-items\' | translate:{ itemsCount: totalRowsCount } }}</span>\n </dato-link>\n </div>\n <div *ngIf="hasRowActions" class="separator"></div>\n </ng-container>\n </div>\n\n \x3c!-- Row Actions--\x3e\n <div class="d-flex items-center" *ngIf="isRowActionsVisible">\n\n <ng-container *ngFor="let rowAction of rowActions.mainList; index as i; last as isLast">\n\n <div *ngIf="!isRowActionHidden(rowAction)"\n [attr.data-auto-id]="\'grid-toolbar-action-\' + rowAction.key"\n [attr.data-action-index]="\'grid-toolbar-action-\' + i"\n [class.disabled-action]="isActionDisabled(rowAction)">\n <ng-container [ngTemplateOutlet]="rowAction.template || defaultButton"\n [ngTemplateOutletContext]="{disabled: isActionDisabled(rowAction)}"></ng-container>\n </div>\n\n <ng-template #defaultButton>\n <div (click)="onActionClick(rowAction)">\n <dato-grid-toolbar-button [icon]="rowAction.icon"\n [disabled]="isActionDisabled(rowAction)"\n [label]="rowAction.label"\n [shortLabel]="rowAction.shortLabel"\n [tooltip]="rowAction.tooltip"\n [getMenu]="rowAction.getMenu"\n [enableV2_1]="enableV2_1"\n [isLast]="isLast"\n [widthToHideLabel]="widthToHideActionsLabels">\n </dato-grid-toolbar-button>\n </div>\n </ng-template>\n </ng-container>\n\n <div *ngIf="rowActions.moreMenu.length > 0" class="separator"></div>\n <dato-grid-toolbar-more-menu [actions]="rowActions.moreMenu" (actionClick)="onActionClick($event)" [isRowActions]="true">\n </dato-grid-toolbar-more-menu>\n </div>\n\n </section>\n\n\n \x3c!-- General Actions --\x3e\n <div class="d-flex items-center">\n \x3c!-- Create action --\x3e\n <ng-container *ngIf="createAction">\n <dato-button datoSize="sm" class="pointer primary-300-color" (click)="onActionClick(createAction)"\n [datoTooltip]="createAction.tooltip" [attr.data-auto-id]="\'grid-toolbar-action-\' + createAction.key">\n <dato-icon *ngIf="createAction.icon" [icon]="createAction.icon" class="mr-5"></dato-icon>\n {{ createAction.label | translate }}\n </dato-button>\n <div class="separator"></div>\n </ng-container>\n\n \x3c!-- Dynamic content for the right area --\x3e\n <div #customActions data-auto-id="grid-toolbar-dynamic-right">\n <ng-content select="[toolbarRightArea]"></ng-content>\n </div>\n <div *ngIf="customActions.childNodes.length && displayCustomGridActionsSeparator" class="separator"></div>\n\n \x3c!-- Group buttons --\x3e\n <div *ngIf="groupsAllowed" class="d-flex grouping-section opacity-0 invisible" [class.open]="openMenus.group || hasGroups">\n <dato-icon-button [class.active]="openMenus.group" (click)="executeTableAction(\'Group from Toolbar\')"\n data-auto-id="grid-toolbar-open-groups"\n removeIconPadding datoSize="md" datoType="none" icon="group" iconWidth="17px"\n datoTooltip="core.row-grouping" #groupTrigger\n class="mr-10 pointer"></dato-icon-button>\n <dato-icon-button data-auto-id="grid-toolbar-toggle-expand" datoSize="md" datoType="none"\n (click)="executeTableAction(\'Collapse Expand\')"\n [icon]="rowGroupsCollapsed ? \'expand\' : \'collapse\'"\n [disabled]="!hasGroups"\n [datoTooltip]="\'core.\' + (rowGroupsCollapsed ? \'expand\' : \'collapse\') + \'-rows\'"\n class="pointer"></dato-icon-button>\n <div class="separator"></div>\n </div>\n\n \x3c!-- Grid Actions --\x3e\n <ng-container *ngFor="let gridAction of gridActions.mainList; index as i">\n <div *ngIf="gridAction.getMenu else button" [datoMenuTriggerFor]="gridAction.getMenu()">\n <ng-container [ngTemplateOutlet]="button"></ng-container>\n </div>\n <ng-template #button>\n <dato-icon datoSize="sm" (click)="onActionClick(gridAction)"\n [attr.data-auto-id]="\'grid-toolbar-action-\' + gridAction.key"\n [attr.data-action-index]="\'grid-toolbar-general-action-\' + i"\n [icon]="gridAction.icon" class="pointer primary-300-color"\n [class.mr-16]="!gridAction.separator"\n [datoTooltip]="gridAction.tooltip || gridAction.label">\n </dato-icon>\n </ng-template>\n <div *ngIf="gridAction.separator" class="separator"></div>\n </ng-container>\n\n \x3c!-- Export --\x3e\n <dato-icon data-auto-id="grid-toolbar-export" datoSize="sm"\n (click)="executeTableAction(\'Export\')" *ngIf="displayExport && !isTreeMode"\n icon="export" class="pointer mr-16 primary-300-color" datoTooltip="core.export-table"></dato-icon>\n\n \x3c!-- Settings --\x3e\n <dato-icon [class.active]="openMenus.settings" (click)="openMenus.settings = true"\n data-auto-id="grid-toolbar-settings" datoSize="sm"\n icon="account" class="pointer primary-300-color" datoTooltip="core.table-settings"\n #settingsTrigger\n [datoMenuTriggerFor]="settingsMenu"></dato-icon>\n\n \x3c!-- More actions menu --\x3e\n <ng-container *ngIf="gridActions.moreMenu.length > 0">\n <div class="separator"></div>\n <dato-grid-toolbar-more-menu [actions]="gridActions.moreMenu" (actionClick)="onActionClick($event)" [isRowActions]="false">\n </dato-grid-toolbar-more-menu>\n </ng-container>\n\n <dato-menu #settingsMenu="datoMenu" menuClass="grid-settings-menu" placement="bottom-end"\n (menuClosed)="openMenus.settings = false">\n <ng-template datoMenuContent>\n <button data-auto-id="grid-toolbar-settings-autofit-page" datoMenuItem\n (click)="executeTableAction(\'Autofit to Page\')">\n <dato-icon datoSize="sm" icon="maximize-horizontal" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.autofitPage\' | translate }}</button>\n <button data-auto-id="grid-toolbar-settings-autofit-content" datoMenuItem\n (click)="executeTableAction(\'Autofit to Content\')">\n <dato-icon datoSize="sm" icon="minimize-horizontal" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.autofitContent\' | translate }}</button>\n <ng-container *ngIf="groupsAllowed">\n <button data-auto-id="grid-toolbar-settings-group" datoMenuItem (click)="executeTableAction(\'Group from Settings\')">\n <dato-icon datoSize="sm" icon="group" class="mr-4 primary-300-color"></dato-icon>\n {{ \'core.group\' | translate }}\n </button>\n </ng-container>\n <button data-auto-id="grid-toolbar-settings-toggle-columns" datoMenuItem (click)="executeTableAction(\'Show Hide Column\')">\n <dato-icon datoSize="sm" icon="hide" class="mr-8 primary-300-color"></dato-icon>\n <span>{{ \'core.hideShowColumns\' | translate }}<span\n class="dato-simple-italic ml-5 primary-200-color">{{hiddenColumns}}</span></span>\n </button>\n <button data-auto-id="grid-toolbar-settings-reset-settings" datoMenuItem\n (click)="executeTableAction(\'Reset Settings\')">\n <dato-icon datoSize="sm" icon="reset-table" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.resetTableSettings\' | translate }}\n </button>\n <button data-auto-id="grid-toolbar-settings-reset-filters" datoMenuItem\n (click)="executeTableAction(\'Reset Filters\')">\n <dato-icon datoSize="sm" icon="reset-filters" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.resetAllFilters\' | translate }}\n </button>\n <button data-auto-id="grid-toolbar-export" datoMenuItem\n (click)="executeTableAction(\'Export\')" *ngIf="this.displayExport && isTreeMode">\n <dato-icon datoSize="sm"\n icon="export" class="pointer mr-5 primary-300-color" datoTooltip="core.export-table"></dato-icon>\n {{ \'core.export-table\' | translate }}\n </button>\n </ng-template>\n </dato-menu>\n </div>\n</section>\n\n\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".grouping-section{transition:visibility .2s ease-in-out,width .2s ease-in-out,opacity .2s ease-in-out;width:0}.grouping-section.open{width:75px;visibility:visible;opacity:1}:host .main-container{min-height:24px}:host .right-section{margin-right:50px}:host .separator{width:1px;height:24px;margin:0 16px}.disabled-action{pointer-events:none}"]}),Ct("design:paramtypes",[Xa,e.ChangeDetectorRef,Mn,da,wr,Ua])],o)}(),ss=function(){function n(t){this.popover=t}return n.prototype.close=function(){this.popover.close({type:t.PopoverTrigger.Close,data:this.result})},n.ctorParameters=function(){return[{type:da}]},vt([e.Input("datoPopoverClose"),Ct("design:type",Object)],n.prototype,"result",void 0),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"close",null),n=vt([e.Directive({selector:"[datoPopoverClose]"}),Ct("design:paramtypes",[da])],n)}(),ls=function(){function t(t,n){this.popover=t,this.host=n,this.popoverClose=new e.EventEmitter,this.config={},this.trigger="click"}return Object.defineProperty(t.prototype,"datoPopoverContent",{set:function(t){this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverConfig",{set:function(t){this.config=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverClassName",{set:function(t){this.className=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverPlacement",{set:function(t){this.placement=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverTrigger",{set:function(t){this.trigger=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverWidth",{set:function(t){this.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverHeight",{set:function(t){this.height=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.host.nativeElement,this.trigger).pipe(i.untilDestroyed(this)).subscribe((function(){var e=ea({className:t.className,width:t.width,height:t.height,popper:{placement:t.placement||"bottom"}},t.config);t.popover.open(t.content,t.host.nativeElement,e).subscribe((function(){t.popoverClose.emit(!0)}))}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:da},{type:e.ElementRef}]},vt([e.Output(),Ct("design:type",Object)],t.prototype,"popoverClose",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverContent",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverConfig",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoPopoverClassName",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverPlacement",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoPopoverTrigger",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverWidth",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverHeight",null),t=vt([e.Directive({selector:"[datoPopoverContent]"}),Ct("design:paramtypes",[da,e.ElementRef])],t)}(),cs=[la,ss,ls],ps=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[cs],exports:[cs],entryComponents:[la]})],t)}(),ds=function(){function t(t,e){this.template=t,this.appRef=e}return t.prototype.getMenuView=function(){var t,e;this.viewRef=this.template.createEmbeddedView({}),this.container=$t("div"),Ut(this.container,"dato-menu");try{for(var n=wt(this.viewRef.rootNodes),o=n.next();!o.done;o=n.next()){var i=o.value;this.container.appendChild(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return this.appRef.attachView(this.viewRef),document.body.appendChild(this.container),Vt(pe(Gt(".dato-menu")),"zIndex",Nn()),this.container},t.prototype.destroyView=function(){this.container&&(this.appRef.detachView(this.viewRef),document.body.removeChild(this.container),this.container=null)},t.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.ApplicationRef}]},t=vt([e.Directive({selector:"[datoMenuContent]"}),Ct("design:paramtypes",[e.TemplateRef,e.ApplicationRef])],t)}(),us=function(){function o(o){this.popper=o,this.placement="bottom-start",this.theme=t.ColorPalette.Light,this.menuClosed=new e.EventEmitter,this.isOpen=!1,this.items=[],this.itemChanges=new n.Subject}return Object.defineProperty(o.prototype,"isChildMenuOpen",{get:function(){return this.child&&this.child.isOpen},enumerable:!0,configurable:!0}),o.prototype.open=function(e){var n=this;if(!this.isOpen){var o=this.content.getMenuView();this.menuClass&&Ut(o,this.menuClass),this.theme===t.ColorPalette.Dark&&Ut(o,t.ColorPalette.Dark),this.popper.create(e,o,{placement:this.placement}).subscribe((function(t){n.popperInstance=t,n.isOpen=!0}))}},o.prototype.close=function(){this.child&&this.child.close(),this.content.destroyView(),this.popperInstance.destroy(),this.isOpen=!1,this.child=null,this.menuClosed.emit()},o.prototype._itemsHovered=function(){return this.itemChanges.pipe(r.startWith(this.items),r.switchMap((function(t){return n.merge.apply(void 0,xt(t.map((function(t){return t._hover$}))))})))},o.prototype.addItem=function(t){-1===this.items.indexOf(t)&&(this.items.push(t),this.itemChanges.next(this.items))},o.prototype.removeItem=function(t){this.items=this.items.filter((function(e){return e!==t})),this.itemChanges.next(this.items)},o.prototype.setChild=function(t){this.child=t},o.prototype.ngOnDestroy=function(){},o.ctorParameters=function(){return[{type:Pn}]},vt([e.ContentChild(ds),Ct("design:type",ds)],o.prototype,"content",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"menuClass",void 0),vt([e.Input(),Ct("design:type",String)],o.prototype,"theme",void 0),vt([e.Output(),Ct("design:type",Object)],o.prototype,"menuClosed",void 0),o=vt([e.Component({selector:"dato-menu",template:"\n <ng-content></ng-content>\n ",exportAs:"datoMenu",changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[Pn])],o)}(),hs=function(){function t(t,e,o){this.host=t,this.zone=e,this.parentMenu=o,this.originClosed=new n.Subject,this.isRoot=null===o}return Object.defineProperty(t.prototype,"childMenu",{get:function(){return this._childMenu},set:function(t){this._childMenu=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.isRoot?n.fromEvent(this.element,"click").pipe(i.untilDestroyed(this)).subscribe((function(){t.childMenu&&(t.childMenu.isOpen?t.closeMenu():t.openMenu())})):this.childMenu&&this.element.setAttribute("data-menu-trigger","true")},t.prototype.openMenu=function(){var t=this;this.childMenu.open(this.element),n.fromEvent(document,"click",{capture:!0}).pipe(r.takeUntil(this.originClosed),r.filter((function(e){var n=t.element.contains(e.target),o=e.target.getAttribute("data-menu-trigger");return!n&&!o})),r.take(1)).subscribe((function(){setTimeout((function(){return t.closeMenu()}))}))},t.prototype.closeMenu=function(){this.childMenu.close(),this.originClosed.next()},t.prototype.ngAfterViewInit=function(){this.childMenu&&this.subscribeChildMenuItemsHovered()},t.prototype.subscribeChildMenuItemsHovered=function(){var t=this;this.childMenu._itemsHovered().pipe(i.untilDestroyed(this)).subscribe((function(e){e.childMenu?(t.childMenu.child&&e.childMenu!==t.childMenu.child&&t.childMenu.child.close(),e.childMenu.isOpen||(t.childMenu.setChild(e.childMenu),e.openChildMenu())):t.childMenu.isChildMenuOpen&&t.childMenu.child.close()}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:us,decorators:[{type:e.Optional}]}]},vt([e.Input("datoMenuTriggerFor"),Ct("design:type",us),Ct("design:paramtypes",[us])],t.prototype,"childMenu",null),t=vt([e.Directive({selector:"[datoMenuTriggerFor]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,e.NgZone,us])],t)}(),gs=function(){function t(t,e,o){this.host=t,this.menu=e,this.menuTrigger=o,this._hover$=n.fromEvent(this.element,"mouseenter").pipe(r.mapTo(this)),this.disabled=!1,this.menu.addItem(this)}return Object.defineProperty(t.prototype,"childMenu",{get:function(){return this.menuTrigger&&this.menuTrigger.childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.openChildMenu=function(){return this.menuTrigger&&this.menuTrigger.childMenu.open(this.menuTrigger.element)},t.prototype.ngOnDestroy=function(){this.menu.removeItem(this)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:us},{type:hs,decorators:[{type:e.Optional}]}]},vt([e.Input(),e.HostBinding("class.dato-menu-item--disabled"),Ct("design:type",Object)],t.prototype,"disabled",void 0),t=vt([e.Directive({selector:"[datoMenuItem]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,us,hs])],t)}(),fs=[us,gs,hs,ds],ms=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[fs],exports:[fs],entryComponents:[us]})],t)}(),ys={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return vs})),multi:!0},vs=function(n){function o(t){var e=n.call(this)||this;return e.cdr=t,e.expanded=!1,e.disabled=!1,e}return ft(o,n),Object.defineProperty(o.prototype,"datoTogglerValue",{set:function(t){this.setOperators(t)},enumerable:!0,configurable:!0}),o.prototype.setDisabledState=function(t){this.disabled=t,this.cdr.markForCheck()},o.prototype.writeValue=function(t){this.setOperators(t)},o.prototype.toggle=function(){this.setOperators(),this.onChange(this.active)},o.prototype.setOperators=function(e){this.active=e||this.getOppositeOperator(this.active);var n=this.getOppositeOperator(this.active);this.op1=t.OperatorTypes[this.active],this.op2=t.OperatorTypes[n],this.cdr.markForCheck()},o.prototype.getOppositeOperator=function(e){return e===t.OperatorTypes.AND?t.OperatorTypes.OR:t.OperatorTypes.AND},o.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),e.HostBinding("class.show-open"),Ct("design:type",Object)],o.prototype,"expanded",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],o.prototype,"datoTogglerValue",null),o=vt([e.Component({selector:"dato-operator-toggler",template:'<div class="container relative pointer" (click.stop)="toggle()" [ngClass]="op1" *ngIf="!disabled; else disabledTpl">\n <span class="main-option dato-note-bold absolute">{{op1}}</span>\n <span class="other-option dato-note-bold absolute">{{op2}}</span>\n</div>\n\n<ng-template #disabledTpl>\n <div class="disabled dato-note-bold primary-300-color" [ngClass]="active">{{active}}</div>\n</ng-template>\n',encapsulation:e.ViewEncapsulation.None,providers:[ys],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-operator-toggler{height:16px;width:67px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:10px}dato-operator-toggler .container{height:16px;width:67px}dato-operator-toggler .container span{border-radius:10px;transform:translateX(0);transition:transform .2s ease-in-out,color .2s ease-in-out,background-color .2s ease-in-out,opacity .2s ease-in-out,width .2s ease-in-out;background:0 0}dato-operator-toggler .container .other-option{padding:0 7px;opacity:0}dato-operator-toggler .container .main-option{transform:translateX(10px);z-index:1}dato-operator-toggler .container.AND .other-option{width:31px}dato-operator-toggler .container.AND .main-option{padding:0 7px}dato-operator-toggler .container.OR .other-option{width:40px}dato-operator-toggler .container.OR .main-option{padding:0 10px}dato-operator-toggler.show-open .container .main-option,dato-operator-toggler.show-open .container .other-option,dato-operator-toggler:hover .container .main-option,dato-operator-toggler:hover .container .other-option{transform:translateX(0)}dato-operator-toggler.show-open .container.AND .other-option,dato-operator-toggler:hover .container.AND .other-option{text-align:right}dato-operator-toggler.show-open .container.OR .main-option,dato-operator-toggler:hover .container.OR .main-option{transform:translateX(36px)}dato-operator-toggler.show-open .container.OR .other-option,dato-operator-toggler:hover .container.OR .other-option{text-align:left}dato-operator-toggler.show-open .container .other-option,dato-operator-toggler:hover .container .other-option{opacity:1;width:67px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],o)}(Dt),bs=[vs],Cs=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Io],declarations:[bs],exports:[bs],entryComponents:[bs]})],t)}(),ws=function(){function t(t,e){this.cdr=t,this.host=e,this._text=null,this.hide=!0}return Object.defineProperty(t.prototype,"tpl",{set:function(t){t&&(this._tpl=t,this.cdr.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controlError",{set:function(t){this.context={$implicit:t},this.cdr.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"customClass",{set:function(t){!1===this.element.classList.contains(t)&&this.host.nativeElement.classList.add(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{set:function(t){t!==this._text&&(this._text=t,this.hide=!t,this.cdr.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},t=vt([e.Component({selector:"dato-control-error",template:'<label class="dato-control-error" [class.force-hide]="hide" *ngIf="!_tpl">{{_text | translate}}</label>\n<ng-template *ngTemplateOutlet="_tpl; context: context"></ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n }\n "]}),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),Ss=function(){function t(t){this.vcr=t}return t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t=vt([e.Directive({selector:"[datoControlErrorContainer]"}),Ct("design:paramtypes",[e.ViewContainerRef])],t)}(),xs=function(){function t(t){var e=this;this.host=t,this.submit$=n.fromEvent(this.element,"submit").pipe(r.tap((function(){!1===e.element.classList.contains("dato-form-submitted")&&e.element.classList.add("dato-form-submitted")})),r.shareReplay({refCount:!0,bufferSize:1}))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoForm]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),Os=new e.InjectionToken("FORM_ERRORS",{providedIn:"root",factory:function(){return{}}}),Ds=function(){function t(t,e,o,i,r,a,s,l){this.vcr=t,this.resolver=e,this.host=o,this.errors=i,this.form=a,this.ngControl=s,this.parentControl=l,this.customErrors={},this.datoControlErrorsOnBlur=!0,this.container=r?r.vcr:this.vcr,this.submit$=this.form?this.form.submit$:n.EMPTY}return t.prototype.ngOnInit=function(){var t=this;this.resolveControl();var e="DATO-INPUT"===this.host.nativeElement.tagName,o=this.control.valueChanges,a=o;this.datoControlErrorsOnBlur&&e&&(a=n.fromEvent(this.host.nativeElement,"focusout").pipe(r.switchMap((function(){return n.merge(n.of(!0),o)}))));var s=this.submit$.pipe(r.switchMap((function(){return n.merge(n.of(!0),o)})));n.merge(s,a).pipe(i.untilDestroyed(this)).subscribe((function(){return t.valueChanges()}))},t.prototype.setError=function(t,e){if(!this.ref){var n=this.resolver.resolveComponentFactory(ws);this.ref=this.container.createComponent(n)}var o=this.ref.instance;o.text=t,this.datoControlErrorsClass&&(o.customClass=this.datoControlErrorsClass),this.datoControlErrorsTpl&&(o.tpl=this.datoControlErrorsTpl,o.controlError=e)},t.prototype.ngOnDestroy=function(){},t.prototype.valueChanges=function(){var t=this.control.errors;if(t){var e=Object.keys(t)[0],n=this.errors[e];if(!1===Et(n))return;var o=this.customErrors[e]||n(t[e]);this.setError(o,t)}else this.ref&&this.setError(null)},t.prototype.resolveControl=function(){if(this.ngControl||!this.parentControl){if(!this.ngControl)throw new Eo("Expect abstract control but gone none");this.control=this.ngControl.control}else this.control=this.parentControl},t.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.ComponentFactoryResolver},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[Os]}]},{type:Ss,decorators:[{type:e.Optional}]},{type:xs,decorators:[{type:e.Optional}]},{type:o.NgControl,decorators:[{type:e.Optional}]},{type:o.ControlContainer,decorators:[{type:e.Optional}]}]},vt([e.Input("datoControlErrors"),Ct("design:type",Object)],t.prototype,"customErrors",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoControlErrorsClass",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"datoControlErrorsTpl",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoControlErrorsOnBlur",void 0),t=vt([e.Directive({selector:"[datoControlErrors]"}),bt(3,e.Inject(Os)),bt(4,e.Optional()),bt(5,e.Optional()),bt(6,e.Optional()),bt(7,e.Optional()),Ct("design:paramtypes",[e.ViewContainerRef,e.ComponentFactoryResolver,e.ElementRef,Object,Ss,xs,o.NgControl,o.ControlContainer])],t)}(),Is=[ws,Ss,Ds,xs],Ts=function(){function t(){}return t=vt([e.NgModule({declarations:[Is],imports:[s.CommonModule,Co],exports:[Is],entryComponents:[ws]})],t)}(),Rs=function(){function t(t,e){this.controlDirective=t,this.host=e}return Object.defineProperty(t.prototype,"control",{get:function(){return this.controlDirective.control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.control.value?parseFloat(this.control.value):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.host.nativeElement.getAttribute("datosize")||"md"},enumerable:!0,configurable:!0}),t.prototype.patchValue=function(t){this.control.patchValue(t),this.control.markAsDirty()},t.prototype.focus=function(){this.host.nativeElement.focus()},t.ctorParameters=function(){return[{type:o.NgControl},{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoInputNumber]"}),Ct("design:paramtypes",[o.NgControl,e.ElementRef])],t)}(),As=function(){function t(t){this.host=t,this.max=1/0,this.min=-1/0,this.step=1,this.allowNegative=!1,this.showControls=!0}return t.prototype.ngOnInit=function(){var t=this;this.showControls&&(Es(this.increment.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.incrementValue()})),Es(this.decrement.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.decrementValue()})))},t.prototype.ngAfterContentInit=function(){Qt(this.host.nativeElement,"datosize",this.input.size)},t.prototype.ngOnDestroy=function(){},t.prototype.incrementValue=function(){this.input.focus();var t=this.input.value+this.step;t<=this.max&&this.input.patchValue(t)},t.prototype.decrementValue=function(){this.input.focus();var t=this.input.value>this.min,e=this.input.value-this.step>=(this.allowNegative?-1/0:0);if(t&&e){var n=this.input.value-this.step;this.input.patchValue(n)}},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.ViewChild("increment",{static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"increment",void 0),vt([e.ViewChild("decrement",{static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"decrement",void 0),vt([e.ContentChild(Rs,{static:!0}),Ct("design:type",Rs)],t.prototype,"input",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"max",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"min",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"step",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"allowNegative",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showControls",void 0),t=vt([e.Component({selector:"dato-input-number",template:'<ng-content></ng-content>\n <div [class.invisible]="!showControls" class="controls d-flex-column align-center">\n <button #increment (click.prevent)="incrementValue()" class="flex-1 align-center d-flex"><dato-icon datoIcon="arrow-down" class="primary-300-color" datoSize="sm" width="10px" #inc></dato-icon></button>\n <button #decrement (click.prevent)="decrementValue()" class="flex-1 align-center d-flex"><dato-icon datoIcon="arrow-down" class="primary-300-color" datoSize="sm" width="10px" #dec></dato-icon></button>\n </div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-input-number{position:relative;display:block;overflow:hidden}dato-input-number input,dato-input-number input[type=number]{width:100%}dato-input-number .controls{height:28px;position:absolute;top:1px;right:1px}dato-input-number .controls button{padding:0;cursor:pointer;transform:scaleY(0);transform-origin:top;transition:transform .2s;line-height:13px;width:30px;font-size:12px}dato-input-number .controls button:focus{outline:0}dato-input-number .controls button:first-child .dato-icon-arrow-down{transform:rotate(180deg)}dato-input-number .controls button:last-child{transform-origin:bottom}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}();
340
+ */var is=function(){function t(t,e,n,o,i,r){this.cdr=t,this.translate=e,this.gridQuery=n,this.gridService=o,this.controller=i,this.decimalPipe=r,this.disableButtons=null,this.smallVersion=null,this.pageNumbersDisplay={currentPage:1,pages:[],showFirstEllipsis:!1,showLastPage:!1},this.showBottomControls=!1,this.isExpanded=!0,this.hasRowGroupColumns=!1,this.isServerSidePagination=!1,this.MINI_DISPLAY_LENGTH=2,this.DISPLAY_LENGTH=5,this.XS_DISPLAY_SIZE=160,this.SMALL_DISPLAY_SIZE=390}return Object.defineProperty(t.prototype,"content",{set:function(t){this.navigationElement=t,t&&null===this.smallVersion&&this.calculateNavigationSize()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prevPageDisabled",{get:function(){return 1===this.pageNumbersDisplay.currentPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextPageDisabled",{get:function(){return this.pageNumbersDisplay.currentPage===this.totalPages},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.gridQuery.waitForGrid((function(){return n.merge(t.gridQuery.gridRef.filterChanged,t.gridQuery.gridRef.rowGroupOpened,t.gridQuery.gridRef.expandOrCollapseAll)})).pipe(i.untilDestroyed(this)).subscribe((function(){t.gridApi.paginationGoToPage(0),t.initPagination()})),this.gridQuery.gridReady$.pipe(r.tap((function(){var e=t.gridQuery.api.columns.getRowGroupColumns();t.gridApi=t.gridQuery.api.grid,t.showBottomControls=t.gridQuery.getGridOptions().showBottomControls,t.hasRowGroupColumns=e&&e.length>0})),r.switchMap((function(){return t.isServerSidePagination=t.gridQuery.isServerSide,t.isServerSidePagination?t.gridQuery.serverDataLoaded$:t.gridQuery.rowDataChanged$})),r.throttleTime(100),os((function(){return t.initPagination()})),i.untilDestroyed(this)).subscribe((function(e){var n=e.paginationPage,o=void 0===n?1:n;t.initPagination(o-1)}))},t.prototype.calculateRowsCount=function(t){this.totalPages=t?Math.ceil(t/this.rowsPerPage):this.gridApi.paginationGetTotalPages(),this.rowCount=this.gridApi.paginationGetRowCount(),this.setRowsDisplayRange(this.pageNumbersDisplay.currentPage),this.cdr.detectChanges()},t.prototype.initPagination=function(t){void 0===t&&(t=0);var e=this.gridQuery.serverSideConfig,n=e.totalRows;e.enabled&&Lt(n)||(this.rowsPerPage=this.gridApi.paginationGetPageSize(),this.calculateRowsCount(n),this.pagesInView=this.DISPLAY_LENGTH,this.navigatePage(t))},Object.defineProperty(t.prototype,"pagesInView",{set:function(t){this._pagesInView=t,this.pagesOnSides=Math.floor(this._pagesInView/2),this.pagesFitView=this._pagesInView+1>=this.totalPages,this.pageNumbersDisplay.pages=[]},enumerable:!0,configurable:!0}),t.prototype.calculateNavigationSize=function(){if(this.navigationElement){var t=this.navigationElement.nativeElement.parentElement.clientWidth;this.disableButtons=t<this.XS_DISPLAY_SIZE,t<this.SMALL_DISPLAY_SIZE?this._pagesInView!==this.MINI_DISPLAY_LENGTH&&(this.smallVersion=!0,this.pagesInView=this.MINI_DISPLAY_LENGTH):this._pagesInView!==this.DISPLAY_LENGTH&&(this.smallVersion=!1,this.pagesInView=this.DISPLAY_LENGTH),this.cdr.detectChanges()}},t.prototype.navigatePage=function(t){if(t>=0&&t<=this.totalPages-1){this.shouldShowLoader(t)&&this.gridService.setLoading(!0),this.gridApi.paginationGoToPage(t);var e=t+1;this.pageNumbersDisplay.currentPage=e,0!==this.pageNumbersDisplay.pages.length&&this.pagesFitView||(this.pageNumbersDisplay.pages=this.getPages(e)),this.setRowsDisplayRange(e),this.cdr.detectChanges()}},t.prototype.navigateFirstPage=function(){this.navigatePage(0)},t.prototype.navigateNextPage=function(){this.navigatePage(this.pageNumbersDisplay.currentPage)},t.prototype.navigatePrevPage=function(){var t=this.pageNumbersDisplay.currentPage-2;this.navigatePage(t)},t.prototype.showNextBatch=function(){var t=this.pageNumbersDisplay.pages[0]+this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.showPreviousBatch=function(){var t=this.pageNumbersDisplay.pages[0]-this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.trackByPage=function(t,e){return e},t.prototype.toggleGroupsState=function(){this.isExpanded?this.gridApi.collapseAll():this.gridApi.expandAll(),this.isExpanded=!this.isExpanded},t.prototype.autoFitGrid=function(t){this.gridService.fitGrid(t)},t.prototype.ngOnDestroy=function(){},t.prototype.setRowsDisplayRange=function(t){var e=t-1,n=1+e*this.rowsPerPage,o=(e+1)*this.rowsPerPage,i=this.rowCount>o?o:this.rowCount;this.rowsRange=this.rowCount>0?this.translate.transform("core.itemsRange",{range:this.decimalPipe.transform(n)+" - "+this.decimalPipe.transform(i),number:this.decimalPipe.transform(this.rowCount)}):this.translate.transform("core.numberOfItems",{number:0})},t.prototype.getPages=function(t){var e=[];this.pageNumbersDisplay.showLastPage=!this.pagesFitView&&t+this.pagesOnSides<this.totalPages,this.pageNumbersDisplay.showFirstEllipsis=!this.pagesFitView&&t-this.pagesOnSides>1;for(var n=this.getFirstPageNumber(t),o=this.pagesFitView?this.totalPages:this._pagesInView,i=0;i<o;i++)e.push(n+i);return this.smallVersion||e[o-1]+1!==this.totalPages||(e.push(this.totalPages),this.pageNumbersDisplay.showLastPage=!1),e},t.prototype.getFirstPageNumber=function(t){var e=t-this.pagesOnSides;return this.smallVersion&&t>1?t!==this.totalPages&&(e=t):this.pageNumbersDisplay.showFirstEllipsis?this.pageNumbersDisplay.showLastPage||(e=this.totalPages-(this._pagesInView-1)):e=1,e},t.prototype.shouldShowLoader=function(t){return this.isServerSidePagination&&Lt(this.gridApi.getCacheBlockState()[t])},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn},{type:wr},{type:Ua},{type:Xa},{type:s.DecimalPipe}]},vt([e.ViewChild("navigation",{static:!0}),Ct("design:type",e.ElementRef),Ct("design:paramtypes",[e.ElementRef])],t.prototype,"content",null),t=vt([e.Component({selector:"dato-grid-pagination-v2",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<div class="d-flex-row d-flex-auto d-flex-wrap container" [class.small]="smallVersion"\n [attr.data-pages-count]="totalPages"\n [attr.data-current-page]="pageNumbersDisplay.currentPage"\n [attr.data-page-size]="rowsPerPage"\n [attr.data-rows-count]="rowCount">\n <div *ngIf="totalPages > 1" #navigation\n class="navigation d-flex-row d-flex-0-0-auto align-center">\n\n \x3c!-- First Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="mr-4" data-auto-id="pagiantion-first-page"\n icon="chevron-left-double"\n datoType="secondary"\n datoSize="md"\n [disabled]="prevPageDisabled"\n (click)="navigateFirstPage()">\n </dato-icon-button>\n\n \x3c!-- Previous Page --\x3e\n <dato-icon-button icon="arrow-left" datoType="secondary" datoSize="md"\n [disabled]="prevPageDisabled" data-auto-id="pagiantion-previous-page"\n (click)="navigatePrevPage()">\n </dato-icon-button>\n\n\n <div class="d-flex mx-5 align-center number-container">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm" data-auto-id="pagiantion-previous-batch"\n *ngIf="pageNumbersDisplay.showFirstEllipsis && !smallVersion"\n (click)="showPreviousBatch()">...\n </dato-link>\n <dato-link class="page-number mx-5" [datoType]="page === pageNumbersDisplay.currentPage ? \'primary\' : \'secondary\'" datoSize="sm"\n *ngFor="let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;" [attr.data-auto-id]="\'pagiantion-page-\' + i"\n (click)="navigatePage(page - 1)">\n {{page}}\n </dato-link>\n\n <div class="d-flex" *ngIf="pageNumbersDisplay.showLastPage && !smallVersion">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm" data-auto-id="pagiantion-next-batch"\n (click)="showNextBatch()">...</dato-link>\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n [attr.data-auto-id]="\'pagiantion-page-\' + totalPages"\n (click)="navigatePage(totalPages - 1)">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n \x3c!-- Next Page --\x3e\n <dato-icon-button icon="arrow-right" datoType="secondary" datoSize="md"\n (click)="navigateNextPage()" data-auto-id="pagiantion-next-page"\n [disabled]="nextPageDisabled">\n </dato-icon-button>\n\n \x3c!-- Last Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="ml-4" icon="chevron-right-double"\n datoType="secondary" datoSize="md" data-auto-id="pagiantion-last-page"\n [disabled]="nextPageDisabled"\n (click)="navigatePage(totalPages - 1)">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf="totalPages > 1 && !smallVersion"\n class="separator mx-10 my-auto primary-100-background-color">\n </div>\n\n <div class="total d-flex-0-0-auto d-flex-row align-center">\n <span class="dato-note primary-300-color">{{rowsRange}}</span>\n </div>\n\n <div *ngIf="showBottomControls" class="grid-controls d-flex d-flex-1 justify-end">\n <dato-icon-button *ngIf="hasRowGroupColumns" [icon]="isExpanded ? \'collapse\' : \'expand\'" datoType="secondary"\n datoSize="md" (click)="toggleGroupsState()" data-auto-id="pagination-expand-collapse"\n [datoTooltipV2]="isExpanded ? \'core.collapse-rows\' : \'core.expand-rows\'">\n </dato-icon-button>\n\n <dato-icon-button class="mx-4" icon="maximize-horizontal" datoType="secondary" datoSize="md"\n (click)="autoFitGrid(\'content\')" [datoTooltipV2]="\'core.fit-to-text\'"\n data-auto-id="pagination-fit-to-content">\n </dato-icon-button>\n\n <dato-icon-button icon="minimize-horizontal" datoType="secondary" datoSize="md"\n (click)="autoFitGrid(\'container\')" [datoTooltipV2]="\'core.revert-to-default-size\'"\n data-auto-id="pagination-fit-to-container">\n </dato-icon-button>\n </div>\n</div>\n',providers:[s.DecimalPipe],styles:[":host{padding:12px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:25px}:host .container{height:25px}:host .navigation .page-number{transition:color .3s ease-in-out}:host .navigation .page-number:first-of-type{margin-left:7px}:host .navigation .page-number:last-of-type{margin-right:7px}:host .separator{width:1px;height:25px}:host .container.small .navigation,:host .container.small .total{margin-top:8px;margin-left:auto;margin-right:auto}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,Mn,wr,Ua,Xa,s.DecimalPipe])],t)}(),rs=function(){function t(){this.widthToHideLabel=1439,this.widthForShortLabel=1539}return Object.defineProperty(t.prototype,"menu",{get:function(){return this.getMenu?this.getMenu():null},enumerable:!0,configurable:!0}),vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"label",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"shortLabel",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"enableV2_1",void 0),vt([e.Input(),Ct("design:type",Function)],t.prototype,"getMenu",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"isLast",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"widthToHideLabel",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"widthForShortLabel",void 0),t=vt([e.Component({selector:"dato-grid-toolbar-button",template:'<div *ngIf="menu else button" [datoMenuTriggerFor]="menu">\n <ng-container [ngTemplateOutlet]="button"></ng-container>\n</div>\n\n<ng-template #button>\n <dato-link datoType="secondary" [class.mr-16]="!isLast" [datoTooltip]="tooltip" datoTooltipPosition="bottom" [disabled]="disabled"\n [datoTooltipDisabled]="!tooltip" [class.full-button]="enableV2_1" [ngClass]="enableV2_1 ? \'full-button-\' + widthToHideLabel + \'px\' : \'\'">\n <dato-icon [icon]="icon" height="18px" width="18px"></dato-icon>\n <ng-container *ngIf="!shortLabel else labelAndShortLabel">\n {{ label | translate }}\n </ng-container>\n <ng-template #labelAndShortLabel>\n <span [class]="\'full-label-\' + widthForShortLabel + \'px\'">{{ label | translate }}</span>\n <span [class]="\'short-label short-label-\' + widthForShortLabel + \'px\'">{{ shortLabel | translate }}</span>\n </ng-template>\n </dato-link>\n\n <dato-icon *ngIf="enableV2_1" [icon]="icon" datoSize="sm" class="mr-16 pointer icon-button" [ngClass]="\'icon-button-\' + widthToHideLabel + \'px\'"\n [datoTooltip]="tooltip || label" datoTooltipPosition="bottom" [datoTooltipDisabled]="!tooltip && !label">\n </dato-icon>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),as=function(){function o(t,e,o,i,r,a){this.gridController=t,this.cdr=e,this.translate=o,this.popover=i,this.gridQuery=r,this.gridService=a,this.MAX_VISIBLE_ROW_ACTIONS=5,this.MAX_VISIBLE_GRID_ACTIONS=2,this.destroy$=new n.Subject,this._maxRowActions=this.MAX_VISIBLE_ROW_ACTIONS,this.displayExport=!0,this.rowActions={mainList:[],moreMenu:[]},this.gridActions={mainList:[],moreMenu:[]},this.searchPlaceholder=this.translate.transform("core.search"),this.rowActionsShortLabelThreshold=1539,this.displayCustomGridActionsSeparator=!0,this.openMenus={group:!1,settings:!1},this.rowGroupsCollapsed=!1,this.groupsAllowed=!this.hideGrouping,this.isSelectedRow=!1,this.isTreeMode=this.gridService.treeData,this.totalRowsCount=0,this.selectedRowsCount=0,this.allPageRowsSelected=!1,this.widthToHideActionsLabels=1439}return Object.defineProperty(o.prototype,"maxRowActions",{set:function(t){this.enableV2_1?(this._maxRowActions=Math.min(t,this.MAX_VISIBLE_ROW_ACTIONS),t>this.MAX_VISIBLE_ROW_ACTIONS&&e.isDevMode()&&console.warn("DatoGrid V2.1 - maxRowActions cannot be over "+this.MAX_VISIBLE_ROW_ACTIONS)):this._maxRowActions=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableV2_1",{get:function(){var t=this.gridController.gridOptions;return!!t&&t.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableSearch",{get:function(){var t=this.gridController.gridOptions;return!!t&&t.enableSearch},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableBackground",{get:function(){var t=this.gridController.gridOptions;return!!t&&t.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isRowActionsVisible",{get:function(){return!this.enableV2_1||this.enableV2_1&&this.isSelectedRow},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasRowActions",{get:function(){return ye(this.rowActions.mainList)>0||ye(this.rowActions.moreMenu)>0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hiddenColumns",{get:function(){return"("+this.gridQuery.getAllDisplayedColumns().length+"/"+this.gridQuery.getAllColumns().length+")"},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasActiveMoreActions",{get:function(){return this.rowActions.moreMenu.some((function(t){return t.visible}))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"api",{get:function(){return this.gridController.gridQuery.api},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this,e=this.gridController.gridQuery.waitForGrid((function(){return n.merge(t.gridQuery.gridRef.cellValueChanged,t.gridQuery.gridRef.rowDataUpdated,t.gridQuery.rowActionVisibilityChanged$).pipe(r.debounceTime(100),r.takeUntil(t.destroy$))})),o=this.gridQuery.gridReady$.pipe(r.take(1));o.pipe(r.takeUntil(this.destroy$)).subscribe((function(){t.groupsAllowed=!t.hideGrouping&&!t.gridQuery.getValue().serverSidePagination.enabled})),this.initGridActions();var i=this.gridQuery.selectedRowsChange$,a=this.gridQuery.selectIsSelectAllRowsEnabled();n.merge(e,o,i,a).pipe(r.filter((function(){return!!t.api})),r.takeUntil(this.destroy$)).subscribe((function(){t.resolveVisibleActions(),t.cdr.detectChanges()})),this.registerGroupListeners(),this.subscribeRowsSelectionData(),this.subscribeReloadGridActions()},o.prototype.onActionClick=function(e){if(Et(e.onClick)){var n=this.gridController.gridQuery.getSelectedRowsCount();if(this.gridService._logEvent("Grids - Table Action",{action:e.key,numOfItems:n,from:"Toolbar"}),this.gridQuery.isServerSelectAllRowsEnabled){var o=this.gridService.getFilterForServerActionOnSelectAll();e.onClick(null,!0,o)}else{var i=this.gridController.gridQuery.getSelectedRowNodes();e.onClick(i)}}else e.actionType===t.GridActionType.EXPORT&&this.executeTableAction("Export")},o.prototype.resolveVisibleActions=function(){var t=this,e=this.gridQuery.getSelectedRowNodes();this.isSelectedRow=e.length>0||this.gridQuery.isServerSelectAllRowsEnabled;var n=Mr(this.gridController.rowActions,this.gridQuery.getSelectedRowsCount(),e,this.gridQuery.isServerSelectAllRowsEnabled).filter((function(e){return!t.isRowActionHidden(e)}));this.rowActions={mainList:n.slice(0,this._maxRowActions),moreMenu:n.slice(this._maxRowActions,n.length)},this.initWidthToHideActionsLabels()},o.prototype.initWidthToHideActionsLabels=function(){var t=this.rowActions.mainList.length+(this.rowActions.moreMenu.length>0?1:0)+(this.gridActions.moreMenu.length>0?1:0)+(this.createAction?1:0),e=[1239,1339,1439,1539];this.widthToHideActionsLabels=e[Math.min(Math.max(t-5,0),e.length-1)]},o.prototype.initGridActions=function(){var t=this.gridController.gridActions;this.initCreateAction(t),this.initExportAction(t);var e=this.MAX_VISIBLE_GRID_ACTIONS-(this.displayExport?1:0);ye(t)===e+1&&e++,this.gridActions={mainList:t.slice(0,e),moreMenu:t.slice(e,t.length)}},o.prototype.initCreateAction=function(e){var n=e.findIndex((function(e){return e.actionType===t.GridActionType.CREATE}));this.createAction=n>=0?e.splice(n,1)[0]:null,this.createAction&&(this.createAction.label=this.createAction.label||"core.create-new",this.createAction.key=this.createAction.key||"create-new")},o.prototype.initExportAction=function(e){var n=this,o=e.find((function(e){return e.actionType===t.GridActionType.EXPORT}));if(o){var i=o.onClick,r=o.icon,a=o.label,s=o.tooltip,l=o.key;o.onClick=i||function(){return n.executeTableAction("Export")},o.icon=r||"export",o.label=a||"core.export-table",o.tooltip=s||"core.export-table",o.key=l||"export"}},o.prototype.executeTableAction=function(t){switch(this.gridService._logEvent("Grids - General Table Action",{action:t}),t){case"Autofit to Content":this.gridService.fitGrid("content");break;case"Autofit to Page":this.gridService.fitGrid("container");break;case"Collapse Expand":this.toggleExpanded();break;case"Export":this.exportTable();break;case"Group from Settings":case"Group from Toolbar":this.openGroupMenu();break;case"Reset Filters":this.resetFilters();break;case"Reset Settings":this.resetSettings();break;case"Show Hide Column":this.openColumnMenu()}},o.prototype.toggleExpanded=function(){this.rowGroupsCollapsed?this.api.grid.expandAll():this.api.grid.collapseAll(),this.rowGroupsCollapsed=!this.rowGroupsCollapsed},Object.defineProperty(o.prototype,"hasGroups",{get:function(){return this.api.columns.getRowGroupColumns().length>0},enumerable:!0,configurable:!0}),o.prototype.exportTable=function(){var t=this.gridController.gridOptions,e=t.gridName,n=t.exportGrid;if(Et(n))n(mt(mt({},this.api),this.gridQuery.getValue().settings));else{var o=U.format(new Date,"LLL d, yyyy");this.api.grid.exportDataAsExcel({fileName:e+" - "+o,processCellCallback:function(t){var e=t.column,n=t.value,o=e.getColDef().valueFormatter;return Et(o)?o({value:n}):n}})}},o.prototype.resetSettings=function(){this.gridController.gridService.resetTableSettings()},o.prototype.openColumnMenu=function(){this.popover.open(ts,this.settingsTrigger.nativeElement,{width:220,className:"dato-grid-columns-display-menu",popper:{placement:"bottom-end"},data:{api:this.api,gridService:this.gridService,gridQuery:this.gridQuery}})},o.prototype.resetFilters=function(){this.gridController.gridService.clearAllFilters()},o.prototype.openGroupMenu=function(){var t=this;this.openMenus.group=!0;var e=this.hasGroups?0:200,n=this.gridQuery.gridRef.columnRowGroupChanged.pipe(r.take(1),r.takeUntil(this.destroy$)).subscribe((function(){t.rowGroupsCollapsed=!1,t.cdr.detectChanges()}));setTimeout((function(){t.popover.open(es,t.groupTrigger.nativeElement,{height:206,width:250,className:"dato-grid-groups-menu",popper:{placement:"bottom-end"},data:{api:t.api,gridService:t.gridService}}).pipe(r.takeUntil(t.destroy$)).subscribe((function(){n.unsubscribe(),t.openMenus.group=!1,t.cdr.detectChanges()}))}),e)},o.prototype.isActionDisabled=function(t){return!t.visible},o.prototype.isRowActionHidden=function(t){return!t.visible&&this.enableV2_1},o.prototype.clearSelectedRows=function(){this.gridService.deselectAllRows()},o.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},o.prototype.getCollapseState=function(t){var e=t.node,n=t.api,o=!0;return 0===e.rowGroupIndex&&n.forEachNodeAfterFilterAndSort((function(t){var e=t.expanded;0===t.rowGroupIndex&&e&&(o=!1)})),o},o.prototype.registerGroupListeners=function(){var t=this;this.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.columnRowGroupChanged})).pipe(r.filter((function(){return!t.openMenus.group})),r.takeUntil(this.destroy$)).subscribe((function(){t.rowGroupsCollapsed=!1,t.cdr.detectChanges()})),this.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.rowGroupOpened})).pipe(r.takeUntil(this.destroy$)).subscribe((function(e){var n=t.getCollapseState(e);n!==t.rowGroupsCollapsed&&(t.rowGroupsCollapsed=n,t.cdr.detectChanges())}))},o.prototype.subscribeRowsSelectionData=function(){var t=this;this.gridQuery.rowsSelectionData$.pipe(r.takeUntil(this.destroy$)).subscribe((function(e){var n=e.totalRowsCount,o=e.selectedRowsCount,i=e.selectedPageRowsCount,r=e.isAllPageRowsSelected;t.totalRowsCount=n,t.selectedRowsCount=o;var a=t.gridQuery.getGridOptions().enableAllPagesSelection;t.allPageRowsSelected=a&&r&&o===i&&o<n,t.cdr.detectChanges()}))},o.prototype.subscribeReloadGridActions=function(){var t=this;this.gridService.onReloadGridActions().subscribe((function(){t.initGridActions()}))},o.prototype.selectAllPages=function(){this.gridQuery.isServerSide?this.gridService.setServerSidePagination({selectAllRowsEnabled:!0,excludedFromSelectAll:[]}):this.gridService.api.grid.selectAllFiltered()},o.ctorParameters=function(){return[{type:Xa},{type:e.ChangeDetectorRef},{type:Mn},{type:da},{type:wr},{type:Ua}]},vt([e.ViewChild("groupTrigger",{read:e.ElementRef,static:!1}),Ct("design:type",e.ElementRef)],o.prototype,"groupTrigger",void 0),vt([e.ViewChild("settingsTrigger",{read:e.ElementRef,static:!1}),Ct("design:type",e.ElementRef)],o.prototype,"settingsTrigger",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"displayExport",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],o.prototype,"maxRowActions",null),vt([e.Input(),Ct("design:type",Boolean)],o.prototype,"hideGrouping",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"searchPlaceholder",void 0),vt([e.Input(),Ct("design:type",Number)],o.prototype,"rowActionsShortLabelThreshold",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"displayCustomGridActionsSeparator",void 0),o=vt([e.Component({selector:"dato-grid-toolbar-v2",template:'<section *ngIf="gridController.gridQuery.gridReady$ | async" class="d-flex mb-20 justify-between items-center main-container" [class.mx-30]="enableBackground">\n\n <section [ngClass]="{ \'d-flex items-center right-section\': enableV2_1 }">\n \x3c!-- Dynamic content for the left area --\x3e\n <div data-auto-id="grid-toolbar-dynamic-left">\n <ng-content select="[toolbarLeftArea]"></ng-content>\n </div>\n\n <div class="d-flex items-center">\n <dato-grid-search-bar *ngIf="enableSearch" [searchPlaceholder]="searchPlaceholder"></dato-grid-search-bar>\n <ng-container *ngIf="enableV2_1 && selectedRowsCount > 0">\n <div class="d-flex items-center">\n <div class="chip align-center d-flex dato-note px-9 nowrap ml-16">\n <span data-auto-id="grid-selected-items-text">{{ (allPageRowsSelected ? \'core.all-items-in-page-selected\' : \'core.selected-items\') | translate:{ itemsCount: selectedRowsCount } }}</span>\n <dato-icon datoType="primary" datoIcon="close" datoSize="md" class="ml-6 pointer" (click)="clearSelectedRows()"\n data-auto-id="grid-clear-selected-rows"></dato-icon>\n </div>\n <dato-link *ngIf="allPageRowsSelected" (click)="selectAllPages()" datoSize="sm" class="ml-10"\n data-auto-id="grid-select-all-pages">\n <span>{{\'core.select-all-items\' | translate:{ itemsCount: totalRowsCount } }}</span>\n </dato-link>\n </div>\n <div *ngIf="hasRowActions" class="separator"></div>\n </ng-container>\n </div>\n\n \x3c!-- Row Actions--\x3e\n <div class="d-flex items-center" *ngIf="isRowActionsVisible">\n\n <ng-container *ngFor="let rowAction of rowActions.mainList; index as i; last as isLast">\n\n <div *ngIf="!isRowActionHidden(rowAction)"\n [attr.data-auto-id]="\'grid-toolbar-action-\' + rowAction.key"\n [attr.data-action-index]="\'grid-toolbar-action-\' + i"\n [class.disabled-action]="isActionDisabled(rowAction)">\n <ng-container [ngTemplateOutlet]="rowAction.template || defaultButton"\n [ngTemplateOutletContext]="{disabled: isActionDisabled(rowAction)}"></ng-container>\n </div>\n\n <ng-template #defaultButton>\n <div (click)="onActionClick(rowAction)">\n <dato-grid-toolbar-button [icon]="rowAction.icon"\n [disabled]="isActionDisabled(rowAction)"\n [label]="rowAction.label"\n [shortLabel]="rowAction.shortLabel"\n [tooltip]="rowAction.tooltip"\n [getMenu]="rowAction.getMenu"\n [enableV2_1]="enableV2_1"\n [isLast]="isLast"\n [widthToHideLabel]="widthToHideActionsLabels">\n </dato-grid-toolbar-button>\n </div>\n </ng-template>\n </ng-container>\n\n <div *ngIf="rowActions.moreMenu.length > 0" class="separator"></div>\n <dato-grid-toolbar-more-menu [actions]="rowActions.moreMenu" (actionClick)="onActionClick($event)" [isRowActions]="true">\n </dato-grid-toolbar-more-menu>\n </div>\n\n </section>\n\n\n \x3c!-- General Actions --\x3e\n <div class="d-flex items-center">\n \x3c!-- Create action --\x3e\n <ng-container *ngIf="createAction">\n <dato-button datoSize="sm" class="pointer primary-300-color" (click)="onActionClick(createAction)"\n [datoTooltip]="createAction.tooltip" [attr.data-auto-id]="\'grid-toolbar-action-\' + createAction.key">\n <dato-icon *ngIf="createAction.icon" [icon]="createAction.icon" class="mr-5"></dato-icon>\n {{ createAction.label | translate }}\n </dato-button>\n <div class="separator"></div>\n </ng-container>\n\n \x3c!-- Dynamic content for the right area --\x3e\n <div #customActions data-auto-id="grid-toolbar-dynamic-right">\n <ng-content select="[toolbarRightArea]"></ng-content>\n </div>\n <div *ngIf="customActions.childNodes.length && displayCustomGridActionsSeparator" class="separator"></div>\n\n \x3c!-- Group buttons --\x3e\n <div *ngIf="groupsAllowed" class="d-flex grouping-section opacity-0 invisible" [class.open]="openMenus.group || hasGroups">\n <dato-icon-button [class.active]="openMenus.group" (click)="executeTableAction(\'Group from Toolbar\')"\n data-auto-id="grid-toolbar-open-groups"\n removeIconPadding datoSize="md" datoType="none" icon="group" iconWidth="17px"\n datoTooltip="core.row-grouping" #groupTrigger\n class="mr-10 pointer"></dato-icon-button>\n <dato-icon-button data-auto-id="grid-toolbar-toggle-expand" datoSize="md" datoType="none"\n (click)="executeTableAction(\'Collapse Expand\')"\n [icon]="rowGroupsCollapsed ? \'expand\' : \'collapse\'"\n [disabled]="!hasGroups"\n [datoTooltip]="\'core.\' + (rowGroupsCollapsed ? \'expand\' : \'collapse\') + \'-rows\'"\n class="pointer"></dato-icon-button>\n <div class="separator"></div>\n </div>\n\n \x3c!-- Grid Actions --\x3e\n <ng-container *ngFor="let gridAction of gridActions.mainList; index as i">\n <div *ngIf="gridAction.getMenu else button" [datoMenuTriggerFor]="gridAction.getMenu()">\n <ng-container [ngTemplateOutlet]="button"></ng-container>\n </div>\n <ng-template #button>\n <dato-icon datoSize="sm" (click)="onActionClick(gridAction)"\n [attr.data-auto-id]="\'grid-toolbar-action-\' + gridAction.key"\n [attr.data-action-index]="\'grid-toolbar-general-action-\' + i"\n [icon]="gridAction.icon" class="pointer primary-300-color"\n [class.mr-16]="!gridAction.separator"\n [datoTooltip]="gridAction.tooltip || gridAction.label">\n </dato-icon>\n </ng-template>\n <div *ngIf="gridAction.separator" class="separator"></div>\n </ng-container>\n\n \x3c!-- Export --\x3e\n <dato-icon data-auto-id="grid-toolbar-export" datoSize="sm"\n (click)="executeTableAction(\'Export\')" *ngIf="displayExport && !isTreeMode"\n icon="export" class="pointer mr-16 primary-300-color" datoTooltip="core.export-table"></dato-icon>\n\n \x3c!-- Settings --\x3e\n <dato-icon [class.active]="openMenus.settings" (click)="openMenus.settings = true"\n data-auto-id="grid-toolbar-settings" datoSize="sm"\n icon="account" class="pointer primary-300-color" datoTooltip="core.table-settings"\n #settingsTrigger\n [datoMenuTriggerFor]="settingsMenu"></dato-icon>\n\n \x3c!-- More actions menu --\x3e\n <ng-container *ngIf="gridActions.moreMenu.length > 0">\n <div class="separator"></div>\n <dato-grid-toolbar-more-menu [actions]="gridActions.moreMenu" (actionClick)="onActionClick($event)" [isRowActions]="false">\n </dato-grid-toolbar-more-menu>\n </ng-container>\n\n <dato-menu #settingsMenu="datoMenu" menuClass="grid-settings-menu" placement="bottom-end"\n (menuClosed)="openMenus.settings = false">\n <ng-template datoMenuContent>\n <button data-auto-id="grid-toolbar-settings-autofit-page" datoMenuItem\n (click)="executeTableAction(\'Autofit to Page\')">\n <dato-icon datoSize="sm" icon="maximize-horizontal" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.autofitPage\' | translate }}</button>\n <button data-auto-id="grid-toolbar-settings-autofit-content" datoMenuItem\n (click)="executeTableAction(\'Autofit to Content\')">\n <dato-icon datoSize="sm" icon="minimize-horizontal" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.autofitContent\' | translate }}</button>\n <ng-container *ngIf="groupsAllowed">\n <button data-auto-id="grid-toolbar-settings-group" datoMenuItem (click)="executeTableAction(\'Group from Settings\')">\n <dato-icon datoSize="sm" icon="group" class="mr-4 primary-300-color"></dato-icon>\n {{ \'core.group\' | translate }}\n </button>\n </ng-container>\n <button data-auto-id="grid-toolbar-settings-toggle-columns" datoMenuItem (click)="executeTableAction(\'Show Hide Column\')">\n <dato-icon datoSize="sm" icon="hide" class="mr-8 primary-300-color"></dato-icon>\n <span>{{ \'core.hideShowColumns\' | translate }}<span\n class="dato-simple-italic ml-5 primary-200-color">{{hiddenColumns}}</span></span>\n </button>\n <button data-auto-id="grid-toolbar-settings-reset-settings" datoMenuItem\n (click)="executeTableAction(\'Reset Settings\')">\n <dato-icon datoSize="sm" icon="reset-table" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.resetTableSettings\' | translate }}\n </button>\n <button data-auto-id="grid-toolbar-settings-reset-filters" datoMenuItem\n (click)="executeTableAction(\'Reset Filters\')">\n <dato-icon datoSize="sm" icon="reset-filters" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.resetAllFilters\' | translate }}\n </button>\n <button data-auto-id="grid-toolbar-export" datoMenuItem\n (click)="executeTableAction(\'Export\')" *ngIf="this.displayExport && isTreeMode">\n <dato-icon datoSize="sm"\n icon="export" class="pointer mr-5 primary-300-color" datoTooltip="core.export-table"></dato-icon>\n {{ \'core.export-table\' | translate }}\n </button>\n </ng-template>\n </dato-menu>\n </div>\n</section>\n\n\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".grouping-section{transition:visibility .2s ease-in-out,width .2s ease-in-out,opacity .2s ease-in-out;width:0}.grouping-section.open{width:75px;visibility:visible;opacity:1}:host .main-container{min-height:24px}:host .right-section{margin-right:50px}:host .separator{width:1px;height:24px;margin:0 16px}.disabled-action{pointer-events:none}"]}),Ct("design:paramtypes",[Xa,e.ChangeDetectorRef,Mn,da,wr,Ua])],o)}(),ss=function(){function n(t){this.popover=t}return n.prototype.close=function(){this.popover.close({type:t.PopoverTrigger.Close,data:this.result})},n.ctorParameters=function(){return[{type:da}]},vt([e.Input("datoPopoverClose"),Ct("design:type",Object)],n.prototype,"result",void 0),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"close",null),n=vt([e.Directive({selector:"[datoPopoverClose]"}),Ct("design:paramtypes",[da])],n)}(),ls=function(){function t(t,n){this.popover=t,this.host=n,this.popoverClose=new e.EventEmitter,this.config={},this.trigger="click"}return Object.defineProperty(t.prototype,"datoPopoverContent",{set:function(t){this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverConfig",{set:function(t){this.config=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverClassName",{set:function(t){this.className=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverPlacement",{set:function(t){this.placement=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverTrigger",{set:function(t){this.trigger=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverWidth",{set:function(t){this.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverHeight",{set:function(t){this.height=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.host.nativeElement,this.trigger).pipe(i.untilDestroyed(this)).subscribe((function(){var e=ea({className:t.className,width:t.width,height:t.height,popper:{placement:t.placement||"bottom"}},t.config);t.popover.open(t.content,t.host.nativeElement,e).subscribe((function(){t.popoverClose.emit(!0)}))}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:da},{type:e.ElementRef}]},vt([e.Output(),Ct("design:type",Object)],t.prototype,"popoverClose",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverContent",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverConfig",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoPopoverClassName",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverPlacement",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoPopoverTrigger",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverWidth",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverHeight",null),t=vt([e.Directive({selector:"[datoPopoverContent]"}),Ct("design:paramtypes",[da,e.ElementRef])],t)}(),cs=[la,ss,ls],ps=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[cs],exports:[cs],entryComponents:[la]})],t)}(),ds=function(){function t(t,e){this.template=t,this.appRef=e}return t.prototype.getMenuView=function(){var t,e;this.viewRef=this.template.createEmbeddedView({}),this.container=Qt("div"),Ut(this.container,"dato-menu");try{for(var n=wt(this.viewRef.rootNodes),o=n.next();!o.done;o=n.next()){var i=o.value;this.container.appendChild(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return this.appRef.attachView(this.viewRef),document.body.appendChild(this.container),Vt(pe(Gt(".dato-menu")),"zIndex",Nn()),this.container},t.prototype.destroyView=function(){this.container&&(this.appRef.detachView(this.viewRef),document.body.removeChild(this.container),this.container=null)},t.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.ApplicationRef}]},t=vt([e.Directive({selector:"[datoMenuContent]"}),Ct("design:paramtypes",[e.TemplateRef,e.ApplicationRef])],t)}(),us=function(){function o(o){this.popper=o,this.placement="bottom-start",this.theme=t.ColorPalette.Light,this.menuClosed=new e.EventEmitter,this.isOpen=!1,this.items=[],this.itemChanges=new n.Subject}return Object.defineProperty(o.prototype,"isChildMenuOpen",{get:function(){return this.child&&this.child.isOpen},enumerable:!0,configurable:!0}),o.prototype.open=function(e){var n=this;if(!this.isOpen){var o=this.content.getMenuView();this.menuClass&&Ut(o,this.menuClass),this.theme===t.ColorPalette.Dark&&Ut(o,t.ColorPalette.Dark),this.popper.create(e,o,{placement:this.placement}).subscribe((function(t){n.popperInstance=t,n.isOpen=!0}))}},o.prototype.close=function(){this.child&&this.child.close(),this.content.destroyView(),this.popperInstance.destroy(),this.isOpen=!1,this.child=null,this.menuClosed.emit()},o.prototype._itemsHovered=function(){return this.itemChanges.pipe(r.startWith(this.items),r.switchMap((function(t){return n.merge.apply(void 0,xt(t.map((function(t){return t._hover$}))))})))},o.prototype.addItem=function(t){-1===this.items.indexOf(t)&&(this.items.push(t),this.itemChanges.next(this.items))},o.prototype.removeItem=function(t){this.items=this.items.filter((function(e){return e!==t})),this.itemChanges.next(this.items)},o.prototype.setChild=function(t){this.child=t},o.prototype.ngOnDestroy=function(){},o.ctorParameters=function(){return[{type:Pn}]},vt([e.ContentChild(ds),Ct("design:type",ds)],o.prototype,"content",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"menuClass",void 0),vt([e.Input(),Ct("design:type",String)],o.prototype,"theme",void 0),vt([e.Output(),Ct("design:type",Object)],o.prototype,"menuClosed",void 0),o=vt([e.Component({selector:"dato-menu",template:"\n <ng-content></ng-content>\n ",exportAs:"datoMenu",changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[Pn])],o)}(),hs=function(){function t(t,e,o){this.host=t,this.zone=e,this.parentMenu=o,this.originClosed=new n.Subject,this.isRoot=null===o}return Object.defineProperty(t.prototype,"childMenu",{get:function(){return this._childMenu},set:function(t){this._childMenu=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.isRoot?n.fromEvent(this.element,"click").pipe(i.untilDestroyed(this)).subscribe((function(){t.childMenu&&(t.childMenu.isOpen?t.closeMenu():t.openMenu())})):this.childMenu&&this.element.setAttribute("data-menu-trigger","true")},t.prototype.openMenu=function(){var t=this;this.childMenu.open(this.element),n.fromEvent(document,"click",{capture:!0}).pipe(r.takeUntil(this.originClosed),r.filter((function(e){var n=t.element.contains(e.target),o=e.target.getAttribute("data-menu-trigger");return!n&&!o})),r.take(1)).subscribe((function(){setTimeout((function(){return t.closeMenu()}))}))},t.prototype.closeMenu=function(){this.childMenu.close(),this.originClosed.next()},t.prototype.ngAfterViewInit=function(){this.childMenu&&this.subscribeChildMenuItemsHovered()},t.prototype.subscribeChildMenuItemsHovered=function(){var t=this;this.childMenu._itemsHovered().pipe(i.untilDestroyed(this)).subscribe((function(e){e.childMenu?(t.childMenu.child&&e.childMenu!==t.childMenu.child&&t.childMenu.child.close(),e.childMenu.isOpen||(t.childMenu.setChild(e.childMenu),e.openChildMenu())):t.childMenu.isChildMenuOpen&&t.childMenu.child.close()}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:us,decorators:[{type:e.Optional}]}]},vt([e.Input("datoMenuTriggerFor"),Ct("design:type",us),Ct("design:paramtypes",[us])],t.prototype,"childMenu",null),t=vt([e.Directive({selector:"[datoMenuTriggerFor]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,e.NgZone,us])],t)}(),gs=function(){function t(t,e,o){this.host=t,this.menu=e,this.menuTrigger=o,this._hover$=n.fromEvent(this.element,"mouseenter").pipe(r.mapTo(this)),this.disabled=!1,this.menu.addItem(this)}return Object.defineProperty(t.prototype,"childMenu",{get:function(){return this.menuTrigger&&this.menuTrigger.childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.openChildMenu=function(){return this.menuTrigger&&this.menuTrigger.childMenu.open(this.menuTrigger.element)},t.prototype.ngOnDestroy=function(){this.menu.removeItem(this)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:us},{type:hs,decorators:[{type:e.Optional}]}]},vt([e.Input(),e.HostBinding("class.dato-menu-item--disabled"),Ct("design:type",Object)],t.prototype,"disabled",void 0),t=vt([e.Directive({selector:"[datoMenuItem]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,us,hs])],t)}(),fs=[us,gs,hs,ds],ms=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[fs],exports:[fs],entryComponents:[us]})],t)}(),ys={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return vs})),multi:!0},vs=function(n){function o(t){var e=n.call(this)||this;return e.cdr=t,e.expanded=!1,e.disabled=!1,e}return ft(o,n),Object.defineProperty(o.prototype,"datoTogglerValue",{set:function(t){this.setOperators(t)},enumerable:!0,configurable:!0}),o.prototype.setDisabledState=function(t){this.disabled=t,this.cdr.markForCheck()},o.prototype.writeValue=function(t){this.setOperators(t)},o.prototype.toggle=function(){this.setOperators(),this.onChange(this.active)},o.prototype.setOperators=function(e){this.active=e||this.getOppositeOperator(this.active);var n=this.getOppositeOperator(this.active);this.op1=t.OperatorTypes[this.active],this.op2=t.OperatorTypes[n],this.cdr.markForCheck()},o.prototype.getOppositeOperator=function(e){return e===t.OperatorTypes.AND?t.OperatorTypes.OR:t.OperatorTypes.AND},o.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),e.HostBinding("class.show-open"),Ct("design:type",Object)],o.prototype,"expanded",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],o.prototype,"datoTogglerValue",null),o=vt([e.Component({selector:"dato-operator-toggler",template:'<div class="container relative pointer" (click.stop)="toggle()" [ngClass]="op1" *ngIf="!disabled; else disabledTpl">\n <span class="main-option dato-note-bold absolute">{{op1}}</span>\n <span class="other-option dato-note-bold absolute">{{op2}}</span>\n</div>\n\n<ng-template #disabledTpl>\n <div class="disabled dato-note-bold primary-300-color" [ngClass]="active">{{active}}</div>\n</ng-template>\n',encapsulation:e.ViewEncapsulation.None,providers:[ys],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-operator-toggler{height:16px;width:67px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:10px}dato-operator-toggler .container{height:16px;width:67px}dato-operator-toggler .container span{border-radius:10px;transform:translateX(0);transition:transform .2s ease-in-out,color .2s ease-in-out,background-color .2s ease-in-out,opacity .2s ease-in-out,width .2s ease-in-out;background:0 0}dato-operator-toggler .container .other-option{padding:0 7px;opacity:0}dato-operator-toggler .container .main-option{transform:translateX(10px);z-index:1}dato-operator-toggler .container.AND .other-option{width:31px}dato-operator-toggler .container.AND .main-option{padding:0 7px}dato-operator-toggler .container.OR .other-option{width:40px}dato-operator-toggler .container.OR .main-option{padding:0 10px}dato-operator-toggler.show-open .container .main-option,dato-operator-toggler.show-open .container .other-option,dato-operator-toggler:hover .container .main-option,dato-operator-toggler:hover .container .other-option{transform:translateX(0)}dato-operator-toggler.show-open .container.AND .other-option,dato-operator-toggler:hover .container.AND .other-option{text-align:right}dato-operator-toggler.show-open .container.OR .main-option,dato-operator-toggler:hover .container.OR .main-option{transform:translateX(36px)}dato-operator-toggler.show-open .container.OR .other-option,dato-operator-toggler:hover .container.OR .other-option{text-align:left}dato-operator-toggler.show-open .container .other-option,dato-operator-toggler:hover .container .other-option{opacity:1;width:67px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],o)}(Dt),bs=[vs],Cs=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Io],declarations:[bs],exports:[bs],entryComponents:[bs]})],t)}(),ws=function(){function t(t,e){this.cdr=t,this.host=e,this._text=null,this.hide=!0}return Object.defineProperty(t.prototype,"tpl",{set:function(t){t&&(this._tpl=t,this.cdr.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controlError",{set:function(t){this.context={$implicit:t},this.cdr.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"customClass",{set:function(t){!1===this.element.classList.contains(t)&&this.host.nativeElement.classList.add(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{set:function(t){t!==this._text&&(this._text=t,this.hide=!t,this.cdr.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},t=vt([e.Component({selector:"dato-control-error",template:'<label class="dato-control-error" [class.force-hide]="hide" *ngIf="!_tpl">{{_text | translate}}</label>\n<ng-template *ngTemplateOutlet="_tpl; context: context"></ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n }\n "]}),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),Ss=function(){function t(t){this.vcr=t}return t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t=vt([e.Directive({selector:"[datoControlErrorContainer]"}),Ct("design:paramtypes",[e.ViewContainerRef])],t)}(),xs=function(){function t(t){var e=this;this.host=t,this.submit$=n.fromEvent(this.element,"submit").pipe(r.tap((function(){!1===e.element.classList.contains("dato-form-submitted")&&e.element.classList.add("dato-form-submitted")})),r.shareReplay({refCount:!0,bufferSize:1}))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoForm]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),Os=new e.InjectionToken("FORM_ERRORS",{providedIn:"root",factory:function(){return{}}}),Ds=function(){function t(t,e,o,i,r,a,s,l){this.vcr=t,this.resolver=e,this.host=o,this.errors=i,this.form=a,this.ngControl=s,this.parentControl=l,this.customErrors={},this.datoControlErrorsOnBlur=!0,this.container=r?r.vcr:this.vcr,this.submit$=this.form?this.form.submit$:n.EMPTY}return t.prototype.ngOnInit=function(){var t=this;this.resolveControl();var e="DATO-INPUT"===this.host.nativeElement.tagName,o=this.control.valueChanges,a=o;this.datoControlErrorsOnBlur&&e&&(a=n.fromEvent(this.host.nativeElement,"focusout").pipe(r.switchMap((function(){return n.merge(n.of(!0),o)}))));var s=this.submit$.pipe(r.switchMap((function(){return n.merge(n.of(!0),o)})));n.merge(s,a).pipe(i.untilDestroyed(this)).subscribe((function(){return t.valueChanges()}))},t.prototype.setError=function(t,e){if(!this.ref){var n=this.resolver.resolveComponentFactory(ws);this.ref=this.container.createComponent(n)}var o=this.ref.instance;o.text=t,this.datoControlErrorsClass&&(o.customClass=this.datoControlErrorsClass),this.datoControlErrorsTpl&&(o.tpl=this.datoControlErrorsTpl,o.controlError=e)},t.prototype.ngOnDestroy=function(){},t.prototype.valueChanges=function(){var t=this.control.errors;if(t){var e=Object.keys(t)[0],n=this.errors[e];if(!1===Et(n))return;var o=this.customErrors[e]||n(t[e]);this.setError(o,t)}else this.ref&&this.setError(null)},t.prototype.resolveControl=function(){if(this.ngControl||!this.parentControl){if(!this.ngControl)throw new Eo("Expect abstract control but gone none");this.control=this.ngControl.control}else this.control=this.parentControl},t.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.ComponentFactoryResolver},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[Os]}]},{type:Ss,decorators:[{type:e.Optional}]},{type:xs,decorators:[{type:e.Optional}]},{type:o.NgControl,decorators:[{type:e.Optional}]},{type:o.ControlContainer,decorators:[{type:e.Optional}]}]},vt([e.Input("datoControlErrors"),Ct("design:type",Object)],t.prototype,"customErrors",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoControlErrorsClass",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"datoControlErrorsTpl",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoControlErrorsOnBlur",void 0),t=vt([e.Directive({selector:"[datoControlErrors]"}),bt(3,e.Inject(Os)),bt(4,e.Optional()),bt(5,e.Optional()),bt(6,e.Optional()),bt(7,e.Optional()),Ct("design:paramtypes",[e.ViewContainerRef,e.ComponentFactoryResolver,e.ElementRef,Object,Ss,xs,o.NgControl,o.ControlContainer])],t)}(),Is=[ws,Ss,Ds,xs],Ts=function(){function t(){}return t=vt([e.NgModule({declarations:[Is],imports:[s.CommonModule,Co],exports:[Is],entryComponents:[ws]})],t)}(),Rs=function(){function t(t,e){this.controlDirective=t,this.host=e}return Object.defineProperty(t.prototype,"control",{get:function(){return this.controlDirective.control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.control.value?parseFloat(this.control.value):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.host.nativeElement.getAttribute("datosize")||"md"},enumerable:!0,configurable:!0}),t.prototype.patchValue=function(t){this.control.patchValue(t),this.control.markAsDirty()},t.prototype.focus=function(){this.host.nativeElement.focus()},t.ctorParameters=function(){return[{type:o.NgControl},{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoInputNumber]"}),Ct("design:paramtypes",[o.NgControl,e.ElementRef])],t)}(),As=function(){function t(t){this.host=t,this.max=1/0,this.min=-1/0,this.step=1,this.allowNegative=!1,this.showControls=!0}return t.prototype.ngOnInit=function(){var t=this;this.showControls&&(Es(this.increment.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.incrementValue()})),Es(this.decrement.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.decrementValue()})))},t.prototype.ngAfterContentInit=function(){$t(this.host.nativeElement,"datosize",this.input.size)},t.prototype.ngOnDestroy=function(){},t.prototype.incrementValue=function(){this.input.focus();var t=this.input.value+this.step;t<=this.max&&this.input.patchValue(t)},t.prototype.decrementValue=function(){this.input.focus();var t=this.input.value>this.min,e=this.input.value-this.step>=(this.allowNegative?-1/0:0);if(t&&e){var n=this.input.value-this.step;this.input.patchValue(n)}},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.ViewChild("increment",{static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"increment",void 0),vt([e.ViewChild("decrement",{static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"decrement",void 0),vt([e.ContentChild(Rs,{static:!0}),Ct("design:type",Rs)],t.prototype,"input",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"max",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"min",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"step",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"allowNegative",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showControls",void 0),t=vt([e.Component({selector:"dato-input-number",template:'<ng-content></ng-content>\n <div [class.invisible]="!showControls" class="controls d-flex-column align-center">\n <button #increment (click.prevent)="incrementValue()" class="flex-1 align-center d-flex"><dato-icon datoIcon="arrow-down" class="primary-300-color" datoSize="sm" width="10px" #inc></dato-icon></button>\n <button #decrement (click.prevent)="decrementValue()" class="flex-1 align-center d-flex"><dato-icon datoIcon="arrow-down" class="primary-300-color" datoSize="sm" width="10px" #dec></dato-icon></button>\n </div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-input-number{position:relative;display:block;overflow:hidden}dato-input-number input,dato-input-number input[type=number]{width:100%}dato-input-number .controls{height:28px;position:absolute;top:1px;right:1px}dato-input-number .controls button{padding:0;cursor:pointer;transform:scaleY(0);transform-origin:top;transition:transform .2s;line-height:13px;width:30px;font-size:12px}dato-input-number .controls button:focus{outline:0}dato-input-number .controls button:first-child .dato-icon-arrow-down{transform:rotate(180deg)}dato-input-number .controls button:last-child{transform-origin:bottom}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}();
341
341
  /**
342
342
  * @license
343
343
  * Copyright Datorama. All Rights Reserved.
@@ -395,14 +395,14 @@ function Gs(t,e,n){var o=t.get("from"),i=t.get("to");if(!Vs(o,e,n)&&!Vs(i,e,n)){
395
395
  *
396
396
  * Use of this source code is governed by an Apache License 2.0 license that can be
397
397
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
398
- */var Hs,Us=function(){function a(n,i,r,a,s,l){var c=this;this.config=n,this.zone=i,this.parentControl=r,this.cdr=a,this.popover=s,this.translate=l,this.monthsShown=2,this.showRelativeDateType=!1,this.relativeTo=t.RelativeDateType.TODAY,this.ranges=[],this.showCustomList=!1,this.relativeDateChange=new e.EventEmitter,this.selection=new e.EventEmitter,this.DATE_FORMAT_LOCALE={locale:this.config.locale},this.months=[],this.currentRange={},this.dateRangeControl=new o.FormControl,this.rangeInputs=new o.FormGroup({from:new o.FormControl(null,{validators:function(t){return Vs(t,c.config.locale,c.format)},updateOn:"blur"}),to:new o.FormControl(null,{validators:function(t){return Vs(t,c.config.locale,c.format)},updateOn:"blur"})},{validators:function(t){return Gs(t,c.config.locale,c.format)}}),this.calendarTypeControl=new o.FormControl(!1),this.relativeDateControl=new o.FormControl,this.hasCustomSupport=!1,this.isMobile=Xe(),this.baseDate=ln(new Date,this.config.locale),this.viewInit=!1}return Object.defineProperty(a.prototype,"rangeList",{set:function(t){this.rangeListInput=this.rangeListInput||new n.ReplaySubject(1),t&&this.rangeListInput.next(t)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"from",{get:function(){return ln(this.currentRange.from,this.config.locale)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"to",{get:function(){return ln(this.currentRange.to,this.config.locale)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"control",{get:function(){return this.parentControl.control},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rangeInputsType",{get:function(){return this.isMobile?"date":"text"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_showRelativeDateType",{get:function(){return this.showRelativeDateType&&!1===an(this.currentRange,this.config.customRangeID)},enumerable:!0,configurable:!0}),a.prototype.ngOnInit=function(){this.handleFormControl(),this.rangesList=this.rangeListInput||this.config.ranges,this.months=zs(ln(this.currentRange.from,this.config.locale),this.monthsShown),this.handleDateRangeSelection(),this.handleRangeInputs(),this.handleRelativeDate()},a.prototype.ngAfterViewInit=function(){var e=this;n.combineLatest([this.rangesList,En(this.zone)]).pipe(i.untilDestroyed(this)).subscribe((function(n){var o=St(n,1)[0];e.hasCustomSupport=o.some((function(e){return e.dateType===t.DateType.CUSTOM})),e.hasCustomSupport&&e.handleCalenderTypeChange(),e.defineRanges(o),e.viewInit?e.reDrawMonthsSafe():(e.hasCustomSupport&&e.setCalendarType(e.currentRange),e.setRangeControl(),e.setRange(e.currentRange),e.currentRange.id===e.config.customRangeID&&e.selectCustomDateOption(),e.viewInit=!0),e.cdr.detectChanges()}))},a.prototype.setRangeInputs=function(){var t=this.format||pn(this.config.locale),e={from:this.isMobile?this.from:U.format(this.from,t,this.DATE_FORMAT_LOCALE),to:this.isMobile?this.to:U.format(this.to,t,this.DATE_FORMAT_LOCALE)};this.rangeInputs.patchValue(e,{emitEvent:!1})},a.prototype.writeValue=function(e){e?(this.currentRange=mt(mt({},e),{from:e.from,to:e.to}),this.from&&(this.baseDate=this.from),this.viewInit&&(this.setRange(e),this.setCalendarType(e))):(this.currentRange={id:this.config.customRangeID,dateType:t.DateType.CUSTOM,from:cn(new Date,this.config.locale),to:cn(new Date,this.config.locale)},this.selectCustomDateOption())},a.prototype.apply=function(){var e=this,n=this.currentRange;n.id||(n=mt(mt({},sn(this.ranges,this.config.customRangeID)),this.currentRange)),this.control.patchValue(n),this.control.markAsDirty(),setTimeout((function(){e.popover.closeById("datePicker",{type:t.PopoverTrigger.Apply})}))},a.prototype.cancel=function(){this.popover.closeById("datePicker",{type:t.PopoverTrigger.Cancel})},a.prototype.setDate=function(t){var e=Bs(this.from,this.to,t);e.id=this.config.customRangeID,this.setRange(e),this.selectCustomDateOption(),this.emitSelection()},a.prototype.monthChange=function(t){this.setRange(t),this.selectCustomDateOption(),this.emitSelection()},a.prototype.changeMonth=function(t){var e=this;this.baseDate=U.addMonths(this.baseDate,t),this.months=zs(this.baseDate,this.monthsShown),En(this.zone).subscribe((function(){return e.setRange(e.currentRange,{updateBaseDate:!1})}))},a.prototype.ngOnDestroy=function(){},a.prototype.findRange=function(t){return this.ranges.find((function(e){return e.id===t}))},a.prototype.handleDateRangeSelection=function(){var t=this;this.dateRangeControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.setRange(e),t.reDrawMonthsSafe()}))},a.prototype.reDrawMonthsSafe=function(){var t=this,e=St(this.months,1)[0],n=ln(U.startOfMonth(e),this.config.locale),o=ln(U.endOfMonth(e),this.config.locale);U.isWithinInterval(this.from,{start:n,end:o})?(this.setRangeInMonths(),this.emitSelection()):(this.months=zs(this.from,this.monthsShown),En(this.zone).subscribe((function(){t.setRangeInMonths(),t.emitSelection()})))},a.prototype.handleFormControl=function(){this.control.valueChanges.pipe(r.startWith(this.control.value),i.untilDestroyed(this)).subscribe(this.writeValue.bind(this))},a.prototype.defineRanges=function(t){this.setCustomRangeLabels(),this.ranges=t,this.viewInit&&(this.updateRangeDates(),this.setRangeControl())},a.prototype.setRangeControl=function(){this.dateRangeControl.patchValue(this.currentRange,{emitEvent:!1})},a.prototype.updateRangeDates=function(){var t=this.findRange(this.currentRange.id),e=t||this.currentRange;this.setRange(e)},a.prototype.selectCustomDateOption=function(){this.dateRangeControl.patchValue(this.getCustomDate(),{emitEvent:!1})},a.prototype.normalizeRange=function(t){var e=this.rangeInputs.value,n=e.from,o=e.to,i=t.from||dn(n,this.config.locale,this.format),r=t.to||dn(o,this.config.locale,this.format),a=ln(i,this.config.locale),s=ln(r,this.config.locale);return U.isAfter(a,s)&&(a=s),mt(mt({},t),{from:cn(a,this.config.locale),to:cn(s,this.config.locale)})},a.prototype.setRange=function(t,e){var n=(void 0===e?{}:e).updateBaseDate,o=void 0===n||n;this.currentRange=this.normalizeRange(t),this.setRangeInputs(),this.setRangeInMonths(),o&&(this.baseDate=this.from)},a.prototype.setRangeInMonths=function(){var t=this;this.monthsComponents.forEach((function(e){return e.setRange(t.currentRange)}))},a.prototype.handleRangeInputs=function(){var t=this;this.rangeInputs.valueChanges.pipe(r.tap((function(){return t.selectCustomDateOption()})),r.filter((function(){return t.rangeInputs.valid})),i.untilDestroyed(this)).subscribe((function(e){var n=e.from,o=e.to,i=dn(n,t.config.locale,t.format),r=dn(o,t.config.locale,t.format),a={from:cn(ln(i,t.config.locale),t.config.locale),to:cn(ln(r,t.config.locale),t.config.locale)};t.setRange(t.getCustomDate(a)),t.reDrawMonthsSafe()}))},a.prototype.handleRelativeDate=function(){var t=this;if(this.showRelativeDateType){this.relativeDateList=vn;var e=this.relativeDateList.find((function(e){return e.id===t.relativeTo}));this.relativeDateControl.patchValue(e),this.relativeDateControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){return t.relativeDateChange.emit(e)}))}},a.prototype.handleCalenderTypeChange=function(){var t=this;this.calendarTypeControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.showCustomList=e,t.selectCustomDateOption(),t.cdr.detectChanges()}))},a.prototype.setCalendarType=function(e){var n=e.dateType===t.DateType.CUSTOM;this.calendarTypeControl.patchValue(n),this.showCustomList=n},a.prototype.emitSelection=function(){this.selection.observers.length&&this.selection.emit(this.currentRange)},a.prototype.getCustomDate=function(t){return void 0===t&&(t={}),mt(mt({},sn(this.ranges,this.config.customRangeID)),t)},a.prototype.setCustomRangeLabels=function(){this.calendarTypeTogglerLabel=this.translate.transform("core.using-custom-calendar"),this.hasCustomSupport&&this.customRangeLabel&&(this.calendarTypeTogglerLabel=this.calendarTypeTogglerLabel.replace("Custom",this.customRangeLabel),this.cdr.detectChanges())},a.ctorParameters=function(){return[{type:bn,decorators:[{type:e.Inject,args:[Cn]}]},{type:e.NgZone},{type:o.NgControl},{type:e.ChangeDetectorRef},{type:da},{type:Mn}]},vt([e.Input(),Ct("design:type",Number)],a.prototype,"monthsShown",void 0),vt([e.Input(),Ct("design:type",Object)],a.prototype,"format",void 0),vt([e.Input(),Ct("design:type",Object)],a.prototype,"showRelativeDateType",void 0),vt([e.Input(),Ct("design:type",String)],a.prototype,"customRangeLabel",void 0),vt([e.Input(),Ct("design:type",Array)],a.prototype,"disableRanges",void 0),vt([e.Input(),Ct("design:type",Array)],a.prototype,"classRanges",void 0),vt([e.Input(),Ct("design:type",String)],a.prototype,"relativeTo",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],a.prototype,"rangeList",null),vt([e.Output(),Ct("design:type",Object)],a.prototype,"relativeDateChange",void 0),vt([e.Output(),Ct("design:type",Object)],a.prototype,"selection",void 0),vt([e.ViewChildren(Ls),Ct("design:type",e.QueryList)],a.prototype,"monthsComponents",void 0),a=vt([e.Component({selector:"dato-date-picker-range",template:'<div class="dato-date-picker date-picker-months-{{monthsShown}}" [class.date-picker-custom]="hasCustomSupport">\n <section class="date-picker-container d-flex">\n\n <div class="date-picker-months d-flex" *ngIf="!isMobile">\n <dato-icon datoIcon="up" datoColor="primary-300" (click)="changeMonth(-1)" data-cy="prevMonth"></dato-icon>\n <ng-template ngFor [ngForOf]="months" let-month>\n <dato-date-picker-month [data]="{ month: month, disableRanges: disableRanges, classRanges: classRanges }"\n (monthChange)="monthChange($event)"\n (dayChange)="setDate($event)"></dato-date-picker-month>\n </ng-template>\n <dato-icon datoIcon="up" datoColor="primary-300" (click)="changeMonth(1)" data-cy="nextMonth"></dato-icon>\n </div>\n\n <div class="date-picker-extended pt-20 d-flex-column" [class.pl-25]="!isMobile">\n\n <div class="d-flex items-center mb-7 use-calendar">\n <dato-toggler [formControl]="calendarTypeControl" class="width-100"\n *ngIf="hasCustomSupport; else tpl">\n <span class="ellipsis"\n [datoTooltipV2]="calendarTypeTogglerLabel"\n placement="top-start"\n [showOnlyOnTextOverflow]="true">{{ calendarTypeTogglerLabel }}\n </span>\n </dato-toggler>\n <ng-template #tpl><p class="dato-simple m-0">{{ \'core.calendar\' | translate }}</p></ng-template>\n </div>\n\n <section class="date-picker-range">\n <section class="d-flex items-center">\n\n <div class="date-picker-control-group flex-1 min-width-0" [ngStyle]="_showRelativeDateType && { maxWidth: \'128px\' }">\n <span class="primary-300-color">{{ \'core.range\' | translate }}</span>\n\n <dato-select [formControl]="dateRangeControl"\n [dataSet]="ranges | dateRangesFilter:showCustomList | tree"\n #select datoSize="sm" data-cy="range">\n <dato-group *ngFor="let group of select.data">\n <div groupLabel>{{ group.label | translate }}</div>\n <dato-option *ngFor="let option of group.children"\n [option]="option"> {{ option.label | translate }} </dato-option>\n </dato-group>\n </dato-select>\n\n </div>\n\n <ng-template [ngIf]="_showRelativeDateType">\n <span class="date-picker-range-separator">-</span>\n\n <div class="date-picker-control-group flex-1 min-width-0">\n <span class="primary-300-color">{{ \'core.relative-to\' | translate }}</span>\n\n <dato-select [formControl]="relativeDateControl" [dataSet]="relativeDateList" #select [isCombo]="false"\n datoSize="sm">\n <dato-option *ngFor="let option of select.data"\n [option]="option"> {{ option.label | translate }} </dato-option>\n </dato-select>\n\n </div>\n </ng-template>\n\n\n </section>\n\n <form class="d-flex items-center mt-15" [formGroup]="rangeInputs">\n <div class="date-picker-control-group flex-1 min-width-0">\n <span class="primary-300-color">{{ \'core.from\' | translate }}</span>\n <dato-input [class.input-error-border]="rangeInputs.invalid" formControlName="from" datoSize="sm"\n [type]="rangeInputsType" data-cy="from"></dato-input>\n </div>\n\n <span class="date-picker-range-separator">-</span>\n\n <div class="date-picker-control-group flex-1 min-width-0">\n <span class="primary-300-color">{{ \'core.to\' | translate }}</span>\n <dato-input [class.input-error-border]="rangeInputs.invalid" formControlName="to" datoSize="sm"\n [type]="rangeInputsType" data-cy="to"></dato-input>\n </div>\n </form>\n\n </section>\n\n <footer class="d-flex items-end justify-end flex-1 date-picker-actions">\n <div class="d-flex items-center pt-18">\n <dato-link datoType="secondary" class="mr-30" (click)="cancel()">{{ \'core.cancel\' | translate }}</dato-link>\n <dato-button width="97px" height="34px" datoSize="lg"\n (click)="apply()">{{ \'core.apply\' | translate }}</dato-button>\n </div>\n\n </footer>\n\n </div>\n\n </section>\n\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),bt(0,e.Inject(Cn)),Ct("design:paramtypes",[bn,e.NgZone,o.NgControl,e.ChangeDetectorRef,da,Mn])],a)}(),Ks={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ws})),multi:!0},Ws=function(t){function n(e){var n=t.call(this)||this;return n.cdr=e,n.datoTogglerNoLabel=!1,n.isDisabled=!1,n.active=!1,n}return ft(n,t),Object.defineProperty(n.prototype,"isActive",{get:function(){return this.active},enumerable:!0,configurable:!0}),n.prototype.writeValue=function(t){this.active=ge(t),this.cdr.markForCheck()},n.prototype.toggle=function(){this.isDisabled||(this.active=!this.active,this.onChange(this.active),this.cdr.markForCheck())},n.prototype.setDisabledState=function(t){this.isDisabled=t,this.cdr.markForCheck()},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),e.HostBinding("class.dato-toggler-no-label"),Ct("design:type",Object)],n.prototype,"datoTogglerNoLabel",void 0),n=vt([e.Component({selector:"dato-toggler",template:'<section class="d-flex items-center">\n <div class="dato-toggle"\n [class.dato-toggle--disabled]="isDisabled"\n [class.dato-toggle--active]="isActive"\n (click)="toggle()">\n <div class="dato-toggle__rail">\n <div class="dato-toggle__ball">\n </div>\n </div>\n </div>\n <span class="label dato-simple width-100 ellipsis" (click)="toggle()"><ng-content></ng-content></span>\n</section>\n',providers:[Ks],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host .dato-toggle{cursor:pointer;display:inline-block}:host .dato-toggle__rail{border-radius:3em;height:12px;position:relative;transition:background-color .4s;width:26px}:host .dato-toggle__ball{border-radius:5em;height:8px;left:2px;top:2px;position:absolute;transition:left .4s,background-color .4s;width:8px}:host .dato-toggle--active .dato-toggle__ball{left:16px}:host .dato-toggle--disabled{cursor:not-allowed}:host:not(.dato-toggler-no-label) .label{margin-left:10px;cursor:default}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],n)}(Dt),Qs=[Ws],$s=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Io],declarations:[Qs],exports:[Qs],entryComponents:[Qs]})],t)}(),qs=function(){function n(t,e,n,o,i){this.config=t,this.zone=e,this.parentControl=n,this.cdr=o,this.popover=i,this.monthsShown=1,this.months=[],this.today=ln(new Date,this.config.locale),this.baseDate=this.today}return Object.defineProperty(n.prototype,"control",{get:function(){return this.parentControl.control},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"controlValue",{get:function(){return this.normalizeDate(this.control.value)},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;this.baseDate=this.controlValue.from?ln(this.controlValue.from,this.config.locale):this.baseDate,this.selectedDate=this.controlValue,this.months=zs(this.baseDate,this.monthsShown),this.control.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.setRange(t.normalizeDate(e))}))},n.prototype.cancel=function(){this.popover.closeById("datePicker",{type:t.PopoverTrigger.Cancel})},n.prototype.ngAfterViewInit=function(){var t=this;En(this.zone).subscribe((function(){t.setRange(t.selectedDate),t.cdr.detectChanges()}))},n.prototype.ngOnDestroy=function(){},n.prototype.apply=function(){this.control.patchValue(this.denormalizeDate(this.selectedDate)),this.control.markAsDirty(),this.popover.closeById("datePicker",{type:t.PopoverTrigger.Apply})},n.prototype.navigateToDate=function(t){this.changeMonth(U.differenceInCalendarMonths(t,this.baseDate))},n.prototype.changeMonth=function(t){var e=this;this.baseDate=U.addMonths(this.baseDate,t),this.months=zs(this.baseDate,this.monthsShown),En(this.zone).subscribe((function(){e.setRange(e.selectedDate),e.cdr.detectChanges()}))},n.prototype.setDay=function(t){this.selectedDate=this.normalizeDate(t),this.setRange(this.selectedDate),this.apply()},n.prototype.normalizeDate=function(t){return{from:cn(t=ln(t,this.config.locale)||this.today,this.config.locale),to:cn(t,this.config.locale)}},n.prototype.denormalizeDate=function(t){return t.from},n.prototype.setRange=function(t){this.selectedDate=t,this.monthsComponents.forEach((function(e){return e.setRange(t)}))},n.ctorParameters=function(){return[{type:bn,decorators:[{type:e.Inject,args:[Cn]}]},{type:e.NgZone},{type:o.NgControl},{type:e.ChangeDetectorRef},{type:da}]},vt([e.Input(),Ct("design:type",Number)],n.prototype,"monthsShown",void 0),vt([e.Input(),Ct("design:type",Array)],n.prototype,"disableRanges",void 0),vt([e.Input(),Ct("design:type",Array)],n.prototype,"classRanges",void 0),vt([e.ViewChildren(Ls),Ct("design:type",e.QueryList)],n.prototype,"monthsComponents",void 0),n=vt([e.Component({selector:"dato-date-picker-single",template:'<div class="dato-date-picker dato-date-picker--single">\n <section class="date-picker-container">\n <div class="date-picker-months d-flex">\n <dato-icon datoIcon="up" datoColor="primary-300" (click)="changeMonth(-1)"></dato-icon>\n <ng-template ngFor [ngForOf]="months" let-month>\n <dato-date-picker-month [data]="{ month: month, disableRanges: disableRanges, classRanges: classRanges }"\n (dayChange)="setDay($event)"></dato-date-picker-month>\n </ng-template>\n <dato-icon datoIcon="up" datoColor="primary-300" (click)="changeMonth(1)"></dato-icon>\n </div>\n\n\x3c!-- <footer class="d-flex items-center justify-end mt-20">--\x3e\n\x3c!-- <dato-link datoType="secondary" class="mr-20" (click)="cancel()">Cancel</dato-link>--\x3e\n\x3c!-- <dato-button width="97px" height="34px" datoSize="lg" (click)="apply()">Apply</dato-button>--\x3e\n\x3c!-- </footer>--\x3e\n\n </section>\n\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),bt(0,e.Inject(Cn)),Ct("design:paramtypes",[bn,e.NgZone,o.NgControl,e.ChangeDetectorRef,da])],n)}(),Ys=function(){function n(){}return n.prototype.transform=function(e,n){return e?e.filter((function(e){switch(e.dateType){case t.DateType.CUSTOM:return n;case t.DateType.STANDARD:return!n;default:return!0}})):[]},n=vt([e.Pipe({name:"dateRangesFilter"})],n)}(),Zs=[Us,Ls,Fs,qs],Xs=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,qi,wo,o.ReactiveFormsModule,Hi,se,xo,In,ps,$s,Co,to],declarations:[Zs,Ys],exports:[Zs],entryComponents:[Us]})],t)}(),Js=function(){function t(){}return t.prototype.ngOnInit=function(){},t=vt([e.Component({selector:"dato-loader",template:'<div class="d-flex-column align-center container">\n <div class="text dato-note">{{ \'core.loading\' | translate }}</div>\n <div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".container{height:64px;position:relative}.text{top:2px;position:absolute;text-align:center}.lds-ellipsis{display:inline-block;position:relative;width:64px;height:64px}.lds-ellipsis div{position:absolute;top:27px;width:11px;height:11px;border-radius:50%;background:#77c5fd;-webkit-animation-timing-function:cubic-bezier(0,1,1,0);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis div:nth-child(1){left:6px;-webkit-animation:.6s infinite core-lds-ellipsis1;animation:.6s infinite core-lds-ellipsis1}.lds-ellipsis div:nth-child(2){left:6px;-webkit-animation:.6s infinite core-lds-ellipsis2;animation:.6s infinite core-lds-ellipsis2}.lds-ellipsis div:nth-child(3){left:26px;-webkit-animation:.6s infinite core-lds-ellipsis2;animation:.6s infinite core-lds-ellipsis2}.lds-ellipsis div:nth-child(4){left:45px;-webkit-animation:.6s infinite corelds-ellipsis3;animation:.6s infinite corelds-ellipsis3}@-webkit-keyframes core-lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes core-lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@-webkit-keyframes core-lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes core-lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@-webkit-keyframes core-lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(19px,0)}}@keyframes core-lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(19px,0)}}"]}),Ct("design:paramtypes",[])],t)}(),tl=function(){function t(){this.msg="",this.salesforce=!1,this.size="medium",this.circleIds=["a","b","c","d","e","f","g","h","i"]}return vt([e.Input(),Ct("design:type",Object)],t.prototype,"msg",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"salesforce",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"size",void 0),t=vt([e.Component({selector:"dato-page-loader",template:'<div class="d-flex-column align-center">\n <ng-container *ngIf="salesforce; else datoramaPageLoader">\n <div class="slds-spinner_container">\n <div role="status" class="slds-spinner slds-spinner_brand" [ngClass]="\'slds-spinner_\' + size">\n <div class="slds-spinner__dot-a"></div>\n <div class="slds-spinner__dot-b"></div>\n </div>\n </div>\n </ng-container>\n <ng-template #datoramaPageLoader>\n <div class="animation-container d-flex align-center d-flex-wrap">\n <div class="circle d-flex align-center" *ngFor="let id of circleIds" [ngClass]="\'circle-\' + id">\n <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">\n <circle cx="6" cy="6" r="5" />\n </svg>\n </div>\n </div>\n </ng-template>\n <span class="loading-message simple-bold">{{msg | translate}}</span>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),el=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Co,Io,Ge],declarations:[Js,tl],exports:[Js,tl]})],t)}(),nl=function(){function t(t){this.store=new n.BehaviorSubject(t),this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),t.prototype.select=function(t){return this.store.asObservable().pipe(r.map(t),r.distinctUntilChanged())},t.prototype.update=function(t){this._value=t(this.value),this.store.next(this.value)},t}(),ol=function(t){function n(){var e=t.call(this,{activeIds:new Set,options:[]})||this;return e.options$=e.select((function(t){return t.options})),e.activeIds$=e.select((function(t){return t.activeIds})),e}return ft(n,t),n.prototype.setOptions=function(t){this.update((function(e){return mt(mt({},e),{options:t})}))},Object.defineProperty(n.prototype,"activeIds",{get:function(){return this.value.activeIds},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"activeIdsAsArray",{get:function(){return Array.from(this.activeIds)},enumerable:!0,configurable:!0}),n.prototype.setActive=function(t){this.update((function(e){return mt(mt({},e),{activeIds:new Set(t)})}))},n.prototype.toggleActive=function(t){var e=new Set(this.activeIds);e.has(t)?e.delete(t):e.add(t),this.update((function(t){return mt(mt({},t),{activeIds:e})}))},n=vt([e.Injectable(),Ct("design:paramtypes",[])],n)}(nl);
398
+ */var Hs,Us=function(){function a(n,i,r,a,s,l){var c=this;this.config=n,this.zone=i,this.parentControl=r,this.cdr=a,this.popover=s,this.translate=l,this.monthsShown=2,this.showRelativeDateType=!1,this.relativeTo=t.RelativeDateType.TODAY,this.ranges=[],this.showCustomList=!1,this.relativeDateChange=new e.EventEmitter,this.selection=new e.EventEmitter,this.DATE_FORMAT_LOCALE={locale:this.config.locale},this.months=[],this.currentRange={},this.dateRangeControl=new o.FormControl,this.rangeInputs=new o.FormGroup({from:new o.FormControl(null,{validators:function(t){return Vs(t,c.config.locale,c.format)},updateOn:"blur"}),to:new o.FormControl(null,{validators:function(t){return Vs(t,c.config.locale,c.format)},updateOn:"blur"})},{validators:function(t){return Gs(t,c.config.locale,c.format)}}),this.calendarTypeControl=new o.FormControl(!1),this.relativeDateControl=new o.FormControl,this.hasCustomSupport=!1,this.isMobile=Xe(),this.baseDate=ln(new Date,this.config.locale),this.viewInit=!1}return Object.defineProperty(a.prototype,"rangeList",{set:function(t){this.rangeListInput=this.rangeListInput||new n.ReplaySubject(1),t&&this.rangeListInput.next(t)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"from",{get:function(){return ln(this.currentRange.from,this.config.locale)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"to",{get:function(){return ln(this.currentRange.to,this.config.locale)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"control",{get:function(){return this.parentControl.control},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rangeInputsType",{get:function(){return this.isMobile?"date":"text"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_showRelativeDateType",{get:function(){return this.showRelativeDateType&&!1===an(this.currentRange,this.config.customRangeID)},enumerable:!0,configurable:!0}),a.prototype.ngOnInit=function(){this.handleFormControl(),this.rangesList=this.rangeListInput||this.config.ranges,this.months=zs(ln(this.currentRange.from,this.config.locale),this.monthsShown),this.handleDateRangeSelection(),this.handleRangeInputs(),this.handleRelativeDate()},a.prototype.ngAfterViewInit=function(){var e=this;n.combineLatest([this.rangesList,En(this.zone)]).pipe(i.untilDestroyed(this)).subscribe((function(n){var o=St(n,1)[0];e.hasCustomSupport=o.some((function(e){return e.dateType===t.DateType.CUSTOM})),e.hasCustomSupport&&e.handleCalenderTypeChange(),e.defineRanges(o),e.viewInit?e.reDrawMonthsSafe():(e.hasCustomSupport&&e.setCalendarType(e.currentRange),e.setRangeControl(),e.setRange(e.currentRange),e.currentRange.id===e.config.customRangeID&&e.selectCustomDateOption(),e.viewInit=!0),e.cdr.detectChanges()}))},a.prototype.setRangeInputs=function(){var t=this.format||pn(this.config.locale),e={from:this.isMobile?this.from:U.format(this.from,t,this.DATE_FORMAT_LOCALE),to:this.isMobile?this.to:U.format(this.to,t,this.DATE_FORMAT_LOCALE)};this.rangeInputs.patchValue(e,{emitEvent:!1})},a.prototype.writeValue=function(e){e?(this.currentRange=mt(mt({},e),{from:e.from,to:e.to}),this.from&&(this.baseDate=this.from),this.viewInit&&(this.setRange(e),this.setCalendarType(e))):(this.currentRange={id:this.config.customRangeID,dateType:t.DateType.CUSTOM,from:cn(new Date,this.config.locale),to:cn(new Date,this.config.locale)},this.selectCustomDateOption())},a.prototype.apply=function(){var e=this,n=this.currentRange;n.id||(n=mt(mt({},sn(this.ranges,this.config.customRangeID)),this.currentRange)),this.control.patchValue(n),this.control.markAsDirty(),setTimeout((function(){e.popover.closeById("datePicker",{type:t.PopoverTrigger.Apply})}))},a.prototype.cancel=function(){this.popover.closeById("datePicker",{type:t.PopoverTrigger.Cancel})},a.prototype.setDate=function(t){var e=Bs(this.from,this.to,t);e.id=this.config.customRangeID,this.setRange(e),this.selectCustomDateOption(),this.emitSelection()},a.prototype.monthChange=function(t){this.setRange(t),this.selectCustomDateOption(),this.emitSelection()},a.prototype.changeMonth=function(t){var e=this;this.baseDate=U.addMonths(this.baseDate,t),this.months=zs(this.baseDate,this.monthsShown),En(this.zone).subscribe((function(){return e.setRange(e.currentRange,{updateBaseDate:!1})}))},a.prototype.ngOnDestroy=function(){},a.prototype.findRange=function(t){return this.ranges.find((function(e){return e.id===t}))},a.prototype.handleDateRangeSelection=function(){var t=this;this.dateRangeControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.setRange(e),t.reDrawMonthsSafe()}))},a.prototype.reDrawMonthsSafe=function(){var t=this,e=St(this.months,1)[0],n=ln(U.startOfMonth(e),this.config.locale),o=ln(U.endOfMonth(e),this.config.locale);U.isWithinInterval(this.from,{start:n,end:o})?(this.setRangeInMonths(),this.emitSelection()):(this.months=zs(this.from,this.monthsShown),En(this.zone).subscribe((function(){t.setRangeInMonths(),t.emitSelection()})))},a.prototype.handleFormControl=function(){this.control.valueChanges.pipe(r.startWith(this.control.value),i.untilDestroyed(this)).subscribe(this.writeValue.bind(this))},a.prototype.defineRanges=function(t){this.setCustomRangeLabels(),this.ranges=t,this.viewInit&&(this.updateRangeDates(),this.setRangeControl())},a.prototype.setRangeControl=function(){this.dateRangeControl.patchValue(this.currentRange,{emitEvent:!1})},a.prototype.updateRangeDates=function(){var t=this.findRange(this.currentRange.id),e=t||this.currentRange;this.setRange(e)},a.prototype.selectCustomDateOption=function(){this.dateRangeControl.patchValue(this.getCustomDate(),{emitEvent:!1})},a.prototype.normalizeRange=function(t){var e=this.rangeInputs.value,n=e.from,o=e.to,i=t.from||dn(n,this.config.locale,this.format),r=t.to||dn(o,this.config.locale,this.format),a=ln(i,this.config.locale),s=ln(r,this.config.locale);return U.isAfter(a,s)&&(a=s),mt(mt({},t),{from:cn(a,this.config.locale),to:cn(s,this.config.locale)})},a.prototype.setRange=function(t,e){var n=(void 0===e?{}:e).updateBaseDate,o=void 0===n||n;this.currentRange=this.normalizeRange(t),this.setRangeInputs(),this.setRangeInMonths(),o&&(this.baseDate=this.from)},a.prototype.setRangeInMonths=function(){var t=this;this.monthsComponents.forEach((function(e){return e.setRange(t.currentRange)}))},a.prototype.handleRangeInputs=function(){var t=this;this.rangeInputs.valueChanges.pipe(r.tap((function(){return t.selectCustomDateOption()})),r.filter((function(){return t.rangeInputs.valid})),i.untilDestroyed(this)).subscribe((function(e){var n=e.from,o=e.to,i=dn(n,t.config.locale,t.format),r=dn(o,t.config.locale,t.format),a={from:cn(ln(i,t.config.locale),t.config.locale),to:cn(ln(r,t.config.locale),t.config.locale)};t.setRange(t.getCustomDate(a)),t.reDrawMonthsSafe()}))},a.prototype.handleRelativeDate=function(){var t=this;if(this.showRelativeDateType){this.relativeDateList=vn;var e=this.relativeDateList.find((function(e){return e.id===t.relativeTo}));this.relativeDateControl.patchValue(e),this.relativeDateControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){return t.relativeDateChange.emit(e)}))}},a.prototype.handleCalenderTypeChange=function(){var t=this;this.calendarTypeControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.showCustomList=e,t.selectCustomDateOption(),t.cdr.detectChanges()}))},a.prototype.setCalendarType=function(e){var n=e.dateType===t.DateType.CUSTOM;this.calendarTypeControl.patchValue(n),this.showCustomList=n},a.prototype.emitSelection=function(){this.selection.observers.length&&this.selection.emit(this.currentRange)},a.prototype.getCustomDate=function(t){return void 0===t&&(t={}),mt(mt({},sn(this.ranges,this.config.customRangeID)),t)},a.prototype.setCustomRangeLabels=function(){this.calendarTypeTogglerLabel=this.translate.transform("core.using-custom-calendar"),this.hasCustomSupport&&this.customRangeLabel&&(this.calendarTypeTogglerLabel=this.calendarTypeTogglerLabel.replace("Custom",this.customRangeLabel),this.cdr.detectChanges())},a.ctorParameters=function(){return[{type:bn,decorators:[{type:e.Inject,args:[Cn]}]},{type:e.NgZone},{type:o.NgControl},{type:e.ChangeDetectorRef},{type:da},{type:Mn}]},vt([e.Input(),Ct("design:type",Number)],a.prototype,"monthsShown",void 0),vt([e.Input(),Ct("design:type",Object)],a.prototype,"format",void 0),vt([e.Input(),Ct("design:type",Object)],a.prototype,"showRelativeDateType",void 0),vt([e.Input(),Ct("design:type",String)],a.prototype,"customRangeLabel",void 0),vt([e.Input(),Ct("design:type",Array)],a.prototype,"disableRanges",void 0),vt([e.Input(),Ct("design:type",Array)],a.prototype,"classRanges",void 0),vt([e.Input(),Ct("design:type",String)],a.prototype,"relativeTo",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],a.prototype,"rangeList",null),vt([e.Output(),Ct("design:type",Object)],a.prototype,"relativeDateChange",void 0),vt([e.Output(),Ct("design:type",Object)],a.prototype,"selection",void 0),vt([e.ViewChildren(Ls),Ct("design:type",e.QueryList)],a.prototype,"monthsComponents",void 0),a=vt([e.Component({selector:"dato-date-picker-range",template:'<div class="dato-date-picker date-picker-months-{{monthsShown}}" [class.date-picker-custom]="hasCustomSupport">\n <section class="date-picker-container d-flex">\n\n <div class="date-picker-months d-flex" *ngIf="!isMobile">\n <dato-icon datoIcon="up" datoColor="primary-300" (click)="changeMonth(-1)" data-cy="prevMonth"></dato-icon>\n <ng-template ngFor [ngForOf]="months" let-month>\n <dato-date-picker-month [data]="{ month: month, disableRanges: disableRanges, classRanges: classRanges }"\n (monthChange)="monthChange($event)"\n (dayChange)="setDate($event)"></dato-date-picker-month>\n </ng-template>\n <dato-icon datoIcon="up" datoColor="primary-300" (click)="changeMonth(1)" data-cy="nextMonth"></dato-icon>\n </div>\n\n <div class="date-picker-extended pt-20 d-flex-column" [class.pl-25]="!isMobile">\n\n <div class="d-flex items-center mb-7 use-calendar">\n <dato-toggler [formControl]="calendarTypeControl" class="width-100"\n *ngIf="hasCustomSupport; else tpl">\n <span class="ellipsis"\n [datoTooltipV2]="calendarTypeTogglerLabel"\n placement="top-start"\n [showOnlyOnTextOverflow]="true">{{ calendarTypeTogglerLabel }}\n </span>\n </dato-toggler>\n <ng-template #tpl><p class="dato-simple m-0">{{ \'core.calendar\' | translate }}</p></ng-template>\n </div>\n\n <section class="date-picker-range">\n <section class="d-flex items-center">\n\n <div class="date-picker-control-group flex-1 min-width-0" [ngStyle]="_showRelativeDateType && { maxWidth: \'128px\' }">\n <span class="primary-300-color">{{ \'core.range\' | translate }}</span>\n\n <dato-select [formControl]="dateRangeControl"\n [dataSet]="ranges | dateRangesFilter:showCustomList | tree"\n #select datoSize="sm" data-cy="range">\n <dato-group *ngFor="let group of select.data">\n <div groupLabel>{{ group.label | translate }}</div>\n <dato-option *ngFor="let option of group.children"\n [option]="option"> {{ option.label | translate }} </dato-option>\n </dato-group>\n </dato-select>\n\n </div>\n\n <ng-template [ngIf]="_showRelativeDateType">\n <span class="date-picker-range-separator">-</span>\n\n <div class="date-picker-control-group flex-1 min-width-0">\n <span class="primary-300-color">{{ \'core.relative-to\' | translate }}</span>\n\n <dato-select [formControl]="relativeDateControl" [dataSet]="relativeDateList" #select [isCombo]="false"\n datoSize="sm">\n <dato-option *ngFor="let option of select.data"\n [option]="option"> {{ option.label | translate }} </dato-option>\n </dato-select>\n\n </div>\n </ng-template>\n\n\n </section>\n\n <form class="d-flex items-center mt-15" [formGroup]="rangeInputs">\n <div class="date-picker-control-group flex-1 min-width-0">\n <span class="primary-300-color">{{ \'core.from\' | translate }}</span>\n <dato-input [class.input-error-border]="rangeInputs.invalid" formControlName="from" datoSize="sm"\n [type]="rangeInputsType" data-cy="from"></dato-input>\n </div>\n\n <span class="date-picker-range-separator">-</span>\n\n <div class="date-picker-control-group flex-1 min-width-0">\n <span class="primary-300-color">{{ \'core.to\' | translate }}</span>\n <dato-input [class.input-error-border]="rangeInputs.invalid" formControlName="to" datoSize="sm"\n [type]="rangeInputsType" data-cy="to"></dato-input>\n </div>\n </form>\n\n </section>\n\n <footer class="d-flex items-end justify-end flex-1 date-picker-actions">\n <div class="d-flex items-center pt-18">\n <dato-link datoType="secondary" class="mr-30" (click)="cancel()">{{ \'core.cancel\' | translate }}</dato-link>\n <dato-button width="97px" height="34px" datoSize="lg"\n (click)="apply()">{{ \'core.apply\' | translate }}</dato-button>\n </div>\n\n </footer>\n\n </div>\n\n </section>\n\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),bt(0,e.Inject(Cn)),Ct("design:paramtypes",[bn,e.NgZone,o.NgControl,e.ChangeDetectorRef,da,Mn])],a)}(),Ks={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ws})),multi:!0},Ws=function(t){function n(e){var n=t.call(this)||this;return n.cdr=e,n.datoTogglerNoLabel=!1,n.isDisabled=!1,n.active=!1,n}return ft(n,t),Object.defineProperty(n.prototype,"isActive",{get:function(){return this.active},enumerable:!0,configurable:!0}),n.prototype.writeValue=function(t){this.active=ge(t),this.cdr.markForCheck()},n.prototype.toggle=function(){this.isDisabled||(this.active=!this.active,this.onChange(this.active),this.cdr.markForCheck())},n.prototype.setDisabledState=function(t){this.isDisabled=t,this.cdr.markForCheck()},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),e.HostBinding("class.dato-toggler-no-label"),Ct("design:type",Object)],n.prototype,"datoTogglerNoLabel",void 0),n=vt([e.Component({selector:"dato-toggler",template:'<section class="d-flex items-center">\n <div class="dato-toggle"\n [class.dato-toggle--disabled]="isDisabled"\n [class.dato-toggle--active]="isActive"\n (click)="toggle()">\n <div class="dato-toggle__rail">\n <div class="dato-toggle__ball">\n </div>\n </div>\n </div>\n <span class="label dato-simple width-100 ellipsis" (click)="toggle()"><ng-content></ng-content></span>\n</section>\n',providers:[Ks],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host .dato-toggle{cursor:pointer;display:inline-block}:host .dato-toggle__rail{border-radius:3em;height:12px;position:relative;transition:background-color .4s;width:26px}:host .dato-toggle__ball{border-radius:5em;height:8px;left:2px;top:2px;position:absolute;transition:left .4s,background-color .4s;width:8px}:host .dato-toggle--active .dato-toggle__ball{left:16px}:host .dato-toggle--disabled{cursor:not-allowed}:host:not(.dato-toggler-no-label) .label{margin-left:10px;cursor:default}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],n)}(Dt),$s=[Ws],Qs=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Io],declarations:[$s],exports:[$s],entryComponents:[$s]})],t)}(),qs=function(){function n(t,e,n,o,i){this.config=t,this.zone=e,this.parentControl=n,this.cdr=o,this.popover=i,this.monthsShown=1,this.months=[],this.today=ln(new Date,this.config.locale),this.baseDate=this.today}return Object.defineProperty(n.prototype,"control",{get:function(){return this.parentControl.control},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"controlValue",{get:function(){return this.normalizeDate(this.control.value)},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;this.baseDate=this.controlValue.from?ln(this.controlValue.from,this.config.locale):this.baseDate,this.selectedDate=this.controlValue,this.months=zs(this.baseDate,this.monthsShown),this.control.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.setRange(t.normalizeDate(e))}))},n.prototype.cancel=function(){this.popover.closeById("datePicker",{type:t.PopoverTrigger.Cancel})},n.prototype.ngAfterViewInit=function(){var t=this;En(this.zone).subscribe((function(){t.setRange(t.selectedDate),t.cdr.detectChanges()}))},n.prototype.ngOnDestroy=function(){},n.prototype.apply=function(){this.control.patchValue(this.denormalizeDate(this.selectedDate)),this.control.markAsDirty(),this.popover.closeById("datePicker",{type:t.PopoverTrigger.Apply})},n.prototype.navigateToDate=function(t){this.changeMonth(U.differenceInCalendarMonths(t,this.baseDate))},n.prototype.changeMonth=function(t){var e=this;this.baseDate=U.addMonths(this.baseDate,t),this.months=zs(this.baseDate,this.monthsShown),En(this.zone).subscribe((function(){e.setRange(e.selectedDate),e.cdr.detectChanges()}))},n.prototype.setDay=function(t){this.selectedDate=this.normalizeDate(t),this.setRange(this.selectedDate),this.apply()},n.prototype.normalizeDate=function(t){return{from:cn(t=ln(t,this.config.locale)||this.today,this.config.locale),to:cn(t,this.config.locale)}},n.prototype.denormalizeDate=function(t){return t.from},n.prototype.setRange=function(t){this.selectedDate=t,this.monthsComponents.forEach((function(e){return e.setRange(t)}))},n.ctorParameters=function(){return[{type:bn,decorators:[{type:e.Inject,args:[Cn]}]},{type:e.NgZone},{type:o.NgControl},{type:e.ChangeDetectorRef},{type:da}]},vt([e.Input(),Ct("design:type",Number)],n.prototype,"monthsShown",void 0),vt([e.Input(),Ct("design:type",Array)],n.prototype,"disableRanges",void 0),vt([e.Input(),Ct("design:type",Array)],n.prototype,"classRanges",void 0),vt([e.ViewChildren(Ls),Ct("design:type",e.QueryList)],n.prototype,"monthsComponents",void 0),n=vt([e.Component({selector:"dato-date-picker-single",template:'<div class="dato-date-picker dato-date-picker--single">\n <section class="date-picker-container">\n <div class="date-picker-months d-flex">\n <dato-icon datoIcon="up" datoColor="primary-300" (click)="changeMonth(-1)"></dato-icon>\n <ng-template ngFor [ngForOf]="months" let-month>\n <dato-date-picker-month [data]="{ month: month, disableRanges: disableRanges, classRanges: classRanges }"\n (dayChange)="setDay($event)"></dato-date-picker-month>\n </ng-template>\n <dato-icon datoIcon="up" datoColor="primary-300" (click)="changeMonth(1)"></dato-icon>\n </div>\n\n\x3c!-- <footer class="d-flex items-center justify-end mt-20">--\x3e\n\x3c!-- <dato-link datoType="secondary" class="mr-20" (click)="cancel()">Cancel</dato-link>--\x3e\n\x3c!-- <dato-button width="97px" height="34px" datoSize="lg" (click)="apply()">Apply</dato-button>--\x3e\n\x3c!-- </footer>--\x3e\n\n </section>\n\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),bt(0,e.Inject(Cn)),Ct("design:paramtypes",[bn,e.NgZone,o.NgControl,e.ChangeDetectorRef,da])],n)}(),Ys=function(){function n(){}return n.prototype.transform=function(e,n){return e?e.filter((function(e){switch(e.dateType){case t.DateType.CUSTOM:return n;case t.DateType.STANDARD:return!n;default:return!0}})):[]},n=vt([e.Pipe({name:"dateRangesFilter"})],n)}(),Zs=[Us,Ls,Fs,qs],Xs=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,qi,wo,o.ReactiveFormsModule,Hi,se,xo,In,ps,Qs,Co,to],declarations:[Zs,Ys],exports:[Zs],entryComponents:[Us]})],t)}(),Js=function(){function t(){}return t.prototype.ngOnInit=function(){},t=vt([e.Component({selector:"dato-loader",template:'<div class="d-flex-column align-center container">\n <div class="text dato-note">{{ \'core.loading\' | translate }}</div>\n <div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".container{height:64px;position:relative}.text{top:2px;position:absolute;text-align:center}.lds-ellipsis{display:inline-block;position:relative;width:64px;height:64px}.lds-ellipsis div{position:absolute;top:27px;width:11px;height:11px;border-radius:50%;background:#77c5fd;-webkit-animation-timing-function:cubic-bezier(0,1,1,0);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis div:nth-child(1){left:6px;-webkit-animation:.6s infinite core-lds-ellipsis1;animation:.6s infinite core-lds-ellipsis1}.lds-ellipsis div:nth-child(2){left:6px;-webkit-animation:.6s infinite core-lds-ellipsis2;animation:.6s infinite core-lds-ellipsis2}.lds-ellipsis div:nth-child(3){left:26px;-webkit-animation:.6s infinite core-lds-ellipsis2;animation:.6s infinite core-lds-ellipsis2}.lds-ellipsis div:nth-child(4){left:45px;-webkit-animation:.6s infinite corelds-ellipsis3;animation:.6s infinite corelds-ellipsis3}@-webkit-keyframes core-lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes core-lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@-webkit-keyframes core-lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes core-lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@-webkit-keyframes core-lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(19px,0)}}@keyframes core-lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(19px,0)}}"]}),Ct("design:paramtypes",[])],t)}(),tl=function(){function t(){this.msg="",this.salesforce=!1,this.size="medium",this.circleIds=["a","b","c","d","e","f","g","h","i"]}return vt([e.Input(),Ct("design:type",Object)],t.prototype,"msg",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"salesforce",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"size",void 0),t=vt([e.Component({selector:"dato-page-loader",template:'<div class="d-flex-column align-center">\n <ng-container *ngIf="salesforce; else datoramaPageLoader">\n <div class="slds-spinner_container">\n <div role="status" class="slds-spinner slds-spinner_brand" [ngClass]="\'slds-spinner_\' + size">\n <div class="slds-spinner__dot-a"></div>\n <div class="slds-spinner__dot-b"></div>\n </div>\n </div>\n </ng-container>\n <ng-template #datoramaPageLoader>\n <div class="animation-container d-flex align-center d-flex-wrap">\n <div class="circle d-flex align-center" *ngFor="let id of circleIds" [ngClass]="\'circle-\' + id">\n <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">\n <circle cx="6" cy="6" r="5" />\n </svg>\n </div>\n </div>\n </ng-template>\n <span class="loading-message simple-bold">{{msg | translate}}</span>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),el=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Co,Io,Ge],declarations:[Js,tl],exports:[Js,tl]})],t)}(),nl=function(){function t(t){this.store=new n.BehaviorSubject(t),this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),t.prototype.select=function(t){return this.store.asObservable().pipe(r.map(t),r.distinctUntilChanged())},t.prototype.update=function(t){this._value=t(this.value),this.store.next(this.value)},t}(),ol=function(t){function n(){var e=t.call(this,{activeIds:new Set,options:[]})||this;return e.options$=e.select((function(t){return t.options})),e.activeIds$=e.select((function(t){return t.activeIds})),e}return ft(n,t),n.prototype.setOptions=function(t){this.update((function(e){return mt(mt({},e),{options:t})}))},Object.defineProperty(n.prototype,"activeIds",{get:function(){return this.value.activeIds},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"activeIdsAsArray",{get:function(){return Array.from(this.activeIds)},enumerable:!0,configurable:!0}),n.prototype.setActive=function(t){this.update((function(e){return mt(mt({},e),{activeIds:new Set(t)})}))},n.prototype.toggleActive=function(t){var e=new Set(this.activeIds);e.has(t)?e.delete(t):e.add(t),this.update((function(t){return mt(mt({},t),{activeIds:e})}))},n=vt([e.Injectable(),Ct("design:paramtypes",[])],n)}(nl);
399
399
  /**
400
400
  * @license
401
401
  * Copyright Datorama. All Rights Reserved.
402
402
  *
403
403
  * Use of this source code is governed by an Apache License 2.0 license that can be
404
404
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
405
- */(Hs=t.ListValueTypes||(t.ListValueTypes={})).id="id",Hs.object="object";var il,rl=function(a){function s(e,o,i,r){var s=a.call(this)||this;return s.store=e,s.datoSize=o,s.cdr=i,s.host=r,s.idKey="id",s.labelKey="label",s.sortByKey="label",s.labelType="string",s.withSelectAll=!0,s.groupLabel="group",s.withAccordion=!1,s.withGrouping=!1,s.containerHeight="auto",s.clientSearch=!0,s.loading=!1,s.valueType=t.ListValueTypes.id,s.autoId=null,s.isSortList=!0,s._options=[],s.searchTerm="",s.activeIdChanges=new n.ReplaySubject(1),s.visibleIdsChanges=new n.ReplaySubject(1),s.visibleIdsChanges$=s.visibleIdsChanges.asObservable(),s}var l;return ft(s,a),l=s,Object.defineProperty(s.prototype,"options",{set:function(t){this.store.setOptions(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isEmpty",{get:function(){return 0===this._options.length},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){var t=this;this.datoSize=this.datoSize||"sm",this.listClass="list-"+this.datoSize+" dato-list__options",this.hasVisibleItems$=n.combineLatest([this.store.options$,this.visibleIdsChanges$]).pipe(r.map((function(t){var e=St(t,2),n=e[0],o=e[1];return n.length&&o.size>0})),r.shareReplay({refCount:!0,bufferSize:1})),this.store.options$.pipe(i.untilDestroyed(this)).subscribe((function(e){t._options=e,t.withGrouping&&(t.grouping=t.initializeGroups(t._options),t.cdr.detectChanges(),t._options.forEach((function(e){if(t.isGroupOpen(e[t.groupLabel])&&t.optionsWrapper){var n=t.optionsWrapper.nativeElement;n.style.maxHeight=n.scrollHeight+"px"}})));var n=new Set(t._options.map((function(e){return e[t.idKey]})));t.visibleIdsChanges.next(n),t.cdr.markForCheck()})),this.withSelectAll&&this.handleSelectAll()},s.prototype.ngAfterViewInit=function(){var t=this;if(n.merge(this.activeIdChanges.asObservable(),this.optionComponents.changes).pipe(i.untilDestroyed(this)).subscribe((function(){return t.markChecked(t.store.activeIds)})),this.searchController){var e=this.searchController.valueChanges$.pipe(r.debounceTime(150));n.combineLatest([e,this.optionComponents.changes.pipe(r.startWith(this.optionComponents))]).pipe(i.untilDestroyed(this)).subscribe((function(e){var n=St(e,1)[0];t.handleSearch(n),t.withGrouping&&t.cdr.detectChanges()})),this.handleKeyboardNavigation()}},s.prototype.writeValue=function(t){var e=rt.coerceArray(t||[]);this.store.setActive(e),this.activeIdChanges.next()},s.prototype.updateModel=function(){this.onChange(this.store.activeIdsAsArray)},s.prototype.toggleActive=function(e){var n=this,o=e[this.idKey];this.store.toggleActive(this.valueType===t.ListValueTypes.object?e:o),setTimeout((function(){return n.updateModel()}))},s.prototype.checkAll=function(t){var e=this,n=[];t&&this.optionComponents.forEach((function(t){!1===t.hidden&&n.push(t.option[e.idKey])})),this.writeValue(n),this.updateModel()},s.prototype.hasVisibleChildren=function(t){return!!this.grouping[t].visibleChildren.size},s.prototype.toggleGroup=function(t){this.withAccordion&&(this.grouping[t].visible=!this.grouping[t].visible)},s.prototype.isGroupOpen=function(t){return!1===this.withAccordion||this.grouping[t].visible},s.prototype.isDisabled=function(t){var e=t[this.idKey];return this.disabledIds?this.disabledIds.has(e):!!this.enabledIds&&!1===this.enabledIds.has(e)},s.prototype.handleSearch=function(t){var e=this;if(this.clientSearch){var n=new Set;this.optionComponents.forEach((function(o){var i=!0===o.option[e.labelKey].toLowerCase().includes(t.toLowerCase());o.hidden=!i;var r=o.option[e.idKey];if(e.withGrouping){var a=e.grouping[o.option[e.groupLabel]];i?(a.visibleChildren.add(r),n.add(r),a.visible=!0):a.visibleChildren.delete(r)}else i&&n.add(r)})),this.visibleIdsChanges.next(n)}this.searchTerm=t,this.keyManager.setActiveItem(-1),this.cdr.markForCheck()},s.prototype.handleSelectAll=function(){this.selectAllState$=n.combineLatest([this.store.activeIds$,this.visibleIdsChanges$]).pipe(r.map((function(t){var e=St(t,2),n=e[0],o=e[1],i=0;return n.forEach((function(t){return o.has(t)&&i++})),{label:"("+i+"/"+o.size+")",checked:i===o.size,indeterminate:i>0&&i<o.size}})),r.shareReplay({refCount:!0,bufferSize:1}))},s.prototype.initializeGroups=function(t){var e=this;return t.reduce((function(t,n){var o=n[e.groupLabel];return t[o]||(t[o]={visible:!1,visibleChildren:new Set}),t[o].visibleChildren.add(n[e.idKey]),t}),{})},s.prototype.handleKeyboardNavigation=function(){var e=this;this.keyManager=new pt.ActiveDescendantKeyManager(this.optionComponents).withWrap().skipPredicate((function(t){return t.disabled})),this.searchController.keydown$.pipe(i.untilDestroyed(this)).subscribe((function(n){if(n.key===t.KeyboardEventKeys.Enter){e.keyManager.activeItem.checked=!e.keyManager.activeItem.checked;var o=e.keyManager.activeItem.option;e.toggleActive(o)}else{e.keyManager.onKeydown(n);var i=Ft(".list-container",e.host.nativeElement);xi({size:e.datoSize,panel:i,activeItemIndex:e.keyManager.activeItemIndex,groups:[],options:e.options})}}))},s.prototype.markChecked=function(t){var e=this;this.optionComponents.forEach((function(n){var o=n.option[e.idKey];n.checked=t.has(o)})),this.cdr.markForCheck()},s.prototype.ngOnDestroy=function(){},s.ctorParameters=function(){return[{type:ol},{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],s.prototype,"searchController",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"listClass",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"idKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"sortByKey",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"labelType",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"withSelectAll",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"groupLabel",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"withAccordion",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"withGrouping",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"containerHeight",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"clientSearch",void 0),vt([e.Input(),Ct("design:type",Set)],s.prototype,"disabledIds",void 0),vt([e.Input(),Ct("design:type",Set)],s.prototype,"enabledIds",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"loading",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"valueType",void 0),vt([e.Input(),Ct("design:type",Function)],s.prototype,"autoId",void 0),vt([e.Input(),Ct("design:type",Boolean)],s.prototype,"isSortList",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"optionTpl",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"groupHeaderTpl",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"noResultsTpl",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"noDataTpl",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],s.prototype,"options",null),vt([e.ViewChildren(Vi),Ct("design:type",e.QueryList)],s.prototype,"optionComponents",void 0),vt([e.ViewChild("optionsWrapper",{read:e.ElementRef}),Ct("design:type",e.ElementRef)],s.prototype,"optionsWrapper",void 0),s=l=vt([e.Component({selector:"dato-list-v2",template:'<div [class]="listClass">\n <dato-list-select-all [label]="(selectAllState$ | async).label"\n [indeterminatelyChecked]="(selectAllState$ | async).indeterminate"\n [checked]="(selectAllState$ | async).checked"\n (checkAll)="checkAll($event)"\n *ngIf="withSelectAll && hasVisibleItems$ | async"></dato-list-select-all>\n\n <div class="list-container" [style.max-height]="containerHeight">\n <ng-template [ngTemplateOutlet]="withGrouping ? grouping : flat"></ng-template>\n </div>\n\n \x3c!-- This template is for grouping lists and accordion--\x3e\n <ng-template #grouping>\n <div *ngFor="let group of _options | tree:groupLabel | searchResultsGroupSort: searchTerm: { labelKey: labelKey };"\n class="dato-group-option" [class.accordion-list]="withAccordion">\n\n <div class="dato-select__group d-flex items-center" *ngIf="hasVisibleChildren(group.label)" (click)="toggleGroup(group.label)"\n [class.group-open]="isGroupOpen(group.label)"\n [class.dato-select__option]="!withAccordion">\n <ng-template [ngTemplateOutlet]="groupHeaderTpl ? groupHeaderTpl : defaultGroupHeaderTpl"\n [ngTemplateOutletContext]="{ $implicit: group.label, isOpen: isGroupOpen(group.label) }"></ng-template>\n </div>\n\n <div class="options-wrapper"\n #optionsWrapper\n [class.shrink-list]="!isGroupOpen(group.label)">\n <dato-option-v2 multi *ngFor="let option of group.children;"\n [attr.dato-auto-id]="autoId && autoId(option)"\n [disabled]="isDisabled(option)"\n [option]="option"\n (check)="toggleActive(option)">\n <ng-template [ngTemplateOutlet]="optionTpl ? optionTpl : defaultOptionTpl"\n [ngTemplateOutletContext]="{ $implicit: option, searchValue: searchTerm }"></ng-template>\n </dato-option-v2>\n </div>\n </div>\n </ng-template>\n\n \x3c!-- This template is for flat lists --\x3e\n <ng-template #flat>\n <dato-option-v2 multi *ngFor="let option of (isSortList ? (_options | searchResultsSort: searchTerm: { labelKey: sortByKey, labelType: labelType }) : _options);"\n [disabled]="isDisabled(option)"\n [option]="option"\n [attr.dato-auto-id]="autoId && autoId(option)"\n (check)="toggleActive(option)">\n <ng-template [ngTemplateOutlet]="optionTpl ? optionTpl : defaultOptionTpl"\n [ngTemplateOutletContext]="{ $implicit: option, searchValue: searchTerm }"></ng-template>\n </dato-option-v2>\n </ng-template>\n\n\n <ng-template #defaultOptionTpl let-option let-searchValue="searchValue">\n <div [innerHTML]="option[labelKey] | datoHighlight: searchValue" class="ellipsis"></div>\n </ng-template>\n\n <ng-template #defaultGroupHeaderTpl let-isOpen="isOpen" let-label>\n <dato-icon [datoIcon]="isOpen ? \'arrow-down\' : \'arrow-right\'" datoSize="sm" class="mx-8" *ngIf="withAccordion"></dato-icon>\n <span class="dato-simple" >{{ label }} </span>\n </ng-template>\n\n <dato-list-no-result *ngIf="clientSearch && searchTerm && !(hasVisibleItems$ | async)" [customTpl]="noResultsTpl"></dato-list-no-result>\n <ng-container *ngIf="isEmpty">\n <div class="py-10" *ngIf="loading; else noData">\n <span class="dato-spinner-loader lg-loader"></span>\n </div>\n <ng-template #noData>\n <dato-list-no-data [customTpl]="noDataTpl"></dato-list-no-data>\n </ng-template>\n </ng-container>\n\n</div>\n',providers:[ol,{provide:o.NG_VALUE_ACCESSOR,useExisting:l,multi:!0}],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}:host .list-container{overflow-y:auto}"]}),bt(1,e.Attribute("datoSize")),Ct("design:paramtypes",[ol,Object,e.ChangeDetectorRef,e.ElementRef])],s)}(Dt),al=function(){function t(){}return vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"customTpl",void 0),t=vt([e.Component({selector:"dato-list-no-result",template:'\n <ng-template [ngTemplateOutlet]="customTpl ? customTpl : defaultTpl"></ng-template>\n\n <ng-template #defaultTpl>\n <div class="d-flex-1 d-flex-column align-center default-no-results">\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ \'core.no-results-found\' | translate }}</p>\n <p class="dato-note primary-300-color">{{ \'core.try-different-keyword\' | translate }}</p>\n </div>\n </ng-template>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),sl=function(){function t(){}return vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"customTpl",void 0),t=vt([e.Component({selector:"dato-list-no-data",template:'\n <ng-template [ngTemplateOutlet]="customTpl ? customTpl : defaultTpl"></ng-template>\n\n <ng-template #defaultTpl>\n <div class="d-flex-1 d-flex-column align-center default-no-data">\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ \'core.no-available-items\' | translate }}</p>\n </div>\n </ng-template>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ll=function(){function t(){this.indeterminatelyChecked=!1,this.checkAll=new e.EventEmitter}return vt([e.Input(),Ct("design:type",String)],t.prototype,"label",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"indeterminatelyChecked",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"checked",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"checkAll",void 0),t=vt([e.Component({selector:"dato-list-select-all",template:'\n <div class="dato-select__header dato-select__option dato-select__option--simple select-all">\n <dato-checkbox\n (check)="checkAll.emit($event)"\n [checked]="checked"\n [indeterminatelyChecked]="indeterminatelyChecked"\n >\n <span\n >{{ \'core.select-all\' | translate }}\n <span class="primary-300-color note-italic ml-5">{{ label }}</span>\n </span>\n </dato-checkbox>\n </div>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),cl=[rl,al],pl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Hi,Co,Mi,Ge,to,el],declarations:[cl,sl,ll],exports:[cl]})],t)}(),dl=function(){function t(t,e,n){this.dialog=t,this.dialogRef=e,this.element=n,this.draggableEnabled=!1}return Object.defineProperty(t.prototype,"enableClose",{get:function(){return this.options.enableClose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.dialogRef.options||{}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lightning",{get:function(){return this.options.lightning},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.options.draggable&&(this.draggableEnabled=!0,this.draggableDialogElement=this.dialog.getClosestDialogElement(this.element.nativeElement))},t.ctorParameters=function(){return[{type:ti},{type:Qo},{type:e.ElementRef}]},t=vt([e.Component({selector:"dato-dialog-header",template:'<div class="d-flex-row justify-between" [class.lightning]="lightning"\n datoDraggable [datoDragTarget]="draggableDialogElement"\n [datoDragHandle]="element" [datoDragEnabled]="draggableEnabled">\n <div class="sub-headline d-flex-1 ellipsis" datoColor="primary-600">\n <ng-content></ng-content>\n </div>\n <dato-icon-button class="x-button" data-auto-id="dialog-header-close" datoDialogDismiss *ngIf="enableClose"\n datoSize="md" datoType="none" datoIcon="close">\n </dato-icon-button>\n</div>\n',encapsulation:e.ViewEncapsulation.None,styles:['dato-dialog-header{display:block;min-height:55px;padding:18px 40px 10px 30px}dato-dialog-header .sub-headline{max-width:100%}dato-dialog-header dato-icon-button.x-button{position:absolute;right:10px;top:10px}dato-dialog-header dato-icon-button.x-button .dato-icon-close{padding:0!important}dato-dialog-header dato-icon-button.x-button .dato-icon-close svg{width:24px;height:24px}dato-dialog-header .lightning{font-family:"Salesforce Sans","Open Sans",sans-serif!important}dato-dialog-header .lightning .sub-headline{text-align:center;font-weight:700}dato-dialog-header .lightning .x-button{top:-40px;right:-4px}']}),Ct("design:paramtypes",[ti,Qo,e.ElementRef])],t)}(),ul=function(){function t(){}return t=vt([e.Component({selector:"dato-dialog-content",template:"<ng-content></ng-content>\n",styles:[".headline{font-size:34px;font-weight:300;line-height:46px}.large-headline{font-size:48px;font-weight:300;line-height:60px}.sub-headline{font-size:18px;font-weight:600;line-height:24px}.mid-headline{font-size:24px;font-weight:600;line-height:33px}.simple{font-size:14px;line-height:19px}.simple-bold{font-size:14px;font-weight:600;line-height:19px}.simple-italic{font-size:14px;font-style:italic;line-height:19px}.note{font-size:12px;line-height:16px}.note-bold{font-size:12px;font-weight:600;line-height:16px}.note-italic{font-size:12px;font-style:italic;line-height:16px}.dato-headline{font-size:34px;font-weight:300;line-height:46px}.dato-large-headline{font-size:48px;font-weight:300;line-height:60px}.dato-sub-headline{font-size:18px;font-weight:600;line-height:24px}.dato-mid-headline{font-size:24px;font-weight:600;line-height:33px}.dato-simple{font-size:14px;line-height:19px}.dato-simple-bold{font-size:14px;font-weight:600;line-height:19px}.dato-simple-italic{font-size:14px;font-style:italic;line-height:19px}.dato-note{font-size:12px;line-height:16px}.dato-note-bold{font-size:12px;font-weight:600;line-height:16px}.dato-note-italic{font-size:12px;font-style:italic;line-height:16px}:host{padding:0 30px 30px;overflow:auto;display:flex;flex:1 1 auto;flex-direction:column;min-width:0;font-size:14px;line-height:19px}"]})],t)}(),hl=function(){function t(){}return t=vt([e.Component({selector:"dato-dialog-footer",template:'<div class="d-flex align-end-center">\n <ng-content></ng-content>\n</div>\n',encapsulation:e.ViewEncapsulation.None,styles:["dato-dialog-footer{display:block;padding:17px 30px 16px}dato-dialog-footer dato-button{margin-left:10px}"]})],t)}(),gl=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.close(this.dialogResult)},t.ctorParameters=function(){return[{type:Qo,decorators:[{type:e.Optional}]}]},vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"onClick",null),vt([e.Input("datoDialogClose"),Ct("design:type",Object)],t.prototype,"dialogResult",void 0),t=vt([e.Directive({selector:"[datoDialogClose]"}),bt(0,e.Optional()),Ct("design:paramtypes",[Qo])],t)}();(
405
+ */(Hs=t.ListValueTypes||(t.ListValueTypes={})).id="id",Hs.object="object";var il,rl=function(a){function s(e,o,i,r){var s=a.call(this)||this;return s.store=e,s.datoSize=o,s.cdr=i,s.host=r,s.idKey="id",s.labelKey="label",s.sortByKey="label",s.labelType="string",s.withSelectAll=!0,s.groupLabel="group",s.withAccordion=!1,s.withGrouping=!1,s.containerHeight="auto",s.clientSearch=!0,s.loading=!1,s.valueType=t.ListValueTypes.id,s.autoId=null,s.isSortList=!0,s._options=[],s.searchTerm="",s.activeIdChanges=new n.ReplaySubject(1),s.visibleIdsChanges=new n.ReplaySubject(1),s.visibleIdsChanges$=s.visibleIdsChanges.asObservable(),s}var l;return ft(s,a),l=s,Object.defineProperty(s.prototype,"options",{set:function(t){this.store.setOptions(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isEmpty",{get:function(){return 0===this._options.length},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){var t=this;this.datoSize=this.datoSize||"sm",this.listClass="list-"+this.datoSize+" dato-list__options",this.hasVisibleItems$=n.combineLatest([this.store.options$,this.visibleIdsChanges$]).pipe(r.map((function(t){var e=St(t,2),n=e[0],o=e[1];return n.length&&o.size>0})),r.shareReplay({refCount:!0,bufferSize:1})),this.store.options$.pipe(i.untilDestroyed(this)).subscribe((function(e){t._options=e,t.withGrouping&&(t.grouping=t.initializeGroups(t._options),t.cdr.detectChanges(),t._options.forEach((function(e){if(t.isGroupOpen(e[t.groupLabel])&&t.optionsWrapper){var n=t.optionsWrapper.nativeElement;n.style.maxHeight=n.scrollHeight+"px"}})));var n=new Set(t._options.map((function(e){return e[t.idKey]})));t.visibleIdsChanges.next(n),t.cdr.markForCheck()})),this.withSelectAll&&this.handleSelectAll()},s.prototype.ngAfterViewInit=function(){var t=this;if(n.merge(this.activeIdChanges.asObservable(),this.optionComponents.changes).pipe(i.untilDestroyed(this)).subscribe((function(){return t.markChecked(t.store.activeIds)})),this.searchController){var e=this.searchController.valueChanges$.pipe(r.debounceTime(150));n.combineLatest([e,this.optionComponents.changes.pipe(r.startWith(this.optionComponents))]).pipe(i.untilDestroyed(this)).subscribe((function(e){var n=St(e,1)[0];t.handleSearch(n),t.withGrouping&&t.cdr.detectChanges()})),this.handleKeyboardNavigation()}},s.prototype.writeValue=function(t){var e=rt.coerceArray(t||[]);this.store.setActive(e),this.activeIdChanges.next()},s.prototype.updateModel=function(){this.onChange(this.store.activeIdsAsArray)},s.prototype.toggleActive=function(e){var n=this,o=e[this.idKey];this.store.toggleActive(this.valueType===t.ListValueTypes.object?e:o),setTimeout((function(){return n.updateModel()}))},s.prototype.checkAll=function(t){var e=this,n=[];t&&this.optionComponents.forEach((function(t){!1===t.hidden&&n.push(t.option[e.idKey])})),this.writeValue(n),this.updateModel()},s.prototype.hasVisibleChildren=function(t){return!!this.grouping[t].visibleChildren.size},s.prototype.toggleGroup=function(t){this.withAccordion&&(this.grouping[t].visible=!this.grouping[t].visible)},s.prototype.isGroupOpen=function(t){return!1===this.withAccordion||this.grouping[t].visible},s.prototype.isDisabled=function(t){var e=t[this.idKey];return this.disabledIds?this.disabledIds.has(e):!!this.enabledIds&&!1===this.enabledIds.has(e)},s.prototype.handleSearch=function(t){var e=this;if(this.clientSearch){var n=new Set;this.optionComponents.forEach((function(o){var i=!0===o.option[e.labelKey].toLowerCase().includes(t.toLowerCase());o.hidden=!i;var r=o.option[e.idKey];if(e.withGrouping){var a=e.grouping[o.option[e.groupLabel]];i?(a.visibleChildren.add(r),n.add(r),a.visible=!0):a.visibleChildren.delete(r)}else i&&n.add(r)})),this.visibleIdsChanges.next(n)}this.searchTerm=t,this.keyManager.setActiveItem(-1),this.cdr.markForCheck()},s.prototype.handleSelectAll=function(){this.selectAllState$=n.combineLatest([this.store.activeIds$,this.visibleIdsChanges$]).pipe(r.map((function(t){var e=St(t,2),n=e[0],o=e[1],i=0;return n.forEach((function(t){return o.has(t)&&i++})),{label:"("+i+"/"+o.size+")",checked:i===o.size,indeterminate:i>0&&i<o.size}})),r.shareReplay({refCount:!0,bufferSize:1}))},s.prototype.initializeGroups=function(t){var e=this;return t.reduce((function(t,n){var o=n[e.groupLabel];return t[o]||(t[o]={visible:!1,visibleChildren:new Set}),t[o].visibleChildren.add(n[e.idKey]),t}),{})},s.prototype.handleKeyboardNavigation=function(){var e=this;this.keyManager=new pt.ActiveDescendantKeyManager(this.optionComponents).withWrap().skipPredicate((function(t){return t.disabled})),this.searchController.keydown$.pipe(i.untilDestroyed(this)).subscribe((function(n){if(n.key===t.KeyboardEventKeys.Enter){e.keyManager.activeItem.checked=!e.keyManager.activeItem.checked;var o=e.keyManager.activeItem.option;e.toggleActive(o)}else{e.keyManager.onKeydown(n);var i=Ft(".list-container",e.host.nativeElement);xi({size:e.datoSize,panel:i,activeItemIndex:e.keyManager.activeItemIndex,groups:[],options:e.options})}}))},s.prototype.markChecked=function(t){var e=this;this.optionComponents.forEach((function(n){var o=n.option[e.idKey];n.checked=t.has(o)})),this.cdr.markForCheck()},s.prototype.ngOnDestroy=function(){},s.ctorParameters=function(){return[{type:ol},{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],s.prototype,"searchController",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"listClass",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"idKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"sortByKey",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"labelType",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"withSelectAll",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"groupLabel",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"withAccordion",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"withGrouping",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"containerHeight",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"clientSearch",void 0),vt([e.Input(),Ct("design:type",Set)],s.prototype,"disabledIds",void 0),vt([e.Input(),Ct("design:type",Set)],s.prototype,"enabledIds",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"loading",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"valueType",void 0),vt([e.Input(),Ct("design:type",Function)],s.prototype,"autoId",void 0),vt([e.Input(),Ct("design:type",Boolean)],s.prototype,"isSortList",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"optionTpl",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"groupHeaderTpl",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"noResultsTpl",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"noDataTpl",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],s.prototype,"options",null),vt([e.ViewChildren(Vi),Ct("design:type",e.QueryList)],s.prototype,"optionComponents",void 0),vt([e.ViewChild("optionsWrapper",{read:e.ElementRef}),Ct("design:type",e.ElementRef)],s.prototype,"optionsWrapper",void 0),s=l=vt([e.Component({selector:"dato-list-v2",template:'<div [class]="listClass">\n <dato-list-select-all [label]="(selectAllState$ | async).label"\n [indeterminatelyChecked]="(selectAllState$ | async).indeterminate"\n [checked]="(selectAllState$ | async).checked"\n (checkAll)="checkAll($event)"\n *ngIf="withSelectAll && hasVisibleItems$ | async"></dato-list-select-all>\n\n <div class="list-container" [style.max-height]="containerHeight">\n <ng-template [ngTemplateOutlet]="withGrouping ? grouping : flat"></ng-template>\n </div>\n\n \x3c!-- This template is for grouping lists and accordion--\x3e\n <ng-template #grouping>\n <div *ngFor="let group of _options | tree:groupLabel | searchResultsGroupSort: searchTerm: { labelKey: labelKey };"\n class="dato-group-option" [class.accordion-list]="withAccordion">\n\n <div class="dato-select__group d-flex items-center" *ngIf="hasVisibleChildren(group.label)" (click)="toggleGroup(group.label)"\n [class.group-open]="isGroupOpen(group.label)"\n [class.dato-select__option]="!withAccordion">\n <ng-template [ngTemplateOutlet]="groupHeaderTpl ? groupHeaderTpl : defaultGroupHeaderTpl"\n [ngTemplateOutletContext]="{ $implicit: group.label, isOpen: isGroupOpen(group.label) }"></ng-template>\n </div>\n\n <div class="options-wrapper"\n #optionsWrapper\n [class.shrink-list]="!isGroupOpen(group.label)">\n <dato-option-v2 multi *ngFor="let option of group.children;"\n [attr.dato-auto-id]="autoId && autoId(option)"\n [disabled]="isDisabled(option)"\n [option]="option"\n (check)="toggleActive(option)">\n <ng-template [ngTemplateOutlet]="optionTpl ? optionTpl : defaultOptionTpl"\n [ngTemplateOutletContext]="{ $implicit: option, searchValue: searchTerm }"></ng-template>\n </dato-option-v2>\n </div>\n </div>\n </ng-template>\n\n \x3c!-- This template is for flat lists --\x3e\n <ng-template #flat>\n <dato-option-v2 multi *ngFor="let option of (isSortList ? (_options | searchResultsSort: searchTerm: { labelKey: sortByKey, labelType: labelType }) : _options);"\n [disabled]="isDisabled(option)"\n [option]="option"\n [attr.dato-auto-id]="autoId && autoId(option)"\n (check)="toggleActive(option)">\n <ng-template [ngTemplateOutlet]="optionTpl ? optionTpl : defaultOptionTpl"\n [ngTemplateOutletContext]="{ $implicit: option, searchValue: searchTerm }"></ng-template>\n </dato-option-v2>\n </ng-template>\n\n\n <ng-template #defaultOptionTpl let-option let-searchValue="searchValue">\n <div [innerHTML]="option[labelKey] | datoHighlight: searchValue" class="ellipsis"></div>\n </ng-template>\n\n <ng-template #defaultGroupHeaderTpl let-isOpen="isOpen" let-label>\n <dato-icon [datoIcon]="isOpen ? \'arrow-down\' : \'arrow-right\'" datoSize="sm" class="mx-8" *ngIf="withAccordion"></dato-icon>\n <span class="dato-simple" >{{ label }} </span>\n </ng-template>\n\n <dato-list-no-result *ngIf="clientSearch && searchTerm && !(hasVisibleItems$ | async)" [customTpl]="noResultsTpl"></dato-list-no-result>\n <ng-container *ngIf="isEmpty">\n <div class="py-10" *ngIf="loading; else noData">\n <span class="dato-spinner-loader lg-loader"></span>\n </div>\n <ng-template #noData>\n <dato-list-no-data [customTpl]="noDataTpl"></dato-list-no-data>\n </ng-template>\n </ng-container>\n\n</div>\n',providers:[ol,{provide:o.NG_VALUE_ACCESSOR,useExisting:l,multi:!0}],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}:host .list-container{overflow-y:auto}"]}),bt(1,e.Attribute("datoSize")),Ct("design:paramtypes",[ol,Object,e.ChangeDetectorRef,e.ElementRef])],s)}(Dt),al=function(){function t(){}return vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"customTpl",void 0),t=vt([e.Component({selector:"dato-list-no-result",template:'\n <ng-template [ngTemplateOutlet]="customTpl ? customTpl : defaultTpl"></ng-template>\n\n <ng-template #defaultTpl>\n <div class="d-flex-1 d-flex-column align-center default-no-results">\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ \'core.no-results-found\' | translate }}</p>\n <p class="dato-note primary-300-color">{{ \'core.try-different-keyword\' | translate }}</p>\n </div>\n </ng-template>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),sl=function(){function t(){}return vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"customTpl",void 0),t=vt([e.Component({selector:"dato-list-no-data",template:'\n <ng-template [ngTemplateOutlet]="customTpl ? customTpl : defaultTpl"></ng-template>\n\n <ng-template #defaultTpl>\n <div class="d-flex-1 d-flex-column align-center default-no-data">\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ \'core.no-available-items\' | translate }}</p>\n </div>\n </ng-template>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ll=function(){function t(){this.indeterminatelyChecked=!1,this.checkAll=new e.EventEmitter}return vt([e.Input(),Ct("design:type",String)],t.prototype,"label",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"indeterminatelyChecked",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"checked",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"checkAll",void 0),t=vt([e.Component({selector:"dato-list-select-all",template:'\n <div class="dato-select__header dato-select__option dato-select__option--simple select-all">\n <dato-checkbox\n (check)="checkAll.emit($event)"\n [checked]="checked"\n [indeterminatelyChecked]="indeterminatelyChecked"\n >\n <span\n >{{ \'core.select-all\' | translate }}\n <span class="primary-300-color note-italic ml-5">{{ label }}</span>\n </span>\n </dato-checkbox>\n </div>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),cl=[rl,al],pl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Hi,Co,Mi,Ge,to,el],declarations:[cl,sl,ll],exports:[cl]})],t)}(),dl=function(){function t(t,e,n){this.dialog=t,this.dialogRef=e,this.element=n,this.draggableEnabled=!1}return Object.defineProperty(t.prototype,"enableClose",{get:function(){return this.options.enableClose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.dialogRef.options||{}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lightning",{get:function(){return this.options.lightning},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.options.draggable&&(this.draggableEnabled=!0,this.draggableDialogElement=this.dialog.getClosestDialogElement(this.element.nativeElement))},t.ctorParameters=function(){return[{type:ti},{type:$o},{type:e.ElementRef}]},t=vt([e.Component({selector:"dato-dialog-header",template:'<div class="d-flex-row justify-between" [class.lightning]="lightning"\n datoDraggable [datoDragTarget]="draggableDialogElement"\n [datoDragHandle]="element" [datoDragEnabled]="draggableEnabled">\n <div class="sub-headline d-flex-1 ellipsis" datoColor="primary-600">\n <ng-content></ng-content>\n </div>\n <dato-icon-button class="x-button" data-auto-id="dialog-header-close" datoDialogDismiss *ngIf="enableClose"\n datoSize="md" datoType="none" datoIcon="close">\n </dato-icon-button>\n</div>\n',encapsulation:e.ViewEncapsulation.None,styles:['dato-dialog-header{display:block;min-height:55px;padding:18px 40px 10px 30px}dato-dialog-header .sub-headline{max-width:100%}dato-dialog-header dato-icon-button.x-button{position:absolute;right:10px;top:10px}dato-dialog-header dato-icon-button.x-button .dato-icon-close{padding:0!important}dato-dialog-header dato-icon-button.x-button .dato-icon-close svg{width:24px;height:24px}dato-dialog-header .lightning{font-family:"Salesforce Sans","Open Sans",sans-serif!important}dato-dialog-header .lightning .sub-headline{text-align:center;font-weight:700}dato-dialog-header .lightning .x-button{top:-40px;right:-4px}']}),Ct("design:paramtypes",[ti,$o,e.ElementRef])],t)}(),ul=function(){function t(){}return t=vt([e.Component({selector:"dato-dialog-content",template:"<ng-content></ng-content>\n",styles:[".headline{font-size:34px;font-weight:300;line-height:46px}.large-headline{font-size:48px;font-weight:300;line-height:60px}.sub-headline{font-size:18px;font-weight:600;line-height:24px}.mid-headline{font-size:24px;font-weight:600;line-height:33px}.simple{font-size:14px;line-height:19px}.simple-bold{font-size:14px;font-weight:600;line-height:19px}.simple-italic{font-size:14px;font-style:italic;line-height:19px}.note{font-size:12px;line-height:16px}.note-bold{font-size:12px;font-weight:600;line-height:16px}.note-italic{font-size:12px;font-style:italic;line-height:16px}.dato-headline{font-size:34px;font-weight:300;line-height:46px}.dato-large-headline{font-size:48px;font-weight:300;line-height:60px}.dato-sub-headline{font-size:18px;font-weight:600;line-height:24px}.dato-mid-headline{font-size:24px;font-weight:600;line-height:33px}.dato-simple{font-size:14px;line-height:19px}.dato-simple-bold{font-size:14px;font-weight:600;line-height:19px}.dato-simple-italic{font-size:14px;font-style:italic;line-height:19px}.dato-note{font-size:12px;line-height:16px}.dato-note-bold{font-size:12px;font-weight:600;line-height:16px}.dato-note-italic{font-size:12px;font-style:italic;line-height:16px}:host{padding:0 30px 30px;overflow:auto;display:flex;flex:1 1 auto;flex-direction:column;min-width:0;font-size:14px;line-height:19px}"]})],t)}(),hl=function(){function t(){}return t=vt([e.Component({selector:"dato-dialog-footer",template:'<div class="d-flex align-end-center">\n <ng-content></ng-content>\n</div>\n',encapsulation:e.ViewEncapsulation.None,styles:["dato-dialog-footer{display:block;padding:17px 30px 16px}dato-dialog-footer dato-button{margin-left:10px}"]})],t)}(),gl=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.close(this.dialogResult)},t.ctorParameters=function(){return[{type:$o,decorators:[{type:e.Optional}]}]},vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"onClick",null),vt([e.Input("datoDialogClose"),Ct("design:type",Object)],t.prototype,"dialogResult",void 0),t=vt([e.Directive({selector:"[datoDialogClose]"}),bt(0,e.Optional()),Ct("design:paramtypes",[$o])],t)}();(
406
406
  /**
407
407
  * @license
408
408
  * Copyright Datorama. All Rights Reserved.
@@ -410,7 +410,7 @@ function Gs(t,e,n){var o=t.get("from"),i=t.get("to");if(!Vs(o,e,n)&&!Vs(i,e,n)){
410
410
  * Use of this source code is governed by an Apache License 2.0 license that can be
411
411
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
412
412
  */
413
- il=t.RenderMethod||(t.RenderMethod={})).Component="Component",il.Template="Template",il.Text="Text";var fl,ml=function(){function n(){this.renderMethod=t.RenderMethod.Text}return Object.defineProperty(n.prototype,"content",{get:function(){return this._content},set:function(t){this._content=t,this.setRenderMethod()},enumerable:!0,configurable:!0}),n.prototype.setRenderMethod=function(){"string"==typeof this.content?this.renderMethod=t.RenderMethod.Text:this.content instanceof e.TemplateRef?this.renderMethod=t.RenderMethod.Template:this.renderMethod=t.RenderMethod.Component},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],n.prototype,"content",null),n=vt([e.Component({selector:"dato-dynamic-content",template:'<ng-container [ngSwitch]="renderMethod">\n <div *ngSwitchCase="\'Text\'" [innerHTML]="content"></div>\n <ng-container *ngSwitchCase="\'Template\'">\n <ng-container *ngTemplateOutlet="content"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Component\'">\n <ng-container *ngComponentOutlet="content"></ng-container>\n </ng-container>\n</ng-container>',changeDetection:e.ChangeDetectionStrategy.OnPush})],n)}(),yl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[ml],exports:[ml]})],t)}(),vl=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.dismiss(this.dialogResult)},t.ctorParameters=function(){return[{type:Qo,decorators:[{type:e.Optional}]}]},vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"onClick",null),vt([e.Input("datoDialogDismiss"),Ct("design:type",Object)],t.prototype,"dialogResult",void 0),t=vt([e.Directive({selector:"[datoDialogDismiss]"}),bt(0,e.Optional()),Ct("design:paramtypes",[Qo])],t)}(),bl=[$o,dl,ul,hl,gl,vl,Jo],Cl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,Ge,Ro,yl,to,In],providers:[ti,Qo],declarations:[bl],exports:[bl],entryComponents:[$o,Jo]})],t)}(),wl=function(){function t(t,e){this.hotkeys=t,this.host=e}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this.subscription&&this.subscription.unsubscribe(),this._options=t,this.init()},enumerable:!0,configurable:!0}),t.prototype.init=function(){var t=this;this.options.target=this.host.nativeElement,this.options.handler=this.options.handler||function(){},this.subscription=this.hotkeys.addShortcut(this.options).pipe(i.untilDestroyed(this)).subscribe((function(e){t.options.handler(e)}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:Za},{type:e.ElementRef}]},vt([e.Input("datoHotkeys"),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),t=vt([e.Directive({selector:"[datoHotkeys]"}),Ct("design:paramtypes",[Za,e.ElementRef])],t)}(),Sl=function(){function t(){}return t=vt([e.NgModule({imports:[Cl,se,s.CommonModule,Co],declarations:[Ya,wl],exports:[wl],entryComponents:[Ya]})],t)}(),xl=function(){function t(t,e,n,i){this.cdr=t,this.translate=e,this.gridService=n,this.gridQuery=i,this.searchPlaceholder=this.translate.transform("core.search"),this.hasSelectedRows=!1,this.searchControl=new o.FormControl}return Object.defineProperty(t.prototype,"isServerSide",{get:function(){return this.gridQuery.isServerSide},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"searchDebounceTime",{get:function(){var t=this.gridQuery.getGridOptions().searchDebounceTime,e=ka.CLIENT,n=ka.SERVER;return t>=0?t:this.isServerSide?n:e},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.subscribeOnSearchChange(),this.subscribeOnSearchExternalChange(),this.gridQuery.selectedRowsChange$.subscribe((function(e){t.hasSelectedRows=ye(e)>0||t.gridQuery.isServerSelectAllRowsEnabled,t.cdr.detectChanges()}))},t.prototype.ngOnDestroy=function(){},t.prototype.subscribeOnSearchChange=function(){var t=this;this.searchControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.gridService.setSearchTerm(e),t.isServerSide||(t.gridService.notifyFilterUpdate(),t.gridQuery.getGridOptions().enableSearchHighlight&&t.gridService.api.grid.refreshCells({force:!0}))}))},t.prototype.subscribeOnSearchExternalChange=function(){var t=this;this.gridQuery.selectSearchTerm().pipe(r.filter((function(e){return e!==t.searchControl.value})),i.untilDestroyed(this)).subscribe((function(e){t.searchControl.setValue(e)}))},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn},{type:Ua},{type:wr}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"searchPlaceholder",void 0),t=vt([e.Component({selector:"dato-grid-search-bar",template:'<div class="d-flex">\n <dato-input datoSize="md" class="search" type="search" [formControl]="searchControl" [debounceTime]="searchDebounceTime"\n [ngClass]="!hasSelectedRows ? \'big-search\' : \'search\'" [placeholder]="searchPlaceholder" data-auto-id="grid-search-input">\n </dato-input>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host .invisible,:host .visibility-animation,:host .visible{transition-property:visibility;transition-duration:.3s;transition-timing-function:linear}:host .big-search,:host .search,:host .width-animation{transition-property:width;transition-duration:.3s;transition-timing-function:linear}:host .visible{visibility:visible}:host .invisible{visibility:hidden}:host .search{width:206px}:host .big-search{width:400px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,Mn,Ua,wr])],t)}(),Ol=function(){function t(){this.actionClick=new e.EventEmitter}return Object.defineProperty(t.prototype,"buttonAutoId",{get:function(){return this.isRowActions?"grid-toolbar-more-actions":"grid-toolbar-general-more-actions"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasActiveMoreActions",{get:function(){return!this.isRowActions||this.actions.some((function(t){return t.visible}))},enumerable:!0,configurable:!0}),t.prototype.isActionDisabled=function(t){return this.isRowActions&&!t.visible},t.prototype.getActionMenu=function(t){return t.getMenu?t.getMenu():null},t.prototype.onActionClick=function(t){this.actionClick.emit(t)},vt([e.Input(),Ct("design:type",Array)],t.prototype,"actions",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"isRowActions",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"actionClick",void 0),t=vt([e.Component({selector:"dato-grid-toolbar-more-menu",template:'<div class="mr-5" [class.force-hide]="actions.length === 0">\n <dato-link datoType="secondary" [disabled]="!hasActiveMoreActions" [class.disabled-action]="!hasActiveMoreActions" [datoMenuTriggerFor]="menu"\n [attr.data-auto-id]="buttonAutoId">\n <dato-icon icon="chevron-down" height="18px" width="18px"></dato-icon>\n {{ \'core.more-actions\' | translate }}\n </dato-link>\n</div>\n\n<dato-menu #menu="datoMenu" menuClass="grid-more-actions" placement="bottom-start">\n <ng-template datoMenuContent>\n <button datoMenuItem *ngFor="let action of actions; index as i"\n [attr.data-auto-id]="\'grid-toolbar-more-action-\' + action.key"\n [attr.data-action-index]="\'grid-toolbar-more-action-\' + i"\n [datoMenuTriggerFor]="getActionMenu(action)"\n [disabled]="isActionDisabled(action)"\n (click)="onActionClick(action)">\n <dato-icon [icon]="action.icon" class="mr-8" height="18px" width="18px"></dato-icon>\n {{ action.label | translate }}\n </button>\n </ng-template>\n\n\n</dato-menu>',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Dl=function(){function n(e){var n;this.cdr=e,this.defaultConfigByStatus=((n={})[t.GridStatusColumnTypes.SUCCESS]={icon:"success-line",iconCssClass:"green-400-color"},n[t.GridStatusColumnTypes.FAILURE]={icon:"failed-line",iconCssClass:"red-400-color"},n[t.GridStatusColumnTypes.PENDING]={icon:"time",iconCssClass:"yellow-400-color"},n[t.GridStatusColumnTypes.WAITING]={icon:"info-line",iconCssClass:"orange-400-color"},n[t.GridStatusColumnTypes.IN_PROGRESS]={showSpinner:!0},n)}return n.prototype.agInit=function(t){var e=t.value,n=t.valueFormatted,o=t.node;this.status=n||e,this.isGroup=o.group,this.isGroup||this.initCellData(t)},n.prototype.initCellData=function(t){var e=t.colDef,n=e.customCellConfig,o=e.valueToCustomCellConfig,i=n||{},r=o&&o[t.value]||{},a=mt(mt({},i),r),s=a.textCssClass,l=a.icon,c=a.iconCssClass,p=a.showSpinner,d=a.getAdditionalText,u=a.additionalTextCssClass,h=a.getIsVisible,g=a.status,f=this.defaultConfigByStatus[g]||{};this.isVisible=!h||h(t.data),this.icon=l||f.icon,this.iconCssClass=c||f.iconCssClass||"",this.textCssClass=s||"",this.additionalTextCssClass=u||"",this.showSpinner=!!p||!!f.showSpinner,this.additionalText=d?d(t.data):null},n.prototype.refresh=function(t){return this.agInit(t),this.cdr.detectChanges(),!0},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},n=vt([e.Component({selector:"dato-grid-status-cell",template:'<div *ngIf="!isGroup && isVisible" class="height-100 d-flex items-center">\n <dato-icon *ngIf="icon" class="mr-6 {{iconCssClass}}" [icon]="icon" datoSize="sm"></dato-icon>\n <dato-page-loader *ngIf="showSpinner" [salesforce]="true" size="x-small" class="mr-10 mt-15"></dato-page-loader>\n <div class="dato-simple status line-height-18 {{textCssClass}}" [class.ellipsis]="!additionalText"\n [datoTooltipV2]="status" [showOnlyOnTextOverflow]="true" [tooltipCheckInView]="false">\n {{status}}\n </div>\n <div *ngIf="additionalText" class="dato-simple ml-3 ellipsis line-height-18 {{additionalTextCssClass}}"\n [datoTooltipV2]="status + \' \' + additionalText" [showOnlyOnTextOverflow]="true" [tooltipCheckInView]="false">\n {{additionalText}}\n </div>\n</div>\n<span *ngIf="isGroup">{{status}}</span>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".line-height-18{line-height:18px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],n)}(),Il=function(){function t(){this.DEFAULT_MAX_VISIBLE_ITEMS=2}return t.prototype.agInit=function(t){var e=(t.colDef.customCellConfig||{}).maxLabels||this.DEFAULT_MAX_VISIBLE_ITEMS,n=this.getItems(t);this.visibleItems=n.slice(0,e),this.remainingItems=n.length>2&&n.slice(e,n.length)},t.prototype.getItems=function(t){var e=t.colDef.customCellConfig;return e&&e.getItems&&t.data?e.getItems(t.data):t.value&&t.value.length?Array.isArray(t.value)?t.value:t.value.split(","):[]},t.prototype.refresh=function(){return!1},t=vt([e.Component({selector:"dato-grid-items-cell",template:'<div class="height-100 d-flex items-center primary-500-color grid-items-cell">\n <div *ngFor="let label of visibleItems"\n class="chip accent-100-background-color px-15 mx-4 d-flex align-center"\n [datoTooltipV2]="label" [showOnlyOnTextOverflow]="true" [tooltipCheckInView]="false">\n {{label}}\n </div>\n <div class="chip d-flex align-center accent-100-background-color ml-4 px-6" *ngIf="remainingItems"\n [datoTooltipV2]="tpl" placement="right" [tooltipCheckInView]="false" variation="information" [options]="{maxWidth: 450}">\n +{{remainingItems.length}}</div>\n\n <ng-template #tpl>\n <div class="d-flex-column">\n <span *ngFor="let label of remainingItems">{{label}}</span>\n </div>\n </ng-template>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".grid-items-cell{font-size:11px}.grid-items-cell .chip{height:20px;border-radius:2px}"]})],t)}(),Tl=function(){function t(){}return t.prototype.agInit=function(t){var e=t.node,n=t.valueFormatted,o=t.value;this.isGroup=e.group,this.isGroup?this.text=n||o:this.initCellData(t)},t.prototype.initCellData=function(t){var e=t.colDef,n=t.data,o=t.valueFormatted,i=t.value,r=e.customCellConfig;if(r&&r.initialsConfig&&n){var a=r.initialsConfig,s=a.isBold,l=a.firstNameField,c=a.lastNameField,p=a.fullNameField,d=a.getFullName;this.isBold=s,d?this.text=d(n):l&&c?this.text=n[l]+" "+n[c]:p&&(this.text=""+n[p])}this.text||(this.text=o||i),this.text&&(this.initials=this.text.split(" ").map((function(t){return t.length>0?Ie(t.charAt(0)):""})).join(""))},t.prototype.refresh=function(){return!1},t=vt([e.Component({selector:"dato-grid-initials-cell",template:'<div *ngIf="!isGroup" class="height-100 d-flex items-center primary-500-color initials-container">\n <div *ngIf="initials" class="initials text-center mr-12" [class.bold]="isBold">{{ initials }}</div>\n <div class="ellipsis" [class.bold]="isBold">{{text}}</div>\n</div>\n\n<span *ngIf="isGroup">{{text}}</span>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".initials-container .initials{width:34px;height:34px;line-height:33px;border-radius:50%;font-size:15px;flex:0 0 auto}.initials-container.bold{font-weight:600}"]})],t)}(),Rl=function(){function t(){}return t.prototype.agInit=function(t){var e=t.colDef,n=t.data,o=t.value,i=t.valueFormatted,r=t.node,a=e.customCellConfig;if(this.isGroup=r.group,this.text=i||o,!this.isGroup&&a){var s=a.getImageUrl;this.imageUrl=s?s(n):null}},t.prototype.refresh=function(){return!1},t=vt([e.Component({selector:"dato-grid-avatar-cell",template:'<div *ngIf="!isGroup" class="height-100 d-flex items-center primary-500-color avatar-container">\n <div *ngIf="imageUrl" [style.background-image]="\'url(\' + imageUrl + \')\'" class="avatar text-center mr-12"></div>\n <div class="ellipsis">{{text}}</div>\n</div>\n\n<span *ngIf="isGroup">{{text}}</span>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".avatar-container .avatar{width:34px;height:34px;border-radius:50%;background-size:contain;flex:0 0 auto}"]})],t)}(),Al=function(){function t(){}return t.prototype.agInit=function(t){var e=t.colDef.customCellConfig;if(this.itemsCount=t.value,this.isGroup=t.node.group,e){var n=e.getItems,o=e.icon;this.tooltipItems=n&&t.data?n(t.data):[],this.icon=o}},t.prototype.refresh=function(){return!1},t=vt([e.Component({selector:"dato-grid-items-count-cell",template:'<div *ngIf="!isGroup else group" class="d-flex">\n <div *ngIf="itemsCount >= 0" class="d-flex items-center primary-500-color accent-500-color:h" [datoTooltipV2]="tplTooltip"\n placement="right" variation="information" [tooltipCheckInView]="false" [datoTooltipDisabled]="!tooltipItems">\n <dato-icon *ngIf="icon" [icon]="icon" width="18px" height="18px" class="mr-10"></dato-icon>\n <span>{{ itemsCount }}</span>\n </div>\n</div>\n\n<ng-template #group>\n {{itemsCount}}\n</ng-template>\n\n<ng-template #tplTooltip>\n <div class="d-flex-column">\n <span *ngFor="let item of tooltipItems">{{ item }}</span>\n </div>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),El=[Ja,is,ns,Xa,xa,Ha,Qa,Ka,Wa,ha,wa,as,rs,Ol,es,ts,Yr,na,qa,xl],Pl=[Dl,Il,Al,Tl,Rl],kl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule,to,Ro,Ge,se,xo,Co,ps,fi,Hi,qi,wo,ms,Cs,Ts,ks,Xs,Wi,el,st.AgGridModule,pl,Sl,Mi],entryComponents:[xa,Ha,ha,wa,es,ts,Yr,na,qa,Pl],declarations:[El,Pl],exports:[El,Pl]})],t)}(),_l={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return jl})),multi:!0},jl=function(t){function o(e,n,o){var i=t.call(this)||this;return i.renderer=e,i.cdr=n,i.host=o,i.id=Math.random().toString(),i}return ft(o,t),Object.defineProperty(o.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.inputElement,"change").pipe(r.pluck("target","value"),i.untilDestroyed(this)).subscribe((function(e){t.onChange(e),t.cdr.markForCheck()}))},o.prototype.writeValue=function(t){this.setInputValue(t===this.value)},o.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},o.prototype.ngOnDestroy=function(){},o.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"checked",t)},o.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String)],o.prototype,"name",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"value",void 0),o=vt([e.Component({selector:"dato-radio",template:'<div class="dato-radio">\n <input [id]="id" [name]="name" type="radio" [value]="value">\n <label [attr.for]="id" class="radio-label d-flex items-start"><span class="dato-simple"><ng-content></ng-content></span></label>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoRadio",providers:[_l],styles:[':host{display:block}.dato-radio{margin:.5rem;display:inline-block}.dato-radio label{cursor:pointer}.dato-radio input[type=radio]{position:absolute;opacity:0;min-width:10px!important;max-width:10px!important}.dato-radio input[type=radio]+.radio-label:before{content:"";border-radius:100%;display:inline-block;box-sizing:border-box;min-width:16px;width:16px;height:16px;position:relative;top:1px;margin-right:10px;vertical-align:middle;cursor:pointer;text-align:center;transition:250ms}.dato-radio input[type=radio]:focus+.radio-label:before{outline:0}.dato-radio input[type=radio]+.radio-label:empty:before{margin-right:0}']}),Ct("design:paramtypes",[e.Renderer2,e.ChangeDetectorRef,e.ElementRef])],o)}(Dt),Ml=[jl],Ll=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Io],declarations:[Ml],exports:[Ml]})],t)}();function Nl(){return{duration:4e3,dismissible:!1}}
413
+ il=t.RenderMethod||(t.RenderMethod={})).Component="Component",il.Template="Template",il.Text="Text";var fl,ml=function(){function n(){this.renderMethod=t.RenderMethod.Text}return Object.defineProperty(n.prototype,"content",{get:function(){return this._content},set:function(t){this._content=t,this.setRenderMethod()},enumerable:!0,configurable:!0}),n.prototype.setRenderMethod=function(){"string"==typeof this.content?this.renderMethod=t.RenderMethod.Text:this.content instanceof e.TemplateRef?this.renderMethod=t.RenderMethod.Template:this.renderMethod=t.RenderMethod.Component},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],n.prototype,"content",null),n=vt([e.Component({selector:"dato-dynamic-content",template:'<ng-container [ngSwitch]="renderMethod">\n <div *ngSwitchCase="\'Text\'" [innerHTML]="content"></div>\n <ng-container *ngSwitchCase="\'Template\'">\n <ng-container *ngTemplateOutlet="content"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="\'Component\'">\n <ng-container *ngComponentOutlet="content"></ng-container>\n </ng-container>\n</ng-container>',changeDetection:e.ChangeDetectionStrategy.OnPush})],n)}(),yl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[ml],exports:[ml]})],t)}(),vl=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.dismiss(this.dialogResult)},t.ctorParameters=function(){return[{type:$o,decorators:[{type:e.Optional}]}]},vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"onClick",null),vt([e.Input("datoDialogDismiss"),Ct("design:type",Object)],t.prototype,"dialogResult",void 0),t=vt([e.Directive({selector:"[datoDialogDismiss]"}),bt(0,e.Optional()),Ct("design:paramtypes",[$o])],t)}(),bl=[Qo,dl,ul,hl,gl,vl,Jo],Cl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,Ge,Ro,yl,to,In],providers:[ti,$o],declarations:[bl],exports:[bl],entryComponents:[Qo,Jo]})],t)}(),wl=function(){function t(t,e){this.hotkeys=t,this.host=e}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this.subscription&&this.subscription.unsubscribe(),this._options=t,this.init()},enumerable:!0,configurable:!0}),t.prototype.init=function(){var t=this;this.options.target=this.host.nativeElement,this.options.handler=this.options.handler||function(){},this.subscription=this.hotkeys.addShortcut(this.options).pipe(i.untilDestroyed(this)).subscribe((function(e){t.options.handler(e)}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:Za},{type:e.ElementRef}]},vt([e.Input("datoHotkeys"),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),t=vt([e.Directive({selector:"[datoHotkeys]"}),Ct("design:paramtypes",[Za,e.ElementRef])],t)}(),Sl=function(){function t(){}return t=vt([e.NgModule({imports:[Cl,se,s.CommonModule,Co],declarations:[Ya,wl],exports:[wl],entryComponents:[Ya]})],t)}(),xl=function(){function t(t,e,n,i){this.cdr=t,this.translate=e,this.gridService=n,this.gridQuery=i,this.searchPlaceholder=this.translate.transform("core.search"),this.hasSelectedRows=!1,this.searchControl=new o.FormControl}return Object.defineProperty(t.prototype,"isServerSide",{get:function(){return this.gridQuery.isServerSide},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"searchDebounceTime",{get:function(){var t=this.gridQuery.getGridOptions().searchDebounceTime,e=ka.CLIENT,n=ka.SERVER;return t>=0?t:this.isServerSide?n:e},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.subscribeOnSearchChange(),this.subscribeOnSearchExternalChange(),this.gridQuery.selectedRowsChange$.subscribe((function(e){t.hasSelectedRows=ye(e)>0||t.gridQuery.isServerSelectAllRowsEnabled,t.cdr.detectChanges()}))},t.prototype.ngOnDestroy=function(){},t.prototype.subscribeOnSearchChange=function(){var t=this;this.searchControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.gridService.setSearchTerm(e),t.isServerSide||(t.gridService.notifyFilterUpdate(),t.gridQuery.getGridOptions().enableSearchHighlight&&t.gridService.api.grid.refreshCells({force:!0}))}))},t.prototype.subscribeOnSearchExternalChange=function(){var t=this;this.gridQuery.selectSearchTerm().pipe(r.filter((function(e){return e!==t.searchControl.value})),i.untilDestroyed(this)).subscribe((function(e){t.searchControl.setValue(e)}))},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn},{type:Ua},{type:wr}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"searchPlaceholder",void 0),t=vt([e.Component({selector:"dato-grid-search-bar",template:'<div class="d-flex">\n <dato-input datoSize="md" class="search" type="search" [formControl]="searchControl" [debounceTime]="searchDebounceTime"\n [ngClass]="!hasSelectedRows ? \'big-search\' : \'search\'" [placeholder]="searchPlaceholder" data-auto-id="grid-search-input">\n </dato-input>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host .invisible,:host .visibility-animation,:host .visible{transition-property:visibility;transition-duration:.3s;transition-timing-function:linear}:host .big-search,:host .search,:host .width-animation{transition-property:width;transition-duration:.3s;transition-timing-function:linear}:host .visible{visibility:visible}:host .invisible{visibility:hidden}:host .search{width:206px}:host .big-search{width:400px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,Mn,Ua,wr])],t)}(),Ol=function(){function t(){this.actionClick=new e.EventEmitter}return Object.defineProperty(t.prototype,"buttonAutoId",{get:function(){return this.isRowActions?"grid-toolbar-more-actions":"grid-toolbar-general-more-actions"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasActiveMoreActions",{get:function(){return!this.isRowActions||this.actions.some((function(t){return t.visible}))},enumerable:!0,configurable:!0}),t.prototype.isActionDisabled=function(t){return this.isRowActions&&!t.visible},t.prototype.getActionMenu=function(t){return t.getMenu?t.getMenu():null},t.prototype.onActionClick=function(t){this.actionClick.emit(t)},vt([e.Input(),Ct("design:type",Array)],t.prototype,"actions",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"isRowActions",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"actionClick",void 0),t=vt([e.Component({selector:"dato-grid-toolbar-more-menu",template:'<div class="mr-5" [class.force-hide]="actions.length === 0">\n <dato-link datoType="secondary" [disabled]="!hasActiveMoreActions" [class.disabled-action]="!hasActiveMoreActions" [datoMenuTriggerFor]="menu"\n [attr.data-auto-id]="buttonAutoId">\n <dato-icon icon="chevron-down" height="18px" width="18px"></dato-icon>\n {{ \'core.more-actions\' | translate }}\n </dato-link>\n</div>\n\n<dato-menu #menu="datoMenu" menuClass="grid-more-actions" placement="bottom-start">\n <ng-template datoMenuContent>\n <button datoMenuItem *ngFor="let action of actions; index as i"\n [attr.data-auto-id]="\'grid-toolbar-more-action-\' + action.key"\n [attr.data-action-index]="\'grid-toolbar-more-action-\' + i"\n [datoMenuTriggerFor]="getActionMenu(action)"\n [disabled]="isActionDisabled(action)"\n (click)="onActionClick(action)">\n <dato-icon [icon]="action.icon" class="mr-8" height="18px" width="18px"></dato-icon>\n {{ action.label | translate }}\n </button>\n </ng-template>\n\n\n</dato-menu>',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Dl=function(){function n(e){var n;this.cdr=e,this.defaultConfigByStatus=((n={})[t.GridStatusColumnTypes.SUCCESS]={icon:"success-line",iconCssClass:"green-400-color"},n[t.GridStatusColumnTypes.FAILURE]={icon:"failed-line",iconCssClass:"red-400-color"},n[t.GridStatusColumnTypes.PENDING]={icon:"time",iconCssClass:"yellow-400-color"},n[t.GridStatusColumnTypes.WAITING]={icon:"info-line",iconCssClass:"orange-400-color"},n[t.GridStatusColumnTypes.IN_PROGRESS]={showSpinner:!0},n)}return n.prototype.agInit=function(t){var e=t.value,n=t.valueFormatted,o=t.node;this.status=n||e,this.isGroup=o.group,this.isGroup||this.initCellData(t)},n.prototype.initCellData=function(t){var e=t.colDef,n=e.customCellConfig,o=e.valueToCustomCellConfig,i=n||{},r=o&&o[t.value]||{},a=mt(mt({},i),r),s=a.textCssClass,l=a.icon,c=a.iconCssClass,p=a.showSpinner,d=a.getAdditionalText,u=a.additionalTextCssClass,h=a.getIsVisible,g=a.status,f=this.defaultConfigByStatus[g]||{};this.isVisible=!h||h(t.data),this.icon=l||f.icon,this.iconCssClass=c||f.iconCssClass||"",this.textCssClass=s||"",this.additionalTextCssClass=u||"",this.showSpinner=!!p||!!f.showSpinner,this.additionalText=d?d(t.data):null},n.prototype.refresh=function(t){return this.agInit(t),this.cdr.detectChanges(),!0},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},n=vt([e.Component({selector:"dato-grid-status-cell",template:'<div *ngIf="!isGroup && isVisible" class="height-100 d-flex items-center">\n <dato-icon *ngIf="icon" class="mr-6 {{iconCssClass}}" [icon]="icon" datoSize="sm"></dato-icon>\n <dato-page-loader *ngIf="showSpinner" [salesforce]="true" size="x-small" class="mr-10 mt-15"></dato-page-loader>\n <div class="dato-simple status line-height-18 {{textCssClass}}" [class.ellipsis]="!additionalText"\n [datoTooltipV2]="status" [showOnlyOnTextOverflow]="true" [tooltipCheckInView]="false">\n {{status}}\n </div>\n <div *ngIf="additionalText" class="dato-simple ml-3 ellipsis line-height-18 {{additionalTextCssClass}}"\n [datoTooltipV2]="status + \' \' + additionalText" [showOnlyOnTextOverflow]="true" [tooltipCheckInView]="false">\n {{additionalText}}\n </div>\n</div>\n<span *ngIf="isGroup">{{status}}</span>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".line-height-18{line-height:18px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],n)}(),Il=function(){function t(){this.DEFAULT_MAX_VISIBLE_ITEMS=2}return t.prototype.agInit=function(t){var e=(t.colDef.customCellConfig||{}).maxLabels||this.DEFAULT_MAX_VISIBLE_ITEMS,n=this.getItems(t);this.visibleItems=n.slice(0,e),this.remainingItems=n.length>2&&n.slice(e,n.length)},t.prototype.getItems=function(t){var e=t.colDef.customCellConfig;return e&&e.getItems&&t.data?e.getItems(t.data):t.value&&t.value.length?Array.isArray(t.value)?t.value:t.value.split(","):[]},t.prototype.refresh=function(){return!1},t=vt([e.Component({selector:"dato-grid-items-cell",template:'<div class="height-100 d-flex items-center primary-500-color grid-items-cell">\n <div *ngFor="let label of visibleItems"\n class="chip accent-100-background-color px-15 mx-4 d-flex align-center"\n [datoTooltipV2]="label" [showOnlyOnTextOverflow]="true" [tooltipCheckInView]="false">\n {{label}}\n </div>\n <div class="chip d-flex align-center accent-100-background-color ml-4 px-6" *ngIf="remainingItems"\n [datoTooltipV2]="tpl" placement="right" [tooltipCheckInView]="false" variation="information" [options]="{maxWidth: 450}">\n +{{remainingItems.length}}</div>\n\n <ng-template #tpl>\n <div class="d-flex-column">\n <span *ngFor="let label of remainingItems">{{label}}</span>\n </div>\n </ng-template>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".grid-items-cell{font-size:11px}.grid-items-cell .chip{height:20px;border-radius:2px}"]})],t)}(),Tl=function(){function t(){}return t.prototype.agInit=function(t){var e=t.node,n=t.valueFormatted,o=t.value;this.isGroup=e.group,this.isGroup?this.text=n||o:this.initCellData(t)},t.prototype.initCellData=function(t){var e=t.colDef,n=t.data,o=t.valueFormatted,i=t.value,r=e.customCellConfig;if(r&&r.initialsConfig&&n){var a=r.initialsConfig,s=a.isBold,l=a.firstNameField,c=a.lastNameField,p=a.fullNameField,d=a.getFullName;this.isBold=s,d?this.text=d(n):l&&c?this.text=n[l]+" "+n[c]:p&&(this.text=""+n[p])}this.text||(this.text=o||i),this.text&&(this.initials=this.text.split(" ").map((function(t){return t.length>0?Ie(t.charAt(0)):""})).join(""))},t.prototype.refresh=function(){return!1},t=vt([e.Component({selector:"dato-grid-initials-cell",template:'<div *ngIf="!isGroup" class="height-100 d-flex items-center primary-500-color initials-container">\n <div *ngIf="initials" class="initials text-center mr-12" [class.bold]="isBold">{{ initials }}</div>\n <div class="ellipsis" [class.bold]="isBold">{{text}}</div>\n</div>\n\n<span *ngIf="isGroup">{{text}}</span>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".initials-container .initials{width:34px;height:34px;line-height:33px;border-radius:50%;font-size:15px;flex:0 0 auto}.initials-container.bold{font-weight:600}"]})],t)}(),Rl=function(){function t(){}return t.prototype.agInit=function(t){var e=t.colDef,n=t.data,o=t.value,i=t.valueFormatted,r=t.node,a=e.customCellConfig;if(this.isGroup=r.group,this.text=i||o,!this.isGroup&&a){var s=a.getImageUrl;this.imageUrl=s?s(n):null}},t.prototype.refresh=function(){return!1},t=vt([e.Component({selector:"dato-grid-avatar-cell",template:'<div *ngIf="!isGroup" class="height-100 d-flex items-center primary-500-color avatar-container">\n <div *ngIf="imageUrl" [style.background-image]="\'url(\' + imageUrl + \')\'" class="avatar text-center mr-12"></div>\n <div class="ellipsis">{{text}}</div>\n</div>\n\n<span *ngIf="isGroup">{{text}}</span>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".avatar-container .avatar{width:34px;height:34px;border-radius:50%;background-size:contain;flex:0 0 auto}"]})],t)}(),Al=function(){function t(){}return t.prototype.agInit=function(t){var e=t.colDef.customCellConfig;if(this.itemsCount=t.value,this.isGroup=t.node.group,e){var n=e.getItems,o=e.icon;this.tooltipItems=n&&t.data?n(t.data):[],this.icon=o}},t.prototype.refresh=function(){return!1},t=vt([e.Component({selector:"dato-grid-items-count-cell",template:'<div *ngIf="!isGroup else group" class="d-flex">\n <div *ngIf="itemsCount >= 0" class="d-flex items-center primary-500-color accent-500-color:h" [datoTooltipV2]="tplTooltip"\n placement="right" variation="information" [tooltipCheckInView]="false" [datoTooltipDisabled]="!tooltipItems">\n <dato-icon *ngIf="icon" [icon]="icon" width="18px" height="18px" class="mr-10"></dato-icon>\n <span>{{ itemsCount }}</span>\n </div>\n</div>\n\n<ng-template #group>\n {{itemsCount}}\n</ng-template>\n\n<ng-template #tplTooltip>\n <div class="d-flex-column">\n <span *ngFor="let item of tooltipItems">{{ item }}</span>\n </div>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),El=[Ja,is,ns,Xa,xa,Ha,$a,Ka,Wa,ha,wa,as,rs,Ol,es,ts,Yr,na,qa,xl],Pl=[Dl,Il,Al,Tl,Rl],kl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule,to,Ro,Ge,se,xo,Co,ps,fi,Hi,qi,wo,ms,Cs,Ts,ks,Xs,Wi,el,st.AgGridModule,pl,Sl,Mi],entryComponents:[xa,Ha,ha,wa,es,ts,Yr,na,qa,Pl],declarations:[El,Pl],exports:[El,Pl]})],t)}(),_l={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return jl})),multi:!0},jl=function(t){function o(e,n,o){var i=t.call(this)||this;return i.renderer=e,i.cdr=n,i.host=o,i.id=Math.random().toString(),i}return ft(o,t),Object.defineProperty(o.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.inputElement,"change").pipe(r.pluck("target","value"),i.untilDestroyed(this)).subscribe((function(e){t.onChange(e),t.cdr.markForCheck()}))},o.prototype.writeValue=function(t){this.setInputValue(t===this.value)},o.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},o.prototype.ngOnDestroy=function(){},o.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"checked",t)},o.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String)],o.prototype,"name",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"value",void 0),o=vt([e.Component({selector:"dato-radio",template:'<div class="dato-radio">\n <input [id]="id" [name]="name" type="radio" [value]="value">\n <label [attr.for]="id" class="radio-label d-flex items-start"><span class="dato-simple"><ng-content></ng-content></span></label>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoRadio",providers:[_l],styles:[':host{display:block}.dato-radio{margin:.5rem;display:inline-block}.dato-radio label{cursor:pointer}.dato-radio input[type=radio]{position:absolute;opacity:0;min-width:10px!important;max-width:10px!important}.dato-radio input[type=radio]+.radio-label:before{content:"";border-radius:100%;display:inline-block;box-sizing:border-box;min-width:16px;width:16px;height:16px;position:relative;top:1px;margin-right:10px;vertical-align:middle;cursor:pointer;text-align:center;transition:250ms}.dato-radio input[type=radio]:focus+.radio-label:before{outline:0}.dato-radio input[type=radio]+.radio-label:empty:before{margin-right:0}']}),Ct("design:paramtypes",[e.Renderer2,e.ChangeDetectorRef,e.ElementRef])],o)}(Dt),Ml=[jl],Ll=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Io],declarations:[Ml],exports:[Ml]})],t)}();function Nl(){return{duration:4e3,dismissible:!1}}
414
414
  /**
415
415
  * @license
416
416
  * Copyright Datorama. All Rights Reserved.
@@ -432,7 +432,7 @@ il=t.RenderMethod||(t.RenderMethod={})).Component="Component",il.Template="Templ
432
432
  * Use of this source code is governed by an Apache License 2.0 license that can be
433
433
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
434
434
  */
435
- fl=t.SnackbarType||(t.SnackbarType={})).INFO="info",fl.SUCCESS="success",fl.ERROR="error",fl.DRAMATIC_SUCCESS="dramatic-success",fl.DRAMATIC_ERROR="dramatic-error";var Fl=function(){function n(t,n){this.renderer=t,this.host=n,this.showLeftIcon=!1,this.close=new e.EventEmitter,this.closedByAction=!1}return n.prototype.onAnimationEnd=function(t){"core-snackbarOut"===t.animationName&&this.close.emit({closedByAction:this.closedByAction})},Object.defineProperty(n.prototype,"dismissible",{get:function(){return this.options.dismissible},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"duration",{get:function(){return this.options.duration},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;Vt(this.host.nativeElement,"zIndex",Nn()),this.showLeftIcon=!this.isInfo(this.type),this.animate=function(e){return t.renderer.setStyle(t.element,"animation",e)},this.icon=this.options.icon||this.resolveIcon(this.type),this.renderer.addClass(this.element,"dato-snackbar-"+this.type.toLowerCase());var e=this.dismissible?"core-snackbarIn 0.5s":"core-snackbarIn 0.5s, core-snackbarOut 0.5s "+this.duration+"ms";this.animate(e)},n.prototype.onClose=function(){this.animate("core-snackbarOut 0.5s"),this.closedByAction=!0},n.prototype.isInfo=function(e){return e===t.SnackbarType.INFO},n.prototype.isSuccess=function(e){return e===t.SnackbarType.SUCCESS||e===t.SnackbarType.DRAMATIC_SUCCESS},n.prototype.resolveIcon=function(t){if(!this.isInfo(t))return this.isSuccess(t)?"checkmark":"alert"},n.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"options",void 0),vt([e.Input(),Ct("design:type",String)],n.prototype,"type",void 0),vt([e.HostListener("animationend",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],n.prototype,"onAnimationEnd",null),n=vt([e.Component({selector:"dato-snackbar",template:'<div class="d-flex items-center">\n <div class="dato-snackbar-circle mr-7 d-flex justify-center align-center" *ngIf="showLeftIcon">\n <dato-icon [datoIcon]="icon"></dato-icon>\n </div>\n <span datoColor="primary-0" class="dato-snack-content">\n <ng-content></ng-content>\n </span>\n</div>\n\n<dato-icon datoIcon="close" *ngIf="dismissible" (click)="onClose()"></dato-icon>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-snackbar{border-radius:2px;font-size:12px;position:fixed;padding:6px 5px 6px 10px;top:100px;left:50%;min-width:250px;transform:translateX(-50%);box-shadow:0 2px 14px 0 rgba(0,0,0,.2);display:flex;align-items:center;justify-content:space-between}dato-snackbar .dato-icon-close{cursor:pointer}dato-snackbar .dato-snackbar-circle{border-radius:50%}dato-snackbar .dato-snackbar-circle dato-icon:not(.dato-icon-alert) svg{width:10.5px;height:7.5px}@-webkit-keyframes core-snackbarIn{from{transform:translate(-50%,-100px);opacity:0}to{ransform:translate(-50%,100px);opacity:1}}@keyframes core-snackbarIn{from{transform:translate(-50%,-100px);opacity:0}to{ransform:translate(-50%,100px);opacity:1}}@-webkit-keyframes core-snackbarOut{to{transform:translate(-50%,-100px);opacity:0}}@keyframes core-snackbarOut{to{transform:translate(-50%,-100px);opacity:0}}"]}),Ct("design:paramtypes",[e.Renderer2,e.ElementRef])],n)}(),Gl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,In],declarations:[Fl],exports:[Fl],entryComponents:[Fl]})],t)}(),Vl=function(){function t(){}return Object.defineProperty(t.prototype,"afterDismissed",{get:function(){return this._afterDismissed},set:function(t){this._afterDismissed=t},enumerable:!0,configurable:!0}),t}(),zl=function(){function n(t,e,n,o,i){this.translate=t,this.appRef=e,this.resolver=n,this.injector=o,this.document=i}return n.prototype.snack=function(e,n,o,i){var a=this;if(void 0===n&&(n=t.SnackbarType.INFO),void 0===o&&(o={}),e){this.destroy();var s=mt(mt({},{duration:4e3,dismissible:!1}),o);this.contentRef=aa({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:Mt(e)?this.translate.transform(e):e,context:i}),this.component=oa({component:Fl,projectableNodes:this.contentRef.nodes,injector:this.injector,resolver:this.resolver});var l=this.component,c=l.instance,p=l.changeDetectorRef,d=l.location.nativeElement;this.nativeElement=d,o.className&&this.nativeElement.classList.add(o.className);var u=new Vl;return u.afterDismissed=c.close,u.close=c.onClose.bind(c),c.options=s,c.type=n,c.close.pipe(r.take(1)).subscribe((function(){a.destroy()})),p.detectChanges(),this.document.body.appendChild(d),u}},n.prototype.info=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.INFO,n,o)},n.prototype.success=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.SUCCESS,n,o)},n.prototype.error=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.ERROR,n,o)},n.prototype.dramaticSuccess=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.DRAMATIC_SUCCESS,n,o)},n.prototype.dramaticError=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.DRAMATIC_ERROR,n,o)},n.prototype.destroy=function(){this.nativeElement&&(this.contentRef.destroy(this.appRef),this.component.destroy(),this.document.body.removeChild(this.nativeElement),this.contentRef=null,this.component=null,this.nativeElement=null)},n.ctorParameters=function(){return[{type:Mn},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n(e.ɵɵinject(Mn),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:n,providedIn:"root"}),n=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[Mn,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],n)}(),Bl={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Hl})),multi:!0},Hl=function(t){function n(n,o,i,r,a,s){var l=t.call(this)||this;return l.renderer=n,l.host=o,l.small=i,l.fontSize=r,l.standalone=a,l.cdr=s,l.placeholder="",l.maxLength=524288,l.onFocus=new e.EventEmitter,l.onBlur=new e.EventEmitter,l.initialValue="",l.value="",l}return ft(n,t),n.prototype.ngOnInit=function(){ge(this.standalone)&&this.renderer.addClass(this.host.nativeElement,"standalone");var t=Ft(".editable-header-input",this.host.nativeElement);Vt(t,"fontSize",this.fontSize),rt.coerceBooleanProperty(this.small)&&Ut(t,"editable-header-input--small")},Object.defineProperty(n.prototype,"isValueChanged",{get:function(){return this.value!==this.initialValue},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),n.prototype.blur=function(t){this.value||this.revert(),this.onBlur.emit(t)},n.prototype.focus=function(t){this.isValueChanged||t.target.setSelectionRange(0,9999),this.onFocus.emit(t)},n.prototype.revert=function(){this.onChange(this.initialValue),this.setInputValue(this.initialValue),this.value=this.initialValue},n.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},n.prototype.writeValue=function(t){this.initialValue||(this.initialValue=t),this.value=t,this.setInputValue(t),this.cdr.markForCheck()},n.prototype.input=function(t){var e=t.target.value;this.onChange(e),this.value=e},n.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"value",t)},n.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoSmall"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["fontSize"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["standalone"]}]},{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"maxLength",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],n.prototype,"onFocus",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],n.prototype,"onBlur",void 0),n=vt([e.Component({selector:"dato-editable-header",template:'<section [class.initial]="!isValueChanged">\n <input type="text"\n class="ellipsis editable-header-input"\n [maxLength]="maxLength"\n [placeholder]="placeholder"\n (input)="input($event)"\n (blur)="blur($event)"\n (focus)="focus($event)"\n (keyup.esc)="revert()">\n</section>\n',providers:[Bl],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex}section{flex:1}.editable-header-input{padding:5px;margin:0;border-color:transparent;border-width:1px;width:100%;font-size:18px;height:34px;line-height:34px}.editable-header-input--small{font-size:14px;height:30px;line-height:30px}.editable-header-input:focus{outline:0}.initial .editable-header-input{font-style:italic}:host:not(.standalone) section{height:48px;padding:0 32px}:host:not(.standalone) .editable-header-input{width:480px;font-size:18px}"]}),bt(2,e.Attribute("datoSmall")),bt(3,e.Attribute("fontSize")),bt(4,e.Attribute("standalone")),Ct("design:paramtypes",[e.Renderer2,e.ElementRef,Object,Object,Object,e.ChangeDetectorRef])],n)}(Dt),Ul=[Hl],Kl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule],declarations:[Ul],exports:[Ul],entryComponents:[Ul]})],t)}(),Wl=function(){return window&&window.tinymce?window.tinymce:null},Ql=function(t){function r(e,n,o,i){var r=t.call(this)||this;return r.ngZone=e,r.http=n,r.host=o,r.config=i,r.autocompleteOptions={},r.forcePlainTextPasting=!1,r.format="html",r.isOneLine=!1,r.initialValue="",r.defaultPlugins="link fullscreen textcolor colorpicker image lists table textpattern autocomplete",r.defaultToolbar=["fontselect fontsizeselect forecolor backcolor bold italic underline link","alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen"],r}var a;return ft(r,t),a=r,Object.defineProperty(r.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t,this.editor&&this.editor.initialized&&this.editor.setMode(t?"readonly":"design")},enumerable:!0,configurable:!0}),r.prototype.ngAfterViewInit=function(){var t=this;window.tinyMCEPreInit={suffix:"",base:this.config.paths.richText,query:""},window.tinymce?this.init.call(this):this.loadLib().subscribe((function(e){Xt(e,"rich-text-editor"),t.init.call(t),t.loadAutoCompleteStyle()}))},r.prototype.loadLib=function(){return this.http.get(this.config.paths.richText+"/index.js",{responseType:"text"})},r.prototype.loadAutoCompleteStyle=function(){this.http.get(this.config.paths.richText+"/plugins/autocomplete/plugin.css",{responseType:"text"}).subscribe((function(t){Jt(t,"tinymce-autocomplete")}))},r.prototype.initEditor=function(t,e){var o=this;this.ngZone.run((function(){return e.setContent(o.initialValue)})),n.fromEvent(e,"setcontent").pipe(i.untilDestroyed(this)).subscribe((function(t){var e=t.content;"html"===t.format&&e&&o.ngZone.run((function(){return o.onChange(e)}))})),n.fromEvent(e,"change keyup undo redo").pipe(i.untilDestroyed(this)).subscribe((function(){o.ngZone.run((function(){return o.onChange(e.getContent({format:o.format}))}))}))},r.prototype.defaultOptions=function(){var t=this;return{target:this.host.nativeElement,width:this.width||600,height:this.height||300,force_br_newlines:!0,force_p_newlines:!1,resize:"both",branding:!1,inline:this.inline,elementpath:!1,readonly:this.disabled,plugins:this.plugins||this.defaultPlugins,toolbar:Lt(this.toolbar)?this.defaultToolbar:this.toolbar,fontsize_formats:"8px 10px 12px 14px 18px 24px 36px",min_width:480,menubar:!1,autocomplete:this.autocompleteOptions,setup:function(e){t.editor=e,e.on("init",(function(n){t.initEditor(n,e),t.defaultFont&&e.editorCommands.execCommand("fontName",!1,t.defaultFont)})),e.on("keydown",(function(e){return!t.isOneLine||"Enter"!==e.code})),t.forcePlainTextPasting&&e.on("paste",(function(n){t.clearEditorContentStyling(e,n)}))},content_style:this.isOneLine?"\n html { height: 100%; }\n body {\n height: 100%;\n color: rgb(55, 56, 58);\n margin: 0 25px 0 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n p { padding: 0; margin: 0; }\n ":""}},r.prototype.init=function(){var t=mt(mt({},this.defaultOptions()),this.options);this.ngZone.runOutsideAngular((function(){return Wl().init(t)}))},r.prototype.ngOnDestroy=function(){null!==Wl()&&(this.editor.off("paste"),Wl().remove(this.editor))},r.prototype.writeValue=function(t){this.initialValue=t||this.initialValue,this.editor&&this.editor.initialized&&Mt(t)&&this.editor.setContent(t)},r.prototype.setDisabledState=function(t){this.editor&&this.editor.setMode(t?"readonly":"design")},r.prototype.clearEditorContentStyling=function(t,e){e.preventDefault();var n=(e.originalEvent||e).clipboardData.getData("Text");t.execCommand("mceInsertContent",!1,n)},r.ctorParameters=function(){return[{type:e.NgZone},{type:ht.HttpClient},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[Un]}]}]},vt([e.Input(),Ct("design:type",String)],r.prototype,"plugins",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"toolbar",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"menubar",void 0),vt([e.Input(),Ct("design:type",Boolean)],r.prototype,"inline",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"options",void 0),vt([e.Input(),Ct("design:type",Number)],r.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Number)],r.prototype,"height",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"autocompleteOptions",void 0),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],r.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Object)],r.prototype,"forcePlainTextPasting",void 0),vt([e.Input(),Ct("design:type",String)],r.prototype,"defaultFont",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"format",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"isOneLine",void 0),r=a=vt([e.Directive({selector:"[datoRichText]",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),bt(3,e.Inject(Un)),Ct("design:paramtypes",[e.NgZone,ht.HttpClient,e.ElementRef,Object])],r)}(Dt),$l=[Ql],ql=function(){function t(){}return t=vt([e.NgModule({declarations:[$l],exports:[$l]})],t)}(),Yl=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCarouselItem]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Zl={autoRun:!1,datoSize:"lg",loop:!1,selectedIndex:0,showControls:!0,showNavigationArrows:!0,showNavigationButtons:!1,animationTiming:"250ms ease-in"},Xl=function(){function t(){}return t=vt([e.Directive({selector:".dato-carousel-item"})],t)}(),Jl=function(){function t(t,n,o){this.animationBuilder=t,this.cdr=n,this.host=o,this.indexChanged=new e.EventEmitter,this.carouselUlStyle={},this.carouselWrapperStyle={},this.currentSlide=0,this.defaultAutoRunInterval=10}return t.prototype.ngOnChanges=function(t){var e=t.config,n=e.previousValue,o=e.currentValue;if(n){var i=function(t){return n[t]!==o[t]};i("datoSize")&&Qt(this.element,{datoSize:o.datoSize}),i("autoRun")&&this.initAutoRun(o.autoRun),(i("loop")||i("itemWidth"))&&(this.calcCarouselStyle(!0),this.cdr.detectChanges())}else{var r=o.datoSize,a=o.autoRun;r&&Qt(this.element,{datoSize:r}),a&&this.initAutoRun(a)}this.config=mt(mt({},Zl),this.config)},t.prototype.ngAfterViewInit=function(){var t=this;if(this.itemElements.changes.pipe(i.untilDestroyed(this)).subscribe((function(){return t.cdr.detectChanges()})),this.calcCarouselStyle(!1),_t(this.config.selectedIndex)){this.currentSlide=this.config.selectedIndex;var e=(this.hasExtraItems?this.currentSlide+1:this.currentSlide)*this.itemWidth;this.carouselUlStyle.transform="translateX(-"+e+"px)"}this.cdr.detectChanges(),this.indexChanged.emit(this.currentSlide)},t.prototype.ngOnDestroy=function(){this.player&&this.player.destroy()},Object.defineProperty(t.prototype,"itemWidth",{get:function(){return this.config.itemWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.itemElements&&this.itemElements.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowNextArrow",{get:function(){var t=this.itemElements.length-(this.autoRunSub?2:0);return this.config.loop||!(t===this.currentSlide+1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowPrevArrow",{get:function(){return this.config.loop||0!==this.currentSlide},enumerable:!0,configurable:!0}),t.prototype.next=function(){var t=this.currentSlide+1;(this.hasExtraItems||t!==this.items.length)&&(this.currentSlide=t%this.items.length,0===this.currentSlide&&this.preformSlideTransition("0ms ease-in",0),this.preformSlideTransition(),this.indexChanged.emit(this.currentSlide))},t.prototype.prev=function(){(this.config.loop||0!==this.currentSlide)&&(this.currentSlide=(this.currentSlide-1+this.items.length)%this.items.length,this.currentSlide===this.items.length-1&&this.preformSlideTransition("0ms ease-in",(this.items.length+1)*this.itemWidth),this.preformSlideTransition(),this.indexChanged.emit(this.currentSlide))},t.prototype.navigateToSlide=function(t){var e=t%this.items.length,n=Math.abs(this.currentSlide-e);if(n){for(var o=(e>this.currentSlide?this.next:this.prev).bind(this),i=1;i<=n;i++)o();this.cdr.detectChanges()}},Object.defineProperty(t.prototype,"hasExtraItems",{get:function(){return this.config.loop||!!this.autoRunSub},enumerable:!0,configurable:!0}),t.prototype.buildAnimation=function(t,e){var n=_t(e)?e:(this.hasExtraItems?this.currentSlide+1:this.currentSlide)*this.itemWidth;return this.animationBuilder.build([ct.animate(t,ct.style({transform:"translateX(-"+n+"px)"}))])},t.prototype.preformSlideTransition=function(t,e){void 0===t&&(t=this.config.animationTiming),this.player=this.buildAnimation(t,e).create(this.carousel.nativeElement),this.player.play()},t.prototype.calcCarouselStyle=function(t){this.carouselWrapperStyle={width:this.itemWidth+"px"};var e=this.itemElements.length+(this.hasExtraItems?2:0);this.carouselUlStyle={width:this.itemWidth*e+"px"},t&&this.preformSlideTransition("0ms ease-in")},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.initAutoRun=function(t){var e=this;if(this.autoRunSub&&this.autoRunSub.unsubscribe(),this.autoRunSub=null,t){Ut(this.element,"auto-play");var o=1e3*(_t(t)?Math.max(t,1):this.defaultAutoRunInterval);this.autoRunSub=n.interval(o).pipe(i.untilDestroyed(this)).subscribe((function(){return e.next()}))}else Wt(this.element,"auto-play");this.items&&!this.config.loop&&this.calcCarouselStyle(!0)},t.ctorParameters=function(){return[{type:ct.AnimationBuilder},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.ContentChildren(Yl),Ct("design:type",e.QueryList)],t.prototype,"items",void 0),vt([e.ViewChild("carousel",{read:e.ElementRef,static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"carousel",void 0),vt([e.ViewChildren(Xl,{read:e.ElementRef}),Ct("design:type",e.QueryList)],t.prototype,"itemElements",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"config",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"indexChanged",void 0),t=vt([e.Component({selector:"dato-carousel",template:'<section data-auto-id="carousel-wrapper" class="relative carousel-wrapper overflow-hidden" [ngStyle]="carouselWrapperStyle">\n <ul class="carousel-inner d-flex" [ngStyle]="carouselUlStyle" #carousel>\n <li *ngIf="hasExtraItems && items.last" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="items.last.tpl"></ng-container>\n </li>\n <li [attr.data-auto-id]="\'carousel-item-\' + i" *ngFor="let item of items;index as i" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="item.tpl"></ng-container>\n </li>\n <li *ngIf="hasExtraItems && items.first" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="items.first.tpl"></ng-container>\n </li>\n </ul>\n <ng-container *ngIf="hasItems && config.showControls">\n <ng-container *ngIf="config.showNavigationButtons">\n <div class="navigation-buttons absolute d-flex width-100 align-center" data-auto-id="buttons-container">\n <div class="pointer mx-5 circle primary-100-background-color primary-400-background-color:h"\n *ngFor="let item of items; trackBy: \'index\' | trackByProp; index as i"\n [attr.data-auto-id]="\'button-\' + i"\n (click)="navigateToSlide(i)"\n [class.active]="i === currentSlide"\n ></div>\n </div>\n </ng-container>\n <ng-container *ngIf="config.showNavigationArrows">\n <button data-auto-id="arrow-left" (click)="prev()" class="absolute d-flex justify-start pl-8 arrow prev" [class.disabled]="!allowPrevArrow">\n <dato-icon datoIcon="arrow-left" datoSize="md"></dato-icon>\n </button>\n <button data-auto-id="arrow-right" (click)="next()" class="absolute d-flex justify-end pr-8 arrow next" [class.disabled]="!allowNextArrow">\n <dato-icon datoIcon="arrow-right" datoSize="md"></dato-icon>\n </button>\n </ng-container>\n </ng-container>\n</section>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host[datoSize=sm] .circle{height:8px;width:8px;margin:0 8px}:host[datoSize=sm] .arrow,:host[datoSize=sm].auto-play:hover .arrow{align-items:center;bottom:calc(50% - 30px);display:flex;height:60px;opacity:1;width:30px}:host[datoSize=sm] .arrow:hover,:host[datoSize=sm].auto-play:hover .arrow:hover{opacity:1}:host[datoSize=sm] .arrow.next,:host[datoSize=sm].auto-play:hover .arrow.next{border-bottom-left-radius:60px;border-top-left-radius:60px}:host[datoSize=sm] .arrow.prev,:host[datoSize=sm].auto-play:hover .arrow.prev{border-bottom-right-radius:60px;border-top-right-radius:60px}:host[datoSize=sm] .arrow dato-icon[datoSize=md],:host[datoSize=sm].auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:6px}:host[datoSize=md] .arrow,:host[datoSize=md].auto-play:hover .arrow{align-items:center;bottom:calc(50% - 40px);display:flex;height:80px;opacity:1;width:40px}:host[datoSize=md] .arrow:hover,:host[datoSize=md].auto-play:hover .arrow:hover{opacity:1}:host[datoSize=md] .arrow.next,:host[datoSize=md].auto-play:hover .arrow.next{border-bottom-left-radius:80px;border-top-left-radius:80px}:host[datoSize=md] .arrow.prev,:host[datoSize=md].auto-play:hover .arrow.prev{border-bottom-right-radius:80px;border-top-right-radius:80px}:host[datoSize=md] .arrow dato-icon[datoSize=md],:host[datoSize=md].auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:12px}:host.auto-play .arrow{opacity:0}:host .navigation-buttons{height:15px;bottom:10px}:host .circle{transition:background-color .25s ease-in-out,height .25s ease-in-out,width .25s ease-in-out;height:15px;width:15px;margin:0 10px;border-radius:50%}:host .arrow:hover,:host.auto-play:hover .arrow:hover{opacity:1;opacity:.6}:host .arrow.next,:host.auto-play:hover .arrow.next{border-bottom-left-radius:108px;border-top-left-radius:108px;right:0}:host .arrow.prev,:host.auto-play:hover .arrow.prev{border-bottom-right-radius:108px;border-top-right-radius:108px;left:0}:host:not(.auto-play) .arrow.disabled{opacity:1}:host .arrow,:host.auto-play:hover .arrow{align-items:center;bottom:calc(50% - 54px);display:flex;height:108px;opacity:1;width:54px;transition:opacity .25s ease-in-out;border:0;opacity:.3}:host .arrow.next:focus,:host.auto-play:hover .arrow.next:focus{outline:0}:host .arrow.disabled,:host.auto-play:hover .arrow.disabled{cursor:default}:host .arrow.prev:focus,:host.auto-play:hover .arrow.prev:focus{outline:0}:host .arrow dato-icon[datoSize=md],:host.auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:12px}:host ul{list-style:none;margin:0;padding:0}"]}),Ct("design:paramtypes",[ct.AnimationBuilder,e.ChangeDetectorRef,e.ElementRef])],t)}(),tc=[Jl,Yl,Xl],ec=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,Co],declarations:[tc],exports:[tc],entryComponents:[Jl]})],t)}(),nc=0,oc=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"ng-template[datoTabTitle]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),ic=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"ng-template[datoTabContent]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),rc=function(){function t(t,e){this.width=t,this.autoId=e,this.id="dato-tab-"+nc++,this.disabled=!1,this.className=""}return t.prototype.ngAfterContentChecked=function(){this.titleTpl=this.titleTpls.first,this.contentTpl=this.contentTpls.first},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["data-auto-id"]}]}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"id",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"title",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"className",void 0),vt([e.ContentChildren(oc,{descendants:!1}),Ct("design:type",e.QueryList)],t.prototype,"titleTpls",void 0),vt([e.ContentChildren(ic,{descendants:!1}),Ct("design:type",e.QueryList)],t.prototype,"contentTpls",void 0),t=vt([e.Directive({selector:"dato-tab"}),bt(0,e.Attribute("width")),bt(1,e.Attribute("data-auto-id")),Ct("design:paramtypes",[Object,Object])],t)}(),ac=function(){function t(t,n,o,i,r){this.cdr=t,this.host=n,this.datoVertical=o,this.datoNakedActive=i,this.defaultTabWidth=r,this._tabStyle={},this.destroyOnHide=!0,this.tabChange=new e.EventEmitter,this.datoSize="lg"}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.datoVertical&&Ut(this.element,"dato-tabs--vertical"),this.datoNakedActive&&Ut(this.element,"dato-tabs--clean"),this.datoSize=this.datoSize||"md",this.fontSize_="tab-"+this.datoSize},t.prototype.ngAfterContentChecked=function(){var t=this._getTabById(this.activeId);this.activeId=t?t.id:this.tabs.length?this.tabs.first.id:null,this.setInnerTabsStyle(),this.cdr.detectChanges()},t.prototype.select=function(t){var e=this._getTabById(t);if(e&&!e.disabled&&this.activeId!==e.id){var n=!1;this.tabChange.emit({activeId:this.activeId,nextId:e.id,preventDefault:function(){n=!0}}),n||(this.activeId=e.id,this.movePointer())}this.cdr.markForCheck()},t.prototype.setInnerTabsStyle=function(){var t=this;this._tabStyle=this.tabs.reduce((function(e,n){var o=n.width||t.defaultTabWidth;return o&&(o=rt.coerceCssPixelValue(o),e[n.id]={width:o,"max-width":o}),e}),{})},t.prototype.movePointer=function(){if(!this.datoVertical&&!this.datoNakedActive&&this.activeId){var t=this.getActiveTabElement();if(t){var e=this.getPointer();Ht(e,{opacity:1,width:t.clientWidth+"px",transform:"translateX("+t.offsetLeft+"px)"}),n.fromEvent(e,"transitionend").pipe(r.first()).subscribe((function(){Ht(e,{opacity:0})}))}}},t.prototype.getActiveTabElement=function(){var t=this._getTabById(this.activeId),e=this.element.querySelector("#"+t.id);return e&&e.parentNode},t.prototype.getPointer=function(){return this.element.querySelector(".tab-pointer")},t.prototype._getTabById=function(t){var e=this.tabs.filter((function(e){return e.id===t}));return e.length?e[0]:null},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoVertical"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoNakedActive"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoTabWidth"]}]}]},vt([e.ContentChildren(rc),Ct("design:type",e.QueryList)],t.prototype,"tabs",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"activeId",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"destroyOnHide",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"tabChange",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoSize",void 0),t=vt([e.Component({selector:"dato-tabset",template:'<ul role="tablist" class="dato-tabs">\n <div class="tab-pointer"></div>\n <li class="nav-item {{tab.className}}" [ngStyle]="_tabStyle[tab.id]" *ngFor="let tab of tabs; trackBy \'id\' | trackByProp"\n (click.prevent)="select(tab.id)"\n [class.active]="tab.id === activeId"\n [class.disabled]="tab.disabled"\n [attr.data-tab-id]="tab.id"\n [attr.data-tab-is-active]="tab.id === activeId">\n <a [id]="tab.id" class="nav-link" [ngClass]="fontSize_" href role="tab"\n [attr.tabindex]="(tab.disabled ? \'-1\': undefined)"\n [attr.data-auto-id]="tab.autoId || tab.id"\n [attr.aria-controls]="(!destroyOnHide || tab.id === activeId ? tab.id + \'-panel\' : null)"\n [attr.aria-expanded]="tab.id === activeId"\n [attr.aria-disabled]="tab.disabled">\n {{tab.title | translate}}\n <ng-template [ngTemplateOutlet]="tab.titleTpl?.templateRef"></ng-template>\n </a>\n </li>\n</ul>\n<div class="tab-content" data-auto-id="data-tab-content">\n <ng-template ngFor let-tab [ngForOf]="tabs">\n <div class="tab-pane" *ngIf="!destroyOnHide || tab.id === activeId" role="tabpanel" [class.is-hidden]="!this.destroyOnHide && tab.id !== activeId"\n [attr.aria-labelledby]="tab.id" id="{{tab.id}}-panel" [attr.aria-expanded]="tab.id === activeId">\n <ng-template [ngTemplateOutlet]="tab.contentTpl?.templateRef"></ng-template>\n </div>\n </ng-template>\n</div>\n',exportAs:"datoTabset",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".headline{font-size:34px;font-weight:300;line-height:46px}.large-headline{font-size:48px;font-weight:300;line-height:60px}.sub-headline{font-size:18px;font-weight:600;line-height:24px}.mid-headline{font-size:24px;font-weight:600;line-height:33px}.simple{font-size:14px;line-height:19px}.simple-bold{font-size:14px;font-weight:600;line-height:19px}.simple-italic{font-size:14px;font-style:italic;line-height:19px}.note{font-size:12px;line-height:16px}.note-bold{font-size:12px;font-weight:600;line-height:16px}.note-italic{font-size:12px;font-style:italic;line-height:16px}.dato-headline{font-size:34px;font-weight:300;line-height:46px}.dato-large-headline{font-size:48px;font-weight:300;line-height:60px}.dato-sub-headline{font-size:18px;font-weight:600;line-height:24px}.dato-mid-headline{font-size:24px;font-weight:600;line-height:33px}.dato-simple{font-size:14px;line-height:19px}.dato-simple-bold{font-size:14px;font-weight:600;line-height:19px}.dato-simple-italic{font-size:14px;font-style:italic;line-height:19px}.dato-note{font-size:12px;line-height:16px}.dato-note-bold{font-size:12px;font-weight:600;line-height:16px}.dato-note-italic{font-size:12px;font-style:italic;line-height:16px}:host ul{position:relative;display:flex;flex-shrink:0;padding:0;margin:0;overflow-x:hidden;list-style:none}:host li{flex:1;cursor:pointer;text-align:center;padding:5px 0;border-bottom:2px solid transparent}:host li a{text-decoration:none}:host .is-hidden{display:none!important}:host .active{transition:border-bottom-color .3s}:host .active a{font-weight:600;transition:color .3s,font-weight .3s}:host[datoNativeWidth] li{flex:none;padding:5px 20px}:host .tab-pointer{height:2px;position:absolute;left:0;bottom:0;transition:transform .3s,width .3s}:host .tab-content{display:flex;flex-direction:column;flex:1 1 auto;overflow-y:auto}:host .tab-content .tab-pane{display:flex;flex-direction:column;flex:1 1 auto}:host(.dato-tabs--vertical){display:flex}:host(.dato-tabs--vertical)>ul{flex-direction:column;flex-shrink:0;box-shadow:inset -5px 5px 5px 0 rgba(0,0,0,.04)}:host(.dato-tabs--vertical)>ul li{display:flex;flex:0;min-width:44px;min-height:40px;padding:2px 2px 0 0}:host(.dato-tabs--vertical)>ul li a{display:flex;flex-grow:1;margin:0 6px;justify-content:center;align-items:center}:host(.dato-tabs--vertical)>.tab-pointer{display:none}.tab-md{font-size:12px;line-height:16px}.tab-lg{font-size:14px;line-height:19px}"]}),bt(2,e.Attribute("datoVertical")),bt(3,e.Attribute("datoNakedActive")),bt(4,e.Attribute("datoTabWidth")),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,Object,Object,Object])],t)}(),sc=[ac,rc,ic,oc],lc=function(){function t(){}return t=vt([e.NgModule({declarations:sc,exports:sc,imports:[s.CommonModule,Co]})],t)}();
435
+ fl=t.SnackbarType||(t.SnackbarType={})).INFO="info",fl.SUCCESS="success",fl.ERROR="error",fl.DRAMATIC_SUCCESS="dramatic-success",fl.DRAMATIC_ERROR="dramatic-error";var Fl=function(){function n(t,n){this.renderer=t,this.host=n,this.showLeftIcon=!1,this.close=new e.EventEmitter,this.closedByAction=!1}return n.prototype.onAnimationEnd=function(t){"core-snackbarOut"===t.animationName&&this.close.emit({closedByAction:this.closedByAction})},Object.defineProperty(n.prototype,"dismissible",{get:function(){return this.options.dismissible},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"duration",{get:function(){return this.options.duration},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;Vt(this.host.nativeElement,"zIndex",Nn()),this.showLeftIcon=!this.isInfo(this.type),this.animate=function(e){return t.renderer.setStyle(t.element,"animation",e)},this.icon=this.options.icon||this.resolveIcon(this.type),this.renderer.addClass(this.element,"dato-snackbar-"+this.type.toLowerCase());var e=this.dismissible?"core-snackbarIn 0.5s":"core-snackbarIn 0.5s, core-snackbarOut 0.5s "+this.duration+"ms";this.animate(e)},n.prototype.onClose=function(){this.animate("core-snackbarOut 0.5s"),this.closedByAction=!0},n.prototype.isInfo=function(e){return e===t.SnackbarType.INFO},n.prototype.isSuccess=function(e){return e===t.SnackbarType.SUCCESS||e===t.SnackbarType.DRAMATIC_SUCCESS},n.prototype.resolveIcon=function(t){if(!this.isInfo(t))return this.isSuccess(t)?"checkmark":"alert"},n.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"options",void 0),vt([e.Input(),Ct("design:type",String)],n.prototype,"type",void 0),vt([e.HostListener("animationend",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],n.prototype,"onAnimationEnd",null),n=vt([e.Component({selector:"dato-snackbar",template:'<div class="d-flex items-center">\n <div class="dato-snackbar-circle mr-7 d-flex justify-center align-center" *ngIf="showLeftIcon">\n <dato-icon [datoIcon]="icon"></dato-icon>\n </div>\n <span datoColor="primary-0" class="dato-snack-content">\n <ng-content></ng-content>\n </span>\n</div>\n\n<dato-icon datoIcon="close" *ngIf="dismissible" (click)="onClose()"></dato-icon>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-snackbar{border-radius:2px;font-size:12px;position:fixed;padding:6px 5px 6px 10px;top:100px;left:50%;min-width:250px;transform:translateX(-50%);box-shadow:0 2px 14px 0 rgba(0,0,0,.2);display:flex;align-items:center;justify-content:space-between}dato-snackbar .dato-icon-close{cursor:pointer}dato-snackbar .dato-snackbar-circle{border-radius:50%}dato-snackbar .dato-snackbar-circle dato-icon:not(.dato-icon-alert) svg{width:10.5px;height:7.5px}@-webkit-keyframes core-snackbarIn{from{transform:translate(-50%,-100px);opacity:0}to{ransform:translate(-50%,100px);opacity:1}}@keyframes core-snackbarIn{from{transform:translate(-50%,-100px);opacity:0}to{ransform:translate(-50%,100px);opacity:1}}@-webkit-keyframes core-snackbarOut{to{transform:translate(-50%,-100px);opacity:0}}@keyframes core-snackbarOut{to{transform:translate(-50%,-100px);opacity:0}}"]}),Ct("design:paramtypes",[e.Renderer2,e.ElementRef])],n)}(),Gl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,In],declarations:[Fl],exports:[Fl],entryComponents:[Fl]})],t)}(),Vl=function(){function t(){}return Object.defineProperty(t.prototype,"afterDismissed",{get:function(){return this._afterDismissed},set:function(t){this._afterDismissed=t},enumerable:!0,configurable:!0}),t}(),zl=function(){function n(t,e,n,o,i){this.translate=t,this.appRef=e,this.resolver=n,this.injector=o,this.document=i}return n.prototype.snack=function(e,n,o,i){var a=this;if(void 0===n&&(n=t.SnackbarType.INFO),void 0===o&&(o={}),e){this.destroy();var s=mt(mt({},{duration:4e3,dismissible:!1}),o);this.contentRef=aa({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:Mt(e)?this.translate.transform(e):e,context:i}),this.component=oa({component:Fl,projectableNodes:this.contentRef.nodes,injector:this.injector,resolver:this.resolver});var l=this.component,c=l.instance,p=l.changeDetectorRef,d=l.location.nativeElement;this.nativeElement=d,o.className&&this.nativeElement.classList.add(o.className);var u=new Vl;return u.afterDismissed=c.close,u.close=c.onClose.bind(c),c.options=s,c.type=n,c.close.pipe(r.take(1)).subscribe((function(){a.destroy()})),p.detectChanges(),this.document.body.appendChild(d),u}},n.prototype.info=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.INFO,n,o)},n.prototype.success=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.SUCCESS,n,o)},n.prototype.error=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.ERROR,n,o)},n.prototype.dramaticSuccess=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.DRAMATIC_SUCCESS,n,o)},n.prototype.dramaticError=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.DRAMATIC_ERROR,n,o)},n.prototype.destroy=function(){this.nativeElement&&(this.contentRef.destroy(this.appRef),this.component.destroy(),this.document.body.removeChild(this.nativeElement),this.contentRef=null,this.component=null,this.nativeElement=null)},n.ctorParameters=function(){return[{type:Mn},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n(e.ɵɵinject(Mn),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:n,providedIn:"root"}),n=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[Mn,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],n)}(),Bl={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Hl})),multi:!0},Hl=function(t){function n(n,o,i,r,a,s){var l=t.call(this)||this;return l.renderer=n,l.host=o,l.small=i,l.fontSize=r,l.standalone=a,l.cdr=s,l.placeholder="",l.maxLength=524288,l.onFocus=new e.EventEmitter,l.onBlur=new e.EventEmitter,l.initialValue="",l.value="",l}return ft(n,t),n.prototype.ngOnInit=function(){ge(this.standalone)&&this.renderer.addClass(this.host.nativeElement,"standalone");var t=Ft(".editable-header-input",this.host.nativeElement);Vt(t,"fontSize",this.fontSize),rt.coerceBooleanProperty(this.small)&&Ut(t,"editable-header-input--small")},Object.defineProperty(n.prototype,"isValueChanged",{get:function(){return this.value!==this.initialValue},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),n.prototype.blur=function(t){this.value||this.revert(),this.onBlur.emit(t)},n.prototype.focus=function(t){this.isValueChanged||t.target.setSelectionRange(0,9999),this.onFocus.emit(t)},n.prototype.revert=function(){this.onChange(this.initialValue),this.setInputValue(this.initialValue),this.value=this.initialValue},n.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},n.prototype.writeValue=function(t){this.initialValue||(this.initialValue=t),this.value=t,this.setInputValue(t),this.cdr.markForCheck()},n.prototype.input=function(t){var e=t.target.value;this.onChange(e),this.value=e},n.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"value",t)},n.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoSmall"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["fontSize"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["standalone"]}]},{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"maxLength",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],n.prototype,"onFocus",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],n.prototype,"onBlur",void 0),n=vt([e.Component({selector:"dato-editable-header",template:'<section [class.initial]="!isValueChanged">\n <input type="text"\n class="ellipsis editable-header-input"\n [maxLength]="maxLength"\n [placeholder]="placeholder"\n (input)="input($event)"\n (blur)="blur($event)"\n (focus)="focus($event)"\n (keyup.esc)="revert()">\n</section>\n',providers:[Bl],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex}section{flex:1}.editable-header-input{padding:5px;margin:0;border-color:transparent;border-width:1px;width:100%;font-size:18px;height:34px;line-height:34px}.editable-header-input--small{font-size:14px;height:30px;line-height:30px}.editable-header-input:focus{outline:0}.initial .editable-header-input{font-style:italic}:host:not(.standalone) section{height:48px;padding:0 32px}:host:not(.standalone) .editable-header-input{width:480px;font-size:18px}"]}),bt(2,e.Attribute("datoSmall")),bt(3,e.Attribute("fontSize")),bt(4,e.Attribute("standalone")),Ct("design:paramtypes",[e.Renderer2,e.ElementRef,Object,Object,Object,e.ChangeDetectorRef])],n)}(Dt),Ul=[Hl],Kl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule],declarations:[Ul],exports:[Ul],entryComponents:[Ul]})],t)}(),Wl=function(){return window&&window.tinymce?window.tinymce:null},$l=function(t){function r(e,n,o,i){var r=t.call(this)||this;return r.ngZone=e,r.http=n,r.host=o,r.config=i,r.autocompleteOptions={},r.forcePlainTextPasting=!1,r.format="html",r.isOneLine=!1,r.initialValue="",r.defaultPlugins="link fullscreen textcolor colorpicker image lists table textpattern autocomplete",r.defaultToolbar=["fontselect fontsizeselect forecolor backcolor bold italic underline link","alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen"],r}var a;return ft(r,t),a=r,Object.defineProperty(r.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t,this.editor&&this.editor.initialized&&this.editor.setMode(t?"readonly":"design")},enumerable:!0,configurable:!0}),r.prototype.ngAfterViewInit=function(){var t=this;window.tinyMCEPreInit={suffix:"",base:this.config.paths.richText,query:""},window.tinymce?this.init.call(this):this.loadLib().subscribe((function(e){Xt(e,"rich-text-editor"),t.init.call(t),t.loadAutoCompleteStyle()}))},r.prototype.loadLib=function(){return this.http.get(this.config.paths.richText+"/index.js",{responseType:"text"})},r.prototype.loadAutoCompleteStyle=function(){this.http.get(this.config.paths.richText+"/plugins/autocomplete/plugin.css",{responseType:"text"}).subscribe((function(t){Jt(t,"tinymce-autocomplete")}))},r.prototype.initEditor=function(t,e){var o=this;this.ngZone.run((function(){return e.setContent(o.initialValue)})),n.fromEvent(e,"setcontent").pipe(i.untilDestroyed(this)).subscribe((function(t){var e=t.content;"html"===t.format&&e&&o.ngZone.run((function(){return o.onChange(e)}))})),n.fromEvent(e,"change keyup undo redo").pipe(i.untilDestroyed(this)).subscribe((function(){o.ngZone.run((function(){return o.onChange(e.getContent({format:o.format}))}))}))},r.prototype.defaultOptions=function(){var t=this;return{target:this.host.nativeElement,width:this.width||600,height:this.height||300,force_br_newlines:!0,force_p_newlines:!1,resize:"both",branding:!1,inline:this.inline,elementpath:!1,readonly:this.disabled,plugins:this.plugins||this.defaultPlugins,toolbar:Lt(this.toolbar)?this.defaultToolbar:this.toolbar,fontsize_formats:"8px 10px 12px 14px 18px 24px 36px",min_width:480,menubar:!1,autocomplete:this.autocompleteOptions,setup:function(e){t.editor=e,e.on("init",(function(n){t.initEditor(n,e),t.defaultFont&&e.editorCommands.execCommand("fontName",!1,t.defaultFont)})),e.on("keydown",(function(e){return!t.isOneLine||"Enter"!==e.code})),t.forcePlainTextPasting&&e.on("paste",(function(n){t.clearEditorContentStyling(e,n)}))},content_style:this.isOneLine?"\n html { height: 100%; }\n body {\n height: 100%;\n color: rgb(55, 56, 58);\n margin: 0 25px 0 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n p { padding: 0; margin: 0; }\n ":""}},r.prototype.init=function(){var t=mt(mt({},this.defaultOptions()),this.options);this.ngZone.runOutsideAngular((function(){return Wl().init(t)}))},r.prototype.ngOnDestroy=function(){null!==Wl()&&(this.editor.off("paste"),Wl().remove(this.editor))},r.prototype.writeValue=function(t){this.initialValue=t||this.initialValue,this.editor&&this.editor.initialized&&Mt(t)&&this.editor.setContent(t)},r.prototype.setDisabledState=function(t){this.editor&&this.editor.setMode(t?"readonly":"design")},r.prototype.clearEditorContentStyling=function(t,e){e.preventDefault();var n=(e.originalEvent||e).clipboardData.getData("Text");t.execCommand("mceInsertContent",!1,n)},r.ctorParameters=function(){return[{type:e.NgZone},{type:ht.HttpClient},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[Un]}]}]},vt([e.Input(),Ct("design:type",String)],r.prototype,"plugins",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"toolbar",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"menubar",void 0),vt([e.Input(),Ct("design:type",Boolean)],r.prototype,"inline",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"options",void 0),vt([e.Input(),Ct("design:type",Number)],r.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Number)],r.prototype,"height",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"autocompleteOptions",void 0),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],r.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Object)],r.prototype,"forcePlainTextPasting",void 0),vt([e.Input(),Ct("design:type",String)],r.prototype,"defaultFont",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"format",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"isOneLine",void 0),r=a=vt([e.Directive({selector:"[datoRichText]",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),bt(3,e.Inject(Un)),Ct("design:paramtypes",[e.NgZone,ht.HttpClient,e.ElementRef,Object])],r)}(Dt),Ql=[$l],ql=function(){function t(){}return t=vt([e.NgModule({declarations:[Ql],exports:[Ql]})],t)}(),Yl=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCarouselItem]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Zl={autoRun:!1,datoSize:"lg",loop:!1,selectedIndex:0,showControls:!0,showNavigationArrows:!0,showNavigationButtons:!1,animationTiming:"250ms ease-in"},Xl=function(){function t(){}return t=vt([e.Directive({selector:".dato-carousel-item"})],t)}(),Jl=function(){function t(t,n,o){this.animationBuilder=t,this.cdr=n,this.host=o,this.indexChanged=new e.EventEmitter,this.carouselUlStyle={},this.carouselWrapperStyle={},this.currentSlide=0,this.defaultAutoRunInterval=10}return t.prototype.ngOnChanges=function(t){var e=t.config,n=e.previousValue,o=e.currentValue;if(n){var i=function(t){return n[t]!==o[t]};i("datoSize")&&$t(this.element,{datoSize:o.datoSize}),i("autoRun")&&this.initAutoRun(o.autoRun),(i("loop")||i("itemWidth"))&&(this.calcCarouselStyle(!0),this.cdr.detectChanges())}else{var r=o.datoSize,a=o.autoRun;r&&$t(this.element,{datoSize:r}),a&&this.initAutoRun(a)}this.config=mt(mt({},Zl),this.config)},t.prototype.ngAfterViewInit=function(){var t=this;if(this.itemElements.changes.pipe(i.untilDestroyed(this)).subscribe((function(){return t.cdr.detectChanges()})),this.calcCarouselStyle(!1),_t(this.config.selectedIndex)){this.currentSlide=this.config.selectedIndex;var e=(this.hasExtraItems?this.currentSlide+1:this.currentSlide)*this.itemWidth;this.carouselUlStyle.transform="translateX(-"+e+"px)"}this.cdr.detectChanges(),this.indexChanged.emit(this.currentSlide)},t.prototype.ngOnDestroy=function(){this.player&&this.player.destroy()},Object.defineProperty(t.prototype,"itemWidth",{get:function(){return this.config.itemWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.itemElements&&this.itemElements.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowNextArrow",{get:function(){var t=this.itemElements.length-(this.autoRunSub?2:0);return this.config.loop||!(t===this.currentSlide+1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowPrevArrow",{get:function(){return this.config.loop||0!==this.currentSlide},enumerable:!0,configurable:!0}),t.prototype.next=function(){var t=this.currentSlide+1;(this.hasExtraItems||t!==this.items.length)&&(this.currentSlide=t%this.items.length,0===this.currentSlide&&this.preformSlideTransition("0ms ease-in",0),this.preformSlideTransition(),this.indexChanged.emit(this.currentSlide))},t.prototype.prev=function(){(this.config.loop||0!==this.currentSlide)&&(this.currentSlide=(this.currentSlide-1+this.items.length)%this.items.length,this.currentSlide===this.items.length-1&&this.preformSlideTransition("0ms ease-in",(this.items.length+1)*this.itemWidth),this.preformSlideTransition(),this.indexChanged.emit(this.currentSlide))},t.prototype.navigateToSlide=function(t){var e=t%this.items.length,n=Math.abs(this.currentSlide-e);if(n){for(var o=(e>this.currentSlide?this.next:this.prev).bind(this),i=1;i<=n;i++)o();this.cdr.detectChanges()}},Object.defineProperty(t.prototype,"hasExtraItems",{get:function(){return this.config.loop||!!this.autoRunSub},enumerable:!0,configurable:!0}),t.prototype.buildAnimation=function(t,e){var n=_t(e)?e:(this.hasExtraItems?this.currentSlide+1:this.currentSlide)*this.itemWidth;return this.animationBuilder.build([ct.animate(t,ct.style({transform:"translateX(-"+n+"px)"}))])},t.prototype.preformSlideTransition=function(t,e){void 0===t&&(t=this.config.animationTiming),this.player=this.buildAnimation(t,e).create(this.carousel.nativeElement),this.player.play()},t.prototype.calcCarouselStyle=function(t){this.carouselWrapperStyle={width:this.itemWidth+"px"};var e=this.itemElements.length+(this.hasExtraItems?2:0);this.carouselUlStyle={width:this.itemWidth*e+"px"},t&&this.preformSlideTransition("0ms ease-in")},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.initAutoRun=function(t){var e=this;if(this.autoRunSub&&this.autoRunSub.unsubscribe(),this.autoRunSub=null,t){Ut(this.element,"auto-play");var o=1e3*(_t(t)?Math.max(t,1):this.defaultAutoRunInterval);this.autoRunSub=n.interval(o).pipe(i.untilDestroyed(this)).subscribe((function(){return e.next()}))}else Wt(this.element,"auto-play");this.items&&!this.config.loop&&this.calcCarouselStyle(!0)},t.ctorParameters=function(){return[{type:ct.AnimationBuilder},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.ContentChildren(Yl),Ct("design:type",e.QueryList)],t.prototype,"items",void 0),vt([e.ViewChild("carousel",{read:e.ElementRef,static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"carousel",void 0),vt([e.ViewChildren(Xl,{read:e.ElementRef}),Ct("design:type",e.QueryList)],t.prototype,"itemElements",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"config",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"indexChanged",void 0),t=vt([e.Component({selector:"dato-carousel",template:'<section data-auto-id="carousel-wrapper" class="relative carousel-wrapper overflow-hidden" [ngStyle]="carouselWrapperStyle">\n <ul class="carousel-inner d-flex" [ngStyle]="carouselUlStyle" #carousel>\n <li *ngIf="hasExtraItems && items.last" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="items.last.tpl"></ng-container>\n </li>\n <li [attr.data-auto-id]="\'carousel-item-\' + i" *ngFor="let item of items;index as i" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="item.tpl"></ng-container>\n </li>\n <li *ngIf="hasExtraItems && items.first" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="items.first.tpl"></ng-container>\n </li>\n </ul>\n <ng-container *ngIf="hasItems && config.showControls">\n <ng-container *ngIf="config.showNavigationButtons">\n <div class="navigation-buttons absolute d-flex width-100 align-center" data-auto-id="buttons-container">\n <div class="pointer mx-5 circle primary-100-background-color primary-400-background-color:h"\n *ngFor="let item of items; trackBy: \'index\' | trackByProp; index as i"\n [attr.data-auto-id]="\'button-\' + i"\n (click)="navigateToSlide(i)"\n [class.active]="i === currentSlide"\n ></div>\n </div>\n </ng-container>\n <ng-container *ngIf="config.showNavigationArrows">\n <button data-auto-id="arrow-left" (click)="prev()" class="absolute d-flex justify-start pl-8 arrow prev" [class.disabled]="!allowPrevArrow">\n <dato-icon datoIcon="arrow-left" datoSize="md"></dato-icon>\n </button>\n <button data-auto-id="arrow-right" (click)="next()" class="absolute d-flex justify-end pr-8 arrow next" [class.disabled]="!allowNextArrow">\n <dato-icon datoIcon="arrow-right" datoSize="md"></dato-icon>\n </button>\n </ng-container>\n </ng-container>\n</section>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host[datoSize=sm] .circle{height:8px;width:8px;margin:0 8px}:host[datoSize=sm] .arrow,:host[datoSize=sm].auto-play:hover .arrow{align-items:center;bottom:calc(50% - 30px);display:flex;height:60px;opacity:1;width:30px}:host[datoSize=sm] .arrow:hover,:host[datoSize=sm].auto-play:hover .arrow:hover{opacity:1}:host[datoSize=sm] .arrow.next,:host[datoSize=sm].auto-play:hover .arrow.next{border-bottom-left-radius:60px;border-top-left-radius:60px}:host[datoSize=sm] .arrow.prev,:host[datoSize=sm].auto-play:hover .arrow.prev{border-bottom-right-radius:60px;border-top-right-radius:60px}:host[datoSize=sm] .arrow dato-icon[datoSize=md],:host[datoSize=sm].auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:6px}:host[datoSize=md] .arrow,:host[datoSize=md].auto-play:hover .arrow{align-items:center;bottom:calc(50% - 40px);display:flex;height:80px;opacity:1;width:40px}:host[datoSize=md] .arrow:hover,:host[datoSize=md].auto-play:hover .arrow:hover{opacity:1}:host[datoSize=md] .arrow.next,:host[datoSize=md].auto-play:hover .arrow.next{border-bottom-left-radius:80px;border-top-left-radius:80px}:host[datoSize=md] .arrow.prev,:host[datoSize=md].auto-play:hover .arrow.prev{border-bottom-right-radius:80px;border-top-right-radius:80px}:host[datoSize=md] .arrow dato-icon[datoSize=md],:host[datoSize=md].auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:12px}:host.auto-play .arrow{opacity:0}:host .navigation-buttons{height:15px;bottom:10px}:host .circle{transition:background-color .25s ease-in-out,height .25s ease-in-out,width .25s ease-in-out;height:15px;width:15px;margin:0 10px;border-radius:50%}:host .arrow:hover,:host.auto-play:hover .arrow:hover{opacity:1;opacity:.6}:host .arrow.next,:host.auto-play:hover .arrow.next{border-bottom-left-radius:108px;border-top-left-radius:108px;right:0}:host .arrow.prev,:host.auto-play:hover .arrow.prev{border-bottom-right-radius:108px;border-top-right-radius:108px;left:0}:host:not(.auto-play) .arrow.disabled{opacity:1}:host .arrow,:host.auto-play:hover .arrow{align-items:center;bottom:calc(50% - 54px);display:flex;height:108px;opacity:1;width:54px;transition:opacity .25s ease-in-out;border:0;opacity:.3}:host .arrow.next:focus,:host.auto-play:hover .arrow.next:focus{outline:0}:host .arrow.disabled,:host.auto-play:hover .arrow.disabled{cursor:default}:host .arrow.prev:focus,:host.auto-play:hover .arrow.prev:focus{outline:0}:host .arrow dato-icon[datoSize=md],:host.auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:12px}:host ul{list-style:none;margin:0;padding:0}"]}),Ct("design:paramtypes",[ct.AnimationBuilder,e.ChangeDetectorRef,e.ElementRef])],t)}(),tc=[Jl,Yl,Xl],ec=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,Co],declarations:[tc],exports:[tc],entryComponents:[Jl]})],t)}(),nc=0,oc=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"ng-template[datoTabTitle]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),ic=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"ng-template[datoTabContent]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),rc=function(){function t(t,e){this.width=t,this.autoId=e,this.id="dato-tab-"+nc++,this.disabled=!1,this.className=""}return t.prototype.ngAfterContentChecked=function(){this.titleTpl=this.titleTpls.first,this.contentTpl=this.contentTpls.first},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["data-auto-id"]}]}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"id",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"title",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"className",void 0),vt([e.ContentChildren(oc,{descendants:!1}),Ct("design:type",e.QueryList)],t.prototype,"titleTpls",void 0),vt([e.ContentChildren(ic,{descendants:!1}),Ct("design:type",e.QueryList)],t.prototype,"contentTpls",void 0),t=vt([e.Directive({selector:"dato-tab"}),bt(0,e.Attribute("width")),bt(1,e.Attribute("data-auto-id")),Ct("design:paramtypes",[Object,Object])],t)}(),ac=function(){function t(t,n,o,i,r){this.cdr=t,this.host=n,this.datoVertical=o,this.datoNakedActive=i,this.defaultTabWidth=r,this._tabStyle={},this.destroyOnHide=!0,this.tabChange=new e.EventEmitter,this.datoSize="lg"}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.datoVertical&&Ut(this.element,"dato-tabs--vertical"),this.datoNakedActive&&Ut(this.element,"dato-tabs--clean"),this.datoSize=this.datoSize||"md",this.fontSize_="tab-"+this.datoSize},t.prototype.ngAfterContentChecked=function(){var t=this._getTabById(this.activeId);this.activeId=t?t.id:this.tabs.length?this.tabs.first.id:null,this.setInnerTabsStyle(),this.cdr.detectChanges()},t.prototype.select=function(t){var e=this._getTabById(t);if(e&&!e.disabled&&this.activeId!==e.id){var n=!1;this.tabChange.emit({activeId:this.activeId,nextId:e.id,preventDefault:function(){n=!0}}),n||(this.activeId=e.id,this.movePointer())}this.cdr.markForCheck()},t.prototype.setInnerTabsStyle=function(){var t=this;this._tabStyle=this.tabs.reduce((function(e,n){var o=n.width||t.defaultTabWidth;return o&&(o=rt.coerceCssPixelValue(o),e[n.id]={width:o,"max-width":o}),e}),{})},t.prototype.movePointer=function(){if(!this.datoVertical&&!this.datoNakedActive&&this.activeId){var t=this.getActiveTabElement();if(t){var e=this.getPointer();Ht(e,{opacity:1,width:t.clientWidth+"px",transform:"translateX("+t.offsetLeft+"px)"}),n.fromEvent(e,"transitionend").pipe(r.first()).subscribe((function(){Ht(e,{opacity:0})}))}}},t.prototype.getActiveTabElement=function(){var t=this._getTabById(this.activeId),e=this.element.querySelector("#"+t.id);return e&&e.parentNode},t.prototype.getPointer=function(){return this.element.querySelector(".tab-pointer")},t.prototype._getTabById=function(t){var e=this.tabs.filter((function(e){return e.id===t}));return e.length?e[0]:null},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoVertical"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoNakedActive"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoTabWidth"]}]}]},vt([e.ContentChildren(rc),Ct("design:type",e.QueryList)],t.prototype,"tabs",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"activeId",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"destroyOnHide",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"tabChange",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoSize",void 0),t=vt([e.Component({selector:"dato-tabset",template:'<ul role="tablist" class="dato-tabs">\n <div class="tab-pointer"></div>\n <li class="nav-item {{tab.className}}" [ngStyle]="_tabStyle[tab.id]" *ngFor="let tab of tabs; trackBy \'id\' | trackByProp"\n (click.prevent)="select(tab.id)"\n [class.active]="tab.id === activeId"\n [class.disabled]="tab.disabled"\n [attr.data-tab-id]="tab.id"\n [attr.data-tab-is-active]="tab.id === activeId">\n <a [id]="tab.id" class="nav-link" [ngClass]="fontSize_" href role="tab"\n [attr.tabindex]="(tab.disabled ? \'-1\': undefined)"\n [attr.data-auto-id]="tab.autoId || tab.id"\n [attr.aria-controls]="(!destroyOnHide || tab.id === activeId ? tab.id + \'-panel\' : null)"\n [attr.aria-expanded]="tab.id === activeId"\n [attr.aria-disabled]="tab.disabled">\n {{tab.title | translate}}\n <ng-template [ngTemplateOutlet]="tab.titleTpl?.templateRef"></ng-template>\n </a>\n </li>\n</ul>\n<div class="tab-content" data-auto-id="data-tab-content">\n <ng-template ngFor let-tab [ngForOf]="tabs">\n <div class="tab-pane" *ngIf="!destroyOnHide || tab.id === activeId" role="tabpanel" [class.is-hidden]="!this.destroyOnHide && tab.id !== activeId"\n [attr.aria-labelledby]="tab.id" id="{{tab.id}}-panel" [attr.aria-expanded]="tab.id === activeId">\n <ng-template [ngTemplateOutlet]="tab.contentTpl?.templateRef"></ng-template>\n </div>\n </ng-template>\n</div>\n',exportAs:"datoTabset",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".headline{font-size:34px;font-weight:300;line-height:46px}.large-headline{font-size:48px;font-weight:300;line-height:60px}.sub-headline{font-size:18px;font-weight:600;line-height:24px}.mid-headline{font-size:24px;font-weight:600;line-height:33px}.simple{font-size:14px;line-height:19px}.simple-bold{font-size:14px;font-weight:600;line-height:19px}.simple-italic{font-size:14px;font-style:italic;line-height:19px}.note{font-size:12px;line-height:16px}.note-bold{font-size:12px;font-weight:600;line-height:16px}.note-italic{font-size:12px;font-style:italic;line-height:16px}.dato-headline{font-size:34px;font-weight:300;line-height:46px}.dato-large-headline{font-size:48px;font-weight:300;line-height:60px}.dato-sub-headline{font-size:18px;font-weight:600;line-height:24px}.dato-mid-headline{font-size:24px;font-weight:600;line-height:33px}.dato-simple{font-size:14px;line-height:19px}.dato-simple-bold{font-size:14px;font-weight:600;line-height:19px}.dato-simple-italic{font-size:14px;font-style:italic;line-height:19px}.dato-note{font-size:12px;line-height:16px}.dato-note-bold{font-size:12px;font-weight:600;line-height:16px}.dato-note-italic{font-size:12px;font-style:italic;line-height:16px}:host ul{position:relative;display:flex;flex-shrink:0;padding:0;margin:0;overflow-x:hidden;list-style:none}:host li{flex:1;cursor:pointer;text-align:center;padding:5px 0;border-bottom:2px solid transparent}:host li a{text-decoration:none}:host .is-hidden{display:none!important}:host .active{transition:border-bottom-color .3s}:host .active a{font-weight:600;transition:color .3s,font-weight .3s}:host[datoNativeWidth] li{flex:none;padding:5px 20px}:host .tab-pointer{height:2px;position:absolute;left:0;bottom:0;transition:transform .3s,width .3s}:host .tab-content{display:flex;flex-direction:column;flex:1 1 auto;overflow-y:auto}:host .tab-content .tab-pane{display:flex;flex-direction:column;flex:1 1 auto}:host(.dato-tabs--vertical){display:flex}:host(.dato-tabs--vertical)>ul{flex-direction:column;flex-shrink:0;box-shadow:inset -5px 5px 5px 0 rgba(0,0,0,.04)}:host(.dato-tabs--vertical)>ul li{display:flex;flex:0;min-width:44px;min-height:40px;padding:2px 2px 0 0}:host(.dato-tabs--vertical)>ul li a{display:flex;flex-grow:1;margin:0 6px;justify-content:center;align-items:center}:host(.dato-tabs--vertical)>.tab-pointer{display:none}.tab-md{font-size:12px;line-height:16px}.tab-lg{font-size:14px;line-height:19px}"]}),bt(2,e.Attribute("datoVertical")),bt(3,e.Attribute("datoNakedActive")),bt(4,e.Attribute("datoTabWidth")),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,Object,Object,Object])],t)}(),sc=[ac,rc,ic,oc],lc=function(){function t(){}return t=vt([e.NgModule({declarations:sc,exports:sc,imports:[s.CommonModule,Co]})],t)}();
436
436
  /**
437
437
  * @license
438
438
  * Copyright Datorama. All Rights Reserved.
@@ -462,7 +462,7 @@ var pc=function(){function t(t){this.host=t,this.close=new e.EventEmitter,this.c
462
462
  * Use of this source code is governed by an Apache License 2.0 license that can be
463
463
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
464
464
  */
465
- function hc(){return{duration:4e3,icon:{color:"primary-300"}}}var gc,fc=function(){function t(t,e,n,o,i){this.translate=t,this.appRef=e,this.resolver=n,this.injector=o,this.document=i,this.toasts=new Map}return t.prototype.open=function(t,e){var n=this;this.container||this.createContainer();var o=ea({duration:4e3,icon:{color:"primary-300"}},e||{});o.id=Math.random();var i=Mt(t);this.contentRef=aa({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:i?this.translate.transform(t):t}),!i&&e.data&&(this.contentRef.componentRef.instance.data=e.data),this.component=oa({component:pc,projectableNodes:this.contentRef.nodes,injector:this.injector,resolver:this.resolver});var a=this.component,s=a.instance,l=a.changeDetectorRef,c=a.location.nativeElement;this.nativeElement=c,s.options=o,this.toasts.set(o.id,{contentRef:this.contentRef,component:this.component,nativeElement:this.nativeElement});var p=new uc;return p.afterDismissed=s.close,s.close.pipe(r.take(1)).subscribe((function(t){var e=t.id;n.destroy(e)})),l.detectChanges(),Yt(this.container,c),p},t.prototype.destroy=function(t){if(this.toasts.has(t)){var e=this.toasts.get(t);e.contentRef.destroy(this.appRef),e.component.destroy(),this.container.removeChild(e.nativeElement),e.nativeElement=null,this.toasts.delete(t)}},t.prototype.createContainer=function(){this.container=$t("div"),Ut(this.container,["d-flex","d-flex-column","dato-toasts-container"]),qt(this.document.body,this.container)},t.ctorParameters=function(){return[{type:Mn},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(Mn),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[Mn,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],t)}(),mc=function(){function t(t){this.host=t,this.ANIMATION_DURATION=300,this.customClass=""}return Object.defineProperty(t.prototype,"options",{set:function(t){var e=t.rect,n=t.offset,o=void 0===n?{}:n,i=this.container;if(Vt(i,"height",rt.coerceCssPixelValue(e.height)),e.boxWidth){var r=rt.coerceCssPixelValue(e.boxWidth);Ht(i,{width:r,minWidth:r})}Ht(this.hostEl,{left:e.left+e.width+(o.left?o.left:0)+"px",top:e.top+(o.top?o.top:0)+"px"})},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;Vt(this.hostEl,"zIndex",Nn()),this.customClass&&Ut(this.hostEl,this.customClass),setTimeout((function(){return Ut(t.hostEl,"overflow-visible")}),this.ANIMATION_DURATION)},Object.defineProperty(t.prototype,"hostEl",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this.host.nativeElement.querySelector(".dato-panel-container")},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),t=vt([e.Component({selector:"dato-panel",template:'<section class="dato-panel-container">\n <ng-content></ng-content>\n</section>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-panel{position:absolute;overflow:hidden}dato-panel.close-panel{overflow:hidden}dato-panel.close-panel .dato-panel-container{-webkit-animation:.3s core-panelSlideOut;animation:.3s core-panelSlideOut}.dato-panel-container ng-component{display:flex;flex-direction:column;height:100%}.dato-panel-header{display:flex;justify-content:space-between;font-size:18px;font-weight:600}.dato-panel-header .dato-icon-close{cursor:pointer;transform:translateX(15px)}.dato-panel-content,.dato-panel-header{padding:12px 24px 10px 30px}.dato-panel-container{-webkit-animation:.3s ease-out core-panelSlideIn;animation:.3s ease-out core-panelSlideIn;min-width:400px;transform-origin:left;height:100%;box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}.dato-panel-backdrop{position:absolute;top:0;right:0;bottom:0;left:0}dato-panel-content{flex:1;font-size:14px}.dato-panel-footer{padding:17px 30px 16px;height:70px}.dato-panel-footer dato-button{margin-left:10px}@-webkit-keyframes core-panelSlideIn{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes core-panelSlideIn{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@-webkit-keyframes core-panelSlideOut{from{transform:translateX(0);opacity:1}to{transform:translateX(-100%);opacity:.7}}@keyframes core-panelSlideOut{from{transform:translateX(0);opacity:1}to{transform:translateX(-100%);opacity:.7}}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}();
465
+ function hc(){return{duration:4e3,icon:{color:"primary-300"}}}var gc,fc=function(){function t(t,e,n,o,i){this.translate=t,this.appRef=e,this.resolver=n,this.injector=o,this.document=i,this.toasts=new Map}return t.prototype.open=function(t,e){var n=this;this.container||this.createContainer();var o=ea({duration:4e3,icon:{color:"primary-300"}},e||{});o.id=Math.random();var i=Mt(t);this.contentRef=aa({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:i?this.translate.transform(t):t}),!i&&e.data&&(this.contentRef.componentRef.instance.data=e.data),this.component=oa({component:pc,projectableNodes:this.contentRef.nodes,injector:this.injector,resolver:this.resolver});var a=this.component,s=a.instance,l=a.changeDetectorRef,c=a.location.nativeElement;this.nativeElement=c,s.options=o,this.toasts.set(o.id,{contentRef:this.contentRef,component:this.component,nativeElement:this.nativeElement});var p=new uc;return p.afterDismissed=s.close,s.close.pipe(r.take(1)).subscribe((function(t){var e=t.id;n.destroy(e)})),l.detectChanges(),Yt(this.container,c),p},t.prototype.destroy=function(t){if(this.toasts.has(t)){var e=this.toasts.get(t);e.contentRef.destroy(this.appRef),e.component.destroy(),this.container.removeChild(e.nativeElement),e.nativeElement=null,this.toasts.delete(t)}},t.prototype.createContainer=function(){this.container=Qt("div"),Ut(this.container,["d-flex","d-flex-column","dato-toasts-container"]),qt(this.document.body,this.container)},t.ctorParameters=function(){return[{type:Mn},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(Mn),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[Mn,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],t)}(),mc=function(){function t(t){this.host=t,this.ANIMATION_DURATION=300,this.customClass=""}return Object.defineProperty(t.prototype,"options",{set:function(t){var e=t.rect,n=t.offset,o=void 0===n?{}:n,i=this.container;if(Vt(i,"height",rt.coerceCssPixelValue(e.height)),e.boxWidth){var r=rt.coerceCssPixelValue(e.boxWidth);Ht(i,{width:r,minWidth:r})}Ht(this.hostEl,{left:e.left+e.width+(o.left?o.left:0)+"px",top:e.top+(o.top?o.top:0)+"px"})},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;Vt(this.hostEl,"zIndex",Nn()),this.customClass&&Ut(this.hostEl,this.customClass),setTimeout((function(){return Ut(t.hostEl,"overflow-visible")}),this.ANIMATION_DURATION)},Object.defineProperty(t.prototype,"hostEl",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this.host.nativeElement.querySelector(".dato-panel-container")},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),t=vt([e.Component({selector:"dato-panel",template:'<section class="dato-panel-container">\n <ng-content></ng-content>\n</section>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-panel{position:absolute;overflow:hidden}dato-panel.close-panel{overflow:hidden}dato-panel.close-panel .dato-panel-container{-webkit-animation:.3s core-panelSlideOut;animation:.3s core-panelSlideOut}.dato-panel-container ng-component{display:flex;flex-direction:column;height:100%}.dato-panel-header{display:flex;justify-content:space-between;font-size:18px;font-weight:600}.dato-panel-header .dato-icon-close{cursor:pointer;transform:translateX(15px)}.dato-panel-content,.dato-panel-header{padding:12px 24px 10px 30px}.dato-panel-container{-webkit-animation:.3s ease-out core-panelSlideIn;animation:.3s ease-out core-panelSlideIn;min-width:400px;transform-origin:left;height:100%;box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}.dato-panel-backdrop{position:absolute;top:0;right:0;bottom:0;left:0}dato-panel-content{flex:1;font-size:14px}.dato-panel-footer{padding:17px 30px 16px;height:70px}.dato-panel-footer dato-button{margin-left:10px}@-webkit-keyframes core-panelSlideIn{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes core-panelSlideIn{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@-webkit-keyframes core-panelSlideOut{from{transform:translateX(0);opacity:1}to{transform:translateX(-100%);opacity:.7}}@keyframes core-panelSlideOut{from{transform:translateX(0);opacity:1}to{transform:translateX(-100%);opacity:.7}}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}();
466
466
  /**
467
467
  * @license
468
468
  * Copyright Datorama. All Rights Reserved.
@@ -484,14 +484,14 @@ function hc(){return{duration:4e3,icon:{color:"primary-300"}}}var gc,fc=function
484
484
  * Use of this source code is governed by an Apache License 2.0 license that can be
485
485
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
486
486
  */
487
- function Dc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function Ic(t,e,n){this.$session=t,this.$row=e,this.$rowTokens=t.getTokens(e);var o=t.getTokenAt(e,n);this.$tokenIndex=o?o.index:-1,this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]}}function Tc(t,e,n,o,i){var r=Rc(n,o),a=function(t,e){var n=new Ic(t,e.row,e.column),o=n.getCurrentToken();for(;o&&!Dc(o,"attribute-name");)o=n.stepBackward();if(o)return o.value}(n,o);if(!r)return[];var s=[];return r in t&&a in t[r]&&"object"==typeof t[r][a]&&(s=Object.keys(t[r][a])),s.map((function(t){return{caption:t,snippet:t,meta:"datorama-value",score:1e7}}))}function Rc(t,e){for(var n=new Ic(t,e.row,e.column),o=n.getCurrentToken();o&&!Dc(o,"tag-name");)o=n.stepBackward();if(o)return o.value}function Ac(t){return{getCompletions:function(e,n,o,i,r){var a=n.getTokenAt(o.row,o.column);return a?((Dc(a,"tag-name")||Dc(a,"tag-open")||Dc(a,"end-tag-open"))&&r(null,function(t,e,n,o,i){return Object.keys(t).map((function(t){return{value:t,caption:t,meta:"datorama-tag",score:1e7}}))}(t)),(Dc(a,"tag-whitespace")||Dc(a,"attribute-name"))&&r(null,function(t,e,n,o,i){var r=Rc(n,o);if(!r)return[];var a=[];return r in t&&(a=a.concat(Object.keys(t[r]))),a.map((function(t){return{caption:t,snippet:t+'="$0"',meta:"datorama-attribute",score:1e7}}))}(t,0,n,o)),Dc(a,"attribute-value")&&r(null,Tc(t,0,n,o)),[]):[]}}}function Ec(t,e,n){n.commands.addCommand({name:"DADotCommand",bindKey:{win:".",mac:"."},exec:function(){var o=n.selection.getCursor(),i=n.session.getDocument().getLine(o.row).trim().slice(0,o.column).split(/\s+/);if(i[0]){n.insert(".");var r=i[i.length-1].match(/DA(?:\.\w+)*/);if(r){var a={getCompletions:function(n,o,i,a,s){s(null,(t[r[0]]||[]).map((function(t){return{caption:t,value:t,meta:"datorama",completer:{insertMatch:function(t,n){t.completer.insertMatch({value:n.caption}),t.completers=e}}}})))}};n.completers=[a]}}}}),n.commands.on("afterExec",(function(t){"DADotCommand"===t.command.name&&n.execCommand("startAutocomplete")}))}var Pc,kc=function(){function t(){this.fetchingAce=!1,this.fetchingBeautify=!1}return t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"})],t)}(),_c=function(){function t(t,e,n,o){var i=this;this.host=t,this.http=e,this.aceService=n,this.config=o,this.disabled=!1,this.defaultOptions={enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,indentedSoftWrap:!1,fontSize:14,useWorker:!0,showPrintMargin:!1,tabSize:2,fontFamily:"Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace'"},this._options=mt({},this.defaultOptions),this.BASE_PATH=this.config.paths.editor,this.waitForAce().subscribe((function(){i.ace.config.set("themePath",i.config.paths.editor+"/themes"),i.editor.setOption("enableEmmet",!0)}))}var a;return a=t,Object.defineProperty(t.prototype,"theme",{set:function(t){this.setTheme(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lang",{set:function(t){this.setLang(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{set:function(t){this._options=mt(mt({},this.defaultOptions),t),this.setOptions()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HTMLCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){e.langTools.setCompleters(xt([Ac(t)],e.getBaseCompletors(e.langTools)))}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"JSObjectCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){Ec(t,e.getBaseCompletors(e.langTools),e.getEditor())}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"langTools",{get:function(){return this.ace.require("ace/ext/language_tools")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ace",{get:function(){return window.ace},enumerable:!0,configurable:!0}),t.prototype.waitForAce=function(){var t=this;return window.ace?(this.initializeEditor(),n.timer(0)):this.aceService.fetchingAce?n.timer(50).pipe(r.repeat(),r.filter((function(){return!!window.ace})),r.tap((function(){t.initializeEditor()})),r.take(1)):this.loadAce()},t.prototype.waitForBeauitify=function(){return window.js_beautify?n.timer(0):this.aceService.fetchingBeautify?n.timer(50).pipe(r.repeat(),r.filter((function(){return!!window.js_beautify})),r.take(1)):this.loadBeautifier()},t.prototype.getEditor=function(){return this.editor},t.prototype.prettier=function(){var t=this;this.waitForBeauitify().subscribe((function(){return t.runBeautify()}))},t.prototype.setTheme=function(t){var e=this;this.waitForAce().subscribe((function(){e.ace.config.set("themePath",e.config.paths.editor+"/themes"),e.editor.setTheme("ace/theme/"+t)}))},t.prototype.ngAfterViewInit=function(){var t=this;this.waitForAce().subscribe((function(){t.setOptions(),t.editor.setAutoScrollEditorIntoView(!0),n.fromEvent(t.editor,"change").pipe(i.untilDestroyed(t)).subscribe((function(){return t.onChange(t.editor.getValue())})),n.fromEvent(t.editor.container,"drop").pipe(i.untilDestroyed(t)).subscribe((function(){return t.editor.clearSelection()}))}))},t.prototype.runBeautify=function(){var t="javascript"===this._lang?"js":this._lang,e=(0,window[t+"_beautify"])(this.editor.getValue(),{indent_size:2,preserve_newlines:!1});this.setValue(e)},t.prototype.getBaseCompletors=function(t){return[t.textCompleter,t.snippetCompleter,t.keyWordCompleter]},t.prototype.createRequests=function(t){var e=this;return t.map((function(t){return e.http.get(e.BASE_PATH+"/"+t,{responseType:"text"})}))},t.prototype.loadAceWorkers=function(){return n.forkJoin.apply(void 0,xt(this.createRequests(["worker-css.js","worker-html.js","worker-javascript.js"])))},t.prototype.loadAceScripts=function(){return n.forkJoin.apply(void 0,xt(this.createRequests(["ace.js","ace-langtools.js","emmet-lib.js","emmet.js","mode-css.js","mode-html.js","mode-javascript.js"])))},t.prototype.loadBeautifier=function(){return this.aceService.fetchingBeautify=!0,n.forkJoin.apply(void 0,xt(this.createRequests(["beautify/base.js","beautify/css.js","beautify/html.js"]))).pipe(r.tap((function(t){Xt(t.join(" "),"beautifires")})))},t.prototype.initializeEditor=function(){this.editor||(this.editor=this.ace.edit(this.host.nativeElement))},t.prototype.loadAce=function(){var t=this;return this.aceService.fetchingAce=!0,this.loadAceScripts().pipe(r.tap((function(e){Xt(e.join(" "),"ace-base"),t.ace.config.set("basePath",t.config.paths.editor)})),r.concatMap((function(){return t.loadAceWorkers()})),r.tap((function(e){Xt(e.join(" "),"ace-workers"),t.initializeEditor()})))},t.prototype.setValue=function(t){var e=this;this.waitForAce().subscribe((function(){e.editor.setValue(t),e.editor.clearSelection()}))},t.prototype.setOptions=function(){var t=this;this.waitForAce().subscribe((function(){return t.editor.setOptions(t._options)}))},t.prototype.setLang=function(t){var e=this;this.waitForAce().subscribe((function(){e._lang=t,e.editor.getSession().setMode("ace/mode/"+t)}))},t.prototype.ngOnDestroy=function(){this.editor&&this.editor.destroy(),this.editor=null},t.prototype.writeValue=function(t){this.setValue(t||"")},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){},t.prototype.setDisabledState=function(t){this.disabled=t},t.ctorParameters=function(){return[{type:e.ElementRef},{type:ht.HttpClient},{type:kc},{type:void 0,decorators:[{type:e.Inject,args:[Un]}]}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"theme",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"lang",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"HTMLCompletions",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"JSObjectCompletions",null),t=a=vt([e.Directive({selector:"[datoAce]",exportAs:"datoAce",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),bt(3,e.Inject(Un)),Ct("design:paramtypes",[e.ElementRef,ht.HttpClient,kc,Object])],t)}(),jc=function(){function t(t){this.host=t,this.host.nativeElement.setAttribute("draggable","true")}return Object.defineProperty(t.prototype,"aceDraggableText",{set:function(t){this.text=t},enumerable:!0,configurable:!0}),t.prototype.drag=function(t){t.dataTransfer.setData("text",this.text)},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"aceDraggableText",null),vt([e.HostListener("dragstart",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Event]),Ct("design:returntype",void 0)],t.prototype,"drag",null),t=vt([e.Directive({selector:"[aceDraggableText]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),Mc=[jc,_c],Lc=function(){function t(){}return t=vt([e.NgModule({declarations:[Mc],exports:[Mc]})],t)}(),Nc=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,Fc=function(){function t(t,e,n,o){this.container=t,this.searchable=e,this.sanitizer=n,this.host=o}return Object.defineProperty(t.prototype,"datoSearchableHighlight",{set:function(t){this._token=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){if(!this.token)throw new Eo("Missing search token, please provide one via input or [datoSearchable] directive");this.container.register(this,!0)},t.prototype.ngOnDestroy=function(){this.container.unregister(this,!0)},Object.defineProperty(t.prototype,"token",{get:function(){return this._token||this.searchable&&this.searchable.token},enumerable:!0,configurable:!0}),t.prototype.highlight=function(t,n){this.host.nativeElement.innerHTML=this.sanitizer.sanitize(e.SecurityContext.HTML,this.resolve(t,n))},t.prototype.resolve=function(t,e){if(!t.toLowerCase().includes(e.toLowerCase()))return t;var n=e.replace(Nc,"\\$&");if(n=n.split(" ").filter((function(t){return t.length>0})).join("|")){var o=new RegExp(n,"gi"),i=String.fromCharCode(127);return t.replace(/\s/g,i).replace(o,(function(t){return'<span class="dato-highlight">'+t+"</span>"})).replace(new RegExp(""+i,"g"),"&nbsp;")}return t},t.ctorParameters=function(){return[{type:ai,decorators:[{type:e.Optional}]},{type:si,decorators:[{type:e.Optional}]},{type:ut.DomSanitizer},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSearchableHighlight",null),t=vt([e.Directive({selector:"[datoSearchableHighlight]"}),bt(0,e.Optional()),bt(1,e.Optional()),Ct("design:paramtypes",[ai,si,ut.DomSanitizer,e.ElementRef])],t)}(),Gc=[si,Fc,ai],Vc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Gc],exports:[Gc]})],t)}(),zc=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoAutocompleteContent]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Bc=function(){function t(){this.labelKey="label"}return t.prototype.optionsClick=function(){return this.options.changes.pipe(r.startWith(this.options.toArray()),r.switchMap((function(t){return n.merge.apply(void 0,xt(t.map((function(t){return t.click$.pipe(r.mapTo(t))}))))})))},t.prototype.ngAfterViewInit=function(){this.keyManager=new pt.ActiveDescendantKeyManager(this.options).withWrap()},t.prototype.onKeydown=function(t,e){this.keyManager.onKeydown(t);var n=document.querySelector(".dato-select__dropdown");this._scrollToOption(e,n)},t.prototype._scrollToOption=function(t,e){xi({size:t,panel:e,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})},t.prototype.getActiveItem=function(){return this.keyManager.activeItem},t.prototype.resetIndex=function(){this.keyManager.setActiveItem(-1)},vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelKey",void 0),vt([e.ViewChild(e.TemplateRef,{static:!0}),Ct("design:type",e.TemplateRef)],t.prototype,"root",void 0),vt([e.ContentChild(zc),Ct("design:type",zc)],t.prototype,"content",void 0),vt([e.ContentChildren(Ci,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"options",void 0),vt([e.ContentChildren(bi,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"groups",void 0),t=vt([e.Component({selector:"dato-autocomplete",template:'<ng-template>\n <div class="dato-select__dropdown-container">\n <div class="dato-select__dropdown">\n <ng-container [ngTemplateOutlet]="content.tpl"></ng-container>\n </div>\n\n \x3c!-- FOOTER --\x3e\n\n <footer class="dato-select__footer d-flex">\n\n <ng-content select="[datoAutoCompleteFooter]"></ng-content>\n\n </footer>\n </div>\n</ng-template>\n',exportAs:"datoAutocomplete",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Hc=function(){function t(t,n,o,i,r){if(this.host=t,this.ngControl=n,this.zone=o,this.popper=i,this.vcr=r,this.placement="bottom",this.datoSize="md",this.close=new e.EventEmitter,!n)throw new Error("DatoAutocompleteDirective require a formControl on the input")}return t.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.element,"focusin").pipe(i.untilDestroyed(this)).subscribe((function(){t.openDropdown()}))},t.prototype.openDropdown=function(){var t=this;this.popperInstance||(this.createDropdown(),this.popper.create(this.element,this.container,{placement:this.placement}).subscribe((function(e){t.popperInstance=e,t.closeDropdownHandler(),t.optionsClickHandler(),t.keyupHandler()})))},t.prototype.closeDropdown=function(){this.container&&(document.body.removeChild(this.container),this.popperInstance.destroy(),this.container=null,this.popperInstance=null,this.close.next(),this.vcr.clear())},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.ngControl.control},enumerable:!0,configurable:!0}),t.prototype.optionsClickHandler=function(){var t=this;this.datoAutoComplete.optionsClick().pipe(r.takeUntil(this.close),i.untilDestroyed(this)).subscribe((function(e){var n=e.option;t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown()}))},t.prototype.closeDropdownHandler=function(){var t=this;n.fromEvent(document,"click",{capture:!0}).pipe(r.takeUntil(this.close),r.filter((function(e){var n=t.element.contains(e.target),o=t.container.contains(e.target);return!n&&!o})),r.take(1),i.untilDestroyed(this)).subscribe((function(){return t.closeDropdown()}))},t.prototype.keyupHandler=function(){var t=this;n.fromEvent(this.element,"keyup").pipe(r.takeUntil(this.close),i.untilDestroyed(this)).subscribe((function(e){if(Ii(e)){var n=t.datoAutoComplete.getActiveItem().option;return t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown(),void t.datoAutoComplete.resetIndex()}Di(e)&&t.datoAutoComplete.onKeydown(e,t.datoSize),Ti(e)&&(t.datoAutoComplete.resetIndex(),t.closeDropdown())}))},t.prototype.createDropdown=function(){var t,e,n=this.vcr.createEmbeddedView(this.datoAutoComplete.root);this.container=$t("div"),Ut(this.container,"dato-autocomplete"),Ut(this.container,"dato-select-"+this.datoSize),Vt(this.container,"width",this.element.offsetWidth+"px"),Vt(this.container,"zIndex",Nn());try{for(var o=wt(n.rootNodes),i=o.next();!i.done;i=o.next()){var r=i.value;this.container.appendChild(r)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}n.detectChanges(),document.body.appendChild(this.container)},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:e.ElementRef},{type:o.NgControl,decorators:[{type:e.Optional}]},{type:e.NgZone},{type:Pn},{type:e.ViewContainerRef}]},vt([e.Input(),Ct("design:type",Bc)],t.prototype,"datoAutoComplete",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoSize",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"close",void 0),t=vt([e.Directive({selector:"[datoAutoComplete]"}),bt(1,e.Optional()),Ct("design:paramtypes",[e.ElementRef,o.NgControl,e.NgZone,Pn,e.ViewContainerRef])],t)}(),Uc=[Bc,Hc,zc],Kc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Hi],declarations:[Uc],exports:[Uc],entryComponents:[Bc]})],t)}(),Wc=function(){function t(){}return t.prototype.supports=function(t){return/^[a-z]+((\.[a-z]+)*)+(?:\.(?:stop|prevent|capture|self|once))+$/.test(t)},t.prototype.addEventListener=function(t,e,n){var o=this.parseEventName(e);return this.setupEventBinding(t,o,n)},t.prototype.addGlobalEventListener=function(t,e,n){var o=this.parseElement(t),i=this.parseEventName(e);return this.setupEventBinding(o,i,n)},t.prototype.parseElement=function(t){return{window:window,document:document,body:document.body}[t]},t.prototype.parseEventName=function(t){var e=["stop","prevent","capture","self","once"],n=St(t.split(".")),o=n[0],i=n.slice(1).reduce((function(t,n){return e.includes(n)?t.modifiers[n]=!0:t.chains.push(n),t}),{modifiers:{},chains:[]}),r=i.modifiers,a=i.chains;return mt(mt({},r),{name:o,chains:a})},t.prototype.setupEventBinding=function(t,e,n){var o={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},i={capture:e.capture},r=p;if(e.chains.length&&("keydown"===e.name||"keyup"===e.name)){var a=St(e.chains,2),s=a[0],l=a[1];r=function(t){var e=t.key.toLocaleLowerCase(),n=!l&&e===s;if(l){var i=o[s];n=i&&i(t)&&l===e}n&&p(t)}}return t.addEventListener(e.name,r,i),c;function c(){t.removeEventListener(e.name,r,i)}function p(o){e.self&&o.target!==t||(e.once&&c(),e.stop&&o.stopPropagation(),e.prevent&&o.preventDefault(),n(o))}},t}(),Qc=function(){function t(t){this.cdr=t,this.showArrowInLast=!1,this.lastArrowClass="",this.markLastAsActive=!0,this.dataAutoIdPrefix="dato-breadcrumbs-",this.isHeaderControlDisabled=!1,this.headerControlAutoIdSuffix="header-control",this.breadcrumbClick=new e.EventEmitter,this.updateEditableText=new e.EventEmitter,this.INITIAL_DISPLAYED_BREADCRUMBS=3,this._maxDisplayedBreadcrumbs=this.INITIAL_DISPLAYED_BREADCRUMBS}return Object.defineProperty(t.prototype,"maxDisplayedBreadcrumbs",{set:function(t){Lt(this.originalBreadcrumbs)||(this.setMaxDisplayedBreadcrumbs(t),this.initBreadcrumbs(this.originalBreadcrumbs))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"breadcrumbs",{get:function(){return this._breadcrumbs},set:function(t){this.originalBreadcrumbs=t,this._maxDisplayedBreadcrumbs>0&&(this.setMaxDisplayedBreadcrumbs(this._maxDisplayedBreadcrumbs),this.initBreadcrumbs(t))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.headerControl&&this.initEditableHeader()},t.prototype.ngOnDestroy=function(){},t.prototype.onClick=function(t){var e=t.data,n=t.onClick;e&&this.breadcrumbClick.emit(e),n&&n()},t.prototype.shouldHaveArrow=function(t){return!t||t&&this.showArrowInLast},t.prototype.initBreadcrumbs=function(t){var e=ye(t)<=this._maxDisplayedBreadcrumbs,n=e?[]:[{text:"..."}],o=t.slice(0,1),i=e?t.slice(1):t.slice(t.length-this._maxDisplayedBreadcrumbs+1);this._breadcrumbs=xt(o,n,i)},t.prototype.initEditableHeader=function(){var t=this;this.headerControl.valueChanges.pipe(r.debounceTime(300),i.untilDestroyed(this)).subscribe((function(e){t.updateEditableText.emit(e),t.cdr.detectChanges()}))},t.prototype.setMaxDisplayedBreadcrumbs=function(t){t<this.INITIAL_DISPLAYED_BREADCRUMBS?(this._maxDisplayedBreadcrumbs=this.INITIAL_DISPLAYED_BREADCRUMBS,console.error("Minimum breadcrumbs number is "+this.INITIAL_DISPLAYED_BREADCRUMBS)):this._maxDisplayedBreadcrumbs=t},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"maxDisplayedBreadcrumbs",null),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"breadcrumbs",null),vt([e.Input(),Ct("design:type",o.FormControl)],t.prototype,"headerControl",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showArrowInLast",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"lastArrowClass",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"markLastAsActive",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"dataAutoIdPrefix",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isHeaderControlDisabled",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"headerControlAutoIdSuffix",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"breadcrumbClick",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"updateEditableText",void 0),t=vt([e.Component({selector:"dato-breadcrumbs",template:'<div class="d-flex items-center breadcrumbs-container self-start">\n <ng-container *ngFor="let breadcrumb of breadcrumbs; last as last; index as index">\n <dato-link class="breadcrumb-text"\n [attr.data-auto-id]="dataAutoIdPrefix + (breadcrumb.dataAutoId || index)"\n [class.active]="last && markLastAsActive"\n [class.mr-11]="last && !shouldHaveArrow(last)"\n [class.readonly]="breadcrumb.readonly"\n datoSize="sm"\n datoType="secondary"\n (click)="onClick(breadcrumb)"\n [disabled]="breadcrumb.disabled">{{breadcrumb.text | translate}}</dato-link>\n <dato-icon *ngIf="shouldHaveArrow(last)"\n [class.disabled]="breadcrumb.disabled"\n [ngClass]="last ? lastArrowClass : \'\'"\n class="self-center mx-5 primary-300-color"\n datoSize="sm"\n icon="chevron-right"></dato-icon>\n </ng-container>\n</div>\n<div class="d-flex-column justify-center">\n <dato-input\n *ngIf="headerControl"\n [attr.data-auto-id]="dataAutoIdPrefix + headerControlAutoIdSuffix"\n [formControl]="headerControl"\n [datoDisableControl]="isHeaderControlDisabled"\n class="mt-10 editable-header"\n datoControlErrors></dato-input>\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-breadcrumbs{display:flex;flex-direction:column}dato-breadcrumbs .breadcrumbs-container{height:40px}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text a{line-height:1.5}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.active{pointer-events:none;cursor:default}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.active a{font-weight:400}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.disabled,dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.readonly{pointer-events:none;cursor:default}dato-breadcrumbs dato-input.editable-header{max-width:400px;width:400px}dato-breadcrumbs dato-input.editable-header input.dato-input{font-size:18px;font-weight:600}@media (max-width:1440px){dato-breadcrumbs{flex-direction:row}dato-breadcrumbs dato-input.editable-header{max-width:200px;width:200px;margin-top:0;align-items:center}dato-breadcrumbs dato-input.editable-header>div{height:27px;overflow:auto!important}dato-breadcrumbs dato-input.editable-header>div input.dato-input{height:25px;min-height:25px;font-size:12px;font-weight:400;padding-bottom:0}}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),$c=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,xo,wo,o.ReactiveFormsModule,Ts,Co,to],declarations:[Qc],exports:[Qc]})],t)}(),qc=function(){function t(t,n){this.host=t,this.zone=n,this.containerBottom=new e.EventEmitter,this.offset=50,this.onRootElement=!1,this.container=this.element}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e=this.onRootElement?this.documentHandler.bind(this):this.elementHandler.bind(this),o=this.onRootElement?document:this.container;this.zone.runOutsideAngular((function(){n.fromEvent(o,"scroll").pipe(r.auditTime(30),i.untilDestroyed(t)).subscribe((function(){return e()}))}))},t.prototype.ngOnDestroy=function(){},t.prototype.documentHandler=function(){window.innerHeight+window.scrollY+this.offset>=document.body.scrollHeight&&this.emit()},t.prototype.elementHandler=function(){var t=this.container,e=t.clientHeight,n=t.scrollHeight;e+t.scrollTop+this.offset>=n&&this.emit()},t.prototype.emit=function(){var t=this;this.zone.run((function(){return t.containerBottom.emit()}))},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},vt([e.Output("datoInfiniteScroll"),Ct("design:type",Object)],t.prototype,"containerBottom",void 0),vt([e.Input("datoInfiniteScrollOffset"),Ct("design:type",Object)],t.prototype,"offset",void 0),vt([e.Input("datoInfiniteScrollRoot"),Ct("design:type",Object)],t.prototype,"onRootElement",void 0),vt([e.Input("datoInfiniteScrollContainer"),Ct("design:type",Object)],t.prototype,"container",void 0),t=vt([e.Component({selector:"dato-infinite-scroll",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ElementRef,e.NgZone])],t)}(),Yc=[qc],Zc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Yc],exports:[Yc],entryComponents:[Yc]})],t)}(),Xc=function(t){function n(e,n,o){var i=t.call(this)||this;return i.controlDir=e,i.translate=n,i.snackbar=o,i.multi=!1,i.disabled=!1,e.valueAccessor=i,i}return ft(n,t),Object.defineProperty(n.prototype,"accept",{set:function(t){this.input.nativeElement.accept=t||""},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;this.controlDir.control.statusChanges.pipe(r.filter((function(t){return"INVALID"===t})),i.untilDestroyed(this)).subscribe((function(){var e=t.controlDir.control.errors;e&&!e.required&&(t.showErrors(e),t.controlDir.control.reset())}))},n.prototype.emitFiles=function(t){t&&this.setFiles(t)},n.prototype.openFileUpload=function(){this.input.nativeElement.click()},n.prototype.setFiles=function(t){this.onChange(this.multi?t:t.item(0))},n.prototype.writeValue=function(t){this.input&&(this.input.nativeElement.value="")},n.prototype.setDisabledState=function(t){this.disabled=t},n.prototype.ngOnDestroy=function(){},n.prototype.showErrors=function(t){var e;t.invalidFileType&&(e=t.invalidFileType.extension.toUpperCase()+" "+this.translate.transform("core.invalid-file-type")),t.invalidSize&&(e=this.translate.transform("core.invalid-file-size",{size:t.invalidSize.expected+"mb"})),this.snackbar.dramaticError(e)},n.ctorParameters=function(){return[{type:o.NgControl},{type:Mn},{type:zl}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"multi",void 0),vt([e.ViewChild("fileInput",{static:!0}),Ct("design:type",e.ElementRef)],n.prototype,"input",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],n.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],n.prototype,"accept",null),vt([e.HostListener("change",["$event.target.files"]),Ct("design:type",Function),Ct("design:paramtypes",[FileList]),Ct("design:returntype",void 0)],n.prototype,"emitFiles",null),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"openFileUpload",null),n=vt([e.Component({selector:"dato-file-input",template:'<input type="file" #fileInput [attr.multiple]="multi">\n<ng-content></ng-content>\n\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block;cursor:pointer}:host.disabled{pointer-events:none}:host input[type=file],:host label{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}"]}),Ct("design:paramtypes",[o.NgControl,Mn,zl])],n)}(Dt),Jc=function(){function t(t,e,n,o){this.ngControl=t,this.parent=e,this.host=n,this.cdr=o,this.isDraggingFiles=!1,this.disabled=!1,this.size="lg",Ut(n.nativeElement,["large-size"])}return Object.defineProperty(t.prototype,"datoSize",{set:function(t){this.size=t||"lg",Ut(this.host.nativeElement,{sm:"small-size",md:"medium-size",lg:"large-size"}[this.size])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.ngControl.control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLarge",{get:function(){return"lg"===this.size},enumerable:!0,configurable:!0}),t.prototype.dragenter=function(){this.isDraggingFiles=!0},t.prototype.dragover=function(t){t.preventDefault()},t.prototype.dragleave=function(){this.isDraggingFiles=!1},t.prototype.drop=function(t){t.preventDefault(),this.parent.setFiles(t.dataTransfer.files),this.isDraggingFiles=!1},t.prototype.ngOnInit=function(){var t=this;this.control.statusChanges.pipe(r.distinctUntilChanged(),r.startWith(this.isDisabled),i.untilDestroyed(this)).subscribe((function(){t.disabled!==t.isDisabled&&(t.disabled=t.isDisabled,t.cdr.detectChanges())}))},Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.control.disabled},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:o.NgControl},{type:Xc},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},vt([e.HostBinding("style.width.px"),e.Input(),Ct("design:type",Object)],t.prototype,"width",void 0),vt([e.HostBinding("style.height.px"),e.Input(),Ct("design:type",Object)],t.prototype,"height",void 0),vt([e.HostBinding("class.dragging-files"),Ct("design:type",Object)],t.prototype,"isDraggingFiles",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSize",null),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"imgTpl",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.HostListener("dragenter"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"dragenter",null),vt([e.HostListener("dragover",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"dragover",null),vt([e.HostListener("dragleave"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"dragleave",null),vt([e.HostListener("drop",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"drop",null),t=vt([e.Component({selector:"dato-file-input-default",template:'<header class="d-flex-column items-center">\n\n <section class="mb-20">\n\n <ng-template *ngTemplateOutlet="imgTpl || defaultImg"></ng-template>\n\n <ng-template #defaultImg>\n <svg width="188" height="133" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 188 133" class="file-input-default-img">\n <g fill="none" fill-rule="evenodd">\n <path d="M205.043 94.525c-11.976 15.33-55.795 33.382-72.69 39.757-14.955 5.643-72.095 23.33-91.387-6.177C18.332 93.485-5.408 38.255 25.314 25.06c38.874-16.694 114.334-.657 146.689 17.387 25.715 14.342 41.562 41.17 33.04 52.078z" id="a" fill="#F1F2F5" opacity=".869" transform="rotate(12 135.642 -3.646)"></path>\n <g transform="translate(30 49)" fill-rule="nonzero">\n <rect stroke="#BBDEFB" stroke-width="2" fill="#FFF" x="1" y="1" width="114" height="68" rx=".7"/>\n <g transform="translate(38 20)" fill="#E3F2FD">\n <path d="M23.892 7.081a.44.44 0 0 1 .725.01l14.555 21.86a.44.44 0 0 1-.366.684h-37.6a.44.44 0 0 1-.369-.68l6.264-9.67a.44.44 0 0 1 .693-.059l3.865 4.183a.44.44 0 0 0 .682-.044L23.891 7.08z"/>\n <circle cx="5" cy="5" r="5"/>\n </g>\n </g>\n </g>\n </svg>\n\n </ng-template>\n\n </section>\n\n <section class="file-input-content primary-300-color text-center">\n <ng-content></ng-content>\n </section>\n\n</header>\n\n<div class="drag-enter primary-200-color">\n {{ \'core.drop-file-here\' | translate }}\n</div>\n\n<footer class="d-flex items-center d-flex-wrap justify-center">\n <p class="primary-300-color">{{\'core.drag-and-drop\' | translate}}</p>\n <div class="flex-break " *ngIf="!isLarge"></div>\n <p class="mr-12 ml-12 primary-300-color">- {{\'core.or\' | translate}} -</p>\n <div class="flex-break" *ngIf="!isLarge"></div>\n <dato-button datoSize="sm" width="70px" [disabled]="disabled">{{\'core.browse\' | translate}}</dato-button>\n</footer>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;border-style:dashed;border-width:3px;flex-direction:column;justify-content:center;align-items:center;transition:border .3s}:host .drag-enter{display:none}:host.disabled{pointer-events:none}:host.dragging-files{justify-content:flex-end}:host.dragging-files *{pointer-events:none}:host.dragging-files .drag-enter{display:block;font-size:64px;line-height:64px;font-weight:800!important;margin-bottom:20px}:host.dragging-files footer,:host.dragging-files header{display:none}:host .file-input-content{font-size:12px}:host footer{margin-top:30px}:host.large-size{min-height:450px;height:100%}:host.medium-size{height:450px;width:300px;padding-right:10px;padding-left:10px}:host.medium-size footer{margin-top:20px}:host.medium-size footer dato-button{margin-top:10px}:host.medium-size .drag-enter{font-size:24px;line-height:24px}:host.small-size{min-height:242px;height:242px;width:300px}:host.small-size footer{margin-top:0}:host.small-size footer dato-button{margin-top:10px}:host.small-size .file-input-default-img{width:116px;height:70px}:host.small-size .drag-enter{font-size:20px;line-height:20px}footer p:first-child{font-size:24px;font-weight:800!important}footer p:last-of-type{font-size:14px}.flex-break{flex-basis:100%;height:0}"]}),Ct("design:paramtypes",[o.NgControl,Xc,e.ElementRef,e.ChangeDetectorRef])],t)}(),tp=[Xc,Jc],ep=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,Co],declarations:[tp],exports:[tp],entryComponents:[tp]})],t)}(),np=function(t){function n(e){var n=t.call(this)||this;return n.cdr=e,n.buttons=[],n.disabledIds=[],n.isRoundEdges=!1,n.datoSize="lg",n}var i;return ft(n,t),i=n,n.prototype.writeValue=function(t){this.active=t,this.cdr.markForCheck()},n.prototype.setActive=function(t){this.active=t,this.onChange(t)},n.prototype.isDisabled=function(t){return this.disabledIds.includes(t)},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Array)],n.prototype,"buttons",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"disabledIds",void 0),vt([e.Input(),e.HostBinding("class.is-round-edges"),Ct("design:type",Object)],n.prototype,"isRoundEdges",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"datoSize",void 0),n=i=vt([e.Component({selector:"dato-button-group",template:'<dato-button (click)="setActive(button.id)"\n [disabled]="isDisabled(button.id)"\n [attr.datoSize]="datoSize"\n *ngFor="let button of buttons" [attr.datoType]="button.id === active ? \'\' : \'secondary\'">\n {{ button.label | translate }}\n</dato-button>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return i})),multi:!0}],changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ChangeDetectorRef])],n)}(Dt),op=[np],ip=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,Co],declarations:[op],exports:[op]})],t)}();
487
+ function Dc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function Ic(t,e,n){this.$session=t,this.$row=e,this.$rowTokens=t.getTokens(e);var o=t.getTokenAt(e,n);this.$tokenIndex=o?o.index:-1,this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]}}function Tc(t,e,n,o,i){var r=Rc(n,o),a=function(t,e){var n=new Ic(t,e.row,e.column),o=n.getCurrentToken();for(;o&&!Dc(o,"attribute-name");)o=n.stepBackward();if(o)return o.value}(n,o);if(!r)return[];var s=[];return r in t&&a in t[r]&&"object"==typeof t[r][a]&&(s=Object.keys(t[r][a])),s.map((function(t){return{caption:t,snippet:t,meta:"datorama-value",score:1e7}}))}function Rc(t,e){for(var n=new Ic(t,e.row,e.column),o=n.getCurrentToken();o&&!Dc(o,"tag-name");)o=n.stepBackward();if(o)return o.value}function Ac(t){return{getCompletions:function(e,n,o,i,r){var a=n.getTokenAt(o.row,o.column);return a?((Dc(a,"tag-name")||Dc(a,"tag-open")||Dc(a,"end-tag-open"))&&r(null,function(t,e,n,o,i){return Object.keys(t).map((function(t){return{value:t,caption:t,meta:"datorama-tag",score:1e7}}))}(t)),(Dc(a,"tag-whitespace")||Dc(a,"attribute-name"))&&r(null,function(t,e,n,o,i){var r=Rc(n,o);if(!r)return[];var a=[];return r in t&&(a=a.concat(Object.keys(t[r]))),a.map((function(t){return{caption:t,snippet:t+'="$0"',meta:"datorama-attribute",score:1e7}}))}(t,0,n,o)),Dc(a,"attribute-value")&&r(null,Tc(t,0,n,o)),[]):[]}}}function Ec(t,e,n){n.commands.addCommand({name:"DADotCommand",bindKey:{win:".",mac:"."},exec:function(){var o=n.selection.getCursor(),i=n.session.getDocument().getLine(o.row).trim().slice(0,o.column).split(/\s+/);if(i[0]){n.insert(".");var r=i[i.length-1].match(/DA(?:\.\w+)*/);if(r){var a={getCompletions:function(n,o,i,a,s){s(null,(t[r[0]]||[]).map((function(t){return{caption:t,value:t,meta:"datorama",completer:{insertMatch:function(t,n){t.completer.insertMatch({value:n.caption}),t.completers=e}}}})))}};n.completers=[a]}}}}),n.commands.on("afterExec",(function(t){"DADotCommand"===t.command.name&&n.execCommand("startAutocomplete")}))}var Pc,kc=function(){function t(){this.fetchingAce=!1,this.fetchingBeautify=!1}return t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"})],t)}(),_c=function(){function t(t,e,n,o){var i=this;this.host=t,this.http=e,this.aceService=n,this.config=o,this.disabled=!1,this.defaultOptions={enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,indentedSoftWrap:!1,fontSize:14,useWorker:!0,showPrintMargin:!1,tabSize:2,fontFamily:"Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace'"},this._options=mt({},this.defaultOptions),this.BASE_PATH=this.config.paths.editor,this.waitForAce().subscribe((function(){i.ace.config.set("themePath",i.config.paths.editor+"/themes"),i.editor.setOption("enableEmmet",!0)}))}var a;return a=t,Object.defineProperty(t.prototype,"theme",{set:function(t){this.setTheme(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lang",{set:function(t){this.setLang(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{set:function(t){this._options=mt(mt({},this.defaultOptions),t),this.setOptions()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HTMLCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){e.langTools.setCompleters(xt([Ac(t)],e.getBaseCompletors(e.langTools)))}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"JSObjectCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){Ec(t,e.getBaseCompletors(e.langTools),e.getEditor())}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"langTools",{get:function(){return this.ace.require("ace/ext/language_tools")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ace",{get:function(){return window.ace},enumerable:!0,configurable:!0}),t.prototype.waitForAce=function(){var t=this;return window.ace?(this.initializeEditor(),n.timer(0)):this.aceService.fetchingAce?n.timer(50).pipe(r.repeat(),r.filter((function(){return!!window.ace})),r.tap((function(){t.initializeEditor()})),r.take(1)):this.loadAce()},t.prototype.waitForBeauitify=function(){return window.js_beautify?n.timer(0):this.aceService.fetchingBeautify?n.timer(50).pipe(r.repeat(),r.filter((function(){return!!window.js_beautify})),r.take(1)):this.loadBeautifier()},t.prototype.getEditor=function(){return this.editor},t.prototype.prettier=function(){var t=this;this.waitForBeauitify().subscribe((function(){return t.runBeautify()}))},t.prototype.setTheme=function(t){var e=this;this.waitForAce().subscribe((function(){e.ace.config.set("themePath",e.config.paths.editor+"/themes"),e.editor.setTheme("ace/theme/"+t)}))},t.prototype.ngAfterViewInit=function(){var t=this;this.waitForAce().subscribe((function(){t.setOptions(),t.editor.setAutoScrollEditorIntoView(!0),n.fromEvent(t.editor,"change").pipe(i.untilDestroyed(t)).subscribe((function(){return t.onChange(t.editor.getValue())})),n.fromEvent(t.editor.container,"drop").pipe(i.untilDestroyed(t)).subscribe((function(){return t.editor.clearSelection()}))}))},t.prototype.runBeautify=function(){var t="javascript"===this._lang?"js":this._lang,e=(0,window[t+"_beautify"])(this.editor.getValue(),{indent_size:2,preserve_newlines:!1});this.setValue(e)},t.prototype.getBaseCompletors=function(t){return[t.textCompleter,t.snippetCompleter,t.keyWordCompleter]},t.prototype.createRequests=function(t){var e=this;return t.map((function(t){return e.http.get(e.BASE_PATH+"/"+t,{responseType:"text"})}))},t.prototype.loadAceWorkers=function(){return n.forkJoin.apply(void 0,xt(this.createRequests(["worker-css.js","worker-html.js","worker-javascript.js"])))},t.prototype.loadAceScripts=function(){return n.forkJoin.apply(void 0,xt(this.createRequests(["ace.js","ace-langtools.js","emmet-lib.js","emmet.js","mode-css.js","mode-html.js","mode-javascript.js"])))},t.prototype.loadBeautifier=function(){return this.aceService.fetchingBeautify=!0,n.forkJoin.apply(void 0,xt(this.createRequests(["beautify/base.js","beautify/css.js","beautify/html.js"]))).pipe(r.tap((function(t){Xt(t.join(" "),"beautifires")})))},t.prototype.initializeEditor=function(){this.editor||(this.editor=this.ace.edit(this.host.nativeElement))},t.prototype.loadAce=function(){var t=this;return this.aceService.fetchingAce=!0,this.loadAceScripts().pipe(r.tap((function(e){Xt(e.join(" "),"ace-base"),t.ace.config.set("basePath",t.config.paths.editor)})),r.concatMap((function(){return t.loadAceWorkers()})),r.tap((function(e){Xt(e.join(" "),"ace-workers"),t.initializeEditor()})))},t.prototype.setValue=function(t){var e=this;this.waitForAce().subscribe((function(){e.editor.setValue(t),e.editor.clearSelection()}))},t.prototype.setOptions=function(){var t=this;this.waitForAce().subscribe((function(){return t.editor.setOptions(t._options)}))},t.prototype.setLang=function(t){var e=this;this.waitForAce().subscribe((function(){e._lang=t,e.editor.getSession().setMode("ace/mode/"+t)}))},t.prototype.ngOnDestroy=function(){this.editor&&this.editor.destroy(),this.editor=null},t.prototype.writeValue=function(t){this.setValue(t||"")},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){},t.prototype.setDisabledState=function(t){this.disabled=t},t.ctorParameters=function(){return[{type:e.ElementRef},{type:ht.HttpClient},{type:kc},{type:void 0,decorators:[{type:e.Inject,args:[Un]}]}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"theme",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"lang",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"HTMLCompletions",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"JSObjectCompletions",null),t=a=vt([e.Directive({selector:"[datoAce]",exportAs:"datoAce",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),bt(3,e.Inject(Un)),Ct("design:paramtypes",[e.ElementRef,ht.HttpClient,kc,Object])],t)}(),jc=function(){function t(t){this.host=t,this.host.nativeElement.setAttribute("draggable","true")}return Object.defineProperty(t.prototype,"aceDraggableText",{set:function(t){this.text=t},enumerable:!0,configurable:!0}),t.prototype.drag=function(t){t.dataTransfer.setData("text",this.text)},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"aceDraggableText",null),vt([e.HostListener("dragstart",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Event]),Ct("design:returntype",void 0)],t.prototype,"drag",null),t=vt([e.Directive({selector:"[aceDraggableText]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),Mc=[jc,_c],Lc=function(){function t(){}return t=vt([e.NgModule({declarations:[Mc],exports:[Mc]})],t)}(),Nc=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,Fc=function(){function t(t,e,n,o){this.container=t,this.searchable=e,this.sanitizer=n,this.host=o}return Object.defineProperty(t.prototype,"datoSearchableHighlight",{set:function(t){this._token=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){if(!this.token)throw new Eo("Missing search token, please provide one via input or [datoSearchable] directive");this.container.register(this,!0)},t.prototype.ngOnDestroy=function(){this.container.unregister(this,!0)},Object.defineProperty(t.prototype,"token",{get:function(){return this._token||this.searchable&&this.searchable.token},enumerable:!0,configurable:!0}),t.prototype.highlight=function(t,n){this.host.nativeElement.innerHTML=this.sanitizer.sanitize(e.SecurityContext.HTML,this.resolve(t,n))},t.prototype.resolve=function(t,e){if(!t.toLowerCase().includes(e.toLowerCase()))return t;var n=e.replace(Nc,"\\$&");if(n=n.split(" ").filter((function(t){return t.length>0})).join("|")){var o=new RegExp(n,"gi"),i=String.fromCharCode(127);return t.replace(/\s/g,i).replace(o,(function(t){return'<span class="dato-highlight">'+t+"</span>"})).replace(new RegExp(""+i,"g"),"&nbsp;")}return t},t.ctorParameters=function(){return[{type:ai,decorators:[{type:e.Optional}]},{type:si,decorators:[{type:e.Optional}]},{type:ut.DomSanitizer},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSearchableHighlight",null),t=vt([e.Directive({selector:"[datoSearchableHighlight]"}),bt(0,e.Optional()),bt(1,e.Optional()),Ct("design:paramtypes",[ai,si,ut.DomSanitizer,e.ElementRef])],t)}(),Gc=[si,Fc,ai],Vc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Gc],exports:[Gc]})],t)}(),zc=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoAutocompleteContent]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Bc=function(){function t(){this.labelKey="label"}return t.prototype.optionsClick=function(){return this.options.changes.pipe(r.startWith(this.options.toArray()),r.switchMap((function(t){return n.merge.apply(void 0,xt(t.map((function(t){return t.click$.pipe(r.mapTo(t))}))))})))},t.prototype.ngAfterViewInit=function(){this.keyManager=new pt.ActiveDescendantKeyManager(this.options).withWrap()},t.prototype.onKeydown=function(t,e){this.keyManager.onKeydown(t);var n=document.querySelector(".dato-select__dropdown");this._scrollToOption(e,n)},t.prototype._scrollToOption=function(t,e){xi({size:t,panel:e,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})},t.prototype.getActiveItem=function(){return this.keyManager.activeItem},t.prototype.resetIndex=function(){this.keyManager.setActiveItem(-1)},vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelKey",void 0),vt([e.ViewChild(e.TemplateRef,{static:!0}),Ct("design:type",e.TemplateRef)],t.prototype,"root",void 0),vt([e.ContentChild(zc),Ct("design:type",zc)],t.prototype,"content",void 0),vt([e.ContentChildren(Ci,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"options",void 0),vt([e.ContentChildren(bi,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"groups",void 0),t=vt([e.Component({selector:"dato-autocomplete",template:'<ng-template>\n <div class="dato-select__dropdown-container">\n <div class="dato-select__dropdown">\n <ng-container [ngTemplateOutlet]="content.tpl"></ng-container>\n </div>\n\n \x3c!-- FOOTER --\x3e\n\n <footer class="dato-select__footer d-flex">\n\n <ng-content select="[datoAutoCompleteFooter]"></ng-content>\n\n </footer>\n </div>\n</ng-template>\n',exportAs:"datoAutocomplete",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Hc=function(){function t(t,n,o,i,r){if(this.host=t,this.ngControl=n,this.zone=o,this.popper=i,this.vcr=r,this.placement="bottom",this.datoSize="md",this.close=new e.EventEmitter,!n)throw new Error("DatoAutocompleteDirective require a formControl on the input")}return t.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.element,"focusin").pipe(i.untilDestroyed(this)).subscribe((function(){t.openDropdown()}))},t.prototype.openDropdown=function(){var t=this;this.popperInstance||(this.createDropdown(),this.popper.create(this.element,this.container,{placement:this.placement}).subscribe((function(e){t.popperInstance=e,t.closeDropdownHandler(),t.optionsClickHandler(),t.keyupHandler()})))},t.prototype.closeDropdown=function(){this.container&&(document.body.removeChild(this.container),this.popperInstance.destroy(),this.container=null,this.popperInstance=null,this.close.next(),this.vcr.clear())},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.ngControl.control},enumerable:!0,configurable:!0}),t.prototype.optionsClickHandler=function(){var t=this;this.datoAutoComplete.optionsClick().pipe(r.takeUntil(this.close),i.untilDestroyed(this)).subscribe((function(e){var n=e.option;t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown()}))},t.prototype.closeDropdownHandler=function(){var t=this;n.fromEvent(document,"click",{capture:!0}).pipe(r.takeUntil(this.close),r.filter((function(e){var n=t.element.contains(e.target),o=t.container.contains(e.target);return!n&&!o})),r.take(1),i.untilDestroyed(this)).subscribe((function(){return t.closeDropdown()}))},t.prototype.keyupHandler=function(){var t=this;n.fromEvent(this.element,"keyup").pipe(r.takeUntil(this.close),i.untilDestroyed(this)).subscribe((function(e){if(Ii(e)){var n=t.datoAutoComplete.getActiveItem().option;return t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown(),void t.datoAutoComplete.resetIndex()}Di(e)&&t.datoAutoComplete.onKeydown(e,t.datoSize),Ti(e)&&(t.datoAutoComplete.resetIndex(),t.closeDropdown())}))},t.prototype.createDropdown=function(){var t,e,n=this.vcr.createEmbeddedView(this.datoAutoComplete.root);this.container=Qt("div"),Ut(this.container,"dato-autocomplete"),Ut(this.container,"dato-select-"+this.datoSize),Vt(this.container,"width",this.element.offsetWidth+"px"),Vt(this.container,"zIndex",Nn());try{for(var o=wt(n.rootNodes),i=o.next();!i.done;i=o.next()){var r=i.value;this.container.appendChild(r)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}n.detectChanges(),document.body.appendChild(this.container)},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:e.ElementRef},{type:o.NgControl,decorators:[{type:e.Optional}]},{type:e.NgZone},{type:Pn},{type:e.ViewContainerRef}]},vt([e.Input(),Ct("design:type",Bc)],t.prototype,"datoAutoComplete",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoSize",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"close",void 0),t=vt([e.Directive({selector:"[datoAutoComplete]"}),bt(1,e.Optional()),Ct("design:paramtypes",[e.ElementRef,o.NgControl,e.NgZone,Pn,e.ViewContainerRef])],t)}(),Uc=[Bc,Hc,zc],Kc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Hi],declarations:[Uc],exports:[Uc],entryComponents:[Bc]})],t)}(),Wc=function(){function t(){}return t.prototype.supports=function(t){return/^[a-z]+((\.[a-z]+)*)+(?:\.(?:stop|prevent|capture|self|once))+$/.test(t)},t.prototype.addEventListener=function(t,e,n){var o=this.parseEventName(e);return this.setupEventBinding(t,o,n)},t.prototype.addGlobalEventListener=function(t,e,n){var o=this.parseElement(t),i=this.parseEventName(e);return this.setupEventBinding(o,i,n)},t.prototype.parseElement=function(t){return{window:window,document:document,body:document.body}[t]},t.prototype.parseEventName=function(t){var e=["stop","prevent","capture","self","once"],n=St(t.split(".")),o=n[0],i=n.slice(1).reduce((function(t,n){return e.includes(n)?t.modifiers[n]=!0:t.chains.push(n),t}),{modifiers:{},chains:[]}),r=i.modifiers,a=i.chains;return mt(mt({},r),{name:o,chains:a})},t.prototype.setupEventBinding=function(t,e,n){var o={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},i={capture:e.capture},r=p;if(e.chains.length&&("keydown"===e.name||"keyup"===e.name)){var a=St(e.chains,2),s=a[0],l=a[1];r=function(t){var e=t.key.toLocaleLowerCase(),n=!l&&e===s;if(l){var i=o[s];n=i&&i(t)&&l===e}n&&p(t)}}return t.addEventListener(e.name,r,i),c;function c(){t.removeEventListener(e.name,r,i)}function p(o){e.self&&o.target!==t||(e.once&&c(),e.stop&&o.stopPropagation(),e.prevent&&o.preventDefault(),n(o))}},t}(),$c=function(){function t(t){this.cdr=t,this.showArrowInLast=!1,this.lastArrowClass="",this.markLastAsActive=!0,this.dataAutoIdPrefix="dato-breadcrumbs-",this.isHeaderControlDisabled=!1,this.headerControlAutoIdSuffix="header-control",this.breadcrumbClick=new e.EventEmitter,this.updateEditableText=new e.EventEmitter,this.INITIAL_DISPLAYED_BREADCRUMBS=3,this._maxDisplayedBreadcrumbs=this.INITIAL_DISPLAYED_BREADCRUMBS}return Object.defineProperty(t.prototype,"maxDisplayedBreadcrumbs",{set:function(t){Lt(this.originalBreadcrumbs)||(this.setMaxDisplayedBreadcrumbs(t),this.initBreadcrumbs(this.originalBreadcrumbs))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"breadcrumbs",{get:function(){return this._breadcrumbs},set:function(t){this.originalBreadcrumbs=t,this._maxDisplayedBreadcrumbs>0&&(this.setMaxDisplayedBreadcrumbs(this._maxDisplayedBreadcrumbs),this.initBreadcrumbs(t))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.headerControl&&this.initEditableHeader()},t.prototype.ngOnDestroy=function(){},t.prototype.onClick=function(t){var e=t.data,n=t.onClick;e&&this.breadcrumbClick.emit(e),n&&n()},t.prototype.shouldHaveArrow=function(t){return!t||t&&this.showArrowInLast},t.prototype.initBreadcrumbs=function(t){var e=ye(t)<=this._maxDisplayedBreadcrumbs,n=e?[]:[{text:"..."}],o=t.slice(0,1),i=e?t.slice(1):t.slice(t.length-this._maxDisplayedBreadcrumbs+1);this._breadcrumbs=xt(o,n,i)},t.prototype.initEditableHeader=function(){var t=this;this.headerControl.valueChanges.pipe(r.debounceTime(300),i.untilDestroyed(this)).subscribe((function(e){t.updateEditableText.emit(e),t.cdr.detectChanges()}))},t.prototype.setMaxDisplayedBreadcrumbs=function(t){t<this.INITIAL_DISPLAYED_BREADCRUMBS?(this._maxDisplayedBreadcrumbs=this.INITIAL_DISPLAYED_BREADCRUMBS,console.error("Minimum breadcrumbs number is "+this.INITIAL_DISPLAYED_BREADCRUMBS)):this._maxDisplayedBreadcrumbs=t},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"maxDisplayedBreadcrumbs",null),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"breadcrumbs",null),vt([e.Input(),Ct("design:type",o.FormControl)],t.prototype,"headerControl",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showArrowInLast",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"lastArrowClass",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"markLastAsActive",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"dataAutoIdPrefix",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isHeaderControlDisabled",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"headerControlAutoIdSuffix",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"breadcrumbClick",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"updateEditableText",void 0),t=vt([e.Component({selector:"dato-breadcrumbs",template:'<div class="d-flex items-center breadcrumbs-container self-start">\n <ng-container *ngFor="let breadcrumb of breadcrumbs; last as last; index as index">\n <dato-link class="breadcrumb-text"\n [attr.data-auto-id]="dataAutoIdPrefix + (breadcrumb.dataAutoId || index)"\n [class.active]="last && markLastAsActive"\n [class.mr-11]="last && !shouldHaveArrow(last)"\n [class.readonly]="breadcrumb.readonly"\n datoSize="sm"\n datoType="secondary"\n (click)="onClick(breadcrumb)"\n [disabled]="breadcrumb.disabled">{{breadcrumb.text | translate}}</dato-link>\n <dato-icon *ngIf="shouldHaveArrow(last)"\n [class.disabled]="breadcrumb.disabled"\n [ngClass]="last ? lastArrowClass : \'\'"\n class="self-center mx-5 primary-300-color"\n datoSize="sm"\n icon="chevron-right"></dato-icon>\n </ng-container>\n</div>\n<div class="d-flex-column justify-center">\n <dato-input\n *ngIf="headerControl"\n [attr.data-auto-id]="dataAutoIdPrefix + headerControlAutoIdSuffix"\n [formControl]="headerControl"\n [datoDisableControl]="isHeaderControlDisabled"\n class="mt-10 editable-header"\n datoControlErrors></dato-input>\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-breadcrumbs{display:flex;flex-direction:column}dato-breadcrumbs .breadcrumbs-container{height:40px}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text a{line-height:1.5}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.active{pointer-events:none;cursor:default}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.active a{font-weight:400}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.disabled,dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.readonly{pointer-events:none;cursor:default}dato-breadcrumbs dato-input.editable-header{max-width:400px;width:400px}dato-breadcrumbs dato-input.editable-header input.dato-input{font-size:18px;font-weight:600}@media (max-width:1440px){dato-breadcrumbs{flex-direction:row}dato-breadcrumbs dato-input.editable-header{max-width:200px;width:200px;margin-top:0;align-items:center}dato-breadcrumbs dato-input.editable-header>div{height:27px;overflow:auto!important}dato-breadcrumbs dato-input.editable-header>div input.dato-input{height:25px;min-height:25px;font-size:12px;font-weight:400;padding-bottom:0}}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Qc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ge,xo,wo,o.ReactiveFormsModule,Ts,Co,to],declarations:[$c],exports:[$c]})],t)}(),qc=function(){function t(t,n){this.host=t,this.zone=n,this.containerBottom=new e.EventEmitter,this.offset=50,this.onRootElement=!1,this.container=this.element}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e=this.onRootElement?this.documentHandler.bind(this):this.elementHandler.bind(this),o=this.onRootElement?document:this.container;this.zone.runOutsideAngular((function(){n.fromEvent(o,"scroll").pipe(r.auditTime(30),i.untilDestroyed(t)).subscribe((function(){return e()}))}))},t.prototype.ngOnDestroy=function(){},t.prototype.documentHandler=function(){window.innerHeight+window.scrollY+this.offset>=document.body.scrollHeight&&this.emit()},t.prototype.elementHandler=function(){var t=this.container,e=t.clientHeight,n=t.scrollHeight;e+t.scrollTop+this.offset>=n&&this.emit()},t.prototype.emit=function(){var t=this;this.zone.run((function(){return t.containerBottom.emit()}))},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},vt([e.Output("datoInfiniteScroll"),Ct("design:type",Object)],t.prototype,"containerBottom",void 0),vt([e.Input("datoInfiniteScrollOffset"),Ct("design:type",Object)],t.prototype,"offset",void 0),vt([e.Input("datoInfiniteScrollRoot"),Ct("design:type",Object)],t.prototype,"onRootElement",void 0),vt([e.Input("datoInfiniteScrollContainer"),Ct("design:type",Object)],t.prototype,"container",void 0),t=vt([e.Component({selector:"dato-infinite-scroll",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ElementRef,e.NgZone])],t)}(),Yc=[qc],Zc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Yc],exports:[Yc],entryComponents:[Yc]})],t)}(),Xc=function(t){function n(e,n,o){var i=t.call(this)||this;return i.controlDir=e,i.translate=n,i.snackbar=o,i.multi=!1,i.disabled=!1,e.valueAccessor=i,i}return ft(n,t),Object.defineProperty(n.prototype,"accept",{set:function(t){this.input.nativeElement.accept=t||""},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;this.controlDir.control.statusChanges.pipe(r.filter((function(t){return"INVALID"===t})),i.untilDestroyed(this)).subscribe((function(){var e=t.controlDir.control.errors;e&&!e.required&&(t.showErrors(e),t.controlDir.control.reset())}))},n.prototype.emitFiles=function(t){t&&this.setFiles(t)},n.prototype.openFileUpload=function(){this.input.nativeElement.click()},n.prototype.setFiles=function(t){this.onChange(this.multi?t:t.item(0))},n.prototype.writeValue=function(t){this.input&&(this.input.nativeElement.value="")},n.prototype.setDisabledState=function(t){this.disabled=t},n.prototype.ngOnDestroy=function(){},n.prototype.showErrors=function(t){var e;t.invalidFileType&&(e=t.invalidFileType.extension.toUpperCase()+" "+this.translate.transform("core.invalid-file-type")),t.invalidSize&&(e=this.translate.transform("core.invalid-file-size",{size:t.invalidSize.expected+"mb"})),this.snackbar.dramaticError(e)},n.ctorParameters=function(){return[{type:o.NgControl},{type:Mn},{type:zl}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"multi",void 0),vt([e.ViewChild("fileInput",{static:!0}),Ct("design:type",e.ElementRef)],n.prototype,"input",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],n.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],n.prototype,"accept",null),vt([e.HostListener("change",["$event.target.files"]),Ct("design:type",Function),Ct("design:paramtypes",[FileList]),Ct("design:returntype",void 0)],n.prototype,"emitFiles",null),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"openFileUpload",null),n=vt([e.Component({selector:"dato-file-input",template:'<input type="file" #fileInput [attr.multiple]="multi">\n<ng-content></ng-content>\n\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block;cursor:pointer}:host.disabled{pointer-events:none}:host input[type=file],:host label{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}"]}),Ct("design:paramtypes",[o.NgControl,Mn,zl])],n)}(Dt),Jc=function(){function t(t,e,n,o){this.ngControl=t,this.parent=e,this.host=n,this.cdr=o,this.isDraggingFiles=!1,this.disabled=!1,this.size="lg",Ut(n.nativeElement,["large-size"])}return Object.defineProperty(t.prototype,"datoSize",{set:function(t){this.size=t||"lg",Ut(this.host.nativeElement,{sm:"small-size",md:"medium-size",lg:"large-size"}[this.size])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.ngControl.control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLarge",{get:function(){return"lg"===this.size},enumerable:!0,configurable:!0}),t.prototype.dragenter=function(){this.isDraggingFiles=!0},t.prototype.dragover=function(t){t.preventDefault()},t.prototype.dragleave=function(){this.isDraggingFiles=!1},t.prototype.drop=function(t){t.preventDefault(),this.parent.setFiles(t.dataTransfer.files),this.isDraggingFiles=!1},t.prototype.ngOnInit=function(){var t=this;this.control.statusChanges.pipe(r.distinctUntilChanged(),r.startWith(this.isDisabled),i.untilDestroyed(this)).subscribe((function(){t.disabled!==t.isDisabled&&(t.disabled=t.isDisabled,t.cdr.detectChanges())}))},Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.control.disabled},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:o.NgControl},{type:Xc},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},vt([e.HostBinding("style.width.px"),e.Input(),Ct("design:type",Object)],t.prototype,"width",void 0),vt([e.HostBinding("style.height.px"),e.Input(),Ct("design:type",Object)],t.prototype,"height",void 0),vt([e.HostBinding("class.dragging-files"),Ct("design:type",Object)],t.prototype,"isDraggingFiles",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSize",null),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"imgTpl",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.HostListener("dragenter"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"dragenter",null),vt([e.HostListener("dragover",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"dragover",null),vt([e.HostListener("dragleave"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"dragleave",null),vt([e.HostListener("drop",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"drop",null),t=vt([e.Component({selector:"dato-file-input-default",template:'<header class="d-flex-column items-center">\n\n <section class="mb-20">\n\n <ng-template *ngTemplateOutlet="imgTpl || defaultImg"></ng-template>\n\n <ng-template #defaultImg>\n <svg width="188" height="133" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 188 133" class="file-input-default-img">\n <g fill="none" fill-rule="evenodd">\n <path d="M205.043 94.525c-11.976 15.33-55.795 33.382-72.69 39.757-14.955 5.643-72.095 23.33-91.387-6.177C18.332 93.485-5.408 38.255 25.314 25.06c38.874-16.694 114.334-.657 146.689 17.387 25.715 14.342 41.562 41.17 33.04 52.078z" id="a" fill="#F1F2F5" opacity=".869" transform="rotate(12 135.642 -3.646)"></path>\n <g transform="translate(30 49)" fill-rule="nonzero">\n <rect stroke="#BBDEFB" stroke-width="2" fill="#FFF" x="1" y="1" width="114" height="68" rx=".7"/>\n <g transform="translate(38 20)" fill="#E3F2FD">\n <path d="M23.892 7.081a.44.44 0 0 1 .725.01l14.555 21.86a.44.44 0 0 1-.366.684h-37.6a.44.44 0 0 1-.369-.68l6.264-9.67a.44.44 0 0 1 .693-.059l3.865 4.183a.44.44 0 0 0 .682-.044L23.891 7.08z"/>\n <circle cx="5" cy="5" r="5"/>\n </g>\n </g>\n </g>\n </svg>\n\n </ng-template>\n\n </section>\n\n <section class="file-input-content primary-300-color text-center">\n <ng-content></ng-content>\n </section>\n\n</header>\n\n<div class="drag-enter primary-200-color">\n {{ \'core.drop-file-here\' | translate }}\n</div>\n\n<footer class="d-flex items-center d-flex-wrap justify-center">\n <p class="primary-300-color">{{\'core.drag-and-drop\' | translate}}</p>\n <div class="flex-break " *ngIf="!isLarge"></div>\n <p class="mr-12 ml-12 primary-300-color">- {{\'core.or\' | translate}} -</p>\n <div class="flex-break" *ngIf="!isLarge"></div>\n <dato-button datoSize="sm" width="70px" [disabled]="disabled">{{\'core.browse\' | translate}}</dato-button>\n</footer>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;border-style:dashed;border-width:3px;flex-direction:column;justify-content:center;align-items:center;transition:border .3s}:host .drag-enter{display:none}:host.disabled{pointer-events:none}:host.dragging-files{justify-content:flex-end}:host.dragging-files *{pointer-events:none}:host.dragging-files .drag-enter{display:block;font-size:64px;line-height:64px;font-weight:800!important;margin-bottom:20px}:host.dragging-files footer,:host.dragging-files header{display:none}:host .file-input-content{font-size:12px}:host footer{margin-top:30px}:host.large-size{min-height:450px;height:100%}:host.medium-size{height:450px;width:300px;padding-right:10px;padding-left:10px}:host.medium-size footer{margin-top:20px}:host.medium-size footer dato-button{margin-top:10px}:host.medium-size .drag-enter{font-size:24px;line-height:24px}:host.small-size{min-height:242px;height:242px;width:300px}:host.small-size footer{margin-top:0}:host.small-size footer dato-button{margin-top:10px}:host.small-size .file-input-default-img{width:116px;height:70px}:host.small-size .drag-enter{font-size:20px;line-height:20px}footer p:first-child{font-size:24px;font-weight:800!important}footer p:last-of-type{font-size:14px}.flex-break{flex-basis:100%;height:0}"]}),Ct("design:paramtypes",[o.NgControl,Xc,e.ElementRef,e.ChangeDetectorRef])],t)}(),tp=[Xc,Jc],ep=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,Co],declarations:[tp],exports:[tp],entryComponents:[tp]})],t)}(),np=function(t){function n(e){var n=t.call(this)||this;return n.cdr=e,n.buttons=[],n.disabledIds=[],n.isRoundEdges=!1,n.datoSize="lg",n}var i;return ft(n,t),i=n,n.prototype.writeValue=function(t){this.active=t,this.cdr.markForCheck()},n.prototype.setActive=function(t){this.active=t,this.onChange(t)},n.prototype.isDisabled=function(t){return this.disabledIds.includes(t)},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Array)],n.prototype,"buttons",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"disabledIds",void 0),vt([e.Input(),e.HostBinding("class.is-round-edges"),Ct("design:type",Object)],n.prototype,"isRoundEdges",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"datoSize",void 0),n=i=vt([e.Component({selector:"dato-button-group",template:'<dato-button (click)="setActive(button.id)"\n [disabled]="isDisabled(button.id)"\n [attr.datoSize]="datoSize"\n *ngFor="let button of buttons" [attr.datoType]="button.id === active ? \'\' : \'secondary\'">\n {{ button.label | translate }}\n</dato-button>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return i})),multi:!0}],changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ChangeDetectorRef])],n)}(Dt),op=[np],ip=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,Co],declarations:[op],exports:[op]})],t)}();
488
488
  /**
489
489
  * @license
490
490
  * Copyright Datorama. All Rights Reserved.
491
491
  *
492
492
  * Use of this source code is governed by an Apache License 2.0 license that can be
493
493
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
494
- */(Pc=t.PillType||(t.PillType={})).PRIMARY="primary",Pc.SECONDARY="secondary",Pc.RED="red",Pc.ORANGE="orange";var rp=function(){function t(t){this.size=t,this._options=[],this.labelTooltipPosition="bottom",this.canRemove=!0,this.restCount=0,this._limitTo=10,this.removeOption=new e.EventEmitter,this.size=t||"md"}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"limitTo",{get:function(){return this._limitTo},set:function(t){this._limitTo=t,this.setRestCount()},enumerable:!0,configurable:!0}),t.prototype.remove=function(t){this.options=this._options.filter((function(e){return e.id!==t.id})),this.removeOption.emit(t)},Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options&&this.options.length>this.limitTo},enumerable:!0,configurable:!0}),t.prototype.setRestCount=function(){this.options&&this.options.length&&(this.restCount=Math.abs(this.limitTo-this.options.length))},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]}]},vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelTooltipPosition",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"canRemove",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"limitTo",null),vt([e.Output(),Ct("design:type",Object)],t.prototype,"removeOption",void 0),t=vt([e.Component({selector:"dato-pills",template:'<div class="dato-pills__active d-flex justify-between" [class.cant-remove]="!canRemove" [attr.dato-type]="option.type || \'primary\'" [class.disabled]="option.disabled"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (\'id\' | trackByProp)">\n <span [datoTooltip]="option.customTooltip || option.label" class="ellipsis"\n datoTooltipPosition="labelTooltipPosition" [datoTooltipOnTextOverflow]="!option.customTooltip">{{option.label | translate}}</span>\n <dato-icon class="d-flex-no-shrink pointer" datoIcon="close" *ngIf="canRemove"\n (click)="remove(option)"></dato-icon>\n</div>\n<div class="dato-pills__active d-flex justify-between dato-pills__rest" *ngIf="showRest">\n +{{restCount}}\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-pills{display:flex;flex-wrap:wrap}dato-pills .dato-pills__active{height:35px;line-height:35px;margin-right:6px;margin-bottom:6px;font-size:14px;font-weight:600}dato-pills .dato-pills__rest{padding:7px}dato-pills[datoSize=sm] .dato-pills__active{height:26px;line-height:26px;margin-right:6px;margin-bottom:6px;font-size:12px}"]}),bt(0,e.Attribute("datoSize")),Ct("design:paramtypes",[Object])],t)}(),ap=[rp],sp=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,to,Co,Ge],declarations:[ap],exports:[ap]})],t)}(),lp=function(){function t(t){this.cdr=t,this.barColor="primary-100",this.thresholds=[33,66]}return t.prototype.ngOnInit=function(){this.parts?this.parts&&this.parts.every((function(t){return t.weight>=0}))&&!this.parts.every((function(t){return!!t.percent}))&&this.initPartsPercent():(this.percent=this.percent||0,this.isByPercent=!0,this.hasInitialColor=!!this.color,this.initSinglePart())},t.prototype.ngOnChanges=function(t){this.isByPercent&&(t.percent&&!t.percent.firstChange||t.color&&!t.color.firstChange||t.tooltip&&!t.tooltip.firstChange)&&(this.initSinglePart(),this.cdr.detectChanges())},t.prototype.initSinglePart=function(){this.color&&this.hasInitialColor||this.initColor(),this.parts=[{percent:this.percent,color:this.color,tooltip:this.tooltip}]},t.prototype.initColor=function(){kt(this.thresholds)&&(this.color="accent-400"),1===this.thresholds.length?this.color=this.percent<=this.thresholds[0]?"red-400":"green-400":this.color=this.percent<=this.thresholds[0]?"red-400":this.percent<=this.thresholds[1]?"yellow-400":"green-400"},t.prototype.initPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.weight}),0);this.parts.forEach((function(e){e.percent=e.weight>0?Math.max(Math.round(e.weight/t*100),1):0})),this.roundPartsPercent()},t.prototype.roundPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.percent}),0);if(100!==t)for(var e=100-t,n=0,o=0;0!==e&&o<100;){var i=this.parts[n];n=(n+1)%this.parts.length,o++,0===i.weight||i.percent<=1||(i.percent+=e>0?1:-1,e-=e>0?1:-1)}},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"parts",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"percent",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"color",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"barColor",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"thresholds",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"showLegend",void 0),t=vt([e.Component({selector:"dato-progress-bar",template:'<div class="bar d-flex width-100 overflow-hidden"\n [style.width]="width"\n [class]="barColor + \'-background-color\'">\n <div *ngFor="let part of parts; index as i"\n class="part height-100"\n [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"\n [style.width]="i > 0 ? \'calc(\' + part.percent + \'% + 8px)\' : part.percent + \'%\'"\n [style.z-index]="100 - i"\n [datoTooltipV2]="part.tooltip">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf="showLegend" class="d-flex mt-12">\n <div *ngFor="let part of parts; index as i" class="d-flex mr-16">\n <div *ngIf="part.legendLabel || part.tooltip" class="d-flex items-center dato-note primary-400-color">\n <div class="legend-color mr-4" [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class="primary-300-color ml-3" *ngIf="part.legendSecondaryLabel">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:8px;height:8px;min-width:8px;border-radius:50%}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),cp=[lp],pp=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,to],declarations:[cp],exports:[cp]})],t)}(),dp=[to,Kc,ms,ps,Vc,Lc,ql,Oc,qi,dc,se,$c,In,Gl,Kl,wo,Ge,xo,Io,lc,or,kl,el,Wi,fi,$s,Mi,Ll,Cl,yl,er,Hi,ec,Co,At,Ts,Zc,Xs,ep,Sl,ks,ip,Cs,pl,sp,pp],up=function(){function t(){}var n;return n=t,t.forRoot=function(t){return{ngModule:n,providers:[{provide:Un,useValue:t},{provide:ut.EVENT_MANAGER_PLUGINS,useClass:Wc,multi:!0}]}},t=n=vt([e.NgModule({exports:[dp]})],t)}();(t.MockService||(t.MockService={})).TRANSLATE="translate";var hp={translate:{transform:function(t){return t}}};var gp={translate:function(){return{provide:jn,useValue:hp.translate}},datePickerConfig:function(){return{provide:Cn,useValue:function(){}}}};
494
+ */(Pc=t.PillType||(t.PillType={})).PRIMARY="primary",Pc.SECONDARY="secondary",Pc.RED="red",Pc.ORANGE="orange";var rp=function(){function t(t){this.size=t,this._options=[],this.labelTooltipPosition="bottom",this.canRemove=!0,this.restCount=0,this._limitTo=10,this.removeOption=new e.EventEmitter,this.size=t||"md"}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"limitTo",{get:function(){return this._limitTo},set:function(t){this._limitTo=t,this.setRestCount()},enumerable:!0,configurable:!0}),t.prototype.remove=function(t){this.options=this._options.filter((function(e){return e.id!==t.id})),this.removeOption.emit(t)},Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options&&this.options.length>this.limitTo},enumerable:!0,configurable:!0}),t.prototype.setRestCount=function(){this.options&&this.options.length&&(this.restCount=Math.abs(this.limitTo-this.options.length))},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]}]},vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelTooltipPosition",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"canRemove",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"limitTo",null),vt([e.Output(),Ct("design:type",Object)],t.prototype,"removeOption",void 0),t=vt([e.Component({selector:"dato-pills",template:'<div class="dato-pills__active d-flex justify-between" [class.cant-remove]="!canRemove" [attr.dato-type]="option.type || \'primary\'" [class.disabled]="option.disabled"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (\'id\' | trackByProp)">\n <span [datoTooltip]="option.customTooltip || option.label" class="ellipsis"\n datoTooltipPosition="labelTooltipPosition" [datoTooltipOnTextOverflow]="!option.customTooltip">{{option.label | translate}}</span>\n <dato-icon class="d-flex-no-shrink pointer" datoIcon="close" *ngIf="canRemove"\n (click)="remove(option)"></dato-icon>\n</div>\n<div class="dato-pills__active d-flex justify-between dato-pills__rest" *ngIf="showRest">\n +{{restCount}}\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-pills{display:flex;flex-wrap:wrap}dato-pills .dato-pills__active{height:35px;line-height:35px;margin-right:6px;margin-bottom:6px;font-size:14px;font-weight:600}dato-pills .dato-pills__rest{padding:7px}dato-pills[datoSize=sm] .dato-pills__active{height:26px;line-height:26px;margin-right:6px;margin-bottom:6px;font-size:12px}"]}),bt(0,e.Attribute("datoSize")),Ct("design:paramtypes",[Object])],t)}(),ap=[rp],sp=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,to,Co,Ge],declarations:[ap],exports:[ap]})],t)}(),lp=function(){function t(t){this.cdr=t,this.barColor="primary-100",this.thresholds=[33,66]}return t.prototype.ngOnInit=function(){this.parts?this.parts&&this.parts.every((function(t){return t.weight>=0}))&&!this.parts.every((function(t){return!!t.percent}))&&this.initPartsPercent():(this.percent=this.percent||0,this.isByPercent=!0,this.hasInitialColor=!!this.color,this.initSinglePart())},t.prototype.ngOnChanges=function(t){this.isByPercent&&(t.percent&&!t.percent.firstChange||t.color&&!t.color.firstChange||t.tooltip&&!t.tooltip.firstChange)&&(this.initSinglePart(),this.cdr.detectChanges())},t.prototype.initSinglePart=function(){this.color&&this.hasInitialColor||this.initColor(),this.parts=[{percent:this.percent,color:this.color,tooltip:this.tooltip}]},t.prototype.initColor=function(){kt(this.thresholds)&&(this.color="accent-400"),1===this.thresholds.length?this.color=this.percent<=this.thresholds[0]?"red-400":"green-400":this.color=this.percent<=this.thresholds[0]?"red-400":this.percent<=this.thresholds[1]?"yellow-400":"green-400"},t.prototype.initPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.weight}),0);this.parts.forEach((function(e){e.percent=e.weight>0?Math.max(Math.round(e.weight/t*100),1):0})),this.roundPartsPercent()},t.prototype.roundPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.percent}),0);if(100!==t)for(var e=100-t,n=0,o=0;0!==e&&o<100;){var i=this.parts[n];n=(n+1)%this.parts.length,o++,0===i.weight||i.percent<=1||(i.percent+=e>0?1:-1,e-=e>0?1:-1)}},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"parts",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"percent",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"color",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"barColor",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"thresholds",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"showLegend",void 0),t=vt([e.Component({selector:"dato-progress-bar",template:'<div class="bar d-flex width-100 overflow-hidden"\n [style.width]="width"\n [class]="barColor + \'-background-color\'">\n <div *ngFor="let part of parts; index as i"\n class="part height-100"\n [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"\n [style.width]="i > 0 ? \'calc(\' + part.percent + \'% + 8px)\' : part.percent + \'%\'"\n [style.z-index]="100 - i"\n [datoTooltipV2]="part.tooltip">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf="showLegend" class="d-flex mt-12">\n <div *ngFor="let part of parts; index as i" class="d-flex mr-16">\n <div *ngIf="part.legendLabel || part.tooltip" class="d-flex items-center dato-note primary-400-color">\n <div class="legend-color mr-4" [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class="primary-300-color ml-3" *ngIf="part.legendSecondaryLabel">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:8px;height:8px;min-width:8px;border-radius:50%}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),cp=[lp],pp=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,to],declarations:[cp],exports:[cp]})],t)}(),dp=[to,Kc,ms,ps,Vc,Lc,ql,Oc,qi,dc,se,Qc,In,Gl,Kl,wo,Ge,xo,Io,lc,or,kl,el,Wi,fi,Qs,Mi,Ll,Cl,yl,er,Hi,ec,Co,At,Ts,Zc,Xs,ep,Sl,ks,ip,Cs,pl,sp,pp],up=function(){function t(){}var n;return n=t,t.forRoot=function(t){return{ngModule:n,providers:[{provide:Un,useValue:t},{provide:ut.EVENT_MANAGER_PLUGINS,useClass:Wc,multi:!0}]}},t=n=vt([e.NgModule({exports:[dp]})],t)}();(t.MockService||(t.MockService={})).TRANSLATE="translate";var hp={translate:{transform:function(t){return t}}};var gp={translate:function(){return{provide:jn,useValue:hp.translate}},datePickerConfig:function(){return{provide:Cn,useValue:function(){}}}};
495
495
  /**
496
496
  * @license
497
497
  * Copyright Datorama. All Rights Reserved.
@@ -611,7 +611,7 @@ function Dc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function Ic(t,e,n){this.
611
611
  * Use of this source code is governed by an Apache License 2.0 license that can be
612
612
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
613
613
  */
614
- function fp(t){var e=t.collection,n=t.value,o=t.labelKey,i=(n||"").toLocaleLowerCase();return(e||[]).filter((function(t){return(t&&t[o]||"").toLocaleLowerCase().includes(i)}))}function mp(t){var e=t.collection,n=t.value,o=t.childrenKey,i=t.labelKey;return e.map((function(t){var e;return mt(mt({},t),((e={})[o]=fp({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function yp(t){var e=t.control,o=t.debounceTime,i=t.mapFn;return n.defer((function(){return e.valueChanges.pipe(Be(o),r.startWith(e.value||""),r.map(i))}))}window.coreVersion="22.15.0",t.APP_TRANSLATE=jn,t.AceService=kc,t.BaseCustomControl=Dt,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=ra,t.CustomHeaderControllerService=Sa,t.DATE_PICKER_CONFIG=Cn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=Ba,t.DATO_FORM_ERRORS=Os,t.DATO_GRID_STORAGE_API=Qr,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=ka,t.DatePickerConfig=bn,t.DatePickerMonthComponent=Ls,t.DatoAccordionComponent=hi,t.DatoAccordionContentComponent=li,t.DatoAccordionGroupComponent=pi,t.DatoAccordionHeaderComponent=ci,t.DatoAccordionModule=fi,t.DatoAceDirective=_c,t.DatoAceDraggableDirective=jc,t.DatoAceModule=Lc,t.DatoAutoCompleteContentDirective=zc,t.DatoAutoFocusDirective=An,t.DatoAutocompleteComponent=Bc,t.DatoAutocompleteDirective=Hc,t.DatoAutocompleteModule=Kc,t.DatoBreadcrumbsComponent=Qc,t.DatoBreadcrumbsModule=$c,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=np,t.DatoButtonGroupModule=ip,t.DatoButtonModule=se,t.DatoCamelCasePipe=ro,t.DatoCarouselComponent=Jl,t.DatoCarouselItemDirective=Yl,t.DatoCarouselItemElement=Xl,t.DatoCarouselModule=ec,t.DatoCheckboxComponent=ji,t.DatoCheckboxModule=Mi,t.DatoClipboardDirective=Hn,t.DatoColorDirective=xn,t.DatoConfirmationDialogComponent=Jo,t.DatoControlErrorComponent=ws,t.DatoControlErrorContainerDirective=Ss,t.DatoControlErrorsDirective=Ds,t.DatoCoreError=Eo,t.DatoCoreModule=up,t.DatoCustomHeaderTemplateComponent=Qa,t.DatoCustomHeaderTemplateDirective=Ka,t.DatoCustomMoreMenuTemplateDirective=Wa,t.DatoDatePickerContainerComponent=Fs,t.DatoDatePickerModule=Xs,t.DatoDatePickerRangeComponent=Us,t.DatoDatePickerSingleComponent=qs,t.DatoDialog=ti,t.DatoDialogCloseDirective=gl,t.DatoDialogComponent=$o,t.DatoDialogContentComponent=ul,t.DatoDialogDismissDirective=vl,t.DatoDialogFooterComponent=hl,t.DatoDialogHeaderComponent=dl,t.DatoDialogModule=Cl,t.DatoDialogRef=Qo,t.DatoDirectivesModule=to,t.DatoDisableControlDirective=zn,t.DatoDraggableDirective=Rn,t.DatoDynamicContentComponent=ml,t.DatoDynamicContentModule=yl,t.DatoEditableHeaderComponent=Hl,t.DatoEditableHeaderModule=Kl,t.DatoFileInputComponent=Xc,t.DatoFileInputDefaultComponent=Jc,t.DatoFileInputModule=ep,t.DatoFontDirective=Oo,t.DatoFontIconComponent=Ve,t.DatoFontIconModule=ze,t.DatoFormSubmitDirective=xs,t.DatoFormValidationModule=Ts,t.DatoGrid=dr,t.DatoGridAPI=Ao,t.DatoGridAvatarCellComponent=Rl,t.DatoGridColumnDisplayMenuComponent=ts,t.DatoGridColumnHeaderComponent=xa,t.DatoGridColumnHeaderMoreMenuComponent=ha,t.DatoGridComponent=No,t.DatoGridControllerComponent=Xa,t.DatoGridDateFilterOptions=Dr,t.DatoGridFilterComponent=wa,t.DatoGridFilterOptionsMap=Rr,t.DatoGridGroupsMenuComponent=es,t.DatoGridHeaderComponent=Fo,t.DatoGridHeaderV2Component=ns,t.DatoGridInitialsCellComponent=Tl,t.DatoGridItemsCellComponent=Il,t.DatoGridModule=or,t.DatoGridNumberFilterOptions=Tr,t.DatoGridOnHoverComponent=qa,t.DatoGridPaginationComponent=Mo,t.DatoGridPaginationV2Component=is,t.DatoGridStatusCellComponent=Dl,t.DatoGridStringFilterOptions=Ir,t.DatoGridToolbarComponent=ri,t.DatoGridToolbarItemDirective=Vo,t.DatoGridToolbarItemElementDirective=zo,t.DatoGridV2Component=Ja,t.DatoGridV2LoaderComponent=Yr,t.DatoGridV2Module=kl,t.DatoGridV2NoDataOverlayComponent=na,t.DatoGridV2ToolbarButtonComponent=rs,t.DatoGridV2ToolbarComponent=as,t.DatoGroupComponent=bi,t.DatoHighlightPipe=no,t.DatoHotkeys=Za,t.DatoHotkeysDirective=wl,t.DatoHotkeysHelpComponent=Ya,t.DatoHotkeysModule=Sl,t.DatoIconButtonComponent=To,t.DatoIconButtonModule=Ro,t.DatoIconComponent=Fe,t.DatoIconModule=Ge,t.DatoInfiniteScrollComponent=qc,t.DatoInfiniteScrollModule=Zc,t.DatoInputComponent=Sn,t.DatoInputModule=wo,t.DatoInputNumberComponent=As,t.DatoInputNumberDirective=Rs,t.DatoInputNumberModule=ks,t.DatoKebabCasePipe=io,t.DatoLinkButtonComponent=So,t.DatoLinkButtonModule=xo,t.DatoListComponent=Ji,t.DatoListModule=er,t.DatoListNoDataComponent=sl,t.DatoListNoResultComponent=al,t.DatoListV2Component=rl,t.DatoListV2Module=pl,t.DatoLoaderComponent=Js,t.DatoLoadersModule=el,t.DatoMenuComponent=us,t.DatoMenuContentDirective=ds,t.DatoMenuItemDirective=gs,t.DatoMenuModule=ms,t.DatoMenuTriggerForDirective=hs,t.DatoMultiOptionComponent=Ni,t.DatoMultiOptionV2Component=Vi,t.DatoOperatorTogglerComponent=vs,t.DatoOperatorTogglerModule=Cs,t.DatoOptionComponent=Ci,t.DatoOptionV2Component=Gi,t.DatoOptionsModule=Hi,t.DatoOriginDirective=Tn,t.DatoOverlay=kn,t.DatoPageLoaderComponent=tl,t.DatoPanel=bc,t.DatoPanelComponent=mc,t.DatoPanelContentComponent=wc,t.DatoPanelFooterComponent=Sc,t.DatoPanelHeaderComponent=Cc,t.DatoPanelInternalConfig=yc,t.DatoPanelModule=Oc,t.DatoPanelRef=vc,t.DatoPillsComponent=rp,t.DatoPillsModule=sp,t.DatoPipesModule=Co,t.DatoPopover=da,t.DatoPopoverComponent=la,t.DatoPopoverModule=ps,t.DatoProgressBarComponent=lp,t.DatoProgressBarModule=pp,t.DatoRadioComponent=jl,t.DatoRadioModule=Ll,t.DatoRichTextDirective=Ql,t.DatoRichTextModule=ql,t.DatoSearchResultsGroupSortPipe=uo,t.DatoSearchResultsSortPipe=go,t.DatoSearchableContainerComponent=ai,t.DatoSearchableDirective=si,t.DatoSearchableHighlightDirective=Fc,t.DatoSearchableModule=Vc,t.DatoSelectActiveDirective=wi,t.DatoSelectComponent=ki,t.DatoSelectEmptyComponent=Fi,t.DatoSelectModule=qi,t.DatoShortNumberPipe=vo,t.DatoSliderComponent=Tt,t.DatoSliderModule=At,t.DatoSnackbar=zl,t.DatoSnackbarComponent=Fl,t.DatoSnackbarModule=Gl,t.DatoSortableComponent=ui,t.DatoSortableHandleDirective=Ui,t.DatoSortableModule=Wi,t.DatoStaticImageSrcDirective=Kn,t.DatoStaticImagesSrcModule=Wn,t.DatoSubscribeContext=Gn,t.DatoSubscribeDirective=Vn,t.DatoTab=rc,t.DatoTabContent=ic,t.DatoTabTitle=oc,t.DatoTabsModule=lc,t.DatoTabset=ac,t.DatoTemplatePortal=_n,t.DatoTextModule=Io,t.DatoThemesModule=In,t.DatoToast=fc,t.DatoToastComponent=pc,t.DatoToastModule=dc,t.DatoTogglerComponent=Ws,t.DatoTogglerModule=$s,t.DatoTooltipDirective=Fn,t.DatoTooltipV2Directive=Xn,t.DatoTrackByPropPipe=mo,t.DatoTranslateService=Mn,t.DatoTreePipe=yo,t.DatoTriggerMulti=Li,t.DatoTriggerSingle=Ei,t.DialogConfig=qo,t.EventModifiersPlugin=Wc,t.GridToolbarService=ii,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=Le,t.POPPER_BOUNDARY=Ns,t.PaletteDirective=On,t.PopoverCloseDirective=ss,t.PopoverContentDirective=ls,t.PopoverRef=ca,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=Vl,t.Store=nl,t.SvgRegistry=Ne,t.ToolbarConfirmation=ni,t.ToolbarDeleteConfirmation=oi,t.ToolbarHandler=ei,t.TranslatePipe=oo,t._valueChanges=yp,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ut,t.addJSObjectCompletor=Ec,t.allowedFileTypes=function(t){return function(e){var n=e.value;if(n)for(var o=n instanceof FileList?n:[n],i=0,r=o.length;i<r;i++){var a=o[i].name.split(".").pop();if(!1===t.includes(a))return{invalidFileType:{extension:a}}}return null}},t.alphabeticalGroupSort=po,t.alphabeticalSort=co,t.appendChild=qt,t.appendScript=Xt,t.appendStyle=Jt,t.appendToBody=Zt,t.assertString=function(t,e){if("string"!=typeof t)throw new Eo(e+" expecting string but got "+typeof t)},t.camelCase=Te,t.capitalize=Ie,t.cloneDeep=function(t){return N(t)},t.closest=ee,t.coerceArray=me,t.coerceElement=function(t){return t instanceof e.ElementRef?t.nativeElement:t},t.compareWith=so,t.compose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.reduce((function(t,e){return e(t)}),e)}},t.convertFromTreeData=za,t.convertToTreeData=Va,t.createComponent=oa,t.createDefaultTreeOptions=Ta,t.createElement=$t,t.createGUID=Ae,t.createHTMLCompletor=Ac,t.curry=ve,t.dateCompare=je,t.daysOfTheMonth=Ms,t.debounce=function(t,e,n){return I(t,e,n)},t.declarations=bl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),G(t,e,n)},t.deepmerge=ea,t.defaultActions=ua,t.defaultConfig=Nl,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=Pa,t.defaultGridTreeLabel=_a,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=Ra,t.dialogSizePreset=Uo,t.diff=Se,t.difference=le,t.differenceBy=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return h.apply(void 0,xt(t))},t.dimensionsChanges=Yn,t.directives=Dn,t.drop=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.editableCellRendererWithSearchHighlight=$r,t.escape=Oe,t.escapeRegExp=De,t.filter=function(t,e){return O(t,e)},t.filterByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.debounceTime;return yp({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return fp({collection:t,value:e,labelKey:r})}})},t.filterByTerm=fp,t.filterDialogDismissed=function(){return cc(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return cc(t.DialogResultStatus.SUCCESS)},t.filterGroupByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.childrenKey,s=void 0===a?"children":a,l=o.debounceTime;return yp({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return mp({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=mp,t.filterKey=Ri,t.find=function(t,e,n){return v(t,e,n)},t.findIndex=ce,t.findKey=function(t,e){return D(t,e)},t.fixNgLeaks=function(){o.FormControlDirective.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null},o.FormControlName.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null}},t.forEach=function(t,e){return b(t,e)},t.formatKeys=ma,t.generateMonths=zs,t.get=function(t,e,n){return E(t,e,n)},t.getAttr=Bt,t.getCustomRange=sn,t.getDateISOString=cn,t.getDefaultConfirmationOptions=Zo,t.getDefaultOptions=Bo,t.getDefaultsToastOptions=hc,t.getElementCoords=te,t.getFunctionName=be,t.getGridConfiguration=rr,t.getGridModel=lr,t.getInitials=Ee,t.getLocalizedFormat=pn,t.getMultiTemplate=mi,t.getOptionTemplate=yi,t.getPopperDefaults=function(t){return{placement:t.placement,modifiers:{keepTogether:{enabled:!0},hide:{enabled:!1},preventOverflow:{enabled:!1}}}},t.getUTCDate=ln,t.getVisibleActions=Mr,t.gridTreeFilePathKey=ja,t.groupBy=function(t,e){return x(t,e)},t.groupSortOrder=ao,t.has=function(t,e){return P(t,e)},t.inView=$n,t.intersection=
614
+ function fp(t){var e=t.collection,n=t.value,o=t.labelKey,i=(n||"").toLocaleLowerCase();return(e||[]).filter((function(t){return(t&&t[o]||"").toLocaleLowerCase().includes(i)}))}function mp(t){var e=t.collection,n=t.value,o=t.childrenKey,i=t.labelKey;return e.map((function(t){var e;return mt(mt({},t),((e={})[o]=fp({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function yp(t){var e=t.control,o=t.debounceTime,i=t.mapFn;return n.defer((function(){return e.valueChanges.pipe(Be(o),r.startWith(e.value||""),r.map(i))}))}window.coreVersion="22.15.3",t.APP_TRANSLATE=jn,t.AceService=kc,t.BaseCustomControl=Dt,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=ra,t.CustomHeaderControllerService=Sa,t.DATE_PICKER_CONFIG=Cn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=Ba,t.DATO_FORM_ERRORS=Os,t.DATO_GRID_STORAGE_API=$r,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=ka,t.DatePickerConfig=bn,t.DatePickerMonthComponent=Ls,t.DatoAccordionComponent=hi,t.DatoAccordionContentComponent=li,t.DatoAccordionGroupComponent=pi,t.DatoAccordionHeaderComponent=ci,t.DatoAccordionModule=fi,t.DatoAceDirective=_c,t.DatoAceDraggableDirective=jc,t.DatoAceModule=Lc,t.DatoAutoCompleteContentDirective=zc,t.DatoAutoFocusDirective=An,t.DatoAutocompleteComponent=Bc,t.DatoAutocompleteDirective=Hc,t.DatoAutocompleteModule=Kc,t.DatoBreadcrumbsComponent=$c,t.DatoBreadcrumbsModule=Qc,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=np,t.DatoButtonGroupModule=ip,t.DatoButtonModule=se,t.DatoCamelCasePipe=ro,t.DatoCarouselComponent=Jl,t.DatoCarouselItemDirective=Yl,t.DatoCarouselItemElement=Xl,t.DatoCarouselModule=ec,t.DatoCheckboxComponent=ji,t.DatoCheckboxModule=Mi,t.DatoClipboardDirective=Hn,t.DatoColorDirective=xn,t.DatoConfirmationDialogComponent=Jo,t.DatoControlErrorComponent=ws,t.DatoControlErrorContainerDirective=Ss,t.DatoControlErrorsDirective=Ds,t.DatoCoreError=Eo,t.DatoCoreModule=up,t.DatoCustomHeaderTemplateComponent=$a,t.DatoCustomHeaderTemplateDirective=Ka,t.DatoCustomMoreMenuTemplateDirective=Wa,t.DatoDatePickerContainerComponent=Fs,t.DatoDatePickerModule=Xs,t.DatoDatePickerRangeComponent=Us,t.DatoDatePickerSingleComponent=qs,t.DatoDialog=ti,t.DatoDialogCloseDirective=gl,t.DatoDialogComponent=Qo,t.DatoDialogContentComponent=ul,t.DatoDialogDismissDirective=vl,t.DatoDialogFooterComponent=hl,t.DatoDialogHeaderComponent=dl,t.DatoDialogModule=Cl,t.DatoDialogRef=$o,t.DatoDirectivesModule=to,t.DatoDisableControlDirective=zn,t.DatoDraggableDirective=Rn,t.DatoDynamicContentComponent=ml,t.DatoDynamicContentModule=yl,t.DatoEditableHeaderComponent=Hl,t.DatoEditableHeaderModule=Kl,t.DatoFileInputComponent=Xc,t.DatoFileInputDefaultComponent=Jc,t.DatoFileInputModule=ep,t.DatoFontDirective=Oo,t.DatoFontIconComponent=Ve,t.DatoFontIconModule=ze,t.DatoFormSubmitDirective=xs,t.DatoFormValidationModule=Ts,t.DatoGrid=dr,t.DatoGridAPI=Ao,t.DatoGridAvatarCellComponent=Rl,t.DatoGridColumnDisplayMenuComponent=ts,t.DatoGridColumnHeaderComponent=xa,t.DatoGridColumnHeaderMoreMenuComponent=ha,t.DatoGridComponent=No,t.DatoGridControllerComponent=Xa,t.DatoGridDateFilterOptions=Dr,t.DatoGridFilterComponent=wa,t.DatoGridFilterOptionsMap=Rr,t.DatoGridGroupsMenuComponent=es,t.DatoGridHeaderComponent=Fo,t.DatoGridHeaderV2Component=ns,t.DatoGridInitialsCellComponent=Tl,t.DatoGridItemsCellComponent=Il,t.DatoGridModule=or,t.DatoGridNumberFilterOptions=Tr,t.DatoGridOnHoverComponent=qa,t.DatoGridPaginationComponent=Mo,t.DatoGridPaginationV2Component=is,t.DatoGridStatusCellComponent=Dl,t.DatoGridStringFilterOptions=Ir,t.DatoGridToolbarComponent=ri,t.DatoGridToolbarItemDirective=Vo,t.DatoGridToolbarItemElementDirective=zo,t.DatoGridV2Component=Ja,t.DatoGridV2LoaderComponent=Yr,t.DatoGridV2Module=kl,t.DatoGridV2NoDataOverlayComponent=na,t.DatoGridV2ToolbarButtonComponent=rs,t.DatoGridV2ToolbarComponent=as,t.DatoGroupComponent=bi,t.DatoHighlightPipe=no,t.DatoHotkeys=Za,t.DatoHotkeysDirective=wl,t.DatoHotkeysHelpComponent=Ya,t.DatoHotkeysModule=Sl,t.DatoIconButtonComponent=To,t.DatoIconButtonModule=Ro,t.DatoIconComponent=Fe,t.DatoIconModule=Ge,t.DatoInfiniteScrollComponent=qc,t.DatoInfiniteScrollModule=Zc,t.DatoInputComponent=Sn,t.DatoInputModule=wo,t.DatoInputNumberComponent=As,t.DatoInputNumberDirective=Rs,t.DatoInputNumberModule=ks,t.DatoKebabCasePipe=io,t.DatoLinkButtonComponent=So,t.DatoLinkButtonModule=xo,t.DatoListComponent=Ji,t.DatoListModule=er,t.DatoListNoDataComponent=sl,t.DatoListNoResultComponent=al,t.DatoListV2Component=rl,t.DatoListV2Module=pl,t.DatoLoaderComponent=Js,t.DatoLoadersModule=el,t.DatoMenuComponent=us,t.DatoMenuContentDirective=ds,t.DatoMenuItemDirective=gs,t.DatoMenuModule=ms,t.DatoMenuTriggerForDirective=hs,t.DatoMultiOptionComponent=Ni,t.DatoMultiOptionV2Component=Vi,t.DatoOperatorTogglerComponent=vs,t.DatoOperatorTogglerModule=Cs,t.DatoOptionComponent=Ci,t.DatoOptionV2Component=Gi,t.DatoOptionsModule=Hi,t.DatoOriginDirective=Tn,t.DatoOverlay=kn,t.DatoPageLoaderComponent=tl,t.DatoPanel=bc,t.DatoPanelComponent=mc,t.DatoPanelContentComponent=wc,t.DatoPanelFooterComponent=Sc,t.DatoPanelHeaderComponent=Cc,t.DatoPanelInternalConfig=yc,t.DatoPanelModule=Oc,t.DatoPanelRef=vc,t.DatoPillsComponent=rp,t.DatoPillsModule=sp,t.DatoPipesModule=Co,t.DatoPopover=da,t.DatoPopoverComponent=la,t.DatoPopoverModule=ps,t.DatoProgressBarComponent=lp,t.DatoProgressBarModule=pp,t.DatoRadioComponent=jl,t.DatoRadioModule=Ll,t.DatoRichTextDirective=$l,t.DatoRichTextModule=ql,t.DatoSearchResultsGroupSortPipe=uo,t.DatoSearchResultsSortPipe=go,t.DatoSearchableContainerComponent=ai,t.DatoSearchableDirective=si,t.DatoSearchableHighlightDirective=Fc,t.DatoSearchableModule=Vc,t.DatoSelectActiveDirective=wi,t.DatoSelectComponent=ki,t.DatoSelectEmptyComponent=Fi,t.DatoSelectModule=qi,t.DatoShortNumberPipe=vo,t.DatoSliderComponent=Tt,t.DatoSliderModule=At,t.DatoSnackbar=zl,t.DatoSnackbarComponent=Fl,t.DatoSnackbarModule=Gl,t.DatoSortableComponent=ui,t.DatoSortableHandleDirective=Ui,t.DatoSortableModule=Wi,t.DatoStaticImageSrcDirective=Kn,t.DatoStaticImagesSrcModule=Wn,t.DatoSubscribeContext=Gn,t.DatoSubscribeDirective=Vn,t.DatoTab=rc,t.DatoTabContent=ic,t.DatoTabTitle=oc,t.DatoTabsModule=lc,t.DatoTabset=ac,t.DatoTemplatePortal=_n,t.DatoTextModule=Io,t.DatoThemesModule=In,t.DatoToast=fc,t.DatoToastComponent=pc,t.DatoToastModule=dc,t.DatoTogglerComponent=Ws,t.DatoTogglerModule=Qs,t.DatoTooltipDirective=Fn,t.DatoTooltipV2Directive=Xn,t.DatoTrackByPropPipe=mo,t.DatoTranslateService=Mn,t.DatoTreePipe=yo,t.DatoTriggerMulti=Li,t.DatoTriggerSingle=Ei,t.DialogConfig=qo,t.EventModifiersPlugin=Wc,t.GridToolbarService=ii,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=Le,t.POPPER_BOUNDARY=Ns,t.PaletteDirective=On,t.PopoverCloseDirective=ss,t.PopoverContentDirective=ls,t.PopoverRef=ca,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=Vl,t.Store=nl,t.SvgRegistry=Ne,t.ToolbarConfirmation=ni,t.ToolbarDeleteConfirmation=oi,t.ToolbarHandler=ei,t.TranslatePipe=oo,t._valueChanges=yp,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ut,t.addJSObjectCompletor=Ec,t.allowedFileTypes=function(t){return function(e){var n=e.value;if(n)for(var o=n instanceof FileList?n:[n],i=0,r=o.length;i<r;i++){var a=o[i].name.split(".").pop();if(!1===t.includes(a))return{invalidFileType:{extension:a}}}return null}},t.alphabeticalGroupSort=po,t.alphabeticalSort=co,t.appendChild=qt,t.appendScript=Xt,t.appendStyle=Jt,t.appendToBody=Zt,t.assertString=function(t,e){if("string"!=typeof t)throw new Eo(e+" expecting string but got "+typeof t)},t.camelCase=Te,t.capitalize=Ie,t.cloneDeep=function(t){return N(t)},t.closest=ee,t.coerceArray=me,t.coerceElement=function(t){return t instanceof e.ElementRef?t.nativeElement:t},t.compareWith=so,t.compose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.reduce((function(t,e){return e(t)}),e)}},t.convertFromTreeData=za,t.convertToTreeData=Va,t.createComponent=oa,t.createDefaultTreeOptions=Ta,t.createElement=Qt,t.createGUID=Ae,t.createHTMLCompletor=Ac,t.curry=ve,t.dateCompare=je,t.daysOfTheMonth=Ms,t.debounce=function(t,e,n){return I(t,e,n)},t.declarations=bl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),G(t,e,n)},t.deepmerge=ea,t.defaultActions=ua,t.defaultConfig=Nl,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=Pa,t.defaultGridTreeLabel=_a,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=Ra,t.dialogSizePreset=Uo,t.diff=Se,t.difference=le,t.differenceBy=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return h.apply(void 0,xt(t))},t.dimensionsChanges=Yn,t.directives=Dn,t.drop=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.editableCellRendererWithSearchHighlight=Qr,t.escape=Oe,t.escapeRegExp=De,t.filter=function(t,e){return O(t,e)},t.filterByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.debounceTime;return yp({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return fp({collection:t,value:e,labelKey:r})}})},t.filterByTerm=fp,t.filterDialogDismissed=function(){return cc(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return cc(t.DialogResultStatus.SUCCESS)},t.filterGroupByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.childrenKey,s=void 0===a?"children":a,l=o.debounceTime;return yp({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return mp({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=mp,t.filterKey=Ri,t.find=function(t,e,n){return v(t,e,n)},t.findIndex=ce,t.findKey=function(t,e){return D(t,e)},t.fixNgLeaks=function(){o.FormControlDirective.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null},o.FormControlName.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null}},t.forEach=function(t,e){return b(t,e)},t.formatKeys=ma,t.generateMonths=zs,t.get=function(t,e,n){return E(t,e,n)},t.getAttr=Bt,t.getCustomRange=sn,t.getDateISOString=cn,t.getDefaultConfirmationOptions=Zo,t.getDefaultOptions=Bo,t.getDefaultsToastOptions=hc,t.getElementCoords=te,t.getFunctionName=be,t.getGridConfiguration=rr,t.getGridModel=lr,t.getInitials=Ee,t.getLocalizedFormat=pn,t.getMultiTemplate=mi,t.getOptionTemplate=yi,t.getPopperDefaults=function(t){return{placement:t.placement,modifiers:{keepTogether:{enabled:!0},hide:{enabled:!1},preventOverflow:{enabled:!1}}}},t.getUTCDate=ln,t.getVisibleActions=Mr,t.gridTreeFilePathKey=ja,t.groupBy=function(t,e){return x(t,e)},t.groupSortOrder=ao,t.has=function(t,e){return P(t,e)},t.inView=Qn,t.intersection=
615
615
  /**
616
616
  * @license
617
617
  * Copyright Datorama. All Rights Reserved.
@@ -619,7 +619,7 @@ function fp(t){var e=t.collection,n=t.value,o=t.labelKey,i=(n||"").toLocaleLower
619
619
  * Use of this source code is governed by an Apache License 2.0 license that can be
620
620
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
621
621
  */
622
- function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p.apply(void 0,xt(t))},t.invert=function(t){return V(t)},t.isArrayValuesEqual=he,t.isArrowUpDown=Di,t.isBoolean=Nt,t.isEmpty=kt,t.isEmptyString=function(t){return 0===t.trim().length},t.isEnter=Ii,t.isEqual=jt,t.isEscape=Ti,t.isFraction=function(t){if(!_t(t))throw"isFraction expected a number but got "+(null===t?"null":function(t){return"number"==typeof t&&t!=t}(t)?"NaN":typeof t);return t%1!=0},t.isFunction=Et,t.isMacintosh=fa,t.isNil=Lt,t.isNumber=_t,t.isObject=Pt,t.isRangeCondition=Ar,t.isRangeCustom=an,t.isString=Mt,t.isTestEnv=Ai,t.isValidMediaLink=function(t){return Pe.test(t)||ke.test(t)},t.kebabCase=Re,t.keyBy=function(t,e){return w(t,e)},t.keysSymbols=ga,t.last=pe,t.map=function(t,e){return C(t,e)},t.mapKeys=function(t,e){return _(t,e)},t.mapValues=function(t,e){return k(t,e)},t.maxFileSize=function(t){return function(e){var n=e.value;if(n){for(var o=n instanceof FileList?n:[n],i=0,r=o.length;i<r;i++){var a=o[i],s=function(t){return Math.ceil(t/1024/1024)};if(s(a.size)>t)return{invalidSize:{currentSize:s(a.size),expected:t}}}return null}return null}},t.merge=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return M.apply(void 0,xt([t],e))},t.minBy=function(t,e){return f(t,e)},t.mockInDev=function(t,e,n){return window.datoDevMode?hp[t]:n.get(e)},t.mocks=hp,t.ngContentResolver=aa,t.noop=ne,t.normalizeData=Oi,t.omit=function(t,e){if(!t)throw"No object given";if(!Pt(t))throw"Expected an object but got "+typeof t+" instead";var n=Array.isArray(e);if(!(e=n?e.filter((function(t){return t})):e)||n&&!e.length)throw"No path was given";if(n?e.some((function(t){return"string"!=typeof t})):"string"!=typeof e)throw"Expected a string / string array but got something else";var o=mt({},t);return n?e.reduce((function(t,e){return xe(t,e)}),o):xe(o,e)},t.omitBy=function(t,e){return F(t,e)},t.optionalDebounce=Be,t.pallete=$a,t.parseDateString=dn,t.partial=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return A.apply(void 0,xt([t],e))},t.polling=
622
+ function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p.apply(void 0,xt(t))},t.invert=function(t){return V(t)},t.isArrayValuesEqual=he,t.isArrowUpDown=Di,t.isBoolean=Nt,t.isEmpty=kt,t.isEmptyString=function(t){return 0===t.trim().length},t.isEnter=Ii,t.isEqual=jt,t.isEscape=Ti,t.isFraction=function(t){if(!_t(t))throw"isFraction expected a number but got "+(null===t?"null":function(t){return"number"==typeof t&&t!=t}(t)?"NaN":typeof t);return t%1!=0},t.isFunction=Et,t.isMacintosh=fa,t.isNil=Lt,t.isNumber=_t,t.isObject=Pt,t.isRangeCondition=Ar,t.isRangeCustom=an,t.isString=Mt,t.isTestEnv=Ai,t.isValidMediaLink=function(t){return Pe.test(t)||ke.test(t)},t.kebabCase=Re,t.keyBy=function(t,e){return w(t,e)},t.keysSymbols=ga,t.last=pe,t.map=function(t,e){return C(t,e)},t.mapKeys=function(t,e){return _(t,e)},t.mapValues=function(t,e){return k(t,e)},t.maxFileSize=function(t){return function(e){var n=e.value;if(n){for(var o=n instanceof FileList?n:[n],i=0,r=o.length;i<r;i++){var a=o[i],s=function(t){return Math.ceil(t/1024/1024)};if(s(a.size)>t)return{invalidSize:{currentSize:s(a.size),expected:t}}}return null}return null}},t.merge=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return M.apply(void 0,xt([t],e))},t.minBy=function(t,e){return f(t,e)},t.mockInDev=function(t,e,n){return window.datoDevMode?hp[t]:n.get(e)},t.mocks=hp,t.ngContentResolver=aa,t.noop=ne,t.normalizeData=Oi,t.omit=function(t,e){if(!t)throw"No object given";if(!Pt(t))throw"Expected an object but got "+typeof t+" instead";var n=Array.isArray(e);if(!(e=n?e.filter((function(t){return t})):e)||n&&!e.length)throw"No path was given";if(n?e.some((function(t){return"string"!=typeof t})):"string"!=typeof e)throw"Expected a string / string array but got something else";var o=mt({},t);return n?e.reduce((function(t,e){return xe(t,e)}),o):xe(o,e)},t.omitBy=function(t,e){return F(t,e)},t.optionalDebounce=Be,t.pallete=Qa,t.parseDateString=dn,t.partial=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return A.apply(void 0,xt([t],e))},t.polling=
623
623
  /**
624
624
  * @license
625
625
  * Copyright Datorama. All Rights Reserved.
@@ -634,5 +634,5 @@ function(t,e,o){if(void 0===o&&(o=1),!_t(e)||!_t(o))throw"period/initialDelay sh
634
634
  *
635
635
  * Use of this source code is governed by an Apache License 2.0 license that can be
636
636
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
637
- */,t.prependChild=Yt,t.publicApi=Do,t.query=Ft,t.queryAll=Gt,t.random=function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=1),!_t(t))throw"the lower bound is not a number";if(!_t(e))throw"the upper bound is not a number";if(t>e)throw"the upper bound should be grater than the lower bound";return 0===t&&1===e?Math.random():t+Math.floor(Math.random()*(e-t+1))},t.rawDiff=function(t,e){return JSON.stringify(t)!==JSON.stringify(e)},t.readFromClipboard=function(){return navigator.clipboard.readText()},t.reject=function(t,e){return S(t,e)},t.relativeDateTypes=vn,t.removeClass=Wt,t.resolveRange=Bs,t.round=function(t,e){if(!_t(t))throw"value to round is not a number";if(e&&!_t(e))throw"precision value is not a number";var n=e?Math.pow(10,e):Math.pow(10,2);return Math.round(t*n)/n},t.searchHighlightCellRenderer=qr,t.searchResultsGroupSort=lo,t.searchResultsSort=ho,t.setAttr=zt,t.setAttribute=Qt,t.setDimensions=oe,t.setGridConfiguration=function(t){ir=mt(mt({},ir),t)},t.setGridModel=sr,t.setMaxDimensions=function(t,e,n){oe(t,e,n,"max-")},t.setMinDimensions=ie,t.setStyle=Vt,t.setStyles=Ht,t.shortNumber=Ce,t.size=ye,t.sortBy=function(t,e){return y(t,e)},t.stubs=gp,t.supportedLocales=on,t.tapLog=function(t){return r.tap((function(e){return console.log("%c["+t+": Next]","color: #4CAF50;",e)}),(function(e){return console.log("%c"+t+": Error]","color: #F44336;",e)}),(function(){return console.log("%c["+t+": Complete]","color: #2196F3;")}))},t.tapOnce=os,t.throttle=function(t,e,n){return T(t,e,n)},t.toBoolean=ge,t.toFormData=function(t,e){var n,o;void 0===e&&(e={});var i=new FormData;try{for(var r=wt(Object.keys(t)),a=r.next();!a.done;a=r.next()){var s=a.value,l=t[s];if(e.multiFileKey&&l instanceof FileList)for(var c=0,p=l.length;c<p;c++)i.append(s+"[]",l[c]);else i.append(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},t.toNumber=fe,t.toResponseBody=function(){return n.pipe(r.filter((function(t){return t.type===ht.HttpEventType.Response})),r.map((function(t){return t.body})))},t.toString=function(t){return t?t.toString():""},t.toggleClass=Kt,t.toolbarActionToContextAction=Br,t.tryParsePivotValue=fr,t.unescape=function(t){return B(t)},t.union=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return d.apply(void 0,xt(t))},t.uniq=de,t.uniqBy=ue,t.uploadProgress=function(t){return r.tap((function(e){e.type===ht.HttpEventType.UploadProgress&&t(Math.round(100*e.loaded/e.total))}))},t.validBase64Image=ke,t.validUrl=Pe,t.validateCondition=_r,t.validateDate=Vs,t.validateDateCondition=kr,t.validateFilter=jr,t.validateNumberCondition=Pr,t.validateRange=Gs,t.validateStringCondition=Er,t.values=we,t.workerMap=function(t){return function(e){return new n.Observable((function(n){var o=function(t){var e=new Blob(["self.cb = "+t+";self.onmessage = function (e) { self.postMessage(self.cb(e.data)) }"],{type:"text/javascript"}),n=URL.createObjectURL(e);return new Worker(n)}(t);return o.onmessage=function(t){n.next(t.data),o.terminate()},o.onerror=function(t){n.error(t),o.terminate()},e.subscribe({next:function(t){o.postMessage(t)}})}))}},t.writeToClipboard=Bn,t.zoneStable=En,t.ɵ0=Da,t.ɵ1=Aa,t.ɵ2=yn,t.ɵb=Un,t.ɵc=jo,t.ɵd=Pn,t.ɵe=wr,t.ɵf=ur,t.ɵg=Ua,t.ɵh=Ys,t.ɵi=ol,t.ɵj=ll,t.ɵk=Ha,t.ɵl=Al,t.ɵm=Ol,t.ɵn=xl,Object.defineProperty(t,"__esModule",{value:!0})}));
637
+ */,t.prependChild=Yt,t.publicApi=Do,t.query=Ft,t.queryAll=Gt,t.random=function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=1),!_t(t))throw"the lower bound is not a number";if(!_t(e))throw"the upper bound is not a number";if(t>e)throw"the upper bound should be grater than the lower bound";return 0===t&&1===e?Math.random():t+Math.floor(Math.random()*(e-t+1))},t.rawDiff=function(t,e){return JSON.stringify(t)!==JSON.stringify(e)},t.readFromClipboard=function(){return navigator.clipboard.readText()},t.reject=function(t,e){return S(t,e)},t.relativeDateTypes=vn,t.removeClass=Wt,t.resolveRange=Bs,t.round=function(t,e){if(!_t(t))throw"value to round is not a number";if(e&&!_t(e))throw"precision value is not a number";var n=e?Math.pow(10,e):Math.pow(10,2);return Math.round(t*n)/n},t.searchHighlightCellRenderer=qr,t.searchResultsGroupSort=lo,t.searchResultsSort=ho,t.setAttr=zt,t.setAttribute=$t,t.setDimensions=oe,t.setGridConfiguration=function(t){ir=mt(mt({},ir),t)},t.setGridModel=sr,t.setMaxDimensions=function(t,e,n){oe(t,e,n,"max-")},t.setMinDimensions=ie,t.setStyle=Vt,t.setStyles=Ht,t.shortNumber=Ce,t.size=ye,t.sortBy=function(t,e){return y(t,e)},t.stubs=gp,t.supportedLocales=on,t.tapLog=function(t){return r.tap((function(e){return console.log("%c["+t+": Next]","color: #4CAF50;",e)}),(function(e){return console.log("%c"+t+": Error]","color: #F44336;",e)}),(function(){return console.log("%c["+t+": Complete]","color: #2196F3;")}))},t.tapOnce=os,t.throttle=function(t,e,n){return T(t,e,n)},t.toBoolean=ge,t.toFormData=function(t,e){var n,o;void 0===e&&(e={});var i=new FormData;try{for(var r=wt(Object.keys(t)),a=r.next();!a.done;a=r.next()){var s=a.value,l=t[s];if(e.multiFileKey&&l instanceof FileList)for(var c=0,p=l.length;c<p;c++)i.append(s+"[]",l[c]);else i.append(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},t.toNumber=fe,t.toResponseBody=function(){return n.pipe(r.filter((function(t){return t.type===ht.HttpEventType.Response})),r.map((function(t){return t.body})))},t.toString=function(t){return t?t.toString():""},t.toggleClass=Kt,t.toolbarActionToContextAction=Br,t.tryParsePivotValue=fr,t.unescape=function(t){return B(t)},t.union=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return d.apply(void 0,xt(t))},t.uniq=de,t.uniqBy=ue,t.uploadProgress=function(t){return r.tap((function(e){e.type===ht.HttpEventType.UploadProgress&&t(Math.round(100*e.loaded/e.total))}))},t.validBase64Image=ke,t.validUrl=Pe,t.validateCondition=_r,t.validateDate=Vs,t.validateDateCondition=kr,t.validateFilter=jr,t.validateNumberCondition=Pr,t.validateRange=Gs,t.validateStringCondition=Er,t.values=we,t.workerMap=function(t){return function(e){return new n.Observable((function(n){var o=function(t){var e=new Blob(["self.cb = "+t+";self.onmessage = function (e) { self.postMessage(self.cb(e.data)) }"],{type:"text/javascript"}),n=URL.createObjectURL(e);return new Worker(n)}(t);return o.onmessage=function(t){n.next(t.data),o.terminate()},o.onerror=function(t){n.error(t),o.terminate()},e.subscribe({next:function(t){o.postMessage(t)}})}))}},t.writeToClipboard=Bn,t.zoneStable=En,t.ɵ0=Da,t.ɵ1=Aa,t.ɵ2=yn,t.ɵb=Un,t.ɵc=jo,t.ɵd=Pn,t.ɵe=wr,t.ɵf=ur,t.ɵg=Ua,t.ɵh=Ys,t.ɵi=ol,t.ɵj=ll,t.ɵk=Ha,t.ɵl=Al,t.ɵm=Ol,t.ɵn=xl,Object.defineProperty(t,"__esModule",{value:!0})}));
638
638
  //# sourceMappingURL=datorama-core.umd.min.js.map