@osovitny/anatoly 3.19.34 → 3.19.35

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.
@@ -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, merge, forkJoin, timer, fromEvent, firstValueFrom } from 'rxjs';
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
- //Private Streams
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);
@@ -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("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
  }
@@ -2686,14 +2766,17 @@ class StarterService extends ApiServiceBase {
2686
2766
  //1. Application Starting
2687
2767
  let applicationStarting$ = this.applicationStarting();
2688
2768
  //2. Load json files
2689
- let jsonFiles$ = this.appContext.loadRequiredJsonFiles();
2769
+ let standardJsonFiles$ = this.appContext.loadStandardJsonFiles();
2770
+ let requiredJsonFiles$ = this.appContext.loadRequiredJsonFiles();
2690
2771
  //3. Load required items, like settings
2691
2772
  let requiredItems$ = this.appContext.loadRequiredItems();
2692
2773
  //Tasks to execute
2693
2774
  let parallelTasks = [];
2694
2775
  let tasks$ = null;
2695
- if (jsonFiles$)
2696
- parallelTasks.push(jsonFiles$);
2776
+ if (standardJsonFiles$)
2777
+ parallelTasks.push(standardJsonFiles$);
2778
+ if (requiredJsonFiles$)
2779
+ parallelTasks.push(requiredJsonFiles$);
2697
2780
  if (requiredItems$)
2698
2781
  parallelTasks.push(requiredItems$);
2699
2782
  /*
@@ -2712,7 +2795,7 @@ class StarterService extends ApiServiceBase {
2712
2795
  tasks$ = applicationStarting$;
2713
2796
  }
2714
2797
  //Logging
2715
- let stopwatch = new Stopwatch("StarterService.ensureApplicationStarted");
2798
+ let stopwatch = new Stopwatch("StarterService: ensureApplicationStarted");
2716
2799
  stopwatch.start();
2717
2800
  return tasks$.pipe(map(() => {
2718
2801
  //Logging
@@ -6548,15 +6631,6 @@ class CoreApiService extends ApiServiceBase {
6548
6631
  this.http = http;
6549
6632
  this.baseUrl = `${ApiUrl}/core`;
6550
6633
  }
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
6634
  static { this.ɵfac = function CoreApiService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CoreApiService)(i0.ɵɵinject(i1.HttpClient)); }; }
6561
6635
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CoreApiService, factory: CoreApiService.ɵfac }); }
6562
6636
  }
@@ -7163,18 +7237,18 @@ function CountryDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
7163
7237
  i0.ɵɵproperty("ngForOf", ctx_r0.items);
7164
7238
  } }
7165
7239
  class CountryDropdownlist extends EditComponentBase {
7166
- constructor(api) {
7240
+ constructor(appContext) {
7167
7241
  super();
7168
- this.api = api;
7242
+ this.appContext = appContext;
7169
7243
  this.title = 'Country';
7170
7244
  }
7171
7245
  ngOnInit() {
7172
7246
  this.setValues();
7173
7247
  }
7174
7248
  setValues() {
7175
- this.api.getCountriesJsonFile().subscribe({
7176
- next: (data) => {
7177
- this.items = data.reverse();
7249
+ this.appContext.jsonFilesLoaded$.subscribe({
7250
+ next: () => {
7251
+ this.items = this.appContext.countries.reverse();
7178
7252
  }
7179
7253
  });
7180
7254
  if (this.isNgModelBased) {
@@ -7182,7 +7256,7 @@ class CountryDropdownlist extends EditComponentBase {
7182
7256
  else {
7183
7257
  }
7184
7258
  }
7185
- static { this.ɵfac = function CountryDropdownlist_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CountryDropdownlist)(i0.ɵɵdirectiveInject(CoreApiService)); }; }
7259
+ static { this.ɵfac = function CountryDropdownlist_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CountryDropdownlist)(i0.ɵɵdirectiveInject(AppContextService)); }; }
7186
7260
  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
7261
  i0.ɵɵtemplate(0, CountryDropdownlist_div_0_Template, 1, 0, "div", 0)(1, CountryDropdownlist_div_1_Template, 4, 4, "div", 1);
7188
7262
  } if (rf & 2) {
@@ -7194,7 +7268,7 @@ class CountryDropdownlist extends EditComponentBase {
7194
7268
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CountryDropdownlist, [{
7195
7269
  type: Component,
7196
7270
  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: CoreApiService }], null); })();
7271
+ }], () => [{ type: AppContextService }], null); })();
7198
7272
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CountryDropdownlist, { className: "CountryDropdownlist", filePath: "lib/ui/components/dropdownlists/country/country.dropdownlist.ts", lineNumber: 28 }); })();
7199
7273
 
7200
7274
  /*
@@ -7575,9 +7649,8 @@ function TimezoneDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
7575
7649
  i0.ɵɵproperty("ngForOf", ctx_r1.items);
7576
7650
  } }
7577
7651
  class TimezoneDropdownlist extends EditComponentBase {
7578
- constructor(api, appContext) {
7652
+ constructor(appContext) {
7579
7653
  super();
7580
- this.api = api;
7581
7654
  this.appContext = appContext;
7582
7655
  this.disabled = false;
7583
7656
  this.title = 'Timezone';
@@ -7586,9 +7659,9 @@ class TimezoneDropdownlist extends EditComponentBase {
7586
7659
  this.setValues();
7587
7660
  }
7588
7661
  setValues() {
7589
- this.api.getTimezonesJsonFile().subscribe({
7590
- next: (data) => {
7591
- this.items = data.reverse();
7662
+ this.appContext.jsonFilesLoaded$.subscribe({
7663
+ next: () => {
7664
+ this.items = this.appContext.timezones.reverse();
7592
7665
  }
7593
7666
  });
7594
7667
  if (this.isNgModelBased) {
@@ -7613,7 +7686,7 @@ class TimezoneDropdownlist extends EditComponentBase {
7613
7686
  }
7614
7687
  }
7615
7688
  }
7616
- static { this.ɵfac = function TimezoneDropdownlist_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimezoneDropdownlist)(i0.ɵɵdirectiveInject(CoreApiService), i0.ɵɵdirectiveInject(AppContextService)); }; }
7689
+ static { this.ɵfac = function TimezoneDropdownlist_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimezoneDropdownlist)(i0.ɵɵdirectiveInject(AppContextService)); }; }
7617
7690
  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
7691
  i0.ɵɵtemplate(0, TimezoneDropdownlist_div_0_Template, 1, 0, "div", 0)(1, TimezoneDropdownlist_div_1_Template, 4, 5, "div", 1);
7619
7692
  } if (rf & 2) {
@@ -7625,10 +7698,10 @@ class TimezoneDropdownlist extends EditComponentBase {
7625
7698
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimezoneDropdownlist, [{
7626
7699
  type: Component,
7627
7700
  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: CoreApiService }, { type: AppContextService }], { disabled: [{
7701
+ }], () => [{ type: AppContextService }], { disabled: [{
7629
7702
  type: Input
7630
7703
  }] }); })();
7631
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TimezoneDropdownlist, { className: "TimezoneDropdownlist", filePath: "lib/ui/components/dropdownlists/timezone/timezone.dropdownlist.ts", lineNumber: 30 }); })();
7704
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TimezoneDropdownlist, { className: "TimezoneDropdownlist", filePath: "lib/ui/components/dropdownlists/timezone/timezone.dropdownlist.ts", lineNumber: 29 }); })();
7632
7705
 
7633
7706
  /*
7634
7707
  <file>
@@ -9621,10 +9694,10 @@ class AddressComponent extends EditComponentBase {
9621
9694
  this.init();
9622
9695
  }
9623
9696
  }
9624
- constructor(fb, api) {
9697
+ constructor(fb, appContext) {
9625
9698
  super();
9626
9699
  this.fb = fb;
9627
- this.api = api;
9700
+ this.appContext = appContext;
9628
9701
  this.formGroupGenerated = false;
9629
9702
  this.countryData = [];
9630
9703
  this.usStateData = [];
@@ -9635,14 +9708,10 @@ class AddressComponent extends EditComponentBase {
9635
9708
  this.title = 'Address';
9636
9709
  }
9637
9710
  ngOnInit() {
9638
- this.api.getCountriesJsonFile().subscribe({
9639
- next: (data) => {
9640
- this.countryData = data;
9641
- }
9642
- });
9643
- this.api.getUSStatesJsonFile().subscribe({
9644
- next: (data) => {
9645
- this.usStateData = data;
9711
+ this.appContext.jsonFilesLoaded$.subscribe({
9712
+ next: () => {
9713
+ this.countryData = this.appContext.countries.reverse();
9714
+ this.usStateData = this.appContext.usStates;
9646
9715
  }
9647
9716
  });
9648
9717
  this.createFormGroup();
@@ -9702,7 +9771,7 @@ class AddressComponent extends EditComponentBase {
9702
9771
  let usState = event.target.value;
9703
9772
  this.change.emit(usState);
9704
9773
  }
9705
- static { this.ɵfac = function AddressComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AddressComponent)(i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(CoreApiService)); }; }
9774
+ static { this.ɵfac = function AddressComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AddressComponent)(i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(AppContextService)); }; }
9706
9775
  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
9776
  i0.ɵɵelementStart(0, "anatoly-card", 0);
9708
9777
  i0.ɵɵtemplate(1, AddressComponent_anatoly_card_header_1_Template, 1, 1, "anatoly-card-header", 1);
@@ -9768,7 +9837,7 @@ class AddressComponent extends EditComponentBase {
9768
9837
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressComponent, [{
9769
9838
  type: Component,
9770
9839
  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: CoreApiService }], { address: [{
9840
+ }], () => [{ type: i2$1.FormBuilder }, { type: AppContextService }], { address: [{
9772
9841
  type: Input
9773
9842
  }], change: [{
9774
9843
  type: Output
@@ -10184,14 +10253,14 @@ class AnatolyDataModule {
10184
10253
  static { this.ɵfac = function AnatolyDataModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AnatolyDataModule)(); }; }
10185
10254
  static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AnatolyDataModule }); }
10186
10255
  static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
10187
- //Billing
10256
+ //Billing Services
10188
10257
  CurrenciesApiService,
10189
10258
  CurrenciesStorageService,
10190
10259
  PaymentsApiService,
10191
10260
  PromoCodesApiService,
10192
10261
  SubscriptionsApiService,
10193
10262
  TransactionsApiService,
10194
- //App
10263
+ //Services
10195
10264
  CoreApiService,
10196
10265
  EmailsApiService
10197
10266
  ], imports: [CommonModule] }); }
@@ -10203,14 +10272,14 @@ class AnatolyDataModule {
10203
10272
  CommonModule
10204
10273
  ],
10205
10274
  providers: [
10206
- //Billing
10275
+ //Billing Services
10207
10276
  CurrenciesApiService,
10208
10277
  CurrenciesStorageService,
10209
10278
  PaymentsApiService,
10210
10279
  PromoCodesApiService,
10211
10280
  SubscriptionsApiService,
10212
10281
  TransactionsApiService,
10213
- //App
10282
+ //Services
10214
10283
  CoreApiService,
10215
10284
  EmailsApiService
10216
10285
  ]