@rlucan/ui 14.2.1
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/README.md +24 -0
- package/esm2020/lib/action-button/action-button.component.mjs +96 -0
- package/esm2020/lib/action-icon/action-icon.component.mjs +37 -0
- package/esm2020/lib/autocomplete/autocomplete.component.mjs +391 -0
- package/esm2020/lib/avatar/avatar.component.mjs +34 -0
- package/esm2020/lib/base/ui-base-layout.component.mjs +22 -0
- package/esm2020/lib/base/ui-base.component.mjs +74 -0
- package/esm2020/lib/button/button.component.mjs +57 -0
- package/esm2020/lib/checkbox/checkbox.component.mjs +39 -0
- package/esm2020/lib/checkbox-group/checkbox-group.component.mjs +91 -0
- package/esm2020/lib/currency/currency.component.mjs +148 -0
- package/esm2020/lib/date/date.component.mjs +64 -0
- package/esm2020/lib/dialog/dialog.component.mjs +37 -0
- package/esm2020/lib/directives/force-visibility/force-visibility.directive.mjs +96 -0
- package/esm2020/lib/elements/burger/burger.component.mjs +21 -0
- package/esm2020/lib/elements/expander/expander.component.mjs +28 -0
- package/esm2020/lib/elements/validation-message/validation-message.component.mjs +47 -0
- package/esm2020/lib/file/file.component.mjs +88 -0
- package/esm2020/lib/file-uploader/ui-file-uploader.component.mjs +394 -0
- package/esm2020/lib/input/input.component.mjs +258 -0
- package/esm2020/lib/radio/radio.component.mjs +21 -0
- package/esm2020/lib/radio-group/radio-group.component.mjs +53 -0
- package/esm2020/lib/select/select.component.mjs +91 -0
- package/esm2020/lib/services/message-box.service.mjs +113 -0
- package/esm2020/lib/services/toast.service.mjs +23 -0
- package/esm2020/lib/services/ui-file.service.mjs +71 -0
- package/esm2020/lib/services/ui-translate.service.mjs +32 -0
- package/esm2020/lib/simple/ui-simple-layout.component.mjs +15 -0
- package/esm2020/lib/simple/ui-simple.component.mjs +154 -0
- package/esm2020/lib/submit-button/submit-button.component.mjs +72 -0
- package/esm2020/lib/table/table.component.mjs +97 -0
- package/esm2020/lib/text-area/text-area.component.mjs +46 -0
- package/esm2020/lib/ui.model.mjs +2 -0
- package/esm2020/lib/ui.module.mjs +255 -0
- package/esm2020/public-api.mjs +33 -0
- package/esm2020/rlucan-ui.mjs +5 -0
- package/fesm2015/rlucan-ui.mjs +2918 -0
- package/fesm2015/rlucan-ui.mjs.map +1 -0
- package/fesm2020/rlucan-ui.mjs +2886 -0
- package/fesm2020/rlucan-ui.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/action-button/action-button.component.d.ts +33 -0
- package/lib/action-icon/action-icon.component.d.ts +15 -0
- package/lib/autocomplete/autocomplete.component.d.ts +57 -0
- package/lib/avatar/avatar.component.d.ts +14 -0
- package/lib/base/ui-base-layout.component.d.ts +8 -0
- package/lib/base/ui-base.component.d.ts +23 -0
- package/lib/button/button.component.d.ts +18 -0
- package/lib/checkbox/checkbox.component.d.ts +15 -0
- package/lib/checkbox-group/checkbox-group.component.d.ts +18 -0
- package/lib/currency/currency.component.d.ts +30 -0
- package/lib/date/date.component.d.ts +23 -0
- package/lib/dialog/dialog.component.d.ts +13 -0
- package/lib/directives/force-visibility/force-visibility.directive.d.ts +20 -0
- package/lib/elements/burger/burger.component.d.ts +9 -0
- package/lib/elements/expander/expander.component.d.ts +10 -0
- package/lib/elements/validation-message/validation-message.component.d.ts +12 -0
- package/lib/file/file.component.d.ts +29 -0
- package/lib/file-uploader/ui-file-uploader.component.d.ts +102 -0
- package/lib/input/input.component.d.ts +29 -0
- package/lib/radio/radio.component.d.ts +8 -0
- package/lib/radio-group/radio-group.component.d.ts +18 -0
- package/lib/select/select.component.d.ts +33 -0
- package/lib/services/message-box.service.d.ts +42 -0
- package/lib/services/toast.service.d.ts +13 -0
- package/lib/services/ui-file.service.d.ts +33 -0
- package/lib/services/ui-translate.service.d.ts +11 -0
- package/lib/simple/ui-simple-layout.component.d.ts +7 -0
- package/lib/simple/ui-simple.component.d.ts +39 -0
- package/lib/submit-button/submit-button.component.d.ts +21 -0
- package/lib/table/table.component.d.ts +36 -0
- package/lib/text-area/text-area.component.d.ts +18 -0
- package/lib/ui.model.d.ts +2 -0
- package/lib/ui.module.d.ts +56 -0
- package/package.json +44 -0
- package/public-api.d.ts +27 -0
- package/scss/ui-defaults.scss +339 -0
- package/ui.scss +911 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EventEmitter, InjectionToken } from '@angular/core';
|
|
2
|
+
import { UploadFile, UploadInput } from 'ngx-uploader';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare type IUiFileServiceMessages = 'cropInvalidFileType' | 'extensionNotAllowed' | 'fileAdded' | 'fileRemoved';
|
|
6
|
+
export interface IUiFileService {
|
|
7
|
+
getAuthHeader: () => {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
uploadUrl: string;
|
|
11
|
+
getMediaSrc: (size: string, data: any, options: any) => string;
|
|
12
|
+
getPreviewUrl: (size: string, any: any) => string;
|
|
13
|
+
addFileImgSrc: string;
|
|
14
|
+
getMimeType: (data: any) => string;
|
|
15
|
+
imageSizes: {
|
|
16
|
+
[key: string]: [number, number];
|
|
17
|
+
};
|
|
18
|
+
concurrentUploads: number;
|
|
19
|
+
useRetinaSrc: boolean;
|
|
20
|
+
fileValidation?: (size: string, file: UploadFile) => Promise<boolean>;
|
|
21
|
+
}
|
|
22
|
+
export declare const UI_FILESERVICE: InjectionToken<IUiFileService>;
|
|
23
|
+
export declare class UiFileService {
|
|
24
|
+
fileServiceConfig: IUiFileService;
|
|
25
|
+
uploadInput: EventEmitter<UploadInput>;
|
|
26
|
+
uploadSubscription: Subject<unknown>;
|
|
27
|
+
filesToRemove: string[];
|
|
28
|
+
controls: Set<any>;
|
|
29
|
+
constructor(fileServiceConfig: IUiFileService);
|
|
30
|
+
upload(): Promise<'uploadSuccess' | 'uploadFailed'>;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiFileService, [{ optional: true; }]>;
|
|
32
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UiFileService>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface IUiTranslateService {
|
|
4
|
+
instant: (code: string, data?: any) => string;
|
|
5
|
+
}
|
|
6
|
+
export declare const UI_TRANSLATESERVICE: InjectionToken<IUiTranslateService>;
|
|
7
|
+
export declare class UiTranslateService implements IUiTranslateService {
|
|
8
|
+
instant(code: string, data: any): string;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTranslateService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UiTranslateService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UiSimpleComponent } from './ui-simple.component';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class UiSimpleLayoutComponent {
|
|
4
|
+
ctx: UiSimpleComponent;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiSimpleLayoutComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiSimpleLayoutComponent, "ui-simple-layout", never, { "ctx": "ctx"; }, {}, never, ["*"], false, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, UntypedFormControl, NgControl, ValidationErrors, Validator, FormControl, ControlContainer } from '@angular/forms';
|
|
3
|
+
import { UiBaseComponent, UiValidators } from '../base/ui-base.component';
|
|
4
|
+
import { Subscription } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare abstract class UiSimpleComponent extends UiBaseComponent implements OnInit, OnChanges, OnDestroy, ControlValueAccessor, Validator {
|
|
7
|
+
ngControl: NgControl;
|
|
8
|
+
protected controlContainer: ControlContainer;
|
|
9
|
+
validators: UiValidators | undefined;
|
|
10
|
+
formControl: any;
|
|
11
|
+
formControlName: any;
|
|
12
|
+
componentFormControl: UntypedFormControl;
|
|
13
|
+
parentFormControl: UntypedFormControl & {
|
|
14
|
+
_componentFormControl: FormControl;
|
|
15
|
+
_markAsTouched: Function;
|
|
16
|
+
_setErrors: Function;
|
|
17
|
+
};
|
|
18
|
+
sub: Subscription;
|
|
19
|
+
constructor(ngControl: NgControl, // <-- obsolete
|
|
20
|
+
controlContainer?: ControlContainer);
|
|
21
|
+
get maxLenRequired(): boolean;
|
|
22
|
+
get isInvalid(): boolean;
|
|
23
|
+
get validationErrors(): ValidationErrors;
|
|
24
|
+
onChange: (val: any) => void;
|
|
25
|
+
onTouched: () => void;
|
|
26
|
+
onValidatorChange: () => void;
|
|
27
|
+
ngOnDestroy(): void;
|
|
28
|
+
ngOnInit(): void;
|
|
29
|
+
applyTemplateValidators(): void;
|
|
30
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
31
|
+
registerOnChange(fn: any): void;
|
|
32
|
+
registerOnTouched(fn: any): void;
|
|
33
|
+
setDisabledState(isDisabled: boolean): void;
|
|
34
|
+
writeValue(obj: any): void;
|
|
35
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
36
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiSimpleComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiSimpleComponent, "ui-abstract-simple-component", never, { "validators": "validators"; "formControl": "formControl"; "formControlName": "formControlName"; }, {}, never, never, false, never>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ControlContainer, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SubmitButtonComponent implements OnInit {
|
|
6
|
+
dialogRef: MatDialogRef<any>;
|
|
7
|
+
protected controlContainer: ControlContainer;
|
|
8
|
+
busy: boolean;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
formGroups: UntypedFormGroup | UntypedFormGroup[];
|
|
11
|
+
label: string;
|
|
12
|
+
submit: (() => void) | undefined;
|
|
13
|
+
formInvalid: boolean | undefined;
|
|
14
|
+
prependCloseButton: boolean;
|
|
15
|
+
constructor(dialogRef: MatDialogRef<any>, controlContainer: ControlContainer);
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
get formsValid(): boolean;
|
|
18
|
+
doSubmit(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubmitButtonComponent, [null, { optional: true; host: true; skipSelf: true; }]>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubmitButtonComponent, "ui-submit-button", never, { "busy": "busy"; "disabled": "disabled"; "formGroups": "formGroups"; "label": "label"; "submit": "submit"; "formInvalid": "formInvalid"; "prependCloseButton": "prependCloseButton"; }, {}, never, never, false, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AfterViewInit, OnInit } from '@angular/core';
|
|
2
|
+
import { MatSort, SortDirection } from '@angular/material/sort';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface TableColumn {
|
|
6
|
+
name: string;
|
|
7
|
+
sortable?: boolean | ((row: any, direction?: SortDirection) => number | string);
|
|
8
|
+
label?: string;
|
|
9
|
+
colSpan?: (row: any) => number;
|
|
10
|
+
formatter?: (row: any) => string;
|
|
11
|
+
cellClass?: (row: any) => string;
|
|
12
|
+
}
|
|
13
|
+
export interface TableOptions {
|
|
14
|
+
sticky?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class TableComponent implements OnInit, AfterViewInit {
|
|
17
|
+
private domSanitizer;
|
|
18
|
+
columns: TableColumn[];
|
|
19
|
+
dataSource: any;
|
|
20
|
+
options: TableOptions | undefined;
|
|
21
|
+
rowTemplates: any;
|
|
22
|
+
headerTemplates: any;
|
|
23
|
+
stateStoreKey: string;
|
|
24
|
+
rowAction: (row: any) => void;
|
|
25
|
+
matSortActive: any;
|
|
26
|
+
matSortDirection: any;
|
|
27
|
+
matSort: MatSort | undefined;
|
|
28
|
+
get columnList(): string[];
|
|
29
|
+
constructor(/*private persistService: PersistService, */ domSanitizer: DomSanitizer);
|
|
30
|
+
ngOnInit(): void;
|
|
31
|
+
ngAfterViewInit(): void;
|
|
32
|
+
display(row: any, col: TableColumn): any;
|
|
33
|
+
rowClicked(row: any): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "ui-table", never, { "columns": "columns"; "dataSource": "dataSource"; "options": "options"; "rowTemplates": "rowTemplates"; "headerTemplates": "headerTemplates"; "stateStoreKey": "stateStoreKey"; "rowAction": "rowAction"; "matSortActive": "matSortActive"; "matSortDirection": "matSortDirection"; }, {}, never, never, false, never>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { NgControl } from '@angular/forms';
|
|
3
|
+
import { UiSimpleComponent } from '../simple/ui-simple.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class TextAreaComponent extends UiSimpleComponent {
|
|
6
|
+
ngControl: NgControl;
|
|
7
|
+
rows: number;
|
|
8
|
+
autoResize: boolean;
|
|
9
|
+
lastClientHeight: number;
|
|
10
|
+
textarea: ElementRef;
|
|
11
|
+
focusChanged: EventEmitter<boolean>;
|
|
12
|
+
constructor(ngControl: NgControl);
|
|
13
|
+
focus(): void;
|
|
14
|
+
setDisabledState(isDisabled: boolean): void;
|
|
15
|
+
onFocus(focus: boolean): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextAreaComponent, [{ optional: true; self: true; }]>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextAreaComponent, "ui-text-area", never, { "rows": "rows"; "autoResize": "autoResize"; }, { "focusChanged": "focusChanged"; }, never, never, false, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./button/button.component";
|
|
3
|
+
import * as i2 from "./input/input.component";
|
|
4
|
+
import * as i3 from "./select/select.component";
|
|
5
|
+
import * as i4 from "./file/file.component";
|
|
6
|
+
import * as i5 from "./file-uploader/ui-file-uploader.component";
|
|
7
|
+
import * as i6 from "./elements/expander/expander.component";
|
|
8
|
+
import * as i7 from "./directives/force-visibility/force-visibility.directive";
|
|
9
|
+
import * as i8 from "./services/message-box.service";
|
|
10
|
+
import * as i9 from "./dialog/dialog.component";
|
|
11
|
+
import * as i10 from "./currency/currency.component";
|
|
12
|
+
import * as i11 from "./checkbox/checkbox.component";
|
|
13
|
+
import * as i12 from "./avatar/avatar.component";
|
|
14
|
+
import * as i13 from "./submit-button/submit-button.component";
|
|
15
|
+
import * as i14 from "./text-area/text-area.component";
|
|
16
|
+
import * as i15 from "./date/date.component";
|
|
17
|
+
import * as i16 from "./table/table.component";
|
|
18
|
+
import * as i17 from "./elements/burger/burger.component";
|
|
19
|
+
import * as i18 from "./autocomplete/autocomplete.component";
|
|
20
|
+
import * as i19 from "./action-button/action-button.component";
|
|
21
|
+
import * as i20 from "./base/ui-base-layout.component";
|
|
22
|
+
import * as i21 from "./simple/ui-simple-layout.component";
|
|
23
|
+
import * as i22 from "./elements/validation-message/validation-message.component";
|
|
24
|
+
import * as i23 from "./radio/radio.component";
|
|
25
|
+
import * as i24 from "./checkbox-group/checkbox-group.component";
|
|
26
|
+
import * as i25 from "./radio-group/radio-group.component";
|
|
27
|
+
import * as i26 from "./action-icon/action-icon.component";
|
|
28
|
+
import * as i27 from "@angular/common";
|
|
29
|
+
import * as i28 from "@angular/material/button";
|
|
30
|
+
import * as i29 from "@angular/material/icon";
|
|
31
|
+
import * as i30 from "@angular/material/dialog";
|
|
32
|
+
import * as i31 from "@angular/material/checkbox";
|
|
33
|
+
import * as i32 from "@angular/material/datepicker";
|
|
34
|
+
import * as i33 from "@angular/material-moment-adapter";
|
|
35
|
+
import * as i34 from "@angular/cdk/drag-drop";
|
|
36
|
+
import * as i35 from "@angular/forms";
|
|
37
|
+
import * as i36 from "@angular/material/tooltip";
|
|
38
|
+
import * as i37 from "@angular/material/progress-bar";
|
|
39
|
+
import * as i38 from "@angular/material/table";
|
|
40
|
+
import * as i39 from "@angular/material/sort";
|
|
41
|
+
import * as i40 from "@angular/material/select";
|
|
42
|
+
import * as i41 from "ngx-uploader";
|
|
43
|
+
import * as i42 from "@angular/material/progress-spinner";
|
|
44
|
+
import * as i43 from "@angular/material/menu";
|
|
45
|
+
import * as i44 from "ngx-image-cropper";
|
|
46
|
+
import * as i45 from "@angular/router";
|
|
47
|
+
import * as i46 from "@angular/cdk/overlay";
|
|
48
|
+
import * as i47 from "@angular/material/core";
|
|
49
|
+
import * as i48 from "@angular/material/input";
|
|
50
|
+
import * as i49 from "@angular/material/radio";
|
|
51
|
+
import * as i50 from "@angular/material/snack-bar";
|
|
52
|
+
export declare class UiModule {
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiModule, never>;
|
|
54
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UiModule, [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.FileComponent, typeof i5.UiFileUploaderComponent, typeof i6.ExpanderComponent, typeof i7.ForceVisibilityDirective, typeof i8.MessageBoxModalComponent, typeof i9.DialogComponent, typeof i10.CurrencyComponent, typeof i11.CheckboxComponent, typeof i12.AvatarComponent, typeof i13.SubmitButtonComponent, typeof i14.TextAreaComponent, typeof i15.DateComponent, typeof i16.TableComponent, typeof i17.BurgerComponent, typeof i18.AutocompleteComponent, typeof i19.ActionButtonComponent, typeof i20.UiBaseLayoutComponent, typeof i21.UiSimpleLayoutComponent, typeof i22.ValidationMessageComponent, typeof i23.RadioComponent, typeof i24.CheckboxGroupComponent, typeof i25.RadioGroupComponent, typeof i26.ActionIconComponent], [typeof i27.CommonModule, typeof i28.MatButtonModule, typeof i29.MatIconModule, typeof i30.MatDialogModule, typeof i31.MatCheckboxModule, typeof i32.MatDatepickerModule, typeof i33.MatMomentDateModule, typeof i34.DragDropModule, typeof i35.ReactiveFormsModule, typeof i35.FormsModule, typeof i36.MatTooltipModule, typeof i37.MatProgressBarModule, typeof i38.MatTableModule, typeof i39.MatSortModule, typeof i40.MatSelectModule, typeof i41.NgxUploaderModule, typeof i42.MatProgressSpinnerModule, typeof i43.MatMenuModule, typeof i44.ImageCropperModule, typeof i45.RouterModule, typeof i46.OverlayModule, typeof i47.MatRippleModule, typeof i48.MatInputModule, typeof i49.MatRadioModule, typeof i50.MatSnackBarModule], [typeof i19.ActionButtonComponent, typeof i26.ActionIconComponent, typeof i18.AutocompleteComponent, typeof i12.AvatarComponent, typeof i17.BurgerComponent, typeof i1.ButtonComponent, typeof i11.CheckboxComponent, typeof i24.CheckboxGroupComponent, typeof i10.CurrencyComponent, typeof i15.DateComponent, typeof i9.DialogComponent, typeof i6.ExpanderComponent, typeof i4.FileComponent, typeof i7.ForceVisibilityDirective, typeof i2.InputComponent, typeof i8.MessageBoxModalComponent, typeof i23.RadioComponent, typeof i25.RadioGroupComponent, typeof i3.SelectComponent, typeof i13.SubmitButtonComponent, typeof i16.TableComponent, typeof i14.TextAreaComponent, typeof i5.UiFileUploaderComponent]>;
|
|
55
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<UiModule>;
|
|
56
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rlucan/ui",
|
|
3
|
+
"version": "14.2.1",
|
|
4
|
+
"description": "My UI Components",
|
|
5
|
+
"author": "rlucan@gmail.com",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"ngx-image-cropper": "^6.2.2",
|
|
8
|
+
"@angular/forms": "^14.2.1",
|
|
9
|
+
"@angular/platform-browser": "^14.2.1",
|
|
10
|
+
"@angular/common": "^14.2.1",
|
|
11
|
+
"@angular/core": "^14.2.1",
|
|
12
|
+
"@angular/material": "^14.2.1",
|
|
13
|
+
"@angular/material-moment-adapter": "^14.2.1",
|
|
14
|
+
"@angular/animations": "~14.2.1",
|
|
15
|
+
"@angular/cdk": "^14.2.1",
|
|
16
|
+
"rxjs": "~7.5.6",
|
|
17
|
+
"zone.js": "~0.11.8",
|
|
18
|
+
"ngx-uploader": "^11.0.0",
|
|
19
|
+
"moment": "^2.29.4"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"tslib": "^2.4.0"
|
|
23
|
+
},
|
|
24
|
+
"module": "fesm2015/rlucan-ui.mjs",
|
|
25
|
+
"es2020": "fesm2020/rlucan-ui.mjs",
|
|
26
|
+
"esm2020": "esm2020/rlucan-ui.mjs",
|
|
27
|
+
"fesm2020": "fesm2020/rlucan-ui.mjs",
|
|
28
|
+
"fesm2015": "fesm2015/rlucan-ui.mjs",
|
|
29
|
+
"typings": "index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
"./package.json": {
|
|
32
|
+
"default": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./index.d.ts",
|
|
36
|
+
"esm2020": "./esm2020/rlucan-ui.mjs",
|
|
37
|
+
"es2020": "./fesm2020/rlucan-ui.mjs",
|
|
38
|
+
"es2015": "./fesm2015/rlucan-ui.mjs",
|
|
39
|
+
"node": "./fesm2015/rlucan-ui.mjs",
|
|
40
|
+
"default": "./fesm2020/rlucan-ui.mjs"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"sideEffects": false
|
|
44
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from './lib/ui.module';
|
|
2
|
+
export * from './lib/action-button/action-button.component';
|
|
3
|
+
export * from './lib/action-icon/action-icon.component';
|
|
4
|
+
export * from './lib/autocomplete/autocomplete.component';
|
|
5
|
+
export * from './lib/avatar/avatar.component';
|
|
6
|
+
export * from './lib/button/button.component';
|
|
7
|
+
export * from './lib/checkbox/checkbox.component';
|
|
8
|
+
export * from './lib/checkbox-group/checkbox-group.component';
|
|
9
|
+
export * from './lib/currency/currency.component';
|
|
10
|
+
export * from './lib/date/date.component';
|
|
11
|
+
export * from './lib/dialog/dialog.component';
|
|
12
|
+
export * from './lib/file/file.component';
|
|
13
|
+
export * from './lib/file-uploader/ui-file-uploader.component';
|
|
14
|
+
export * from './lib/input/input.component';
|
|
15
|
+
export * from './lib/radio/radio.component';
|
|
16
|
+
export * from './lib/radio-group/radio-group.component';
|
|
17
|
+
export * from './lib/select/select.component';
|
|
18
|
+
export * from './lib/submit-button/submit-button.component';
|
|
19
|
+
export * from './lib/table/table.component';
|
|
20
|
+
export * from './lib/text-area/text-area.component';
|
|
21
|
+
export * from './lib/directives/force-visibility/force-visibility.directive';
|
|
22
|
+
export * from './lib/elements/burger/burger.component';
|
|
23
|
+
export * from './lib/elements/expander/expander.component';
|
|
24
|
+
export * from './lib/services/message-box.service';
|
|
25
|
+
export * from './lib/services/toast.service';
|
|
26
|
+
export * from './lib/services/ui-file.service';
|
|
27
|
+
export * from './lib/services/ui-translate.service';
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '@angular/material' as mat;
|
|
3
|
+
|
|
4
|
+
@function uiDefaultLightColors($matTheme) {
|
|
5
|
+
// @debug $matTheme;
|
|
6
|
+
$primaryPalette: map-get($matTheme, primary);
|
|
7
|
+
$primaryColor: mat.get-color-from-palette($primaryPalette);
|
|
8
|
+
$primaryContrastColor: mat.get-color-from-palette($primaryPalette, '500-contrast');
|
|
9
|
+
|
|
10
|
+
$accentPalette: map-get($matTheme, accent);
|
|
11
|
+
$accentColor: mat.get-color-from-palette($accentPalette);
|
|
12
|
+
$warnPalette: map-get($matTheme, warn);
|
|
13
|
+
$warnColor: mat.get-color-from-palette($warnPalette);
|
|
14
|
+
$warnContrastColor: mat.get-color-from-palette($warnPalette, '500-contrast');
|
|
15
|
+
|
|
16
|
+
$baseTextColor: mat.get-color-from-palette(mat.$light-theme-foreground-palette, text);
|
|
17
|
+
$baseBackgroundColor: mat.get-color-from-palette(mat.$light-theme-background-palette, background);
|
|
18
|
+
|
|
19
|
+
@return (
|
|
20
|
+
/********************************** action-icon **************************************/
|
|
21
|
+
actionicon: (
|
|
22
|
+
primary: (
|
|
23
|
+
color: $primaryColor,
|
|
24
|
+
hover: (
|
|
25
|
+
color: mat.get-color-from-palette($primaryPalette, 800),
|
|
26
|
+
),
|
|
27
|
+
disabled: (
|
|
28
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, disabled-text)
|
|
29
|
+
)
|
|
30
|
+
),
|
|
31
|
+
accent: (
|
|
32
|
+
color: $accentColor,
|
|
33
|
+
hover: (
|
|
34
|
+
color: mat.get-color-from-palette($accentPalette, 800),
|
|
35
|
+
),
|
|
36
|
+
disabled: (
|
|
37
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, disabled-text)
|
|
38
|
+
)
|
|
39
|
+
),
|
|
40
|
+
warn: (
|
|
41
|
+
color: mat.get-color-from-palette($warnPalette, 300),
|
|
42
|
+
hover: (
|
|
43
|
+
color: mat.get-color-from-palette($warnPalette, 500),
|
|
44
|
+
),
|
|
45
|
+
disabled: (
|
|
46
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, disabled-text)
|
|
47
|
+
)
|
|
48
|
+
)
|
|
49
|
+
),
|
|
50
|
+
|
|
51
|
+
/************************************* autocomplete ******************************************/
|
|
52
|
+
autocomplete: (
|
|
53
|
+
background-color: $baseBackgroundColor, // darken(mat.get-color-from-palette(mat.$light-theme-background-palette, card), 5),
|
|
54
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, base),
|
|
55
|
+
options: (
|
|
56
|
+
hover: (
|
|
57
|
+
background-color: mat.get-color-from-palette(mat.$light-theme-background-palette, selected-button),
|
|
58
|
+
mat-icon: (
|
|
59
|
+
color: $primaryColor
|
|
60
|
+
)
|
|
61
|
+
),
|
|
62
|
+
selected: (
|
|
63
|
+
background-color: mat.get-color-from-palette($primaryPalette, 300),
|
|
64
|
+
color: mat.get-contrast-color-from-palette($primaryPalette, 300),
|
|
65
|
+
//unselectable: (
|
|
66
|
+
// color: mat.get-color-from-palette($primaryPalette, 100)
|
|
67
|
+
//)
|
|
68
|
+
),
|
|
69
|
+
//unselectable: (
|
|
70
|
+
// color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, disabled-text)
|
|
71
|
+
//)
|
|
72
|
+
)
|
|
73
|
+
),
|
|
74
|
+
|
|
75
|
+
/**************************************** button ******************************************/
|
|
76
|
+
button: (
|
|
77
|
+
font-weight: 700,
|
|
78
|
+
basic: (
|
|
79
|
+
primary: (
|
|
80
|
+
hover: (
|
|
81
|
+
background-color: rgba(mat.get-color-from-palette(mat.$light-theme-foreground-palette, base), 0.1)
|
|
82
|
+
),
|
|
83
|
+
color: $primaryColor,
|
|
84
|
+
background-color: transparent
|
|
85
|
+
),
|
|
86
|
+
accent: (
|
|
87
|
+
hover: (
|
|
88
|
+
background-color: rgba(mat.get-color-from-palette(mat.$light-theme-foreground-palette, base), 0.1)
|
|
89
|
+
),
|
|
90
|
+
color: $accentColor,
|
|
91
|
+
background-color: transparent
|
|
92
|
+
),
|
|
93
|
+
warn: (
|
|
94
|
+
hover: (
|
|
95
|
+
background-color: rgba(mat.get-color-from-palette(mat.$light-theme-foreground-palette, base), 0.1)
|
|
96
|
+
),
|
|
97
|
+
color: $warnColor,
|
|
98
|
+
background-color: transparent
|
|
99
|
+
)
|
|
100
|
+
),
|
|
101
|
+
flat: (
|
|
102
|
+
primary: (
|
|
103
|
+
hover: (
|
|
104
|
+
background-color: mat.get-color-from-palette($primaryPalette, 800)
|
|
105
|
+
),
|
|
106
|
+
color: mat.get-contrast-color-from-palette($primaryPalette, 500),
|
|
107
|
+
background-color: mat.get-color-from-palette($primaryPalette)
|
|
108
|
+
),
|
|
109
|
+
accent: (
|
|
110
|
+
hover: (
|
|
111
|
+
background-color: mat.get-color-from-palette($accentPalette, 800)
|
|
112
|
+
),
|
|
113
|
+
color: mat.get-contrast-color-from-palette($accentPalette, 500),
|
|
114
|
+
background-color: mat.get-color-from-palette($accentPalette)
|
|
115
|
+
),
|
|
116
|
+
warn: (
|
|
117
|
+
hover: (
|
|
118
|
+
background-color: mat.get-color-from-palette($warnPalette, 800)
|
|
119
|
+
),
|
|
120
|
+
color: mat.get-contrast-color-from-palette($warnPalette, 500),
|
|
121
|
+
background-color: mat.get-color-from-palette($warnPalette)
|
|
122
|
+
)
|
|
123
|
+
),
|
|
124
|
+
stroked: (
|
|
125
|
+
primary: (
|
|
126
|
+
hover: (
|
|
127
|
+
background-color: rgba(mat.get-color-from-palette(mat.$light-theme-foreground-palette, base), 0.1)
|
|
128
|
+
),
|
|
129
|
+
color: $primaryColor,
|
|
130
|
+
background-color: transparent,
|
|
131
|
+
border-color: $primaryColor
|
|
132
|
+
),
|
|
133
|
+
accent: (
|
|
134
|
+
hover: (
|
|
135
|
+
background-color: rgba(mat.get-color-from-palette(mat.$light-theme-foreground-palette, base), 0.1)
|
|
136
|
+
),
|
|
137
|
+
color: $accentColor,
|
|
138
|
+
background-color: transparent,
|
|
139
|
+
border-color: $accentColor
|
|
140
|
+
),
|
|
141
|
+
warn: (
|
|
142
|
+
hover: (
|
|
143
|
+
background-color: rgba(mat.get-color-from-palette(mat.$light-theme-foreground-palette, base), 0.1)
|
|
144
|
+
),
|
|
145
|
+
color: $warnColor,
|
|
146
|
+
background-color: transparent,
|
|
147
|
+
border-color: $warnColor
|
|
148
|
+
)
|
|
149
|
+
)
|
|
150
|
+
),
|
|
151
|
+
|
|
152
|
+
/************************************* checkbox & radio ******************************************/
|
|
153
|
+
checkbox: (
|
|
154
|
+
primary: (
|
|
155
|
+
label: (
|
|
156
|
+
color: $baseTextColor,
|
|
157
|
+
checked-color: $primaryColor
|
|
158
|
+
),
|
|
159
|
+
icon: (
|
|
160
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, icon),
|
|
161
|
+
checked-color: $primaryColor
|
|
162
|
+
),
|
|
163
|
+
check: (
|
|
164
|
+
color: $primaryContrastColor
|
|
165
|
+
)
|
|
166
|
+
),
|
|
167
|
+
accent: (
|
|
168
|
+
label: (
|
|
169
|
+
color: $baseTextColor,
|
|
170
|
+
checked-color: $accentColor
|
|
171
|
+
),
|
|
172
|
+
icon: (
|
|
173
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, icon),
|
|
174
|
+
checked-color: $accentColor
|
|
175
|
+
)
|
|
176
|
+
),
|
|
177
|
+
warn: (
|
|
178
|
+
label: (
|
|
179
|
+
color: $baseTextColor,
|
|
180
|
+
checked-color: $warnColor
|
|
181
|
+
),
|
|
182
|
+
icon: (
|
|
183
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, icon),
|
|
184
|
+
checked-color: $warnColor
|
|
185
|
+
)
|
|
186
|
+
)
|
|
187
|
+
),
|
|
188
|
+
|
|
189
|
+
/******************************************** dialog ***********************************************/
|
|
190
|
+
dialog: (
|
|
191
|
+
title: (
|
|
192
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, base)
|
|
193
|
+
),
|
|
194
|
+
backdrop: (
|
|
195
|
+
background-color: rgba(0, 0, 0, 0.32)
|
|
196
|
+
),
|
|
197
|
+
background-color: mat.get-color-from-palette(mat.$light-theme-background-palette, dialog),
|
|
198
|
+
divider: (
|
|
199
|
+
border-color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, divider)
|
|
200
|
+
),
|
|
201
|
+
message: (
|
|
202
|
+
error: (
|
|
203
|
+
color: $warnContrastColor,
|
|
204
|
+
background-color: $warnColor
|
|
205
|
+
)
|
|
206
|
+
)
|
|
207
|
+
),
|
|
208
|
+
|
|
209
|
+
expander: (
|
|
210
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, base)
|
|
211
|
+
),
|
|
212
|
+
|
|
213
|
+
/**************************************** file uploader ******************************************/
|
|
214
|
+
file-uploader: (
|
|
215
|
+
menu: (
|
|
216
|
+
color: $primaryColor,
|
|
217
|
+
background-color: white,
|
|
218
|
+
trigger: (
|
|
219
|
+
color: black,
|
|
220
|
+
background-color: white
|
|
221
|
+
),
|
|
222
|
+
item: (
|
|
223
|
+
hover: (
|
|
224
|
+
background-color: darken(white, 10)
|
|
225
|
+
)
|
|
226
|
+
)
|
|
227
|
+
),
|
|
228
|
+
preview: (
|
|
229
|
+
background-color: white,
|
|
230
|
+
border-color: darken(white, 10),
|
|
231
|
+
icon: (
|
|
232
|
+
color: $primaryColor,
|
|
233
|
+
hover: (
|
|
234
|
+
background-color: darken(white, 10)
|
|
235
|
+
)
|
|
236
|
+
)
|
|
237
|
+
)
|
|
238
|
+
),
|
|
239
|
+
|
|
240
|
+
/***************************************** input ******************************************/
|
|
241
|
+
input: (
|
|
242
|
+
background-color: $baseBackgroundColor,
|
|
243
|
+
border-color: mat.get-color-from-palette($primaryPalette, 100),
|
|
244
|
+
color: $baseTextColor,
|
|
245
|
+
label: (
|
|
246
|
+
color: $primaryColor,
|
|
247
|
+
font-weight: normal,
|
|
248
|
+
required: (
|
|
249
|
+
color: $warnColor
|
|
250
|
+
),
|
|
251
|
+
counter: (
|
|
252
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, disabled)
|
|
253
|
+
)
|
|
254
|
+
),
|
|
255
|
+
disabled: (
|
|
256
|
+
background-color: $baseBackgroundColor,
|
|
257
|
+
color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, disabled-text)
|
|
258
|
+
),
|
|
259
|
+
focus: (
|
|
260
|
+
border-color: $primaryColor
|
|
261
|
+
),
|
|
262
|
+
invalid: (
|
|
263
|
+
color: $warnColor,
|
|
264
|
+
background-color: rgba($warnColor, 0.15),
|
|
265
|
+
label: (
|
|
266
|
+
color: $warnColor
|
|
267
|
+
),
|
|
268
|
+
hint: (
|
|
269
|
+
color: $warnColor
|
|
270
|
+
),
|
|
271
|
+
placeholder: (
|
|
272
|
+
color: rgba($warnColor, 0.35)
|
|
273
|
+
),
|
|
274
|
+
border-color: $warnColor
|
|
275
|
+
),
|
|
276
|
+
placeholder: (
|
|
277
|
+
color: rgba($baseTextColor, 0.60)
|
|
278
|
+
),
|
|
279
|
+
prefix-suffix: (
|
|
280
|
+
color: $primaryColor,
|
|
281
|
+
hover: (
|
|
282
|
+
color: mat.get-color-from-palette($primaryPalette, 800),
|
|
283
|
+
)
|
|
284
|
+
),
|
|
285
|
+
),
|
|
286
|
+
|
|
287
|
+
/***************************************** input ******************************************/
|
|
288
|
+
select: (
|
|
289
|
+
option: (
|
|
290
|
+
color: $baseTextColor
|
|
291
|
+
)
|
|
292
|
+
),
|
|
293
|
+
|
|
294
|
+
table: (
|
|
295
|
+
row: (
|
|
296
|
+
cell: (
|
|
297
|
+
color: $baseTextColor
|
|
298
|
+
)
|
|
299
|
+
),
|
|
300
|
+
header: (
|
|
301
|
+
cell: (
|
|
302
|
+
color: $primaryColor
|
|
303
|
+
)
|
|
304
|
+
)
|
|
305
|
+
),
|
|
306
|
+
|
|
307
|
+
/**************************************** toast ******************************************/
|
|
308
|
+
toast: (
|
|
309
|
+
// 'info' | 'success' | 'warning' | 'fail'
|
|
310
|
+
info: (
|
|
311
|
+
background-color: #33b5e5,
|
|
312
|
+
color: white
|
|
313
|
+
),
|
|
314
|
+
success: (
|
|
315
|
+
background-color: #4caf50,
|
|
316
|
+
color: white
|
|
317
|
+
),
|
|
318
|
+
warning: (
|
|
319
|
+
background-color: #e59e10,
|
|
320
|
+
color: white
|
|
321
|
+
),
|
|
322
|
+
fail: (
|
|
323
|
+
background-color: #ff4444,
|
|
324
|
+
color: white
|
|
325
|
+
),
|
|
326
|
+
)
|
|
327
|
+
)
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
@function uiDefaultDarkColors($matTheme) {
|
|
332
|
+
@return uiDefaultLightColors($matTheme);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
$uiDefaultGeometry: (
|
|
336
|
+
control-radius: 0.3em,
|
|
337
|
+
control-padding: 0.5em 0.7em,
|
|
338
|
+
input-border-width: 1px
|
|
339
|
+
);
|