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