@datorama/core 22.13.0-beta.7 → 22.13.0-beta.8

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 CHANGED
@@ -14947,6 +14947,10 @@ dato-input input:disabled:hover {
14947
14947
  background-color: themify(accent-100);
14948
14948
  }
14949
14949
 
14950
+ .dato-grid .ag-cell {
14951
+ -webkit-font-smoothing: antialiased;
14952
+ }
14953
+
14950
14954
  .dato-grid .ag-cell .ag-selection-checkbox {
14951
14955
  display: block;
14952
14956
  position: relative;
@@ -15020,6 +15024,14 @@ dato-input input:disabled:hover {
15020
15024
  display: none;
15021
15025
  }
15022
15026
 
15027
+ .dato-grid .ag-cell .ag-selection-checkbox .ag-cell-value {
15028
+ margin-left: 0;
15029
+ }
15030
+
15031
+ .dato-grid .ag-cell .ag-selection-checkbox .ag-icon-checkbox-checked:before {
15032
+ display: none;
15033
+ }
15034
+
15023
15035
  .dato-grid .ag-cell .search-highlight {
15024
15036
  background-color: #FDF2CF;
15025
15037
  }
@@ -20826,7 +20826,7 @@
20826
20826
  selector: 'dato-grid-initials-cell',
20827
20827
  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",
20828
20828
  changeDetection: core.ChangeDetectionStrategy.OnPush,
20829
- styles: [".initials-container .initials{width:34px;height:34px;line-height:33px;border-radius:50%;font-size:15px}.initials-container.bold{font-weight:600}"]
20829
+ 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}"]
20830
20830
  })
20831
20831
  ], DatoGridInitialsCellComponent);
20832
20832
  return DatoGridInitialsCellComponent;
@@ -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
- Zs=t.RenderMethod||(t.RenderMethod={})).Component="Component",Zs.Template="Template",Zs.Text="Text";var cl,pl=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)}(),dl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[pl],exports:[pl]})],t)}(),ul=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.dismiss(this.dialogResult)},t.ctorParameters=function(){return[{type:Yo,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",[Yo])],t)}(),hl=[Wo,rl,al,sl,ll,ul,Zo],gl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,se,Be,Eo,dl,$n,On],providers:[$o,Yo],declarations:[hl],exports:[hl],entryComponents:[Wo,Zo]})],t)}(),fl=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:Ua},{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",[Ua,e.ElementRef])],t)}(),ml=function(){function t(){}return t=At([e.NgModule({imports:[gl,se,s.CommonModule,vo],declarations:[Ha,fl],exports:[fl],entryComponents:[Ha]})],t)}(),yl=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=Ea.CLIENT,n=Ea.SERVER;return t>=0?t:this.isServerSide?n:e},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.subscribeOnSearchChange(),this.subscribeOnSearchExternalChange(),this.gridQuery.selectedRowsChange$.subscribe((function(e){t.hasSelectedRows=ye(e)>0||t.gridQuery.isServerSelectAllRowsEnabled,t.cdr.detectChanges()}))},t.prototype.ngOnDestroy=function(){},t.prototype.subscribeOnSearchChange=function(){var t=this;this.searchControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.gridService.setSearchTerm(e),t.isServerSide||(t.gridService.notifyFilterUpdate(),t.gridQuery.getGridOptions().enableSearchHighlight&&t.gridService.api.grid.refreshCells({force:!0}))}))},t.prototype.subscribeOnSearchExternalChange=function(){var t=this;this.gridQuery.selectSearchTerm().pipe(r.filter((function(e){return e!==t.searchControl.value})),i.untilDestroyed(this)).subscribe((function(e){t.searchControl.setValue(e)}))},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn},{type:Ba},{type:Ar}]},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,Mn,Ba,Ar])],t)}(),Al=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)}(),vl=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)}(),bl=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)}(),Cl=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?Oe(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.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)}(),wl=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>{{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)}(),Sl=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)}(),xl=[Wa,Za,Ja,Ya,ba,Na,Va,La,Ga,pa,Aa,ts,$a,Al,qa,Ka,Wr,$r,Qa,yl],Ol=[vl,bl,Sl,Cl,wl],Dl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule,$n,Eo,Be,se,wo,vo,is,gi,zi,Ki,bo,ps,gs,Cs,Ds,Ys,Ui,qs,st.AgGridModule,il,ml,Mi],entryComponents:[ba,Na,pa,Aa,qa,Ka,Wr,$r,Qa,Ol],declarations:[xl,Ol],exports:[xl,Ol]})],t)}(),El={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Il})),multi:!0},Il=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:[El],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=[Il],Rl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Oo],declarations:[Tl],exports:[Tl]})],t)}();function Pl(){return{duration:4e3,dismissible:!1}}
413
+ Zs=t.RenderMethod||(t.RenderMethod={})).Component="Component",Zs.Template="Template",Zs.Text="Text";var cl,pl=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)}(),dl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule],declarations:[pl],exports:[pl]})],t)}(),ul=function(){function t(t){this.dialogRef=t}return t.prototype.onClick=function(){this.dialogRef.dismiss(this.dialogResult)},t.ctorParameters=function(){return[{type:Yo,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",[Yo])],t)}(),hl=[Wo,rl,al,sl,ll,ul,Zo],gl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,se,Be,Eo,dl,$n,On],providers:[$o,Yo],declarations:[hl],exports:[hl],entryComponents:[Wo,Zo]})],t)}(),fl=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:Ua},{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",[Ua,e.ElementRef])],t)}(),ml=function(){function t(){}return t=At([e.NgModule({imports:[gl,se,s.CommonModule,vo],declarations:[Ha,fl],exports:[fl],entryComponents:[Ha]})],t)}(),yl=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=Ea.CLIENT,n=Ea.SERVER;return t>=0?t:this.isServerSide?n:e},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.subscribeOnSearchChange(),this.subscribeOnSearchExternalChange(),this.gridQuery.selectedRowsChange$.subscribe((function(e){t.hasSelectedRows=ye(e)>0||t.gridQuery.isServerSelectAllRowsEnabled,t.cdr.detectChanges()}))},t.prototype.ngOnDestroy=function(){},t.prototype.subscribeOnSearchChange=function(){var t=this;this.searchControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.gridService.setSearchTerm(e),t.isServerSide||(t.gridService.notifyFilterUpdate(),t.gridQuery.getGridOptions().enableSearchHighlight&&t.gridService.api.grid.refreshCells({force:!0}))}))},t.prototype.subscribeOnSearchExternalChange=function(){var t=this;this.gridQuery.selectSearchTerm().pipe(r.filter((function(e){return e!==t.searchControl.value})),i.untilDestroyed(this)).subscribe((function(e){t.searchControl.setValue(e)}))},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:Mn},{type:Ba},{type:Ar}]},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,Mn,Ba,Ar])],t)}(),Al=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)}(),vl=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)}(),bl=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)}(),Cl=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?Oe(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.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)}(),wl=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>{{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)}(),Sl=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)}(),xl=[Wa,Za,Ja,Ya,ba,Na,Va,La,Ga,pa,Aa,ts,$a,Al,qa,Ka,Wr,$r,Qa,yl],Ol=[vl,bl,Sl,Cl,wl],Dl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule,$n,Eo,Be,se,wo,vo,is,gi,zi,Ki,bo,ps,gs,Cs,Ds,Ys,Ui,qs,st.AgGridModule,il,ml,Mi],entryComponents:[ba,Na,pa,Aa,qa,Ka,Wr,$r,Qa,Ol],declarations:[xl,Ol],exports:[xl,Ol]})],t)}(),El={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Il})),multi:!0},Il=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:[El],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=[Il],Rl=function(){function t(){}return t=At([e.NgModule({imports:[s.CommonModule,Oo],declarations:[Tl],exports:[Tl]})],t)}();function Pl(){return{duration:4e3,dismissible:!1}}
414
414
  /**
415
415
  * @license
416
416
  * Copyright Datorama. All Rights Reserved.