tin-spa 2.2.3 → 2.3.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 (108) hide show
  1. package/esm2020/lib/components/accounts/accountDialog.component.mjs +2 -2
  2. package/esm2020/lib/components/accounts/accounts.component.mjs +2 -2
  3. package/esm2020/lib/components/attach/attach.component.mjs +1 -20
  4. package/esm2020/lib/components/change-password/change-password.component.mjs +2 -2
  5. package/esm2020/lib/components/create-account/create-account.component.mjs +2 -2
  6. package/esm2020/lib/components/customers/customers.component.mjs +2 -2
  7. package/esm2020/lib/components/date/date.component.mjs +23 -16
  8. package/esm2020/lib/components/departments/departments.component.mjs +6 -26
  9. package/esm2020/lib/components/employees/employees.component.mjs +10 -53
  10. package/esm2020/lib/components/form/form.component.mjs +2 -2
  11. package/esm2020/lib/components/inventory/inventory.component.mjs +2 -2
  12. package/esm2020/lib/components/inventory/quantityDialog.component.mjs +2 -2
  13. package/esm2020/lib/components/invitations-table/invitations-table.component.mjs +2 -2
  14. package/esm2020/lib/components/list-dialog/list-dialog.component.mjs +2 -2
  15. package/esm2020/lib/components/login/login.component.mjs +2 -2
  16. package/esm2020/lib/components/logs/logs.component.mjs +2 -2
  17. package/esm2020/lib/components/membership/membership.component.mjs +2 -2
  18. package/esm2020/lib/components/nav-menu/nav-menu.component.mjs +2 -2
  19. package/esm2020/lib/components/plans/plans.component.mjs +2 -2
  20. package/esm2020/lib/components/positions/positions.component.mjs +13 -6
  21. package/esm2020/lib/components/profile/profile.component.mjs +2 -2
  22. package/esm2020/lib/components/recover-account/recover-account.component.mjs +2 -2
  23. package/esm2020/lib/components/roles/addRoleDialog.component.mjs +2 -2
  24. package/esm2020/lib/components/roles/roles.component.mjs +2 -2
  25. package/esm2020/lib/components/settings/settings.component.mjs +2 -2
  26. package/esm2020/lib/components/signup/signup.component.mjs +2 -2
  27. package/esm2020/lib/components/suppliers/suppliers.component.mjs +2 -2
  28. package/esm2020/lib/components/table/detailsDialog.component.mjs +72 -142
  29. package/esm2020/lib/components/table/table.component.mjs +151 -333
  30. package/esm2020/lib/components/table-action/table-action.component.mjs +46 -0
  31. package/esm2020/lib/components/table-header/table-header.component.mjs +52 -0
  32. package/esm2020/lib/components/table-internal/detailsDialog-internal.component.mjs +78 -139
  33. package/esm2020/lib/components/table-internal/table-internal.component.mjs +153 -334
  34. package/esm2020/lib/components/table-row/table-row.component.mjs +58 -0
  35. package/esm2020/lib/components/tasks/tasks.component.mjs +2 -2
  36. package/esm2020/lib/components/tenant-settings/inviteDialog.component.mjs +2 -2
  37. package/esm2020/lib/components/tenant-settings/tenant-settings.component.mjs +2 -2
  38. package/esm2020/lib/components/tenants/tenants.component.mjs +2 -2
  39. package/esm2020/lib/components/tiles/tiles.component.mjs +2 -2
  40. package/esm2020/lib/components/transactions/transactDialog.component.mjs +2 -2
  41. package/esm2020/lib/components/transactions/transactions.component.mjs +2 -2
  42. package/esm2020/lib/components/users/users.component.mjs +2 -2
  43. package/esm2020/lib/components/viewer/viewer.component.mjs +2 -2
  44. package/esm2020/lib/components/welcome/welcome.component.mjs +2 -2
  45. package/esm2020/lib/services/button.service.mjs +100 -0
  46. package/esm2020/lib/services/condition.service.mjs +32 -0
  47. package/esm2020/lib/services/datalib.service.mjs +387 -0
  48. package/esm2020/lib/services/dialog.service.mjs +38 -0
  49. package/esm2020/lib/services/table-config.service.mjs +26 -0
  50. package/esm2020/lib/tin-spa.module.mjs +6 -3
  51. package/esm2020/public-api.mjs +3 -2
  52. package/fesm2015/tin-spa.mjs +963 -1075
  53. package/fesm2015/tin-spa.mjs.map +1 -1
  54. package/fesm2020/tin-spa.mjs +970 -1070
  55. package/fesm2020/tin-spa.mjs.map +1 -1
  56. package/lib/components/accounts/accountDialog.component.d.ts +1 -1
  57. package/lib/components/accounts/accounts.component.d.ts +1 -1
  58. package/lib/components/attach/attach.component.d.ts +0 -19
  59. package/lib/components/change-password/change-password.component.d.ts +1 -1
  60. package/lib/components/create-account/create-account.component.d.ts +1 -1
  61. package/lib/components/customers/customers.component.d.ts +1 -1
  62. package/lib/components/date/date.component.d.ts +10 -9
  63. package/lib/components/departments/departments.component.d.ts +2 -5
  64. package/lib/components/employees/employees.component.d.ts +3 -14
  65. package/lib/components/form/form.component.d.ts +1 -1
  66. package/lib/components/inventory/inventory.component.d.ts +1 -1
  67. package/lib/components/inventory/quantityDialog.component.d.ts +1 -1
  68. package/lib/components/invitations-table/invitations-table.component.d.ts +1 -1
  69. package/lib/components/list-dialog/list-dialog.component.d.ts +1 -1
  70. package/lib/components/login/login.component.d.ts +1 -1
  71. package/lib/components/logs/logs.component.d.ts +1 -1
  72. package/lib/components/membership/membership.component.d.ts +1 -1
  73. package/lib/components/nav-menu/nav-menu.component.d.ts +1 -1
  74. package/lib/components/plans/plans.component.d.ts +1 -1
  75. package/lib/components/positions/positions.component.d.ts +5 -1
  76. package/lib/components/profile/profile.component.d.ts +1 -1
  77. package/lib/components/recover-account/recover-account.component.d.ts +1 -1
  78. package/lib/components/roles/addRoleDialog.component.d.ts +1 -1
  79. package/lib/components/roles/roles.component.d.ts +1 -1
  80. package/lib/components/settings/settings.component.d.ts +1 -1
  81. package/lib/components/signup/signup.component.d.ts +1 -1
  82. package/lib/components/suppliers/suppliers.component.d.ts +1 -1
  83. package/lib/components/table/detailsDialog.component.d.ts +11 -4
  84. package/lib/components/table/table.component.d.ts +28 -15
  85. package/lib/components/table-action/table-action.component.d.ts +22 -0
  86. package/lib/components/table-header/table-header.component.d.ts +22 -0
  87. package/lib/components/table-internal/detailsDialog-internal.component.d.ts +16 -6
  88. package/lib/components/table-internal/table-internal.component.d.ts +28 -15
  89. package/lib/components/table-row/table-row.component.d.ts +28 -0
  90. package/lib/components/tasks/tasks.component.d.ts +1 -1
  91. package/lib/components/tenant-settings/inviteDialog.component.d.ts +1 -1
  92. package/lib/components/tenant-settings/tenant-settings.component.d.ts +1 -1
  93. package/lib/components/tenants/tenants.component.d.ts +1 -1
  94. package/lib/components/tiles/tiles.component.d.ts +1 -1
  95. package/lib/components/transactions/transactDialog.component.d.ts +1 -1
  96. package/lib/components/transactions/transactions.component.d.ts +1 -1
  97. package/lib/components/users/users.component.d.ts +1 -1
  98. package/lib/components/viewer/viewer.component.d.ts +1 -1
  99. package/lib/components/welcome/welcome.component.d.ts +1 -1
  100. package/lib/services/button.service.d.ts +27 -0
  101. package/lib/services/condition.service.d.ts +10 -0
  102. package/lib/services/{data.service.d.ts → datalib.service.d.ts} +15 -1
  103. package/lib/services/dialog.service.d.ts +18 -0
  104. package/lib/services/table-config.service.d.ts +8 -0
  105. package/lib/tin-spa.module.d.ts +8 -5
  106. package/package.json +1 -1
  107. package/public-api.d.ts +2 -1
  108. package/esm2020/lib/services/data.service.mjs +0 -236
@@ -18,6 +18,7 @@ import * as i8 from '@abacritt/angularx-social-login';
18
18
  import { SocialLoginModule } from '@abacritt/angularx-social-login';
19
19
  import * as i1$2 from '@angular/common/http';
20
20
  import { HttpHeaders, HttpResponse, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
21
+ import * as i3$1 from '@angular/cdk/layout';
21
22
  import * as i8$1 from '@angular/material/autocomplete';
22
23
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
23
24
  import { MatBadgeModule } from '@angular/material/badge';
@@ -25,21 +26,21 @@ import * as i15 from '@angular/material/card';
25
26
  import { MatCardModule } from '@angular/material/card';
26
27
  import * as i2$1 from '@angular/material/checkbox';
27
28
  import { MatCheckboxModule } from '@angular/material/checkbox';
28
- import * as i10 from '@angular/material/chips';
29
+ import * as i4$3 from '@angular/material/chips';
29
30
  import { MatChipsModule } from '@angular/material/chips';
30
31
  import * as i7 from '@angular/material/core';
31
32
  import { MatNativeDateModule, MAT_DATE_LOCALE } from '@angular/material/core';
32
33
  import * as i5$1 from '@angular/material/datepicker';
33
34
  import { MatDatepickerModule } from '@angular/material/datepicker';
34
- import * as i3$1 from '@angular/material/icon';
35
+ import * as i4$1 from '@angular/material/icon';
35
36
  import { MatIconModule } from '@angular/material/icon';
36
- import * as i4$1 from '@angular/material/input';
37
+ import * as i4$2 from '@angular/material/input';
37
38
  import { MatInputModule } from '@angular/material/input';
38
39
  import * as i11 from '@angular/material/list';
39
40
  import { MatListModule } from '@angular/material/list';
40
41
  import * as i8$2 from '@angular/material/menu';
41
42
  import { MatMenuModule } from '@angular/material/menu';
42
- import * as i7$2 from '@angular/material/paginator';
43
+ import * as i11$1 from '@angular/material/paginator';
43
44
  import { MatPaginatorModule } from '@angular/material/paginator';
44
45
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
45
46
  import { MatRadioModule } from '@angular/material/radio';
@@ -49,11 +50,11 @@ import { MatSliderModule } from '@angular/material/slider';
49
50
  import { MatSortModule } from '@angular/material/sort';
50
51
  import * as i2$2 from '@angular/material/stepper';
51
52
  import { MatStepperModule } from '@angular/material/stepper';
52
- import * as i6 from '@angular/material/table';
53
+ import * as i10 from '@angular/material/table';
53
54
  import { MatTableModule, MatTableDataSource } from '@angular/material/table';
54
- import * as i9 from '@angular/material/tabs';
55
+ import * as i11$2 from '@angular/material/tabs';
55
56
  import { MatTabsModule } from '@angular/material/tabs';
56
- import * as i10$1 from '@angular/material/progress-bar';
57
+ import * as i12$1 from '@angular/material/progress-bar';
57
58
  import { MatProgressBarModule } from '@angular/material/progress-bar';
58
59
  import * as i7$1 from '@angular/material/tooltip';
59
60
  import { MatTooltipModule } from '@angular/material/tooltip';
@@ -66,7 +67,6 @@ import { MatToolbarModule } from '@angular/material/toolbar';
66
67
  import * as i16 from '@angular/material/expansion';
67
68
  import { MatExpansionModule } from '@angular/material/expansion';
68
69
  import { STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper';
69
- import * as i3$3 from '@angular/cdk/layout';
70
70
  import * as i12 from '@angular/material/divider';
71
71
  import * as i5$2 from 'ngx-doc-viewer';
72
72
  import { NgxDocViewerModule } from 'ngx-doc-viewer';
@@ -1189,6 +1189,145 @@ class DataServiceLib {
1189
1189
  this.capGrades = new CapItem;
1190
1190
  this.tmpProfileuserName = "";
1191
1191
  this.isProcessing = false;
1192
+ this.genders = [
1193
+ { name: 'Male', value: 1 },
1194
+ { name: 'Female', value: 2 }
1195
+ ];
1196
+ this.employeeFormConfig = {
1197
+ fields: [
1198
+ { name: 'nationalID', type: 'text', alias: 'National ID', required: true },
1199
+ { name: 'gender', alias: 'Gender', type: 'select', options: this.genders, required: true },
1200
+ { name: 'firstName', type: 'text', required: true },
1201
+ { name: 'lastName', type: 'text', required: true },
1202
+ { name: 'dateOfBirth', type: 'date', alias: 'Date of Birth', required: true },
1203
+ { name: 'employmentDate', type: 'date', alias: 'Employment Date', required: true },
1204
+ { name: 'departmentID', alias: 'Department', type: 'select', options: [], optionDisplay: 'name', optionValue: 'departmentID' },
1205
+ { name: 'positionID', alias: 'Position', type: 'select', options: [], optionDisplay: 'name', optionValue: 'positionID', masterField: 'departmentID', },
1206
+ { name: 'employmentStatus', alias: 'Employment Status', type: 'select', options: [], optionDisplay: 'name', optionValue: 'value' },
1207
+ { name: 'activeStatus', alias: 'Active Status', type: 'select', options: [], optionDisplay: 'name', optionValue: 'value' },
1208
+ { name: 'address', type: 'text', rows: 2, span: true },
1209
+ { name: 'phone', type: 'text' },
1210
+ { name: 'email', type: 'text' },
1211
+ { name: 'note', type: 'text', rows: 2, span: true },
1212
+ ],
1213
+ };
1214
+ this.employeeTableConfig = {
1215
+ showFilter: true,
1216
+ minColumns: ['name', 'departmentName', 'positionName'],
1217
+ flatButtons: true,
1218
+ columns: [
1219
+ { name: 'name', type: 'text' },
1220
+ { name: 'genderName', type: 'text', alias: 'Gender' },
1221
+ { name: 'departmentName', type: 'text', alias: 'Department' },
1222
+ { name: 'positionName', type: 'text', alias: 'Position' },
1223
+ { name: 'employmentStatusName', type: 'text', alias: 'Employment Status' },
1224
+ { name: 'activeStatusName', type: 'text', alias: 'Active Status' },
1225
+ ],
1226
+ buttons: [
1227
+ { name: 'create', display: 'Create', dialog: true, action: { url: 'general/employees?action=create', method: 'post' } },
1228
+ { name: 'view', dialog: true },
1229
+ { name: 'edit', dialog: true, action: { url: 'general/employees?action=edit', method: 'post' } },
1230
+ { name: 'delete', dialog: true, action: { url: 'general/employees?action=delete', method: 'post' } },
1231
+ ],
1232
+ loadAction: { url: 'general/employees/x' },
1233
+ formConfig: this.employeeFormConfig
1234
+ };
1235
+ this.positionFormConfig = {
1236
+ fields: [
1237
+ { name: 'name', type: 'text', required: true },
1238
+ // { name: 'departmentID', alias: 'Department', type: 'select', options: [], optionDisplay: 'name', optionValue: 'departmentID' },
1239
+ { name: 'description', type: 'text', span: true },
1240
+ ],
1241
+ loadAction: { url: 'positions/id' },
1242
+ };
1243
+ this.editPositionButton = { name: 'edit', dialog: true, action: { url: 'positions?action=edit', method: 'post', successMessage: 'Edited Successfully' } };
1244
+ this.positionTableConfig = {
1245
+ showFilter: true,
1246
+ minColumns: ['name', 'departmentName', 'salary'],
1247
+ flatButtons: true,
1248
+ columns: [
1249
+ { name: 'positionID', type: 'number', alias: 'ID' },
1250
+ { name: 'name', type: 'text' },
1251
+ // { name: 'departmentName', type: 'text', alias: 'Department' },
1252
+ ],
1253
+ buttons: [
1254
+ { name: 'create', display: 'Create', dialog: true, action: { url: 'positions?action=create', method: 'post' } },
1255
+ {
1256
+ name: 'view',
1257
+ dialog: true,
1258
+ detailsConfig: {
1259
+ formConfig: { ...this.positionFormConfig, fields: this.positionFormConfig.fields.filter(x => x.name != 'departmentID') },
1260
+ heroField: 'positionID',
1261
+ buttons: [this.editPositionButton],
1262
+ tableConfigs: [
1263
+ {
1264
+ ...this.employeeTableConfig,
1265
+ loadAction: { url: 'positions/employees/x' },
1266
+ loadCriteria: 'employees',
1267
+ loadIDField: 'positionID',
1268
+ title: 'Employees',
1269
+ elevation: 'none',
1270
+ }
1271
+ ],
1272
+ }
1273
+ },
1274
+ this.editPositionButton,
1275
+ { name: 'delete', dialog: true, action: { url: 'positions?action=delete', method: 'post' } },
1276
+ ],
1277
+ loadAction: { url: 'positions/all/x' },
1278
+ formConfig: this.positionFormConfig
1279
+ };
1280
+ //--------------------------Departments-------------------------
1281
+ this.departmentFormConfig = {
1282
+ fields: [
1283
+ { name: 'name', type: 'text', required: true },
1284
+ ],
1285
+ loadAction: { url: 'departments/id' },
1286
+ };
1287
+ this.editDepartmentButton = { name: 'edit', dialog: true, action: { url: 'departments?action=edit', method: 'post', successMessage: 'Edited Successfully' } };
1288
+ this.departmentTableConfig = {
1289
+ showFilter: true,
1290
+ minColumns: ['name'],
1291
+ flatButtons: true,
1292
+ columns: [
1293
+ { name: 'departmentID', type: 'number', alias: 'ID' },
1294
+ { name: 'name', type: 'text' },
1295
+ ],
1296
+ buttons: [
1297
+ { name: 'create', display: 'Create', dialog: true, action: { url: 'departments?action=create', method: 'post' } },
1298
+ {
1299
+ name: 'view',
1300
+ dialog: true,
1301
+ detailsConfig: {
1302
+ formConfig: this.departmentFormConfig,
1303
+ heroField: 'departmentID',
1304
+ buttons: [this.editDepartmentButton],
1305
+ tableConfigs: [
1306
+ {
1307
+ ...this.employeeTableConfig,
1308
+ loadAction: { url: 'departments/employees/x' },
1309
+ loadCriteria: 'employees',
1310
+ loadIDField: 'departmentID',
1311
+ title: 'Employees',
1312
+ elevation: 'none',
1313
+ },
1314
+ {
1315
+ ...this.positionTableConfig,
1316
+ loadAction: { url: 'departments/positions/x' },
1317
+ loadCriteria: 'positions',
1318
+ loadIDField: 'departmentID',
1319
+ title: 'Positions',
1320
+ elevation: 'none',
1321
+ }
1322
+ ],
1323
+ }
1324
+ },
1325
+ this.editDepartmentButton,
1326
+ { name: 'delete', dialog: true, action: { url: 'departments?action=delete', method: 'post' } },
1327
+ ],
1328
+ loadAction: { url: 'departments/all/x' },
1329
+ formConfig: this.departmentFormConfig
1330
+ };
1192
1331
  this.appConfig.appName = "App-Name";
1193
1332
  this.appConfig.logo = "./assets/logo.png";
1194
1333
  this.appConfig.ADAuth = true;
@@ -1257,7 +1396,7 @@ class DataServiceLib {
1257
1396
  this.capHR.display = "HR";
1258
1397
  this.capHR.link = "home/admin/hr";
1259
1398
  this.capHR.icon = "diversity_3";
1260
- this.capHR.capSubItems = [this.capEmployees, this.capDepartments, this.capPositions, this.capGrades];
1399
+ this.capHR.capSubItems = [this.capEmployees, this.capDepartments, this.capPositions];
1261
1400
  this.capEmployees.name = "cap17";
1262
1401
  this.capEmployees.display = "Employees";
1263
1402
  this.capEmployees.link = "home/admin/employees";
@@ -1270,15 +1409,27 @@ class DataServiceLib {
1270
1409
  this.capPositions.display = "Positions";
1271
1410
  this.capPositions.link = "home/admin/positions";
1272
1411
  this.capPositions.icon = "picture_in_picture_medium";
1273
- this.capGrades.name = "cap17";
1274
- this.capGrades.display = "Grades";
1275
- this.capGrades.link = "home/admin/grades";
1276
- this.capGrades.icon = "grading";
1277
1412
  }
1278
1413
  UpdateAppConfig(config) {
1279
1414
  this.appConfigSource.next(config);
1280
1415
  this.appConfig = config;
1281
1416
  }
1417
+ //--------------------------Employees-------------------------
1418
+ loadEmployeesMeta() {
1419
+ this.CallApi({ url: 'general/employeesmeta/x' }, "").subscribe((apiResponse) => {
1420
+ this.employeeFormConfig.fields.find(x => x.name == 'departmentID').options = apiResponse.data.departments;
1421
+ this.employeeFormConfig.fields.find(x => x.name == 'positionID').masterOptions = apiResponse.data.positions;
1422
+ this.employeeFormConfig.fields.find(x => x.name == 'employmentStatus').options = apiResponse.data.employmentStatuses;
1423
+ this.employeeFormConfig.fields.find(x => x.name == 'activeStatus').options = apiResponse.data.activeStatuses;
1424
+ });
1425
+ }
1426
+ //--------------------------Positions-------------------------
1427
+ loadPositionMeta() {
1428
+ // this.CallApi({ url: 'positions/meta/x' }, "").subscribe((apiResponse: ApiResponse) => {
1429
+ // this.positionFormConfig.fields.find(x => x.name == 'departmentID').options = apiResponse.data.departments;
1430
+ // });
1431
+ }
1432
+ //---------------------------Other code
1282
1433
  CallApi(action, data = '') {
1283
1434
  if (!action.method) {
1284
1435
  return this.httpService.Get(action.url);
@@ -1402,6 +1553,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
1402
1553
  }]
1403
1554
  }], ctorParameters: function () { return []; } });
1404
1555
 
1556
+ class DialogService {
1557
+ constructor(dialog, breakpointObserver) {
1558
+ this.dialog = dialog;
1559
+ this.breakpointObserver = breakpointObserver;
1560
+ this.smallScreen = false;
1561
+ // Detect screen size changes
1562
+ this.breakpointObserver.observe(["(max-width: 600px)"]).subscribe((result) => {
1563
+ this.smallScreen = result.matches;
1564
+ });
1565
+ }
1566
+ openDetailsDialog(config, dialogComponent) {
1567
+ const hasTables = config.tableConfigs?.length > 0;
1568
+ const dialogOptions = {
1569
+ width: this.smallScreen ? '900px' : (hasTables ? '90%' : '900px'),
1570
+ height: hasTables ? '90%' : 'auto',
1571
+ data: config
1572
+ };
1573
+ const dialogRef = this.dialog.open(dialogComponent, dialogOptions);
1574
+ return {
1575
+ afterClosed: dialogRef.afterClosed(),
1576
+ inputChange: dialogRef.componentInstance.inputChange,
1577
+ dialogRef: dialogRef
1578
+ };
1579
+ }
1580
+ }
1581
+ DialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogService, deps: [{ token: i4.MatDialog }, { token: i3$1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
1582
+ DialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogService, providedIn: 'root' });
1583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogService, decorators: [{
1584
+ type: Injectable,
1585
+ args: [{
1586
+ providedIn: 'root'
1587
+ }]
1588
+ }], ctorParameters: function () { return [{ type: i4.MatDialog }, { type: i3$1.BreakpointObserver }]; } });
1589
+
1405
1590
  class TinSpaComponent {
1406
1591
  }
1407
1592
  TinSpaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TinSpaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -1583,7 +1768,7 @@ class TextComponent {
1583
1768
  }
1584
1769
  }
1585
1770
  TextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1586
- TextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TextComponent, selector: "spa-text", inputs: { readonly: "readonly", hint: "hint", display: "display", placeholder: "placeholder", value: "value", format: "format", type: "type", rows: "rows", width: "width", options: "options", optionValue: "optionValue", required: "required", min: "min", max: "max", regex: "regex" }, outputs: { valueChange: "valueChange", leave: "leave", enterPress: "enterPress" }, ngImport: i0, template: "\r\n<!-- General Text -->\r\n<mat-form-field *ngIf=\"(!rows || rows == 1) && (format=='text' || format =='date') && options.length==0\" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\" >\r\n<mat-label *ngIf=\"format=='text'\">{{display}}</mat-label>\r\n<mat-label *ngIf=\"format=='date'\">{{display | date:'dd/MM/yyyy'}}</mat-label>\r\n<input matInput autocomplete=\"off\" [(ngModel)]=\"value\" (change)=\"changed()\" (blur)=\"leaved()\" (keyup.enter)=\"enterPressed()\" [type]=\"type\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\"/>\r\n<mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n<!-- password -->\r\n<mat-form-field class=\"spa-text\" *ngIf=\"format=='password'\" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px\">\r\n <mat-label>{{display}}</mat-label>\r\n <input matInput [type]=\"hide ? 'password' : 'text'\" (keyup.enter)=\"enterPressed()\" (change)=\"changed()\" (blur)=\"leaved()\" [(ngModel)]=\"value\" autocomplete=\"off\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\">\r\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n <button mat-icon-button matSuffix (click)=\"hide = !hide\" [attr.aria-label]=\"'Hide password'\" [attr.aria-pressed]=\"hide\">\r\n <mat-icon style=\"font-size: 18px;\">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>\r\n </button>\r\n</mat-form-field>\r\n\r\n\r\n<!-- TextArea copy - Only change input to textarea and change ngif to not -->\r\n\r\n<mat-form-field *ngIf=\"rows > 1 && options.length==0\" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\">\r\n<mat-label>{{display}}</mat-label>\r\n<textarea matInput autocomplete=\"off\" [rows]=\"rows\" [(ngModel)]=\"value\" (change)=\"changed()\" (keyup.enter)=\"enterPressed()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\"></textarea>\r\n<mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n\r\n<!-- Auto Complete-->\r\n\r\n <mat-form-field *ngIf=\"(!rows || rows == 1) && format=='text' && options.length>0 \" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\">\r\n <mat-label>{{display}}</mat-label>\r\n <input [type]=\"type\" [placeholder]=\"placeholder\" [(ngModel)]=\"value\" (change)=\"changed()\" matInput [formControl]=\"myControl\" [matAutocomplete]=\"auto\" [required]=\"required\" [readonly]=\"readonly\">\r\n <mat-error *ngIf=\"control.invalid\">{{validate(myControl)}}</mat-error>\r\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"changed()\">\r\n\r\n <ng-container *ngIf=\"!multiDimension\">\r\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"multiDimension\">\r\n <mat-option *ngFor=\"let row of filteredOptions | async\" [value]=\"row[optionValue]\">\r\n {{row[optionValue]}}\r\n </mat-option>\r\n </ng-container>\r\n\r\n\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
1771
+ TextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TextComponent, selector: "spa-text", inputs: { readonly: "readonly", hint: "hint", display: "display", placeholder: "placeholder", value: "value", format: "format", type: "type", rows: "rows", width: "width", options: "options", optionValue: "optionValue", required: "required", min: "min", max: "max", regex: "regex" }, outputs: { valueChange: "valueChange", leave: "leave", enterPress: "enterPress" }, ngImport: i0, template: "\r\n<!-- General Text -->\r\n<mat-form-field *ngIf=\"(!rows || rows == 1) && (format=='text' || format =='date') && options.length==0\" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\" >\r\n<mat-label *ngIf=\"format=='text'\">{{display}}</mat-label>\r\n<mat-label *ngIf=\"format=='date'\">{{display | date:'dd/MM/yyyy'}}</mat-label>\r\n<input matInput autocomplete=\"off\" [(ngModel)]=\"value\" (change)=\"changed()\" (blur)=\"leaved()\" (keyup.enter)=\"enterPressed()\" [type]=\"type\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\"/>\r\n<mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n<!-- password -->\r\n<mat-form-field class=\"spa-text\" *ngIf=\"format=='password'\" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px\">\r\n <mat-label>{{display}}</mat-label>\r\n <input matInput [type]=\"hide ? 'password' : 'text'\" (keyup.enter)=\"enterPressed()\" (change)=\"changed()\" (blur)=\"leaved()\" [(ngModel)]=\"value\" autocomplete=\"off\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\">\r\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n <button mat-icon-button matSuffix (click)=\"hide = !hide\" [attr.aria-label]=\"'Hide password'\" [attr.aria-pressed]=\"hide\">\r\n <mat-icon style=\"font-size: 18px;\">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>\r\n </button>\r\n</mat-form-field>\r\n\r\n\r\n<!-- TextArea copy - Only change input to textarea and change ngif to not -->\r\n\r\n<mat-form-field *ngIf=\"rows > 1 && options.length==0\" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\">\r\n<mat-label>{{display}}</mat-label>\r\n<textarea matInput autocomplete=\"off\" [rows]=\"rows\" [(ngModel)]=\"value\" (change)=\"changed()\" (keyup.enter)=\"enterPressed()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\"></textarea>\r\n<mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n\r\n<!-- Auto Complete-->\r\n\r\n <mat-form-field *ngIf=\"(!rows || rows == 1) && format=='text' && options.length>0 \" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\">\r\n <mat-label>{{display}}</mat-label>\r\n <input [type]=\"type\" [placeholder]=\"placeholder\" [(ngModel)]=\"value\" (change)=\"changed()\" matInput [formControl]=\"myControl\" [matAutocomplete]=\"auto\" [required]=\"required\" [readonly]=\"readonly\">\r\n <mat-error *ngIf=\"control.invalid\">{{validate(myControl)}}</mat-error>\r\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"changed()\">\r\n\r\n <ng-container *ngIf=\"!multiDimension\">\r\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"multiDimension\">\r\n <mat-option *ngFor=\"let row of filteredOptions | async\" [value]=\"row[optionValue]\">\r\n {{row[optionValue]}}\r\n </mat-option>\r\n </ng-container>\r\n\r\n\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
1587
1772
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TextComponent, decorators: [{
1588
1773
  type: Component,
1589
1774
  args: [{ selector: 'spa-text', template: "\r\n<!-- General Text -->\r\n<mat-form-field *ngIf=\"(!rows || rows == 1) && (format=='text' || format =='date') && options.length==0\" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\" >\r\n<mat-label *ngIf=\"format=='text'\">{{display}}</mat-label>\r\n<mat-label *ngIf=\"format=='date'\">{{display | date:'dd/MM/yyyy'}}</mat-label>\r\n<input matInput autocomplete=\"off\" [(ngModel)]=\"value\" (change)=\"changed()\" (blur)=\"leaved()\" (keyup.enter)=\"enterPressed()\" [type]=\"type\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\"/>\r\n<mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n<!-- password -->\r\n<mat-form-field class=\"spa-text\" *ngIf=\"format=='password'\" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px\">\r\n <mat-label>{{display}}</mat-label>\r\n <input matInput [type]=\"hide ? 'password' : 'text'\" (keyup.enter)=\"enterPressed()\" (change)=\"changed()\" (blur)=\"leaved()\" [(ngModel)]=\"value\" autocomplete=\"off\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\">\r\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n <button mat-icon-button matSuffix (click)=\"hide = !hide\" [attr.aria-label]=\"'Hide password'\" [attr.aria-pressed]=\"hide\">\r\n <mat-icon style=\"font-size: 18px;\">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>\r\n </button>\r\n</mat-form-field>\r\n\r\n\r\n<!-- TextArea copy - Only change input to textarea and change ngif to not -->\r\n\r\n<mat-form-field *ngIf=\"rows > 1 && options.length==0\" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\">\r\n<mat-label>{{display}}</mat-label>\r\n<textarea matInput autocomplete=\"off\" [rows]=\"rows\" [(ngModel)]=\"value\" (change)=\"changed()\" (keyup.enter)=\"enterPressed()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\"></textarea>\r\n<mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n\r\n<!-- Auto Complete-->\r\n\r\n <mat-form-field *ngIf=\"(!rows || rows == 1) && format=='text' && options.length>0 \" [hideRequiredMarker]=\"!required\" [hintLabel]=\"hint\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\">\r\n <mat-label>{{display}}</mat-label>\r\n <input [type]=\"type\" [placeholder]=\"placeholder\" [(ngModel)]=\"value\" (change)=\"changed()\" matInput [formControl]=\"myControl\" [matAutocomplete]=\"auto\" [required]=\"required\" [readonly]=\"readonly\">\r\n <mat-error *ngIf=\"control.invalid\">{{validate(myControl)}}</mat-error>\r\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"changed()\">\r\n\r\n <ng-container *ngIf=\"!multiDimension\">\r\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"multiDimension\">\r\n <mat-option *ngFor=\"let row of filteredOptions | async\" [value]=\"row[optionValue]\">\r\n {{row[optionValue]}}\r\n </mat-option>\r\n </ng-container>\r\n\r\n\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n\r\n" }]
@@ -1689,16 +1874,26 @@ class DateComponent {
1689
1874
  this.placeholder = "";
1690
1875
  this.width = "100%";
1691
1876
  this.valueChange = new EventEmitter();
1692
- this.control = new FormControl(new Date());
1693
1877
  }
1694
1878
  ngOnInit() {
1879
+ this.initializeDateControls();
1880
+ }
1881
+ ngOnChanges(changes) {
1882
+ if (changes['readonly']) {
1883
+ this.updateControlState();
1884
+ }
1885
+ if (changes['value']) {
1886
+ this.control.setValue(new Date(this.value));
1887
+ }
1888
+ }
1889
+ initializeDateControls() {
1695
1890
  this.minDate = new FormControl(new Date(this.min));
1696
1891
  this.maxDate = new FormControl(new Date(this.max));
1697
- if (!this.value || this.value == "") {
1698
- this.control = new FormControl(new Date());
1699
- ;
1700
- }
1701
- setTimeout(() => { this.onChangeEvent(); }, 5);
1892
+ this.control = new FormControl({ value: new Date(this.value), disabled: this.readonly });
1893
+ this.updateControlState();
1894
+ setTimeout(() => this.onChangeEvent(), 5);
1895
+ }
1896
+ updateControlState() {
1702
1897
  if (this.readonly) {
1703
1898
  this.control.disable();
1704
1899
  }
@@ -1706,16 +1901,13 @@ class DateComponent {
1706
1901
  this.control.enable();
1707
1902
  }
1708
1903
  }
1709
- ngOnChanges() {
1710
- this.control = new FormControl(new Date(this.value));
1711
- }
1712
1904
  onChangeEvent() {
1713
- let d = Core.getFormatedDate2(this.control.value, true);
1714
- this.valueChange.emit(d);
1905
+ const formattedDate = Core.getFormatedDate2(this.control.value, true);
1906
+ this.valueChange.emit(formattedDate);
1715
1907
  }
1716
1908
  validate(control) {
1717
1909
  if (control.hasError('matDatepickerMin')) {
1718
- return `Minimun date is ${this.min}`;
1910
+ return `Minimum date is ${this.min}`;
1719
1911
  }
1720
1912
  if (control.hasError('matDatepickerMax')) {
1721
1913
  return `Maximum date is ${this.max}`;
@@ -1724,11 +1916,11 @@ class DateComponent {
1724
1916
  }
1725
1917
  }
1726
1918
  DateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1727
- DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DateComponent, selector: "spa-date", inputs: { required: "required", min: "min", max: "max", readonly: "readonly", hint: "hint", value: "value", display: "display", placeholder: "placeholder", width: "width" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "\r\n<mat-form-field [ngStyle]=\"{'width':width}\">\r\n<input [formControl]=\"control\" [min]=\"minDate.value\" [max]=\"maxDate.value\" matInput [matDatepicker]=\"picker_date\" (dateInput)=\"onChangeEvent()\" [placeholder]=\"display\" [readonly]=\"true\" >\r\n<mat-datepicker-toggle matSuffix [for]=\"picker_date\"></mat-datepicker-toggle>\r\n<mat-datepicker #picker_date></mat-datepicker>\r\n<mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] });
1919
+ DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DateComponent, selector: "spa-date", inputs: { required: "required", min: "min", max: "max", readonly: "readonly", hint: "hint", value: "value", display: "display", placeholder: "placeholder", width: "width" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "\r\n<mat-form-field [ngStyle]=\"{'width':width}\">\r\n <input [formControl]=\"control\" [min]=\"minDate.value\" [max]=\"maxDate.value\" matInput [matDatepicker]=\"picker_date\" (dateInput)=\"onChangeEvent()\" [placeholder]=\"display\" [readonly]=\"true\">\r\n <mat-datepicker-toggle matSuffix [for]=\"picker_date\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker_date></mat-datepicker>\r\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] });
1728
1920
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateComponent, decorators: [{
1729
1921
  type: Component,
1730
- args: [{ selector: 'spa-date', template: "\r\n<mat-form-field [ngStyle]=\"{'width':width}\">\r\n<input [formControl]=\"control\" [min]=\"minDate.value\" [max]=\"maxDate.value\" matInput [matDatepicker]=\"picker_date\" (dateInput)=\"onChangeEvent()\" [placeholder]=\"display\" [readonly]=\"true\" >\r\n<mat-datepicker-toggle matSuffix [for]=\"picker_date\"></mat-datepicker-toggle>\r\n<mat-datepicker #picker_date></mat-datepicker>\r\n<mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n" }]
1731
- }], ctorParameters: function () { return []; }, propDecorators: { required: [{
1922
+ args: [{ selector: 'spa-date', template: "\r\n<mat-form-field [ngStyle]=\"{'width':width}\">\r\n <input [formControl]=\"control\" [min]=\"minDate.value\" [max]=\"maxDate.value\" matInput [matDatepicker]=\"picker_date\" (dateInput)=\"onChangeEvent()\" [placeholder]=\"display\" [readonly]=\"true\">\r\n <mat-datepicker-toggle matSuffix [for]=\"picker_date\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker_date></mat-datepicker>\r\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n" }]
1923
+ }], propDecorators: { required: [{
1732
1924
  type: Input
1733
1925
  }], min: [{
1734
1926
  type: Input
@@ -1766,7 +1958,7 @@ class DatetimeComponent {
1766
1958
  }
1767
1959
  }
1768
1960
  DatetimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatetimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1769
- DatetimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DatetimeComponent, selector: "spa-datetime", inputs: { display: "display", value: "value", readonly: "readonly", min: "min", max: "max" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<mat-form-field >\r\n<mat-label>{{display}}</mat-label>\r\n<input matInput autocomplete=\"off\" type=\"datetime-local\" [(ngModel)]=\"value\" [min]=\"min\" [max]=\"max\" (change)=\"changed()\" [placeholder]=\"display\" [readonly]=\"readonly\" />\r\n</mat-form-field>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] });
1961
+ DatetimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DatetimeComponent, selector: "spa-datetime", inputs: { display: "display", value: "value", readonly: "readonly", min: "min", max: "max" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<mat-form-field >\r\n<mat-label>{{display}}</mat-label>\r\n<input matInput autocomplete=\"off\" type=\"datetime-local\" [(ngModel)]=\"value\" [min]=\"min\" [max]=\"max\" (change)=\"changed()\" [placeholder]=\"display\" [readonly]=\"readonly\" />\r\n</mat-form-field>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] });
1770
1962
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatetimeComponent, decorators: [{
1771
1963
  type: Component,
1772
1964
  args: [{ selector: 'spa-datetime', template: "<mat-form-field >\r\n<mat-label>{{display}}</mat-label>\r\n<input matInput autocomplete=\"off\" type=\"datetime-local\" [(ngModel)]=\"value\" [min]=\"min\" [max]=\"max\" (change)=\"changed()\" [placeholder]=\"display\" [readonly]=\"readonly\" />\r\n</mat-form-field>\r\n" }]
@@ -1939,7 +2131,7 @@ class FilterComponent {
1939
2131
  }
1940
2132
  }
1941
2133
  FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1942
- FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FilterComponent, selector: "spa-filter", inputs: { flatButtons: "flatButtons", showText: "showText", showButton: "showButton", data: "data" }, outputs: { refreshClick: "refreshClick" }, usesOnChanges: true, ngImport: i0, template: "<mat-form-field *ngIf=\"showText\" >\r\n <mat-label>Filter</mat-label>\r\n <input id=\"txtFilter\" matInput [(ngModel)]=\"_filterText\" (keyup)=\"keyUp($event)\" placeholder=\"Enter Filter text\" autocomplete=\"off\">\r\n</mat-form-field>\r\n\r\n<button *ngIf=\"showButton && !flatButtons\" id=\"btnFilter\" mat-mini-fab color=\"primary\" matTooltip=\"Refresh Data\" matTooltipPosition=\"above\" (click)=\"refreshClicked()\" style=\"margin-right:1em;margin-top:5px\">\r\n <mat-icon class=\"refreshIcon\">cached</mat-icon>\r\n</button>\r\n\r\n<button *ngIf=\"showButton && flatButtons\" id=\"btnFilter\" mat-icon-button color=\"primary\" matTooltip=\"Refresh Data\" matTooltipPosition=\"above\" (click)=\"refreshClicked()\" style=\"margin-right:1em;margin-top:5px\">\r\n <mat-icon class=\"refreshIcon\">cached</mat-icon>\r\n</button>\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
2134
+ FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FilterComponent, selector: "spa-filter", inputs: { flatButtons: "flatButtons", showText: "showText", showButton: "showButton", data: "data" }, outputs: { refreshClick: "refreshClick" }, usesOnChanges: true, ngImport: i0, template: "<mat-form-field *ngIf=\"showText\" >\r\n <mat-label>Filter</mat-label>\r\n <input id=\"txtFilter\" matInput [(ngModel)]=\"_filterText\" (keyup)=\"keyUp($event)\" placeholder=\"Enter Filter text\" autocomplete=\"off\">\r\n</mat-form-field>\r\n\r\n<button *ngIf=\"showButton && !flatButtons\" id=\"btnFilter\" mat-mini-fab color=\"primary\" matTooltip=\"Refresh Data\" matTooltipPosition=\"above\" (click)=\"refreshClicked()\" style=\"margin-right:1em;margin-top:5px\">\r\n <mat-icon class=\"refreshIcon\">cached</mat-icon>\r\n</button>\r\n\r\n<button *ngIf=\"showButton && flatButtons\" id=\"btnFilter\" mat-icon-button color=\"primary\" matTooltip=\"Refresh Data\" matTooltipPosition=\"above\" (click)=\"refreshClicked()\" style=\"margin-right:1em;margin-top:5px\">\r\n <mat-icon class=\"refreshIcon\">cached</mat-icon>\r\n</button>\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
1943
2135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FilterComponent, decorators: [{
1944
2136
  type: Component,
1945
2137
  args: [{ selector: 'spa-filter', template: "<mat-form-field *ngIf=\"showText\" >\r\n <mat-label>Filter</mat-label>\r\n <input id=\"txtFilter\" matInput [(ngModel)]=\"_filterText\" (keyup)=\"keyUp($event)\" placeholder=\"Enter Filter text\" autocomplete=\"off\">\r\n</mat-form-field>\r\n\r\n<button *ngIf=\"showButton && !flatButtons\" id=\"btnFilter\" mat-mini-fab color=\"primary\" matTooltip=\"Refresh Data\" matTooltipPosition=\"above\" (click)=\"refreshClicked()\" style=\"margin-right:1em;margin-top:5px\">\r\n <mat-icon class=\"refreshIcon\">cached</mat-icon>\r\n</button>\r\n\r\n<button *ngIf=\"showButton && flatButtons\" id=\"btnFilter\" mat-icon-button color=\"primary\" matTooltip=\"Refresh Data\" matTooltipPosition=\"above\" (click)=\"refreshClicked()\" style=\"margin-right:1em;margin-top:5px\">\r\n <mat-icon class=\"refreshIcon\">cached</mat-icon>\r\n</button>\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"] }]
@@ -2203,7 +2395,7 @@ class MoneyComponent {
2203
2395
  }
2204
2396
  }
2205
2397
  MoneyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MoneyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2206
- MoneyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MoneyComponent, selector: "spa-money", inputs: { readonly: "readonly", hint: "hint", display: "display", placeholder: "placeholder", value: "value", width: "width", currency: "currency", required: "required", min: "min", max: "max" }, outputs: { valueChange: "valueChange", leave: "leave", enterPress: "enterPress" }, usesOnChanges: true, ngImport: i0, template: "\r\n\r\n<mat-form-field hideRequiredMarker=\"true\" [hintLabel]=\"hint\" [hideRequiredMarker]=\"!required\" [ngStyle]=\"{'width':width}\" hideRequiredMarker=\"true\" style=\"margin-right: 5px;\">\r\n <mat-label>{{display}}</mat-label>\r\n <input matInput appCurrencyInputMask autocomplete=\"off\" style=\"text-align: right;\"\r\n [min]=\"min\" [max]=\"max\"\r\n [ngModel]=\"value\" (ngModelChange)=\"changed($event)\" (keyup.enter)=\"enterPressed()\" (blur)=\"leaved()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [readonly]=\"readonly\" />\r\n <span *ngIf=\"currency!=''\" matPrefix>{{currency}}&nbsp;</span>\r\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n\r\n", styles: ["input.example-right-align{-moz-appearance:textfield}.example-right-align{text-align:right}input.example-right-align::-webkit-outer-spin-button,input.example-right-align::-webkit-inner-spin-button{display:none}.curr{background-color:red}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: CurrencyInputMaskDirective, selector: "[appCurrencyInputMask]" }] });
2398
+ MoneyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MoneyComponent, selector: "spa-money", inputs: { readonly: "readonly", hint: "hint", display: "display", placeholder: "placeholder", value: "value", width: "width", currency: "currency", required: "required", min: "min", max: "max" }, outputs: { valueChange: "valueChange", leave: "leave", enterPress: "enterPress" }, usesOnChanges: true, ngImport: i0, template: "\r\n\r\n<mat-form-field hideRequiredMarker=\"true\" [hintLabel]=\"hint\" [hideRequiredMarker]=\"!required\" [ngStyle]=\"{'width':width}\" hideRequiredMarker=\"true\" style=\"margin-right: 5px;\">\r\n <mat-label>{{display}}</mat-label>\r\n <input matInput appCurrencyInputMask autocomplete=\"off\" style=\"text-align: right;\"\r\n [min]=\"min\" [max]=\"max\"\r\n [ngModel]=\"value\" (ngModelChange)=\"changed($event)\" (keyup.enter)=\"enterPressed()\" (blur)=\"leaved()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [readonly]=\"readonly\" />\r\n <span *ngIf=\"currency!=''\" matPrefix>{{currency}}&nbsp;</span>\r\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n\r\n", styles: ["input.example-right-align{-moz-appearance:textfield}.example-right-align{text-align:right}input.example-right-align::-webkit-outer-spin-button,input.example-right-align::-webkit-inner-spin-button{display:none}.curr{background-color:red}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: CurrencyInputMaskDirective, selector: "[appCurrencyInputMask]" }] });
2207
2399
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MoneyComponent, decorators: [{
2208
2400
  type: Component,
2209
2401
  args: [{ selector: 'spa-money', template: "\r\n\r\n<mat-form-field hideRequiredMarker=\"true\" [hintLabel]=\"hint\" [hideRequiredMarker]=\"!required\" [ngStyle]=\"{'width':width}\" hideRequiredMarker=\"true\" style=\"margin-right: 5px;\">\r\n <mat-label>{{display}}</mat-label>\r\n <input matInput appCurrencyInputMask autocomplete=\"off\" style=\"text-align: right;\"\r\n [min]=\"min\" [max]=\"max\"\r\n [ngModel]=\"value\" (ngModelChange)=\"changed($event)\" (keyup.enter)=\"enterPressed()\" (blur)=\"leaved()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [readonly]=\"readonly\" />\r\n <span *ngIf=\"currency!=''\" matPrefix>{{currency}}&nbsp;</span>\r\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\r\n</mat-form-field>\r\n\r\n", styles: ["input.example-right-align{-moz-appearance:textfield}.example-right-align{text-align:right}input.example-right-align::-webkit-outer-spin-button,input.example-right-align::-webkit-inner-spin-button{display:none}.curr{background-color:red}\n"] }]
@@ -2266,7 +2458,7 @@ class OptionComponent {
2266
2458
  }
2267
2459
  }
2268
2460
  OptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2269
- OptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OptionComponent, selector: "spa-option", inputs: { options: "options", optionValue: "optionValue", optionDisplay: "optionDisplay", readonly: "readonly", type: "type", value: "value", display: "display", show: "show" }, outputs: { valueChange: "valueChange", enterPress: "enterPress" }, ngImport: i0, template: "\r\n<div class=\"tin-row gap-0\">\r\n\r\n<mat-checkbox color=\"primary\" style=\"margin-right:5px\" [(ngModel)]=\"show\" (change)=\"resetValue()\" labelPosition=\"after\">{{display}}</mat-checkbox>\r\n\r\n<mat-form-field style=\"margin-right:5px;width: 0px;\" >\r\n<input matInput />\r\n</mat-form-field>\r\n\r\n\r\n<ng-container *ngIf=\"show\" [ngSwitch]=\"type\">\r\n\r\n <spa-date *ngSwitchCase=\"'date'\" [display]=\"display\" [(value)]=\"value\" (valueChange)=\"dateChanged($event)\"></spa-date>\r\n\r\n <spa-select *ngSwitchCase=\"'select'\" [display]=\"display\" [options]=\"options\" [optionDisplay]=\"optionDisplay\" [optionValue]=\"optionValue\" [(value)]=\"value\" (valueChange)=\"changed()\">\r\n </spa-select>\r\n\r\n <spa-text *ngSwitchDefault [display]=\"display\" (keyup.enter)=\"enterPressed()\" [options]=\"options\" [optionValue]=\"optionValue\" [(value)]=\"value\" (valueChange)=\"changed()\"></spa-text>\r\n\r\n</ng-container>\r\n\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: TextComponent, selector: "spa-text", inputs: ["readonly", "hint", "display", "placeholder", "value", "format", "type", "rows", "width", "options", "optionValue", "required", "min", "max", "regex"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "component", type: DateComponent, selector: "spa-date", inputs: ["required", "min", "max", "readonly", "hint", "value", "display", "placeholder", "width"], outputs: ["valueChange"] }, { kind: "component", type: SelectComponent, selector: "spa-select", inputs: ["width", "readonly", "required", "defaultFirstValue", "readonlyMode", "hint", "placeholder", "multiple", "display", "value", "options", "masterOptions", "optionValue", "optionDisplay", "optionDisplayExtra", "nullable"], outputs: ["valueChange"] }] });
2461
+ OptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OptionComponent, selector: "spa-option", inputs: { options: "options", optionValue: "optionValue", optionDisplay: "optionDisplay", readonly: "readonly", type: "type", value: "value", display: "display", show: "show" }, outputs: { valueChange: "valueChange", enterPress: "enterPress" }, ngImport: i0, template: "\r\n<div class=\"tin-row gap-0\">\r\n\r\n<mat-checkbox color=\"primary\" style=\"margin-right:5px\" [(ngModel)]=\"show\" (change)=\"resetValue()\" labelPosition=\"after\">{{display}}</mat-checkbox>\r\n\r\n<mat-form-field style=\"margin-right:5px;width: 0px;\" >\r\n<input matInput />\r\n</mat-form-field>\r\n\r\n\r\n<ng-container *ngIf=\"show\" [ngSwitch]=\"type\">\r\n\r\n <spa-date *ngSwitchCase=\"'date'\" [display]=\"display\" [(value)]=\"value\" (valueChange)=\"dateChanged($event)\"></spa-date>\r\n\r\n <spa-select *ngSwitchCase=\"'select'\" [display]=\"display\" [options]=\"options\" [optionDisplay]=\"optionDisplay\" [optionValue]=\"optionValue\" [(value)]=\"value\" (valueChange)=\"changed()\">\r\n </spa-select>\r\n\r\n <spa-text *ngSwitchDefault [display]=\"display\" (keyup.enter)=\"enterPressed()\" [options]=\"options\" [optionValue]=\"optionValue\" [(value)]=\"value\" (valueChange)=\"changed()\"></spa-text>\r\n\r\n</ng-container>\r\n\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: TextComponent, selector: "spa-text", inputs: ["readonly", "hint", "display", "placeholder", "value", "format", "type", "rows", "width", "options", "optionValue", "required", "min", "max", "regex"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "component", type: DateComponent, selector: "spa-date", inputs: ["required", "min", "max", "readonly", "hint", "value", "display", "placeholder", "width"], outputs: ["valueChange"] }, { kind: "component", type: SelectComponent, selector: "spa-select", inputs: ["width", "readonly", "required", "defaultFirstValue", "readonlyMode", "hint", "placeholder", "multiple", "display", "value", "options", "masterOptions", "optionValue", "optionDisplay", "optionDisplayExtra", "nullable"], outputs: ["valueChange"] }] });
2270
2462
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OptionComponent, decorators: [{
2271
2463
  type: Component,
2272
2464
  args: [{ selector: 'spa-option', template: "\r\n<div class=\"tin-row gap-0\">\r\n\r\n<mat-checkbox color=\"primary\" style=\"margin-right:5px\" [(ngModel)]=\"show\" (change)=\"resetValue()\" labelPosition=\"after\">{{display}}</mat-checkbox>\r\n\r\n<mat-form-field style=\"margin-right:5px;width: 0px;\" >\r\n<input matInput />\r\n</mat-form-field>\r\n\r\n\r\n<ng-container *ngIf=\"show\" [ngSwitch]=\"type\">\r\n\r\n <spa-date *ngSwitchCase=\"'date'\" [display]=\"display\" [(value)]=\"value\" (valueChange)=\"dateChanged($event)\"></spa-date>\r\n\r\n <spa-select *ngSwitchCase=\"'select'\" [display]=\"display\" [options]=\"options\" [optionDisplay]=\"optionDisplay\" [optionValue]=\"optionValue\" [(value)]=\"value\" (valueChange)=\"changed()\">\r\n </spa-select>\r\n\r\n <spa-text *ngSwitchDefault [display]=\"display\" (keyup.enter)=\"enterPressed()\" [options]=\"options\" [optionValue]=\"optionValue\" [(value)]=\"value\" (valueChange)=\"changed()\"></spa-text>\r\n\r\n</ng-container>\r\n\r\n</div>\r\n" }]
@@ -2363,7 +2555,7 @@ class TilesComponent {
2363
2555
  }
2364
2556
  }
2365
2557
  TilesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TilesComponent, deps: [{ token: DataServiceLib }, { token: MessageService }], target: i0.ɵɵFactoryTarget.Component });
2366
- TilesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TilesComponent, selector: "spa-tiles", inputs: { config: "config", data: "data", reload: "reload" }, outputs: { tileClick: "tileClick" }, usesOnChanges: true, ngImport: i0, template: " <div class=\"tin-row align-items-center tiles\" *ngIf=\"!new\">\r\n\r\n <ng-container *ngFor=\"let tile of tiles\">\r\n\r\n <mat-card class=\"card tin-col\" *ngIf=\"!tile.hidden\" (click)=\"clicked(tile)\">\r\n\r\n <mat-label style=\"font-weight:bold; text-align: center; padding: 0px; margin: 0px;\" [ngStyle]=\"{'color':tile.color,'font-size':tile.name == selectedTile ? '45px' : '35px' }\">{{data ? data[tile.name] : 0}}</mat-label>\r\n\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n\r\n <!-- <button mat-icon-button (click)=\"pop(tile.info)\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '14px' : '14px' }\" style=\"padding-left:5px;padding-right:5px; margin-right: 10px;\">{{tile.alias ?? tile.name | camelToWords}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':tile.name == selectedTile ? '24x' : '24px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n </button> -->\r\n\r\n <button mat-icon-button (click)=\"pop(tile.info)\" style=\"margin: 0px; padding: 0px;\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '14px' : '14px' }\" style=\"padding-left:5px;padding-right:5px; margin-right: 10px;\">{{tile.alias ?? tile.name | camelToWords}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':tile.name == selectedTile ? '24x' : '18px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n </button>\r\n\r\n <!-- <div class=\"row d-flex justify-content-center row align-items-center\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '18px' : '12px' }\" style=\"padding-left:5px;padding-right:5px\">{{tile.name}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':tile.name == selectedTile ? '20px' : '17px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n </div> -->\r\n\r\n </div>\r\n\r\n </mat-card>\r\n\r\n </ng-container>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"d-flex row align-items-center justify-content-between\" *ngIf=\"new\">\r\n\r\n <ng-container *ngFor=\"let tile of tiles\">\r\n\r\n <mat-card class=\"col\" style=\"margin-left: 5px;margin-right: 5px; padding: 10px 16px ; min-width: 150px; margin-top: 5px;\" (click)=\"clicked(tile)\">\r\n\r\n <div class=\"row d-flex justify-content-center align-items-center\">\r\n\r\n <div style=\"text-align: center;\">\r\n <mat-label style=\"font-weight:bold;\" *ngIf=\"tile.prefix\" >{{tile.prefix}}</mat-label> &nbsp;\r\n <mat-label style=\"font-weight:bold; text-align: center;\" [ngStyle]=\"{'color':tile.color,'font-size':tile.name == selectedTile ? '35px' : '30px' }\">{{data ? data[tile.name] : 0}}</mat-label>&nbsp;\r\n <mat-label style=\"font-weight:bold;\" *ngIf=\"tile.suffix\">{{tile.suffix}}</mat-label>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class=\"row d-flex justify-content-center align-items-center\">\r\n\r\n <div class=\"d-flex justify-content-center align-items-center\" style=\"text-align: center;\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '18px' : '14px' }\" style=\"padding-left:5px;padding-right:5px; text-align: center;\">{{tile.alias ?? tile.name | camelToWords}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" style=\"font-size: 20px; color:steelblue;\">info</mat-icon>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card>\r\n\r\n\r\n </ng-container>\r\n\r\n </div>\r\n", styles: [".card{min-width:200px;max-width:200px;display:flex;flex-direction:column;align-items:center;padding:5px 10px}.tiles{gap:1;row-gap:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i15.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
2558
+ TilesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TilesComponent, selector: "spa-tiles", inputs: { config: "config", data: "data", reload: "reload" }, outputs: { tileClick: "tileClick" }, usesOnChanges: true, ngImport: i0, template: " <div class=\"tin-row align-items-center tiles\" *ngIf=\"!new\">\r\n\r\n <ng-container *ngFor=\"let tile of tiles\">\r\n\r\n <mat-card class=\"card tin-col\" *ngIf=\"!tile.hidden\" (click)=\"clicked(tile)\">\r\n\r\n <mat-label style=\"font-weight:bold; text-align: center; padding: 0px; margin: 0px;\" [ngStyle]=\"{'color':tile.color,'font-size':tile.name == selectedTile ? '45px' : '35px' }\">{{data ? data[tile.name] : 0}}</mat-label>\r\n\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n\r\n <!-- <button mat-icon-button (click)=\"pop(tile.info)\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '14px' : '14px' }\" style=\"padding-left:5px;padding-right:5px; margin-right: 10px;\">{{tile.alias ?? tile.name | camelToWords}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':tile.name == selectedTile ? '24x' : '24px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n </button> -->\r\n\r\n <button mat-icon-button (click)=\"pop(tile.info)\" style=\"margin: 0px; padding: 0px;\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '14px' : '14px' }\" style=\"padding-left:5px;padding-right:5px; margin-right: 10px;\">{{tile.alias ?? tile.name | camelToWords}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':tile.name == selectedTile ? '24x' : '18px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n </button>\r\n\r\n <!-- <div class=\"row d-flex justify-content-center row align-items-center\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '18px' : '12px' }\" style=\"padding-left:5px;padding-right:5px\">{{tile.name}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':tile.name == selectedTile ? '20px' : '17px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n </div> -->\r\n\r\n </div>\r\n\r\n </mat-card>\r\n\r\n </ng-container>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"d-flex row align-items-center justify-content-between\" *ngIf=\"new\">\r\n\r\n <ng-container *ngFor=\"let tile of tiles\">\r\n\r\n <mat-card class=\"col\" style=\"margin-left: 5px;margin-right: 5px; padding: 10px 16px ; min-width: 150px; margin-top: 5px;\" (click)=\"clicked(tile)\">\r\n\r\n <div class=\"row d-flex justify-content-center align-items-center\">\r\n\r\n <div style=\"text-align: center;\">\r\n <mat-label style=\"font-weight:bold;\" *ngIf=\"tile.prefix\" >{{tile.prefix}}</mat-label> &nbsp;\r\n <mat-label style=\"font-weight:bold; text-align: center;\" [ngStyle]=\"{'color':tile.color,'font-size':tile.name == selectedTile ? '35px' : '30px' }\">{{data ? data[tile.name] : 0}}</mat-label>&nbsp;\r\n <mat-label style=\"font-weight:bold;\" *ngIf=\"tile.suffix\">{{tile.suffix}}</mat-label>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class=\"row d-flex justify-content-center align-items-center\">\r\n\r\n <div class=\"d-flex justify-content-center align-items-center\" style=\"text-align: center;\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '18px' : '14px' }\" style=\"padding-left:5px;padding-right:5px; text-align: center;\">{{tile.alias ?? tile.name | camelToWords}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" style=\"font-size: 20px; color:steelblue;\">info</mat-icon>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card>\r\n\r\n\r\n </ng-container>\r\n\r\n </div>\r\n", styles: [".card{min-width:200px;max-width:200px;display:flex;flex-direction:column;align-items:center;padding:5px 10px}.tiles{gap:1;row-gap:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i15.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
2367
2559
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TilesComponent, decorators: [{
2368
2560
  type: Component,
2369
2561
  args: [{ selector: 'spa-tiles', template: " <div class=\"tin-row align-items-center tiles\" *ngIf=\"!new\">\r\n\r\n <ng-container *ngFor=\"let tile of tiles\">\r\n\r\n <mat-card class=\"card tin-col\" *ngIf=\"!tile.hidden\" (click)=\"clicked(tile)\">\r\n\r\n <mat-label style=\"font-weight:bold; text-align: center; padding: 0px; margin: 0px;\" [ngStyle]=\"{'color':tile.color,'font-size':tile.name == selectedTile ? '45px' : '35px' }\">{{data ? data[tile.name] : 0}}</mat-label>\r\n\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n\r\n <!-- <button mat-icon-button (click)=\"pop(tile.info)\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '14px' : '14px' }\" style=\"padding-left:5px;padding-right:5px; margin-right: 10px;\">{{tile.alias ?? tile.name | camelToWords}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':tile.name == selectedTile ? '24x' : '24px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n </button> -->\r\n\r\n <button mat-icon-button (click)=\"pop(tile.info)\" style=\"margin: 0px; padding: 0px;\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '14px' : '14px' }\" style=\"padding-left:5px;padding-right:5px; margin-right: 10px;\">{{tile.alias ?? tile.name | camelToWords}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':tile.name == selectedTile ? '24x' : '18px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n </button>\r\n\r\n <!-- <div class=\"row d-flex justify-content-center row align-items-center\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '18px' : '12px' }\" style=\"padding-left:5px;padding-right:5px\">{{tile.name}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':tile.name == selectedTile ? '20px' : '17px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n </div> -->\r\n\r\n </div>\r\n\r\n </mat-card>\r\n\r\n </ng-container>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"d-flex row align-items-center justify-content-between\" *ngIf=\"new\">\r\n\r\n <ng-container *ngFor=\"let tile of tiles\">\r\n\r\n <mat-card class=\"col\" style=\"margin-left: 5px;margin-right: 5px; padding: 10px 16px ; min-width: 150px; margin-top: 5px;\" (click)=\"clicked(tile)\">\r\n\r\n <div class=\"row d-flex justify-content-center align-items-center\">\r\n\r\n <div style=\"text-align: center;\">\r\n <mat-label style=\"font-weight:bold;\" *ngIf=\"tile.prefix\" >{{tile.prefix}}</mat-label> &nbsp;\r\n <mat-label style=\"font-weight:bold; text-align: center;\" [ngStyle]=\"{'color':tile.color,'font-size':tile.name == selectedTile ? '35px' : '30px' }\">{{data ? data[tile.name] : 0}}</mat-label>&nbsp;\r\n <mat-label style=\"font-weight:bold;\" *ngIf=\"tile.suffix\">{{tile.suffix}}</mat-label>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class=\"row d-flex justify-content-center align-items-center\">\r\n\r\n <div class=\"d-flex justify-content-center align-items-center\" style=\"text-align: center;\">\r\n <mat-label [ngStyle]=\"{'font-size':tile.name == selectedTile ? '18px' : '14px' }\" style=\"padding-left:5px;padding-right:5px; text-align: center;\">{{tile.alias ?? tile.name | camelToWords}}</mat-label>\r\n <mat-icon [matTooltip]=\"tile.info\" matTooltipPosition=\"above\" style=\"font-size: 20px; color:steelblue;\">info</mat-icon>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card>\r\n\r\n\r\n </ng-container>\r\n\r\n </div>\r\n", styles: [".card{min-width:200px;max-width:200px;display:flex;flex-direction:column;align-items:center;padding:5px 10px}.tiles{gap:1;row-gap:5px}\n"] }]
@@ -2472,23 +2664,13 @@ class AttachComponent {
2472
2664
  }
2473
2665
  ngOnInit() {
2474
2666
  }
2475
- /**
2476
- * on file drop handler
2477
- */
2478
2667
  onFileDropped($event) {
2479
2668
  this.prepareFilesList($event);
2480
2669
  }
2481
- /**
2482
- * handle file from browsing
2483
- */
2484
2670
  fileBrowseHandler(event) {
2485
2671
  let files = event.target.files;
2486
2672
  this.prepareFilesList(files);
2487
2673
  }
2488
- /**
2489
- * Delete file from files list
2490
- * @param index (File index)
2491
- */
2492
2674
  deleteFile(index) {
2493
2675
  this.files.splice(index, 1);
2494
2676
  }
@@ -2511,10 +2693,6 @@ class AttachComponent {
2511
2693
  // }
2512
2694
  // }, 1000);
2513
2695
  // }
2514
- /**
2515
- * Convert Files list to normal array list
2516
- * @param files (Files List)
2517
- */
2518
2696
  prepareFilesList(files) {
2519
2697
  for (const item of files) {
2520
2698
  item.progress = 0;
@@ -2522,11 +2700,6 @@ class AttachComponent {
2522
2700
  }
2523
2701
  // this.uploadFilesSimulator(0);
2524
2702
  }
2525
- /**
2526
- * format bytes
2527
- * @param bytes (File size in bytes)
2528
- * @param decimals (Decimals point)
2529
- */
2530
2703
  formatBytes(bytes, decimals) {
2531
2704
  if (bytes === 0) {
2532
2705
  return '0 Bytes';
@@ -2545,7 +2718,7 @@ class AttachComponent {
2545
2718
  }
2546
2719
  }
2547
2720
  AttachComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AttachComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2548
- AttachComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AttachComponent, selector: "spa-attach", inputs: { message: "message", files: "files", enableUpload: "enableUpload" }, outputs: { filesChange: "filesChange", upload: "upload" }, ngImport: i0, template: "<div class=\"tin-input-row\" style=\"width: 100%;\">\r\n\r\n <div class=\"col\">\r\n <div class=\"container\" appDnd (fileDropped)=\"onFileDropped($event)\">\r\n <input type=\"file\" #fileDropRef id=\"fileDropRef\" multiple (change)=\"fileBrowseHandler($event)\" />\r\n <h4>{{message}}</h4>\r\n\r\n <label for=\"fileDropRef\">Click to Browse</label>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <div class=\"files-list \">\r\n <div class=\"single-file \" style=\"width: 100%;\" *ngFor=\"let file of files; let i = index\">\r\n\r\n <div class=\"tin-input-row info\" >\r\n <h4 class=\"name\">\r\n {{ file?.name }}\r\n </h4>\r\n <p class=\"size\">\r\n {{ formatBytes(file?.size, 2) }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"delete\" (click)=\"deleteFile(i)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"18\" viewBox=\"0 0 14 18\">\r\n <path fill=\"#B1B1B1\" fill-rule=\"nonzero\"\r\n d=\"M1 16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v10zm3.17-7.83a.996.996 0 0 1 1.41 0L7 9.59l1.42-1.42a.996.996 0 1 1 1.41 1.41L8.41 11l1.42 1.42a.996.996 0 1 1-1.41 1.41L7 12.41l-1.42 1.42a.996.996 0 1 1-1.41-1.41L5.59 11 4.17 9.58a.996.996 0 0 1 0-1.41zM10.5 1L9.79.29C9.61.11 9.35 0 9.09 0H4.91c-.26 0-.52.11-.7.29L3.5 1H1c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"files.length > 0 && enableUpload\" class=\"tin-input-row d-flex justify-content-center\" style=\"width: 100%;\" >\r\n <button mat-button color=\"primary\" (click)=\"uploaded()\" matTooltip=\"Upload New Documents\" matTooltipPosition=\"above\" ><mat-icon>file_upload</mat-icon> Upload</button>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n", styles: [".container{width:100%;height:100px;padding-top:5px;text-align:center;border:dashed 2px #2a7b94;position:relative;margin:0 auto}.container input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;top:0;left:0}.container label{color:#fff;width:183px;height:44px;border-radius:21.5px;background-color:#db202f;padding:8px 16px}.container h3{font-size:20px;font-weight:600;color:#38424c}.fileover{animation:shake 1s;animation-iteration-count:infinite}.files-list{margin-top:1.5rem}.files-list .single-file{padding:.5rem;justify-content:space-between;align-items:center;border:dashed 1px #1c824d;margin-bottom:1rem;margin-right:1rem;display:flex;flex-grow:1}.files-list .single-file .delete{display:flex;margin-left:.5rem;cursor:pointer;align-self:flex-end}.files-list .single-file .name{font-size:14px;font-weight:500;color:#353f4a;margin:0}.files-list .single-file .size{font-size:12px;font-weight:500;color:#a4a4a4;margin:0;margin-left:1rem}.files-list .single-file .info{width:100%}@keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}to{transform:translate(1px,-2px) rotate(-1deg)}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
2721
+ AttachComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AttachComponent, selector: "spa-attach", inputs: { message: "message", files: "files", enableUpload: "enableUpload" }, outputs: { filesChange: "filesChange", upload: "upload" }, ngImport: i0, template: "<div class=\"tin-input-row\" style=\"width: 100%;\">\r\n\r\n <div class=\"col\">\r\n <div class=\"container\" appDnd (fileDropped)=\"onFileDropped($event)\">\r\n <input type=\"file\" #fileDropRef id=\"fileDropRef\" multiple (change)=\"fileBrowseHandler($event)\" />\r\n <h4>{{message}}</h4>\r\n\r\n <label for=\"fileDropRef\">Click to Browse</label>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <div class=\"files-list \">\r\n <div class=\"single-file \" style=\"width: 100%;\" *ngFor=\"let file of files; let i = index\">\r\n\r\n <div class=\"tin-input-row info\" >\r\n <h4 class=\"name\">\r\n {{ file?.name }}\r\n </h4>\r\n <p class=\"size\">\r\n {{ formatBytes(file?.size, 2) }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"delete\" (click)=\"deleteFile(i)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"18\" viewBox=\"0 0 14 18\">\r\n <path fill=\"#B1B1B1\" fill-rule=\"nonzero\"\r\n d=\"M1 16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v10zm3.17-7.83a.996.996 0 0 1 1.41 0L7 9.59l1.42-1.42a.996.996 0 1 1 1.41 1.41L8.41 11l1.42 1.42a.996.996 0 1 1-1.41 1.41L7 12.41l-1.42 1.42a.996.996 0 1 1-1.41-1.41L5.59 11 4.17 9.58a.996.996 0 0 1 0-1.41zM10.5 1L9.79.29C9.61.11 9.35 0 9.09 0H4.91c-.26 0-.52.11-.7.29L3.5 1H1c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"files.length > 0 && enableUpload\" class=\"tin-input-row d-flex justify-content-center\" style=\"width: 100%;\" >\r\n <button mat-button color=\"primary\" (click)=\"uploaded()\" matTooltip=\"Upload New Documents\" matTooltipPosition=\"above\" ><mat-icon>file_upload</mat-icon> Upload</button>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n", styles: [".container{width:100%;height:100px;padding-top:5px;text-align:center;border:dashed 2px #2a7b94;position:relative;margin:0 auto}.container input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;top:0;left:0}.container label{color:#fff;width:183px;height:44px;border-radius:21.5px;background-color:#db202f;padding:8px 16px}.container h3{font-size:20px;font-weight:600;color:#38424c}.fileover{animation:shake 1s;animation-iteration-count:infinite}.files-list{margin-top:1.5rem}.files-list .single-file{padding:.5rem;justify-content:space-between;align-items:center;border:dashed 1px #1c824d;margin-bottom:1rem;margin-right:1rem;display:flex;flex-grow:1}.files-list .single-file .delete{display:flex;margin-left:.5rem;cursor:pointer;align-self:flex-end}.files-list .single-file .name{font-size:14px;font-weight:500;color:#353f4a;margin:0}.files-list .single-file .size{font-size:12px;font-weight:500;color:#a4a4a4;margin:0;margin-left:1rem}.files-list .single-file .info{width:100%}@keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}to{transform:translate(1px,-2px) rotate(-1deg)}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
2549
2722
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AttachComponent, decorators: [{
2550
2723
  type: Component,
2551
2724
  args: [{ selector: 'spa-attach', template: "<div class=\"tin-input-row\" style=\"width: 100%;\">\r\n\r\n <div class=\"col\">\r\n <div class=\"container\" appDnd (fileDropped)=\"onFileDropped($event)\">\r\n <input type=\"file\" #fileDropRef id=\"fileDropRef\" multiple (change)=\"fileBrowseHandler($event)\" />\r\n <h4>{{message}}</h4>\r\n\r\n <label for=\"fileDropRef\">Click to Browse</label>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <div class=\"files-list \">\r\n <div class=\"single-file \" style=\"width: 100%;\" *ngFor=\"let file of files; let i = index\">\r\n\r\n <div class=\"tin-input-row info\" >\r\n <h4 class=\"name\">\r\n {{ file?.name }}\r\n </h4>\r\n <p class=\"size\">\r\n {{ formatBytes(file?.size, 2) }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"delete\" (click)=\"deleteFile(i)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"18\" viewBox=\"0 0 14 18\">\r\n <path fill=\"#B1B1B1\" fill-rule=\"nonzero\"\r\n d=\"M1 16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v10zm3.17-7.83a.996.996 0 0 1 1.41 0L7 9.59l1.42-1.42a.996.996 0 1 1 1.41 1.41L8.41 11l1.42 1.42a.996.996 0 1 1-1.41 1.41L7 12.41l-1.42 1.42a.996.996 0 1 1-1.41-1.41L5.59 11 4.17 9.58a.996.996 0 0 1 0-1.41zM10.5 1L9.79.29C9.61.11 9.35 0 9.09 0H4.91c-.26 0-.52.11-.7.29L3.5 1H1c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"files.length > 0 && enableUpload\" class=\"tin-input-row d-flex justify-content-center\" style=\"width: 100%;\" >\r\n <button mat-button color=\"primary\" (click)=\"uploaded()\" matTooltip=\"Upload New Documents\" matTooltipPosition=\"above\" ><mat-icon>file_upload</mat-icon> Upload</button>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n", styles: [".container{width:100%;height:100px;padding-top:5px;text-align:center;border:dashed 2px #2a7b94;position:relative;margin:0 auto}.container input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;top:0;left:0}.container label{color:#fff;width:183px;height:44px;border-radius:21.5px;background-color:#db202f;padding:8px 16px}.container h3{font-size:20px;font-weight:600;color:#38424c}.fileover{animation:shake 1s;animation-iteration-count:infinite}.files-list{margin-top:1.5rem}.files-list .single-file{padding:.5rem;justify-content:space-between;align-items:center;border:dashed 1px #1c824d;margin-bottom:1rem;margin-right:1rem;display:flex;flex-grow:1}.files-list .single-file .delete{display:flex;margin-left:.5rem;cursor:pointer;align-self:flex-end}.files-list .single-file .name{font-size:14px;font-weight:500;color:#353f4a;margin:0}.files-list .single-file .size{font-size:12px;font-weight:500;color:#a4a4a4;margin:0;margin-left:1rem}.files-list .single-file .info{width:100%}@keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}to{transform:translate(1px,-2px) rotate(-1deg)}}\n"] }]
@@ -2595,7 +2768,7 @@ class ChipsComponent {
2595
2768
  }
2596
2769
  }
2597
2770
  ChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChipsComponent, deps: [{ token: MessageService }], target: i0.ɵɵFactoryTarget.Component });
2598
- ChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChipsComponent, selector: "spa-chips", inputs: { icon: "icon", removable: "removable", addable: "addable", chips: "chips" }, outputs: { click: "click", remove: "remove" }, ngImport: i0, template: "\r\n\r\n\r\n<div class=\"row mt-1\" style=\"margin-left: 1em;\">\r\n <mat-chip-list #chipList>\r\n <mat-chip *ngFor=\"let chip of chips let i = index\" selectable [removable]=\"removable\" style=\"font-size: 12px;\" [ngStyle]=\"{'padding-right': removable ? '5px':'12px'}\" (click)=\"clicked(chip)\">\r\n <mat-icon *ngIf=\"icon != ''\" color=\"primary\" style=\"font-size: 22px;\">{{icon}}</mat-icon>\r\n\r\n {{chip}}\r\n\r\n <mat-icon *ngIf=\"removable\" style=\"font-size: 20px; margin-left: 5px;margin-top: 3px;margin-right: 0px; color: grey;\" (click)=\"removed(chip)\">cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n</div>\r\n\r\n\r\n\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i10.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }] });
2771
+ ChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChipsComponent, selector: "spa-chips", inputs: { icon: "icon", removable: "removable", addable: "addable", chips: "chips" }, outputs: { click: "click", remove: "remove" }, ngImport: i0, template: "\r\n\r\n\r\n<div class=\"row mt-1\" style=\"margin-left: 1em;\">\r\n <mat-chip-list #chipList>\r\n <mat-chip *ngFor=\"let chip of chips let i = index\" selectable [removable]=\"removable\" style=\"font-size: 12px;\" [ngStyle]=\"{'padding-right': removable ? '5px':'12px'}\" (click)=\"clicked(chip)\">\r\n <mat-icon *ngIf=\"icon != ''\" color=\"primary\" style=\"font-size: 22px;\">{{icon}}</mat-icon>\r\n\r\n {{chip}}\r\n\r\n <mat-icon *ngIf=\"removable\" style=\"font-size: 20px; margin-left: 5px;margin-top: 3px;margin-right: 0px; color: grey;\" (click)=\"removed(chip)\">cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n</div>\r\n\r\n\r\n\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$3.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i4$3.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }] });
2599
2772
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChipsComponent, decorators: [{
2600
2773
  type: Component,
2601
2774
  args: [{ selector: 'spa-chips', template: "\r\n\r\n\r\n<div class=\"row mt-1\" style=\"margin-left: 1em;\">\r\n <mat-chip-list #chipList>\r\n <mat-chip *ngFor=\"let chip of chips let i = index\" selectable [removable]=\"removable\" style=\"font-size: 12px;\" [ngStyle]=\"{'padding-right': removable ? '5px':'12px'}\" (click)=\"clicked(chip)\">\r\n <mat-icon *ngIf=\"icon != ''\" color=\"primary\" style=\"font-size: 22px;\">{{icon}}</mat-icon>\r\n\r\n {{chip}}\r\n\r\n <mat-icon *ngIf=\"removable\" style=\"font-size: 20px; margin-left: 5px;margin-top: 3px;margin-right: 0px; color: grey;\" (click)=\"removed(chip)\">cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n</div>\r\n\r\n\r\n\r\n" }]
@@ -2687,12 +2860,12 @@ class NavMenuComponent {
2687
2860
  }
2688
2861
  }
2689
2862
  }
2690
- NavMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NavMenuComponent, deps: [{ token: i1$3.Router }, { token: AuthService }, { token: StorageService }, { token: i8.SocialAuthService }, { token: i3$3.BreakpointObserver }, { token: DataServiceLib }], target: i0.ɵɵFactoryTarget.Component });
2691
- NavMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NavMenuComponent, selector: "spa-nav-menu", inputs: { appConfig: "appConfig", footer: "footer" }, ngImport: i0, template: "<header *ngIf=\"loggedin && dataService.appConfig.navigation == 'top'\">\r\n\r\n <nav class=\"toolbar navbar navbar-expand-sm navbar-toggleable-sm navbar-light border-bottom box-shadow mb-3 \" style=\"padding-right: 10px;\">\r\n\r\n\r\n <div class=\"container-fluid\" style=\"padding-right: 0px;\">\r\n\r\n <img *ngIf=\"appConfig.logo!=''\" [src]=\"appConfig.logo\" style=\"height: 50px; margin-right: 2em\" />\r\n\r\n <div>\r\n <!-- <div style=\"font-size: 20px;\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant && tenantName\" style=\"font-size: 12px;\">\r\n {{tenantName}}\r\n </div> -->\r\n\r\n <div *ngIf=\"!dataService.appConfig.multitenant\" style=\"font-size: 22px;\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant\" style=\"font-size: 20px; ; font-weight: 400;\" [ngStyle]=\"{'margin-top': dataService.appConfig.multitenant ? '12px' : ''}\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant && tenantName\" style=\"font-size: 12px; margin-bottom: 5px;\">\r\n {{tenantName}}\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\".navbar-collapse\" aria-label=\"Toggle navigation\" [attr.aria-expanded]=\"isExpanded\" (click)=\"toggle()\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n\r\n <div *ngIf=\"myRole\" class=\" navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse stack-top\" style=\"margin-right: 0px;\" [ngClass]=\"{ show: isExpanded, navitems: isExpanded }\" >\r\n\r\n <button mat-icon-button (click)=\"logoff()\" > <mat-icon>logout</mat-icon> </button>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant\">\r\n\r\n <button mat-icon-button (click)=\"redirectTo('home/admin/tenant-settings')\" > <mat-icon fontSet=\"material-icons-round\">apartment</mat-icon> </button>\r\n\r\n <button mat-icon-button (click)=\"redirectTo('home/admin/bug')\"> <mat-icon >support_agent</mat-icon> </button>\r\n\r\n <!-- <button mat-icon-button (click)=\"redirectTo('home/admin/tenants')\"> <mat-icon fontSet=\"material-icons-round\">apartment</mat-icon> </button> -->\r\n </div>\r\n\r\n\r\n <button id=\"btnUser\" mat-button [matMenuTriggerFor]=\"profileMenu\" ><mat-icon style=\"font-size: 24px;\">account_circle</mat-icon> &nbsp;{{loggedUserFullName}}</button>\r\n\r\n <mat-menu #profileMenu=\"matMenu\">\r\n <button id=\"btnProfile\" mat-menu-item (click)=\"redirectTo('home/user/profile')\" >Profile</button>\r\n <button id=\"btnLogOff\" mat-menu-item (click)=\"logoff()\">Log Off</button>\r\n </mat-menu>\r\n\r\n <div *ngFor=\"let item of appConfig.capItems\">\r\n\r\n <!-- Menu Item -->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && !item.capSubItems && item.showMenu\" mat-button (click)=\"redirectTo(item.link)\">{{item.display}}</button>\r\n\r\n <!-- Menu Item with Sub items ignored -->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && item.capSubItems && item.showMenu && item.ignoreSubsDisplay\" mat-button (click)=\"redirectTo(item.link)\">{{item.display}}</button>\r\n\r\n <!-- Menu Item with Sub items to display-->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && item.capSubItems && item.showMenu && !item.ignoreSubsDisplay\" mat-button [matMenuTriggerFor]=\"adminMenu\">{{item.display}}</button>\r\n\r\n\r\n <!-- Sub Menu Items -->\r\n <mat-menu #adminMenu=\"matMenu\">\r\n\r\n <div *ngFor=\"let subItem of item.capSubItems\">\r\n\r\n <button *ngIf=\"myRole[subItem.name] && subItem.showMenu\" mat-menu-item (click)=\"redirectTo(subItem.link)\">{{subItem.display}}</button>\r\n\r\n </div>\r\n\r\n </mat-menu>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </nav>\r\n\r\n</header>\r\n\r\n<div class=\"container-fluid tin-bg-image\" *ngIf=\"dataService.appConfig.navigation == 'top'\">\r\n <router-outlet></router-outlet>\r\n <spa-loader [logo]=\"this.dataService.appConfig.logo\"></spa-loader>\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!-- SIDE -->\r\n<mat-toolbar class=\"tin-bg-image-toolbar\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\" style=\"padding: 0px 8px;\">\r\n\r\n <button mat-icon-button (click)=\"toggle()\" matTooltip=\"Menu\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n\r\n <img [src]=\"dataService.appConfig.logo\" style=\"height: 50px;\" />\r\n\r\n <div style=\"padding-left: 10px; \">\r\n\r\n <div style=\"font-size: 20px; height: 25px; font-weight: 400;\" [ngStyle]=\"{'margin-top': dataService.appConfig.multitenant ? '12px' : ''}\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant && tenantName\" style=\"font-size: 12px; margin-bottom: 5px;\">\r\n {{tenantName}}\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <span class=\"toolbar-item-spacer\"></span>\r\n\r\n <!-- buttons -->\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant\">\r\n\r\n <button mat-icon-button (click)=\"redirectTo('home/admin/tenant-settings')\" > <mat-icon fontSet=\"material-icons-round\">apartment</mat-icon> </button>\r\n\r\n <button *ngIf=\"!smallScreen\" mat-icon-button (click)=\"redirectTo('home/admin/bug')\"> <mat-icon >help</mat-icon> </button>\r\n\r\n </div>\r\n\r\n <button *ngIf=\"!smallScreen\" mat-icon-button matTooltip=\"Notifications\"><mat-icon>notifications</mat-icon></button>\r\n\r\n <button mat-icon-button matTooltip=\"My Account\" [matMenuTriggerFor]=\"userAccountMenu\"><mat-icon>account_circle</mat-icon></button>\r\n\r\n <button *ngIf=\"!smallScreen\" mat-icon-button (click)=\"logoff()\"> <mat-icon>logout</mat-icon></button>\r\n\r\n\r\n <!-- my account menu -->\r\n <mat-menu #userAccountMenu [overlapTrigger]=\"false\" yPosition=\"below\">\r\n\r\n <button mat-menu-item routerLink=\"home/user/profile\">\r\n <mat-icon>person</mat-icon><span>Profile</span>\r\n </button>\r\n\r\n <button mat-menu-item routerLink=\"home/admin/bug\" *ngIf=\"dataService.appConfig.multitenant && smallScreen\">\r\n <mat-icon>help</mat-icon> <span>Help</span>\r\n </button>\r\n\r\n <mat-divider></mat-divider>\r\n\r\n <button mat-menu-item (click)=\"logoff()\">\r\n <mat-icon>logout</mat-icon>Logout\r\n </button>\r\n\r\n </mat-menu>\r\n\r\n</mat-toolbar>\r\n\r\n\r\n\r\n\r\n<mat-sidenav-container class=\"app-container\" [hasBackdrop]=\"smallScreen\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\">\r\n\r\n <mat-sidenav #sidenav [mode]=\"smallScreen ? 'over' : 'over'\" [class.mat-elevation-z4]=\"true\" [opened]=\"isExpanded\" class=\"app-sidenav side-color\" style=\"height: 100%;\">\r\n <mat-nav-list >\r\n\r\n <ng-container *ngFor=\"let cap of dataService.appConfig.capItems\" >\r\n\r\n <!-- Menu item -->\r\n <mat-list-item [routerLink]=\"cap.link\" *ngIf=\"myRole[cap.name] && cap.showMenu && (!cap.capSubItems || cap.capSubItems && cap.ignoreSubsDisplay)\" style=\"height: 40px;font-size: 15px;\" (click)=\"toggle()\">\r\n <mat-icon style=\"margin-right: 5px;\">{{cap.icon}}</mat-icon>{{cap.display}}\r\n </mat-list-item>\r\n\r\n <!-- Menu With Sub items -->\r\n <mat-expansion-panel class=\"side-color\" [class.mat-elevation-z0]=\"true\" *ngIf=\"myRole[cap.name] && cap.showMenu && cap.capSubItems && !cap.ignoreSubsDisplay\">\r\n\r\n <mat-expansion-panel-header style=\"height: 40px;padding-left: 15px;\">\r\n <mat-icon style=\"margin-right: 5px;\">{{cap.icon != 'navigate_next' ? cap.icon : 'fiber_manual_record' }}</mat-icon>{{cap.display}}\r\n </mat-expansion-panel-header>\r\n\r\n <!-- Sub items -->\r\n <mat-nav-list *ngFor=\"let capSub of cap.capSubItems\">\r\n\r\n <mat-list-item [routerLink]=\"capSub.link\" style=\"height: 30px; font-size: 15px;\" (click)=\"toggle()\" *ngIf=\"myRole[cap.name] && cap.showMenu\">\r\n <mat-icon style=\"margin-right: 5px;\">{{capSub.icon}}</mat-icon>{{capSub.display}}\r\n </mat-list-item>\r\n\r\n </mat-nav-list>\r\n\r\n </mat-expansion-panel>\r\n\r\n </ng-container>\r\n\r\n </mat-nav-list>\r\n </mat-sidenav>\r\n\r\n\r\n\r\n <mat-sidenav-content class=\"container-fluid tin-bg-image\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\">\r\n <hr style=\"margin-top: 0px;\">\r\n <router-outlet></router-outlet>\r\n <spa-loader [logo]=\"this.dataService.appConfig.logo\"></spa-loader>\r\n </mat-sidenav-content>\r\n\r\n</mat-sidenav-container>\r\n\r\n\r\n<!-- footer -->\r\n<div class=\"tin-center\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\">\r\n <label style=\"text-align: center; font-size: 12px;\">&copy; {{nowDate | date : 'yyyy'}} {{footer}}</label>\r\n</div>\r\n\r\n\r\n<div class=\"container-fluid tin-bg-image\" *ngIf=\"!loggedin && dataService.appConfig.navigation == 'side'\">\r\n <router-outlet></router-outlet>\r\n <spa-loader [logo]=\"this.dataService.appConfig.logo\"></spa-loader>\r\n</div>\r\n", styles: ["a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}html{font-size:14px}.box-shadow{box-shadow:0 .25rem .75rem #0000000d}.toolbar{height:60px;display:flex;align-items:center;background-color:#03a;color:#fff}.stack-top{z-index:9;margin:20px}.navitems{background-color:#03a}.toolbar-item-spacer{flex:1 1 auto}.app-container{height:90%;margin:0}.app-sidenav{width:200px}.side-color{background-color:#def0fc}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i8$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { kind: "component", type: i11.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { kind: "component", type: i12.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i14.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i14.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i14.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "component", type: i15$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i1$3.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1$3.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i16.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i16.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "component", type: LoaderComponent, selector: "spa-loader", inputs: ["logo"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
2863
+ NavMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NavMenuComponent, deps: [{ token: i1$3.Router }, { token: AuthService }, { token: StorageService }, { token: i8.SocialAuthService }, { token: i3$1.BreakpointObserver }, { token: DataServiceLib }], target: i0.ɵɵFactoryTarget.Component });
2864
+ NavMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NavMenuComponent, selector: "spa-nav-menu", inputs: { appConfig: "appConfig", footer: "footer" }, ngImport: i0, template: "<header *ngIf=\"loggedin && dataService.appConfig.navigation == 'top'\">\r\n\r\n <nav class=\"toolbar navbar navbar-expand-sm navbar-toggleable-sm navbar-light border-bottom box-shadow mb-3 \" style=\"padding-right: 10px;\">\r\n\r\n\r\n <div class=\"container-fluid\" style=\"padding-right: 0px;\">\r\n\r\n <img *ngIf=\"appConfig.logo!=''\" [src]=\"appConfig.logo\" style=\"height: 50px; margin-right: 2em\" />\r\n\r\n <div>\r\n <!-- <div style=\"font-size: 20px;\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant && tenantName\" style=\"font-size: 12px;\">\r\n {{tenantName}}\r\n </div> -->\r\n\r\n <div *ngIf=\"!dataService.appConfig.multitenant\" style=\"font-size: 22px;\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant\" style=\"font-size: 20px; ; font-weight: 400;\" [ngStyle]=\"{'margin-top': dataService.appConfig.multitenant ? '12px' : ''}\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant && tenantName\" style=\"font-size: 12px; margin-bottom: 5px;\">\r\n {{tenantName}}\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\".navbar-collapse\" aria-label=\"Toggle navigation\" [attr.aria-expanded]=\"isExpanded\" (click)=\"toggle()\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n\r\n <div *ngIf=\"myRole\" class=\" navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse stack-top\" style=\"margin-right: 0px;\" [ngClass]=\"{ show: isExpanded, navitems: isExpanded }\" >\r\n\r\n <button mat-icon-button (click)=\"logoff()\" > <mat-icon>logout</mat-icon> </button>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant\">\r\n\r\n <button mat-icon-button (click)=\"redirectTo('home/admin/tenant-settings')\" > <mat-icon fontSet=\"material-icons-round\">apartment</mat-icon> </button>\r\n\r\n <button mat-icon-button (click)=\"redirectTo('home/admin/bug')\"> <mat-icon >support_agent</mat-icon> </button>\r\n\r\n <!-- <button mat-icon-button (click)=\"redirectTo('home/admin/tenants')\"> <mat-icon fontSet=\"material-icons-round\">apartment</mat-icon> </button> -->\r\n </div>\r\n\r\n\r\n <button id=\"btnUser\" mat-button [matMenuTriggerFor]=\"profileMenu\" ><mat-icon style=\"font-size: 24px;\">account_circle</mat-icon> &nbsp;{{loggedUserFullName}}</button>\r\n\r\n <mat-menu #profileMenu=\"matMenu\">\r\n <button id=\"btnProfile\" mat-menu-item (click)=\"redirectTo('home/user/profile')\" >Profile</button>\r\n <button id=\"btnLogOff\" mat-menu-item (click)=\"logoff()\">Log Off</button>\r\n </mat-menu>\r\n\r\n <div *ngFor=\"let item of appConfig.capItems\">\r\n\r\n <!-- Menu Item -->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && !item.capSubItems && item.showMenu\" mat-button (click)=\"redirectTo(item.link)\">{{item.display}}</button>\r\n\r\n <!-- Menu Item with Sub items ignored -->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && item.capSubItems && item.showMenu && item.ignoreSubsDisplay\" mat-button (click)=\"redirectTo(item.link)\">{{item.display}}</button>\r\n\r\n <!-- Menu Item with Sub items to display-->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && item.capSubItems && item.showMenu && !item.ignoreSubsDisplay\" mat-button [matMenuTriggerFor]=\"adminMenu\">{{item.display}}</button>\r\n\r\n\r\n <!-- Sub Menu Items -->\r\n <mat-menu #adminMenu=\"matMenu\">\r\n\r\n <div *ngFor=\"let subItem of item.capSubItems\">\r\n\r\n <button *ngIf=\"myRole[subItem.name] && subItem.showMenu\" mat-menu-item (click)=\"redirectTo(subItem.link)\">{{subItem.display}}</button>\r\n\r\n </div>\r\n\r\n </mat-menu>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </nav>\r\n\r\n</header>\r\n\r\n<div class=\"container-fluid tin-bg-image\" *ngIf=\"dataService.appConfig.navigation == 'top'\">\r\n <router-outlet></router-outlet>\r\n <spa-loader [logo]=\"this.dataService.appConfig.logo\"></spa-loader>\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!-- SIDE -->\r\n<mat-toolbar class=\"tin-bg-image-toolbar\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\" style=\"padding: 0px 8px;\">\r\n\r\n <button mat-icon-button (click)=\"toggle()\" matTooltip=\"Menu\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n\r\n <img [src]=\"dataService.appConfig.logo\" style=\"height: 50px;\" />\r\n\r\n <div style=\"padding-left: 10px; \">\r\n\r\n <div style=\"font-size: 20px; height: 25px; font-weight: 400;\" [ngStyle]=\"{'margin-top': dataService.appConfig.multitenant ? '12px' : ''}\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant && tenantName\" style=\"font-size: 12px; margin-bottom: 5px;\">\r\n {{tenantName}}\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <span class=\"toolbar-item-spacer\"></span>\r\n\r\n <!-- buttons -->\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant\">\r\n\r\n <button mat-icon-button (click)=\"redirectTo('home/admin/tenant-settings')\" > <mat-icon fontSet=\"material-icons-round\">apartment</mat-icon> </button>\r\n\r\n <button *ngIf=\"!smallScreen\" mat-icon-button (click)=\"redirectTo('home/admin/bug')\"> <mat-icon >help</mat-icon> </button>\r\n\r\n </div>\r\n\r\n <button *ngIf=\"!smallScreen\" mat-icon-button matTooltip=\"Notifications\"><mat-icon>notifications</mat-icon></button>\r\n\r\n <button mat-icon-button matTooltip=\"My Account\" [matMenuTriggerFor]=\"userAccountMenu\"><mat-icon>account_circle</mat-icon></button>\r\n\r\n <button *ngIf=\"!smallScreen\" mat-icon-button (click)=\"logoff()\"> <mat-icon>logout</mat-icon></button>\r\n\r\n\r\n <!-- my account menu -->\r\n <mat-menu #userAccountMenu [overlapTrigger]=\"false\" yPosition=\"below\">\r\n\r\n <button mat-menu-item routerLink=\"home/user/profile\">\r\n <mat-icon>person</mat-icon><span>Profile</span>\r\n </button>\r\n\r\n <button mat-menu-item routerLink=\"home/admin/bug\" *ngIf=\"dataService.appConfig.multitenant && smallScreen\">\r\n <mat-icon>help</mat-icon> <span>Help</span>\r\n </button>\r\n\r\n <mat-divider></mat-divider>\r\n\r\n <button mat-menu-item (click)=\"logoff()\">\r\n <mat-icon>logout</mat-icon>Logout\r\n </button>\r\n\r\n </mat-menu>\r\n\r\n</mat-toolbar>\r\n\r\n\r\n\r\n\r\n<mat-sidenav-container class=\"app-container\" [hasBackdrop]=\"smallScreen\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\">\r\n\r\n <mat-sidenav #sidenav [mode]=\"smallScreen ? 'over' : 'over'\" [class.mat-elevation-z4]=\"true\" [opened]=\"isExpanded\" class=\"app-sidenav side-color\" style=\"height: 100%;\">\r\n <mat-nav-list >\r\n\r\n <ng-container *ngFor=\"let cap of dataService.appConfig.capItems\" >\r\n\r\n <!-- Menu item -->\r\n <mat-list-item [routerLink]=\"cap.link\" *ngIf=\"myRole[cap.name] && cap.showMenu && (!cap.capSubItems || cap.capSubItems && cap.ignoreSubsDisplay)\" style=\"height: 40px;font-size: 15px;\" (click)=\"toggle()\">\r\n <mat-icon style=\"margin-right: 5px;\">{{cap.icon}}</mat-icon>{{cap.display}}\r\n </mat-list-item>\r\n\r\n <!-- Menu With Sub items -->\r\n <mat-expansion-panel class=\"side-color\" [class.mat-elevation-z0]=\"true\" *ngIf=\"myRole[cap.name] && cap.showMenu && cap.capSubItems && !cap.ignoreSubsDisplay\">\r\n\r\n <mat-expansion-panel-header style=\"height: 40px;padding-left: 15px;\">\r\n <mat-icon style=\"margin-right: 5px;\">{{cap.icon != 'navigate_next' ? cap.icon : 'fiber_manual_record' }}</mat-icon>{{cap.display}}\r\n </mat-expansion-panel-header>\r\n\r\n <!-- Sub items -->\r\n <mat-nav-list *ngFor=\"let capSub of cap.capSubItems\">\r\n\r\n <mat-list-item [routerLink]=\"capSub.link\" style=\"height: 30px; font-size: 15px;\" (click)=\"toggle()\" *ngIf=\"myRole[cap.name] && cap.showMenu\">\r\n <mat-icon style=\"margin-right: 5px;\">{{capSub.icon}}</mat-icon>{{capSub.display}}\r\n </mat-list-item>\r\n\r\n </mat-nav-list>\r\n\r\n </mat-expansion-panel>\r\n\r\n </ng-container>\r\n\r\n </mat-nav-list>\r\n </mat-sidenav>\r\n\r\n\r\n\r\n <mat-sidenav-content class=\"container-fluid tin-bg-image\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\">\r\n <hr style=\"margin-top: 0px;\">\r\n <router-outlet></router-outlet>\r\n <spa-loader [logo]=\"this.dataService.appConfig.logo\"></spa-loader>\r\n </mat-sidenav-content>\r\n\r\n</mat-sidenav-container>\r\n\r\n\r\n<!-- footer -->\r\n<div class=\"tin-center\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\">\r\n <label style=\"text-align: center; font-size: 12px;\">&copy; {{nowDate | date : 'yyyy'}} {{footer}}</label>\r\n</div>\r\n\r\n\r\n<div class=\"container-fluid tin-bg-image\" *ngIf=\"!loggedin && dataService.appConfig.navigation == 'side'\">\r\n <router-outlet></router-outlet>\r\n <spa-loader [logo]=\"this.dataService.appConfig.logo\"></spa-loader>\r\n</div>\r\n", styles: ["a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}html{font-size:14px}.box-shadow{box-shadow:0 .25rem .75rem #0000000d}.toolbar{height:60px;display:flex;align-items:center;background-color:#03a;color:#fff}.stack-top{z-index:9;margin:20px}.navitems{background-color:#03a}.toolbar-item-spacer{flex:1 1 auto}.app-container{height:90%;margin:0}.app-sidenav{width:200px}.side-color{background-color:#def0fc}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i8$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { kind: "component", type: i11.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { kind: "component", type: i12.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i14.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i14.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i14.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "component", type: i15$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i1$3.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1$3.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i16.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i16.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "component", type: LoaderComponent, selector: "spa-loader", inputs: ["logo"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
2692
2865
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NavMenuComponent, decorators: [{
2693
2866
  type: Component,
2694
2867
  args: [{ selector: 'spa-nav-menu', template: "<header *ngIf=\"loggedin && dataService.appConfig.navigation == 'top'\">\r\n\r\n <nav class=\"toolbar navbar navbar-expand-sm navbar-toggleable-sm navbar-light border-bottom box-shadow mb-3 \" style=\"padding-right: 10px;\">\r\n\r\n\r\n <div class=\"container-fluid\" style=\"padding-right: 0px;\">\r\n\r\n <img *ngIf=\"appConfig.logo!=''\" [src]=\"appConfig.logo\" style=\"height: 50px; margin-right: 2em\" />\r\n\r\n <div>\r\n <!-- <div style=\"font-size: 20px;\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant && tenantName\" style=\"font-size: 12px;\">\r\n {{tenantName}}\r\n </div> -->\r\n\r\n <div *ngIf=\"!dataService.appConfig.multitenant\" style=\"font-size: 22px;\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant\" style=\"font-size: 20px; ; font-weight: 400;\" [ngStyle]=\"{'margin-top': dataService.appConfig.multitenant ? '12px' : ''}\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant && tenantName\" style=\"font-size: 12px; margin-bottom: 5px;\">\r\n {{tenantName}}\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\".navbar-collapse\" aria-label=\"Toggle navigation\" [attr.aria-expanded]=\"isExpanded\" (click)=\"toggle()\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n\r\n <div *ngIf=\"myRole\" class=\" navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse stack-top\" style=\"margin-right: 0px;\" [ngClass]=\"{ show: isExpanded, navitems: isExpanded }\" >\r\n\r\n <button mat-icon-button (click)=\"logoff()\" > <mat-icon>logout</mat-icon> </button>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant\">\r\n\r\n <button mat-icon-button (click)=\"redirectTo('home/admin/tenant-settings')\" > <mat-icon fontSet=\"material-icons-round\">apartment</mat-icon> </button>\r\n\r\n <button mat-icon-button (click)=\"redirectTo('home/admin/bug')\"> <mat-icon >support_agent</mat-icon> </button>\r\n\r\n <!-- <button mat-icon-button (click)=\"redirectTo('home/admin/tenants')\"> <mat-icon fontSet=\"material-icons-round\">apartment</mat-icon> </button> -->\r\n </div>\r\n\r\n\r\n <button id=\"btnUser\" mat-button [matMenuTriggerFor]=\"profileMenu\" ><mat-icon style=\"font-size: 24px;\">account_circle</mat-icon> &nbsp;{{loggedUserFullName}}</button>\r\n\r\n <mat-menu #profileMenu=\"matMenu\">\r\n <button id=\"btnProfile\" mat-menu-item (click)=\"redirectTo('home/user/profile')\" >Profile</button>\r\n <button id=\"btnLogOff\" mat-menu-item (click)=\"logoff()\">Log Off</button>\r\n </mat-menu>\r\n\r\n <div *ngFor=\"let item of appConfig.capItems\">\r\n\r\n <!-- Menu Item -->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && !item.capSubItems && item.showMenu\" mat-button (click)=\"redirectTo(item.link)\">{{item.display}}</button>\r\n\r\n <!-- Menu Item with Sub items ignored -->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && item.capSubItems && item.showMenu && item.ignoreSubsDisplay\" mat-button (click)=\"redirectTo(item.link)\">{{item.display}}</button>\r\n\r\n <!-- Menu Item with Sub items to display-->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && item.capSubItems && item.showMenu && !item.ignoreSubsDisplay\" mat-button [matMenuTriggerFor]=\"adminMenu\">{{item.display}}</button>\r\n\r\n\r\n <!-- Sub Menu Items -->\r\n <mat-menu #adminMenu=\"matMenu\">\r\n\r\n <div *ngFor=\"let subItem of item.capSubItems\">\r\n\r\n <button *ngIf=\"myRole[subItem.name] && subItem.showMenu\" mat-menu-item (click)=\"redirectTo(subItem.link)\">{{subItem.display}}</button>\r\n\r\n </div>\r\n\r\n </mat-menu>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </nav>\r\n\r\n</header>\r\n\r\n<div class=\"container-fluid tin-bg-image\" *ngIf=\"dataService.appConfig.navigation == 'top'\">\r\n <router-outlet></router-outlet>\r\n <spa-loader [logo]=\"this.dataService.appConfig.logo\"></spa-loader>\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!-- SIDE -->\r\n<mat-toolbar class=\"tin-bg-image-toolbar\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\" style=\"padding: 0px 8px;\">\r\n\r\n <button mat-icon-button (click)=\"toggle()\" matTooltip=\"Menu\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n\r\n <img [src]=\"dataService.appConfig.logo\" style=\"height: 50px;\" />\r\n\r\n <div style=\"padding-left: 10px; \">\r\n\r\n <div style=\"font-size: 20px; height: 25px; font-weight: 400;\" [ngStyle]=\"{'margin-top': dataService.appConfig.multitenant ? '12px' : ''}\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant && tenantName\" style=\"font-size: 12px; margin-bottom: 5px;\">\r\n {{tenantName}}\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <span class=\"toolbar-item-spacer\"></span>\r\n\r\n <!-- buttons -->\r\n\r\n <div *ngIf=\"dataService.appConfig.multitenant\">\r\n\r\n <button mat-icon-button (click)=\"redirectTo('home/admin/tenant-settings')\" > <mat-icon fontSet=\"material-icons-round\">apartment</mat-icon> </button>\r\n\r\n <button *ngIf=\"!smallScreen\" mat-icon-button (click)=\"redirectTo('home/admin/bug')\"> <mat-icon >help</mat-icon> </button>\r\n\r\n </div>\r\n\r\n <button *ngIf=\"!smallScreen\" mat-icon-button matTooltip=\"Notifications\"><mat-icon>notifications</mat-icon></button>\r\n\r\n <button mat-icon-button matTooltip=\"My Account\" [matMenuTriggerFor]=\"userAccountMenu\"><mat-icon>account_circle</mat-icon></button>\r\n\r\n <button *ngIf=\"!smallScreen\" mat-icon-button (click)=\"logoff()\"> <mat-icon>logout</mat-icon></button>\r\n\r\n\r\n <!-- my account menu -->\r\n <mat-menu #userAccountMenu [overlapTrigger]=\"false\" yPosition=\"below\">\r\n\r\n <button mat-menu-item routerLink=\"home/user/profile\">\r\n <mat-icon>person</mat-icon><span>Profile</span>\r\n </button>\r\n\r\n <button mat-menu-item routerLink=\"home/admin/bug\" *ngIf=\"dataService.appConfig.multitenant && smallScreen\">\r\n <mat-icon>help</mat-icon> <span>Help</span>\r\n </button>\r\n\r\n <mat-divider></mat-divider>\r\n\r\n <button mat-menu-item (click)=\"logoff()\">\r\n <mat-icon>logout</mat-icon>Logout\r\n </button>\r\n\r\n </mat-menu>\r\n\r\n</mat-toolbar>\r\n\r\n\r\n\r\n\r\n<mat-sidenav-container class=\"app-container\" [hasBackdrop]=\"smallScreen\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\">\r\n\r\n <mat-sidenav #sidenav [mode]=\"smallScreen ? 'over' : 'over'\" [class.mat-elevation-z4]=\"true\" [opened]=\"isExpanded\" class=\"app-sidenav side-color\" style=\"height: 100%;\">\r\n <mat-nav-list >\r\n\r\n <ng-container *ngFor=\"let cap of dataService.appConfig.capItems\" >\r\n\r\n <!-- Menu item -->\r\n <mat-list-item [routerLink]=\"cap.link\" *ngIf=\"myRole[cap.name] && cap.showMenu && (!cap.capSubItems || cap.capSubItems && cap.ignoreSubsDisplay)\" style=\"height: 40px;font-size: 15px;\" (click)=\"toggle()\">\r\n <mat-icon style=\"margin-right: 5px;\">{{cap.icon}}</mat-icon>{{cap.display}}\r\n </mat-list-item>\r\n\r\n <!-- Menu With Sub items -->\r\n <mat-expansion-panel class=\"side-color\" [class.mat-elevation-z0]=\"true\" *ngIf=\"myRole[cap.name] && cap.showMenu && cap.capSubItems && !cap.ignoreSubsDisplay\">\r\n\r\n <mat-expansion-panel-header style=\"height: 40px;padding-left: 15px;\">\r\n <mat-icon style=\"margin-right: 5px;\">{{cap.icon != 'navigate_next' ? cap.icon : 'fiber_manual_record' }}</mat-icon>{{cap.display}}\r\n </mat-expansion-panel-header>\r\n\r\n <!-- Sub items -->\r\n <mat-nav-list *ngFor=\"let capSub of cap.capSubItems\">\r\n\r\n <mat-list-item [routerLink]=\"capSub.link\" style=\"height: 30px; font-size: 15px;\" (click)=\"toggle()\" *ngIf=\"myRole[cap.name] && cap.showMenu\">\r\n <mat-icon style=\"margin-right: 5px;\">{{capSub.icon}}</mat-icon>{{capSub.display}}\r\n </mat-list-item>\r\n\r\n </mat-nav-list>\r\n\r\n </mat-expansion-panel>\r\n\r\n </ng-container>\r\n\r\n </mat-nav-list>\r\n </mat-sidenav>\r\n\r\n\r\n\r\n <mat-sidenav-content class=\"container-fluid tin-bg-image\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\">\r\n <hr style=\"margin-top: 0px;\">\r\n <router-outlet></router-outlet>\r\n <spa-loader [logo]=\"this.dataService.appConfig.logo\"></spa-loader>\r\n </mat-sidenav-content>\r\n\r\n</mat-sidenav-container>\r\n\r\n\r\n<!-- footer -->\r\n<div class=\"tin-center\" *ngIf=\"loggedin && dataService.appConfig.navigation == 'side'\">\r\n <label style=\"text-align: center; font-size: 12px;\">&copy; {{nowDate | date : 'yyyy'}} {{footer}}</label>\r\n</div>\r\n\r\n\r\n<div class=\"container-fluid tin-bg-image\" *ngIf=\"!loggedin && dataService.appConfig.navigation == 'side'\">\r\n <router-outlet></router-outlet>\r\n <spa-loader [logo]=\"this.dataService.appConfig.logo\"></spa-loader>\r\n</div>\r\n", styles: ["a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}html{font-size:14px}.box-shadow{box-shadow:0 .25rem .75rem #0000000d}.toolbar{height:60px;display:flex;align-items:center;background-color:#03a;color:#fff}.stack-top{z-index:9;margin:20px}.navitems{background-color:#03a}.toolbar-item-spacer{flex:1 1 auto}.app-container{height:90%;margin:0}.app-sidenav{width:200px}.side-color{background-color:#def0fc}\n"] }]
2695
- }], ctorParameters: function () { return [{ type: i1$3.Router }, { type: AuthService }, { type: StorageService }, { type: i8.SocialAuthService }, { type: i3$3.BreakpointObserver }, { type: DataServiceLib }]; }, propDecorators: { appConfig: [{
2868
+ }], ctorParameters: function () { return [{ type: i1$3.Router }, { type: AuthService }, { type: StorageService }, { type: i8.SocialAuthService }, { type: i3$1.BreakpointObserver }, { type: DataServiceLib }]; }, propDecorators: { appConfig: [{
2696
2869
  type: Input
2697
2870
  }], footer: [{
2698
2871
  type: Input
@@ -2798,6 +2971,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2798
2971
  }]
2799
2972
  }] });
2800
2973
 
2974
+ class ButtonService {
2975
+ getButton(buttons, name) {
2976
+ return buttons?.find(x => x.name === name) || null;
2977
+ }
2978
+ getButtonProperties(button, row, config) {
2979
+ return {
2980
+ color: this.getButtonColor(button, row),
2981
+ icon: this.getIcon(button, config),
2982
+ disabled: this.testDisabled(button, row),
2983
+ visible: this.testVisible(button, row),
2984
+ tip: button.tip || button.name
2985
+ };
2986
+ }
2987
+ getButtonColor(button, row) {
2988
+ if (this.isButtonDisabled(button, row))
2989
+ return 'lightgray';
2990
+ if (button.icon?.color)
2991
+ return button.icon.color;
2992
+ const colorMap = {
2993
+ 'delete': '#F44336',
2994
+ 'create': 'green'
2995
+ };
2996
+ return colorMap[button.name] || '#4050B5';
2997
+ }
2998
+ isButtonDisabled(button, row) {
2999
+ return button?.disabled ? button.disabled(row) : false;
3000
+ }
3001
+ isButtonVisible(button, row, isLoadComplete) {
3002
+ if (!isLoadComplete)
3003
+ return false;
3004
+ return button?.visible ? button.visible(row) : true;
3005
+ }
3006
+ getTitleAction(mode, buttons) {
3007
+ const modeMap = {
3008
+ 'view': 'View',
3009
+ 'edit': buttons.find(b => b.name === 'edit')?.display || 'Edit',
3010
+ 'create': buttons.find(b => b.name === 'create')?.display || 'Create'
3011
+ };
3012
+ return modeMap[mode] || '';
3013
+ }
3014
+ isTabVisible(tableConfig) {
3015
+ return tableConfig.hideTabCondition ? !tableConfig.hideTabCondition(tableConfig.parentData) : true;
3016
+ }
3017
+ getIcon(button, config) {
3018
+ if (button.icon) {
3019
+ return button.icon.name;
3020
+ }
3021
+ return this.getDefaultIcon(button.name, config.flatButtons);
3022
+ }
3023
+ testDisabled(button, row) {
3024
+ return button.disabled ? button.disabled(row) : false;
3025
+ }
3026
+ testVisible(button, row) {
3027
+ return button.visible ? button.visible(row) : true;
3028
+ }
3029
+ getDefaultColor(buttonName) {
3030
+ switch (buttonName) {
3031
+ case 'delete': return '#F44336';
3032
+ case 'create': return 'green';
3033
+ default: return '#4050B5';
3034
+ }
3035
+ }
3036
+ getDefaultIcon(buttonName, flatButtons) {
3037
+ switch (buttonName) {
3038
+ case 'view':
3039
+ return flatButtons ? 'open_in_new' : 'pageview';
3040
+ case 'edit': return 'edit';
3041
+ case 'delete': return 'delete';
3042
+ case 'create': return 'add';
3043
+ default: return 'more_horiz';
3044
+ }
3045
+ }
3046
+ getCreateButton(buttons) {
3047
+ return buttons?.find(button => button?.name === 'create');
3048
+ }
3049
+ getDisplayedButtons(buttons, isSmallScreen, minButtons) {
3050
+ const nonCreateButtons = buttons?.filter(x => x.name !== 'create');
3051
+ if (isSmallScreen) {
3052
+ if (minButtons) {
3053
+ return nonCreateButtons.filter(x => minButtons.includes(x.name));
3054
+ }
3055
+ return nonCreateButtons.slice(0, 1);
3056
+ }
3057
+ return nonCreateButtons;
3058
+ }
3059
+ getActionsWidth(buttons) {
3060
+ return `${buttons.length * 40 + 20}px`;
3061
+ }
3062
+ }
3063
+ ButtonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3064
+ ButtonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonService, providedIn: 'root' });
3065
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonService, decorators: [{
3066
+ type: Injectable,
3067
+ args: [{
3068
+ providedIn: 'root'
3069
+ }]
3070
+ }] });
3071
+
2801
3072
  class NumberComponent {
2802
3073
  constructor() {
2803
3074
  // options: FormGroup;
@@ -2861,7 +3132,7 @@ class NumberComponent {
2861
3132
  }
2862
3133
  }
2863
3134
  NumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2864
- NumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NumberComponent, selector: "spa-number", inputs: { readonly: "readonly", hint: "hint", display: "display", placeholder: "placeholder", value: "value", width: "width", required: "required", min: "min", max: "max", step: "step" }, outputs: { valueChange: "valueChange", leave: "leave", enterPress: "enterPress" }, ngImport: i0, template: "<!-- <mat-form-field style=\"width:300px\">\n <mat-label>Nostro Balance</mat-label>\n <input matInput autocomplete=\"off\" type=\"number\" min=\"0.00\" step=\"0.01\" [(ngModel)]=\"bid.balance\" placeholder=\"Nostro Balance\" />\n</mat-form-field> -->\n\n\n<mat-form-field hideRequiredMarker=\"true\" [hintLabel]=\"hint\" [hideRequiredMarker]=\"!required\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\">\n <mat-label>{{display}}</mat-label>\n <input matInput autocomplete=\"off\" type=\"number\" [min]=\"min\" [max]=\"max\" [step]=\"step\" [(ngModel)]=\"value\" (change)=\"changed()\" (blur)=\"leaved()\" (keyup.enter)=\"enterPressed()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\" />\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\n</mat-form-field>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] });
3135
+ NumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NumberComponent, selector: "spa-number", inputs: { readonly: "readonly", hint: "hint", display: "display", placeholder: "placeholder", value: "value", width: "width", required: "required", min: "min", max: "max", step: "step" }, outputs: { valueChange: "valueChange", leave: "leave", enterPress: "enterPress" }, ngImport: i0, template: "<!-- <mat-form-field style=\"width:300px\">\n <mat-label>Nostro Balance</mat-label>\n <input matInput autocomplete=\"off\" type=\"number\" min=\"0.00\" step=\"0.01\" [(ngModel)]=\"bid.balance\" placeholder=\"Nostro Balance\" />\n</mat-form-field> -->\n\n\n<mat-form-field hideRequiredMarker=\"true\" [hintLabel]=\"hint\" [hideRequiredMarker]=\"!required\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\">\n <mat-label>{{display}}</mat-label>\n <input matInput autocomplete=\"off\" type=\"number\" [min]=\"min\" [max]=\"max\" [step]=\"step\" [(ngModel)]=\"value\" (change)=\"changed()\" (blur)=\"leaved()\" (keyup.enter)=\"enterPressed()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\" />\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\n</mat-form-field>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] });
2865
3136
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NumberComponent, decorators: [{
2866
3137
  type: Component,
2867
3138
  args: [{ selector: 'spa-number', template: "<!-- <mat-form-field style=\"width:300px\">\n <mat-label>Nostro Balance</mat-label>\n <input matInput autocomplete=\"off\" type=\"number\" min=\"0.00\" step=\"0.01\" [(ngModel)]=\"bid.balance\" placeholder=\"Nostro Balance\" />\n</mat-form-field> -->\n\n\n<mat-form-field hideRequiredMarker=\"true\" [hintLabel]=\"hint\" [hideRequiredMarker]=\"!required\" [ngStyle]=\"{'width':width}\" style=\"margin-right: 5px;\">\n <mat-label>{{display}}</mat-label>\n <input matInput autocomplete=\"off\" type=\"number\" [min]=\"min\" [max]=\"max\" [step]=\"step\" [(ngModel)]=\"value\" (change)=\"changed()\" (blur)=\"leaved()\" (keyup.enter)=\"enterPressed()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\" />\n <mat-error *ngIf=\"control.invalid\">{{validate(control)}}</mat-error>\n</mat-form-field>\n" }]
@@ -3256,16 +3527,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3256
3527
  }] } });
3257
3528
 
3258
3529
  class DetailsDialogInternal {
3259
- constructor(breakpointObserver, loaderService, dataService, messageService, dialogRef, detailsConfig) {
3530
+ constructor(breakpointObserver, loaderService, dataService, messageService, dialogRef, detailsConfig, buttonService, dialogService) {
3260
3531
  this.breakpointObserver = breakpointObserver;
3261
3532
  this.loaderService = loaderService;
3262
3533
  this.dataService = dataService;
3263
3534
  this.messageService = messageService;
3264
3535
  this.dialogRef = dialogRef;
3265
3536
  this.detailsConfig = detailsConfig;
3537
+ this.buttonService = buttonService;
3538
+ this.dialogService = dialogService;
3266
3539
  this.titleAction = "View";
3267
3540
  this.loadByAction = false;
3268
3541
  this.files = [];
3542
+ this.tableReload = new Subject();
3269
3543
  this.smallScreen = false;
3270
3544
  this.isLoadComplete = false;
3271
3545
  this.isProcessing = false;
@@ -3286,12 +3560,11 @@ class DetailsDialogInternal {
3286
3560
  this.tableConfigs = tableConfigs;
3287
3561
  this.formConfig = formConfig;
3288
3562
  this.buttons = buttons;
3289
- // console.log(this.detailsConfig)
3290
3563
  let resp = DetailsDialogProcessor.handleFormMode(this.detailsConfig, this.formConfig);
3291
3564
  if (resp.loadByAction) {
3292
3565
  this.loadByAction = true;
3293
3566
  formConfig.loadAction = resp.action;
3294
- this.loadData(resp.action);
3567
+ this.loadData(resp.action, false);
3295
3568
  }
3296
3569
  else {
3297
3570
  this.details = resp.details;
@@ -3308,7 +3581,7 @@ class DetailsDialogInternal {
3308
3581
  this.deleteButton = deleteButton;
3309
3582
  this.setTitleAction();
3310
3583
  }
3311
- loadData(action) {
3584
+ loadData(action, reload) {
3312
3585
  console.log("loading details");
3313
3586
  if (action && this.loadByAction) {
3314
3587
  console.log("Loading action");
@@ -3318,6 +3591,8 @@ class DetailsDialogInternal {
3318
3591
  this.details = apiResponse.data;
3319
3592
  this.isLoadComplete = true;
3320
3593
  // DetailsDialogProcessor.setHeroValue(this.detailsConfig, this.details);
3594
+ if (reload)
3595
+ this.tableReload.next(true);
3321
3596
  }
3322
3597
  else {
3323
3598
  this.messageService.toast("Error: " + apiResponse.message);
@@ -3333,178 +3608,164 @@ class DetailsDialogInternal {
3333
3608
  this.setTitleAction();
3334
3609
  }
3335
3610
  setTitleAction() {
3336
- if (this.buttons) {
3337
- if (this.formConfig.mode == "view") {
3338
- this.titleAction = "View";
3339
- }
3340
- else if (this.formConfig.mode == "edit") {
3341
- this.titleAction = this.editButton.display ? this.editButton.display : "Edit";
3342
- }
3343
- else if (this.formConfig.mode == "create") {
3344
- this.titleAction = this.createButton.display ? this.createButton.display : "Create";
3345
- }
3346
- }
3611
+ this.titleAction = this.buttonService.getTitleAction(this.formConfig.mode, this.buttons);
3347
3612
  }
3348
3613
  getButton(name) {
3349
- if (!this.buttons) {
3350
- console.log("No buttons found");
3351
- return null;
3352
- }
3353
- return this.buttons.find(x => x.name == name);
3614
+ return this.buttonService.getButton(this.buttons, name);
3354
3615
  }
3355
3616
  testDisabled(row, buttonName) {
3356
- let button = this.getButton(buttonName);
3357
- if (button.disabled) {
3358
- let r = button.disabled(row);
3359
- return r;
3360
- }
3361
- return false;
3617
+ const button = this.getButton(buttonName);
3618
+ return button ? this.buttonService.isButtonDisabled(button, row) : false;
3362
3619
  }
3363
3620
  testVisible(row, buttonName) {
3364
- if (!this.isLoadComplete)
3365
- return false;
3366
- let button = this.getButton(buttonName);
3367
- if (button.visible) {
3368
- return button.visible(row);
3369
- }
3370
- return true;
3621
+ const button = this.getButton(buttonName);
3622
+ return button ? this.buttonService.isButtonVisible(button, row, this.isLoadComplete) : false;
3623
+ }
3624
+ testVisibleTab(tblConfig) {
3625
+ return this.buttonService.isTabVisible(tblConfig);
3371
3626
  }
3372
3627
  getButtonColor(button, row) {
3373
- if (button.disabled) {
3374
- if (button.disabled(row)) {
3375
- return 'lightgray';
3376
- }
3377
- }
3378
- if (button.icon.color) {
3379
- return button.icon.color;
3380
- }
3381
- if (button.name == 'delete') {
3382
- return '#F44336';
3383
- }
3384
- if (button.name == 'create') {
3385
- return 'green';
3386
- }
3387
- return ' #4050B5';
3628
+ return this.buttonService.getButtonColor(button, row);
3388
3629
  }
3389
3630
  create() {
3390
- // console.log(this.details)
3391
- //validation
3392
- let resp = Core.validateObject(this.formConfig.fields, this.details);
3393
- if (resp != '') {
3394
- this.messageService.toast(resp);
3395
- return;
3396
- }
3397
- // File Validation---
3398
- if (this.files.length < 1 && this.fileField?.required) {
3399
- this.messageService.toast("Please attach file(s)");
3631
+ this.handleButtonAction('create');
3632
+ }
3633
+ edit() {
3634
+ this.handleButtonAction('edit');
3635
+ }
3636
+ delete() {
3637
+ this.handleButtonAction('delete');
3638
+ }
3639
+ custom(button) {
3640
+ this.handleButtonAction(button.name);
3641
+ }
3642
+ handleButtonAction(buttonName) {
3643
+ const button = this.getButton(buttonName);
3644
+ if (!button)
3400
3645
  return;
3401
- }
3402
- // File Validation---
3403
- let createButton = this.detailsConfig.buttons.find(x => x.name == "create");
3404
- if (!createButton || !createButton.action) {
3646
+ if (!button.action) {
3405
3647
  this.dialogRef.close({ message: 'emit', data: this.details });
3406
3648
  return;
3407
3649
  }
3408
- //coversion--
3409
- let dataOut;
3410
- if (createButton.action.isFormData) {
3411
- let formData = new FormData();
3412
- for (let i = 0; i < this.files.length; i++) {
3413
- formData.append(`uploadFile${i}`, this.files[i], this.files[i].name);
3414
- }
3415
- formData.append("data", JSON.stringify(this.details));
3416
- // console.log(formData)
3417
- dataOut = formData;
3418
- }
3419
- else {
3420
- dataOut = this.details;
3650
+ if (this.validateForm()) {
3651
+ this.executeAction(button, this.details, button.action?.successMessage || `${buttonName}d`);
3421
3652
  }
3422
- //coversion--
3423
- this.exec(createButton, dataOut, "Created");
3424
3653
  }
3425
- edit() {
3426
- //validation
3427
- let resp = Core.validateObject(this.formConfig.fields, this.details);
3428
- if (resp != '') {
3429
- this.messageService.toast(resp);
3430
- return;
3654
+ validateForm() {
3655
+ const validationResult = Core.validateObject(this.formConfig.fields, this.details);
3656
+ if (validationResult !== '') {
3657
+ this.messageService.toast(validationResult);
3658
+ return false;
3431
3659
  }
3432
- let editButton = this.detailsConfig.buttons.find(x => x.name == "edit");
3433
- if (!editButton || !editButton.action) {
3434
- this.dialogRef.close({ message: 'emit', data: this.details });
3435
- return;
3660
+ if (this.files.length < 1 && this.fileField?.required && this.formConfig.mode === 'create') {
3661
+ this.messageService.toast("Please attach file(s)");
3662
+ return false;
3436
3663
  }
3437
- //coversion--
3438
- let dataOut;
3439
- if (editButton.action.isFormData) {
3440
- let formData = new FormData();
3664
+ return true;
3665
+ }
3666
+ prepareActionData(button, data) {
3667
+ if (button.action?.isFormData) {
3668
+ const formData = new FormData();
3441
3669
  for (let i = 0; i < this.files.length; i++) {
3442
3670
  formData.append(`uploadFile${i}`, this.files[i], this.files[i].name);
3443
3671
  }
3444
- formData.append("data", JSON.stringify(this.details));
3445
- // console.log(formData)
3446
- dataOut = formData;
3447
- }
3448
- else {
3449
- dataOut = this.details;
3450
- }
3451
- //coversion--
3452
- this.exec(editButton, dataOut, "Updated");
3453
- }
3454
- delete() {
3455
- let deleteButton = this.detailsConfig.buttons.find(x => x.name == "delete");
3456
- if (!deleteButton) {
3457
- this.dialogRef.close({ message: 'success', data: this.details });
3458
- return;
3672
+ formData.append("data", JSON.stringify(data));
3673
+ return formData;
3459
3674
  }
3460
- deleteButton.confirm = { message: "DELETE ?" };
3461
- this.exec(deleteButton, this.details, "Deleted");
3462
- }
3463
- custom(button) {
3464
- this.exec(button, this.details, "Updated");
3675
+ return data;
3465
3676
  }
3466
- exec(button, details, defaultSuccessMessages) {
3677
+ executeAction(button, data, defaultSuccessMessage) {
3678
+ const actionData = this.prepareActionData(button, data);
3467
3679
  if (button.confirm) {
3468
3680
  this.messageService.confirm(button.confirm.message).subscribe((result) => {
3469
- if (result == "yes") {
3470
- this.execAPI(button, details, defaultSuccessMessages);
3681
+ if (result === "yes") {
3682
+ this.performApiCall(button, actionData, defaultSuccessMessage);
3471
3683
  }
3472
3684
  });
3473
3685
  }
3474
3686
  else {
3475
- this.execAPI(button, details, defaultSuccessMessages);
3687
+ this.performApiCall(button, actionData, defaultSuccessMessage);
3476
3688
  }
3477
3689
  }
3478
- execAPI(button, details, defaultSuccessMessage) {
3479
- this.dataService.CallApi(button.action, details).subscribe((apiResponse) => {
3690
+ performApiCall(button, data, defaultSuccessMessage) {
3691
+ this.dataService.CallApi(button.action, data).subscribe((apiResponse) => {
3480
3692
  if (apiResponse.success) {
3481
- if (button.action.successMessage) {
3482
- this.messageService.toast(button.action.successMessage);
3483
- }
3484
- else {
3485
- this.messageService.toast(defaultSuccessMessage);
3486
- }
3487
- this.dialogRef.close({ message: 'success', data: details });
3693
+ this.messageService.toast(button.action?.successMessage || defaultSuccessMessage);
3694
+ this.dialogRef.close({ message: 'success', data: this.details });
3488
3695
  }
3489
3696
  else {
3490
- this.messageService.toast("Error: " + apiResponse);
3697
+ this.messageService.toast("Error: " + apiResponse.message);
3491
3698
  }
3492
3699
  });
3493
3700
  }
3494
3701
  }
3495
- DetailsDialogInternal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DetailsDialogInternal, deps: [{ token: i3$3.BreakpointObserver }, { token: LoaderService }, { token: DataServiceLib }, { token: MessageService }, { token: i4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
3496
- DetailsDialogInternal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DetailsDialogInternal, selector: "app-viewModel", outputs: { inputChange: "inputChange" }, ngImport: i0, template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isProcessing\"></mat-progress-bar>\r\n<div class=\"row d-flex align-items-center mt-0\">\r\n\r\n <div class=\"col\">\r\n <h2 mat-dialog-title>{{titleAction | titlecase}} {{formConfig?.title}}</h2>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\">\r\n\r\n <div *ngIf=\"formConfig.mode=='view' && editButton && testVisible(details,editButton.name)\" class=\"col d-flex justify-content-end\">\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Edit\" color=\"primary\" (click)=\"setMode('edit')\" [disabled]=\"testDisabled(details,editButton.name)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <button [disabled]=\"isProcessing\" *ngIf=\"loadByAction\" mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Refresh\" color=\"primary\" (click)=\"loadData(formConfig.loadAction)\"><mat-icon class=\"refreshIcon\">cached</mat-icon></button>\r\n </div>\r\n\r\n</div>\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n<div class=\"tin-input\" style=\"font-size:14px\">\r\n\r\n<p *ngIf=\"formConfig && !details\"><em>Loading...</em></p>\r\n\r\n<spa-form *ngIf=\"formConfig && details\" [files]=\"files\" [data]=\"details\" [config]=\"formConfig\" (inputChange)=\"inputChanged($event)\"></spa-form>\r\n\r\n\r\n\r\n</div>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n\r\n <div>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='create' && createButton\" (click)=\"create()\" cdkFocusInitial>{{createButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='edit' && editButton\" (click)=\"edit()\" cdkFocusInitial>{{editButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"!smallScreen && testVisible(details,btn.name)\" mat-stroked-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon [ngStyle]=\"{'color': getButtonColor(btn, details)}\">{{btn.icon.name}}</mat-icon>{{btn.display ?? btn.name}}\r\n </button>\r\n </ng-container>\r\n\r\n\r\n <button mat-stroked-button color=\"primary\" mat-dialog-close>Cancel</button>\r\n\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\" *ngIf=\"smallScreen\">\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"testVisible(details,btn.name)\" mat-icon-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon>{{btn.icon.name}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button [disabled]=\"isProcessing\" style=\"color: red;\" (click)=\"delete()\" *ngIf=\"formConfig.mode!='create' && deleteButton\"><mat-icon>delete</mat-icon></button>\r\n </div>\r\n\r\n\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i10$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: FormComponent, selector: "spa-form", inputs: ["files", "data", "config"], outputs: ["buttonClick", "inputChange"] }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }] });
3702
+ DetailsDialogInternal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DetailsDialogInternal, deps: [{ token: i3$1.BreakpointObserver }, { token: LoaderService }, { token: DataServiceLib }, { token: MessageService }, { token: i4.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: ButtonService }, { token: DialogService }], target: i0.ɵɵFactoryTarget.Component });
3703
+ DetailsDialogInternal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DetailsDialogInternal, selector: "app-viewModel-internal", outputs: { inputChange: "inputChange" }, ngImport: i0, template: "<div class=\"dialog-container\">\r\n\r\n <div class=\"dialog-content\">\r\n\r\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isProcessing\"></mat-progress-bar>\r\n <div class=\"row d-flex align-items-center mt-0\">\r\n\r\n <div class=\"col\">\r\n <h2 mat-dialog-title>{{titleAction | titlecase}} {{formConfig?.title}}</h2>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\">\r\n\r\n <div *ngIf=\"formConfig.mode=='view' && editButton && testVisible(details,editButton.name)\" class=\"col d-flex justify-content-end\">\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Edit\" color=\"primary\" (click)=\"setMode('edit')\" [disabled]=\"testDisabled(details,editButton.name)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <button [disabled]=\"isProcessing\" *ngIf=\"loadByAction\" mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Refresh\" color=\"primary\" (click)=\"loadData(formConfig.loadAction, true)\"><mat-icon class=\"refreshIcon\">cached</mat-icon></button>\r\n </div>\r\n\r\n </div>\r\n\r\n <mat-dialog-content class=\"mat-typography dialog-scroll-content\">\r\n\r\n <div class=\"tin-input\" style=\"font-size:14px\">\r\n\r\n <p *ngIf=\"formConfig && !details\"><em>Loading...</em></p>\r\n\r\n <spa-form *ngIf=\"formConfig && details\" [files]=\"files\" [data]=\"details\" [config]=\"formConfig\" (inputChange)=\"inputChanged($event)\"></spa-form>\r\n\r\n<!-- Unique to iternal no tables -->\r\n\r\n </div>\r\n\r\n </mat-dialog-content>\r\n\r\n\r\n </div>\r\n\r\n <mat-dialog-actions>\r\n\r\n <div>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='create' && createButton\" (click)=\"create()\" cdkFocusInitial>{{createButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='edit' && editButton\" (click)=\"edit()\" cdkFocusInitial>{{editButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"!smallScreen && testVisible(details,btn.name)\" mat-stroked-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon [ngStyle]=\"{'color': getButtonColor(btn, details)}\">{{btn.icon.name}}</mat-icon>{{btn.display ?? btn.name | titlecase}}\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-stroked-button color=\"primary\" mat-dialog-close>Cancel</button>\r\n\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\" *ngIf=\"smallScreen\">\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"testVisible(details,btn.name)\" mat-icon-button matTooltipPosition=\"above\" [matTooltip]=\"btn.tip ?? btn.name | titlecase\" [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon>{{btn.icon.name}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Delete\" [disabled]=\"isProcessing\" style=\"color: red;\" (click)=\"delete()\" *ngIf=\"formConfig.mode!='create' && deleteButton\"><mat-icon>delete</mat-icon></button>\r\n </div>\r\n\r\n\r\n </mat-dialog-actions>\r\n\r\n\r\n</div>\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.dialog-container{display:flex;flex-direction:column;height:100%}.dialog-content{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialog-scroll-content{flex:1;overflow-y:auto}mat-dialog-actions{flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i12$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: FormComponent, selector: "spa-form", inputs: ["files", "data", "config"], outputs: ["buttonClick", "inputChange"] }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }] });
3497
3704
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DetailsDialogInternal, decorators: [{
3498
3705
  type: Component,
3499
- args: [{ selector: 'app-viewModel', template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isProcessing\"></mat-progress-bar>\r\n<div class=\"row d-flex align-items-center mt-0\">\r\n\r\n <div class=\"col\">\r\n <h2 mat-dialog-title>{{titleAction | titlecase}} {{formConfig?.title}}</h2>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\">\r\n\r\n <div *ngIf=\"formConfig.mode=='view' && editButton && testVisible(details,editButton.name)\" class=\"col d-flex justify-content-end\">\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Edit\" color=\"primary\" (click)=\"setMode('edit')\" [disabled]=\"testDisabled(details,editButton.name)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <button [disabled]=\"isProcessing\" *ngIf=\"loadByAction\" mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Refresh\" color=\"primary\" (click)=\"loadData(formConfig.loadAction)\"><mat-icon class=\"refreshIcon\">cached</mat-icon></button>\r\n </div>\r\n\r\n</div>\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n<div class=\"tin-input\" style=\"font-size:14px\">\r\n\r\n<p *ngIf=\"formConfig && !details\"><em>Loading...</em></p>\r\n\r\n<spa-form *ngIf=\"formConfig && details\" [files]=\"files\" [data]=\"details\" [config]=\"formConfig\" (inputChange)=\"inputChanged($event)\"></spa-form>\r\n\r\n\r\n\r\n</div>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n\r\n <div>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='create' && createButton\" (click)=\"create()\" cdkFocusInitial>{{createButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='edit' && editButton\" (click)=\"edit()\" cdkFocusInitial>{{editButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"!smallScreen && testVisible(details,btn.name)\" mat-stroked-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon [ngStyle]=\"{'color': getButtonColor(btn, details)}\">{{btn.icon.name}}</mat-icon>{{btn.display ?? btn.name}}\r\n </button>\r\n </ng-container>\r\n\r\n\r\n <button mat-stroked-button color=\"primary\" mat-dialog-close>Cancel</button>\r\n\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\" *ngIf=\"smallScreen\">\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"testVisible(details,btn.name)\" mat-icon-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon>{{btn.icon.name}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button [disabled]=\"isProcessing\" style=\"color: red;\" (click)=\"delete()\" *ngIf=\"formConfig.mode!='create' && deleteButton\"><mat-icon>delete</mat-icon></button>\r\n </div>\r\n\r\n\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}\n"] }]
3500
- }], ctorParameters: function () { return [{ type: i3$3.BreakpointObserver }, { type: LoaderService }, { type: DataServiceLib }, { type: MessageService }, { type: i4.MatDialogRef }, { type: DetailsDialogConfig, decorators: [{
3706
+ args: [{ selector: 'app-viewModel-internal', template: "<div class=\"dialog-container\">\r\n\r\n <div class=\"dialog-content\">\r\n\r\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isProcessing\"></mat-progress-bar>\r\n <div class=\"row d-flex align-items-center mt-0\">\r\n\r\n <div class=\"col\">\r\n <h2 mat-dialog-title>{{titleAction | titlecase}} {{formConfig?.title}}</h2>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\">\r\n\r\n <div *ngIf=\"formConfig.mode=='view' && editButton && testVisible(details,editButton.name)\" class=\"col d-flex justify-content-end\">\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Edit\" color=\"primary\" (click)=\"setMode('edit')\" [disabled]=\"testDisabled(details,editButton.name)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <button [disabled]=\"isProcessing\" *ngIf=\"loadByAction\" mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Refresh\" color=\"primary\" (click)=\"loadData(formConfig.loadAction, true)\"><mat-icon class=\"refreshIcon\">cached</mat-icon></button>\r\n </div>\r\n\r\n </div>\r\n\r\n <mat-dialog-content class=\"mat-typography dialog-scroll-content\">\r\n\r\n <div class=\"tin-input\" style=\"font-size:14px\">\r\n\r\n <p *ngIf=\"formConfig && !details\"><em>Loading...</em></p>\r\n\r\n <spa-form *ngIf=\"formConfig && details\" [files]=\"files\" [data]=\"details\" [config]=\"formConfig\" (inputChange)=\"inputChanged($event)\"></spa-form>\r\n\r\n<!-- Unique to iternal no tables -->\r\n\r\n </div>\r\n\r\n </mat-dialog-content>\r\n\r\n\r\n </div>\r\n\r\n <mat-dialog-actions>\r\n\r\n <div>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='create' && createButton\" (click)=\"create()\" cdkFocusInitial>{{createButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='edit' && editButton\" (click)=\"edit()\" cdkFocusInitial>{{editButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"!smallScreen && testVisible(details,btn.name)\" mat-stroked-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon [ngStyle]=\"{'color': getButtonColor(btn, details)}\">{{btn.icon.name}}</mat-icon>{{btn.display ?? btn.name | titlecase}}\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-stroked-button color=\"primary\" mat-dialog-close>Cancel</button>\r\n\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\" *ngIf=\"smallScreen\">\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"testVisible(details,btn.name)\" mat-icon-button matTooltipPosition=\"above\" [matTooltip]=\"btn.tip ?? btn.name | titlecase\" [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon>{{btn.icon.name}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Delete\" [disabled]=\"isProcessing\" style=\"color: red;\" (click)=\"delete()\" *ngIf=\"formConfig.mode!='create' && deleteButton\"><mat-icon>delete</mat-icon></button>\r\n </div>\r\n\r\n\r\n </mat-dialog-actions>\r\n\r\n\r\n</div>\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.dialog-container{display:flex;flex-direction:column;height:100%}.dialog-content{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialog-scroll-content{flex:1;overflow-y:auto}mat-dialog-actions{flex-shrink:0}\n"] }]
3707
+ }], ctorParameters: function () { return [{ type: i3$1.BreakpointObserver }, { type: LoaderService }, { type: DataServiceLib }, { type: MessageService }, { type: i4.MatDialogRef }, { type: DetailsDialogConfig, decorators: [{
3501
3708
  type: Inject,
3502
3709
  args: [MAT_DIALOG_DATA]
3503
- }] }]; }, propDecorators: { inputChange: [{
3710
+ }] }, { type: ButtonService }, { type: DialogService }]; }, propDecorators: { inputChange: [{
3504
3711
  type: Output
3505
3712
  }] } });
3506
3713
  ;
3507
3714
 
3715
+ // table-config.service.ts
3716
+ class TableConfigService {
3717
+ setColumns(config, smallScreen) {
3718
+ if (!config?.columns) {
3719
+ return [];
3720
+ }
3721
+ if (smallScreen && config.minColumns) {
3722
+ return config.minColumns.filter(col => config.columns.some(x => x.name === col));
3723
+ }
3724
+ return config.columns.map(({ name }) => name);
3725
+ }
3726
+ getActionsWidth(buttons) {
3727
+ return `${buttons?.length * 40 + 20}px`;
3728
+ }
3729
+ }
3730
+ TableConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3731
+ TableConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableConfigService, providedIn: 'root' });
3732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableConfigService, decorators: [{
3733
+ type: Injectable,
3734
+ args: [{
3735
+ providedIn: 'root'
3736
+ }]
3737
+ }] });
3738
+
3739
+ class ConditionService {
3740
+ testIconCondition(icon, row) {
3741
+ if (!icon)
3742
+ return false;
3743
+ return icon.condition ? icon.condition(row) : true;
3744
+ }
3745
+ testColorCondition(color, row) {
3746
+ if (!color)
3747
+ return false;
3748
+ return color.condition ? color.condition(row) : true;
3749
+ }
3750
+ getColor(value, options) {
3751
+ if (!options)
3752
+ return 'lightgrey';
3753
+ const option = options.find(opt => opt.value === value);
3754
+ return option ? option.color : 'lightgrey';
3755
+ }
3756
+ testCondition(condition, value) {
3757
+ return condition ? condition(value) : true;
3758
+ }
3759
+ }
3760
+ ConditionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConditionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3761
+ ConditionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConditionService, providedIn: 'root' });
3762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConditionService, decorators: [{
3763
+ type: Injectable,
3764
+ args: [{
3765
+ providedIn: 'root'
3766
+ }]
3767
+ }] });
3768
+
3508
3769
  class SearchComponent {
3509
3770
  constructor() {
3510
3771
  this.searchClick = new EventEmitter();
@@ -3517,7 +3778,7 @@ class SearchComponent {
3517
3778
  }
3518
3779
  }
3519
3780
  SearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3520
- SearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SearchComponent, selector: "spa-search", inputs: { config: "config" }, outputs: { searchClick: "searchClick" }, ngImport: i0, template: "\n<div class=\"tin-between\">\n\n<div class=\"col tin-row\">\n\n <div *ngFor=\"let field of config.fields\">\n\n <spa-option [type]=\"field.type\" [show]=\"field.show\" [display]=\"field.alias ?? field.name | camelToWords\" [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" (enterPress)=\"search()\"></spa-option>\n\n </div>\n\n</div>\n\n<div class=\"col-1 tin-end\">\n <button mat-fab color=\"primary\" (click)=\"search()\" matTooltip=\"Search\" matTooltipPosition=\"right\">\n <mat-icon>search</mat-icon>\n </button>\n</div>\n\n\n\n</div>\n\n\n\n", styles: [".tin-row{column-gap:30px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: OptionComponent, selector: "spa-option", inputs: ["options", "optionValue", "optionDisplay", "readonly", "type", "value", "display", "show"], outputs: ["valueChange", "enterPress"] }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
3781
+ SearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SearchComponent, selector: "spa-search", inputs: { config: "config" }, outputs: { searchClick: "searchClick" }, ngImport: i0, template: "\n<div class=\"tin-between\">\n\n<div class=\"col tin-row\">\n\n <div *ngFor=\"let field of config.fields\">\n\n <spa-option [type]=\"field.type\" [show]=\"field.show\" [display]=\"field.alias ?? field.name | camelToWords\" [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" (enterPress)=\"search()\"></spa-option>\n\n </div>\n\n</div>\n\n<div class=\"col-1 tin-end\">\n <button mat-fab color=\"primary\" (click)=\"search()\" matTooltip=\"Search\" matTooltipPosition=\"right\">\n <mat-icon>search</mat-icon>\n </button>\n</div>\n\n\n\n</div>\n\n\n\n", styles: [".tin-row{column-gap:30px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: OptionComponent, selector: "spa-option", inputs: ["options", "optionValue", "optionDisplay", "readonly", "type", "value", "display", "show"], outputs: ["valueChange", "enterPress"] }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
3521
3782
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SearchComponent, decorators: [{
3522
3783
  type: Component,
3523
3784
  args: [{ selector: 'spa-search', template: "\n<div class=\"tin-between\">\n\n<div class=\"col tin-row\">\n\n <div *ngFor=\"let field of config.fields\">\n\n <spa-option [type]=\"field.type\" [show]=\"field.show\" [display]=\"field.alias ?? field.name | camelToWords\" [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" (enterPress)=\"search()\"></spa-option>\n\n </div>\n\n</div>\n\n<div class=\"col-1 tin-end\">\n <button mat-fab color=\"primary\" (click)=\"search()\" matTooltip=\"Search\" matTooltipPosition=\"right\">\n <mat-icon>search</mat-icon>\n </button>\n</div>\n\n\n\n</div>\n\n\n\n", styles: [".tin-row{column-gap:30px}\n"] }]
@@ -3527,87 +3788,185 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3527
3788
  type: Output
3528
3789
  }] } });
3529
3790
 
3530
- class TableInternalComponent {
3531
- constructor(dataService, messageService, breakpointObserver, dialog) {
3532
- this.dataService = dataService;
3533
- this.messageService = messageService;
3534
- this.breakpointObserver = breakpointObserver;
3535
- this.dialog = dialog;
3536
- this.elevation = "mat-elevation-z5";
3537
- this.actionsWidth = "50px";
3538
- this.showFilterButton = true;
3539
- this.tileReload = new Subject();
3540
- this.hideTitle = false;
3541
- this.data = [];
3542
- this.dataLoad = new EventEmitter();
3543
- this.refreshClick = new EventEmitter();
3544
- this.searchClick = new EventEmitter();
3545
- this.createClick = new EventEmitter();
3791
+ class TableRowComponent {
3792
+ constructor(buttonService) {
3793
+ this.buttonService = buttonService;
3546
3794
  this.actionClick = new EventEmitter();
3547
- this.inputChange = new EventEmitter();
3548
- this.smallScreen = false;
3549
- // columns: Column[] = [];
3550
- this.displayedColumns = [];
3551
- // @Input() optionValue = "";
3552
- // @Input() optionDisplay = "";
3553
- this.displayedButtons = [];
3554
- // detect screen size changes
3555
- this.breakpointObserver.observe(["(max-width: 600px)"]).subscribe((result) => {
3556
- if (result.matches) {
3557
- this.smallScreen = true;
3558
- this.setColumns();
3559
- }
3560
- else {
3561
- this.smallScreen = false;
3562
- this.setColumns();
3563
- }
3795
+ this.columnClick = new EventEmitter();
3796
+ this.showBannerEvent = new EventEmitter();
3797
+ }
3798
+ testIconCondition(row, icon) {
3799
+ return icon.condition ? icon.condition(row) : true;
3800
+ }
3801
+ testColorCondition(row, color) {
3802
+ return color && color.condition ? color.condition(row) : false;
3803
+ }
3804
+ getColor(value, options) {
3805
+ if (!options)
3806
+ return 'lightgrey';
3807
+ const option = options.find(opt => opt.value === value);
3808
+ return option ? option.color : 'lightgrey';
3809
+ }
3810
+ onActionClick(name, row) {
3811
+ this.actionClick.emit({ name, row });
3812
+ }
3813
+ onColumnClick(column, row) {
3814
+ this.columnClick.emit({ column, row });
3815
+ }
3816
+ showBanner(message) {
3817
+ this.showBannerEvent.emit(message);
3818
+ }
3819
+ }
3820
+ TableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableRowComponent, deps: [{ token: ButtonService }], target: i0.ɵɵFactoryTarget.Component });
3821
+ TableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableRowComponent, selector: "app-table-row", inputs: { column: "column", row: "row", config: "config" }, outputs: { actionClick: "actionClick", columnClick: "columnClick", showBannerEvent: "showBannerEvent" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"column.type\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <spa-check [value]=\"row[column.name]\" [readonly]=\"true\"></spa-check>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'select'\">\r\n <spa-select [options]=\"column.options\" [optionDisplay]=\"column.optionDisplay\" [optionValue]=\"column.optionValue\" [(value)]=\"row[column.name]\" width=\"90%\"></spa-select>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'chip'\">\r\n <mat-chip-list>\r\n <mat-chip (click)=\"onColumnClick(column, row)\" [ngStyle]=\"{'background-color': testColorCondition(row, column.color) ? column.color.name : getColor(row[column.name], column?.options)}\" style=\"font-size: 12px;\"> {{row[column.name]}} </mat-chip>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </mat-chip-list>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n {{row[column.name] | date : 'dd/MM/yyyy'}}\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n {{row[column.name] | date : 'dd/MM/yyyy HH:mm'}}\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'money'\">\r\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name] | currency:'':''}}</label>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <button mat-button [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\" (click)=\"onActionClick(column.name, row)\">{{row[column.name]}}</button>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name]}}</label>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$3.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i4$3.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: CheckComponent, selector: "spa-check", inputs: ["readonly", "display", "value"], outputs: ["valueChange", "click", "check", "uncheck"] }, { kind: "component", type: SelectComponent, selector: "spa-select", inputs: ["width", "readonly", "required", "defaultFirstValue", "readonlyMode", "hint", "placeholder", "multiple", "display", "value", "options", "masterOptions", "optionValue", "optionDisplay", "optionDisplayExtra", "nullable"], outputs: ["valueChange"] }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
3822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableRowComponent, decorators: [{
3823
+ type: Component,
3824
+ args: [{ selector: 'app-table-row', template: "<ng-container [ngSwitch]=\"column.type\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <spa-check [value]=\"row[column.name]\" [readonly]=\"true\"></spa-check>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'select'\">\r\n <spa-select [options]=\"column.options\" [optionDisplay]=\"column.optionDisplay\" [optionValue]=\"column.optionValue\" [(value)]=\"row[column.name]\" width=\"90%\"></spa-select>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'chip'\">\r\n <mat-chip-list>\r\n <mat-chip (click)=\"onColumnClick(column, row)\" [ngStyle]=\"{'background-color': testColorCondition(row, column.color) ? column.color.name : getColor(row[column.name], column?.options)}\" style=\"font-size: 12px;\"> {{row[column.name]}} </mat-chip>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </mat-chip-list>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n {{row[column.name] | date : 'dd/MM/yyyy'}}\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n {{row[column.name] | date : 'dd/MM/yyyy HH:mm'}}\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'money'\">\r\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name] | currency:'':''}}</label>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <button mat-button [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\" (click)=\"onActionClick(column.name, row)\">{{row[column.name]}}</button>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name]}}</label>\r\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\r\n <ng-container *ngFor=\"let icon of column.icons\">\r\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"] }]
3825
+ }], ctorParameters: function () { return [{ type: ButtonService }]; }, propDecorators: { column: [{
3826
+ type: Input
3827
+ }], row: [{
3828
+ type: Input
3829
+ }], config: [{
3830
+ type: Input
3831
+ }], actionClick: [{
3832
+ type: Output
3833
+ }], columnClick: [{
3834
+ type: Output
3835
+ }], showBannerEvent: [{
3836
+ type: Output
3837
+ }] } });
3838
+
3839
+ class TableActionComponent {
3840
+ constructor(buttonService) {
3841
+ this.buttonService = buttonService;
3842
+ this.actionClick = new EventEmitter();
3843
+ }
3844
+ testVisible(row, buttonName) {
3845
+ const button = this.displayedButtons.find(b => b.name === buttonName);
3846
+ return button ? this.buttonService.testVisible(button, row) : false;
3847
+ }
3848
+ testDisabled(row, buttonName) {
3849
+ const button = this.displayedButtons.find(b => b.name === buttonName);
3850
+ return button ? this.buttonService.testDisabled(button, row) : true;
3851
+ }
3852
+ getButtonColor(button, row) {
3853
+ return this.buttonService.getButtonColor(button, row);
3854
+ }
3855
+ getIcon(buttonName) {
3856
+ const button = this.displayedButtons.find(b => b.name === buttonName);
3857
+ return button ? this.buttonService.getIcon(button, this.config) : '';
3858
+ }
3859
+ onActionClick(buttonName, row) {
3860
+ this.actionClick.emit({ name: buttonName, row });
3861
+ }
3862
+ }
3863
+ TableActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableActionComponent, deps: [{ token: ButtonService }], target: i0.ɵɵFactoryTarget.Component });
3864
+ TableActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableActionComponent, selector: "app-table-action", inputs: { displayedButtons: "displayedButtons", config: "config", row: "row" }, outputs: { actionClick: "actionClick" }, ngImport: i0, template: "<ng-container *ngFor=\"let button of displayedButtons\">\r\n <ng-container *ngIf=\"button.name != 'create' && testVisible(row, button.name)\">\r\n <button *ngIf=\"!config.flatButtons\" mat-mini-fab [matTooltip]=\"button.tip ?? button.name | titlecase\" matTooltipPosition=\"above\" style=\"margin-right:5px\" [ngStyle]=\"{'background-color': getButtonColor(button, row)}\" [disabled]=\"testDisabled(row, button.name)\" (click)=\"onActionClick(button.name, row)\">\r\n <mat-icon>{{getIcon(button.name)}}</mat-icon>\r\n </button>\r\n\r\n <button *ngIf=\"config.flatButtons\" mat-icon-button [matTooltip]=\"button.tip ?? button.name | titlecase\" matTooltipPosition=\"above\" style=\"margin-right:5px\" [disabled]=\"testDisabled(row, button.name)\" (click)=\"onActionClick(button.name, row)\">\r\n <mat-icon [ngStyle]=\"{'color': getButtonColor(button, row)}\">{{getIcon(button.name)}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"button.name != 'create' && !testVisible(row, button.name) && !config.collapseButtons\">\r\n <label style=\"margin-right: 35px;\"></label>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }] });
3865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableActionComponent, decorators: [{
3866
+ type: Component,
3867
+ args: [{ selector: 'app-table-action', template: "<ng-container *ngFor=\"let button of displayedButtons\">\r\n <ng-container *ngIf=\"button.name != 'create' && testVisible(row, button.name)\">\r\n <button *ngIf=\"!config.flatButtons\" mat-mini-fab [matTooltip]=\"button.tip ?? button.name | titlecase\" matTooltipPosition=\"above\" style=\"margin-right:5px\" [ngStyle]=\"{'background-color': getButtonColor(button, row)}\" [disabled]=\"testDisabled(row, button.name)\" (click)=\"onActionClick(button.name, row)\">\r\n <mat-icon>{{getIcon(button.name)}}</mat-icon>\r\n </button>\r\n\r\n <button *ngIf=\"config.flatButtons\" mat-icon-button [matTooltip]=\"button.tip ?? button.name | titlecase\" matTooltipPosition=\"above\" style=\"margin-right:5px\" [disabled]=\"testDisabled(row, button.name)\" (click)=\"onActionClick(button.name, row)\">\r\n <mat-icon [ngStyle]=\"{'color': getButtonColor(button, row)}\">{{getIcon(button.name)}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"button.name != 'create' && !testVisible(row, button.name) && !config.collapseButtons\">\r\n <label style=\"margin-right: 35px;\"></label>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"] }]
3868
+ }], ctorParameters: function () { return [{ type: ButtonService }]; }, propDecorators: { displayedButtons: [{
3869
+ type: Input
3870
+ }], config: [{
3871
+ type: Input
3872
+ }], row: [{
3873
+ type: Input
3874
+ }], actionClick: [{
3875
+ type: Output
3876
+ }] } });
3877
+
3878
+ class TableInternalComponent {
3879
+ constructor(dataService, messageService, breakpointObserver, dialog, buttonService, dialogService, tableConfigService, conditionService) {
3880
+ this.dataService = dataService;
3881
+ this.messageService = messageService;
3882
+ this.breakpointObserver = breakpointObserver;
3883
+ this.dialog = dialog;
3884
+ this.buttonService = buttonService;
3885
+ this.dialogService = dialogService;
3886
+ this.tableConfigService = tableConfigService;
3887
+ this.conditionService = conditionService;
3888
+ this.elevation = "mat-elevation-z5";
3889
+ this.actionsWidth = "50px";
3890
+ this.showFilterButton = true;
3891
+ this.tileReload = new Subject();
3892
+ this.smallScreen = false;
3893
+ this.displayedColumns = [];
3894
+ this.displayedButtons = [];
3895
+ this.hideTitle = false;
3896
+ this.data = [];
3897
+ this.dataLoad = new EventEmitter();
3898
+ this.refreshClick = new EventEmitter();
3899
+ this.searchClick = new EventEmitter();
3900
+ this.createClick = new EventEmitter();
3901
+ this.actionClick = new EventEmitter();
3902
+ this.inputChange = new EventEmitter();
3903
+ // detect screen size changes
3904
+ this.breakpointObserver.observe(["(max-width: 600px)"]).subscribe((result) => {
3905
+ this.smallScreen = result.matches;
3906
+ this.updateTableConfiguration();
3564
3907
  });
3565
3908
  }
3566
3909
  ngOnInit() {
3567
- if (this.config.elevation) {
3568
- if (this.config.elevation == "none") {
3569
- this.elevation = "";
3570
- }
3571
- else if (this.config.elevation == "low") {
3572
- this.elevation = "mat-elevation-z1";
3573
- }
3574
- else if (this.config.elevation == "medium") {
3575
- this.elevation = "mat-elevation-z5";
3576
- }
3577
- else if (this.config.elevation == "high") {
3578
- this.elevation = "mat-elevation-z9";
3579
- }
3910
+ this.initializeComponent();
3911
+ }
3912
+ ngOnChanges() {
3913
+ if (!this.config.loadAction) {
3914
+ this.dataSource = this.data;
3915
+ this.tableDataSource = new MatTableDataSource(this.dataSource);
3916
+ }
3917
+ setTimeout(() => { this.tableDataSource.paginator = this.tablePaginator; }, 1000);
3918
+ }
3919
+ initializeComponent() {
3920
+ this.updateTableConfiguration();
3921
+ this.setupDataLoading();
3922
+ this.formDefaults();
3923
+ }
3924
+ updateTableConfiguration() {
3925
+ this.elevation = this.getElevationClass(this.config?.elevation);
3926
+ this.displayedColumns = this.tableConfigService.setColumns(this.config, this.smallScreen);
3927
+ this.displayedButtons = this.buttonService.getDisplayedButtons(this.config?.buttons, this.smallScreen, this.config?.minButtons);
3928
+ this.actionsWidth = this.tableConfigService.getActionsWidth(this.displayedButtons);
3929
+ this.createButton = this.buttonService.getCreateButton(this.config?.buttons);
3930
+ this.showFilterButton = !this.config?.searchConfig;
3931
+ if (this.displayedButtons?.length > 0 && !this.displayedColumns.includes('action')) {
3932
+ this.displayedColumns.push('action');
3580
3933
  }
3581
- this.setColumns();
3582
- this.createButton = this.getButton('create');
3934
+ }
3935
+ setupDataLoading() {
3583
3936
  if (this.config.loadAction) {
3584
3937
  this.loadData(this.config.loadAction, "");
3585
3938
  }
3586
- this.formDefaults();
3587
- if (this.config.searchConfig) {
3588
- this.showFilterButton = false;
3589
- }
3590
- if (this.reload != null) {
3939
+ if (this.reload) {
3591
3940
  this.reload.subscribe(v => {
3592
- if (v == true) {
3593
- if (this.config?.loadAction) {
3594
- this.loadData(this.config?.loadAction, "");
3595
- }
3941
+ if (v && this.config?.loadAction) {
3942
+ this.loadData(this.config.loadAction, "");
3596
3943
  }
3597
3944
  });
3598
3945
  }
3599
3946
  }
3600
- ngOnChanges() {
3601
- if (!this.config.loadAction) {
3602
- // console.log("Table data Changed")
3603
- this.dataSource = this.data;
3604
- this.tableDataSource = new MatTableDataSource(this.dataSource);
3947
+ loadData(action, data) {
3948
+ console.log("loading");
3949
+ if (action) {
3950
+ this.dataService.CallApi(action, data).subscribe((apiResponse) => {
3951
+ if (this.config.logResponse) {
3952
+ console.log(apiResponse);
3953
+ }
3954
+ this.dataSource = apiResponse.data;
3955
+ this.tableDataSource = new MatTableDataSource(apiResponse.data);
3956
+ this.tableDataSource.paginator = this.tablePaginator;
3957
+ if (apiResponse.success) {
3958
+ this.tableDataSource = new MatTableDataSource(apiResponse.data);
3959
+ this.tableDataSource.paginator = this.tablePaginator;
3960
+ this.dataLoaded(apiResponse.data);
3961
+ }
3962
+ else {
3963
+ this.messageService.toast("Error: " + apiResponse.message);
3964
+ }
3965
+ });
3605
3966
  }
3606
- setTimeout(() => { this.tableDataSource.paginator = this.tablePaginator; }, 1000);
3607
3967
  }
3608
3968
  inputChanged(event) {
3609
3969
  this.inputChange.emit({ field: event.field, value: event.value });
3610
- // console.log("Changed " + JSON.stringify(event))
3611
3970
  }
3612
3971
  formDefaults() {
3613
3972
  if (!this.config.formConfig) {
@@ -3621,46 +3980,11 @@ class TableInternalComponent {
3621
3980
  }
3622
3981
  }
3623
3982
  setColumns() {
3624
- //columns
3625
- if (!this.config?.columns) {
3626
- return;
3627
- }
3628
- if (this.smallScreen) {
3629
- let cols = [];
3630
- if (this.config.minColumns) {
3631
- cols = this.config.minColumns.filter(col => this.config.columns.some(x => x.name === col));
3632
- }
3633
- if (cols.length > 0) {
3634
- this.displayedColumns = cols;
3635
- }
3636
- else {
3637
- this.displayedColumns = this.config.columns.map(({ name }) => name);
3638
- }
3639
- }
3640
- else {
3641
- this.displayedColumns = this.config.columns.map(({ name }) => name);
3642
- }
3643
- //buttons
3644
- if (!this.config?.buttons) {
3645
- return;
3646
- }
3647
- let buttonsCount = this.config.buttons.filter(x => x.name != 'create').length ?? 0;
3648
- if (buttonsCount > 0) {
3649
- if (!this.displayedColumns.find(x => x == 'action') && this.config.buttons) {
3650
- this.displayedColumns.push("action");
3651
- }
3652
- if (this.smallScreen) {
3653
- if (this.config.minButtons) {
3654
- this.displayedButtons = this.config.buttons.filter(x => this.config.minButtons.includes(x.name));
3655
- }
3656
- else {
3657
- this.displayedButtons = this.config.buttons.filter(x => x.name != 'create').slice(0, 1);
3658
- }
3659
- }
3660
- else {
3661
- this.displayedButtons = this.config.buttons.filter(x => x.name != 'create');
3662
- }
3663
- this.actionsWidth = `${this.displayedButtons.length * 40 + 20}px`;
3983
+ this.displayedColumns = this.tableConfigService.setColumns(this.config, this.smallScreen);
3984
+ this.displayedButtons = this.buttonService.getDisplayedButtons(this.config.buttons, this.smallScreen, this.config.minButtons);
3985
+ this.actionsWidth = this.tableConfigService.getActionsWidth(this.displayedButtons);
3986
+ if (this.displayedButtons.length > 0 && !this.displayedColumns.includes('action')) {
3987
+ this.displayedColumns.push('action');
3664
3988
  }
3665
3989
  }
3666
3990
  setButtons() {
@@ -3674,132 +3998,45 @@ class TableInternalComponent {
3674
3998
  }
3675
3999
  }
3676
4000
  getButton(name) {
3677
- if (!this.config.buttons) {
3678
- console.log("No buttons found");
3679
- return null;
3680
- }
3681
- return this.config.buttons.find(x => x.name == name);
4001
+ return this.buttonService.getButton(this.config.buttons, name);
3682
4002
  }
3683
4003
  getIcon(buttonName) {
3684
- let b = this.getButton(buttonName);
3685
- if (b.icon) {
3686
- return b.icon.name;
3687
- }
3688
- let i = 'open_in_new';
3689
- switch (buttonName) {
3690
- case 'view':
3691
- i = this.config.flatButtons ? 'open_in_new' : 'pageview';
3692
- break;
3693
- case 'edit':
3694
- i = 'edit';
3695
- break;
3696
- case 'delete':
3697
- i = 'delete';
3698
- break;
3699
- default:
3700
- break;
3701
- }
3702
- return i;
4004
+ const button = this.getButton(buttonName);
4005
+ return this.buttonService.getIcon(button, this.config);
3703
4006
  }
3704
4007
  getButtonColor(button, row) {
3705
- if (button.disabled) {
3706
- if (button.disabled(row)) {
3707
- return 'lightgray';
3708
- }
3709
- }
3710
- if (button.color) {
3711
- return button.color;
3712
- }
3713
- if (button.name == 'delete') {
3714
- return '#F44336';
3715
- }
3716
- if (button.name == 'create') {
3717
- return 'green';
3718
- }
3719
- return ' #4050B5';
4008
+ return this.buttonService.getButtonColor(button, row);
3720
4009
  }
3721
4010
  getOptions(column) {
3722
4011
  let x = this.config.columns.find(opt => opt.name === column);
3723
4012
  return x;
3724
4013
  }
3725
- getColor(v, options) {
3726
- let defaultColor = 'lightgrey';
3727
- if (!options)
3728
- return defaultColor;
3729
- let c = options.find(x => x.value == v);
3730
- if (c) {
3731
- return c.color;
3732
- }
3733
- else {
3734
- return defaultColor;
3735
- }
4014
+ getColor(value, options) {
4015
+ return this.conditionService.getColor(value, options);
3736
4016
  }
3737
- testIconCondition(value, icon) {
3738
- if (icon.condition) {
3739
- return icon.condition(value);
3740
- }
3741
- else {
3742
- return true;
3743
- }
4017
+ testIconCondition(row, icon) {
4018
+ return this.conditionService.testIconCondition(icon, row);
3744
4019
  }
3745
- testColorCondition(value, color) {
3746
- if (!color)
3747
- return false;
3748
- if (color.condition) {
3749
- return color.condition(value);
3750
- }
3751
- else {
3752
- return true;
3753
- }
4020
+ testColorCondition(row, color) {
4021
+ return this.conditionService.testColorCondition(color, row);
3754
4022
  }
3755
4023
  showBanner(message) {
3756
- if (!message)
3757
- return;
3758
- if (message == '')
3759
- return;
3760
- this.messageService.info(message);
4024
+ if (message && message !== '') {
4025
+ this.messageService.info(message);
4026
+ }
3761
4027
  }
3762
4028
  testDisabled(row, buttonName) {
3763
- let button = this.getButton(buttonName);
3764
- if (button.disabled) {
3765
- return button.disabled(row);
3766
- }
3767
- return false;
4029
+ const button = this.getButton(buttonName);
4030
+ return this.buttonService.testDisabled(button, row);
3768
4031
  }
3769
4032
  testVisible(row, buttonName) {
3770
- let button = this.getButton(buttonName);
3771
- if (button.visible) {
3772
- return button.visible(row);
3773
- }
3774
- return true;
3775
- }
3776
- //Actions
3777
- loadData(action, data) {
3778
- console.log("loading");
3779
- if (action) {
3780
- this.dataService.CallApi(action, data).subscribe((apiResponse) => {
3781
- if (this.config.logResponse) {
3782
- console.log(apiResponse);
3783
- }
3784
- this.dataSource = apiResponse.data;
3785
- this.tableDataSource = new MatTableDataSource(apiResponse.data);
3786
- this.tableDataSource.paginator = this.tablePaginator;
3787
- if (apiResponse.success) {
3788
- this.tableDataSource = new MatTableDataSource(apiResponse.data);
3789
- this.tableDataSource.paginator = this.tablePaginator;
3790
- this.dataLoaded(apiResponse.data);
3791
- }
3792
- else {
3793
- this.messageService.toast("Error: " + apiResponse.message);
3794
- }
3795
- });
3796
- }
4033
+ const button = this.getButton(buttonName);
4034
+ return this.buttonService.testVisible(button, row);
3797
4035
  }
3798
4036
  //Events
3799
4037
  searchClicked(x) {
3800
4038
  console.log("Search");
3801
4039
  this.searchClick.emit(x);
3802
- // console.log(x)
3803
4040
  if (this.config.searchConfig.searchAction) {
3804
4041
  this.config.searchConfig.searchAction.method == 'post';
3805
4042
  this.loadData(this.config.searchConfig.searchAction, x);
@@ -3816,73 +4053,37 @@ class TableInternalComponent {
3816
4053
  }
3817
4054
  }
3818
4055
  dataLoaded(x) {
3819
- this.dataLoad.emit(x);
3820
4056
  console.log("dataloaded");
4057
+ this.dataLoad.emit(x);
3821
4058
  if (this.config.tileConfig?.loadAction) {
3822
4059
  this.tileReload.next(true);
3823
4060
  }
3824
4061
  }
3825
4062
  actionClicked(name, row) {
3826
- if (name == 'view') {
4063
+ if (name === 'view') {
3827
4064
  this.viewModel(row);
3828
4065
  }
3829
- else if (name == 'edit') {
4066
+ else if (name === 'edit') {
3830
4067
  this.editModel(row);
3831
4068
  }
3832
- else if (name == 'delete') {
4069
+ else if (name === 'delete') {
3833
4070
  this.deleteModel(row);
3834
4071
  }
3835
4072
  else {
3836
4073
  this.customModel(name, row);
3837
4074
  }
3838
4075
  }
4076
+ //Dialog events
3839
4077
  columnClicked(column, row) {
3840
4078
  if (column.detailsConfig) {
3841
- let conf = DetailsDialogProcessor.processDetailsConfig(column.detailsConfig, row);
3842
- const dialogRef = this.dialog.open(DetailsDialogInternal, {
3843
- width: "900px",
3844
- data: conf
3845
- });
3846
- dialogRef.afterClosed().subscribe((result) => {
3847
- if (result.message == "success") {
3848
- this.actionClickedEmit(column.name, row);
3849
- this.refreshClicked();
3850
- }
3851
- });
4079
+ this.openDetailsDialog(column.name, row, column);
3852
4080
  }
3853
4081
  else {
3854
4082
  this.actionClickedEmit(column.name, row);
3855
4083
  }
3856
4084
  }
3857
4085
  customModel(name, row) {
3858
- let button = this.getButton(name);
3859
- if (button) {
3860
- if (!button.dialog) {
3861
- this.doAction(button.name, row);
3862
- this.actionClickedEmit(name, row);
3863
- }
3864
- else {
3865
- if (button.detailsConfig) {
3866
- let conf = DetailsDialogProcessor.processDetailsConfig(button.detailsConfig, row);
3867
- const dialogRef = this.dialog.open(DetailsDialogInternal, {
3868
- width: "900px",
3869
- data: conf
3870
- });
3871
- dialogRef.afterClosed().subscribe((result) => {
3872
- if (result.message == "success") {
3873
- this.actionClickedEmit(button.name, row);
3874
- this.refreshClicked();
3875
- }
3876
- });
3877
- }
3878
- else {
3879
- this.actionClickedEmit(button.name, row);
3880
- }
3881
- }
3882
- }
3883
- else {
3884
- this.actionClickedEmit(name, row);
3885
- }
4086
+ this.openDetailsDialog(name, row);
3886
4087
  }
3887
4088
  actionClickedEmit(name, row) {
3888
4089
  console.log("Action clicked");
@@ -3890,110 +4091,55 @@ class TableInternalComponent {
3890
4091
  }
3891
4092
  viewModel(row) {
3892
4093
  console.log("view Clicked");
3893
- let button = this.getButton('view');
3894
- if (!button)
3895
- return;
3896
- if (!button.dialog) {
3897
- this.actionClickedEmit(button.name, row);
3898
- return;
3899
- }
3900
- if (!this.config.formConfig) {
3901
- this.messageService.toast("Please configure form");
3902
- return;
3903
- }
3904
- let conf = {
3905
- formConfig: this.config.formConfig,
3906
- buttons: this.config.buttons,
3907
- details: row,
3908
- };
3909
- if (button.detailsConfig) {
3910
- conf = DetailsDialogProcessor.processDetailsConfig(button.detailsConfig, row);
3911
- }
3912
- conf.formConfig.mode = "view";
3913
- const dialogRef = this.dialog.open(DetailsDialogInternal, {
3914
- width: "900px",
3915
- data: conf
3916
- });
3917
- dialogRef.afterClosed().subscribe((result) => {
3918
- if (result.message) {
3919
- this.refreshClicked();
3920
- }
3921
- });
4094
+ this.openDetailsDialog('view', row);
3922
4095
  }
3923
4096
  newModel() {
3924
- let button = this.getButton('create');
3925
- if (!button)
3926
- return;
3927
- if (!button.dialog) {
3928
- this.actionClickedEmit(button.name, null);
3929
- return;
3930
- }
3931
- if (!this.config.formConfig) {
3932
- this.messageService.toast("Please configure form");
3933
- return;
3934
- }
3935
- this.config.formConfig.mode = "create";
3936
- let conf = {
3937
- formConfig: this.config.formConfig,
3938
- buttons: this.config.buttons,
3939
- };
3940
- if (button.detailsConfig) {
3941
- conf = button.detailsConfig;
3942
- }
3943
- conf.formConfig.mode = "create";
3944
- conf.heroField = this.config?.heroField;
3945
- conf.heroValue = this.config?.heroValue;
3946
- const dialogRef = this.dialog.open(DetailsDialogInternal, {
3947
- width: "900px",
3948
- data: conf,
3949
- });
3950
- dialogRef.afterClosed().subscribe((result) => {
3951
- if (result.message == "success") {
3952
- this.actionClickedEmit('create', result.data);
3953
- this.refreshClicked();
3954
- }
3955
- else if (result.message == "emit") {
3956
- this.actionClickedEmit('create', result.data);
3957
- }
3958
- });
4097
+ this.openDetailsDialog('create', null);
3959
4098
  }
3960
4099
  editModel(row) {
3961
- let button = this.getButton('edit');
4100
+ this.openDetailsDialog('edit', row);
4101
+ }
4102
+ openDetailsDialog(buttonName, row, column) {
4103
+ const button = column ? { name: column.name, dialog: true, detailsConfig: column.detailsConfig } : this.getButton(buttonName);
3962
4104
  if (!button)
3963
4105
  return;
3964
4106
  if (!button.dialog) {
4107
+ this.doAction(button.name, row);
3965
4108
  this.actionClickedEmit(button.name, row);
3966
4109
  return;
3967
4110
  }
3968
- if (!this.config.formConfig) {
4111
+ if (!this.config.formConfig && !button.detailsConfig) {
3969
4112
  this.messageService.toast("Please configure form");
3970
4113
  return;
3971
4114
  }
3972
- this.config.formConfig.mode = "edit";
3973
4115
  let conf = {
3974
4116
  formConfig: this.config.formConfig,
3975
4117
  buttons: this.config.buttons,
3976
4118
  details: row,
3977
4119
  };
3978
4120
  if (button.detailsConfig) {
3979
- conf = DetailsDialogProcessor.processDetailsConfig(button.detailsConfig, row);
4121
+ conf = buttonName === 'create'
4122
+ ? button.detailsConfig
4123
+ : DetailsDialogProcessor.processDetailsConfig(button.detailsConfig, row);
4124
+ }
4125
+ conf.formConfig.mode = buttonName === 'create' ? 'create' : (buttonName === 'edit' ? 'edit' : 'view');
4126
+ if (buttonName === 'create') {
4127
+ conf.heroField = this.config?.heroField;
4128
+ conf.heroValue = this.config?.heroValue;
4129
+ }
4130
+ const dialogResult = this.dialogService.openDetailsDialog(conf, DetailsDialogInternal); // Unique to internal
4131
+ if (buttonName === 'edit') {
4132
+ dialogResult.inputChange.subscribe((x) => {
4133
+ this.inputChanged(x);
4134
+ });
3980
4135
  }
3981
- conf.formConfig.mode = "edit";
3982
- const dialogRef = this.dialog.open(DetailsDialogInternal, {
3983
- width: "900px",
3984
- data: conf
3985
- });
3986
- dialogRef.componentInstance.inputChange.subscribe((x) => {
3987
- this.inputChanged(x);
3988
- });
3989
- dialogRef.afterClosed().subscribe((result) => {
3990
- console.log(result);
3991
- if (result.message == "success") {
3992
- this.actionClickedEmit('edit', result.data);
4136
+ dialogResult.afterClosed.subscribe((result) => {
4137
+ if (result.message === 'success') {
4138
+ this.actionClickedEmit(button.name, result.data);
3993
4139
  this.refreshClicked();
3994
4140
  }
3995
- else if (result.message == "emit") {
3996
- this.actionClickedEmit('edit', result.data);
4141
+ else if (result.message === 'emit') {
4142
+ this.actionClickedEmit(button.name, result.data);
3997
4143
  }
3998
4144
  });
3999
4145
  }
@@ -4008,6 +4154,7 @@ class TableInternalComponent {
4008
4154
  }
4009
4155
  });
4010
4156
  }
4157
+ //Actions
4011
4158
  doAction(buttonName, row) {
4012
4159
  let b = this.getButton(buttonName);
4013
4160
  if (!b)
@@ -4043,13 +4190,32 @@ class TableInternalComponent {
4043
4190
  this.messageService.toast("Error: " + error);
4044
4191
  });
4045
4192
  }
4193
+ //Misc
4194
+ getElevationClass(elevation) {
4195
+ console.log(elevation);
4196
+ if (elevation == "none") {
4197
+ return "";
4198
+ }
4199
+ else if (elevation == "low") {
4200
+ return "mat-elevation-z1";
4201
+ }
4202
+ else if (elevation == "medium") {
4203
+ return "mat-elevation-z5";
4204
+ }
4205
+ else if (elevation == "high") {
4206
+ return "mat-elevation-z9";
4207
+ }
4208
+ else {
4209
+ return "mat-elevation-z5";
4210
+ }
4211
+ }
4046
4212
  }
4047
- TableInternalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableInternalComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: i3$3.BreakpointObserver }, { token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
4048
- TableInternalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableInternalComponent, selector: "spa-table-internal", inputs: { hideTitle: "hideTitle", data: "data", config: "config", reload: "reload" }, outputs: { dataLoad: "dataLoad", refreshClick: "refreshClick", searchClick: "searchClick", createClick: "createClick", actionClick: "actionClick", inputChange: "inputChange" }, viewQueries: [{ propertyName: "tablePaginator", first: true, predicate: ["tablePaginator"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n<spa-search *ngIf=\"config.searchConfig\" [config]=\"config.searchConfig\" style=\"margin-bottom: 20px;\" (searchClick)=\"searchClicked($event)\"></spa-search>\n\n<div class=\"top\">\n\n <!-- Unique to internal -->\n <div class=\"tin-row\">\n <button *ngIf=\"createButton && !config.flatButtons && testVisible(config.parentData,createButton.name)\"\n [disabled]=\"testDisabled(config.parentData,createButton.name)\" id=\"btnNew\" mat-raised-button color=\"primary\" style=\"margin-right: 10px;\" (click)=\"newModel()\">{{createButton.display}}\n </button>\n <button *ngIf=\"createButton && config.flatButtons && testVisible(config.parentData,createButton.name)\"\n [ngStyle]=\"{'color': getButtonColor(createButton, config.parentData)}\"\n [disabled]=\"testDisabled(config.parentData,createButton.name)\" id=\"btnNew\" mat-stroked-button style=\"margin-right: 10px; color: green;\" (click)=\"newModel()\">{{createButton.display}}\n </button>\n </div>\n\n <div *ngIf=\"config.tileConfig && !smallScreen\" style=\"min-width: 75%;\">\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\n </div>\n\n <div *ngIf=\"config.showFilter\" class=\"d-flex justify-content-end\">\n <spa-filter [showText]=\"!smallScreen || (smallScreen && dataSource?.length > 10)\" [showButton]=\"showFilterButton\" [data]=\"tableDataSource\" [flatButtons]=\"config.flatButtons\" (refreshClick)=\"refreshClicked()\"></spa-filter>\n </div>\n\n</div>\n\n<div *ngIf=\"config.tileConfig && smallScreen\" style=\"width: 100%;\">\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\n</div>\n\n<div *ngIf=\"config.title && !hideTitle\" class=\"title\">\n <label style=\"font-size: larger;\">{{config.title | camelToWords}}</label>\n</div>\n\n<div>\n\n <p *ngIf=\"!config\"><em>Configure Table</em></p>\n <p *ngIf=\"!dataSource\"><em>Loading...</em></p>\n\n\n\n <div *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\">\n\n\n <table mat-table [dataSource]=\"tableDataSource\" [ngClass]=\"elevation\">\n <ng-container *ngFor=\"let column of config.columns\" [matColumnDef]=\"column.name\">\n <th mat-header-cell *matHeaderCellDef >{{ column.alias ?? column.name | camelToWords }}</th>\n <td mat-cell *matCellDef=\"let row;\" class=\"right-padding\" >\n\n <ng-container [ngSwitch]=\"column.type\">\n\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <spa-check [value]=\"row[column.name]\" [readonly]=\"true\"></spa-check>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'select'\">\n <spa-select [options]=\"column.options\" [optionDisplay]=\"column.optionDisplay\" [optionValue]=\"column.optionValue\" [(value)]=\"row[column.name]\" width=\"90%\" ></spa-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'chip'\">\n <mat-chip-list>\n <mat-chip (click)=\"columnClicked(column, row)\" [ngStyle]=\"{'background-color': testColorCondition(row, column.color) ? column.color.name : getColor(row[column.name], column?.options)}\" style=\"font-size: 12px;\"> {{row[column.name]}} </mat-chip>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'icon'\">\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'date'\">\n {{row[column.name] | date : 'dd/MM/yyyy'}}\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'datetime'\">\n {{row[column.name] | date : 'dd/MM/yyyy HH:mm'}}\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <!-- <ng-container *ngSwitchCase=\"'spinner'\">\n <mat-spinner [diameter]=\"20\">\n\n </mat-spinner>\n </ng-container> -->\n\n <ng-container *ngSwitchCase=\"'money'\">\n\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name] | currency:'':''}}</label>\n\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n\n <button mat-button [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\" (click)=\"actionClicked(column.name, row)\">{{row[column.name]}}</button>\n\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name]}}</label>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef> Action </th>\n <td mat-cell *matCellDef=\"let row\" [ngStyle]=\"{width:false ? '50px' : actionsWidth}\">\n\n\n <ng-container *ngFor=\"let button of displayedButtons\">\n\n <ng-container *ngIf=\"button.name != 'create' && testVisible(row,button.name)\">\n\n <button *ngIf=\"!config.flatButtons\" mat-mini-fab [matTooltip]=\"button.tip ?? button.name \" matTooltipPosition=\"above\" style=\"margin-right:5px\"\n [ngStyle]=\"{'background-color':getButtonColor(button, row)}\"\n [disabled]=\"testDisabled(row,button.name)\" (click)=\"actionClicked(button.name, row)\">\n <mat-icon>{{getIcon(button.name)}}</mat-icon>\n </button>\n\n <button *ngIf=\"config.flatButtons\" mat-icon-button [matTooltip]=\"button.tip ?? button.name \" matTooltipPosition=\"above\" style=\"margin-right:5px\"\n [disabled]=\"testDisabled(row,button.name)\" (click)=\"actionClicked(button.name, row)\">\n <mat-icon [ngStyle]=\"{'color':getButtonColor(button, row)}\">{{getIcon(button.name)}}</mat-icon>\n </button>\n\n </ng-container>\n\n <ng-container *ngIf=\"button.name != 'create' && !testVisible(row,button.name)\">\n <label style=\"margin-right: 35px;\"></label>\n </ng-container>\n\n </ng-container>\n\n\n </td>\n </ng-container>\n\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': config.greyOut && config.greyOut(row)}\"></tr>\n </table>\n\n </div>\n\n <mat-paginator *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\" #tablePaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\n\n</div>\n\n<div class=\"tin-center\">\n <p *ngIf=\"dataSource?.length == 0\"><em>No Data</em></p>\n</div>\n\n\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7$2.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i10.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: CheckComponent, selector: "spa-check", inputs: ["readonly", "display", "value"], outputs: ["valueChange", "click", "check", "uncheck"] }, { kind: "component", type: SelectComponent, selector: "spa-select", inputs: ["width", "readonly", "required", "defaultFirstValue", "readonlyMode", "hint", "placeholder", "multiple", "display", "value", "options", "masterOptions", "optionValue", "optionDisplay", "optionDisplayExtra", "nullable"], outputs: ["valueChange"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "component", type: TilesComponent, selector: "spa-tiles", inputs: ["config", "data", "reload"], outputs: ["tileClick"] }, { kind: "component", type: SearchComponent, selector: "spa-search", inputs: ["config"], outputs: ["searchClick"] }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
4213
+ TableInternalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableInternalComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: i3$1.BreakpointObserver }, { token: i4.MatDialog }, { token: ButtonService }, { token: DialogService }, { token: TableConfigService }, { token: ConditionService }], target: i0.ɵɵFactoryTarget.Component });
4214
+ TableInternalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableInternalComponent, selector: "spa-table-internal", inputs: { hideTitle: "hideTitle", data: "data", config: "config", reload: "reload" }, outputs: { dataLoad: "dataLoad", refreshClick: "refreshClick", searchClick: "searchClick", createClick: "createClick", actionClick: "actionClick", inputChange: "inputChange" }, viewQueries: [{ propertyName: "tablePaginator", first: true, predicate: ["tablePaginator"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<!-- Search -->\r\n<spa-search *ngIf=\"config.searchConfig\" [config]=\"config.searchConfig\" style=\"margin-bottom: 20px;\" (searchClick)=\"searchClicked($event)\"></spa-search>\r\n\r\n\r\n<!-- Header -->\r\n<div class=\"top\">\r\n\r\n <!-- Unique to internal -->\r\n <div class=\"tin-row\">\r\n <button *ngIf=\"createButton && !config.flatButtons && testVisible(config.parentData,createButton.name)\"\r\n [disabled]=\"testDisabled(config.parentData,createButton.name)\" id=\"btnNew\" mat-raised-button color=\"primary\" style=\"margin-right: 10px;\" (click)=\"newModel()\">{{createButton.display}}\r\n </button>\r\n <button *ngIf=\"createButton && config.flatButtons && testVisible(config.parentData,createButton.name)\"\r\n [ngStyle]=\"{'color': getButtonColor(createButton, config.parentData)}\"\r\n [disabled]=\"testDisabled(config.parentData,createButton.name)\" id=\"btnNew\" mat-stroked-button style=\"margin-right: 10px; color: green;\" (click)=\"newModel()\">{{createButton.display}}\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"config.tileConfig && !smallScreen\" style=\"min-width: 75%;\">\r\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\r\n </div>\r\n\r\n <div *ngIf=\"config.showFilter\" class=\"d-flex justify-content-end\">\r\n <spa-filter [showText]=\"!smallScreen || (smallScreen && dataSource?.length > 10)\" [showButton]=\"showFilterButton\" [data]=\"tableDataSource\" [flatButtons]=\"config.flatButtons\" (refreshClick)=\"refreshClicked()\"></spa-filter>\r\n </div>\r\n\r\n</div>\r\n\r\n<div *ngIf=\"config.tileConfig && smallScreen\" style=\"width: 100%;\">\r\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\r\n</div>\r\n\r\n<div *ngIf=\"config.title && !hideTitle\" class=\"title\">\r\n <label style=\"font-size: larger;\">{{config.title | camelToWords}}</label>\r\n</div>\r\n\r\n<!-- Table -->\r\n<div>\r\n\r\n <p *ngIf=\"!config\"><em>Configure Table</em></p>\r\n <p *ngIf=\"!dataSource\"><em>Loading...</em></p>\r\n\r\n <div *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\">\r\n\r\n <table mat-table [dataSource]=\"tableDataSource\" [ngClass]=\"elevation\">\r\n\r\n <ng-container *ngFor=\"let column of config.columns\" [matColumnDef]=\"column.name\">\r\n <th mat-header-cell *matHeaderCellDef>{{ column.alias ?? column.name | camelToWords }}</th>\r\n <td mat-cell *matCellDef=\"let row;\" class=\"right-padding\">\r\n\r\n <!-- Rows -->\r\n <app-table-row [column]=\"column\" [row]=\"row\" [config]=\"config\" (actionClick)=\"actionClicked(column.name, row)\" (columnClick)=\"columnClicked(column, row)\" (showBannerEvent)=\"showBanner($event)\">\r\n </app-table-row>\r\n\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"action\">\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef=\"let row\" [ngStyle]=\"{width:false ? '50px' : actionsWidth}\">\r\n <div class=\"action-buttons-container\">\r\n\r\n <!-- Actions -->\r\n <app-table-action [displayedButtons]=\"displayedButtons\" [config]=\"config\" [row]=\"row\" (actionClick)=\"actionClicked($event.name, $event.row)\">\r\n </app-table-action>\r\n\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': config.greyOut && config.greyOut(row)}\"></tr>\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\" #tablePaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\r\n\r\n</div>\r\n\r\n<div class=\"tin-center\">\r\n <p *ngIf=\"dataSource?.length == 0\"><em>No Data</em></p>\r\n</div>\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.dialog-container{display:flex;flex-direction:column;height:100%}.dialog-content{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialog-scroll-content{flex:1;overflow-y:auto}mat-dialog-actions{flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i10.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i10.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i10.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i10.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i10.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i10.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i10.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i10.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i10.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i10.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i11$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "component", type: TilesComponent, selector: "spa-tiles", inputs: ["config", "data", "reload"], outputs: ["tileClick"] }, { kind: "component", type: SearchComponent, selector: "spa-search", inputs: ["config"], outputs: ["searchClick"] }, { kind: "component", type: TableRowComponent, selector: "app-table-row", inputs: ["column", "row", "config"], outputs: ["actionClick", "columnClick", "showBannerEvent"] }, { kind: "component", type: TableActionComponent, selector: "app-table-action", inputs: ["displayedButtons", "config", "row"], outputs: ["actionClick"] }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
4049
4215
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableInternalComponent, decorators: [{
4050
4216
  type: Component,
4051
- args: [{ selector: 'spa-table-internal', template: "\n<spa-search *ngIf=\"config.searchConfig\" [config]=\"config.searchConfig\" style=\"margin-bottom: 20px;\" (searchClick)=\"searchClicked($event)\"></spa-search>\n\n<div class=\"top\">\n\n <!-- Unique to internal -->\n <div class=\"tin-row\">\n <button *ngIf=\"createButton && !config.flatButtons && testVisible(config.parentData,createButton.name)\"\n [disabled]=\"testDisabled(config.parentData,createButton.name)\" id=\"btnNew\" mat-raised-button color=\"primary\" style=\"margin-right: 10px;\" (click)=\"newModel()\">{{createButton.display}}\n </button>\n <button *ngIf=\"createButton && config.flatButtons && testVisible(config.parentData,createButton.name)\"\n [ngStyle]=\"{'color': getButtonColor(createButton, config.parentData)}\"\n [disabled]=\"testDisabled(config.parentData,createButton.name)\" id=\"btnNew\" mat-stroked-button style=\"margin-right: 10px; color: green;\" (click)=\"newModel()\">{{createButton.display}}\n </button>\n </div>\n\n <div *ngIf=\"config.tileConfig && !smallScreen\" style=\"min-width: 75%;\">\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\n </div>\n\n <div *ngIf=\"config.showFilter\" class=\"d-flex justify-content-end\">\n <spa-filter [showText]=\"!smallScreen || (smallScreen && dataSource?.length > 10)\" [showButton]=\"showFilterButton\" [data]=\"tableDataSource\" [flatButtons]=\"config.flatButtons\" (refreshClick)=\"refreshClicked()\"></spa-filter>\n </div>\n\n</div>\n\n<div *ngIf=\"config.tileConfig && smallScreen\" style=\"width: 100%;\">\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\n</div>\n\n<div *ngIf=\"config.title && !hideTitle\" class=\"title\">\n <label style=\"font-size: larger;\">{{config.title | camelToWords}}</label>\n</div>\n\n<div>\n\n <p *ngIf=\"!config\"><em>Configure Table</em></p>\n <p *ngIf=\"!dataSource\"><em>Loading...</em></p>\n\n\n\n <div *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\">\n\n\n <table mat-table [dataSource]=\"tableDataSource\" [ngClass]=\"elevation\">\n <ng-container *ngFor=\"let column of config.columns\" [matColumnDef]=\"column.name\">\n <th mat-header-cell *matHeaderCellDef >{{ column.alias ?? column.name | camelToWords }}</th>\n <td mat-cell *matCellDef=\"let row;\" class=\"right-padding\" >\n\n <ng-container [ngSwitch]=\"column.type\">\n\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <spa-check [value]=\"row[column.name]\" [readonly]=\"true\"></spa-check>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'select'\">\n <spa-select [options]=\"column.options\" [optionDisplay]=\"column.optionDisplay\" [optionValue]=\"column.optionValue\" [(value)]=\"row[column.name]\" width=\"90%\" ></spa-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'chip'\">\n <mat-chip-list>\n <mat-chip (click)=\"columnClicked(column, row)\" [ngStyle]=\"{'background-color': testColorCondition(row, column.color) ? column.color.name : getColor(row[column.name], column?.options)}\" style=\"font-size: 12px;\"> {{row[column.name]}} </mat-chip>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'icon'\">\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'date'\">\n {{row[column.name] | date : 'dd/MM/yyyy'}}\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'datetime'\">\n {{row[column.name] | date : 'dd/MM/yyyy HH:mm'}}\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <!-- <ng-container *ngSwitchCase=\"'spinner'\">\n <mat-spinner [diameter]=\"20\">\n\n </mat-spinner>\n </ng-container> -->\n\n <ng-container *ngSwitchCase=\"'money'\">\n\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name] | currency:'':''}}</label>\n\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n\n <button mat-button [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\" (click)=\"actionClicked(column.name, row)\">{{row[column.name]}}</button>\n\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name]}}</label>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef> Action </th>\n <td mat-cell *matCellDef=\"let row\" [ngStyle]=\"{width:false ? '50px' : actionsWidth}\">\n\n\n <ng-container *ngFor=\"let button of displayedButtons\">\n\n <ng-container *ngIf=\"button.name != 'create' && testVisible(row,button.name)\">\n\n <button *ngIf=\"!config.flatButtons\" mat-mini-fab [matTooltip]=\"button.tip ?? button.name \" matTooltipPosition=\"above\" style=\"margin-right:5px\"\n [ngStyle]=\"{'background-color':getButtonColor(button, row)}\"\n [disabled]=\"testDisabled(row,button.name)\" (click)=\"actionClicked(button.name, row)\">\n <mat-icon>{{getIcon(button.name)}}</mat-icon>\n </button>\n\n <button *ngIf=\"config.flatButtons\" mat-icon-button [matTooltip]=\"button.tip ?? button.name \" matTooltipPosition=\"above\" style=\"margin-right:5px\"\n [disabled]=\"testDisabled(row,button.name)\" (click)=\"actionClicked(button.name, row)\">\n <mat-icon [ngStyle]=\"{'color':getButtonColor(button, row)}\">{{getIcon(button.name)}}</mat-icon>\n </button>\n\n </ng-container>\n\n <ng-container *ngIf=\"button.name != 'create' && !testVisible(row,button.name)\">\n <label style=\"margin-right: 35px;\"></label>\n </ng-container>\n\n </ng-container>\n\n\n </td>\n </ng-container>\n\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': config.greyOut && config.greyOut(row)}\"></tr>\n </table>\n\n </div>\n\n <mat-paginator *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\" #tablePaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\n\n</div>\n\n<div class=\"tin-center\">\n <p *ngIf=\"dataSource?.length == 0\"><em>No Data</em></p>\n</div>\n\n\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}\n"] }]
4052
- }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: MessageService }, { type: i3$3.BreakpointObserver }, { type: i4.MatDialog }]; }, propDecorators: { tablePaginator: [{
4217
+ args: [{ selector: 'spa-table-internal', template: "\r\n<!-- Search -->\r\n<spa-search *ngIf=\"config.searchConfig\" [config]=\"config.searchConfig\" style=\"margin-bottom: 20px;\" (searchClick)=\"searchClicked($event)\"></spa-search>\r\n\r\n\r\n<!-- Header -->\r\n<div class=\"top\">\r\n\r\n <!-- Unique to internal -->\r\n <div class=\"tin-row\">\r\n <button *ngIf=\"createButton && !config.flatButtons && testVisible(config.parentData,createButton.name)\"\r\n [disabled]=\"testDisabled(config.parentData,createButton.name)\" id=\"btnNew\" mat-raised-button color=\"primary\" style=\"margin-right: 10px;\" (click)=\"newModel()\">{{createButton.display}}\r\n </button>\r\n <button *ngIf=\"createButton && config.flatButtons && testVisible(config.parentData,createButton.name)\"\r\n [ngStyle]=\"{'color': getButtonColor(createButton, config.parentData)}\"\r\n [disabled]=\"testDisabled(config.parentData,createButton.name)\" id=\"btnNew\" mat-stroked-button style=\"margin-right: 10px; color: green;\" (click)=\"newModel()\">{{createButton.display}}\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"config.tileConfig && !smallScreen\" style=\"min-width: 75%;\">\r\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\r\n </div>\r\n\r\n <div *ngIf=\"config.showFilter\" class=\"d-flex justify-content-end\">\r\n <spa-filter [showText]=\"!smallScreen || (smallScreen && dataSource?.length > 10)\" [showButton]=\"showFilterButton\" [data]=\"tableDataSource\" [flatButtons]=\"config.flatButtons\" (refreshClick)=\"refreshClicked()\"></spa-filter>\r\n </div>\r\n\r\n</div>\r\n\r\n<div *ngIf=\"config.tileConfig && smallScreen\" style=\"width: 100%;\">\r\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\r\n</div>\r\n\r\n<div *ngIf=\"config.title && !hideTitle\" class=\"title\">\r\n <label style=\"font-size: larger;\">{{config.title | camelToWords}}</label>\r\n</div>\r\n\r\n<!-- Table -->\r\n<div>\r\n\r\n <p *ngIf=\"!config\"><em>Configure Table</em></p>\r\n <p *ngIf=\"!dataSource\"><em>Loading...</em></p>\r\n\r\n <div *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\">\r\n\r\n <table mat-table [dataSource]=\"tableDataSource\" [ngClass]=\"elevation\">\r\n\r\n <ng-container *ngFor=\"let column of config.columns\" [matColumnDef]=\"column.name\">\r\n <th mat-header-cell *matHeaderCellDef>{{ column.alias ?? column.name | camelToWords }}</th>\r\n <td mat-cell *matCellDef=\"let row;\" class=\"right-padding\">\r\n\r\n <!-- Rows -->\r\n <app-table-row [column]=\"column\" [row]=\"row\" [config]=\"config\" (actionClick)=\"actionClicked(column.name, row)\" (columnClick)=\"columnClicked(column, row)\" (showBannerEvent)=\"showBanner($event)\">\r\n </app-table-row>\r\n\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"action\">\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef=\"let row\" [ngStyle]=\"{width:false ? '50px' : actionsWidth}\">\r\n <div class=\"action-buttons-container\">\r\n\r\n <!-- Actions -->\r\n <app-table-action [displayedButtons]=\"displayedButtons\" [config]=\"config\" [row]=\"row\" (actionClick)=\"actionClicked($event.name, $event.row)\">\r\n </app-table-action>\r\n\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': config.greyOut && config.greyOut(row)}\"></tr>\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\" #tablePaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\r\n\r\n</div>\r\n\r\n<div class=\"tin-center\">\r\n <p *ngIf=\"dataSource?.length == 0\"><em>No Data</em></p>\r\n</div>\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.dialog-container{display:flex;flex-direction:column;height:100%}.dialog-content{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialog-scroll-content{flex:1;overflow-y:auto}mat-dialog-actions{flex-shrink:0}\n"] }]
4218
+ }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: MessageService }, { type: i3$1.BreakpointObserver }, { type: i4.MatDialog }, { type: ButtonService }, { type: DialogService }, { type: TableConfigService }, { type: ConditionService }]; }, propDecorators: { tablePaginator: [{
4053
4219
  type: ViewChild,
4054
4220
  args: ['tablePaginator']
4055
4221
  }], hideTitle: [{
@@ -4075,13 +4241,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
4075
4241
  }] } });
4076
4242
 
4077
4243
  class DetailsDialog {
4078
- constructor(breakpointObserver, loaderService, dataService, messageService, dialogRef, detailsConfig) {
4244
+ constructor(breakpointObserver, loaderService, dataService, messageService, dialogRef, detailsConfig, buttonService, dialogService) {
4079
4245
  this.breakpointObserver = breakpointObserver;
4080
4246
  this.loaderService = loaderService;
4081
4247
  this.dataService = dataService;
4082
4248
  this.messageService = messageService;
4083
4249
  this.dialogRef = dialogRef;
4084
4250
  this.detailsConfig = detailsConfig;
4251
+ this.buttonService = buttonService;
4252
+ this.dialogService = dialogService;
4085
4253
  this.titleAction = "View";
4086
4254
  this.loadByAction = false;
4087
4255
  this.files = [];
@@ -4154,194 +4322,172 @@ class DetailsDialog {
4154
4322
  this.setTitleAction();
4155
4323
  }
4156
4324
  setTitleAction() {
4157
- if (this.buttons) {
4158
- if (this.formConfig.mode == "view") {
4159
- this.titleAction = "View";
4160
- }
4161
- else if (this.formConfig.mode == "edit") {
4162
- this.titleAction = this.editButton.display ? this.editButton.display : "Edit";
4163
- }
4164
- else if (this.formConfig.mode == "create") {
4165
- this.titleAction = this.createButton.display ? this.createButton.display : "Create";
4166
- }
4167
- }
4325
+ this.titleAction = this.buttonService.getTitleAction(this.formConfig.mode, this.buttons);
4168
4326
  }
4169
4327
  getButton(name) {
4170
- if (!this.buttons) {
4171
- console.log("No buttons found");
4172
- return null;
4173
- }
4174
- return this.buttons.find(x => x.name == name);
4328
+ return this.buttonService.getButton(this.buttons, name);
4175
4329
  }
4176
4330
  testDisabled(row, buttonName) {
4177
- let button = this.getButton(buttonName);
4178
- if (button.disabled) {
4179
- let r = button.disabled(row);
4180
- return r;
4181
- }
4182
- return false;
4331
+ const button = this.getButton(buttonName);
4332
+ return button ? this.buttonService.isButtonDisabled(button, row) : false;
4183
4333
  }
4184
4334
  testVisible(row, buttonName) {
4185
- if (!this.isLoadComplete)
4186
- return false;
4187
- let button = this.getButton(buttonName);
4188
- if (button.visible) {
4189
- return button.visible(row);
4190
- }
4191
- return true;
4335
+ const button = this.getButton(buttonName);
4336
+ return button ? this.buttonService.isButtonVisible(button, row, this.isLoadComplete) : false;
4192
4337
  }
4193
4338
  testVisibleTab(tblConfig) {
4194
- if (tblConfig.hideTabCondition) {
4195
- return !tblConfig.hideTabCondition(tblConfig.parentData);
4196
- }
4197
- return true;
4339
+ return this.buttonService.isTabVisible(tblConfig);
4198
4340
  }
4199
4341
  getButtonColor(button, row) {
4200
- if (button.disabled) {
4201
- if (button.disabled(row)) {
4202
- return 'lightgray';
4203
- }
4204
- }
4205
- if (button.icon.color) {
4206
- return button.icon.color;
4207
- }
4208
- if (button.name == 'delete') {
4209
- return '#F44336';
4210
- }
4211
- if (button.name == 'create') {
4212
- return 'green';
4213
- }
4214
- return ' #4050B5';
4342
+ return this.buttonService.getButtonColor(button, row);
4215
4343
  }
4216
4344
  create() {
4217
- // console.log(this.details)
4218
- //validation
4219
- let resp = Core.validateObject(this.formConfig.fields, this.details);
4220
- if (resp != '') {
4221
- this.messageService.toast(resp);
4222
- return;
4223
- }
4224
- // File Validation---
4225
- if (this.files.length < 1 && this.fileField?.required) {
4226
- this.messageService.toast("Please attach file(s)");
4345
+ this.handleButtonAction('create');
4346
+ }
4347
+ edit() {
4348
+ this.handleButtonAction('edit');
4349
+ }
4350
+ delete() {
4351
+ this.handleButtonAction('delete');
4352
+ }
4353
+ custom(button) {
4354
+ this.handleButtonAction(button.name);
4355
+ }
4356
+ handleButtonAction(buttonName) {
4357
+ const button = this.getButton(buttonName);
4358
+ if (!button)
4227
4359
  return;
4228
- }
4229
- // File Validation---
4230
- let createButton = this.detailsConfig.buttons.find(x => x.name == "create");
4231
- if (!createButton || !createButton.action) {
4360
+ if (!button.action) {
4232
4361
  this.dialogRef.close({ message: 'emit', data: this.details });
4233
4362
  return;
4234
4363
  }
4235
- //coversion--
4236
- let dataOut;
4237
- if (createButton.action.isFormData) {
4238
- let formData = new FormData();
4239
- for (let i = 0; i < this.files.length; i++) {
4240
- formData.append(`uploadFile${i}`, this.files[i], this.files[i].name);
4241
- }
4242
- formData.append("data", JSON.stringify(this.details));
4243
- // console.log(formData)
4244
- dataOut = formData;
4245
- }
4246
- else {
4247
- dataOut = this.details;
4364
+ if (this.validateForm()) {
4365
+ this.executeAction(button, this.details, button.action?.successMessage || `${buttonName}d`);
4248
4366
  }
4249
- //coversion--
4250
- this.exec(createButton, dataOut, "Created");
4251
4367
  }
4252
- edit() {
4253
- //validation
4254
- let resp = Core.validateObject(this.formConfig.fields, this.details);
4255
- if (resp != '') {
4256
- this.messageService.toast(resp);
4257
- return;
4368
+ validateForm() {
4369
+ const validationResult = Core.validateObject(this.formConfig.fields, this.details);
4370
+ if (validationResult !== '') {
4371
+ this.messageService.toast(validationResult);
4372
+ return false;
4258
4373
  }
4259
- let editButton = this.detailsConfig.buttons.find(x => x.name == "edit");
4260
- if (!editButton || !editButton.action) {
4261
- this.dialogRef.close({ message: 'emit', data: this.details });
4262
- return;
4374
+ if (this.files.length < 1 && this.fileField?.required && this.formConfig.mode === 'create') {
4375
+ this.messageService.toast("Please attach file(s)");
4376
+ return false;
4263
4377
  }
4264
- //coversion--
4265
- let dataOut;
4266
- if (editButton.action.isFormData) {
4267
- let formData = new FormData();
4378
+ return true;
4379
+ }
4380
+ prepareActionData(button, data) {
4381
+ if (button.action?.isFormData) {
4382
+ const formData = new FormData();
4268
4383
  for (let i = 0; i < this.files.length; i++) {
4269
4384
  formData.append(`uploadFile${i}`, this.files[i], this.files[i].name);
4270
4385
  }
4271
- formData.append("data", JSON.stringify(this.details));
4272
- // console.log(formData)
4273
- dataOut = formData;
4274
- }
4275
- else {
4276
- dataOut = this.details;
4277
- }
4278
- //coversion--
4279
- this.exec(editButton, dataOut, "Updated");
4280
- }
4281
- delete() {
4282
- let deleteButton = this.detailsConfig.buttons.find(x => x.name == "delete");
4283
- if (!deleteButton) {
4284
- this.dialogRef.close({ message: 'success', data: this.details });
4285
- return;
4386
+ formData.append("data", JSON.stringify(data));
4387
+ return formData;
4286
4388
  }
4287
- deleteButton.confirm = { message: "DELETE ?" };
4288
- this.exec(deleteButton, this.details, "Deleted");
4289
- }
4290
- custom(button) {
4291
- this.exec(button, this.details, "Updated");
4389
+ return data;
4292
4390
  }
4293
- exec(button, details, defaultSuccessMessages) {
4391
+ executeAction(button, data, defaultSuccessMessage) {
4392
+ const actionData = this.prepareActionData(button, data);
4294
4393
  if (button.confirm) {
4295
4394
  this.messageService.confirm(button.confirm.message).subscribe((result) => {
4296
- if (result == "yes") {
4297
- this.execAPI(button, details, defaultSuccessMessages);
4395
+ if (result === "yes") {
4396
+ this.performApiCall(button, actionData, defaultSuccessMessage);
4298
4397
  }
4299
4398
  });
4300
4399
  }
4301
4400
  else {
4302
- this.execAPI(button, details, defaultSuccessMessages);
4401
+ this.performApiCall(button, actionData, defaultSuccessMessage);
4303
4402
  }
4304
4403
  }
4305
- execAPI(button, details, defaultSuccessMessage) {
4306
- this.dataService.CallApi(button.action, details).subscribe((apiResponse) => {
4404
+ performApiCall(button, data, defaultSuccessMessage) {
4405
+ this.dataService.CallApi(button.action, data).subscribe((apiResponse) => {
4307
4406
  if (apiResponse.success) {
4308
- if (button.action.successMessage) {
4309
- this.messageService.toast(button.action.successMessage);
4310
- }
4311
- else {
4312
- this.messageService.toast(defaultSuccessMessage);
4313
- }
4314
- this.dialogRef.close({ message: 'success', data: details });
4407
+ this.messageService.toast(button.action?.successMessage || defaultSuccessMessage);
4408
+ this.dialogRef.close({ message: 'success', data: this.details });
4315
4409
  }
4316
4410
  else {
4317
- this.messageService.toast("Error: " + apiResponse);
4411
+ this.messageService.toast("Error: " + apiResponse.message);
4318
4412
  }
4319
4413
  });
4320
4414
  }
4321
4415
  }
4322
- DetailsDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DetailsDialog, deps: [{ token: i3$3.BreakpointObserver }, { token: LoaderService }, { token: DataServiceLib }, { token: MessageService }, { token: i4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
4323
- DetailsDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DetailsDialog, selector: "app-viewModel", outputs: { inputChange: "inputChange" }, ngImport: i0, template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isProcessing\"></mat-progress-bar>\r\n<div class=\"row d-flex align-items-center mt-0\">\r\n\r\n <div class=\"col\">\r\n <h2 mat-dialog-title>{{titleAction | titlecase}} {{formConfig?.title}}</h2>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\">\r\n\r\n <div *ngIf=\"formConfig.mode=='view' && editButton && testVisible(details,editButton.name)\" class=\"col d-flex justify-content-end\">\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Edit\" color=\"primary\" (click)=\"setMode('edit')\" [disabled]=\"testDisabled(details,editButton.name)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <button [disabled]=\"isProcessing\" *ngIf=\"loadByAction\" mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Refresh\" color=\"primary\" (click)=\"loadData(formConfig.loadAction, true)\"><mat-icon class=\"refreshIcon\">cached</mat-icon></button>\r\n </div>\r\n\r\n</div>\r\n\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n<div class=\"tin-input\" style=\"font-size:14px\">\r\n\r\n<p *ngIf=\"formConfig && !details\"><em>Loading...</em></p>\r\n\r\n<spa-form *ngIf=\"formConfig && details\" [files]=\"files\" [data]=\"details\" [config]=\"formConfig\" (inputChange)=\"inputChanged($event)\"></spa-form>\r\n\r\n<div *ngIf=\"tableConfig\" class=\"mt-3\" style=\" font-size: 14px;\">\r\n <spa-table-internal [config]=\"tableConfig\" [reload]=\"tableReload\" ></spa-table-internal>\r\n</div>\r\n\r\n<mat-tab-group *ngIf=\"tableConfigs\">\r\n\r\n <ng-container *ngFor=\"let tbl of tableConfigs\">\r\n\r\n <mat-tab *ngIf=\"testVisibleTab(tbl)\">\r\n <ng-template matTabLabel>\r\n <span>{{tbl.title}}</span>\r\n </ng-template>\r\n\r\n <spa-table-internal [config]=\"tbl\" [hideTitle]=\"true\" [reload]=\"tableReload\" ></spa-table-internal>\r\n\r\n </mat-tab>\r\n </ng-container>\r\n\r\n\r\n</mat-tab-group>\r\n\r\n\r\n\r\n</div>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n\r\n <div>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='create' && createButton\"\r\n (click)=\"create()\" cdkFocusInitial>{{createButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='edit' && editButton\"\r\n (click)=\"edit()\" cdkFocusInitial>{{editButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let btn of extraButtons\" >\r\n <button *ngIf=\"!smallScreen && testVisible(details,btn.name)\" mat-stroked-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\"\r\n (click)=\"custom(btn)\" cdkFocusInitial><mat-icon [ngStyle]=\"{'color': getButtonColor(btn, details)}\">{{btn.icon.name}}</mat-icon>{{btn.display ?? btn.name}}\r\n </button>\r\n </ng-container>\r\n\r\n\r\n <button mat-stroked-button color=\"primary\" mat-dialog-close>Cancel</button>\r\n\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\" *ngIf=\"smallScreen\">\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"testVisible(details,btn.name)\" mat-icon-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\"\r\n (click)=\"custom(btn)\" cdkFocusInitial><mat-icon>{{btn.icon.name}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button [disabled]=\"isProcessing\" style=\"color: red;\" (click)=\"delete()\" *ngIf=\"formConfig.mode!='create' && deleteButton\"><mat-icon>delete</mat-icon></button>\r\n </div>\r\n\r\n\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i9.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "directive", type: i9.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i9.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i10$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: TableInternalComponent, selector: "spa-table-internal", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }, { kind: "component", type: FormComponent, selector: "spa-form", inputs: ["files", "data", "config"], outputs: ["buttonClick", "inputChange"] }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }] });
4416
+ DetailsDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DetailsDialog, deps: [{ token: i3$1.BreakpointObserver }, { token: LoaderService }, { token: DataServiceLib }, { token: MessageService }, { token: i4.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: ButtonService }, { token: DialogService }], target: i0.ɵɵFactoryTarget.Component });
4417
+ DetailsDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DetailsDialog, selector: "app-viewModel", outputs: { inputChange: "inputChange" }, ngImport: i0, template: "<div class=\"dialog-container\">\r\n\r\n <div class=\"dialog-content\">\r\n\r\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isProcessing\"></mat-progress-bar>\r\n <div class=\"row d-flex align-items-center mt-0\">\r\n\r\n <div class=\"col\">\r\n <h2 mat-dialog-title>{{titleAction | titlecase}} {{formConfig?.title}}</h2>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\">\r\n\r\n <div *ngIf=\"formConfig.mode=='view' && editButton && testVisible(details,editButton.name)\" class=\"col d-flex justify-content-end\">\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Edit\" color=\"primary\" (click)=\"setMode('edit')\" [disabled]=\"testDisabled(details,editButton.name)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <button [disabled]=\"isProcessing\" *ngIf=\"loadByAction\" mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Refresh\" color=\"primary\" (click)=\"loadData(formConfig.loadAction, true)\"><mat-icon class=\"refreshIcon\">cached</mat-icon></button>\r\n </div>\r\n\r\n </div>\r\n\r\n <mat-dialog-content class=\"mat-typography dialog-scroll-content\">\r\n\r\n <div class=\"tin-input\" style=\"font-size:14px\">\r\n\r\n <p *ngIf=\"formConfig && !details\"><em>Loading...</em></p>\r\n\r\n <spa-form *ngIf=\"formConfig && details\" [files]=\"files\" [data]=\"details\" [config]=\"formConfig\" (inputChange)=\"inputChanged($event)\"></spa-form>\r\n\r\n\r\n <mat-tab-group *ngIf=\"tableConfigs\">\r\n\r\n <ng-container *ngFor=\"let tbl of tableConfigs\">\r\n\r\n <mat-tab *ngIf=\"testVisibleTab(tbl)\">\r\n <ng-template matTabLabel>\r\n <span>{{tbl.title}}</span>\r\n </ng-template>\r\n\r\n <spa-table-internal [config]=\"tbl\" [hideTitle]=\"true\" [reload]=\"tableReload\"></spa-table-internal>\r\n\r\n </mat-tab>\r\n </ng-container>\r\n\r\n\r\n </mat-tab-group>\r\n\r\n\r\n\r\n </div>\r\n\r\n </mat-dialog-content>\r\n\r\n\r\n </div>\r\n\r\n <mat-dialog-actions >\r\n\r\n <div>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='create' && createButton\" (click)=\"create()\" cdkFocusInitial>{{createButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='edit' && editButton\" (click)=\"edit()\" cdkFocusInitial>{{editButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"!smallScreen && testVisible(details,btn.name)\" mat-stroked-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon [ngStyle]=\"{'color': getButtonColor(btn, details)}\">{{btn.icon.name}}</mat-icon>{{btn.display ?? btn.name | titlecase}}\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-stroked-button color=\"primary\" mat-dialog-close>Cancel</button>\r\n\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\" *ngIf=\"smallScreen\">\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"testVisible(details,btn.name)\" mat-icon-button matTooltipPosition=\"above\" [matTooltip]=\"btn.tip ?? btn.name | titlecase\" [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon>{{btn.icon.name}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Delete\" [disabled]=\"isProcessing\" style=\"color: red;\" (click)=\"delete()\" *ngIf=\"formConfig.mode!='create' && deleteButton\"><mat-icon>delete</mat-icon></button>\r\n </div>\r\n\r\n\r\n </mat-dialog-actions>\r\n\r\n\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.dialog-container{display:flex;flex-direction:column;height:100%}.dialog-content{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialog-scroll-content{flex:1;overflow-y:auto}mat-dialog-actions{flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i11$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "directive", type: i11$2.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i11$2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i12$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: TableInternalComponent, selector: "spa-table-internal", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }, { kind: "component", type: FormComponent, selector: "spa-form", inputs: ["files", "data", "config"], outputs: ["buttonClick", "inputChange"] }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }] });
4324
4418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DetailsDialog, decorators: [{
4325
4419
  type: Component,
4326
- args: [{ selector: 'app-viewModel', template: "<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isProcessing\"></mat-progress-bar>\r\n<div class=\"row d-flex align-items-center mt-0\">\r\n\r\n <div class=\"col\">\r\n <h2 mat-dialog-title>{{titleAction | titlecase}} {{formConfig?.title}}</h2>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\">\r\n\r\n <div *ngIf=\"formConfig.mode=='view' && editButton && testVisible(details,editButton.name)\" class=\"col d-flex justify-content-end\">\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Edit\" color=\"primary\" (click)=\"setMode('edit')\" [disabled]=\"testDisabled(details,editButton.name)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <button [disabled]=\"isProcessing\" *ngIf=\"loadByAction\" mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Refresh\" color=\"primary\" (click)=\"loadData(formConfig.loadAction, true)\"><mat-icon class=\"refreshIcon\">cached</mat-icon></button>\r\n </div>\r\n\r\n</div>\r\n\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n<div class=\"tin-input\" style=\"font-size:14px\">\r\n\r\n<p *ngIf=\"formConfig && !details\"><em>Loading...</em></p>\r\n\r\n<spa-form *ngIf=\"formConfig && details\" [files]=\"files\" [data]=\"details\" [config]=\"formConfig\" (inputChange)=\"inputChanged($event)\"></spa-form>\r\n\r\n<div *ngIf=\"tableConfig\" class=\"mt-3\" style=\" font-size: 14px;\">\r\n <spa-table-internal [config]=\"tableConfig\" [reload]=\"tableReload\" ></spa-table-internal>\r\n</div>\r\n\r\n<mat-tab-group *ngIf=\"tableConfigs\">\r\n\r\n <ng-container *ngFor=\"let tbl of tableConfigs\">\r\n\r\n <mat-tab *ngIf=\"testVisibleTab(tbl)\">\r\n <ng-template matTabLabel>\r\n <span>{{tbl.title}}</span>\r\n </ng-template>\r\n\r\n <spa-table-internal [config]=\"tbl\" [hideTitle]=\"true\" [reload]=\"tableReload\" ></spa-table-internal>\r\n\r\n </mat-tab>\r\n </ng-container>\r\n\r\n\r\n</mat-tab-group>\r\n\r\n\r\n\r\n</div>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n\r\n <div>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='create' && createButton\"\r\n (click)=\"create()\" cdkFocusInitial>{{createButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='edit' && editButton\"\r\n (click)=\"edit()\" cdkFocusInitial>{{editButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let btn of extraButtons\" >\r\n <button *ngIf=\"!smallScreen && testVisible(details,btn.name)\" mat-stroked-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\"\r\n (click)=\"custom(btn)\" cdkFocusInitial><mat-icon [ngStyle]=\"{'color': getButtonColor(btn, details)}\">{{btn.icon.name}}</mat-icon>{{btn.display ?? btn.name}}\r\n </button>\r\n </ng-container>\r\n\r\n\r\n <button mat-stroked-button color=\"primary\" mat-dialog-close>Cancel</button>\r\n\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\" *ngIf=\"smallScreen\">\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"testVisible(details,btn.name)\" mat-icon-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\"\r\n (click)=\"custom(btn)\" cdkFocusInitial><mat-icon>{{btn.icon.name}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button [disabled]=\"isProcessing\" style=\"color: red;\" (click)=\"delete()\" *ngIf=\"formConfig.mode!='create' && deleteButton\"><mat-icon>delete</mat-icon></button>\r\n </div>\r\n\r\n\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"] }]
4327
- }], ctorParameters: function () { return [{ type: i3$3.BreakpointObserver }, { type: LoaderService }, { type: DataServiceLib }, { type: MessageService }, { type: i4.MatDialogRef }, { type: DetailsDialogConfig, decorators: [{
4420
+ args: [{ selector: 'app-viewModel', template: "<div class=\"dialog-container\">\r\n\r\n <div class=\"dialog-content\">\r\n\r\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isProcessing\"></mat-progress-bar>\r\n <div class=\"row d-flex align-items-center mt-0\">\r\n\r\n <div class=\"col\">\r\n <h2 mat-dialog-title>{{titleAction | titlecase}} {{formConfig?.title}}</h2>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\">\r\n\r\n <div *ngIf=\"formConfig.mode=='view' && editButton && testVisible(details,editButton.name)\" class=\"col d-flex justify-content-end\">\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Edit\" color=\"primary\" (click)=\"setMode('edit')\" [disabled]=\"testDisabled(details,editButton.name)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <button [disabled]=\"isProcessing\" *ngIf=\"loadByAction\" mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Refresh\" color=\"primary\" (click)=\"loadData(formConfig.loadAction, true)\"><mat-icon class=\"refreshIcon\">cached</mat-icon></button>\r\n </div>\r\n\r\n </div>\r\n\r\n <mat-dialog-content class=\"mat-typography dialog-scroll-content\">\r\n\r\n <div class=\"tin-input\" style=\"font-size:14px\">\r\n\r\n <p *ngIf=\"formConfig && !details\"><em>Loading...</em></p>\r\n\r\n <spa-form *ngIf=\"formConfig && details\" [files]=\"files\" [data]=\"details\" [config]=\"formConfig\" (inputChange)=\"inputChanged($event)\"></spa-form>\r\n\r\n\r\n <mat-tab-group *ngIf=\"tableConfigs\">\r\n\r\n <ng-container *ngFor=\"let tbl of tableConfigs\">\r\n\r\n <mat-tab *ngIf=\"testVisibleTab(tbl)\">\r\n <ng-template matTabLabel>\r\n <span>{{tbl.title}}</span>\r\n </ng-template>\r\n\r\n <spa-table-internal [config]=\"tbl\" [hideTitle]=\"true\" [reload]=\"tableReload\"></spa-table-internal>\r\n\r\n </mat-tab>\r\n </ng-container>\r\n\r\n\r\n </mat-tab-group>\r\n\r\n\r\n\r\n </div>\r\n\r\n </mat-dialog-content>\r\n\r\n\r\n </div>\r\n\r\n <mat-dialog-actions >\r\n\r\n <div>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='create' && createButton\" (click)=\"create()\" cdkFocusInitial>{{createButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <button mat-raised-button [disabled]=\"isProcessing\" color=\"primary\" *ngIf=\"formConfig.mode=='edit' && editButton\" (click)=\"edit()\" cdkFocusInitial>{{editButton.display ?? 'Submit'}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"!smallScreen && testVisible(details,btn.name)\" mat-stroked-button [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon [ngStyle]=\"{'color': getButtonColor(btn, details)}\">{{btn.icon.name}}</mat-icon>{{btn.display ?? btn.name | titlecase}}\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-stroked-button color=\"primary\" mat-dialog-close>Cancel</button>\r\n\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-end\" *ngIf=\"smallScreen\">\r\n <ng-container *ngFor=\"let btn of extraButtons\">\r\n <button *ngIf=\"testVisible(details,btn.name)\" mat-icon-button matTooltipPosition=\"above\" [matTooltip]=\"btn.tip ?? btn.name | titlecase\" [disabled]=\"isProcessing || testDisabled(details,btn.name)\" [ngStyle]=\"{'color': getButtonColor(btn, details)}\" (click)=\"custom(btn)\" cdkFocusInitial><mat-icon>{{btn.icon.name}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button matTooltipPosition=\"above\" matTooltip=\"Delete\" [disabled]=\"isProcessing\" style=\"color: red;\" (click)=\"delete()\" *ngIf=\"formConfig.mode!='create' && deleteButton\"><mat-icon>delete</mat-icon></button>\r\n </div>\r\n\r\n\r\n </mat-dialog-actions>\r\n\r\n\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.dialog-container{display:flex;flex-direction:column;height:100%}.dialog-content{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialog-scroll-content{flex:1;overflow-y:auto}mat-dialog-actions{flex-shrink:0}\n"] }]
4421
+ }], ctorParameters: function () { return [{ type: i3$1.BreakpointObserver }, { type: LoaderService }, { type: DataServiceLib }, { type: MessageService }, { type: i4.MatDialogRef }, { type: DetailsDialogConfig, decorators: [{
4328
4422
  type: Inject,
4329
4423
  args: [MAT_DIALOG_DATA]
4330
- }] }]; }, propDecorators: { inputChange: [{
4424
+ }] }, { type: ButtonService }, { type: DialogService }]; }, propDecorators: { inputChange: [{
4331
4425
  type: Output
4332
4426
  }] } });
4333
4427
  ;
4334
4428
 
4429
+ class TableHeaderComponent {
4430
+ constructor() {
4431
+ this.createClick = new EventEmitter();
4432
+ this.refreshClick = new EventEmitter();
4433
+ this.tileClick = new EventEmitter();
4434
+ }
4435
+ onCreateClick() {
4436
+ this.createClick.emit();
4437
+ }
4438
+ onRefreshClick() {
4439
+ this.refreshClick.emit();
4440
+ }
4441
+ onTileClick(tileName) {
4442
+ this.tileClick.emit(tileName);
4443
+ }
4444
+ }
4445
+ TableHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4446
+ TableHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableHeaderComponent, selector: "app-table-header", inputs: { config: "config", hideTitle: "hideTitle", tableDataSource: "tableDataSource", createButton: "createButton", tileConfig: "tileConfig", smallScreen: "smallScreen", tileReload: "tileReload", showFilterButton: "showFilterButton" }, outputs: { createClick: "createClick", refreshClick: "refreshClick", tileClick: "tileClick" }, ngImport: i0, template: "<div class=\"top\">\r\n <div class=\"tin-row\">\r\n <ng-container *ngIf=\"createButton\">\r\n <button *ngIf=\"!config.flatButtons\" mat-raised-button color=\"primary\" (click)=\"onCreateClick()\" style=\"margin-right: 10px;\">\r\n {{createButton.display}}\r\n </button>\r\n <button *ngIf=\"config.flatButtons\" mat-stroked-button (click)=\"onCreateClick()\" style=\"margin-right: 10px; color: green;\">\r\n {{createButton.display}}\r\n </button>\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"config.tileConfig && !smallScreen\" style=\"min-width: 75%;\">\r\n <spa-tiles [config]=\"config.tileConfig\" [reload]=\"tileReload\" (tileClick)=\"onTileClick($event)\"></spa-tiles>\r\n </div>\r\n\r\n <div *ngIf=\"config.showFilter\" class=\"d-flex justify-content-end\">\r\n <spa-filter [showText]=\"!smallScreen || (smallScreen && tableDataSource?.length > 10)\" [showButton]=\"showFilterButton\" [data]=\"tableDataSource\" [flatButtons]=\"config.flatButtons\" (refreshClick)=\"onRefreshClick()\"></spa-filter>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"config.tileConfig && smallScreen\" style=\"width: 100%;\">\r\n <spa-tiles [config]=\"config.tileConfig\" [reload]=\"tileReload\" (tileClick)=\"onTileClick($event)\"></spa-tiles>\r\n</div>\r\n\r\n<div *ngIf=\"config.title && !hideTitle\" class=\"title\">\r\n {{config.title | camelToWords}}\r\n</div>\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.tin-row{display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "component", type: TilesComponent, selector: "spa-tiles", inputs: ["config", "data", "reload"], outputs: ["tileClick"] }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
4447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableHeaderComponent, decorators: [{
4448
+ type: Component,
4449
+ args: [{ selector: 'app-table-header', template: "<div class=\"top\">\r\n <div class=\"tin-row\">\r\n <ng-container *ngIf=\"createButton\">\r\n <button *ngIf=\"!config.flatButtons\" mat-raised-button color=\"primary\" (click)=\"onCreateClick()\" style=\"margin-right: 10px;\">\r\n {{createButton.display}}\r\n </button>\r\n <button *ngIf=\"config.flatButtons\" mat-stroked-button (click)=\"onCreateClick()\" style=\"margin-right: 10px; color: green;\">\r\n {{createButton.display}}\r\n </button>\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"config.tileConfig && !smallScreen\" style=\"min-width: 75%;\">\r\n <spa-tiles [config]=\"config.tileConfig\" [reload]=\"tileReload\" (tileClick)=\"onTileClick($event)\"></spa-tiles>\r\n </div>\r\n\r\n <div *ngIf=\"config.showFilter\" class=\"d-flex justify-content-end\">\r\n <spa-filter [showText]=\"!smallScreen || (smallScreen && tableDataSource?.length > 10)\" [showButton]=\"showFilterButton\" [data]=\"tableDataSource\" [flatButtons]=\"config.flatButtons\" (refreshClick)=\"onRefreshClick()\"></spa-filter>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"config.tileConfig && smallScreen\" style=\"width: 100%;\">\r\n <spa-tiles [config]=\"config.tileConfig\" [reload]=\"tileReload\" (tileClick)=\"onTileClick($event)\"></spa-tiles>\r\n</div>\r\n\r\n<div *ngIf=\"config.title && !hideTitle\" class=\"title\">\r\n {{config.title | camelToWords}}\r\n</div>\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.tin-row{display:flex;align-items:center}\n"] }]
4450
+ }], propDecorators: { config: [{
4451
+ type: Input
4452
+ }], hideTitle: [{
4453
+ type: Input
4454
+ }], tableDataSource: [{
4455
+ type: Input
4456
+ }], createButton: [{
4457
+ type: Input
4458
+ }], tileConfig: [{
4459
+ type: Input
4460
+ }], smallScreen: [{
4461
+ type: Input
4462
+ }], tileReload: [{
4463
+ type: Input
4464
+ }], showFilterButton: [{
4465
+ type: Input
4466
+ }], createClick: [{
4467
+ type: Output
4468
+ }], refreshClick: [{
4469
+ type: Output
4470
+ }], tileClick: [{
4471
+ type: Output
4472
+ }] } });
4473
+
4335
4474
  class TableComponent {
4336
- constructor(dataService, messageService, breakpointObserver, dialog) {
4475
+ constructor(dataService, messageService, breakpointObserver, dialog, buttonService, dialogService, tableConfigService, conditionService) {
4337
4476
  this.dataService = dataService;
4338
4477
  this.messageService = messageService;
4339
4478
  this.breakpointObserver = breakpointObserver;
4340
4479
  this.dialog = dialog;
4480
+ this.buttonService = buttonService;
4481
+ this.dialogService = dialogService;
4482
+ this.tableConfigService = tableConfigService;
4483
+ this.conditionService = conditionService;
4341
4484
  this.elevation = "mat-elevation-z5";
4342
4485
  this.actionsWidth = "50px";
4343
4486
  this.showFilterButton = true;
4344
4487
  this.tileReload = new Subject();
4488
+ this.smallScreen = false;
4489
+ this.displayedColumns = [];
4490
+ this.displayedButtons = [];
4345
4491
  this.hideTitle = false;
4346
4492
  this.data = [];
4347
4493
  this.dataLoad = new EventEmitter();
@@ -4350,69 +4496,73 @@ class TableComponent {
4350
4496
  this.createClick = new EventEmitter();
4351
4497
  this.actionClick = new EventEmitter();
4352
4498
  this.inputChange = new EventEmitter();
4353
- this.smallScreen = false;
4354
- // columns: Column[] = [];
4355
- this.displayedColumns = [];
4356
- // @Input() optionValue = "";
4357
- // @Input() optionDisplay = "";
4358
- this.displayedButtons = [];
4359
4499
  // detect screen size changes
4360
4500
  this.breakpointObserver.observe(["(max-width: 600px)"]).subscribe((result) => {
4361
- if (result.matches) {
4362
- this.smallScreen = true;
4363
- this.setColumns();
4364
- }
4365
- else {
4366
- this.smallScreen = false;
4367
- this.setColumns();
4368
- }
4501
+ this.smallScreen = result.matches;
4502
+ this.updateTableConfiguration();
4369
4503
  });
4370
4504
  }
4371
- ngOnInit() {
4372
- if (this.config.elevation) {
4373
- if (this.config.elevation == "none") {
4374
- this.elevation = "";
4375
- }
4376
- else if (this.config.elevation == "low") {
4377
- this.elevation = "mat-elevation-z1";
4378
- }
4379
- else if (this.config.elevation == "medium") {
4380
- this.elevation = "mat-elevation-z5";
4381
- }
4382
- else if (this.config.elevation == "high") {
4383
- this.elevation = "mat-elevation-z9";
4384
- }
4505
+ ngOnInit() {
4506
+ this.initializeComponent();
4507
+ }
4508
+ ngOnChanges() {
4509
+ if (!this.config.loadAction) {
4510
+ this.dataSource = this.data;
4511
+ this.tableDataSource = new MatTableDataSource(this.dataSource);
4512
+ }
4513
+ setTimeout(() => { this.tableDataSource.paginator = this.tablePaginator; }, 1000);
4514
+ }
4515
+ initializeComponent() {
4516
+ this.updateTableConfiguration();
4517
+ this.setupDataLoading();
4518
+ this.formDefaults();
4519
+ }
4520
+ updateTableConfiguration() {
4521
+ this.elevation = this.getElevationClass(this.config?.elevation);
4522
+ this.displayedColumns = this.tableConfigService.setColumns(this.config, this.smallScreen);
4523
+ this.displayedButtons = this.buttonService.getDisplayedButtons(this.config?.buttons, this.smallScreen, this.config?.minButtons);
4524
+ this.actionsWidth = this.tableConfigService.getActionsWidth(this.displayedButtons);
4525
+ this.createButton = this.buttonService.getCreateButton(this.config?.buttons);
4526
+ this.showFilterButton = !this.config?.searchConfig;
4527
+ if (this.displayedButtons?.length > 0 && !this.displayedColumns.includes('action')) {
4528
+ this.displayedColumns.push('action');
4385
4529
  }
4386
- this.setColumns();
4387
- this.createButton = this.getButton('create');
4530
+ }
4531
+ setupDataLoading() {
4388
4532
  if (this.config.loadAction) {
4389
4533
  this.loadData(this.config.loadAction, "");
4390
4534
  }
4391
- this.formDefaults();
4392
- if (this.config.searchConfig) {
4393
- this.showFilterButton = false;
4394
- }
4395
- if (this.reload != null) {
4535
+ if (this.reload) {
4396
4536
  this.reload.subscribe(v => {
4397
- if (v == true) {
4398
- if (this.config?.loadAction) {
4399
- this.loadData(this.config?.loadAction, "");
4400
- }
4537
+ if (v && this.config?.loadAction) {
4538
+ this.loadData(this.config.loadAction, "");
4401
4539
  }
4402
4540
  });
4403
4541
  }
4404
4542
  }
4405
- ngOnChanges() {
4406
- if (!this.config.loadAction) {
4407
- // console.log("Table data Changed")
4408
- // this.dataSource = this.data;
4409
- this.tableDataSource = new MatTableDataSource(this.dataSource);
4543
+ loadData(action, data) {
4544
+ console.log("loading");
4545
+ if (action) {
4546
+ this.dataService.CallApi(action, data).subscribe((apiResponse) => {
4547
+ if (this.config.logResponse) {
4548
+ console.log(apiResponse);
4549
+ }
4550
+ this.dataSource = apiResponse.data;
4551
+ this.tableDataSource = new MatTableDataSource(apiResponse.data);
4552
+ this.tableDataSource.paginator = this.tablePaginator;
4553
+ if (apiResponse.success) {
4554
+ this.tableDataSource = new MatTableDataSource(apiResponse.data);
4555
+ this.tableDataSource.paginator = this.tablePaginator;
4556
+ this.dataLoaded(apiResponse.data);
4557
+ }
4558
+ else {
4559
+ this.messageService.toast("Error: " + apiResponse.message);
4560
+ }
4561
+ });
4410
4562
  }
4411
- setTimeout(() => { this.tableDataSource.paginator = this.tablePaginator; }, 1000);
4412
4563
  }
4413
4564
  inputChanged(event) {
4414
4565
  this.inputChange.emit({ field: event.field, value: event.value });
4415
- // console.log("Changed " + JSON.stringify(event))
4416
4566
  }
4417
4567
  formDefaults() {
4418
4568
  if (!this.config.formConfig) {
@@ -4426,46 +4576,11 @@ class TableComponent {
4426
4576
  }
4427
4577
  }
4428
4578
  setColumns() {
4429
- //columns
4430
- if (!this.config?.columns) {
4431
- return;
4432
- }
4433
- if (this.smallScreen) {
4434
- let cols = [];
4435
- if (this.config.minColumns) {
4436
- cols = this.config.minColumns.filter(col => this.config.columns.some(x => x.name === col));
4437
- }
4438
- if (cols.length > 0) {
4439
- this.displayedColumns = cols;
4440
- }
4441
- else {
4442
- this.displayedColumns = this.config.columns.map(({ name }) => name);
4443
- }
4444
- }
4445
- else {
4446
- this.displayedColumns = this.config.columns.map(({ name }) => name);
4447
- }
4448
- //buttons
4449
- if (!this.config?.buttons) {
4450
- return;
4451
- }
4452
- let buttonsCount = this.config.buttons.filter(x => x.name != 'create').length ?? 0;
4453
- if (buttonsCount > 0) {
4454
- if (!this.displayedColumns.find(x => x == 'action') && this.config.buttons) {
4455
- this.displayedColumns.push("action");
4456
- }
4457
- if (this.smallScreen) {
4458
- if (this.config.minButtons) {
4459
- this.displayedButtons = this.config.buttons.filter(x => this.config.minButtons.includes(x.name));
4460
- }
4461
- else {
4462
- this.displayedButtons = this.config.buttons.filter(x => x.name != 'create').slice(0, 1);
4463
- }
4464
- }
4465
- else {
4466
- this.displayedButtons = this.config.buttons.filter(x => x.name != 'create');
4467
- }
4468
- this.actionsWidth = `${this.displayedButtons.length * 40 + 20}px`;
4579
+ this.displayedColumns = this.tableConfigService.setColumns(this.config, this.smallScreen);
4580
+ this.displayedButtons = this.buttonService.getDisplayedButtons(this.config.buttons, this.smallScreen, this.config.minButtons);
4581
+ this.actionsWidth = this.tableConfigService.getActionsWidth(this.displayedButtons);
4582
+ if (this.displayedButtons.length > 0 && !this.displayedColumns.includes('action')) {
4583
+ this.displayedColumns.push('action');
4469
4584
  }
4470
4585
  }
4471
4586
  setButtons() {
@@ -4479,132 +4594,45 @@ class TableComponent {
4479
4594
  }
4480
4595
  }
4481
4596
  getButton(name) {
4482
- if (!this.config.buttons) {
4483
- console.log("No buttons found");
4484
- return null;
4485
- }
4486
- return this.config.buttons.find(x => x.name == name);
4597
+ return this.buttonService.getButton(this.config.buttons, name);
4487
4598
  }
4488
4599
  getIcon(buttonName) {
4489
- let b = this.getButton(buttonName);
4490
- if (b.icon) {
4491
- return b.icon.name;
4492
- }
4493
- let i = 'open_in_new';
4494
- switch (buttonName) {
4495
- case 'view':
4496
- i = this.config.flatButtons ? 'open_in_new' : 'pageview';
4497
- break;
4498
- case 'edit':
4499
- i = 'edit';
4500
- break;
4501
- case 'delete':
4502
- i = 'delete';
4503
- break;
4504
- default:
4505
- break;
4506
- }
4507
- return i;
4600
+ const button = this.getButton(buttonName);
4601
+ return this.buttonService.getIcon(button, this.config);
4508
4602
  }
4509
4603
  getButtonColor(button, row) {
4510
- if (button.disabled) {
4511
- if (button.disabled(row)) {
4512
- return 'lightgray';
4513
- }
4514
- }
4515
- if (button.color) {
4516
- return button.color;
4517
- }
4518
- if (button.name == 'delete') {
4519
- return '#F44336';
4520
- }
4521
- if (button.name == 'create') {
4522
- return 'green';
4523
- }
4524
- return ' #4050B5';
4604
+ return this.buttonService.getButtonColor(button, row);
4525
4605
  }
4526
4606
  getOptions(column) {
4527
4607
  let x = this.config.columns.find(opt => opt.name === column);
4528
4608
  return x;
4529
4609
  }
4530
- getColor(v, options) {
4531
- let defaultColor = 'lightgrey';
4532
- if (!options)
4533
- return defaultColor;
4534
- let c = options.find(x => x.value == v);
4535
- if (c) {
4536
- return c.color;
4537
- }
4538
- else {
4539
- return defaultColor;
4540
- }
4610
+ getColor(value, options) {
4611
+ return this.conditionService.getColor(value, options);
4541
4612
  }
4542
- testIconCondition(value, icon) {
4543
- if (icon.condition) {
4544
- return icon.condition(value);
4545
- }
4546
- else {
4547
- return true;
4548
- }
4613
+ testIconCondition(row, icon) {
4614
+ return this.conditionService.testIconCondition(icon, row);
4549
4615
  }
4550
- testColorCondition(value, color) {
4551
- if (!color)
4552
- return false;
4553
- if (color.condition) {
4554
- return color.condition(value);
4555
- }
4556
- else {
4557
- return true;
4558
- }
4616
+ testColorCondition(row, color) {
4617
+ return this.conditionService.testColorCondition(color, row);
4559
4618
  }
4560
4619
  showBanner(message) {
4561
- if (!message)
4562
- return;
4563
- if (message == '')
4564
- return;
4565
- this.messageService.info(message);
4620
+ if (message && message !== '') {
4621
+ this.messageService.info(message);
4622
+ }
4566
4623
  }
4567
4624
  testDisabled(row, buttonName) {
4568
- let button = this.getButton(buttonName);
4569
- if (button.disabled) {
4570
- return button.disabled(row);
4571
- }
4572
- return false;
4625
+ const button = this.getButton(buttonName);
4626
+ return this.buttonService.testDisabled(button, row);
4573
4627
  }
4574
4628
  testVisible(row, buttonName) {
4575
- let button = this.getButton(buttonName);
4576
- if (button.visible) {
4577
- return button.visible(row);
4578
- }
4579
- return true;
4580
- }
4581
- //Actions
4582
- loadData(action, data) {
4583
- console.log("loading");
4584
- if (action) {
4585
- this.dataService.CallApi(action, data).subscribe((apiResponse) => {
4586
- if (this.config.logResponse) {
4587
- console.log(apiResponse);
4588
- }
4589
- this.dataSource = apiResponse.data;
4590
- this.tableDataSource = new MatTableDataSource(apiResponse.data);
4591
- this.tableDataSource.paginator = this.tablePaginator;
4592
- if (apiResponse.success) {
4593
- this.tableDataSource = new MatTableDataSource(apiResponse.data);
4594
- this.tableDataSource.paginator = this.tablePaginator;
4595
- this.dataLoaded(apiResponse.data);
4596
- }
4597
- else {
4598
- this.messageService.toast("Error: " + apiResponse.message);
4599
- }
4600
- });
4601
- }
4629
+ const button = this.getButton(buttonName);
4630
+ return this.buttonService.testVisible(button, row);
4602
4631
  }
4603
4632
  //Events
4604
4633
  searchClicked(x) {
4605
4634
  console.log("Search");
4606
4635
  this.searchClick.emit(x);
4607
- // console.log(x)
4608
4636
  if (this.config.searchConfig.searchAction) {
4609
4637
  this.config.searchConfig.searchAction.method == 'post';
4610
4638
  this.loadData(this.config.searchConfig.searchAction, x);
@@ -4621,73 +4649,37 @@ class TableComponent {
4621
4649
  }
4622
4650
  }
4623
4651
  dataLoaded(x) {
4624
- this.dataLoad.emit(x);
4625
4652
  console.log("dataloaded");
4653
+ this.dataLoad.emit(x);
4626
4654
  if (this.config.tileConfig?.loadAction) {
4627
4655
  this.tileReload.next(true);
4628
4656
  }
4629
4657
  }
4630
4658
  actionClicked(name, row) {
4631
- if (name == 'view') {
4659
+ if (name === 'view') {
4632
4660
  this.viewModel(row);
4633
4661
  }
4634
- else if (name == 'edit') {
4662
+ else if (name === 'edit') {
4635
4663
  this.editModel(row);
4636
4664
  }
4637
- else if (name == 'delete') {
4665
+ else if (name === 'delete') {
4638
4666
  this.deleteModel(row);
4639
4667
  }
4640
4668
  else {
4641
4669
  this.customModel(name, row);
4642
4670
  }
4643
4671
  }
4672
+ //Dialog events
4644
4673
  columnClicked(column, row) {
4645
4674
  if (column.detailsConfig) {
4646
- let conf = DetailsDialogProcessor.processDetailsConfig(column.detailsConfig, row);
4647
- const dialogRef = this.dialog.open(DetailsDialog, {
4648
- width: "900px",
4649
- data: conf
4650
- });
4651
- dialogRef.afterClosed().subscribe((result) => {
4652
- if (result.message == "success") {
4653
- this.actionClickedEmit(column.name, row);
4654
- this.refreshClicked();
4655
- }
4656
- });
4675
+ this.openDetailsDialog(column.name, row, column);
4657
4676
  }
4658
4677
  else {
4659
4678
  this.actionClickedEmit(column.name, row);
4660
4679
  }
4661
4680
  }
4662
4681
  customModel(name, row) {
4663
- let button = this.getButton(name);
4664
- if (button) {
4665
- if (!button.dialog) {
4666
- this.doAction(button.name, row);
4667
- this.actionClickedEmit(name, row);
4668
- }
4669
- else {
4670
- if (button.detailsConfig) {
4671
- let conf = DetailsDialogProcessor.processDetailsConfig(button.detailsConfig, row);
4672
- const dialogRef = this.dialog.open(DetailsDialog, {
4673
- width: "900px",
4674
- data: conf
4675
- });
4676
- dialogRef.afterClosed().subscribe((result) => {
4677
- if (result.message == "success") {
4678
- this.actionClickedEmit(button.name, row);
4679
- this.refreshClicked();
4680
- }
4681
- });
4682
- }
4683
- else {
4684
- this.actionClickedEmit(button.name, row);
4685
- }
4686
- }
4687
- }
4688
- else {
4689
- this.actionClickedEmit(name, row);
4690
- }
4682
+ this.openDetailsDialog(name, row);
4691
4683
  }
4692
4684
  actionClickedEmit(name, row) {
4693
4685
  console.log("Action clicked");
@@ -4695,82 +4687,24 @@ class TableComponent {
4695
4687
  }
4696
4688
  viewModel(row) {
4697
4689
  console.log("view Clicked");
4698
- let button = this.getButton('view');
4699
- if (!button)
4700
- return;
4701
- if (!button.dialog) {
4702
- this.actionClickedEmit(button.name, row);
4703
- return;
4704
- }
4705
- if (!this.config.formConfig) {
4706
- this.messageService.toast("Please configure form");
4707
- return;
4708
- }
4709
- let conf = {
4710
- formConfig: this.config.formConfig,
4711
- buttons: this.config.buttons,
4712
- details: row,
4713
- };
4714
- if (button.detailsConfig) {
4715
- conf = DetailsDialogProcessor.processDetailsConfig(button.detailsConfig, row);
4716
- }
4717
- conf.formConfig.mode = "view";
4718
- const dialogRef = this.dialog.open(DetailsDialog, {
4719
- width: "900px",
4720
- data: conf
4721
- });
4722
- dialogRef.afterClosed().subscribe((result) => {
4723
- if (result.message) {
4724
- this.refreshClicked();
4725
- }
4726
- });
4690
+ this.openDetailsDialog('view', row);
4727
4691
  }
4728
4692
  newModel() {
4729
- let button = this.getButton('create');
4730
- if (!button)
4731
- return;
4732
- if (!button.dialog) {
4733
- this.actionClickedEmit(button.name, null);
4734
- return;
4735
- }
4736
- if (!this.config.formConfig) {
4737
- this.messageService.toast("Please configure form");
4738
- return;
4739
- }
4740
- this.config.formConfig.mode = "create";
4741
- let conf = {
4742
- formConfig: this.config.formConfig,
4743
- buttons: this.config.buttons,
4744
- };
4745
- if (button.detailsConfig) {
4746
- conf = button.detailsConfig;
4747
- }
4748
- conf.formConfig.mode = "create";
4749
- conf.heroField = this.config?.heroField;
4750
- conf.heroValue = this.config?.heroValue;
4751
- const dialogRef = this.dialog.open(DetailsDialog, {
4752
- width: "900px",
4753
- data: conf,
4754
- });
4755
- dialogRef.afterClosed().subscribe((result) => {
4756
- if (result.message == "success") {
4757
- this.actionClickedEmit('create', result.data);
4758
- this.refreshClicked();
4759
- }
4760
- else if (result.message == "emit") {
4761
- this.actionClickedEmit('create', result.data);
4762
- }
4763
- });
4693
+ this.openDetailsDialog('create', null);
4764
4694
  }
4765
4695
  editModel(row) {
4766
- let button = this.getButton('edit');
4696
+ this.openDetailsDialog('edit', row);
4697
+ }
4698
+ openDetailsDialog(buttonName, row, column) {
4699
+ const button = column ? { name: column.name, dialog: true, detailsConfig: column.detailsConfig } : this.getButton(buttonName);
4767
4700
  if (!button)
4768
4701
  return;
4769
4702
  if (!button.dialog) {
4703
+ this.doAction(button.name, row);
4770
4704
  this.actionClickedEmit(button.name, row);
4771
4705
  return;
4772
4706
  }
4773
- if (!this.config.formConfig) {
4707
+ if (!this.config.formConfig && !button.detailsConfig) {
4774
4708
  this.messageService.toast("Please configure form");
4775
4709
  return;
4776
4710
  }
@@ -4780,24 +4714,28 @@ class TableComponent {
4780
4714
  details: row,
4781
4715
  };
4782
4716
  if (button.detailsConfig) {
4783
- conf = DetailsDialogProcessor.processDetailsConfig(button.detailsConfig, row);
4717
+ conf = buttonName === 'create'
4718
+ ? button.detailsConfig
4719
+ : DetailsDialogProcessor.processDetailsConfig(button.detailsConfig, row);
4720
+ }
4721
+ conf.formConfig.mode = buttonName === 'create' ? 'create' : (buttonName === 'edit' ? 'edit' : 'view');
4722
+ if (buttonName === 'create') {
4723
+ conf.heroField = this.config?.heroField;
4724
+ conf.heroValue = this.config?.heroValue;
4725
+ }
4726
+ const dialogResult = this.dialogService.openDetailsDialog(conf, DetailsDialog);
4727
+ if (buttonName === 'edit') {
4728
+ dialogResult.inputChange.subscribe((x) => {
4729
+ this.inputChanged(x);
4730
+ });
4784
4731
  }
4785
- conf.formConfig.mode = "edit";
4786
- const dialogRef = this.dialog.open(DetailsDialog, {
4787
- width: "900px",
4788
- data: conf
4789
- });
4790
- dialogRef.componentInstance.inputChange.subscribe((x) => {
4791
- this.inputChanged(x);
4792
- });
4793
- dialogRef.afterClosed().subscribe((result) => {
4794
- console.log(result);
4795
- if (result.message == "success") {
4796
- this.actionClickedEmit('edit', result.data);
4732
+ dialogResult.afterClosed.subscribe((result) => {
4733
+ if (result.message === 'success') {
4734
+ this.actionClickedEmit(button.name, result.data);
4797
4735
  this.refreshClicked();
4798
4736
  }
4799
- else if (result.message == "emit") {
4800
- this.actionClickedEmit('edit', result.data);
4737
+ else if (result.message === 'emit') {
4738
+ this.actionClickedEmit(button.name, result.data);
4801
4739
  }
4802
4740
  });
4803
4741
  }
@@ -4812,6 +4750,7 @@ class TableComponent {
4812
4750
  }
4813
4751
  });
4814
4752
  }
4753
+ //Actions
4815
4754
  doAction(buttonName, row) {
4816
4755
  let b = this.getButton(buttonName);
4817
4756
  if (!b)
@@ -4847,13 +4786,32 @@ class TableComponent {
4847
4786
  this.messageService.toast("Error: " + error);
4848
4787
  });
4849
4788
  }
4789
+ //Misc
4790
+ getElevationClass(elevation) {
4791
+ console.log(elevation);
4792
+ if (elevation == "none") {
4793
+ return "";
4794
+ }
4795
+ else if (elevation == "low") {
4796
+ return "mat-elevation-z1";
4797
+ }
4798
+ else if (elevation == "medium") {
4799
+ return "mat-elevation-z5";
4800
+ }
4801
+ else if (elevation == "high") {
4802
+ return "mat-elevation-z9";
4803
+ }
4804
+ else {
4805
+ return "mat-elevation-z5";
4806
+ }
4807
+ }
4850
4808
  }
4851
- TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: i3$3.BreakpointObserver }, { token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
4852
- TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableComponent, selector: "spa-table", inputs: { hideTitle: "hideTitle", data: "data", config: "config", reload: "reload" }, outputs: { dataLoad: "dataLoad", refreshClick: "refreshClick", searchClick: "searchClick", createClick: "createClick", actionClick: "actionClick", inputChange: "inputChange" }, viewQueries: [{ propertyName: "tablePaginator", first: true, predicate: ["tablePaginator"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n<spa-search *ngIf=\"config.searchConfig\" [config]=\"config.searchConfig\" style=\"margin-bottom: 20px;\" (searchClick)=\"searchClicked($event)\"></spa-search>\n\n<div class=\"top\">\n\n <div class=\"tin-row\" >\n <button *ngIf=\"createButton && !config.flatButtons\" id=\"btnNew\" mat-raised-button color=\"primary\" style=\"margin-right: 10px;\" (click)=\"newModel()\">{{createButton.display}}</button>\n <button *ngIf=\"createButton && config.flatButtons\" id=\"btnNew\" mat-stroked-button style=\"margin-right: 10px; color: green;\" (click)=\"newModel()\">{{createButton.display}}</button>\n </div>\n\n <div *ngIf=\"config.tileConfig && !smallScreen\" style=\"min-width: 75%;\">\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\n </div>\n\n <div *ngIf=\"config.showFilter\" class=\"d-flex justify-content-end\">\n <spa-filter [showText]=\"!smallScreen || (smallScreen && dataSource?.length > 10)\" [showButton]=\"showFilterButton\" [data]=\"tableDataSource\" [flatButtons]=\"config.flatButtons\" (refreshClick)=\"refreshClicked()\"></spa-filter>\n </div>\n\n</div>\n\n<div *ngIf=\"config.tileConfig && smallScreen\" style=\"width: 100%;\">\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\n</div>\n\n<div *ngIf=\"config.title && !hideTitle\" class=\"title\">\n <label style=\"font-size: larger;\">{{config.title | camelToWords}}</label>\n</div>\n\n<div>\n\n <p *ngIf=\"!config\"><em>Configure Table</em></p>\n <p *ngIf=\"!dataSource\"><em>Loading...</em></p>\n\n\n\n <div *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\">\n\n\n <table mat-table [dataSource]=\"tableDataSource\" [ngClass]=\"elevation\">\n <ng-container *ngFor=\"let column of config.columns\" [matColumnDef]=\"column.name\">\n <th mat-header-cell *matHeaderCellDef >{{ column.alias ?? column.name | camelToWords }}</th>\n <td mat-cell *matCellDef=\"let row;\" class=\"right-padding\" >\n\n <ng-container [ngSwitch]=\"column.type\">\n\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <spa-check [value]=\"row[column.name]\" [readonly]=\"true\"></spa-check>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'select'\">\n <spa-select [options]=\"column.options\" [optionDisplay]=\"column.optionDisplay\" [optionValue]=\"column.optionValue\" [(value)]=\"row[column.name]\" width=\"90%\" ></spa-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'chip'\">\n <mat-chip-list>\n <mat-chip (click)=\"columnClicked(column, row)\" [ngStyle]=\"{'background-color': testColorCondition(row, column.color) ? column.color.name : getColor(row[column.name], column?.options)}\" style=\"font-size: 12px;\"> {{row[column.name]}} </mat-chip>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'icon'\">\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'date'\">\n {{row[column.name] | date : 'dd/MM/yyyy'}}\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'datetime'\">\n {{row[column.name] | date : 'dd/MM/yyyy HH:mm'}}\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <!-- <ng-container *ngSwitchCase=\"'spinner'\">\n <mat-spinner [diameter]=\"20\">\n\n </mat-spinner>\n </ng-container> -->\n\n <ng-container *ngSwitchCase=\"'money'\">\n\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name] | currency:'':''}}</label>\n\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n\n <button mat-button [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\" (click)=\"actionClicked(column.name, row)\">{{row[column.name]}}</button>\n\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name]}}</label>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef> Action </th>\n <td mat-cell *matCellDef=\"let row\" [ngStyle]=\"{width:false ? '50px' : actionsWidth}\">\n <div class=\"action-buttons-container\">\n\n <ng-container *ngFor=\"let button of displayedButtons\">\n\n <ng-container *ngIf=\"button.name != 'create' && testVisible(row,button.name)\">\n\n <button *ngIf=\"!config.flatButtons\" mat-mini-fab [matTooltip]=\"button.tip ?? button.name \" matTooltipPosition=\"above\" style=\"margin-right:5px\"\n [ngStyle]=\"{'background-color':getButtonColor(button, row)}\"\n [disabled]=\"testDisabled(row,button.name)\" (click)=\"actionClicked(button.name, row)\">\n <mat-icon>{{getIcon(button.name)}}</mat-icon>\n </button>\n\n <button *ngIf=\"config.flatButtons\" mat-icon-button [matTooltip]=\"button.tip ?? button.name \" matTooltipPosition=\"above\" style=\"margin-right:5px\"\n [disabled]=\"testDisabled(row,button.name)\" (click)=\"actionClicked(button.name, row)\">\n <mat-icon [ngStyle]=\"{'color':getButtonColor(button, row)}\">{{getIcon(button.name)}}</mat-icon>\n </button>\n\n </ng-container>\n\n <ng-container *ngIf=\"button.name != 'create' && !testVisible(row,button.name) && !config.collapseButtons\">\n <label style=\"margin-right: 35px;\"></label>\n </ng-container>\n\n </ng-container>\n </div>\n\n\n\n\n\n </td>\n </ng-container>\n\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': config.greyOut && config.greyOut(row)}\"></tr>\n </table>\n\n </div>\n\n <mat-paginator *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\" #tablePaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\n\n</div>\n\n<div class=\"tin-center\">\n <p *ngIf=\"dataSource?.length == 0\"><em>No Data</em></p>\n</div>\n\n\n\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7$2.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i10.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: CheckComponent, selector: "spa-check", inputs: ["readonly", "display", "value"], outputs: ["valueChange", "click", "check", "uncheck"] }, { kind: "component", type: SelectComponent, selector: "spa-select", inputs: ["width", "readonly", "required", "defaultFirstValue", "readonlyMode", "hint", "placeholder", "multiple", "display", "value", "options", "masterOptions", "optionValue", "optionDisplay", "optionDisplayExtra", "nullable"], outputs: ["valueChange"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "component", type: TilesComponent, selector: "spa-tiles", inputs: ["config", "data", "reload"], outputs: ["tileClick"] }, { kind: "component", type: SearchComponent, selector: "spa-search", inputs: ["config"], outputs: ["searchClick"] }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
4809
+ TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: i3$1.BreakpointObserver }, { token: i4.MatDialog }, { token: ButtonService }, { token: DialogService }, { token: TableConfigService }, { token: ConditionService }], target: i0.ɵɵFactoryTarget.Component });
4810
+ TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableComponent, selector: "spa-table", inputs: { hideTitle: "hideTitle", data: "data", config: "config", reload: "reload" }, outputs: { dataLoad: "dataLoad", refreshClick: "refreshClick", searchClick: "searchClick", createClick: "createClick", actionClick: "actionClick", inputChange: "inputChange" }, viewQueries: [{ propertyName: "tablePaginator", first: true, predicate: ["tablePaginator"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n<!-- Search -->\r\n<spa-search\r\n *ngIf=\"config.searchConfig\" [config]=\"config.searchConfig\" style=\"margin-bottom: 20px;\" (searchClick)=\"searchClicked($event)\">\r\n</spa-search>\r\n\r\n<!-- Header -->\r\n<app-table-header\r\n [config]=\"config\" [hideTitle]=\"false\" [tableDataSource]=\"tableDataSource\" [createButton]=\"createButton\" [tileConfig]=\"config.tileConfig\" [smallScreen]=\"smallScreen\"\r\n [tileReload]=\"tileReload\" [showFilterButton]=\"showFilterButton\" (createClick)=\"newModel()\" (refreshClick)=\"refreshClicked()\">\r\n</app-table-header>\r\n\r\n\r\n<!-- Table -->\r\n<div>\r\n\r\n <p *ngIf=\"!config\"><em>Configure Table</em></p>\r\n <p *ngIf=\"!dataSource\"><em>Loading...</em></p>\r\n\r\n <div *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\">\r\n\r\n <table mat-table [dataSource]=\"tableDataSource\" [ngClass]=\"elevation\">\r\n\r\n <ng-container *ngFor=\"let column of config.columns\" [matColumnDef]=\"column.name\">\r\n <th mat-header-cell *matHeaderCellDef >{{ column.alias ?? column.name | camelToWords }}</th>\r\n <td mat-cell *matCellDef=\"let row;\" class=\"right-padding\" >\r\n\r\n <!-- Rows -->\r\n <app-table-row [column]=\"column\" [row]=\"row\" [config]=\"config\"\r\n (actionClick)=\"actionClicked(column.name, row)\" (columnClick)=\"columnClicked(column, row)\" (showBannerEvent)=\"showBanner($event)\">\r\n </app-table-row>\r\n\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"action\">\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef=\"let row\" [ngStyle]=\"{width:false ? '50px' : actionsWidth}\">\r\n <div class=\"action-buttons-container\">\r\n\r\n <!-- Actions -->\r\n <app-table-action\r\n [displayedButtons]=\"displayedButtons\" [config]=\"config\" [row]=\"row\" (actionClick)=\"actionClicked($event.name, $event.row)\">\r\n </app-table-action>\r\n\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': config.greyOut && config.greyOut(row)}\"></tr>\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\" #tablePaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\r\n\r\n</div>\r\n\r\n<div class=\"tin-center\">\r\n <p *ngIf=\"dataSource?.length == 0\"><em>No Data</em></p>\r\n</div>\r\n\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.dialog-container{display:flex;flex-direction:column;height:100%}.dialog-content{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialog-scroll-content{flex:1;overflow-y:auto}mat-dialog-actions{flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i10.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i10.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i10.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i10.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i10.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i10.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i10.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i10.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i10.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i10.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i11$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: SearchComponent, selector: "spa-search", inputs: ["config"], outputs: ["searchClick"] }, { kind: "component", type: TableHeaderComponent, selector: "app-table-header", inputs: ["config", "hideTitle", "tableDataSource", "createButton", "tileConfig", "smallScreen", "tileReload", "showFilterButton"], outputs: ["createClick", "refreshClick", "tileClick"] }, { kind: "component", type: TableRowComponent, selector: "app-table-row", inputs: ["column", "row", "config"], outputs: ["actionClick", "columnClick", "showBannerEvent"] }, { kind: "component", type: TableActionComponent, selector: "app-table-action", inputs: ["displayedButtons", "config", "row"], outputs: ["actionClick"] }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
4853
4811
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableComponent, decorators: [{
4854
4812
  type: Component,
4855
- args: [{ selector: 'spa-table', template: "\n<spa-search *ngIf=\"config.searchConfig\" [config]=\"config.searchConfig\" style=\"margin-bottom: 20px;\" (searchClick)=\"searchClicked($event)\"></spa-search>\n\n<div class=\"top\">\n\n <div class=\"tin-row\" >\n <button *ngIf=\"createButton && !config.flatButtons\" id=\"btnNew\" mat-raised-button color=\"primary\" style=\"margin-right: 10px;\" (click)=\"newModel()\">{{createButton.display}}</button>\n <button *ngIf=\"createButton && config.flatButtons\" id=\"btnNew\" mat-stroked-button style=\"margin-right: 10px; color: green;\" (click)=\"newModel()\">{{createButton.display}}</button>\n </div>\n\n <div *ngIf=\"config.tileConfig && !smallScreen\" style=\"min-width: 75%;\">\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\n </div>\n\n <div *ngIf=\"config.showFilter\" class=\"d-flex justify-content-end\">\n <spa-filter [showText]=\"!smallScreen || (smallScreen && dataSource?.length > 10)\" [showButton]=\"showFilterButton\" [data]=\"tableDataSource\" [flatButtons]=\"config.flatButtons\" (refreshClick)=\"refreshClicked()\"></spa-filter>\n </div>\n\n</div>\n\n<div *ngIf=\"config.tileConfig && smallScreen\" style=\"width: 100%;\">\n <spa-tiles [reload]=\"tileReload\" [config]=\"config.tileConfig\"></spa-tiles>\n</div>\n\n<div *ngIf=\"config.title && !hideTitle\" class=\"title\">\n <label style=\"font-size: larger;\">{{config.title | camelToWords}}</label>\n</div>\n\n<div>\n\n <p *ngIf=\"!config\"><em>Configure Table</em></p>\n <p *ngIf=\"!dataSource\"><em>Loading...</em></p>\n\n\n\n <div *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\">\n\n\n <table mat-table [dataSource]=\"tableDataSource\" [ngClass]=\"elevation\">\n <ng-container *ngFor=\"let column of config.columns\" [matColumnDef]=\"column.name\">\n <th mat-header-cell *matHeaderCellDef >{{ column.alias ?? column.name | camelToWords }}</th>\n <td mat-cell *matCellDef=\"let row;\" class=\"right-padding\" >\n\n <ng-container [ngSwitch]=\"column.type\">\n\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <spa-check [value]=\"row[column.name]\" [readonly]=\"true\"></spa-check>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'select'\">\n <spa-select [options]=\"column.options\" [optionDisplay]=\"column.optionDisplay\" [optionValue]=\"column.optionValue\" [(value)]=\"row[column.name]\" width=\"90%\" ></spa-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'chip'\">\n <mat-chip-list>\n <mat-chip (click)=\"columnClicked(column, row)\" [ngStyle]=\"{'background-color': testColorCondition(row, column.color) ? column.color.name : getColor(row[column.name], column?.options)}\" style=\"font-size: 12px;\"> {{row[column.name]}} </mat-chip>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'icon'\">\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'date'\">\n {{row[column.name] | date : 'dd/MM/yyyy'}}\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'datetime'\">\n {{row[column.name] | date : 'dd/MM/yyyy HH:mm'}}\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <!-- <ng-container *ngSwitchCase=\"'spinner'\">\n <mat-spinner [diameter]=\"20\">\n\n </mat-spinner>\n </ng-container> -->\n\n <ng-container *ngSwitchCase=\"'money'\">\n\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name] | currency:'':''}}</label>\n\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n\n <button mat-button [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\" (click)=\"actionClicked(column.name, row)\">{{row[column.name]}}</button>\n\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <label [ngStyle]=\"{'color': testColorCondition(row, column.color) ? column.color.name : ''}\">{{row[column.name]}}</label>\n <mat-icon class=\"col-icon\" *ngIf=\"column.icon && testIconCondition(row, column.icon)\" [matTooltip]=\"row[column.icon.tipField] ?? column.icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[column.icon.tipField])\" (click)=\"showBanner(row[column.icon.tipField])\" [ngStyle]=\"{'color':column.icon?.color}\">{{column.icon.name }}</mat-icon>\n\n <ng-container *ngFor=\"let icon of column.icons\">\n <mat-icon class=\"col-icon\" *ngIf=\"testIconCondition(row, icon)\" [matTooltip]=\"row[icon.tipField] ?? icon?.tip\" matTooltipPosition=\"above\" (click)=\"showBanner(row[icon.tipField])\" [ngStyle]=\"{'color':icon?.color}\">{{icon.name }}</mat-icon>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef> Action </th>\n <td mat-cell *matCellDef=\"let row\" [ngStyle]=\"{width:false ? '50px' : actionsWidth}\">\n <div class=\"action-buttons-container\">\n\n <ng-container *ngFor=\"let button of displayedButtons\">\n\n <ng-container *ngIf=\"button.name != 'create' && testVisible(row,button.name)\">\n\n <button *ngIf=\"!config.flatButtons\" mat-mini-fab [matTooltip]=\"button.tip ?? button.name \" matTooltipPosition=\"above\" style=\"margin-right:5px\"\n [ngStyle]=\"{'background-color':getButtonColor(button, row)}\"\n [disabled]=\"testDisabled(row,button.name)\" (click)=\"actionClicked(button.name, row)\">\n <mat-icon>{{getIcon(button.name)}}</mat-icon>\n </button>\n\n <button *ngIf=\"config.flatButtons\" mat-icon-button [matTooltip]=\"button.tip ?? button.name \" matTooltipPosition=\"above\" style=\"margin-right:5px\"\n [disabled]=\"testDisabled(row,button.name)\" (click)=\"actionClicked(button.name, row)\">\n <mat-icon [ngStyle]=\"{'color':getButtonColor(button, row)}\">{{getIcon(button.name)}}</mat-icon>\n </button>\n\n </ng-container>\n\n <ng-container *ngIf=\"button.name != 'create' && !testVisible(row,button.name) && !config.collapseButtons\">\n <label style=\"margin-right: 35px;\"></label>\n </ng-container>\n\n </ng-container>\n </div>\n\n\n\n\n\n </td>\n </ng-container>\n\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': config.greyOut && config.greyOut(row)}\"></tr>\n </table>\n\n </div>\n\n <mat-paginator *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\" #tablePaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\n\n</div>\n\n<div class=\"tin-center\">\n <p *ngIf=\"dataSource?.length == 0\"><em>No Data</em></p>\n</div>\n\n\n\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"] }]
4856
- }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: MessageService }, { type: i3$3.BreakpointObserver }, { type: i4.MatDialog }]; }, propDecorators: { tablePaginator: [{
4813
+ args: [{ selector: 'spa-table', template: "\r\n<!-- Search -->\r\n<spa-search\r\n *ngIf=\"config.searchConfig\" [config]=\"config.searchConfig\" style=\"margin-bottom: 20px;\" (searchClick)=\"searchClicked($event)\">\r\n</spa-search>\r\n\r\n<!-- Header -->\r\n<app-table-header\r\n [config]=\"config\" [hideTitle]=\"false\" [tableDataSource]=\"tableDataSource\" [createButton]=\"createButton\" [tileConfig]=\"config.tileConfig\" [smallScreen]=\"smallScreen\"\r\n [tileReload]=\"tileReload\" [showFilterButton]=\"showFilterButton\" (createClick)=\"newModel()\" (refreshClick)=\"refreshClicked()\">\r\n</app-table-header>\r\n\r\n\r\n<!-- Table -->\r\n<div>\r\n\r\n <p *ngIf=\"!config\"><em>Configure Table</em></p>\r\n <p *ngIf=\"!dataSource\"><em>Loading...</em></p>\r\n\r\n <div *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\">\r\n\r\n <table mat-table [dataSource]=\"tableDataSource\" [ngClass]=\"elevation\">\r\n\r\n <ng-container *ngFor=\"let column of config.columns\" [matColumnDef]=\"column.name\">\r\n <th mat-header-cell *matHeaderCellDef >{{ column.alias ?? column.name | camelToWords }}</th>\r\n <td mat-cell *matCellDef=\"let row;\" class=\"right-padding\" >\r\n\r\n <!-- Rows -->\r\n <app-table-row [column]=\"column\" [row]=\"row\" [config]=\"config\"\r\n (actionClick)=\"actionClicked(column.name, row)\" (columnClick)=\"columnClicked(column, row)\" (showBannerEvent)=\"showBanner($event)\">\r\n </app-table-row>\r\n\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"action\">\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef=\"let row\" [ngStyle]=\"{width:false ? '50px' : actionsWidth}\">\r\n <div class=\"action-buttons-container\">\r\n\r\n <!-- Actions -->\r\n <app-table-action\r\n [displayedButtons]=\"displayedButtons\" [config]=\"config\" [row]=\"row\" (actionClick)=\"actionClicked($event.name, $event.row)\">\r\n </app-table-action>\r\n\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': config.greyOut && config.greyOut(row)}\"></tr>\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator *ngIf=\"dataSource && (!smallScreen || (smallScreen && dataSource?.length > 0))\" #tablePaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\r\n\r\n</div>\r\n\r\n<div class=\"tin-center\">\r\n <p *ngIf=\"dataSource?.length == 0\"><em>No Data</em></p>\r\n</div>\r\n\r\n\r\n\r\n", styles: [".top{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:10px;margin-top:10px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.mat-icon-button{width:32px;height:32px}.mat-icon-button mat-icon{font-size:20px;margin-top:-7px}.col-icon{margin-left:10px}.title{margin-top:10px;font-size:larger;font-weight:300}.make-gray{background-color:#e5e5e5}.right-padding{padding-right:10px}.action-buttons-container{display:flex;justify-content:flex-end;align-items:center}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.dialog-container{display:flex;flex-direction:column;height:100%}.dialog-content{flex:1;overflow:hidden;display:flex;flex-direction:column}.dialog-scroll-content{flex:1;overflow-y:auto}mat-dialog-actions{flex-shrink:0}\n"] }]
4814
+ }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: MessageService }, { type: i3$1.BreakpointObserver }, { type: i4.MatDialog }, { type: ButtonService }, { type: DialogService }, { type: TableConfigService }, { type: ConditionService }]; }, propDecorators: { tablePaginator: [{
4857
4815
  type: ViewChild,
4858
4816
  args: ['tablePaginator']
4859
4817
  }], hideTitle: [{
@@ -5494,7 +5452,7 @@ class InventoryComponent {
5494
5452
  }
5495
5453
  }
5496
5454
  InventoryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InventoryComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: AuthService }, { token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
5497
- InventoryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: InventoryComponent, selector: "spa-inventory", ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between mt-0\" style=\"margin-left: 10px\">\n\n <label style=\"font-size: 16px;\">Inventory</label>\n\n <div >\n <button mat-mini-fab color=\"primary\" style=\"margin-right:1em;\" (click)=\"cats()\" matTooltip=\"Categories\" matTooltipPosition=\"above\"><mat-icon >category</mat-icon></button>\n </div>\n\n</div>\n<hr>\n\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\" (actionClick)=\"clicked($event)\" [reload]=\"reload\"></spa-table>\n</div>\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }] });
5455
+ InventoryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: InventoryComponent, selector: "spa-inventory", ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between mt-0\" style=\"margin-left: 10px\">\n\n <label style=\"font-size: 16px;\">Inventory</label>\n\n <div >\n <button mat-mini-fab color=\"primary\" style=\"margin-right:1em;\" (click)=\"cats()\" matTooltip=\"Categories\" matTooltipPosition=\"above\"><mat-icon >category</mat-icon></button>\n </div>\n\n</div>\n<hr>\n\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\" (actionClick)=\"clicked($event)\" [reload]=\"reload\"></spa-table>\n</div>\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }] });
5498
5456
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InventoryComponent, decorators: [{
5499
5457
  type: Component,
5500
5458
  args: [{ selector: 'spa-inventory', template: "<div class=\"d-flex align-items-center justify-content-between mt-0\" style=\"margin-left: 10px\">\n\n <label style=\"font-size: 16px;\">Inventory</label>\n\n <div >\n <button mat-mini-fab color=\"primary\" style=\"margin-right:1em;\" (click)=\"cats()\" matTooltip=\"Categories\" matTooltipPosition=\"above\"><mat-icon >category</mat-icon></button>\n </div>\n\n</div>\n<hr>\n\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\" (actionClick)=\"clicked($event)\" [reload]=\"reload\"></spa-table>\n</div>\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"] }]
@@ -5594,7 +5552,7 @@ class AccountsComponent {
5594
5552
  }
5595
5553
  }
5596
5554
  AccountsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AccountsComponent, deps: [{ token: i1$3.Router }, { token: DataServiceLib }, { token: MessageService }, { token: AuthService }, { token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
5597
- AccountsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AccountsComponent, selector: "spa-accounts", ngImport: i0, template: "<h4>Accounts</h4>\r\n<hr>\r\n\r\n<div class=\"tin-row d-flex justify-content-between\" style=\"font-size: 14px;margin-left: 5px;\">\r\n <button mat-raised-button color=\"primary\" (click)=\"open(null)\">Create</button>\r\n <spa-filter [showText]=\"false\" (refreshClick)=\"loadData()\"></spa-filter>\r\n</div>\r\n\r\n<div class=\"row \" style=\"margin-left: 0px;\">\r\n\r\n <mat-card class=\"mat-elevation-z8\" *ngFor=\"let account of accounts\" style=\"max-width: 350px;margin: 5px;\">\r\n\r\n <div class=\"tin-row d-flex justify-content-between\">\r\n <label style=\"font-size: 24px; font-weight: 300;\">{{account.name}}</label>\r\n <button mat-mini-fab color=\"primary\" (click)=\"open(account)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <hr style=\"margin-top: 5px;margin-bottom: 10px;\"/>\r\n\r\n <label *ngIf=\"account.description != ''\" style=\"font-size: small;margin-bottom: 5px;\">{{account.description}}</label>\r\n\r\n <div *ngIf=\"account\" class=\"tin-row\">\r\n <label style=\"margin-right: 5px;font-size: 14px;\">{{account?.currency}}</label>\r\n <label style=\"font-size: 34px;margin-right: 20px;\">{{account?.balance | currency : '' : ''}}</label>\r\n </div>\r\n\r\n <mat-card-actions class=\"d-flex justify-content-between\" >\r\n <button mat-stroked-button color=\"primary\" style=\"margin-right:10px;\" (click)=\"view(account)\">View</button>\r\n <button mat-mini-fab *ngIf=\"account.count == 0\" color=\"warn\" style=\"margin-right:10px\" (click)=\"delete(account)\"><mat-icon>delete</mat-icon></button>\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n</div>\r\n\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i15.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i15.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }] });
5555
+ AccountsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AccountsComponent, selector: "spa-accounts", ngImport: i0, template: "<h4>Accounts</h4>\r\n<hr>\r\n\r\n<div class=\"tin-row d-flex justify-content-between\" style=\"font-size: 14px;margin-left: 5px;\">\r\n <button mat-raised-button color=\"primary\" (click)=\"open(null)\">Create</button>\r\n <spa-filter [showText]=\"false\" (refreshClick)=\"loadData()\"></spa-filter>\r\n</div>\r\n\r\n<div class=\"row \" style=\"margin-left: 0px;\">\r\n\r\n <mat-card class=\"mat-elevation-z8\" *ngFor=\"let account of accounts\" style=\"max-width: 350px;margin: 5px;\">\r\n\r\n <div class=\"tin-row d-flex justify-content-between\">\r\n <label style=\"font-size: 24px; font-weight: 300;\">{{account.name}}</label>\r\n <button mat-mini-fab color=\"primary\" (click)=\"open(account)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <hr style=\"margin-top: 5px;margin-bottom: 10px;\"/>\r\n\r\n <label *ngIf=\"account.description != ''\" style=\"font-size: small;margin-bottom: 5px;\">{{account.description}}</label>\r\n\r\n <div *ngIf=\"account\" class=\"tin-row\">\r\n <label style=\"margin-right: 5px;font-size: 14px;\">{{account?.currency}}</label>\r\n <label style=\"font-size: 34px;margin-right: 20px;\">{{account?.balance | currency : '' : ''}}</label>\r\n </div>\r\n\r\n <mat-card-actions class=\"d-flex justify-content-between\" >\r\n <button mat-stroked-button color=\"primary\" style=\"margin-right:10px;\" (click)=\"view(account)\">View</button>\r\n <button mat-mini-fab *ngIf=\"account.count == 0\" color=\"warn\" style=\"margin-right:10px\" (click)=\"delete(account)\"><mat-icon>delete</mat-icon></button>\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n</div>\r\n\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i15.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i15.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }] });
5598
5556
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AccountsComponent, decorators: [{
5599
5557
  type: Component,
5600
5558
  args: [{ selector: 'spa-accounts', template: "<h4>Accounts</h4>\r\n<hr>\r\n\r\n<div class=\"tin-row d-flex justify-content-between\" style=\"font-size: 14px;margin-left: 5px;\">\r\n <button mat-raised-button color=\"primary\" (click)=\"open(null)\">Create</button>\r\n <spa-filter [showText]=\"false\" (refreshClick)=\"loadData()\"></spa-filter>\r\n</div>\r\n\r\n<div class=\"row \" style=\"margin-left: 0px;\">\r\n\r\n <mat-card class=\"mat-elevation-z8\" *ngFor=\"let account of accounts\" style=\"max-width: 350px;margin: 5px;\">\r\n\r\n <div class=\"tin-row d-flex justify-content-between\">\r\n <label style=\"font-size: 24px; font-weight: 300;\">{{account.name}}</label>\r\n <button mat-mini-fab color=\"primary\" (click)=\"open(account)\"><mat-icon>edit</mat-icon></button>\r\n </div>\r\n\r\n <hr style=\"margin-top: 5px;margin-bottom: 10px;\"/>\r\n\r\n <label *ngIf=\"account.description != ''\" style=\"font-size: small;margin-bottom: 5px;\">{{account.description}}</label>\r\n\r\n <div *ngIf=\"account\" class=\"tin-row\">\r\n <label style=\"margin-right: 5px;font-size: 14px;\">{{account?.currency}}</label>\r\n <label style=\"font-size: 34px;margin-right: 20px;\">{{account?.balance | currency : '' : ''}}</label>\r\n </div>\r\n\r\n <mat-card-actions class=\"d-flex justify-content-between\" >\r\n <button mat-stroked-button color=\"primary\" style=\"margin-right:10px;\" (click)=\"view(account)\">View</button>\r\n <button mat-mini-fab *ngIf=\"account.count == 0\" color=\"warn\" style=\"margin-right:10px\" (click)=\"delete(account)\"><mat-icon>delete</mat-icon></button>\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n</div>\r\n\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"] }]
@@ -5789,12 +5747,12 @@ class TransactionsComponent {
5789
5747
  transfer() {
5790
5748
  }
5791
5749
  }
5792
- TransactionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TransactionsComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: i3$3.BreakpointObserver }, { token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
5793
- TransactionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TransactionsComponent, selector: "spa-transactions", ngImport: i0, template: "<!-- <h4>Transactions ({{account?.name}})</h4>\n<hr> -->\n\n<div class=\"d-flex align-items-center justify-content-between mt-0\" style=\"margin-left: 10px\">\n\n <label style=\"font-size: 16px;\">Transactions ({{account?.name}})</label>\n\n <div>\n <button mat-mini-fab color=\"primary\" style=\"margin-right:1em;padding-left: 0;\" (click)=\"cats()\" matTooltip=\"Categories\" matTooltipPosition=\"above\"><mat-icon>category</mat-icon></button>\n </div>\n\n</div>\n<hr>\n\n<div class=\"d-flex justify-content-between\" style=\" font-size: 14px;\" >\n\n <div *ngIf=\"account\" class=\"tin-row actionbuttons\">\n <label style=\"margin-right: 5px;\">{{account?.currency}}</label>\n <label style=\"font-size: 34px;margin-right: 20px;\">{{account?.balance | currency : '' : ''}}</label>\n <div *ngIf=\"!smallScreen; then buttons\" ></div>\n </div>\n\n <div *ngIf=\"!smallScreen\">\n <spa-filter (refreshClick)=\"loadData()\"></spa-filter>\n </div>\n\n</div>\n\n<div *ngIf=\"smallScreen\" style=\"margin-bottom: 10px;\"></div>\n\n<div *ngIf=\"smallScreen; then buttons\" ></div>\n\n<ng-template #buttons >\n <div class=\"tin-row actionbuttons\">\n <button mat-stroked-button style=\"color: green;\" (click)=\"transact('income','')\"><mat-icon class=\"sign\">add</mat-icon>Income</button> <mat-icon class=\"info\">info</mat-icon>\n <button mat-stroked-button style=\"color: red;\" (click)=\"transact('expense','')\"><mat-icon class=\"sign\">remove</mat-icon>Expense</button> <mat-icon class=\"info\">info</mat-icon>\n <button mat-stroked-button style=\"color: orange;\" (click)=\"transact('transfer','')\" ><mat-icon class=\"sign\">sync_alt</mat-icon>Transfer</button> <mat-icon class=\"info\">info</mat-icon>\n </div>\n</ng-template>\n\n\n\n<div style=\" font-size: 14px;\">\n <spa-table [config]=\"config\" [data]=\"transactions\" [reload]=\"reload\" (dataLoad)=\"loadData()\" (actionClick)=\"actionClicked($event)\"></spa-table>\n</div>\n", styles: [".info{color:#4682b4;margin-top:5px;margin-right:5px;font-size:18px}.sign{margin-top:5px;font-size:18px}.actionbuttons{gap:1px}button{padding-left:7px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }] });
5750
+ TransactionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TransactionsComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: i3$1.BreakpointObserver }, { token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
5751
+ TransactionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TransactionsComponent, selector: "spa-transactions", ngImport: i0, template: "<!-- <h4>Transactions ({{account?.name}})</h4>\n<hr> -->\n\n<div class=\"d-flex align-items-center justify-content-between mt-0\" style=\"margin-left: 10px\">\n\n <label style=\"font-size: 16px;\">Transactions ({{account?.name}})</label>\n\n <div>\n <button mat-mini-fab color=\"primary\" style=\"margin-right:1em;padding-left: 0;\" (click)=\"cats()\" matTooltip=\"Categories\" matTooltipPosition=\"above\"><mat-icon>category</mat-icon></button>\n </div>\n\n</div>\n<hr>\n\n<div class=\"d-flex justify-content-between\" style=\" font-size: 14px;\" >\n\n <div *ngIf=\"account\" class=\"tin-row actionbuttons\">\n <label style=\"margin-right: 5px;\">{{account?.currency}}</label>\n <label style=\"font-size: 34px;margin-right: 20px;\">{{account?.balance | currency : '' : ''}}</label>\n <div *ngIf=\"!smallScreen; then buttons\" ></div>\n </div>\n\n <div *ngIf=\"!smallScreen\">\n <spa-filter (refreshClick)=\"loadData()\"></spa-filter>\n </div>\n\n</div>\n\n<div *ngIf=\"smallScreen\" style=\"margin-bottom: 10px;\"></div>\n\n<div *ngIf=\"smallScreen; then buttons\" ></div>\n\n<ng-template #buttons >\n <div class=\"tin-row actionbuttons\">\n <button mat-stroked-button style=\"color: green;\" (click)=\"transact('income','')\"><mat-icon class=\"sign\">add</mat-icon>Income</button> <mat-icon class=\"info\">info</mat-icon>\n <button mat-stroked-button style=\"color: red;\" (click)=\"transact('expense','')\"><mat-icon class=\"sign\">remove</mat-icon>Expense</button> <mat-icon class=\"info\">info</mat-icon>\n <button mat-stroked-button style=\"color: orange;\" (click)=\"transact('transfer','')\" ><mat-icon class=\"sign\">sync_alt</mat-icon>Transfer</button> <mat-icon class=\"info\">info</mat-icon>\n </div>\n</ng-template>\n\n\n\n<div style=\" font-size: 14px;\">\n <spa-table [config]=\"config\" [data]=\"transactions\" [reload]=\"reload\" (dataLoad)=\"loadData()\" (actionClick)=\"actionClicked($event)\"></spa-table>\n</div>\n", styles: [".info{color:#4682b4;margin-top:5px;margin-right:5px;font-size:18px}.sign{margin-top:5px;font-size:18px}.actionbuttons{gap:1px}button{padding-left:7px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }] });
5794
5752
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TransactionsComponent, decorators: [{
5795
5753
  type: Component,
5796
5754
  args: [{ selector: 'spa-transactions', template: "<!-- <h4>Transactions ({{account?.name}})</h4>\n<hr> -->\n\n<div class=\"d-flex align-items-center justify-content-between mt-0\" style=\"margin-left: 10px\">\n\n <label style=\"font-size: 16px;\">Transactions ({{account?.name}})</label>\n\n <div>\n <button mat-mini-fab color=\"primary\" style=\"margin-right:1em;padding-left: 0;\" (click)=\"cats()\" matTooltip=\"Categories\" matTooltipPosition=\"above\"><mat-icon>category</mat-icon></button>\n </div>\n\n</div>\n<hr>\n\n<div class=\"d-flex justify-content-between\" style=\" font-size: 14px;\" >\n\n <div *ngIf=\"account\" class=\"tin-row actionbuttons\">\n <label style=\"margin-right: 5px;\">{{account?.currency}}</label>\n <label style=\"font-size: 34px;margin-right: 20px;\">{{account?.balance | currency : '' : ''}}</label>\n <div *ngIf=\"!smallScreen; then buttons\" ></div>\n </div>\n\n <div *ngIf=\"!smallScreen\">\n <spa-filter (refreshClick)=\"loadData()\"></spa-filter>\n </div>\n\n</div>\n\n<div *ngIf=\"smallScreen\" style=\"margin-bottom: 10px;\"></div>\n\n<div *ngIf=\"smallScreen; then buttons\" ></div>\n\n<ng-template #buttons >\n <div class=\"tin-row actionbuttons\">\n <button mat-stroked-button style=\"color: green;\" (click)=\"transact('income','')\"><mat-icon class=\"sign\">add</mat-icon>Income</button> <mat-icon class=\"info\">info</mat-icon>\n <button mat-stroked-button style=\"color: red;\" (click)=\"transact('expense','')\"><mat-icon class=\"sign\">remove</mat-icon>Expense</button> <mat-icon class=\"info\">info</mat-icon>\n <button mat-stroked-button style=\"color: orange;\" (click)=\"transact('transfer','')\" ><mat-icon class=\"sign\">sync_alt</mat-icon>Transfer</button> <mat-icon class=\"info\">info</mat-icon>\n </div>\n</ng-template>\n\n\n\n<div style=\" font-size: 14px;\">\n <spa-table [config]=\"config\" [data]=\"transactions\" [reload]=\"reload\" (dataLoad)=\"loadData()\" (actionClick)=\"actionClicked($event)\"></spa-table>\n</div>\n", styles: [".info{color:#4682b4;margin-top:5px;margin-right:5px;font-size:18px}.sign{margin-top:5px;font-size:18px}.actionbuttons{gap:1px}button{padding-left:7px}.mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"] }]
5797
- }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: MessageService }, { type: i3$3.BreakpointObserver }, { type: i4.MatDialog }]; } });
5755
+ }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: MessageService }, { type: i3$1.BreakpointObserver }, { type: i4.MatDialog }]; } });
5798
5756
 
5799
5757
  class TasksComponent {
5800
5758
  constructor(dataService, messageService, authService, dialog) {
@@ -5864,7 +5822,7 @@ class TasksComponent {
5864
5822
  }
5865
5823
  }
5866
5824
  TasksComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TasksComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: AuthService }, { token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
5867
- TasksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TasksComponent, selector: "spa-tasks", ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between mt-0\" style=\"margin-left: 10px\">\n\n <label style=\"font-size: 16px;\">Tasks</label>\n\n <div>\n <button mat-mini-fab color=\"primary\" style=\"margin-right:1em;\" (click)=\"cats()\" matTooltip=\"Categories\" matTooltipPosition=\"above\"><mat-icon>category</mat-icon></button>\n </div>\n\n</div>\n<hr>\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\" [reload]=\"reload\"></spa-table>\n</div>\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"], dependencies: [{ kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }] });
5825
+ TasksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TasksComponent, selector: "spa-tasks", ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between mt-0\" style=\"margin-left: 10px\">\n\n <label style=\"font-size: 16px;\">Tasks</label>\n\n <div>\n <button mat-mini-fab color=\"primary\" style=\"margin-right:1em;\" (click)=\"cats()\" matTooltip=\"Categories\" matTooltipPosition=\"above\"><mat-icon>category</mat-icon></button>\n </div>\n\n</div>\n<hr>\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\" [reload]=\"reload\"></spa-table>\n</div>\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"], dependencies: [{ kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }] });
5868
5826
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TasksComponent, decorators: [{
5869
5827
  type: Component,
5870
5828
  args: [{ selector: 'spa-tasks', template: "<div class=\"d-flex align-items-center justify-content-between mt-0\" style=\"margin-left: 10px\">\n\n <label style=\"font-size: 16px;\">Tasks</label>\n\n <div>\n <button mat-mini-fab color=\"primary\" style=\"margin-right:1em;\" (click)=\"cats()\" matTooltip=\"Categories\" matTooltipPosition=\"above\"><mat-icon>category</mat-icon></button>\n </div>\n\n</div>\n<hr>\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\" [reload]=\"reload\"></spa-table>\n</div>\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"] }]
@@ -5875,108 +5833,50 @@ class DepartmentsComponent {
5875
5833
  this.dataService = dataService;
5876
5834
  this.messageService = messageService;
5877
5835
  this.authService = authService;
5878
- this.formConfig = {
5879
- fields: [
5880
- { name: 'name', type: 'text' },
5881
- ],
5882
- reset: true,
5883
- };
5884
- this.config = {
5885
- showFilter: true,
5886
- minColumns: ['name'],
5887
- flatButtons: true,
5888
- columns: [
5889
- { name: 'name', type: 'text' },
5890
- ],
5891
- buttons: [
5892
- { name: 'create', display: 'Create', dialog: true, action: { url: 'general/departments?action=create', method: 'post' } },
5893
- { name: 'view', dialog: true },
5894
- { name: 'edit', dialog: true, action: { url: 'general/departments?action=edit', method: 'post' } },
5895
- { name: 'delete', dialog: true, action: { url: 'general/departments?action=delete', method: 'post' } },
5896
- ],
5897
- loadAction: { url: 'general/departments/x' },
5898
- formConfig: this.formConfig
5899
- };
5900
5836
  }
5901
5837
  ngOnInit() {
5838
+ this.dataService.loadPositionMeta();
5839
+ this.dataService.loadEmployeesMeta();
5902
5840
  }
5903
5841
  }
5904
5842
  DepartmentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DepartmentsComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Component });
5905
- DepartmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DepartmentsComponent, selector: "spa-departments", ngImport: i0, template: "<h4>Departments</h4>\n<hr>\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\"></spa-table>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }] });
5843
+ DepartmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DepartmentsComponent, selector: "spa-departments", ngImport: i0, template: "<h4>Departments</h4>\r\n<hr>\r\n\r\n<div class=\"mt-3\" style=\" font-size: 14px;\">\r\n <spa-table [config]=\"dataService.departmentTableConfig\"></spa-table>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }] });
5906
5844
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DepartmentsComponent, decorators: [{
5907
5845
  type: Component,
5908
- args: [{ selector: 'spa-departments', template: "<h4>Departments</h4>\n<hr>\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\"></spa-table>\n</div>\n" }]
5846
+ args: [{ selector: 'spa-departments', template: "<h4>Departments</h4>\r\n<hr>\r\n\r\n<div class=\"mt-3\" style=\" font-size: 14px;\">\r\n <spa-table [config]=\"dataService.departmentTableConfig\"></spa-table>\r\n</div>\r\n" }]
5909
5847
  }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: MessageService }, { type: AuthService }]; } });
5910
5848
 
5911
5849
  class EmployeesComponent {
5912
- constructor(dataService, messageService, authService) {
5850
+ constructor(dataService, authService) {
5913
5851
  this.dataService = dataService;
5914
- this.messageService = messageService;
5915
5852
  this.authService = authService;
5916
- this.genders = [
5917
- { name: 'Male', value: 1 },
5918
- { name: 'Female', value: 2 }
5919
- ];
5920
- this.departments = [];
5921
- this.formConfig = {
5922
- fields: [
5923
- { name: 'nationalID', type: 'text', required: true },
5924
- { name: 'gender', alias: 'Gender', type: 'select', options: this.genders, required: true },
5925
- { name: 'firstName', type: 'text', required: true },
5926
- { name: 'lastName', type: 'text', required: true },
5927
- { name: 'departmentID', alias: 'Department', type: 'select', options: this.departments, optionDisplay: 'name', optionValue: 'departmentID' },
5928
- { name: 'address', type: 'text', rows: 2, span: true },
5929
- { name: 'note', type: 'text', rows: 2, span: true },
5930
- ],
5931
- reset: true,
5932
- };
5933
- this.config = {
5934
- showFilter: true,
5935
- minColumns: ['name'],
5936
- flatButtons: true,
5937
- columns: [
5938
- { name: 'name', type: 'text' },
5939
- { name: 'nationalID', type: 'text' },
5940
- { name: 'genderName', type: 'text' },
5941
- { name: 'departmentName', type: 'text' },
5942
- ],
5943
- buttons: [
5944
- { name: 'create', display: 'Create', dialog: true, action: { url: 'general/employees?action=create', method: 'post' } },
5945
- { name: 'view', dialog: true },
5946
- { name: 'edit', dialog: true, action: { url: 'general/employees?action=edit', method: 'post' } },
5947
- { name: 'delete', dialog: true, action: { url: 'general/employees?action=delete', method: 'post' } },
5948
- ],
5949
- loadAction: { url: 'general/employees/x' },
5950
- formConfig: this.formConfig
5951
- };
5952
5853
  }
5953
5854
  ngOnInit() {
5954
- this.loadMeta();
5955
- }
5956
- loadMeta() {
5957
- this.dataService.CallApi({ url: 'general/departments/x' }, "").subscribe((apiResponse) => {
5958
- this.formConfig.fields.find(x => x.name == 'departmentID').options = apiResponse.data;
5959
- });
5855
+ this.dataService.loadEmployeesMeta();
5960
5856
  }
5961
5857
  }
5962
- EmployeesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EmployeesComponent, deps: [{ token: DataServiceLib }, { token: MessageService }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Component });
5963
- EmployeesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EmployeesComponent, selector: "spa-employees", ngImport: i0, template: "<h4>Employees</h4>\n<hr>\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\"></spa-table>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }] });
5858
+ EmployeesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EmployeesComponent, deps: [{ token: DataServiceLib }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Component });
5859
+ EmployeesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EmployeesComponent, selector: "spa-employees", ngImport: i0, template: "<h4>Employees</h4>\r\n<hr>\r\n\r\n<div class=\"mt-3\" style=\" font-size: 14px;\">\r\n <spa-table [config]=\"dataService.employeeTableConfig\"></spa-table>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }] });
5964
5860
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EmployeesComponent, decorators: [{
5965
5861
  type: Component,
5966
- args: [{ selector: 'spa-employees', template: "<h4>Employees</h4>\n<hr>\n\n<div class=\"mt-3\" style=\" font-size: 14px;\">\n <spa-table [config]=\"config\"></spa-table>\n</div>\n" }]
5967
- }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: MessageService }, { type: AuthService }]; } });
5862
+ args: [{ selector: 'spa-employees', template: "<h4>Employees</h4>\r\n<hr>\r\n\r\n<div class=\"mt-3\" style=\" font-size: 14px;\">\r\n <spa-table [config]=\"dataService.employeeTableConfig\"></spa-table>\r\n</div>\r\n" }]
5863
+ }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: AuthService }]; } });
5968
5864
 
5969
5865
  class PositionsComponent {
5970
- constructor() { }
5866
+ constructor(dataService, authService) {
5867
+ this.dataService = dataService;
5868
+ this.authService = authService;
5869
+ }
5971
5870
  ngOnInit() {
5871
+ this.dataService.loadPositionMeta();
5972
5872
  }
5973
5873
  }
5974
- PositionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PositionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5975
- PositionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PositionsComponent, selector: "spa-positions", ngImport: i0, template: "<h4>Positions</h4>\n<hr>\n", styles: [""] });
5874
+ PositionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PositionsComponent, deps: [{ token: DataServiceLib }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Component });
5875
+ PositionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PositionsComponent, selector: "spa-positions", ngImport: i0, template: "<h4>Positions</h4>\r\n<hr>\r\n\r\n<div class=\"mt-3\" style=\" font-size: 14px;\">\r\n <spa-table [config]=\"dataService.positionTableConfig\"></spa-table>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: TableComponent, selector: "spa-table", inputs: ["hideTitle", "data", "config", "reload"], outputs: ["dataLoad", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange"] }] });
5976
5876
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PositionsComponent, decorators: [{
5977
5877
  type: Component,
5978
- args: [{ selector: 'spa-positions', template: "<h4>Positions</h4>\n<hr>\n" }]
5979
- }], ctorParameters: function () { return []; } });
5878
+ args: [{ selector: 'spa-positions', template: "<h4>Positions</h4>\r\n<hr>\r\n\r\n<div class=\"mt-3\" style=\" font-size: 14px;\">\r\n <spa-table [config]=\"dataService.positionTableConfig\"></spa-table>\r\n</div>\r\n" }]
5879
+ }], ctorParameters: function () { return [{ type: DataServiceLib }, { type: AuthService }]; } });
5980
5880
 
5981
5881
  class GradesComponent {
5982
5882
  constructor() { }
@@ -6060,7 +5960,7 @@ class WelcomeComponent {
6060
5960
  }
6061
5961
  }
6062
5962
  WelcomeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WelcomeComponent, deps: [{ token: DataServiceLib }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Component });
6063
- WelcomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: WelcomeComponent, selector: "spa-welcome", ngImport: i0, template: "<label class=\"title\">Welcome, {{username}}</label>\n\n\n\n<!-- terms -->\n<div class=\"mt-3\" *ngIf=\"step=='terms'\">\n\n <label class=\"subtitle text-muted mb-2\" >We care about our users and are dedicated to protecting your data and privacy -\n thats why we want to be clear about what data we collect and how we use it to improve your experience.</label>\n\n <br>\n <spa-check display=\"I agree to the Terms and Privacy Policy\" [(value)]=\"agree\"></spa-check>\n</div>\n\n<!-- owner -->\n<div class=\"mt-3\" *ngIf=\"step=='name' && own\">\n\n <label class=\"subtitle text-muted\" style=\" margin-bottom: 20px;\">The follow steps will guide you to customise your application.</label>\n\n <div style=\"max-width: 400px;\">\n <spa-text display=\"Organisation Name\" [(value)]=\"myTenant.name\" ></spa-text>\n </div>\n\n <label class=\"text-muted\" style=\" font-size: 12px;\">You can change the Organisation's name to your team or company name.</label><br>\n <label class=\"text-muted\" style=\" font-size: 12px;margin-top: 10px;\">The name can be changed later.</label>\n\n</div>\n\n<!-- guest -->\n<div *ngIf=\"step=='hi' && !own\">\n <label class=\"subtitle text-muted\">You are now signed in to {{myTenant.name}}.</label>\n</div>\n\n\n<!-- invitations -->\n<div class=\"mt-3\" *ngIf=\"step=='invitations' && own\">\n\n <label class=\"subtitle text-muted\">You have been requested to join the following organisations. If you accept, you have the option to switch to that org now or stay in you org.</label><br>\n <label class=\"text-muted\" style=\" font-size: 12px;margin-top: 10px;\">You will be able to switch later.</label>\n <spa-invitations-table></spa-invitations-table>\n\n</div>\n\n\n<!-- Actions -->\n<div class=\"mt-3\">\n <button mat-stroked-button color=\"primary\" [disabled]=\"!agree\" (click)=\"next()\">Next <mat-icon>arrow_right_alt</mat-icon></button>\n</div>\n", styles: [".title{margin-top:1em;font-size:28px;font-weight:300}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: TextComponent, selector: "spa-text", inputs: ["readonly", "hint", "display", "placeholder", "value", "format", "type", "rows", "width", "options", "optionValue", "required", "min", "max", "regex"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "component", type: CheckComponent, selector: "spa-check", inputs: ["readonly", "display", "value"], outputs: ["valueChange", "click", "check", "uncheck"] }, { kind: "component", type: InvitationsTableComponent, selector: "spa-invitations-table" }] });
5963
+ WelcomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: WelcomeComponent, selector: "spa-welcome", ngImport: i0, template: "<label class=\"title\">Welcome, {{username}}</label>\n\n\n\n<!-- terms -->\n<div class=\"mt-3\" *ngIf=\"step=='terms'\">\n\n <label class=\"subtitle text-muted mb-2\" >We care about our users and are dedicated to protecting your data and privacy -\n thats why we want to be clear about what data we collect and how we use it to improve your experience.</label>\n\n <br>\n <spa-check display=\"I agree to the Terms and Privacy Policy\" [(value)]=\"agree\"></spa-check>\n</div>\n\n<!-- owner -->\n<div class=\"mt-3\" *ngIf=\"step=='name' && own\">\n\n <label class=\"subtitle text-muted\" style=\" margin-bottom: 20px;\">The follow steps will guide you to customise your application.</label>\n\n <div style=\"max-width: 400px;\">\n <spa-text display=\"Organisation Name\" [(value)]=\"myTenant.name\" ></spa-text>\n </div>\n\n <label class=\"text-muted\" style=\" font-size: 12px;\">You can change the Organisation's name to your team or company name.</label><br>\n <label class=\"text-muted\" style=\" font-size: 12px;margin-top: 10px;\">The name can be changed later.</label>\n\n</div>\n\n<!-- guest -->\n<div *ngIf=\"step=='hi' && !own\">\n <label class=\"subtitle text-muted\">You are now signed in to {{myTenant.name}}.</label>\n</div>\n\n\n<!-- invitations -->\n<div class=\"mt-3\" *ngIf=\"step=='invitations' && own\">\n\n <label class=\"subtitle text-muted\">You have been requested to join the following organisations. If you accept, you have the option to switch to that org now or stay in you org.</label><br>\n <label class=\"text-muted\" style=\" font-size: 12px;margin-top: 10px;\">You will be able to switch later.</label>\n <spa-invitations-table></spa-invitations-table>\n\n</div>\n\n\n<!-- Actions -->\n<div class=\"mt-3\">\n <button mat-stroked-button color=\"primary\" [disabled]=\"!agree\" (click)=\"next()\">Next <mat-icon>arrow_right_alt</mat-icon></button>\n</div>\n", styles: [".title{margin-top:1em;font-size:28px;font-weight:300}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: TextComponent, selector: "spa-text", inputs: ["readonly", "hint", "display", "placeholder", "value", "format", "type", "rows", "width", "options", "optionValue", "required", "min", "max", "regex"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "component", type: CheckComponent, selector: "spa-check", inputs: ["readonly", "display", "value"], outputs: ["valueChange", "click", "check", "uncheck"] }, { kind: "component", type: InvitationsTableComponent, selector: "spa-invitations-table" }] });
6064
5964
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WelcomeComponent, decorators: [{
6065
5965
  type: Component,
6066
5966
  args: [{ selector: 'spa-welcome', template: "<label class=\"title\">Welcome, {{username}}</label>\n\n\n\n<!-- terms -->\n<div class=\"mt-3\" *ngIf=\"step=='terms'\">\n\n <label class=\"subtitle text-muted mb-2\" >We care about our users and are dedicated to protecting your data and privacy -\n thats why we want to be clear about what data we collect and how we use it to improve your experience.</label>\n\n <br>\n <spa-check display=\"I agree to the Terms and Privacy Policy\" [(value)]=\"agree\"></spa-check>\n</div>\n\n<!-- owner -->\n<div class=\"mt-3\" *ngIf=\"step=='name' && own\">\n\n <label class=\"subtitle text-muted\" style=\" margin-bottom: 20px;\">The follow steps will guide you to customise your application.</label>\n\n <div style=\"max-width: 400px;\">\n <spa-text display=\"Organisation Name\" [(value)]=\"myTenant.name\" ></spa-text>\n </div>\n\n <label class=\"text-muted\" style=\" font-size: 12px;\">You can change the Organisation's name to your team or company name.</label><br>\n <label class=\"text-muted\" style=\" font-size: 12px;margin-top: 10px;\">The name can be changed later.</label>\n\n</div>\n\n<!-- guest -->\n<div *ngIf=\"step=='hi' && !own\">\n <label class=\"subtitle text-muted\">You are now signed in to {{myTenant.name}}.</label>\n</div>\n\n\n<!-- invitations -->\n<div class=\"mt-3\" *ngIf=\"step=='invitations' && own\">\n\n <label class=\"subtitle text-muted\">You have been requested to join the following organisations. If you accept, you have the option to switch to that org now or stay in you org.</label><br>\n <label class=\"text-muted\" style=\" font-size: 12px;margin-top: 10px;\">You will be able to switch later.</label>\n <spa-invitations-table></spa-invitations-table>\n\n</div>\n\n\n<!-- Actions -->\n<div class=\"mt-3\">\n <button mat-stroked-button color=\"primary\" [disabled]=\"!agree\" (click)=\"next()\">Next <mat-icon>arrow_right_alt</mat-icon></button>\n</div>\n", styles: [".title{margin-top:1em;font-size:28px;font-weight:300}\n"] }]
@@ -6099,7 +5999,7 @@ TinSpaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
6099
5999
  TenantSettingsComponent, inviteDialog, TenantsComponent, BugComponent, MembershipComponent, PlansComponent, CustomersComponent, InventoryComponent, quantityDialog, AccountsComponent, accountDialog,
6100
6000
  SuppliersComponent,
6101
6001
  TransactionsComponent, transactDialog, ListDialogComponent, TasksComponent,
6102
- DepartmentsComponent, EmployeesComponent, PositionsComponent, GradesComponent, WelcomeComponent, InvitationsComponent, NotificationsComponent, InvitationsTableComponent], imports: [SpaMatModule,
6002
+ DepartmentsComponent, EmployeesComponent, PositionsComponent, GradesComponent, WelcomeComponent, InvitationsComponent, NotificationsComponent, InvitationsTableComponent, TableHeaderComponent, TableRowComponent, TableActionComponent], imports: [SpaMatModule,
6103
6003
  HttpClientModule,
6104
6004
  CurrencyInputModule,
6105
6005
  NgxDocViewerModule], exports: [TinSpaComponent,
@@ -6154,7 +6054,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
6154
6054
  TenantSettingsComponent, inviteDialog, TenantsComponent, BugComponent, MembershipComponent, PlansComponent, CustomersComponent, InventoryComponent, quantityDialog, AccountsComponent, accountDialog,
6155
6055
  SuppliersComponent,
6156
6056
  TransactionsComponent, transactDialog, ListDialogComponent, TasksComponent,
6157
- DepartmentsComponent, EmployeesComponent, PositionsComponent, GradesComponent, WelcomeComponent, InvitationsComponent, NotificationsComponent, InvitationsTableComponent,
6057
+ DepartmentsComponent, EmployeesComponent, PositionsComponent, GradesComponent, WelcomeComponent, InvitationsComponent, NotificationsComponent, InvitationsTableComponent, TableHeaderComponent, TableRowComponent, TableActionComponent,
6158
6058
  ],
6159
6059
  imports: [
6160
6060
  SpaMatModule,
@@ -6308,7 +6208,7 @@ class LoginComponent {
6308
6208
  }
6309
6209
  }
6310
6210
  LoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoginComponent, deps: [{ token: HttpService }, { token: StorageService }, { token: i1$3.Router }, { token: MessageService }, { token: DataServiceLib }, { token: AuthService }, { token: LogService }, { token: i1$3.ActivatedRoute }, { token: i8.SocialAuthService }], target: i0.ɵɵFactoryTarget.Component });
6311
- LoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LoginComponent, selector: "spa-login", ngImport: i0, template: "\r\n <div *ngIf=\"style=='old'\" class=\"tin-bg-login login-page\">\r\n\r\n <div *ngIf=\"appConfig.logo!=''\" class=\"d-flex justify-content-center row align-items-center\" style=\"margin-top:3em;margin-bottom:1em\">\r\n\r\n <img *ngIf=\"appConfig.logoSize=='normal'\" [src]=\"appConfig.logo\" style=\"width: 100px;margin-right:3em;margin-left:3em\" />\r\n <img *ngIf=\"appConfig.logoSize=='medium'\" [src]=\"appConfig.logo\" style=\"width: 150px;margin-right:3em;margin-left:3em\" />\r\n <img *ngIf=\"appConfig.logoSize=='large'\" [src]=\"appConfig.logo\" style=\"width: 250px; margin-right:3em;margin-left:3em\" />\r\n\r\n </div>\r\n\r\n\r\n <div *ngIf=\"appConfig.logo ==''\" style=\"margin-top:2em\">\r\n <!-- Add margin top when there is no logo -->\r\n </div>\r\n\r\n\r\n <div class=\"d-flex justify-content-center row align-items-center\" style=\"margin-top:3em;\">\r\n\r\n <div class=\"d-none d-sm-block\">\r\n </div>\r\n\r\n <div style=\"margin-left:1em\">\r\n\r\n <mat-card class=\"mat-elevation-z3 login-card\" style=\"width:400px; \">\r\n\r\n <mat-card-header>\r\n <mat-card-title>{{appConfig.appName}}</mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n <div class=\"tin-input mt-2\">\r\n\r\n <spa-text id=\"txtuserName\" display=\"Username\" [(value)]=\"user.userName\" ></spa-text>\r\n\r\n <mat-form-field >\r\n <mat-label>Password</mat-label>\r\n <input id=\"txtPassword\" matInput [type]=\"hide ? 'password' : 'text'\" (keyup.enter)=\"login()\" [(ngModel)]=\"user.password\" autocomplete=\"off\" >\r\n <button mat-icon-button matSuffix (click)=\"hide = !hide\" [attr.aria-label]=\"'Hide password'\" [attr.aria-pressed]=\"hide\">\r\n <mat-icon style=\"font-size: 18px;\">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <div class=\"row \">\r\n\r\n <div class=\"col d-flex justify-content-center\">\r\n <button id=\"btnLogin\" mat-raised-button [disabled]=\"isProcessing\" style=\"width: 100px;\" (click)=\"login()\" color=\"primary\">Login</button>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-center\" *ngIf=\"appConfig.selfService\">\r\n <button id=\"btnSignup\" mat-stroked-button color=\"primary\" style=\"width: 100px;\" (click)=\"signup()\">Signup</button>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n <div *ngIf=\"appConfig.selfService\">\r\n <br />\r\n <a mat-button id=\"lnkRecover\" style=\"margin-left: 1em\" (click)=\"recoverAccount()\">Forgot your password ?</a>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <div *ngIf=\"style=='default'\" class=\"login-page background tin-bg-login\">\r\n\r\n <div class=\"container\" >\r\n\r\n <div class=\"logo\">\r\n <img *ngIf=\"appConfig.logoSize=='normal'\" [src]=\"appConfig.logo\" style=\"width: 100px\" />\r\n <img *ngIf=\"appConfig.logoSize=='medium'\" [src]=\"appConfig.logo\" style=\"width: 150px\" />\r\n <img *ngIf=\"appConfig.logoSize=='large'\" [src]=\"appConfig.logo\" style=\"width: 250px\" />\r\n </div>\r\n\r\n <mat-card class=\"mat-elevation-z3 \" style=\"width:400px; \">\r\n\r\n <mat-card-header>\r\n <mat-card-title style=\"font-size: 40px;margin-bottom: 10px; margin-top: 20px; font-weight: 300\">{{appConfig.appName}}</mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content *ngIf=\"appConfig.localAuth || appConfig.ADAuth\">\r\n\r\n <div class=\"tin-input mt-2\">\r\n\r\n <spa-text id=\"txtuserName\" display=\"Username\" [(value)]=\"user.userName\"></spa-text>\r\n\r\n <spa-text id=\"txtPassword\" display=\"Password\" format=\"password\" [(value)]=\"user.password\" (enterPress)=\"login()\"></spa-text>\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n\r\n\r\n <mat-card-actions style=\"margin-bottom: 10px;\">\r\n\r\n <div class=\"button mt-0\" *ngIf=\"appConfig.localAuth || appConfig.ADAuth\">\r\n <button id=\"btnLogin\" mat-flat-button [disabled]=\"isProcessing\" style=\"width: 350px;\" (click)=\"login()\" color=\"primary\">Login</button>\r\n </div>\r\n\r\n <div class=\"button\" *ngIf=\"(appConfig.localAuth || appConfig.ADAuth) && appConfig.selfService\" >\r\n <button id=\"btnSignup\" mat-stroked-button color=\"primary\" style=\"width: 350px;\" (click)=\"signup()\">Sign up with Email</button>\r\n </div>\r\n\r\n <div class=\"button\" *ngIf=\"appConfig.googleAuth\">\r\n <asl-google-signin-button type='standard' width=\"350px\" size='medium' logo_alignment=\"center\" style=\"text-align: center;\"></asl-google-signin-button>\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n <a *ngIf=\"appConfig.selfService\" mat-button id=\"lnkRecover\" style=\"margin-top: 1em\" (click)=\"recoverAccount()\">Forgot your password ?</a>\r\n\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"style=='bs'\">\r\n\r\n <div class=\"container\">\r\n\r\n <div class=\"image\">\r\n <img class=\"mb-4\" src=\"c:\\Tinashe\\Code\\Angular\\Junk\\bs-examples\\assets\\brand\\bootstrap-logo.svg\" alt=\"\" width=\"72\" height=\"57\">\r\n </div>\r\n\r\n <div class=\"details\">\r\n <h1 class=\"h3 mb-3 fw-normal\" >Please sign in</h1>\r\n\r\n <div class=\"form-floating\">\r\n <input class=\"form-control\" id=\"floatingInput\" placeholder=\"name@example.com\" [(ngModel)]=\"user.userName\">\r\n <label for=\"floatingInput\">Username</label>\r\n </div>\r\n\r\n <div class=\"form-floating\">\r\n <input type=\"password\" class=\"form-control\" id=\"floatingPassword\" placeholder=\"Password\" [(ngModel)]=\"user.password\">\r\n <label for=\"floatingPassword\">Password</label>\r\n </div>\r\n\r\n <div class=\"form-check text-start my-3\">\r\n <input class=\"form-check-input\" type=\"checkbox\" value=\"remember-me\" id=\"flexCheckDefault\" >\r\n <label class=\"form-check-label\" for=\"flexCheckDefault\">\r\n Remember me\r\n </label>\r\n </div>\r\n\r\n <button class=\"btn btn-primary w-100 py-2\" (click)=\"login()\">Sign in</button>\r\n\r\n </div>\r\n\r\n <p class=\"mt-5 mb-3 text-body-secondary\">&copy; 2017\u20132023</p>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n", styles: [".login-page{position:absolute;inset:0;overflow:auto}.background{min-height:100%}.container{display:flex;flex-direction:column;align-items:center;height:100vh}.logo{margin-top:3em;margin-bottom:1em}.buttons{display:flex;flex-direction:row;justify-content:space-evenly}.button{display:flex;flex-direction:row;justify-content:center;margin-top:10px}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i15.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: i15.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i15.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "directive", type: i15.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i15.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: TextComponent, selector: "spa-text", inputs: ["readonly", "hint", "display", "placeholder", "value", "format", "type", "rows", "width", "options", "optionValue", "required", "min", "max", "regex"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "directive", type: i8.GoogleSigninButtonDirective, selector: "asl-google-signin-button", inputs: ["type", "size", "text", "shape", "theme", "logo_alignment", "width", "locale"] }] });
6211
+ LoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LoginComponent, selector: "spa-login", ngImport: i0, template: "\r\n <div *ngIf=\"style=='old'\" class=\"tin-bg-login login-page\">\r\n\r\n <div *ngIf=\"appConfig.logo!=''\" class=\"d-flex justify-content-center row align-items-center\" style=\"margin-top:3em;margin-bottom:1em\">\r\n\r\n <img *ngIf=\"appConfig.logoSize=='normal'\" [src]=\"appConfig.logo\" style=\"width: 100px;margin-right:3em;margin-left:3em\" />\r\n <img *ngIf=\"appConfig.logoSize=='medium'\" [src]=\"appConfig.logo\" style=\"width: 150px;margin-right:3em;margin-left:3em\" />\r\n <img *ngIf=\"appConfig.logoSize=='large'\" [src]=\"appConfig.logo\" style=\"width: 250px; margin-right:3em;margin-left:3em\" />\r\n\r\n </div>\r\n\r\n\r\n <div *ngIf=\"appConfig.logo ==''\" style=\"margin-top:2em\">\r\n <!-- Add margin top when there is no logo -->\r\n </div>\r\n\r\n\r\n <div class=\"d-flex justify-content-center row align-items-center\" style=\"margin-top:3em;\">\r\n\r\n <div class=\"d-none d-sm-block\">\r\n </div>\r\n\r\n <div style=\"margin-left:1em\">\r\n\r\n <mat-card class=\"mat-elevation-z3 login-card\" style=\"width:400px; \">\r\n\r\n <mat-card-header>\r\n <mat-card-title>{{appConfig.appName}}</mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n <div class=\"tin-input mt-2\">\r\n\r\n <spa-text id=\"txtuserName\" display=\"Username\" [(value)]=\"user.userName\" ></spa-text>\r\n\r\n <mat-form-field >\r\n <mat-label>Password</mat-label>\r\n <input id=\"txtPassword\" matInput [type]=\"hide ? 'password' : 'text'\" (keyup.enter)=\"login()\" [(ngModel)]=\"user.password\" autocomplete=\"off\" >\r\n <button mat-icon-button matSuffix (click)=\"hide = !hide\" [attr.aria-label]=\"'Hide password'\" [attr.aria-pressed]=\"hide\">\r\n <mat-icon style=\"font-size: 18px;\">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <div class=\"row \">\r\n\r\n <div class=\"col d-flex justify-content-center\">\r\n <button id=\"btnLogin\" mat-raised-button [disabled]=\"isProcessing\" style=\"width: 100px;\" (click)=\"login()\" color=\"primary\">Login</button>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-center\" *ngIf=\"appConfig.selfService\">\r\n <button id=\"btnSignup\" mat-stroked-button color=\"primary\" style=\"width: 100px;\" (click)=\"signup()\">Signup</button>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n <div *ngIf=\"appConfig.selfService\">\r\n <br />\r\n <a mat-button id=\"lnkRecover\" style=\"margin-left: 1em\" (click)=\"recoverAccount()\">Forgot your password ?</a>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <div *ngIf=\"style=='default'\" class=\"login-page background tin-bg-login\">\r\n\r\n <div class=\"container\" >\r\n\r\n <div class=\"logo\">\r\n <img *ngIf=\"appConfig.logoSize=='normal'\" [src]=\"appConfig.logo\" style=\"width: 100px\" />\r\n <img *ngIf=\"appConfig.logoSize=='medium'\" [src]=\"appConfig.logo\" style=\"width: 150px\" />\r\n <img *ngIf=\"appConfig.logoSize=='large'\" [src]=\"appConfig.logo\" style=\"width: 250px\" />\r\n </div>\r\n\r\n <mat-card class=\"mat-elevation-z3 \" style=\"width:400px; \">\r\n\r\n <mat-card-header>\r\n <mat-card-title style=\"font-size: 40px;margin-bottom: 10px; margin-top: 20px; font-weight: 300\">{{appConfig.appName}}</mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content *ngIf=\"appConfig.localAuth || appConfig.ADAuth\">\r\n\r\n <div class=\"tin-input mt-2\">\r\n\r\n <spa-text id=\"txtuserName\" display=\"Username\" [(value)]=\"user.userName\"></spa-text>\r\n\r\n <spa-text id=\"txtPassword\" display=\"Password\" format=\"password\" [(value)]=\"user.password\" (enterPress)=\"login()\"></spa-text>\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n\r\n\r\n <mat-card-actions style=\"margin-bottom: 10px;\">\r\n\r\n <div class=\"button mt-0\" *ngIf=\"appConfig.localAuth || appConfig.ADAuth\">\r\n <button id=\"btnLogin\" mat-flat-button [disabled]=\"isProcessing\" style=\"width: 350px;\" (click)=\"login()\" color=\"primary\">Login</button>\r\n </div>\r\n\r\n <div class=\"button\" *ngIf=\"(appConfig.localAuth || appConfig.ADAuth) && appConfig.selfService\" >\r\n <button id=\"btnSignup\" mat-stroked-button color=\"primary\" style=\"width: 350px;\" (click)=\"signup()\">Sign up with Email</button>\r\n </div>\r\n\r\n <div class=\"button\" *ngIf=\"appConfig.googleAuth\">\r\n <asl-google-signin-button type='standard' width=\"350px\" size='medium' logo_alignment=\"center\" style=\"text-align: center;\"></asl-google-signin-button>\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n <a *ngIf=\"appConfig.selfService\" mat-button id=\"lnkRecover\" style=\"margin-top: 1em\" (click)=\"recoverAccount()\">Forgot your password ?</a>\r\n\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"style=='bs'\">\r\n\r\n <div class=\"container\">\r\n\r\n <div class=\"image\">\r\n <img class=\"mb-4\" src=\"c:\\Tinashe\\Code\\Angular\\Junk\\bs-examples\\assets\\brand\\bootstrap-logo.svg\" alt=\"\" width=\"72\" height=\"57\">\r\n </div>\r\n\r\n <div class=\"details\">\r\n <h1 class=\"h3 mb-3 fw-normal\" >Please sign in</h1>\r\n\r\n <div class=\"form-floating\">\r\n <input class=\"form-control\" id=\"floatingInput\" placeholder=\"name@example.com\" [(ngModel)]=\"user.userName\">\r\n <label for=\"floatingInput\">Username</label>\r\n </div>\r\n\r\n <div class=\"form-floating\">\r\n <input type=\"password\" class=\"form-control\" id=\"floatingPassword\" placeholder=\"Password\" [(ngModel)]=\"user.password\">\r\n <label for=\"floatingPassword\">Password</label>\r\n </div>\r\n\r\n <div class=\"form-check text-start my-3\">\r\n <input class=\"form-check-input\" type=\"checkbox\" value=\"remember-me\" id=\"flexCheckDefault\" >\r\n <label class=\"form-check-label\" for=\"flexCheckDefault\">\r\n Remember me\r\n </label>\r\n </div>\r\n\r\n <button class=\"btn btn-primary w-100 py-2\" (click)=\"login()\">Sign in</button>\r\n\r\n </div>\r\n\r\n <p class=\"mt-5 mb-3 text-body-secondary\">&copy; 2017\u20132023</p>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n", styles: [".login-page{position:absolute;inset:0;overflow:auto}.background{min-height:100%}.container{display:flex;flex-direction:column;align-items:center;height:100vh}.logo{margin-top:3em;margin-bottom:1em}.buttons{display:flex;flex-direction:row;justify-content:space-evenly}.button{display:flex;flex-direction:row;justify-content:center;margin-top:10px}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i15.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: i15.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i15.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "directive", type: i15.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i15.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: TextComponent, selector: "spa-text", inputs: ["readonly", "hint", "display", "placeholder", "value", "format", "type", "rows", "width", "options", "optionValue", "required", "min", "max", "regex"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "directive", type: i8.GoogleSigninButtonDirective, selector: "asl-google-signin-button", inputs: ["type", "size", "text", "shape", "theme", "logo_alignment", "width", "locale"] }] });
6312
6212
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoginComponent, decorators: [{
6313
6213
  type: Component,
6314
6214
  args: [{ selector: "spa-login", template: "\r\n <div *ngIf=\"style=='old'\" class=\"tin-bg-login login-page\">\r\n\r\n <div *ngIf=\"appConfig.logo!=''\" class=\"d-flex justify-content-center row align-items-center\" style=\"margin-top:3em;margin-bottom:1em\">\r\n\r\n <img *ngIf=\"appConfig.logoSize=='normal'\" [src]=\"appConfig.logo\" style=\"width: 100px;margin-right:3em;margin-left:3em\" />\r\n <img *ngIf=\"appConfig.logoSize=='medium'\" [src]=\"appConfig.logo\" style=\"width: 150px;margin-right:3em;margin-left:3em\" />\r\n <img *ngIf=\"appConfig.logoSize=='large'\" [src]=\"appConfig.logo\" style=\"width: 250px; margin-right:3em;margin-left:3em\" />\r\n\r\n </div>\r\n\r\n\r\n <div *ngIf=\"appConfig.logo ==''\" style=\"margin-top:2em\">\r\n <!-- Add margin top when there is no logo -->\r\n </div>\r\n\r\n\r\n <div class=\"d-flex justify-content-center row align-items-center\" style=\"margin-top:3em;\">\r\n\r\n <div class=\"d-none d-sm-block\">\r\n </div>\r\n\r\n <div style=\"margin-left:1em\">\r\n\r\n <mat-card class=\"mat-elevation-z3 login-card\" style=\"width:400px; \">\r\n\r\n <mat-card-header>\r\n <mat-card-title>{{appConfig.appName}}</mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n <div class=\"tin-input mt-2\">\r\n\r\n <spa-text id=\"txtuserName\" display=\"Username\" [(value)]=\"user.userName\" ></spa-text>\r\n\r\n <mat-form-field >\r\n <mat-label>Password</mat-label>\r\n <input id=\"txtPassword\" matInput [type]=\"hide ? 'password' : 'text'\" (keyup.enter)=\"login()\" [(ngModel)]=\"user.password\" autocomplete=\"off\" >\r\n <button mat-icon-button matSuffix (click)=\"hide = !hide\" [attr.aria-label]=\"'Hide password'\" [attr.aria-pressed]=\"hide\">\r\n <mat-icon style=\"font-size: 18px;\">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <div class=\"row \">\r\n\r\n <div class=\"col d-flex justify-content-center\">\r\n <button id=\"btnLogin\" mat-raised-button [disabled]=\"isProcessing\" style=\"width: 100px;\" (click)=\"login()\" color=\"primary\">Login</button>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-center\" *ngIf=\"appConfig.selfService\">\r\n <button id=\"btnSignup\" mat-stroked-button color=\"primary\" style=\"width: 100px;\" (click)=\"signup()\">Signup</button>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n <div *ngIf=\"appConfig.selfService\">\r\n <br />\r\n <a mat-button id=\"lnkRecover\" style=\"margin-left: 1em\" (click)=\"recoverAccount()\">Forgot your password ?</a>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <div *ngIf=\"style=='default'\" class=\"login-page background tin-bg-login\">\r\n\r\n <div class=\"container\" >\r\n\r\n <div class=\"logo\">\r\n <img *ngIf=\"appConfig.logoSize=='normal'\" [src]=\"appConfig.logo\" style=\"width: 100px\" />\r\n <img *ngIf=\"appConfig.logoSize=='medium'\" [src]=\"appConfig.logo\" style=\"width: 150px\" />\r\n <img *ngIf=\"appConfig.logoSize=='large'\" [src]=\"appConfig.logo\" style=\"width: 250px\" />\r\n </div>\r\n\r\n <mat-card class=\"mat-elevation-z3 \" style=\"width:400px; \">\r\n\r\n <mat-card-header>\r\n <mat-card-title style=\"font-size: 40px;margin-bottom: 10px; margin-top: 20px; font-weight: 300\">{{appConfig.appName}}</mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content *ngIf=\"appConfig.localAuth || appConfig.ADAuth\">\r\n\r\n <div class=\"tin-input mt-2\">\r\n\r\n <spa-text id=\"txtuserName\" display=\"Username\" [(value)]=\"user.userName\"></spa-text>\r\n\r\n <spa-text id=\"txtPassword\" display=\"Password\" format=\"password\" [(value)]=\"user.password\" (enterPress)=\"login()\"></spa-text>\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n\r\n\r\n <mat-card-actions style=\"margin-bottom: 10px;\">\r\n\r\n <div class=\"button mt-0\" *ngIf=\"appConfig.localAuth || appConfig.ADAuth\">\r\n <button id=\"btnLogin\" mat-flat-button [disabled]=\"isProcessing\" style=\"width: 350px;\" (click)=\"login()\" color=\"primary\">Login</button>\r\n </div>\r\n\r\n <div class=\"button\" *ngIf=\"(appConfig.localAuth || appConfig.ADAuth) && appConfig.selfService\" >\r\n <button id=\"btnSignup\" mat-stroked-button color=\"primary\" style=\"width: 350px;\" (click)=\"signup()\">Sign up with Email</button>\r\n </div>\r\n\r\n <div class=\"button\" *ngIf=\"appConfig.googleAuth\">\r\n <asl-google-signin-button type='standard' width=\"350px\" size='medium' logo_alignment=\"center\" style=\"text-align: center;\"></asl-google-signin-button>\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n <a *ngIf=\"appConfig.selfService\" mat-button id=\"lnkRecover\" style=\"margin-top: 1em\" (click)=\"recoverAccount()\">Forgot your password ?</a>\r\n\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"style=='bs'\">\r\n\r\n <div class=\"container\">\r\n\r\n <div class=\"image\">\r\n <img class=\"mb-4\" src=\"c:\\Tinashe\\Code\\Angular\\Junk\\bs-examples\\assets\\brand\\bootstrap-logo.svg\" alt=\"\" width=\"72\" height=\"57\">\r\n </div>\r\n\r\n <div class=\"details\">\r\n <h1 class=\"h3 mb-3 fw-normal\" >Please sign in</h1>\r\n\r\n <div class=\"form-floating\">\r\n <input class=\"form-control\" id=\"floatingInput\" placeholder=\"name@example.com\" [(ngModel)]=\"user.userName\">\r\n <label for=\"floatingInput\">Username</label>\r\n </div>\r\n\r\n <div class=\"form-floating\">\r\n <input type=\"password\" class=\"form-control\" id=\"floatingPassword\" placeholder=\"Password\" [(ngModel)]=\"user.password\">\r\n <label for=\"floatingPassword\">Password</label>\r\n </div>\r\n\r\n <div class=\"form-check text-start my-3\">\r\n <input class=\"form-check-input\" type=\"checkbox\" value=\"remember-me\" id=\"flexCheckDefault\" >\r\n <label class=\"form-check-label\" for=\"flexCheckDefault\">\r\n Remember me\r\n </label>\r\n </div>\r\n\r\n <button class=\"btn btn-primary w-100 py-2\" (click)=\"login()\">Sign in</button>\r\n\r\n </div>\r\n\r\n <p class=\"mt-5 mb-3 text-body-secondary\">&copy; 2017\u20132023</p>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n", styles: [".login-page{position:absolute;inset:0;overflow:auto}.background{min-height:100%}.container{display:flex;flex-direction:column;align-items:center;height:100vh}.logo{margin-top:3em;margin-bottom:1em}.buttons{display:flex;flex-direction:row;justify-content:space-evenly}.button{display:flex;flex-direction:row;justify-content:center;margin-top:10px}\n"] }]
@@ -6683,7 +6583,7 @@ class SettingsComponent {
6683
6583
  }
6684
6584
  }
6685
6585
  SettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SettingsComponent, deps: [{ token: DataServiceLib }, { token: MessageService }], target: i0.ɵɵFactoryTarget.Component });
6686
- SettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SettingsComponent, selector: "spa-settings", ngImport: i0, template: "<h4>Settings</h4>\r\n<hr>\r\n\r\n<div class=\"container\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px;padding-left:10px\">\r\n\r\n <div class=\"col-2\">\r\n <!-- <button mat-raised-button (click)=\"addSetting()\">New Setting</button> -->\r\n </div>\r\n <div class=\"col-2\">\r\n <button mat-raised-button (click)=\"loadSettings()\">Refresh</button>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"tin-row align-items-center mt-1 mb-1\" style=\"margin-left:10px\" *ngFor=\"let setting of settings\">\r\n\r\n <mat-form-field style=\"width: 500px; font-size: 14px;\">\r\n <mat-label>{{setting.sName}}</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"setting.sValue\" >\r\n </mat-form-field>\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"updateSetting(setting)\" style=\"margin-right:10px;\"><mat-icon>done_all</mat-icon></button>\r\n\r\n <mat-label style=\"font-size: small;\">Last Updated by {{setting.updatedBy}} on {{setting.updatedDate | date: 'dd MMM yy HH:mm'}}</mat-label>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
6586
+ SettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SettingsComponent, selector: "spa-settings", ngImport: i0, template: "<h4>Settings</h4>\r\n<hr>\r\n\r\n<div class=\"container\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px;padding-left:10px\">\r\n\r\n <div class=\"col-2\">\r\n <!-- <button mat-raised-button (click)=\"addSetting()\">New Setting</button> -->\r\n </div>\r\n <div class=\"col-2\">\r\n <button mat-raised-button (click)=\"loadSettings()\">Refresh</button>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"tin-row align-items-center mt-1 mb-1\" style=\"margin-left:10px\" *ngFor=\"let setting of settings\">\r\n\r\n <mat-form-field style=\"width: 500px; font-size: 14px;\">\r\n <mat-label>{{setting.sName}}</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"setting.sValue\" >\r\n </mat-form-field>\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"updateSetting(setting)\" style=\"margin-right:10px;\"><mat-icon>done_all</mat-icon></button>\r\n\r\n <mat-label style=\"font-size: small;\">Last Updated by {{setting.updatedBy}} on {{setting.updatedDate | date: 'dd MMM yy HH:mm'}}</mat-label>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
6687
6587
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SettingsComponent, decorators: [{
6688
6588
  type: Component,
6689
6589
  args: [{ selector: 'spa-settings', template: "<h4>Settings</h4>\r\n<hr>\r\n\r\n<div class=\"container\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px;padding-left:10px\">\r\n\r\n <div class=\"col-2\">\r\n <!-- <button mat-raised-button (click)=\"addSetting()\">New Setting</button> -->\r\n </div>\r\n <div class=\"col-2\">\r\n <button mat-raised-button (click)=\"loadSettings()\">Refresh</button>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"tin-row align-items-center mt-1 mb-1\" style=\"margin-left:10px\" *ngFor=\"let setting of settings\">\r\n\r\n <mat-form-field style=\"width: 500px; font-size: 14px;\">\r\n <mat-label>{{setting.sName}}</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"setting.sValue\" >\r\n </mat-form-field>\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"updateSetting(setting)\" style=\"margin-right:10px;\"><mat-icon>done_all</mat-icon></button>\r\n\r\n <mat-label style=\"font-size: small;\">Last Updated by {{setting.updatedBy}} on {{setting.updatedDate | date: 'dd MMM yy HH:mm'}}</mat-label>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}\n"] }]
@@ -6708,7 +6608,7 @@ class LogsComponent {
6708
6608
  }
6709
6609
  }
6710
6610
  LogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LogsComponent, deps: [{ token: AuthService }, { token: DataServiceLib }], target: i0.ɵɵFactoryTarget.Component });
6711
- LogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LogsComponent, selector: "spa-logs", viewQueries: [{ propertyName: "logsPaginator", first: true, predicate: ["logsPaginator"], descendants: true }], ngImport: i0, template: "<h4>Logs</h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px\">\r\n\r\n <div class=\"col-2\">\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end\">\r\n <spa-filter [data]=\"logs\" (refreshClick)=\"loadLogs()\"></spa-filter>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <p *ngIf=\"!logs\"><em>Loading...</em></p>\r\n\r\n\r\n <div class=\"mat-elevation-z8\" *ngIf=\"logs\">\r\n\r\n <table id=\"tblTable\" mat-table [dataSource]=\"logs\">\r\n\r\n\r\n <ng-container matColumnDef=\"userName\">\r\n <th mat-header-cell *matHeaderCellDef> User </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.userName}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"dateLogged\">\r\n <th mat-header-cell *matHeaderCellDef class=\"datetime\"> Date Logged </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.dateLogged | date: 'dd MMM yy HH:mm:ss'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"source\">\r\n <th mat-header-cell *matHeaderCellDef> Source </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.source}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"details\">\r\n <th mat-header-cell *matHeaderCellDef> Details </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.details}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"fullName\">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef=\"let log\">{{log.user.firstName}} {{log.user.lastName}}</td>\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #logsPaginator [pageSizeOptions]=\"[50, 100, 200]\" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7$2.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
6611
+ LogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LogsComponent, selector: "spa-logs", viewQueries: [{ propertyName: "logsPaginator", first: true, predicate: ["logsPaginator"], descendants: true }], ngImport: i0, template: "<h4>Logs</h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px\">\r\n\r\n <div class=\"col-2\">\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end\">\r\n <spa-filter [data]=\"logs\" (refreshClick)=\"loadLogs()\"></spa-filter>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <p *ngIf=\"!logs\"><em>Loading...</em></p>\r\n\r\n\r\n <div class=\"mat-elevation-z8\" *ngIf=\"logs\">\r\n\r\n <table id=\"tblTable\" mat-table [dataSource]=\"logs\">\r\n\r\n\r\n <ng-container matColumnDef=\"userName\">\r\n <th mat-header-cell *matHeaderCellDef> User </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.userName}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"dateLogged\">\r\n <th mat-header-cell *matHeaderCellDef class=\"datetime\"> Date Logged </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.dateLogged | date: 'dd MMM yy HH:mm:ss'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"source\">\r\n <th mat-header-cell *matHeaderCellDef> Source </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.source}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"details\">\r\n <th mat-header-cell *matHeaderCellDef> Details </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.details}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"fullName\">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef=\"let log\">{{log.user.firstName}} {{log.user.lastName}}</td>\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #logsPaginator [pageSizeOptions]=\"[50, 100, 200]\" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i10.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i10.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i10.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i10.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i10.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i10.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i10.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i10.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i10.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i10.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i11$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
6712
6612
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LogsComponent, decorators: [{
6713
6613
  type: Component,
6714
6614
  args: [{ selector: 'spa-logs', template: "<h4>Logs</h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px\">\r\n\r\n <div class=\"col-2\">\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end\">\r\n <spa-filter [data]=\"logs\" (refreshClick)=\"loadLogs()\"></spa-filter>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <p *ngIf=\"!logs\"><em>Loading...</em></p>\r\n\r\n\r\n <div class=\"mat-elevation-z8\" *ngIf=\"logs\">\r\n\r\n <table id=\"tblTable\" mat-table [dataSource]=\"logs\">\r\n\r\n\r\n <ng-container matColumnDef=\"userName\">\r\n <th mat-header-cell *matHeaderCellDef> User </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.userName}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"dateLogged\">\r\n <th mat-header-cell *matHeaderCellDef class=\"datetime\"> Date Logged </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.dateLogged | date: 'dd MMM yy HH:mm:ss'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"source\">\r\n <th mat-header-cell *matHeaderCellDef> Source </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.source}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"details\">\r\n <th mat-header-cell *matHeaderCellDef> Details </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.details}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"fullName\">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef=\"let log\">{{log.user.firstName}} {{log.user.lastName}}</td>\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #logsPaginator [pageSizeOptions]=\"[50, 100, 200]\" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"] }]
@@ -6811,7 +6711,7 @@ class UsersComponent {
6811
6711
  }
6812
6712
  }
6813
6713
  UsersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UsersComponent, deps: [{ token: HttpService }, { token: i1$3.Router }, { token: AuthService }, { token: DataServiceLib }, { token: i4.MatDialog }, { token: MessageService }], target: i0.ɵɵFactoryTarget.Component });
6814
- UsersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: UsersComponent, selector: "spa-users", viewQueries: [{ propertyName: "usersPaginator", first: true, predicate: ["usersPaginator"], descendants: true }], ngImport: i0, template: "\r\n<h4>Users</h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid\" style=\"font-size: 14px;\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px\">\r\n <div class=\"col-2\">\r\n <button id=\"btnCreateAccount\" mat-raised-button color=\"primary\" (click)=\"createAccount()\">Create User</button>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end\">\r\n <spa-filter [data]=\"users\" (refreshClick)=\"UpdateData()\"></spa-filter>\r\n </div>\r\n </div>\r\n\r\n\r\n <p *ngIf=\"!users\"><em>Loading...</em></p>\r\n\r\n\r\n <div class=\"mat-elevation-z8\" *ngIf=\"users\">\r\n\r\n <table id=\"tblTable\" mat-table [dataSource]=\"users\">\r\n\r\n <ng-container matColumnDef=\"userName\">\r\n <th mat-header-cell *matHeaderCellDef> UserName </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.userName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"locked\">\r\n <th mat-header-cell *matHeaderCellDef> Locked </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.locked}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"fullName\">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.firstName}} {{user.lastName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"roleName\">\r\n <th mat-header-cell *matHeaderCellDef> Role </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.role.roleName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"disabled\">\r\n <th mat-header-cell *matHeaderCellDef> Disabled </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.disabled}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"dateCreated\">\r\n <th mat-header-cell *matHeaderCellDef> Created </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.createdDate | date: 'dd/MM/yyyy'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"dateUpdated\">\r\n <th mat-header-cell *matHeaderCellDef> Updated </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.updatedDate | date: 'dd/MM/yyyy'}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"Action\">\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef=\"let user\" style=\"width: 250px;\">\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"viewProfile(user)\" style=\"margin-right:30px\" matTooltip=\"View Profile\" matTooltipPosition=\"above\"> <mat-icon>account_circle</mat-icon></button>\r\n\r\n <button *ngIf=\"user.locked=='0'\" mat-mini-fab color=\"warn\" (click)=\"lock(user)\" style=\"margin-right:10px\" matTooltip=\"Lock\" matTooltipPosition=\"above\"> <mat-icon>lock</mat-icon></button>\r\n <button *ngIf=\"user.locked=='1'\" mat-mini-fab (click)=\"unlock(user)\" style=\"margin-right:10px; background-color: green;\" matTooltip=\"Unlock\" matTooltipPosition=\"above\"> <mat-icon >lock_open</mat-icon></button>\r\n\r\n <!-- <button *ngIf=\"user.disabled=='0'\" mat-mini-fab color=\"warn\" (click)=\"disable(user)\" style=\"margin-right:10px\" matTooltip=\"Disable\" matTooltipPosition=\"above\"> <mat-icon>block</mat-icon></button>\r\n <button *ngIf=\"user.disabled=='1'\" mat-mini-fab (click)=\"enable(user)\" style=\"margin-right:10px; background-color: green\" matTooltip=\"Enable\" matTooltipPosition=\"above\"> <mat-icon>done</mat-icon></button> -->\r\n\r\n <button mat-mini-fab color=\"warn\" (click)=\"deleteUser(user)\" style=\"margin-right:10px\" matTooltip=\"Delete\" matTooltipPosition=\"above\"> <mat-icon>delete</mat-icon></button>\r\n <!-- <button mat-mini-fab color=\"primary\" (click)=\"recover(user)\" style=\"margin-right:10px\" matTooltip=\"Reset Password\" matTooltipPosition=\"above\"> <mat-icon>vpn_key</mat-icon></button> -->\r\n\r\n\r\n\r\n </td>\r\n </ng-container>\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': row.disabled =='1'}\"></tr>\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #usersPaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n<!-- ------------------ -->\r\n\r\n<!-- <div class=\"container mt-5\" style=\" font-size: 14px;\">\r\n<spa-table [data]=\"usersRaw\" [config]=\"config\" (refreshClick)=\"UpdateData()\" (viewClick)=\"viewProfile($event)\" (createClick)=\"createAccount()\" (deleteClick)=\"deleteUser($event)\"></spa-table>\r\n</div> -->\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.make-gray{background-color:#d3d3d3}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7$2.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
6714
+ UsersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: UsersComponent, selector: "spa-users", viewQueries: [{ propertyName: "usersPaginator", first: true, predicate: ["usersPaginator"], descendants: true }], ngImport: i0, template: "\r\n<h4>Users</h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid\" style=\"font-size: 14px;\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px\">\r\n <div class=\"col-2\">\r\n <button id=\"btnCreateAccount\" mat-raised-button color=\"primary\" (click)=\"createAccount()\">Create User</button>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end\">\r\n <spa-filter [data]=\"users\" (refreshClick)=\"UpdateData()\"></spa-filter>\r\n </div>\r\n </div>\r\n\r\n\r\n <p *ngIf=\"!users\"><em>Loading...</em></p>\r\n\r\n\r\n <div class=\"mat-elevation-z8\" *ngIf=\"users\">\r\n\r\n <table id=\"tblTable\" mat-table [dataSource]=\"users\">\r\n\r\n <ng-container matColumnDef=\"userName\">\r\n <th mat-header-cell *matHeaderCellDef> UserName </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.userName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"locked\">\r\n <th mat-header-cell *matHeaderCellDef> Locked </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.locked}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"fullName\">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.firstName}} {{user.lastName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"roleName\">\r\n <th mat-header-cell *matHeaderCellDef> Role </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.role.roleName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"disabled\">\r\n <th mat-header-cell *matHeaderCellDef> Disabled </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.disabled}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"dateCreated\">\r\n <th mat-header-cell *matHeaderCellDef> Created </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.createdDate | date: 'dd/MM/yyyy'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"dateUpdated\">\r\n <th mat-header-cell *matHeaderCellDef> Updated </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.updatedDate | date: 'dd/MM/yyyy'}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"Action\">\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef=\"let user\" style=\"width: 250px;\">\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"viewProfile(user)\" style=\"margin-right:30px\" matTooltip=\"View Profile\" matTooltipPosition=\"above\"> <mat-icon>account_circle</mat-icon></button>\r\n\r\n <button *ngIf=\"user.locked=='0'\" mat-mini-fab color=\"warn\" (click)=\"lock(user)\" style=\"margin-right:10px\" matTooltip=\"Lock\" matTooltipPosition=\"above\"> <mat-icon>lock</mat-icon></button>\r\n <button *ngIf=\"user.locked=='1'\" mat-mini-fab (click)=\"unlock(user)\" style=\"margin-right:10px; background-color: green;\" matTooltip=\"Unlock\" matTooltipPosition=\"above\"> <mat-icon >lock_open</mat-icon></button>\r\n\r\n <!-- <button *ngIf=\"user.disabled=='0'\" mat-mini-fab color=\"warn\" (click)=\"disable(user)\" style=\"margin-right:10px\" matTooltip=\"Disable\" matTooltipPosition=\"above\"> <mat-icon>block</mat-icon></button>\r\n <button *ngIf=\"user.disabled=='1'\" mat-mini-fab (click)=\"enable(user)\" style=\"margin-right:10px; background-color: green\" matTooltip=\"Enable\" matTooltipPosition=\"above\"> <mat-icon>done</mat-icon></button> -->\r\n\r\n <button mat-mini-fab color=\"warn\" (click)=\"deleteUser(user)\" style=\"margin-right:10px\" matTooltip=\"Delete\" matTooltipPosition=\"above\"> <mat-icon>delete</mat-icon></button>\r\n <!-- <button mat-mini-fab color=\"primary\" (click)=\"recover(user)\" style=\"margin-right:10px\" matTooltip=\"Reset Password\" matTooltipPosition=\"above\"> <mat-icon>vpn_key</mat-icon></button> -->\r\n\r\n\r\n\r\n </td>\r\n </ng-container>\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': row.disabled =='1'}\"></tr>\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #usersPaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n<!-- ------------------ -->\r\n\r\n<!-- <div class=\"container mt-5\" style=\" font-size: 14px;\">\r\n<spa-table [data]=\"usersRaw\" [config]=\"config\" (refreshClick)=\"UpdateData()\" (viewClick)=\"viewProfile($event)\" (createClick)=\"createAccount()\" (deleteClick)=\"deleteUser($event)\"></spa-table>\r\n</div> -->\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.make-gray{background-color:#d3d3d3}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i10.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i10.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i10.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i10.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i10.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i10.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i10.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i10.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i10.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i10.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i11$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: FilterComponent, selector: "spa-filter", inputs: ["flatButtons", "showText", "showButton", "data"], outputs: ["refreshClick"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
6815
6715
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UsersComponent, decorators: [{
6816
6716
  type: Component,
6817
6717
  args: [{ selector: "spa-users", template: "\r\n<h4>Users</h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid\" style=\"font-size: 14px;\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px\">\r\n <div class=\"col-2\">\r\n <button id=\"btnCreateAccount\" mat-raised-button color=\"primary\" (click)=\"createAccount()\">Create User</button>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end\">\r\n <spa-filter [data]=\"users\" (refreshClick)=\"UpdateData()\"></spa-filter>\r\n </div>\r\n </div>\r\n\r\n\r\n <p *ngIf=\"!users\"><em>Loading...</em></p>\r\n\r\n\r\n <div class=\"mat-elevation-z8\" *ngIf=\"users\">\r\n\r\n <table id=\"tblTable\" mat-table [dataSource]=\"users\">\r\n\r\n <ng-container matColumnDef=\"userName\">\r\n <th mat-header-cell *matHeaderCellDef> UserName </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.userName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"locked\">\r\n <th mat-header-cell *matHeaderCellDef> Locked </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.locked}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"fullName\">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.firstName}} {{user.lastName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"roleName\">\r\n <th mat-header-cell *matHeaderCellDef> Role </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.role.roleName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"disabled\">\r\n <th mat-header-cell *matHeaderCellDef> Disabled </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.disabled}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"dateCreated\">\r\n <th mat-header-cell *matHeaderCellDef> Created </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.createdDate | date: 'dd/MM/yyyy'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"dateUpdated\">\r\n <th mat-header-cell *matHeaderCellDef> Updated </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.updatedDate | date: 'dd/MM/yyyy'}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"Action\">\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef=\"let user\" style=\"width: 250px;\">\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"viewProfile(user)\" style=\"margin-right:30px\" matTooltip=\"View Profile\" matTooltipPosition=\"above\"> <mat-icon>account_circle</mat-icon></button>\r\n\r\n <button *ngIf=\"user.locked=='0'\" mat-mini-fab color=\"warn\" (click)=\"lock(user)\" style=\"margin-right:10px\" matTooltip=\"Lock\" matTooltipPosition=\"above\"> <mat-icon>lock</mat-icon></button>\r\n <button *ngIf=\"user.locked=='1'\" mat-mini-fab (click)=\"unlock(user)\" style=\"margin-right:10px; background-color: green;\" matTooltip=\"Unlock\" matTooltipPosition=\"above\"> <mat-icon >lock_open</mat-icon></button>\r\n\r\n <!-- <button *ngIf=\"user.disabled=='0'\" mat-mini-fab color=\"warn\" (click)=\"disable(user)\" style=\"margin-right:10px\" matTooltip=\"Disable\" matTooltipPosition=\"above\"> <mat-icon>block</mat-icon></button>\r\n <button *ngIf=\"user.disabled=='1'\" mat-mini-fab (click)=\"enable(user)\" style=\"margin-right:10px; background-color: green\" matTooltip=\"Enable\" matTooltipPosition=\"above\"> <mat-icon>done</mat-icon></button> -->\r\n\r\n <button mat-mini-fab color=\"warn\" (click)=\"deleteUser(user)\" style=\"margin-right:10px\" matTooltip=\"Delete\" matTooltipPosition=\"above\"> <mat-icon>delete</mat-icon></button>\r\n <!-- <button mat-mini-fab color=\"primary\" (click)=\"recover(user)\" style=\"margin-right:10px\" matTooltip=\"Reset Password\" matTooltipPosition=\"above\"> <mat-icon>vpn_key</mat-icon></button> -->\r\n\r\n\r\n\r\n </td>\r\n </ng-container>\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': row.disabled =='1'}\"></tr>\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #usersPaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n<!-- ------------------ -->\r\n\r\n<!-- <div class=\"container mt-5\" style=\" font-size: 14px;\">\r\n<spa-table [data]=\"usersRaw\" [config]=\"config\" (refreshClick)=\"UpdateData()\" (viewClick)=\"viewProfile($event)\" (createClick)=\"createAccount()\" (deleteClick)=\"deleteUser($event)\"></spa-table>\r\n</div> -->\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.make-gray{background-color:#d3d3d3}\n"] }]
@@ -6855,7 +6755,7 @@ class addRoleDialog {
6855
6755
  ;
6856
6756
  }
6857
6757
  addRoleDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: addRoleDialog, deps: [{ token: LoaderService }, { token: MessageService }, { token: DataServiceLib }, { token: AuthService }, { token: i4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
6858
- addRoleDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: addRoleDialog, selector: "app-addRole", ngImport: i0, template: "<mat-form-field>\r\n <mat-label>Role Name</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"role.roleName\" placeholder=\"Enter Role Name\" />\r\n</mat-form-field>\r\n\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n <div class=\"row\" >\r\n\r\n <!-- <div class=\" col-4\">\r\n\r\n <div class=\"row\">\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:14px\" [(ngModel)]=\"role.cap1\">Admin</mat-checkbox>\r\n </div>\r\n\r\n </div> -->\r\n\r\n <div class=\"row\" style=\"margin-left: 2em;margin-right: 2em;\">\r\n\r\n <div class=\"row\" style=\"margin-left: 2em;\" *ngFor=\"let capItem of capItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px; width: 200px;\" [(ngModel)]=\"role[capItem.name]\">{{capItem.display}}</mat-checkbox>\r\n\r\n <div *ngFor=\"let capSubItem of capItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px; width: 200px;\" [(ngModel)]=\"role[capSubItem.name]\">{{capSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]=\"isProcessing\" (click)=\"submit()\" cdkFocusInitial>Submit</button>\r\n <button mat-button mat-dialog-close=\"success\">Cancel</button>\r\n</mat-dialog-actions>\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] });
6758
+ addRoleDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: addRoleDialog, selector: "app-addRole", ngImport: i0, template: "<mat-form-field>\r\n <mat-label>Role Name</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"role.roleName\" placeholder=\"Enter Role Name\" />\r\n</mat-form-field>\r\n\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n <div class=\"row\" >\r\n\r\n <!-- <div class=\" col-4\">\r\n\r\n <div class=\"row\">\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:14px\" [(ngModel)]=\"role.cap1\">Admin</mat-checkbox>\r\n </div>\r\n\r\n </div> -->\r\n\r\n <div class=\"row\" style=\"margin-left: 2em;margin-right: 2em;\">\r\n\r\n <div class=\"row\" style=\"margin-left: 2em;\" *ngFor=\"let capItem of capItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px; width: 200px;\" [(ngModel)]=\"role[capItem.name]\">{{capItem.display}}</mat-checkbox>\r\n\r\n <div *ngFor=\"let capSubItem of capItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px; width: 200px;\" [(ngModel)]=\"role[capSubItem.name]\">{{capSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]=\"isProcessing\" (click)=\"submit()\" cdkFocusInitial>Submit</button>\r\n <button mat-button mat-dialog-close=\"success\">Cancel</button>\r\n</mat-dialog-actions>\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] });
6859
6759
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: addRoleDialog, decorators: [{
6860
6760
  type: Component,
6861
6761
  args: [{ selector: 'app-addRole', template: "<mat-form-field>\r\n <mat-label>Role Name</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"role.roleName\" placeholder=\"Enter Role Name\" />\r\n</mat-form-field>\r\n\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n <div class=\"row\" >\r\n\r\n <!-- <div class=\" col-4\">\r\n\r\n <div class=\"row\">\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:14px\" [(ngModel)]=\"role.cap1\">Admin</mat-checkbox>\r\n </div>\r\n\r\n </div> -->\r\n\r\n <div class=\"row\" style=\"margin-left: 2em;margin-right: 2em;\">\r\n\r\n <div class=\"row\" style=\"margin-left: 2em;\" *ngFor=\"let capItem of capItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px; width: 200px;\" [(ngModel)]=\"role[capItem.name]\">{{capItem.display}}</mat-checkbox>\r\n\r\n <div *ngFor=\"let capSubItem of capItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px; width: 200px;\" [(ngModel)]=\"role[capSubItem.name]\">{{capSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]=\"isProcessing\" (click)=\"submit()\" cdkFocusInitial>Submit</button>\r\n <button mat-button mat-dialog-close=\"success\">Cancel</button>\r\n</mat-dialog-actions>\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"] }]
@@ -6933,7 +6833,7 @@ class RolesComponent {
6933
6833
  }
6934
6834
  }
6935
6835
  RolesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RolesComponent, deps: [{ token: HttpService }, { token: i1$3.Router }, { token: AuthService }, { token: DataServiceLib }, { token: i4.MatDialog }, { token: MessageService }], target: i0.ɵɵFactoryTarget.Component });
6936
- RolesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: RolesComponent, selector: "spa-roles", ngImport: i0, template: "<h4> Roles </h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid mb-5\">\r\n\r\n <div class=\"d-flex justify-content-between mb-2\">\r\n\r\n <div >\r\n <button id=\"btnNewRole\" mat-raised-button color=\"primary\" (click)=\"addRole()\">New Role</button>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end\">\r\n <button id=\"btnRefresh\" mat-mini-fab color=\"primary\" (click)=\"refresh()\" matTooltip=\"refresh data\" matTooltipPosition=\"right\"><mat-icon class=\"refreshIcon\">refresh</mat-icon></button>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\" *ngFor=\"let role of roles\">\r\n\r\n <mat-card class=\"mat-elevation-z8\" style=\"width:100%\">\r\n\r\n <h4>{{role.roleName}}</h4>\r\n <hr />\r\n\r\n <div class=\"tin-row\" style=\" font-size:12px;\">\r\n\r\n\r\n <div class=\"tin-row\" *ngFor=\"let capItem of appConfig.capItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"min-width: 100px;\" [(ngModel)]=\"role[capItem.name]\">{{capItem.display}}</mat-checkbox>\r\n\r\n <div class=\"tin-row\" *ngFor=\"let capSubItem of capItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"min-width: 100px;\" [(ngModel)]=\"role[capSubItem.name]\">{{capSubItem.display}}</mat-checkbox>\r\n\r\n <div class=\"tin-row\" *ngFor=\"let capSubSubItem of capSubItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"min-width: 100px;\" [(ngModel)]=\"role[capSubSubItem.name]\">{{capSubSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"updateRole(role)\" style=\"margin-right:10px;\">\r\n <mat-icon>done_all</mat-icon>\r\n </button>\r\n\r\n <button mat-mini-fab color=\"warn\" (click)=\"deleteRole(role)\" style=\"margin-right:10px\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n </div>\r\n\r\n\r\n</div>\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i15.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i15.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
6836
+ RolesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: RolesComponent, selector: "spa-roles", ngImport: i0, template: "<h4> Roles </h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid mb-5\">\r\n\r\n <div class=\"d-flex justify-content-between mb-2\">\r\n\r\n <div >\r\n <button id=\"btnNewRole\" mat-raised-button color=\"primary\" (click)=\"addRole()\">New Role</button>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end\">\r\n <button id=\"btnRefresh\" mat-mini-fab color=\"primary\" (click)=\"refresh()\" matTooltip=\"refresh data\" matTooltipPosition=\"right\"><mat-icon class=\"refreshIcon\">refresh</mat-icon></button>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\" *ngFor=\"let role of roles\">\r\n\r\n <mat-card class=\"mat-elevation-z8\" style=\"width:100%\">\r\n\r\n <h4>{{role.roleName}}</h4>\r\n <hr />\r\n\r\n <div class=\"tin-row\" style=\" font-size:12px;\">\r\n\r\n\r\n <div class=\"tin-row\" *ngFor=\"let capItem of appConfig.capItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"min-width: 100px;\" [(ngModel)]=\"role[capItem.name]\">{{capItem.display}}</mat-checkbox>\r\n\r\n <div class=\"tin-row\" *ngFor=\"let capSubItem of capItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"min-width: 100px;\" [(ngModel)]=\"role[capSubItem.name]\">{{capSubItem.display}}</mat-checkbox>\r\n\r\n <div class=\"tin-row\" *ngFor=\"let capSubSubItem of capSubItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"min-width: 100px;\" [(ngModel)]=\"role[capSubSubItem.name]\">{{capSubSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"updateRole(role)\" style=\"margin-right:10px;\">\r\n <mat-icon>done_all</mat-icon>\r\n </button>\r\n\r\n <button mat-mini-fab color=\"warn\" (click)=\"deleteRole(role)\" style=\"margin-right:10px\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n </div>\r\n\r\n\r\n</div>\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i15.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i15.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
6937
6837
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RolesComponent, decorators: [{
6938
6838
  type: Component,
6939
6839
  args: [{ selector: "spa-roles", template: "<h4> Roles </h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid mb-5\">\r\n\r\n <div class=\"d-flex justify-content-between mb-2\">\r\n\r\n <div >\r\n <button id=\"btnNewRole\" mat-raised-button color=\"primary\" (click)=\"addRole()\">New Role</button>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-end\">\r\n <button id=\"btnRefresh\" mat-mini-fab color=\"primary\" (click)=\"refresh()\" matTooltip=\"refresh data\" matTooltipPosition=\"right\"><mat-icon class=\"refreshIcon\">refresh</mat-icon></button>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\" *ngFor=\"let role of roles\">\r\n\r\n <mat-card class=\"mat-elevation-z8\" style=\"width:100%\">\r\n\r\n <h4>{{role.roleName}}</h4>\r\n <hr />\r\n\r\n <div class=\"tin-row\" style=\" font-size:12px;\">\r\n\r\n\r\n <div class=\"tin-row\" *ngFor=\"let capItem of appConfig.capItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"min-width: 100px;\" [(ngModel)]=\"role[capItem.name]\">{{capItem.display}}</mat-checkbox>\r\n\r\n <div class=\"tin-row\" *ngFor=\"let capSubItem of capItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"min-width: 100px;\" [(ngModel)]=\"role[capSubItem.name]\">{{capSubItem.display}}</mat-checkbox>\r\n\r\n <div class=\"tin-row\" *ngFor=\"let capSubSubItem of capSubItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"min-width: 100px;\" [(ngModel)]=\"role[capSubSubItem.name]\">{{capSubSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"updateRole(role)\" style=\"margin-right:10px;\">\r\n <mat-icon>done_all</mat-icon>\r\n </button>\r\n\r\n <button mat-mini-fab color=\"warn\" (click)=\"deleteRole(role)\" style=\"margin-right:10px\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n </div>\r\n\r\n\r\n</div>\r\n\r\n", styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}\n"] }]
@@ -7240,5 +7140,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
7240
7140
  * Generated bundle index. Do not edit.
7241
7141
  */
7242
7142
 
7243
- export { Account, AccountsComponent, Action, ActionResponse, ActivityComponent, AdminModule, ApiResponse, AppConfig, AttachComponent, AuthService, CapItem, ChangePasswordComponent, ChangeUserPassword, CheckComponent, ChipsComponent, Constants, Core, CreateAccountComponent, CustomersComponent, DataServiceLib, DateComponent, DatetimeComponent, DepartmentsComponent, DetailsDialog, DetailsDialogConfig, DetailsDialogProcessor, DetailsSource, EmployeesComponent, ExportService, FilterComponent, FinAccount, FormComponent, FormConfig, GradesComponent, HttpService, IndexModule, InventoryComponent, LabelComponent, ListDialogComponent, ListDialogConfig, LoaderComponent, LoaderService, LogLevel, LogService, LoginComponent, LogsComponent, MessageService, MoneyComponent, NavMenuComponent, NumberComponent, OptionComponent, PositionsComponent, Profile, ProfileComponent, RecoverAccountComponent, Register, Role, RolesComponent, SearchComponent, SearchConfig, SelectComponent, SettingsComponent, SignupComponent, SpaAdminModule, SpaIndexModule, SpaMatModule, SpaUserModule, Step, StepsComponent, StorageService, SuppliersComponent, TableComponent, TableConfig, TasksComponent, TextComponent, TileConfig, TilesComponent, TinSpaComponent, TinSpaModule, TinSpaService, Transaction, TransactionsComponent, User, UserModule, UsersComponent, ViewerComponent, WelcomeComponent, addRoleDialog, loginConfig, messageDialog, viewerDialog };
7143
+ export { Account, AccountsComponent, Action, ActionResponse, ActivityComponent, AdminModule, ApiResponse, AppConfig, AttachComponent, AuthService, CapItem, ChangePasswordComponent, ChangeUserPassword, CheckComponent, ChipsComponent, Constants, Core, CreateAccountComponent, CustomersComponent, DataServiceLib, DateComponent, DatetimeComponent, DepartmentsComponent, DetailsDialog, DetailsDialogConfig, DetailsDialogProcessor, DetailsSource, DialogService, EmployeesComponent, ExportService, FilterComponent, FinAccount, FormComponent, FormConfig, GradesComponent, HttpService, IndexModule, InventoryComponent, LabelComponent, ListDialogComponent, ListDialogConfig, LoaderComponent, LoaderService, LogLevel, LogService, LoginComponent, LogsComponent, MessageService, MoneyComponent, NavMenuComponent, NumberComponent, OptionComponent, PositionsComponent, Profile, ProfileComponent, RecoverAccountComponent, Register, Role, RolesComponent, SearchComponent, SearchConfig, SelectComponent, SettingsComponent, SignupComponent, SpaAdminModule, SpaIndexModule, SpaMatModule, SpaUserModule, Step, StepsComponent, StorageService, SuppliersComponent, TableComponent, TableConfig, TasksComponent, TextComponent, TileConfig, TilesComponent, TinSpaComponent, TinSpaModule, TinSpaService, Transaction, TransactionsComponent, User, UserModule, UsersComponent, ViewerComponent, WelcomeComponent, addRoleDialog, loginConfig, messageDialog, viewerDialog };
7244
7144
  //# sourceMappingURL=tin-spa.mjs.map