@unipin/angular-applet 18.1.0 → 18.2.0
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/forms/country-input/form-country-input.component.mjs +118 -0
- package/esm2022/lib/components/forms/currency-input/form-currency-input.component.mjs +16 -30
- package/esm2022/lib/components/forms/index.mjs +2 -1
- package/esm2022/lib/components/index.mjs +2 -2
- package/esm2022/lib/components/infinite-scroll/directive/infinite-scroll.directive.mjs +43 -0
- package/esm2022/lib/components/infinite-scroll/index.mjs +3 -0
- package/esm2022/lib/components/infinite-scroll/infinite-scroll.component.mjs +39 -0
- package/esm2022/lib/utils/contrast-color-generator/contrast-color-generator.util.mjs +3 -3
- package/esm2022/public-api.mjs +3 -2
- package/fesm2022/unipin-angular-applet.mjs +199 -32
- package/fesm2022/unipin-angular-applet.mjs.map +1 -1
- package/lib/components/forms/country-input/form-country-input.component.d.ts +40 -0
- package/lib/components/forms/currency-input/form-currency-input.component.d.ts +9 -10
- package/lib/components/forms/index.d.ts +1 -0
- package/lib/components/index.d.ts +1 -1
- package/lib/components/infinite-scroll/directive/infinite-scroll.directive.d.ts +15 -0
- package/lib/components/infinite-scroll/index.d.ts +2 -0
- package/lib/components/infinite-scroll/infinite-scroll.component.d.ts +12 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import { Country } from '../../../../graphql/generated';
|
|
5
|
+
import { CountryService } from '../../../services';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class FormCountryInputComponent implements ControlValueAccessor, Validator, OnInit, OnDestroy {
|
|
8
|
+
placeholder: string;
|
|
9
|
+
protected readonly ch: ChangeDetectorRef;
|
|
10
|
+
protected readonly countryService: CountryService;
|
|
11
|
+
clearable: boolean;
|
|
12
|
+
required: boolean;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
onChange: EventEmitter<Country | undefined | null>;
|
|
15
|
+
items: {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
data: Country;
|
|
19
|
+
}[];
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
isTouched: boolean;
|
|
22
|
+
value: any | null;
|
|
23
|
+
errorMsg: string;
|
|
24
|
+
protected formControl: AbstractControl;
|
|
25
|
+
protected changed: (_val: any) => void;
|
|
26
|
+
protected onTouched: () => void;
|
|
27
|
+
protected sub?: Subscription;
|
|
28
|
+
constructor(placeholder: string, ch: ChangeDetectorRef, countryService: CountryService);
|
|
29
|
+
ngOnInit(): void;
|
|
30
|
+
ngOnDestroy(): void;
|
|
31
|
+
registerOnChange(fn: any): void;
|
|
32
|
+
registerOnTouched(fn: any): void;
|
|
33
|
+
writeValue(val: any): void;
|
|
34
|
+
setDisabledState?(d: boolean): void;
|
|
35
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
36
|
+
change(e?: any): void;
|
|
37
|
+
protected setIsLoading(b: boolean): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormCountryInputComponent, [{ attribute: "placeholder"; }, null, null]>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormCountryInputComponent, "up-country-input", never, { "clearable": { "alias": "clearable"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
40
|
+
}
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
|
|
3
3
|
import { Subscription } from 'rxjs';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Currency } from '../../../../graphql/generated';
|
|
5
|
+
import { CurrencyService } from '../../../services';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class FormCurrencyInputComponent implements ControlValueAccessor, Validator, OnInit, OnDestroy {
|
|
8
|
+
placeholder: string;
|
|
8
9
|
numberPlaceholder: string;
|
|
9
10
|
protected readonly ch: ChangeDetectorRef;
|
|
10
|
-
protected readonly countryService: CountryService;
|
|
11
11
|
protected readonly currencyService: CurrencyService;
|
|
12
12
|
clearable: boolean;
|
|
13
13
|
isInputNumber: boolean;
|
|
14
|
-
label: 'Currency' | 'Country';
|
|
15
14
|
numberValue: number | null;
|
|
16
15
|
isNumberDisabled: boolean;
|
|
17
16
|
required: boolean;
|
|
18
17
|
disabled: boolean;
|
|
19
18
|
onChange: EventEmitter<{
|
|
20
|
-
selectedItem?: Currency
|
|
19
|
+
selectedItem?: Currency;
|
|
21
20
|
number: number | null;
|
|
22
21
|
}>;
|
|
23
22
|
items: {
|
|
24
23
|
label: string;
|
|
25
24
|
value: string;
|
|
26
|
-
data: Currency
|
|
25
|
+
data: Currency;
|
|
27
26
|
}[];
|
|
28
27
|
isLoading: boolean;
|
|
29
28
|
isTouched: boolean;
|
|
@@ -34,8 +33,8 @@ export declare class FormCurrencyInputComponent implements ControlValueAccessor,
|
|
|
34
33
|
protected changed: (_val: any) => void;
|
|
35
34
|
protected onTouched: () => void;
|
|
36
35
|
protected sub?: Subscription;
|
|
37
|
-
protected selectedItem?: Currency
|
|
38
|
-
constructor(
|
|
36
|
+
protected selectedItem?: Currency;
|
|
37
|
+
constructor(placeholder: string, numberPlaceholder: string, ch: ChangeDetectorRef, currencyService: CurrencyService);
|
|
39
38
|
ngOnInit(): void;
|
|
40
39
|
ngOnDestroy(): void;
|
|
41
40
|
registerOnChange(fn: any): void;
|
|
@@ -47,6 +46,6 @@ export declare class FormCurrencyInputComponent implements ControlValueAccessor,
|
|
|
47
46
|
numberInput({ value }: any): void;
|
|
48
47
|
limitDecimal({ charCode, preventDefault, target: { value } }: any): void;
|
|
49
48
|
protected setIsLoading(b: boolean): void;
|
|
50
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormCurrencyInputComponent, [{ attribute: "
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormCurrencyInputComponent, "up-currency-input", never, { "clearable": { "alias": "clearable"; "required": false; }; "isInputNumber": { "alias": "isInputNumber"; "required": false; }; "
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormCurrencyInputComponent, [{ attribute: "placeholder"; }, { attribute: "numberPlaceholder"; }, null, null]>;
|
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormCurrencyInputComponent, "up-currency-input", never, { "clearable": { "alias": "clearable"; "required": false; }; "isInputNumber": { "alias": "isInputNumber"; "required": false; }; "numberValue": { "alias": "numberValue"; "required": false; }; "isNumberDisabled": { "alias": "isNumberDisabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
52
51
|
}
|
|
@@ -7,3 +7,4 @@ export { FormSelectComponent } from './select/form-select.component';
|
|
|
7
7
|
export { FormTextareaComponent } from './textarea/form-textarea.component';
|
|
8
8
|
export { FormImagePickerComponent } from './image-picker/form-image-picker.component';
|
|
9
9
|
export { FormCurrencyInputComponent } from './currency-input/form-currency-input.component';
|
|
10
|
+
export { FormCountryInputComponent } from './country-input/form-country-input.component';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ButtonGroupComponent, ButtonGroupConfig, ButtonLoadingComponent } from './buttons';
|
|
2
2
|
export { AppletContainerComponent, ColumnContainerComponent, ColumnHeaderContainerComponent, ListContainerConfig, ListPaginationContainerComponent, ListSnapshotContainerComponent, ModalContainerComponent } from './containers';
|
|
3
3
|
export { FilterComponent, FilterConfig, FilterField, FilterSearchEvent } from './filter';
|
|
4
|
-
export { FormDateComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, FormImagePickerComponent, FormCurrencyInputComponent } from './forms';
|
|
4
|
+
export { FormDateComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, FormImagePickerComponent, FormCurrencyInputComponent, FormCountryInputComponent } from './forms';
|
|
5
5
|
export { GridConfig, GridPaginationComponent, GridService, GridSnapshotComponent } from './grids';
|
|
6
6
|
export { TabContentComponent, TabGroupComponent, TabsComponentModule } from './tabs';
|
|
7
7
|
export { AuditListComponent, AuditDetailComponent } from './audit';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class InfiniteScrollDirective implements OnInit, AfterViewInit, OnDestroy {
|
|
4
|
+
protected readonly element: ElementRef;
|
|
5
|
+
threshold: number;
|
|
6
|
+
rootMargin: string;
|
|
7
|
+
readonly onScrollThreshold: EventEmitter<boolean>;
|
|
8
|
+
protected observer: IntersectionObserver;
|
|
9
|
+
constructor(element: ElementRef);
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
ngAfterViewInit(): void;
|
|
12
|
+
ngOnDestroy(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InfiniteScrollDirective, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<InfiniteScrollDirective, "[upInfiniteScroll]", never, { "threshold": { "alias": "threshold"; "required": false; }; "rootMargin": { "alias": "rootMargin"; "required": false; }; }, { "onScrollThreshold": "onScrollThreshold"; }, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class InfiniteScrollComponent {
|
|
4
|
+
loadingText?: string;
|
|
5
|
+
threshold: number;
|
|
6
|
+
rootMargin: string;
|
|
7
|
+
loadingIcon: 'bubbles' | 'circles' | 'circular' | 'crescent' | 'dots' | 'lines' | 'lines-sharp' | 'lines-sharp-small' | 'lines-small';
|
|
8
|
+
onScrollThreshold: EventEmitter<void>;
|
|
9
|
+
scroll(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InfiniteScrollComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InfiniteScrollComponent, "up-infinite-scroll", never, { "loadingText": { "alias": "loadingText"; "required": false; }; "threshold": { "alias": "threshold"; "required": false; }; "rootMargin": { "alias": "rootMargin"; "required": false; }; "loadingIcon": { "alias": "loadingIcon"; "required": false; }; }, { "onScrollThreshold": "onScrollThreshold"; }, never, never, true, never>;
|
|
12
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { ButtonGroupConfig, ButtonGroupComponent, ButtonLoadingComponent, FormDateComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, FormImagePickerComponent, FormCurrencyInputComponent, FilterConfig, FilterField, FilterSearchEvent, FilterComponent, GridConfig, GridService, GridPaginationComponent, GridSnapshotComponent, AppletContainerComponent, ColumnContainerComponent, ColumnHeaderContainerComponent, ListContainerConfig, ListPaginationContainerComponent, ListSnapshotContainerComponent, ModalContainerComponent, TabGroupComponent, TabContentComponent, TabsComponentModule, AuditListComponent, AuditDetailComponent, ApprovalListComponent, ApprovalDetailComponent } from './lib/components';
|
|
1
|
+
export { ButtonGroupConfig, ButtonGroupComponent, ButtonLoadingComponent, FormDateComponent, FormInputComponent, FormNumberComponent, FormPasswordComponent, FormSearchableSelectComponent, FormSelectComponent, FormTextareaComponent, FormImagePickerComponent, FormCurrencyInputComponent, FormCountryInputComponent, FilterConfig, FilterField, FilterSearchEvent, FilterComponent, GridConfig, GridService, GridPaginationComponent, GridSnapshotComponent, AppletContainerComponent, ColumnContainerComponent, ColumnHeaderContainerComponent, ListContainerConfig, ListPaginationContainerComponent, ListSnapshotContainerComponent, ModalContainerComponent, TabGroupComponent, TabContentComponent, TabsComponentModule, AuditListComponent, AuditDetailComponent, ApprovalListComponent, ApprovalDetailComponent } from './lib/components';
|
|
2
|
+
export { InfiniteScrollDirective, InfiniteScrollComponent } from './lib/components/infinite-scroll';
|
|
2
3
|
export { AuthGuard } from './lib/guards';
|
|
3
4
|
export { HeaderInterceptor, RefreshTokenInterceptor } from './lib/interceptors';
|
|
4
5
|
export { User } from './lib/interfaces';
|