@datorama/core 22.13.8-rc.2 → 22.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.scss +5696 -4767
- package/bundles/datorama-core.umd.js +156 -199
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +61 -61
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.d.ts +0 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/datorama-core.js +1 -2
- package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +2 -4
- package/esm2015/lib/directives/clipboard.directive.js +7 -16
- package/esm2015/lib/grid/dato-grid-api.js +1 -1
- package/esm2015/lib/grid/dato-grid.js +1 -1
- package/esm2015/lib/grid/grid/grid.component.js +7 -6
- package/esm2015/lib/grid/grid-header/grid-header.component.js +1 -1
- package/esm2015/lib/grid/grid-helper.js +1 -1
- package/esm2015/lib/grid/grid-pagination/grid-pagination.component.js +2 -2
- package/esm2015/lib/grid/grid-toolbar/grid-toolbar.component.js +2 -2
- package/esm2015/lib/grid/grid.module.js +2 -2
- package/esm2015/lib/grid-v2/grid/grid-v2.component.js +10 -8
- package/esm2015/lib/grid-v2/grid/grid-v2.config.js +5 -22
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +3 -3
- package/esm2015/lib/grid-v2/grid-column-cell-components/grid-avatar-cell/grid-avatar-cell.component.js +3 -3
- package/esm2015/lib/grid-v2/grid-column-cell-components/grid-initials-cell/grid-initials-cell.component.js +3 -3
- package/esm2015/lib/grid-v2/grid-column-cell-components/grid-items-cell/grid-items-cell.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-column-cell-components/grid-items-count-cell/grid-items-count-cell.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-column-header/grid-column-header.component.js +2 -2
- package/esm2015/lib/grid-v2/grid-column-header/grid-column-header.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-column-header/grid-multi-select-header/grid-multi-select-header.component.js +4 -3
- package/esm2015/lib/grid-v2/grid-column-header-more-menu/grid-column-header-more-menu.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-columns-display-menu/grid-columns-display-menu.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +11 -17
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-custom-header/custom-header-template.directive.js +1 -1
- package/esm2015/lib/grid-v2/grid-filter/filter-validator.js +1 -1
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-groups-menu/grid-groups-menu.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-loader/grid-v2-loader.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-no-data-overlay/grid-v2-no-data-overlay.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-on-hover/grid-on-hover.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +52 -42
- package/esm2015/lib/grid-v2/grid-store/util.js +1 -1
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +4 -10
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-v2.module.js +2 -2
- package/esm2015/lib/grid-v2/grid-v2.util.js +1 -1
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm2015/lib/rich-text/rich-text.directive.js +38 -20
- package/esm2015/lib/select/select.component.js +9 -4
- package/esm2015/lib/version.js +2 -2
- package/esm5/datorama-core.js +1 -2
- package/esm5/lib/breadcrumbs/breadcrumbs.component.js +2 -4
- package/esm5/lib/directives/clipboard.directive.js +7 -16
- package/esm5/lib/grid/dato-grid-api.js +1 -1
- package/esm5/lib/grid/dato-grid.js +1 -1
- package/esm5/lib/grid/grid/grid.component.js +7 -6
- package/esm5/lib/grid/grid-header/grid-header.component.js +1 -1
- package/esm5/lib/grid/grid-helper.js +1 -1
- package/esm5/lib/grid/grid-pagination/grid-pagination.component.js +2 -2
- package/esm5/lib/grid/grid-toolbar/grid-toolbar.component.js +2 -2
- package/esm5/lib/grid/grid.module.js +2 -2
- package/esm5/lib/grid-v2/grid/grid-v2.component.js +10 -8
- package/esm5/lib/grid-v2/grid/grid-v2.config.js +5 -22
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +3 -3
- package/esm5/lib/grid-v2/grid-column-cell-components/grid-avatar-cell/grid-avatar-cell.component.js +3 -3
- package/esm5/lib/grid-v2/grid-column-cell-components/grid-initials-cell/grid-initials-cell.component.js +3 -3
- package/esm5/lib/grid-v2/grid-column-cell-components/grid-items-cell/grid-items-cell.component.js +1 -1
- package/esm5/lib/grid-v2/grid-column-cell-components/grid-items-count-cell/grid-items-count-cell.component.js +1 -1
- package/esm5/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +1 -1
- package/esm5/lib/grid-v2/grid-column-header/grid-column-header.component.js +2 -2
- package/esm5/lib/grid-v2/grid-column-header/grid-column-header.types.js +1 -1
- package/esm5/lib/grid-v2/grid-column-header/grid-multi-select-header/grid-multi-select-header.component.js +4 -3
- package/esm5/lib/grid-v2/grid-column-header-more-menu/grid-column-header-more-menu.component.js +1 -1
- package/esm5/lib/grid-v2/grid-columns-display-menu/grid-columns-display-menu.component.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +11 -17
- package/esm5/lib/grid-v2/grid-controller/grid-controller.types.js +1 -1
- package/esm5/lib/grid-v2/grid-custom-header/custom-header-template.directive.js +1 -1
- package/esm5/lib/grid-v2/grid-filter/filter-validator.js +1 -1
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +1 -1
- package/esm5/lib/grid-v2/grid-groups-menu/grid-groups-menu.component.js +1 -1
- package/esm5/lib/grid-v2/grid-loader/grid-v2-loader.component.js +1 -1
- package/esm5/lib/grid-v2/grid-no-data-overlay/grid-v2-no-data-overlay.component.js +1 -1
- package/esm5/lib/grid-v2/grid-on-hover/grid-on-hover.component.js +1 -1
- package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +1 -1
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.query.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +52 -42
- package/esm5/lib/grid-v2/grid-store/util.js +1 -1
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +4 -16
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.types.js +1 -1
- package/esm5/lib/grid-v2/grid-v2.module.js +2 -2
- package/esm5/lib/grid-v2/grid-v2.util.js +1 -1
- package/esm5/lib/icon/icon.types.js +1 -1
- package/esm5/lib/rich-text/rich-text.directive.js +39 -21
- package/esm5/lib/select/select.component.js +9 -4
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +143 -178
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +144 -186
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/directives/clipboard.directive.d.ts +2 -1
- package/lib/grid/dato-grid-api.d.ts +1 -1
- package/lib/grid/dato-grid.d.ts +1 -1
- package/lib/grid/grid/grid.component.d.ts +3 -4
- package/lib/grid/grid-helper.d.ts +1 -1
- package/lib/grid/grid-pagination/grid-pagination.component.d.ts +1 -1
- package/lib/grid-v2/grid/grid-v2.component.d.ts +2 -2
- package/lib/grid-v2/grid/grid-v2.config.d.ts +0 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +1 -3
- package/lib/grid-v2/grid-column-cell-components/grid-avatar-cell/grid-avatar-cell.component.d.ts +2 -2
- package/lib/grid-v2/grid-column-cell-components/grid-initials-cell/grid-initials-cell.component.d.ts +2 -2
- package/lib/grid-v2/grid-column-cell-components/grid-items-cell/grid-items-cell.component.d.ts +2 -2
- package/lib/grid-v2/grid-column-cell-components/grid-items-count-cell/grid-items-count-cell.component.d.ts +2 -2
- package/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.d.ts +2 -2
- package/lib/grid-v2/grid-column-header/grid-column-header.component.d.ts +2 -2
- package/lib/grid-v2/grid-column-header/grid-column-header.types.d.ts +1 -1
- package/lib/grid-v2/grid-column-header/grid-multi-select-header/grid-multi-select-header.component.d.ts +2 -2
- package/lib/grid-v2/grid-column-header-more-menu/grid-column-header-more-menu.component.d.ts +1 -1
- package/lib/grid-v2/grid-columns-display-menu/grid-columns-display-menu.component.d.ts +1 -1
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +7 -7
- package/lib/grid-v2/grid-controller/grid-controller.types.d.ts +1 -1
- package/lib/grid-v2/grid-custom-header/custom-header-template.directive.d.ts +1 -1
- package/lib/grid-v2/grid-filter/filter-validator.d.ts +1 -1
- package/lib/grid-v2/grid-groups-menu/grid-groups-menu.component.d.ts +1 -1
- package/lib/grid-v2/grid-loader/grid-v2-loader.component.d.ts +2 -2
- package/lib/grid-v2/grid-no-data-overlay/grid-v2-no-data-overlay.component.d.ts +2 -2
- package/lib/grid-v2/grid-on-hover/grid-on-hover.component.d.ts +1 -1
- package/lib/grid-v2/grid-settings.d.ts +2 -2
- package/lib/grid-v2/grid-store/grid.query.d.ts +4 -4
- package/lib/grid-v2/grid-store/grid.service.d.ts +377 -6
- package/lib/grid-v2/grid-store/util.d.ts +1 -1
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +1 -3
- package/lib/grid-v2/grid-toolbar/grid-toolbar.types.d.ts +1 -1
- package/lib/grid-v2/grid-v2.util.d.ts +1 -1
- package/lib/icon/icon.types.d.ts +1 -1
- package/lib/rich-text/rich-text.directive.d.ts +6 -4
- package/package.json +2 -2
- package/testing/src/grid/row.ts +1 -1
- package/esm2015/lib/rich-text/rich-text.service.js +0 -50
- package/esm5/lib/rich-text/rich-text.service.js +0 -51
- package/lib/rich-text/rich-text.service.d.ts +0 -10
|
@@ -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-angular"),require("ag-grid-community"),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-angular","ag-grid-community","@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.
|
|
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,A,v,b,C,w,S,x,O,D,E,I,R,T,P,k,j,M,_,F,N,B,L,G,V,z,Q,H,U,Y,W,K,q,J,X,Z,$,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,A=A&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A,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,E=E&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E,I=I&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I,R=R&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R,T=T&&Object.prototype.hasOwnProperty.call(T,"default")?T.default:T,P=P&&Object.prototype.hasOwnProperty.call(P,"default")?P.default:P,k=k&&Object.prototype.hasOwnProperty.call(k,"default")?k.default:k,j=j&&Object.prototype.hasOwnProperty.call(j,"default")?j.default:j,M=M&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M,_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_,F=F&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F,N=N&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N,B=B&&Object.prototype.hasOwnProperty.call(B,"default")?B.default:B,L=L&&Object.prototype.hasOwnProperty.call(L,"default")?L.default:L,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,Q=Q&&Object.prototype.hasOwnProperty.call(Q,"default")?Q.default:Q,Y=Y&&Object.prototype.hasOwnProperty.call(Y,"default")?Y.default:Y,W=W&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W,K=K&&Object.prototype.hasOwnProperty.call(K,"default")?K.default:K,q=q&&Object.prototype.hasOwnProperty.call(q,"default")?q.default:q,J=J&&Object.prototype.hasOwnProperty.call(J,"default")?J.default:J,Z=Z&&Object.prototype.hasOwnProperty.call(Z,"default")?Z.default:Z,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
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var gt=function(t,e){return(gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function ft(t,e){function n(){this.constructor=t}gt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var mt=function(){return(mt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function yt(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}function
|
|
16
|
+
var gt=function(t,e){return(gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function ft(t,e){function n(){this.constructor=t}gt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var mt=function(){return(mt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function yt(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}function At(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function vt(t,e){return function(n,o){e(n,o,t)}}function bt(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function Ct(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function wt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function St(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(wt(arguments[e]));return t}
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -23,7 +23,7 @@ var gt=function(t,e){return(gt=Object.setPrototypeOf||{__proto__:[]}instanceof A
|
|
|
23
23
|
*
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
var Ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ft(e,t),e}((function(){})),Dt=function(){function t(){this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t}(),It={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Tt})),multi:!0},Tt=function(t){function o(e,n){var o=t.call(this)||this;return o.zone=e,o.renderer=n,o.defaultOptions={min:0,max:100,disabled:!1,multiCursor:!1,step:1,unit:"",showLabels:!1},o.minCursorMoving=!1,o.maxCursorMoving=!1,o.movingLabelClass="label-moving",o}return ft(o,t),o.prototype.writeValue=function(t){this.model=t,this.sliderElement&&this.writeValueOnSlider(t)},o.prototype.setDisabledState=function(t){this.toggleSliderState(t)},Object.defineProperty(o.prototype,"options",{get:function(){return this._options},set:function(t){this._options=mt(mt({},this.defaultOptions),t),t.step<1&&this.countDecimals(t.step),this.toggleSliderState(t.disabled)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"multiCursor",{get:function(){return this.options.multiCursor},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"midRange",{get:function(){var t=(this.options.max-this.options.min)/2;return this.options.min+t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"showLabels",{get:function(){return this.options.showLabels},enumerable:!0,configurable:!0}),o.prototype.ngOnDestroy=function(){},Object.defineProperty(o.prototype,"minCursorElement",{get:function(){return this.minCursor.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxCursorElement",{get:function(){return this.maxCursor.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sliderElement",{get:function(){return this.slider.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rangeElement",{get:function(){return this.range.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sliderStart",{get:function(){return this.sliderDimensions.left},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sliderEnd",{get:function(){return this.sliderDimensions.right},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sliderRange",{get:function(){return this.options.max-this.options.min},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"minLabelElement",{get:function(){return this.minLabel.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxLabelElement",{get:function(){return this.maxLabel.nativeElement},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){this._options||(this._options=mt(mt({},this.defaultOptions),this._options))},o.prototype.ngAfterViewInit=function(){var t=this;this.setSliderDimensions(),this.initCursorState(),this.animateSlider(),this.zone.runOutsideAngular((function(){return t.registerEvents()})),this.updateLabels()},o.prototype.registerEvents=function(){this.onMouseDown(),this.onMouseMove(),this.onMouseUp(),this.onSliderClick(),this.onMouseLeave(),this.onResize(),this.onCursorHover(),this.onMouseLeaveCursor(),this.onKeyDown()},o.prototype.onResize=function(){var t=this;n.fromEvent(window,"resize").pipe(r.debounceTime(300),i.untilDestroyed(this)).subscribe((function(){t.setSliderDimensions();var e=t.multiCursor?{min:t.cursorsState.min.model,max:t.cursorsState.max.model}:t.cursorsState.max.model;t.writeValueOnSlider(e)}))},o.prototype.onCursorHover=function(){var t=this,e=n.fromEvent(this.minCursorElement,"mouseover"),o=n.fromEvent(this.maxCursorElement,"mouseover"),a=function(){return t.showLabels};e.pipe(r.filter(a),i.untilDestroyed(this)).subscribe((function(){t.setMinLabel(),t.minLabelElement.classList.add(t.movingLabelClass)})),o.pipe(r.filter(a),i.untilDestroyed(this)).subscribe((function(){t.setMaxLabel(),t.maxLabelElement.classList.add(t.movingLabelClass)}))},o.prototype.onMouseLeaveCursor=function(){var t=this,e=n.fromEvent(this.minCursorElement,"mouseleave"),o=n.fromEvent(this.maxCursorElement,"mouseleave"),a=function(){return t.showLabels&&!t.minCursorMoving&&!t.maxCursorMoving};e.pipe(r.filter(a),i.untilDestroyed(this)).subscribe((function(){return t.minLabelElement.classList.remove(t.movingLabelClass)})),o.pipe(r.filter(a),i.untilDestroyed(this)).subscribe((function(){return t.removeMaxLabelStyle()}))},o.prototype.onMouseDown=function(){var t=this,e=n.fromEvent(this.minCursorElement,"mousedown"),o=n.fromEvent(this.maxCursorElement,"mousedown");e.pipe(i.untilDestroyed(this)).subscribe((function(){t.setSliderDimensions(),t.minLabelElement.classList.add(t.movingLabelClass),t.setActiveCursor({minCursor:!0,maxCursor:!1})})),o.pipe(i.untilDestroyed(this)).subscribe((function(){t.setSliderDimensions(),t.maxLabelElement.classList.add(t.movingLabelClass),t.setActiveCursor({minCursor:!1,maxCursor:!0})}))},o.prototype.onKeyDown=function(){var t=this;n.fromEvent(this.sliderElement,"keydown").pipe(r.filter((function(t){return t.keyCode===a.UP_ARROW||t.keyCode===a.DOWN_ARROW||t.keyCode===a.LEFT_ARROW||t.keyCode===a.RIGHT_ARROW})),r.map((function(t){return t.keyCode})),i.untilDestroyed(this)).subscribe((function(e){var n;if(!t.multiCursor){switch(e){case a.LEFT_ARROW:case a.DOWN_ARROW:n=t.cursorsState.max.model-=t.options.step;break;case a.UP_ARROW:case a.RIGHT_ARROW:n=t.cursorsState.max.model+=t.options.step}n>=t.options.min&&n<=t.options.max&&(t.writeValueOnSlider(n),t.cursorsState.max.model=n,t.updateFormValues(),t.updateLabels(),t.maxLabelElement.classList.add(t.movingLabelClass))}}))},o.prototype.onMouseUp=function(){var t=this,e=n.fromEvent(this.minCursorElement,"mouseup"),o=n.fromEvent(this.maxCursorElement,"mouseup"),r=n.fromEvent(this.sliderElement,"mouseup");n.merge(e,o,r).pipe(i.untilDestroyed(this)).subscribe((function(){t.updateFormValues(),t.disableAllCursors(),t.removeLabelsStyle(),t.updateLabels()}))},o.prototype.onMouseMove=function(){var t=this;n.fromEvent(this.sliderElement,"mousemove").pipe(r.filter((function(e){return t.minCursorMoving||t.maxCursorMoving})),r.map((function(t){return t.x})),i.untilDestroyed(this)).subscribe((function(e){var n=t.getNextStep(e);t.inRange(n.value)&&t.cursorsDoNotOverlap(n.value)&&(t.minCursorMoving?t.cursorsState.min=n:t.cursorsState.max=n,t.animateSlider(),t.updateFormValues(),t.updateLabels())}))},o.prototype.onSliderClick=function(){var t=this;n.fromEvent(this.sliderElement,"click").pipe(r.filter((function(e){var n=!t.minCursorMoving&&!t.maxCursorMoving;return t.inRange(e.x)&&n})),r.map((function(t){return t.x})),i.untilDestroyed(this)).subscribe((function(e){t.moveClosestCursor(e),t.updateLabels()}))},o.prototype.onMouseLeave=function(){var t=this;n.fromEvent(this.sliderElement,"mouseleave").pipe(r.filter((function(e){var n=t.minCursorMoving||t.maxCursorMoving,o=e.x<=t.sliderStart||e.x>=t.sliderEnd;return n&&o})),i.untilDestroyed(this)).subscribe((function(){return t.disableAllCursors()}))},o.prototype.disableAllCursors=function(){this.setActiveCursor({minCursor:!1,maxCursor:!1})},o.prototype.inRange=function(t){return this.sliderStart<=t&&t<=this.sliderEnd},o.prototype.cursorsDoNotOverlap=function(t){return!this.multiCursor||(this.minCursorMoving?this.cursorsState.max.value-t>=this.unitSize:t-this.cursorsState.min.value>=this.unitSize)},o.prototype.setActiveCursor=function(t){this.minCursorMoving=t.minCursor,this.maxCursorMoving=t.maxCursor},o.prototype.updateFormValues=function(){this.options.step<1&&this.truncateFormValues(),this.multiCursor?this.onChange({min:this.cursorsState.min.model,max:this.cursorsState.max.model}):this.onChange(this.cursorsState.max.model)},o.prototype.getNextStep=function(t){var e=t-this.sliderStart,n=Math.round(e/this.unitSize)*this.options.step;return{value:t,model:this.options.min+n}},o.prototype.moveClosestCursor=function(t){var e=this.maxCursorElement;if(this.multiCursor){var n=Math.abs(t-this.cursorsState.max.value);Math.min(t-this.cursorsState.min.value)<n&&(e=this.minCursorElement)}var o=this.getNextStep(t);e===this.maxCursorElement?this.cursorsState.max=o:this.cursorsState.min=o,this.animateSlider(),this.updateFormValues()},o.prototype.initCursorState=function(){var t=this;this.unitSize=this.sliderDimensions.width/this.sliderRange,this.multiCursor||(this.model.min=this.options.min);var e=this.sliderRange/this.options.step;this.unitSize=this.sliderDimensions.width/e;var n=function(e){return(e-t.options.min)/t.sliderRange*t.sliderDimensions.width},o=n(this.model.min),i=n(this.model.max);this.cursorsState={min:{value:this.sliderStart+o,model:this.model.min},max:{value:this.sliderStart+i,model:this.model.max}}},o.prototype.animateSlider=function(){var t=this.cursorsState.min.value-this.sliderStart,e=this.cursorsState.max.value-this.sliderStart,n=e-t,o=t;this.multiCursor||(n=e,o=0),this.minCursorMoving?this.renderer.setStyle(this.minCursorElement,"transform","translateX("+t+"px)"):(this.maxCursorMoving||this.renderer.setStyle(this.minCursorElement,"transform","translateX("+t+"px)"),this.renderer.setStyle(this.maxCursorElement,"transform","translateX("+e+"px)")),this.renderer.setStyle(this.rangeElement,"width",n+"px"),this.renderer.setStyle(this.rangeElement,"transform","translateX("+o+"px)")},o.prototype.writeValueOnSlider=function(t){var e,n,o;if(this.multiCursor){e=t;var i=this.options.min<=e.min&&e.min<=this.options.max,r=this.options.min<=e.max&&e.max<=this.options.max;o=i&&r,n=e.max>e.min}else e={min:0,max:t},o=this.options.min<=e.max&&e.max<=this.options.max,n=!0;n&&o&&(this.model=e,this.sliderDimensions&&(this.initCursorState(),this.animateSlider(),this.updateLabels()))},o.prototype.setSliderDimensions=function(){this.sliderDimensions=this.slider.nativeElement.getBoundingClientRect()},o.prototype.updateLabels=function(){this.showLabels&&(this.minCursorMoving?this.setMinLabel():this.maxCursorMoving?this.setMaxLabel():(this.setMaxLabel(),this.setMinLabel()))},o.prototype.countDecimals=function(t){if(t){var e=t.toString().split(".")[1];e&&(this.numberOfDecimals=e.length)}},o.prototype.truncateFormValues=function(){this.cursorsState.min.model=parseFloat(this.cursorsState.min.model.toFixed(this.numberOfDecimals)),this.cursorsState.max.model=parseFloat(this.cursorsState.max.model.toFixed(this.numberOfDecimals))},o.prototype.setMaxLabel=function(){this.maxLabelElement.innerText=""+this.cursorsState.max.model+this.options.unit},o.prototype.setMinLabel=function(){this.minLabelElement.innerText=""+this.cursorsState.min.model+this.options.unit},o.prototype.removeLabelsStyle=function(){this.minLabelElement.classList.remove(this.movingLabelClass),this.removeMaxLabelStyle()},o.prototype.removeMaxLabelStyle=function(){this.maxLabelElement.classList.remove(this.movingLabelClass)},o.prototype.toggleSliderState=function(t){t?this.renderer.addClass(this.sliderElement,"disabled"):this.renderer.removeClass(this.sliderElement,"disabled")},o.ctorParameters=function(){return[{type:e.NgZone},{type:e.Renderer2}]},vt([e.Input(),Ct("design:type",Ot),Ct("design:paramtypes",[Ot])],o.prototype,"options",null),vt([e.ViewChild("minCursor",{static:!0}),Ct("design:type",e.ElementRef)],o.prototype,"minCursor",void 0),vt([e.ViewChild("maxCursor",{static:!0}),Ct("design:type",e.ElementRef)],o.prototype,"maxCursor",void 0),vt([e.ViewChild("slider",{static:!0}),Ct("design:type",e.ElementRef)],o.prototype,"slider",void 0),vt([e.ViewChild("range",{static:!0}),Ct("design:type",e.ElementRef)],o.prototype,"range",void 0),vt([e.ViewChild("minLabel",{static:!0}),Ct("design:type",e.ElementRef)],o.prototype,"minLabel",void 0),vt([e.ViewChild("maxLabel",{static:!0}),Ct("design:type",e.ElementRef)],o.prototype,"maxLabel",void 0),o=vt([e.Component({selector:"dato-slider",template:'<div class="slider-wrapper d-flex-column items-center no-select" #slider tabindex="0">\n <div class="slider-zone d-flex-column items-center">\n <div class="slider-container d-flex-row items-end">\n <div [ngClass]="multiCursor ? \'d-flex-column items-center cursor-container\': \'hidden\'" #minCursor>\n <p class="label mt-8" #minLabel [ngClass]="{\'hidden\': !showLabels}"></p>\n <div class="cursor"></div>\n </div>\n <div class="range" #range></div>\n <div class="d-flex-column items-center cursor-container" #maxCursor>\n <p class="mt-8 label" #maxLabel [ngClass]="{\'hidden\': !showLabels}"></p>\n <div class="cursor"></div>\n </div>\n </div>\n <div class="d-flex-row items-center justify-between labels mt-8" *ngIf="showLabels">\n <p>{{options.min}} {{options.unit}}</p>\n <p class="mid-range">{{midRange}} {{options.unit}}</p>\n <p>{{options.max}} {{options.unit}}</p>\n </div>\n </div>\n</div>\n',providers:[It],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host .labels{width:100%;font-size:12px}:host .disabled{pointer-events:none;cursor:not-allowed}:host .disabled .slider-zone{cursor:not-allowed}:host .disabled .cursor:hover{cursor:not-allowed;height:12px;width:12px}:host .disabled .slider-container{cursor:not-allowed}:host .slider-zone{height:100px;justify-content:center;width:100%}:host .slider-container{width:100%;height:2px;border-radius:4px;position:relative}:host .cursor{width:12px;touch-action:none;z-index:100;height:12px;border-radius:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}:host .cursor:active{cursor:-webkit-grabbing!important;cursor:grabbing!important}:host .cursor:hover{cursor:-webkit-grab;cursor:grab}:host .cursor-container{position:relative;top:5px;left:-12px;z-index:20;width:12px;overflow:visible}:host .hidden{display:none}:host .range{position:absolute;height:2px;transition:width}:host .slider-wrapper{height:50px;margin:0;width:100%}:host .slider-wrapper:focus{outline:0}:host .label{font-size:11px;padding:4px 6px;line-height:12px;font-weight:400;border-radius:3px}"]}),Ct("design:paramtypes",[e.NgZone,e.Renderer2])],o)}(Dt),Rt=[Tt],At=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Rt],exports:[Rt]})],t)}();
|
|
26
|
+
var xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ft(e,t),e}((function(){})),Ot=function(){function t(){this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t}(),Dt={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Et})),multi:!0},Et=function(t){function o(e,n){var o=t.call(this)||this;return o.zone=e,o.renderer=n,o.defaultOptions={min:0,max:100,disabled:!1,multiCursor:!1,step:1,unit:"",showLabels:!1},o.minCursorMoving=!1,o.maxCursorMoving=!1,o.movingLabelClass="label-moving",o}return ft(o,t),o.prototype.writeValue=function(t){this.model=t,this.sliderElement&&this.writeValueOnSlider(t)},o.prototype.setDisabledState=function(t){this.toggleSliderState(t)},Object.defineProperty(o.prototype,"options",{get:function(){return this._options},set:function(t){this._options=mt(mt({},this.defaultOptions),t),t.step<1&&this.countDecimals(t.step),this.toggleSliderState(t.disabled)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"multiCursor",{get:function(){return this.options.multiCursor},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"midRange",{get:function(){var t=(this.options.max-this.options.min)/2;return this.options.min+t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"showLabels",{get:function(){return this.options.showLabels},enumerable:!0,configurable:!0}),o.prototype.ngOnDestroy=function(){},Object.defineProperty(o.prototype,"minCursorElement",{get:function(){return this.minCursor.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxCursorElement",{get:function(){return this.maxCursor.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sliderElement",{get:function(){return this.slider.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rangeElement",{get:function(){return this.range.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sliderStart",{get:function(){return this.sliderDimensions.left},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sliderEnd",{get:function(){return this.sliderDimensions.right},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sliderRange",{get:function(){return this.options.max-this.options.min},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"minLabelElement",{get:function(){return this.minLabel.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxLabelElement",{get:function(){return this.maxLabel.nativeElement},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){this._options||(this._options=mt(mt({},this.defaultOptions),this._options))},o.prototype.ngAfterViewInit=function(){var t=this;this.setSliderDimensions(),this.initCursorState(),this.animateSlider(),this.zone.runOutsideAngular((function(){return t.registerEvents()})),this.updateLabels()},o.prototype.registerEvents=function(){this.onMouseDown(),this.onMouseMove(),this.onMouseUp(),this.onSliderClick(),this.onMouseLeave(),this.onResize(),this.onCursorHover(),this.onMouseLeaveCursor(),this.onKeyDown()},o.prototype.onResize=function(){var t=this;n.fromEvent(window,"resize").pipe(r.debounceTime(300),i.untilDestroyed(this)).subscribe((function(){t.setSliderDimensions();var e=t.multiCursor?{min:t.cursorsState.min.model,max:t.cursorsState.max.model}:t.cursorsState.max.model;t.writeValueOnSlider(e)}))},o.prototype.onCursorHover=function(){var t=this,e=n.fromEvent(this.minCursorElement,"mouseover"),o=n.fromEvent(this.maxCursorElement,"mouseover"),a=function(){return t.showLabels};e.pipe(r.filter(a),i.untilDestroyed(this)).subscribe((function(){t.setMinLabel(),t.minLabelElement.classList.add(t.movingLabelClass)})),o.pipe(r.filter(a),i.untilDestroyed(this)).subscribe((function(){t.setMaxLabel(),t.maxLabelElement.classList.add(t.movingLabelClass)}))},o.prototype.onMouseLeaveCursor=function(){var t=this,e=n.fromEvent(this.minCursorElement,"mouseleave"),o=n.fromEvent(this.maxCursorElement,"mouseleave"),a=function(){return t.showLabels&&!t.minCursorMoving&&!t.maxCursorMoving};e.pipe(r.filter(a),i.untilDestroyed(this)).subscribe((function(){return t.minLabelElement.classList.remove(t.movingLabelClass)})),o.pipe(r.filter(a),i.untilDestroyed(this)).subscribe((function(){return t.removeMaxLabelStyle()}))},o.prototype.onMouseDown=function(){var t=this,e=n.fromEvent(this.minCursorElement,"mousedown"),o=n.fromEvent(this.maxCursorElement,"mousedown");e.pipe(i.untilDestroyed(this)).subscribe((function(){t.setSliderDimensions(),t.minLabelElement.classList.add(t.movingLabelClass),t.setActiveCursor({minCursor:!0,maxCursor:!1})})),o.pipe(i.untilDestroyed(this)).subscribe((function(){t.setSliderDimensions(),t.maxLabelElement.classList.add(t.movingLabelClass),t.setActiveCursor({minCursor:!1,maxCursor:!0})}))},o.prototype.onKeyDown=function(){var t=this;n.fromEvent(this.sliderElement,"keydown").pipe(r.filter((function(t){return t.keyCode===a.UP_ARROW||t.keyCode===a.DOWN_ARROW||t.keyCode===a.LEFT_ARROW||t.keyCode===a.RIGHT_ARROW})),r.map((function(t){return t.keyCode})),i.untilDestroyed(this)).subscribe((function(e){var n;if(!t.multiCursor){switch(e){case a.LEFT_ARROW:case a.DOWN_ARROW:n=t.cursorsState.max.model-=t.options.step;break;case a.UP_ARROW:case a.RIGHT_ARROW:n=t.cursorsState.max.model+=t.options.step}n>=t.options.min&&n<=t.options.max&&(t.writeValueOnSlider(n),t.cursorsState.max.model=n,t.updateFormValues(),t.updateLabels(),t.maxLabelElement.classList.add(t.movingLabelClass))}}))},o.prototype.onMouseUp=function(){var t=this,e=n.fromEvent(this.minCursorElement,"mouseup"),o=n.fromEvent(this.maxCursorElement,"mouseup"),r=n.fromEvent(this.sliderElement,"mouseup");n.merge(e,o,r).pipe(i.untilDestroyed(this)).subscribe((function(){t.updateFormValues(),t.disableAllCursors(),t.removeLabelsStyle(),t.updateLabels()}))},o.prototype.onMouseMove=function(){var t=this;n.fromEvent(this.sliderElement,"mousemove").pipe(r.filter((function(e){return t.minCursorMoving||t.maxCursorMoving})),r.map((function(t){return t.x})),i.untilDestroyed(this)).subscribe((function(e){var n=t.getNextStep(e);t.inRange(n.value)&&t.cursorsDoNotOverlap(n.value)&&(t.minCursorMoving?t.cursorsState.min=n:t.cursorsState.max=n,t.animateSlider(),t.updateFormValues(),t.updateLabels())}))},o.prototype.onSliderClick=function(){var t=this;n.fromEvent(this.sliderElement,"click").pipe(r.filter((function(e){var n=!t.minCursorMoving&&!t.maxCursorMoving;return t.inRange(e.x)&&n})),r.map((function(t){return t.x})),i.untilDestroyed(this)).subscribe((function(e){t.moveClosestCursor(e),t.updateLabels()}))},o.prototype.onMouseLeave=function(){var t=this;n.fromEvent(this.sliderElement,"mouseleave").pipe(r.filter((function(e){var n=t.minCursorMoving||t.maxCursorMoving,o=e.x<=t.sliderStart||e.x>=t.sliderEnd;return n&&o})),i.untilDestroyed(this)).subscribe((function(){return t.disableAllCursors()}))},o.prototype.disableAllCursors=function(){this.setActiveCursor({minCursor:!1,maxCursor:!1})},o.prototype.inRange=function(t){return this.sliderStart<=t&&t<=this.sliderEnd},o.prototype.cursorsDoNotOverlap=function(t){return!this.multiCursor||(this.minCursorMoving?this.cursorsState.max.value-t>=this.unitSize:t-this.cursorsState.min.value>=this.unitSize)},o.prototype.setActiveCursor=function(t){this.minCursorMoving=t.minCursor,this.maxCursorMoving=t.maxCursor},o.prototype.updateFormValues=function(){this.options.step<1&&this.truncateFormValues(),this.multiCursor?this.onChange({min:this.cursorsState.min.model,max:this.cursorsState.max.model}):this.onChange(this.cursorsState.max.model)},o.prototype.getNextStep=function(t){var e=t-this.sliderStart,n=Math.round(e/this.unitSize)*this.options.step;return{value:t,model:this.options.min+n}},o.prototype.moveClosestCursor=function(t){var e=this.maxCursorElement;if(this.multiCursor){var n=Math.abs(t-this.cursorsState.max.value);Math.min(t-this.cursorsState.min.value)<n&&(e=this.minCursorElement)}var o=this.getNextStep(t);e===this.maxCursorElement?this.cursorsState.max=o:this.cursorsState.min=o,this.animateSlider(),this.updateFormValues()},o.prototype.initCursorState=function(){var t=this;this.unitSize=this.sliderDimensions.width/this.sliderRange,this.multiCursor||(this.model.min=this.options.min);var e=this.sliderRange/this.options.step;this.unitSize=this.sliderDimensions.width/e;var n=function(e){return(e-t.options.min)/t.sliderRange*t.sliderDimensions.width},o=n(this.model.min),i=n(this.model.max);this.cursorsState={min:{value:this.sliderStart+o,model:this.model.min},max:{value:this.sliderStart+i,model:this.model.max}}},o.prototype.animateSlider=function(){var t=this.cursorsState.min.value-this.sliderStart,e=this.cursorsState.max.value-this.sliderStart,n=e-t,o=t;this.multiCursor||(n=e,o=0),this.minCursorMoving?this.renderer.setStyle(this.minCursorElement,"transform","translateX("+t+"px)"):(this.maxCursorMoving||this.renderer.setStyle(this.minCursorElement,"transform","translateX("+t+"px)"),this.renderer.setStyle(this.maxCursorElement,"transform","translateX("+e+"px)")),this.renderer.setStyle(this.rangeElement,"width",n+"px"),this.renderer.setStyle(this.rangeElement,"transform","translateX("+o+"px)")},o.prototype.writeValueOnSlider=function(t){var e,n,o;if(this.multiCursor){e=t;var i=this.options.min<=e.min&&e.min<=this.options.max,r=this.options.min<=e.max&&e.max<=this.options.max;o=i&&r,n=e.max>e.min}else e={min:0,max:t},o=this.options.min<=e.max&&e.max<=this.options.max,n=!0;n&&o&&(this.model=e,this.sliderDimensions&&(this.initCursorState(),this.animateSlider(),this.updateLabels()))},o.prototype.setSliderDimensions=function(){this.sliderDimensions=this.slider.nativeElement.getBoundingClientRect()},o.prototype.updateLabels=function(){this.showLabels&&(this.minCursorMoving?this.setMinLabel():this.maxCursorMoving?this.setMaxLabel():(this.setMaxLabel(),this.setMinLabel()))},o.prototype.countDecimals=function(t){if(t){var e=t.toString().split(".")[1];e&&(this.numberOfDecimals=e.length)}},o.prototype.truncateFormValues=function(){this.cursorsState.min.model=parseFloat(this.cursorsState.min.model.toFixed(this.numberOfDecimals)),this.cursorsState.max.model=parseFloat(this.cursorsState.max.model.toFixed(this.numberOfDecimals))},o.prototype.setMaxLabel=function(){this.maxLabelElement.innerText=""+this.cursorsState.max.model+this.options.unit},o.prototype.setMinLabel=function(){this.minLabelElement.innerText=""+this.cursorsState.min.model+this.options.unit},o.prototype.removeLabelsStyle=function(){this.minLabelElement.classList.remove(this.movingLabelClass),this.removeMaxLabelStyle()},o.prototype.removeMaxLabelStyle=function(){this.maxLabelElement.classList.remove(this.movingLabelClass)},o.prototype.toggleSliderState=function(t){t?this.renderer.addClass(this.sliderElement,"disabled"):this.renderer.removeClass(this.sliderElement,"disabled")},o.ctorParameters=function(){return[{type:e.NgZone},{type:e.Renderer2}]},At([e.Input(),bt("design:type",xt),bt("design:paramtypes",[xt])],o.prototype,"options",null),At([e.ViewChild("minCursor",{static:!0}),bt("design:type",e.ElementRef)],o.prototype,"minCursor",void 0),At([e.ViewChild("maxCursor",{static:!0}),bt("design:type",e.ElementRef)],o.prototype,"maxCursor",void 0),At([e.ViewChild("slider",{static:!0}),bt("design:type",e.ElementRef)],o.prototype,"slider",void 0),At([e.ViewChild("range",{static:!0}),bt("design:type",e.ElementRef)],o.prototype,"range",void 0),At([e.ViewChild("minLabel",{static:!0}),bt("design:type",e.ElementRef)],o.prototype,"minLabel",void 0),At([e.ViewChild("maxLabel",{static:!0}),bt("design:type",e.ElementRef)],o.prototype,"maxLabel",void 0),o=At([e.Component({selector:"dato-slider",template:'<div class="slider-wrapper d-flex-column items-center no-select" #slider tabindex="0">\n <div class="slider-zone d-flex-column items-center">\n <div class="slider-container d-flex-row items-end">\n <div [ngClass]="multiCursor ? \'d-flex-column items-center cursor-container\': \'hidden\'" #minCursor>\n <p class="label mt-8" #minLabel [ngClass]="{\'hidden\': !showLabels}"></p>\n <div class="cursor"></div>\n </div>\n <div class="range" #range></div>\n <div class="d-flex-column items-center cursor-container" #maxCursor>\n <p class="mt-8 label" #maxLabel [ngClass]="{\'hidden\': !showLabels}"></p>\n <div class="cursor"></div>\n </div>\n </div>\n <div class="d-flex-row items-center justify-between labels mt-8" *ngIf="showLabels">\n <p>{{options.min}} {{options.unit}}</p>\n <p class="mid-range">{{midRange}} {{options.unit}}</p>\n <p>{{options.max}} {{options.unit}}</p>\n </div>\n </div>\n</div>\n',providers:[Dt],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host .labels{width:100%;font-size:12px}:host .disabled{pointer-events:none;cursor:not-allowed}:host .disabled .slider-zone{cursor:not-allowed}:host .disabled .cursor:hover{cursor:not-allowed;height:12px;width:12px}:host .disabled .slider-container{cursor:not-allowed}:host .slider-zone{height:100px;justify-content:center;width:100%}:host .slider-container{width:100%;height:2px;border-radius:4px;position:relative}:host .cursor{width:12px;touch-action:none;z-index:100;height:12px;border-radius:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}:host .cursor:active{cursor:-webkit-grabbing!important;cursor:grabbing!important}:host .cursor:hover{cursor:-webkit-grab;cursor:grab}:host .cursor-container{position:relative;top:5px;left:-12px;z-index:20;width:12px;overflow:visible}:host .hidden{display:none}:host .range{position:absolute;height:2px;transition:width}:host .slider-wrapper{height:50px;margin:0;width:100%}:host .slider-wrapper:focus{outline:0}:host .label{font-size:11px;padding:4px 6px;line-height:12px;font-weight:400;border-radius:3px}"]}),bt("design:paramtypes",[e.NgZone,e.Renderer2])],o)}(Ot),It=[Et],Rt=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[It],exports:[It]})],t)}();
|
|
27
27
|
/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -31,14 +31,14 @@ 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
|
|
34
|
+
function Tt(t){return"function"==typeof t}function Pt(t){return"[object Object]"===Object.prototype.toString.call(t)}function kt(t){return l(t)}function jt(t){return!isNaN(parseFloat(t))&&!Number.isNaN(Number(t))}function Mt(t,e){return c(t,e)}function _t(t){return"string"==typeof t}function Ft(t){return null==t}function Nt(t){return"boolean"==typeof t}function Bt(t,e){return void 0===e&&(e=document),e.querySelector(t)}function Lt(t,e){return void 0===e&&(e=document),e.querySelectorAll(t)}function Gt(t,e,n){t.style[e]=n?n.toString():n}function Vt(t,e,n){t.setAttribute(e,n)}function zt(t,e){return t.getAttribute(e)}function Qt(t,e){var n,o;try{for(var i=Ct(Object.keys(e)),r=i.next();!r.done;r=i.next()){var a=r.value;Gt(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 Ht(t,e){Array.isArray(e)?e.forEach((function(e){return t.classList.add(e)})):t.classList.add(e)}function Ut(t,e,n){n?Ht(t,e):Yt(t,e)}function Yt(t,e){t.classList.remove(e)}function Wt(t,e,n){var o,i;if(_t(e))t.setAttribute(e,n);else try{for(var r=Ct(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 Kt(t){return document.createElement(t)}function qt(t,e){return t.appendChild(e)}function Jt(t,e){t.insertBefore(e,t.firstChild)}function Xt(t){return qt(document.body,t),function(){t&&(document.body.removeChild(t),t=null)}}function Zt(t,e){var n=Kt("script");n.innerHTML=t,n.id=e,Xt(n)}function $t(t,e){var n=Kt("style");n.innerHTML=t,n.id=e,Xt(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.
|
|
38
38
|
*
|
|
39
39
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
40
40
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
41
|
-
*/function oe(t,e,n,o){void 0===o&&(o=""),t&&
|
|
41
|
+
*/function oe(t,e,n,o){void 0===o&&(o=""),t&&Gt(n,o+"width",t),e&&Gt(n,o+"height",e)}function ie(t,e,n){oe(t,e,n,"min-")}
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -46,14 +46,14 @@ function Et(t){return"function"==typeof t}function Pt(t){return"[object Object]"
|
|
|
46
46
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
47
47
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
48
48
|
*/
|
|
49
|
-
var re,ae=function(){function t(t,e,n){this.host=t,this.width=e,this.height=n,this.lightning=!1,this._disabled=!1}return Object.defineProperty(t.prototype,"disabled",{set:function(t){this._disabled=!!t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loading",{set:function(t){this.btn=this.btn||
|
|
49
|
+
var re,ae=function(){function t(t,e,n){this.host=t,this.width=e,this.height=n,this.lightning=!1,this._disabled=!1}return Object.defineProperty(t.prototype,"disabled",{set:function(t){this._disabled=!!t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loading",{set:function(t){this.btn=this.btn||Bt("button",this.host.nativeElement),Ut(this.btn,"loading",t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=Bt("button",this.host.nativeElement);oe(this.width,this.height,t)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]}]},At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"disabled",null),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"loading",null),At([e.Input(),bt("design:type",Boolean)],t.prototype,"lightning",void 0),At([e.HostBinding("class.disabled"),bt("design:type",Object)],t.prototype,"_disabled",void 0),t=At([e.Component({selector:"dato-button",template:'<button class="d-flex d-flex-row align-center" [disabled]="_disabled" [class.lightning]="lightning">\n <ng-content></ng-content>\n</button>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block}:host button.lightning{border-radius:4px;height:35px;padding:0 16px;font-weight:500;font-family:'Salesforce Sans','Open Sans',sans-serif!important;font-size:13px;letter-spacing:0;line-height:17px;cursor:pointer}:host button{border:none;overflow:visible;text-transform:none;-webkit-appearance:button;-moz-appearance:button;appearance:button;cursor:pointer;border-radius:2px;height:35px;padding:0 10px;font-size:14px;font-weight:600;white-space:nowrap}:host[datoSize=lg] button{height:35px}:host[datoSize=sm] button{height:24px;font-size:12px}:host.disabled{pointer-events:none}:host button:focus{outline:0}:host[datoCircle] button{border-radius:50%}:host.dato-icon-button button,:host[datoCircle] button{padding:0;width:34px;height:34px}:host.dato-icon-button[datoSize=md] button,:host[datoCircle][datoSize=md] button{width:24px;height:24px}:host.dato-icon-button[datoSize=sm] button,:host[datoCircle][datoSize=sm] button{width:16px;height:16px}"]}),vt(1,e.Attribute("width")),vt(2,e.Attribute("height")),bt("design:paramtypes",[e.ElementRef,Object,Object])],t)}(),se=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[ae],exports:[ae]})],t)}();
|
|
50
50
|
/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright Datorama. All Rights Reserved.
|
|
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){if(t)return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Ie(t){return function(t){var e=t.toLowerCase().replace(/[^A-Za-z0-9]/g," ").split(" ").reduce((function(t,e){return t+De(e.toLowerCase())}));return e.charAt(0).toLowerCase()+e.slice(1)}(t)}function Te(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}function Re(){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 Ae(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 Ee=new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"),Pe=new RegExp("^data:image\\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}");function ke(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}function _e(t,e,n){var o=ke(t)-ke(e);return n?-1*o:o}var je=function(t){this.contents=null,this.appliedAttributes=!1,this.contents=t},Me=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&&Te(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 je(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)}(),Le=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)}(Me),Ne=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 Te("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:Me},{type:Le},{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,Me,Le,Object,Object])],t)}(),Fe=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Ne],exports:[Ne]})],t)}(),Ge=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:Le},{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,Le,Object,Object])],t)}(),Ve=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Ge],exports:[Ge]})],t)}();
|
|
56
|
+
*/function le(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u.apply(void 0,St(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),jt(t)?Number(t):e}function me(t){return Array.isArray(t)?t:[t]}function ye(t){return Ft(t)?0:Array.isArray(t)?t.length:Pt(t)?Object.keys(t).length:ge(t)?t.length:0}function Ae(t,e){return void 0===e&&(e=t.length),I(t,e)}function ve(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 be(t,e){if(void 0===e&&(e=0),!jt(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 Ce(t){return M(t)}function we(t,e){return function t(e,n){return F(e,(function(e,o,i){c(o,n[i])||(e[i]=Pt(o)&&Pt(n[i])?t(o,n[i]):o)}))}(t,e)}function Se(t,e){var n=mt({},t),o=wt(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]=Se(n[i],r.join("."))}else console.warn(i+" doesn't exists in given object");return n}function xe(t){return V(t)}function Oe(t){return Q(t)}function De(t){if(t)return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Ee(t){return function(t){var e=t.toLowerCase().replace(/[^A-Za-z0-9]/g," ").split(" ").reduce((function(t,e){return t+De(e.toLowerCase())}));return e.charAt(0).toLowerCase()+e.slice(1)}(t)}function Ie(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}function Re(){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 Te(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 je(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}function Me(t,e,n){var o=je(t)-je(e);return n?-1*o:o}var _e=function(t){this.contents=null,this.appliedAttributes=!1,this.contents=t},Fe=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=Ct(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&&Ie(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 _e(e);this.svgMap.set(t,n)},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=At([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=Ct(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=At([e.Injectable({providedIn:"root"})],n)}(Fe),Be=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(){Wt(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&&Yt(this.element,this.lastIconClass),this.lastIconClass=this.getIconClass();var t=(this.icon?"icon":"dato-icon")+"-"+this.datoSize;Ht(this.element,[this.lastIconClass,t])},t.prototype.getIconClass=function(){return Ie("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:Fe},{type:Ne},{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["height"]}]}]},At([e.Input(),bt("design:type",String)],t.prototype,"icon",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"datoIcon",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"datoSize",void 0),t=At([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}"]}),vt(3,e.Attribute("width")),vt(4,e.Attribute("height")),bt("design:paramtypes",[e.ElementRef,Fe,Ne,Object,Object])],t)}(),Le=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[Be],exports:[Be]})],t)}(),Ge=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;!Ft(t)&&Gt(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"]}]}]},At([e.Input(),bt("design:type",String)],t.prototype,"icon",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"datoSize",void 0),t=At([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}"]}),vt(2,e.Attribute("width")),vt(3,e.Attribute("height")),bt("design:paramtypes",[e.ElementRef,Ne,Object,Object])],t)}(),Ve=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[Ge],exports:[Ge]})],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 ze(t){return void 0===t&&(t=void 0),function(e){return ge(t)?e.pipe(r.debounceTime(t)):e}}var
|
|
71
|
+
function ze(t){return void 0===t&&(t=void 0),function(e){return ge(t)?e.pipe(r.debounceTime(t)):e}}var Qe,He,Ue,Ye,We=/(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,Ke=/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,Je=/Trident.*rv\:11\./;function Xe(){return window.navigator.userAgent}function Ze(){var t=!1;return function(e){(function(t){return qe.test(t)}(e)||We.test(e)||Ke.test(e.substr(0,4)))&&(t=!0)}(Xe()||navigator.vendor||window.opera),t&&!$e()}function $e(){var t=Xe();return t.indexOf("MSIE ")>0||!!t.match(Je)}function tn(){if($e()){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
|
-
*/(He=t.Dimensions||(t.Dimensions={})).LG="lg",He.MD="md",He.SM="sm",(Ue=t.Types||(t.Types={})).PRIMARY="primary",Ue.SECONDARY="secondary",(
|
|
78
|
+
*/(He=t.Dimensions||(t.Dimensions={})).LG="lg",He.MD="md",He.SM="sm",(Ue=t.Types||(t.Types={})).PRIMARY="primary",Ue.SECONDARY="secondary",(Ye=t.SUPPORTED_LOCALES||(t.SUPPORTED_LOCALES={})).en_US="en_US",Ye.ja_JP="ja_JP",Ye.de_DE="de_DE",Ye.fr_FR="fr_FR",Ye.es_ES="es_ES";var en,nn,on=((Qe={})[t.SUPPORTED_LOCALES.en_US]=W,Qe[t.SUPPORTED_LOCALES.ja_JP]=J,Qe[t.SUPPORTED_LOCALES.de_DE]=Y,Qe[t.SUPPORTED_LOCALES.fr_FR]=q,Qe[t.SUPPORTED_LOCALES.es_ES]=K,Qe);
|
|
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
|
-
*/(tn=t.DateType||(t.DateType={}))[tn.STANDARD=0]="STANDARD",tn[tn.CUSTOM=1]="CUSTOM",function(t){t.SHORT="short",t.MEDIUM="medium",t.LONG="long"}(en||(en={}));var on;function rn(t,e){return t.id.startsWith(e)}function an(t,e){return t.find((function(t){return t.id===e}))}function sn(e,n){if(void 0===n&&(n=nn[t.SUPPORTED_LOCALES.en_US]),Xe())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(ln(e,n)+"T00:00:00.000Z","UTC"));return o}function ln(e,n){return void 0===n&&(n=nn[t.SUPPORTED_LOCALES.en_US]),K.format(e,"yyyy-LL-dd",{locale:n})}function cn(e){var n=[nn[t.SUPPORTED_LOCALES.ja_JP].code].includes(e.code)?en.LONG:en.MEDIUM;return e.formatLong.date({width:n})}function pn(t,e,n){if("string"==typeof t){var o=dn(t,e,n);if(U.isValid(o))return o;var i=dn(t,e,"yyyy-LL-dd");return U.isValid(i)?i:new Date(t)}return t}function dn(t,e,n){var o=cn(e);return U.parse(un(t),un(n||o),new Date,{locale:e})}function un(t){return t.replace(/\s+/g,"")}(on=t.RelativeDateType||(t.RelativeDateType={})).TODAY="TODAY",on.PAGE_START="PAGE_START",on.PAGE_END="PAGE_END";var hn,gn=t.RelativeDateType.TODAY,fn=t.RelativeDateType.PAGE_START,mn=t.RelativeDateType.PAGE_END,yn=[{id:gn,label:"core.today"},{id:fn,label:"core.page-start"},{id:mn,label:"core.page-end"}],vn=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 nn[this.config.locale]||nn[t.SUPPORTED_LOCALES.en_US]},enumerable:!0,configurable:!0}),e}(),bn=new e.InjectionToken("DATE_PICKER_CONFIG"),Cn={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return wn})),multi:!0},wn=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)})),ze(this.debounceTime),i.untilDestroyed(this)).subscribe((function(e){t.valueChanges.next(e);var n=t.isDate(e)?U.format(sn(e,t.config.locale),cn(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=ln(sn(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:vn,decorators:[{type:e.Inject,args:[bn]}]},{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:[Cn],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(bn)),Ct("design:paramtypes",[Object,Object,vn,e.Renderer2,e.ChangeDetectorRef,e.ElementRef])],o)}(Dt),Sn=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]),$e())return"string"==typeof e?new Date(e):e;var o=null;if(e)if("string"==typeof e){var i=e;if(!H.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=U.utcToZonedTime(new Date(i),"UTC")}else H.isValid(e)&&(o=U.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]),U.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(H.isValid(o))return o;var i=un(t,e,"yyyy-LL-dd");return H.isValid(i)?i:new Date(t)}return t}function un(t,e,n){var o=pn(e);return H.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,An=[{id:fn,label:"core.today"},{id:mn,label:"core.page-start"},{id:yn,label:"core.page-end"}],vn=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}(),bn=new e.InjectionToken("DATE_PICKER_CONFIG"),Cn={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return wn})),multi:!0},wn=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,Wt(this.host.nativeElement,"datoSize",t)},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this;Wt(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)})),ze(this.debounceTime),i.untilDestroyed(this)).subscribe((function(e){t.valueChanges.next(e);var n=t.isDate(e)?H.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=Ct(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=Ct(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:vn,decorators:[{type:e.Inject,args:[bn]}]},{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},At([e.HostListener("focusout"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],o.prototype,"markTouched",null),At([e.Input(),bt("design:type",Object)],o.prototype,"placeholder",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"debounceTime",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"isFocused",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"isLoading",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"type",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"attrs",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"maxLength",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"withClear",void 0),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],o.prototype,"datoSize",null),At([e.Input(),bt("design:type",Object)],o.prototype,"isPopperOrigin",void 0),At([e.Input(),bt("design:type",String)],o.prototype,"icon",void 0),o=At([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:[Cn],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}"]}),vt(0,e.Attribute("width")),vt(1,e.Attribute("height")),vt(2,e.Inject(bn)),bt("design:paramtypes",[Object,Object,vn,e.Renderer2,e.ChangeDetectorRef,e.ElementRef])],o)}(Ot),Sn=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)||Yt(e.hostElement,t)})),this.lastClass=n}else this.lastClass&&this.lastClass.forEach((function(t){return Yt(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=wt(n,1)[0];if(1===n.length){var r=i+"-color";return Ht(e.hostElement,r),void o.push(r)}n.slice(1).forEach((function(t){var n=i+"-"+t;e.postFixedProperties.indexOf(t)>-1&&(n+="-color"),Ht(e.hostElement,n),o.push(n)}))})),o},t.ctorParameters=function(){return[{type:e.ElementRef}]},At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoColor",null),t=At([e.Directive({selector:"[datoColor]"}),bt("design:paramtypes",[e.ElementRef])],t)}();(
|
|
86
86
|
/**
|
|
87
87
|
* @license
|
|
88
88
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -90,28 +90,28 @@ function ze(t){return void 0===t&&(t=void 0),function(e){return ge(t)?e.pipe(r.d
|
|
|
90
90
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
91
91
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
gn=t.ColorPalette||(t.ColorPalette={})).Light="light",gn.Dark="dark";var xn=function(){function n(t,e){this.renderer=t,this.host=e,this.currentClass=""}return Object.defineProperty(n.prototype,"datoPalette",{set:function(e){this.currentClass&&this.renderer.removeClass(this.host.nativeElement,this.currentClass),this.currentClass=e,this.renderer.addClass(this.host.nativeElement,this.currentClass||t.ColorPalette.Light)},enumerable:!0,configurable:!0}),n.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],n.prototype,"datoPalette",null),n=At([e.Directive({selector:"[datoPalette]"}),bt("design:paramtypes",[e.Renderer2,e.ElementRef])],n)}(),On=[Sn,xn],Dn=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:St(On),exports:St(On)})],t)}(),En=function(){function t(t){this.host=t,this.click=n.fromEvent(this.element,"click")}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},t=At([e.Directive({selector:"[datoOrigin]"}),bt("design:paramtypes",[e.ElementRef])],t)}(),In=function(){function t(t,o){var i=this;this.host=t,this.zone=o,this.dragged=new e.EventEmitter,this.dragging=new e.EventEmitter,this.delta={x:0,y:0},this.offset={x:0,y:0},this.enabled=!0,this.destroy$=new n.Subject,this.enabledFilter=function(t){return t.pipe(r.filter((function(){return i.enabled})))}}return Object.defineProperty(t.prototype,"datoDragEnabled",{set:function(t){this.enabled=t,this.handle?Gt(this.handle,"cursor",t?"move":""):t&&this.init()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoDragOffset",{set:function(t){this.reset(t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.enabled&&this.init()},t.prototype.ngOnDestroy=function(){this.destroy$.next()},t.prototype.reset=function(t){var e={x:0,y:0};this.offset=mt(mt({},e),t),this.delta=mt({},e),this.translate()},t.prototype.setupEvents=function(){var t=this;this.zone.runOutsideAngular((function(){var e=n.fromEvent(t.handle,"mousedown"),o=n.fromEvent(document,"mousemove"),i=n.fromEvent(document,"mouseup");e.pipe(t.enabledFilter,r.switchMap((function(e){var n=e.clientX,a=e.clientY;return o.pipe(r.map((function(e){e.preventDefault(),t.delta={x:e.clientX-n,y:e.clientY-a}})),r.takeUntil(i))})),r.takeUntil(t.destroy$)).subscribe((function(){0===t.delta.x&&0===t.delta.y||(Ht(t.target,"dragging"),t.translate(),t.dragging.emit({x:t.offset.x+t.delta.x,y:t.offset.y+t.delta.y}))})),i.pipe(t.enabledFilter,r.filter((function(){return 0!==t.delta.x||0!==t.delta.y})),r.takeUntil(t.destroy$)).subscribe((function(){t.offset.x+=t.delta.x,t.offset.y+=t.delta.y,t.dragged.emit(t.offset),t.delta={x:0,y:0},Yt(t.target,"dragging")}))}))},t.prototype.translate=function(){var t=this;this.target&&this.zone.runOutsideAngular((function(){requestAnimationFrame((function(){var e="translate("+(t.offset.x+t.delta.x)+"px, "+(t.offset.y+t.delta.y)+"px)";Gt(t.target,"transform",e)}))}))},t.prototype.init=function(){if(!this.datoDragTarget)throw new Error("You need to specify the drag target");this.handle=this.datoDragHandle instanceof Element?this.datoDragHandle:_t(this.datoDragHandle)&&this.datoDragHandle?document.querySelector(this.datoDragHandle):this.host.nativeElement,this.handle&&this.enabled&&Gt(this.handle,"cursor","move"),this.target=this.datoDragTarget instanceof Element?this.datoDragTarget:document.querySelector(this.datoDragTarget),this.setupEvents(),0===this.offset.x&&0===this.offset.y||this.translate()},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},At([e.Input(),bt("design:type",Object)],t.prototype,"datoDragHandle",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"datoDragTarget",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoDragEnabled",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoDragOffset",null),At([e.Output(),bt("design:type",Object)],t.prototype,"dragged",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"dragging",void 0),t=At([e.Directive({selector:"[datoDraggable]"}),bt("design:paramtypes",[e.ElementRef,e.NgZone])],t)}(),Rn=function(){function t(t){this.host=t}return Object.defineProperty(t.prototype,"datoAutoFocus",{set:function(t){var e=this;X.toBoolean(t)&&setTimeout((function(){e.host.nativeElement.focus()}))},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoAutoFocus",null),t=At([e.Directive({selector:"[datoAutoFocus]"}),bt("design:paramtypes",[e.ElementRef])],t)}();
|
|
94
94
|
/**
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright Datorama. All Rights Reserved.
|
|
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
|
|
100
|
+
*/function Tn(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 Tn(this.zone).pipe(r.map((function(){var i;return o.zone.runOutsideAngular((function(){i=$.createPopper(t,e,mt(mt({},n),{modifiers:St([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=At([e.Injectable({providedIn:"root"}),bt("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;Gt(this.tplPortal.elementRef,"width",e+"px"),this.scheduleUpdate()}},t.prototype.createOverlay=function(t){return this.overlay=Kt("div"),Ht(this.overlay,St(["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=At([e.Injectable(),bt("design:paramtypes",[e.ApplicationRef,e.NgZone,Pn])],t)}(),jn=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}(),Mn=new e.InjectionToken("APP_TRANSLATE"),_n=function(){function t(t){this.injector=t,this.delegate=t.get(Mn)}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=At([e.Injectable({providedIn:"root"}),bt("design:paramtypes",[e.Injector])],t)}(),Fn=1e5;function Nn(){return Fn++}
|
|
101
101
|
/**
|
|
102
102
|
* @license
|
|
103
103
|
* Copyright Datorama. All Rights Reserved.
|
|
104
104
|
*
|
|
105
105
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
106
106
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
107
|
-
*/var
|
|
107
|
+
*/var Bn=function(){function t(t,e,n,o,i){this.host=t,this.iconRegistry=e,this.translate=n,this.appRef=o,this.zone=i,this.datoTooltipType="tooltip",this.datoTooltipPosition="top",this.datoTooltipDelay=0,this.datoTooltipClass="",this.datoTooltipOnTextOverflow=!1,this.datoTooltipOverflowElement=null,this.datoTooltipOverflow=!1,this.datoTooltipTrigger="hover",this.datoTooltipContainer=document.body,this.viewInit=!1,this.isTooltipDisabled=!1,this.isSticky=!1,this.eventsMap={hover:{on:"mouseenter",off:"mouseleave"},focus:{on:"focusin",off:"focusout"},click:{on:"click",off:"click"}}}return Object.defineProperty(t.prototype,"datoTooltip",{set:function(t){var n=this;t instanceof e.TemplateRef?(this.tplPortal&&this.tplPortal.destroy(),this.tplPortal=new jn(t),this.appRef.attachView(this.tplPortal.viewRef),this.content=this.tplPortal.elementRef):this.content=ot.sanitize(this.translate.transform(t)),this.tooltip&&this.hide(),this.viewInit&&(this.unsubscribe(),Tn(this.zone).subscribe((function(){return n.initTooltip()})))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoTooltipDisabled",{set:function(t){this.isTooltipDisabled=t,this.isTooltipDisabled&&this.hide()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoTooltipIsSticky",{set:function(t){this.isSticky=t,this.isSticky?this.show():this.hide()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return!Ft(this.tooltip)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tooltipElement",{get:function(){return this.datoTooltipOverflowElement||this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"containerElement",{get:function(){return(_t(this.datoTooltipContainer)?ee(this.host.nativeElement,this.datoTooltipContainer):this.datoTooltipContainer)||document.body},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var t=this;this.viewInit=!0,Tn(this.zone).subscribe((function(){return t.initTooltip()}))},t.prototype.ngOnDestroy=function(){this.hide(),this.tplPortal&&(this.appRef.detachView(this.tplPortal.viewRef),this.tplPortal.destroy())},t.prototype.show=function(){var t=this;this.tooltip||this.zone.runOutsideAngular((function(){t.tooltip=t.createTooltipInstance(t.tooltipElement),t.tooltip.show()}))},t.prototype.hide=function(){this.tooltip&&(this.tooltip.dispose(),this.tooltip=null)},Object.defineProperty(t.prototype,"isLongTooltip",{get:function(){return"long"===this.datoTooltipType},enumerable:!0,configurable:!0}),t.prototype.createTooltipInstance=function(t){var e='<div class="tooltip-close-icon">'+this.iconRegistry.getSvg("close")+"</div>",n={placement:this.datoTooltipPosition,container:this.containerElement,title:this.content,html:!0,offset:Ft(this.datoTooltipOffset)?this.isLongTooltip?"0, 10":0:this.datoTooltipOffset,trigger:"manual",delay:this.datoTooltipDelay,template:this.getTpl(e)};return!this.datoTooltipOverflow&&Ft(this.datoTooltipOffset)||(n.popperOptions={modifiers:{preventOverflow:{enabled:!1}}}),new Z(t,n)},t.prototype.isElementOverflow=function(t){var e=t.parentElement,n=t.offsetWidth>e.offsetWidth,o=t.offsetWidth<t.scrollWidth;return n||o},t.prototype.getTpl=function(t){return'<div class="tooltip dato-tooltip '+(this.isLongTooltip?"":"common-tooltip")+" "+this.datoTooltipClass+" "+this.datoTooltipPosition+'" \n role="tooltip" style="z-index: '+Nn()+'">\n '+(this.isLongTooltip?'<div class="tooltip-arrow show"></div>':"")+'\n <div class="tooltip-content">\n <div class="tooltip-inner"></div>\n '+(this.isLongTooltip&&"click"===this.datoTooltipTrigger?t:"")+"\n </div>\n </div>"},t.prototype.initTooltip=function(){var t=this;if("manual"!==this.datoTooltipTrigger){var e=this.eventsMap[this.datoTooltipTrigger],o=e.on,a=e.off;if((!this.datoTooltipOnTextOverflow||this.isElementOverflow(this.tooltipElement))&&(this.triggerOn=n.fromEvent(this.host.nativeElement,o).pipe(r.filter((function(){return!t.isSticky})),i.untilDestroyed(this)).subscribe((function(){if(!t.isTooltipDisabled&&("click"===t.datoTooltipTrigger&&t.isOpen?t.hide():t.show(),t.isLongTooltip&&t.isOpen)){var e=t.tooltip.popperInstance,o=e&&e.popper?e.popper.querySelector(".tooltip-close-icon svg"):null;o&&n.fromEvent(o,"click").pipe(r.filter((function(){return!t.isSticky})),i.untilDestroyed(t)).subscribe((function(){return t.hide()}))}})),"click"!==this.datoTooltipTrigger)){var s=this.datoTooltipHideOnAllEvents?Object.values(this.eventsMap).map((function(e){var o=e.off;return n.fromEvent(t.host.nativeElement,o)})):[n.fromEvent(this.host.nativeElement,a)];this.triggerOff=n.merge.apply(void 0,St(s)).pipe(r.filter((function(){return!t.isSticky})),i.untilDestroyed(this)).subscribe((function(){t.hide()}))}}},t.prototype.unsubscribe=function(){this.triggerOn&&this.triggerOn.unsubscribe(),this.triggerOff&&this.triggerOff.unsubscribe()},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Fe},{type:_n},{type:e.ApplicationRef},{type:e.NgZone}]},At([e.Input(),bt("design:type",String)],t.prototype,"datoTooltipType",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoTooltip",null),At([e.Input(),bt("design:type",Object)],t.prototype,"datoTooltipPosition",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"datoTooltipDelay",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"datoTooltipClass",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"datoTooltipOnTextOverflow",void 0),At([e.Input(),bt("design:type",e.ElementRef)],t.prototype,"datoTooltipOverflowElement",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoTooltipDisabled",null),At([e.Input(),bt("design:type",Object)],t.prototype,"datoTooltipOverflow",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"datoTooltipOffset",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"datoTooltipTrigger",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"datoTooltipContainer",void 0),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"datoTooltipIsSticky",null),At([e.Input(),bt("design:type",Boolean)],t.prototype,"datoTooltipHideOnAllEvents",void 0),t=At([e.Directive({selector:"[datoTooltip]",exportAs:"datoTooltip"}),bt("design:paramtypes",[e.ElementRef,Fe,_n,e.ApplicationRef,e.NgZone])],t)}(),Ln=function(){this.$implicit=null,this.datoSubscribe=null},Gn=function(){function t(t,e,n){this.viewContainer=t,this.cdr=e,this.templateRef=n,this.context=new Ln}return Object.defineProperty(t.prototype,"datoSubscribe",{set:function(t){var e=this;if(this.observable!==t){this.observable=t,this.subscription&&this.subscription.unsubscribe();var o=this.isObject(t)?this.buildObservablesFromObject(t):me(t);Array.isArray(t)&&(this.context.datoSubscribe=[]),this.subscription=n.combineLatest(o).subscribe((function(n){if(e.isObject(t)){var o=n.reduce((function(t,e){var n=e.key,o=e.value;return t[n]=o,t}),{});e.context.datoSubscribe=o}else e.context.datoSubscribe=Array.isArray(t)?n:n[0];e.cdr.markForCheck()}))}},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.viewContainer.createEmbeddedView(this.templateRef,this.context)},t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.isObject=function(t){return!1===Array.isArray(t)&&!1===Tt(t.subscribe)},t.prototype.buildObservablesFromObject=function(t){return Object.entries(t).map((function(t){var e=wt(t,2),n=e[0];return e[1].pipe(r.map((function(t){return{key:n,value:t}})))}))},t.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.ChangeDetectorRef},{type:e.TemplateRef}]},At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoSubscribe",null),t=At([e.Directive({selector:"[datoSubscribe]"}),bt("design:paramtypes",[e.ViewContainerRef,e.ChangeDetectorRef,e.TemplateRef])],t)}(),Vn=function(){function t(t){this.ngControl=t,this.condition=!1}return Object.defineProperty(t.prototype,"datoDisableControl",{set:function(t){this.condition=t},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(){if(this.ngControl.control.disabled!==this.condition){var t=this.condition?"disable":"enable";this.ngControl.control[t]({emitEvent:!1})}},t.ctorParameters=function(){return[{type:o.NgControl}]},At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"datoDisableControl",null),t=At([e.Directive({selector:"[datoDisableControl]"}),bt("design:paramtypes",[o.NgControl])],t)}();
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright Datorama. All Rights Reserved.
|
|
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 zn(t){var e=$t("textarea");e.value=t,e.setAttribute("readonly",""),Ht(e,{position:"absolute",left:"-9999px"});var n=Zt(e);e.select(),document.execCommand("copy"),n()}var Bn=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(){zn(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)}(),Hn=new e.InjectionToken("DATO_CORE_CONFIG"),Un=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:[Hn]}]}]},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(Hn)),Ct("design:paramtypes",[e.ElementRef,Object])],t)}(),Kn=function(){function t(){}return t=vt([e.NgModule({declarations:[Un],exports:[Un]})],t)}(),Wn="IntersectionObserver"in window;function Qn(t,e){return void 0===e&&(e={root:null,threshold:.3}),new n.Observable((function(n){Wn||(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 $n="ResizeObserver"in window;function qn(t,e){return $n?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 Yn,Zn=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=An(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&&qn(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 kn(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&&An(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:jn},{type:e.NgZone},{type:Me}]},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,jn,e.NgZone,Me])],t)}(),Xn=[In,Tn,Rn,Nn,Gn,Bn,Vn,Zn],Jn=function(){function t(){}return t=vt([e.NgModule({imports:[Kn],declarations:Xn,exports:[Xn,Kn]})],t)}(),to=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,eo=function(){function t(){}return t.prototype.transform=function(t,e,n){var o=Oe(t||""),i=Oe(e||"").replace(to,"\\$&");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)}(),no=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:jn}]},t=vt([e.Pipe({name:"translate"}),Ct("design:paramtypes",[jn])],t)}(),oo=function(){function t(){}return t.prototype.transform=function(t){return Te(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)}(),io=function(){function t(){}return t.prototype.transform=function(t){return Ie(t)},t=vt([e.Pipe({name:"camelCase"})],t)}();
|
|
114
|
+
*/function zn(t){navigator.clipboard.writeText(t)}var Qn=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(){zn(this.value),this.copied.emit(this.value)},At([e.Output(),bt("design:type",Object)],t.prototype,"copied",void 0),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoClipboard",null),At([e.HostListener("click"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],t.prototype,"onClick",null),t=At([e.Directive({selector:"[datoClipboard]"})],t)}(),Hn=new e.InjectionToken("DATO_CORE_CONFIG"),Un=function(){function t(t,e){this.host=t,this.config=e}return Object.defineProperty(t.prototype,"datoStaticSrc",{set:function(t){Wt(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:[Hn]}]}]},At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoStaticSrc",null),t=At([e.Directive({selector:"[datoStaticSrc]"}),vt(1,e.Inject(Hn)),bt("design:paramtypes",[e.ElementRef,Object])],t)}(),Yn=function(){function t(){}return t=At([e.NgModule({declarations:[Un],exports:[Un]})],t)}(),Wn="IntersectionObserver"in window;function Kn(t,e){return void 0===e&&(e={root:null,threshold:.3}),new n.Observable((function(n){Wn||(n.next(),n.complete());var o=new IntersectionObserver((function(t){wt(t,1)[0].isIntersecting&&(n.next(),n.complete())}),e);return o.observe(t),function(){return o.disconnect()}}))}var qn="ResizeObserver"in window;function Jn(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=wt(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 Xn,Zn=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=Tn(this.zone),s=this.tooltipCheckInView?[Kn(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&&Jn(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&&Ht(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 jn(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(_t(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=Kt("div");Ht(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&&Tn(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:_n},{type:e.NgZone},{type:Fe}]},At([e.Input(),bt("design:type",Object)],t.prototype,"options",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"showOnlyOnTextOverflow",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"triggerTarget",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"tooltipHost",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"appendTo",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"trigger",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"tooltipClass",void 0),At([e.Input(),bt("design:type",Array)],t.prototype,"offset",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"tooltipCheckInView",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"placement",null),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"variation",null),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"datoTooltipDisabled",null),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"disabled",null),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"sticky",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoTooltipV2",null),t=At([e.Directive({selector:"[datoTooltipV2]",exportAs:"datoTooltipV2"}),bt("design:paramtypes",[e.ElementRef,e.ApplicationRef,_n,e.NgZone,Fe])],t)}(),$n=[En,In,Rn,Bn,Gn,Qn,Vn,Zn],to=function(){function t(){}return t=At([e.NgModule({imports:[Yn],declarations:$n,exports:[$n,Yn]})],t)}(),eo=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,no=function(){function t(){}return t.prototype.transform=function(t,e,n){var o=xe(t||""),i=xe(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=At([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:_n}]},t=At([e.Pipe({name:"translate"}),bt("design:paramtypes",[_n])],t)}(),io=function(){function t(){}return t.prototype.transform=function(t){return Ie(t)},At([at.memo(),bt("design:type",Function),bt("design:paramtypes",[String]),bt("design:returntype",String)],t.prototype,"transform",null),t=At([e.Pipe({name:"kebabCase"})],t)}(),ro=function(){function t(){}return t.prototype.transform=function(t){return Ee(t)},t=At([e.Pipe({name:"camelCase"})],t)}();
|
|
115
115
|
/**
|
|
116
116
|
* @license
|
|
117
117
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -126,35 +126,35 @@ hn=t.ColorPalette||(t.ColorPalette={})).Light="light",hn.Dark="dark";var xn=func
|
|
|
126
126
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
127
127
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
128
128
|
*/
|
|
129
|
-
|
|
129
|
+
Xn=t.COMPARE_RESULT||(t.COMPARE_RESULT={}))[Xn.EXACT=1]="EXACT",Xn[Xn.STARTS_WITH=2]="STARTS_WITH",Xn[Xn.CONTAINS=3]="CONTAINS",Xn[Xn.NO_MATCH=1/0]="NO_MATCH";var ao=[{group:t.COMPARE_RESULT.EXACT,children:t.COMPARE_RESULT.EXACT},{group:t.COMPARE_RESULT.STARTS_WITH,children:t.COMPARE_RESULT.EXACT},{group:t.COMPARE_RESULT.CONTAINS,children:t.COMPARE_RESULT.EXACT},{group:t.COMPARE_RESULT.NO_MATCH,children:t.COMPARE_RESULT.EXACT},{group:t.COMPARE_RESULT.EXACT,children:t.COMPARE_RESULT.STARTS_WITH},{group:t.COMPARE_RESULT.EXACT,children:t.COMPARE_RESULT.CONTAINS},{group:t.COMPARE_RESULT.EXACT,children:t.COMPARE_RESULT.NO_MATCH},{group:t.COMPARE_RESULT.STARTS_WITH,children:t.COMPARE_RESULT.STARTS_WITH},{group:t.COMPARE_RESULT.CONTAINS,children:t.COMPARE_RESULT.STARTS_WITH},{group:t.COMPARE_RESULT.NO_MATCH,children:t.COMPARE_RESULT.STARTS_WITH},{group:t.COMPARE_RESULT.STARTS_WITH,children:t.COMPARE_RESULT.CONTAINS},{group:t.COMPARE_RESULT.STARTS_WITH,children:t.COMPARE_RESULT.NO_MATCH},{group:t.COMPARE_RESULT.CONTAINS,children:t.COMPARE_RESULT.CONTAINS},{group:t.COMPARE_RESULT.NO_MATCH,children:t.COMPARE_RESULT.CONTAINS},{group:t.COMPARE_RESULT.CONTAINS,children:t.COMPARE_RESULT.NO_MATCH},{group:t.COMPARE_RESULT.NO_MATCH,children:t.COMPARE_RESULT.NO_MATCH}];function so(e){return function(n){var o=n.toLocaleLowerCase();return o===e?t.COMPARE_RESULT.EXACT:o.startsWith(e)?t.COMPARE_RESULT.STARTS_WITH:o.includes(e)?t.COMPARE_RESULT.CONTAINS:t.COMPARE_RESULT.NO_MATCH}}function lo(e){var n,o,i=e.array,r=void 0===i?[]:i,a=e.searchTerm,s=void 0===a?"":a,l=e.groupLabel,c=void 0===l?"label":l,p=e.groupKey,d=void 0===p?"children":p,u=e.labelKey,h=void 0===u?"label":u,g=so(s),f=function(t,e){return function(n){var o=n.group,i=n.children;return o===t&&i===e}},m={},y=function(e){var n=e[c],o=e[d];if(o.length<=1){var i=(o[0]||{})[h],r=void 0===i?"":i;m[n]=g(r)}else o.sort((function(e,o){var i=g(e[h]),r=g(o[h]);return m[n]!==t.COMPARE_RESULT.EXACT&&(m[n]=Math.min(i,r,m[n]||t.COMPARE_RESULT.NO_MATCH)),i-r}))};try{for(var A=Ct(r),v=A.next();!v.done;v=A.next()){y(v.value)}}catch(t){n={error:t}}finally{try{v&&!v.done&&(o=A.return)&&o.call(A)}finally{if(n)throw n.error}}return r.sort((function(t,e){var n=t[c],o=e[c],i=g(n),r=g(o);return ce(ao,f(i,m[n]))+1-(ce(ao,f(r,m[o]))+1)}))}
|
|
130
130
|
/**
|
|
131
131
|
* @license
|
|
132
132
|
* Copyright Datorama. All Rights Reserved.
|
|
133
133
|
*
|
|
134
134
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
135
135
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
136
|
-
*/function
|
|
136
|
+
*/function co(t){var e=t.array,n=void 0===e?[]:e,o=t.labelKey,i=void 0===o?"label":o;return n.sort((function(t,e){return t[i].localeCompare(e[i])}))}
|
|
137
137
|
/**
|
|
138
138
|
* @license
|
|
139
139
|
* Copyright Datorama. All Rights Reserved.
|
|
140
140
|
*
|
|
141
141
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
142
142
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
143
|
-
*/function
|
|
143
|
+
*/function po(t){var e,n,o=t.array,i=void 0===o?[]:o,r=t.groupLabel,a=void 0===r?"label":r,s=t.groupKey,l=void 0===s?"children":s,c=t.labelKey,p=void 0===c?"label":c;try{for(var d=Ct(i),u=d.next();!u.done;u=d.next()){co({array:u.value[l],labelKey:p})}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}return co({array:i,labelKey:a})}
|
|
144
144
|
/**
|
|
145
145
|
* @license
|
|
146
146
|
* Copyright Datorama. All Rights Reserved.
|
|
147
147
|
*
|
|
148
148
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
149
149
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
150
|
-
*/var
|
|
150
|
+
*/var uo=function(){function t(){}return t.prototype.transform=function(t,e,n){void 0===n&&(n={});var o=n.sortFn,i=void 0===o?po:o,r=n.labelKey,a=n.groupLabel,s=n.groupKey;return e?lo({array:t,searchTerm:e,labelKey:r,groupLabel:a,groupKey:s}):i({array:t,labelKey:r,groupKey:s,groupLabel:a})},t=At([e.Pipe({name:"searchResultsGroupSort"})],t)}();
|
|
151
151
|
/**
|
|
152
152
|
* @license
|
|
153
153
|
* Copyright Datorama. All Rights Reserved.
|
|
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
|
|
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 Me(t[n],e[n])}}return function(t){var n=t.array;return(void 0===n?[]:n).sort(e)}},t=At([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=At([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=At([e.Pipe({name:"tree"})],t)}(),Ao=function(){function t(){}return t.prototype.transform=function(t,e){return void 0===e&&(e=0),be(t,e)},t=At([e.Pipe({name:"shortNumber"})],t)}(),vo=[no,oo,io,ro,uo,go,mo,yo,Ao],bo=function(){function t(){}return t=At([e.NgModule({declarations:vo,exports:vo})],t)}(),Co=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Le,Dn,to,bo],declarations:[wn],exports:[wn]})],t)}(),wo=function(){function t(t,e){this.host=t,this.target=e,this.disabled=!1}return Object.defineProperty(t.prototype,"datoType",{set:function(t){Wt(this.element,"datoType",t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.target&&Wt(this.linkElement,"target",this.target),(this.href||this.download)&&Wt(this.linkElement,"href",this.href),rt.coerceBooleanProperty(this.download)&&(Wt(this.linkElement,"download",this.download),Wt(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"]}]}]},At([e.HostBinding("class.disabled"),e.Input(),bt("design:type",Object)],t.prototype,"disabled",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"href",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"download",void 0),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoType",null),t=At([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}"]}),vt(1,e.Attribute("target")),bt("design:paramtypes",[e.ElementRef,Object])],t)}(),So=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[wo],exports:[wo]})],t)}(),xo=function(){function t(t){this.host=t,this.currentFont=null}return Object.defineProperty(t.prototype,"datoFont",{set:function(t){this.currentFont!==t&&(this.currentFont&&Yt(this.element,this.currentFont),this.currentFont=t||"simple",this.currentFont.startsWith("dato-")||(this.currentFont="dato-"+this.currentFont),Ht(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}]},At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoFont",null),t=At([e.Directive({selector:"[datoFont]"}),bt("design:paramtypes",[e.ElementRef])],t)}(),Oo=[xo],Do=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[Oo],exports:[Oo]})],t)}(),Eo=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=Bt("button",this.host.nativeElement),oe(this.width,this.height,t)),(this.iconWidth||this.iconHeight||this.width||this.height)&&(e=Bt("dato-icon",this.host.nativeElement),oe(this.iconWidth||this.width,this.iconHeight||this.height,e)),this.tabIndex&&(t=t||Bt("button",this.host.nativeElement)).setAttribute("tabindex",this.tabIndex),this.host.nativeElement.hasAttribute("removeIconPadding")&&Gt(e=e||Bt("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}]},At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"disabled",null),At([e.Input(),bt("design:type",String)],t.prototype,"datoIcon",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"icon",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"datoIconColor",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"tabIndex",void 0),At([e.HostBinding("class.disabled"),bt("design:type",Object)],t.prototype,"_disabled",void 0),t=At([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}"]}),vt(0,e.Attribute("datoSize")),vt(1,e.Attribute("datoType")),vt(2,e.Attribute("datoCircle")),vt(3,e.Attribute("width")),vt(4,e.Attribute("height")),vt(5,e.Attribute("iconWidth")),vt(6,e.Attribute("iconHeight")),bt("design:paramtypes",[Object,Object,Object,Object,Object,Object,Object,e.ElementRef])],t)}(),Io=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,se,Le,Dn],declarations:[Eo],exports:[Eo,se,Le]})],t)}();
|
|
158
158
|
/**
|
|
159
159
|
* @license
|
|
160
160
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -162,7 +162,7 @@ Yn=t.COMPARE_RESULT||(t.COMPARE_RESULT={}))[Yn.EXACT=1]="EXACT",Yn[Yn.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 Ro=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}(),Ao=function(t){function e(e){return t.call(this,e)||this}return ft(e,t),e}(Error);var Eo,Po,ko,_o=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 Ao("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:jn}]},t=vt([e.Injectable(),Ct("design:paramtypes",[jn])],t)}(),jo=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:jn}]},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,jn])],t)}(),Mo={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Lo})),multi:!0},Lo=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 Ro,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){if(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;var e=this.gridOptions.defaultColDef;e.filter&&(e.filterParams={newRowsAction:"keep"})}},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.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:_o},{type:e.ElementRef},{type:Me},{type:e.ChangeDetectorRef}]},vt([e.ViewChild(st.AgGridNg2,{static:!0}),Ct("design:type",st.AgGridNg2)],o.prototype,"gridComponent",void 0),vt([e.ViewChild(jo,{static:!0}),Ct("design:type",jo)],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:[Mo],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",[_o,e.ElementRef,Me,e.ChangeDetectorRef])],o)}(Dt),No=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",Lo),Ct("design:paramtypes",[Lo])],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 Ro=function(){function t(t){this.gridApi=t}return Object.defineProperty(t.prototype,"ready",{get:function(){return!Ft(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=X.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:X.coerceArray(t)};return Ft(e)||(n.addIndex=e),this.gridApi.updateRowData(n)},t.prototype.updateRows=function(t){var e=X.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=X.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}(),To=function(t){function e(e){return t.call(this,e)||this}return ft(e,t),e}(Error);var Po,ko,jo,Mo=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 To("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:_n}]},t=At([e.Injectable(),bt("design:paramtypes",[_n])],t)}(),_o=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:_n}]},At([e.Input(),bt("design:type",lt.GridApi)],t.prototype,"agGridApi",void 0),At([e.Input(),bt("design:type",lt.ColumnApi),bt("design:paramtypes",[lt.ColumnApi])],t.prototype,"agGridColumnApi",null),At([e.Input(),bt("design:type",Boolean)],t.prototype,"isCollapsed",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"showFitToContent",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"infinitePagination",void 0),At([e.Input(),bt("design:type",n.Subject)],t.prototype,"rowDataChanged",void 0),At([e.Output(),bt("design:type",e.EventEmitter)],t.prototype,"alignTable",void 0),At([e.Output(),bt("design:type",e.EventEmitter)],t.prototype,"toggleRowGroup",void 0),At([e.ViewChild("navigation",{static:!0}),bt("design:type",e.ElementRef),bt("design:paramtypes",[e.ElementRef])],t.prototype,"content",null),t=At([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}"]}),bt("design:paramtypes",[e.ChangeDetectorRef,_n])],t)}(),Fo={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 Ro,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){if(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?Ht:Yt)(this.hostElement,"grid-pagination"),"infinite"===this.gridOptions.rowModelType||"serverSide"===this.gridOptions.rowModelType){this.infinitePagination=!0;var e=this.gridOptions.defaultColDef;e.filter&&(e.filterParams={newRowsAction:"keep"})}},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?X.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(){Yt(this.activeMenu,"menu-active"),this.activeMenu=null},o.ctorParameters=function(){return[{type:Mo},{type:e.ElementRef},{type:Fe},{type:e.ChangeDetectorRef}]},At([e.ViewChild(st.AgGridAngular,{static:!0}),bt("design:type",st.AgGridAngular)],o.prototype,"gridComponent",void 0),At([e.ViewChild(_o,{static:!0}),bt("design:type",_o)],o.prototype,"paginationComponent",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],o.prototype,"options",null),At([e.Output(),bt("design:type",Object)],o.prototype,"gridReady",void 0),o=At([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:[Fo],styles:['@font-face{font-family:agGridClassic;src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABYIAAsAAAAAKcwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAn4AAATCbWtuOU9TLzIAAAOIAAAAQQAAAFZWVlKaY21hcAAAA8wAAAIQAAAF1I+ffXtnbHlmAAAF3AAADCAAABa8M29qh2hlYWQAABH8AAAANAAAADZ2z8SBaGhlYQAAEjAAAAAeAAAAJAfTBC1obXR4AAASUAAAABoAAAE8zwr/4mxvY2EAABJsAAAAeAAAAKAmcyvAbWF4cAAAEuQAAAAfAAAAIAFlAHhuYW1lAAATBAAAATMAAAJS8kTiWnBvc3QAABQ4AAABzgAAArcDfOWreJx9lLtuE1EQhv/1bkLuCVG4mRBCuIUACRex7K69dhwSOzYmokAUiCY0gBSlQhQ8ASUFT8EzUPAAFJRUPAGipuSbWRuHSMFHu3vOzD//mfnPHCuQNKZbqqm02ew+0dTe7pt9lRWp+Jn/4DzYe/1yVyP9Fb7IvyMKoqea1iU901t9DUrBq+B98Lm0HNbCd+HH8Hv4K4oVglvUKvhx3WckSnnHylRRVblKGsaWMK+pDjrkve7WWZ3RkHva6ug0uybEdJxxhe91zcDTcp6mNkFlDONs8u4ybpDd0YhcN+GvkM0GVmOdJ885jeohOTbJo0F0He8svi12jIlp4WvpBHhDRa7ktp5rCZTVZpGVHi7jSfDaOvbVbVToo9bhr8JvfGvs2rdX2Skl4i7sFVAPXPOyJo9kLTRe0WXYq1ia2BvOXnP2i8SnVJBxVpFXnlL5BKtMj/XCs9ruxTRd5UKTNaob2FvOl1PvQWsDri7YO+QwsNqJrbJXrB38E2S/rX190Cd90Tf90E/9DqJgSsd0kp1Sr3IT/q3/qjeCxofRbbzrf61W7TB9cRj1L2KUjKquT4Kv01PZdpugNtMnYx5jzRw/Tp6Gb5NNzomNscdgHbGKPYsU2xBjg3VC7FSvf+uMSVe+Q9dMc17WidY7ZS2j3ILzF52ao/05GG1WZHvWdawTMe/naGqXvMoZ92Q8x91jN8dYrY8znUevmOorruEj/BewGO/AsuQ3ICefOh0Ued+1vd/ugc2pZ5CHdcwCXWa6rOC1ft3xu2XRV/AXWabUZKw73ovX4Go44ip1V3o3fo5ztxobvVM+5RGJxwd+a4t/iswj6n5XWmRtfdX9A0hjfAYAAHicY2Bkms84gYGVgYGpimkPAwNDD4RmfMBgyMgEFGVgZWbACgLSXFMYHBh0P5oxvwByo5g/MXABaUaQHADcmgqQAAAAeJy11AdOW0EUheHfhW7AQHoP6cWpxHQw3TRnDaQjUhDprC/ryB7uCsgZz8kCiJSRvnc9T89v3mh0LtABlOS+lKFYpaBfFHp1t9C+X6K3fb/Mb80rdFPU7xq77HMY9aMj3a2xwx4HUWjP/o6Cnq5wgZvUNVvVdZkGa0yyxTiLTLPEAk1mmWGDCeaZYp0Wc6ywybb+X9TqZX1jJ11at0df0qc39jPAIFWGGGaEk5ziNGc4yznOa7WLXOIyV7jKKNe4zg2tf4vb3OEu97SfGg94yCMe84Snuo5qNqaP7eR4Y/WYz6dRX26sTW6NL2rnC83ZGW16fmq9Nbeyuf0PL/sPo5IupV+ePSedbJZ2u2PpNF/Ysry0hryyNXltk/LGtuStjcs7W5Rdm5Y9W5L3tiAfrCkfbVY+2Yzs24Yc2IR8tnn5YlPy1dblm7Xku83JD1uRn7Yph6YDjEKWchPFjFRLWcpZlLOUtejIUgajMyPVroxUuzNS7clItTdL2Yy+jFQrWTrJ6M9IdSAj1cGMVKsZqQ5lpDqckepIRqonMqWOMOWPMCWRMGWSMKWTMOWUMCWWMGWXMKWYMOWZMCWbMGWcMKWdMCWaMHUAwtQLCFNXIEz9gTB1CsLUMwhT9yBMfYQwdRTCUg8NS5kJU78hTL2GMPUgwtSHCFNfIkwdirD2M2NZe4/PsvY76xljfwA5A7F6eJztWGtwG9UV3nM31kp+yFq9VrKEnNXGkl9JrLft+BErjiXHsR0iY4dAndjEaV5tcYIDJYCBeCDNQPuDSWlwyKPTSk0KnTbODIGZNjNJp6TDjzrtDAMzBGh+dICCG4qhjCba9NxdWX4kJBl+dipp99679+y955z7nZcYYPDDhtmdjI5hQBQ40SKaWJENy+OPPAJDmcfefpuMkT9OTqbgYXgYSRT6j9iPmMU4CHHeiMB5eVFpIiKvNAIvKg0nwvnu2MWLbeuA7W7DtlvOrMM21i3L9HmsGwi7WPdNU3Tcto6Z2bOXfY7R4oDz6vDiJfjFq0MwCINDr5wge17dAoPy0S2vZD6ZoSdTZIopUOiRF+QG+SFTbWcmYmfOxCbOtE1Ay0xvou0Mk8cw12WU62PGxEiMl6liljNMnuheBiE+2AQB0e8CC2/WAyu6Ndix4pMwTnkgwEtlAYvEYsvuyJjd9W78kU/d9aJYL2YMBpvNQK7ygpD5VSIBnYlEqqeHuOvc5HO84S9TjDf2pwKf4XmbjSf/4gV5Qr6cTMJxeTOKneXrE4WvCpRnhhFplrm8BTxxgPKa2B0KD+4cT5/N4Wa7PPWf4Mkr7MczLMywdM9cTt6Q8//UcgCOLeTDe2d8sGJIvCUXf5dPQ9dteJCLkvQ45+1/Z7vfaufbbErlRaEfYbcgMrSMjWEQdIIO2EgpaDj8WsxW3CXo9XjJP+VN9Q/IGWi6ePHN3xYU2IutvtU+a7EdzsOJFTghX4DGixebiopcDo/d7fO57WVOF6PKhJKcYA/hbhz2eJEvs4ghOEG1Ip8m45mzJJ5OpSiZRuHnUJa2gClGPQgMQ+nRYkPsgpauwUbl08l5Da6VSkFnEj/QRftMVs6Ps7hffmeaBcS7RQpJoUAowO5UtZsxqdomUxmDokWqZfmtlPJRtW3Mansqq20TUvDkMzziM5QlRU6VnygbVaTkkZ8AL4Yk9CgiL7IhkQ+EyHhSLkzCdEKegM6UPJEg48o4jeMT+DDN5HzG4+zj1AfoAI+O0wF6jghMg3GvPKXc5Km9YMQb2TFvCEYc5ng5yBoYPxNl1uOi4YjyFawqCtQGMeDxYosNTi4DbJpAsFIiq4BUerCqrzVDUPK6KXoEFwgR+p5EisiiltKAZ6l0lyNc099e1vmirdzlKatYWr/uyT0VgyVOg9Bf2VxQWGxoWF7td9UvKV384pLq8jpSYXPykqWALDqYr9XkOR327V6wVpndFrITYWrzmgSAYtG7rrm0YZ/Rri3Q6sTKxs1+o1ksC8aqhajbI0oiECdf5bDanidmU0AC4HUlBs5uv8wSlneVVIPf4CowUTVwii7OsmNMIWNg7MxdjIepZAIMY3LrIWsMy6ACLCK4NXQY9FAccn6rWeP2BMM4EZJmBoedNc7G3kZnDUsyW8lL165UNeKwkXyR2TrmqqpqqKpiG7CrPoUQUmO3CptL8DV91Ns4OVlKyRqqIHbpUmNfI/5m48QBJU7wAYxG9MB/efyVIfmofHQIfkj0mWkcHIOBIebb+jRqZbfyLD+WC2/n0SaSyVmsv8lGUJ8+pgH3jwjhAAJH0KOzwagFCJmQRBHjNS0jiDGEjTUiqIjzeMNIoKDIi/QgBj3N0Wf3DW+o+F5TqGWxXv7rsg5vflNV7dLRf4Tvb8hvDfqe60rc7f/OxoHeprrl/o0j8M66Nr3R6hILVlSz+vIa46L1Hfsbt3laA+UFMJpPIJGn0Tvky5raDSF/vPUBq61gpTNfFyxr8q95Zq182NdvEoTSkkCP439TFgH9TzkTRlmoHIrbz/IapsZPTTwywzRBwHjLPI0gUTqB2jtcoxJ0733s6Z88Rpm8d89TD7YGV/YPbntwc+8ahdnCtm0Pb4/lwxrI7w7HwmXlYU8Da2ETHU/v7ewuLFzjafR3jHXcc8of3xCp1Wgi/i0mwbrYXntfMNxfzxY5K0FbUNJh1nIkF08wRuzEmIXZnEkE3hvyWQKhhBIDkuxOzCw2pdI9PVlacg1zJFbJ/HiJx6TBywnQnCCGCxdq02kyJRfCtNx6/jwOKHlh1jefmxeDHEzpbMYUwcgwc8Ft+iLGj1QymVZ+6MG/qQfHk8nJpBK0jt/YIEt5WbnPoVcSmTLMkpbSuKEEQoxT2ZCYu3gpJIJkwXxNvcrwghNJGnKTGB1pSyOL0m7uga7sdgo77M4Eqi+ZSGOTTpBYOmNMwIkejDuJRBY3k+QCekg3U6PiphQQ0Iib5TR45OnBjbGiGBToNIPHyy2AzKM/2N0r3f/pE0+O7NskbXn0SfiuY/ToqCMaYjc9PTq6f4ANtx6aAxZynlQvTUgbt2m5iqqN0gPh2rHYvffG7lrK3u1yOpzryXKXpHdWgDa/ZK1ZpyELz71M4gNAs2OOXEskMleVg0/POXXVpx5nexWfKmAQpSUCbD25RT4Kg1tOkXo4flLNw0/RAE6uf3X9K/YL9t9MkNmpagDFpZajBEaUOexXLAef6sFF8EETqgG9rc9DuziFQw+nTFM6IWClL3mDXh8lU+hdZGbaBf5mqlivhzxRZzaX147VdXWs7dxtxk9dPN9uBMKTRRq7w2wMtbc79juNJofORuwVWmu+1Qimus61HV11Y7XlSG60QL5VW2kjRQU6h8nk2O9obw8ZzQ67ZhFrIGC058fr6Lq4U1fHYdyJDnYrC8R1Bn3IrzVqShzx9rDZ5BhzxOMOHW9w2yq0RGOgOyksjdUeRnJjMUe0FTa3QcflU8Ixh8kcbo87SjRGrT+kN+jiihRzbfoQWlqp4lU5NB10qJh/oVdFE8LDwywsEAl5Jc5CYof3Hn7nHbwlc52fHRwcPDhIfj/vIe1kzg7SKWbRvNqnEv33nVU+nFJUQQT9uxC5de3z2Qcx33jtEbgc+9D3cu3LtymAMk2x92uOIPnjH8Z82OZi5Wz+q2S+kL3YQ9f+wEbVK61muDS/pa98W9kiStmIIlKneGvZ9r0fqzkSGYdg7APK9O1kS2dlewFVciRyJJerRkmcSmlCH5UiL2FeFEvmatnn0V7z6OlTS4X7FCsF/4xjVt93sH9jimbrYyX3EWB8+xB4wTu0ffuQ/K787tB28rsd+AR7O+RnduAznNuRzYWuK7mQmVlC8zrwU+sz0KC3mIY4A81g86g9B/y0S2uf5dRUlZiusVBThekDDw1HV6+ODj8kfz4yHG1tjQ6PwGTmtXBLNDY8sClSJwiV8XDLKhz019YBjthPkHpEvjqym1LvHgEDvrf6y8xrlYJQF+kfHI5FV4bb1cHAcDzaEp6xiSjGOQ5jkFIhYFkQEKinx0qBeuWt6WQqIZ9OwDRrywyR8USK+u9ZXWN9oceBxAsS55UiWMhgUCBTiWQ6kUgne1IwjdFvoied7kFXz6gxJocjEbOCWqb55kiiSY4CpRUYU0N5WLUgolj1fxLFcKkF00MO0Qp1Aa4y3x+luBpNsSszbxAXL3xd2DA8vKLwXOEK2uyazFwhbcINCCNXkyrESAyd+Os2HhrUF9T3ihBKT2BNOys72o8JNWbJ1nGpdDKNP1Qc7SzAnJIVkOcXYI7MwQv9V0IBgYFCZjFFh4FChlMgZKYzbjoO0hmYfjaHjOIZtBxQwFEX2TRwBYGBn/6BmwPjHgqDK4P9lLh/EIkjdfOxW6HkazfDrqCwqMQeBcC0dveY8MTwDPEE8fxuCt9nVahSlq7MMPmjVXsO7Fml3O6YTXlza/aVVXtyODyWjaveCBanETFE9v96CAbkY0MnM38msVNq2XIylYsDuxDzRYxV/a9AyvmrvOzfbgEE+9mEz03ibp88sat+crJ+Vw8G8/dgifwe/ecBljh3rZicXLELXpjjd8bp6pgtotuRJ7CYPp3zO+OIFULrZ57mQ1g6d2a2LpwjaqrEtmByObFgTR3QhKpTpcjOJdkYxZWOoHdik5lL8lt7z8Hr5FLmEoRGsIckuRxCYmJMH/p6q3lhDoG1tTmXQYT9Amv15zIDjRlns3kBfYNTnglAzxw8bnVg9ZP1HNc3J13o40xcl0azAWM/DcZ9nJlz49VHQzqmAxs0mi6k6JsT9vs4jtiq9fprP9d79Niy/XrPX26k6Zy/Cvxm/iadN7Jx7ctqXBGXw1W9Rbj8/3Vyo07+C2RpReB4nGNgZGBgAOIqIf++eH6brwzczC+AAlGcj/c1wOj/3/5/Y/7M/AmokoOBCUgyAAB1gw7qeJxjYGRgYH7BwAAi/3/7/5X5MwMjAyrwBwCeXwcHAAB4nGNgYGBgfkFv/P8bbc3+/42BDgAAcwY2hwAAeJxjYAACCYYghiyGFoYLjCKMIYw9jPsYrzAxMHkw5TD1MYswpzHXMe9jUWHpYnnG8odVjDWJdRnrDzYBNg22C+xM7CHsBeyH2C+wP+Jg4YjiqOCYwvGNk4tThjOJcw/nFc5/XDxcUlwaXGZcXlxXuONIhwACDyNkeJxjYGRgYPBnyGHgYQABJiDmAkIGhv9gPgMAHD8B3gB4nH2QvU7DMBSFT/qHaAWqBGJgMgsLUvqz0bVSs3foniZ2miqNg+NW6s5z8AQ8R5+Dp2DmxHgpErUl57vfPfcOATDECQGaE+DGvc1p4YrVL7dJ95475CfPXQwQeu7Rv3ru4wULzwPc4Y0bgs41zSPePbdwiw/PbfpPzx3yyXMXD/jy3KP/9tzHKhh6HuA5UHEWmTydF3Fd58lSZvsiNmfurFhJU+e6FJNwfOYjWUoTW5mK9VHUh2xqrRLK6J1Y6NLKotCiMnorExturK1mo5HyPkz0DjEyRDDIkWKOgnXNmyPBEpK9vXPmQu7/zoobjGONEgIT/vfxhXzEfOlmYlh+U86sceRb48CpKa2FYq2Y0diRFm53ky54NU3leluahD7Exk1VmGHEq/7kQ6a46QfFq20TAHicbZJnb9swFEV9YslR7KRx0zbdew+1Tffee6V/gaFomYhMCiRlO/n1ZeM0QIC+Lzzv4fK+C4Ktudasuq3/1zpztElI6TBPxgJdeiyyxAGW6XOQFQ5xmCOscpRjHOcEJznFac5wlnOc5wIXucRlrnCVa1znBje5Rc5t7nCXNe5xnwc85BGPecJTnvGcF7zkFa95w1ve8Z4PfOQTn/nCV77xnR/85Bfr/G71RFk6VYqgrekI5+zEt4WXHSmMVFUqh8KFvhwqublhp/kOqGJ1b6BNoYJyI21EUCt748bsKhelrazLax0b14lNMzLzs8N3pTXBCRlUkUhbb6XSWe/bsglJIYJICuVlpqa1iDuKBbWlcl8JP+ztUb7WjtwZ6CpGSAfa+ZCUTtdp6WxTL+3LlsQLIanUIHQqbWKy+cqKQpsyG4mpHultlYyUabKo3unSCI1PjJqGxFijesaGXFSVnagiraOXatfapLUe25DUVeOz2qmxto3vu+hr840mBGtyOxgs7x+Y1OlyGBIvxqrrR9EzL+zE7OLfhL0Z7siyGTd1EuIbZo2Zpe/+g3wNQYlDEdBYDBM8koohm2wwjV+lYERDzRYDthm3Wn8ABT67hQAA") format("woff"),url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwR1NVQm1rbjkAAAE4AAAEwk9TLzJWVlKaAAAF/AAAAFZjbWFwj599ewAAB5AAAAXUZ2x5ZjNvaocAAA4EAAAWvGhlYWR2z8SBAAAA4AAAADZoaGVhB9MELQAAALwAAAAkaG10eM8K/+IAAAZUAAABPGxvY2EmcyvAAAANZAAAAKBtYXhwAWUAeAAAARgAAAAgbmFtZfJE4loAACTAAAACUnBvc3QDfOWrAAAnFAAAArcAAQAAA+gAAAAAA+j/9v/1A/MAAQAAAAAAAAAAAAAAAAAAAE8AAQAAAAEAAHoS5IZfDzz1AAsD6AAAAVoJ476AAAABWgnjvoD/9v/2A/MD8gAAAAgAAgAAAAAAAAABAAAATwBsAAwAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQRWAA8AJABaAHYAzAECAWgBiAG8AigDPgN6A5QD2APuBDYAAwAIACAALgABAAsANwA3ADgAOQA3ADYAOgA7ADwAPQACAAYAOAA4ADwAPgA/AAMAAwA/AEAAAgAGABIAGQAFADgAPABJAEoAGAAEADgAOwBKAAMACAAqAEoAKwAQADYARwA7ADwARgBEAEkAOgA6ADwAPQBGADwATABMACwADwA2AEcAOwA8AEYARABJADoAOgA8AD0ARgA8AD0ALQAFADsANwBCADoAAwAIABwALgAUAAkASwA5AEYAPwBBADYAPwBCABIACABFAEoANgA9AEcAOQBHABUAAwBLADkABAAKADAASABcACIAEgA4ADkAOQBGADsAPQBHADkAOgA5ADgASAA7AD0ANgA6ADkAMQALADgAOQA5AEYAQABBADwAPwA5AEcALwAJADgAOQA5AEYAPABKADkAPQAzAAQAOwBAAEMAAQAEABoADQA9AEcAOQA6ADkAOABIADsAPQA2ADoAOQADAAgAIAAqACUACwA8ADoARgA2AEEAQQA8AD4AOQBHACMABAA5AEUAOgAkAAQAPAA9ADkABQAMACQAOgBQAGIAMQALAEgANgBBAEEARgA4ADsANwBCADoALwAKAEgANgBBAEEARgBHADwAPgA9ADAACgBIADYAQQBBAEYAQQA5AEwAOgAyAAgASAA2AEEAQQBGAEkASgAuAAQANgBOADkADAAaAEgAbgCQAKoAwADQAN4A7AD4AQQBDgAHABYAQgA5AEAAQwBEADwARQBGADsAPQBHADkAOgA5ADgASAA7AD0ANgA6ADkACAASAEIAOQBAAEMARAA8AEUARgBJAD0AQABCADkAQABDADkARwAGABAAQgA5AEAAQwBEADwARQBGAEAAQgA5AEAAQwA5AEcACQAMADwAQQA8ADgARgBKADsAQABDADkAOAAMAAoAPAA9ADoAOAA2AEAAOgA5AEcACwAHADwAQQBJAEgAPQA/AAoABgA8AEEASQBIAD0ABAAGADYAPQBAADkAQQAFAAUAQgA2ADgAOgAOAAUAOAA8AD8APwANAAQAPABKAEsADwADAEkAOgAEAAoAGgAoADIAHgAHADwANgBHADsAPQA3AB0ABgA7AD0AQwA5AEcAGwAEADYAPwA6ABwABAA5AEwAOgACAAYAEAAQAAQANgA6ADYAEQAEADkAPwBAAAQACgAcAC4AOgAfAAgANgBFADsASAA7AE0AOQAhAAgAOwA9ADsASAA7AE0AOQAiAAUAOwA9AEkAPwAgAAQAOQA9AEkAAQAEADUACAA9AEEAOwA9AEMAOQBHAAUADAAeACoANgBAACoACAA4ADkATgA7ADwASQA/ACYABQA2AD8AOgA5ACgABQA7AE4APAA6ACkABABBAEkAPwAnAAMAOwA9AAIABgAUABYABgA7AEEAOgA5ADgAFwAFADsAOAA/ADoAAQAPADYANwA4ADkAOgA7AD0APwBAAEEARwBIAEkASgBMAAAAAQKfAZAABQAAAnoCvAAAAIwCegK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABAAC3xNgPoAAAAWgPyAAoAAAABAAAAAAAAAAAAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6P/2A+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPo//YD6P/2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAADAAAALAAAAAQAAAIQAAEAAAAAAQoAAwABAAAALAADAAoAAAIQAAQA3gAAAAwACAACAAQALQBpAHAAevE2//8AAAAtAGEAawBy8QH//wAAAAAAAAAAAAAAAQAMAAwAHAAmADYAAABGADYARABAAEcAOQBMADcAQgA7AEMAQQBIAD0APABKADgAPwA6AEkATgA+AEUASwBNAAEAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFQAWABcAGAAZABoAGwAcAB0AHgAfACAAIQAiACMAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwAxACIALwA0AAABBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADZEQEc5TDdCOwBDQUg9PEoAOD86SU4+RUtNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAPEAAAAAAAAAE8AAAAtAAAALQAAAEYAAABhAAAAYQAAADYAAABiAAAAYgAAAEQAAABjAAAAYwAAAEAAAABkAAAAZAAAAEcAAABlAAAAZQAAADkAAABmAAAAZgAAAEwAAABnAAAAZwAAADcAAABoAAAAaAAAAEIAAABpAAAAaQAAADsAAABrAAAAawAAAEMAAABsAAAAbAAAAEEAAABtAAAAbQAAAEgAAABuAAAAbgAAAD0AAABvAAAAbwAAADwAAABwAAAAcAAAAEoAAAByAAAAcgAAADgAAABzAAAAcwAAAD8AAAB0AAAAdAAAADoAAAB1AAAAdQAAAEkAAAB2AAAAdgAAAE4AAAB3AAAAdwAAAD4AAAB4AAAAeAAAAEUAAAB5AAAAeQAAAEsAAAB6AAAAegAAAE0AAPEBAADxAQAAAAEAAPECAADxAgAAAAIAAPEDAADxAwAAAAMAAPEEAADxBAAAAAQAAPEFAADxBQAAAAUAAPEGAADxBgAAAAYAAPEHAADxBwAAAAcAAPEIAADxCAAAAAgAAPEJAADxCQAAAAkAAPEKAADxCgAAAAoAAPELAADxCwAAAAsAAPEMAADxDAAAAAwAAPENAADxDQAAAA0AAPEOAADxDgAAAA4AAPEPAADxDwAAAA8AAPEQAADxEAAAABAAAPERAADxEQAAABEAAPESAADxEgAAABIAAPETAADxEwAAABMAAPEUAADxFAAAABUAAPEVAADxFQAAABYAAPEWAADxFgAAABcAAPEXAADxFwAAABgAAPEYAADxGAAAABkAAPEZAADxGQAAABoAAPEaAADxGgAAABsAAPEbAADxGwAAABwAAPEcAADxHAAAAB0AAPEdAADxHQAAAB4AAPEeAADxHgAAAB8AAPEfAADxHwAAACAAAPEgAADxIAAAACEAAPEhAADxIQAAACIAAPEiAADxIgAAACMAAPEjAADxIwAAACQAAPEkAADxJAAAACUAAPElAADxJQAAACYAAPEmAADxJgAAACcAAPEnAADxJwAAACgAAPEoAADxKAAAACkAAPEpAADxKQAAACoAAPEqAADxKgAAACsAAPErAADxKwAAACwAAPEsAADxLAAAAC0AAPEtAADxLQAAAC4AAPEuAADxLgAAAC8AAPEvAADxLwAAADAAAPEwAADxMAAAADEAAPExAADxMQAAADIAAPEyAADxMgAAADMAAPEzAADxMwAAADEAAPE0AADxNAAAACIAAPE1AADxNQAAAC8AAPE2AADxNgAAADQAAAAAABgAUgBqAIQA0AEUAVQBjAG+AdQCAAJIAmwCjgMUA2YDfgO+BCQEigTmBPwFFgViBaYF+AYQBigG0AcCB1QHcAfCB9AH4ggECFoIeAiUCPYJCgkcCWIJvAnUCf4KDAoaCigKNgpKCtQLXgteC14LXgteC14LXgteC14LXgteC14LXgteC14LXgteC14LXgteC14LXgteC14LXgteAAEAAAAAAzYDawAJAAABIRcHIRUhEwMhAzb+m3h4AWX9fNbWAoQCxNDQpwF3AXcAAAEAAAAAA+gD6AAgAAABNQcnNxcHJxEhJzcXByc3IRE3FwcnNxcRIRcHJzcXByEBwk9HyMhGUAEDT0bIyEZP/v1QRsjIR0/+/k9HyMhHTwECAyAJT0bIyEZP/v1QRsjIR0/+/k9HyMhHTwECUEbIyEZQAAAAAQAAAAADVgOMAAgAAAEHJwkBBycRIwGkrWUBYgFiZayhAnOtZAFi/p5krP3qAAAAAQAAAAAC7gLuAAsAAAEHJwcnNyc3FzcXBwLuRrSzR7S0R7O0RrMBQUe0tEeztEazs0a0AAUAAP/+A+gD6QATACMAJwArAC8AAAUhIi4BNRE0PgEzITIeARURFA4BAyEiBhURFBYzITI2NRE0JgEzESMlMxUjAzMRIwNq/RQiOiIiOiIC7CI6ISE6If0QEBgYEALwERcX/ahTUwFNU1OnVFQCIjkiAvEiOSIiOSL9DyI5IgOWFxH9EREYGBEC7xEX/rP+3aamAaD+YAAAAwAA//4D6APqABMAIwApAAABMh4BFREUDgEjISIuATURND4BMwUhIgYVERQWMyEyNjURNCYHASc3FxMDaiI6ISE6Iv0UIjoiIjoiAu39EBAYGBAC8BEXF2n+7vc0qeID6SI5Iv0PIjkiIjkiAvEiOSJVFxH9EREYGBEC7xEXuv4KxkGIAZ8AAAMAAP/+A+gD6gATACMAJwAAATIeARURFA4BIyEiLgE1ETQ+ATMFISIGFREUFjMhMjY1ETQmAyE1IQNqIjohIToi/RQiOiIiOiIC7f0QEBgYEALwERcX4f6yAU4D6SI5Iv0PIjkiIjkiAvEiOSJVFxH9EREYGBEC7xEX/g2mAAAAAgAA//4D6APqABMAIwAAATIeARURFA4BIyEiLgE1ETQ+ATMFISIGFREUFjMhMjY1ETQmA2oiOiEhOiL9FCI6IiI6IgLt/RAQGBgQAvARFxcD6SI5Iv0PIjkiIjkiAvEiOSJVFxH9EREYGBEC7xEXAAMAAAAAA3gDZAAFAAgAGAAACQEHFwkBAzcfAQYHBgcGFRQWMjY1NCcmJwLr/l86Y/79AT7IyMewCwsZDxYxRTEWDxkBwgGhO2P+/f7DAT3IyD4NDR4bJhkiMTEiGSUcHgAAAAACAAAAAAGhA5UAAwAHAAABESERJRUhNQGh/rIBTv6yApv9uAJI+qenAAAAAAYAAAAAA5UDlQADAAcACwAPABMAFwAAJRUhNSEVITUDFSE1IRUhNQMVITUhFSE1AaH+sgNC/rKm/rIDQv6ypv6yA0L+svqnp6enAU2mpqamAU6np6enAAADAAAAAAPpA+kAEwAjAC8AAAEyHgEVERQOASMhIi4BNRE0PgEzBSEiBhURFBYzITI2NRE0JgEzFSMVIzUjNTM1MwNrIjoiIjoi/RMiOiEhOiIC7v0QERgYEQLwERcX/sunp6enp6cD6SI5Iv0SIjkiIjkiAu4iOSJVFxH9ExEXFxEC7REX/rSmpqampwAAAAADAAAAAANCA0IABwALABEAAAEzESE1IxEhFyERIQM1IREzNQKbpv4MpgH0U/6zAU2n/rNTApv+DKYB9Pr+swGhU/6z+gAAAAABAAAAAAN9A30ACwAACQEXCQEHCQEnCQE3AfQBEnb+7gESdv7u/u52ARL+7nYCagESdv7u/u52ARL+7nYBEgESdgAAAAMAAAAAA4oDEAAyAEIAUgAAATY3Njc2NzYXFh8BBgcGBxYfAQYHBicmJyYnBgcGJicmNzY3LgEnJjc+ARcWFxYfARYXBwYHDgEWNzY3Njc2PwE0IyciBwYHBhceARc3JyYnJiMCDQIEQR8zJi0jHRs2MF5JJU2XGCgeJiUpLTpQgHMpYhocEBdeKj8LDA8QPC8sMh46JB8glyQsKDkCKRgcESMVCwIEigoIBgUcGxlpJwEWKxQiFQJrAQM3GCcTFwEBDyEnUD8fPHsSGQgLCAkhKj1gMhIUISU0RywXQiImISMhAQIcESsbFhiNAhQTMyMBAREJGhAHGRndAwIDER4aLAEyEB4LEwAAAAAHAAAAAAO4A4QADAAQABkAHQAmACoAMwAAEyIOARUUFjI2NTQuASkBFSEBIgYUFjI2NCYhFSE1BzIWFAYiJjQ2ARUhNSMyFhQGIiY0NpkcMBw9Vj0cMAMC/WYCmvziKz09Vj09AvP9ZoQeKys8KysDPP1mhCs9PVY9PQE1HDAcKz09KxwwHNEB+D1WPT1WPdDQHys8Kys8KwFH0dE9Vz09Vz0AAAEAAAAAA1YDiAAIAAABETMRNxcJATcBpaCsZf6e/p5lAXkCDv30rGX+nwFhZQAAAAMAAP/+A+gD6gATACMAJwAAATIeARURFA4BIyEiLgE1ETQ+ATMFISIGFREUFjMhMjY1ETQmAxUhNQNqIjohIToi/RQiOiIiOiIC7f0QEBgYEALwERcXjv4MA+kiOSL9DyI5IiI5IgLxIjkiVRcR/RERGBgRAu8RF/6zpqYAAAAAAwAAAAADxwM3ABkAMQA8AAABNxc2MxYXFhcOAQcXByc3ATY/ATUjIgcGBycTLgInBgceARcWNxcGJyYnJicmJzY3ATY3JyYnJicOAQcBITQmP0KHe3FYKW0+NUEgDv7SLksnCj4rOC1/5jZcPApENDGMTlNRMl1aYVY+OS8yWnUB2FBGDhIWHiELOywDDigwEgRSS4M9aCZEMygLAX8KAgFTBQYOG/7dBjhYNTJIRGMWGAtAHAoJNCU+MkqGTP6ZMV4TFxcfGjNUGwAAAwAAAAADxwM3ABkAMQA8AAABNxc2MxYXFhcOAQcXByc3ATY/ATUjIgcGBycTLgInBgceARcWNxcGJyYnJicmJzY3ATY3JyYnJicOAQcBITQmP0KHe3FYKW0+NUEgDv7SLksnCj4rOC1/5jZcPApENDGMTlNRMl1aYVY+OS8yWnUB2FBGDhIWHiELOywDDigwEgRSS4M9aCZEMygLAX8KAgFTBQYOG/7dBjhYNTJIRGMWGAtAHAoJNCU+MkqGTP6ZMV4TFxcfGjNUGwAAAwAAAAADxwMXABEAKAA2AAABFhcWFwYHBgcGJyYnJic2NzYHBgcWFxYXFjc2NycmJyYnDgIiLgEnJSY9ASMGBwYHFzY3NjcB/Id7cVhPdnyCj3w+OS8yWXOBcEQ0QF5iaHBgVkoOEhYeIQxGaHdpRwoBSgEKTzZHNiUoNiY8AxUDU0uCdk1PDAxKJj0yS4RLVaoySFg3OAYGNzJkExcWIBk4WzQ2XjoDDRwqAQgLGksUCAcCAAAAAAIAAAAAA5UDawAFAAkAABMhAREnNTEVMzVTA0L+sqamA2v+s/5fp/pUVAAAAgAAAAAC/ALuAAMACQAAAREjEQEnNycHFwE/UwIQw8M4+voC7v4MAfT+RMLCOPr6AAAAAAwAAAAAA0IDvwADAAcACwAPABMAFwAbAB8AIwAnACsALwAANzMVIzczFSM3MxUjATMVIzczFSM3MxUjATMVIzczFSM3MxUjATMVIzczFSMhIzUzp6am+qam+qam/gympvqmpvqmpv4Mpqb6pqb6pqb+DKam+qamAaCmptCmpqampgGgpqampqYBoKampqamAaCmpqamAAAABQAAAAADlQO/AB0AIQAlACkALQAAATM1IRUhNSMVIxUhNSEVITUhFSE1IRUhNSERIzUhASMVMxEjFTMRIxUzJSMVMwGhpgFO/rKmpwFNAU7+sv6zAU0BTv6y/mBUAU4BoKampqampv4MpqYDa1P6VFSmU/pT+lT6UwJH+v0SUwGhVAGhU1NTAAMAAAAAA9ACwwAQACIAMAAAARYXFh8BDgEHBicmLwE2NzYFDgEiJicGDwEWFxY3Nj8BJicHJj0BIwYHBgcXNjc2NwH8em9yViNc7H6AdXtfI2R6gAFnG3+efxtCNQNfgn9/g2EDNkSVAQpPNkc2JSg2JjwCwgIsLVMjWmgIBykrWiNjNjiER1lZRx0tA1EeHBscUgIvHiMOHCkBCAoaTBQJBgIAAgAAAAAC/ALuAAMACQAAJSMRMwE3JzcXBwL8U1P98MPDOPr6+gH0/kTCwjj6+gAAAQAAAAADoANWAAgAAAEXBwkBFwchFQFmqWT+ngFiZKoCOgGgqWUBYgFiZaqnAAAAAv/2//YD8wPyADQAawAAARYXFgYPAQYHBicuAScmNzY/ATYyFhcWFxYGDwEOAR4CNj8BPgEmJy4BNTEmPwE+ARcWFwEmJyYHBg8BDgEXFhcWFzMWNj8BNic0JzEmJy4BNj8BPgEeAgYPAQ4BFxYXHgEyPwE2NzYnJgJ+ORQUKDiEOU5LTE1yFBQUFDlIChkSAQIRAgQGGRsUEjVJSRuDHBITGwkYAhkpCBYKFhIBEzlNTEtOOYQ4KBQUORIVAQoWCCoYAg0LCRsTExuDG0lJNRIUGxkGBAMQAgESGQpIORQUFBQCfjlOS5k4hDkUFBQUck1MS045SAkQDjUyCBIGGhtISTYUExuEG0hIGwkRECIYKQgCBhASARM5FBQUFDmEOJlLTjkSDwcCCCkYIhAJBwobSEgbhBsTFDZJSBsaBhIIMjUOEAlIOU5LTE0AAAAAAgAAAAADlQOVABcAHwAAATcXBzMVIxcHJxUjNQcnNyM1Myc3FzUzAzM3NScjBxUCR5l2mdjYmXaZppl2mdjYmXaZppiKYmKKYgK9mXaZppl2mdjYmXaZppl2mdj9uGKKYmKKAAQAAP/+A+gD6QATACMAKgAxAAAFISIuATURND4BMyEyHgEVERQOAQMhIgYVERQWMyEyNjURNCYBBzcXNxcHATcHFwcXNwNq/RQiOiIiOiIC7CI6ISE6If0QEBgYEALwERcX/e3fRzGbOJwB3UfgMZ04nQIiOSIC8SI5IiI5Iv0PIjkiA5YXEf0RERgYEQLvERf9PkfeMJw4nAF94EcxnDicAAAAAwAAAAADlQOVAAMABwALAAAlFSE1ARUhNQEVITUDlfy+A0L8vgNC/L76p6cBTaamAU6npwAAAAAEAAD//gPoA+kAEwAjACoAMQAABSEiLgE1ETQ+ATMhMh4BFREUDgEDISIGFREUFjMhMjY1ETQmATcHJwcnNwEHNyc3JwcDav0UIjoiIjoiAuwiOiEhOiH9EBAYGBAC8BEXF/173kcwnDebATRH3zCcOJwCIjkiAvEiOSIiOSL9DyI5IgOWFxH9EREYGBEC7xEX/fpH3jCcOJwBk99HMZw3nAAAAAEAAAAAA0ICSAADAAATIRUhpwKa/WYCR6YAAAABAAAAAAKNAu4ABQAAATcnNxcHAVvDwzj6+gEywsI4+voAAAABAAAAAAMbA9MADQAAAQcnCQEHJxE3FwkBNxcBm2llAScBJ2VpaWX+2f7ZZWkCsWplASf+2WVq/oZqZf7ZASdlagAAAAMAAP//A+gD6gAUACQAMwAAATIXFhcWEAcGBwYgJyYnJhA3Njc2BQEWFxYzMjc2NzY1NCcmLwEmJyYjIgcGBwYVFhcWFwH0iHRxQkVFQnF0/vF1cUJEREJxdQHQ/bc2QUJHcWFfNzkXFypINkFDR3FhXjg5ARcXKgPqRUJxdf7wdXJCRERCcnUBEHVxQkX1/bcqFxc5N15icUdCQDZJKhcXOTdeYXFIQkE2AAACAAAAAANCA2sABwAPAAABMxEhETM1MxcjFSE1IxEhAkf6/Wb6pqdT/rJTAfQDGP1lAptTp6am/gwAAAABAAAAAANCA0IADgAAASMRFyMHJyM3NTM1IzUhAu5TpvpTU/qmVKcB9ALu/rNU+vpUU/pTAAAAAAUAAP/+A+gD6QATACEAKAA4AD8AAAUhIi4BNRE0PgEzITIeARURFA4BATUjIgYVERQWOwERIzUFIREhMjY1AwcnNxcHJxUjFwcnNxcHMxMhFSE1NCYDav0UIjoiIjoiAuwiOiEhOv1ufxAYGBB/pwNA/boCHhEX+Aw8cXE7DL8MO3FxOwxs0P3iAkYXAiI5IgLxIjkiIjki/Q8iOSIC8KYXEf0RERgCR1NT/bkYEQE8DDtxcTsMvww7cXE7DQJHpn4RFwABAAAAAANCA0IACwAAEzM1MxUzFSMVIzUjp/qm+vqm+gJH+vqm+voAAQAAAAACjQLuAAUAAAEnNycHFwKNw8M4+voBMsLCOPr6AAAAAgAA//8D6APqABQAKQAAASIHBgcGEBcWFxYgNzY3NhAnJicmBzIXFhcWFAcGBwYiJyYnJjQ3Njc2AfSHdXFCRERCcXUBD3RxQkVFQnF0iHFhXzc5OTdfYeJhXjg4ODheYQPqRUJxdf7wdXJCRERCcnUBEHVxQkVVOTdeYeJiXjc5OTdeYuJhXjc5AAADAAD//wPoA+oAFAApADYAAAEyFxYXFhAHBgcGICcmJyYQNzY3NhciBwYHBhYXFhcWMjc2NzY0JyYnJhMUDgEiLgE0PgEyHgEB9Ih0cUJFRUJxdP7xdXFCRERCcXWHcWFeODkBODheYeJhXzc5OTdfYYlDc4hzQ0NziHNDA+pFQnF1/vB1ckJEREJydQEQdXFCRVU5N15h4mJeNzk5N15i4mFeNzn+YERzQ0NziHNDQ3MAAAABAAAAAAOfA1YACAAAASc3CQEnNyE1AoOrZQFh/p9lqf3JAkeqZf6e/p5lqacAAAACAAAAAANsA2sADQAWAAABESERIxEUFjMhMjY1EQU3FwcnNxcRMwMY/bhTMSICSCIx/rNsOtDQOmxUAfT+3AEk/twiMTEiASQcbDvQ0DtsAZMAAAABAAAAAANCApsAAgAAEyEBpwKa/rMCm/6yAAAAAQAAAAACmwNCAAIAAAkBEQFNAU4B9AFN/WYAAAEAAAAAApsDQgACAAAJAgFNAU7+sgNB/rP+swABAAAAAANCApsAAgAAEwkBpwFNAU0BTQFO/rIAAQAAAAADpgNHAAUAAAkCNxcBA6b90f7Ldr8BuQLR/dEBNXW/AbkAAAP/9v/2A/MD8gAjAEcAVwAAJRYUDwEGBwYnLgEnJjc2PwE2Mh8BFhQPAQ4BHgI2PwE2MhcDFjI/AT4BHgIGDwEGFB8BFjI/ATY3NicuAScmBwYPAQYUFwE3NjQnASYiDwEGFBcBFjICUgcHVzlOS0xNchQUFBQ5VwcTB04GBlgbExM2SUgbVwcUByIHFAdXG0hJNhMTG1gGBk4HEwdXORQUFBRyTUxLTjlXBwcCGCwODvyiDiYOLA4OA14OJs8HEwdXORQUFBRyTUxLTjlXBwdNBxQHVxtISTYTExtYBgYBrgYGWBsTEzZJSBtXBxQHTQcHVzlOS0xNchQUFBQ5VwcTB/z1LA4mDgNeDg4sDicN/KIOAAP/9v/2A/MD8gAjAEcAVwAAJRYUDwEGBwYnLgEnJjc2PwE2Mh8BFhQPAQ4BHgI2PwE2MhcDFjI/AT4BHgIGDwEGFB8BFjI/ATY3NicuAScmBwYPAQYUFwE3NjQnASYiDwEGFBcBFjICUgcHVzlOS0xNchQUFBQ5VwcTB04GBlgbExM2SUgbVwcUByIHFAdXG0hJNhMTG1gGBk4HEwdXORQUFBRyTUxLTjlXBwcCGCwODvyiDiYOLA4OA14OJs8HEwdXORQUFBRyTUxLTjlXBwdNBxQHVxtISTYTExtYBgYBrgYGWBsTEzZJSBtXBxQHTQcHVzlOS0xNchQUFBQ5VwcTB/z1LA4mDgNeDg4sDicN/KIOAAAAEADGAAEAAAAAAAEADQAAAAEAAAAAAAIABwANAAEAAAAAAAMADQAUAAEAAAAAAAQADQAhAAEAAAAAAAUACwAuAAEAAAAAAAYADQA5AAEAAAAAAAoAKwBGAAEAAAAAAAsAEwBxAAMAAQQJAAEAGgCEAAMAAQQJAAIADgCeAAMAAQQJAAMAGgCsAAMAAQQJAAQAGgDGAAMAAQQJAAUAFgDgAAMAAQQJAAYAGgD2AAMAAQQJAAoAVgEQAAMAAQQJAAsAJgFmYWdHcmlkQ2xhc3NpY1JlZ3VsYXJhZ0dyaWRDbGFzc2ljYWdHcmlkQ2xhc3NpY1ZlcnNpb24gMS4wYWdHcmlkQ2xhc3NpY0dlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAGEAZwBHAHIAaQBkAEMAbABhAHMAcwBpAGMAUgBlAGcAdQBsAGEAcgBhAGcARwByAGkAZABDAGwAYQBzAHMAaQBjAGEAZwBHAHIAaQBkAEMAbABhAHMAcwBpAGMAVgBlAHIAcwBpAG8AbgAgADEALgAwAGEAZwBHAHIAaQBkAEMAbABhAHMAcwBpAGMARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4BDwEQAREBEgETARQBFQEWARcBGAEZARoBGwEcAR0BHgEfASABIQEiASMBJAElASYBJwEoASkBKgErASwBLQEuAS8BMAExATIBMwE0ATUBNgE3ATgBOQE6ATsBPAE9AT4BPwFAAUEBQgFDAUQBRQFGAUcBSAFJAUoBSwFMAU0BTgFPAVAAC2FnZ3JlZ2F0aW9uBmFycm93cwNhc2MGY2FuY2VsBWNoYXJ0EGNoZWNrYm94LWNoZWNrZWQWY2hlY2tib3gtaW5kZXRlcm1pbmF0ZRJjaGVja2JveC11bmNoZWNrZWQMY29sb3ItcGlja2VyBmNvbHVtbgdjb2x1bW5zCmNvbnRyYWN0ZWQEY29weQVjcm9zcwNjdXQEZGF0YQRkZXNjCGV4cGFuZGVkCWV5ZS1zbGFzaAtleWUtc2xhc2gtMQNleWUGZmlsdGVyBWZpcnN0BGdyaXAFZ3JvdXANaW5kZXRlcm1pbmF0ZQRsYXN0BGxlZnQGbGlua2VkB2xvYWRpbmcIbWF4aW1pemUEbWVudQhtaW5pbWl6ZQVtaW51cwRuZXh0BG5vbmULbm90LWFsbG93ZWQFcGFzdGUDcGluBXBpdm90BHBsdXMIcHJldmlvdXMQcmFkaW8tYnV0dG9uLW9mZg9yYWRpby1idXR0b24tb24FcmlnaHQEc2F2ZQpzbWFsbC1kb3duCnNtYWxsLWxlZnQLc21hbGwtcmlnaHQIc21hbGwtdXAEdGljawh1bmxpbmtlZAp1bmxpbmtlZC0xAWEBZwFyAWUBdAFpAW8BbgF3AXMBYwFsAWgBawFiAXgBLQFkAW0BdQFwAXkBZgF6AXYAAAA=") format("truetype");font-weight:400;font-style:normal}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)}']}),bt("design:paramtypes",[Mo,e.ElementRef,Fe,e.ChangeDetectorRef])],o)}(Ot),Bo=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(){},At([e.Input(),bt("design:type",No),bt("design:paramtypes",[No])],t.prototype,"grid",null),t=At([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.
|
|
@@ -177,7 +177,7 @@ var Ro=function(){function t(t){this.gridApi=t}return Object.defineProperty(t.pr
|
|
|
177
177
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
178
178
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
179
179
|
*/
|
|
180
|
-
|
|
180
|
+
Po=t.RowSelectionType||(t.RowSelectionType={})).SINGLE="single",Po.MULTI="multi",Po.ALWAYS="always",Po.NONE="none",(ko=t.ToolbarActionType||(t.ToolbarActionType={})).Add="Add",ko.Edit="Edit",ko.Delete="Delete",ko.Copy="Copy",ko.Button="Button",ko.MenuItem="MenuItem",(jo=t.ToolbarArea||(t.ToolbarArea={})).InternalArea="InternalArea",jo.PreservedArea="PreservedArea",jo.Left="Left",jo.Menu="Menu";
|
|
181
181
|
/**
|
|
182
182
|
* @license
|
|
183
183
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -185,7 +185,7 @@ Eo=t.RowSelectionType||(t.RowSelectionType={})).SINGLE="single",Eo.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 Fo,Go=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)}(),Vo=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 zo(){return{id:null,backdrop:!0,container:document.body,windowClass:"",enableClose:!0,width:null,height:null,size:t.Dimensions.SM,draggable:!1,fullScreen:!1}}var Bo,Ho=((Fo={})[t.Dimensions.SM]=["400px","200px"],Fo[t.Dimensions.MD]=["560px","280px"],Fo[t.Dimensions.LG]=["800px","350px"],Fo);(Bo=t.DialogResultStatus||(t.DialogResultStatus={})).SUCCESS="SUCCESS",Bo.DISMISSED="DISMISSED";var Uo,Ko,Wo=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=Ho[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:Wo}]},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:" ";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,Wo])],t)}(),$o=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}();(Uo=t.DatoActionType||(t.DatoActionType={})).SUCCESS="SUCCESS",Uo.DISMISSED="DISMISSED",(Ko=t.ConfirmationType||(t.ConfirmationType={})).WARNING="warning",Ko.DISRUPTIVE_WARNING="disruptive_warning";var qo=[{type:t.DatoActionType.DISMISSED,caption:"core.cancel",datoType:"secondary"},{type:t.DatoActionType.SUCCESS,caption:"core.ok",datoType:"primary"}];function Yo(){var e={title:"",content:"",actions:xt(qo),confirmationType:t.ConfirmationType.WARNING};return mt(mt({},zo()),e)}var Zo,Xo=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:Wo}]},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",[Wo])],n)}(),Jo=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 $o(o);if(this.dialogs.has(n.id))throw new Ao("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({},Yo()),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(Xo,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({},zo()),t);return e.fullScreen&&(e.width=e.height="100%"),e},t.prototype.createDialogRef=function(t){ge(t.id)||(t.id=Re());var e=new Wo;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:Wo,useValue:t}]})},t.prototype.registerEvents=function(t){var e=t.dialogElement.querySelector(".dato-dialog");if(e.style.zIndex=Ln().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:jn}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(jn))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[e.ComponentFactoryResolver,e.ApplicationRef,e.Injector,jn])],t)}(),ti=function(){},ei=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}(ti),ni=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}(ei),oi=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 ti){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 ei?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:Jo}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(Jo))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[Jo])],t)}(),ii=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 Ro,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:jn},{type:oi}]},vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],n.prototype,"actions",null),vt([e.Input(),Ct("design:type",Lo),Ct("design:paramtypes",[Lo])],n.prototype,"grid",null),vt([e.ContentChildren(Go),Ct("design:type",e.QueryList)],n.prototype,"items",void 0),vt([e.ViewChildren(Go),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,jn,oi])],n)}(),ri=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)}(),ai=function(){function t(t,e){if(this.container=t,this.host=e,this.token="",!t)throw new Ao("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:ri,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",[ri,e.ElementRef])],t)}(),si=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(ai),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)}(),li=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)}(),ci=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(si,{static:!0}),Ct("design:type",si)],t.prototype,"content",void 0),vt([e.ContentChild(li,{static:!0}),Ct("design:type",li)],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)}(),pi=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},di=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(ci),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)}(),ui=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=pi(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:ci,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef}]},vt([e.ContentChildren(ci),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(di,{static:!0}),Ct("design:type",di)],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,ci,e.ChangeDetectorRef])],t)}(),hi=[ui,si,ci,li],gi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Fe],declarations:[hi],exports:[hi]})],t)}();(
|
|
188
|
+
var Lo,Go=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},At([e.Input(),bt("design:type",Object)],t.prototype,"showWhen",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"actionType",void 0),At([e.Input(),bt("design:type",Number)],t.prototype,"order",void 0),t=At([e.Directive({selector:"[datoGridToolbarItem]"}),bt("design:paramtypes",[e.TemplateRef])],t)}(),Vo=function(){function t(t){this.element=t}return t.ctorParameters=function(){return[{type:e.ElementRef}]},t=At([e.Directive({selector:"[datoGridToolbarItemElement]"}),bt("design:paramtypes",[e.ElementRef])],t)}();function zo(){return{id:null,backdrop:!0,container:document.body,windowClass:"",enableClose:!0,width:null,height:null,size:t.Dimensions.SM,draggable:!1,fullScreen:!1}}var Qo,Ho=((Lo={})[t.Dimensions.SM]=["400px","200px"],Lo[t.Dimensions.MD]=["560px","280px"],Lo[t.Dimensions.LG]=["800px","350px"],Lo);(Qo=t.DialogResultStatus||(t.DialogResultStatus={})).SUCCESS="SUCCESS",Qo.DISMISSED="DISMISSED";var Uo,Yo,Wo=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=At([e.Injectable(),bt("design:paramtypes",[])],o)}(),Ko=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=Bt(".dato-dialog-projection",this.element.nativeElement),e=this.dialogRef.options;this.hasOverlay=e.backdrop||e.enableClose;var n=e.width,o=e.height,i=Ho[e.size];n=n||i[0],o=o||i[1],e.dataAutoId&&Vt(this.element.nativeElement,"data-auto-id",e.dataAutoId),oe(n,null,t),ie(null,o,t)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Wo}]},At([e.Input(),bt("design:type",Object)],t.prototype,"options",void 0),t=At([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:" ";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}}']}),bt("design:paramtypes",[e.ElementRef,Wo])],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}();(Uo=t.DatoActionType||(t.DatoActionType={})).SUCCESS="SUCCESS",Uo.DISMISSED="DISMISSED",(Yo=t.ConfirmationType||(t.ConfirmationType={})).WARNING="warning",Yo.DISRUPTIVE_WARNING="disruptive_warning";var Jo=[{type:t.DatoActionType.DISMISSED,caption:"core.cancel",datoType:"secondary"},{type:t.DatoActionType.SUCCESS,caption:"core.ok",datoType:"primary"}];function Xo(){var e={title:"",content:"",actions:St(Jo),confirmationType:t.ConfirmationType.WARNING};return mt(mt({},zo()),e)}var Zo,$o=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:Wo}]},At([e.HostBinding("class.disruptive"),bt("design:type",Object)],n.prototype,"isDisruptive",void 0),n=At([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}),bt("design:paramtypes",[Wo])],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 To("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({},Xo()),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($o,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({},zo()),t);return e.fullScreen&&(e.width=e.height="100%"),e},t.prototype.createDialogRef=function(t){ge(t.id)||(t.id=Re());var e=new Wo;return e.options=t,e._setData(t.data),e},t.prototype.createDialogComponent=function(t,e){var n=this.resolver.resolveComponentFactory(Ko),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:Wo,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:_n}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(_n))},token:t,providedIn:"root"}),t=At([e.Injectable({providedIn:"root"}),bt("design:paramtypes",[e.ComponentFactoryResolver,e.ApplicationRef,e.Injector,_n])],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 Tt(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=At([e.Injectable({providedIn:"root"}),bt("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 Ro,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 St(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 Tt(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 Tt(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!!Tt(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:_n},{type:ii}]},At([e.Input(),bt("design:type",Array),bt("design:paramtypes",[Array])],n.prototype,"actions",null),At([e.Input(),bt("design:type",No),bt("design:paramtypes",[No])],n.prototype,"grid",null),At([e.ContentChildren(Go),bt("design:type",e.QueryList)],n.prototype,"items",void 0),At([e.ViewChildren(Go),bt("design:type",e.QueryList)],n.prototype,"actionItems",void 0),At([e.ViewChild("container",{static:!0}),bt("design:type",e.ElementRef)],n.prototype,"container",void 0),At([e.HostListener("window:resize"),at.debounce(300),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],n.prototype,"resize",null),At([at.delay(),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],n.prototype,"fitGridSizeOnInit",null),n=At([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}"]}),bt("design:paramtypes",[e.ChangeDetectorRef,_n,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=Ct(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=Ct(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}}},At([e.Input("datoSearchTerm"),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"term",null),t=At([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 To("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}]},At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoSearchable",null),t=At([e.Directive({selector:"[datoSearchable]"}),vt(0,e.Optional()),bt("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}]},At([e.Input("tpl"),bt("design:type",e.TemplateRef)],t.prototype,"template",void 0),At([e.ContentChildren(si),bt("design:type",e.QueryList)],t.prototype,"searchables",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"expanded",null),t=At([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 "]}),bt("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}]},At([e.HostBinding("class.dato-accordion-open"),bt("design:type",Object)],t.prototype,"_expanded",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"searchable",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"expanded",null),t=At([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 "]}),bt("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}]},At([e.ContentChild(li,{static:!0}),bt("design:type",li)],t.prototype,"content",void 0),At([e.ContentChild(ci,{static:!0}),bt("design:type",ci)],t.prototype,"header",void 0),At([e.HostBinding("class.dato-accordion-disabled"),bt("design:type",Object)],t.prototype,"_disabled",void 0),At([e.HostBinding("class.force-hide"),bt("design:type",Object)],t.prototype,"_hidden",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"toggle",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"disabled",null),t=At([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}"]}),bt("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=St(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];Gt(e,"display","block");var n=e.getBoundingClientRect().height;Gt(e,"display","none"),Gt(Bt(".dato-sortable-ghost"),"height",n+"px")},At([e.ContentChildren(pi),bt("design:type",e.QueryList)],t.prototype,"accordionGroups",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoList",null),At([e.Input(),bt("design:type",Object)],t.prototype,"datoOptions",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"containerClass",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"orderUpdated",void 0),t=At([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=Ct(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=Ct(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,St(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=Ct(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;Ft(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}]},At([e.ContentChildren(pi),bt("design:type",e.QueryList)],t.prototype,"childGroups",void 0),At([e.ContentChildren(o,{descendants:!0}),bt("design:type",e.QueryList)],t.prototype,"childAccordion",void 0),At([e.ContentChild(ui,{static:!0}),bt("design:type",ui)],t.prototype,"sortable",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"closeOthers",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"expandAll",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"includeArrows",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"arrowType",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"activeIds",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"showSearchUponNoResults",void 0),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"searchTerm",null),t=o=At([e.Component({selector:"dato-accordion",template:"<ng-content></ng-content>",exportAs:"datoAccordion",styles:["\n :host {\n display: block;\n }\n "]}),vt(0,e.SkipSelf()),vt(0,e.Optional()),vt(1,e.Optional()),bt("design:paramtypes",[t,pi,e.ChangeDetectorRef])],t)}(),gi=[hi,li,pi,ci],fi=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Le],declarations:[gi],exports:[gi]})],t)}();(
|
|
189
189
|
/**
|
|
190
190
|
* @license
|
|
191
191
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -201,21 +201,21 @@ Zo=t.SelectType||(t.SelectType={})).SINGLE="single",Zo.MULTI="multi";
|
|
|
201
201
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
202
202
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
203
203
|
*/
|
|
204
|
-
function
|
|
204
|
+
function mi(){return'\n <div class="dato-checkbox"><label><p class="dato-simple"><ng-content></ng-content></p><input type="checkbox" [checked]="_active" [disabled]="_disabled"><span class="checkmark"></span></label></div>\n '}function yi(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 [class.force-hide]="hide"\n '+(t?"":'[class.dato-option--active]="active"')+'\n [class.dato-select__option--disabled]="_disabled"\n >\n '+(t?'\n <div class="dato-checkbox"><label><p class="dato-simple"><ng-content></ng-content></p><input type="checkbox" [checked]="_active" [disabled]="_disabled"><span class="checkmark"></span></label></div>\n ':"<ng-content></ng-content>")+" \n </div>\n "}
|
|
205
205
|
/**
|
|
206
206
|
* @license
|
|
207
207
|
* Copyright Datorama. All Rights Reserved.
|
|
208
208
|
*
|
|
209
209
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
210
210
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
211
|
-
*/var
|
|
211
|
+
*/var Ai,vi=function(){function t(t){this.cdr=t,this._hidden=!1}return t.prototype.ngOnInit=function(){this.cdr.detach()},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},At([e.HostBinding("class.force-hide"),bt("design:type",Object)],t.prototype,"_hidden",void 0),t=At([e.Component({selector:"dato-group",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<div class="dato-select__option dato-select__group">\n <ng-content select="[groupLabel]"></ng-content>\n</div>\n<ng-content></ng-content>',encapsulation:e.ViewEncapsulation.None}),bt("design:paramtypes",[e.ChangeDetectorRef])],t)}(),bi=function(){function t(t,e,o){this.cdr=t,this.host=e,this.group=o,this._disabled=!1,this._activeByKeyboard=!1,this._active=!1,this._hide=!1,this._permanentDisabled=!1,this.click$=n.fromEvent(this.element,"click")}return Object.defineProperty(t.prototype,"option",{get:function(){return this._option},set:function(t){t!==this._option&&(this._option=t,this.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._permanentDisabled=!!t,t!==this._disabled&&(this._disabled=t,this.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},set:function(t){t!==this._active&&(this._active=t,this.detectChanges(),Ut(this.element,"select-option-active",this._active))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hide",{get:function(){return this._hide},set:function(t){t!==this._hide&&(this._hide=t,this.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeByKeyboard",{get:function(){return this._activeByKeyboard},set:function(t){this._activeByKeyboard=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.cdr.detach()},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.detectChanges=function(){this.cdr.destroyed||this.cdr.detectChanges()},t.prototype.hideAndDisabled=function(t){var e=!1;this._permanentDisabled||t===this._disabled||(e=!0,this._disabled=t),t!==this._hide&&(e=!0,this._hide=t),e&&this.detectChanges()},t.prototype.getLabel=function(){return""},t.prototype.setActiveStyles=function(){this.activeByKeyboard=!0},t.prototype.setInactiveStyles=function(){this.activeByKeyboard=!1},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:vi,decorators:[{type:e.Optional}]}]},At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"option",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"disabled",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"active",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"hide",null),At([e.HostBinding("class.dato-option--keyboard-active"),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"activeByKeyboard",null),t=At([e.Component({selector:"dato-option:not([multi])",changeDetection:e.ChangeDetectionStrategy.OnPush,template:yi()}),vt(2,e.Optional()),bt("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,vi])],t)}(),Ci=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},At([e.Input("datoActive"),bt("design:type",Object)],t.prototype,"active",void 0),t=At([e.Directive({selector:"[datoActive]"}),bt("design:paramtypes",[e.TemplateRef])],t)}(),wi={sm:30,md:35,lg:35};
|
|
212
212
|
/**
|
|
213
213
|
* @license
|
|
214
214
|
* Copyright Datorama. All Rights Reserved.
|
|
215
215
|
*
|
|
216
216
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
217
217
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
218
|
-
*/function Si(t){var e,n,o,i,r,a=t.size,s=t.panel,l=t.options,c=t.groups,p=t.activeItemIndex,d=function(t,e,n){if(n.length){for(var o=e.toArray(),i=n.toArray(),r=0,a=0;a<t+1;a++)o[a].group&&o[a].group===i[r]&&r++;return r}return 0}(p,l,c);s.scrollTop=(e=p+d,n=function(t){return wi[t]}(a),o=s?s.scrollTop:0,i=120,(r=e*n)<o?r:r+n>o+i?Math.max(0,r-i+n):o)}function xi(t,e,n){var o,i;if(!t||!n)return t;var r={};try{for(var a=
|
|
218
|
+
*/function Si(t){var e,n,o,i,r,a=t.size,s=t.panel,l=t.options,c=t.groups,p=t.activeItemIndex,d=function(t,e,n){if(n.length){for(var o=e.toArray(),i=n.toArray(),r=0,a=0;a<t+1;a++)o[a].group&&o[a].group===i[r]&&r++;return r}return 0}(p,l,c);s.scrollTop=(e=p+d,n=function(t){return wi[t]}(a),o=s?s.scrollTop:0,i=120,(r=e*n)<o?r:r+n>o+i?Math.max(0,r-i+n):o)}function xi(t,e,n){var o,i;if(!t||!n)return t;var r={};try{for(var a=Ct(t),s=a.next();!s.done;s=a.next()){var l=s.value,c=l[n]&&l[n].toString();Ft(c)||(r[c]?r[c].children.push(l):(r[c]={children:[l]},r[c][e]=c))}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return Ce(r)}
|
|
219
219
|
/**
|
|
220
220
|
* @license
|
|
221
221
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -229,21 +229,21 @@ function fi(){return'\n <div class="dato-checkbox"><label><p class="dato-si
|
|
|
229
229
|
*
|
|
230
230
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
231
231
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
232
|
-
*/(
|
|
232
|
+
*/(Ai=t.KeyboardEventKeys||(t.KeyboardEventKeys={})).Escape="Escape",Ai.Enter="Enter",Ai.Tab="Tab",Ai.ArrowDown="ArrowDown",Ai.ArrowUp="ArrowUp";var Oi=function(e){return e.code===t.KeyboardEventKeys.ArrowDown||e.code===t.KeyboardEventKeys.ArrowUp},Di=function(e){return e.code===t.KeyboardEventKeys.Enter},Ei=function(e){return e.code===t.KeyboardEventKeys.Escape},Ii=function(t){return r.filter((function(e){return e.key===t}))};function Ri(){return!!window.Cypress}
|
|
233
233
|
/**
|
|
234
234
|
* @license
|
|
235
235
|
* Copyright Datorama. All Rights Reserved.
|
|
236
236
|
*
|
|
237
237
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
238
238
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
239
|
-
*/var Ai=function(){function t(t){this.cdr=t,this._placeholder=""}return Object.defineProperty(t.prototype,"placeholder",{set:function(t){this._placeholder=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{set:function(t){this._model={$implicit:t},this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hidePlaceholder",{get:function(){return!this._model||!this._model.$implicit},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.cdr.detach()},Object.defineProperty(t.prototype,"getLabel",{get:function(){return this._model&&this._model.$implicit&&this._model.$implicit[this.labelKey]},enumerable:!0,configurable:!0}),t.prototype.triggerChangeDetection=function(){this.cdr.detectChanges()},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"loadingTemplate",void 0),vt([e.Input(),Ct("design:type",Ci)],t.prototype,"active",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"placeholder",null),vt([e.Input(),Ct("design:type",String)],t.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"context",null),t=vt([e.Component({selector:"dato-trigger-single",template:'<ng-template *ngIf="loadingTemplate" [ngTemplateOutlet]="loadingTemplate"></ng-template>\n<ng-container\n *ngIf="active && !hidePlaceholder"\n [ngTemplateOutlet]="active.tpl"\n [ngTemplateOutletContext]="_model">\n</ng-container>\n<ng-container *ngIf="!active">{{getLabel | translate}}</ng-container>\n<span class="dato-select__placeholder" *ngIf="hidePlaceholder">{{_placeholder}}</span>\n<dato-icon datoIcon="arrow-down" datoSize="sm" class="dato-select__single__arrow"></dato-icon>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host dato-icon{position:absolute;top:50%;transform:translateY(-50%);right:10px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Ei={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Pi})),multi:!0},Pi=function(a){function s(n,i,r,s,l,c,p){var d=a.call(this)||this;return d.cdr=n,d.translate=i,d.host=r,d.datoOverlay=s,d._naked=l,d.size=c,d.width=p,d.idKey="id",d.labelKey="label",d.placeholder="core.select",d.searchPlaceholder="core.search",d.isCombo=!0,d.isGroup=!1,d.internalSearch=!0,d.debounceTime=300,d.isLoading=!1,d.allowSelectAll=!1,d.selectAllChipTxt="",d.type=t.SelectType.SINGLE,d.searchStrategy=pi,d.placement="bottom-start",d.infiniteScrollLoading=!1,d.limitTo=10,d.isSortable=!1,d.searchGroupLabels=!0,d.showEmptyResultsText=!0,d.keepFocus=!1,d.search=new e.EventEmitter,d.save=new e.EventEmitter,d.fetch=new e.EventEmitter,d.blur=new e.EventEmitter,d.searchControl=new o.FormControl,d.searchTerm="",d._noItemsLabel=d.translate.transform("core.no-items"),d._data=[],d._dataIsDirty=!1,d._focus=!1,d._model=[],d._open=!1,d._hasResults=!0,d._initialOpen=!0,d._withActions=!1,d._withInfiniteScroll=!1,d._clickOutside=!1,d.initialRun=!0,d.size=c||"md",d._dropdownClass=["dato-select-"+d.size],d}return ft(s,a),Object.defineProperty(s.prototype,"noItemsLabel",{set:function(t){this._noItemsLabel=this.translate.transform(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"limitSelected",{set:function(t){this.limitSelectedTo=t,this.options&&this.updateDisabledState()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"dataSet",{set:function(t){var e=this;this.initialRun?this._data=t:this._data=xi(t,this.labelKey,this.groupBy),this._dataIsDirty&&Promise.resolve().then((function(){e.subscribeToOptionClick(e.options),e.markAsActive(e._model)})),this._dataIsDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"containsGroups",{get:function(){return this.groups&&this.groups.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"open",{get:function(){return this._open},set:function(t){this._open=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasResults",{get:function(){return this._hasResults},set:function(t){this._hasResults=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasValue",{get:function(){return this._model.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isSingle",{get:function(){return this.type===t.SelectType.SINGLE},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isMulti",{get:function(){return this.type===t.SelectType.MULTI},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_showEmptyResults",{get:function(){return this.showEmptyResultsText&&this._data&&(!this.hasResults||!this._data.length)&&!this.isGroup},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_count",{get:function(){var t=this.getVisibleOptions(!1).length;return"("+this._model.length+"/"+t+")"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isAllChecked",{get:function(){var t=this;return this.getVisibleOptions().every((function(e){return t._model.indexOf(e)>-1}))},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"showSelectAllChip",{get:function(){return this.options.length&&this._model.length===this.options.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isIndeterminatelyChecked",{get:function(){var t,e,n,o=!1;try{for(var i=wt(this.getVisibleOptions()),r=i.next();!r.done;r=i.next()){var a=r.value;if(this._model.indexOf(a)>-1?n=!0:o=!0,n&&o)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return!1},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){this.datoSelectClass&&this._dropdownClass.push(this.datoSelectClass),this._withActions=1===this.save.observers.length,this._withInfiniteScroll=1===this.fetch.observers.length,this.listenToSearch(),this._data=xi(this._data,this.labelKey,this.groupBy),this.initialRun=!1,oe(this.width,null,this.host.nativeElement)},s.prototype.markTouched=function(){var t=this;Promise.resolve().then((function(){return t.onTouched()}))},s.prototype.close=function(){this.keyManager.setActiveItem(-1),this.searchControl.patchValue(""),this.datoOverlay.detach(),this.toggle(),this._focus=!1,this._clickOutside=!0,this.infiniteSubscription&&this.infiniteSubscription.unsubscribe(),this.scrollEventSubscription&&this.scrollEventSubscription.unsubscribe(),this.blur.emit()},s.prototype.toggle=function(){this.open=!this.open,this.open&&(this.isMulti||this.isCombo)&&(this._focus=!0,this._clickOutside=!1),this.cdr.markForCheck()},s.prototype.setDisabledState=function(t){this._disabled=t,this.cdr.markForCheck()},s.prototype.writeValue=function(t){this._model=t?Z.coerceArray(t):[],this.options&&(this.markAsActive(this._model,{deselectAll:!0}),this.limitSelectedTo&&this.updateDisabledState()),this.cdr.markForCheck()},s.prototype.openDropdown=function(t){var e=this;if(this.open&&!this.isCombo&&this.isSingle)this.close();else if(this.open&&(this.isMulti||this.isCombo))t&&"INPUT"!==t.target.nodeName&&this.close();else{this.datoOverlay.created||this.createOverlay(),this.datoOverlay.backDropClick$.pipe(r.take(1)).subscribe((function(){e._clickOutside=!0,e.open&&e.close()})),this.datoOverlay.attach({placement:this.placement},this._dropdownClass),this.toggle(),this.hasValue&&(this._initialOpen&&(this.markAsActive(this._model),this._initialOpen=!1),this.limitSelectedTo&&this._model.length===this.limitSelectedTo&&this.updateDisabledState()),this._withInfiniteScroll&&this.activateInfiniteScroll(),Vt(Ft(".dato-overlay"),"zIndex",Ln());var o=Ft(".dato-select__dropdown-container");if(Vt(o,"width",this.host.nativeElement.getBoundingClientRect().width+"px"),Ri())this.scrollEventSubscription=new n.Subscription;else{var a=Ze()?"touchmove":"scroll",s=n.fromEvent(window,a);Ze()&&(s=s.pipe(r.filter((function(t){return!o.contains(t.target)})))),this.scrollEventSubscription=s.pipe(i.untilDestroyed(this)).subscribe((function(t){return e.close()}))}this.handlePerfectScrollBar()}},s.prototype.ngAfterContentInit=function(){this.subscribeToOptionClick(this.options),this.keyManager=new pt.ActiveDescendantKeyManager(this.options).withWrap()},s.prototype.checkAll=function(t){var e,n,o,i,r=t;this._isIndeterminatelyChecked&&(r=!1);try{for(var a=wt(this.options.toArray()),s=a.next();!s.done;s=a.next()){var l=s.value;l.disabled||(l.active=r)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}var c=this.getVisibleOptions();if(c.length===this.options.length)this._model=r?c:[];else if(r){var p=[];try{for(var d=wt(c),u=d.next();!u.done;u=d.next()){var h=u.value;-1===this._model.indexOf(h)&&p.push(h)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}this._model=xt(this._model,p)}else this._model=this._model.filter((function(t){return-1===c.indexOf(t)}));this.onChange(this._model),this.cdr.markForCheck(),this.asyncUpdateDropdownPosition()},s.prototype.reorderOptions=function(t){this._model=t,this.onChange(this._model)},s.prototype.removeOption=function(t){var e=this;this._model=this._model.filter((function(n){return n[e.idKey]!==t[e.idKey]}));var n=this.options.find((function(n){return n.option&&n.option[e.idKey]===t[e.idKey]}));n&&(n.active=!1),this.limitSelectedTo&&this.updateDisabledState(),this.onChange(this._model),this.cdr.markForCheck(),this.asyncUpdateDropdownPosition()},s.prototype.preventBodyScroll=function(t){Oi(t)&&(t.stopPropagation(),t.preventDefault())},s.prototype.createOverlay=function(){var t,e=new kn(this.dropdown);t=Mt(this.appendTo)?ee(this.host.nativeElement,this.appendTo):this.appendTo,this.datoOverlay.create(this.host.nativeElement,e,t)},s.prototype.handlePerfectScrollBar=function(){var t=this,e=ee(this.host.nativeElement,".ps");e&&n.fromEvent(e,"scroll").pipe(r.throttleTime(10),i.untilDestroyed(this)).subscribe((function(){t.datoOverlay.scheduleUpdate()}))},s.prototype.getVisibleOptions=function(t){void 0===t&&(t=!0);var e=this.options.filter((function(t){return!t.disabled}));return t?e.map((function(t){return t.option})):e},s.prototype.markAsActive=function(t,e){var n,o,i=this;void 0===e&&(e={deselectAll:!1});var r=this.options.toArray();e.deselectAll&&this.resetAll();var a=function(t){if(!t)return"continue";var e=r.find((function(e){return e.option&&e.option[i.idKey]===t[i.idKey]}));e&&(e.active=!0)};try{for(var s=wt(t),l=s.next();!l.done;l=s.next()){a(l.value)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},s.prototype.showAll=function(){var t,e,n,o,i=this.isAccordionGroup(),r=this.getGroupComponentsArray();try{for(var a=wt(r),s=a.next();!s.done;s=a.next()){var l=s.value;if(l._hidden=!1,i){var c=l;if(c.__expended){c.__expended=!1;var p=c;p.content.disableAnimation=!1,p.expand(!1)}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var d=wt(this.options.toArray()),u=d.next();!u.done;u=d.next()){u.value.hideAndDisabled(!1)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}},s.prototype.searchOptions=function(t){var e=this.getGroupComponentsArray();return e.length?this.searchInGroups(e,t):this.searchInOptions(t)},s.prototype.searchInGroups=function(t,e){for(var n=this,o=this.isAccordionGroup(),i=this._data.length,r=!1,a=function(i){var a=s._data[i],l=s.getGroupKey(a),c=s.searchGroupLabels&&s.searchStrategy(a,e,s.labelKey),p=a.children.map((function(t){return t[n.idKey]})),d=s.searchInOptions(e,p,c);d&&!r&&(r=!0);var u=t.find((function(t){return t.__key===l}))||t[i];if(u&&(u._hidden=!d,u.__key=l,o&&d)){var h=u;h.expanded||(h.content.disableAnimation=!0,h.expand(!0),u.__expended=!0)}},s=this,l=0;l<i;l++)a(l);return r},s.prototype.searchInOptions=function(t,e,n){var o,i;void 0===e&&(e=[]),void 0===n&&(n=!1);var r=!1;try{for(var a=wt(this.options.toArray()),s=a.next();!s.done;s=a.next()){var l=s.value,c=-1!==e.indexOf(l.option&&l.option[this.idKey]);if(n&&c)l.hideAndDisabled(!1),r=!0;else if(!ye(e)||c){this.searchStrategy(l,t,this.labelKey)?(l.hideAndDisabled(!1),r=!0):l.hideAndDisabled(!0)}}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r},s.prototype.getGroupKey=function(t){return t&&(t[this.idKey]||t[this.labelKey])},s.prototype.isEmpty=function(t){return""===t},s.prototype.listenToSearch=function(){var t=this;this.searchSubscription=this.isCombo&&this.searchControl.valueChanges.pipe(r.debounceTime(this.debounceTime)).subscribe((function(e){t.internalSearch?t.isEmpty(e)?(t.showAll(),t.hasResults=!0):t.hasResults=t.searchOptions(e):t.search.emit(e),t.searchTerm=e,t.keyManager.setActiveItem(-1),t.cdr.markForCheck(),t.asyncUpdateDropdownPosition()}))},s.prototype.subscribeToOptionClick=function(t){var e=this;this.clicksSubscription&&this.clicksSubscription.unsubscribe();var o=t.map((function(t){return t.click$.pipe(r.map((function(e){return{event:e,option:t}})))}));this.clicksSubscription=n.merge.apply(void 0,xt(o)).subscribe((function(t){var n=t.option,o=t.event;n.disabled||(o.preventDefault(),e.isSingle?e.handleSingleClick(n):e.handleMultiClick(n))}))},s.prototype.onDocumentKeydown=function(t){Ii(t)&&this.open&&(this._clickOutside=!0,this.close())},s.prototype.keyup=function(t){if(Di(t)){var e=this.keyManager.activeItemIndex,n=this.options.toArray()[e];this.isSingle?this.handleSingleClick(n):this.handleMultiClick(n)}if(Oi(t)){this.keyManager.onKeydown(t);var o=document.querySelector(".dato-select__dropdown");Si({size:this.size,panel:o,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})}Ii(t)&&this.close()},s.prototype.resetAll=function(){var t,e;try{for(var n=wt(this.options.toArray()),o=n.next();!o.done;o=n.next()){o.value.active=!1}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},s.prototype.handleSingleClick=function(t){if(t)if(t.active)this.close();else{this.resetAll(),t.active=!0;var e=t.option;this._model=[e],this.onChange(e),this.close()}},s.prototype.handleMultiClick=function(t){var e=this;if(t){t.active=!t.active;var n=t.option;t.active?this._model=this._model.concat(n):this._model=this._model.filter((function(t){return t[e.idKey]!==n[e.idKey]})),this.limitSelectedTo&&this.updateDisabledState(),this.onChange(this._model),this.cdr.markForCheck(),this.asyncUpdateDropdownPosition()}},s.prototype.activateInfiniteScroll=function(){var t=this;this.infiniteSubscription=n.fromEvent(document.querySelector(".dato-select__dropdown"),"scroll").pipe(r.debounceTime(50)).subscribe((function(e){var n=document.querySelector(".dato-select__dropdown"),o=n.scrollHeight-n.scrollTop,i=n.offsetHeight-o;0!==i&&1!==i||t.fetch.emit(!0)}))},s.prototype.ngOnDestroy=function(){this.searchSubscription&&this.searchSubscription.unsubscribe(),this.clicksSubscription&&this.clicksSubscription.unsubscribe(),this.infiniteSubscription&&this.infiniteSubscription.unsubscribe(),this.datoOverlay.attached&&this.datoOverlay.destroy()},s.prototype.isAccordionGroup=function(){return this.accordion&&this.accordion.length},s.prototype.getGroupComponentsArray=function(){return this.isAccordionGroup()?this.accordion.first.groups.toArray():this.groups&&this.groups.toArray()},s.prototype.updateDisabledState=function(){var t,e,n=this._model.length===this.limitSelectedTo;try{for(var o=wt(this.options.toArray()),i=o.next();!i.done;i=o.next()){var r=i.value;r.active||(r.disabled=n)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},s.prototype.asyncUpdateDropdownPosition=function(){var t=this;this.datoOverlay&&this.datoOverlay.attached&&setTimeout((function(){return t.datoOverlay.scheduleUpdate()}),0)},s.prototype.triggerChangeDetectionInDatoSingle=function(){this.datoTriggerSingle.triggerChangeDetection()},s.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:jn},{type:e.ElementRef},{type:Pn},{type:void 0,decorators:[{type:e.Attribute,args:["naked"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]},{type:String,decorators:[{type:e.Attribute,args:["width"]}]}]},vt([e.ViewChild("datoTriggerSingle"),Ct("design:type",Ai)],s.prototype,"datoTriggerSingle",void 0),vt([e.ViewChild("dropdown"),Ct("design:type",e.TemplateRef)],s.prototype,"dropdown",void 0),vt([e.ViewChild("overlayOrigin"),Ct("design:type",e.ElementRef)],s.prototype,"origin",void 0),vt([e.ContentChildren(bi,{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"options",void 0),vt([e.ContentChildren(e.forwardRef((function(){return ui})),{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"accordion",void 0),vt([e.ContentChildren(vi),Ct("design:type",e.QueryList)],s.prototype,"groups",void 0),vt([e.ContentChild(Ci),Ct("design:type",Ci)],s.prototype,"active",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,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"searchPlaceholder",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],s.prototype,"noItemsLabel",null),vt([e.Input(),Ct("design:type",String)],s.prototype,"groupBy",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isCombo",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isGroup",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"internalSearch",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"debounceTime",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isLoading",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"allowSelectAll",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"selectAllChipTxt",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"type",void 0),vt([e.Input(),Ct("design:type",Function)],s.prototype,"searchStrategy",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"infiniteScrollLoading",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"limitTo",void 0),vt([e.Input("limitSelectedTo"),Ct("design:type",Number),Ct("design:paramtypes",[Number])],s.prototype,"limitSelected",null),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isSortable",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"appendTo",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],s.prototype,"dataSet",null),vt([e.Input(),Ct("design:type",Object)],s.prototype,"searchGroupLabels",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"datoSelectClass",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"loadingTemplate",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"showEmptyResultsText",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"keepFocus",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"search",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"save",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"fetch",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"blur",void 0),vt([e.HostListener("focusout"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],s.prototype,"markTouched",null),vt([e.HostListener("document:keydown",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[KeyboardEvent]),Ct("design:returntype",void 0)],s.prototype,"onDocumentKeydown",null),s=vt([e.Component({selector:"dato-select",template:'<section class="dato-select__trigger" [class.dato-select--naked]="_naked" [class.dato-select--disabled]="_disabled">\n\n <div class="dato-select__single" *ngIf="isSingle" [ngClass]="_dropdownClass">\n <dato-input [class.force-hide]="(!open && isCombo) || !isCombo" [placeholder]="searchPlaceholder | translate"\n (keyup)="keyup($event)" [isFocused]="_focus" [isLoading]="isLoading" [formControl]="searchControl" type="search">\n </dato-input>\n\n <dato-trigger-single #datoTriggerSingle [loadingTemplate]="loadingTemplate" [active]="active" datoErrorValidationBorderAnchor tabindex="0" [labelKey]="labelKey"\n [context]="_model[0]" [class.force-hide]="open && isCombo" [placeholder]="placeholder | translate"\n class="ontop-overlay" (keydown)="preventBodyScroll($event)" (keyup)="keyup($event)" (click)="openDropdown()">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]="loadingTemplate" [options]="_model" datoErrorValidationBorderAnchor [control]="searchControl"\n [placeholder]="placeholder | translate" [labelKey]="labelKey" [idKey]="idKey" (keyup)="keyup($event)"\n [isLoading]="isLoading" [keepFocus]="keepFocus" [limitTo]="limitTo" [clickOutside]="_clickOutside" [isSortable]="isSortable"\n [selectAllChipTxt]="selectAllChipTxt"\n [showSelectAllChip]="selectAllChipTxt && showSelectAllChip"\n (unselectAll)="checkAll(false)"\n (removeOption)="removeOption($event)" (reorderOptions)="reorderOptions($event)" *ngIf="isMulti"\n (click)="openDropdown($event)"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class="dato-select__dropdown-container" tabindex="0" (keyup)="keyup($event)">\n\n \x3c!-- HEADER --\x3e\n\n <header class="dato-select__header dato-select__option dato-select__option--simple" data-is-floating\n *ngIf="isMulti && allowSelectAll" [class.force-hide]="_showEmptyResults" [class.ml-10]="containsGroups">\n <dato-checkbox [checked]="_isAllChecked" (check)="checkAll($event)"\n [indeterminatelyChecked]="_isIndeterminatelyChecked">\n {{\'core.select-all\' | translate}}<span class="primary-300-color note-italic ml-5">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n \x3c!-- END HEADER --\x3e\n\n \x3c!-- DROPDOWN --\x3e\n\n <div class="dato-select__dropdown">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]="_showEmptyResults">{{_noItemsLabel}}</dato-select-empty>\n <div class="dato-select__option dato-select-infinite-spinner" data-is-floating *ngIf="infiniteScrollLoading">\n <span class="dato-input__spinner"></span>\n </div>\n\n </div>\n\n \x3c!-- END DROPDOWN --\x3e\n\n\n \x3c!-- FOOTER --\x3e\n\n <footer class="dato-select__footer d-flex" [class.with-actions]="_withActions">\n\n <ng-content select="[datoSelectFooter]"></ng-content>\n\n <ng-container *ngIf="_withActions">\n <dato-link class="mr-20" datoType="secondary" (click)="close()">Cancel</dato-link>\n <dato-button datoSize="sm" (click)="save.emit(); close();">Save</dato-button>\n </ng-container>\n\n </footer>\n\n \x3c!-- END FOOTER --\x3e\n\n </section>\n\n</ng-template>\n',preserveWhitespaces:!1,providers:[Ei,Pn],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoSelect"}),bt(4,e.Attribute("naked")),bt(5,e.Attribute("datoSize")),bt(6,e.Attribute("width")),Ct("design:paramtypes",[e.ChangeDetectorRef,jn,e.ElementRef,Pn,Object,Object,String])],s)}(Dt),ki={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return _i})),multi:!0},_i=function(t){function o(n,o,i,r,a){var s=t.call(this)||this;return s.renderer=n,s.cdr=o,s.host=i,s.trueValue=r,s.falseValue=a,s._checked=!1,s._indeterminatelyChecked=!1,s.check=new e.EventEmitter,s.trueValue=!!Lt(s.trueValue)||s.trueValue,s.falseValue=!Lt(s.falseValue)&&s.falseValue,s}return ft(o,t),Object.defineProperty(o.prototype,"indeterminatelyChecked",{get:function(){return this._indeterminatelyChecked},set:function(t){this._indeterminatelyChecked=t,this.inputElement.indeterminate=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"checked",{get:function(){return this._checked},set:function(t){this._checked=t,this.setInputValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"disabled",{set:function(t){this.setDisabledState(t)},enumerable:!0,configurable:!0}),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","checked"),i.untilDestroyed(this)).subscribe((function(e){e&&t.indeterminatelyChecked?(t.indeterminatelyChecked=!1,t.checked=!1):t._checked=!t._checked;var n=t._checked?t.trueValue:t.falseValue;t.cdr.markForCheck(),t.onChange(n),t.check.emit(n)}))},o.prototype.toggle=function(){this.writeValue(!this.checked)},o.prototype.writeValue=function(t){if(null==t||t!==this.trueValue&&t!==this.falseValue)throw new Ao("Invalid checkbox value: "+t);var e=t===this.trueValue;this.checked=e,this.setInputValue(e)},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},{type:void 0,decorators:[{type:e.Attribute,args:["trueValue"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["falseValue"]}]}]},vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],o.prototype,"indeterminatelyChecked",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],o.prototype,"checked",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],o.prototype,"disabled",null),vt([e.Output(),Ct("design:type",Object)],o.prototype,"check",void 0),o=vt([e.Component({selector:"dato-checkbox",template:'<label>\n <span><ng-content></ng-content></span>\n <input type="checkbox">\n <span class="checkmark" [class.checked]="checked" [class.indeterminately-checked]="indeterminatelyChecked"></span>\n</label>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoCheckbox",providers:[ki]}),bt(3,e.Attribute("trueValue")),bt(4,e.Attribute("falseValue")),Ct("design:paramtypes",[e.Renderer2,e.ChangeDetectorRef,e.ElementRef,Object,Object])],o)}(Dt),ji=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Do],declarations:[_i],exports:[_i]})],t)}(),Mi=function(){function t(t,n){this.host=t,this.cdr=n,this._restCount=0,this._isFocused=!1,this.isLoading=!1,this.isSortable=!1,this.showSelectAllChip=!1,this.selectAllChipTxt="",this.keepFocus=!1,this._options=[],this._limitTo=10,this._disabled=!1,this.removeOption=new e.EventEmitter,this.unselectAll=new e.EventEmitter,this.reorderOptions=new e.EventEmitter,this.showClear=!1}return Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},set:function(t){this._isFocused=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount(),this.keepFocus&&this.input&&this.input.nativeElement.focus()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options.length>this.limitTo},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}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clickOutside",{set:function(t){t&&(this.isFocused=!1,this.showClear=!1,this.input.nativeElement.blur())},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){var t=this;this.isFocused=!0,Promise.resolve().then((function(){return t.input.nativeElement.focus()}))},t.prototype.ngOnInit=function(){var t=this;this.searchSubscription=this.control.valueChanges.subscribe((function(e){t.showClear=!!e}))},t.prototype.updateOrder=function(){this.reorderOptions.emit(this.options)},t.prototype.remove=function(t){this.removeOption.emit(t)},t.prototype.removeFocus=function(t){t.stopPropagation(),this.isFocused=!1},t.prototype.ngOnDestroy=function(){this.searchSubscription.unsubscribe()},t.prototype.clearSearch=function(){this.control.setValue(""),this.input.nativeElement.focus()},t.prototype.onKeyDown=function(t){var e=8===t.keyCode,n=46===t.keyCode,o=this.options.length>=1,i=!this.input.nativeElement.value;if((e||n)&&o&&i){var r=pe(this.options);this.removeOption.emit(r)}},t.prototype.ngAfterViewInit=function(){var t=this;requestAnimationFrame((function(){t.maxActiveElementWidth=t.host.nativeElement.getBoundingClientRect().width-100+"px",t.cdr.detectChanges()}))},t.prototype.setRestCount=function(){this._restCount=Math.abs(this.limitTo-this.options.length)},t.prototype.calcInputWidth=function(t){return Math.min(13*this.placeholder.length,t.clientWidth)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},vt([e.ViewChild("input"),Ct("design:type",e.ElementRef)],t.prototype,"input",void 0),vt([e.HostBinding("class.dato-trigger-multi--focused"),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"isFocused",null),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"loadingTemplate",void 0),vt([e.Input(),Ct("design:type",o.FormControl)],t.prototype,"control",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isLoading",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isSortable",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showSelectAllChip",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"selectAllChipTxt",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"keepFocus",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"limitTo",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"idKey",void 0),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"clickOutside",null),vt([e.Output(),Ct("design:type",Object)],t.prototype,"removeOption",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"unselectAll",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"reorderOptions",void 0),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"onClick",null),t=vt([e.Component({selector:"dato-trigger-multi",template:'<section class="d-flex d-flex-wrap flex-1 width-100" #container>\n <dato-sortable *ngIf="isSortable; else selectedValues" containerClass="d-flex d-flex-wrap"\n [datoOptions]="{filter: \'input\', hasStaticItems: true}" [datoList]="options" (orderUpdated)="updateOrder()">\n <ng-container [ngTemplateOutlet]="selectedValues"></ng-container>\n <ng-container [ngTemplateOutlet]="search"></ng-container>\n </dato-sortable>\n\n <ng-template #selectedValues>\n <ng-template [ngTemplateOutlet]="showSelectAllChip ? allSelectedChip : null"></ng-template>\n\n <ng-template [ngIf]="!showSelectAllChip">\n <div class="dato-trigger-multi__active d-flex justify-between"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (idKey | trackByProp)"\n (click)="removeFocus($event)" datoSortableHandle>\n <span [ngStyle]="{maxWidth: maxActiveElementWidth}" [datoTooltip]="option[labelKey]"\n datoTooltipPosition="bottom" [datoTooltipOnTextOverflow]="true">{{option[labelKey] | translate}}</span>\n <dato-icon class="d-flex-no-shrink" datoIcon="close"\n (click)="remove(option); removeFocus($event)"></dato-icon>\n </div>\n </ng-template>\n\n </ng-template>\n\n <ng-container *ngIf="!isSortable">\n <ng-container [ngTemplateOutlet]="search"></ng-container>\n </ng-container>\n\n <ng-template #allSelectedChip>\n <div class="dato-trigger-multi__active d-flex justify-between">\n <span [ngStyle]="{maxWidth: maxActiveElementWidth}">{{ selectAllChipTxt | translate}}</span>\n <dato-icon class="d-flex-no-shrink" datoIcon="close"\n (click)="unselectAll.emit(); removeFocus($event)"></dato-icon>\n </div>\n </ng-template>\n\n <ng-template #search>\n <div class="dato-sortable-static-item dato-trigger-multi__active d-flex justify-between dato-trigger-multi__rest" *ngIf="showRest && !showSelectAllChip">\n +{{_restCount}}\n </div>\n <input type="search" class="dato-sortable-static-item dato-multi-search flex-1 ellipsis"\n [placeholder]="placeholder"\n (keydown)="onKeyDown($event)"\n [style.minWidth.px]="calcInputWidth(container)"\n [formControl]="control"\n #input>\n </ng-template>\n</section>\n\n<dato-icon datoIcon="close" *ngIf="showClear && !isLoading" (click)="clearSearch()"\n data-auto-id=\'clear-input\'\n class="dato-trigger-multi__clear"></dato-icon>\n\n<dato-icon datoIcon="arrow-down" datoSize="sm" *ngIf="!showClear"></dato-icon>\n<ng-template [ngTemplateOutlet]="loadingTemplate ? loadingTemplate : defaultLoading"></ng-template>\n\n<ng-template #defaultLoading> \n <span class="dato-input__spinner" *ngIf="isLoading"></span>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ElementRef,e.ChangeDetectorRef])],t)}(),Li=function(t){function n(e,n,o){var i=t.call(this,e,n,o)||this;return i.cdr=e,i.host=n,i.group=o,i}var o;return ft(n,t),o=n,n.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:vi,decorators:[{type:e.Optional}]}]},n=o=vt([e.Component({selector:"dato-option[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:bi,useExisting:o}],template:mi(!0)}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,vi])],n)}(bi),Ni=function(){function t(t){this.cdr=t,this._show=!1}return Object.defineProperty(t.prototype,"show",{set:function(t){this._show=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.cdr.detach()},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"show",null),t=vt([e.Component({selector:"dato-select-empty, dato-option-empty",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'\n <div class="dato-select__option dato-select__not-found primary-300-color" *ngIf="_show">\n <ng-content></ng-content>\n </div>\n '}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Fi=function(){function t(t,e){this.cdr=t,this.host=e,this._disabled=!1,this._checked=!1,this._hidden=!1}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){t!==this._disabled&&(this._disabled=t,Kt(this.host.nativeElement,"dato-option--disabled",this._disabled),this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(t){t!==this.checked&&(this._checked=t,this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hidden",{get:function(){return this._hidden},set:function(t){t!==this._hidden&&(this._hidden=t,Kt(this.host.nativeElement,"force-hide",this._hidden))},enumerable:!0,configurable:!0}),t.prototype.setActiveStyles=function(){this.host.nativeElement.classList.add("dato-option--keyboard-active")},t.prototype.setInactiveStyles=function(){this.host.nativeElement.classList.remove("dato-option--keyboard-active")},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"option",void 0),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,"checked",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"hidden",null),t=vt([e.Component({selector:"dato-option-v2:not([multi])",changeDetection:e.ChangeDetectionStrategy.OnPush,template:Vi()}),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),Gi=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.indeterminatelyChecked=!1,n.check=new e.EventEmitter,n}var o;return ft(n,t),o=n,n.prototype.onCheck=function(t){this.allowAction(t.target)&&this.check.emit(this.checked)},n.prototype.toggleChecked=function(t){this.checked=t},n.prototype.allowAction=function(t){for(var e=t;"DATO-OPTION-V2"!==e.tagName;){if(null!==e.getAttribute("data-list-item-ignore"))return!1;e=e.parentElement}return!0},vt([e.Input(),Ct("design:type",Object)],n.prototype,"indeterminatelyChecked",void 0),vt([e.HostListener("mouseup",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],n.prototype,"onCheck",null),vt([e.Output(),Ct("design:type",Object)],n.prototype,"check",void 0),n=o=vt([e.Component({selector:"dato-option-v2[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:Fi,useExisting:o}],template:Vi(!0)})],n)}(Fi);
|
|
239
|
+
*/var Ti=function(){function t(t){this.cdr=t,this._placeholder=""}return Object.defineProperty(t.prototype,"placeholder",{set:function(t){this._placeholder=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{set:function(t){this._model={$implicit:t},this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hidePlaceholder",{get:function(){return!this._model||!this._model.$implicit},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.cdr.detach()},Object.defineProperty(t.prototype,"getLabel",{get:function(){return this._model&&this._model.$implicit&&this._model.$implicit[this.labelKey]},enumerable:!0,configurable:!0}),t.prototype.triggerChangeDetection=function(){this.cdr.detectChanges()},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},At([e.Input(),bt("design:type",e.TemplateRef)],t.prototype,"loadingTemplate",void 0),At([e.Input(),bt("design:type",Ci)],t.prototype,"active",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"placeholder",null),At([e.Input(),bt("design:type",String)],t.prototype,"labelKey",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"context",null),t=At([e.Component({selector:"dato-trigger-single",template:'<ng-template *ngIf="loadingTemplate" [ngTemplateOutlet]="loadingTemplate"></ng-template>\n<ng-container\n *ngIf="active && !hidePlaceholder"\n [ngTemplateOutlet]="active.tpl"\n [ngTemplateOutletContext]="_model">\n</ng-container>\n<ng-container *ngIf="!active">{{getLabel | translate}}</ng-container>\n<span class="dato-select__placeholder" *ngIf="hidePlaceholder">{{_placeholder}}</span>\n<dato-icon datoIcon="arrow-down" datoSize="sm" class="dato-select__single__arrow"></dato-icon>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host dato-icon{position:absolute;top:50%;transform:translateY(-50%);right:10px}"]}),bt("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Pi={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return ki})),multi:!0},ki=function(a){function s(n,i,r,s,l,c,p){var d=a.call(this)||this;return d.cdr=n,d.translate=i,d.host=r,d.datoOverlay=s,d._naked=l,d.size=c,d.width=p,d.idKey="id",d.labelKey="label",d.placeholder="core.select",d.searchPlaceholder="core.search",d.isCombo=!0,d.isGroup=!1,d.internalSearch=!0,d.debounceTime=300,d.isLoading=!1,d.allowSelectAll=!1,d.selectAllChipTxt="",d.type=t.SelectType.SINGLE,d.searchStrategy=di,d.placement="bottom-start",d.infiniteScrollLoading=!1,d.limitTo=10,d.isSortable=!1,d.searchGroupLabels=!0,d.showEmptyResultsText=!0,d.keepFocus=!1,d.search=new e.EventEmitter,d.save=new e.EventEmitter,d.fetch=new e.EventEmitter,d.blur=new e.EventEmitter,d.searchControl=new o.FormControl,d.searchTerm="",d._noItemsLabel=d.translate.transform("core.no-items"),d._data=[],d._dataIsDirty=!1,d._focus=!1,d._model=[],d._open=!1,d._hasResults=!0,d._initialOpen=!0,d._withActions=!1,d._withInfiniteScroll=!1,d._clickOutside=!1,d.initialRun=!0,d.size=c||"md",d._dropdownClass=["dato-select-"+d.size],d}return ft(s,a),Object.defineProperty(s.prototype,"noItemsLabel",{set:function(t){this._noItemsLabel=this.translate.transform(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"limitSelected",{set:function(t){this.limitSelectedTo=t,this.options&&this.updateDisabledState()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"dataSet",{set:function(t){var e=this;this.initialRun?this._data=t:this._data=xi(t,this.labelKey,this.groupBy),this._dataIsDirty&&Promise.resolve().then((function(){e.subscribeToOptionClick(e.options),e.markAsActive(e._model)})),this._dataIsDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"containsGroups",{get:function(){return this.groups&&this.groups.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"open",{get:function(){return this._open},set:function(t){this._open=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasResults",{get:function(){return this._hasResults},set:function(t){this._hasResults=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasValue",{get:function(){return this._model.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isSingle",{get:function(){return this.type===t.SelectType.SINGLE},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isMulti",{get:function(){return this.type===t.SelectType.MULTI},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_showEmptyResults",{get:function(){return this.showEmptyResultsText&&this._data&&(!this.hasResults||!this._data.length)&&!this.isGroup},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_count",{get:function(){var t=this.getVisibleOptions(!1).length;return"("+this._model.length+"/"+t+")"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isAllChecked",{get:function(){var t=this;return this.getVisibleOptions().every((function(e){return t._model.indexOf(e)>-1}))},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"showSelectAllChip",{get:function(){return this.options.length&&this._model.length===this.options.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isIndeterminatelyChecked",{get:function(){var t,e,n,o=!1;try{for(var i=Ct(this.getVisibleOptions()),r=i.next();!r.done;r=i.next()){var a=r.value;if(this._model.indexOf(a)>-1?n=!0:o=!0,n&&o)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return!1},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){this.datoSelectClass&&this._dropdownClass.push(this.datoSelectClass),this._withActions=1===this.save.observers.length,this._withInfiniteScroll=1===this.fetch.observers.length,this.listenToSearch(),this._data=xi(this._data,this.labelKey,this.groupBy),this.initialRun=!1,oe(this.width,null,this.host.nativeElement)},s.prototype.markTouched=function(){var t=this;Promise.resolve().then((function(){return t.onTouched()}))},s.prototype.close=function(){this.keyManager.setActiveItem(-1),this.searchControl.patchValue(""),this.datoOverlay.detach(),this.toggle(),this._focus=!1,this._clickOutside=!0,this.infiniteSubscription&&this.infiniteSubscription.unsubscribe(),this.scrollEventSubscription&&this.scrollEventSubscription.unsubscribe(),this.blur.emit()},s.prototype.toggle=function(){this.open=!this.open,this.open&&(this.isMulti||this.isCombo)&&(this._focus=!0,this._clickOutside=!1),this.cdr.markForCheck()},s.prototype.setDisabledState=function(t){this._disabled=t,this.cdr.markForCheck()},s.prototype.writeValue=function(t){if(this._model=t?X.coerceArray(t):[],this.options){var e=this.limitSelectedTo&&this.isMulti&&this._model.length>=this.limitSelectedTo;this.markAsActive(this._model,{deselectAll:!0}),e&&this.updateDisabledState()}this.cdr.markForCheck()},s.prototype.openDropdown=function(t){var e=this;if(this.open&&!this.isCombo&&this.isSingle)this.close();else if(this.open&&(this.isMulti||this.isCombo))t&&"INPUT"!==t.target.nodeName&&this.close();else{this.datoOverlay.created||this.createOverlay(),this.datoOverlay.backDropClick$.pipe(r.take(1)).subscribe((function(){e._clickOutside=!0,e.open&&e.close()})),this.datoOverlay.attach({placement:this.placement},this._dropdownClass),this.toggle(),this.hasValue&&(this._initialOpen&&(this.markAsActive(this._model),this._initialOpen=!1),this.limitSelectedTo&&this._model.length===this.limitSelectedTo&&this.updateDisabledState()),this._withInfiniteScroll&&this.activateInfiniteScroll(),Gt(Bt(".dato-overlay"),"zIndex",Nn());var o=Bt(".dato-select__dropdown-container");if(Gt(o,"width",this.host.nativeElement.getBoundingClientRect().width+"px"),Ri())this.scrollEventSubscription=new n.Subscription;else{var a=Ze()?"touchmove":"scroll",s=n.fromEvent(window,a);Ze()&&(s=s.pipe(r.filter((function(t){return!o.contains(t.target)})))),this.scrollEventSubscription=s.pipe(i.untilDestroyed(this)).subscribe((function(t){return e.close()}))}this.handlePerfectScrollBar()}},s.prototype.ngAfterContentInit=function(){this.subscribeToOptionClick(this.options),this.keyManager=new pt.ActiveDescendantKeyManager(this.options).withWrap()},s.prototype.checkAll=function(t){var e,n,o,i,r=t;this._isIndeterminatelyChecked&&(r=!1);try{for(var a=Ct(this.options.toArray()),s=a.next();!s.done;s=a.next()){var l=s.value;l.disabled||(l.active=r)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}var c=this.getVisibleOptions();if(c.length===this.options.length)this._model=r?c:[];else if(r){var p=[];try{for(var d=Ct(c),u=d.next();!u.done;u=d.next()){var h=u.value;-1===this._model.indexOf(h)&&p.push(h)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}this._model=St(this._model,p)}else this._model=this._model.filter((function(t){return-1===c.indexOf(t)}));this.onChange(this._model),this.cdr.markForCheck(),this.asyncUpdateDropdownPosition()},s.prototype.reorderOptions=function(t){this._model=t,this.onChange(this._model)},s.prototype.removeOption=function(t){var e=this,n=this.limitSelectedTo&&this._model.length===this.limitSelectedTo;this._model=this._model.filter((function(n){return n[e.idKey]!==t[e.idKey]}));var o=this.options.find((function(n){return n.option&&n.option[e.idKey]===t[e.idKey]}));o&&(o.active=!1),n&&this.updateDisabledState(),this.onChange(this._model),this.cdr.markForCheck(),this.asyncUpdateDropdownPosition()},s.prototype.preventBodyScroll=function(t){Oi(t)&&(t.stopPropagation(),t.preventDefault())},s.prototype.createOverlay=function(){var t,e=new jn(this.dropdown);t=_t(this.appendTo)?ee(this.host.nativeElement,this.appendTo):this.appendTo,this.datoOverlay.create(this.host.nativeElement,e,t)},s.prototype.handlePerfectScrollBar=function(){var t=this,e=ee(this.host.nativeElement,".ps");e&&n.fromEvent(e,"scroll").pipe(r.throttleTime(10),i.untilDestroyed(this)).subscribe((function(){t.datoOverlay.scheduleUpdate()}))},s.prototype.getVisibleOptions=function(t){void 0===t&&(t=!0);var e=this.options.filter((function(t){return!t.disabled}));return t?e.map((function(t){return t.option})):e},s.prototype.markAsActive=function(t,e){var n,o,i=this;void 0===e&&(e={deselectAll:!1});var r=this.options.toArray();e.deselectAll&&this.resetAll();var a=function(t){if(!t)return"continue";var e=r.find((function(e){return e.option&&e.option[i.idKey]===t[i.idKey]}));e&&(e.active=!0)};try{for(var s=Ct(t),l=s.next();!l.done;l=s.next()){a(l.value)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},s.prototype.showAll=function(){var t,e,n,o,i=this.isAccordionGroup(),r=this.getGroupComponentsArray();try{for(var a=Ct(r),s=a.next();!s.done;s=a.next()){var l=s.value;if(l._hidden=!1,i){var c=l;if(c.__expended){c.__expended=!1;var p=c;p.content.disableAnimation=!1,p.expand(!1)}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var d=Ct(this.options.toArray()),u=d.next();!u.done;u=d.next()){u.value.hideAndDisabled(!1)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}},s.prototype.searchOptions=function(t){var e=this.getGroupComponentsArray();return e.length?this.searchInGroups(e,t):this.searchInOptions(t)},s.prototype.searchInGroups=function(t,e){for(var n=this,o=this.isAccordionGroup(),i=this._data.length,r=!1,a=function(i){var a=s._data[i],l=s.getGroupKey(a),c=s.searchGroupLabels&&s.searchStrategy(a,e,s.labelKey),p=a.children.map((function(t){return t[n.idKey]})),d=s.searchInOptions(e,p,c);d&&!r&&(r=!0);var u=t.find((function(t){return t.__key===l}))||t[i];if(u&&(u._hidden=!d,u.__key=l,o&&d)){var h=u;h.expanded||(h.content.disableAnimation=!0,h.expand(!0),u.__expended=!0)}},s=this,l=0;l<i;l++)a(l);return r},s.prototype.searchInOptions=function(t,e,n){var o,i;void 0===e&&(e=[]),void 0===n&&(n=!1);var r=!1;try{for(var a=Ct(this.options.toArray()),s=a.next();!s.done;s=a.next()){var l=s.value,c=-1!==e.indexOf(l.option&&l.option[this.idKey]);if(n&&c)l.hideAndDisabled(!1),r=!0;else if(!ye(e)||c){this.searchStrategy(l,t,this.labelKey)?(l.hideAndDisabled(!1),r=!0):l.hideAndDisabled(!0)}}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r},s.prototype.getGroupKey=function(t){return t&&(t[this.idKey]||t[this.labelKey])},s.prototype.isEmpty=function(t){return""===t},s.prototype.listenToSearch=function(){var t=this;this.searchSubscription=this.isCombo&&this.searchControl.valueChanges.pipe(r.debounceTime(this.debounceTime)).subscribe((function(e){t.internalSearch?t.isEmpty(e)?(t.showAll(),t.hasResults=!0):t.hasResults=t.searchOptions(e):t.search.emit(e),t.searchTerm=e,t.keyManager.setActiveItem(-1),t.cdr.markForCheck(),t.asyncUpdateDropdownPosition()}))},s.prototype.subscribeToOptionClick=function(t){var e=this;this.clicksSubscription&&this.clicksSubscription.unsubscribe();var o=t.map((function(t){return t.click$.pipe(r.map((function(e){return{event:e,option:t}})))}));this.clicksSubscription=n.merge.apply(void 0,St(o)).subscribe((function(t){var n=t.option,o=t.event;n.disabled||(o.preventDefault(),e.isSingle?e.handleSingleClick(n):e.handleMultiClick(n))}))},s.prototype.onDocumentKeydown=function(t){Ei(t)&&this.open&&(this._clickOutside=!0,this.close())},s.prototype.keyup=function(t){if(Di(t)){var e=this.keyManager.activeItemIndex,n=this.options.toArray()[e];this.isSingle?this.handleSingleClick(n):this.handleMultiClick(n)}if(Oi(t)){this.keyManager.onKeydown(t);var o=document.querySelector(".dato-select__dropdown");Si({size:this.size,panel:o,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})}Ei(t)&&this.close()},s.prototype.resetAll=function(){var t,e;try{for(var n=Ct(this.options.toArray()),o=n.next();!o.done;o=n.next()){o.value.active=!1}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},s.prototype.handleSingleClick=function(t){if(t)if(t.active)this.close();else{this.resetAll(),t.active=!0;var e=t.option;this._model=[e],this.onChange(e),this.close()}},s.prototype.handleMultiClick=function(t){var e=this;if(t){var n=this._model.length,o=this.limitSelectedTo&&(n===this.limitSelectedTo||n===this.limitSelectedTo-1&&!t.active);t.active=!t.active;var i=t.option;t.active?this._model=this._model.concat(i):this._model=this._model.filter((function(t){return t[e.idKey]!==i[e.idKey]})),o&&this.updateDisabledState(),this.onChange(this._model),this.cdr.markForCheck(),this.asyncUpdateDropdownPosition()}},s.prototype.activateInfiniteScroll=function(){var t=this;this.infiniteSubscription=n.fromEvent(document.querySelector(".dato-select__dropdown"),"scroll").pipe(r.debounceTime(50)).subscribe((function(e){var n=document.querySelector(".dato-select__dropdown"),o=n.scrollHeight-n.scrollTop,i=n.offsetHeight-o;0!==i&&1!==i||t.fetch.emit(!0)}))},s.prototype.ngOnDestroy=function(){this.searchSubscription&&this.searchSubscription.unsubscribe(),this.clicksSubscription&&this.clicksSubscription.unsubscribe(),this.infiniteSubscription&&this.infiniteSubscription.unsubscribe(),this.datoOverlay.attached&&this.datoOverlay.destroy()},s.prototype.isAccordionGroup=function(){return this.accordion&&this.accordion.length},s.prototype.getGroupComponentsArray=function(){return this.isAccordionGroup()?this.accordion.first.groups.toArray():this.groups&&this.groups.toArray()},s.prototype.updateDisabledState=function(){var t,e,n=this._model.length===this.limitSelectedTo;try{for(var o=Ct(this.options.toArray()),i=o.next();!i.done;i=o.next()){var r=i.value;r.active||(r.disabled=n)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},s.prototype.asyncUpdateDropdownPosition=function(){var t=this;this.datoOverlay&&this.datoOverlay.attached&&setTimeout((function(){return t.datoOverlay.scheduleUpdate()}),0)},s.prototype.triggerChangeDetectionInDatoSingle=function(){this.datoTriggerSingle.triggerChangeDetection()},s.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:_n},{type:e.ElementRef},{type:kn},{type:void 0,decorators:[{type:e.Attribute,args:["naked"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]},{type:String,decorators:[{type:e.Attribute,args:["width"]}]}]},At([e.ViewChild("datoTriggerSingle"),bt("design:type",Ti)],s.prototype,"datoTriggerSingle",void 0),At([e.ViewChild("dropdown"),bt("design:type",e.TemplateRef)],s.prototype,"dropdown",void 0),At([e.ViewChild("overlayOrigin"),bt("design:type",e.ElementRef)],s.prototype,"origin",void 0),At([e.ContentChildren(bi,{descendants:!0}),bt("design:type",e.QueryList)],s.prototype,"options",void 0),At([e.ContentChildren(e.forwardRef((function(){return hi})),{descendants:!0}),bt("design:type",e.QueryList)],s.prototype,"accordion",void 0),At([e.ContentChildren(vi),bt("design:type",e.QueryList)],s.prototype,"groups",void 0),At([e.ContentChild(Ci),bt("design:type",Ci)],s.prototype,"active",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"idKey",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"labelKey",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"placeholder",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"searchPlaceholder",void 0),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],s.prototype,"noItemsLabel",null),At([e.Input(),bt("design:type",String)],s.prototype,"groupBy",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"isCombo",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"isGroup",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"internalSearch",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"debounceTime",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"isLoading",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"allowSelectAll",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"selectAllChipTxt",void 0),At([e.Input(),bt("design:type",String)],s.prototype,"type",void 0),At([e.Input(),bt("design:type",Function)],s.prototype,"searchStrategy",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"placement",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"infiniteScrollLoading",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"limitTo",void 0),At([e.Input("limitSelectedTo"),bt("design:type",Number),bt("design:paramtypes",[Number])],s.prototype,"limitSelected",null),At([e.Input(),bt("design:type",Object)],s.prototype,"isSortable",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"appendTo",void 0),At([e.Input(),bt("design:type",Array),bt("design:paramtypes",[Array])],s.prototype,"dataSet",null),At([e.Input(),bt("design:type",Object)],s.prototype,"searchGroupLabels",void 0),At([e.Input(),bt("design:type",String)],s.prototype,"datoSelectClass",void 0),At([e.Input(),bt("design:type",e.TemplateRef)],s.prototype,"loadingTemplate",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"showEmptyResultsText",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"keepFocus",void 0),At([e.Output(),bt("design:type",Object)],s.prototype,"search",void 0),At([e.Output(),bt("design:type",Object)],s.prototype,"save",void 0),At([e.Output(),bt("design:type",Object)],s.prototype,"fetch",void 0),At([e.Output(),bt("design:type",Object)],s.prototype,"blur",void 0),At([e.HostListener("focusout"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],s.prototype,"markTouched",null),At([e.HostListener("document:keydown",["$event"]),bt("design:type",Function),bt("design:paramtypes",[KeyboardEvent]),bt("design:returntype",void 0)],s.prototype,"onDocumentKeydown",null),s=At([e.Component({selector:"dato-select",template:'<section class="dato-select__trigger" [class.dato-select--naked]="_naked" [class.dato-select--disabled]="_disabled">\n\n <div class="dato-select__single" *ngIf="isSingle" [ngClass]="_dropdownClass">\n <dato-input [class.force-hide]="(!open && isCombo) || !isCombo" [placeholder]="searchPlaceholder | translate"\n (keyup)="keyup($event)" [isFocused]="_focus" [isLoading]="isLoading" [formControl]="searchControl" type="search">\n </dato-input>\n\n <dato-trigger-single #datoTriggerSingle [loadingTemplate]="loadingTemplate" [active]="active" datoErrorValidationBorderAnchor tabindex="0" [labelKey]="labelKey"\n [context]="_model[0]" [class.force-hide]="open && isCombo" [placeholder]="placeholder | translate"\n class="ontop-overlay" (keydown)="preventBodyScroll($event)" (keyup)="keyup($event)" (click)="openDropdown()">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]="loadingTemplate" [options]="_model" datoErrorValidationBorderAnchor [control]="searchControl"\n [placeholder]="placeholder | translate" [labelKey]="labelKey" [idKey]="idKey" (keyup)="keyup($event)"\n [isLoading]="isLoading" [keepFocus]="keepFocus" [limitTo]="limitTo" [clickOutside]="_clickOutside" [isSortable]="isSortable"\n [selectAllChipTxt]="selectAllChipTxt"\n [showSelectAllChip]="selectAllChipTxt && showSelectAllChip"\n (unselectAll)="checkAll(false)"\n (removeOption)="removeOption($event)" (reorderOptions)="reorderOptions($event)" *ngIf="isMulti"\n (click)="openDropdown($event)"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class="dato-select__dropdown-container" tabindex="0" (keyup)="keyup($event)">\n\n \x3c!-- HEADER --\x3e\n\n <header class="dato-select__header dato-select__option dato-select__option--simple" data-is-floating\n *ngIf="isMulti && allowSelectAll" [class.force-hide]="_showEmptyResults" [class.ml-10]="containsGroups">\n <dato-checkbox [checked]="_isAllChecked" (check)="checkAll($event)"\n [indeterminatelyChecked]="_isIndeterminatelyChecked">\n {{\'core.select-all\' | translate}}<span class="primary-300-color note-italic ml-5">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n \x3c!-- END HEADER --\x3e\n\n \x3c!-- DROPDOWN --\x3e\n\n <div class="dato-select__dropdown">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]="_showEmptyResults">{{_noItemsLabel}}</dato-select-empty>\n <div class="dato-select__option dato-select-infinite-spinner" data-is-floating *ngIf="infiniteScrollLoading">\n <span class="dato-input__spinner"></span>\n </div>\n\n </div>\n\n \x3c!-- END DROPDOWN --\x3e\n\n\n \x3c!-- FOOTER --\x3e\n\n <footer class="dato-select__footer d-flex" [class.with-actions]="_withActions">\n\n <ng-content select="[datoSelectFooter]"></ng-content>\n\n <ng-container *ngIf="_withActions">\n <dato-link class="mr-20" datoType="secondary" (click)="close()">Cancel</dato-link>\n <dato-button datoSize="sm" (click)="save.emit(); close();">Save</dato-button>\n </ng-container>\n\n </footer>\n\n \x3c!-- END FOOTER --\x3e\n\n </section>\n\n</ng-template>\n',preserveWhitespaces:!1,providers:[Pi,kn],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoSelect"}),vt(4,e.Attribute("naked")),vt(5,e.Attribute("datoSize")),vt(6,e.Attribute("width")),bt("design:paramtypes",[e.ChangeDetectorRef,_n,e.ElementRef,kn,Object,Object,String])],s)}(Ot),ji={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Mi})),multi:!0},Mi=function(t){function o(n,o,i,r,a){var s=t.call(this)||this;return s.renderer=n,s.cdr=o,s.host=i,s.trueValue=r,s.falseValue=a,s._checked=!1,s._indeterminatelyChecked=!1,s.check=new e.EventEmitter,s.trueValue=!!Ft(s.trueValue)||s.trueValue,s.falseValue=!Ft(s.falseValue)&&s.falseValue,s}return ft(o,t),Object.defineProperty(o.prototype,"indeterminatelyChecked",{get:function(){return this._indeterminatelyChecked},set:function(t){this._indeterminatelyChecked=t,this.inputElement.indeterminate=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"checked",{get:function(){return this._checked},set:function(t){this._checked=t,this.setInputValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"disabled",{set:function(t){this.setDisabledState(t)},enumerable:!0,configurable:!0}),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","checked"),i.untilDestroyed(this)).subscribe((function(e){e&&t.indeterminatelyChecked?(t.indeterminatelyChecked=!1,t.checked=!1):t._checked=!t._checked;var n=t._checked?t.trueValue:t.falseValue;t.cdr.markForCheck(),t.onChange(n),t.check.emit(n)}))},o.prototype.toggle=function(){this.writeValue(!this.checked)},o.prototype.writeValue=function(t){if(null==t||t!==this.trueValue&&t!==this.falseValue)throw new To("Invalid checkbox value: "+t);var e=t===this.trueValue;this.checked=e,this.setInputValue(e)},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},{type:void 0,decorators:[{type:e.Attribute,args:["trueValue"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["falseValue"]}]}]},At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],o.prototype,"indeterminatelyChecked",null),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],o.prototype,"checked",null),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],o.prototype,"disabled",null),At([e.Output(),bt("design:type",Object)],o.prototype,"check",void 0),o=At([e.Component({selector:"dato-checkbox",template:'<label>\n <span><ng-content></ng-content></span>\n <input type="checkbox">\n <span class="checkmark" [class.checked]="checked" [class.indeterminately-checked]="indeterminatelyChecked"></span>\n</label>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoCheckbox",providers:[ji]}),vt(3,e.Attribute("trueValue")),vt(4,e.Attribute("falseValue")),bt("design:paramtypes",[e.Renderer2,e.ChangeDetectorRef,e.ElementRef,Object,Object])],o)}(Ot),_i=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Do],declarations:[Mi],exports:[Mi]})],t)}(),Fi=function(){function t(t,n){this.host=t,this.cdr=n,this._restCount=0,this._isFocused=!1,this.isLoading=!1,this.isSortable=!1,this.showSelectAllChip=!1,this.selectAllChipTxt="",this.keepFocus=!1,this._options=[],this._limitTo=10,this._disabled=!1,this.removeOption=new e.EventEmitter,this.unselectAll=new e.EventEmitter,this.reorderOptions=new e.EventEmitter,this.showClear=!1}return Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},set:function(t){this._isFocused=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount(),this.keepFocus&&this.input&&this.input.nativeElement.focus()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options.length>this.limitTo},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}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clickOutside",{set:function(t){t&&(this.isFocused=!1,this.showClear=!1,this.input.nativeElement.blur())},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){var t=this;this.isFocused=!0,Promise.resolve().then((function(){return t.input.nativeElement.focus()}))},t.prototype.ngOnInit=function(){var t=this;this.searchSubscription=this.control.valueChanges.subscribe((function(e){t.showClear=!!e}))},t.prototype.updateOrder=function(){this.reorderOptions.emit(this.options)},t.prototype.remove=function(t){this.removeOption.emit(t)},t.prototype.removeFocus=function(t){t.stopPropagation(),this.isFocused=!1},t.prototype.ngOnDestroy=function(){this.searchSubscription.unsubscribe()},t.prototype.clearSearch=function(){this.control.setValue(""),this.input.nativeElement.focus()},t.prototype.onKeyDown=function(t){var e=8===t.keyCode,n=46===t.keyCode,o=this.options.length>=1,i=!this.input.nativeElement.value;if((e||n)&&o&&i){var r=pe(this.options);this.removeOption.emit(r)}},t.prototype.ngAfterViewInit=function(){var t=this;requestAnimationFrame((function(){t.maxActiveElementWidth=t.host.nativeElement.getBoundingClientRect().width-100+"px",t.cdr.detectChanges()}))},t.prototype.setRestCount=function(){this._restCount=Math.abs(this.limitTo-this.options.length)},t.prototype.calcInputWidth=function(t){return Math.min(13*this.placeholder.length,t.clientWidth)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},At([e.ViewChild("input"),bt("design:type",e.ElementRef)],t.prototype,"input",void 0),At([e.HostBinding("class.dato-trigger-multi--focused"),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"isFocused",null),At([e.Input(),bt("design:type",e.TemplateRef)],t.prototype,"loadingTemplate",void 0),At([e.Input(),bt("design:type",o.FormControl)],t.prototype,"control",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"placeholder",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"isLoading",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"isSortable",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"showSelectAllChip",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"selectAllChipTxt",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"keepFocus",void 0),At([e.Input(),bt("design:type",Array),bt("design:paramtypes",[Array])],t.prototype,"options",null),At([e.Input(),bt("design:type",Number),bt("design:paramtypes",[Number])],t.prototype,"limitTo",null),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"disabled",null),At([e.Input(),bt("design:type",Object)],t.prototype,"labelKey",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"idKey",void 0),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"clickOutside",null),At([e.Output(),bt("design:type",Object)],t.prototype,"removeOption",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"unselectAll",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"reorderOptions",void 0),At([e.HostListener("click"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],t.prototype,"onClick",null),t=At([e.Component({selector:"dato-trigger-multi",template:'<section class="d-flex d-flex-wrap flex-1 width-100" #container>\n <dato-sortable *ngIf="isSortable; else selectedValues" containerClass="d-flex d-flex-wrap"\n [datoOptions]="{filter: \'input\', hasStaticItems: true}" [datoList]="options" (orderUpdated)="updateOrder()">\n <ng-container [ngTemplateOutlet]="selectedValues"></ng-container>\n <ng-container [ngTemplateOutlet]="search"></ng-container>\n </dato-sortable>\n\n <ng-template #selectedValues>\n <ng-template [ngTemplateOutlet]="showSelectAllChip ? allSelectedChip : null"></ng-template>\n\n <ng-template [ngIf]="!showSelectAllChip">\n <div class="dato-trigger-multi__active d-flex justify-between"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (idKey | trackByProp)"\n (click)="removeFocus($event)" datoSortableHandle>\n <span [ngStyle]="{maxWidth: maxActiveElementWidth}" [datoTooltip]="option[labelKey]"\n datoTooltipPosition="bottom" [datoTooltipOnTextOverflow]="true">{{option[labelKey] | translate}}</span>\n <dato-icon class="d-flex-no-shrink" datoIcon="close"\n (click)="remove(option); removeFocus($event)"></dato-icon>\n </div>\n </ng-template>\n\n </ng-template>\n\n <ng-container *ngIf="!isSortable">\n <ng-container [ngTemplateOutlet]="search"></ng-container>\n </ng-container>\n\n <ng-template #allSelectedChip>\n <div class="dato-trigger-multi__active d-flex justify-between">\n <span [ngStyle]="{maxWidth: maxActiveElementWidth}">{{ selectAllChipTxt | translate}}</span>\n <dato-icon class="d-flex-no-shrink" datoIcon="close"\n (click)="unselectAll.emit(); removeFocus($event)"></dato-icon>\n </div>\n </ng-template>\n\n <ng-template #search>\n <div class="dato-sortable-static-item dato-trigger-multi__active d-flex justify-between dato-trigger-multi__rest" *ngIf="showRest && !showSelectAllChip">\n +{{_restCount}}\n </div>\n <input type="search" class="dato-sortable-static-item dato-multi-search flex-1 ellipsis"\n [placeholder]="placeholder"\n (keydown)="onKeyDown($event)"\n [style.minWidth.px]="calcInputWidth(container)"\n [formControl]="control"\n #input>\n </ng-template>\n</section>\n\n<dato-icon datoIcon="close" *ngIf="showClear && !isLoading" (click)="clearSearch()"\n data-auto-id=\'clear-input\'\n class="dato-trigger-multi__clear"></dato-icon>\n\n<dato-icon datoIcon="arrow-down" datoSize="sm" *ngIf="!showClear"></dato-icon>\n<ng-template [ngTemplateOutlet]="loadingTemplate ? loadingTemplate : defaultLoading"></ng-template>\n\n<ng-template #defaultLoading> \n <span class="dato-input__spinner" *ngIf="isLoading"></span>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),bt("design:paramtypes",[e.ElementRef,e.ChangeDetectorRef])],t)}(),Ni=function(t){function n(e,n,o){var i=t.call(this,e,n,o)||this;return i.cdr=e,i.host=n,i.group=o,i}var o;return ft(n,t),o=n,n.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:vi,decorators:[{type:e.Optional}]}]},n=o=At([e.Component({selector:"dato-option[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:bi,useExisting:o}],template:yi(!0)}),vt(2,e.Optional()),bt("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,vi])],n)}(bi),Bi=function(){function t(t){this.cdr=t,this._show=!1}return Object.defineProperty(t.prototype,"show",{set:function(t){this._show=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.cdr.detach()},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"show",null),t=At([e.Component({selector:"dato-select-empty, dato-option-empty",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'\n <div class="dato-select__option dato-select__not-found primary-300-color" *ngIf="_show">\n <ng-content></ng-content>\n </div>\n '}),bt("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Li=function(){function t(t,e){this.cdr=t,this.host=e,this._disabled=!1,this._checked=!1,this._hidden=!1}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){t!==this._disabled&&(this._disabled=t,Ut(this.host.nativeElement,"dato-option--disabled",this._disabled),this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(t){t!==this.checked&&(this._checked=t,this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hidden",{get:function(){return this._hidden},set:function(t){t!==this._hidden&&(this._hidden=t,Ut(this.host.nativeElement,"force-hide",this._hidden))},enumerable:!0,configurable:!0}),t.prototype.setActiveStyles=function(){this.host.nativeElement.classList.add("dato-option--keyboard-active")},t.prototype.setInactiveStyles=function(){this.host.nativeElement.classList.remove("dato-option--keyboard-active")},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},At([e.Input(),bt("design:type",Object)],t.prototype,"option",void 0),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"disabled",null),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"checked",null),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],t.prototype,"hidden",null),t=At([e.Component({selector:"dato-option-v2:not([multi])",changeDetection:e.ChangeDetectionStrategy.OnPush,template:Vi()}),bt("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),Gi=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.indeterminatelyChecked=!1,n.check=new e.EventEmitter,n}var o;return ft(n,t),o=n,n.prototype.onCheck=function(t){this.allowAction(t.target)&&this.check.emit(this.checked)},n.prototype.toggleChecked=function(t){this.checked=t},n.prototype.allowAction=function(t){for(var e=t;"DATO-OPTION-V2"!==e.tagName;){if(null!==e.getAttribute("data-list-item-ignore"))return!1;e=e.parentElement}return!0},At([e.Input(),bt("design:type",Object)],n.prototype,"indeterminatelyChecked",void 0),At([e.HostListener("mouseup",["$event"]),bt("design:type",Function),bt("design:paramtypes",[Object]),bt("design:returntype",void 0)],n.prototype,"onCheck",null),At([e.Output(),bt("design:type",Object)],n.prototype,"check",void 0),n=o=At([e.Component({selector:"dato-option-v2[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:Li,useExisting:o}],template:Vi(!0)})],n)}(Li);
|
|
240
240
|
/**
|
|
241
241
|
* @license
|
|
242
242
|
* Copyright Datorama. All Rights Reserved.
|
|
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 Vi(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 zi=[bi,vi,
|
|
246
|
+
*/function Vi(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 zi=[bi,vi,Ni,Bi,Li,Gi],Qi=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Co,Le,o.ReactiveFormsModule,_i,se,So,Do],declarations:[zi],exports:[zi],entryComponents:[zi]})],t)}(),Hi=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=At([e.Directive({selector:"[datoSortableHandle]"}),bt("design:paramtypes",[e.Renderer2,e.ElementRef])],t)}(),Ui=[ui,Hi],Yi=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,dt.SortablejsModule],declarations:[Ui],exports:[Ui]})],t)}(),Wi=[ki,Ti,Fi],Ki=[Ci],qi=function(){function t(){}return t=At([e.NgModule({imports:[bo,s.CommonModule,Co,Le,o.ReactiveFormsModule,_i,se,So,Do,Qi,to,Yi],declarations:[Wi,Ki],exports:[Wi,Ki,Qi],entryComponents:[Wi]})],t)}();
|
|
247
247
|
/**
|
|
248
248
|
* @license
|
|
249
249
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -251,35 +251,35 @@ function fi(){return'\n <div class="dato-checkbox"><label><p class="dato-si
|
|
|
251
251
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
252
252
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
253
253
|
*/
|
|
254
|
-
var qi=function(t,e,n){var o=Lt(t[n])?"":(""+t[n]).toLocaleLowerCase();return!!o&&o.includes(e.toLowerCase())},Yi=function(t,e,n){var o=function(t){return Lt(t)?"":t.toString()};if(t=o(t),e=o(e),n){var i=t.toLowerCase(),r=e.toLowerCase(),a=i===n,s=r===n;if(a||s)return[+s-+a,1e3];var l=0===i.indexOf(n),c=0===r.indexOf(n);if(l||c)return[+c-+l,10]}return[t.localeCompare(e),0]},Zi={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Xi})),multi:!0},Xi=function(t){function s(e,n,i,r){var a=t.call(this)||this;return a.cdr=e,a.translate=n,a.host=i,a.datoSize=r,a.autoFocus=!0,a.debounceTime=300,a.idKey="id",a.isLoading=!1,a.labelKey="label",a.searchGroupLabels=!0,a.searchStrategy=qi,a.sortComparator=Yi,a.sort=!0,a.allowSelectAll=!1,a.visibleOptions=[],a.searchControl=new o.FormControl,a._searchPlaceholder=a.translate.transform("core.search"),a._data=[],a._searchData=[],a._dataIsDirty=!1,a._hasSearchResults=!0,a._model=[],a.initialRun=!0,a.isSearching=!1,a.trackByFn=a._trackByFn.bind(a),a}return ft(s,t),Object.defineProperty(s.prototype,"dataSet",{set:function(t){var e=this;this.initialRun?this._data=t:this._data=this.normalizeData(t),this._dataIsDirty?(Promise.resolve().then((function(){e.initOptions()})),this.isSearching?(this.isSearching=!1,this.cdr.detectChanges(),setTimeout((function(){e.performSearch()}))):this.setVisibleOptions()):this.setVisibleOptions(),this._dataIsDirty=!0,this._hasData=ye(t)>0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"searchPlaceholder",{set:function(t){this._searchPlaceholder=this.translate.transform(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasGroups",{get:function(){return this.data.some((function(t){return t.children}))},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_visibleOptions",{get:function(){return this.hasGroups?this.data.reduce((function(t,e){return t.push.apply(t,xt(e.children)),t}),[]):this.data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"visibleCheckedCount",{get:function(){var t=this;return this.visibleOptions.reduce((function(e,n){return t._model.indexOf(n)>-1?e+1:e}),0)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isAllChecked",{get:function(){return this.visibleCheckedCount===this.visibleOptions.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"data",{get:function(){return this.isSearching?this._searchData:this._data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasSearchResults",{get:function(){return!this.isSearching||this._hasSearchResults},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasResults",{get:function(){return this.data.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasValue",{get:function(){return this._model.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"searchTerm",{get:function(){return(this.searchControl.value||"").trim()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_count",{get:function(){var t=this.visibleOptions.length;return"("+this.visibleCheckedCount+"/"+t+")"},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){this.listenToSearch(),this._data=this.normalizeData(this._data),this.initialRun=!1,this.datoSize=this.datoSize||"sm",this._listClass="list-"+this.datoSize},s.prototype._trackByFn=function(t,e){return this.getGroupKey(e)||t},s.prototype.ngAfterContentInit=function(){var t=this;this.options.changes.pipe(i.untilDestroyed(this)).subscribe((function(e){return t.initOptions()})),this.keyboardEventsManager=new pt.ListKeyManager(this.options).withWrap().withVerticalOrientation(!0),this.keyboardEventsManagerSubscription=this.keyboardEventsManager.change.pipe(i.untilDestroyed(this)).subscribe((function(e){var n=t.options.toArray();n.length&&(n.forEach((function(t){return t.activeByKeyboard=!1})),n[e].activeByKeyboard=!0,t.scrollToElement(e))})),this.subscribeToOptionClick(this.options)},s.prototype.ngOnDestroy=function(){},s.prototype.keyup=function(t){if(t.stopPropagation(),t.keyCode===a.DOWN_ARROW||t.keyCode===a.UP_ARROW)return this.keyboardEventsManager.onKeydown(t),!1;if(t.keyCode===a.ENTER){var e=this.keyboardEventsManager.activeItemIndex,n=this.options.toArray()[e];return this.handleClick(n),!1}},s.prototype.checkAll=function(t){var e,n,o,i;try{for(var r=wt(this.options.toArray()),a=r.next();!a.done;a=r.next()){var s=a.value;s.disabled||(s.active=t)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}var l=this.visibleOptions;if(t){var c=[];try{for(var p=wt(l),d=p.next();!d.done;d=p.next()){var u=d.value;-1===this._model.indexOf(u)&&c.push(u)}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}this._model=xt(this._model,c)}else this._model=this._model.filter((function(t){return-1===l.indexOf(t)}));this.onChange(this._model)},s.prototype.setDisabledState=function(t){this._disabled=t,this.cdr.markForCheck()},s.prototype.writeValue=function(t){var e=this,n=Lt(t)?[]:Z.coerceArray(t);0===this._model.length&&0===n.length||(this._model=n,setTimeout((function(){e.markAsActive(e._model),e.cdr.markForCheck()})))},s.prototype.initOptions=function(){this.subscribeToOptionClick(this.options),this.markAsActive(this._model)},s.prototype.normalizeData=function(t){return this._sort(xi(t,this.labelKey,this.groupBy))},s.prototype._sort=function(t){var e=this;if(t=t||[],this.sort){var n=this.searchTerm.toLowerCase(),o={};t.forEach((function(t){var i=t.children,r=e.getGroupKey(t);if(o[r]=0,i&&i.length&&(t.children.sort((function(t,i){var a=e.sortComparator(t[e.labelKey],i[e.labelKey],n);return o[r]+=a[1],a[0]})),1===t.children.length)){var a=t.children[0][e.labelKey],s=e.sortComparator(a,a,n);o[r]+=s[1]}})),t.sort((function(t,i){if(n){var r=e.getGroupKey(t),a=e.getGroupKey(i);if(o[r]>o[a])return-1;if(o[r]<o[a])return 1}return e.sortComparator(t[e.labelKey],i[e.labelKey],n)[0]}))}return t},s.prototype.isAccordionGroup=function(){return this.accordion&&this.accordion.length},s.prototype.getGroupComponentsArray=function(){return this.isAccordionGroup()?this.accordion.first.groups.toArray():this.groups&&this.groups.toArray()},s.prototype.handleClick=function(t){var e=this;t.active=!t.active;var n=t.option;t.active?this._model=this._model.concat(n):this._model=this._model.filter((function(t){return t[e.idKey]!==n[e.idKey]})),this.onChange(this._model),this.cdr.markForCheck()},s.prototype.isEmpty=function(t){return""===t.trim()},s.prototype.listenToSearch=function(){var t=this;this.searchControl.valueChanges.pipe(r.debounceTime(this.debounceTime),i.untilDestroyed(this)).subscribe((function(e){t.performSearch()}))},s.prototype.performSearch=function(){var t=this,e=this.searchControl.value;if(this.isEmpty(e)){this.isSearching=!1;var n=this.isAccordionGroup();this._data=this._sort(this._data),this.getGroupComponentsArray().forEach((function(t){if(t._hidden=!1,n){var e=t;if(e.__expended){e.__expended=!1;var o=e;o.content.disableAnimation=!1,o.expand(!1)}}}))}else{var o=this.search(e);this._searchData=this._sort(o.results),this._hasSearchResults=o.hasResults,this.isSearching=!0}this.setVisibleOptions(),this.cdr.markForCheck(),setTimeout((function(){t.keyboardEventsManager.setActiveItem(0)}))},s.prototype.markAsActive=function(t){var e,n,o=this,i=function(e){e.active=t.find((function(t){return t[o.idKey]===e.option[o.idKey]}))};try{for(var r=wt(this.options.toArray()),a=r.next();!a.done;a=r.next()){i(a.value)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},s.prototype.scrollToElement=function(t){var e=Ft(".dato-list__options",this.host.nativeElement);if(e){var n=e.scrollTop,o=this.options.filter((function(t){return!t.disabled})).length;if(0===t)n=0;else if(t===o)n=e.scrollHeight;else{n=this.currentIndex>t?e.scrollTop-35:35+e.scrollTop}e.scrollTop=n,this.currentIndex=t}},s.prototype.search=function(t){var e=this;if(this.hasGroups)return this.groupSearch(t);var n=this._data.reduce((function(n,o){return e.searchStrategy(o,t,e.labelKey)&&n.push(o),n}),[]);return{results:n,hasResults:n.length}},s.prototype.groupSearch=function(t){var e=this,n=this.getGroupComponentsArray(),o=this.isAccordionGroup(),i=!1;return{results:this._data.reduce((function(r,a,s){var l=a.children,c=mt(mt({},a),{children:[]}),p=e.getGroupKey(c),d=!1;r.push(c),e.searchGroupLabels&&e.searchStrategy(a,t,e.labelKey)?(d=!0,c.children=l):(c.children=l.filter((function(n){return e.searchStrategy(n,t,e.labelKey)})),d=c.children.length),d&&(i=!0);var u=n.find((function(t){return t.__key===p}))||n[s];if(u&&(u._hidden=!d,u.__key=p,o&&d)){var h=u;h.expanded||(h.content.disableAnimation=!0,h.expand(!0),u.__expended=!0)}return r}),[]),hasResults:i}},s.prototype.getGroupKey=function(t){return t&&(t[this.idKey]||t[this.labelKey])},s.prototype.subscribeToOptionClick=function(t){var e=this;this.clicksSubscription&&this.clicksSubscription.unsubscribe();var o=t.map((function(t){return t.click$.pipe(r.mapTo(t))}));this.clicksSubscription=n.merge.apply(void 0,xt(o)).pipe(r.debounceTime(10),i.untilDestroyed(this)).subscribe((function(t){t.disabled||e.handleClick(t)}))},s.prototype.setVisibleOptions=function(){this.visibleOptions=this._visibleOptions},s.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:jn},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]}]},vt([e.ContentChildren(bi,{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"options",void 0),vt([e.ContentChildren(vi),Ct("design:type",e.QueryList)],s.prototype,"groups",void 0),vt([e.ContentChildren(e.forwardRef((function(){return ui})),{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"accordion",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"autoFocus",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],s.prototype,"dataSet",null),vt([e.Input(),Ct("design:type",Object)],s.prototype,"debounceTime",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"groupBy",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"idKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isLoading",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"searchGroupLabels",void 0),vt([e.Input(),Ct("design:type",Function)],s.prototype,"searchStrategy",void 0),vt([e.Input(),Ct("design:type",Function)],s.prototype,"sortComparator",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"sort",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"allowSelectAll",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],s.prototype,"searchPlaceholder",null),s=vt([e.Component({selector:"dato-list",template:'<div class="d-flex-column min-height-0">\n <dato-input [datoSize]="datoSize"\n [placeholder]="_searchPlaceholder"\n (keyup)="keyup($event)"\n [isFocused]="autoFocus"\n [isLoading]="isLoading"\n [formControl]="searchControl"\n type="search">\n </dato-input>\n <div class="overflow-y-scroll dato-list__options" [ngClass]="_listClass" [class.hide]="!_hasData || !hasSearchResults">\n \x3c!-- HEADER --\x3e\n\n <header class="dato-select__header dato-select__option dato-select__option--simple select-all" *ngIf="allowSelectAll && _hasData">\n <dato-checkbox [checked]="_isAllChecked" (check)="checkAll($event)">\n <span [datoFont]="datoSize === \'sm\' ? \'note\' : \'simple\'">{{\'core.select-all\' | translate}}<span class="primary-300-color note-italic ml-5">{{_count}}</span></span>\n </dato-checkbox>\n </header>\n\n \x3c!-- List Items --\x3e\n <ng-content></ng-content>\n\n </div>\n\n <ng-container *ngIf="_hasData; else noData">\n <div *ngIf="!hasSearchResults" class="note d-flex-column align-center mb-10">\n \x3c!-- Custom No Results Template --\x3e\n <div class="d-flex-1 d-flex-column align-center" #noResultsRef>\n <ng-content select=".no-search-results"></ng-content>\n </div>\n \x3c!-- Default No Results Template --\x3e\n <div class="d-flex-1 d-flex-column align-center default-no-results" *ngIf="noResultsRef.children.length === 0">\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ "core.no-results-found" | translate }}</p>\n <p class="primary-300-color">{{ "core.try-different-keyword" | translate }}</p>\n </div>\n </div>\n </ng-container>\n <ng-template #noData>\n \x3c!-- Custom No Data Template --\x3e\n <div class="d-flex-1 d-flex-column align-center" #noDataRef>\n <ng-content select="[noData]"></ng-content>\n </div>\n \x3c!-- Default No Data Template --\x3e\n <div class="d-flex-1 d-flex-column align-center default-no-data" *ngIf="noDataRef.children.length === 0">\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</div>\n\n\n\n',providers:[Zi],preserveWhitespaces:!1,encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[""]}),bt(3,e.Attribute("datoSize")),Ct("design:paramtypes",[e.ChangeDetectorRef,jn,e.ElementRef,Object])],s)}(Dt),Ji=[Xi],tr=function(){function t(){}return t=vt([e.NgModule({imports:[bo,s.CommonModule,o.ReactiveFormsModule,se,Co,Bi,ji,Do],declarations:[Ji],exports:[Ji],entryComponents:[Ji]})],t)}(),er=[Lo,jo,ii,Go,Vo,No],nr=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule,se,So,To,Fe,Do,Dn,Jn,gi,Co,$i,Bi,bo,tr,st.AgGridModule],entryComponents:[],providers:[oi,_o],declarations:[er],exports:[st.AgGridModule,To,er]})],t)}(),or={cacheKey:"GLOBAL_GRID_KEY"};
|
|
254
|
+
var Ji=function(t,e,n){var o=Ft(t[n])?"":(""+t[n]).toLocaleLowerCase();return!!o&&o.includes(e.toLowerCase())},Xi=function(t,e,n){var o=function(t){return Ft(t)?"":t.toString()};if(t=o(t),e=o(e),n){var i=t.toLowerCase(),r=e.toLowerCase(),a=i===n,s=r===n;if(a||s)return[+s-+a,1e3];var l=0===i.indexOf(n),c=0===r.indexOf(n);if(l||c)return[+c-+l,10]}return[t.localeCompare(e),0]},Zi={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return $i})),multi:!0},$i=function(t){function s(e,n,i,r){var a=t.call(this)||this;return a.cdr=e,a.translate=n,a.host=i,a.datoSize=r,a.autoFocus=!0,a.debounceTime=300,a.idKey="id",a.isLoading=!1,a.labelKey="label",a.searchGroupLabels=!0,a.searchStrategy=Ji,a.sortComparator=Xi,a.sort=!0,a.allowSelectAll=!1,a.visibleOptions=[],a.searchControl=new o.FormControl,a._searchPlaceholder=a.translate.transform("core.search"),a._data=[],a._searchData=[],a._dataIsDirty=!1,a._hasSearchResults=!0,a._model=[],a.initialRun=!0,a.isSearching=!1,a.trackByFn=a._trackByFn.bind(a),a}return ft(s,t),Object.defineProperty(s.prototype,"dataSet",{set:function(t){var e=this;this.initialRun?this._data=t:this._data=this.normalizeData(t),this._dataIsDirty?(Promise.resolve().then((function(){e.initOptions()})),this.isSearching?(this.isSearching=!1,this.cdr.detectChanges(),setTimeout((function(){e.performSearch()}))):this.setVisibleOptions()):this.setVisibleOptions(),this._dataIsDirty=!0,this._hasData=ye(t)>0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"searchPlaceholder",{set:function(t){this._searchPlaceholder=this.translate.transform(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasGroups",{get:function(){return this.data.some((function(t){return t.children}))},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_visibleOptions",{get:function(){return this.hasGroups?this.data.reduce((function(t,e){return t.push.apply(t,St(e.children)),t}),[]):this.data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"visibleCheckedCount",{get:function(){var t=this;return this.visibleOptions.reduce((function(e,n){return t._model.indexOf(n)>-1?e+1:e}),0)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isAllChecked",{get:function(){return this.visibleCheckedCount===this.visibleOptions.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"data",{get:function(){return this.isSearching?this._searchData:this._data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasSearchResults",{get:function(){return!this.isSearching||this._hasSearchResults},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasResults",{get:function(){return this.data.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasValue",{get:function(){return this._model.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"searchTerm",{get:function(){return(this.searchControl.value||"").trim()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_count",{get:function(){var t=this.visibleOptions.length;return"("+this.visibleCheckedCount+"/"+t+")"},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){this.listenToSearch(),this._data=this.normalizeData(this._data),this.initialRun=!1,this.datoSize=this.datoSize||"sm",this._listClass="list-"+this.datoSize},s.prototype._trackByFn=function(t,e){return this.getGroupKey(e)||t},s.prototype.ngAfterContentInit=function(){var t=this;this.options.changes.pipe(i.untilDestroyed(this)).subscribe((function(e){return t.initOptions()})),this.keyboardEventsManager=new pt.ListKeyManager(this.options).withWrap().withVerticalOrientation(!0),this.keyboardEventsManagerSubscription=this.keyboardEventsManager.change.pipe(i.untilDestroyed(this)).subscribe((function(e){var n=t.options.toArray();n.length&&(n.forEach((function(t){return t.activeByKeyboard=!1})),n[e].activeByKeyboard=!0,t.scrollToElement(e))})),this.subscribeToOptionClick(this.options)},s.prototype.ngOnDestroy=function(){},s.prototype.keyup=function(t){if(t.stopPropagation(),t.keyCode===a.DOWN_ARROW||t.keyCode===a.UP_ARROW)return this.keyboardEventsManager.onKeydown(t),!1;if(t.keyCode===a.ENTER){var e=this.keyboardEventsManager.activeItemIndex,n=this.options.toArray()[e];return this.handleClick(n),!1}},s.prototype.checkAll=function(t){var e,n,o,i;try{for(var r=Ct(this.options.toArray()),a=r.next();!a.done;a=r.next()){var s=a.value;s.disabled||(s.active=t)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}var l=this.visibleOptions;if(t){var c=[];try{for(var p=Ct(l),d=p.next();!d.done;d=p.next()){var u=d.value;-1===this._model.indexOf(u)&&c.push(u)}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}this._model=St(this._model,c)}else this._model=this._model.filter((function(t){return-1===l.indexOf(t)}));this.onChange(this._model)},s.prototype.setDisabledState=function(t){this._disabled=t,this.cdr.markForCheck()},s.prototype.writeValue=function(t){var e=this,n=Ft(t)?[]:X.coerceArray(t);0===this._model.length&&0===n.length||(this._model=n,setTimeout((function(){e.markAsActive(e._model),e.cdr.markForCheck()})))},s.prototype.initOptions=function(){this.subscribeToOptionClick(this.options),this.markAsActive(this._model)},s.prototype.normalizeData=function(t){return this._sort(xi(t,this.labelKey,this.groupBy))},s.prototype._sort=function(t){var e=this;if(t=t||[],this.sort){var n=this.searchTerm.toLowerCase(),o={};t.forEach((function(t){var i=t.children,r=e.getGroupKey(t);if(o[r]=0,i&&i.length&&(t.children.sort((function(t,i){var a=e.sortComparator(t[e.labelKey],i[e.labelKey],n);return o[r]+=a[1],a[0]})),1===t.children.length)){var a=t.children[0][e.labelKey],s=e.sortComparator(a,a,n);o[r]+=s[1]}})),t.sort((function(t,i){if(n){var r=e.getGroupKey(t),a=e.getGroupKey(i);if(o[r]>o[a])return-1;if(o[r]<o[a])return 1}return e.sortComparator(t[e.labelKey],i[e.labelKey],n)[0]}))}return t},s.prototype.isAccordionGroup=function(){return this.accordion&&this.accordion.length},s.prototype.getGroupComponentsArray=function(){return this.isAccordionGroup()?this.accordion.first.groups.toArray():this.groups&&this.groups.toArray()},s.prototype.handleClick=function(t){var e=this;t.active=!t.active;var n=t.option;t.active?this._model=this._model.concat(n):this._model=this._model.filter((function(t){return t[e.idKey]!==n[e.idKey]})),this.onChange(this._model),this.cdr.markForCheck()},s.prototype.isEmpty=function(t){return""===t.trim()},s.prototype.listenToSearch=function(){var t=this;this.searchControl.valueChanges.pipe(r.debounceTime(this.debounceTime),i.untilDestroyed(this)).subscribe((function(e){t.performSearch()}))},s.prototype.performSearch=function(){var t=this,e=this.searchControl.value;if(this.isEmpty(e)){this.isSearching=!1;var n=this.isAccordionGroup();this._data=this._sort(this._data),this.getGroupComponentsArray().forEach((function(t){if(t._hidden=!1,n){var e=t;if(e.__expended){e.__expended=!1;var o=e;o.content.disableAnimation=!1,o.expand(!1)}}}))}else{var o=this.search(e);this._searchData=this._sort(o.results),this._hasSearchResults=o.hasResults,this.isSearching=!0}this.setVisibleOptions(),this.cdr.markForCheck(),setTimeout((function(){t.keyboardEventsManager.setActiveItem(0)}))},s.prototype.markAsActive=function(t){var e,n,o=this,i=function(e){e.active=t.find((function(t){return t[o.idKey]===e.option[o.idKey]}))};try{for(var r=Ct(this.options.toArray()),a=r.next();!a.done;a=r.next()){i(a.value)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},s.prototype.scrollToElement=function(t){var e=Bt(".dato-list__options",this.host.nativeElement);if(e){var n=e.scrollTop,o=this.options.filter((function(t){return!t.disabled})).length;if(0===t)n=0;else if(t===o)n=e.scrollHeight;else{n=this.currentIndex>t?e.scrollTop-35:35+e.scrollTop}e.scrollTop=n,this.currentIndex=t}},s.prototype.search=function(t){var e=this;if(this.hasGroups)return this.groupSearch(t);var n=this._data.reduce((function(n,o){return e.searchStrategy(o,t,e.labelKey)&&n.push(o),n}),[]);return{results:n,hasResults:n.length}},s.prototype.groupSearch=function(t){var e=this,n=this.getGroupComponentsArray(),o=this.isAccordionGroup(),i=!1;return{results:this._data.reduce((function(r,a,s){var l=a.children,c=mt(mt({},a),{children:[]}),p=e.getGroupKey(c),d=!1;r.push(c),e.searchGroupLabels&&e.searchStrategy(a,t,e.labelKey)?(d=!0,c.children=l):(c.children=l.filter((function(n){return e.searchStrategy(n,t,e.labelKey)})),d=c.children.length),d&&(i=!0);var u=n.find((function(t){return t.__key===p}))||n[s];if(u&&(u._hidden=!d,u.__key=p,o&&d)){var h=u;h.expanded||(h.content.disableAnimation=!0,h.expand(!0),u.__expended=!0)}return r}),[]),hasResults:i}},s.prototype.getGroupKey=function(t){return t&&(t[this.idKey]||t[this.labelKey])},s.prototype.subscribeToOptionClick=function(t){var e=this;this.clicksSubscription&&this.clicksSubscription.unsubscribe();var o=t.map((function(t){return t.click$.pipe(r.mapTo(t))}));this.clicksSubscription=n.merge.apply(void 0,St(o)).pipe(r.debounceTime(10),i.untilDestroyed(this)).subscribe((function(t){t.disabled||e.handleClick(t)}))},s.prototype.setVisibleOptions=function(){this.visibleOptions=this._visibleOptions},s.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:_n},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]}]},At([e.ContentChildren(bi,{descendants:!0}),bt("design:type",e.QueryList)],s.prototype,"options",void 0),At([e.ContentChildren(vi),bt("design:type",e.QueryList)],s.prototype,"groups",void 0),At([e.ContentChildren(e.forwardRef((function(){return hi})),{descendants:!0}),bt("design:type",e.QueryList)],s.prototype,"accordion",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"autoFocus",void 0),At([e.Input(),bt("design:type",Array),bt("design:paramtypes",[Array])],s.prototype,"dataSet",null),At([e.Input(),bt("design:type",Object)],s.prototype,"debounceTime",void 0),At([e.Input(),bt("design:type",String)],s.prototype,"groupBy",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"idKey",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"isLoading",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"labelKey",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"searchGroupLabels",void 0),At([e.Input(),bt("design:type",Function)],s.prototype,"searchStrategy",void 0),At([e.Input(),bt("design:type",Function)],s.prototype,"sortComparator",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"sort",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"allowSelectAll",void 0),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],s.prototype,"searchPlaceholder",null),s=At([e.Component({selector:"dato-list",template:'<div class="d-flex-column min-height-0">\n <dato-input [datoSize]="datoSize"\n [placeholder]="_searchPlaceholder"\n (keyup)="keyup($event)"\n [isFocused]="autoFocus"\n [isLoading]="isLoading"\n [formControl]="searchControl"\n type="search">\n </dato-input>\n <div class="overflow-y-scroll dato-list__options" [ngClass]="_listClass" [class.hide]="!_hasData || !hasSearchResults">\n \x3c!-- HEADER --\x3e\n\n <header class="dato-select__header dato-select__option dato-select__option--simple select-all" *ngIf="allowSelectAll && _hasData">\n <dato-checkbox [checked]="_isAllChecked" (check)="checkAll($event)">\n <span [datoFont]="datoSize === \'sm\' ? \'note\' : \'simple\'">{{\'core.select-all\' | translate}}<span class="primary-300-color note-italic ml-5">{{_count}}</span></span>\n </dato-checkbox>\n </header>\n\n \x3c!-- List Items --\x3e\n <ng-content></ng-content>\n\n </div>\n\n <ng-container *ngIf="_hasData; else noData">\n <div *ngIf="!hasSearchResults" class="note d-flex-column align-center mb-10">\n \x3c!-- Custom No Results Template --\x3e\n <div class="d-flex-1 d-flex-column align-center" #noResultsRef>\n <ng-content select=".no-search-results"></ng-content>\n </div>\n \x3c!-- Default No Results Template --\x3e\n <div class="d-flex-1 d-flex-column align-center default-no-results" *ngIf="noResultsRef.children.length === 0">\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ "core.no-results-found" | translate }}</p>\n <p class="primary-300-color">{{ "core.try-different-keyword" | translate }}</p>\n </div>\n </div>\n </ng-container>\n <ng-template #noData>\n \x3c!-- Custom No Data Template --\x3e\n <div class="d-flex-1 d-flex-column align-center" #noDataRef>\n <ng-content select="[noData]"></ng-content>\n </div>\n \x3c!-- Default No Data Template --\x3e\n <div class="d-flex-1 d-flex-column align-center default-no-data" *ngIf="noDataRef.children.length === 0">\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</div>\n\n\n\n',providers:[Zi],preserveWhitespaces:!1,encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[""]}),vt(3,e.Attribute("datoSize")),bt("design:paramtypes",[e.ChangeDetectorRef,_n,e.ElementRef,Object])],s)}(Ot),tr=[$i],er=function(){function t(){}return t=At([e.NgModule({imports:[bo,s.CommonModule,o.ReactiveFormsModule,se,Co,Qi,_i,Do],declarations:[tr],exports:[tr],entryComponents:[tr]})],t)}(),nr=[No,_o,ri,Go,Vo,Bo],or=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule,se,So,Io,Le,Do,Dn,to,fi,Co,qi,Qi,bo,er,st.AgGridModule],entryComponents:[],providers:[ii,Mo],declarations:[nr],exports:[st.AgGridModule,Io,nr]})],t)}(),ir={cacheKey:"GLOBAL_GRID_KEY"};
|
|
255
255
|
/**
|
|
256
256
|
* @license
|
|
257
257
|
* Copyright Datorama. All Rights Reserved.
|
|
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
|
|
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}}
|
|
262
262
|
/**
|
|
263
263
|
* @license
|
|
264
264
|
* Copyright Datorama. All Rights Reserved.
|
|
265
265
|
*
|
|
266
266
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
267
267
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
268
|
-
*/var
|
|
268
|
+
*/var cr=function(t){function o(){var e=t.call(this)||this;return e.datoGridReady=new n.Subject,e.onFilterSortChangedBind=e.onFilterSortChanged.bind(e),e.gridName=e.getGridName(),e}return ft(o,t),Object.defineProperty(o.prototype,"gridViewChild",{set:function(t){this.initialGridReady(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"gridContentChild",{set:function(t){this.initialGridReady(t)},enumerable:!0,configurable:!0}),o.prototype.getGridName=function(){return ve(this.constructor)},o.prototype.getOptions=function(){return{}},o.prototype.ngOnInit=function(){this.options=mt({columnDefs:this.getColumns()},this.getOptions()),this.toolbarActions=this.getToolbarActions()},o.prototype.ngOnDestroy=function(){this.datoGridReady.complete()},o.prototype.removeEventListeners=function(){this.gridApi.removeEventListener("filterChanged",this.onFilterSortChangedBind),this.gridApi.removeEventListener("sortChanged",this.onFilterSortChangedBind)},o.prototype.registerEvents=function(){this.removeEventListeners(),this.gridApi.addEventListener("filterChanged",this.onFilterSortChangedBind),this.gridApi.addEventListener("sortChanged",this.onFilterSortChangedBind)},o.prototype.onFilterSortChanged=function(){var t=this.gridApi.getFilterModel(),e=this.gridApi.getSortModel();sr(this.gridName,{filter:t,sort:e})},o.prototype.setSavedModel=function(){var t=lr(this.gridName),e=t.sort,n=t.filter;e&&this.gridApi.setSortModel(e),n&&this.gridApi.setFilterModel(n)},o.prototype.initialGridReady=function(t){var e=this;t&&t.gridReady.subscribe((function(n){e.gridApi=n.api,e.columnApi=n.columnApi,e.gridRef=t,e.datoGridReady.next(n),e.setSavedModel(),e.registerEvents()}))},At([e.ViewChild(No),bt("design:type",No),bt("design:paramtypes",[No])],o.prototype,"gridViewChild",null),At([e.ContentChild(No),bt("design:type",No),bt("design:paramtypes",[No])],o.prototype,"gridContentChild",null),o=At([e.Directive(),bt("design:paramtypes",[])],o)}(Ro);
|
|
269
269
|
/**
|
|
270
270
|
* @license
|
|
271
271
|
* Copyright Datorama. All Rights Reserved.
|
|
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
|
|
275
|
+
*/var pr=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=At([e.Injectable(),X.StoreConfig({name:"grid"}),bt("design:paramtypes",[])],n)}(X.Store);function dr(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 ur(t){var e=t.field,n=t.showRowGroup,o=t.pivotValueColumn;return o?o.getColId():e||n}function hr(t){var e;try{e=JSON.parse(t)}catch(t){}return e}function gr(t,e){return!t.disabledHTMLRenderingFields||!t.disabledHTMLRenderingFields.includes(ur(e))}var fr,mr,yr,Ar,vr=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&&X.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=dr(i)),s},o.prototype.getSortModel=function(){return this.api.grid.getSortModel().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:ur(i.getColDef())};var a=this.getSecondaryColumn(e);if(a){var s=o||r.indexOf(a);return{colId:e,sort:n,field:ur(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:pr}]},o=At([e.Injectable(),bt("design:paramtypes",[pr])],o)}(X.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
|
-
*/(
|
|
282
|
+
*/(mr=t.DatoGridFilterTypes||(t.DatoGridFilterTypes={})).String="String",mr.Number="Number",mr.Date="Date",mr.None="None",(yr=t.DatoGridFilterSections||(t.DatoGridFilterSections={})).By_Value="By_Value",yr.Conditional="Conditional",(Ar=t.DatoFilterConditions||(t.DatoFilterConditions={})).EQUALS="EQUALS",Ar.NOT_EQUALS="NOT_EQUALS",Ar.GREATER_THAN="GREATER_THAN",Ar.GREATER_EQUALS="GREATER_EQUALS",Ar.LESS_THAN="LESS_THAN",Ar.LESS_EQUALS="LESS_EQUALS",Ar.IN_RANGE="IN_RANGE",Ar.CONTAINS="CONTAINS",Ar.NOT_CONTAINS="NOT_CONTAINS",Ar.STARTS_WITH="STARTS_WITH",Ar.ENDS_WITH="ENDS_WITH",Ar.IN_LIST="IN_LIST",Ar.NOT_IN_LIST="NOT_IN_LIST",Ar.IS_EMPTY="IS_EMPTY",Ar.NOT_EMPTY="NOT_EMPTY",Ar.IS_NULL="IS_NULL",Ar.NOT_NULL="NOT_NULL";var br,Cr,wr,Sr=[t.DatoFilterConditions.IN_RANGE,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.LESS_THAN,t.DatoFilterConditions.GREATER_THAN],xr=[t.DatoFilterConditions.CONTAINS,t.DatoFilterConditions.NOT_CONTAINS,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.NOT_EQUALS,t.DatoFilterConditions.STARTS_WITH,t.DatoFilterConditions.ENDS_WITH],Or=[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],Dr=((fr={})[t.DatoGridFilterTypes.String]=xr,fr[t.DatoGridFilterTypes.Number]=Or,fr[t.DatoGridFilterTypes.Date]=Sr,fr);function Er(e){return e.condition===t.DatoFilterConditions.IN_RANGE}function Ir(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 Rr(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 Ft(s);case t.DatoFilterConditions.NOT_EMPTY:case t.DatoFilterConditions.NOT_NULL:return!Ft(s)}}function Tr(e,n){var o=n.condition,i=n.value,r=n.rangeEnd,a=e?ln(H.startOfDay(new Date(e))):null,s=ln(new Date(i));switch(o){case t.DatoFilterConditions.EQUALS:return H.isEqual(a,s);case t.DatoFilterConditions.NOT_EQUALS:return!H.isEqual(a,s);case t.DatoFilterConditions.GREATER_THAN:return H.isAfter(a,s);case t.DatoFilterConditions.LESS_THAN:return H.isBefore(a,s);case t.DatoFilterConditions.IN_RANGE:var l=ln(H.endOfDay(new Date(r)));return H.isEqual(a,s)||H.isEqual(a,l)||H.isAfter(a,s)&&H.isBefore(a,l);case t.DatoFilterConditions.IS_EMPTY:return Ft(e);case t.DatoFilterConditions.NOT_EMPTY:return!Ft(e)}}function Pr(e){var n=e.rowValue,o=e.condition,i=e.type,r=e.filterKey;switch(i){case t.DatoGridFilterTypes.Date:return Tr(n,o);case t.DatoGridFilterTypes.Number:return Rr(n,o,r);default:return Ir(n,o)}}function kr(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=hr(o);i&&(n=t(e[o],St(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 Pr({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=Ct(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 jr(t,e,n,o){return t.map((function(t){return mt(mt({},t),{visible:Mr(t,e,n,o)})}))}function Mr(t,e,n,o){var i=t.visibleWhen;return[Lr(i,n,o),_r(i),Fr(i,e),Nr(i,e),Br(i,e)].some(Boolean)}function _r(e){return e===t.RowSelectionTypeV2.ALWAYS||void 0===e}function Fr(e,n){return e===t.RowSelectionTypeV2.ANY&&n>0}function Nr(e,n){return e===t.RowSelectionTypeV2.SINGLE&&1===n}function Br(e,n){return e===t.RowSelectionTypeV2.MULTI&&n>1}function Lr(t,e,n){return Tt(t)&&!!t(e,n)}function Gr(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 Ft(t.template)})),c=a.isSelected()?de(St([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?Gr(mt(mt({},t),{toolbarActions:a})):null}),l&&p.push("separator")};try{for(var u=Ct(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}(br=t.OperatorTypes||(t.OperatorTypes={})).AND="AND",br.OR="OR",(Cr=t.GridActionType||(t.GridActionType={})).CUSTOM="CUSTOM",Cr.CREATE="CREATE",Cr.EXPORT="EXPORT",(wr=t.RowSelectionTypeV2||(t.RowSelectionTypeV2={}))[wr.SINGLE=0]="SINGLE",wr[wr.MULTI=1]="MULTI",wr[wr.ANY=2]="ANY",wr[wr.ALWAYS=3]="ALWAYS";var Vr,zr,Qr,Hr,Ur=new e.InjectionToken("DATO_GRID_STORAGE_API"),Yr=function(t,e,n){return t&&t.value?'<div class="value-wrapper ellipsis">'+Wr(t,e,n)+"</div>":null},Wr=function(t,e,n){void 0===n&&(n=!0);var o=(t.valueFormatted||t.value||"").toString();return o=n?ot.sanitize(o):xe(o),(e=(e||"").trim())?o.replace(new RegExp(Oe(e),"gi"),(function(t){return'<span class="search-highlight">'+t+"</span>"})):o};(Vr=t.GridMinWidths||(t.GridMinWidths={}))[Vr.Default=107]="Default",Vr[Vr.With_Info=131]="With_Info",(zr=t.DatoGridColumnTypes||(t.DatoGridColumnTypes={})).String="String",zr.Number="Number",zr.Date="Date",zr.Status="Status",zr.Items="Items",zr.ItemsCount="ItemsCount",zr.Initials="Initials",zr.Avatar="Avatar",(Qr=t.GridRowSelectionType||(t.GridRowSelectionType={})).SINGLE="single",Qr.MULTIPLE="multiple",(Hr=t.GridStatusColumnTypes||(t.GridStatusColumnTypes={})).SUCCESS="SUCCESS",Hr.FAILURE="FAILURE",Hr.IN_PROGRESS="IN_PROGRESS",Hr.PENDING="PENDING",Hr.WAITING="WAITING";
|
|
283
283
|
/**
|
|
284
284
|
* @license
|
|
285
285
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -287,21 +287,21 @@ var qi=function(t,e,n){var o=Lt(t[n])?"":(""+t[n]).toLocaleLowerCase();return!!o
|
|
|
287
287
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
288
288
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
289
289
|
*/
|
|
290
|
-
var
|
|
290
|
+
var Kr=function(){function t(){}return t.prototype.agInit=function(t){},t=At([e.Component({selector:"dato-grid-v2-loader",template:"<dato-page-loader></dato-page-loader>\n",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();function qr(t){return t&&"object"==typeof t&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function Jr(t,e){var n;return e&&!0===e.clone&&qr(t)?$r((n=t,Array.isArray(n)?[]:{}),t,e):t}function Xr(t,e,n){var o=t.slice();return e.forEach((function(e,i){void 0===o[i]?o[i]=Jr(e,n):qr(e)?o[i]=$r(t[i],e,n):-1===t.indexOf(e)&&o.push(Jr(e,n))})),o}function Zr(t,e){return t}function $r(t,e,n){void 0===n&&(n={arrayMerge:Zr});var o=Array.isArray(e),i=(n||{arrayMerge:Xr}).arrayMerge||Xr;return o?Array.isArray(t)?i(t,e,n):Jr(e,n):function(t,e,n){var o={};return qr(t)&&Object.keys(t).forEach((function(e){o[e]=Jr(t[e],n)})),Object.keys(e).forEach((function(i){qr(e[i])&&t[i]?o[i]=$r(t[i],e[i],n):o[i]=Jr(e[i],n)})),o}(t,e,n)}
|
|
291
291
|
/**
|
|
292
292
|
* @license
|
|
293
293
|
* Copyright Datorama. All Rights Reserved.
|
|
294
294
|
*
|
|
295
295
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
296
296
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
297
|
-
*/var
|
|
297
|
+
*/var ta=function(){function t(t,e,n,o){this.gridQuery=t,this.gridService=e,this.element=n,this.cdr=o,this.config={}}return Object.defineProperty(t.prototype,"overlayStyles",{get:function(){if(this.gridBody){var t=this.gridBody;return{height:t.offsetHeight+"px",marginTop:t.offsetTop+"px"}}return null},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e=this.element.nativeElement.closest("dato-grid-v2");this.gridBody=e&&e.querySelector(".ag-body-viewport"),this.filterActive$=this.gridQuery.filterActive$,this.hasError$=this.gridQuery.isServerSide?this.gridQuery.serverSideError$.pipe(r.tap((function(){setTimeout((function(){t.cdr.detectChanges()}))}))):n.of(!1),this.initDefaultConfig();var o=$r(this.gridQuery.getGridOptions().overlaysConfig||{},this.config);this.mergedConfig=$r(this.defaultConfig,o)},t.prototype.clearFilters=function(){this.gridService.clearAllFilters()},t.prototype.agInit=function(t){},t.prototype.isIconHidden=function(){var t,e;if(this.gridBody){var n=this.element.nativeElement;if(n){var o=n.querySelector(".container"),i=0;if(0===o.querySelector("img").height)return!0;try{for(var r=Ct(o.children),a=r.next();!a.done;a=r.next()){var s=a.value;i+=(s.offsetHeight||s.height||0)+fe(s.style.marginBottom.replace("px",""))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return i>this.gridBody.offsetHeight}}return!0},t.prototype.initDefaultConfig=function(){var t=this.gridQuery.getGridOptions().enableSearch;this.defaultConfig={noData:{icon:"core/grid/no-data.svg",text:"core.no-items-to-display"},noResult:{icon:"core/grid/no-results.svg",text:t?"core.no-matching-search-results":"core.no-matching-results"},serverSideError:{icon:"core/grid/alert.svg",text:"core.unable-to-load-data"}}},t.ctorParameters=function(){return[{type:vr},{type:La},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},At([e.Input(),bt("design:type",Object)],t.prototype,"config",void 0),At([e.HostBinding("style"),bt("design:type",Object),bt("design:paramtypes",[])],t.prototype,"overlayStyles",null),t=At([e.Component({selector:"dato-grid-v2-no-data-overlay",template:'<div class="container d-flex-column align-center height-100 p-4">\n <ng-container *ngIf="(hasError$ | async) === false; else error">\n <ng-container *ngIf="(filterActive$ | async) === true; else noData">\n <ng-container *ngTemplateOutlet="imgNText; context: {$implicit: mergedConfig.noResult }"></ng-container>\n <div class="d-flex items-center">\n <div class="dato-simple primary-400-color">{{\'core.try-to-adjust-or\' | translate}} </div>\n <dato-link (click)="clearFilters()">{{ \'core.clear-filters\' | translate }}</dato-link>\n </div>\n </ng-container>\n <ng-template #noData>\n <ng-container *ngTemplateOutlet="imgNText; context: {$implicit: mergedConfig.noData}"></ng-container>\n <ng-content select="[no-data-content]"></ng-content>\n </ng-template>\n\n </ng-container>\n <ng-template #error>\n <ng-container *ngTemplateOutlet="imgNText; context: {$implicit: mergedConfig.serverSideError}"></ng-container>\n <div #errorContent><ng-content select="[server-error-content]"></ng-content></div>\n <div class="dato-simple primary-400-color" *ngIf="errorContent.children.length === 0">{{\'core.try-to-refresh-or-contact\' | translate}} </div>\n </ng-template>\n</div>\n\n<ng-template #imgNText let-view>\n <img [datoStaticSrc]="view.icon" *ngIf="view.icon" [hidden]="isIconHidden()" [style.marginBottom]="\'30px\'">\n <div class="dato-simple-bold primary-500-color" [style.marginBottom]="\'3px\'">{{ view.text | translate }}</div>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{pointer-events:all;overflow:auto}"]}),bt("design:paramtypes",[vr,La,e.ElementRef,e.ChangeDetectorRef])],t)}();
|
|
298
298
|
/**
|
|
299
299
|
* @license
|
|
300
300
|
* Copyright Datorama. All Rights Reserved.
|
|
301
301
|
*
|
|
302
302
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
303
303
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
304
|
-
*/function
|
|
304
|
+
*/function ea(t){var e=t.resolver,n=t.component,o=t.injector,i=t.projectableNodes;return e.resolveComponentFactory(n).create(o,i)}var na,oa=function(){function t(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}return t.prototype.destroy=function(t){this.viewRef&&t.detachView(this.viewRef),this.viewRef&&this.viewRef.destroy(),this.componentRef&&this.componentRef.destroy(),this.viewRef=null,this.componentRef=null,this.nodes=null},t}();function ia(t){var n=t.content,o=t.resolver,i=t.injector,r=t.applicationRef,a=t.context,s=t.vcr;if("string"==typeof n){var l=document.createTextNode(n);return new oa([[l]])}if(n instanceof e.TemplateRef){var c=void 0;return s?(c=s.createEmbeddedView(n)).detectChanges():(c=n.createEmbeddedView(a),r.attachView(c)),new oa([c.rootNodes],c)}var p=o.resolveComponentFactory(n).create(i);return r.attachView(p.hostView),new oa([[p.location.nativeElement]],p.hostView,p)}(na=t.PopoverTrigger||(t.PopoverTrigger={}))[na.Outside=0]="Outside",na[na.Cancel=1]="Cancel",na[na.Apply=2]="Apply",na[na.Open=3]="Open",na[na.Close=4]="Close";
|
|
305
305
|
/**
|
|
306
306
|
* @license
|
|
307
307
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -309,35 +309,35 @@ var Qr=function(){function t(){}return t.prototype.agInit=function(t){},t=vt([e.
|
|
|
309
309
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
310
310
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
311
311
|
*/
|
|
312
|
-
var
|
|
312
|
+
var ra,aa=function(){function t(t){this.host=t}return t.prototype.ngOnInit=function(){Vt(this.host.nativeElement,"index",this.index.toString()),Gt(this.host.nativeElement,"zIndex",Nn()),this.className&&Ht(this.element,this.className),this.width&&Gt(this.element,"width",rt.coerceCssPixelValue(this.width)),this.height&&Gt(this.element,"height",rt.coerceCssPixelValue(this.height))},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},t=At([e.Component({selector:"dato-popover",template:'<section class="dato-popover">\n <ng-content></ng-content>\n</section>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush}),bt("design:paramtypes",[e.ElementRef])],t)}(),sa=function(t,e){this.data=t,this.close=e},la=function(){function t(t){this.params=t,this.destroy=new n.Subject,this.destroy$=this.destroy.asObservable(),this.onInit()}return t.prototype.is=function(t){return this.params.config.id===t},t.prototype.getIndex=function(){return this.params.index},t.prototype.close=function(t){this.child&&(this.child.close(t),this.child=null),this.removeWrapper(),this.params.contentRef.destroy(this.params.appRef),this.params.popperComponent.destroy(),this.popper&&this.popper.destroy(),this.params.contentRef=null,this.params.popperComponent=null,this.params.createPopper=null,this.params=null,this.popper=null,this.destroy.next(t),this.destroy.complete()},t.prototype.onInit=function(){var t=this,e=this.params,n=e.popperComponent,o=e.origin,i=e.config;this.setComponentData(n);var r=n.location.nativeElement;Qt(r,{position:"absolute",left:"-9999px"}),this.removeWrapper=Xt(r),this.params.createPopper(o,r,i.popper).subscribe((function(e){return t.popper=e}))},t.prototype.setComponentData=function(t){var n=t.instance,o=this.params.config,i=o.className,r=o.width,a=o.height;n.className=i,n.width=r,n.height=a,n.index=this.params.index,t.hostView.detectChanges(),t.injector.get(e.ChangeDetectorRef).detectChanges()},t}(),ca=function(){function o(t,e,n,o,i,r,a){this.resolver=t,this.translate=e,this.injector=n,this.appRef=o,this.zone=i,this.popper=r,this.document=a,this.stack=[],this.enableClose=!0}return o.prototype.open=function(t,e,n){void 0===n&&(n={});var o,i,a=(o=function(t){void 0===t&&(t={});var e=t.boundary?document.querySelector(t.boundary):void 0;return{popper:{placement:"bottom",modifiers:[{name:"offset",options:{offset:t.offset||[0,5]}},{name:"preventOverflow",enabled:!!e,options:{boundary:e}}]},enableClose:!0}}({boundary:n.popper.boundary,offset:n.popper.offset}),i=n,mt(mt(mt({},o),i),{popper:mt(mt(mt({},o.popper),i.popper),{modifiers:St(o.popper.modifiers||[],i.popper.modifiers||[])})}));this.setEnableClose(a.enableClose),this.handleBodyClick();var s=new sa(a.data,this.close.bind(this)),l=this.createInjector(a.viewContainerRef,s),c=ia({applicationRef:this.appRef,injector:l,vcr:a.viewContainerRef,resolver:this.resolver,content:_t(t)?this.translate.transform(t):t}),p=ea({component:aa,injector:l,projectableNodes:c.nodes,resolver:this.resolver}),d=new la({popperComponent:p,contentRef:c,appRef:this.appRef,config:a,origin:e,index:this.stack.length,zone:this.zone,createPopper:this.popper.create});return this.stack.length&&(pe(this.stack).child=d),this.stack.push(d),d.destroy$.pipe(r.take(1))},o.prototype.close=function(t){var e=wt(this.stack,1)[0];e&&e.close(t),this.bodySubscription&&this.bodySubscription.unsubscribe(),this.bodySubscription=null,this.stack=[]},o.prototype.setEnableClose=function(t){this.enableClose=t},o.prototype.closeById=function(t,e){var n=this.stack.findIndex((function(e){return e.is(t)}));this.removeChildFromParent(n-1),this.closeByIndex(n,e)},o.prototype.removeChildFromParent=function(t){var e=this.stack[t];e&&(e.child=null)},o.prototype.closeByIndex=function(e,n){this.stack=this.stack.filter((function(o,i){return i<e||(o.close(n||{type:t.PopoverTrigger.Outside,data:null}),!1)}))},o.prototype.createInjector=function(t,n){var o=t?t.injector:this.injector;return e.Injector.create({parent:o,providers:[{provide:sa,useValue:n}]})},o.prototype.handleBodyClick=function(){var e=this;this.bodySubscription||(this.bodySubscription=n.fromEvent(document.body,"click",{capture:!0}).subscribe((function(n){var o=n.target,i=o.hasAttribute("data-is-floating"),r=o.hasAttribute("data-popover-origin");if(!i&&!r&&e.enableClose){var a=ee(o,"dato-popover");if(a){var s=fe(zt(a,"index")),l=e.stack[s].child;l&&(e.removeChildFromParent(s),e.closeByIndex(l.getIndex()))}else e.close({type:t.PopoverTrigger.Outside,data:null})}})))},o.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:_n},{type:e.Injector},{type:e.ApplicationRef},{type:e.NgZone},{type:Pn},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(_n),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.NgZone),e.ɵɵinject(Pn),e.ɵɵinject(s.DOCUMENT))},token:o,providedIn:"root"}),o=At([e.Injectable({providedIn:"root"}),vt(6,e.Inject(s.DOCUMENT)),bt("design:paramtypes",[e.ComponentFactoryResolver,_n,e.Injector,e.ApplicationRef,e.NgZone,Pn,Object])],o)}();(ra=t.DatoGridMoreMenuActions||(t.DatoGridMoreMenuActions={}))[ra.FIT=0]="FIT",ra[ra.GROUP=1]="GROUP",ra[ra.HIDE=2]="HIDE",ra[ra.PIN=3]="PIN";var pa=[t.DatoGridMoreMenuActions.FIT,t.DatoGridMoreMenuActions.GROUP,t.DatoGridMoreMenuActions.HIDE,t.DatoGridMoreMenuActions.PIN],da=function(){function n(e){this.popover=e,this.DatoGridMoreMenuActions=t.DatoGridMoreMenuActions}return n.prototype.ngOnInit=function(){var t=this.popover.data,e=t.column,n=t.gridQuery;this.column=e;var o=this.column.getColDef(),i=o.headerName,r=o.moreMenuActions,a=void 0===r?pa:r;this.moreMenuActions=a,this.headerName=i,this.aggColumn=-1!==this.column.getColId().indexOf("ag-Grid-AutoColumn"),this.groupsAllowed=!n.getValue().serverSidePagination.enabled},Object.defineProperty(n.prototype,"isPinned",{get:function(){return!!this.column.getPinned()},enumerable:!0,configurable:!0}),n.prototype.displayAction=function(t){return this.moreMenuActions.includes(t)},n.prototype.executeAction=function(t){var e,n=this.popover.data,o=n.api.columns,i=n.gridService,r=n.gridQuery;switch(i._logEvent("Grids - Column Action",{action:t,column:this.column.getColId()}),t){case"Pin":o.setColumnPinned(this.column,"left");break;case"Unpin":o.setColumnPinned(this.column,null);break;case"Autofit":o.autoSizeColumn(this.column);var a=mt(mt({},r.getValue().settings.columnsSizes),((e={})[this.column.getColId()]=1,e));i.updateSettings({gridAlignment:2,columnsSizes:a});break;case"Group":o.addRowGroupColumn(this.column),o.setColumnVisible(this.column,!1),i._logEvent("Grids - Group Added",{totalNumOfGroups:o.getRowGroupColumns().length,column:this.column.getColId(),groupedFrom:"Column"});break;case"Ungroup":o.removeRowGroupColumn(this.column.getColDef().showRowGroup);break;case"Hide":o.setColumnVisible(this.column,!1),i.fitGrid("container")}},n.ctorParameters=function(){return[{type:sa}]},n=At([e.Component({selector:"dato-grid-column-header-more-menu",template:'<div class="d-flex-column primary-0-background-color" datoPopoverClose>\n <button *ngIf="displayAction(DatoGridMoreMenuActions.FIT)" class="primary-600-color" data-auto-id="column-more-menu-autofit" (click)="executeAction(\'Autofit\')">\n <dato-icon datoSize="sm" icon="maximize-horizontal" class="primary-300-color "></dato-icon>\n {{ \'core.autoFitColumn\' | translate:{colName: headerName} }}\n </button>\n <ng-container *ngIf="groupsAllowed && displayAction(DatoGridMoreMenuActions.GROUP)">\n <button class="primary-600-color" data-auto-id="column-more-menu-group"\n (click)="executeAction(aggColumn ? \'Ungroup\' : \'Group\')">\n <dato-icon datoSize="sm" [icon]="aggColumn ? \'ungroup\' : \'group\'"\n class="primary-300-color "></dato-icon>\n {{ (aggColumn ? \'core.ungroup-column\' : \'core.group-by-column\') | translate:{colName: headerName} }}\n </button>\n </ng-container>\n <ng-container *ngIf="!aggColumn && displayAction(DatoGridMoreMenuActions.HIDE)">\n <button class="primary-600-color" data-auto-id="column-more-menu-hide" (click)="executeAction(\'Hide\')">\n <dato-icon datoSize="sm" icon="hide" class="primary-300-color "></dato-icon>\n {{ \'core.hideColumn\' | translate:{colName: headerName} }}\n </button>\n </ng-container>\n <button *ngIf="displayAction(DatoGridMoreMenuActions.PIN)" class="primary-600-color" data-auto-id="column-more-menu-pin"\n (click)="executeAction(isPinned ? \'Unpin\' : \'Pin\')">\n <dato-icon datoSize="sm" icon="pin" class="primary-300-color "></dato-icon>\n {{ (isPinned ? \'core.unpinColumn\' : \'core.pinColumn\') | translate:{colName: headerName} }}\n </button>\n</div>\n'}),bt("design:paramtypes",[sa])],n)}(),ua={meta:"⌘",shift:"⇧",left:"←",right:"→",up:"↑",down:"↓",control:"ctrl"};
|
|
313
313
|
/**
|
|
314
314
|
* @license
|
|
315
315
|
* Copyright Datorama. All Rights Reserved.
|
|
316
316
|
*
|
|
317
317
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
318
318
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
319
|
-
*/function
|
|
319
|
+
*/function ha(){return navigator.platform.indexOf("Mac")>-1}function ga(t){return t.split(".").map((function(t){return"meta"===t&&!1===ha()?ua.control:ua[t]||t})).join(" + ")}
|
|
320
320
|
/**
|
|
321
321
|
* @license
|
|
322
322
|
* Copyright Datorama. All Rights Reserved.
|
|
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 ga,fa=function(t){return t.value},ma=function(t){return{id:t,label:Lt(t)?"(Empty)":(""+t).trim(),value:t}},ya=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}},va=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=ha(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=dr(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=Dr[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||xr;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(ma);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 ya(t,!Lt(n.pivotColumn)&&n.colField)}))}}else{var S=C;this.columnValues=S.map(fa),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)&&Pr({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 Ir(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(ma),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:aa},{type:o.FormBuilder},{type:jn},{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,aa,o.FormBuilder,jn,e.ChangeDetectorRef])],a)}(),ba=function(){function t(t){this.popover=t}return t.prototype.openMoreMenu=function(t,e,n){return void 0===n&&(n=pa),this.openMenu({tpl:n,origin:t,params:e,menuType:"more"})},t.prototype.openFilterMenu=function(t,e,n){return void 0===n&&(n=va),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:la}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(la))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[la])],t)}(),Ca=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.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=dr(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:ba},{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 .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,ba,e.ElementRef,e.ChangeDetectorRef])],o)}();function wa(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}var Sa=function(t){return t[Aa]},xa={getDataPath:Sa,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(r&&_a(t.node),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 _a(t),'<span class="entity-display-name dato-simple-bold">'+c+"</span>";if(s){var d=Ae(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;e=n?n.data.isFolder?n:n.parent:o.rowModel.rootNode;if(Ea){if(Ea.id===e.id)return;var i=ka(Ea.id);i&&i.classList.remove("ag-row-hover"),Ea=null}else Ea=e;if(e){var r=ka(e.id);r&&r.classList.add("ag-row-hover")}},onRowDragEnd:function(t){var e,n,o=t.overNode,i=t.node;o?(e=i.parent,n=o.data.isFolder?o:o.parent):(e=i.rowModel.rootNode,n=i.rowModel.rootNode);var r=i.data,a=i.gridOptionsWrapper.gridOptions.maxDepth||-1;if(r.isFolder&&-1!==a&&"ROOT_NODE_ID"!==e.id&&o.data.agGridFilePath.length>a)return;var s=n.data?n.data[Aa]:[],l=!jt(s,r[Aa]),c=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}(i,n);c&&console.log("invalid move");if(l&&!c){var p=[],d=this.autoGroupColumnDef.gridService.treeConfig.idKey;!function t(e,n,o,i){var r=n.data,a=n.childrenAfterGroup,s=e.slice();r[Aa]=s,o.push(r),ye(a)>0&&a.forEach((function(e){t(xt(s,[r[i]]),e,o,i)}));r[Aa].push(r[i])}(s,i,p,d);var u=this.autoGroupColumnDef.gridService.updateRows(p);g=xt(u.update,[o,e]),f=["ag-row-level-1","ag-row-level-2","ag-row-level-3"],g.forEach((function(t){var e,n,o=document.querySelectorAll('[row-id="'+t.id+'"]')[1];if(o){try{for(var i=wt(f),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),t.data.isFolder&&_a(t,o)}}));var h=ka(Ea.id);h&&h.classList.remove("ag-row-hover"),Ea=null,this.api.clearFocusedCell()}var g,f},onRowSelected:function(t){if(Pa)return;Pa=!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;)ja(e),e=e.parent}(t.node),setTimeout((function(){Pa=!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>'}},Oa=function(t,e){return(t||"").toLowerCase().localeCompare((e||"").toLowerCase())},Da={filter:t.DatoGridFilterTypes.String,comparator:Oa},Ia=mt({hoverConfig:{enabled:!0,maxDisplayedItems:3},enableV2_1:!1,enableSearch:!1,enableSearchHighlight:!0,columnsIncludedInSearchByDefault:!0,includeHiddenColumnsInSearch:!1,enableAllPagesSelection:!0,idColumnKey:"id",enableBackground:!0,columnTypes:(ga={},ga[t.DatoGridColumnTypes.Date]={filter:t.DatoGridFilterTypes.Date,comparator:function(t,e){return wa(t)-wa(e)}},ga[t.DatoGridColumnTypes.Number]={filter:t.DatoGridFilterTypes.Number},ga[t.DatoGridColumnTypes.String]=Da,ga[t.DatoGridColumnTypes.Status]=mt(mt({},Da),{cellRenderer:"DatoGridStatusCellComponent"}),ga[t.DatoGridColumnTypes.Items]=mt(mt({},Da),{cellRenderer:"DatoGridItemsCellComponent"}),ga[t.DatoGridColumnTypes.ItemsCount]=mt(mt({},Da),{cellRenderer:"DatoGridItemsCountCellComponent"}),ga[t.DatoGridColumnTypes.Initials]=mt(mt({},Da),{cellRenderer:"DatoGridInitialsCellComponent"}),ga[t.DatoGridColumnTypes.Avatar]=mt(mt({},Da),{cellRenderer:"DatoGridAvatarCellComponent"}),ga),multiSortKey:"ctrl",suppressPaginationPanel:!0,pagination:!0,deltaColumnMode:!0,loadingOverlayComponentFramework:Qr,noRowsOverlayComponentFramework:Jr,defaultColDef:{minWidth:t.GridMinWidths.Default,sortable:!0,resizable:!0,type:t.DatoGridColumnTypes.String,menuTabs:["filterMenuTab"],headerComponentFramework:Ca},suppressCellSelection:!0,suppressPropertyNamesCheck:!0,rowHeight:35,headerHeight:30,rowSelection:t.GridRowSelectionType.MULTIPLE,rowDeselection:!0,unSortIcon:!0,animateRows:!0,rememberGroupStateWhenNewData:!0,groupMultiAutoColumn:!0,groupDefaultExpanded:-1,usePivotGridStyle:!1,disabledHTMLRenderingFields:[]},Ri()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),Ta={CLIENT:200,SERVER:250},Ra={idKey:"id",parentIDKey:"parentID"},Aa="agGridFilePath";var Ea=null,Pa=!1;function ka(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function _a(t,e){var n=e||document.querySelectorAll('[row-id="'+t.id+'"]')[0];n&&(0===ye(t.childrenAfterGroup)?n.classList.add("ag-empty-folder"):n.classList.remove("ag-empty-folder"))}function ja(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 Ma(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={})[Aa]=i(t,!0),e)):mt(mt({},t),((r={})[Aa]=[t[o]],r))}))}function La(t,e){return t.map((function(t){var n,o=yt(t,[]),i=o[Aa],r=ye(i)>1?i[i.length-2]:0;return delete o[Aa],mt(mt({},o),((n={})[e.parentIDKey]=r,n))}))}var Na=new e.InjectionToken("DATO_CORE_LOGGER"),Fa=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.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:Ga},{type:vr},{type:e.ChangeDetectorRef}]},t=vt([e.Component({selector:"dato-grid-multi-select-column-header",template:'<dato-checkbox class="mt-5" [formControl]="checkboxControl" [indeterminatelyChecked]="indeterminatelyChecked"></dato-checkbox>',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[Ga,vr,e.ChangeDetectorRef])],t)}(),Ga=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=Ra,this.pageNumberToReturnAfterRefresh=-1,this.updateGridActionsSubject=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:Xr(this.gridRef.gridOptions.context||{},t)},o.prototype.updateGridActions=function(){this.updateGridActionsSubject.next(!0)},o.prototype.getUpdateGridActionsStatus=function(){return this.updateGridActionsSubject.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({},Ra),n);var i=Ma(t,o.treeConfig);o.api.grid.setRowData(i)}else o.isPivotMode?o.setPivotModeRows(t):o.api.grid.setRowData(t);e?o.fitGrid("container"):Je()}))},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 Ao("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.normalizeOptions=function(e){var n=this;this.customHeadersTemplates=e.customHeadersTemplates;var o={gridService:this,gridQuery:this.gridQuery};if(e.gridOptions.autoGroupColumnDef=mt(mt({},o),e.gridOptions.autoGroupColumnDef),e.gridOptions.defaultColDef=mt(mt({},e.gridOptions.defaultColDef),{headerComponentParams:o}),void 0===e.gridOptions.enableSearch&&(e.gridOptions.enableSearch=e.gridOptions.enableV2_1),void 0===e.gridOptions.enableBackground&&(e.gridOptions.enableBackground=e.gridOptions.enableV2_1),void 0===e.gridOptions.showMultiSelectionCheckboxes&&(e.gridOptions.showMultiSelectionCheckboxes=e.gridOptions.enableV2_1&&e.gridOptions.rowSelection!==t.GridRowSelectionType.SINGLE),void 0===e.gridOptions.enableSearchHighlight&&(e.gridOptions.enableSearchHighlight=e.gridOptions.enableSearch&&Ia.enableSearchHighlight),e.gridOptions.columnDefs=this.normalizeColumns(e.gridOptions.columnDefs,e.gridOptions),e.gridOptions.isExternalFilterPresent=function(){return!0},e.gridOptions.doesExternalFilterPass=function(t){return Pr({row:t,api:n.gridQuery.api.grid},n.gridQuery.getFilter())&&n.rowMatchesSearch(t)},this.isServerSidePagination(e.gridOptions)){e.gridOptions.blockLoadDebounceMillis=300,this._originalGetRows=e.gridOptions.datasource.getRows,e.gridOptions.datasource.getRows=this.wrapGetRows(e.gridOptions);var i=e.gridOptions.paginationPageSize;i&&(e.gridOptions.cacheBlockSize=i)}this.initEditableColumnsCellClass(e),e.gridOptions.getContextMenuItems=this.wrapContextMenuBuilder(e);var r=e.gridOptions,a=r.saveSettings,s=r.gridName;if(e.gridOptions.saveSettings=!1!==a&&!Lt(s),this.initOnRowSelectedForServerSidePagination(e),e.gridOptions.pivotMode&&(this.initPivotSecondaryColsProcess(e),e.gridOptions.saveSettings=!1),e.gridOptions.usePivotGridStyle){e.gridOptions.rowHeight=30,e.gridOptions.defaultColDef=mt(mt({},e.gridOptions.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}}),e.gridOptions.autoGroupColumnDef=mt(mt({},e.gridOptions.autoGroupColumnDef),{cellClassRules:this.getPivotModeCellClassRules(),headerClass:this.getPivotHeaderClass.bind(this)})}return e.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:Ia.columnsIncludedInSearchByDefault),o.includeInSearch&&!this.hasCellRenderer(o,e)&&e.enableSearchHighlight&&(o.cellRenderer=function(t){var n=hr(e,t.colDef);return Et(o.editable)&&o.editable(t)||!Et(o.editable)&&o.editable?Kr(t,i.gridQuery.getSearchTerm(),n):Wr(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(Ia)},o.prototype.addMultiSelectHeaderColumnIfRequired=function(e,n){var o=n&&n.showMultiSelectionCheckboxes,i=n&&n.rowSelection?n.rowSelection:Ia.rowSelection;return o&&i===t.GridRowSelectionType.MULTIPLE?xt([{colId:this.CHECKBOX_SELECTION_COL_ID,checkboxSelection:!0,headerComponentFramework:Fa,width:30,maxWidth:30,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}),this.api.grid.setSortModel([r]),this.gridRef.gridOptions.usePivotGridStyle&&this.api.grid.redrawRows()}}},o.prototype.updateFilter=function(t,e){var n=dr(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){var e=this.gridQuery.getGridOptions().isGlobalSettings;this.storageAPI.set(this.gridName,t,e)},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),Je()),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;zn(i?i(o):o)},n.isSelected()&&(c=ye(l=e.gridQuery.getSelectedRowNodes())));var p=kr(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)),Gr({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;d.setSortModel(m?[m]:null),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=pr(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=ur(t);return e&&e.value||""})))},n.processSecondaryColGroupDef=function(t){if(t.headerName){var n=ur(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=ur(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{"primary-0-background-color":this.isLeafGroupEvenCell.bind(this),"primary-100-background-color pointer dato-simple-bold":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:cr},{type:vr},{type:jn},{type:Me},{type:Le},{type:void 0,decorators:[{type:e.Inject,args:[Ur]}]},{type:void 0,decorators:[{type:e.Inject,args:[Na]}]}]},o=vt([e.Injectable(),bt(5,e.Inject(Ur)),bt(6,e.Inject(Na)),Ct("design:paramtypes",[cr,vr,jn,Me,Le,Object,Object])],o)}(),Va=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)}(),za=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)}(),Ba=function(){function t(){}return vt([e.Input(),Ct("design:type",String)],t.prototype,"column",void 0),vt([e.ContentChild(Va),Ct("design:type",Object)],t.prototype,"customHeader",void 0),vt([e.ContentChild(za),Ct("design:type",Object)],t.prototype,"moreMenu",void 0),t=vt([e.Component({selector:"dato-custom-header-template",template:"",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Ha={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"}},Ua=function(){function t(t,e,n,o){this.host=t,this.gridService=e,this.gridQuery=n,this.cdr=o,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){var e=this.params,n=e.rowIndex,o=e.node,i=e.column,r=e.value,a=this.gridQuery.api.grid.rowRenderer.rowCompsByIndex[n].getRenderedCellForColumn(i);this.gridService.updateGridContext({contextMenu:{fromOnHover:!0}}),a.beans.contextMenuFactory.showMenu(o,i,r,t)},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=kr(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=Ha.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:Ga},{type:vr},{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,Ga,vr,e.ChangeDetectorRef])],t)}(),Ka=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:ha(o),description:n}),t}),[])},t.ctorParameters=function(){return[{type:Wo}]},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",[Wo])],t)}(),Wa=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===ua()&&(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(Ka,{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:Jo}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(ut.EventManager),e.ɵɵinject(s.DOCUMENT),e.ɵɵinject(Jo))},token:o,providedIn:"root"}),o=vt([e.Injectable({providedIn:"root"}),bt(1,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[ut.EventManager,Object,Jo])],o)}(),Qa=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.contentInit=new n.Subject,this.gridReady$=this.gridQuery.gridReady$,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=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.ngAfterContentInit=function(){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=o.gridOptions.isGlobalSettings,i=!1===o.gridOptions.saveSettings?n.of(null):o.storageAPI.get(o.gridOptions.gridName,e);return n.combineLatest([t.gridReady,i])})),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(){this.gridOptions.treeData&&(this.gridOptions=mt(mt({},this.gridOptions),{pagination:!1}));var t={gridOptions:this.gridOptions,customHeadersTemplates:this.customHeadersTemplates,rowActions:this.rowActions},e=this.gridService.normalizeOptions(t);return Xr(mt(mt(mt({},Ia),this.gridOptions.treeData?xa:{}),{icons:this.getGridIcons(),disabledHTMLRenderingFields:e.disabledHTMLRenderingFields||Ia.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=pr(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=hr(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=ta({component:Ua,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?La(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:Ga},{type:vr},{type:e.ChangeDetectorRef},{type:Me},{type:jn},{type:e.ElementRef},{type:e.Injector},{type:e.ComponentFactoryResolver},{type:Wa},{type:void 0,decorators:[{type:e.Inject,args:[Ur]}]}]},vt([e.ContentChildren(Ba),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:[vr,Ga,cr],styles:[":host{display:flex;flex-direction:column;flex-grow:1}"]}),bt(9,e.Inject(Ur)),Ct("design:paramtypes",[Ga,vr,e.ChangeDetectorRef,Me,jn,e.ElementRef,e.Injector,e.ComponentFactoryResolver,Wa,Object])],t)}(),$a=function(){function t(t,e){this.controller=t,this.host=e}return Object.defineProperty(t.prototype,"grid",{set:function(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:Qa},{type:e.ElementRef}]},vt([e.ViewChild(st.AgGridNg2,{static:!0}),Ct("design:type",st.AgGridNg2),Ct("design:paramtypes",[st.AgGridNg2])],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}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}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",[Qa,e.ElementRef])],t)}(),qa=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:aa}]},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",[aa])],t)}(),Ya=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:aa}]},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",[aa])],t)}(),Za=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:Qa},{type:vr}]},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",[Qa,vr])],t)}();
|
|
326
|
+
*/var fa,ma=function(t){return t.value},ya=function(t){return{id:t,label:Ft(t)?"(Empty)":(""+t).trim(),value:t}},Aa=function(t,e){var n=t.value,o=t.formattedValue;return{id:e&&n?n[e]:n,label:Ft(o)?"(Empty)":(""+(e?o[e]:o)).trim(),value:e&&n?n[e]:n}},va=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=ga(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=ur(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=Dr[m];if(this.pivotColumn=s.api.columns.getSecondaryPivotColumn(d,p),this.inputConditionsOperator=f.inputConditionsOperator,Ft(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!Ft(t)&&he(t.pivotKeys,n.pivotKeys)}))),this.filterSections.Conditional){var A=y||xr;if(f.showEmptyConditions){var v=[t.DatoFilterConditions.IS_EMPTY,t.DatoFilterConditions.NOT_EMPTY];this.filterType===t.DatoGridFilterTypes.Number&&(v=[t.DatoFilterConditions.IS_NULL,t.DatoFilterConditions.NOT_NULL]),A=St(A,v)}this.conditionalFilterOptions=A.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 b=f.predefinedListValues;if(this.isClientSideGrid=!Ft(b)||!s.isServerSide,!b||this.isStringArray(b)){if(w=b)this.columnValues=w,this.listOptions=w.map(ya);else{var C=this.getColumnValues().filter((function(t){return!Ft(t.value)}));this.columnValues=C.map((function(t){var e=t.value;return!Ft(n.pivotColumn)&&e?e[n.colField]:e})),this.listOptions=C.map((function(t){return Aa(t,!Ft(n.pivotColumn)&&n.colField)}))}}else{var w=b;this.columnValues=w.map(ma),this.listOptions=w}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=Ae(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)&&kr({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!Ft(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 Er(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,St(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 _t(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(ya),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=wt(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:sa},{type:o.FormBuilder},{type:_n},{type:e.ChangeDetectorRef}]},At([e.ViewChildren("operatorToggler"),bt("design:type",e.QueryList),bt("design:paramtypes",[e.QueryList])],a.prototype,"operatorToggler",null),a=At([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}"]}),bt("design:paramtypes",[e.ElementRef,sa,o.FormBuilder,_n,e.ChangeDetectorRef])],a)}(),ba=function(){function t(t){this.popover=t}return t.prototype.openMoreMenu=function(t,e,n){return void 0===n&&(n=da),this.openMenu({tpl:n,origin:t,params:e,menuType:"more"})},t.prototype.openFilterMenu=function(t,e,n){return void 0===n&&(n=va),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:ca}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(ca))},token:t,providedIn:"root"}),t=At([e.Injectable({providedIn:"root"}),bt("design:paramtypes",[ca])],t)}(),Ca=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.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=Ft(a.moreMenuActions)||a.moreMenuActions.length>0,this.field=ur(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:ba},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},o=At([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}"]}),bt("design:paramtypes",[e.ViewContainerRef,ba,e.ElementRef,e.ChangeDetectorRef])],o)}();function wa(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}var Sa=function(t){return t[Ta]},xa={getDataPath:Sa,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=Te(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;e=n?n.data.isFolder?n:n.parent:o.rowModel.rootNode;if(Pa){if(Pa.id===e.id)return;var i=ja(Pa.id);i&&i.classList.remove("ag-row-hover"),Pa=null}else Pa=e;if(e){var r=ja(e.id);r&&r.classList.add("ag-row-hover")}},onRowDragEnd:function(t){var e,n,o=t.overNode,i=t.node;o?(e=i.parent,n=o.data.isFolder?o:o.parent):(e=i.rowModel.rootNode,n=i.rowModel.rootNode);var r=i.data,a=i.gridOptionsWrapper.gridOptions.maxDepth||-1;if(r.isFolder&&-1!==a&&"ROOT_NODE_ID"!==e.id&&o.data.agGridFilePath.length>a)return;var s=n.data?n.data[Ta]:[],l=!Mt(s,r[Ta]),c=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}(i,n);c&&console.log("invalid move");if(l&&!c){var p=[],d=this.autoGroupColumnDef.gridService.treeConfig.idKey;!function t(e,n,o,i){var r=n.data,a=n.childrenAfterGroup,s=e.slice();r[Ta]=s,o.push(r),ye(a)>0&&a.forEach((function(e){t(St(s,[r[i]]),e,o,i)}));r[Ta].push(r[i])}(s,i,p,d);var u=this.autoGroupColumnDef.gridService.updateRows(p);g=St(u.update,[o,e]),f=["ag-row-level-1","ag-row-level-2","ag-row-level-3"],g.forEach((function(t){var e,n,o=document.querySelectorAll('[row-id="'+t.id+'"]')[1];if(o){try{for(var i=Ct(f),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 h=ja(Pa.id);h&&h.classList.remove("ag-row-hover"),Pa=null,this.api.redrawRows({rowNodes:[e,n]}),this.api.clearFocusedCell()}var g,f},onRowSelected:function(t){if(ka)return;ka=!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;)Ma(e),e=e.parent}(t.node),setTimeout((function(){ka=!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>'}},Oa=function(t,e){return(t||"").toLowerCase().localeCompare((e||"").toLowerCase())},Da={filter:t.DatoGridFilterTypes.String,comparator:Oa},Ea=mt({hoverConfig:{enabled:!0,maxDisplayedItems:3},enableV2_1:!1,enableSearch:!1,enableSearchHighlight:!0,columnsIncludedInSearchByDefault:!0,includeHiddenColumnsInSearch:!1,enableAllPagesSelection:!0,idColumnKey:"id",enableBackground:!0,columnTypes:(fa={},fa[t.DatoGridColumnTypes.Date]={filter:t.DatoGridFilterTypes.Date,comparator:function(t,e){return wa(t)-wa(e)}},fa[t.DatoGridColumnTypes.Number]={filter:t.DatoGridFilterTypes.Number},fa[t.DatoGridColumnTypes.String]=Da,fa[t.DatoGridColumnTypes.Status]=mt(mt({},Da),{cellRenderer:"DatoGridStatusCellComponent"}),fa[t.DatoGridColumnTypes.Items]=mt(mt({},Da),{cellRenderer:"DatoGridItemsCellComponent"}),fa[t.DatoGridColumnTypes.ItemsCount]=mt(mt({},Da),{cellRenderer:"DatoGridItemsCountCellComponent"}),fa[t.DatoGridColumnTypes.Initials]=mt(mt({},Da),{cellRenderer:"DatoGridInitialsCellComponent"}),fa[t.DatoGridColumnTypes.Avatar]=mt(mt({},Da),{cellRenderer:"DatoGridAvatarCellComponent"}),fa),multiSortKey:"ctrl",suppressPaginationPanel:!0,pagination:!0,paginateChildRows:!0,deltaColumnMode:!0,loadingOverlayComponentFramework:Kr,noRowsOverlayComponentFramework:ta,defaultColDef:{minWidth:t.GridMinWidths.Default,sortable:!0,resizable:!0,type:t.DatoGridColumnTypes.String,menuTabs:["filterMenuTab"],headerComponentFramework:Ca},suppressCellSelection:!0,suppressPropertyNamesCheck:!0,rowHeight:35,headerHeight:30,rowSelection:t.GridRowSelectionType.MULTIPLE,rowDeselection:!0,unSortIcon:!0,animateRows:!0,rememberGroupStateWhenNewData:!0,groupMultiAutoColumn:!0,groupDefaultExpanded:-1,usePivotGridStyle:!1,disabledHTMLRenderingFields:[]},Ri()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),Ia={CLIENT:200,SERVER:250},Ra={idKey:"id",parentIDKey:"parentID"},Ta="agGridFilePath";var Pa=null,ka=!1;function ja(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function Ma(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 _a(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,St(l))}return a};return t.map((function(t){var e,r;return t[n]?mt(mt({},t),((e={})[Ta]=i(t,!0),e)):mt(mt({},t),((r={})[Ta]=[t[o]],r))}))}function Fa(t,e){return t.map((function(t){var n,o=yt(t,[]),i=o[Ta],r=ye(i)>1?i[i.length-2]:0;return delete o[Ta],mt(mt({},o),((n={})[e.parentIDKey]=r,n))}))}var Na=new e.InjectionToken("DATO_CORE_LOGGER"),Ba=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.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(St(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:La},{type:vr},{type:e.ChangeDetectorRef}]},t=At([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}"]}),bt("design:paramtypes",[La,vr,e.ChangeDetectorRef])],t)}(),La=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=Ra,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:$r(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({},Ra),n);var i=_a(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 Ft(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){(_t(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 To("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&&Ea.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 kr({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&&!Ft(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:Ea.columnsIncludedInSearchByDefault),o.includeInSearch&&!this.hasCellRenderer(o,e)&&e.enableSearchHighlight&&(o.cellRenderer=function(t){var n=gr(e,t.colDef);return Tt(o.editable)&&o.editable(t)||!Tt(o.editable)&&o.editable?Yr(t,i.gridQuery.getSearchTerm(),n):Wr(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(Ea)},o.prototype.addMultiSelectHeaderColumnIfRequired=function(e,n){var o=n&&n.showMultiSelectionCheckboxes,i=n&&n.rowSelection?n.rowSelection:Ea.rowSelection;return o&&i===t.GridRowSelectionType.MULTIPLE?St([{colId:this.CHECKBOX_SELECTION_COL_ID,checkboxSelection:!0,headerComponentFramework:Ba,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:St(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=Ct(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=Ct(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(!Ft(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}),this.api.grid.setSortModel([r]),this.gridRef.gridOptions.usePivotGridStyle&&this.api.grid.redrawRows()}}},o.prototype.updateFilter=function(t,e){var n=ur(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(Tt(t.editable)){var n=t.cellClass;t.cellClass=function(o){if(t.editable(o)){var i=e.addEditableCellClass(n);return Tt(i)?i(o):i}return Tt(n)?n(o):n}}else t.cellClass=e.addEditableCellClass(t.cellClass)}))},o.prototype.wrapContextMenuBuilder=function(t){var e=this,n=t.gridOptions.customContextMenu,o=Tt(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=wt(t,1)[0],o=e.api.grid.getValue(r.getColId(),n),i=r.getColDef().valueFormatter;zn(i&&"string"!=typeof i?i(o):o)},n.isSelected()&&(c=ye(l=e.gridQuery.getSelectedRowNodes())));var p=jr(o,c,l,e.gridQuery.isServerSelectAllRowsEnabled).filter((function(t){return t.visible})),d=[i];return s?d=p:p.length>0&&(d=St([mt(mt({},i),{separator:!0})],p)),Gr({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=Ft(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;d.setSortModel(m?[m]:null),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,A=l?l.filter((function(t){return t!==e.CHECKBOX_SELECTION_COL_ID})):null;ye(y)>0?u.setColumnsPinned(y,"left"):A&&u.setColumnsPinned(A,null),l&&u.moveColumns(l,0)},o.prototype.getSettingsDiff=function(){return we(this.gridQuery.getCurrentGridSettings(),this.initialSettings)},o.prototype.resetTableSettings=function(){var t=this.initialSettings,e=t.filter,n=yt(t,["filter"]),o=dr(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=Ct(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=wt(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=Ct(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=wt(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 Ft(t)?"dato-editable-cell":Tt(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=hr(t);return e&&e.value||""})))},n.processSecondaryColGroupDef=function(t){if(t.headerName){var n=hr(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=wt(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=hr(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=Ct(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:pr},{type:vr},{type:_n},{type:Fe},{type:Ne},{type:void 0,decorators:[{type:e.Inject,args:[Ur]}]},{type:void 0,decorators:[{type:e.Inject,args:[Na]}]}]},o=At([e.Injectable(),vt(5,e.Inject(Ur)),vt(6,e.Inject(Na)),bt("design:paramtypes",[pr,vr,_n,Fe,Ne,Object,Object])],o)}(),Ga=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=At([e.Directive({selector:"[datoCustomHeader]"}),bt("design:paramtypes",[e.TemplateRef])],t)}(),Va=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=At([e.Directive({selector:"[datoCustomMoreMenu]"}),bt("design:paramtypes",[e.TemplateRef])],t)}(),za=function(){function t(){}return At([e.Input(),bt("design:type",String)],t.prototype,"column",void 0),At([e.ContentChild(Ga),bt("design:type",Object)],t.prototype,"customHeader",void 0),At([e.ContentChild(Va),bt("design:type",Object)],t.prototype,"moreMenu",void 0),t=At([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"}},Ha=function(){function t(t,e,n,o){this.host=t,this.gridService=e,this.gridQuery=n,this.cdr=o,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}),Qt(this.hostEl,{top:this.row.rowTop+"px",height:this.row.rowHeight+"px",opacity:1,zIndex:1,pointerEvents:"all"})},t.prototype.hide=function(){Qt(this.hostEl,{opacity:0,pointerEvents:"none",zIndex:-1})},t.prototype.openActionMenu=function(t){var e=this.params,n=e.rowIndex,o=e.node,i=e.column,r=e.value,a=this.gridQuery.api.grid.rowRenderer.rowCompsByIndex[n].getRenderedCellForColumn(i);this.gridService.updateGridContext({contextMenu:{fromOnHover:!0}}),a.beans.contextMenuFactory.showMenu(o,i,r,t)},t.prototype.updateScrollPos=function(t){Qt(this.hostEl,{left:t-this.hostEl.scrollWidth-1+"px"})},t.prototype.callAction=function(t){Tt(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=jr(e,1,[this.row],!1).filter((function(t){var e=t.template,n=t.icon,o=t.visible;return Ft(e)&&_t(n)&&o}));this.displayedActions=o.filter((function(t){return jt(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%)";Qt(this.hostEl,{backgroundImage:i})},t.ctorParameters=function(){return[{type:e.ElementRef},{type:La},{type:vr},{type:e.ChangeDetectorRef}]},t=At([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}"]}),bt("design:paramtypes",[e.ElementRef,La,vr,e.ChangeDetectorRef])],t)}(),Ua=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:ga(o),description:n}),t}),[])},t.ctorParameters=function(){return[{type:Wo}]},t=At([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}"]}),bt("design:paramtypes",[Wo])],t)}(),Ya=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=wt(r.split(".")),g=h[0],f=h.slice(1);return"meta"===g&&!1===ha()&&(u=St(["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(Ua,{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=At([e.Injectable({providedIn:"root"}),vt(1,e.Inject(s.DOCUMENT)),bt("design:paramtypes",[ut.EventManager,Object,ti])],o)}(),Wa=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=wt(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)||Ht(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 $r(mt(mt(mt({},Ea),this.gridOptions.treeData?xa:{}),{icons:this.getGridIcons(),disabledHTMLRenderingFields:e.disabledHTMLRenderingFields||Ea.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=wt(e.columns,1)[0],i=mt({},n.gridQuery.getColumnSizes());i?i[o.getColId()]=o.getActualWidth():i=dr(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:Bt(".ag-center-cols-container",this.agGridEl),centerViewport:Bt(".ag-center-cols-viewport",this.agGridEl),bodyViewport:Bt(".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||Ft(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!Ft(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=gr(this.gridOptions,t.colDef),o={cell:e,value:e.innerText,allowHTML:n};Ft(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 Z(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=ea({component:Ha,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?Fa(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:La},{type:vr},{type:e.ChangeDetectorRef},{type:Fe},{type:_n},{type:e.ElementRef},{type:e.Injector},{type:e.ComponentFactoryResolver},{type:Ya},{type:void 0,decorators:[{type:e.Inject,args:[Ur]}]}]},At([e.ContentChildren(za),bt("design:type",e.QueryList)],t.prototype,"customHeadersTemplates",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"onGridChange",void 0),At([e.Input(),bt("design:type",Array)],t.prototype,"rowActions",void 0),At([e.Input(),bt("design:type",Array)],t.prototype,"gridActions",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"gridOptions",null),t=At([e.Component({selector:"dato-grid-controller",template:"\n <ng-content></ng-content>\n ",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[vr,La,pr],styles:[":host{display:flex;flex-direction:column;flex-grow:1}"]}),vt(9,e.Inject(Ur)),bt("design:paramtypes",[La,vr,e.ChangeDetectorRef,Fe,_n,e.ElementRef,e.Injector,e.ComponentFactoryResolver,Ya,Object])],t)}(),Ka=function(){function t(t,e){this.controller=t,this.host=e}return Object.defineProperty(t.prototype,"grid",{set:function(t){if(t){var e=Bt("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:Wa},{type:e.ElementRef}]},At([e.ViewChild(st.AgGridAngular,{static:!1}),bt("design:type",st.AgGridAngular),bt("design:paramtypes",[st.AgGridAngular])],t.prototype,"grid",null),t=At([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}"]}),bt("design:paramtypes",[Wa,e.ElementRef])],t)}(),qa=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:sa}]},t=At([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}"]}),bt("design:paramtypes",[sa])],t)}(),Ja=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=St(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:sa}]},t=At([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}"]}),bt("design:paramtypes",[sa])],t)}(),Xa=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:Wa},{type:vr}]},At([e.Input(),bt("design:type",Object)],t.prototype,"displayRowCount",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"headerClass",void 0),t=At([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}),bt("design:paramtypes",[Wa,vr])],t)}();
|
|
327
327
|
/**
|
|
328
328
|
* @license
|
|
329
329
|
* Copyright Datorama. All Rights Reserved.
|
|
330
330
|
*
|
|
331
331
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
332
332
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
333
|
-
*/function
|
|
333
|
+
*/function Za(t){return function(e){return n.defer((function(){var n=!1;return e.pipe(r.tap((function(e){n||(t(e),n=!0)})))}))}}
|
|
334
334
|
/**
|
|
335
335
|
* @license
|
|
336
336
|
* Copyright Datorama. All Rights Reserved.
|
|
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 Ja=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),Xa((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:jn},{type:vr},{type:Ga},{type:Qa},{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,jn,vr,Ga,Qa,s.DecimalPipe])],t)}(),ts=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)}(),es=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.subscribeUpdateGridActions()},o.prototype.getCellValueChangeEvent=function(){var t=this;return this.gridController.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.cellValueChanged.pipe(r.debounceTime(100),i.untilDestroyed(t))}))},o.prototype.getRowDataUpdatedEvent=function(){var t=this;return this.gridController.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.rowDataUpdated.pipe(r.debounceTime(100),i.untilDestroyed(t))}))},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=kr(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 o?o({value:n}):n}})}},o.prototype.resetSettings=function(){this.gridController.gridService.resetTableSettings()},o.prototype.openColumnMenu=function(){this.popover.open(qa,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(Ya,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.subscribeUpdateGridActions=function(){var t=this;this.gridService.getUpdateGridActionsStatus().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:Qa},{type:e.ChangeDetectorRef},{type:jn},{type:la},{type:vr},{type:Ga}]},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",[Qa,e.ChangeDetectorRef,jn,la,vr,Ga])],o)}(),ns=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:la}]},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",[la])],n)}(),os=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=Xr({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:la},{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",[la,e.ElementRef])],t)}(),is=[ra,ns,os],rs=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[is],exports:[is],entryComponents:[ra]})],t)}(),as=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",Ln()),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)}(),ss=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:En}]},vt([e.ContentChild(as),Ct("design:type",as)],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",[En])],o)}(),ls=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:ss,decorators:[{type:e.Optional}]}]},vt([e.Input("datoMenuTriggerFor"),Ct("design:type",ss),Ct("design:paramtypes",[ss])],t.prototype,"childMenu",null),t=vt([e.Directive({selector:"[datoMenuTriggerFor]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,e.NgZone,ss])],t)}(),cs=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:ss},{type:ls,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,ss,ls])],t)}(),ps=[ss,cs,ls,as],ds=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[ps],exports:[ps],entryComponents:[ss]})],t)}(),us={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return hs})),multi:!0},hs=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:[us],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),gs=[hs],fs=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Do],declarations:[gs],exports:[gs],entryComponents:[gs]})],t)}(),ms=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)}(),ys=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)}(),vs=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)}(),bs=new e.InjectionToken("FORM_ERRORS",{providedIn:"root",factory:function(){return{}}}),Cs=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(ms);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 Ao("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:[bs]}]},{type:ys,decorators:[{type:e.Optional}]},{type:vs,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(bs)),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,ys,vs,o.NgControl,o.ControlContainer])],t)}(),ws=[ms,ys,Cs,vs],Ss=function(){function t(){}return t=vt([e.NgModule({declarations:[ws],imports:[s.CommonModule,bo],exports:[ws],entryComponents:[ms]})],t)}(),xs=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)}(),Os=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&&(Ds(this.increment.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.incrementValue()})),Ds(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(xs,{static:!0}),Ct("design:type",xs)],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 $a=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),Za((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&&Ft(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&&Ft(this.gridApi.getCacheBlockState()[t])},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:_n},{type:vr},{type:La},{type:Wa},{type:s.DecimalPipe}]},At([e.ViewChild("navigation",{static:!0}),bt("design:type",e.ElementRef),bt("design:paramtypes",[e.ElementRef])],t.prototype,"content",null),t=At([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}"]}),bt("design:paramtypes",[e.ChangeDetectorRef,_n,vr,La,Wa,s.DecimalPipe])],t)}(),ts=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}),At([e.Input(),bt("design:type",String)],t.prototype,"icon",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"label",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"shortLabel",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"tooltip",void 0),At([e.Input(),bt("design:type",Boolean)],t.prototype,"disabled",void 0),At([e.Input(),bt("design:type",Boolean)],t.prototype,"enableV2_1",void 0),At([e.Input(),bt("design:type",Function)],t.prototype,"getMenu",void 0),At([e.Input(),bt("design:type",Boolean)],t.prototype,"isLast",void 0),At([e.Input(),bt("design:type",Number)],t.prototype,"widthToHideLabel",void 0),At([e.Input(),bt("design:type",Number)],t.prototype,"widthForShortLabel",void 0),t=At([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)}(),es=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(Tt(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=jr(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(Tt(n))n(mt(mt({},this.api),this.gridQuery.getValue().settings));else{var o=H.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 o?o({value:n}):n}})}},o.prototype.resetSettings=function(){this.gridController.gridService.resetTableSettings()},o.prototype.openColumnMenu=function(){this.popover.open(qa,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(Ja,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:Wa},{type:e.ChangeDetectorRef},{type:_n},{type:ca},{type:vr},{type:La}]},At([e.ViewChild("groupTrigger",{read:e.ElementRef,static:!1}),bt("design:type",e.ElementRef)],o.prototype,"groupTrigger",void 0),At([e.ViewChild("settingsTrigger",{read:e.ElementRef,static:!1}),bt("design:type",e.ElementRef)],o.prototype,"settingsTrigger",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"displayExport",void 0),At([e.Input(),bt("design:type",Number),bt("design:paramtypes",[Number])],o.prototype,"maxRowActions",null),At([e.Input(),bt("design:type",Boolean)],o.prototype,"hideGrouping",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"searchPlaceholder",void 0),At([e.Input(),bt("design:type",Number)],o.prototype,"rowActionsShortLabelThreshold",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"displayCustomGridActionsSeparator",void 0),o=At([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}"]}),bt("design:paramtypes",[Wa,e.ChangeDetectorRef,_n,ca,vr,La])],o)}(),ns=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:ca}]},At([e.Input("datoPopoverClose"),bt("design:type",Object)],n.prototype,"result",void 0),At([e.HostListener("click"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],n.prototype,"close",null),n=At([e.Directive({selector:"[datoPopoverClose]"}),bt("design:paramtypes",[ca])],n)}(),os=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=$r({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:ca},{type:e.ElementRef}]},At([e.Output(),bt("design:type",Object)],t.prototype,"popoverClose",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoPopoverContent",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoPopoverConfig",null),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoPopoverClassName",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoPopoverPlacement",null),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoPopoverTrigger",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoPopoverWidth",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"datoPopoverHeight",null),t=At([e.Directive({selector:"[datoPopoverContent]"}),bt("design:paramtypes",[ca,e.ElementRef])],t)}(),is=[aa,ns,os],rs=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[is],exports:[is],entryComponents:[aa]})],t)}(),as=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=Kt("div"),Ht(this.container,"dato-menu");try{for(var n=Ct(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),Gt(pe(Lt(".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=At([e.Directive({selector:"[datoMenuContent]"}),bt("design:paramtypes",[e.TemplateRef,e.ApplicationRef])],t)}(),ss=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&&Ht(o,this.menuClass),this.theme===t.ColorPalette.Dark&&Ht(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,St(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}]},At([e.ContentChild(as),bt("design:type",as)],o.prototype,"content",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"placement",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"menuClass",void 0),At([e.Input(),bt("design:type",String)],o.prototype,"theme",void 0),At([e.Output(),bt("design:type",Object)],o.prototype,"menuClosed",void 0),o=At([e.Component({selector:"dato-menu",template:"\n <ng-content></ng-content>\n ",exportAs:"datoMenu",changeDetection:e.ChangeDetectionStrategy.OnPush}),bt("design:paramtypes",[Pn])],o)}(),ls=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:ss,decorators:[{type:e.Optional}]}]},At([e.Input("datoMenuTriggerFor"),bt("design:type",ss),bt("design:paramtypes",[ss])],t.prototype,"childMenu",null),t=At([e.Directive({selector:"[datoMenuTriggerFor]"}),vt(2,e.Optional()),bt("design:paramtypes",[e.ElementRef,e.NgZone,ss])],t)}(),cs=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:ss},{type:ls,decorators:[{type:e.Optional}]}]},At([e.Input(),e.HostBinding("class.dato-menu-item--disabled"),bt("design:type",Object)],t.prototype,"disabled",void 0),t=At([e.Directive({selector:"[datoMenuItem]"}),vt(2,e.Optional()),bt("design:paramtypes",[e.ElementRef,ss,ls])],t)}(),ps=[ss,cs,ls,as],ds=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[ps],exports:[ps],entryComponents:[ss]})],t)}(),us={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return hs})),multi:!0},hs=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}]},At([e.Input(),e.HostBinding("class.show-open"),bt("design:type",Object)],o.prototype,"expanded",void 0),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],o.prototype,"datoTogglerValue",null),o=At([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:[us],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}"]}),bt("design:paramtypes",[e.ChangeDetectorRef])],o)}(Ot),gs=[hs],fs=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Do],declarations:[gs],exports:[gs],entryComponents:[gs]})],t)}(),ms=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=At([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 "]}),bt("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),ys=function(){function t(t){this.vcr=t}return t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t=At([e.Directive({selector:"[datoControlErrorContainer]"}),bt("design:paramtypes",[e.ViewContainerRef])],t)}(),As=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=At([e.Directive({selector:"[datoForm]"}),bt("design:paramtypes",[e.ElementRef])],t)}(),vs=new e.InjectionToken("FORM_ERRORS",{providedIn:"root",factory:function(){return{}}}),bs=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(ms);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===Tt(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 To("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:[vs]}]},{type:ys,decorators:[{type:e.Optional}]},{type:As,decorators:[{type:e.Optional}]},{type:o.NgControl,decorators:[{type:e.Optional}]},{type:o.ControlContainer,decorators:[{type:e.Optional}]}]},At([e.Input("datoControlErrors"),bt("design:type",Object)],t.prototype,"customErrors",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"datoControlErrorsClass",void 0),At([e.Input(),bt("design:type",e.TemplateRef)],t.prototype,"datoControlErrorsTpl",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"datoControlErrorsOnBlur",void 0),t=At([e.Directive({selector:"[datoControlErrors]"}),vt(3,e.Inject(vs)),vt(4,e.Optional()),vt(5,e.Optional()),vt(6,e.Optional()),vt(7,e.Optional()),bt("design:paramtypes",[e.ViewContainerRef,e.ComponentFactoryResolver,e.ElementRef,Object,ys,As,o.NgControl,o.ControlContainer])],t)}(),Cs=[ms,ys,bs,As],ws=function(){function t(){}return t=At([e.NgModule({declarations:[Cs],imports:[s.CommonModule,bo],exports:[Cs],entryComponents:[ms]})],t)}(),Ss=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=At([e.Directive({selector:"[datoInputNumber]"}),bt("design:paramtypes",[o.NgControl,e.ElementRef])],t)}(),xs=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&&(Os(this.increment.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.incrementValue()})),Os(this.decrement.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.decrementValue()})))},t.prototype.ngAfterContentInit=function(){Wt(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}]},At([e.ViewChild("increment",{static:!0}),bt("design:type",e.ElementRef)],t.prototype,"increment",void 0),At([e.ViewChild("decrement",{static:!0}),bt("design:type",e.ElementRef)],t.prototype,"decrement",void 0),At([e.ContentChild(Ss,{static:!0}),bt("design:type",Ss)],t.prototype,"input",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"max",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"min",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"step",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"allowNegative",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"showControls",void 0),t=At([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}"]}),bt("design:paramtypes",[e.ElementRef])],t)}();
|
|
341
341
|
/**
|
|
342
342
|
* @license
|
|
343
343
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -351,14 +351,14 @@ var ia,ra=function(){function t(t){this.host=t}return t.prototype.ngOnInit=funct
|
|
|
351
351
|
*
|
|
352
352
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
353
353
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
354
|
-
*/function
|
|
354
|
+
*/function Os(t){var e=function(t){return{down$:n.fromEvent(t,"mousedown").pipe(r.tap((function(t){return t.preventDefault()}))),up$:n.fromEvent(document,"mouseup")}}(t),o=e.down$,i=e.up$;return o.pipe(r.delay(200),r.switchMapTo(n.interval(55)),r.takeUntil(i),r.repeat())}
|
|
355
355
|
/**
|
|
356
356
|
* @license
|
|
357
357
|
* Copyright Datorama. All Rights Reserved.
|
|
358
358
|
*
|
|
359
359
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
360
360
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
361
|
-
*/var
|
|
361
|
+
*/var Ds=[xs],Es=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Le],declarations:[Ds,Ss],exports:[Ds,Ss],entryComponents:[Ds]})],t)}();function Is(t,e,n){return t.find((function(t){var o=t.from,i=t.to,r=ln(o,e),a=ln(i,e);return H.isWithinInterval(n,{start:r,end:a})}))}function Rs(t,e,n){var o=Is(t,e,n);return o?o.cssClass:""}function Ts(t,e,n,o){for(var i=n.firstDayOfWeek,r=n.locale,a=[],s=e&&e.length,l=o&&o.length,c=H.endOfMonth(t),p=
|
|
362
362
|
/**
|
|
363
363
|
* @license
|
|
364
364
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -366,14 +366,14 @@ var ia,ra=function(){function t(t){this.host=t}return t.prototype.ngOnInit=funct
|
|
|
366
366
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
367
367
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
368
368
|
*/
|
|
369
|
-
function(t,e,n){var o=
|
|
369
|
+
function(t,e,n){var o=ln(H.lastDayOfMonth(t),n),i=ln(H.startOfMonth(t),n);return H.differenceInCalendarWeeks(o,i,e)+1}(t,{weekStartsOn:i},r),d=H.startOfMonth(t),u=H.startOfWeek(d,{weekStartsOn:i}),h=0;h<p;h++)for(var g=0;g<7&&(a.push({isThisMonth:H.isWithinInterval(u,{start:d,end:c}),isToday:H.isToday(u),rawDate:u,isDisable:s&&!!Is(e,r,u),date:H.getDate(u),dayOfWeek:H.format(u,"iiii").toLowerCase(),cssClass:l?Rs(o,r,u):""}),!H.isSameDay(u,c));g++)u=H.addDays(u,1);return a}
|
|
370
370
|
/**
|
|
371
371
|
* @license
|
|
372
372
|
* Copyright Datorama. All Rights Reserved.
|
|
373
373
|
*
|
|
374
374
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
375
375
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
376
|
-
*/var Ps=function(){function n(t,n){this.config=t,this.cdr=n,this.daysOfTheWeek=[],this.range={},this.isSingle=!1,this.dayChange=new e.EventEmitter,this.monthChange=new e.EventEmitter,this.cdr.detach()}return Object.defineProperty(n.prototype,"data",{set:function(e){var n=e.month,o=e.disableRanges,i=e.classRanges,r=this.config.locale.code===
|
|
376
|
+
*/var Ps=function(){function n(t,n){this.config=t,this.cdr=n,this.daysOfTheWeek=[],this.range={},this.isSingle=!1,this.dayChange=new e.EventEmitter,this.monthChange=new e.EventEmitter,this.cdr.detach()}return Object.defineProperty(n.prototype,"data",{set:function(e){var n=e.month,o=e.disableRanges,i=e.classRanges,r=this.config.locale.code===on[t.SUPPORTED_LOCALES.ja_JP].code?"yoMMM":"MMM y";this.currentMonth=n,this.monthLabel=H.format(n,r,{locale:this.config.locale}),this.days=Ts(n,o,this.config,i),this.daysOfTheWeek=this.getDaysOfTheWeek(this.days,this.config.locale),this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fromDate",{get:function(){return ln(this.range.from,this.config.locale)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"toDate",{get:function(){return ln(this.range.to,this.config.locale)},enumerable:!0,configurable:!0}),n.prototype.inSelectedRange=function(t){return!(this.isSingle||!this.fromDate||!this.toDate)&&H.isWithinInterval(t,{start:this.fromDate,end:this.toDate})},n.prototype.isFromDate=function(t){return!this.isSingle&&!this.isRangeEqual()&&(!!this.toDate&&H.isSameDay(t,this.fromDate))},n.prototype.isToDate=function(t){return!this.isSingle&&!this.isRangeEqual()&&(!!this.toDate&&H.isSameDay(t,this.toDate))},n.prototype.isDayActive=function(t){return H.isSameDay(this.fromDate,t)},n.prototype.setMonth=function(){var t=cn(H.startOfMonth(this.currentMonth),this.config.locale),e=cn(H.endOfMonth(this.currentMonth),this.config.locale);this.monthChange.emit({from:t,to:e})},n.prototype.setRange=function(t){this.range=t,this.cdr.detectChanges()},n.prototype.selectDate=function(t){this.dayChange.emit(t)},n.prototype.getClasses=function(t){var e,n=t.rawDate;return(e={"day-active-from":this.isFromDate(n),"day-active-to":this.isToDate(n),"day-active":this.isDayActive(n),"day-disabled":t.isDisable,"in-range":this.inSelectedRange(n),"is-today":t.isToday})[t.cssClass]=!!t.cssClass,e},n.prototype.isRangeEqual=function(){return H.isSameDay(this.fromDate,this.toDate)},n.prototype.getDaysOfTheWeek=function(t,e){return t.slice(0,7).map((function(t){var n=t.rawDate;return H.format(n,"EEEEEE",{locale:e}).toUpperCase()}))},n.ctorParameters=function(){return[{type:vn,decorators:[{type:e.Inject,args:[bn]}]},{type:e.ChangeDetectorRef}]},At([e.Input(),bt("design:type",Object)],n.prototype,"isSingle",void 0),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],n.prototype,"data",null),At([e.Output(),bt("design:type",Object)],n.prototype,"dayChange",void 0),At([e.Output(),bt("design:type",Object)],n.prototype,"monthChange",void 0),n=At([e.Component({selector:"dato-date-picker-month",template:'<section>\n <p class="date-picker-month-name primary-500-color dato-simple text-center pointer no-select m-0" (click)="setMonth()">\n {{ monthLabel }}\n </p>\n\n <div class="d-flex">\n <div *ngFor="let dayName of daysOfTheWeek" class="date-picker-cell no-select primary-300-color">\n {{ dayName | translate }}\n </div>\n </div>\n\n <div class="d-flex d-flex-wrap">\n <ng-template ngFor [ngForOf]="days" let-day>\n <div class="date-picker-cell primary-color-600 date-picker-day pointer"\n [class.invisible]="!day.isThisMonth"\n [ngClass]="getClasses(day)"\n (click)="selectDate(day.rawDate)">\n {{day.date}}\n </div>\n </ng-template>\n </div>\n</section>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}section{width:200px;max-width:200px;padding-top:20px}.date-picker-cell{width:26px;height:26px;display:flex;align-items:center;justify-content:center;font-size:12px}"]}),vt(0,e.Inject(bn)),bt("design:paramtypes",[vn,e.ChangeDetectorRef])],n)}(),ks=new e.InjectionToken("POPPER_BOUNDARY"),js=function(n){function i(t,o,i,r,a,s){var l=n.call(this)||this;return l.ngControl=t,l.config=o,l.popover=i,l.cdr=r,l.translate=a,l.boundary=s,l.placeholder="core.selectDate",l.position="bottom-start",l.offset=[0,5],l.viewMode=!1,l.triggerStyle="icon-text",l.inputBoundary=null,l.labelTooltipPosition="right",l.toggle=new e.EventEmitter,l.DATE_FORMAT_LOCALE={locale:l.config.locale},l.open=!1,t.valueAccessor=l,l}return ft(i,n),i.prototype.writeValue=function(t){this.range=t,this.createLabel(t),this.cdr.detectChanges()},i.prototype.ngAfterContentInit=function(){this.input&&(this.updateInput(),this.input.disableClear(),this.input.setPopperOrigin(),this.input.writeValue(this.dateRange),this.initialInputValue=this.dateRange)},i.prototype.openDatepicker=function(e){var n=this;this.open||!1!==this.viewMode||(this.toggle.emit({type:t.PopoverTrigger.Open}),this.popover.open(this.datePickerPopper,this.defaultPopperOrigin||e,{id:"datePicker",className:"dato-date-picker",popper:{boundary:this.inputBoundary||this.boundary,offset:this.offset,placement:this.position}}).subscribe((function(t){n.toggle.emit(t),n.open=!1,n.cdr.detectChanges(),n.input&&n.setInputValue()})),this.open=!0,this.cdr.detectChanges(),this.input&&this.handleEnter())},i.prototype.updateInput=function(){this.input.writeValue(this.dateRange)},i.prototype.createLabel=function(t){if(t)if(_t(t)||t instanceof Date)this.dateRange=H.format(ln(t,this.config.locale),pn(this.config.locale),this.DATE_FORMAT_LOCALE),this.input&&this.updateInput();else{var e=ln(t.from,this.config.locale),n=ln(t.to,this.config.locale),o=H.format(e,pn(this.config.locale),this.DATE_FORMAT_LOCALE),i=H.format(n,pn(this.config.locale),this.DATE_FORMAT_LOCALE),r=t.id===this.config.customRangeID?"":t.label||"",a=H.isSameDay(e,n)?o:o+" - "+i;r?(this.dateLabel=r,this.dateRange="("+a+")"):(this.dateRange=a,this.dateLabel="")}else this.dateRange=this.translate.transform(this.placeholder)},i.prototype.setInputValue=function(){var t=H.isDate(this.initialInputValue)?this.initialInputValue:dn(this.initialInputValue,this.config.locale);H.isValid(t)||(t=H.parseISO(this.initialInputValue));var e=cn(t,this.config.locale),n=dn(this.input.value,this.config.locale),o=H.isValid(n)?cn(n,this.config.locale):e;e!==o&&(this.ngControl.control.patchValue(o),this.initialInputValue=o)},i.prototype.handleEnter=function(){var t=this;this.input.keydown$.pipe(r.filter(Di),r.takeUntil(this.toggle)).subscribe((function(){t.setInputValue(),t.popover.closeById("datePicker"),t.input.blur()}))},i.ctorParameters=function(){return[{type:o.NgControl,decorators:[{type:e.Self},{type:e.Optional}]},{type:vn,decorators:[{type:e.Inject,args:[bn]}]},{type:ca},{type:e.ChangeDetectorRef},{type:_n},{type:String,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[ks]}]}]},At([e.Input(),bt("design:type",Object)],i.prototype,"placeholder",void 0),At([e.Input(),bt("design:type",Object)],i.prototype,"position",void 0),At([e.Input(),bt("design:type",Array)],i.prototype,"offset",void 0),At([e.Input(),bt("design:type",Object)],i.prototype,"viewMode",void 0),At([e.Input(),bt("design:type",String)],i.prototype,"triggerStyle",void 0),At([e.Input(),bt("design:type",String)],i.prototype,"inputBoundary",void 0),At([e.Input(),bt("design:type",Object)],i.prototype,"labelTooltipPosition",void 0),At([e.Input(),bt("design:type",HTMLDivElement)],i.prototype,"defaultPopperOrigin",void 0),At([e.ContentChild("triggerTpl",{static:!0}),bt("design:type",e.TemplateRef)],i.prototype,"triggerTpl",void 0),At([e.ContentChild(e.TemplateRef,{static:!0}),bt("design:type",e.TemplateRef)],i.prototype,"datePickerPopper",void 0),At([e.ContentChild(wn),bt("design:type",wn)],i.prototype,"input",void 0),At([e.Output(),bt("design:type",Object)],i.prototype,"toggle",void 0),i=At([e.Component({selector:"dato-date-picker",template:'<div class="d-flex {{ triggerStyle }} items-center dato-date-picker-trigger" [class.open]="open" (click)="openDatepicker(origin)" #origin\n [class.pointer]="!viewMode">\n <ng-template #defaultView>\n <dato-icon datoIcon="calendarcore" width="16px" class="primary-400-color"></dato-icon>\n <div class="ellipsis"\n [datoTooltip]="dateLabel + \' \' + dateRange"\n [datoTooltipPosition]="labelTooltipPosition"\n [datoTooltipOnTextOverflow]="true">\n <span class="dato-note date-label" *ngIf="dateLabel">{{dateLabel | translate}} </span>\n <span class="dato-note date-range">{{dateRange}}</span>\n </div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]="triggerTpl ? triggerTpl : defaultView"\n [ngTemplateOutletContext]="{label: dateLabel, range: dateRange, icon: \'calendar\'}"></ng-template>\n </div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),vt(0,e.Self()),vt(0,e.Optional()),vt(1,e.Inject(bn)),vt(5,e.Optional()),vt(5,e.Self()),vt(5,e.Inject(ks)),bt("design:paramtypes",[o.NgControl,vn,ca,e.ChangeDetectorRef,_n,String])],i)}(Ot);
|
|
377
377
|
/**
|
|
378
378
|
* @license
|
|
379
379
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -381,28 +381,28 @@ function(t,e,n){var o=sn(U.lastDayOfMonth(t),n),i=sn(U.startOfMonth(t),n);return
|
|
|
381
381
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
382
382
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
383
383
|
*/
|
|
384
|
-
function
|
|
384
|
+
function Ms(t,e,n){var o=t.get("from"),i=t.get("to");if(!_s(o,e,n)&&!_s(i,e,n)){var r=dn(o.value,e,n),a=dn(i.value,e,n);if(H.isAfter(ln(r,e),ln(a,e)))return{invalidRange:!0}}return null}function _s(t,e,n){if(t.value){var o=t.value;if(!H.isDate(o))o=ln(dn(t.value,e,n),e);if(!0===H.isValid(o))return null}return{invalidDate:!0}}
|
|
385
385
|
/**
|
|
386
386
|
* @license
|
|
387
387
|
* Copyright Datorama. All Rights Reserved.
|
|
388
388
|
*
|
|
389
389
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
390
390
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
391
|
-
*/function
|
|
391
|
+
*/function Fs(t,e){for(var n=[],o=0,i=e;o<i;o++){var r=t;o>0&&(r=H.addMonths(t,o)),n.push(r)}return n}function Ns(t,e,n){return t&&!e||H.isSameDay(t,e)?H.isAfter(t,n)?{from:n,to:t}:{from:t,to:n}:{from:n,to:n}}
|
|
392
392
|
/**
|
|
393
393
|
* @license
|
|
394
394
|
* Copyright Datorama. All Rights Reserved.
|
|
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 Fs,Gs=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 Ms(t,c.config.locale,c.format)},updateOn:"blur"}),to:new o.FormControl(null,{validators:function(t){return Ms(t,c.config.locale,c.format)},updateOn:"blur"})},{validators:function(t){return js(t,c.config.locale,c.format)}}),this.calendarTypeControl=new o.FormControl(!1),this.relativeDateControl=new o.FormControl,this.hasCustomSupport=!1,this.isMobile=Ze(),this.baseDate=sn(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 sn(this.currentRange.from,this.config.locale)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"to",{get:function(){return sn(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===rn(this.currentRange,this.config.customRangeID)},enumerable:!0,configurable:!0}),a.prototype.ngOnInit=function(){this.handleFormControl(),this.rangesList=this.rangeListInput||this.config.ranges,this.months=Ls(sn(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,An(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||cn(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:ln(new Date,this.config.locale),to:ln(new Date,this.config.locale)},this.selectCustomDateOption())},a.prototype.apply=function(){var e=this,n=this.currentRange;n.id||(n=mt(mt({},an(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=Ns(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=Ls(this.baseDate,this.monthsShown),An(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=sn(U.startOfMonth(e),this.config.locale),o=sn(U.endOfMonth(e),this.config.locale);U.isWithinInterval(this.from,{start:n,end:o})?(this.setRangeInMonths(),this.emitSelection()):(this.months=Ls(this.from,this.monthsShown),An(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||pn(n,this.config.locale,this.format),r=t.to||pn(o,this.config.locale,this.format),a=sn(i,this.config.locale),s=sn(r,this.config.locale);return U.isAfter(a,s)&&(a=s),mt(mt({},t),{from:ln(a,this.config.locale),to:ln(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=pn(n,t.config.locale,t.format),r=pn(o,t.config.locale,t.format),a={from:ln(sn(i,t.config.locale),t.config.locale),to:ln(sn(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=yn;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({},an(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:vn,decorators:[{type:e.Inject,args:[bn]}]},{type:e.NgZone},{type:o.NgControl},{type:e.ChangeDetectorRef},{type:la},{type:jn}]},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(Ps),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(bn)),Ct("design:paramtypes",[vn,e.NgZone,o.NgControl,e.ChangeDetectorRef,la,jn])],a)}(),Vs={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return zs})),multi:!0},zs=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:[Vs],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),Bs=[zs],Hs=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Do],declarations:[Bs],exports:[Bs],entryComponents:[Bs]})],t)}(),Us=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=sn(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?sn(this.controlValue.from,this.config.locale):this.baseDate,this.selectedDate=this.controlValue,this.months=Ls(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;An(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=Ls(this.baseDate,this.monthsShown),An(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:ln(t=sn(t,this.config.locale)||this.today,this.config.locale),to:ln(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:vn,decorators:[{type:e.Inject,args:[bn]}]},{type:e.NgZone},{type:o.NgControl},{type:e.ChangeDetectorRef},{type:la}]},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(Ps),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(bn)),Ct("design:paramtypes",[vn,e.NgZone,o.NgControl,e.ChangeDetectorRef,la])],n)}(),Ks=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)}(),Ws=[Gs,Ps,_s,Us],Qs=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Fe,$i,Co,o.ReactiveFormsModule,Bi,se,So,Dn,rs,Hs,bo,Jn],declarations:[Ws,Ks],exports:[Ws],entryComponents:[Gs]})],t)}(),$s=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)}(),qs=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)}(),Ys=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,bo,Do,Fe],declarations:[$s,qs],exports:[$s,qs]})],t)}(),Zs=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}(),Xs=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)}(Zs);
|
|
398
|
+
*/var Bs,Ls=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 _s(t,c.config.locale,c.format)},updateOn:"blur"}),to:new o.FormControl(null,{validators:function(t){return _s(t,c.config.locale,c.format)},updateOn:"blur"})},{validators:function(t){return Ms(t,c.config.locale,c.format)}}),this.calendarTypeControl=new o.FormControl(!1),this.relativeDateControl=new o.FormControl,this.hasCustomSupport=!1,this.isMobile=Ze(),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=Fs(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,Tn(this.zone)]).pipe(i.untilDestroyed(this)).subscribe((function(n){var o=wt(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:H.format(this.from,t,this.DATE_FORMAT_LOCALE),to:this.isMobile?this.to:H.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=Ns(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=H.addMonths(this.baseDate,t),this.months=Fs(this.baseDate,this.monthsShown),Tn(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=wt(this.months,1)[0],n=ln(H.startOfMonth(e),this.config.locale),o=ln(H.endOfMonth(e),this.config.locale);H.isWithinInterval(this.from,{start:n,end:o})?(this.setRangeInMonths(),this.emitSelection()):(this.months=Fs(this.from,this.monthsShown),Tn(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 H.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=An;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:vn,decorators:[{type:e.Inject,args:[bn]}]},{type:e.NgZone},{type:o.NgControl},{type:e.ChangeDetectorRef},{type:ca},{type:_n}]},At([e.Input(),bt("design:type",Number)],a.prototype,"monthsShown",void 0),At([e.Input(),bt("design:type",Object)],a.prototype,"format",void 0),At([e.Input(),bt("design:type",Object)],a.prototype,"showRelativeDateType",void 0),At([e.Input(),bt("design:type",String)],a.prototype,"customRangeLabel",void 0),At([e.Input(),bt("design:type",Array)],a.prototype,"disableRanges",void 0),At([e.Input(),bt("design:type",Array)],a.prototype,"classRanges",void 0),At([e.Input(),bt("design:type",String)],a.prototype,"relativeTo",void 0),At([e.Input(),bt("design:type",Array),bt("design:paramtypes",[Array])],a.prototype,"rangeList",null),At([e.Output(),bt("design:type",Object)],a.prototype,"relativeDateChange",void 0),At([e.Output(),bt("design:type",Object)],a.prototype,"selection",void 0),At([e.ViewChildren(Ps),bt("design:type",e.QueryList)],a.prototype,"monthsComponents",void 0),a=At([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}),vt(0,e.Inject(bn)),bt("design:paramtypes",[vn,e.NgZone,o.NgControl,e.ChangeDetectorRef,ca,_n])],a)}(),Gs={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Vs})),multi:!0},Vs=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}]},At([e.Input(),e.HostBinding("class.dato-toggler-no-label"),bt("design:type",Object)],n.prototype,"datoTogglerNoLabel",void 0),n=At([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:[Gs],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}"]}),bt("design:paramtypes",[e.ChangeDetectorRef])],n)}(Ot),zs=[Vs],Qs=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Do],declarations:[zs],exports:[zs],entryComponents:[zs]})],t)}(),Hs=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=Fs(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;Tn(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(H.differenceInCalendarMonths(t,this.baseDate))},n.prototype.changeMonth=function(t){var e=this;this.baseDate=H.addMonths(this.baseDate,t),this.months=Fs(this.baseDate,this.monthsShown),Tn(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:vn,decorators:[{type:e.Inject,args:[bn]}]},{type:e.NgZone},{type:o.NgControl},{type:e.ChangeDetectorRef},{type:ca}]},At([e.Input(),bt("design:type",Number)],n.prototype,"monthsShown",void 0),At([e.Input(),bt("design:type",Array)],n.prototype,"disableRanges",void 0),At([e.Input(),bt("design:type",Array)],n.prototype,"classRanges",void 0),At([e.ViewChildren(Ps),bt("design:type",e.QueryList)],n.prototype,"monthsComponents",void 0),n=At([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}),vt(0,e.Inject(bn)),bt("design:paramtypes",[vn,e.NgZone,o.NgControl,e.ChangeDetectorRef,ca])],n)}(),Us=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=At([e.Pipe({name:"dateRangesFilter"})],n)}(),Ys=[Ls,Ps,js,Hs],Ws=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Le,qi,Co,o.ReactiveFormsModule,Qi,se,So,Dn,rs,Qs,bo,to],declarations:[Ys,Us],exports:[Ys],entryComponents:[Ls]})],t)}(),Ks=function(){function t(){}return t.prototype.ngOnInit=function(){},t=At([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)}}"]}),bt("design:paramtypes",[])],t)}(),qs=function(){function t(){this.msg="",this.salesforce=!1,this.size="medium",this.circleIds=["a","b","c","d","e","f","g","h","i"]}return At([e.Input(),bt("design:type",Object)],t.prototype,"msg",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"salesforce",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"size",void 0),t=At([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)}(),Js=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,bo,Do,Le],declarations:[Ks,qs],exports:[Ks,qs]})],t)}(),Xs=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}(),Zs=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=At([e.Injectable(),bt("design:paramtypes",[])],n)}(Xs);
|
|
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
|
-
*/(Fs=t.ListValueTypes||(t.ListValueTypes={})).id="id",Fs.object="object";var Js,tl=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);Si({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:Xs},{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(Gi),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:[Xs,{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",[Xs,Object,e.ChangeDetectorRef,e.ElementRef])],s)}(Dt),el=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)}(),nl=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)}(),ol=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)}(),il=[tl,el],rl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Bi,bo,ji,Fe,Jn,Ys],declarations:[il,nl,ol],exports:[il]})],t)}(),al=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:Jo},{type:Wo},{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",[Jo,Wo,e.ElementRef])],t)}(),sl=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)}(),ll=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)}(),cl=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.close(this.dialogResult)},t.ctorParameters=function(){return[{type:Wo,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",[Wo])],t)}();(
|
|
405
|
+
*/(Bs=t.ListValueTypes||(t.ListValueTypes={})).id="id",Bs.object="object";var $s,tl=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=wt(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=wt(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=wt(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=Bt(".list-container",e.host.nativeElement);Si({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:Zs},{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},At([e.Input(),bt("design:type",Object)],s.prototype,"searchController",void 0),At([e.Input(),bt("design:type",String)],s.prototype,"listClass",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"idKey",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"labelKey",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"sortByKey",void 0),At([e.Input(),bt("design:type",String)],s.prototype,"labelType",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"withSelectAll",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"groupLabel",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"withAccordion",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"withGrouping",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"containerHeight",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"clientSearch",void 0),At([e.Input(),bt("design:type",Set)],s.prototype,"disabledIds",void 0),At([e.Input(),bt("design:type",Set)],s.prototype,"enabledIds",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"loading",void 0),At([e.Input(),bt("design:type",Object)],s.prototype,"valueType",void 0),At([e.Input(),bt("design:type",Function)],s.prototype,"autoId",void 0),At([e.Input(),bt("design:type",Boolean)],s.prototype,"isSortList",void 0),At([e.Input(),bt("design:type",e.TemplateRef)],s.prototype,"optionTpl",void 0),At([e.Input(),bt("design:type",e.TemplateRef)],s.prototype,"groupHeaderTpl",void 0),At([e.Input(),bt("design:type",e.TemplateRef)],s.prototype,"noResultsTpl",void 0),At([e.Input(),bt("design:type",e.TemplateRef)],s.prototype,"noDataTpl",void 0),At([e.Input(),bt("design:type",Array),bt("design:paramtypes",[Array])],s.prototype,"options",null),At([e.ViewChildren(Gi),bt("design:type",e.QueryList)],s.prototype,"optionComponents",void 0),At([e.ViewChild("optionsWrapper",{read:e.ElementRef}),bt("design:type",e.ElementRef)],s.prototype,"optionsWrapper",void 0),s=l=At([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:[Zs,{provide:o.NG_VALUE_ACCESSOR,useExisting:l,multi:!0}],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}:host .list-container{overflow-y:auto}"]}),vt(1,e.Attribute("datoSize")),bt("design:paramtypes",[Zs,Object,e.ChangeDetectorRef,e.ElementRef])],s)}(Ot),el=function(){function t(){}return At([e.Input(),bt("design:type",e.TemplateRef)],t.prototype,"customTpl",void 0),t=At([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)}(),nl=function(){function t(){}return At([e.Input(),bt("design:type",e.TemplateRef)],t.prototype,"customTpl",void 0),t=At([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)}(),ol=function(){function t(){this.indeterminatelyChecked=!1,this.checkAll=new e.EventEmitter}return At([e.Input(),bt("design:type",String)],t.prototype,"label",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"indeterminatelyChecked",void 0),At([e.Input(),bt("design:type",Boolean)],t.prototype,"checked",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"checkAll",void 0),t=At([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)}(),il=[tl,el],rl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Qi,bo,_i,Le,to,Js],declarations:[il,nl,ol],exports:[il]})],t)}(),al=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:Wo},{type:e.ElementRef}]},t=At([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}']}),bt("design:paramtypes",[ti,Wo,e.ElementRef])],t)}(),sl=function(){function t(){}return t=At([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)}(),ll=function(){function t(){}return t=At([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)}(),cl=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.close(this.dialogResult)},t.ctorParameters=function(){return[{type:Wo,decorators:[{type:e.Optional}]}]},At([e.HostListener("click"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],t.prototype,"onClick",null),At([e.Input("datoDialogClose"),bt("design:type",Object)],t.prototype,"dialogResult",void 0),t=At([e.Directive({selector:"[datoDialogClose]"}),vt(0,e.Optional()),bt("design:paramtypes",[Wo])],t)}();(
|
|
406
406
|
/**
|
|
407
407
|
* @license
|
|
408
408
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -410,7 +410,7 @@ function js(t,e,n){var o=t.get("from"),i=t.get("to");if(!Ms(o,e,n)&&!Ms(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
|
-
Js=t.RenderMethod||(t.RenderMethod={})).Component="Component",Js.Template="Template",Js.Text="Text";var pl,dl=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)}(),ul=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[dl],exports:[dl]})],t)}(),hl=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.dismiss(this.dialogResult)},t.ctorParameters=function(){return[{type:Wo,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",[Wo])],t)}(),gl=[Qo,al,sl,ll,cl,hl,Xo],fl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,Fe,To,ul,Jn,Dn],providers:[Jo,Wo],declarations:[gl],exports:[gl],entryComponents:[Qo,Xo]})],t)}(),ml=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:Wa},{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",[Wa,e.ElementRef])],t)}(),yl=function(){function t(){}return t=vt([e.NgModule({imports:[fl,se,s.CommonModule,bo],declarations:[Ka,ml],exports:[ml],entryComponents:[Ka]})],t)}(),vl=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=Ta.CLIENT,n=Ta.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:jn},{type:Ga},{type:vr}]},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,jn,Ga,vr])],t)}(),bl=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)}(),Cl=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)}(),wl=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)}(),Sl=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?De(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.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}.initials-container.bold{font-weight:600}"]})],t)}(),xl=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>{{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}"]})],t)}(),Ol=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)}(),Dl=[$a,Ja,Za,Qa,Ca,Fa,Ba,Va,za,pa,va,es,ts,bl,Ya,qa,Qr,Jr,Ua,vl],Il=[Cl,wl,Ol,Sl,xl],Tl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule,Jn,To,Fe,se,So,bo,rs,gi,Bi,$i,Co,ds,fs,Ss,Ts,Qs,Ki,Ys,st.AgGridModule,rl,yl,ji],entryComponents:[Ca,Fa,pa,va,Ya,qa,Qr,Jr,Ua,Il],declarations:[Dl,Il],exports:[Dl,Il]})],t)}(),Rl={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Al})),multi:!0},Al=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:[Rl],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),El=[Al],Pl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Do],declarations:[El],exports:[El]})],t)}();function kl(){return{duration:4e3,dismissible:!1}}
|
|
413
|
+
$s=t.RenderMethod||(t.RenderMethod={})).Component="Component",$s.Template="Template",$s.Text="Text";var pl,dl=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},At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],n.prototype,"content",null),n=At([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)}(),ul=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[dl],exports:[dl]})],t)}(),hl=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.dismiss(this.dialogResult)},t.ctorParameters=function(){return[{type:Wo,decorators:[{type:e.Optional}]}]},At([e.HostListener("click"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],t.prototype,"onClick",null),At([e.Input("datoDialogDismiss"),bt("design:type",Object)],t.prototype,"dialogResult",void 0),t=At([e.Directive({selector:"[datoDialogDismiss]"}),vt(0,e.Optional()),bt("design:paramtypes",[Wo])],t)}(),gl=[Ko,al,sl,ll,cl,hl,$o],fl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,se,Le,Io,ul,to,Dn],providers:[ti,Wo],declarations:[gl],exports:[gl],entryComponents:[Ko,$o]})],t)}(),ml=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:Ya},{type:e.ElementRef}]},At([e.Input("datoHotkeys"),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"options",null),t=At([e.Directive({selector:"[datoHotkeys]"}),bt("design:paramtypes",[Ya,e.ElementRef])],t)}(),yl=function(){function t(){}return t=At([e.NgModule({imports:[fl,se,s.CommonModule,bo],declarations:[Ua,ml],exports:[ml],entryComponents:[Ua]})],t)}(),Al=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=Ia.CLIENT,n=Ia.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:_n},{type:La},{type:vr}]},At([e.Input(),bt("design:type",Object)],t.prototype,"searchPlaceholder",void 0),t=At([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}"]}),bt("design:paramtypes",[e.ChangeDetectorRef,_n,La,vr])],t)}(),vl=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)},At([e.Input(),bt("design:type",Array)],t.prototype,"actions",void 0),At([e.Input(),bt("design:type",Boolean)],t.prototype,"isRowActions",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"actionClick",void 0),t=At([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)}(),bl=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=At([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}"]}),bt("design:paramtypes",[e.ChangeDetectorRef])],n)}(),Cl=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=At([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)}(),wl=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?De(t.charAt(0)):""})).join(""))},t.prototype.refresh=function(){return!1},t=At([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)}(),Sl=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=At([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)}(),xl=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=At([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)}(),Ol=[Ka,$a,Xa,Wa,Ca,Ba,za,Ga,Va,da,va,es,ts,vl,Ja,qa,Kr,ta,Ha,Al],Dl=[bl,Cl,xl,wl,Sl],El=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule,to,Io,Le,se,So,bo,rs,fi,Qi,qi,Co,ds,fs,ws,Es,Ws,Yi,Js,st.AgGridModule,rl,yl,_i],entryComponents:[Ca,Ba,da,va,Ja,qa,Kr,ta,Ha,Dl],declarations:[Ol,Dl],exports:[Ol,Dl]})],t)}(),Il={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Rl})),multi:!0},Rl=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}]},At([e.Input(),bt("design:type",String)],o.prototype,"name",void 0),At([e.Input(),bt("design:type",Object)],o.prototype,"value",void 0),o=At([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:[Il],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}"]}),bt("design:paramtypes",[e.Renderer2,e.ChangeDetectorRef,e.ElementRef])],o)}(Ot),Tl=[Rl],Pl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Do],declarations:[Tl],exports:[Tl]})],t)}();function kl(){return{duration:4e3,dismissible:!1}}
|
|
414
414
|
/**
|
|
415
415
|
* @license
|
|
416
416
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -432,14 +432,14 @@ Js=t.RenderMethod||(t.RenderMethod={})).Component="Component",Js.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
|
-
pl=t.SnackbarType||(t.SnackbarType={})).INFO="info",pl.SUCCESS="success",pl.ERROR="error",pl.DRAMATIC_SUCCESS="dramatic-success",pl.DRAMATIC_ERROR="dramatic-error";var _l=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",Ln()),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)}(),jl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Fe,Dn],declarations:[_l],exports:[_l],entryComponents:[_l]})],t)}(),Ml=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}(),Ll=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=oa({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:Mt(e)?this.translate.transform(e):e,context:i}),this.component=ta({component:_l,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 Ml;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:jn},{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(jn),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",[jn,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],n)}(),Nl={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Fl})),multi:!0},Fl=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:[Nl],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),Gl=[Fl],Vl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule],declarations:[Gl],exports:[Gl],entryComponents:[Gl]})],t)}(),zl=function(){function t(t,e){this.http=t,this.config=e}return t.prototype.getLib=function(t,e){return this.richTextScript$||this.initLib(t,e),this.richTextScript$},t.prototype.initLib=function(t,e){this.richTextScript$=n.combineLatest([this.http.get(this.config.paths.richText+"/index.js",{responseType:"text"}).pipe(r.tap((function(e){return t(e,"rich-text-editor")}))),this.http.get(this.config.paths.richText+"/plugins/autocomplete/plugin.css",{responseType:"text"}).pipe(r.tap((function(t){return e(t,"tinymce-autocomplete")})))]).pipe(r.shareReplay(1))},t.ctorParameters=function(){return[{type:ht.HttpClient},{type:void 0,decorators:[{type:e.Inject,args:[Hn]}]}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(ht.HttpClient),e.ɵɵinject(Hn))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),bt(1,e.Inject(Hn)),Ct("design:paramtypes",[ht.HttpClient,Object])],t)}(),Bl=function(){return window&&window.tinymce?window.tinymce:null},Hl=function(t){function r(e,n,o,i){var r=t.call(this)||this;return r.ngZone=e,r.richTextService=n,r.config=o,r.host=i,r.autocompleteOptions={},r.forcePlainTextPasting=!1,r.format="html",r.isOneLine=!1,r.initialValue="",r.defaultPlugins="link fullscreen image lists table autocomplete",r.defaultToolbar=["fontfamily fontsize 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:""},this.richTextService.getLib(Xt,Jt).pipe(i.untilDestroyed(this)).subscribe((function(){t.init.call(t)}))},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,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,font_size_formats:"8px 10px 12px 14px 18px 24px 36px",min_width:480,menubar:!1,autocomplete:this.autocompleteOptions,suffix:".min",skin:"tinymce-5",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 Bl().init(t)}))},r.prototype.ngOnDestroy=function(){null!==Bl()&&(this.editor.off("paste"),Bl().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:zl},{type:void 0,decorators:[{type:e.Inject,args:[Hn]}]},{type:e.ElementRef}]},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(2,e.Inject(Hn)),Ct("design:paramtypes",[e.NgZone,zl,Object,e.ElementRef])],r)}(Dt),Ul=[Hl],Kl=function(){function t(){}return t=vt([e.NgModule({declarations:[Ul],exports:[Ul]})],t)}(),Wl=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)}(),Ql={autoRun:!1,datoSize:"lg",loop:!1,selectedIndex:0,showControls:!0,showNavigationArrows:!0,showNavigationButtons:!1,animationTiming:"250ms ease-in"},$l=function(){function t(){}return t=vt([e.Directive({selector:".dato-carousel-item"})],t)}(),ql=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({},Ql),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(Wl),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($l,{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)}(),Yl=[ql,Wl,$l],Zl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Fe,bo],declarations:[Yl],exports:[Yl],entryComponents:[ql]})],t)}(),Xl=0,Jl=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)}(),tc=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)}(),ec=function(){function t(t,e){this.width=t,this.autoId=e,this.id="dato-tab-"+Xl++,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(Jl,{descendants:!1}),Ct("design:type",e.QueryList)],t.prototype,"titleTpls",void 0),vt([e.ContentChildren(tc,{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)}(),nc=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(ec),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)}(),oc=[nc,ec,tc,Jl],ic=function(){function t(){}return t=vt([e.NgModule({declarations:oc,exports:oc,imports:[s.CommonModule,bo]})],t)}();
|
|
435
|
+
pl=t.SnackbarType||(t.SnackbarType={})).INFO="info",pl.SUCCESS="success",pl.ERROR="error",pl.DRAMATIC_SUCCESS="dramatic-success",pl.DRAMATIC_ERROR="dramatic-error";var jl=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;Gt(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}]},At([e.Input(),bt("design:type",Object)],n.prototype,"options",void 0),At([e.Input(),bt("design:type",String)],n.prototype,"type",void 0),At([e.HostListener("animationend",["$event"]),bt("design:type",Function),bt("design:paramtypes",[Object]),bt("design:returntype",void 0)],n.prototype,"onAnimationEnd",null),n=At([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}}"]}),bt("design:paramtypes",[e.Renderer2,e.ElementRef])],n)}(),Ml=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Le,Dn],declarations:[jl],exports:[jl],entryComponents:[jl]})],t)}(),_l=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}(),Fl=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=ia({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:_t(e)?this.translate.transform(e):e,context:i}),this.component=ea({component:jl,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 _l;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:_n},{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(_n),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:n,providedIn:"root"}),n=At([e.Injectable({providedIn:"root"}),vt(4,e.Inject(s.DOCUMENT)),bt("design:paramtypes",[_n,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],n)}(),Nl={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Bl})),multi:!0},Bl=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=Bt(".editable-header-input",this.host.nativeElement);Gt(t,"fontSize",this.fontSize),rt.coerceBooleanProperty(this.small)&&Ht(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}]},At([e.Input(),bt("design:type",Object)],n.prototype,"placeholder",void 0),At([e.Input(),bt("design:type",Object)],n.prototype,"maxLength",void 0),At([e.Output(),bt("design:type",e.EventEmitter)],n.prototype,"onFocus",void 0),At([e.Output(),bt("design:type",e.EventEmitter)],n.prototype,"onBlur",void 0),n=At([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:[Nl],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}"]}),vt(2,e.Attribute("datoSmall")),vt(3,e.Attribute("fontSize")),vt(4,e.Attribute("standalone")),bt("design:paramtypes",[e.Renderer2,e.ElementRef,Object,Object,Object,e.ChangeDetectorRef])],n)}(Ot),Ll=[Bl],Gl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule],declarations:[Ll],exports:[Ll],entryComponents:[Ll]})],t)}(),Vl=function(){return window&&window.tinymce?window.tinymce:null},zl=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){Zt(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){$t(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:Ft(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 Vl().init(t)}))},r.prototype.ngOnDestroy=function(){null!==Vl()&&(this.editor.off("paste"),Vl().remove(this.editor))},r.prototype.writeValue=function(t){this.initialValue=t||this.initialValue,this.editor&&this.editor.initialized&&_t(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:[Hn]}]}]},At([e.Input(),bt("design:type",String)],r.prototype,"plugins",void 0),At([e.Input(),bt("design:type",Object)],r.prototype,"toolbar",void 0),At([e.Input(),bt("design:type",Object)],r.prototype,"menubar",void 0),At([e.Input(),bt("design:type",Boolean)],r.prototype,"inline",void 0),At([e.Input(),bt("design:type",Object)],r.prototype,"options",void 0),At([e.Input(),bt("design:type",Number)],r.prototype,"width",void 0),At([e.Input(),bt("design:type",Number)],r.prototype,"height",void 0),At([e.Input(),bt("design:type",Object)],r.prototype,"autocompleteOptions",void 0),At([e.Input(),bt("design:type",Boolean),bt("design:paramtypes",[Boolean])],r.prototype,"disabled",null),At([e.Input(),bt("design:type",Object)],r.prototype,"forcePlainTextPasting",void 0),At([e.Input(),bt("design:type",String)],r.prototype,"defaultFont",void 0),At([e.Input(),bt("design:type",Object)],r.prototype,"format",void 0),At([e.Input(),bt("design:type",Object)],r.prototype,"isOneLine",void 0),r=a=At([e.Directive({selector:"[datoRichText]",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),vt(3,e.Inject(Hn)),bt("design:paramtypes",[e.NgZone,ht.HttpClient,e.ElementRef,Object])],r)}(Ot),Ql=[zl],Hl=function(){function t(){}return t=At([e.NgModule({declarations:[Ql],exports:[Ql]})],t)}(),Ul=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=At([e.Directive({selector:"[datoCarouselItem]"}),bt("design:paramtypes",[e.TemplateRef])],t)}(),Yl={autoRun:!1,datoSize:"lg",loop:!1,selectedIndex:0,showControls:!0,showNavigationArrows:!0,showNavigationButtons:!1,animationTiming:"250ms ease-in"},Wl=function(){function t(){}return t=At([e.Directive({selector:".dato-carousel-item"})],t)}(),Kl=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")&&Wt(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&&Wt(this.element,{datoSize:r}),a&&this.initAutoRun(a)}this.config=mt(mt({},Yl),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),jt(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=jt(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){Ht(this.element,"auto-play");var o=1e3*(jt(t)?Math.max(t,1):this.defaultAutoRunInterval);this.autoRunSub=n.interval(o).pipe(i.untilDestroyed(this)).subscribe((function(){return e.next()}))}else Yt(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}]},At([e.ContentChildren(Ul),bt("design:type",e.QueryList)],t.prototype,"items",void 0),At([e.ViewChild("carousel",{read:e.ElementRef,static:!0}),bt("design:type",e.ElementRef)],t.prototype,"carousel",void 0),At([e.ViewChildren(Wl,{read:e.ElementRef}),bt("design:type",e.QueryList)],t.prototype,"itemElements",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"config",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"indexChanged",void 0),t=At([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}"]}),bt("design:paramtypes",[ct.AnimationBuilder,e.ChangeDetectorRef,e.ElementRef])],t)}(),ql=[Kl,Ul,Wl],Jl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Le,bo],declarations:[ql],exports:[ql],entryComponents:[Kl]})],t)}(),Xl=0,Zl=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=At([e.Directive({selector:"ng-template[datoTabTitle]"}),bt("design:paramtypes",[e.TemplateRef])],t)}(),$l=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=At([e.Directive({selector:"ng-template[datoTabContent]"}),bt("design:paramtypes",[e.TemplateRef])],t)}(),tc=function(){function t(t,e){this.width=t,this.autoId=e,this.id="dato-tab-"+Xl++,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"]}]}]},At([e.Input(),bt("design:type",Object)],t.prototype,"id",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"title",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"disabled",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"className",void 0),At([e.ContentChildren(Zl,{descendants:!1}),bt("design:type",e.QueryList)],t.prototype,"titleTpls",void 0),At([e.ContentChildren($l,{descendants:!1}),bt("design:type",e.QueryList)],t.prototype,"contentTpls",void 0),t=At([e.Directive({selector:"dato-tab"}),vt(0,e.Attribute("width")),vt(1,e.Attribute("data-auto-id")),bt("design:paramtypes",[Object,Object])],t)}(),ec=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&&Ht(this.element,"dato-tabs--vertical"),this.datoNakedActive&&Ht(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();Qt(e,{opacity:1,width:t.clientWidth+"px",transform:"translateX("+t.offsetLeft+"px)"}),n.fromEvent(e,"transitionend").pipe(r.first()).subscribe((function(){Qt(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"]}]}]},At([e.ContentChildren(tc),bt("design:type",e.QueryList)],t.prototype,"tabs",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"activeId",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"destroyOnHide",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"tabChange",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"datoSize",void 0),t=At([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}"]}),vt(2,e.Attribute("datoVertical")),vt(3,e.Attribute("datoNakedActive")),vt(4,e.Attribute("datoTabWidth")),bt("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,Object,Object,Object])],t)}(),nc=[ec,tc,$l,Zl],oc=function(){function t(){}return t=At([e.NgModule({declarations:nc,exports:nc,imports:[s.CommonModule,bo]})],t)}();
|
|
436
436
|
/**
|
|
437
437
|
* @license
|
|
438
438
|
* Copyright Datorama. All Rights Reserved.
|
|
439
439
|
*
|
|
440
440
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
441
441
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
442
|
-
*/function
|
|
442
|
+
*/function ic(t){return function(e){return e.pipe(r.filter((function(e){return e.status===t})))}}
|
|
443
443
|
/**
|
|
444
444
|
* @license
|
|
445
445
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -447,7 +447,7 @@ pl=t.SnackbarType||(t.SnackbarType={})).INFO="info",pl.SUCCESS="success",pl.ERRO
|
|
|
447
447
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
448
448
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
449
449
|
*/
|
|
450
|
-
var
|
|
450
|
+
var rc=function(){function t(t){this.host=t,this.close=new e.EventEmitter,this.closedByAction=!1}return t.prototype.onAnimationEnd=function(t){"core-toastOut"===t.animationName&&this.close.emit({id:this.options.id,closedByAction:this.closedByAction})},Object.defineProperty(t.prototype,"duration",{get:function(){return this.options.duration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return this.options.icon},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"content",{get:function(){return this.options.content},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){Gt(Bt(".dato-toasts-container"),"zIndex",Nn()),Gt(this.element,"animation","core-toastIn 0.4s, core-toastOut 0.5s "+this.duration+"ms")},t.prototype.onClose=function(){this.closedByAction=!0,this.close.emit({id:this.options.id,closedByAction:this.closedByAction})},t.ctorParameters=function(){return[{type:e.ElementRef}]},At([e.Input(),bt("design:type",Object)],t.prototype,"options",void 0),At([e.HostListener("animationend",["$event"]),bt("design:type",Function),bt("design:paramtypes",[Object]),bt("design:returntype",void 0)],t.prototype,"onAnimationEnd",null),t=At([e.Component({selector:"dato-toast",template:'<div class="d-flex justify-between items-center">\n <div class="toast-icon mr-7 d-flex self-start" *ngIf="icon.name">\n <dato-icon [datoIcon]="icon.name" [attr.datoSize]="icon.size" [datoColor]="icon.color" [style.width]="icon.width" [style.height]="icon.height"></dato-icon>\n </div>\n <div class="dato-toast-content">\n <div class="dato-toast-content__title">\n <ng-content></ng-content>\n </div>\n <footer *ngIf="content">\n <dato-dynamic-content [content]="content"></dato-dynamic-content>\n </footer>\n </div>\n <dato-icon datoIcon="close" (click)="onClose()" datoColor="primary-300" class="self-start"></dato-icon>\n</div>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-toast{border-radius:2px;font-size:12px;padding:13px 12px;max-width:420px;box-shadow:0 2px 14px 0 rgba(0,0,0,.2);margin-bottom:30px}dato-toast .dato-icon-close{cursor:pointer}dato-toast .dato-toast-content{font-size:14px;font-weight:600;margin-right:40px;margin-left:5px}dato-toast .toast-icon{margin-right:10px}dato-toast footer{margin-top:8px}@-webkit-keyframes core-toastIn{from{transform:translateX(200px);opacity:0}to{ransform:translateX(-30px);opacity:1}}@keyframes core-toastIn{from{transform:translateX(200px);opacity:0}to{ransform:translateX(-30px);opacity:1}}@-webkit-keyframes core-toastOut{to{transform:translateX(100px);opacity:0}}@keyframes core-toastOut{to{transform:translateX(100px);opacity:0}}"]}),bt("design:paramtypes",[e.ElementRef])],t)}(),ac=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Le,Dn,ul],declarations:[rc],exports:[rc],entryComponents:[rc]})],t)}(),sc=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}();
|
|
451
451
|
/**
|
|
452
452
|
* @license
|
|
453
453
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -462,7 +462,7 @@ var ac=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
|
|
465
|
+
function lc(){return{duration:4e3,icon:{color:"primary-300"}}}var cc,pc=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=$r({duration:4e3,icon:{color:"primary-300"}},e||{});o.id=Math.random();var i=_t(t);this.contentRef=ia({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=ea({component:rc,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 sc;return p.afterDismissed=s.close,s.close.pipe(r.take(1)).subscribe((function(t){var e=t.id;n.destroy(e)})),l.detectChanges(),Jt(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=Kt("div"),Ht(this.container,["d-flex","d-flex-column","dato-toasts-container"]),qt(this.document.body,this.container)},t.ctorParameters=function(){return[{type:_n},{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(_n),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:t,providedIn:"root"}),t=At([e.Injectable({providedIn:"root"}),vt(4,e.Inject(s.DOCUMENT)),bt("design:paramtypes",[_n,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],t)}(),dc=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(Gt(i,"height",rt.coerceCssPixelValue(e.height)),e.boxWidth){var r=rt.coerceCssPixelValue(e.boxWidth);Qt(i,{width:r,minWidth:r})}Qt(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;Gt(this.hostEl,"zIndex",Nn()),this.customClass&&Ht(this.hostEl,this.customClass),setTimeout((function(){return Ht(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}]},At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"options",null),t=At([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}}"]}),bt("design:paramtypes",[e.ElementRef])],t)}();
|
|
466
466
|
/**
|
|
467
467
|
* @license
|
|
468
468
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -476,7 +476,7 @@ function cc(){return{duration:4e3,icon:{color:"primary-300"}}}var pc,dc=function
|
|
|
476
476
|
*
|
|
477
477
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
478
478
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
479
|
-
*/(
|
|
479
|
+
*/(cc=t.PanelResultCloseTrigger||(t.PanelResultCloseTrigger={})).CLOSE="CLOSE",cc.SWITCH_CONTENT="SWITCH_CONTENT";var uc=function(t){this.panelRef=t};var hc=function(){function e(t){this.panelOptions=t,this._onClose=new n.Subject,this._onDestroy=new n.Subject,this._beforeClose=[],this.beforeCloseFinished=!0,this.panelOptions=mt(mt({},{enableClose:!0,ignoreCloseSelectors:[]}),t)}return Object.defineProperty(e.prototype,"$destroyed",{get:function(){return this._onDestroy.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.panelOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.panelOptions.data},enumerable:!0,configurable:!0}),e.prototype.close=function(e){this._tryClose({trigger:t.PanelResultCloseTrigger.CLOSE,data:e}).subscribe()},e.prototype.beforeClosed=function(t){return this._beforeClose.push(t),this},e.prototype.afterClosed=function(){return this._onClose.asObservable().pipe(r.take(1))},e.prototype._destroy=function(){this._onDestroy.closed||this._onDestroy.complete(),this._beforeClose=[],this._onClose.next(this._result),this._onClose.complete()},e.prototype._tryClose=function(t){var e=this;return this.canClose(t).pipe(r.switchMap((function(o){return o?(e._result=t,e._onDestroy.next(),e._onDestroy.complete(),e.afterClosed()):n.throwError("Unable to close dato-panel")})))},e.prototype.canClose=function(t){var e=this;if(!this._beforeClose.length)return n.of(!0);if(!this.beforeCloseFinished)return n.of(!1);this.beforeCloseFinished=!1;var o=this._beforeClose.map((function(e){var o=e(t);return n.isObservable(o)?o:n.of(o)}));return n.forkJoin(o).pipe(r.map((function(t){return t.every(Boolean)})),r.tap((function(){return e.beforeCloseFinished=!0})))},e}(),gc=function(){function o(t,e,o,i,a,s){this.resolver=t,this.translate=e,this.injector=o,this.appRef=i,this.config=a,this.document=s,this.backdropClassName="dato-panel-backdrop",this.backDropHolder="body",this.panelsStack=[],this._isOpen=new n.BehaviorSubject(!1),this.isOpen$=this._isOpen.asObservable().pipe(r.distinctUntilChanged())}return Object.defineProperty(o.prototype,"panelContainer",{get:function(){return this.document.querySelector(".dato-panel-container")},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isOpen",{get:function(){return!!this.panelsStack.length},enumerable:!0,configurable:!0}),o.prototype.open=function(e,n){var o=this;void 0===n&&(n={});var i=this.createPanelConfig(n),r=i.config,a=i.panelRef,s=this.createInjector(n.viewContainerRef,a);return this.panelContainer&&this.isOpen?this.tryClose({trigger:t.PanelResultCloseTrigger.SWITCH_CONTENT}).subscribe((function(){o.createPanel(r,e,n,s)}),(function(){r.panelRef._destroy(),o.panelsStack=o.panelsStack.filter((function(t){return t!==r})),o._isOpen.next(o.isOpen)})):this.createPanel(r,e,n,s),this.panelsStack.push(r),this._isOpen.next(this.isOpen),r.panelRef},o.prototype.createPanelConfig=function(t){var e=new hc(t);return{panelRef:e,config:new uc(e)}},o.prototype.createPanel=function(t,e,n,o){var i=n.backdrop;i&&i.enabled&&this.createBackdrop(i.selector),t.contentRef=ia({applicationRef:this.appRef,injector:o,resolver:this.resolver,content:_t(e)?this.translate.transform(e):e}),t.component=ea({component:dc,projectableNodes:t.contentRef.nodes,injector:o,resolver:this.resolver});var r=t.component.location.nativeElement;t.nativeElement=r,t.component.instance.customClass=n.customClass;var a=this.resolveRelativeTo(n.relativeTo||this.config.sidenavSelector);this.calcPosition(t,a),t.component.hostView.detectChanges(),this.document.body.appendChild(r),this.registerToEvents(t,a)},o.prototype.close=function(e){this.tryClose({trigger:t.PanelResultCloseTrigger.CLOSE,data:e}).subscribe()},o.prototype.createInjector=function(t,n){var o=t?t.injector:this.injector;return e.Injector.create({parent:o,providers:[{provide:hc,useValue:n}]})},o.prototype.tryClose=function(t){var e=this;if(this.panelsStack.length){var o=pe(this.panelsStack);return o.panelRef._tryClose(t).pipe(r.tap((function(){e.panelsStack=e.panelsStack.filter((function(t){return t!==o})),e._isOpen.next(e.isOpen)})))}return n.of()},o.prototype.registerToEvents=function(t,e){var o=this;n.fromEvent(window,"scroll",{capture:!0}).pipe(r.throttleTime(10),r.takeUntil(t.panelRef.$destroyed)).subscribe((function(){o.calcPosition(t,e)})),t.panelRef.options.enableClose&&this.registerCloseEvents(t),t.panelRef.$destroyed.pipe(r.take(1)).subscribe((function(){o.slidePanelOut()})),n.fromEvent(this.panelContainer,"animationend").pipe(r.filter((function(t){return"core-panelSlideOut"===t.animationName})),r.takeUntil(t.panelRef.afterClosed())).subscribe((function(){return o.destroy(t)}))},o.prototype.registerCloseEvents=function(e){var o=this;n.fromEvent(document,"keyup").pipe(Ii(t.KeyboardEventKeys.Escape),r.takeUntil(e.panelRef.$destroyed)).subscribe((function(){return o.close()})),n.fromEvent(document.body,"click",{capture:!0}).pipe(r.takeUntil(e.panelRef.$destroyed)).subscribe((function(t){var n=t.target,i=o.document.querySelector(o.config.appSelector).contains(n),r=o.document.querySelector(o.config.sidenavSelector),a=r&&r.contains(n),s=n.classList.contains(o.backdropClassName);(!e.panelRef.options.ignoreCloseSelectors.some((function(e){return Array.from(o.document.querySelectorAll(e)).some((function(e){return e.contains(t.target)}))}))&&i&&!a||s)&&o.close()}))},o.prototype.slidePanelOut=function(){var t=this.panelContainer;t&&Ht(t.parentElement,"close-panel")},o.prototype.createBackdrop=function(t){t&&(this.backDropHolder=t),this.backdropElement=this.document.createElement("div"),Ht(this.backdropElement,this.backdropClassName),Gt(this.backdropElement,"zIndex",9998),this.document.querySelector(this.backDropHolder).appendChild(this.backdropElement)},o.prototype.calcPosition=function(t,e){var n=te(e),o=n.left,i=n.top,r=n.height,a=n.width,s=t.panelRef.options;t.component.instance.options={offset:s.offset,rect:{left:o,top:i,width:a,height:s.height||r,boxWidth:s.width}}},o.prototype.resolveRelativeTo=function(t){return _t(t)?this.document.querySelector(t):t},o.prototype.destroy=function(t){if(this.panelContainer){if(t.contentRef.destroy(this.appRef),t.component.destroy(),this.document.body.removeChild(t.nativeElement),this.backdropElement){var e=this.document.querySelector(this.backDropHolder);e&&e.contains(this.backdropElement)&&e.removeChild(this.backdropElement),this.backdropElement=null}t.nativeElement=null,t.panelRef._destroy()}},o.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:_n},{type:e.Injector},{type:e.ApplicationRef},{type:void 0,decorators:[{type:e.Inject,args:[Hn]}]},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(_n),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(Hn),e.ɵɵinject(s.DOCUMENT))},token:o,providedIn:"root"}),o=At([e.Injectable({providedIn:"root"}),vt(4,e.Inject(Hn)),vt(5,e.Inject(s.DOCUMENT)),bt("design:paramtypes",[e.ComponentFactoryResolver,_n,e.Injector,e.ApplicationRef,Object,Object])],o)}(),fc=function(){function t(t){this.panelService=t}return t.prototype.close=function(){this.panelService.close()},t.ctorParameters=function(){return[{type:gc}]},t=At([e.Component({selector:"dato-panel-header",template:'\n <header class="d-flex dato-panel-header">\n <div><ng-content></ng-content></div>\n\n <dato-icon datoIcon="close" (click)="close()"></dato-icon>\n </header>\n '}),bt("design:paramtypes",[gc])],t)}(),mc=function(){function t(){}return t=At([e.Component({selector:"dato-panel-content",template:'\n <div class="dato-panel-content"><ng-content></ng-content></div>\n '})],t)}(),yc=function(){function t(){}return t=At([e.Component({selector:"dato-panel-footer",template:'\n <footer class="dato-panel-footer d-flex align-end-center"><ng-content></ng-content></footer>\n '})],t)}(),Ac=[dc,fc,mc,yc],vc=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Le],declarations:[Ac],exports:[Ac],entryComponents:[Ac]})],t)}();
|
|
480
480
|
/**
|
|
481
481
|
* @license
|
|
482
482
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -484,14 +484,14 @@ function cc(){return{duration:4e3,icon:{color:"primary-300"}}}var pc,dc=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 wc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function Sc(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 xc(t,e,n,o,i){var r=Oc(n,o),a=function(t,e){var n=new Sc(t,e.row,e.column),o=n.getCurrentToken();for(;o&&!wc(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 Oc(t,e){for(var n=new Sc(t,e.row,e.column),o=n.getCurrentToken();o&&!wc(o,"tag-name");)o=n.stepBackward();if(o)return o.value}function Dc(t){return{getCompletions:function(e,n,o,i,r){var a=n.getTokenAt(o.row,o.column);return a?((wc(a,"tag-name")||wc(a,"tag-open")||wc(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)),(wc(a,"tag-whitespace")||wc(a,"attribute-name"))&&r(null,function(t,e,n,o,i){var r=Oc(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)),wc(a,"attribute-value")&&r(null,xc(t,0,n,o)),[]):[]}}}function Ic(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 Tc,Rc=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)}(),Ac=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([Dc(t)],e.getBaseCompletors(e.langTools)))}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"JSObjectCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){Ic(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:Rc},{type:void 0,decorators:[{type:e.Inject,args:[Hn]}]}]},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(Hn)),Ct("design:paramtypes",[e.ElementRef,ht.HttpClient,Rc,Object])],t)}(),Ec=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)}(),Pc=[Ec,Ac],kc=function(){function t(){}return t=vt([e.NgModule({declarations:[Pc],exports:[Pc]})],t)}(),_c=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,jc=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 Ao("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(_c,"\\$&");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")," ")}return t},t.ctorParameters=function(){return[{type:ri,decorators:[{type:e.Optional}]},{type:ai,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",[ri,ai,ut.DomSanitizer,e.ElementRef])],t)}(),Mc=[ai,jc,ri],Lc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Mc],exports:[Mc]})],t)}(),Nc=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)}(),Fc=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){Si({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(Nc),Ct("design:type",Nc)],t.prototype,"content",void 0),vt([e.ContentChildren(bi,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"options",void 0),vt([e.ContentChildren(vi,{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)}(),Gc=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(Di(e)){var n=t.datoAutoComplete.getActiveItem().option;return t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown(),void t.datoAutoComplete.resetIndex()}Oi(e)&&t.datoAutoComplete.onKeydown(e,t.datoSize),Ii(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",Ln());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:En},{type:e.ViewContainerRef}]},vt([e.Input(),Ct("design:type",Fc)],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,En,e.ViewContainerRef])],t)}(),Vc=[Fc,Gc,Nc],zc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Bi],declarations:[Vc],exports:[Vc],entryComponents:[Fc]})],t)}(),Bc=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}(),Hc=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)}(),Uc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Fe,So,Co,o.ReactiveFormsModule,Ss,bo,Jn],declarations:[Hc],exports:[Hc]})],t)}(),Kc=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)}(),Wc=[Kc],Qc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Wc],exports:[Wc],entryComponents:[Wc]})],t)}(),$c=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:jn},{type:Ll}]},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,jn,Ll])],n)}(Dt),qc=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:$c},{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,$c,e.ElementRef,e.ChangeDetectorRef])],t)}(),Yc=[$c,qc],Zc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,bo],declarations:[Yc],exports:[Yc],entryComponents:[Yc]})],t)}(),Xc=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),Jc=[Xc],tp=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,bo],declarations:[Jc],exports:[Jc]})],t)}();
|
|
487
|
+
function bc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function Cc(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 wc(t,e,n,o,i){var r=Sc(n,o),a=function(t,e){var n=new Cc(t,e.row,e.column),o=n.getCurrentToken();for(;o&&!bc(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 Sc(t,e){for(var n=new Cc(t,e.row,e.column),o=n.getCurrentToken();o&&!bc(o,"tag-name");)o=n.stepBackward();if(o)return o.value}function xc(t){return{getCompletions:function(e,n,o,i,r){var a=n.getTokenAt(o.row,o.column);return a?((bc(a,"tag-name")||bc(a,"tag-open")||bc(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)),(bc(a,"tag-whitespace")||bc(a,"attribute-name"))&&r(null,function(t,e,n,o,i){var r=Sc(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)),bc(a,"attribute-value")&&r(null,wc(t,0,n,o)),[]):[]}}}function Oc(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 Dc,Ec=function(){function t(){this.fetchingAce=!1,this.fetchingBeautify=!1}return t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=At([e.Injectable({providedIn:"root"})],t)}(),Ic=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(St([xc(t)],e.getBaseCompletors(e.langTools)))}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"JSObjectCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){Oc(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,St(this.createRequests(["worker-css.js","worker-html.js","worker-javascript.js"])))},t.prototype.loadAceScripts=function(){return n.forkJoin.apply(void 0,St(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,St(this.createRequests(["beautify/base.js","beautify/css.js","beautify/html.js"]))).pipe(r.tap((function(t){Zt(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){Zt(e.join(" "),"ace-base"),t.ace.config.set("basePath",t.config.paths.editor)})),r.concatMap((function(){return t.loadAceWorkers()})),r.tap((function(e){Zt(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:Ec},{type:void 0,decorators:[{type:e.Inject,args:[Hn]}]}]},At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"theme",null),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"lang",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"options",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"HTMLCompletions",null),At([e.Input(),bt("design:type",Object),bt("design:paramtypes",[Object])],t.prototype,"JSObjectCompletions",null),t=a=At([e.Directive({selector:"[datoAce]",exportAs:"datoAce",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),vt(3,e.Inject(Hn)),bt("design:paramtypes",[e.ElementRef,ht.HttpClient,Ec,Object])],t)}(),Rc=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}]},At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"aceDraggableText",null),At([e.HostListener("dragstart",["$event"]),bt("design:type",Function),bt("design:paramtypes",[Event]),bt("design:returntype",void 0)],t.prototype,"drag",null),t=At([e.Directive({selector:"[aceDraggableText]"}),bt("design:paramtypes",[e.ElementRef])],t)}(),Tc=[Rc,Ic],Pc=function(){function t(){}return t=At([e.NgModule({declarations:[Tc],exports:[Tc]})],t)}(),kc=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,jc=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 To("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(kc,"\\$&");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")," ")}return t},t.ctorParameters=function(){return[{type:ai,decorators:[{type:e.Optional}]},{type:si,decorators:[{type:e.Optional}]},{type:ut.DomSanitizer},{type:e.ElementRef}]},At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoSearchableHighlight",null),t=At([e.Directive({selector:"[datoSearchableHighlight]"}),vt(0,e.Optional()),vt(1,e.Optional()),bt("design:paramtypes",[ai,si,ut.DomSanitizer,e.ElementRef])],t)}(),Mc=[si,jc,ai],_c=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[Mc],exports:[Mc]})],t)}(),Fc=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=At([e.Directive({selector:"[datoAutocompleteContent]"}),bt("design:paramtypes",[e.TemplateRef])],t)}(),Nc=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,St(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){Si({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)},At([e.Input(),bt("design:type",Object)],t.prototype,"labelKey",void 0),At([e.ViewChild(e.TemplateRef,{static:!0}),bt("design:type",e.TemplateRef)],t.prototype,"root",void 0),At([e.ContentChild(Fc),bt("design:type",Fc)],t.prototype,"content",void 0),At([e.ContentChildren(bi,{descendants:!0}),bt("design:type",e.QueryList)],t.prototype,"options",void 0),At([e.ContentChildren(vi,{descendants:!0}),bt("design:type",e.QueryList)],t.prototype,"groups",void 0),t=At([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)}(),Bc=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(Di(e)){var n=t.datoAutoComplete.getActiveItem().option;return t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown(),void t.datoAutoComplete.resetIndex()}Oi(e)&&t.datoAutoComplete.onKeydown(e,t.datoSize),Ei(e)&&(t.datoAutoComplete.resetIndex(),t.closeDropdown())}))},t.prototype.createDropdown=function(){var t,e,n=this.vcr.createEmbeddedView(this.datoAutoComplete.root);this.container=Kt("div"),Ht(this.container,"dato-autocomplete"),Ht(this.container,"dato-select-"+this.datoSize),Gt(this.container,"width",this.element.offsetWidth+"px"),Gt(this.container,"zIndex",Nn());try{for(var o=Ct(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}]},At([e.Input(),bt("design:type",Nc)],t.prototype,"datoAutoComplete",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"placement",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"datoSize",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"close",void 0),t=At([e.Directive({selector:"[datoAutoComplete]"}),vt(1,e.Optional()),bt("design:paramtypes",[e.ElementRef,o.NgControl,e.NgZone,Pn,e.ViewContainerRef])],t)}(),Lc=[Nc,Bc,Fc],Gc=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Qi],declarations:[Lc],exports:[Lc],entryComponents:[Nc]})],t)}(),Vc=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=wt(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=wt(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}(),zc=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){Ft(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=St(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}]},At([e.Input(),bt("design:type",Number),bt("design:paramtypes",[Number])],t.prototype,"maxDisplayedBreadcrumbs",null),At([e.Input(),bt("design:type",Array),bt("design:paramtypes",[Array])],t.prototype,"breadcrumbs",null),At([e.Input(),bt("design:type",o.FormControl)],t.prototype,"headerControl",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"showArrowInLast",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"lastArrowClass",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"markLastAsActive",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"dataAutoIdPrefix",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"isHeaderControlDisabled",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"headerControlAutoIdSuffix",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"breadcrumbClick",void 0),At([e.Output(),bt("design:type",Object)],t.prototype,"updateEditableText",void 0),t=At([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}}"]}),bt("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Qc=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Le,So,Co,o.ReactiveFormsModule,ws,bo,to],declarations:[zc],exports:[zc]})],t)}(),Hc=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}]},At([e.Output("datoInfiniteScroll"),bt("design:type",Object)],t.prototype,"containerBottom",void 0),At([e.Input("datoInfiniteScrollOffset"),bt("design:type",Object)],t.prototype,"offset",void 0),At([e.Input("datoInfiniteScrollRoot"),bt("design:type",Object)],t.prototype,"onRootElement",void 0),At([e.Input("datoInfiniteScrollContainer"),bt("design:type",Object)],t.prototype,"container",void 0),t=At([e.Component({selector:"dato-infinite-scroll",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush}),bt("design:paramtypes",[e.ElementRef,e.NgZone])],t)}(),Uc=[Hc],Yc=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[Uc],exports:[Uc],entryComponents:[Uc]})],t)}(),Wc=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:_n},{type:Fl}]},At([e.Input(),bt("design:type",Object)],n.prototype,"multi",void 0),At([e.ViewChild("fileInput",{static:!0}),bt("design:type",e.ElementRef)],n.prototype,"input",void 0),At([e.HostBinding("class.disabled"),bt("design:type",Object)],n.prototype,"disabled",void 0),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],n.prototype,"accept",null),At([e.HostListener("change",["$event.target.files"]),bt("design:type",Function),bt("design:paramtypes",[FileList]),bt("design:returntype",void 0)],n.prototype,"emitFiles",null),At([e.HostListener("click"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],n.prototype,"openFileUpload",null),n=At([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}"]}),bt("design:paramtypes",[o.NgControl,_n,Fl])],n)}(Ot),Kc=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",Ht(n.nativeElement,["large-size"])}return Object.defineProperty(t.prototype,"datoSize",{set:function(t){this.size=t||"lg",Ht(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:Wc},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},At([e.HostBinding("style.width.px"),e.Input(),bt("design:type",Object)],t.prototype,"width",void 0),At([e.HostBinding("style.height.px"),e.Input(),bt("design:type",Object)],t.prototype,"height",void 0),At([e.HostBinding("class.dragging-files"),bt("design:type",Object)],t.prototype,"isDraggingFiles",void 0),At([e.Input(),bt("design:type",String),bt("design:paramtypes",[String])],t.prototype,"datoSize",null),At([e.Input(),bt("design:type",e.TemplateRef)],t.prototype,"imgTpl",void 0),At([e.HostBinding("class.disabled"),bt("design:type",Object)],t.prototype,"disabled",void 0),At([e.HostListener("dragenter"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],t.prototype,"dragenter",null),At([e.HostListener("dragover",["$event"]),bt("design:type",Function),bt("design:paramtypes",[Object]),bt("design:returntype",void 0)],t.prototype,"dragover",null),At([e.HostListener("dragleave"),bt("design:type",Function),bt("design:paramtypes",[]),bt("design:returntype",void 0)],t.prototype,"dragleave",null),At([e.HostListener("drop",["$event"]),bt("design:type",Function),bt("design:paramtypes",[Object]),bt("design:returntype",void 0)],t.prototype,"drop",null),t=At([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}"]}),bt("design:paramtypes",[o.NgControl,Wc,e.ElementRef,e.ChangeDetectorRef])],t)}(),qc=[Wc,Kc],Jc=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,se,bo],declarations:[qc],exports:[qc],entryComponents:[qc]})],t)}(),Xc=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}]},At([e.Input(),bt("design:type",Array)],n.prototype,"buttons",void 0),At([e.Input(),bt("design:type",Object)],n.prototype,"disabledIds",void 0),At([e.Input(),e.HostBinding("class.is-round-edges"),bt("design:type",Object)],n.prototype,"isRoundEdges",void 0),At([e.Input(),bt("design:type",Object)],n.prototype,"datoSize",void 0),n=i=At([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}),bt("design:paramtypes",[e.ChangeDetectorRef])],n)}(Ot),Zc=[Xc],$c=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,se,bo],declarations:[Zc],exports:[Zc]})],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
|
-
*/(
|
|
494
|
+
*/(Dc=t.PillType||(t.PillType={})).PRIMARY="primary",Dc.SECONDARY="secondary",Dc.RED="red",Dc.ORANGE="orange";var tp=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"]}]}]},At([e.Input(),bt("design:type",Array),bt("design:paramtypes",[Array])],t.prototype,"options",null),At([e.Input(),bt("design:type",Object)],t.prototype,"labelTooltipPosition",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"canRemove",void 0),At([e.Input(),bt("design:type",Number),bt("design:paramtypes",[Number])],t.prototype,"limitTo",null),At([e.Output(),bt("design:type",Object)],t.prototype,"removeOption",void 0),t=At([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}"]}),vt(0,e.Attribute("datoSize")),bt("design:paramtypes",[Object])],t)}(),ep=[tp],np=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,to,bo,Le],declarations:[ep],exports:[ep]})],t)}(),op=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}]},At([e.Input(),bt("design:type",String)],t.prototype,"width",void 0),At([e.Input(),bt("design:type",Array)],t.prototype,"parts",void 0),At([e.Input(),bt("design:type",Number)],t.prototype,"percent",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"color",void 0),At([e.Input(),bt("design:type",Object)],t.prototype,"tooltip",void 0),At([e.Input(),bt("design:type",String)],t.prototype,"barColor",void 0),At([e.Input(),bt("design:type",Array)],t.prototype,"thresholds",void 0),At([e.Input(),bt("design:type",Boolean)],t.prototype,"showLegend",void 0),t=At([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%}"]}),bt("design:paramtypes",[e.ChangeDetectorRef])],t)}(),ip=[op],rp=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,to],declarations:[ip],exports:[ip]})],t)}(),ap=[to,Gc,ds,rs,_c,Pc,Hl,vc,qi,ac,se,Qc,Dn,Ml,Gl,Co,Le,So,Do,oc,or,El,Js,Yi,fi,Qs,_i,Pl,fl,ul,er,Qi,Jl,bo,Rt,ws,Yc,Ws,Jc,yl,Es,$c,fs,rl,np,rp],sp=function(){function t(){}var n;return n=t,t.forRoot=function(t){return{ngModule:n,providers:[{provide:Hn,useValue:t},{provide:ut.EVENT_MANAGER_PLUGINS,useClass:Vc,multi:!0}]}},t=n=At([e.NgModule({exports:[ap]})],t)}();(t.MockService||(t.MockService={})).TRANSLATE="translate";var lp={translate:{transform:function(t){return t}}};var cp={translate:function(){return{provide:Mn,useValue:lp.translate}},datePickerConfig:function(){return{provide:bn,useValue:function(){}}}};
|
|
495
495
|
/**
|
|
496
496
|
* @license
|
|
497
497
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -611,7 +611,7 @@ function wc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function Sc(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 dp(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 up(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]=dp({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function hp(t){var e=t.control,o=t.debounceTime,i=t.mapFn;return n.defer((function(){return e.valueChanges.pipe(ze(o),r.startWith(e.value||""),r.map(i))}))}window.coreVersion="22.13.7-rc.",t.APP_TRANSLATE=_n,t.AceService=Rc,t.BaseCustomControl=Dt,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=na,t.CustomHeaderControllerService=ba,t.DATE_PICKER_CONFIG=bn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=Na,t.DATO_FORM_ERRORS=bs,t.DATO_GRID_STORAGE_API=Ur,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=Ta,t.DatePickerConfig=vn,t.DatePickerMonthComponent=Ps,t.DatoAccordionComponent=ui,t.DatoAccordionContentComponent=si,t.DatoAccordionGroupComponent=ci,t.DatoAccordionHeaderComponent=li,t.DatoAccordionModule=gi,t.DatoAceDirective=Ac,t.DatoAceDraggableDirective=Ec,t.DatoAceModule=kc,t.DatoAutoCompleteContentDirective=Nc,t.DatoAutoFocusDirective=Rn,t.DatoAutocompleteComponent=Fc,t.DatoAutocompleteDirective=Gc,t.DatoAutocompleteModule=zc,t.DatoBreadcrumbsComponent=Hc,t.DatoBreadcrumbsModule=Uc,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=Xc,t.DatoButtonGroupModule=tp,t.DatoButtonModule=se,t.DatoCamelCasePipe=io,t.DatoCarouselComponent=ql,t.DatoCarouselItemDirective=Wl,t.DatoCarouselItemElement=$l,t.DatoCarouselModule=Zl,t.DatoCheckboxComponent=_i,t.DatoCheckboxModule=ji,t.DatoClipboardDirective=Bn,t.DatoColorDirective=Sn,t.DatoConfirmationDialogComponent=Xo,t.DatoControlErrorComponent=ms,t.DatoControlErrorContainerDirective=ys,t.DatoControlErrorsDirective=Cs,t.DatoCoreError=Ao,t.DatoCoreModule=lp,t.DatoCustomHeaderTemplateComponent=Ba,t.DatoCustomHeaderTemplateDirective=Va,t.DatoCustomMoreMenuTemplateDirective=za,t.DatoDatePickerContainerComponent=_s,t.DatoDatePickerModule=Qs,t.DatoDatePickerRangeComponent=Gs,t.DatoDatePickerSingleComponent=Us,t.DatoDialog=Jo,t.DatoDialogCloseDirective=cl,t.DatoDialogComponent=Qo,t.DatoDialogContentComponent=sl,t.DatoDialogDismissDirective=hl,t.DatoDialogFooterComponent=ll,t.DatoDialogHeaderComponent=al,t.DatoDialogModule=fl,t.DatoDialogRef=Wo,t.DatoDirectivesModule=Jn,t.DatoDisableControlDirective=Vn,t.DatoDraggableDirective=Tn,t.DatoDynamicContentComponent=dl,t.DatoDynamicContentModule=ul,t.DatoEditableHeaderComponent=Fl,t.DatoEditableHeaderModule=Vl,t.DatoFileInputComponent=$c,t.DatoFileInputDefaultComponent=qc,t.DatoFileInputModule=Zc,t.DatoFontDirective=xo,t.DatoFontIconComponent=Ge,t.DatoFontIconModule=Ve,t.DatoFormSubmitDirective=vs,t.DatoFormValidationModule=Ss,t.DatoGrid=lr,t.DatoGridAPI=Ro,t.DatoGridAvatarCellComponent=xl,t.DatoGridColumnDisplayMenuComponent=qa,t.DatoGridColumnHeaderComponent=Ca,t.DatoGridColumnHeaderMoreMenuComponent=pa,t.DatoGridComponent=Lo,t.DatoGridControllerComponent=Qa,t.DatoGridDateFilterOptions=Sr,t.DatoGridFilterComponent=va,t.DatoGridFilterOptionsMap=Dr,t.DatoGridGroupsMenuComponent=Ya,t.DatoGridHeaderComponent=No,t.DatoGridHeaderV2Component=Za,t.DatoGridInitialsCellComponent=Sl,t.DatoGridItemsCellComponent=wl,t.DatoGridModule=nr,t.DatoGridNumberFilterOptions=Or,t.DatoGridOnHoverComponent=Ua,t.DatoGridPaginationComponent=jo,t.DatoGridPaginationV2Component=Ja,t.DatoGridStatusCellComponent=Cl,t.DatoGridStringFilterOptions=xr,t.DatoGridToolbarComponent=ii,t.DatoGridToolbarItemDirective=Go,t.DatoGridToolbarItemElementDirective=Vo,t.DatoGridV2Component=$a,t.DatoGridV2LoaderComponent=Qr,t.DatoGridV2Module=Tl,t.DatoGridV2NoDataOverlayComponent=Jr,t.DatoGridV2ToolbarButtonComponent=ts,t.DatoGridV2ToolbarComponent=es,t.DatoGroupComponent=vi,t.DatoHighlightPipe=eo,t.DatoHotkeys=Wa,t.DatoHotkeysDirective=ml,t.DatoHotkeysHelpComponent=Ka,t.DatoHotkeysModule=yl,t.DatoIconButtonComponent=Io,t.DatoIconButtonModule=To,t.DatoIconComponent=Ne,t.DatoIconModule=Fe,t.DatoInfiniteScrollComponent=Kc,t.DatoInfiniteScrollModule=Qc,t.DatoInputComponent=wn,t.DatoInputModule=Co,t.DatoInputNumberComponent=Os,t.DatoInputNumberDirective=xs,t.DatoInputNumberModule=Ts,t.DatoKebabCasePipe=oo,t.DatoLinkButtonComponent=wo,t.DatoLinkButtonModule=So,t.DatoListComponent=Xi,t.DatoListModule=tr,t.DatoListNoDataComponent=nl,t.DatoListNoResultComponent=el,t.DatoListV2Component=tl,t.DatoListV2Module=rl,t.DatoLoaderComponent=$s,t.DatoLoadersModule=Ys,t.DatoMenuComponent=ss,t.DatoMenuContentDirective=as,t.DatoMenuItemDirective=cs,t.DatoMenuModule=ds,t.DatoMenuTriggerForDirective=ls,t.DatoMultiOptionComponent=Li,t.DatoMultiOptionV2Component=Gi,t.DatoOperatorTogglerComponent=hs,t.DatoOperatorTogglerModule=fs,t.DatoOptionComponent=bi,t.DatoOptionV2Component=Fi,t.DatoOptionsModule=Bi,t.DatoOriginDirective=In,t.DatoOverlay=Pn,t.DatoPageLoaderComponent=qs,t.DatoPanel=fc,t.DatoPanelComponent=uc,t.DatoPanelContentComponent=yc,t.DatoPanelFooterComponent=vc,t.DatoPanelHeaderComponent=mc,t.DatoPanelInternalConfig=hc,t.DatoPanelModule=Cc,t.DatoPanelRef=gc,t.DatoPillsComponent=ep,t.DatoPillsModule=op,t.DatoPipesModule=bo,t.DatoPopover=la,t.DatoPopoverComponent=ra,t.DatoPopoverModule=rs,t.DatoProgressBarComponent=ip,t.DatoProgressBarModule=ap,t.DatoRadioComponent=Al,t.DatoRadioModule=Pl,t.DatoRichTextDirective=Hl,t.DatoRichTextModule=Kl,t.DatoSearchResultsGroupSortPipe=po,t.DatoSearchResultsSortPipe=ho,t.DatoSearchableContainerComponent=ri,t.DatoSearchableDirective=ai,t.DatoSearchableHighlightDirective=jc,t.DatoSearchableModule=Lc,t.DatoSelectActiveDirective=Ci,t.DatoSelectComponent=Pi,t.DatoSelectEmptyComponent=Ni,t.DatoSelectModule=$i,t.DatoShortNumberPipe=yo,t.DatoSliderComponent=Tt,t.DatoSliderModule=At,t.DatoSnackbar=Ll,t.DatoSnackbarComponent=_l,t.DatoSnackbarModule=jl,t.DatoSortableComponent=di,t.DatoSortableHandleDirective=Hi,t.DatoSortableModule=Ki,t.DatoStaticImageSrcDirective=Un,t.DatoStaticImagesSrcModule=Kn,t.DatoSubscribeContext=Fn,t.DatoSubscribeDirective=Gn,t.DatoTab=ec,t.DatoTabContent=tc,t.DatoTabTitle=Jl,t.DatoTabsModule=ic,t.DatoTabset=nc,t.DatoTemplatePortal=kn,t.DatoTextModule=Do,t.DatoThemesModule=Dn,t.DatoToast=dc,t.DatoToastComponent=ac,t.DatoToastModule=sc,t.DatoTogglerComponent=zs,t.DatoTogglerModule=Hs,t.DatoTooltipDirective=Nn,t.DatoTooltipV2Directive=Zn,t.DatoTrackByPropPipe=fo,t.DatoTranslateService=jn,t.DatoTreePipe=mo,t.DatoTriggerMulti=Mi,t.DatoTriggerSingle=Ai,t.DialogConfig=$o,t.EventModifiersPlugin=Bc,t.GridToolbarService=oi,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=Me,t.POPPER_BOUNDARY=ks,t.PaletteDirective=xn,t.PopoverCloseDirective=ns,t.PopoverContentDirective=os,t.PopoverRef=aa,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=Ml,t.Store=Zs,t.SvgRegistry=Le,t.ToolbarConfirmation=ei,t.ToolbarDeleteConfirmation=ni,t.ToolbarHandler=ti,t.TranslatePipe=no,t._valueChanges=hp,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ut,t.addJSObjectCompletor=Ic,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=co,t.alphabeticalSort=lo,t.appendChild=qt,t.appendScript=Xt,t.appendStyle=Jt,t.appendToBody=Zt,t.assertString=function(t,e){if("string"!=typeof t)throw new Ao(e+" expecting string but got "+typeof t)},t.camelCase=Ie,t.capitalize=De,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=ao,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=La,t.convertToTreeData=Ma,t.copyToClipboard=zn,t.createComponent=ta,t.createElement=$t,t.createGUID=Re,t.createHTMLCompletor=Dc,t.curry=ve,t.dateCompare=_e,t.daysOfTheMonth=Es,t.debounce=function(t,e,n){return I(t,e,n)},t.declarations=gl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),G(t,e,n)},t.deepmerge=Xr,t.defaultActions=ca,t.defaultConfig=kl,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=Ia,t.defaultGridTreeLabel=Ra,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=xa,t.dialogSizePreset=Ho,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=qn,t.directives=On,t.drop=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.editableCellRendererWithSearchHighlight=Kr,t.escape=Oe,t.escapeRegExp=function(t){return H(t)},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 hp({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return dp({collection:t,value:e,labelKey:r})}})},t.filterByTerm=dp,t.filterDialogDismissed=function(){return rc(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return rc(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 hp({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return up({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=up,t.filterKey=Ti,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=ha,t.generateMonths=Ls,t.get=function(t,e,n){return E(t,e,n)},t.getAttr=Bt,t.getCustomRange=an,t.getDateISOString=ln,t.getDefaultConfirmationOptions=Yo,t.getDefaultOptions=zo,t.getDefaultsToastOptions=cc,t.getElementCoords=te,t.getFunctionName=be,t.getGridConfiguration=ir,t.getGridModel=sr,t.getInitials=Ae,t.getLocalizedFormat=cn,t.getMultiTemplate=fi,t.getOptionTemplate=mi,t.getPopperDefaults=function(t){return{placement:t.placement,modifiers:{keepTogether:{enabled:!0},hide:{enabled:!1},preventOverflow:{enabled:!1}}}},t.getUTCDate=sn,t.getVisibleActions=kr,t.gridTreeFilePathKey=Aa,t.groupBy=function(t,e){return x(t,e)},t.groupSortOrder=ro,t.has=function(t,e){return P(t,e)},t.inView=Qn,t.intersection=
|
|
614
|
+
function pp(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 dp(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]=pp({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function up(t){var e=t.control,o=t.debounceTime,i=t.mapFn;return n.defer((function(){return e.valueChanges.pipe(ze(o),r.startWith(e.value||""),r.map(i))}))}window.coreVersion="22.14.0",t.APP_TRANSLATE=Mn,t.AceService=Ec,t.BaseCustomControl=Ot,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=oa,t.CustomHeaderControllerService=ba,t.DATE_PICKER_CONFIG=bn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=Na,t.DATO_FORM_ERRORS=vs,t.DATO_GRID_STORAGE_API=Ur,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=Ia,t.DatePickerConfig=vn,t.DatePickerMonthComponent=Ps,t.DatoAccordionComponent=hi,t.DatoAccordionContentComponent=li,t.DatoAccordionGroupComponent=pi,t.DatoAccordionHeaderComponent=ci,t.DatoAccordionModule=fi,t.DatoAceDirective=Ic,t.DatoAceDraggableDirective=Rc,t.DatoAceModule=Pc,t.DatoAutoCompleteContentDirective=Fc,t.DatoAutoFocusDirective=Rn,t.DatoAutocompleteComponent=Nc,t.DatoAutocompleteDirective=Bc,t.DatoAutocompleteModule=Gc,t.DatoBreadcrumbsComponent=zc,t.DatoBreadcrumbsModule=Qc,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=Xc,t.DatoButtonGroupModule=$c,t.DatoButtonModule=se,t.DatoCamelCasePipe=ro,t.DatoCarouselComponent=Kl,t.DatoCarouselItemDirective=Ul,t.DatoCarouselItemElement=Wl,t.DatoCarouselModule=Jl,t.DatoCheckboxComponent=Mi,t.DatoCheckboxModule=_i,t.DatoClipboardDirective=Qn,t.DatoColorDirective=Sn,t.DatoConfirmationDialogComponent=$o,t.DatoControlErrorComponent=ms,t.DatoControlErrorContainerDirective=ys,t.DatoControlErrorsDirective=bs,t.DatoCoreError=To,t.DatoCoreModule=sp,t.DatoCustomHeaderTemplateComponent=za,t.DatoCustomHeaderTemplateDirective=Ga,t.DatoCustomMoreMenuTemplateDirective=Va,t.DatoDatePickerContainerComponent=js,t.DatoDatePickerModule=Ws,t.DatoDatePickerRangeComponent=Ls,t.DatoDatePickerSingleComponent=Hs,t.DatoDialog=ti,t.DatoDialogCloseDirective=cl,t.DatoDialogComponent=Ko,t.DatoDialogContentComponent=sl,t.DatoDialogDismissDirective=hl,t.DatoDialogFooterComponent=ll,t.DatoDialogHeaderComponent=al,t.DatoDialogModule=fl,t.DatoDialogRef=Wo,t.DatoDirectivesModule=to,t.DatoDisableControlDirective=Vn,t.DatoDraggableDirective=In,t.DatoDynamicContentComponent=dl,t.DatoDynamicContentModule=ul,t.DatoEditableHeaderComponent=Bl,t.DatoEditableHeaderModule=Gl,t.DatoFileInputComponent=Wc,t.DatoFileInputDefaultComponent=Kc,t.DatoFileInputModule=Jc,t.DatoFontDirective=xo,t.DatoFontIconComponent=Ge,t.DatoFontIconModule=Ve,t.DatoFormSubmitDirective=As,t.DatoFormValidationModule=ws,t.DatoGrid=cr,t.DatoGridAPI=Ro,t.DatoGridAvatarCellComponent=Sl,t.DatoGridColumnDisplayMenuComponent=qa,t.DatoGridColumnHeaderComponent=Ca,t.DatoGridColumnHeaderMoreMenuComponent=da,t.DatoGridComponent=No,t.DatoGridControllerComponent=Wa,t.DatoGridDateFilterOptions=Sr,t.DatoGridFilterComponent=va,t.DatoGridFilterOptionsMap=Dr,t.DatoGridGroupsMenuComponent=Ja,t.DatoGridHeaderComponent=Bo,t.DatoGridHeaderV2Component=Xa,t.DatoGridInitialsCellComponent=wl,t.DatoGridItemsCellComponent=Cl,t.DatoGridModule=or,t.DatoGridNumberFilterOptions=Or,t.DatoGridOnHoverComponent=Ha,t.DatoGridPaginationComponent=_o,t.DatoGridPaginationV2Component=$a,t.DatoGridStatusCellComponent=bl,t.DatoGridStringFilterOptions=xr,t.DatoGridToolbarComponent=ri,t.DatoGridToolbarItemDirective=Go,t.DatoGridToolbarItemElementDirective=Vo,t.DatoGridV2Component=Ka,t.DatoGridV2LoaderComponent=Kr,t.DatoGridV2Module=El,t.DatoGridV2NoDataOverlayComponent=ta,t.DatoGridV2ToolbarButtonComponent=ts,t.DatoGridV2ToolbarComponent=es,t.DatoGroupComponent=vi,t.DatoHighlightPipe=no,t.DatoHotkeys=Ya,t.DatoHotkeysDirective=ml,t.DatoHotkeysHelpComponent=Ua,t.DatoHotkeysModule=yl,t.DatoIconButtonComponent=Eo,t.DatoIconButtonModule=Io,t.DatoIconComponent=Be,t.DatoIconModule=Le,t.DatoInfiniteScrollComponent=Hc,t.DatoInfiniteScrollModule=Yc,t.DatoInputComponent=wn,t.DatoInputModule=Co,t.DatoInputNumberComponent=xs,t.DatoInputNumberDirective=Ss,t.DatoInputNumberModule=Es,t.DatoKebabCasePipe=io,t.DatoLinkButtonComponent=wo,t.DatoLinkButtonModule=So,t.DatoListComponent=$i,t.DatoListModule=er,t.DatoListNoDataComponent=nl,t.DatoListNoResultComponent=el,t.DatoListV2Component=tl,t.DatoListV2Module=rl,t.DatoLoaderComponent=Ks,t.DatoLoadersModule=Js,t.DatoMenuComponent=ss,t.DatoMenuContentDirective=as,t.DatoMenuItemDirective=cs,t.DatoMenuModule=ds,t.DatoMenuTriggerForDirective=ls,t.DatoMultiOptionComponent=Ni,t.DatoMultiOptionV2Component=Gi,t.DatoOperatorTogglerComponent=hs,t.DatoOperatorTogglerModule=fs,t.DatoOptionComponent=bi,t.DatoOptionV2Component=Li,t.DatoOptionsModule=Qi,t.DatoOriginDirective=En,t.DatoOverlay=kn,t.DatoPageLoaderComponent=qs,t.DatoPanel=gc,t.DatoPanelComponent=dc,t.DatoPanelContentComponent=mc,t.DatoPanelFooterComponent=yc,t.DatoPanelHeaderComponent=fc,t.DatoPanelInternalConfig=uc,t.DatoPanelModule=vc,t.DatoPanelRef=hc,t.DatoPillsComponent=tp,t.DatoPillsModule=np,t.DatoPipesModule=bo,t.DatoPopover=ca,t.DatoPopoverComponent=aa,t.DatoPopoverModule=rs,t.DatoProgressBarComponent=op,t.DatoProgressBarModule=rp,t.DatoRadioComponent=Rl,t.DatoRadioModule=Pl,t.DatoRichTextDirective=zl,t.DatoRichTextModule=Hl,t.DatoSearchResultsGroupSortPipe=uo,t.DatoSearchResultsSortPipe=go,t.DatoSearchableContainerComponent=ai,t.DatoSearchableDirective=si,t.DatoSearchableHighlightDirective=jc,t.DatoSearchableModule=_c,t.DatoSelectActiveDirective=Ci,t.DatoSelectComponent=ki,t.DatoSelectEmptyComponent=Bi,t.DatoSelectModule=qi,t.DatoShortNumberPipe=Ao,t.DatoSliderComponent=Et,t.DatoSliderModule=Rt,t.DatoSnackbar=Fl,t.DatoSnackbarComponent=jl,t.DatoSnackbarModule=Ml,t.DatoSortableComponent=ui,t.DatoSortableHandleDirective=Hi,t.DatoSortableModule=Yi,t.DatoStaticImageSrcDirective=Un,t.DatoStaticImagesSrcModule=Yn,t.DatoSubscribeContext=Ln,t.DatoSubscribeDirective=Gn,t.DatoTab=tc,t.DatoTabContent=$l,t.DatoTabTitle=Zl,t.DatoTabsModule=oc,t.DatoTabset=ec,t.DatoTemplatePortal=jn,t.DatoTextModule=Do,t.DatoThemesModule=Dn,t.DatoToast=pc,t.DatoToastComponent=rc,t.DatoToastModule=ac,t.DatoTogglerComponent=Vs,t.DatoTogglerModule=Qs,t.DatoTooltipDirective=Bn,t.DatoTooltipV2Directive=Zn,t.DatoTrackByPropPipe=mo,t.DatoTranslateService=_n,t.DatoTreePipe=yo,t.DatoTriggerMulti=Fi,t.DatoTriggerSingle=Ti,t.DialogConfig=qo,t.EventModifiersPlugin=Vc,t.GridToolbarService=ii,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=Fe,t.POPPER_BOUNDARY=ks,t.PaletteDirective=xn,t.PopoverCloseDirective=ns,t.PopoverContentDirective=os,t.PopoverRef=sa,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=_l,t.Store=Xs,t.SvgRegistry=Ne,t.ToolbarConfirmation=ni,t.ToolbarDeleteConfirmation=oi,t.ToolbarHandler=ei,t.TranslatePipe=oo,t._valueChanges=up,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ht,t.addJSObjectCompletor=Oc,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=Zt,t.appendStyle=$t,t.appendToBody=Xt,t.assertString=function(t,e){if("string"!=typeof t)throw new To(e+" expecting string but got "+typeof t)},t.camelCase=Ee,t.capitalize=De,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=Fa,t.convertToTreeData=_a,t.createComponent=ea,t.createElement=Kt,t.createGUID=Re,t.createHTMLCompletor=xc,t.curry=Ae,t.dateCompare=Me,t.daysOfTheMonth=Ts,t.debounce=function(t,e,n){return D(t,e,n)},t.declarations=gl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),L(t,e,n)},t.deepmerge=$r,t.defaultActions=pa,t.defaultConfig=kl,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=Ea,t.defaultGridTreeLabel=Ra,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=xa,t.dialogSizePreset=Ho,t.diff=we,t.difference=le,t.differenceBy=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return h.apply(void 0,St(t))},t.dimensionsChanges=Jn,t.directives=On,t.drop=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.editableCellRendererWithSearchHighlight=Yr,t.escape=xe,t.escapeRegExp=Oe,t.filter=function(t,e){return x(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 up({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return pp({collection:t,value:e,labelKey:r})}})},t.filterByTerm=pp,t.filterDialogDismissed=function(){return ic(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return ic(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 up({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return dp({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=dp,t.filterKey=Ii,t.find=function(t,e,n){return A(t,e,n)},t.findIndex=ce,t.findKey=function(t,e){return O(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 v(t,e)},t.formatKeys=ga,t.generateMonths=Fs,t.get=function(t,e,n){return T(t,e,n)},t.getAttr=zt,t.getCustomRange=sn,t.getDateISOString=cn,t.getDefaultConfirmationOptions=Xo,t.getDefaultOptions=zo,t.getDefaultsToastOptions=lc,t.getElementCoords=te,t.getFunctionName=ve,t.getGridConfiguration=rr,t.getGridModel=lr,t.getInitials=Te,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=jr,t.gridTreeFilePathKey=Ta,t.groupBy=function(t,e){return S(t,e)},t.groupSortOrder=ao,t.has=function(t,e){return P(t,e)},t.inView=Kn,t.intersection=
|
|
615
615
|
/**
|
|
616
616
|
* @license
|
|
617
617
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -619,7 +619,7 @@ function dp(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,
|
|
622
|
+
function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p.apply(void 0,St(t))},t.invert=function(t){return G(t)},t.isArrayValuesEqual=he,t.isArrowUpDown=Oi,t.isBoolean=Nt,t.isEmpty=kt,t.isEmptyString=function(t){return 0===t.trim().length},t.isEnter=Di,t.isEqual=Mt,t.isEscape=Ei,t.isFraction=function(t){if(!jt(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=Tt,t.isMacintosh=ha,t.isNil=Ft,t.isNumber=jt,t.isObject=Pt,t.isRangeCondition=Er,t.isRangeCustom=an,t.isString=_t,t.isTestEnv=Ri,t.isValidMediaLink=function(t){return Pe.test(t)||ke.test(t)},t.kebabCase=Ie,t.keyBy=function(t,e){return C(t,e)},t.keysSymbols=ua,t.last=pe,t.map=function(t,e){return b(t,e)},t.mapKeys=function(t,e){return j(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 _.apply(void 0,St([t],e))},t.minBy=function(t,e){return f(t,e)},t.mockInDev=function(t,e,n){return window.datoDevMode?lp[t]:n.get(e)},t.mocks=lp,t.ngContentResolver=ia,t.noop=ne,t.normalizeData=xi,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 Se(t,e)}),o):Se(o,e)},t.omitBy=function(t,e){return B(t,e)},t.optionalDebounce=ze,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 R.apply(void 0,St([t],e))},t.polling=
|
|
623
623
|
/**
|
|
624
624
|
* @license
|
|
625
625
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -627,12 +627,12 @@ function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p.ap
|
|
|
627
627
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
628
628
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
629
629
|
*/
|
|
630
|
-
function(t,e,o){if(void 0===o&&(o=1),!
|
|
630
|
+
function(t,e,o){if(void 0===o&&(o=1),!jt(e)||!jt(o))throw"period/initialDelay should be a number";return o=Math.min(o,1),n.timer(o,e).pipe(r.concatMapTo(t))}
|
|
631
631
|
/**
|
|
632
632
|
* @license
|
|
633
633
|
* Copyright Datorama. All Rights Reserved.
|
|
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=
|
|
637
|
+
*/,t.prependChild=Jt,t.publicApi=Oo,t.query=Bt,t.queryAll=Lt,t.random=function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=1),!jt(t))throw"the lower bound is not a number";if(!jt(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 w(t,e)},t.relativeDateTypes=An,t.removeClass=Yt,t.resolveRange=Ns,t.round=function(t,e){if(!jt(t))throw"value to round is not a number";if(e&&!jt(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=Wr,t.searchResultsGroupSort=lo,t.searchResultsSort=ho,t.setAttr=Vt,t.setAttribute=Wt,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=Gt,t.setStyles=Qt,t.shortNumber=be,t.size=ye,t.sortBy=function(t,e){return y(t,e)},t.stubs=cp,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=Za,t.throttle=function(t,e,n){return E(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=Ct(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=Ut,t.toolbarActionToContextAction=Gr,t.tryParsePivotValue=hr,t.unescape=function(t){return z(t)},t.union=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return d.apply(void 0,St(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=Pr,t.validateDate=_s,t.validateDateCondition=Tr,t.validateFilter=kr,t.validateNumberCondition=Rr,t.validateRange=Ms,t.validateStringCondition=Ir,t.values=Ce,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=zn,t.zoneStable=Tn,t.ɵ0=Sa,t.ɵ1=Oa,t.ɵ2=yn,t.ɵb=Hn,t.ɵc=Mo,t.ɵd=Pn,t.ɵe=vr,t.ɵf=pr,t.ɵg=La,t.ɵh=Us,t.ɵi=Zs,t.ɵj=ol,t.ɵk=Ba,t.ɵl=xl,t.ɵm=vl,t.ɵn=Al,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
638
638
|
//# sourceMappingURL=datorama-core.umd.min.js.map
|