newportsite 1.1.3

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 (131) hide show
  1. package/newportsite-1.1.3.tgz +0 -0
  2. package/ng-package.json +7 -0
  3. package/obfuscate.js +70 -0
  4. package/package.json +15 -0
  5. package/src/lib/app.component.ts +47 -0
  6. package/src/lib/app.routing.ts +38 -0
  7. package/src/lib/auth/alert.component.html +5 -0
  8. package/src/lib/auth/alert.component.ts +24 -0
  9. package/src/lib/auth/auth.component.html +1 -0
  10. package/src/lib/auth/auth.component.ts +10 -0
  11. package/src/lib/auth/auth.routes.ts +16 -0
  12. package/src/lib/auth/index.ts +4 -0
  13. package/src/lib/auth/login.component.html +87 -0
  14. package/src/lib/auth/login.component.ts +158 -0
  15. package/src/lib/auth/models/index.ts +1 -0
  16. package/src/lib/auth/models/user.ts +25 -0
  17. package/src/lib/auth/register.component.html +157 -0
  18. package/src/lib/auth/register.component.ts +219 -0
  19. package/src/lib/auth/services/alert.service.ts +47 -0
  20. package/src/lib/auth/services/auth.service.ts +28 -0
  21. package/src/lib/auth/services/index.ts +3 -0
  22. package/src/lib/auth/services/user.service.spec.ts +112 -0
  23. package/src/lib/auth/services/user.service.ts +47 -0
  24. package/src/lib/common/card.component.html +72 -0
  25. package/src/lib/common/card.component.ts +102 -0
  26. package/src/lib/common/commands.component.html +8 -0
  27. package/src/lib/common/commands.component.ts +42 -0
  28. package/src/lib/common/context.component.html +9 -0
  29. package/src/lib/common/context.component.ts +38 -0
  30. package/src/lib/common/grid.component.html +20 -0
  31. package/src/lib/common/grid.component.ts +747 -0
  32. package/src/lib/common/index.ts +9 -0
  33. package/src/lib/common/loader.component.html +5 -0
  34. package/src/lib/common/loader.component.ts +27 -0
  35. package/src/lib/common/lookup.component.html +29 -0
  36. package/src/lib/common/lookup.component.ts +115 -0
  37. package/src/lib/common/messagebox.component.html +39 -0
  38. package/src/lib/common/messagebox.component.ts +74 -0
  39. package/src/lib/common/theme-toggle.component.ts +139 -0
  40. package/src/lib/config.ts +62 -0
  41. package/src/lib/containers/default-layout/default-layout.component.html +191 -0
  42. package/src/lib/containers/default-layout/default-layout.component.ts +158 -0
  43. package/src/lib/containers/default-layout/index.ts +1 -0
  44. package/src/lib/containers/index.ts +1 -0
  45. package/src/lib/directives/component.draggable.ts +80 -0
  46. package/src/lib/directives/index.ts +2 -0
  47. package/src/lib/directives/input.directive.spec.ts +158 -0
  48. package/src/lib/directives/input.directive.ts +210 -0
  49. package/src/lib/home/dashboard/dashboard.component.html +38 -0
  50. package/src/lib/home/dashboard/dashboard.component.ts +50 -0
  51. package/src/lib/home/dashboard/index.ts +1 -0
  52. package/src/lib/home/index.component.html +1 -0
  53. package/src/lib/home/index.component.ts +10 -0
  54. package/src/lib/home/index.routes.ts +29 -0
  55. package/src/lib/home/index.ts +1 -0
  56. package/src/lib/home/info/index.ts +1 -0
  57. package/src/lib/home/info/info.component.css +476 -0
  58. package/src/lib/home/info/info.component.html +174 -0
  59. package/src/lib/home/info/info.component.ts +287 -0
  60. package/src/lib/home/model/article.component.html +10 -0
  61. package/src/lib/home/model/article.component.ts +50 -0
  62. package/src/lib/home/model/barchart.component.html +8 -0
  63. package/src/lib/home/model/barchart.component.ts +59 -0
  64. package/src/lib/home/model/index.ts +7 -0
  65. package/src/lib/home/model/itemdetail.component.html +25 -0
  66. package/src/lib/home/model/itemdetail.component.ts +93 -0
  67. package/src/lib/home/model/itemtab.component.html +25 -0
  68. package/src/lib/home/model/itemtab.component.ts +105 -0
  69. package/src/lib/home/model/model.component.html +121 -0
  70. package/src/lib/home/model/model.component.ts +510 -0
  71. package/src/lib/home/model/modeltoolbar.component.html +111 -0
  72. package/src/lib/home/model/modeltoolbar.component.ts +157 -0
  73. package/src/lib/home/model/navigation.component.html +86 -0
  74. package/src/lib/home/model/navigation.component.ts +247 -0
  75. package/src/lib/home/model/services/index.ts +1 -0
  76. package/src/lib/home/model/services/model.service.spec.ts +423 -0
  77. package/src/lib/home/model/services/model.service.ts +319 -0
  78. package/src/lib/home/modelsearch/index.ts +1 -0
  79. package/src/lib/home/modelsearch/modelsearch.component.html +124 -0
  80. package/src/lib/home/modelsearch/modelsearch.component.ts +453 -0
  81. package/src/lib/interfaces/data.interface.ts +131 -0
  82. package/src/lib/interfaces/index.ts +2 -0
  83. package/src/lib/interfaces/item.interface.ts +438 -0
  84. package/src/lib/players/lookup/lookup.directive.ts +6 -0
  85. package/src/lib/players/lookup/lookup.item.component.ts +37 -0
  86. package/src/lib/players/lookup/lookup.item.ts +9 -0
  87. package/src/lib/players/lookup/lookup.player.component.ts +59 -0
  88. package/src/lib/players/lookup/lookup.selector.component.ts +41 -0
  89. package/src/lib/players/model/model.directive.ts +6 -0
  90. package/src/lib/players/model/model.item.component.spec.ts +311 -0
  91. package/src/lib/players/model/model.item.component.ts +3457 -0
  92. package/src/lib/players/model/model.item.ts +9 -0
  93. package/src/lib/players/model/model.player.component.ts +109 -0
  94. package/src/lib/players/model/model.selector.component.ts +59 -0
  95. package/src/lib/scheduler/scheduler.component.html +13 -0
  96. package/src/lib/scheduler/scheduler.component.scss +6 -0
  97. package/src/lib/scheduler/scheduler.component.ts +296 -0
  98. package/src/lib/scheduler/scheduler.routes.ts +15 -0
  99. package/src/lib/scheduler/schedulerdialog.component.html +72 -0
  100. package/src/lib/scheduler/schedulerdialog.component.ts +208 -0
  101. package/src/lib/scheduler/services/scheduler.service.ts +133 -0
  102. package/src/lib/services/auth-state.service.ts +129 -0
  103. package/src/lib/services/auth.interceptor.spec.ts +144 -0
  104. package/src/lib/services/auth.interceptor.ts +44 -0
  105. package/src/lib/services/cache.service.spec.ts +143 -0
  106. package/src/lib/services/cache.service.ts +71 -0
  107. package/src/lib/services/global-error-handler.spec.ts +39 -0
  108. package/src/lib/services/global-error-handler.ts +28 -0
  109. package/src/lib/services/global.service.spec.ts +801 -0
  110. package/src/lib/services/global.service.ts +724 -0
  111. package/src/lib/services/message.service.ts +556 -0
  112. package/src/lib/services/theme.service.ts +96 -0
  113. package/src/lib/template/authtemplate.component.html +6 -0
  114. package/src/lib/template/authtemplate.component.ts +13 -0
  115. package/src/lib/template/basetemplate.component.html +7 -0
  116. package/src/lib/template/basetemplate.component.ts +13 -0
  117. package/src/lib/template/index.ts +3 -0
  118. package/src/lib/template/modeltemplate.component.html +7 -0
  119. package/src/lib/template/modeltemplate.component.ts +21 -0
  120. package/src/lib/utils/piva.spec.ts +56 -0
  121. package/src/lib/utils/piva.ts +29 -0
  122. package/src/lib/validators/email.validator.spec.ts +57 -0
  123. package/src/lib/validators/email.validator.ts +17 -0
  124. package/src/lib/validators/equalPasswords.validator.spec.ts +54 -0
  125. package/src/lib/validators/equalPasswords.validator.ts +17 -0
  126. package/src/lib/validators/index.ts +2 -0
  127. package/src/lib/version.ts +1 -0
  128. package/src/public-api.ts +64 -0
  129. package/src/typings.d.ts +2 -0
  130. package/tsconfig.lib.json +18 -0
  131. package/tsconfig.lib.prod.json +9 -0
@@ -0,0 +1,556 @@
1
+ import { Injectable, inject } from '@angular/core';
2
+ import { ItemInterface, UserLicenses } from '../interfaces/item.interface';
3
+ import { GlobalService, Languages } from './global.service';
4
+
5
+ const itMessages = new Map<string, any>([
6
+ ['app.label', 'Etichetta'],
7
+ ['app.identifier', 'Identificativo'],
8
+ ['app.authtitle', 'Login'],
9
+ ['app.register', 'Registrazione'],
10
+ ['app.confirm', 'Conferma'],
11
+ ['app.company', 'Azienda'],
12
+ ['app.notify', 'Notifica'],
13
+ ['app.login', 'Utente'],
14
+ ['app.logoff', 'Esci'],
15
+ ['app.yeardescription', 'Anno'],
16
+ ['app.description', 'Descrizione'],
17
+ ['app.amount', 'Importo'],
18
+ ['app.close', 'Chiudi'],
19
+ ['app.page', 'Pagina'],
20
+ ['app.pages', 'Pagine'],
21
+ ['app.password', 'Password'],
22
+ ['app.repeatepassword', 'Ripetere la password'],
23
+ ['app.name', 'Denominazione o Cognome e Nome'],
24
+ ['app.address1', 'Indirizzo'],
25
+ ['app.address2', 'Indirizzo'],
26
+ ['app.postalcode', 'Cap'],
27
+ ['app.city', 'Città'],
28
+ ['app.county', 'Contea'],
29
+ ['app.country', 'Paese'],
30
+ ['app.telephonenumber', 'Telefono'],
31
+ ['app.faxnumber', 'Fax'],
32
+ ['app.mobilenumber', 'Mobile'],
33
+ ['app.contact', 'Contatto'],
34
+ ['app.website', 'Sito web'],
35
+ ['app.email', 'E-Mail'],
36
+ ['app.cinnumber', 'Codice Fiscale'],
37
+ ['app.vatnumber', 'Partita IVA'],
38
+ ['app.wait', 'Attendere'],
39
+ ['app.companydata', 'Dati anagrafica'],
40
+ ['app.support', 'Assistenza'],
41
+ ['app.documentation', 'Documentazione'],
42
+ ['app.settings', 'Impostazioni'],
43
+ ['app.exportaspdf', 'Pdf'],
44
+ ['app.exportasexcel', 'Excel'],
45
+ ['app.language', 'Lingua'],
46
+ ['app.plus', 'Aggiungi'],
47
+ ['app.minus', 'Elimina'],
48
+ ['app.first', 'Primo'],
49
+ ['app.previous', 'Precedente'],
50
+ ['app.next', 'Successivo'],
51
+ ['app.last', 'Ultimo'],
52
+ ['app.table', 'Tabella'],
53
+ ['app.print', 'Stampa'],
54
+ ['app.upload', 'Upload'],
55
+ ['app.download', 'Download'],
56
+ ['app.loginfailed', 'Utente non registrato'],
57
+ ['app.registerfailed', 'Utente già registrato'],
58
+ ['app.navigation', 'Gestioni'],
59
+ ['app.filter', 'Filtra'],
60
+ ['app.collapse', 'Comprimi navigazione'],
61
+ ['app.expand', 'Espandi navigazione'],
62
+ ['app.search', 'Ricerca'],
63
+ ['app.section', 'Sezione'],
64
+ ['app.view', 'Vista'],
65
+ ['app.home', 'Home'],
66
+ ['app.model', 'Dashboard'],
67
+ ['app.passworddoesntmatch', 'Le password non coincidono'],
68
+ ['app.required', 'Dato richiesto'],
69
+ ['app.rangemin', 'Dato minore di quello richiesto'],
70
+ ['app.rangemax', 'Dato maggiore di quello richiesto'],
71
+ ['app.cferr', 'Codice fiscale errato'],
72
+ ['app.pivaerr', 'Partita IVA errata'],
73
+ ['app.cfpivaerr', 'Codice fiscale errato'],
74
+ ['app.dashboard.module.start', 'Avvia'],
75
+ ['app.dashboard.module.inactive', 'Modulo non acquistato'],
76
+ ['app.save', 'Registra'],
77
+ ['app.list', 'Elenco'],
78
+ ['app.base', 'Impostazione'],
79
+ ['app.rows', 'Righe'],
80
+ ['app.exit', 'Esci'],
81
+ ['app.info', 'Informazioni'],
82
+ ['app.sheet', 'Scheda'],
83
+ ['app.total', 'Totale'],
84
+ ['app.deletekey', 'Elemento eliminato'],
85
+ ['app.registerkey', 'Elemento inserto'],
86
+ ['app.existskey', 'Elemento già presente'],
87
+ ['app.requiredkey', 'Elemento richiesto'],
88
+ ['app.unabletosave', 'Impossibile registrare! Elemento già presente'],
89
+ ['app.unabletodelete', "Impossibile eliminare l'elemento"],
90
+ ['app.dateerror', 'Data errata'],
91
+ ['app.itemerror', 'Non presente'],
92
+ ['app.error', 'Errore'],
93
+ ['app.warning', 'Avvertimento'],
94
+ ['app.fatal', 'Blocco'],
95
+ ['app.summary', 'Riepilogo'],
96
+ ['app.dashboard', 'Dashboard'],
97
+ ['app.calendar', 'Calendario'],
98
+ ['app.remove', 'Elimina'],
99
+ ['app.assigned', 'Assegnato'],
100
+ ['app.configs', 'Configurazioni'],
101
+ ['app.detail', 'Dettaglio'],
102
+ ['app.intodetail', 'Naviga nel dettaglio'],
103
+ ['app.author', 'Autore'],
104
+ ['app.email', 'E-Mail'],
105
+ ['app.phone', 'Telefono'],
106
+ ['app.emailerr', 'E-Mail non valida'],
107
+ ['app.front', 'Fronte'],
108
+ ['app.back', 'Retro'],
109
+ ['app.regexpnotmatch', 'Valore non corretto'],
110
+ ['app.auth.accountAccess', 'Accedi al tuo account'],
111
+ ['app.auth.accountNoAccess', 'Non hai un account?'],
112
+ [
113
+ 'app.gridlocale',
114
+ {
115
+ page: 'Pagina',
116
+ more: 'Più',
117
+ to: 'a',
118
+ of: 'di',
119
+ next: 'Prossimo',
120
+ last: 'Ultimo',
121
+ first: 'Primo',
122
+ previous: 'Precedente',
123
+ loadingOoo: 'Attendere...',
124
+ selectAll: 'Seleziona tutto',
125
+ searchOoo: 'Cerca...',
126
+ blanks: 'Spazi',
127
+ filterOoo: 'Filtro...',
128
+ applyFilter: 'Applica filtro...',
129
+ equals: 'Uguale',
130
+ notEqual: 'Non uguale',
131
+ lessThanOrEqual: 'Minore o uguale',
132
+ greaterThanOrEqual: 'Maggiore o uguale',
133
+ inRange: 'Nel range',
134
+ lessThan: 'Minore',
135
+ greaterThan: 'Maggiore',
136
+ contains: 'Contiene',
137
+ notContains: 'Non contiene',
138
+ startsWith: 'Inizia con',
139
+ endsWith: 'Finisce con',
140
+ andCondition: 'E',
141
+ orCondition: 'O',
142
+ group: 'Gruppo',
143
+ columns: 'Colonne',
144
+ rowGroupColumns: 'Colonne pivot',
145
+ rowGroupColumnsEmptyMessage: 'TRascina la colonna per raggruppare',
146
+ valueColumns: 'Valore colonne',
147
+ pivotMode: 'Modalità pivot',
148
+ groups: 'Gruppi',
149
+ values: 'Valori',
150
+ pivots: 'Pivots',
151
+ valueColumnsEmptyMessage: 'Trascinare la colonna per aggregare',
152
+ pivotColumnsEmptyMessage: 'Trascinare qui per pivot',
153
+ noRowsToShow: 'Nulla da mostrare',
154
+ pinColumn: 'Pin della colonna',
155
+ valueAggregation: 'Aggregare i valori',
156
+ autosizeThiscolumn: 'Ridimensiona la colonna',
157
+ autosizeAllColumns: 'Ridimensiona tutte le colonne',
158
+ groupBy: 'Raggruppa',
159
+ ungroupBy: 'Non raggruppare',
160
+ resetColumns: 'Resetta colonne',
161
+ expandAll: 'Espandi tutto',
162
+ collapseAll: 'Collassa tutto',
163
+ toolPanel: 'Tool panel',
164
+ export: 'Esporta',
165
+ csvExport: 'Esporta CSV',
166
+ excelExport: ' Excel Exporto',
167
+ pinLeft: 'Pin a sinistra',
168
+ pinRight: 'Pin a destra',
169
+ noPin: 'No pin',
170
+ sum: 'Somma',
171
+ min: 'Minimo',
172
+ max: 'Massimo',
173
+ none: 'Nulla',
174
+ count: 'Conta',
175
+ average: 'Media',
176
+ copy: 'Copia',
177
+ ctrlC: 'Copia',
178
+ paste: 'Incolla',
179
+ ctrlV: 'Incolla',
180
+ },
181
+ ],
182
+ ]);
183
+
184
+ const enMessages = new Map<string, any>([
185
+ ['app.label', 'Label'],
186
+ ['app.identifier', 'Identifier'],
187
+ ['app.authtitle', 'Login'],
188
+ ['app.register', 'Register'],
189
+ ['app.confirm', 'Confirm'],
190
+ ['app.company', 'Company'],
191
+ ['app.notify', 'Notify'],
192
+ ['app.login', 'User'],
193
+ ['app.logoff', 'Log off'],
194
+ ['app.yeardescription', 'Year'],
195
+ ['app.description', 'Description'],
196
+ ['app.amount', 'Amount'],
197
+ ['app.close', 'Close'],
198
+ ['app.page', 'Page'],
199
+ ['app.pages', 'Pages'],
200
+ ['app.password', 'Password'],
201
+ ['app.repeatepassword', 'Repeate password'],
202
+ ['app.name', 'Name'],
203
+ ['app.address1', 'Address'],
204
+ ['app.address2', 'Address'],
205
+ ['app.postalcode', 'Postal Code'],
206
+ ['app.city', 'City'],
207
+ ['app.county', 'County'],
208
+ ['app.country', 'Country'],
209
+ ['app.telephonenumber', 'Telephone'],
210
+ ['app.faxnumber', 'Fax'],
211
+ ['app.mobilenumber', 'Mobile'],
212
+ ['app.contact', 'Contact'],
213
+ ['app.website', 'Web site'],
214
+ ['app.email', 'E-Mail'],
215
+ ['app.cinnumber', 'Cin number'],
216
+ ['app.vatnumber', 'Vat number'],
217
+ ['app.wait', 'Wait'],
218
+ ['app.companydata', 'Personal data'],
219
+ ['app.support', 'Support'],
220
+ ['app.documentation', 'Documentation'],
221
+ ['app.settings', 'Settings'],
222
+ ['app.exportaspdf', 'Pdf'],
223
+ ['app.exportasexcel', 'Excel'],
224
+ ['app.language', 'Language'],
225
+ ['app.plus', 'Plus'],
226
+ ['app.minus', 'Minus'],
227
+ ['app.first', 'First'],
228
+ ['app.previous', 'Previous'],
229
+ ['app.next', 'Next'],
230
+ ['app.last', 'Last'],
231
+ ['app.table', 'Table'],
232
+ ['app.print', 'Print'],
233
+ ['app.upload', 'Upload'],
234
+ ['app.download', 'Download'],
235
+ ['app.loginfailed', 'User not found'],
236
+ ['app.registerfailed', 'User already inserted'],
237
+ ['app.navigation', 'Manage'],
238
+ ['app.filter', 'Filter'],
239
+ ['app.collapse', 'Collapse navigation'],
240
+ ['app.expand', 'Expand navigation'],
241
+ ['app.search', 'Search'],
242
+ ['app.section', 'Section'],
243
+ ['app.view', 'View'],
244
+ ['app.home', 'Home'],
245
+ ['app.model', 'Dashboard'],
246
+ ['app.passworddoesntmatch', "Passwords doesn't match"],
247
+ ['app.required', 'Required'],
248
+ ['app.rangemin', 'Range Min'],
249
+ ['app.rangemax', 'Range Max'],
250
+ ['app.dashboard.module.start', 'Start'],
251
+ ['app.dashboard.module.inactive', "Don't purchased module"],
252
+ ['app.save', 'Save'],
253
+ ['app.list', 'List'],
254
+ ['app.base', 'Base'],
255
+ ['app.rows', 'Rows'],
256
+ ['app.exit', 'Exit'],
257
+ ['app.info', 'Information'],
258
+ ['app.sheet', 'Sheet'],
259
+ ['app.total', 'Total'],
260
+ ['app.deletekey', 'Item deleted'],
261
+ ['app.registerkey', 'Item inserted'],
262
+ ['app.existskey', 'Item already inserted'],
263
+ ['app.requiredkey', 'Required value'],
264
+ ['app.unabletosave', 'Unable to save! Item already exists.'],
265
+ ['app.unabletodelete', 'Unable to delete item'],
266
+ ['app.dateerror', 'Invalid date'],
267
+ ['app.itemerror', 'Item not found'],
268
+ ['app.error', 'Error'],
269
+ ['app.warning', 'Warning'],
270
+ ['app.fatal', 'Fatal'],
271
+ ['app.summary', 'Summary'],
272
+ ['app.dashboard', 'Dashboard'],
273
+ ['app.calendar', 'Calendar'],
274
+ ['app.remove', 'Delete'],
275
+ ['app.assigned', 'Assigned'],
276
+ ['app.configs', 'Configuration'],
277
+ ['app.detail', 'Detail'],
278
+ ['app.intodetail', 'Surf to detail'],
279
+ ['app.author', 'Author'],
280
+ ['app.email', 'E-Mail'],
281
+ ['app.phone', 'Phone'],
282
+ ['app.emailerr', 'E-Mail is invalid'],
283
+ ['app.front', 'Front'],
284
+ ['app.back', 'Back'],
285
+ ['app.regexpnotmatch', 'Invalid value'],
286
+ ['app.auth.accountAccess', 'Access to your account'],
287
+ ['app.auth.accountNoAccess', "Don't have an account?"],
288
+ [
289
+ 'app.gridlocale',
290
+ {
291
+ // for filter panel
292
+ page: 'Page',
293
+ more: 'More',
294
+ to: 'To',
295
+ of: 'Of',
296
+ next: 'Nexten',
297
+ last: 'Lasten',
298
+ first: 'Firsten',
299
+ previous: 'Previousen',
300
+ loadingOoo: 'Loading...',
301
+
302
+ // for set filter
303
+ selectAll: 'Select Allen',
304
+ searchOoo: 'Search...',
305
+ blanks: 'Blanc',
306
+
307
+ // for number filter and text filter
308
+ filterOoo: 'Filter...',
309
+ equals: 'Equals',
310
+ notEqual: 'NotEqual',
311
+
312
+ // for the date filter
313
+ dateFormatOoo: 'Yyyy-mm-dd',
314
+
315
+ // for number filter
316
+ lessThan: 'LessThan',
317
+ greaterThan: 'GreaterThan',
318
+ lessThanOrEqual: 'LessThanOrEqual',
319
+ greaterThanOrEqual: 'GreaterThanOrEqual',
320
+ inRange: 'InRange',
321
+ inRangeStart: 'To',
322
+ inRangeEnd: 'From',
323
+
324
+ // for text filter
325
+ contains: 'Contains',
326
+ notContains: 'Not Contains',
327
+ startsWith: 'Starts with',
328
+ endsWith: 'Ends with',
329
+
330
+ // filter conditions
331
+ andCondition: 'AND',
332
+ orCondition: 'OR',
333
+
334
+ // filter buttons
335
+ applyFilter: 'Apply',
336
+ resetFilter: 'Reset',
337
+ clearFilter: 'Clear',
338
+
339
+ // the header of the default group column
340
+ group: 'Group',
341
+
342
+ // tool panel
343
+ columns: 'Columns',
344
+ filters: 'Filters',
345
+ rowGroupColumns: 'Pivot Cols',
346
+ rowGroupColumnsEmptyMessage: ' drag cols to group',
347
+ valueColumns: 'Value Cols',
348
+ pivotMode: 'Pivot-Mode',
349
+ groups: 'Groups',
350
+ values: 'Values',
351
+ pivots: 'Pivots',
352
+ valueColumnsEmptyMessage: ' drag cols to aggregate',
353
+ pivotColumnsEmptyMessage: ' drag here to pivot',
354
+ toolPanelButton: ' tool panel',
355
+
356
+ // other
357
+ noRowsToShow: ' no rows',
358
+ enabled: 'Enabled',
359
+
360
+ // enterprise menu
361
+ pinColumn: 'Pin Column',
362
+ valueAggregation: 'Value Agg',
363
+ autosizeThiscolumn: 'Autosize Diz',
364
+ autosizeAllColumns: 'Autsoie em All',
365
+ groupBy: 'Group by',
366
+ ungroupBy: 'UnGroup by',
367
+ resetColumns: 'Reset Those Cols',
368
+ expandAll: 'Open-em-up',
369
+ collapseAll: 'Close-em-up',
370
+ toolPanel: 'Tool Panelo',
371
+ export: 'Exporto',
372
+ csvExport: 'CSV Exportp',
373
+ excelExport: 'Excel Exporto (.xlsx)',
374
+ excelXmlExport: 'Excel Exporto (.xml)',
375
+
376
+ // enterprise menu (charts)
377
+ pivotChartAndPivotMode: 'Pivot Chart & Pivot Mode',
378
+ pivotChart: 'Pivot Chart',
379
+ chartRange: 'Chart Range',
380
+
381
+ columnChart: 'Column',
382
+ groupedColumn: 'Grouped',
383
+ stackedColumn: 'Stacked',
384
+ normalizedColumn: '100% Stacked',
385
+
386
+ barChart: 'Bar',
387
+ groupedBar: 'Grouped',
388
+ stackedBar: 'Stacked',
389
+ normalizedBar: '100% Stacked',
390
+
391
+ pieChart: 'Pie',
392
+ pie: 'Pie',
393
+ doughnut: 'Doughnut',
394
+
395
+ line: 'Line',
396
+
397
+ xyChart: 'X Y (Scatter)',
398
+ scatter: 'Scatter',
399
+ bubble: 'Bubble',
400
+
401
+ areaChart: 'Area',
402
+ area: 'Area',
403
+ stackedArea: 'Stacked',
404
+ normalizedArea: '100% Stacked',
405
+
406
+ histogramChart: 'Histogram',
407
+
408
+ // enterprise menu pinning
409
+ pinLeft: 'Pin <<',
410
+ pinRight: 'Pin >>',
411
+ noPin: 'DontPin <>',
412
+
413
+ // enterprise menu aggregation and status bar
414
+ sum: 'Sum',
415
+ min: 'Min',
416
+ max: 'Max',
417
+ none: 'None',
418
+ count: 'Count',
419
+ avg: 'Average',
420
+ filteredRows: 'Filtered',
421
+ selectedRows: 'Selected',
422
+ totalRows: 'Total Rows',
423
+ totalAndFilteredRows: 'Rows',
424
+
425
+ // standard menu
426
+ copy: 'Copy',
427
+ copyWithHeaders: 'Copy With Headers',
428
+ ctrlC: 'Ctrl+C',
429
+ paste: 'Paste',
430
+ ctrlV: 'Ctrl+V',
431
+
432
+ // charts
433
+ pivotChartTitle: 'Pivot Chart',
434
+ rangeChartTitle: 'Range Chart',
435
+ settings: 'Settings',
436
+ data: 'Data',
437
+ format: 'Format',
438
+ categories: 'Categories',
439
+ defaultCategory: '(laNone)',
440
+ series: 'Series',
441
+ xyValues: 'X Y Values',
442
+ paired: 'Paired Mode',
443
+ axis: 'Axis',
444
+ color: 'Color',
445
+ thickness: 'Thickness',
446
+ xType: 'X Type',
447
+ automatic: 'Automatic',
448
+ category: 'Category',
449
+ number: 'Number',
450
+ time: 'Time',
451
+ xRotation: 'X Rotation',
452
+ yRotation: 'Y Rotation',
453
+ ticks: 'Ticks',
454
+ width: 'Width',
455
+ length: 'Length',
456
+ padding: 'Padding',
457
+ chart: 'Chart',
458
+ title: 'Title',
459
+ background: 'Background',
460
+ font: 'Font',
461
+ top: 'Top',
462
+ right: 'Right',
463
+ bottom: 'Bottom',
464
+ left: 'Left',
465
+ labels: 'Labels',
466
+ size: 'Size',
467
+ minSize: 'Minimum Size',
468
+ maxSize: 'Maximum Size',
469
+ legend: 'Legend',
470
+ position: 'Position',
471
+ markerSize: 'Marker Size',
472
+ markerStroke: 'Marker Stroke',
473
+ markerPadding: 'Marker Padding',
474
+ itemPaddingX: 'Item Padding X',
475
+ itemPaddingY: 'Item Padding Y',
476
+ strokeWidth: 'Stroke Width',
477
+ offset: 'Offset',
478
+ offsets: 'Offsets',
479
+ tooltips: 'Tooltips',
480
+ callout: 'Callout',
481
+ markers: 'Markers',
482
+ shadow: 'Shadow',
483
+ blur: 'Blur',
484
+ xOffset: 'X Offset',
485
+ yOffset: 'Y Offset',
486
+ lineWidth: 'Line Width',
487
+ normal: 'Normal',
488
+ bold: 'Bold',
489
+ italic: 'Italic',
490
+ boldItalic: 'Bold Italic',
491
+ predefined: 'Predefined',
492
+ fillOpacity: 'Fill Opacity',
493
+ strokeOpacity: 'Line Opacity',
494
+ histogramBinCount: 'Bin Count',
495
+ columnGroup: 'Column',
496
+ barGroup: 'Bar',
497
+ pieGroup: 'Pie',
498
+ lineGroup: 'Line',
499
+ scatterGroup: 'Scatter',
500
+ areaGroup: 'Area',
501
+ histogramGroup: 'Histogram',
502
+ groupedColumnTooltip: 'Grouped',
503
+ stackedColumnTooltip: 'Stacked',
504
+ normalizedColumnTooltip: '100% Stacked',
505
+ groupedBarTooltip: 'Grouped',
506
+ stackedBarTooltip: 'Stacked',
507
+ normalizedBarTooltip: '100% Stacked',
508
+ pieTooltip: 'Pie',
509
+ doughnutTooltip: 'Doughnut',
510
+ lineTooltip: 'Line',
511
+ groupedAreaTooltip: 'Grouped',
512
+ stackedAreaTooltip: 'Stacked',
513
+ normalizedAreaTooltip: '100% Stacked',
514
+ scatterTooltip: 'Scatter',
515
+ bubbleTooltip: 'Bubble',
516
+ histogramTooltip: 'Histogram',
517
+ noDataToChart: 'No data available to be charted.',
518
+ pivotChartRequiresPivotMode: 'Pivot Chart requires Pivot Mode enabled.',
519
+ },
520
+ ],
521
+ ]);
522
+
523
+ @Injectable()
524
+ export class AppMessageService {
525
+ private gsv = inject(GlobalService);
526
+
527
+ /** Returns the localised UI string for the given message key, or '' if not found. */
528
+ public get(key: string): string {
529
+ const map = this.gsv.getLng() === Languages.EN ? enMessages : itMessages;
530
+ return map.get(key) ?? '';
531
+ }
532
+
533
+ /** Returns a localised description field for the currently active project. */
534
+ public getProjectDescription(key: string): string {
535
+ return this.getProjectInfo(this.gsv.getProject(), key);
536
+ }
537
+
538
+ /** Returns a localised field (foldertitle | description | extendeddescription) for the given project. */
539
+ public getProjectInfo(project: UserLicenses, key: string): string {
540
+ if (!project) return '';
541
+ const isEN = this.gsv.getLng() === Languages.EN;
542
+ const fields: Record<string, string> = {
543
+ foldertitle: isEN ? project.foldertitlegb : project.foldertitle,
544
+ description: isEN ? project.descriptiongb : project.description,
545
+ extendeddescription: isEN ? project.extendeddescriptiongb : project.extendeddescription,
546
+ };
547
+ return fields[key] ?? '';
548
+ }
549
+
550
+ /** Returns the localised title for the given ItemInterface ('title' is the only supported key). */
551
+ public getItemInfo(item: ItemInterface, key: string): string {
552
+ if (!item) return '';
553
+ if (key === 'title') return this.gsv.getLng() === Languages.EN ? item.titleGb : item.title;
554
+ return '';
555
+ }
556
+ }
@@ -0,0 +1,96 @@
1
+ import { Injectable, PLATFORM_ID, inject, signal } from '@angular/core';
2
+ import { isPlatformBrowser } from '@angular/common';
3
+
4
+ export type Theme = 'light' | 'dark';
5
+
6
+ @Injectable({
7
+ providedIn: 'root',
8
+ })
9
+ export class ThemeService {
10
+ private readonly THEME_STORAGE_KEY = 'app-theme';
11
+ private readonly DEFAULT_THEME: Theme = 'light';
12
+ private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
13
+
14
+ readonly currentTheme = signal<Theme>(
15
+ this.getStoredTheme() ?? this.getSystemTheme()
16
+ );
17
+
18
+ constructor() {
19
+ this.applyTheme(this.currentTheme());
20
+ }
21
+
22
+ /** Returns the currently active theme. */
23
+ getCurrentTheme(): Theme {
24
+ return this.currentTheme();
25
+ }
26
+
27
+ /** Sets the active theme, persists it to localStorage, and applies CSS classes to the document root. */
28
+ setTheme(theme: Theme): void {
29
+ this.currentTheme.set(theme);
30
+ if (this.isBrowser) {
31
+ try {
32
+ localStorage.setItem(this.THEME_STORAGE_KEY, theme);
33
+ } catch (error) {
34
+ console.error('Error setting theme in localStorage:', error);
35
+ }
36
+ }
37
+ this.applyTheme(theme);
38
+ }
39
+
40
+ /** Activates the dark theme. */
41
+ enableDarkTheme(): void {
42
+ this.setTheme('dark');
43
+ }
44
+
45
+ /** Activates the light theme. */
46
+ enableLightTheme(): void {
47
+ this.setTheme('light');
48
+ }
49
+
50
+ /** Switches between light and dark themes. */
51
+ toggleTheme(): void {
52
+ this.setTheme(this.currentTheme() === 'light' ? 'dark' : 'light');
53
+ }
54
+
55
+ /** Returns true when the dark theme is currently active. */
56
+ isDarkMode(): boolean {
57
+ return this.getCurrentTheme() === 'dark';
58
+ }
59
+
60
+ /** Reads the persisted theme from localStorage; returns null on SSR or read error. */
61
+ private getStoredTheme(): Theme | null {
62
+ if (!this.isBrowser) return null;
63
+ try {
64
+ const stored = localStorage.getItem(this.THEME_STORAGE_KEY);
65
+ return stored === 'dark' || stored === 'light' ? stored : null;
66
+ } catch (error) {
67
+ console.error('Error reading theme from localStorage:', error);
68
+ return null;
69
+ }
70
+ }
71
+
72
+ /** Returns 'dark' if the OS prefers a dark color scheme, otherwise the default theme. */
73
+ private getSystemTheme(): Theme {
74
+ if (
75
+ this.isBrowser &&
76
+ window.matchMedia &&
77
+ window.matchMedia('(prefers-color-scheme: dark)').matches
78
+ ) {
79
+ return 'dark';
80
+ }
81
+ return this.DEFAULT_THEME;
82
+ }
83
+
84
+ /** Toggles the theme-light / theme-dark CSS class on the document root element. */
85
+ private applyTheme(theme: Theme): void {
86
+ if (!this.isBrowser) return;
87
+ const body = document.documentElement;
88
+ if (theme === 'dark') {
89
+ body.classList.remove('theme-light');
90
+ body.classList.add('theme-dark');
91
+ } else {
92
+ body.classList.remove('theme-dark');
93
+ body.classList.add('theme-light');
94
+ }
95
+ }
96
+ }
@@ -0,0 +1,6 @@
1
+ <!-- authtemplate.component -->
2
+ <div class="auth-page animated fadeIn">
3
+ <ng-content></ng-content>
4
+ <loader></loader>
5
+ </div>
6
+ <!-- fine authtemplate.component -->
@@ -0,0 +1,13 @@
1
+ import { Component, ChangeDetectionStrategy } from '@angular/core';
2
+
3
+ import { LoaderComponent } from '../common/loader.component';
4
+
5
+ @Component({
6
+ selector: 'authtemplate',
7
+ templateUrl: 'authtemplate.component.html',
8
+ changeDetection: ChangeDetectionStrategy.OnPush,
9
+ imports: [LoaderComponent],
10
+ })
11
+ export class AuthTemplateComponent {
12
+ public project!: string;
13
+ }
@@ -0,0 +1,7 @@
1
+ <!-- basetemplate.component -->
2
+ <div class="d-flex align-items-left justify-content-left animated fadeIn">
3
+ <ng-content></ng-content>
4
+ <loader></loader>
5
+ </div>
6
+ <!-- <footer></footer> -->
7
+ <!-- fine basetemplate.component -->
@@ -0,0 +1,13 @@
1
+ import { Component, ChangeDetectionStrategy } from '@angular/core';
2
+
3
+ import { LoaderComponent } from '../common/loader.component';
4
+
5
+ @Component({
6
+ selector: 'basetemplate',
7
+ templateUrl: 'basetemplate.component.html',
8
+ changeDetection: ChangeDetectionStrategy.OnPush,
9
+ imports: [LoaderComponent],
10
+ })
11
+ export class BaseTemplateComponent {
12
+ public project!: string;
13
+ }