@osovitny/anatoly 3.16.95 → 3.16.97
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/esm2022/lib/data/services/core-api.service.mjs +5 -5
- package/esm2022/lib/ui/components/dropdownlists/timezone/timezone.dropdownlist.mjs +113 -0
- package/esm2022/lib/ui/components/index.mjs +3 -1
- package/esm2022/lib/ui/forms/index.mjs +1 -3
- package/esm2022/lib/ui/ui.module.mjs +11 -6
- package/fesm2022/osovitny-anatoly.mjs +151 -133
- package/fesm2022/osovitny-anatoly.mjs.map +1 -1
- package/lib/data/services/core-api.service.d.ts +1 -1
- package/lib/ui/{forms/components → components}/dropdownlists/timezone/timezone.dropdownlist.d.ts +5 -5
- package/lib/ui/components/index.d.ts +1 -0
- package/lib/ui/forms/index.d.ts +0 -1
- package/lib/ui/ui.module.d.ts +14 -14
- package/package.json +1 -1
- package/esm2022/lib/ui/forms/components/dropdownlists/timezone/timezone.dropdownlist.mjs +0 -98
|
@@ -5,8 +5,8 @@ export declare class CoreApiService extends ApiServiceBase {
|
|
|
5
5
|
protected http: HttpClient;
|
|
6
6
|
constructor(http: HttpClient);
|
|
7
7
|
getTimezonesJsonFile(done: any): void;
|
|
8
|
-
getUSStatesJsonFile(done: any): void;
|
|
9
8
|
getCountriesJsonFile(done: any): void;
|
|
9
|
+
getUSStatesJsonFile(done: any): void;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoreApiService, never>;
|
|
11
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<CoreApiService>;
|
|
12
12
|
}
|
package/lib/ui/{forms/components → components}/dropdownlists/timezone/timezone.dropdownlist.d.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { EditComponentBase } from '
|
|
3
|
-
import { AppContextService } from '
|
|
4
|
-
import { CoreApiService } from '
|
|
2
|
+
import { EditComponentBase } from '../../base/components/edit.component';
|
|
3
|
+
import { AppContextService } from '../../../../core/services/appcontext.service';
|
|
4
|
+
import { CoreApiService } from '../../../../data/services/core-api.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
interface Timezone {
|
|
7
7
|
code: string;
|
|
@@ -12,11 +12,11 @@ interface Timezone {
|
|
|
12
12
|
export declare class TimezoneDropdownlist extends EditComponentBase implements OnInit {
|
|
13
13
|
private api;
|
|
14
14
|
private appContext;
|
|
15
|
-
|
|
15
|
+
timezones: Timezone[];
|
|
16
16
|
constructor(api: CoreApiService, appContext: AppContextService);
|
|
17
17
|
ngOnInit(): void;
|
|
18
18
|
setValues(): void;
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<TimezoneDropdownlist, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TimezoneDropdownlist, "anatoly-
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TimezoneDropdownlist, "anatoly-timezone-dropdownlist", never, {}, {}, never, never, false, never>;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -17,6 +17,7 @@ export * from './nodata/nodata.component';
|
|
|
17
17
|
export * from './spinners/loading/loading.component';
|
|
18
18
|
export * from './spinners/pagespinner/pagespinner.component';
|
|
19
19
|
export * from './copy-2-clipboard/copy-2-clipboard.component';
|
|
20
|
+
export * from './dropdownlists/timezone/timezone.dropdownlist';
|
|
20
21
|
export * from './card/card.component';
|
|
21
22
|
export * from './card/card-header.component';
|
|
22
23
|
export * from './card/card-body.component';
|
package/lib/ui/forms/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './components/address/address.component';
|
|
2
2
|
export * from './components/company/company.component';
|
|
3
3
|
export * from './components/urlslug/urlslug.component';
|
|
4
|
-
export * from './components/dropdownlists/timezone/timezone.dropdownlist';
|
|
5
4
|
export * from './contact-us/contact-us';
|
package/lib/ui/ui.module.d.ts
CHANGED
|
@@ -10,19 +10,19 @@ import * as i8 from "./components/nodata/nodata.component";
|
|
|
10
10
|
import * as i9 from "./components/spinners/pagespinner/pagespinner.component";
|
|
11
11
|
import * as i10 from "./components/spinners/loading/loading.component";
|
|
12
12
|
import * as i11 from "./components/copy-2-clipboard/copy-2-clipboard.component";
|
|
13
|
-
import * as i12 from "./components/
|
|
14
|
-
import * as i13 from "./components/card/card
|
|
15
|
-
import * as i14 from "./components/card/card-
|
|
16
|
-
import * as i15 from "./components/card/card-
|
|
17
|
-
import * as i16 from "./components/
|
|
18
|
-
import * as i17 from "./components/html-editor/
|
|
19
|
-
import * as i18 from "./
|
|
20
|
-
import * as i19 from "./
|
|
21
|
-
import * as i20 from "./directives/
|
|
22
|
-
import * as i21 from "./
|
|
23
|
-
import * as i22 from "./forms/components/
|
|
24
|
-
import * as i23 from "./forms/components/
|
|
25
|
-
import * as i24 from "./forms/components/
|
|
13
|
+
import * as i12 from "./components/dropdownlists/timezone/timezone.dropdownlist";
|
|
14
|
+
import * as i13 from "./components/card/card.component";
|
|
15
|
+
import * as i14 from "./components/card/card-header.component";
|
|
16
|
+
import * as i15 from "./components/card/card-body.component";
|
|
17
|
+
import * as i16 from "./components/card/card-footer.component";
|
|
18
|
+
import * as i17 from "./components/html-editor/html-editor.component";
|
|
19
|
+
import * as i18 from "./components/html-editor/forms-html-editor.component";
|
|
20
|
+
import * as i19 from "./dialogs/contact-us/contact-us.dialog";
|
|
21
|
+
import * as i20 from "./directives/native-element.directive";
|
|
22
|
+
import * as i21 from "./directives/hover.directive";
|
|
23
|
+
import * as i22 from "./forms/components/address/address.component";
|
|
24
|
+
import * as i23 from "./forms/components/company/company.component";
|
|
25
|
+
import * as i24 from "./forms/components/urlslug/urlslug.component";
|
|
26
26
|
import * as i25 from "./forms/contact-us/contact-us";
|
|
27
27
|
import * as i26 from "./pipes/safeHtml.pipe";
|
|
28
28
|
import * as i27 from "./pipes/replace-text.pipe";
|
|
@@ -38,6 +38,6 @@ import * as i36 from "./external/fa.module";
|
|
|
38
38
|
import * as i37 from "./external/kendo.module";
|
|
39
39
|
export declare class AnatolyUIModule {
|
|
40
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<AnatolyUIModule, never>;
|
|
41
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AnatolyUIModule, [typeof i1.BuyAccessButtonComponent, typeof i2.SubscribePlanButtonComponent, typeof i3.CheckIconComponent, typeof i4.DataPagerComponent, typeof i5.SignInButtonComponent, typeof i6.SignUpButtonComponent, typeof i7.SignOutButtonComponent, typeof i8.NodataComponent, typeof i9.PageSpinnerComponent, typeof i10.LoadingComponent, typeof i11.Copy2ClipboardComponent, typeof i12.
|
|
41
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AnatolyUIModule, [typeof i1.BuyAccessButtonComponent, typeof i2.SubscribePlanButtonComponent, typeof i3.CheckIconComponent, typeof i4.DataPagerComponent, typeof i5.SignInButtonComponent, typeof i6.SignUpButtonComponent, typeof i7.SignOutButtonComponent, typeof i8.NodataComponent, typeof i9.PageSpinnerComponent, typeof i10.LoadingComponent, typeof i11.Copy2ClipboardComponent, typeof i12.TimezoneDropdownlist, typeof i13.CardComponent, typeof i14.CardHeaderComponent, typeof i15.CardBodyComponent, typeof i16.CardFooterComponent, typeof i17.HtmlEditorComponent, typeof i18.FormsHtmlEditorComponent, typeof i19.ContactUsDialog, typeof i20.NativeElementDirective, typeof i21.HoveringDirective, typeof i22.AddressComponent, typeof i23.CompanyComponent, typeof i24.UrlSlugComponent, typeof i25.ContactUsForm, typeof i26.SafeHtmlPipe, typeof i27.ReplaceTextPipe, typeof i28.FileSizePipe, typeof i29.FormValidationSummaryComponent, typeof i30.ItemValidationSummaryComponent], [typeof i31.CommonModule, typeof i32.RouterModule, typeof i33.ReactiveFormsModule, typeof i33.FormsModule, typeof i34.NgxCaptchaModule, typeof i35.FERootModule, typeof i36.FaModule, typeof i37.KendoModule], [typeof i1.BuyAccessButtonComponent, typeof i2.SubscribePlanButtonComponent, typeof i3.CheckIconComponent, typeof i4.DataPagerComponent, typeof i5.SignInButtonComponent, typeof i6.SignUpButtonComponent, typeof i7.SignOutButtonComponent, typeof i8.NodataComponent, typeof i9.PageSpinnerComponent, typeof i10.LoadingComponent, typeof i11.Copy2ClipboardComponent, typeof i12.TimezoneDropdownlist, typeof i13.CardComponent, typeof i14.CardHeaderComponent, typeof i15.CardBodyComponent, typeof i16.CardFooterComponent, typeof i17.HtmlEditorComponent, typeof i18.FormsHtmlEditorComponent, typeof i19.ContactUsDialog, typeof i20.NativeElementDirective, typeof i21.HoveringDirective, typeof i22.AddressComponent, typeof i23.CompanyComponent, typeof i24.UrlSlugComponent, typeof i25.ContactUsForm, typeof i26.SafeHtmlPipe, typeof i27.ReplaceTextPipe, typeof i28.FileSizePipe, typeof i29.FormValidationSummaryComponent, typeof i30.ItemValidationSummaryComponent]>;
|
|
42
42
|
static ɵinj: i0.ɵɵInjectorDeclaration<AnatolyUIModule>;
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
<file>
|
|
3
|
-
Project:
|
|
4
|
-
@osovitny/anatoly
|
|
5
|
-
|
|
6
|
-
Authors:
|
|
7
|
-
Vadim Osovitny vadim@osovitny.com
|
|
8
|
-
Anatoly Osovitny anatoly@osovitny.com
|
|
9
|
-
|
|
10
|
-
Created:
|
|
11
|
-
02 Aug 2022
|
|
12
|
-
|
|
13
|
-
Copyright (c) 2017-2022 Osovitny Inc. All rights reserved.
|
|
14
|
-
</file>
|
|
15
|
-
*/
|
|
16
|
-
//Node
|
|
17
|
-
import { Component } from '@angular/core';
|
|
18
|
-
//App
|
|
19
|
-
import { EditComponentBase } from '../../../../components/base/components/edit.component';
|
|
20
|
-
import * as i0 from "@angular/core";
|
|
21
|
-
import * as i1 from "../../../../../data/services/core-api.service";
|
|
22
|
-
import * as i2 from "../../../../../core/services/appcontext.service";
|
|
23
|
-
import * as i3 from "@angular/common";
|
|
24
|
-
import * as i4 from "@angular/forms";
|
|
25
|
-
import * as i5 from "../../../../directives/native-element.directive";
|
|
26
|
-
function TimezoneDropdownlist_label_1_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
-
i0.ɵɵelementStart(0, "label", 4);
|
|
28
|
-
i0.ɵɵtext(1, "Timezone");
|
|
29
|
-
i0.ɵɵelementEnd();
|
|
30
|
-
} }
|
|
31
|
-
function TimezoneDropdownlist_option_3_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
-
i0.ɵɵelementStart(0, "option", 5);
|
|
33
|
-
i0.ɵɵtext(1);
|
|
34
|
-
i0.ɵɵelementEnd();
|
|
35
|
-
} if (rf & 2) {
|
|
36
|
-
const timezone_r2 = ctx.$implicit;
|
|
37
|
-
i0.ɵɵproperty("value", timezone_r2.code);
|
|
38
|
-
i0.ɵɵadvance(1);
|
|
39
|
-
i0.ɵɵtextInterpolate2(" (", timezone_r2.offset, ") ", timezone_r2.name, " ");
|
|
40
|
-
} }
|
|
41
|
-
export class TimezoneDropdownlist extends EditComponentBase {
|
|
42
|
-
api;
|
|
43
|
-
appContext;
|
|
44
|
-
timezoneListItems;
|
|
45
|
-
constructor(api, appContext) {
|
|
46
|
-
super();
|
|
47
|
-
this.api = api;
|
|
48
|
-
this.appContext = appContext;
|
|
49
|
-
this.title = 'Timezone';
|
|
50
|
-
this.controlName = 'timezone';
|
|
51
|
-
}
|
|
52
|
-
ngOnInit() {
|
|
53
|
-
this.setValues();
|
|
54
|
-
}
|
|
55
|
-
setValues() {
|
|
56
|
-
this.api.getTimezonesJsonFile(data => {
|
|
57
|
-
this.timezoneListItems = data.reverse();
|
|
58
|
-
});
|
|
59
|
-
let timeZone = this.getFormValue(this.controlName);
|
|
60
|
-
if (timeZone) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
//1. Try to set client timeZone
|
|
64
|
-
try {
|
|
65
|
-
timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
66
|
-
this.setFormValue(this.controlName, timeZone);
|
|
67
|
-
}
|
|
68
|
-
catch {
|
|
69
|
-
}
|
|
70
|
-
//2. Try to set context timeZone
|
|
71
|
-
let context = this.appContext.current;
|
|
72
|
-
timeZone = context?.user?.timeZone;
|
|
73
|
-
if (timeZone) {
|
|
74
|
-
this.setFormValue(this.controlName, timeZone);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
static ɵfac = function TimezoneDropdownlist_Factory(t) { return new (t || TimezoneDropdownlist)(i0.ɵɵdirectiveInject(i1.CoreApiService), i0.ɵɵdirectiveInject(i2.AppContextService)); };
|
|
78
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TimezoneDropdownlist, selectors: [["anatoly-forms-timezone-dropdownlist"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 4, consts: [[1, "form-group", 3, "formGroup"], ["class", "col-form-label", 4, "ngIf"], [1, "form-control", 3, "formControlName"], [3, "value", 4, "ngFor", "ngForOf"], [1, "col-form-label"], [3, "value"]], template: function TimezoneDropdownlist_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
80
|
-
i0.ɵɵtemplate(1, TimezoneDropdownlist_label_1_Template, 2, 0, "label", 1);
|
|
81
|
-
i0.ɵɵelementStart(2, "select", 2);
|
|
82
|
-
i0.ɵɵtemplate(3, TimezoneDropdownlist_option_3_Template, 2, 3, "option", 3);
|
|
83
|
-
i0.ɵɵelementEnd()();
|
|
84
|
-
} if (rf & 2) {
|
|
85
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
86
|
-
i0.ɵɵadvance(1);
|
|
87
|
-
i0.ɵɵproperty("ngIf", ctx.isTitleVisible);
|
|
88
|
-
i0.ɵɵadvance(1);
|
|
89
|
-
i0.ɵɵproperty("formControlName", ctx.controlName);
|
|
90
|
-
i0.ɵɵadvance(1);
|
|
91
|
-
i0.ɵɵproperty("ngForOf", ctx.timezoneListItems);
|
|
92
|
-
} }, dependencies: [i3.NgForOf, i3.NgIf, i4.NgSelectOption, i4.ɵNgSelectMultipleOption, i4.SelectControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i5.NativeElementDirective], encapsulation: 2 });
|
|
93
|
-
}
|
|
94
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimezoneDropdownlist, [{
|
|
95
|
-
type: Component,
|
|
96
|
-
args: [{ selector: 'anatoly-forms-timezone-dropdownlist', template: "<div [formGroup]='formGroup' class='form-group'>\r\n <label *ngIf='isTitleVisible' class='col-form-label'>Timezone</label>\r\n <select [formControlName]='controlName' class='form-control'>\r\n <option *ngFor='let timezone of timezoneListItems'\r\n [value]='timezone.code'>\r\n ({{timezone.offset}}) {{timezone.name}}\r\n </option>\r\n </select>\r\n</div>\r\n" }]
|
|
97
|
-
}], function () { return [{ type: i1.CoreApiService }, { type: i2.AppContextService }]; }, null); })();
|
|
98
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZXpvbmUuZHJvcGRvd25saXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5hdG9seS9zcmMvbGliL3VpL2Zvcm1zL2NvbXBvbmVudHMvZHJvcGRvd25saXN0cy90aW1lem9uZS90aW1lem9uZS5kcm9wZG93bmxpc3QudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmF0b2x5L3NyYy9saWIvdWkvZm9ybXMvY29tcG9uZW50cy9kcm9wZG93bmxpc3RzL3RpbWV6b25lL3RpbWV6b25lLmRyb3Bkb3dubGlzdC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBRUYsTUFBTTtBQUNOLE9BQU8sRUFBRSxTQUFTLEVBQW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