@recursyve/nice-ui-kit.v2 13.2.0-beta.111 → 13.2.0-beta.112
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/esm2020/lib/components/date-range-picker/components/header/header.component.mjs +57 -0
- package/esm2020/lib/components/date-range-picker/components/range-preset/range-preset.component.mjs +107 -0
- package/esm2020/lib/components/date-range-picker/date-range-picker.component.mjs +74 -0
- package/esm2020/lib/components/date-range-picker/date-range-picker.module.mjs +58 -0
- package/esm2020/lib/components/date-range-picker/index.mjs +2 -0
- package/esm2020/lib/components/date-range-picker/providers/date-range-picker.service.mjs +17 -0
- package/esm2020/lib/components/date-range-picker/public-api.mjs +3 -0
- package/esm2020/lib/components/public-api.mjs +2 -1
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs +3673 -3406
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +5786 -5522
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/lib/components/date-range-picker/components/header/header.component.d.ts +20 -0
- package/lib/components/date-range-picker/components/range-preset/range-preset.component.d.ts +23 -0
- package/lib/components/date-range-picker/date-range-picker.component.d.ts +26 -0
- package/lib/components/date-range-picker/date-range-picker.module.d.ts +18 -0
- package/lib/components/date-range-picker/index.d.ts +1 -0
- package/lib/components/date-range-picker/providers/date-range-picker.service.d.ts +8 -0
- package/lib/components/date-range-picker/public-api.d.ts +2 -0
- package/lib/components/public-api.d.ts +1 -0
- package/package.json +1 -1
- package/src/lib/components/date-range-picker/date-range-picker.theme.scss +47 -0
- package/src/lib/nice.theme.scss +2 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy } from "@angular/core";
|
|
2
|
+
import { DateAdapter, MatDateFormats } from "@angular/material/core";
|
|
3
|
+
import { MatCalendar } from "@angular/material/datepicker";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class HeaderComponent<D> implements OnDestroy {
|
|
6
|
+
private calendar;
|
|
7
|
+
private dateAdapter;
|
|
8
|
+
private dateFormats;
|
|
9
|
+
private readonly destroy$;
|
|
10
|
+
toggled: boolean;
|
|
11
|
+
constructor(calendar: MatCalendar<D>, dateAdapter: DateAdapter<D>, dateFormats: MatDateFormats, cdr: ChangeDetectorRef);
|
|
12
|
+
get periodLabel(): string;
|
|
13
|
+
previousClicked(mode: "month" | "year"): void;
|
|
14
|
+
nextClicked(mode: "month" | "year"): void;
|
|
15
|
+
private changeDate;
|
|
16
|
+
clickOptions(): void;
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderComponent<any>, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HeaderComponent<any>, "ng-component", never, {}, {}, never, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DateAdapter } from "@angular/material/core";
|
|
2
|
+
import { MatDateRangePicker } from "@angular/material/datepicker";
|
|
3
|
+
import { NiceDateRangePickerServiceService } from "../../providers/date-range-picker.service";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
declare const customPresets: string[];
|
|
6
|
+
declare type CustomPreset = typeof customPresets[number];
|
|
7
|
+
export declare class RangePresetComponent<D> {
|
|
8
|
+
private dateAdapter;
|
|
9
|
+
private picker;
|
|
10
|
+
private service;
|
|
11
|
+
readonly customPresets: string[];
|
|
12
|
+
readonly allowClear$: import("rxjs").BehaviorSubject<boolean>;
|
|
13
|
+
constructor(dateAdapter: DateAdapter<D>, picker: MatDateRangePicker<D>, service: NiceDateRangePickerServiceService);
|
|
14
|
+
clearRange(): void;
|
|
15
|
+
selectRange(rangeName: CustomPreset): void;
|
|
16
|
+
private calculateDateRange;
|
|
17
|
+
private calculateMonth;
|
|
18
|
+
private calculateWeek;
|
|
19
|
+
private get today();
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RangePresetComponent<any>, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RangePresetComponent<any>, "nice-range-preset", never, {}, {}, never, never>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { ControlValueAccessor, FormGroup } from "@angular/forms";
|
|
3
|
+
import { HeaderComponent } from "./components/header/header.component";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface NiceDateRangePickerValue {
|
|
6
|
+
from: Date;
|
|
7
|
+
to: Date;
|
|
8
|
+
}
|
|
9
|
+
export declare class NiceDateRangePickerComponent implements OnInit, ControlValueAccessor {
|
|
10
|
+
readonly HeaderComponent: typeof HeaderComponent;
|
|
11
|
+
private picker;
|
|
12
|
+
min: Date;
|
|
13
|
+
max: Date;
|
|
14
|
+
nowIsMax: boolean;
|
|
15
|
+
allowClear: boolean;
|
|
16
|
+
formGroup: FormGroup;
|
|
17
|
+
now: Date;
|
|
18
|
+
value: NiceDateRangePickerValue;
|
|
19
|
+
private propage;
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
writeValue(value: NiceDateRangePickerValue): void;
|
|
22
|
+
registerOnChange(fn: (value: NiceDateRangePickerValue) => void): void;
|
|
23
|
+
registerOnTouched(fn: any): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceDateRangePickerComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceDateRangePickerComponent, "nice-date-range-picker", never, { "min": "min"; "max": "max"; "nowIsMax": "nowIsMax"; "allowClear": "allowClear"; }, {}, never, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./date-range-picker.component";
|
|
3
|
+
import * as i2 from "./components/range-preset/range-preset.component";
|
|
4
|
+
import * as i3 from "./components/header/header.component";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@angular/material/datepicker";
|
|
7
|
+
import * as i6 from "@angular/material/form-field";
|
|
8
|
+
import * as i7 from "@angular/material/card";
|
|
9
|
+
import * as i8 from "@angular/material/button";
|
|
10
|
+
import * as i9 from "@angular/material/icon";
|
|
11
|
+
import * as i10 from "@ngx-translate/core";
|
|
12
|
+
import * as i11 from "@angular/forms";
|
|
13
|
+
import * as i12 from "../../pipes/pipes.module";
|
|
14
|
+
export declare class NiceDateRangePickerModule {
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceDateRangePickerModule, never>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NiceDateRangePickerModule, [typeof i1.NiceDateRangePickerComponent, typeof i2.RangePresetComponent, typeof i3.HeaderComponent], [typeof i4.CommonModule, typeof i5.MatDatepickerModule, typeof i6.MatFormFieldModule, typeof i7.MatCardModule, typeof i8.MatButtonModule, typeof i9.MatIconModule, typeof i10.TranslateModule, typeof i11.ReactiveFormsModule, typeof i12.NicePipesModule], [typeof i1.NiceDateRangePickerComponent]>;
|
|
17
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NiceDateRangePickerModule>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./public-api";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BehaviorSubject } from "rxjs";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NiceDateRangePickerServiceService {
|
|
4
|
+
allowClear$: BehaviorSubject<boolean>;
|
|
5
|
+
setAllowClear(allowClear: boolean): void;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceDateRangePickerServiceService, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NiceDateRangePickerServiceService>;
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@use "@angular/material" as mat;
|
|
2
|
+
|
|
3
|
+
@mixin nice-date-picker-theme($theme) {
|
|
4
|
+
$accent: map-get($theme, accent);
|
|
5
|
+
$background: map-get($theme, background);
|
|
6
|
+
$foreground: map-get($theme, foreground);
|
|
7
|
+
|
|
8
|
+
mat-calendar {
|
|
9
|
+
.mat-calendar-body-in-range::before {
|
|
10
|
+
background: mat.get-color-from-palette($accent, 0.2) !important;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
nice-date-range-picker {
|
|
15
|
+
.from-to {
|
|
16
|
+
@apply flex;
|
|
17
|
+
|
|
18
|
+
color: map-get($foreground, text);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.nice-date-picker-container {
|
|
22
|
+
@apply flex justify-center items-center;
|
|
23
|
+
|
|
24
|
+
.nice-date-picker-header {
|
|
25
|
+
@apply mr-3;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.separator {
|
|
30
|
+
@apply px-3;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
nice-range-preset {
|
|
35
|
+
background-color: map-get($background, background);
|
|
36
|
+
|
|
37
|
+
button {
|
|
38
|
+
.mat-button-focus-overlay {
|
|
39
|
+
background: mat.get-color-from-palette($accent) !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay {
|
|
44
|
+
opacity: 0.2 !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
package/src/lib/nice.theme.scss
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
@import "./components/assets-carousel/assets-carousel.theme";
|
|
9
9
|
@import "./components/base-form/base-form.theme";
|
|
10
10
|
@import "./components/card/card.theme";
|
|
11
|
+
@import "components/date-range-picker/date-range-picker.theme";
|
|
11
12
|
@import "./components/drawer/drawer.theme";
|
|
12
13
|
@import "./components/horizontal-stepper/horizontal-stepper.theme";
|
|
13
14
|
@import "./components/navigation/horizontal/horizontal.theme";
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
@include nice-assets-carousel-theme($theme);
|
|
22
23
|
@include nice-base-form-theme($theme);
|
|
23
24
|
@include nice-card-theme($theme);
|
|
25
|
+
@include nice-date-picker-theme($theme);
|
|
24
26
|
@include nice-drawer-theme($theme);
|
|
25
27
|
@include nice-horizontal-stepper-theme($theme);
|
|
26
28
|
@include nice-toggle-button-group-theme($theme);
|