@osovitny/anatoly 3.19.34 → 3.19.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/jsons/languages-readme.txt +28 -0
- package/assets/jsons/languages.json +38 -0
- package/fesm2022/osovitny-anatoly.mjs +123 -56
- package/fesm2022/osovitny-anatoly.mjs.map +1 -1
- package/lib/billing/components/index.d.ts +1 -1
- package/lib/core/consts/storageKeys.d.ts +2 -0
- package/lib/core/services/appcontext.service.d.ts +15 -1
- package/lib/data/services/core-api.service.d.ts +0 -4
- package/lib/ui/components/dropdownlists/country/country.dropdownlist.d.ts +3 -3
- package/lib/ui/components/dropdownlists/timezone/timezone.dropdownlist.d.ts +1 -3
- package/lib/ui/forms/components/address/address.component.d.ts +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
|
|
2
|
+
https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
|
|
3
|
+
|
|
4
|
+
{
|
|
5
|
+
"code": "en", //Language Code => 639-1 or 639-2
|
|
6
|
+
"name": "English", //Country Name
|
|
7
|
+
"country": "us" //Country Code
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
"us" //The United States of America
|
|
11
|
+
"ru" //The Russian Federation
|
|
12
|
+
"es" //The Kingdom of Spain
|
|
13
|
+
"in" //The Republic of India
|
|
14
|
+
"am" //The Republic of Armenia
|
|
15
|
+
"ua" //Ukraine
|
|
16
|
+
|
|
17
|
+
Recommendation:
|
|
18
|
+
Use ISO 639‑1 codes (en, fr, es, ru) in most cases.
|
|
19
|
+
Short → only 2 characters, compact for storage and indexing.
|
|
20
|
+
Widely supported → used in BCP 47 language tags, browsers, HTTP Accept-Language, Android/iOS locales.
|
|
21
|
+
Easy for users → more familiar for developers and end users.
|
|
22
|
+
Good for most apps → unless you need obscure languages.
|
|
23
|
+
|
|
24
|
+
When to use ISO 639‑2
|
|
25
|
+
Use 3‑letter codes (eng, fra, spa) only if:
|
|
26
|
+
You must support rare, historical, or constructed languages not in ISO 639‑1.
|
|
27
|
+
You work with bibliographic or archival systems (libraries, research).
|
|
28
|
+
You need to distinguish similar but separate dialects more precisely.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"code": "en",
|
|
4
|
+
"name": "English",
|
|
5
|
+
"country": "us",
|
|
6
|
+
"standard": "639-1"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"code": "ru",
|
|
10
|
+
"name": "Russian",
|
|
11
|
+
"country": "ru",
|
|
12
|
+
"standard": "639-1"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"code": "es",
|
|
16
|
+
"name": "Spanish",
|
|
17
|
+
"country": "es",
|
|
18
|
+
"standard": "639-1"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"code": "hi",
|
|
22
|
+
"name": "Hindi",
|
|
23
|
+
"country": "in",
|
|
24
|
+
"standard": "639-1"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"code": "hy",
|
|
28
|
+
"name": "Armenian",
|
|
29
|
+
"country": "am",
|
|
30
|
+
"standard": "639-1"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"code": "uk",
|
|
34
|
+
"name": "Ukrainian",
|
|
35
|
+
"country": "ua",
|
|
36
|
+
"standard": "639-1"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, EventEmitter, Component, Output, Input, Inject, Pipe, provideAppInitializer, inject, NgModule, Directive, ChangeDetectionStrategy, ViewChild, ViewEncapsulation, HostListener, HostBinding } from '@angular/core';
|
|
3
|
-
import { BehaviorSubject, Subject, filter, takeUntil, map as map$1, catchError, of,
|
|
3
|
+
import { BehaviorSubject, merge, Subject, filter, takeUntil, map as map$1, catchError, of, forkJoin, timer, fromEvent, firstValueFrom } from 'rxjs';
|
|
4
4
|
import { map, tap, mergeMap } from 'rxjs/operators';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpResponse, HttpClient, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
@@ -246,7 +246,6 @@ class Stopwatch {
|
|
|
246
246
|
|
|
247
247
|
Authors:
|
|
248
248
|
Vadim Osovitny vadim.osovitny@osovitny.com
|
|
249
|
-
Anatoly Osovitny anatoly.osovitny@osovitny.com
|
|
250
249
|
|
|
251
250
|
Created:
|
|
252
251
|
28 Apr 2024
|
|
@@ -259,7 +258,9 @@ const AppContextStorageKeys = {
|
|
|
259
258
|
currency: 'currency',
|
|
260
259
|
//Lists
|
|
261
260
|
countries: 'countries',
|
|
262
|
-
languages: 'languages'
|
|
261
|
+
languages: 'languages',
|
|
262
|
+
timezones: 'timezones',
|
|
263
|
+
usStates: 'usStates'
|
|
263
264
|
};
|
|
264
265
|
|
|
265
266
|
/*
|
|
@@ -333,7 +334,6 @@ class SessionStorageService extends WebStorageService {
|
|
|
333
334
|
|
|
334
335
|
Authors:
|
|
335
336
|
Vadim Osovitny vadim.osovitny@osovitny.com
|
|
336
|
-
Anatoly Osovitny anatoly.osovitny@osovitny.com
|
|
337
337
|
|
|
338
338
|
Created:
|
|
339
339
|
13 Nov 2017
|
|
@@ -350,14 +350,18 @@ class AppContextService extends ApiServiceBase {
|
|
|
350
350
|
this.sessionStorage = sessionStorage;
|
|
351
351
|
this.storageKeyName = 'appContext';
|
|
352
352
|
this.subscription = null;
|
|
353
|
-
//
|
|
353
|
+
//updated
|
|
354
354
|
this._updated = new BehaviorSubject(null);
|
|
355
|
-
this._userUpdated = new BehaviorSubject(null);
|
|
356
|
-
//Public Streams
|
|
357
355
|
this.updated$ = this._updated.asObservable();
|
|
356
|
+
//userUpdated
|
|
357
|
+
this._userUpdated = new BehaviorSubject(null);
|
|
358
358
|
this.userUpdated$ = this._userUpdated.asObservable();
|
|
359
|
+
//jsonFilesLoaded
|
|
360
|
+
this._jsonFilesLoaded = new BehaviorSubject(null);
|
|
361
|
+
this.jsonFilesLoaded$ = this._jsonFilesLoaded.asObservable();
|
|
359
362
|
this.baseUrl = `${ApiUrl}/appContext`;
|
|
360
363
|
}
|
|
364
|
+
//fires
|
|
361
365
|
fireUpdated(data) {
|
|
362
366
|
if (!data) {
|
|
363
367
|
return;
|
|
@@ -367,6 +371,22 @@ class AppContextService extends ApiServiceBase {
|
|
|
367
371
|
fireUserUpdated() {
|
|
368
372
|
this._userUpdated.next(null);
|
|
369
373
|
}
|
|
374
|
+
fireJsonFilesLoaded() {
|
|
375
|
+
this._jsonFilesLoaded.next(null);
|
|
376
|
+
}
|
|
377
|
+
//API
|
|
378
|
+
getCountriesJsonFile() {
|
|
379
|
+
return this.getExternalJsonFile('anatoly', 'countries.json');
|
|
380
|
+
}
|
|
381
|
+
getLanguagesJsonFile() {
|
|
382
|
+
return this.getExternalJsonFile('anatoly', 'languages.json');
|
|
383
|
+
}
|
|
384
|
+
getTimezonesJsonFile() {
|
|
385
|
+
return this.getExternalJsonFile('anatoly', 'timezones.json');
|
|
386
|
+
}
|
|
387
|
+
getUSStatesJsonFile() {
|
|
388
|
+
return this.getExternalJsonFile('anatoly', 'usStates.json');
|
|
389
|
+
}
|
|
370
390
|
//Session
|
|
371
391
|
getCurrent4Session() {
|
|
372
392
|
return this.sessionStorage.getObject(this.storageKeyName);
|
|
@@ -384,7 +404,7 @@ class AppContextService extends ApiServiceBase {
|
|
|
384
404
|
return;
|
|
385
405
|
}
|
|
386
406
|
//Logging
|
|
387
|
-
let stopwatch = new Stopwatch("AppContextService: Requesting a new AppContext");
|
|
407
|
+
let stopwatch = new Stopwatch("@osovitny/anatoly. AppContextService: Requesting a new AppContext");
|
|
388
408
|
stopwatch.start();
|
|
389
409
|
this.subscription = this.get('getCurrentContext', null).subscribe({
|
|
390
410
|
next: (data) => {
|
|
@@ -423,6 +443,46 @@ class AppContextService extends ApiServiceBase {
|
|
|
423
443
|
this.current = context;
|
|
424
444
|
}
|
|
425
445
|
}
|
|
446
|
+
loadStandardJsonFiles() {
|
|
447
|
+
let countries = this.countries;
|
|
448
|
+
let languages = this.languages;
|
|
449
|
+
let timezones = this.timezones;
|
|
450
|
+
let usStates = this.usStates;
|
|
451
|
+
if (countries && languages && timezones && usStates) {
|
|
452
|
+
//VadimOS: that means NO action requried, just we have everything in place
|
|
453
|
+
return null;
|
|
454
|
+
}
|
|
455
|
+
let countries$ = this.getCountriesJsonFile().pipe(map(data => {
|
|
456
|
+
if (data) {
|
|
457
|
+
this.countries = data;
|
|
458
|
+
}
|
|
459
|
+
}));
|
|
460
|
+
let languages$ = this.getLanguagesJsonFile().pipe(map(data => {
|
|
461
|
+
if (data) {
|
|
462
|
+
this.languages = data;
|
|
463
|
+
}
|
|
464
|
+
}));
|
|
465
|
+
let timezones$ = this.getTimezonesJsonFile().pipe(map(data => {
|
|
466
|
+
if (data) {
|
|
467
|
+
this.timezones = data;
|
|
468
|
+
}
|
|
469
|
+
}));
|
|
470
|
+
let usStates$ = this.getUSStatesJsonFile().pipe(map(data => {
|
|
471
|
+
if (data) {
|
|
472
|
+
this.usStates = data;
|
|
473
|
+
}
|
|
474
|
+
}));
|
|
475
|
+
let tasks$ = merge(countries$, languages$, timezones$, usStates$);
|
|
476
|
+
//Logging
|
|
477
|
+
let stopwatch = new Stopwatch("@osovitny/anatoly. AppContextService: standard json files loaded");
|
|
478
|
+
stopwatch.start();
|
|
479
|
+
return tasks$.pipe(map(() => {
|
|
480
|
+
this.fireJsonFilesLoaded();
|
|
481
|
+
//Logging
|
|
482
|
+
stopwatch.stop();
|
|
483
|
+
stopwatch.printElapsedAsMilliseconds();
|
|
484
|
+
}));
|
|
485
|
+
}
|
|
426
486
|
loadRequiredJsonFiles() {
|
|
427
487
|
return null;
|
|
428
488
|
}
|
|
@@ -495,6 +555,26 @@ class AppContextService extends ApiServiceBase {
|
|
|
495
555
|
clearLanguages() {
|
|
496
556
|
this.localStorage.remove(AppContextStorageKeys.languages);
|
|
497
557
|
}
|
|
558
|
+
//timezones => localStorage
|
|
559
|
+
get timezones() {
|
|
560
|
+
return this.localStorage.getObject(AppContextStorageKeys.timezones);
|
|
561
|
+
}
|
|
562
|
+
set timezones(value) {
|
|
563
|
+
this.localStorage.setObject(AppContextStorageKeys.timezones, value);
|
|
564
|
+
}
|
|
565
|
+
clearTimezones() {
|
|
566
|
+
this.localStorage.remove(AppContextStorageKeys.timezones);
|
|
567
|
+
}
|
|
568
|
+
//usStates => localStorage
|
|
569
|
+
get usStates() {
|
|
570
|
+
return this.localStorage.getObject(AppContextStorageKeys.usStates);
|
|
571
|
+
}
|
|
572
|
+
set usStates(value) {
|
|
573
|
+
this.localStorage.setObject(AppContextStorageKeys.usStates, value);
|
|
574
|
+
}
|
|
575
|
+
clearUSStates() {
|
|
576
|
+
this.localStorage.remove(AppContextStorageKeys.usStates);
|
|
577
|
+
}
|
|
498
578
|
static { this.ɵfac = function AppContextService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AppContextService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(LocalStorageService), i0.ɵɵinject(SessionStorageService)); }; }
|
|
499
579
|
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AppContextService, factory: AppContextService.ɵfac }); }
|
|
500
580
|
}
|
|
@@ -2665,14 +2745,12 @@ class StarterService extends ApiServiceBase {
|
|
|
2665
2745
|
let context = this.appContext.current;
|
|
2666
2746
|
if (!is.objectNullOrEmpty(context)) {
|
|
2667
2747
|
//Logging
|
|
2668
|
-
this.logger.info('StarterService
|
|
2748
|
+
this.logger.info('@osovitny/anatoly. StarterService: getting AppContext from Session Storage');
|
|
2669
2749
|
this.appContext.init(context);
|
|
2670
2750
|
return of(context);
|
|
2671
2751
|
}
|
|
2672
2752
|
//Logging
|
|
2673
|
-
|
|
2674
|
-
//Logging
|
|
2675
|
-
let stopwatch = new Stopwatch("StarterService.applicationStarting: getting AppContext");
|
|
2753
|
+
let stopwatch = new Stopwatch("@osovitny/anatoly. StarterService: getting AppContext from API");
|
|
2676
2754
|
stopwatch.start();
|
|
2677
2755
|
this.baseUrl = `${ApiUrl}/appContext`;
|
|
2678
2756
|
return this.get('applicationStarting').pipe(map(data => {
|
|
@@ -2686,14 +2764,17 @@ class StarterService extends ApiServiceBase {
|
|
|
2686
2764
|
//1. Application Starting
|
|
2687
2765
|
let applicationStarting$ = this.applicationStarting();
|
|
2688
2766
|
//2. Load json files
|
|
2689
|
-
let
|
|
2767
|
+
let standardJsonFiles$ = this.appContext.loadStandardJsonFiles();
|
|
2768
|
+
let requiredJsonFiles$ = this.appContext.loadRequiredJsonFiles();
|
|
2690
2769
|
//3. Load required items, like settings
|
|
2691
2770
|
let requiredItems$ = this.appContext.loadRequiredItems();
|
|
2692
2771
|
//Tasks to execute
|
|
2693
2772
|
let parallelTasks = [];
|
|
2694
2773
|
let tasks$ = null;
|
|
2695
|
-
if (
|
|
2696
|
-
parallelTasks.push(
|
|
2774
|
+
if (standardJsonFiles$)
|
|
2775
|
+
parallelTasks.push(standardJsonFiles$);
|
|
2776
|
+
if (requiredJsonFiles$)
|
|
2777
|
+
parallelTasks.push(requiredJsonFiles$);
|
|
2697
2778
|
if (requiredItems$)
|
|
2698
2779
|
parallelTasks.push(requiredItems$);
|
|
2699
2780
|
/*
|
|
@@ -2712,7 +2793,7 @@ class StarterService extends ApiServiceBase {
|
|
|
2712
2793
|
tasks$ = applicationStarting$;
|
|
2713
2794
|
}
|
|
2714
2795
|
//Logging
|
|
2715
|
-
let stopwatch = new Stopwatch("StarterService
|
|
2796
|
+
let stopwatch = new Stopwatch("@osovitny/anatoly. StarterService: ensureApplicationStarted");
|
|
2716
2797
|
stopwatch.start();
|
|
2717
2798
|
return tasks$.pipe(map(() => {
|
|
2718
2799
|
//Logging
|
|
@@ -6548,15 +6629,6 @@ class CoreApiService extends ApiServiceBase {
|
|
|
6548
6629
|
this.http = http;
|
|
6549
6630
|
this.baseUrl = `${ApiUrl}/core`;
|
|
6550
6631
|
}
|
|
6551
|
-
getTimezonesJsonFile() {
|
|
6552
|
-
return this.getExternalJsonFile('anatoly', 'timezones.json');
|
|
6553
|
-
}
|
|
6554
|
-
getCountriesJsonFile() {
|
|
6555
|
-
return this.getExternalJsonFile('anatoly', 'countries.json');
|
|
6556
|
-
}
|
|
6557
|
-
getUSStatesJsonFile() {
|
|
6558
|
-
return this.getExternalJsonFile('anatoly', 'usStates.json');
|
|
6559
|
-
}
|
|
6560
6632
|
static { this.ɵfac = function CoreApiService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CoreApiService)(i0.ɵɵinject(i1.HttpClient)); }; }
|
|
6561
6633
|
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CoreApiService, factory: CoreApiService.ɵfac }); }
|
|
6562
6634
|
}
|
|
@@ -7163,18 +7235,18 @@ function CountryDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
7163
7235
|
i0.ɵɵproperty("ngForOf", ctx_r0.items);
|
|
7164
7236
|
} }
|
|
7165
7237
|
class CountryDropdownlist extends EditComponentBase {
|
|
7166
|
-
constructor(
|
|
7238
|
+
constructor(appContext) {
|
|
7167
7239
|
super();
|
|
7168
|
-
this.
|
|
7240
|
+
this.appContext = appContext;
|
|
7169
7241
|
this.title = 'Country';
|
|
7170
7242
|
}
|
|
7171
7243
|
ngOnInit() {
|
|
7172
7244
|
this.setValues();
|
|
7173
7245
|
}
|
|
7174
7246
|
setValues() {
|
|
7175
|
-
this.
|
|
7176
|
-
next: (
|
|
7177
|
-
this.items =
|
|
7247
|
+
this.appContext.jsonFilesLoaded$.subscribe({
|
|
7248
|
+
next: () => {
|
|
7249
|
+
this.items = this.appContext.countries.reverse();
|
|
7178
7250
|
}
|
|
7179
7251
|
});
|
|
7180
7252
|
if (this.isNgModelBased) {
|
|
@@ -7182,7 +7254,7 @@ class CountryDropdownlist extends EditComponentBase {
|
|
|
7182
7254
|
else {
|
|
7183
7255
|
}
|
|
7184
7256
|
}
|
|
7185
|
-
static { this.ɵfac = function CountryDropdownlist_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CountryDropdownlist)(i0.ɵɵdirectiveInject(
|
|
7257
|
+
static { this.ɵfac = function CountryDropdownlist_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CountryDropdownlist)(i0.ɵɵdirectiveInject(AppContextService)); }; }
|
|
7186
7258
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CountryDropdownlist, selectors: [["anatoly-country-dropdownlist"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "formGroup", 4, "ngIf"], [3, "formGroup"], [3, "text", 4, "ngIf"], [1, "form-select", 3, "formControlName"], [3, "value", 4, "ngFor", "ngForOf"], [3, "text"], [3, "value"]], template: function CountryDropdownlist_Template(rf, ctx) { if (rf & 1) {
|
|
7187
7259
|
i0.ɵɵtemplate(0, CountryDropdownlist_div_0_Template, 1, 0, "div", 0)(1, CountryDropdownlist_div_1_Template, 4, 4, "div", 1);
|
|
7188
7260
|
} if (rf & 2) {
|
|
@@ -7194,7 +7266,7 @@ class CountryDropdownlist extends EditComponentBase {
|
|
|
7194
7266
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CountryDropdownlist, [{
|
|
7195
7267
|
type: Component,
|
|
7196
7268
|
args: [{ selector: 'anatoly-country-dropdownlist', standalone: false, template: "<div *ngIf='isNgModelBased'>\r\n</div>\r\n\r\n<div *ngIf='!isNgModelBased' [formGroup]='formGroup'>\r\n <kendo-label text=\"{{ title }}\" *ngIf='isTitleVisible'></kendo-label>\r\n <select [formControlName]='controlName' class='form-select'>\r\n <option *ngFor='let item of items' [value]='item.code'>\r\n {{ item.name }}\r\n </option>\r\n </select>\r\n</div>\r\n" }]
|
|
7197
|
-
}], () => [{ type:
|
|
7269
|
+
}], () => [{ type: AppContextService }], null); })();
|
|
7198
7270
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CountryDropdownlist, { className: "CountryDropdownlist", filePath: "lib/ui/components/dropdownlists/country/country.dropdownlist.ts", lineNumber: 28 }); })();
|
|
7199
7271
|
|
|
7200
7272
|
/*
|
|
@@ -7575,9 +7647,8 @@ function TimezoneDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
7575
7647
|
i0.ɵɵproperty("ngForOf", ctx_r1.items);
|
|
7576
7648
|
} }
|
|
7577
7649
|
class TimezoneDropdownlist extends EditComponentBase {
|
|
7578
|
-
constructor(
|
|
7650
|
+
constructor(appContext) {
|
|
7579
7651
|
super();
|
|
7580
|
-
this.api = api;
|
|
7581
7652
|
this.appContext = appContext;
|
|
7582
7653
|
this.disabled = false;
|
|
7583
7654
|
this.title = 'Timezone';
|
|
@@ -7586,9 +7657,9 @@ class TimezoneDropdownlist extends EditComponentBase {
|
|
|
7586
7657
|
this.setValues();
|
|
7587
7658
|
}
|
|
7588
7659
|
setValues() {
|
|
7589
|
-
this.
|
|
7590
|
-
next: (
|
|
7591
|
-
this.items =
|
|
7660
|
+
this.appContext.jsonFilesLoaded$.subscribe({
|
|
7661
|
+
next: () => {
|
|
7662
|
+
this.items = this.appContext.timezones.reverse();
|
|
7592
7663
|
}
|
|
7593
7664
|
});
|
|
7594
7665
|
if (this.isNgModelBased) {
|
|
@@ -7613,7 +7684,7 @@ class TimezoneDropdownlist extends EditComponentBase {
|
|
|
7613
7684
|
}
|
|
7614
7685
|
}
|
|
7615
7686
|
}
|
|
7616
|
-
static { this.ɵfac = function TimezoneDropdownlist_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimezoneDropdownlist)(i0.ɵɵdirectiveInject(
|
|
7687
|
+
static { this.ɵfac = function TimezoneDropdownlist_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimezoneDropdownlist)(i0.ɵɵdirectiveInject(AppContextService)); }; }
|
|
7617
7688
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TimezoneDropdownlist, selectors: [["anatoly-timezone-dropdownlist"]], inputs: { disabled: "disabled" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "formGroup", 4, "ngIf"], [3, "formGroup"], ["class", "col-form-label", 4, "ngIf"], [1, "form-select", 3, "formControlName", "disabled"], [3, "value", 4, "ngFor", "ngForOf"], [1, "col-form-label"], [3, "value"]], template: function TimezoneDropdownlist_Template(rf, ctx) { if (rf & 1) {
|
|
7618
7689
|
i0.ɵɵtemplate(0, TimezoneDropdownlist_div_0_Template, 1, 0, "div", 0)(1, TimezoneDropdownlist_div_1_Template, 4, 5, "div", 1);
|
|
7619
7690
|
} if (rf & 2) {
|
|
@@ -7625,10 +7696,10 @@ class TimezoneDropdownlist extends EditComponentBase {
|
|
|
7625
7696
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimezoneDropdownlist, [{
|
|
7626
7697
|
type: Component,
|
|
7627
7698
|
args: [{ selector: 'anatoly-timezone-dropdownlist', standalone: false, template: "<div *ngIf='isNgModelBased'>\r\n</div>\r\n\r\n<div *ngIf='!isNgModelBased' [formGroup]='formGroup'>\r\n <label *ngIf='isTitleVisible' class='col-form-label'>Timezone</label>\r\n <select [formControlName]='controlName' class='form-select' [disabled]='disabled'>\r\n <option *ngFor='let item of items' [value]='item.code'>\r\n ({{ item.offset }}) {{ item.name }}\r\n </option>\r\n </select>\r\n</div>\r\n" }]
|
|
7628
|
-
}], () => [{ type:
|
|
7699
|
+
}], () => [{ type: AppContextService }], { disabled: [{
|
|
7629
7700
|
type: Input
|
|
7630
7701
|
}] }); })();
|
|
7631
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TimezoneDropdownlist, { className: "TimezoneDropdownlist", filePath: "lib/ui/components/dropdownlists/timezone/timezone.dropdownlist.ts", lineNumber:
|
|
7702
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TimezoneDropdownlist, { className: "TimezoneDropdownlist", filePath: "lib/ui/components/dropdownlists/timezone/timezone.dropdownlist.ts", lineNumber: 29 }); })();
|
|
7632
7703
|
|
|
7633
7704
|
/*
|
|
7634
7705
|
<file>
|
|
@@ -9621,10 +9692,10 @@ class AddressComponent extends EditComponentBase {
|
|
|
9621
9692
|
this.init();
|
|
9622
9693
|
}
|
|
9623
9694
|
}
|
|
9624
|
-
constructor(fb,
|
|
9695
|
+
constructor(fb, appContext) {
|
|
9625
9696
|
super();
|
|
9626
9697
|
this.fb = fb;
|
|
9627
|
-
this.
|
|
9698
|
+
this.appContext = appContext;
|
|
9628
9699
|
this.formGroupGenerated = false;
|
|
9629
9700
|
this.countryData = [];
|
|
9630
9701
|
this.usStateData = [];
|
|
@@ -9635,14 +9706,10 @@ class AddressComponent extends EditComponentBase {
|
|
|
9635
9706
|
this.title = 'Address';
|
|
9636
9707
|
}
|
|
9637
9708
|
ngOnInit() {
|
|
9638
|
-
this.
|
|
9639
|
-
next: (
|
|
9640
|
-
this.countryData =
|
|
9641
|
-
|
|
9642
|
-
});
|
|
9643
|
-
this.api.getUSStatesJsonFile().subscribe({
|
|
9644
|
-
next: (data) => {
|
|
9645
|
-
this.usStateData = data;
|
|
9709
|
+
this.appContext.jsonFilesLoaded$.subscribe({
|
|
9710
|
+
next: () => {
|
|
9711
|
+
this.countryData = this.appContext.countries.reverse();
|
|
9712
|
+
this.usStateData = this.appContext.usStates;
|
|
9646
9713
|
}
|
|
9647
9714
|
});
|
|
9648
9715
|
this.createFormGroup();
|
|
@@ -9702,7 +9769,7 @@ class AddressComponent extends EditComponentBase {
|
|
|
9702
9769
|
let usState = event.target.value;
|
|
9703
9770
|
this.change.emit(usState);
|
|
9704
9771
|
}
|
|
9705
|
-
static { this.ɵfac = function AddressComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AddressComponent)(i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(
|
|
9772
|
+
static { this.ɵfac = function AddressComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AddressComponent)(i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(AppContextService)); }; }
|
|
9706
9773
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddressComponent, selectors: [["anatoly-forms-address"]], inputs: { address: "address" }, outputs: { change: "change" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 30, vars: 29, consts: [["classes", "card-outline card-primary"], [3, "title", 4, "ngIf"], [3, "formGroup"], [1, "row"], [1, "form-group", 3, "ngClass"], ["type", "text", "formControlName", "address_street", "placeholder", "Street Address", 1, "form-control"], ["controlName", "address_street", "controlTitle", "Street", 3, "formGroup", "formSubmitted"], ["type", "text", "formControlName", "address_street2", "placeholder", "Apartment, suite, unit, building, floor, etc.", 1, "form-control"], ["controlName", "address_street2", "controlTitle", "Street2", 3, "formGroup", "formSubmitted"], [1, "form-group", "col-3", "mb-0", 3, "ngClass"], ["type", "text", "formControlName", "address_city", "placeholder", "City", 1, "form-control"], ["controlName", "address_city", "controlTitle", "City", 3, "formGroup", "formSubmitted"], ["class", "form-group col-3 mb-0", 3, "ngClass", 4, "ngIf"], ["type", "text", "formControlName", "address_zipcode", "placeholder", "zipcode", 1, "form-control"], ["controlName", "address_zipcode", "controlTitle", "zipcode", 3, "formGroup", "formSubmitted"], ["formControlName", "address_country", "data-placeholder", "Select a Country", 1, "form-control", 3, "change"], [3, "value", 4, "ngFor", "ngForOf"], ["controlName", "address_country", "controlTitle", "Country", 3, "formGroup", "formSubmitted"], [3, "title"], ["formControlName", "address_stateOrRegion", 1, "form-control", 3, "change"], ["controlName", "address_stateOrRegion", "controlTitle", "State", 3, "formGroup", "formSubmitted"], [3, "value"]], template: function AddressComponent_Template(rf, ctx) { if (rf & 1) {
|
|
9707
9774
|
i0.ɵɵelementStart(0, "anatoly-card", 0);
|
|
9708
9775
|
i0.ɵɵtemplate(1, AddressComponent_anatoly_card_header_1_Template, 1, 1, "anatoly-card-header", 1);
|
|
@@ -9768,7 +9835,7 @@ class AddressComponent extends EditComponentBase {
|
|
|
9768
9835
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressComponent, [{
|
|
9769
9836
|
type: Component,
|
|
9770
9837
|
args: [{ selector: 'anatoly-forms-address', standalone: false, template: "<anatoly-card classes='card-outline card-primary'>\r\n <anatoly-card-header *ngIf='isTitleVisible' [title]='title' />\r\n <anatoly-card-body [formGroup]='formGroup'>\r\n <div class=\"row\">\r\n <div class='form-group' [ngClass]=\"{'has-error': isControlInvalid('address_street')}\" >\r\n <label>Street Address</label>\r\n <input type='text' class='form-control' formControlName='address_street' placeholder='Street Address'>\r\n <anatoly-item-validation-summary controlName='address_street'\r\n controlTitle='Street'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n <div class='form-group' [ngClass]=\"{'has-error': isControlInvalid('address_street2')}\" >\r\n <input type='text' class='form-control' formControlName='address_street2' placeholder='Apartment, suite, unit, building, floor, etc.'>\r\n <anatoly-item-validation-summary controlName='address_street2'\r\n controlTitle='Street2'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class='form-group col-3 mb-0' [ngClass]=\"{'has-error': isControlInvalid('address_city')}\">\r\n <label>City</label>\r\n <input type='text' class='form-control' formControlName='address_city' placeholder='City'>\r\n <anatoly-item-validation-summary controlName='address_city'\r\n controlTitle='City'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n <div class='form-group col-3 mb-0' *ngIf=\"formGroup.value.address_country == 'US'\" [ngClass]=\"{'has-error': isControlInvalid('address_stateOrRegion')}\">\r\n <label>State</label>\r\n <select class='form-control' (change)='onUSStateChange($event)' formControlName='address_stateOrRegion'>\r\n <option *ngFor='let state of usStateData' [value]='state.code'>{{state.name}}</option>\r\n </select>\r\n <anatoly-item-validation-summary controlName='address_stateOrRegion'\r\n controlTitle='State'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n <div class='form-group col-3 mb-0' [ngClass]=\"{'has-error': isControlInvalid('address_zipcode')}\" >\r\n <label>Zipcode</label>\r\n <input type='text' class='form-control' formControlName='address_zipcode' placeholder='zipcode'>\r\n <anatoly-item-validation-summary controlName='address_zipcode'\r\n controlTitle='zipcode'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n <div class='form-group col-3 mb-0' [ngClass]=\"{'has-error': isControlInvalid('address_country')}\">\r\n <label>Country</label>\r\n <select class='form-control' (change)='onCountryChange($event)' formControlName='address_country' data-placeholder='Select a Country'>\r\n <option *ngFor='let country of countryData' [value]='country.code'>{{country.name}}</option>\r\n </select>\r\n <anatoly-item-validation-summary controlName='address_country'\r\n controlTitle='Country'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n </div>\r\n </anatoly-card-body>\r\n</anatoly-card>\r\n" }]
|
|
9771
|
-
}], () => [{ type: i2$1.FormBuilder }, { type:
|
|
9838
|
+
}], () => [{ type: i2$1.FormBuilder }, { type: AppContextService }], { address: [{
|
|
9772
9839
|
type: Input
|
|
9773
9840
|
}], change: [{
|
|
9774
9841
|
type: Output
|
|
@@ -10184,14 +10251,14 @@ class AnatolyDataModule {
|
|
|
10184
10251
|
static { this.ɵfac = function AnatolyDataModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AnatolyDataModule)(); }; }
|
|
10185
10252
|
static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AnatolyDataModule }); }
|
|
10186
10253
|
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
10187
|
-
//Billing
|
|
10254
|
+
//Billing Services
|
|
10188
10255
|
CurrenciesApiService,
|
|
10189
10256
|
CurrenciesStorageService,
|
|
10190
10257
|
PaymentsApiService,
|
|
10191
10258
|
PromoCodesApiService,
|
|
10192
10259
|
SubscriptionsApiService,
|
|
10193
10260
|
TransactionsApiService,
|
|
10194
|
-
//
|
|
10261
|
+
//Services
|
|
10195
10262
|
CoreApiService,
|
|
10196
10263
|
EmailsApiService
|
|
10197
10264
|
], imports: [CommonModule] }); }
|
|
@@ -10203,14 +10270,14 @@ class AnatolyDataModule {
|
|
|
10203
10270
|
CommonModule
|
|
10204
10271
|
],
|
|
10205
10272
|
providers: [
|
|
10206
|
-
//Billing
|
|
10273
|
+
//Billing Services
|
|
10207
10274
|
CurrenciesApiService,
|
|
10208
10275
|
CurrenciesStorageService,
|
|
10209
10276
|
PaymentsApiService,
|
|
10210
10277
|
PromoCodesApiService,
|
|
10211
10278
|
SubscriptionsApiService,
|
|
10212
10279
|
TransactionsApiService,
|
|
10213
|
-
//
|
|
10280
|
+
//Services
|
|
10214
10281
|
CoreApiService,
|
|
10215
10282
|
EmailsApiService
|
|
10216
10283
|
]
|