@recursyve/nice-ui-kit.v2 13.2.0-beta.111 → 13.2.0-beta.113
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/navigation/horizontal/components/branch/branch.component.mjs +5 -4
- package/esm2020/lib/components/navigation/horizontal/horizontal.component.mjs +4 -3
- package/esm2020/lib/components/navigation/navigation.module.mjs +4 -1
- package/esm2020/lib/components/navigation/navigation.types.mjs +1 -1
- package/esm2020/lib/components/navigation/pipes/should-hide.pipe.mjs +31 -0
- package/esm2020/lib/components/navigation/providers/hide-item.resolver.mjs +3 -0
- package/esm2020/lib/components/navigation/public-api.mjs +3 -1
- package/esm2020/lib/components/navigation/vertical/components/collapsable/collapsable.component.mjs +4 -3
- package/esm2020/lib/components/navigation/vertical/components/group/group.component.mjs +4 -3
- package/esm2020/lib/components/navigation/vertical/vertical.component.mjs +4 -3
- package/esm2020/lib/components/public-api.mjs +2 -1
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs +3713 -3410
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +5809 -5509
- 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/navigation/navigation.module.d.ts +13 -12
- package/lib/components/navigation/navigation.types.d.ts +2 -1
- package/lib/components/navigation/pipes/should-hide.pipe.d.ts +11 -0
- package/lib/components/navigation/providers/hide-item.resolver.d.ts +5 -0
- package/lib/components/navigation/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
|
+
}
|
|
@@ -12,19 +12,20 @@ import * as i10 from "./vertical/components/divider/divider.component";
|
|
|
12
12
|
import * as i11 from "./vertical/components/group/group.component";
|
|
13
13
|
import * as i12 from "./vertical/components/spacer/spacer.component";
|
|
14
14
|
import * as i13 from "./vertical/vertical.component";
|
|
15
|
-
import * as i14 from "./pipes/should-
|
|
16
|
-
import * as i15 from "./
|
|
17
|
-
import * as i16 from "
|
|
18
|
-
import * as i17 from "@angular/
|
|
19
|
-
import * as i18 from "@angular/
|
|
20
|
-
import * as i19 from "@angular/material/
|
|
21
|
-
import * as i20 from "@angular/material/
|
|
22
|
-
import * as i21 from "@angular/material/
|
|
23
|
-
import * as i22 from "@angular/material/
|
|
24
|
-
import * as i23 from "
|
|
25
|
-
import * as i24 from "
|
|
15
|
+
import * as i14 from "./pipes/should-hide.pipe";
|
|
16
|
+
import * as i15 from "./pipes/should-show-hint.pipe";
|
|
17
|
+
import * as i16 from "./directives/show-hint.directive";
|
|
18
|
+
import * as i17 from "@angular/common";
|
|
19
|
+
import * as i18 from "@angular/router";
|
|
20
|
+
import * as i19 from "@angular/material/button";
|
|
21
|
+
import * as i20 from "@angular/material/divider";
|
|
22
|
+
import * as i21 from "@angular/material/icon";
|
|
23
|
+
import * as i22 from "@angular/material/menu";
|
|
24
|
+
import * as i23 from "@angular/material/tooltip";
|
|
25
|
+
import * as i24 from "../../directives/scrollbar/scrollbar.module";
|
|
26
|
+
import * as i25 from "@ngx-translate/core";
|
|
26
27
|
export declare class NiceNavigationModule {
|
|
27
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceNavigationModule, never>;
|
|
28
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NiceNavigationModule, [typeof i1.NiceNavigationComponent, typeof i2.NiceHorizontalNavigationBasicItemComponent, typeof i3.NiceHorizontalNavigationBranchItemComponent, typeof i4.NiceHorizontalNavigationDividerItemComponent, typeof i5.NiceHorizontalNavigationSpacerItemComponent, typeof i6.NiceHorizontalNavigationComponent, typeof i7.NiceVerticalNavigationAsideItemComponent, typeof i8.NiceVerticalNavigationBasicItemComponent, typeof i9.NiceVerticalNavigationCollapsableItemComponent, typeof i10.NiceVerticalNavigationDividerItemComponent, typeof i11.NiceVerticalNavigationGroupItemComponent, typeof i12.NiceVerticalNavigationSpacerItemComponent, typeof i13.NiceVerticalNavigationComponent, typeof i14.
|
|
29
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NiceNavigationModule, [typeof i1.NiceNavigationComponent, typeof i2.NiceHorizontalNavigationBasicItemComponent, typeof i3.NiceHorizontalNavigationBranchItemComponent, typeof i4.NiceHorizontalNavigationDividerItemComponent, typeof i5.NiceHorizontalNavigationSpacerItemComponent, typeof i6.NiceHorizontalNavigationComponent, typeof i7.NiceVerticalNavigationAsideItemComponent, typeof i8.NiceVerticalNavigationBasicItemComponent, typeof i9.NiceVerticalNavigationCollapsableItemComponent, typeof i10.NiceVerticalNavigationDividerItemComponent, typeof i11.NiceVerticalNavigationGroupItemComponent, typeof i12.NiceVerticalNavigationSpacerItemComponent, typeof i13.NiceVerticalNavigationComponent, typeof i14.NiceShouldHidePipe, typeof i15.NiceShouldShowHintPipe, typeof i16.NiceShowHintDirective], [typeof i17.CommonModule, typeof i18.RouterModule, typeof i19.MatButtonModule, typeof i20.MatDividerModule, typeof i21.MatIconModule, typeof i22.MatMenuModule, typeof i23.MatTooltipModule, typeof i24.NiceScrollbarModule, typeof i25.TranslateModule], [typeof i6.NiceHorizontalNavigationComponent, typeof i13.NiceVerticalNavigationComponent]>;
|
|
29
30
|
static ɵinj: i0.ɵɵInjectorDeclaration<NiceNavigationModule>;
|
|
30
31
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Type } from "@angular/core";
|
|
2
|
+
import { NavigationHideItemResolver } from "./providers/hide-item.resolver";
|
|
2
3
|
import { NavigationHintResolver } from "./providers/hint.resolver";
|
|
3
4
|
export declare type IconType = "fontawesome" | "material" | "svg";
|
|
4
5
|
export interface NiceNavigationItem {
|
|
@@ -6,7 +7,7 @@ export interface NiceNavigationItem {
|
|
|
6
7
|
title?: string;
|
|
7
8
|
subtitle?: string;
|
|
8
9
|
type: "aside" | "basic" | "collapsable" | "divider" | "group" | "spacer";
|
|
9
|
-
hidden?: (item: NiceNavigationItem) => boolean;
|
|
10
|
+
hidden?: Type<NavigationHideItemResolver> | ((item: NiceNavigationItem) => boolean) | boolean;
|
|
10
11
|
active?: boolean;
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
link?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Injector, PipeTransform } from "@angular/core";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { NiceNavigationItem } from "../navigation.types";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NiceShouldHidePipe implements PipeTransform {
|
|
6
|
+
private injector;
|
|
7
|
+
constructor(injector: Injector);
|
|
8
|
+
transform(value: NiceNavigationItem): Observable<boolean>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceShouldHidePipe, never>;
|
|
10
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<NiceShouldHidePipe, "niceShouldHide">;
|
|
11
|
+
}
|
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);
|