@osovitny/anatoly 3.16.62 → 3.16.64
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/iam/pages/signin.page.mjs +3 -3
- package/esm2022/lib/iam/pages/signout.page.mjs +3 -3
- package/esm2022/lib/iam/pages/signup.page.mjs +3 -3
- package/esm2022/lib/ui/components/base/component.mjs +65 -0
- package/esm2022/lib/ui/components/base/dialog.mjs +67 -0
- package/esm2022/lib/ui/components/base/edit.component.mjs +135 -0
- package/esm2022/lib/ui/components/base/list.mjs +69 -0
- package/esm2022/lib/ui/components/base/page.mjs +31 -0
- package/esm2022/lib/ui/components/base/paged.page.mjs +66 -0
- package/esm2022/lib/ui/components/html-editor/base-html-editor.component.mjs +6 -6
- package/esm2022/lib/ui/components/html-editor/forms-html-editor.component.mjs +4 -4
- package/esm2022/lib/ui/components/html-editor/html-editor.component.mjs +4 -4
- package/esm2022/lib/ui/components/identity/signin-button.component.mjs +5 -5
- package/esm2022/lib/ui/components/identity/signout-button.component.mjs +5 -5
- package/esm2022/lib/ui/components/identity/signup-button.component.mjs +5 -5
- package/esm2022/lib/ui/components/index.mjs +8 -8
- package/esm2022/lib/ui/components/spinners/loading/loading.component.mjs +3 -3
- package/esm2022/lib/ui/components/spinners/pagespinner/pagespinner.component.mjs +1 -1
- package/esm2022/lib/ui/dialogs/contact-us/contact-us.dialog.mjs +3 -3
- package/esm2022/lib/ui/forms/components/address/address.component.mjs +3 -3
- package/esm2022/lib/ui/forms/components/company/company.component.mjs +3 -3
- package/esm2022/lib/ui/forms/components/dropdownlists/timezone/timezone.dropdownlist.mjs +3 -3
- package/esm2022/lib/ui/forms/components/urlslug/urlslug.component.mjs +3 -3
- package/esm2022/lib/ui/forms/contact-us/contact-us.mjs +3 -3
- package/esm2022/lib/ui/validation/validation-summary.component.mjs +4 -4
- package/fesm2022/osovitny-anatoly.mjs +546 -545
- package/fesm2022/osovitny-anatoly.mjs.map +1 -1
- package/lib/iam/pages/signin.page.d.ts +2 -2
- package/lib/iam/pages/signout.page.d.ts +2 -2
- package/lib/iam/pages/signup.page.d.ts +2 -2
- package/lib/ui/components/base/{base.component.d.ts → component.d.ts} +3 -3
- package/lib/ui/components/base/{base.dialog.d.ts → dialog.d.ts} +4 -4
- package/lib/ui/components/base/{base-edit.component.d.ts → edit.component.d.ts} +4 -4
- package/lib/ui/components/base/{base.list.d.ts → list.d.ts} +4 -4
- package/lib/ui/components/base/page.d.ts +6 -0
- package/lib/ui/components/base/{base.paged.page.d.ts → paged.page.d.ts} +4 -4
- package/lib/ui/components/html-editor/base-html-editor.component.d.ts +4 -4
- package/lib/ui/components/html-editor/forms-html-editor.component.d.ts +2 -2
- package/lib/ui/components/html-editor/html-editor.component.d.ts +2 -2
- package/lib/ui/components/identity/signin-button.component.d.ts +2 -2
- package/lib/ui/components/identity/signout-button.component.d.ts +2 -2
- package/lib/ui/components/identity/signup-button.component.d.ts +2 -2
- package/lib/ui/components/index.d.ts +6 -6
- package/lib/ui/components/spinners/loading/loading.component.d.ts +2 -2
- package/lib/ui/dialogs/contact-us/contact-us.dialog.d.ts +2 -2
- package/lib/ui/forms/components/address/address.component.d.ts +2 -2
- package/lib/ui/forms/components/company/company.component.d.ts +2 -2
- package/lib/ui/forms/components/dropdownlists/timezone/timezone.dropdownlist.d.ts +2 -2
- package/lib/ui/forms/components/urlslug/urlslug.component.d.ts +2 -2
- package/lib/ui/forms/contact-us/contact-us.d.ts +2 -2
- package/lib/ui/validation/validation-summary.component.d.ts +2 -2
- package/package.json +1 -1
- package/esm2022/lib/ui/components/base/base-edit.component.mjs +0 -135
- package/esm2022/lib/ui/components/base/base.component.mjs +0 -65
- package/esm2022/lib/ui/components/base/base.dialog.mjs +0 -67
- package/esm2022/lib/ui/components/base/base.list.mjs +0 -69
- package/esm2022/lib/ui/components/base/base.page.mjs +0 -31
- package/esm2022/lib/ui/components/base/base.paged.page.mjs +0 -66
- package/lib/ui/components/base/base.page.d.ts +0 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AuthService } from '../services/auth.service';
|
|
3
|
-
import {
|
|
3
|
+
import { PageBase } from '../../ui/components/base/page';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SignInPage extends
|
|
5
|
+
export declare class SignInPage extends PageBase implements OnInit {
|
|
6
6
|
private auth;
|
|
7
7
|
constructor(auth: AuthService);
|
|
8
8
|
ngOnInit(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AuthService } from '../services/auth.service';
|
|
3
|
-
import {
|
|
3
|
+
import { PageBase } from '../../ui/components/base/page';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SignOutPage extends
|
|
5
|
+
export declare class SignOutPage extends PageBase implements OnInit {
|
|
6
6
|
private auth;
|
|
7
7
|
constructor(auth: AuthService);
|
|
8
8
|
ngOnInit(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AuthService } from '../services/auth.service';
|
|
3
|
-
import {
|
|
3
|
+
import { PageBase } from '../../ui/components/base/page';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SignUpPage extends
|
|
5
|
+
export declare class SignUpPage extends PageBase implements OnInit {
|
|
6
6
|
private auth;
|
|
7
7
|
constructor(auth: AuthService);
|
|
8
8
|
ngOnInit(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnDestroy } from "@angular/core";
|
|
2
2
|
import { Subs } from "../../../core";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare abstract class
|
|
4
|
+
export declare abstract class ComponentBase implements OnDestroy {
|
|
5
5
|
protected subs: Subs;
|
|
6
6
|
protected dataLoading: boolean;
|
|
7
7
|
protected dataLoaded: boolean;
|
|
@@ -13,6 +13,6 @@ export declare abstract class BaseComponent implements OnDestroy {
|
|
|
13
13
|
dataStartedLoading(): void;
|
|
14
14
|
dataLoadedAndNothingFound(): void;
|
|
15
15
|
dataLoadedAndFound(found?: boolean): void;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentBase, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentBase, "ng-component", never, { "classes": { "alias": "classes"; "required": false; }; }, {}, never, never, false, never>;
|
|
18
18
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { EditComponentBase } from "./edit.component";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare abstract class
|
|
4
|
+
export declare abstract class DialogBase extends EditComponentBase {
|
|
5
5
|
private _isOpen;
|
|
6
6
|
get isOpen(): boolean;
|
|
7
7
|
set isOpen(value: boolean);
|
|
@@ -12,6 +12,6 @@ export declare abstract class BaseDialog extends BaseEditComponent {
|
|
|
12
12
|
open(): void;
|
|
13
13
|
close(returnValue?: any): void;
|
|
14
14
|
cancel(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogBase, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DialogBase, "ng-component", never, { "isOpen": { "alias": "isOpen"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, false, never>;
|
|
17
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormGroup, AbstractControl, FormControl, ValidatorFn, AbstractControlOptions, AsyncValidatorFn } from "@angular/forms";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentBase } from "./component";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare abstract class
|
|
4
|
+
export declare abstract class EditComponentBase extends ComponentBase {
|
|
5
5
|
formGroup: FormGroup;
|
|
6
6
|
formSubmitted: boolean;
|
|
7
7
|
constructor();
|
|
@@ -52,6 +52,6 @@ export declare abstract class BaseEditComponent extends BaseComponent {
|
|
|
52
52
|
get fc(): {
|
|
53
53
|
[key: string]: AbstractControl<any, any>;
|
|
54
54
|
};
|
|
55
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
56
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditComponentBase, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EditComponentBase, "ng-component", never, { "formGroup": { "alias": "formGroup"; "required": false; }; "formSubmitted": { "alias": "formSubmitted"; "required": false; }; }, {}, never, never, false, never>;
|
|
57
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentBase } from "./component";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare abstract class
|
|
3
|
+
export declare abstract class ListBase extends ComponentBase {
|
|
4
4
|
currentFilter: any;
|
|
5
5
|
items: any[];
|
|
6
6
|
totalItems: number;
|
|
@@ -14,6 +14,6 @@ export declare abstract class BaseList extends BaseComponent {
|
|
|
14
14
|
setFilter(filter: any): void;
|
|
15
15
|
toIndex(index: any): any;
|
|
16
16
|
onPageChange(e: any): void;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListBase, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListBase, "ng-component", never, { "showNoDataIfNoDataFound": { "alias": "showNoDataIfNoDataFound"; "required": false; }; }, {}, never, never, false, never>;
|
|
19
19
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentBase } from "./component";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare abstract class PageBase extends ComponentBase {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageBase, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageBase, "ng-component", never, {}, {}, never, never, false, never>;
|
|
6
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PageBase } from "./page";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare abstract class
|
|
3
|
+
export declare abstract class PagedPageBase extends PageBase {
|
|
4
4
|
currentFilter: any;
|
|
5
5
|
items: any[];
|
|
6
6
|
totalItems: number;
|
|
@@ -13,6 +13,6 @@ export declare abstract class BasePagedPage extends BasePage {
|
|
|
13
13
|
setFilter(filter: any): void;
|
|
14
14
|
toIndex(index: any): any;
|
|
15
15
|
onPageChange(e: any): void;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PagedPageBase, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PagedPageBase, "ng-component", never, {}, {}, never, never, false, never>;
|
|
18
18
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AfterViewInit, OnInit } from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { EditComponentBase } from "../base/edit.component";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare abstract class
|
|
4
|
+
export declare abstract class HtmlEditorComponentBase extends EditComponentBase implements OnInit, AfterViewInit {
|
|
5
5
|
protected froalaEditor: any;
|
|
6
6
|
options: any;
|
|
7
7
|
froalaEditorInitialized: boolean;
|
|
@@ -16,6 +16,6 @@ export declare abstract class BaseHtmlEditorComponent extends BaseEditComponent
|
|
|
16
16
|
doAfterInitialized(action: any): void;
|
|
17
17
|
initializeControl(control: any): void;
|
|
18
18
|
setUploadParams(uploadType: any, uploadParentId: any): void;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HtmlEditorComponentBase, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HtmlEditorComponentBase, "ng-component", never, { "editorLabelText": { "alias": "editorLabelText"; "required": false; }; "editorOptions": { "alias": "editorOptions"; "required": false; }; }, {}, never, never, false, never>;
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlEditorComponentBase } from "./base-html-editor.component";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class FormsHtmlEditorComponent extends
|
|
3
|
+
export declare class FormsHtmlEditorComponent extends HtmlEditorComponentBase {
|
|
4
4
|
editorFormKey: string;
|
|
5
5
|
constructor();
|
|
6
6
|
setFormValueAfterInitialized(name: any, value: any): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HtmlEditorComponentBase } from "./base-html-editor.component";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class HtmlEditorComponent extends
|
|
3
|
+
export declare class HtmlEditorComponent extends HtmlEditorComponentBase {
|
|
4
4
|
constructor();
|
|
5
5
|
setHtml(content: any): void;
|
|
6
6
|
getHtml(): any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentBase } from "../base/component";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class SignInButtonComponent extends
|
|
3
|
+
export declare class SignInButtonComponent extends ComponentBase {
|
|
4
4
|
constructor();
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<SignInButtonComponent, never>;
|
|
6
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<SignInButtonComponent, "anatoly-signin-button", never, {}, {}, never, ["*"], false, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentBase } from "../base/component";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class SignOutButtonComponent extends
|
|
3
|
+
export declare class SignOutButtonComponent extends ComponentBase {
|
|
4
4
|
constructor();
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<SignOutButtonComponent, never>;
|
|
6
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<SignOutButtonComponent, "anatoly-signout-button", never, {}, {}, never, ["*"], false, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentBase } from "../base/component";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class SignUpButtonComponent extends
|
|
3
|
+
export declare class SignUpButtonComponent extends ComponentBase {
|
|
4
4
|
constructor();
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<SignUpButtonComponent, never>;
|
|
6
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<SignUpButtonComponent, "anatoly-signup-button", never, {}, {}, never, ["*"], false, never>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export * from './base/edit.component';
|
|
2
|
+
export * from './base/component';
|
|
3
|
+
export * from './base/dialog';
|
|
4
|
+
export * from './base/list';
|
|
5
|
+
export * from './base/page';
|
|
6
|
+
export * from './base/paged.page';
|
|
1
7
|
export * from './billing/buyaccess-button.component';
|
|
2
8
|
export * from './billing/subscribe-plan-button.component';
|
|
3
9
|
export * from './check-icon/check-icon.component';
|
|
@@ -17,9 +23,3 @@ export * from './html-editor/html-editor.defaultoptions';
|
|
|
17
23
|
export * from './html-editor/base-html-editor.component';
|
|
18
24
|
export * from './html-editor/forms-html-editor.component';
|
|
19
25
|
export * from './html-editor/html-editor.component';
|
|
20
|
-
export * from './base/base-edit.component';
|
|
21
|
-
export * from './base/base.component';
|
|
22
|
-
export * from './base/base.dialog';
|
|
23
|
-
export * from './base/base.list';
|
|
24
|
-
export * from './base/base.page';
|
|
25
|
-
export * from './base/base.paged.page';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentBase } from '../../base/component';
|
|
3
3
|
import { LoadingService } from '../../../../core/services/loading.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class LoadingComponent extends
|
|
5
|
+
export declare class LoadingComponent extends ComponentBase implements OnInit {
|
|
6
6
|
private loadingService;
|
|
7
7
|
show: boolean;
|
|
8
8
|
constructor(loadingService: LoadingService);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DialogBase } from '../../components/base/dialog';
|
|
2
2
|
import { ContactUsForm } from '../../forms/contact-us/contact-us';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ContactUsDialog extends
|
|
4
|
+
export declare class ContactUsDialog extends DialogBase {
|
|
5
5
|
contactUsForm: ContactUsForm;
|
|
6
6
|
constructor();
|
|
7
7
|
onClose(): void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { FormBuilder } from '@angular/forms';
|
|
3
3
|
import { CoreApiService } from '../../../../data';
|
|
4
|
-
import {
|
|
4
|
+
import { EditComponentBase } from '../../../components';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
interface CodeName {
|
|
7
7
|
code: string;
|
|
8
8
|
name: string;
|
|
9
9
|
}
|
|
10
|
-
export declare class AddressComponent extends
|
|
10
|
+
export declare class AddressComponent extends EditComponentBase implements OnInit {
|
|
11
11
|
private fb;
|
|
12
12
|
private api;
|
|
13
13
|
private _address;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { FormBuilder } from '@angular/forms';
|
|
3
|
-
import {
|
|
3
|
+
import { EditComponentBase } from '../../../components';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class CompanyComponent extends
|
|
5
|
+
export declare class CompanyComponent extends EditComponentBase implements OnInit {
|
|
6
6
|
private fb;
|
|
7
7
|
private _company;
|
|
8
8
|
formGroupGenerated: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { EditComponentBase } from '../../../../components/base/edit.component';
|
|
3
3
|
import { AppContextService } from '../../../../../core/services/appcontext.service';
|
|
4
4
|
import { CoreApiService } from '../../../../../data/services/core-api.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -9,7 +9,7 @@ interface Timezone {
|
|
|
9
9
|
offset: string;
|
|
10
10
|
offset_seconds: number;
|
|
11
11
|
}
|
|
12
|
-
export declare class TimezoneDropdownlist extends
|
|
12
|
+
export declare class TimezoneDropdownlist extends EditComponentBase implements OnInit {
|
|
13
13
|
private api;
|
|
14
14
|
private appContext;
|
|
15
15
|
timezoneListItems: Timezone[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { EditComponentBase } from '../../../components/base/edit.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class UrlSlugComponent extends
|
|
4
|
+
export declare class UrlSlugComponent extends EditComponentBase implements OnInit {
|
|
5
5
|
firstValue: boolean;
|
|
6
6
|
hrefGo: string;
|
|
7
7
|
title: string;
|
|
@@ -4,9 +4,9 @@ import { ReCaptchaV3Service } from 'ngx-captcha';
|
|
|
4
4
|
import { AppContextService } from "../../../core/services/appcontext.service";
|
|
5
5
|
import { NotificationService } from "../../../core/notifications/services/notification-service";
|
|
6
6
|
import { EmailsApiService } from '../../../data/services/emails-api.service';
|
|
7
|
-
import {
|
|
7
|
+
import { EditComponentBase } from "../../components/base/edit.component";
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class ContactUsForm extends
|
|
9
|
+
export declare class ContactUsForm extends EditComponentBase implements OnInit {
|
|
10
10
|
private reCaptcha;
|
|
11
11
|
private fb;
|
|
12
12
|
private appContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EditComponentBase } from "../components/base/edit.component";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare abstract class ValidationSummaryComponent extends
|
|
3
|
+
export declare abstract class ValidationSummaryComponent extends EditComponentBase {
|
|
4
4
|
constructor();
|
|
5
5
|
getFormValidationMessages(): string[];
|
|
6
6
|
getValidationMessages(state: any, thingName?: string): string[];
|
package/package.json
CHANGED
|
@@ -1,135 +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
|
-
20 Nov 2017
|
|
12
|
-
|
|
13
|
-
Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
|
|
14
|
-
</file>
|
|
15
|
-
*/
|
|
16
|
-
//Node
|
|
17
|
-
import { Component, Input } from "@angular/core";
|
|
18
|
-
import { FormControl, } from "@angular/forms";
|
|
19
|
-
//App
|
|
20
|
-
import { BaseComponent } from "./base.component";
|
|
21
|
-
import { Utils } from "../../../core";
|
|
22
|
-
import * as i0 from "@angular/core";
|
|
23
|
-
export class BaseEditComponent extends BaseComponent {
|
|
24
|
-
formGroup;
|
|
25
|
-
formSubmitted = false;
|
|
26
|
-
constructor() {
|
|
27
|
-
super();
|
|
28
|
-
}
|
|
29
|
-
isActionAdding() {
|
|
30
|
-
return !Utils.idExistsInQS();
|
|
31
|
-
}
|
|
32
|
-
isControlValid(name, frmGroup = null) {
|
|
33
|
-
return !this.isControlInvalid(name, frmGroup);
|
|
34
|
-
}
|
|
35
|
-
isControlInvalid(name, frmGroup = null) {
|
|
36
|
-
if (typeof name === "undefined" || name == "") {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
let fg = frmGroup ? frmGroup : this.formGroup;
|
|
40
|
-
if (!fg) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
if (fg.get(name)) {
|
|
44
|
-
return ((this.formSubmitted && fg.get(name).invalid) ||
|
|
45
|
-
(fg.get(name).touched && fg.get(name).invalid));
|
|
46
|
-
}
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
//FormGroup functions
|
|
50
|
-
getFormValue(name, frmGroup = null) {
|
|
51
|
-
let fg = frmGroup ? frmGroup : this.formGroup;
|
|
52
|
-
return fg.controls[name].value;
|
|
53
|
-
}
|
|
54
|
-
setFormValue(name, value, frmGroup = null) {
|
|
55
|
-
let fg = frmGroup ? frmGroup : this.formGroup;
|
|
56
|
-
fg.controls[name].setValue(value);
|
|
57
|
-
}
|
|
58
|
-
getFormGroupValue(groupName, name, frmGroup = null) {
|
|
59
|
-
let fg = frmGroup ? frmGroup : this.formGroup;
|
|
60
|
-
return fg.controls[groupName].get(name).value;
|
|
61
|
-
}
|
|
62
|
-
setFormGroupValue(groupName, name, value, frmGroup = null) {
|
|
63
|
-
let fg = frmGroup ? frmGroup : this.formGroup;
|
|
64
|
-
fg.controls[groupName].get(name).setValue(value);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Add control to form group
|
|
68
|
-
* @param name
|
|
69
|
-
* @param formControl
|
|
70
|
-
* @param frmGroup
|
|
71
|
-
*/
|
|
72
|
-
addControl(name, formControl, frmGroup = null) {
|
|
73
|
-
let fg = frmGroup ? frmGroup : this.formGroup;
|
|
74
|
-
fg.addControl(name, formControl);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Removes control from form group
|
|
78
|
-
* @param name
|
|
79
|
-
* @param frmGroup
|
|
80
|
-
*/
|
|
81
|
-
removeControl(name, frmGroup = null) {
|
|
82
|
-
let fg = frmGroup ? frmGroup : this.formGroup;
|
|
83
|
-
if (fg.get(name)) {
|
|
84
|
-
fg.removeControl(name);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* return new form control
|
|
89
|
-
* @param formState
|
|
90
|
-
* @param validatorOrOpts
|
|
91
|
-
* @param asyncValidator
|
|
92
|
-
*/
|
|
93
|
-
createFormControl(formState, validatorOrOpts, asyncValidator) {
|
|
94
|
-
return new FormControl(formState, validatorOrOpts, asyncValidator);
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Set error to control
|
|
98
|
-
* @param controlName formControl name
|
|
99
|
-
* @param err error expect {erroname: boolean} format
|
|
100
|
-
* @param frmGroup
|
|
101
|
-
*/
|
|
102
|
-
setControlError(controlName, err, frmGroup = null) {
|
|
103
|
-
let fg = frmGroup ? frmGroup : this.formGroup;
|
|
104
|
-
fg.get(controlName)?.setErrors(err);
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Set {invalid: true} for the specified form
|
|
108
|
-
* @param controlName form control name
|
|
109
|
-
* @param frmGroup
|
|
110
|
-
*/
|
|
111
|
-
setInValidError(controlName, frmGroup = null) {
|
|
112
|
-
let fg = frmGroup ? frmGroup : this.formGroup;
|
|
113
|
-
fg.get(controlName)?.setErrors({ invalid: true });
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* returns formgroup controls.
|
|
117
|
-
* main use case is used in html pages
|
|
118
|
-
*/
|
|
119
|
-
get fc() {
|
|
120
|
-
return this.formGroup.controls;
|
|
121
|
-
}
|
|
122
|
-
static ɵfac = function BaseEditComponent_Factory(t) { return new (t || BaseEditComponent)(); };
|
|
123
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BaseEditComponent, selectors: [["ng-component"]], inputs: { formGroup: "formGroup", formSubmitted: "formSubmitted" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function BaseEditComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
|
124
|
-
}
|
|
125
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseEditComponent, [{
|
|
126
|
-
type: Component,
|
|
127
|
-
args: [{
|
|
128
|
-
template: ''
|
|
129
|
-
}]
|
|
130
|
-
}], function () { return []; }, { formGroup: [{
|
|
131
|
-
type: Input
|
|
132
|
-
}], formSubmitted: [{
|
|
133
|
-
type: Input
|
|
134
|
-
}] }); })();
|
|
135
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1lZGl0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuYXRvbHkvc3JjL2xpYi91aS9jb21wb25lbnRzL2Jhc2UvYmFzZS1lZGl0LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7RUFjRTtBQUVGLE1BQU07QUFDTixPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNqRCxPQUFPLEVBR0wsV0FBVyxHQUlaLE1BQU0sZ0JBQWdCLENBQUM7QUFFeEIsS0FBSztBQUNMLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNqRCxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUt0QyxNQUFNLE9BQWdCLGlCQUFrQixTQUFRLGFBQWE7SUFDbEQsU0FBUyxDQUFZO0lBQ3JCLGFBQWEsR0FBWS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oly
|
|
5
|
-
|
|
6
|
-
Authors:
|
|
7
|
-
Vadim Osovitny vadim@osovitny.com
|
|
8
|
-
Anatoly Osovitny anatoly@osovitny.com
|
|
9
|
-
|
|
10
|
-
Created:
|
|
11
|
-
28 Aug 2018
|
|
12
|
-
|
|
13
|
-
Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
|
|
14
|
-
</file>
|
|
15
|
-
*/
|
|
16
|
-
//Node
|
|
17
|
-
import { Component, Input } from "@angular/core";
|
|
18
|
-
//App
|
|
19
|
-
import { Utils, Subs } from "../../../core";
|
|
20
|
-
import * as i0 from "@angular/core";
|
|
21
|
-
export class BaseComponent {
|
|
22
|
-
subs = new Subs();
|
|
23
|
-
//Component Data => usually loading from API
|
|
24
|
-
dataLoading = true;
|
|
25
|
-
dataLoaded = false;
|
|
26
|
-
dataFound = false;
|
|
27
|
-
//Inputs
|
|
28
|
-
classes;
|
|
29
|
-
ngOnDestroy() {
|
|
30
|
-
this.subs.unsubscribe();
|
|
31
|
-
}
|
|
32
|
-
getEntityId() {
|
|
33
|
-
return this.getValueByNameInQS("id");
|
|
34
|
-
}
|
|
35
|
-
getValueByNameInQS(name) {
|
|
36
|
-
let value = Utils.getValueByNameInQS(name);
|
|
37
|
-
if (typeof value === "undefined" || value == "")
|
|
38
|
-
return null;
|
|
39
|
-
return value;
|
|
40
|
-
}
|
|
41
|
-
dataStartedLoading() {
|
|
42
|
-
this.dataLoading = true;
|
|
43
|
-
this.dataLoaded = false;
|
|
44
|
-
this.dataFound = false;
|
|
45
|
-
}
|
|
46
|
-
dataLoadedAndNothingFound() {
|
|
47
|
-
this.dataLoadedAndFound(false);
|
|
48
|
-
}
|
|
49
|
-
dataLoadedAndFound(found = true) {
|
|
50
|
-
this.dataLoading = false;
|
|
51
|
-
this.dataLoaded = true;
|
|
52
|
-
this.dataFound = found;
|
|
53
|
-
}
|
|
54
|
-
static ɵfac = function BaseComponent_Factory(t) { return new (t || BaseComponent)(); };
|
|
55
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BaseComponent, selectors: [["ng-component"]], inputs: { classes: "classes" }, decls: 0, vars: 0, template: function BaseComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
|
56
|
-
}
|
|
57
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseComponent, [{
|
|
58
|
-
type: Component,
|
|
59
|
-
args: [{
|
|
60
|
-
template: ''
|
|
61
|
-
}]
|
|
62
|
-
}], null, { classes: [{
|
|
63
|
-
type: Input
|
|
64
|
-
}] }); })();
|
|
65
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmF0b2x5L3NyYy9saWIvdWkvY29tcG9uZW50cy9iYXNlL2Jhc2UuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBRUYsTUFBTTtBQUNOLE9BQU8sRUFBRSxTQUFTLEVBQWEsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTVELEtBQUs7QUFDTCxPQUFPLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFLNUMsTUFBTSxPQUFnQixhQUFhO0lBQ3ZCLElBQUksR0FBUyxJQUFJLElBQUksRUFBRSxDQUFDO0lBRWxDLDRDQUE0QztJQUNsQyxXQUFXLEdBQVksSUFBSSxDQUFDO0lBQzVCLFVBQVUsR0FBWSxLQUFLLENBQUM7SUFDNUIsU0FBUyxHQUFZLEtBQUssQ0FBQztJQUVyQyxRQUFRO0lBQ0MsT0FBTyxDQUFTO0lBRXpCLFdBQVc7UUFDVCxJQUFJLENBQUMsSUFBSSxDQUFDLFd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