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