myrta-ui 17.0.0-beta.9 → 17.0.2
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/components/breadcrumbs/breadcrumbs.component.mjs +4 -3
- package/esm2022/lib/components/breadcrumbs/breadcrumbs.enum.mjs +1 -1
- package/esm2022/lib/components/breadcrumbs/breadcrumbs.module.mjs +10 -4
- package/esm2022/lib/components/dropdown/dropdown.component.mjs +2 -2
- package/esm2022/lib/components/form/checkbox/checkbox.component.mjs +5 -12
- package/esm2022/lib/components/form/checkbox/checkbox.enum.mjs +2 -5
- package/esm2022/lib/components/form/checkbox-group/checkbox-group.component.mjs +82 -44
- package/esm2022/lib/components/form/checkbox-group/components/checkbox-group-header/checkbox-group-header.component.mjs +4 -4
- package/esm2022/lib/components/form/checkbox-group/components/checkbox-group-item/checkbox-group-item.component.mjs +51 -43
- package/esm2022/lib/components/form/checkbox-group/helpers/change-group-value.mjs +7 -8
- package/esm2022/lib/components/form/checkbox-group/helpers/change-item-value.mjs +2 -2
- package/esm2022/lib/components/form/checkbox-group/helpers/filter-search-group.mjs +5 -5
- package/esm2022/lib/components/form/checkbox-group/helpers/get-checked-items.mjs +2 -2
- package/esm2022/lib/components/form/checkbox-group/helpers/get-inner-list.helper.mjs +46 -0
- package/esm2022/lib/components/form/checkbox-group/helpers/get-item-by-id.mjs +4 -4
- package/esm2022/lib/components/form/checkbox-group/helpers/get-sorted-list.mjs +2 -2
- package/esm2022/lib/components/form/checkbox-group/helpers/inner-list-to-list.helper.mjs +13 -0
- package/esm2022/lib/components/form/checkbox-group/models/checkbox-group.model.mjs +1 -1
- package/esm2022/lib/components/form/editor/editor.component.mjs +9 -6
- package/esm2022/lib/components/form/input-file/input-file.component.mjs +3 -5
- package/esm2022/lib/components/form/input-file-image/components/file-image-edit-modal/file-image-edit-modal.component.mjs +1 -3
- package/esm2022/lib/components/form/input-file-image/input-file-image.component.mjs +100 -106
- package/esm2022/lib/components/form/input-opt/components/input-opt/input-opt.component.mjs +2 -2
- package/esm2022/lib/components/form/input-password/input-password.component.mjs +2 -2
- package/esm2022/lib/components/form/input-phone/input-phone.component.mjs +2 -2
- package/esm2022/lib/components/form/input-search/input-search.component.mjs +2 -2
- package/esm2022/lib/components/form/input-select/input-select.component.mjs +4 -4
- package/esm2022/lib/components/form/input-tel/input-tel.component.mjs +2 -2
- package/esm2022/lib/components/form/input-text/input-text.component.mjs +2 -2
- package/esm2022/lib/components/form/input-textarea/input-textarea.component.mjs +2 -2
- package/esm2022/lib/components/form/radio-group/components/radio-group-header/radio-group-header.component.mjs +7 -4
- package/esm2022/lib/components/form/radio-group/components/radio-group-item/radio-group-item.component.mjs +9 -3
- package/esm2022/lib/components/form/radio-group/models/radio-group.model.mjs +1 -1
- package/esm2022/lib/components/form/radio-group/radio-group.component.mjs +32 -23
- package/esm2022/lib/components/form/radio-group/radio-group.module.mjs +25 -4
- package/esm2022/lib/components/form/rating/rating.component.mjs +2 -2
- package/esm2022/lib/components/gallery/components/gallery-confirm-modal/gallery-confirm-modal.component.mjs +1 -3
- package/esm2022/lib/components/icon-button/icon-button.component.mjs +9 -3
- package/esm2022/lib/components/icon-button/icon-button.enum.mjs +2 -1
- package/esm2022/lib/components/label/label.component.mjs +2 -2
- package/esm2022/lib/components/link/link.component.mjs +22 -9
- package/esm2022/lib/components/link/link.module.mjs +5 -4
- package/esm2022/lib/components/paginator/paginator.component.mjs +5 -5
- package/esm2022/lib/components/paginator/paginator.module.mjs +8 -8
- package/esm2022/lib/components/pdf-viewer/pdf-viewer.component.mjs +268 -0
- package/esm2022/lib/components/pdf-viewer/pdf-viewer.module.mjs +59 -0
- package/esm2022/lib/components/save-state/components/save-state-editor/save-state-editor.component.mjs +2 -2
- package/esm2022/lib/components/save-state/save-state.component.mjs +3 -3
- package/esm2022/lib/components/save-state/save-state.enum.mjs +1 -1
- package/esm2022/lib/components/table/table.component.mjs +4 -11
- package/esm2022/lib/components/truncate-text/truncate-text.component.mjs +1 -1
- package/esm2022/lib/services/file-upload/file-upload.service.mjs +2 -3
- package/esm2022/lib/services/index.mjs +5 -1
- package/esm2022/lib/services/modal-service/components/alert-modal/alert-modal.component.mjs +1 -3
- package/esm2022/lib/services/modal-service/components/confirm-modal/confirm-modal.component.mjs +1 -3
- package/esm2022/lib/services/modal-service/helpers/modal.component.mjs +1 -2
- package/esm2022/lib/services/modal-service/modal-service.service.mjs +1 -1
- package/esm2022/lib/services/mrx-form-validator/constants/invalid-messages.mjs +10 -0
- package/esm2022/lib/services/mrx-form-validator/helpers/get-error-message.helper.mjs +10 -0
- package/esm2022/lib/services/mrx-form-validator/helpers/get-sorting-validations.helper.mjs +29 -0
- package/esm2022/lib/services/mrx-form-validator/models/index.mjs +4 -0
- package/esm2022/lib/services/mrx-form-validator/models/validations-options.model.mjs +2 -0
- package/esm2022/lib/services/mrx-form-validator/models/validations-settings.model.mjs +2 -0
- package/esm2022/lib/services/mrx-form-validator/models/validations-types.model.mjs +22 -0
- package/esm2022/lib/services/mrx-form-validator/mrx-form-validator.mjs +97 -183
- package/esm2022/lib/services/mrx-form-validator/validations/callback.validation.mjs +15 -0
- package/esm2022/lib/services/mrx-form-validator/validations/email.validation.mjs +11 -0
- package/esm2022/lib/services/mrx-form-validator/validations/max-length.validation.mjs +14 -0
- package/esm2022/lib/services/mrx-form-validator/validations/max-value.validation.mjs +10 -0
- package/esm2022/lib/services/mrx-form-validator/validations/min-length.validation.mjs +15 -0
- package/esm2022/lib/services/mrx-form-validator/validations/min-value.validation.mjs +10 -0
- package/esm2022/lib/services/mrx-form-validator/validations/pattern.validation.mjs +11 -0
- package/esm2022/lib/services/mrx-form-validator/validations/required.validation.mjs +22 -0
- package/esm2022/lib/services/toaster-service/components/toaster/toaster.component.mjs +29 -0
- package/esm2022/lib/services/toaster-service/models/toaster.model.mjs +15 -0
- package/esm2022/lib/services/toaster-service/toaster-service.module.mjs +52 -0
- package/esm2022/lib/services/toaster-service/toaster-service.service.mjs +53 -0
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/myrta-ui.mjs +1625 -988
- package/fesm2022/myrta-ui.mjs.map +1 -1
- package/lib/components/breadcrumbs/breadcrumbs.enum.d.ts +5 -0
- package/lib/components/breadcrumbs/breadcrumbs.module.d.ts +2 -1
- package/lib/components/form/checkbox/checkbox.component.d.ts +2 -4
- package/lib/components/form/checkbox/checkbox.enum.d.ts +0 -4
- package/lib/components/form/checkbox-group/checkbox-group.component.d.ts +27 -18
- package/lib/components/form/checkbox-group/components/checkbox-group-item/checkbox-group-item.component.d.ts +16 -9
- package/lib/components/form/checkbox-group/helpers/change-group-value.d.ts +3 -3
- package/lib/components/form/checkbox-group/helpers/change-item-value.d.ts +3 -3
- package/lib/components/form/checkbox-group/helpers/filter-search-group.d.ts +2 -2
- package/lib/components/form/checkbox-group/helpers/get-checked-items.d.ts +2 -2
- package/lib/components/form/checkbox-group/helpers/get-inner-list.helper.d.ts +2 -0
- package/lib/components/form/checkbox-group/helpers/get-item-by-id.d.ts +2 -2
- package/lib/components/form/checkbox-group/helpers/get-sorted-list.d.ts +2 -2
- package/lib/components/form/checkbox-group/helpers/inner-list-to-list.helper.d.ts +2 -0
- package/lib/components/form/checkbox-group/models/checkbox-group.model.d.ts +13 -2
- package/lib/components/form/editor/editor.component.d.ts +1 -1
- package/lib/components/form/input-file-image/components/file-image-edit-modal/file-image-edit-modal.component.d.ts +0 -1
- package/lib/components/form/input-file-image/input-file-image.component.d.ts +1 -1
- package/lib/components/form/input-select/input-select.component.d.ts +16 -5
- package/lib/components/form/radio-group/components/radio-group-header/radio-group-header.component.d.ts +3 -1
- package/lib/components/form/radio-group/components/radio-group-item/radio-group-item.component.d.ts +3 -1
- package/lib/components/form/radio-group/models/radio-group.model.d.ts +4 -0
- package/lib/components/form/radio-group/radio-group.component.d.ts +10 -7
- package/lib/components/form/radio-group/radio-group.module.d.ts +2 -1
- package/lib/components/gallery/components/gallery-confirm-modal/gallery-confirm-modal.component.d.ts +0 -1
- package/lib/components/icon-button/icon-button.component.d.ts +4 -1
- package/lib/components/icon-button/icon-button.enum.d.ts +2 -1
- package/lib/components/link/link.component.d.ts +10 -3
- package/lib/components/link/link.module.d.ts +2 -1
- package/lib/components/paginator/paginator.module.d.ts +3 -3
- package/lib/components/pdf-viewer/pdf-viewer.component.d.ts +70 -0
- package/lib/components/pdf-viewer/pdf-viewer.module.d.ts +16 -0
- package/lib/components/save-state/save-state.enum.d.ts +1 -1
- package/lib/services/file-upload/file-upload.service.d.ts +2 -2
- package/lib/services/index.d.ts +4 -0
- package/lib/services/modal-service/components/alert-modal/alert-modal.component.d.ts +0 -1
- package/lib/services/modal-service/components/confirm-modal/confirm-modal.component.d.ts +0 -1
- package/lib/services/modal-service/helpers/modal.component.d.ts +0 -1
- package/lib/services/mrx-form-validator/constants/invalid-messages.d.ts +9 -0
- package/lib/services/mrx-form-validator/helpers/get-error-message.helper.d.ts +3 -0
- package/lib/services/mrx-form-validator/helpers/get-sorting-validations.helper.d.ts +2 -0
- package/lib/services/mrx-form-validator/models/index.d.ts +3 -0
- package/lib/services/mrx-form-validator/models/validations-options.model.d.ts +31 -0
- package/lib/services/mrx-form-validator/models/validations-settings.model.d.ts +7 -0
- package/lib/services/mrx-form-validator/models/validations-types.model.d.ts +19 -0
- package/lib/services/mrx-form-validator/mrx-form-validator.d.ts +6 -33
- package/lib/services/mrx-form-validator/validations/callback.validation.d.ts +5 -0
- package/lib/services/mrx-form-validator/validations/email.validation.d.ts +5 -0
- package/lib/services/mrx-form-validator/validations/max-length.validation.d.ts +5 -0
- package/lib/services/mrx-form-validator/validations/max-value.validation.d.ts +5 -0
- package/lib/services/mrx-form-validator/validations/min-length.validation.d.ts +5 -0
- package/lib/services/mrx-form-validator/validations/min-value.validation.d.ts +5 -0
- package/lib/services/mrx-form-validator/validations/pattern.validation.d.ts +5 -0
- package/lib/services/mrx-form-validator/validations/required.validation.d.ts +5 -0
- package/lib/services/toaster-service/components/toaster/toaster.component.d.ts +12 -0
- package/lib/services/toaster-service/models/toaster.model.d.ts +12 -0
- package/lib/services/toaster-service/toaster-service.module.d.ts +10 -0
- package/lib/services/toaster-service/toaster-service.service.d.ts +15 -0
- package/package.json +5 -1
- package/public-api.d.ts +4 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, OnChanges, OnInit, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { FindResultMatchesCount, FindState, NgxExtendedPdfViewerComponent, NgxExtendedPdfViewerService, PagesLoadedEvent } from 'ngx-extended-pdf-viewer';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
type RotationType = 0 | 90 | 180 | 270;
|
|
5
|
+
export declare class PdfViewerComponent implements OnInit, OnChanges {
|
|
6
|
+
private _pdfViewerService;
|
|
7
|
+
private _renderer;
|
|
8
|
+
private _ref;
|
|
9
|
+
searchQuery: string;
|
|
10
|
+
findState: FindState;
|
|
11
|
+
totalFound: number;
|
|
12
|
+
currentFind: number;
|
|
13
|
+
page: number;
|
|
14
|
+
isSearchPanelVisible: boolean;
|
|
15
|
+
sidebarVisible: boolean;
|
|
16
|
+
pageCount: number;
|
|
17
|
+
selectedZoom: {
|
|
18
|
+
value: number | string;
|
|
19
|
+
label: string;
|
|
20
|
+
};
|
|
21
|
+
zoomOptions: ({
|
|
22
|
+
value: string;
|
|
23
|
+
label: string;
|
|
24
|
+
} | {
|
|
25
|
+
value: number;
|
|
26
|
+
label: string;
|
|
27
|
+
})[];
|
|
28
|
+
rotation: RotationType;
|
|
29
|
+
showSidebarButton: boolean;
|
|
30
|
+
showHandToolButton: boolean;
|
|
31
|
+
handTool: boolean;
|
|
32
|
+
showFindbarButton: boolean;
|
|
33
|
+
showRotateButton: boolean;
|
|
34
|
+
showPrintButton: boolean;
|
|
35
|
+
showDownloadButton: boolean;
|
|
36
|
+
showExpandButton: boolean;
|
|
37
|
+
defaultZoom: number | 'auto' | 'page-actual' | 'pge-fit' | 'page-width';
|
|
38
|
+
downloadFileName: string;
|
|
39
|
+
src: string;
|
|
40
|
+
pdfViewer: NgxExtendedPdfViewerComponent;
|
|
41
|
+
findMenu: ElementRef | null;
|
|
42
|
+
constructor(_pdfViewerService: NgxExtendedPdfViewerService, _renderer: Renderer2, _ref: ChangeDetectorRef);
|
|
43
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
44
|
+
initZoom(): void;
|
|
45
|
+
initSearch(): void;
|
|
46
|
+
ngOnInit(): void;
|
|
47
|
+
onPageChange($event: any): void;
|
|
48
|
+
onNextPage(): void;
|
|
49
|
+
onLastPage(): void;
|
|
50
|
+
onPagesLoaded($event: PagesLoadedEvent): void;
|
|
51
|
+
zoomClick(increase: boolean): void;
|
|
52
|
+
onZoomLevelSelect(item: any): void;
|
|
53
|
+
onZoomChange($event: string | number): void;
|
|
54
|
+
onRotate(direction: number): void;
|
|
55
|
+
onPrintClick(): void;
|
|
56
|
+
onDownloadClick(): Promise<void>;
|
|
57
|
+
onSidebarViewClick(): void;
|
|
58
|
+
onExpandModeClick(): void;
|
|
59
|
+
onSearchClick(): void;
|
|
60
|
+
onSearch($event: string): void;
|
|
61
|
+
findNext(): void;
|
|
62
|
+
findPrevious(): void;
|
|
63
|
+
onUpdateMatchCase($event: FindResultMatchesCount): void;
|
|
64
|
+
onFindStateChanged($event: FindState): void;
|
|
65
|
+
onSidebarVisibleChange($event: boolean): void;
|
|
66
|
+
onHandToolClick(): void;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PdfViewerComponent, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdfViewerComponent, "mrx-pdf-viewer", never, { "showSidebarButton": { "alias": "showSidebarButton"; "required": false; }; "showHandToolButton": { "alias": "showHandToolButton"; "required": false; }; "handTool": { "alias": "handTool"; "required": false; }; "showFindbarButton": { "alias": "showFindbarButton"; "required": false; }; "showRotateButton": { "alias": "showRotateButton"; "required": false; }; "showPrintButton": { "alias": "showPrintButton"; "required": false; }; "showDownloadButton": { "alias": "showDownloadButton"; "required": false; }; "showExpandButton": { "alias": "showExpandButton"; "required": false; }; "defaultZoom": { "alias": "defaultZoom"; "required": false; }; "downloadFileName": { "alias": "downloadFileName"; "required": false; }; "src": { "alias": "src"; "required": false; }; }, {}, never, never, false, never>;
|
|
69
|
+
}
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./pdf-viewer.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../tooltip/tooltip.module";
|
|
5
|
+
import * as i4 from "../cdk-tooltip/cdk-tooltip.module";
|
|
6
|
+
import * as i5 from "ngx-extended-pdf-viewer";
|
|
7
|
+
import * as i6 from "../icon-button/icon-button.module";
|
|
8
|
+
import * as i7 from "../form/input-select/input-select.module";
|
|
9
|
+
import * as i8 from "../form/input-number/input-number.module";
|
|
10
|
+
import * as i9 from "../form/input-text/input-text.module";
|
|
11
|
+
import * as i10 from "@angular/forms";
|
|
12
|
+
export declare class PdfViewerComponentModule {
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PdfViewerComponentModule, never>;
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PdfViewerComponentModule, [typeof i1.PdfViewerComponent], [typeof i2.CommonModule, typeof i3.TooltipModule, typeof i4.CdkTooltipModule, typeof i5.NgxExtendedPdfViewerModule, typeof i6.IconButtonModule, typeof i7.InputSelectModule, typeof i8.InputNumberModule, typeof i9.InputTextModule, typeof i2.CommonModule, typeof i10.FormsModule, typeof i8.InputNumberModule], [typeof i1.PdfViewerComponent]>;
|
|
15
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PdfViewerComponentModule>;
|
|
16
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type SaveStateComponentType = 'input' | 'checkbox' | 'checkboxGroup' | 'switch' | 'editor';
|
|
1
|
+
export type SaveStateComponentType = 'input' | 'checkbox' | 'checkboxGroup' | 'radio' | 'radioGroup' | 'switch' | 'editor';
|
|
@@ -5,8 +5,8 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class FileUploadService {
|
|
6
6
|
private http;
|
|
7
7
|
constructor(http: HttpClient);
|
|
8
|
-
upload(url: string, file:
|
|
9
|
-
delete(url: string
|
|
8
|
+
upload(url: string, file: FormData): Observable<HttpEvent<UploadedResultModel>>;
|
|
9
|
+
delete(url: string): Observable<UploadedResultModel>;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadService, never>;
|
|
11
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<FileUploadService>;
|
|
12
12
|
}
|
package/lib/services/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './mrx-autosave/mrx-autosave.service';
|
|
2
2
|
export * from './file-upload/file-upload.service';
|
|
3
3
|
export * from './mrx-form-validator/mrx-form-validator';
|
|
4
|
+
export * from './mrx-form-validator/models';
|
|
4
5
|
export * from './save-store/save-store.module';
|
|
5
6
|
export * from './save-store/store/selectors';
|
|
6
7
|
export * from './save-store/store/actions';
|
|
@@ -8,3 +9,6 @@ export * from './modal-service/modal-service.module';
|
|
|
8
9
|
export * from './modal-service/models/modal-config.model';
|
|
9
10
|
export * from './modal-service/modal-service.service';
|
|
10
11
|
export * from './modal-service/helpers';
|
|
12
|
+
export * from './toaster-service/toaster-service.module';
|
|
13
|
+
export * from './toaster-service/toaster-service.service';
|
|
14
|
+
export * from './toaster-service/models/toaster.model';
|
|
@@ -9,7 +9,6 @@ export interface DefaultAlertModalParams {
|
|
|
9
9
|
export type DefaultAlertModalResult = boolean | undefined;
|
|
10
10
|
export declare class AlertModalComponent extends ModalServiceComponent<DefaultAlertModalParams, DefaultAlertModalResult> {
|
|
11
11
|
private dialogRef;
|
|
12
|
-
data: DefaultAlertModalParams;
|
|
13
12
|
config: ModalCustomConfig;
|
|
14
13
|
model: DefaultAlertModalParams;
|
|
15
14
|
constructor(dialogRef: ModalRef<DefaultAlertModalResult>, data: DefaultAlertModalParams, config: ModalCustomConfig);
|
|
@@ -9,7 +9,6 @@ export interface DefaultConfirmModalParams {
|
|
|
9
9
|
export type DefaultConfirmModalResult = boolean | undefined;
|
|
10
10
|
export declare class ConfirmModalComponent extends ModalServiceComponent<DefaultConfirmModalParams, DefaultConfirmModalResult> {
|
|
11
11
|
private dialogRef;
|
|
12
|
-
data: DefaultConfirmModalParams;
|
|
13
12
|
config: ModalCustomConfig;
|
|
14
13
|
model: DefaultConfirmModalParams;
|
|
15
14
|
constructor(dialogRef: ModalRef<DefaultConfirmModalResult>, data: DefaultConfirmModalParams, config: ModalCustomConfig);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const INVALID_MESSAGES: {
|
|
2
|
+
required: () => string;
|
|
3
|
+
maxLength: (length: number) => string;
|
|
4
|
+
minLength: (length: number) => string;
|
|
5
|
+
maxValue: (value: number) => string;
|
|
6
|
+
minValue: (value: number) => string;
|
|
7
|
+
email: () => string;
|
|
8
|
+
pattern: () => string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ValidationTypesEnum } from '../models/validations-types.model';
|
|
2
|
+
import { IMessages } from '../models/validations-options.model';
|
|
3
|
+
export declare const getErrorMessageHelper: (key: ValidationTypesEnum, invalidMessages: IMessages, messages: IMessages | undefined, params?: any) => string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface IMessages {
|
|
2
|
+
[name: string]: string | ((param?: any) => string);
|
|
3
|
+
}
|
|
4
|
+
export interface IFields {
|
|
5
|
+
[name: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export interface IFieldsError {
|
|
8
|
+
[name: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export type ValidationsType = {
|
|
11
|
+
required?: boolean;
|
|
12
|
+
type?: 'multi' | 'single';
|
|
13
|
+
maxLength?: number;
|
|
14
|
+
minLength?: number;
|
|
15
|
+
maxValue?: number;
|
|
16
|
+
minValue?: number;
|
|
17
|
+
email?: boolean;
|
|
18
|
+
pattern?: RegExp;
|
|
19
|
+
messages?: IMessages;
|
|
20
|
+
/**
|
|
21
|
+
* @param value Any <br/>
|
|
22
|
+
* callback принимает value поля модели <br/>
|
|
23
|
+
* Вернув null | false - ошибка отсутствует <br/>
|
|
24
|
+
* Вернув true | string - ошибка появляется <br/>
|
|
25
|
+
* string при этом становится тектом ошибки
|
|
26
|
+
*/
|
|
27
|
+
callback?: (value: any) => any;
|
|
28
|
+
};
|
|
29
|
+
export interface IValidations {
|
|
30
|
+
[name: string]: ValidationsType;
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum ValidationTypesEnum {
|
|
2
|
+
Required = "required",
|
|
3
|
+
MaxLength = "maxLength",
|
|
4
|
+
MinLength = "minLength",
|
|
5
|
+
Email = "email",
|
|
6
|
+
Pattern = "pattern",
|
|
7
|
+
MaxValue = "maxValue",
|
|
8
|
+
MinValue = "minValue",
|
|
9
|
+
Callback = "callback"
|
|
10
|
+
}
|
|
11
|
+
export declare enum ValidationOptionsEnum {
|
|
12
|
+
Type = "type",
|
|
13
|
+
Messages = "messages"
|
|
14
|
+
}
|
|
15
|
+
export type ValidationsTypes = ValidationTypesEnum | ValidationOptionsEnum;
|
|
16
|
+
export declare enum ValidationMethodsEnum {
|
|
17
|
+
Submit = "submit",
|
|
18
|
+
Input = "input"
|
|
19
|
+
}
|
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type ValidationsTypes = 'required' | 'maxLength' | 'minLength' | 'email' | 'pattern' | 'messages' | 'maxValue' | 'minValue';
|
|
4
|
-
export type ValidationsType = {
|
|
5
|
-
required?: boolean;
|
|
6
|
-
type?: 'multi' | 'single';
|
|
7
|
-
maxLength?: number;
|
|
8
|
-
minLength?: number;
|
|
9
|
-
maxValue?: number;
|
|
10
|
-
minValue?: number;
|
|
11
|
-
email?: boolean;
|
|
12
|
-
pattern?: RegExp;
|
|
13
|
-
messages?: IMessages;
|
|
14
|
-
};
|
|
15
|
-
export interface FormValidatorOptions {
|
|
16
|
-
method?: OptionMethodType;
|
|
17
|
-
clear?: OptionClearType;
|
|
18
|
-
messages?: any;
|
|
19
|
-
}
|
|
20
|
-
export interface IMessages {
|
|
21
|
-
[name: string]: string;
|
|
22
|
-
}
|
|
23
|
-
export interface IValidations {
|
|
24
|
-
[name: string]: ValidationsType;
|
|
25
|
-
}
|
|
26
|
-
export interface IFields {
|
|
27
|
-
[name: string]: any;
|
|
28
|
-
}
|
|
29
|
-
export declare const emailRegExp: RegExp;
|
|
1
|
+
import { IFields, IFieldsError, IValidations } from './models';
|
|
2
|
+
import { FormValidatorOptions } from './models';
|
|
30
3
|
export declare class MrxFormValidator {
|
|
31
4
|
private _fields;
|
|
32
5
|
private _validations;
|
|
@@ -37,15 +10,15 @@ export declare class MrxFormValidator {
|
|
|
37
10
|
private _method;
|
|
38
11
|
private _invalidMessages;
|
|
39
12
|
constructor(options?: FormValidatorOptions);
|
|
40
|
-
|
|
41
|
-
get errors(): any;
|
|
13
|
+
get errors(): IFieldsError;
|
|
42
14
|
private set fields(value);
|
|
43
15
|
private getNamesUpdatedProperties;
|
|
44
16
|
private validateField;
|
|
45
|
-
private
|
|
17
|
+
private _checkErrors;
|
|
46
18
|
initFields(fields: IFields, validations: IValidations): void;
|
|
47
19
|
initModelChanged(fields: IFields): void;
|
|
48
|
-
|
|
20
|
+
initFieldChanged(fields: IFields, fieldName: string): void;
|
|
49
21
|
isValid(): boolean;
|
|
22
|
+
initModelChangedFromField(field: any, fieldName: string): void;
|
|
50
23
|
isHiddenValid(): boolean;
|
|
51
24
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IMessages, ValidationsType, ValidationTypesEnum } from '../models';
|
|
2
|
+
export declare const callbackValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
message: string | null;
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IMessages, ValidationsType, ValidationTypesEnum } from '../models';
|
|
2
|
+
export declare const emailValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
message: string | null;
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IMessages, ValidationsType, ValidationTypesEnum } from '../models';
|
|
2
|
+
export declare const maxLengthValidation: (value: string | string[], validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
message: string | null;
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IMessages, ValidationsType, ValidationTypesEnum } from '../models';
|
|
2
|
+
export declare const maxValueValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
message: string | null;
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IMessages, ValidationsType, ValidationTypesEnum } from '../models';
|
|
2
|
+
export declare const minLengthValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
message: string | null;
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IMessages, ValidationsType, ValidationTypesEnum } from '../models';
|
|
2
|
+
export declare const minValueValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
message: string | null;
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IMessages, ValidationsType, ValidationTypesEnum } from '../models';
|
|
2
|
+
export declare const patternValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
message: string | null;
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IMessages, ValidationsType, ValidationTypesEnum } from '../models';
|
|
2
|
+
export declare const requiredValidation: (value: string | string[], validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
message: string | null;
|
|
5
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Toast, ToastPackage, ToastrService } from 'ngx-toastr';
|
|
2
|
+
import { ToasterType } from '../../models/toaster.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ToasterComponent extends Toast {
|
|
5
|
+
protected toastrService: ToastrService;
|
|
6
|
+
toastPackage: ToastPackage;
|
|
7
|
+
ToasterType: typeof ToasterType;
|
|
8
|
+
constructor(toastrService: ToastrService, toastPackage: ToastPackage);
|
|
9
|
+
action(event: Event): boolean;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToasterComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToasterComponent, "mrx-toaster", never, {}, {}, never, never, false, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum ToasterType {
|
|
2
|
+
Info = "info",
|
|
3
|
+
Positive = "positive",
|
|
4
|
+
Negative = "negative",
|
|
5
|
+
Attention = "attention"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ToasterPosition {
|
|
8
|
+
TopRight = "toast-top-right",
|
|
9
|
+
BottomRight = "toast-bottom-right",
|
|
10
|
+
TopLeft = "toast-top-left",
|
|
11
|
+
BottomLeft = "toast-bottom-left"
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./components/toaster/toaster.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "ngx-toastr";
|
|
5
|
+
import * as i4 from "../../pipes/safe/safe.module";
|
|
6
|
+
export declare class ToasterServiceModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToasterServiceModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ToasterServiceModule, [typeof i1.ToasterComponent], [typeof i2.CommonModule, typeof i3.ToastrModule, typeof i4.SafeModule], never>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ToasterServiceModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ToastrService } from 'ngx-toastr';
|
|
2
|
+
import { ToasterType } from './models/toaster.model';
|
|
3
|
+
import { IndividualConfig } from 'ngx-toastr/toastr/toastr-config';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ToasterService {
|
|
6
|
+
private _toasterService;
|
|
7
|
+
constructor(_toasterService: ToastrService);
|
|
8
|
+
show(data: {
|
|
9
|
+
title?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
type?: ToasterType;
|
|
12
|
+
}, customConfig?: Partial<IndividualConfig>): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToasterService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ToasterService>;
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myrta-ui",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^17.3.0",
|
|
6
6
|
"@angular/core": "^17.3.0",
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"ngx-image-cropper": "^8.0.0",
|
|
11
11
|
"ngx-file-drop": "^16.0.0",
|
|
12
12
|
"ngx-jodit": "^3.1.2",
|
|
13
|
+
"ngx-toastr": "^19.0.0",
|
|
14
|
+
"ngx-extended-pdf-viewer": "18.1.14",
|
|
13
15
|
"dayjs": "^1.11.11",
|
|
14
16
|
"air-datepicker": "^3.5.3",
|
|
15
17
|
"libphonenumber-js": "^1.10.30",
|
|
@@ -27,6 +29,8 @@
|
|
|
27
29
|
"ngx-image-cropper": "^8.0.0",
|
|
28
30
|
"ngx-file-drop": "^16.0.0",
|
|
29
31
|
"ngx-jodit": "^3.1.2",
|
|
32
|
+
"ngx-toastr": "^19.0.0",
|
|
33
|
+
"ngx-extended-pdf-viewer": "18.1.14",
|
|
30
34
|
"dayjs": "^1.11.11",
|
|
31
35
|
"air-datepicker": "^3.5.3",
|
|
32
36
|
"libphonenumber-js": "^1.10.30",
|
package/public-api.d.ts
CHANGED
|
@@ -125,11 +125,13 @@ export * from './lib/components/form/checkbox/checkbox.enum';
|
|
|
125
125
|
export * from './lib/components/form/checkbox-group/checkbox-group.module';
|
|
126
126
|
export * from './lib/components/form/checkbox-group/checkbox-group.component';
|
|
127
127
|
export * from './lib/components/form/checkbox-group/models/checkbox-group.model';
|
|
128
|
+
export * from './lib/components/form/checkbox-group/helpers/inner-list-to-list.helper';
|
|
128
129
|
export * from './lib/components/form/radio/radio.module';
|
|
129
130
|
export * from './lib/components/form/radio/radio.component';
|
|
130
131
|
export * from './lib/components/form/radio/radio.enum';
|
|
131
132
|
export * from './lib/components/form/radio-group/radio-group.module';
|
|
132
133
|
export * from './lib/components/form/radio-group/radio-group.component';
|
|
134
|
+
export * from './lib/components/form/radio-group/models/radio-group.model';
|
|
133
135
|
export * from './lib/components/form/switch/switch.module';
|
|
134
136
|
export * from './lib/components/form/switch/switch.component';
|
|
135
137
|
export * from './lib/components/form/switch/switch.enum';
|
|
@@ -160,3 +162,5 @@ export * from './lib/helpers/index';
|
|
|
160
162
|
export * from './lib/models/index';
|
|
161
163
|
export * from './lib/components/form/input-tel/input-tel.module';
|
|
162
164
|
export * from './lib/components/form/input-tel/input-tel.component';
|
|
165
|
+
export * from './lib/components/pdf-viewer/pdf-viewer.component';
|
|
166
|
+
export * from './lib/components/pdf-viewer/pdf-viewer.module';
|