@eurosat/buttons 10.0.0 → 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/esm2020/eurosat-buttons.mjs +5 -0
  2. package/esm2020/lib/components/dialog-confirm/dialog-confirm.component.mjs +56 -0
  3. package/esm2020/lib/components/dialog-form/dialog-form.component.mjs +36 -0
  4. package/esm2020/lib/components/dialog-result.mjs +2 -0
  5. package/esm2020/lib/es-buttons.component.mjs +200 -0
  6. package/esm2020/lib/es-buttons.module.mjs +59 -0
  7. package/esm2020/lib/model/es-button-action.mjs +13 -0
  8. package/esm2020/lib/model/es-button-server-response.mjs +2 -0
  9. package/esm2020/lib/model/es-button.interface.mjs +2 -0
  10. package/esm2020/public_api.mjs +9 -0
  11. package/fesm2015/eurosat-buttons.mjs +342 -0
  12. package/fesm2015/eurosat-buttons.mjs.map +1 -0
  13. package/fesm2020/eurosat-buttons.mjs +342 -0
  14. package/fesm2020/eurosat-buttons.mjs.map +1 -0
  15. package/index.d.ts +5 -0
  16. package/lib/components/dialog-confirm/dialog-confirm.component.d.ts +18 -15
  17. package/lib/components/dialog-form/dialog-form.component.d.ts +18 -15
  18. package/lib/components/dialog-result.d.ts +4 -4
  19. package/lib/es-buttons.component.d.ts +42 -39
  20. package/lib/es-buttons.module.d.ts +18 -2
  21. package/lib/model/es-button-action.d.ts +12 -12
  22. package/lib/model/es-button-server-response.d.ts +5 -5
  23. package/lib/model/es-button.interface.d.ts +14 -14
  24. package/package.json +26 -14
  25. package/public_api.d.ts +5 -5
  26. package/bundles/eurosat-buttons.umd.js +0 -592
  27. package/bundles/eurosat-buttons.umd.js.map +0 -1
  28. package/bundles/eurosat-buttons.umd.min.js +0 -2
  29. package/bundles/eurosat-buttons.umd.min.js.map +0 -1
  30. package/esm2015/eurosat-buttons.js +0 -12
  31. package/esm2015/lib/components/dialog-confirm/dialog-confirm.component.js +0 -98
  32. package/esm2015/lib/components/dialog-form/dialog-form.component.js +0 -68
  33. package/esm2015/lib/components/dialog-result.js +0 -16
  34. package/esm2015/lib/es-buttons.component.js +0 -327
  35. package/esm2015/lib/es-buttons.module.js +0 -46
  36. package/esm2015/lib/model/es-button-action.js +0 -42
  37. package/esm2015/lib/model/es-button-server-response.js +0 -16
  38. package/esm2015/lib/model/es-button.interface.js +0 -34
  39. package/esm2015/public_api.js +0 -14
  40. package/eurosat-buttons.d.ts +0 -6
  41. package/eurosat-buttons.metadata.json +0 -1
  42. package/fesm2015/eurosat-buttons.js +0 -627
  43. package/fesm2015/eurosat-buttons.js.map +0 -1
@@ -1,627 +0,0 @@
1
- import { EventEmitter, Component, Output, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
2
- import { Router } from '@angular/router';
3
- import { MatSnackBarConfig, MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
4
- import { EsSnackBarPanelClass } from '@eurosat/snackbar';
5
- import { HttpService } from '@eurosat/http';
6
- import { EsIcon, EsIconModule } from '@eurosat/icon';
7
- import { MatDialogRef } from '@angular/material/dialog';
8
- import { EsDialogService, EsDialogModule } from '@eurosat/dialog';
9
- import { EsFormResponseMessageType, EsFormModule } from '@eurosat/form';
10
- import { take } from 'rxjs/internal/operators';
11
- import { CommonModule } from '@angular/common';
12
- import { MatButtonModule } from '@angular/material/button';
13
- import { MatMenuModule } from '@angular/material/menu';
14
- import { MatTooltipModule } from '@angular/material/tooltip';
15
- import { TranslateModule } from '@ngx-translate/core';
16
-
17
- /**
18
- * @fileoverview added by tsickle
19
- * Generated from: lib/model/es-button-action.ts
20
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
21
- */
22
- class EsButtonAction {
23
- }
24
- EsButtonAction.ACTION_DIALOG_CONFIRM = 'dialog-confirm';
25
- EsButtonAction.ACTION_DIALOG_DELETE = 'dialog-delete';
26
- EsButtonAction.ACTION_DIALOG_FORM = 'dialog-form';
27
- EsButtonAction.ACTION_CARD_CONTENT_FORM = 'card-content-form';
28
- EsButtonAction.ACTION_CARD_CONTENT_WIZARD = 'card-content-wizard'; // todo asi zrusit
29
- // todo asi zrusit
30
- EsButtonAction.ACTION_CHANGE_CARD_CONTENT = 'change-card-content'; // mozna zrusit ? je kuli neemitu clicku na button
31
- // mozna zrusit ? je kuli neemitu clicku na button
32
- EsButtonAction.ACTION_DOWNLOAD = 'download';
33
- EsButtonAction.ACTION_REQUEST = 'request';
34
- EsButtonAction.ACTION_ROUTER_NAVIGATE = 'router-navigate';
35
- EsButtonAction.ACTION_WINDOW_LOCATION = 'open-link';
36
- if (false) {
37
- /** @type {?} */
38
- EsButtonAction.ACTION_DIALOG_CONFIRM;
39
- /** @type {?} */
40
- EsButtonAction.ACTION_DIALOG_DELETE;
41
- /** @type {?} */
42
- EsButtonAction.ACTION_DIALOG_FORM;
43
- /** @type {?} */
44
- EsButtonAction.ACTION_CARD_CONTENT_FORM;
45
- /** @type {?} */
46
- EsButtonAction.ACTION_CARD_CONTENT_WIZARD;
47
- /** @type {?} */
48
- EsButtonAction.ACTION_CHANGE_CARD_CONTENT;
49
- /** @type {?} */
50
- EsButtonAction.ACTION_DOWNLOAD;
51
- /** @type {?} */
52
- EsButtonAction.ACTION_REQUEST;
53
- /** @type {?} */
54
- EsButtonAction.ACTION_ROUTER_NAVIGATE;
55
- /** @type {?} */
56
- EsButtonAction.ACTION_WINDOW_LOCATION;
57
- }
58
-
59
- /**
60
- * @fileoverview added by tsickle
61
- * Generated from: lib/components/dialog-confirm/dialog-confirm.component.ts
62
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
63
- */
64
- class DialogConfirmComponent {
65
- /**
66
- * @param {?} dialogRef
67
- * @param {?} snackBar
68
- * @param {?} ds
69
- */
70
- constructor(dialogRef, snackBar, ds) {
71
- this.dialogRef = dialogRef;
72
- this.snackBar = snackBar;
73
- this.ds = ds;
74
- this.submit = new EventEmitter();
75
- this.activeRequest = false;
76
- /** @type {?} */
77
- const data = this.ds.getData();
78
- this.message = data.message;
79
- this.url = data.url;
80
- }
81
- /**
82
- * @return {?}
83
- */
84
- confirm() {
85
- this.activeRequest = true;
86
- this.ds.httpPost(this.url, null).subscribe((/**
87
- * @param {?} response
88
- * @return {?}
89
- */
90
- (response) => {
91
- this.activeRequest = false;
92
- /** @type {?} */
93
- const config = new MatSnackBarConfig();
94
- config.duration = 2000;
95
- if (response.type === EsFormResponseMessageType.TYPE_OK) {
96
- config.panelClass = EsSnackBarPanelClass.SUCCESS;
97
- this.submit.emit();
98
- }
99
- else {
100
- config.panelClass = EsSnackBarPanelClass.DANGER;
101
- }
102
- this.snackBar.open(response.message, null, config);
103
- /** @type {?} */
104
- const result = {
105
- clickedYes: true,
106
- serverResponse: response
107
- };
108
- this.dialogRef.close(result);
109
- }));
110
- }
111
- }
112
- DialogConfirmComponent.decorators = [
113
- { type: Component, args: [{
114
- selector: 'dialog-confirm',
115
- template: "<p>{{message}}</p>\r\n<div class=\"button-container\">\r\n <mat-spinner *ngIf=\"activeRequest\" [diameter]=\"36\"></mat-spinner>\r\n <ng-container *ngIf=\"!activeRequest\">\r\n <button type=\"button\"\r\n color=\"accent\"\r\n mat-raised-button\r\n (click)=\"confirm()\"> {{'an.common.ano' | translate}}\r\n </button>\r\n <button type=\"button\"\r\n color=\"accent\"\r\n mat-raised-button\r\n (click)=\"dialogRef.close({clickedYes: false})\">{{'an.common.ne' | translate}}\r\n </button>\r\n </ng-container>\r\n</div>\r\n",
116
- styles: ["button:not(:last-child){margin-right:20px}.button-container{min-height:36px;min-width:196px;position:relative;text-align:center}.button-container mat-spinner{left:calc(50% - 18px);position:absolute!important;top:calc(50% - 18px)}"]
117
- }] }
118
- ];
119
- /** @nocollapse */
120
- DialogConfirmComponent.ctorParameters = () => [
121
- { type: MatDialogRef },
122
- { type: MatSnackBar },
123
- { type: EsDialogService }
124
- ];
125
- DialogConfirmComponent.propDecorators = {
126
- submit: [{ type: Output }]
127
- };
128
- if (false) {
129
- /** @type {?} */
130
- DialogConfirmComponent.prototype.submit;
131
- /** @type {?} */
132
- DialogConfirmComponent.prototype.message;
133
- /** @type {?} */
134
- DialogConfirmComponent.prototype.url;
135
- /** @type {?} */
136
- DialogConfirmComponent.prototype.activeRequest;
137
- /** @type {?} */
138
- DialogConfirmComponent.prototype.dialogRef;
139
- /**
140
- * @type {?}
141
- * @private
142
- */
143
- DialogConfirmComponent.prototype.snackBar;
144
- /**
145
- * @type {?}
146
- * @private
147
- */
148
- DialogConfirmComponent.prototype.ds;
149
- }
150
-
151
- /**
152
- * @fileoverview added by tsickle
153
- * Generated from: lib/components/dialog-form/dialog-form.component.ts
154
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
155
- */
156
- class DialogFormComponent {
157
- /**
158
- * @param {?} dialogRef
159
- * @param {?} ds
160
- */
161
- constructor(dialogRef, ds) {
162
- this.dialogRef = dialogRef;
163
- this.cols = 1;
164
- this.maxFormHeight = window.innerHeight - 60;
165
- /** @type {?} */
166
- const data = ds.getData();
167
- this.formUrl = data.url;
168
- }
169
- /**
170
- * @param {?} value
171
- * @return {?}
172
- */
173
- submit(value) {
174
- // sem se to dostane jen pri success ulozeni formu
175
- /** @type {?} */
176
- const result = {
177
- clickedYes: true
178
- };
179
- this.dialogRef.close(result);
180
- // pokud bysme chteli form.value
181
- // this.dialogRef.close(value);
182
- // console.log('form value v parent', value);
183
- }
184
- /**
185
- * @return {?}
186
- */
187
- getWindowHeight() {
188
- this.maxFormHeight = window.innerHeight - 60;
189
- }
190
- }
191
- DialogFormComponent.decorators = [
192
- { type: Component, args: [{
193
- selector: 'dialog-form',
194
- template: "<div class=\"es-form-container\" [style.max-height]=\"(maxFormHeight - 106) + 'px'\">\r\n <es-form [formUrl]=\"formUrl\"\r\n [dynamicForm]=\"esForm\"\r\n [cols]=\"cols\"\r\n (submit)=\"submit($event)\">\r\n </es-form>\r\n</div>\r\n",
195
- styles: [".es-form-container{margin-top:24px;overflow:auto;position:relative}"]
196
- }] }
197
- ];
198
- /** @nocollapse */
199
- DialogFormComponent.ctorParameters = () => [
200
- { type: MatDialogRef },
201
- { type: EsDialogService }
202
- ];
203
- if (false) {
204
- /** @type {?} */
205
- DialogFormComponent.prototype.formUrl;
206
- /** @type {?} */
207
- DialogFormComponent.prototype.cols;
208
- /** @type {?} */
209
- DialogFormComponent.prototype.esForm;
210
- /** @type {?} */
211
- DialogFormComponent.prototype.maxFormHeight;
212
- /** @type {?} */
213
- DialogFormComponent.prototype.dialogRef;
214
- }
215
-
216
- /**
217
- * @fileoverview added by tsickle
218
- * Generated from: lib/es-buttons.component.ts
219
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
220
- */
221
- // todo translates
222
- class EsButtonsComponent {
223
- /**
224
- * @param {?} router
225
- * @param {?} dialog
226
- * @param {?} snackBar
227
- * @param {?} http
228
- */
229
- constructor(router, dialog, snackBar, http) {
230
- this.router = router;
231
- this.dialog = dialog;
232
- this.snackBar = snackBar;
233
- this.http = http;
234
- this.parentWidth = 40; // default 40 = 1 button
235
- // default 40 = 1 button
236
- this.buttons = []; // normal input
237
- // normal input
238
- this.forceMenu = false; // pokud chci zobrazit ... menu i pro jeden buttonek, na realtimu pouzito
239
- // pokud chci zobrazit ... menu i pro jeden buttonek, na realtimu pouzito
240
- this.buttonClick = new EventEmitter();
241
- this.reload = new EventEmitter();
242
- this.dialogCreated = new EventEmitter();
243
- this.serverResponse = new EventEmitter();
244
- this.menuVisible = false;
245
- this.buttonWidth = 40; // todo ViewChild, sirka buttonu ?
246
- // todo ViewChild, sirka buttonu ?
247
- this.visibleButtons = [];
248
- this.hiddenButtons = [];
249
- this.esIcon = EsIcon;
250
- this._width = 0;
251
- }
252
- /**
253
- * @return {?}
254
- */
255
- showMenu() {
256
- return this.getHiddenButtons() && this.getHiddenButtons().length > 0 && this.getHiddenButtons().length !== 1;
257
- }
258
- /**
259
- * @return {?}
260
- */
261
- countVisible() {
262
- return Math.floor((this._width) / this.buttonWidth) - 1;
263
- }
264
- /**
265
- * @return {?}
266
- */
267
- getVisibleButtons() {
268
- if (this.buttons && this.buttons.length > 0) {
269
- return this.buttons.filter((/**
270
- * @param {?} button
271
- * @return {?}
272
- */
273
- button => {
274
- if (this.buttons.indexOf(button) < this.countVisible()
275
- || (this.getHiddenButtons().length === 1 && !this.forceMenu)) {
276
- return true;
277
- }
278
- }));
279
- }
280
- }
281
- /**
282
- * @return {?}
283
- */
284
- getHiddenButtons() {
285
- if (this.buttons && this.buttons.length > 0) {
286
- return this.buttons.filter((/**
287
- * @param {?} button
288
- * @return {?}
289
- */
290
- button => {
291
- if (this.buttons.indexOf(button) >= this.countVisible()) {
292
- return true;
293
- }
294
- }));
295
- }
296
- }
297
- /**
298
- * @param {?} simpleChange
299
- * @return {?}
300
- */
301
- ngOnChanges(simpleChange) {
302
- if (simpleChange['parentWidth']) {
303
- if (this.parentWidth > 0) {
304
- this._width = this.parentWidth;
305
- this.recalculateButtons();
306
- }
307
- }
308
- if (simpleChange['buttons']) {
309
- if (typeof this.buttons === 'string') {
310
- this.buttons = JSON.parse(this.buttons);
311
- }
312
- this.recalculateButtons();
313
- }
314
- }
315
- /**
316
- * @return {?}
317
- */
318
- recalculateButtons() {
319
- this.menuVisible = this.showMenu();
320
- this.visibleButtons = this.getVisibleButtons();
321
- this.hiddenButtons = this.getHiddenButtons();
322
- }
323
- /**
324
- * @param {?} button
325
- * @return {?}
326
- */
327
- handleAction(button) {
328
- if (button.action === EsButtonAction.ACTION_DIALOG_CONFIRM) {
329
- this.openConfirm(button);
330
- }
331
- if (button.action === EsButtonAction.ACTION_DIALOG_DELETE) {
332
- this.openDelete(button);
333
- }
334
- if (button.action === EsButtonAction.ACTION_DIALOG_FORM) {
335
- this.openForm(button);
336
- }
337
- if (button.action === EsButtonAction.ACTION_DOWNLOAD) {
338
- this.http.get(button.url, { responseType: 'blob', observe: 'response' }).subscribe((/**
339
- * @param {?} response
340
- * @return {?}
341
- */
342
- response => {
343
- /** @type {?} */
344
- const filename = response.headers.get('Content-Disposition').split('filename=')[1];
345
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
346
- window.navigator.msSaveBlob(response.body, filename);
347
- }
348
- else {
349
- /** @type {?} */
350
- const link = document.createElement('a');
351
- link.setAttribute('href', window.URL.createObjectURL(response.body));
352
- link.setAttribute('download', filename);
353
- link.style.visibility = 'hidden';
354
- document.body.appendChild(link);
355
- link.click();
356
- document.body.removeChild(link);
357
- }
358
- }));
359
- }
360
- if (button.action === EsButtonAction.ACTION_REQUEST) {
361
- this.http.get(button.url).subscribe((/**
362
- * @param {?} response
363
- * @return {?}
364
- */
365
- (response) => {
366
- /** @type {?} */
367
- const config = new MatSnackBarConfig();
368
- config.duration = 2000;
369
- if (response.type === EsFormResponseMessageType.TYPE_OK) {
370
- config.panelClass = EsSnackBarPanelClass.SUCCESS;
371
- }
372
- else {
373
- config.panelClass = EsSnackBarPanelClass.DANGER;
374
- }
375
- this.snackBar.open(response.message, null, config);
376
- this.reload.emit(true);
377
- this.serverResponse.emit({ button: button, response: response });
378
- }));
379
- }
380
- if (button.action === EsButtonAction.ACTION_ROUTER_NAVIGATE) {
381
- this.router.navigateByUrl(button.url);
382
- }
383
- if (button.action === EsButtonAction.ACTION_WINDOW_LOCATION) {
384
- window.location.href = button.url;
385
- }
386
- this.buttonClick.emit(button);
387
- }
388
- // handleSubMenuAction(button: EsButton) {
389
- // // todo asi predelat na md2 menu
390
- // // todo nevim jestli se zpropaguje click kdyz je to zanoreny pres es-card-header
391
- // this.buttonClick.emit(button);
392
- // }
393
- /**
394
- * @param {?} button
395
- * @return {?}
396
- */
397
- openForm(button) {
398
- /** @type {?} */
399
- const config = {
400
- title: button.title,
401
- data: {
402
- url: button.url
403
- }
404
- };
405
- /** @type {?} */
406
- const dialogRef = this.dialog.open(DialogFormComponent, config);
407
- this.dialogCreated.emit(dialogRef);
408
- dialogRef.afterClosed().pipe(take(1)).subscribe((/**
409
- * @param {?} res
410
- * @return {?}
411
- */
412
- (res) => {
413
- if (res && res.clickedYes) {
414
- this.reload.emit(true);
415
- if (res.serverResponse) {
416
- this.serverResponse.emit({ button: button, response: res.serverResponse });
417
- }
418
- }
419
- }));
420
- }
421
- /**
422
- * @param {?} button
423
- * @return {?}
424
- */
425
- openDelete(button) {
426
- this.openConfirm(button);
427
- }
428
- /**
429
- * @param {?} button
430
- * @return {?}
431
- */
432
- openConfirm(button) {
433
- /** @type {?} */
434
- const config = {
435
- title: button.title,
436
- data: {
437
- message: button.message,
438
- url: button.url
439
- }
440
- };
441
- /** @type {?} */
442
- const dialogRef = this.dialog.open(DialogConfirmComponent, config);
443
- this.dialogCreated.emit(dialogRef);
444
- dialogRef.afterClosed().pipe(take(1)).subscribe((/**
445
- * @param {?} res
446
- * @return {?}
447
- */
448
- (res) => {
449
- if (res && res.clickedYes) {
450
- this.reload.emit(true);
451
- if (res.serverResponse) {
452
- this.serverResponse.emit({ button: button, response: res.serverResponse });
453
- }
454
- }
455
- }));
456
- }
457
- }
458
- EsButtonsComponent.decorators = [
459
- { type: Component, args: [{
460
- selector: 'es-buttons',
461
- template: "<ng-container *ngIf=\"visibleButtons && visibleButtons.length > 0\">\r\n <button *ngIf=\"visibleButtons.length > 0\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[0].disabled === true\"\r\n [matTooltip]=\"visibleButtons[0].tooltip? visibleButtons[0].tooltip : visibleButtons[0].title\"\r\n (click)=\"handleAction(visibleButtons[0])\">\r\n <es-icon [color]=\"visibleButtons[0].color\"\r\n [themeColor]=\"visibleButtons[0].themeColor\"\r\n [icon]=\"visibleButtons[0].icon\"></es-icon>\r\n </button>\r\n <button *ngIf=\"visibleButtons.length > 1\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[1].disabled === true\"\r\n [matTooltip]=\"visibleButtons[1].tooltip? visibleButtons[1].tooltip : visibleButtons[1].title\"\r\n (click)=\"handleAction(visibleButtons[1])\">\r\n <es-icon [color]=\"visibleButtons[1].color\"\r\n [themeColor]=\"visibleButtons[1].themeColor\"\r\n [icon]=\"visibleButtons[1].icon\"></es-icon>\r\n </button>\r\n <button *ngIf=\"visibleButtons.length > 2\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[2].disabled === true\"\r\n [matTooltip]=\"visibleButtons[2].tooltip? visibleButtons[2].tooltip : visibleButtons[2].title\"\r\n (click)=\"handleAction(visibleButtons[2])\">\r\n <es-icon [color]=\"visibleButtons[2].color\"\r\n [themeColor]=\"visibleButtons[2].themeColor\"\r\n [icon]=\"visibleButtons[2].icon\"></es-icon>\r\n </button>\r\n <button *ngIf=\"visibleButtons.length > 3\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[3].disabled === true\"\r\n [matTooltip]=\"visibleButtons[3].tooltip? visibleButtons[3].tooltip : visibleButtons[3].title\"\r\n (click)=\"handleAction(visibleButtons[3])\">\r\n <es-icon [color]=\"visibleButtons[3].color\"\r\n [themeColor]=\"visibleButtons[3].themeColor\"\r\n [icon]=\"visibleButtons[3].icon\"></es-icon>\r\n </button>\r\n <button *ngIf=\"visibleButtons.length > 4\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[4].disabled === true\"\r\n [matTooltip]=\"visibleButtons[4].tooltip? visibleButtons[4].tooltip : visibleButtons[4].title\"\r\n (click)=\"handleAction(visibleButtons[4])\">\r\n <es-icon [color]=\"visibleButtons[4].color\"\r\n [themeColor]=\"visibleButtons[4].themeColor\"\r\n [icon]=\"visibleButtons[4].icon\"></es-icon>\r\n </button>\r\n <button *ngIf=\"visibleButtons.length > 5\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[5].disabled === true\"\r\n [matTooltip]=\"visibleButtons[5].tooltip? visibleButtons[5].tooltip : visibleButtons[5].title\"\r\n (click)=\"handleAction(visibleButtons[5])\">\r\n <es-icon [color]=\"visibleButtons[5].color\"\r\n [themeColor]=\"visibleButtons[5].themeColor\"\r\n [icon]=\"visibleButtons[5].icon\"></es-icon>\r\n </button>\r\n <button *ngIf=\"visibleButtons.length > 6\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[6].disabled === true\"\r\n [matTooltip]=\"visibleButtons[6].tooltip? visibleButtons[6].tooltip : visibleButtons[6].title\"\r\n (click)=\"handleAction(visibleButtons[6])\">\r\n <es-icon [color]=\"visibleButtons[6].color\"\r\n [themeColor]=\"visibleButtons[6].themeColor\"\r\n [icon]=\"visibleButtons[6].icon\"></es-icon>\r\n </button>\r\n <button *ngIf=\"visibleButtons.length > 7\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[7].disabled === true\"\r\n [matTooltip]=\"visibleButtons[7].tooltip? visibleButtons[7].tooltip : visibleButtons[7].title\"\r\n (click)=\"handleAction(visibleButtons[7])\">\r\n <es-icon [color]=\"visibleButtons[7].color\"\r\n [themeColor]=\"visibleButtons[7].themeColor\"\r\n [icon]=\"visibleButtons[7].icon\"></es-icon>\r\n </button>\r\n <button *ngIf=\"visibleButtons.length > 8\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[8].disabled === true\"\r\n [matTooltip]=\"visibleButtons[8].tooltip? visibleButtons[8].tooltip : visibleButtons[8].title\"\r\n (click)=\"handleAction(visibleButtons[8])\">\r\n <es-icon [color]=\"visibleButtons[8].color\"\r\n [themeColor]=\"visibleButtons[8].themeColor\"\r\n [icon]=\"visibleButtons[8].icon\"></es-icon>\r\n </button>\r\n <button *ngIf=\"visibleButtons.length > 9\"\r\n mat-icon-button\r\n [disabled]=\"visibleButtons[9].disabled === true\"\r\n [matTooltip]=\"visibleButtons[9].tooltip? visibleButtons[9].tooltip : visibleButtons[9].title\"\r\n (click)=\"handleAction(visibleButtons[9])\">\r\n <es-icon [color]=\"visibleButtons[9].color\"\r\n [themeColor]=\"visibleButtons[9].themeColor\"\r\n [icon]=\"visibleButtons[9].icon\"></es-icon>\r\n </button>\r\n</ng-container>\r\n\r\n\r\n<button *ngIf=\"menuVisible || forceMenu\"\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n [matTooltip]=\"'an.more' | translate\">\r\n <es-icon [icon]=\"esIcon.MORE_VERT\"></es-icon>\r\n</button>\r\n\r\n\r\n<mat-menu #menu=\"matMenu\"\r\n [overlapTrigger]=\"false\"\r\n yPosition=\"below\"\r\n xPosition=\"before\">\r\n <ng-container *ngIf=\"hiddenButtons && hiddenButtons.length > 0\">\r\n <button *ngIf=\"hiddenButtons.length > 0\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[0].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[0])\">\r\n <es-icon [color]=\"hiddenButtons[0].color\"\r\n [themeColor]=\"hiddenButtons[0].themeColor\"\r\n [icon]=\"hiddenButtons[0].icon\"></es-icon>\r\n <span>{{hiddenButtons[0].title}}</span>\r\n </button>\r\n <button *ngIf=\"hiddenButtons.length > 1\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[1].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[1])\">\r\n <es-icon [color]=\"hiddenButtons[1].color\"\r\n [themeColor]=\"hiddenButtons[1].themeColor\"\r\n [icon]=\"hiddenButtons[1].icon\"></es-icon>\r\n <span>{{hiddenButtons[1].title}}</span>\r\n </button>\r\n <button *ngIf=\"hiddenButtons.length > 2\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[2].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[2])\">\r\n <es-icon [color]=\"hiddenButtons[2].color\"\r\n [themeColor]=\"hiddenButtons[2].themeColor\"\r\n [icon]=\"hiddenButtons[2].icon\"></es-icon>\r\n <span>{{hiddenButtons[2].title}}</span>\r\n </button>\r\n <button *ngIf=\"hiddenButtons.length > 3\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[3].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[3])\">\r\n <es-icon [color]=\"hiddenButtons[3].color\"\r\n [themeColor]=\"hiddenButtons[3].themeColor\"\r\n [icon]=\"hiddenButtons[3].icon\"></es-icon>\r\n <span>{{hiddenButtons[3].title}}</span>\r\n </button>\r\n <button *ngIf=\"hiddenButtons.length > 4\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[4].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[4])\">\r\n <es-icon [color]=\"hiddenButtons[4].color\"\r\n [themeColor]=\"hiddenButtons[4].themeColor\"\r\n [icon]=\"hiddenButtons[4].icon\"></es-icon>\r\n <span>{{hiddenButtons[4].title}}</span>\r\n </button>\r\n <button *ngIf=\"hiddenButtons.length > 5\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[5].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[5])\">\r\n <es-icon [color]=\"hiddenButtons[5].color\"\r\n [themeColor]=\"hiddenButtons[5].themeColor\"\r\n [icon]=\"hiddenButtons[5].icon\"></es-icon>\r\n <span>{{hiddenButtons[5].title}}</span>\r\n </button>\r\n <button *ngIf=\"hiddenButtons.length > 6\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[6].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[6])\">\r\n <es-icon [color]=\"hiddenButtons[6].color\"\r\n [themeColor]=\"hiddenButtons[6].themeColor\"\r\n [icon]=\"hiddenButtons[6].icon\"></es-icon>\r\n <span>{{hiddenButtons[6].title}}</span>\r\n </button>\r\n <button *ngIf=\"hiddenButtons.length > 7\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[7].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[7])\">\r\n <es-icon [color]=\"hiddenButtons[7].color\"\r\n [themeColor]=\"hiddenButtons[7].themeColor\"\r\n [icon]=\"hiddenButtons[7].icon\"></es-icon>\r\n <span>{{hiddenButtons[7].title}}</span>\r\n </button>\r\n <button *ngIf=\"hiddenButtons.length > 8\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[8].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[8])\">\r\n <es-icon [color]=\"hiddenButtons[8].color\"\r\n [themeColor]=\"hiddenButtons[8].themeColor\"\r\n [icon]=\"hiddenButtons[8].icon\"></es-icon>\r\n <span>{{hiddenButtons[8].title}}</span>\r\n </button>\r\n <button *ngIf=\"hiddenButtons.length > 9\"\r\n mat-menu-item\r\n [disabled]=\"hiddenButtons[9].disabled === true\"\r\n (click)=\"handleAction(hiddenButtons[9])\">\r\n <es-icon [color]=\"hiddenButtons[9].color\"\r\n [themeColor]=\"hiddenButtons[9].themeColor\"\r\n [icon]=\"hiddenButtons[9].icon\"></es-icon>\r\n <span>{{hiddenButtons[9].title}}</span>\r\n </button>\r\n </ng-container>\r\n</mat-menu>\r\n",
462
- changeDetection: ChangeDetectionStrategy.OnPush,
463
- styles: [":host{float:right}"]
464
- }] }
465
- ];
466
- /** @nocollapse */
467
- EsButtonsComponent.ctorParameters = () => [
468
- { type: Router },
469
- { type: EsDialogService },
470
- { type: MatSnackBar },
471
- { type: HttpService }
472
- ];
473
- EsButtonsComponent.propDecorators = {
474
- parentWidth: [{ type: Input }],
475
- buttons: [{ type: Input }],
476
- forceMenu: [{ type: Input }],
477
- buttonClick: [{ type: Output }],
478
- reload: [{ type: Output }],
479
- dialogCreated: [{ type: Output }],
480
- serverResponse: [{ type: Output }]
481
- };
482
- if (false) {
483
- /** @type {?} */
484
- EsButtonsComponent.prototype.parentWidth;
485
- /** @type {?} */
486
- EsButtonsComponent.prototype.buttons;
487
- /** @type {?} */
488
- EsButtonsComponent.prototype.forceMenu;
489
- /** @type {?} */
490
- EsButtonsComponent.prototype.buttonClick;
491
- /** @type {?} */
492
- EsButtonsComponent.prototype.reload;
493
- /** @type {?} */
494
- EsButtonsComponent.prototype.dialogCreated;
495
- /** @type {?} */
496
- EsButtonsComponent.prototype.serverResponse;
497
- /** @type {?} */
498
- EsButtonsComponent.prototype.menuVisible;
499
- /** @type {?} */
500
- EsButtonsComponent.prototype.buttonWidth;
501
- /** @type {?} */
502
- EsButtonsComponent.prototype.visibleButtons;
503
- /** @type {?} */
504
- EsButtonsComponent.prototype.hiddenButtons;
505
- /** @type {?} */
506
- EsButtonsComponent.prototype.esIcon;
507
- /** @type {?} */
508
- EsButtonsComponent.prototype._width;
509
- /**
510
- * @type {?}
511
- * @private
512
- */
513
- EsButtonsComponent.prototype.router;
514
- /**
515
- * @type {?}
516
- * @private
517
- */
518
- EsButtonsComponent.prototype.dialog;
519
- /**
520
- * @type {?}
521
- * @private
522
- */
523
- EsButtonsComponent.prototype.snackBar;
524
- /**
525
- * @type {?}
526
- * @private
527
- */
528
- EsButtonsComponent.prototype.http;
529
- }
530
-
531
- /**
532
- * @fileoverview added by tsickle
533
- * Generated from: lib/es-buttons.module.ts
534
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
535
- */
536
- class EsButtonsModule {
537
- }
538
- EsButtonsModule.decorators = [
539
- { type: NgModule, args: [{
540
- imports: [
541
- CommonModule,
542
- MatButtonModule,
543
- MatTooltipModule,
544
- MatMenuModule,
545
- MatSnackBarModule,
546
- TranslateModule.forChild(),
547
- EsIconModule,
548
- EsDialogModule,
549
- EsFormModule,
550
- ],
551
- declarations: [
552
- EsButtonsComponent,
553
- DialogConfirmComponent,
554
- DialogFormComponent,
555
- ],
556
- exports: [EsButtonsComponent],
557
- entryComponents: [
558
- DialogConfirmComponent,
559
- DialogFormComponent,
560
- ],
561
- },] }
562
- ];
563
-
564
- /**
565
- * @fileoverview added by tsickle
566
- * Generated from: lib/model/es-button.interface.ts
567
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
568
- */
569
- /**
570
- * @record
571
- */
572
- function EsButton() { }
573
- if (false) {
574
- /** @type {?|undefined} */
575
- EsButton.prototype.key;
576
- /** @type {?} */
577
- EsButton.prototype.title;
578
- /** @type {?} */
579
- EsButton.prototype.icon;
580
- /** @type {?|undefined} */
581
- EsButton.prototype.url;
582
- /** @type {?|undefined} */
583
- EsButton.prototype.action;
584
- /** @type {?|undefined} */
585
- EsButton.prototype.message;
586
- /** @type {?|undefined} */
587
- EsButton.prototype.tooltip;
588
- /** @type {?|undefined} */
589
- EsButton.prototype.submenu;
590
- /** @type {?|undefined} */
591
- EsButton.prototype.color;
592
- /** @type {?|undefined} */
593
- EsButton.prototype.themeColor;
594
- /** @type {?|undefined} */
595
- EsButton.prototype.disabled;
596
- }
597
-
598
- /**
599
- * @fileoverview added by tsickle
600
- * Generated from: lib/model/es-button-server-response.ts
601
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
602
- */
603
- /**
604
- * @record
605
- */
606
- function EsButtonServerResponse() { }
607
- if (false) {
608
- /** @type {?} */
609
- EsButtonServerResponse.prototype.button;
610
- /** @type {?} */
611
- EsButtonServerResponse.prototype.response;
612
- }
613
-
614
- /**
615
- * @fileoverview added by tsickle
616
- * Generated from: public_api.ts
617
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
618
- */
619
-
620
- /**
621
- * @fileoverview added by tsickle
622
- * Generated from: eurosat-buttons.ts
623
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
624
- */
625
-
626
- export { EsButtonAction, EsButtonsComponent, EsButtonsModule, DialogConfirmComponent as ɵa, DialogFormComponent as ɵb };
627
- //# sourceMappingURL=eurosat-buttons.js.map