@eurosat/buttons 10.0.0 → 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.
- package/bundles/eurosat-buttons.umd.js +325 -566
- package/bundles/eurosat-buttons.umd.js.map +1 -1
- package/bundles/eurosat-buttons.umd.min.js +1 -1
- package/bundles/eurosat-buttons.umd.min.js.map +1 -1
- package/esm2015/eurosat-buttons.js +7 -12
- package/esm2015/lib/components/dialog-confirm/dialog-confirm.component.js +56 -98
- package/esm2015/lib/components/dialog-form/dialog-form.component.js +38 -68
- package/esm2015/lib/components/dialog-result.js +2 -16
- package/esm2015/lib/es-buttons.component.js +198 -327
- package/esm2015/lib/es-buttons.module.js +41 -46
- package/esm2015/lib/model/es-button-action.js +13 -42
- package/esm2015/lib/model/es-button-server-response.js +2 -16
- package/esm2015/lib/model/es-button.interface.js +2 -34
- package/esm2015/public_api.js +9 -14
- package/eurosat-buttons.d.ts +6 -6
- package/eurosat-buttons.metadata.json +1 -1
- package/fesm2015/eurosat-buttons.js +305 -594
- package/fesm2015/eurosat-buttons.js.map +1 -1
- package/lib/components/dialog-confirm/dialog-confirm.component.d.ts +15 -15
- package/lib/components/dialog-form/dialog-form.component.d.ts +15 -15
- package/lib/components/dialog-result.d.ts +4 -4
- package/lib/es-buttons.component.d.ts +39 -39
- package/lib/es-buttons.module.d.ts +2 -2
- package/lib/model/es-button-action.d.ts +12 -12
- package/lib/model/es-button-server-response.d.ts +5 -5
- package/lib/model/es-button.interface.d.ts +14 -14
- package/package.json +6 -6
- package/public_api.d.ts +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eurosat-buttons.js","sources":["../../../projects/buttons/src/lib/model/es-button-action.ts","../../../projects/buttons/src/lib/components/dialog-confirm/dialog-confirm.component.ts","../../../projects/buttons/src/lib/components/dialog-form/dialog-form.component.ts","../../../projects/buttons/src/lib/es-buttons.component.ts","../../../projects/buttons/src/lib/es-buttons.module.ts","../../../projects/buttons/src/lib/model/es-button.interface.ts","../../../projects/buttons/src/lib/model/es-button-server-response.ts"],"sourcesContent":["export class EsButtonAction {\r\n\r\n public static ACTION_DIALOG_CONFIRM = 'dialog-confirm';\r\n public static ACTION_DIALOG_DELETE = 'dialog-delete';\r\n public static ACTION_DIALOG_FORM = 'dialog-form';\r\n public static ACTION_CARD_CONTENT_FORM = 'card-content-form';\r\n public static ACTION_CARD_CONTENT_WIZARD = 'card-content-wizard'; // todo asi zrusit\r\n public static ACTION_CHANGE_CARD_CONTENT = 'change-card-content'; // mozna zrusit ? je kuli neemitu clicku na button\r\n public static ACTION_DOWNLOAD = 'download';\r\n public static ACTION_REQUEST = 'request';\r\n public static ACTION_ROUTER_NAVIGATE = 'router-navigate';\r\n public static ACTION_WINDOW_LOCATION = 'open-link';\r\n}\r\n","import {Component, EventEmitter, Output} from '@angular/core';\r\nimport {MatDialogRef} from '@angular/material/dialog';\r\nimport {MatSnackBar, MatSnackBarConfig} from '@angular/material/snack-bar';\r\nimport {EsSnackBarPanelClass} from '@eurosat/snackbar';\r\nimport {EsDialogService} from '@eurosat/dialog';\r\nimport { DialogResult } from '../dialog-result';\r\nimport { EsFormResponseMessage, EsFormResponseMessageType } from '@eurosat/form';\r\n\r\n\r\n@Component({\r\n selector: 'dialog-confirm',\r\n templateUrl: './dialog-confirm.component.html',\r\n styleUrls: ['./dialog-confirm.component.scss']\r\n})\r\nexport class DialogConfirmComponent {\r\n\r\n @Output() submit: EventEmitter<any> = new EventEmitter<any>();\r\n public message: string;\r\n public url: string;\r\n activeRequest = false;\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<DialogConfirmComponent>,\r\n private snackBar: MatSnackBar,\r\n private ds: EsDialogService\r\n ) {\r\n const data = this.ds.getData();\r\n this.message = data.message;\r\n this.url = data.url;\r\n }\r\n\r\n confirm() {\r\n this.activeRequest = true;\r\n this.ds.httpPost(this.url, null).subscribe((response: EsFormResponseMessage) => {\r\n this.activeRequest = false;\r\n const config = new MatSnackBarConfig();\r\n config.duration = 2000;\r\n if (response.type === EsFormResponseMessageType.TYPE_OK) {\r\n config.panelClass = EsSnackBarPanelClass.SUCCESS;\r\n this.submit.emit();\r\n } else {\r\n config.panelClass = EsSnackBarPanelClass.DANGER;\r\n }\r\n this.snackBar.open(response.message, null, config);\r\n\r\n const result: DialogResult = {\r\n clickedYes: true,\r\n serverResponse: response\r\n };\r\n this.dialogRef.close(result);\r\n });\r\n }\r\n\r\n}\r\n","import {Component} from '@angular/core';\r\nimport {MatDialogRef} from '@angular/material/dialog';\r\nimport {EsForm} from '@eurosat/form';\r\nimport {EsDialogService} from '@eurosat/dialog';\r\nimport { DialogResult } from '../dialog-result';\r\n\r\n@Component({\r\n selector: 'dialog-form',\r\n templateUrl: './dialog-form.component.html',\r\n styleUrls: ['./dialog-form.component.scss']\r\n})\r\nexport class DialogFormComponent {\r\n\r\n public formUrl: string;\r\n public cols = 1;\r\n public esForm: EsForm;\r\n public maxFormHeight: number = window.innerHeight - 60;\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<DialogFormComponent>,\r\n ds: EsDialogService,\r\n ) {\r\n const data = ds.getData();\r\n this.formUrl = data.url;\r\n }\r\n\r\n submit(value: {[name: string]: any}) {\r\n\r\n // sem se to dostane jen pri success ulozeni formu\r\n const result: DialogResult = {\r\n clickedYes: true\r\n };\r\n this.dialogRef.close(result);\r\n\r\n\r\n\r\n // pokud bysme chteli form.value\r\n // this.dialogRef.close(value);\r\n // console.log('form value v parent', value);\r\n\r\n\r\n }\r\n\r\n getWindowHeight() {\r\n this.maxFormHeight = window.innerHeight - 60;\r\n }\r\n\r\n\r\n}\r\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';\r\nimport {Router} from '@angular/router';\r\nimport {EsButton} from './model/es-button.interface';\r\nimport {EsButtonAction} from './model/es-button-action';\r\nimport {MatDialogRef} from '@angular/material/dialog';\r\nimport {MatSnackBar, MatSnackBarConfig} from '@angular/material/snack-bar';\r\nimport {EsSnackBarPanelClass} from '@eurosat/snackbar';\r\nimport {HttpService} from '@eurosat/http';\r\nimport {EsIcon} from '@eurosat/icon';\r\nimport {DialogConfirmComponent} from './components/dialog-confirm/dialog-confirm.component';\r\nimport {take} from 'rxjs/internal/operators';\r\nimport {DialogFormComponent} from './components/dialog-form/dialog-form.component';\r\nimport {EsDialogService} from '@eurosat/dialog';\r\nimport {EsDialogConfig} from '@eurosat/dialog';\r\nimport { DialogResult } from './components/dialog-result';\r\nimport { EsButtonServerResponse } from './model/es-button-server-response';\r\nimport { EsFormResponseMessage, EsFormResponseMessageType } from '@eurosat/form';\r\n\r\n// todo translates\r\n\r\n@Component({\r\n selector: 'es-buttons',\r\n templateUrl: './es-buttons.component.html',\r\n styleUrls: ['./es-buttons.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class EsButtonsComponent implements OnChanges {\r\n\r\n @Input() parentWidth = 40; // default 40 = 1 button\r\n @Input() buttons: EsButton[] = []; // normal input\r\n @Input() forceMenu = false; // pokud chci zobrazit ... menu i pro jeden buttonek, na realtimu pouzito\r\n\r\n @Output() buttonClick = new EventEmitter<EsButton>();\r\n @Output() reload = new EventEmitter<boolean>();\r\n @Output() dialogCreated = new EventEmitter<MatDialogRef<any>>();\r\n @Output() serverResponse = new EventEmitter<EsButtonServerResponse>();\r\n\r\n menuVisible = false;\r\n buttonWidth = 40; // todo ViewChild, sirka buttonu ?\r\n visibleButtons: EsButton[] = [];\r\n hiddenButtons: EsButton[] = [];\r\n esIcon = EsIcon;\r\n _width = 0;\r\n\r\n constructor(\r\n private router: Router,\r\n private dialog: EsDialogService,\r\n private snackBar: MatSnackBar,\r\n private http: HttpService,\r\n ) { }\r\n\r\n showMenu() {\r\n return this.getHiddenButtons() && this.getHiddenButtons().length > 0 && this.getHiddenButtons().length !== 1;\r\n }\r\n\r\n countVisible() {\r\n return Math.floor((this._width) / this.buttonWidth) - 1;\r\n }\r\n\r\n getVisibleButtons() {\r\n if (this.buttons && this.buttons.length > 0) {\r\n return this.buttons.filter(button => {\r\n if (this.buttons.indexOf(button) < this.countVisible()\r\n || (this.getHiddenButtons().length === 1 && !this.forceMenu)) {\r\n return true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n getHiddenButtons() {\r\n if (this.buttons && this.buttons.length > 0) {\r\n return this.buttons.filter(button => {\r\n if (this.buttons.indexOf(button) >= this.countVisible()) {\r\n return true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n ngOnChanges(simpleChange: SimpleChanges) {\r\n if (simpleChange['parentWidth']) {\r\n if (this.parentWidth > 0) {\r\n this._width = this.parentWidth;\r\n this.recalculateButtons();\r\n }\r\n }\r\n\r\n if (simpleChange['buttons']) {\r\n if (typeof this.buttons === 'string') {\r\n this.buttons = JSON.parse(this.buttons);\r\n }\r\n this.recalculateButtons();\r\n }\r\n }\r\n\r\n recalculateButtons() {\r\n this.menuVisible = this.showMenu();\r\n this.visibleButtons = this.getVisibleButtons();\r\n this.hiddenButtons = this.getHiddenButtons();\r\n }\r\n\r\n handleAction(button: EsButton) {\r\n if (button.action === EsButtonAction.ACTION_DIALOG_CONFIRM) {\r\n this.openConfirm(button);\r\n }\r\n if (button.action === EsButtonAction.ACTION_DIALOG_DELETE) {\r\n this.openDelete(button);\r\n }\r\n if (button.action === EsButtonAction.ACTION_DIALOG_FORM) {\r\n this.openForm(button);\r\n }\r\n if (button.action === EsButtonAction.ACTION_DOWNLOAD) {\r\n this.http.get(button.url, {responseType: 'blob', observe: 'response'}).subscribe(response => {\r\n const filename = response.headers.get('Content-Disposition').split('filename=')[1];\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveBlob(response.body, filename);\r\n } else {\r\n const link = document.createElement('a');\r\n link.setAttribute('href', window.URL.createObjectURL(response.body));\r\n link.setAttribute('download', filename);\r\n link.style.visibility = 'hidden';\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n }\r\n });\r\n }\r\n if (button.action === EsButtonAction.ACTION_REQUEST) {\r\n this.http.get(button.url).subscribe((response: EsFormResponseMessage) => {\r\n const config = new MatSnackBarConfig();\r\n config.duration = 2000;\r\n if (response.type === EsFormResponseMessageType.TYPE_OK) {\r\n config.panelClass = EsSnackBarPanelClass.SUCCESS;\r\n } else {\r\n config.panelClass = EsSnackBarPanelClass.DANGER;\r\n }\r\n this.snackBar.open(response.message, null, config);\r\n this.reload.emit(true);\r\n this.serverResponse.emit({button: button, response: response});\r\n });\r\n }\r\n if (button.action === EsButtonAction.ACTION_ROUTER_NAVIGATE) {\r\n this.router.navigateByUrl(button.url);\r\n }\r\n if (button.action === EsButtonAction.ACTION_WINDOW_LOCATION) {\r\n window.location.href = button.url;\r\n }\r\n this.buttonClick.emit(button);\r\n }\r\n\r\n // handleSubMenuAction(button: EsButton) {\r\n // // todo asi predelat na md2 menu\r\n // // todo nevim jestli se zpropaguje click kdyz je to zanoreny pres es-card-header\r\n // this.buttonClick.emit(button);\r\n // }\r\n\r\n openForm(button: EsButton) {\r\n const config: EsDialogConfig = {\r\n title: button.title,\r\n data: {\r\n url: button.url\r\n }\r\n };\r\n const dialogRef: MatDialogRef<DialogFormComponent> = this.dialog.open(DialogFormComponent, config);\r\n this.dialogCreated.emit(dialogRef);\r\n dialogRef.afterClosed().pipe(take(1)).subscribe( (res: DialogResult) => {\r\n if (res && res.clickedYes) {\r\n this.reload.emit(true);\r\n\r\n if (res.serverResponse) {\r\n this.serverResponse.emit({button: button, response: res.serverResponse});\r\n }\r\n }\r\n });\r\n }\r\n\r\n openDelete(button: EsButton) {\r\n this.openConfirm(button);\r\n }\r\n\r\n openConfirm(button: EsButton) {\r\n const config: EsDialogConfig = {\r\n title: button.title,\r\n data: {\r\n message: button.message,\r\n url: button.url\r\n }\r\n };\r\n const dialogRef: MatDialogRef<DialogConfirmComponent> = this.dialog.open(DialogConfirmComponent, config);\r\n this.dialogCreated.emit(dialogRef);\r\n dialogRef.afterClosed().pipe(take(1)).subscribe( (res: DialogResult) => {\r\n if (res && res.clickedYes) {\r\n this.reload.emit(true);\r\n\r\n if (res.serverResponse) {\r\n this.serverResponse.emit({button: button, response: res.serverResponse});\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {EsButtonsComponent} from './es-buttons.component';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatMenuModule} from '@angular/material/menu';\r\nimport {MatSnackBarModule} from '@angular/material/snack-bar';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\nimport {TranslateModule} from '@ngx-translate/core';\r\nimport {EsIconModule} from '@eurosat/icon';\r\nimport {EsDialogModule} from '@eurosat/dialog';\r\nimport {EsFormModule} from '@eurosat/form';\r\nimport {DialogConfirmComponent} from './components/dialog-confirm/dialog-confirm.component';\r\nimport {DialogFormComponent} from './components/dialog-form/dialog-form.component';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n MatMenuModule,\r\n MatSnackBarModule,\r\n TranslateModule.forChild(),\r\n EsIconModule,\r\n EsDialogModule,\r\n EsFormModule,\r\n ],\r\n declarations: [\r\n EsButtonsComponent,\r\n DialogConfirmComponent,\r\n DialogFormComponent,\r\n ],\r\n exports: [EsButtonsComponent],\r\n entryComponents: [\r\n DialogConfirmComponent,\r\n DialogFormComponent,\r\n ],\r\n})\r\nexport class EsButtonsModule { }\r\n","import {EsButtonAction} from './es-button-action';\r\n\r\nexport interface EsButton {\r\n key?: any;\r\n title: string;\r\n icon: string;\r\n url?: string;\r\n action?: EsButtonAction;\r\n message?: string;\r\n tooltip?: string;\r\n submenu?: EsButton[];\r\n color?: string;\r\n themeColor?: 'primary' | 'accent' | 'warn' | 'disabled-icon' | '';\r\n disabled?: boolean;\r\n}\r\n","import { EsButton } from './es-button.interface';\r\n\r\nexport interface EsButtonServerResponse {\r\n button: EsButton;\r\n response: any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jB,eAAe,CAAC,QAAQ,EAAE;oBAC1B,YAAY;oBACZ,cAAc;oBACd,YAAY;iBACf;gBACD,YAAY,EAAE;oBACV,kBAAkB;oBAClB,sBAAsB;oBACtB,mBAAmB;iBACtB;gBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;gBAC7B,eAAe,EAAE;oBACb,sBAAsB;oBACtB,mBAAmB;iBACtB;aACJ;;;;;;;;;;;uBCvBA;;;IAXG,uBAAU;;IACV,yBAAc;;IACd,wBAAa;;IACb,uBAAa;;IACb,0BAAwB;;IACxB,2BAAiB;;IACjB,2BAAiB;;IACjB,2BAAqB;;IACrB,yBAAe;;IACf,8BAAkE;;IAClE,4BAAmB;;;;;;;;;;;qCCRtB;;;IAFG,wCAAiB;;IACjB,0CAAc;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"eurosat-buttons.js","sources":["../../../projects/buttons/src/lib/model/es-button-action.ts","../../../projects/buttons/src/lib/components/dialog-confirm/dialog-confirm.component.ts","../../../projects/buttons/src/lib/components/dialog-form/dialog-form.component.ts","../../../projects/buttons/src/lib/es-buttons.component.ts","../../../projects/buttons/src/lib/es-buttons.module.ts","../../../projects/buttons/src/public_api.ts","../../../projects/buttons/src/eurosat-buttons.ts"],"sourcesContent":["export class EsButtonAction {\n\n public static ACTION_DIALOG_CONFIRM = 'dialog-confirm';\n public static ACTION_DIALOG_DELETE = 'dialog-delete';\n public static ACTION_DIALOG_FORM = 'dialog-form';\n public static ACTION_CARD_CONTENT_FORM = 'card-content-form';\n public static ACTION_CARD_CONTENT_WIZARD = 'card-content-wizard'; // todo asi zrusit\n public static ACTION_CHANGE_CARD_CONTENT = 'change-card-content'; // mozna zrusit ? je kuli neemitu clicku na button\n public static ACTION_DOWNLOAD = 'download';\n public static ACTION_REQUEST = 'request';\n public static ACTION_ROUTER_NAVIGATE = 'router-navigate';\n public static ACTION_WINDOW_LOCATION = 'open-link';\n}\n","import {Component, EventEmitter, Output} from '@angular/core';\nimport {MatDialogRef} from '@angular/material/dialog';\nimport {MatSnackBar, MatSnackBarConfig} from '@angular/material/snack-bar';\nimport {EsSnackBarPanelClass} from '@eurosat/snackbar';\nimport {EsDialogService} from '@eurosat/dialog';\nimport { DialogResult } from '../dialog-result';\nimport { EsFormResponseMessage, EsFormResponseMessageType } from '@eurosat/form';\n\n\n@Component({\n selector: 'dialog-confirm',\n templateUrl: './dialog-confirm.component.html',\n styleUrls: ['./dialog-confirm.component.scss']\n})\nexport class DialogConfirmComponent {\n\n @Output() submit: EventEmitter<any> = new EventEmitter<any>();\n public message: string;\n public url: string;\n activeRequest = false;\n\n constructor(\n public dialogRef: MatDialogRef<DialogConfirmComponent>,\n private snackBar: MatSnackBar,\n private ds: EsDialogService\n ) {\n const data = this.ds.getData();\n this.message = data.message;\n this.url = data.url;\n }\n\n confirm() {\n this.activeRequest = true;\n this.ds.httpPost(this.url, null).subscribe((response: EsFormResponseMessage) => {\n this.activeRequest = false;\n const config = new MatSnackBarConfig();\n config.duration = 2000;\n if (response.type === EsFormResponseMessageType.TYPE_OK) {\n config.panelClass = EsSnackBarPanelClass.SUCCESS;\n this.submit.emit();\n } else {\n config.panelClass = EsSnackBarPanelClass.DANGER;\n }\n this.snackBar.open(response.message, null, config);\n\n const result: DialogResult = {\n clickedYes: true,\n serverResponse: response\n };\n this.dialogRef.close(result);\n });\n }\n\n}\n","import {Component} from '@angular/core';\nimport {MatDialogRef} from '@angular/material/dialog';\nimport {EsForm} from '@eurosat/form';\nimport {EsDialogService} from '@eurosat/dialog';\nimport { DialogResult } from '../dialog-result';\n\n@Component({\n selector: 'dialog-form',\n templateUrl: './dialog-form.component.html',\n styleUrls: ['./dialog-form.component.scss']\n})\nexport class DialogFormComponent {\n\n public formUrl: string;\n public cols = 1;\n public esForm: EsForm;\n public maxFormHeight: number = window.innerHeight - 60;\n\n constructor(\n public dialogRef: MatDialogRef<DialogFormComponent>,\n ds: EsDialogService,\n ) {\n const data = ds.getData();\n this.formUrl = data.url;\n }\n\n submit(value: {[name: string]: any}) {\n\n // sem se to dostane jen pri success ulozeni formu\n const result: DialogResult = {\n clickedYes: true\n };\n this.dialogRef.close(result);\n\n\n\n // pokud bysme chteli form.value\n // this.dialogRef.close(value);\n // console.log('form value v parent', value);\n\n\n }\n\n getWindowHeight() {\n this.maxFormHeight = window.innerHeight - 60;\n }\n\n\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';\nimport {Router} from '@angular/router';\nimport {EsButton} from './model/es-button.interface';\nimport {EsButtonAction} from './model/es-button-action';\nimport {MatDialogRef} from '@angular/material/dialog';\nimport {MatSnackBar, MatSnackBarConfig} from '@angular/material/snack-bar';\nimport {EsSnackBarPanelClass} from '@eurosat/snackbar';\nimport {HttpService} from '@eurosat/http';\nimport {EsIcon} from '@eurosat/icon';\nimport {DialogConfirmComponent} from './components/dialog-confirm/dialog-confirm.component';\nimport {take} from 'rxjs/internal/operators';\nimport {DialogFormComponent} from './components/dialog-form/dialog-form.component';\nimport {EsDialogService} from '@eurosat/dialog';\nimport {EsDialogConfig} from '@eurosat/dialog';\nimport { DialogResult } from './components/dialog-result';\nimport { EsButtonServerResponse } from './model/es-button-server-response';\nimport { EsFormResponseMessage, EsFormResponseMessageType } from '@eurosat/form';\n\n// todo translates\n\n@Component({\n selector: 'es-buttons',\n templateUrl: './es-buttons.component.html',\n styleUrls: ['./es-buttons.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EsButtonsComponent implements OnChanges {\n\n @Input() parentWidth = 40; // default 40 = 1 button\n @Input() buttons: EsButton[] = []; // normal input\n @Input() forceMenu = false; // pokud chci zobrazit ... menu i pro jeden buttonek, na realtimu pouzito\n\n @Output() buttonClick = new EventEmitter<EsButton>();\n @Output() reload = new EventEmitter<boolean>();\n @Output() dialogCreated = new EventEmitter<MatDialogRef<any>>();\n @Output() serverResponse = new EventEmitter<EsButtonServerResponse>();\n\n menuVisible = false;\n buttonWidth = 40; // todo ViewChild, sirka buttonu ?\n visibleButtons: EsButton[] = [];\n hiddenButtons: EsButton[] = [];\n esIcon = EsIcon;\n _width = 0;\n\n constructor(\n private router: Router,\n private dialog: EsDialogService,\n private snackBar: MatSnackBar,\n private http: HttpService,\n ) { }\n\n showMenu() {\n return this.getHiddenButtons() && this.getHiddenButtons().length > 0 && this.getHiddenButtons().length !== 1;\n }\n\n countVisible() {\n return Math.floor((this._width) / this.buttonWidth) - 1;\n }\n\n getVisibleButtons() {\n if (this.buttons && this.buttons.length > 0) {\n return this.buttons.filter(button => {\n if (this.buttons.indexOf(button) < this.countVisible()\n || (this.getHiddenButtons().length === 1 && !this.forceMenu)) {\n return true;\n }\n });\n }\n }\n\n getHiddenButtons() {\n if (this.buttons && this.buttons.length > 0) {\n return this.buttons.filter(button => {\n if (this.buttons.indexOf(button) >= this.countVisible()) {\n return true;\n }\n });\n }\n }\n\n ngOnChanges(simpleChange: SimpleChanges) {\n if (simpleChange['parentWidth']) {\n if (this.parentWidth > 0) {\n this._width = this.parentWidth;\n this.recalculateButtons();\n }\n }\n\n if (simpleChange['buttons']) {\n if (typeof this.buttons === 'string') {\n this.buttons = JSON.parse(this.buttons);\n }\n this.recalculateButtons();\n }\n }\n\n recalculateButtons() {\n this.menuVisible = this.showMenu();\n this.visibleButtons = this.getVisibleButtons();\n this.hiddenButtons = this.getHiddenButtons();\n }\n\n handleAction(button: EsButton) {\n if (button.action === EsButtonAction.ACTION_DIALOG_CONFIRM) {\n this.openConfirm(button);\n }\n if (button.action === EsButtonAction.ACTION_DIALOG_DELETE) {\n this.openDelete(button);\n }\n if (button.action === EsButtonAction.ACTION_DIALOG_FORM) {\n this.openForm(button);\n }\n if (button.action === EsButtonAction.ACTION_DOWNLOAD) {\n this.http.get(button.url, {responseType: 'blob', observe: 'response'}).subscribe(response => {\n const filename = response.headers.get('Content-Disposition').split('filename=')[1];\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\n window.navigator.msSaveBlob(response.body, filename);\n } else {\n const link = document.createElement('a');\n link.setAttribute('href', window.URL.createObjectURL(response.body));\n link.setAttribute('download', filename);\n link.style.visibility = 'hidden';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n });\n }\n if (button.action === EsButtonAction.ACTION_REQUEST) {\n this.http.get(button.url).subscribe((response: EsFormResponseMessage) => {\n const config = new MatSnackBarConfig();\n config.duration = 2000;\n if (response.type === EsFormResponseMessageType.TYPE_OK) {\n config.panelClass = EsSnackBarPanelClass.SUCCESS;\n } else {\n config.panelClass = EsSnackBarPanelClass.DANGER;\n }\n this.snackBar.open(response.message, null, config);\n this.reload.emit(true);\n this.serverResponse.emit({button: button, response: response});\n });\n }\n if (button.action === EsButtonAction.ACTION_ROUTER_NAVIGATE) {\n this.router.navigateByUrl(button.url);\n }\n if (button.action === EsButtonAction.ACTION_WINDOW_LOCATION) {\n window.location.href = button.url;\n }\n this.buttonClick.emit(button);\n }\n\n // handleSubMenuAction(button: EsButton) {\n // // todo asi predelat na md2 menu\n // // todo nevim jestli se zpropaguje click kdyz je to zanoreny pres es-card-header\n // this.buttonClick.emit(button);\n // }\n\n openForm(button: EsButton) {\n const config: EsDialogConfig = {\n title: button.title,\n data: {\n url: button.url\n }\n };\n const dialogRef: MatDialogRef<DialogFormComponent> = this.dialog.open(DialogFormComponent, config);\n this.dialogCreated.emit(dialogRef);\n dialogRef.afterClosed().pipe(take(1)).subscribe( (res: DialogResult) => {\n if (res && res.clickedYes) {\n this.reload.emit(true);\n\n if (res.serverResponse) {\n this.serverResponse.emit({button: button, response: res.serverResponse});\n }\n }\n });\n }\n\n openDelete(button: EsButton) {\n this.openConfirm(button);\n }\n\n openConfirm(button: EsButton) {\n const config: EsDialogConfig = {\n title: button.title,\n data: {\n message: button.message,\n url: button.url\n }\n };\n const dialogRef: MatDialogRef<DialogConfirmComponent> = this.dialog.open(DialogConfirmComponent, config);\n this.dialogCreated.emit(dialogRef);\n dialogRef.afterClosed().pipe(take(1)).subscribe( (res: DialogResult) => {\n if (res && res.clickedYes) {\n this.reload.emit(true);\n\n if (res.serverResponse) {\n this.serverResponse.emit({button: button, response: res.serverResponse});\n }\n }\n });\n }\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {EsButtonsComponent} from './es-buttons.component';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatMenuModule} from '@angular/material/menu';\nimport {MatSnackBarModule} from '@angular/material/snack-bar';\nimport {MatTooltipModule} from '@angular/material/tooltip';\nimport {TranslateModule} from '@ngx-translate/core';\nimport {EsIconModule} from '@eurosat/icon';\nimport {EsDialogModule} from '@eurosat/dialog';\nimport {EsFormModule} from '@eurosat/form';\nimport {DialogConfirmComponent} from './components/dialog-confirm/dialog-confirm.component';\nimport {DialogFormComponent} from './components/dialog-form/dialog-form.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatTooltipModule,\n MatMenuModule,\n MatSnackBarModule,\n TranslateModule.forChild(),\n EsIconModule,\n EsDialogModule,\n EsFormModule,\n ],\n declarations: [\n EsButtonsComponent,\n DialogConfirmComponent,\n DialogFormComponent,\n ],\n exports: [EsButtonsComponent],\n entryComponents: [\n DialogConfirmComponent,\n DialogFormComponent,\n ],\n})\nexport class EsButtonsModule { }\n","/*\n * Public API Surface of es-buttons\n */\n\nexport * from './lib/es-buttons.component';\nexport * from './lib/es-buttons.module';\nexport * from './lib/model/es-button.interface';\nexport * from './lib/model/es-button-action';\nexport * from './lib/model/es-button-server-response';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {DialogConfirmComponent as ɵa} from './lib/components/dialog-confirm/dialog-confirm.component';\nexport {DialogFormComponent as ɵb} from './lib/components/dialog-form/dialog-form.component';"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAAa,cAAc;;AAET,oCAAqB,GAAG,gBAAgB,CAAC;AACzC,mCAAoB,GAAG,eAAe,CAAC;AACvC,iCAAkB,GAAG,aAAa,CAAC;AACnC,uC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AC,CAAC;KACN;;;YApLJ,SAAS,SAAC;gBACP,QAAQ,EAAE,YAAY;gBACtB,wmUAA0C;gBAE1C,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAClD;;;;YAxBO,MAAM;YAWN,eAAe;YAPf,WAAW;YAEX,WAAW;;;0BAqBd,KAAK;sBACL,KAAK;wBACL,KAAK;0BAEL,MAAM;qBACN,MAAM;4BACN,MAAM;6BACN,MAAM;;;MCGE,eAAe;;;YAvB3B,QAAQ,SAAC;gBACN,OAAO,EAAE;oBACL,YAAY;oBACZ,eAAe;oBACf,gBAAgB;oBAChB,aAAa;oBACb,iBAAiB;oBACjB,eAAe,CAAC,QAAQ,EAAE;oBAC1B,YAAY;oBACZ,cAAc;oBACd,YAAY;iBACf;gBACD,YAAY,EAAE;oBACV,kBAAkB;oBAClB,sBAAsB;oBACtB,mBAAmB;iBACtB;gBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;gBAC7B,eAAe,EAAE;oBACb,sBAAsB;oBACtB,mBAAmB;iBACtB;aACJ;;;ACrCD;;;;ACAA;;;;;;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
-
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
|
-
import { EsDialogService } from '@eurosat/dialog';
|
|
5
|
-
export declare class DialogConfirmComponent {
|
|
6
|
-
dialogRef: MatDialogRef<DialogConfirmComponent>;
|
|
7
|
-
private snackBar;
|
|
8
|
-
private ds;
|
|
9
|
-
submit: EventEmitter<any>;
|
|
10
|
-
message: string;
|
|
11
|
-
url: string;
|
|
12
|
-
activeRequest: boolean;
|
|
13
|
-
constructor(dialogRef: MatDialogRef<DialogConfirmComponent>, snackBar: MatSnackBar, ds: EsDialogService);
|
|
14
|
-
confirm(): void;
|
|
15
|
-
}
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
|
+
import { EsDialogService } from '@eurosat/dialog';
|
|
5
|
+
export declare class DialogConfirmComponent {
|
|
6
|
+
dialogRef: MatDialogRef<DialogConfirmComponent>;
|
|
7
|
+
private snackBar;
|
|
8
|
+
private ds;
|
|
9
|
+
submit: EventEmitter<any>;
|
|
10
|
+
message: string;
|
|
11
|
+
url: string;
|
|
12
|
+
activeRequest: boolean;
|
|
13
|
+
constructor(dialogRef: MatDialogRef<DialogConfirmComponent>, snackBar: MatSnackBar, ds: EsDialogService);
|
|
14
|
+
confirm(): void;
|
|
15
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
-
import { EsForm } from '@eurosat/form';
|
|
3
|
-
import { EsDialogService } from '@eurosat/dialog';
|
|
4
|
-
export declare class DialogFormComponent {
|
|
5
|
-
dialogRef: MatDialogRef<DialogFormComponent>;
|
|
6
|
-
formUrl: string;
|
|
7
|
-
cols: number;
|
|
8
|
-
esForm: EsForm;
|
|
9
|
-
maxFormHeight: number;
|
|
10
|
-
constructor(dialogRef: MatDialogRef<DialogFormComponent>, ds: EsDialogService);
|
|
11
|
-
submit(value: {
|
|
12
|
-
[name: string]: any;
|
|
13
|
-
}): void;
|
|
14
|
-
getWindowHeight(): void;
|
|
15
|
-
}
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { EsForm } from '@eurosat/form';
|
|
3
|
+
import { EsDialogService } from '@eurosat/dialog';
|
|
4
|
+
export declare class DialogFormComponent {
|
|
5
|
+
dialogRef: MatDialogRef<DialogFormComponent>;
|
|
6
|
+
formUrl: string;
|
|
7
|
+
cols: number;
|
|
8
|
+
esForm: EsForm;
|
|
9
|
+
maxFormHeight: number;
|
|
10
|
+
constructor(dialogRef: MatDialogRef<DialogFormComponent>, ds: EsDialogService);
|
|
11
|
+
submit(value: {
|
|
12
|
+
[name: string]: any;
|
|
13
|
+
}): void;
|
|
14
|
+
getWindowHeight(): void;
|
|
15
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface DialogResult {
|
|
2
|
-
clickedYes: boolean;
|
|
3
|
-
serverResponse?: any;
|
|
4
|
-
}
|
|
1
|
+
export interface DialogResult {
|
|
2
|
+
clickedYes: boolean;
|
|
3
|
+
serverResponse?: any;
|
|
4
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
3
|
-
import { EsButton } from './model/es-button.interface';
|
|
4
|
-
import { MatDialogRef } from '@angular/material/dialog';
|
|
5
|
-
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
6
|
-
import { HttpService } from '@eurosat/http';
|
|
7
|
-
import { EsIcon } from '@eurosat/icon';
|
|
8
|
-
import { EsDialogService } from '@eurosat/dialog';
|
|
9
|
-
import { EsButtonServerResponse } from './model/es-button-server-response';
|
|
10
|
-
export declare class EsButtonsComponent implements OnChanges {
|
|
11
|
-
private router;
|
|
12
|
-
private dialog;
|
|
13
|
-
private snackBar;
|
|
14
|
-
private http;
|
|
15
|
-
parentWidth: number;
|
|
16
|
-
buttons: EsButton[];
|
|
17
|
-
forceMenu: boolean;
|
|
18
|
-
buttonClick: EventEmitter<EsButton>;
|
|
19
|
-
reload: EventEmitter<boolean>;
|
|
20
|
-
dialogCreated: EventEmitter<MatDialogRef<any, any>>;
|
|
21
|
-
serverResponse: EventEmitter<EsButtonServerResponse>;
|
|
22
|
-
menuVisible: boolean;
|
|
23
|
-
buttonWidth: number;
|
|
24
|
-
visibleButtons: EsButton[];
|
|
25
|
-
hiddenButtons: EsButton[];
|
|
26
|
-
esIcon: typeof EsIcon;
|
|
27
|
-
_width: number;
|
|
28
|
-
constructor(router: Router, dialog: EsDialogService, snackBar: MatSnackBar, http: HttpService);
|
|
29
|
-
showMenu(): boolean;
|
|
30
|
-
countVisible(): number;
|
|
31
|
-
getVisibleButtons(): EsButton[];
|
|
32
|
-
getHiddenButtons(): EsButton[];
|
|
33
|
-
ngOnChanges(simpleChange: SimpleChanges): void;
|
|
34
|
-
recalculateButtons(): void;
|
|
35
|
-
handleAction(button: EsButton): void;
|
|
36
|
-
openForm(button: EsButton): void;
|
|
37
|
-
openDelete(button: EsButton): void;
|
|
38
|
-
openConfirm(button: EsButton): void;
|
|
39
|
-
}
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { EsButton } from './model/es-button.interface';
|
|
4
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
5
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
6
|
+
import { HttpService } from '@eurosat/http';
|
|
7
|
+
import { EsIcon } from '@eurosat/icon';
|
|
8
|
+
import { EsDialogService } from '@eurosat/dialog';
|
|
9
|
+
import { EsButtonServerResponse } from './model/es-button-server-response';
|
|
10
|
+
export declare class EsButtonsComponent implements OnChanges {
|
|
11
|
+
private router;
|
|
12
|
+
private dialog;
|
|
13
|
+
private snackBar;
|
|
14
|
+
private http;
|
|
15
|
+
parentWidth: number;
|
|
16
|
+
buttons: EsButton[];
|
|
17
|
+
forceMenu: boolean;
|
|
18
|
+
buttonClick: EventEmitter<EsButton>;
|
|
19
|
+
reload: EventEmitter<boolean>;
|
|
20
|
+
dialogCreated: EventEmitter<MatDialogRef<any, any>>;
|
|
21
|
+
serverResponse: EventEmitter<EsButtonServerResponse>;
|
|
22
|
+
menuVisible: boolean;
|
|
23
|
+
buttonWidth: number;
|
|
24
|
+
visibleButtons: EsButton[];
|
|
25
|
+
hiddenButtons: EsButton[];
|
|
26
|
+
esIcon: typeof EsIcon;
|
|
27
|
+
_width: number;
|
|
28
|
+
constructor(router: Router, dialog: EsDialogService, snackBar: MatSnackBar, http: HttpService);
|
|
29
|
+
showMenu(): boolean;
|
|
30
|
+
countVisible(): number;
|
|
31
|
+
getVisibleButtons(): EsButton[];
|
|
32
|
+
getHiddenButtons(): EsButton[];
|
|
33
|
+
ngOnChanges(simpleChange: SimpleChanges): void;
|
|
34
|
+
recalculateButtons(): void;
|
|
35
|
+
handleAction(button: EsButton): void;
|
|
36
|
+
openForm(button: EsButton): void;
|
|
37
|
+
openDelete(button: EsButton): void;
|
|
38
|
+
openConfirm(button: EsButton): void;
|
|
39
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare class EsButtonsModule {
|
|
2
|
-
}
|
|
1
|
+
export declare class EsButtonsModule {
|
|
2
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare class EsButtonAction {
|
|
2
|
-
static ACTION_DIALOG_CONFIRM: string;
|
|
3
|
-
static ACTION_DIALOG_DELETE: string;
|
|
4
|
-
static ACTION_DIALOG_FORM: string;
|
|
5
|
-
static ACTION_CARD_CONTENT_FORM: string;
|
|
6
|
-
static ACTION_CARD_CONTENT_WIZARD: string;
|
|
7
|
-
static ACTION_CHANGE_CARD_CONTENT: string;
|
|
8
|
-
static ACTION_DOWNLOAD: string;
|
|
9
|
-
static ACTION_REQUEST: string;
|
|
10
|
-
static ACTION_ROUTER_NAVIGATE: string;
|
|
11
|
-
static ACTION_WINDOW_LOCATION: string;
|
|
12
|
-
}
|
|
1
|
+
export declare class EsButtonAction {
|
|
2
|
+
static ACTION_DIALOG_CONFIRM: string;
|
|
3
|
+
static ACTION_DIALOG_DELETE: string;
|
|
4
|
+
static ACTION_DIALOG_FORM: string;
|
|
5
|
+
static ACTION_CARD_CONTENT_FORM: string;
|
|
6
|
+
static ACTION_CARD_CONTENT_WIZARD: string;
|
|
7
|
+
static ACTION_CHANGE_CARD_CONTENT: string;
|
|
8
|
+
static ACTION_DOWNLOAD: string;
|
|
9
|
+
static ACTION_REQUEST: string;
|
|
10
|
+
static ACTION_ROUTER_NAVIGATE: string;
|
|
11
|
+
static ACTION_WINDOW_LOCATION: string;
|
|
12
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EsButton } from './es-button.interface';
|
|
2
|
-
export interface EsButtonServerResponse {
|
|
3
|
-
button: EsButton;
|
|
4
|
-
response: any;
|
|
5
|
-
}
|
|
1
|
+
import { EsButton } from './es-button.interface';
|
|
2
|
+
export interface EsButtonServerResponse {
|
|
3
|
+
button: EsButton;
|
|
4
|
+
response: any;
|
|
5
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { EsButtonAction } from './es-button-action';
|
|
2
|
-
export interface EsButton {
|
|
3
|
-
key?: any;
|
|
4
|
-
title: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
url?: string;
|
|
7
|
-
action?: EsButtonAction;
|
|
8
|
-
message?: string;
|
|
9
|
-
tooltip?: string;
|
|
10
|
-
submenu?: EsButton[];
|
|
11
|
-
color?: string;
|
|
12
|
-
themeColor?: 'primary' | 'accent' | 'warn' | 'disabled-icon' | '';
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
}
|
|
1
|
+
import { EsButtonAction } from './es-button-action';
|
|
2
|
+
export interface EsButton {
|
|
3
|
+
key?: any;
|
|
4
|
+
title: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
action?: EsButtonAction;
|
|
8
|
+
message?: string;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
submenu?: EsButton[];
|
|
11
|
+
color?: string;
|
|
12
|
+
themeColor?: 'primary' | 'accent' | 'warn' | 'disabled-icon' | '';
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eurosat/buttons",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
7
|
-
"@eurosat/dialog": "^
|
|
8
|
-
"@eurosat/form": "^
|
|
5
|
+
"@angular/common": "^12.2.16",
|
|
6
|
+
"@angular/core": "^12.2.16",
|
|
7
|
+
"@eurosat/dialog": "^12.0.0",
|
|
8
|
+
"@eurosat/form": "^12.0.0"
|
|
9
9
|
},
|
|
10
10
|
"main": "bundles/eurosat-buttons.umd.js",
|
|
11
11
|
"module": "fesm2015/eurosat-buttons.js",
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"tslib": "^2.0.0"
|
|
20
20
|
}
|
|
21
|
-
}
|
|
21
|
+
}
|
package/public_api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './lib/es-buttons.component';
|
|
2
|
-
export * from './lib/es-buttons.module';
|
|
3
|
-
export * from './lib/model/es-button.interface';
|
|
4
|
-
export * from './lib/model/es-button-action';
|
|
5
|
-
export * from './lib/model/es-button-server-response';
|
|
1
|
+
export * from './lib/es-buttons.component';
|
|
2
|
+
export * from './lib/es-buttons.module';
|
|
3
|
+
export * from './lib/model/es-button.interface';
|
|
4
|
+
export * from './lib/model/es-button-action';
|
|
5
|
+
export * from './lib/model/es-button-server-response';
|