@tolle_/tolle-ui 0.0.28-beta → 0.0.30-beta
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/calendar.component.mjs +275 -81
- package/esm2022/lib/date-picker.component.mjs +126 -29
- package/esm2022/lib/date-range-picker.component.mjs +76 -24
- package/esm2022/lib/multi-select.component.mjs +220 -26
- package/esm2022/lib/pagination.component.mjs +1 -1
- package/esm2022/lib/segment.component.mjs +192 -0
- package/esm2022/lib/select-item.component.mjs +98 -14
- package/esm2022/lib/select.component.mjs +29 -36
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/tolle-ui.mjs +1002 -203
- package/fesm2022/tolle-ui.mjs.map +1 -1
- package/lib/button.component.d.ts +2 -2
- package/lib/calendar.component.d.ts +23 -2
- package/lib/date-picker.component.d.ts +16 -2
- package/lib/date-range-picker.component.d.ts +3 -1
- package/lib/multi-select.component.d.ts +13 -1
- package/lib/segment.component.d.ts +38 -0
- package/lib/select-item.component.d.ts +4 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" |
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon" | "icon-lg" | null | undefined;
|
|
6
6
|
busy?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export type ButtonProps = VariantProps<typeof buttonVariants>;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnInit, EventEmitter } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { cn } from './utils/cn';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
export type CalendarMode = 'date' | 'month' | 'year';
|
|
5
6
|
export declare class CalendarComponent implements OnInit, ControlValueAccessor {
|
|
6
7
|
class: string;
|
|
8
|
+
mode: CalendarMode;
|
|
7
9
|
disablePastDates: boolean;
|
|
10
|
+
showQuickActions: boolean;
|
|
11
|
+
minDate?: Date;
|
|
12
|
+
maxDate?: Date;
|
|
13
|
+
formatMonthFn?: (date: Date) => string;
|
|
14
|
+
formatYearFn?: (date: Date) => string;
|
|
15
|
+
formatDateFn?: (date: Date) => string;
|
|
16
|
+
dateSelect: EventEmitter<Date | null>;
|
|
8
17
|
currentView: 'date' | 'month' | 'year';
|
|
9
18
|
viewDate: Date;
|
|
10
19
|
selectedDate: Date | null;
|
|
@@ -12,24 +21,36 @@ export declare class CalendarComponent implements OnInit, ControlValueAccessor {
|
|
|
12
21
|
daysInMonth: Date[];
|
|
13
22
|
months: string[];
|
|
14
23
|
years: number[];
|
|
24
|
+
yearRangeStart: number;
|
|
15
25
|
navBtnClass: string;
|
|
26
|
+
quickActionBtnClass: string;
|
|
16
27
|
onTouched: () => void;
|
|
17
28
|
onChange: (value: any) => void;
|
|
18
29
|
protected cn: typeof cn;
|
|
30
|
+
constructor();
|
|
19
31
|
ngOnInit(): void;
|
|
32
|
+
formatMonthYear(date: Date, type: 'month' | 'year'): string;
|
|
33
|
+
formatDate(date: Date, type: 'day' | 'month' | 'year'): string;
|
|
20
34
|
generateDays(): void;
|
|
21
35
|
generateYears(): void;
|
|
22
36
|
setView(view: 'date' | 'month' | 'year'): void;
|
|
23
37
|
prev(): void;
|
|
24
38
|
next(): void;
|
|
39
|
+
prevYears(): void;
|
|
40
|
+
nextYears(): void;
|
|
25
41
|
selectDate(date: Date): void;
|
|
26
42
|
selectMonth(monthIndex: number): void;
|
|
27
43
|
selectYear(year: number): void;
|
|
28
44
|
getDayClass(date: Date): string;
|
|
45
|
+
getMonthClass(monthIndex: number): string;
|
|
46
|
+
getYearClass(year: number): string;
|
|
29
47
|
isDateDisabled(date: Date): boolean;
|
|
48
|
+
isTodayDisabled(): boolean;
|
|
49
|
+
selectToday(): void;
|
|
50
|
+
clear(): void;
|
|
30
51
|
writeValue(obj: any): void;
|
|
31
52
|
registerOnChange(fn: any): void;
|
|
32
53
|
registerOnTouched(fn: any): void;
|
|
33
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "tolle-calendar", never, { "class": { "alias": "class"; "required": false; }; "disablePastDates": { "alias": "disablePastDates"; "required": false; }; }, {}, never, never, true, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "tolle-calendar", never, { "class": { "alias": "class"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "disablePastDates": { "alias": "disablePastDates"; "required": false; }; "showQuickActions": { "alias": "showQuickActions"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "formatMonthFn": { "alias": "formatMonthFn"; "required": false; }; "formatYearFn": { "alias": "formatYearFn"; "required": false; }; "formatDateFn": { "alias": "formatDateFn"; "required": false; }; }, { "dateSelect": "dateSelect"; }, never, never, true, never>;
|
|
35
56
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ElementRef, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { cn } from './utils/cn';
|
|
4
|
+
import { CalendarMode } from './calendar.component';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class DatePickerComponent implements ControlValueAccessor {
|
|
6
7
|
private cdr;
|
|
@@ -8,6 +9,14 @@ export declare class DatePickerComponent implements ControlValueAccessor {
|
|
|
8
9
|
disabled: boolean;
|
|
9
10
|
class: string;
|
|
10
11
|
disablePastDates: boolean;
|
|
12
|
+
showClear: boolean;
|
|
13
|
+
showQuickActions: boolean;
|
|
14
|
+
minDate?: Date;
|
|
15
|
+
maxDate?: Date;
|
|
16
|
+
mode: CalendarMode;
|
|
17
|
+
formatMonthFn?: (date: Date) => string;
|
|
18
|
+
formatYearFn?: (date: Date) => string;
|
|
19
|
+
displayFormat?: (date: Date, mode: CalendarMode) => string;
|
|
11
20
|
triggerContainer: ElementRef;
|
|
12
21
|
popover: ElementRef;
|
|
13
22
|
value: Date | null;
|
|
@@ -15,8 +24,13 @@ export declare class DatePickerComponent implements ControlValueAccessor {
|
|
|
15
24
|
isOpen: boolean;
|
|
16
25
|
cleanupAutoUpdate?: () => void;
|
|
17
26
|
constructor(cdr: ChangeDetectorRef);
|
|
27
|
+
getMask(): string;
|
|
28
|
+
getPlaceholder(): string;
|
|
29
|
+
getFormatString(): string;
|
|
30
|
+
formatDate(date: Date): string;
|
|
31
|
+
parseDate(str: string): Date | null;
|
|
18
32
|
onInputChange(str: string): void;
|
|
19
|
-
onCalendarChange(date: Date): void;
|
|
33
|
+
onCalendarChange(date: Date | null): void;
|
|
20
34
|
togglePopover(event: MouseEvent): void;
|
|
21
35
|
open(): void;
|
|
22
36
|
close(): void;
|
|
@@ -31,5 +45,5 @@ export declare class DatePickerComponent implements ControlValueAccessor {
|
|
|
31
45
|
setDisabledState(isDisabled: boolean): void;
|
|
32
46
|
protected cn: typeof cn;
|
|
33
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "tolle-date-picker", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disablePastDates": { "alias": "disablePastDates"; "required": false; }; }, {}, never, never, true, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "tolle-date-picker", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disablePastDates": { "alias": "disablePastDates"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "showQuickActions": { "alias": "showQuickActions"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "formatMonthFn": { "alias": "formatMonthFn"; "required": false; }; "formatYearFn": { "alias": "formatYearFn"; "required": false; }; "displayFormat": { "alias": "displayFormat"; "required": false; }; }, {}, never, never, true, never>;
|
|
35
49
|
}
|
|
@@ -18,12 +18,14 @@ export declare class DateRangePickerComponent implements ControlValueAccessor {
|
|
|
18
18
|
constructor(cdr: ChangeDetectorRef);
|
|
19
19
|
get displayValue(): string;
|
|
20
20
|
onCalendarSelect(range: DateRange): void;
|
|
21
|
-
togglePopover(
|
|
21
|
+
togglePopover(event: MouseEvent): void;
|
|
22
22
|
open(): void;
|
|
23
23
|
close(): void;
|
|
24
24
|
clear(event: MouseEvent): void;
|
|
25
25
|
private updatePosition;
|
|
26
26
|
onClickOutside(event: MouseEvent): void;
|
|
27
|
+
onWindowResize(): void;
|
|
28
|
+
onWindowScroll(): void;
|
|
27
29
|
onChange: any;
|
|
28
30
|
onTouched: any;
|
|
29
31
|
writeValue(val: DateRange | null): void;
|
|
@@ -11,6 +11,9 @@ export declare class MultiSelectComponent implements ControlValueAccessor, After
|
|
|
11
11
|
searchable: boolean;
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
class: string;
|
|
14
|
+
maxSelections?: number;
|
|
15
|
+
maxDisplayItems: number;
|
|
16
|
+
error: boolean;
|
|
14
17
|
trigger: ElementRef;
|
|
15
18
|
popover: ElementRef;
|
|
16
19
|
items: QueryList<SelectItemComponent>;
|
|
@@ -24,7 +27,15 @@ export declare class MultiSelectComponent implements ControlValueAccessor, After
|
|
|
24
27
|
noResults: boolean;
|
|
25
28
|
private cleanup?;
|
|
26
29
|
constructor(selectService: SelectService);
|
|
30
|
+
get computedTriggerClass(): string;
|
|
27
31
|
ngAfterContentInit(): void;
|
|
32
|
+
get displayItems(): {
|
|
33
|
+
label: string;
|
|
34
|
+
value: any;
|
|
35
|
+
}[];
|
|
36
|
+
get exceedsDisplayLimit(): boolean;
|
|
37
|
+
get selectableItems(): SelectItemComponent[];
|
|
38
|
+
get availableSelections(): number;
|
|
28
39
|
toggle(): void;
|
|
29
40
|
open(): void;
|
|
30
41
|
close(): void;
|
|
@@ -41,7 +52,8 @@ export declare class MultiSelectComponent implements ControlValueAccessor, After
|
|
|
41
52
|
writeValue(v: any[]): void;
|
|
42
53
|
registerOnChange(fn: any): void;
|
|
43
54
|
registerOnTouched(fn: any): void;
|
|
55
|
+
setDisabledState(isDisabled: boolean): void;
|
|
44
56
|
protected cn: typeof cn;
|
|
45
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent, never>;
|
|
46
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "tolle-multi-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "size": { "alias": "size"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, ["items"], ["*"], true, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "tolle-multi-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "size": { "alias": "size"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "class": { "alias": "class"; "required": false; }; "maxSelections": { "alias": "maxSelections"; "required": false; }; "maxDisplayItems": { "alias": "maxDisplayItems"; "required": false; }; "error": { "alias": "error"; "required": false; }; }, {}, ["items"], ["*"], true, never>;
|
|
47
59
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ElementRef, QueryList, AfterViewInit, ChangeDetectorRef, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { cn } from './utils/cn';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type SegmentItem = {
|
|
6
|
+
label: string;
|
|
7
|
+
value: any;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
icon?: string;
|
|
10
|
+
class?: string;
|
|
11
|
+
data?: any;
|
|
12
|
+
};
|
|
13
|
+
export declare class SegmentedComponent implements ControlValueAccessor, AfterViewInit, OnChanges {
|
|
14
|
+
private cdr;
|
|
15
|
+
items: SegmentItem[];
|
|
16
|
+
class: string;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
itemTemplate?: TemplateRef<any>;
|
|
19
|
+
value: any;
|
|
20
|
+
gliderLeft: number;
|
|
21
|
+
gliderWidth: number;
|
|
22
|
+
hasValue: boolean;
|
|
23
|
+
itemElements: QueryList<ElementRef<HTMLElement>>;
|
|
24
|
+
onChange: any;
|
|
25
|
+
onTouched: any;
|
|
26
|
+
constructor(cdr: ChangeDetectorRef);
|
|
27
|
+
ngAfterViewInit(): void;
|
|
28
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
29
|
+
select(val: any): void;
|
|
30
|
+
updateGlider(): void;
|
|
31
|
+
writeValue(val: any): void;
|
|
32
|
+
registerOnChange(fn: any): void;
|
|
33
|
+
registerOnTouched(fn: any): void;
|
|
34
|
+
setDisabledState(isDisabled: boolean): void;
|
|
35
|
+
protected cn: typeof cn;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SegmentedComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SegmentedComponent, "tolle-segment", never, { "items": { "alias": "items"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
38
|
+
}
|
|
@@ -8,11 +8,14 @@ export declare class SelectItemComponent {
|
|
|
8
8
|
value: any;
|
|
9
9
|
class: string;
|
|
10
10
|
selected: boolean;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
multiSelect: boolean;
|
|
11
13
|
hidden: boolean;
|
|
12
14
|
constructor(selectService: SelectService, el: ElementRef);
|
|
13
15
|
getLabel(): string;
|
|
16
|
+
getItemClasses(): string;
|
|
14
17
|
onClick(event: MouseEvent): void;
|
|
15
18
|
protected cn: typeof cn;
|
|
16
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectItemComponent, [{ optional: true; }, null]>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectItemComponent, "tolle-select-item", never, { "value": { "alias": "value"; "required": false; }; "class": { "alias": "class"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectItemComponent, "tolle-select-item", never, { "value": { "alias": "value"; "required": false; }; "class": { "alias": "class"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "multiSelect": { "alias": "multiSelect"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
18
21
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED