@osovitny/anatoly 2.16.7 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/esm2022/lib/core/consts/settings.mjs +2 -1
  2. package/esm2022/lib/core/index.mjs +1 -2
  3. package/esm2022/lib/core/notifications/services/notification-service.mjs +4 -155
  4. package/esm2022/lib/core/services/appcontext.service.mjs +5 -5
  5. package/esm2022/lib/core/services/starter.service.mjs +6 -5
  6. package/esm2022/lib/data/base/api.service.mjs +99 -0
  7. package/esm2022/lib/data/base/grid/grid-edit.service.mjs +83 -0
  8. package/esm2022/lib/data/base/grid/grid-read.service.mjs +64 -0
  9. package/esm2022/lib/data/data.module.mjs +2 -1
  10. package/esm2022/lib/data/index.mjs +7 -6
  11. package/esm2022/lib/data/services/core-api.service.mjs +6 -6
  12. package/esm2022/lib/data/services/emails-api.service.mjs +5 -5
  13. package/esm2022/lib/data/urls.mjs +22 -0
  14. package/esm2022/public-api.mjs +10 -10
  15. package/fesm2022/osovitny-anatoly.mjs +90 -293
  16. package/fesm2022/osovitny-anatoly.mjs.map +1 -1
  17. package/lib/core/consts/settings.d.ts +1 -0
  18. package/lib/core/index.d.ts +0 -1
  19. package/lib/core/notifications/services/notification-service.d.ts +0 -12
  20. package/lib/core/services/appcontext.service.d.ts +2 -2
  21. package/lib/core/services/starter.service.d.ts +2 -2
  22. package/lib/data/base/{base-api.service.d.ts → api.service.d.ts} +3 -3
  23. package/lib/data/base/grid/{base-grid-edit.service.d.ts → grid-edit.service.d.ts} +4 -4
  24. package/lib/data/base/grid/{base-grid-read.service.d.ts → grid-read.service.d.ts} +3 -3
  25. package/lib/data/index.d.ts +4 -5
  26. package/lib/data/services/core-api.service.d.ts +2 -2
  27. package/lib/data/services/emails-api.service.d.ts +2 -2
  28. package/lib/data/urls.d.ts +4 -0
  29. package/package.json +1 -1
  30. package/esm2022/lib/core/consts/urls.mjs +0 -19
  31. package/esm2022/lib/data/base/base-api.service.mjs +0 -99
  32. package/esm2022/lib/data/base/grid/base-grid-edit.service.mjs +0 -83
  33. package/esm2022/lib/data/base/grid/base-grid-read.service.mjs +0 -65
  34. package/esm2022/lib/data/consts.mjs +0 -24
  35. package/esm2022/lib/data/services/notifications/notifications-api-service.mjs +0 -41
  36. package/lib/core/consts/urls.d.ts +0 -3
  37. package/lib/data/consts.d.ts +0 -5
  38. package/lib/data/services/notifications/notifications-api-service.d.ts +0 -12
@@ -16,10 +16,10 @@ import * as i1$5 from '@angular/common';
16
16
  import { LOCATION_INITIALIZED, DOCUMENT, CommonModule } from '@angular/common';
17
17
  import { TranslateHttpLoader } from '@ngx-translate/http-loader';
18
18
  import Swal from 'sweetalert2';
19
- import { v4 } from 'uuid';
20
19
  import * as i1$2 from 'ngx-toastr';
21
20
  import { ToastrModule } from 'ngx-toastr';
22
21
  import * as i1$4 from '@angular/platform-browser';
22
+ import { v4 } from 'uuid';
23
23
  import * as i1$6 from '@fortawesome/angular-fontawesome';
24
24
  import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
25
25
  import * as i1$7 from '@progress/kendo-angular-pager';
@@ -61,25 +61,7 @@ import { IconsModule } from '@progress/kendo-angular-icons';
61
61
  */
62
62
  const AppName = document.getElementById('appName').getAttribute('data-appname');
63
63
  const AppCoreSettings = JSON.parse((document.getElementById('appCoreSettings')).getAttribute('data-appcoresettings'));
64
-
65
- /*
66
- <file>
67
- Project:
68
- MICE
69
-
70
- Authors:
71
- Vadim Osovitny vadim@osovitny.com vaosovitny@deloitte.com
72
-
73
- Created:
74
- 5 May 2020
75
-
76
- Copyright (c) 2020 Deloitte Tax. All rights reserved.
77
- </file>
78
- */
79
- const Urls = {
80
- // SignalR Notifications
81
- notificationsSocketUrl: '/hubs/notifications'
82
- };
64
+ const ApiUrl = `${AppCoreSettings.apiUrl}`;
83
65
 
84
66
  /*
85
67
  <file>
@@ -1065,27 +1047,6 @@ class Alerts {
1065
1047
  </file>
1066
1048
  */
1067
1049
 
1068
- /*
1069
- <file>
1070
- Project:
1071
- @osovitny/anatoly
1072
-
1073
- Authors:
1074
- Vadim Osovitny vadim@osovitny.com
1075
- Anatoly Osovitny anatoly@osovitny.com
1076
-
1077
- Created:
1078
- 26 Jun 2020
1079
-
1080
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
1081
- </file>
1082
- */
1083
- class Guid {
1084
- static newGuid() {
1085
- return v4();
1086
- }
1087
- }
1088
-
1089
1050
  /*
1090
1051
  <file>
1091
1052
  Project:
@@ -1101,141 +1062,13 @@ class Guid {
1101
1062
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
1102
1063
  </file>
1103
1064
  */
1104
- // Node
1105
- // SignalR
1106
- // import * as signalR from '@microsoft/signalr';
1107
- // import { NotificationsApiService } from '../../../data/services/notifications/notifications-api-service';
1065
+ //Node
1108
1066
  class NotificationService {
1109
1067
  toastrService;
1110
- // SignalR
1111
- // private hubConnection: signalR.HubConnection;
1112
- // private socketUrl: string;
1113
- // Notifications
1114
- _sessionNotifications = new BehaviorSubject([]);
1115
- _serverNotifications = new BehaviorSubject([]);
1116
- // Public
1117
- sessionNotifications$ = this._sessionNotifications.asObservable();
1118
- serverNotifications$ = this._serverNotifications.asObservable();
1119
1068
  constructor(toastrService) {
1120
1069
  this.toastrService = toastrService;
1121
- // this.onInit();
1122
- }
1123
- /*
1124
- onInit() {
1125
- if (AppCoreSettings.AzureAD) {
1126
- this.authService.getAuthToken().subscribe((token: string) => {
1127
- this.startSignalRConnection(token);
1128
- });
1129
-
1130
- return;
1131
- }
1132
-
1133
- this.startSignalRConnection();
1134
- }
1135
-
1136
- ngOnDestroy() {
1137
- this.stopSignalRConnection();
1138
- }
1139
-
1140
- // SignalR
1141
- private startSignalRConnection(accessToken?) {
1142
- const cskii = AppCoreSettings.selectedClientID;
1143
- // tslint:disable-next-line:variable-name
1144
- const cskii_upn = AppCoreSettings.CSKII_UPN;
1145
- // tslint:disable-next-line:variable-name
1146
- const cli_sessionguid = AppCoreSettings.CLI_SessionGUID;
1147
-
1148
- const url = this.socketUrl + '?cskii=' + cskii + '&cskii_upn=' + cskii_upn + '&cli_sessionguid=' + cli_sessionguid;
1149
-
1150
- if (accessToken) {
1151
- this.hubConnection = new signalR.HubConnectionBuilder()
1152
- .withUrl(url, {
1153
- skipNegotiation: false,
1154
- transport: signalR.HttpTransportType.WebSockets,
1155
- accessTokenFactory: () => accessToken
1156
- })
1157
- .withAutomaticReconnect()
1158
- .configureLogging(signalR.LogLevel.Debug)
1159
- .build();
1160
- }
1161
- else {
1162
- this.hubConnection = new signalR.HubConnectionBuilder()
1163
- .withUrl(this.socketUrl, {
1164
- skipNegotiation: true,
1165
- transport: signalR.HttpTransportType.WebSockets
1166
- })
1167
- .withAutomaticReconnect()
1168
- .configureLogging(signalR.LogLevel.Debug)
1169
- .build();
1170
- }
1171
-
1172
- this.hubConnection
1173
- .start()
1174
- .then(() => this.signalRConnection_onSuccess())
1175
- .catch(err => {
1176
- console.error('Connection failed to SignalR Notification Hub')
1177
- })
1178
- }
1179
-
1180
- private signalRConnection_onSuccess() {
1181
- this.addReceiveMessageDataListener();
1182
-
1183
- this.notificationsApiService.retrieveNotifications().subscribe(data => {
1184
- this.serverNotifications = data;
1185
- });
1186
- }
1187
-
1188
- stopSignalRConnection() {
1189
- if (this.hubConnection) {
1190
- this.hubConnection.stop();
1191
- this.hubConnection = null;
1192
- }
1193
- }
1194
-
1195
- private addReceiveMessageDataListener = () => {
1196
- this.hubConnection.on('ReceiveMessage', (message) => {
1197
- if (message) {
1198
- if (message.type === 'error') {
1199
- this.error(message.text, null, null, false);
1200
- }
1201
- else {
1202
- this.success(message.text, null, null, false);
1203
- }
1204
-
1205
- const notification = {
1206
- id: message.id,
1207
- isNew: message.isNew,
1208
- isSession: true,
1209
- text: message.text,
1210
- type: message.type,
1211
- createdDate: message.createdDate
1212
- };
1213
-
1214
- this.addSessionNotificationToList(notification);
1215
- }
1216
- });
1217
- }
1218
- */
1219
- addSessionNotification(text, type) {
1220
- const id = Guid.newGuid();
1221
- const notification = { id, isNew: true, isSession: true, text, type, createdDate: new Date(Date.now()).toISOString() };
1222
- this.addSessionNotificationToList(notification);
1223
- }
1224
- addSessionNotificationToList(notification) {
1225
- this.sessionNotifications = [
1226
- notification,
1227
- ...this.sessionNotifications,
1228
- ];
1229
- }
1230
- // Public API
1231
- removeNotification(id, isSession) {
1232
- if (isSession) {
1233
- this.sessionNotifications = this.sessionNotifications.filter(notifications => notifications.id !== id);
1234
- }
1235
- else {
1236
- this.serverNotifications = this.serverNotifications.filter(notifications => notifications.id !== id);
1237
- }
1238
1070
  }
1071
+ //Public
1239
1072
  success(text, params, title, createSessionNotification = true) {
1240
1073
  text = L10nUtils.getLocalizedValue(text, params, 'OperationSuccessFull');
1241
1074
  title = L10nUtils.getLocalizedValue(title);
@@ -1243,9 +1076,6 @@ class NotificationService {
1243
1076
  timeOut: 3000,
1244
1077
  progressBar: true
1245
1078
  });
1246
- if (createSessionNotification) {
1247
- this.addSessionNotification(text, 'success');
1248
- }
1249
1079
  }
1250
1080
  info(text, params, title) {
1251
1081
  text = L10nUtils.getLocalizedValue(text, params);
@@ -1270,9 +1100,6 @@ class NotificationService {
1270
1100
  timeOut: 3000,
1271
1101
  progressBar: true
1272
1102
  });
1273
- if (createSessionNotification) {
1274
- this.addSessionNotification(text, 'error');
1275
- }
1276
1103
  }
1277
1104
  cancel(text, params, title) {
1278
1105
  text = L10nUtils.getLocalizedValue(text, params, 'OperationCancelled');
@@ -1282,20 +1109,6 @@ class NotificationService {
1282
1109
  progressBar: true
1283
1110
  });
1284
1111
  }
1285
- // SessionNotifications
1286
- get sessionNotifications() {
1287
- return this._sessionNotifications.getValue();
1288
- }
1289
- set sessionNotifications(val) {
1290
- this._sessionNotifications.next(val);
1291
- }
1292
- // ServerNotifications
1293
- get serverNotifications() {
1294
- return this._serverNotifications.getValue();
1295
- }
1296
- set serverNotifications(val) {
1297
- this._serverNotifications.next(val);
1298
- }
1299
1112
  static ɵfac = function NotificationService_Factory(t) { return new (t || NotificationService)(i0.ɵɵinject(i1$2.ToastrService)); };
1300
1113
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NotificationService, factory: NotificationService.ɵfac, providedIn: 'root' });
1301
1114
  }
@@ -1374,8 +1187,8 @@ class Stopwatch {
1374
1187
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
1375
1188
  </file>
1376
1189
  */
1377
- // Node
1378
- class BaseApiService {
1190
+ //Node
1191
+ class ApiServiceBase {
1379
1192
  http;
1380
1193
  baseUrl;
1381
1194
  constructor(http) {
@@ -1418,8 +1231,8 @@ class BaseApiService {
1418
1231
  return this.http.get(url);
1419
1232
  }
1420
1233
  getJsonFile(fileName) {
1234
+ const appVersion = AppCoreSettings.appVersion;
1421
1235
  const jsonsUrl = AppCoreSettings.jsonsUrl;
1422
- const jsonVersion = AppCoreSettings.jsonVersion;
1423
1236
  const isCDNEnabled = AppCoreSettings.isCDNEnabled;
1424
1237
  const cdnSasToken = AppCoreSettings.cdnSasToken;
1425
1238
  let url = "";
@@ -1427,13 +1240,13 @@ class BaseApiService {
1427
1240
  url = jsonsUrl + "/" + fileName + cdnSasToken;
1428
1241
  }
1429
1242
  else {
1430
- url = jsonsUrl + "/" + fileName + '?' + jsonVersion;
1243
+ url = jsonsUrl + "/" + fileName + '?v=' + appVersion;
1431
1244
  }
1432
1245
  return this.http.get(url);
1433
1246
  }
1434
1247
  getExternalJsonFile(libname, fileName) {
1248
+ const appVersion = AppCoreSettings.appVersion;
1435
1249
  const externalUrl = AppCoreSettings.externalUrl;
1436
- const jsonVersion = AppCoreSettings.jsonVersion;
1437
1250
  const isCDNEnabled = AppCoreSettings.isCDNEnabled;
1438
1251
  const cdnSasToken = AppCoreSettings.cdnSasToken;
1439
1252
  let url = "";
@@ -1441,14 +1254,14 @@ class BaseApiService {
1441
1254
  url = externalUrl + "/" + libname + "/jsons/" + fileName + cdnSasToken;
1442
1255
  }
1443
1256
  else {
1444
- url = externalUrl + "/" + libname + "/jsons/" + fileName + '?' + jsonVersion;
1257
+ url = externalUrl + "/" + libname + "/jsons/" + fileName + '?v=' + appVersion;
1445
1258
  }
1446
1259
  return this.http.get(url);
1447
1260
  }
1448
- static ɵfac = function BaseApiService_Factory(t) { return new (t || BaseApiService)(i0.ɵɵinject(i1$3.HttpClient)); };
1449
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: BaseApiService, factory: BaseApiService.ɵfac });
1261
+ static ɵfac = function ApiServiceBase_Factory(t) { return new (t || ApiServiceBase)(i0.ɵɵinject(i1$3.HttpClient)); };
1262
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ApiServiceBase, factory: ApiServiceBase.ɵfac });
1450
1263
  }
1451
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseApiService, [{
1264
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ApiServiceBase, [{
1452
1265
  type: Injectable
1453
1266
  }], function () { return [{ type: i1$3.HttpClient }]; }, null); })();
1454
1267
 
@@ -1533,7 +1346,7 @@ class SessionStorageService extends WebStorageService {
1533
1346
  </file>
1534
1347
  */
1535
1348
  //Node
1536
- class AppContextService extends BaseApiService {
1349
+ class AppContextService extends ApiServiceBase {
1537
1350
  http;
1538
1351
  localStorage;
1539
1352
  sessionStorage;
@@ -1550,7 +1363,7 @@ class AppContextService extends BaseApiService {
1550
1363
  this.http = http;
1551
1364
  this.localStorage = localStorage;
1552
1365
  this.sessionStorage = sessionStorage;
1553
- this.baseUrl = `${AppCoreSettings.apiUrl}/appContext`;
1366
+ this.baseUrl = `${ApiUrl}/appContext`;
1554
1367
  }
1555
1368
  //Session
1556
1369
  getCurrentFromSession() {
@@ -1971,13 +1784,14 @@ class Utils {
1971
1784
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
1972
1785
  </file>
1973
1786
  */
1974
- class StarterService extends BaseApiService {
1787
+ class StarterServiceBase extends ApiServiceBase {
1975
1788
  http;
1976
1789
  appContext;
1977
1790
  constructor(http, appContext) {
1978
1791
  super(http);
1979
1792
  this.http = http;
1980
1793
  this.appContext = appContext;
1794
+ this.baseUrl = ApiUrl;
1981
1795
  }
1982
1796
  applicationStarting() {
1983
1797
  let context = this.appContext.current;
@@ -1988,7 +1802,7 @@ class StarterService extends BaseApiService {
1988
1802
  //Log
1989
1803
  let stopwatch = new Stopwatch("applicationStarting");
1990
1804
  stopwatch.start();
1991
- this.baseUrl = `${AppCoreSettings.apiUrl}/appContext`;
1805
+ this.baseUrl = `${this.baseUrl}/appContext`;
1992
1806
  return this.get('applicationStarting').pipe(map(data => {
1993
1807
  //Log
1994
1808
  stopwatch.stop();
@@ -2202,6 +2016,27 @@ class DOM {
2202
2016
  }
2203
2017
  }
2204
2018
 
2019
+ /*
2020
+ <file>
2021
+ Project:
2022
+ @osovitny/anatoly
2023
+
2024
+ Authors:
2025
+ Vadim Osovitny vadim@osovitny.com
2026
+ Anatoly Osovitny anatoly@osovitny.com
2027
+
2028
+ Created:
2029
+ 26 Jun 2020
2030
+
2031
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2032
+ </file>
2033
+ */
2034
+ class Guid {
2035
+ static newGuid() {
2036
+ return v4();
2037
+ }
2038
+ }
2039
+
2205
2040
  /*
2206
2041
  <file>
2207
2042
  Project:
@@ -2260,12 +2095,12 @@ class Subs {
2260
2095
 
2261
2096
  Created:
2262
2097
  29 Apr 2018
2263
-
2098
+
2264
2099
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2265
2100
  </file>
2266
2101
  */
2267
2102
  //Node
2268
- class BaseGridReadService extends BehaviorSubject {
2103
+ class GridReadServiceBase extends BehaviorSubject {
2269
2104
  http;
2270
2105
  data = [];
2271
2106
  baseReadUrl;
@@ -2301,10 +2136,10 @@ class BaseGridReadService extends BehaviorSubject {
2301
2136
  }
2302
2137
  });
2303
2138
  }
2304
- static ɵfac = function BaseGridReadService_Factory(t) { return new (t || BaseGridReadService)(i0.ɵɵinject(i1$3.HttpClient)); };
2305
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: BaseGridReadService, factory: BaseGridReadService.ɵfac });
2139
+ static ɵfac = function GridReadServiceBase_Factory(t) { return new (t || GridReadServiceBase)(i0.ɵɵinject(i1$3.HttpClient)); };
2140
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GridReadServiceBase, factory: GridReadServiceBase.ɵfac });
2306
2141
  }
2307
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseGridReadService, [{
2142
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GridReadServiceBase, [{
2308
2143
  type: Injectable
2309
2144
  }], function () { return [{ type: i1$3.HttpClient }]; }, null); })();
2310
2145
 
@@ -2319,12 +2154,12 @@ class BaseGridReadService extends BehaviorSubject {
2319
2154
 
2320
2155
  Created:
2321
2156
  29 Apr 2018
2322
-
2157
+
2323
2158
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2324
2159
  </file>
2325
2160
  */
2326
2161
  //Node
2327
- class BaseGridEditService extends BaseGridReadService {
2162
+ class GridEditServiceBase extends GridReadServiceBase {
2328
2163
  http;
2329
2164
  baseUrl;
2330
2165
  constructor(http) {
@@ -2378,10 +2213,10 @@ class BaseGridEditService extends BaseGridReadService {
2378
2213
  const url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
2379
2214
  return this.http.post(url, data).pipe(map(res => res));
2380
2215
  }
2381
- static ɵfac = function BaseGridEditService_Factory(t) { return new (t || BaseGridEditService)(i0.ɵɵinject(i1$3.HttpClient)); };
2382
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: BaseGridEditService, factory: BaseGridEditService.ɵfac });
2216
+ static ɵfac = function GridEditServiceBase_Factory(t) { return new (t || GridEditServiceBase)(i0.ɵɵinject(i1$3.HttpClient)); };
2217
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GridEditServiceBase, factory: GridEditServiceBase.ɵfac });
2383
2218
  }
2384
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseGridEditService, [{
2219
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GridEditServiceBase, [{
2385
2220
  type: Injectable
2386
2221
  }], function () { return [{ type: i1$3.HttpClient }]; }, null); })();
2387
2222
 
@@ -2400,13 +2235,10 @@ class BaseGridEditService extends BaseGridReadService {
2400
2235
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2401
2236
  </file>
2402
2237
  */
2403
- const Consts = {
2404
- //core
2405
- coreApiPath: 'api/core',
2406
- //emails
2407
- emailsApiPath: 'api/emails',
2408
- //notifications
2409
- notificationsApiPath: 'api/notifications'
2238
+ //App
2239
+ const Urls = {
2240
+ coreApiUrl: `${ApiUrl}/core`,
2241
+ emailsApiUrl: `${ApiUrl}/emails`
2410
2242
  };
2411
2243
 
2412
2244
  /*
@@ -2419,30 +2251,48 @@ const Consts = {
2419
2251
  Anatoly Osovitny anatoly@osovitny.com
2420
2252
 
2421
2253
  Created:
2422
- 30 April 2020
2254
+ 02 Aug 2022
2423
2255
 
2424
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2256
+ Copyright (c) 2017-2022 Osovitny Inc. All rights reserved.
2425
2257
  </file>
2426
2258
  */
2427
- // Node
2428
- class NotificationsApiService extends BaseApiService {
2259
+ //Node
2260
+ class CoreApiService extends ApiServiceBase {
2429
2261
  http;
2430
2262
  constructor(http) {
2431
2263
  super(http);
2432
2264
  this.http = http;
2433
- this.baseUrl = Consts.notificationsApiPath;
2265
+ this.baseUrl = Urls.coreApiUrl;
2434
2266
  }
2435
- retrieveNotifications() {
2436
- return this.get('retrieveNotifications');
2267
+ getTimezonesJsonFile(done) {
2268
+ this.getExternalJsonFile('anatoly', 'timezones.json').subscribe({
2269
+ next: (data) => {
2270
+ if (done)
2271
+ done(data);
2272
+ }
2273
+ });
2437
2274
  }
2438
- static ɵfac = function NotificationsApiService_Factory(t) { return new (t || NotificationsApiService)(i0.ɵɵinject(i1$3.HttpClient)); };
2439
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NotificationsApiService, factory: NotificationsApiService.ɵfac, providedIn: 'root' });
2275
+ getUSStatesJsonFile(done) {
2276
+ this.getExternalJsonFile('anatoly', 'usStates.json').subscribe({
2277
+ next: (data) => {
2278
+ if (done)
2279
+ done(data);
2280
+ }
2281
+ });
2282
+ }
2283
+ getCountriesJsonFile(done) {
2284
+ this.getExternalJsonFile('anatoly', 'countries.json').subscribe({
2285
+ next: (data) => {
2286
+ if (done)
2287
+ done(data);
2288
+ }
2289
+ });
2290
+ }
2291
+ static ɵfac = function CoreApiService_Factory(t) { return new (t || CoreApiService)(i0.ɵɵinject(i1$3.HttpClient)); };
2292
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CoreApiService, factory: CoreApiService.ɵfac });
2440
2293
  }
2441
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationsApiService, [{
2442
- type: Injectable,
2443
- args: [{
2444
- providedIn: 'root'
2445
- }]
2294
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CoreApiService, [{
2295
+ type: Injectable
2446
2296
  }], function () { return [{ type: i1$3.HttpClient }]; }, null); })();
2447
2297
 
2448
2298
  /*
@@ -2461,12 +2311,12 @@ class NotificationsApiService extends BaseApiService {
2461
2311
  </file>
2462
2312
  */
2463
2313
  //Node
2464
- class EmailsApiService extends BaseApiService {
2314
+ class EmailsApiService extends ApiServiceBase {
2465
2315
  http;
2466
2316
  constructor(http) {
2467
2317
  super(http);
2468
2318
  this.http = http;
2469
- this.baseUrl = Consts.emailsApiPath;
2319
+ this.baseUrl = Urls.emailsApiUrl;
2470
2320
  }
2471
2321
  sendContactUs(captcha, name, email, topic, subject, message, success, error) {
2472
2322
  return this.post('sendContactUs', { captcha, name, email, topic, subject, message }).subscribe({
@@ -2487,60 +2337,6 @@ class EmailsApiService extends BaseApiService {
2487
2337
  type: Injectable
2488
2338
  }], function () { return [{ type: i1$3.HttpClient }]; }, null); })();
2489
2339
 
2490
- /*
2491
- <file>
2492
- Project:
2493
- @osovitny/anatoly
2494
-
2495
- Authors:
2496
- Vadim Osovitny vadim@osovitny.com
2497
- Anatoly Osovitny anatoly@osovitny.com
2498
-
2499
- Created:
2500
- 02 Aug 2022
2501
-
2502
- Copyright (c) 2017-2022 Osovitny Inc. All rights reserved.
2503
- </file>
2504
- */
2505
- //Node
2506
- class CoreApiService extends BaseApiService {
2507
- http;
2508
- constructor(http) {
2509
- super(http);
2510
- this.http = http;
2511
- this.baseUrl = Consts.coreApiPath;
2512
- }
2513
- getTimezonesJsonFile(done) {
2514
- this.getExternalJsonFile('anatoly', 'timezones.json').subscribe({
2515
- next: (data) => {
2516
- if (done)
2517
- done(data);
2518
- }
2519
- });
2520
- }
2521
- getUSStatesJsonFile(done) {
2522
- this.getExternalJsonFile('anatoly', 'usStates.json').subscribe({
2523
- next: (data) => {
2524
- if (done)
2525
- done(data);
2526
- }
2527
- });
2528
- }
2529
- getCountriesJsonFile(done) {
2530
- this.getExternalJsonFile('anatoly', 'countries.json').subscribe({
2531
- next: (data) => {
2532
- if (done)
2533
- done(data);
2534
- }
2535
- });
2536
- }
2537
- static ɵfac = function CoreApiService_Factory(t) { return new (t || CoreApiService)(i0.ɵɵinject(i1$3.HttpClient)); };
2538
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CoreApiService, factory: CoreApiService.ɵfac });
2539
- }
2540
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CoreApiService, [{
2541
- type: Injectable
2542
- }], function () { return [{ type: i1$3.HttpClient }]; }, null); })();
2543
-
2544
2340
  /*
2545
2341
  <file>
2546
2342
  Project:
@@ -2556,6 +2352,7 @@ class CoreApiService extends BaseApiService {
2556
2352
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2557
2353
  </file>
2558
2354
  */
2355
+ //base
2559
2356
 
2560
2357
  /*
2561
2358
  <file>
@@ -5975,11 +5772,11 @@ class AnatolyModule {
5975
5772
  /*
5976
5773
  * Public API Surface of anatoly-lib
5977
5774
  */
5978
- // Core
5775
+ //Core
5979
5776
 
5980
5777
  /**
5981
5778
  * Generated bundle index. Do not edit.
5982
5779
  */
5983
5780
 
5984
- export { AddressComponent, Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyModule, AnatolyUIModule, AppContextService, AppCoreSettings, AppName, BaseApiService, BaseComponent, BaseDialog, BaseEditComponent, BaseGoService, BaseGridEditService, BaseGridReadService, BaseHtmlEditorComponent, BaseList, BasePage, BasePagedPage, Browser, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, CompanyComponent, ContactUsDialog, ContactUsForm, Convert, Copy2ClipboardComponent, CoreApiService, DOM, DatapagerComponent, DefaultEditorOptions, DigitalMarketingService, EmailsApiService, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, GlobalErrorHandler, GoogleAnalyticsService, Guid, HoveringDirective, HtmlEditorComponent, IdleService, InjectorInstance, ItemValidationSummaryComponent, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, NativeElementDirective, NodataComponent, NotificationService, NotificationsApiService, PageSpinnerComponent, ReplaceTextPipe, SafeHtmlPipe, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterService, Stopwatch, Subs, SubscribePlanButtonComponent, TimezoneDropdownlist, TranslateModuleAtRoot, UrlSlugComponent, Urls, Utils, ValidationSummaryComponent, XmlFormatter, customTranslateLoaderFactory, localizationInitializerFactory, throwIfAlreadyLoaded };
5781
+ export { AddressComponent, Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, BaseComponent, BaseDialog, BaseEditComponent, BaseGoService, BaseHtmlEditorComponent, BaseList, BasePage, BasePagedPage, Browser, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, CompanyComponent, ContactUsDialog, ContactUsForm, Convert, Copy2ClipboardComponent, CoreApiService, DOM, DatapagerComponent, DefaultEditorOptions, DigitalMarketingService, EmailsApiService, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, GlobalErrorHandler, GoogleAnalyticsService, GridEditServiceBase, GridReadServiceBase, Guid, HoveringDirective, HtmlEditorComponent, IdleService, InjectorInstance, ItemValidationSummaryComponent, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, NativeElementDirective, NodataComponent, NotificationService, PageSpinnerComponent, ReplaceTextPipe, SafeHtmlPipe, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterServiceBase, Stopwatch, Subs, SubscribePlanButtonComponent, TimezoneDropdownlist, TranslateModuleAtRoot, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, customTranslateLoaderFactory, localizationInitializerFactory, throwIfAlreadyLoaded };
5985
5782
  //# sourceMappingURL=osovitny-anatoly.mjs.map