@recursyve/nice-ui-kit.v2 15.0.0-beta.124 → 15.0.0-beta.126

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.
@@ -1,10 +1,11 @@
1
+ import { Observable } from "rxjs";
1
2
  export interface NiceAsyncTypeaheadSearchResult<T> {
2
3
  items: T[];
3
4
  nextPage: number | null;
4
5
  }
5
6
  export declare abstract class NiceAsyncTypeaheadProvider<T, ID = number, Options = any> {
6
7
  abstract resource: string;
7
- abstract search(searchQuery: string, page: number, options?: Options): Promise<NiceAsyncTypeaheadSearchResult<T>>;
8
+ abstract search(searchQuery: string, page: number, options?: Options): Observable<NiceAsyncTypeaheadSearchResult<T>> | Promise<NiceAsyncTypeaheadSearchResult<T>>;
8
9
  abstract getById(id: ID, options?: Options): Promise<T>;
9
10
  format(item: T): string;
10
11
  }
@@ -12,6 +12,12 @@ export declare class AsyncTypeaheadState {
12
12
  searchQuery?: string;
13
13
  excludedIds: any[];
14
14
  }
15
+ export type AsyncTypeaheadRequests = {
16
+ resource: string;
17
+ page: number;
18
+ searchQuery?: string;
19
+ searchOptions?: any;
20
+ };
15
21
  export declare class NiceAsyncTypeaheadService {
16
22
  private readonly apis;
17
23
  private state$;
@@ -20,10 +26,15 @@ export declare class NiceAsyncTypeaheadService {
20
26
  active$: Observable<any>;
21
27
  items$: Observable<any[]>;
22
28
  filteredItems$: Observable<any[]>;
29
+ private requests$;
30
+ private requestsSubscription$;
23
31
  constructor(apis: NiceAsyncTypeaheadProvider<any>[]);
32
+ listenForRequest(): void;
33
+ closeRequestSubscription(): void;
24
34
  initialize(resource: string, options?: any): Promise<void>;
25
- search(resource: string, searchQuery: string, options?: any): Promise<void>;
26
- loadMore(resource: string, options?: any): Promise<void>;
35
+ sendRequest(request: AsyncTypeaheadRequests): Observable<void>;
36
+ search(resource: string, searchQuery: string, options?: any): void;
37
+ loadMore(resource: string, options?: any): void;
27
38
  getActive(): any;
28
39
  getInitialized(): boolean;
29
40
  setActive(entity: any | undefined): void;
@@ -1,16 +1,18 @@
1
- import { AfterViewInit, ElementRef, ViewContainerRef } from "@angular/core";
1
+ import { AfterViewInit, ElementRef, OnDestroy, ViewContainerRef } from "@angular/core";
2
2
  import { MatFormField } from "@angular/material/form-field";
3
3
  import { TranslateService } from "@ngx-translate/core";
4
4
  import * as i0 from "@angular/core";
5
- export declare class NiceControlStatusDirective implements AfterViewInit {
5
+ export declare class NiceControlStatusDirective implements AfterViewInit, OnDestroy {
6
6
  private el;
7
7
  private vcr;
8
8
  private formField;
9
9
  private translateService;
10
10
  private ref;
11
11
  private control;
12
+ private unsubscribeAll$;
12
13
  constructor(el: ElementRef<HTMLElement>, vcr: ViewContainerRef, formField: MatFormField, translateService: TranslateService);
13
14
  ngAfterViewInit(): void;
15
+ ngOnDestroy(): void;
14
16
  onChange(): void;
15
17
  setError(text: string): void;
16
18
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceControlStatusDirective, never>;
@@ -2,7 +2,7 @@ import * as i0 from "@angular/core";
2
2
  export declare class NiceFormErrorComponent {
3
3
  message: string;
4
4
  increment: number;
5
- set error(value: any);
5
+ set error(value: string);
6
6
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceFormErrorComponent, never>;
7
7
  static ɵcmp: i0.ɵɵComponentDeclaration<NiceFormErrorComponent, "[form-error]", never, { "error": "error"; }, {}, never, never, false, never>;
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursyve/nice-ui-kit.v2",
3
- "version": "15.0.0-beta.124",
3
+ "version": "15.0.0-beta.126",
4
4
  "exports": {
5
5
  ".": {
6
6
  "sass": "./_index.scss",
@@ -1528,6 +1528,16 @@ table {
1528
1528
  }
1529
1529
  }
1530
1530
 
1531
+ @mixin _calendar_body_active_not_selected {
1532
+ .cdk-program-focused .mat-calendar-body-active {
1533
+ & > .mat-calendar-body-cell-content {
1534
+ &:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical) {
1535
+ @content;
1536
+ }
1537
+ }
1538
+ }
1539
+ }
1540
+
1531
1541
  @include _calendar_body_hover {
1532
1542
  @apply bg-primary/30 #{!important};
1533
1543
  }
@@ -1536,6 +1546,10 @@ table {
1536
1546
  @apply bg-primary/20 #{!important};
1537
1547
  }
1538
1548
 
1549
+ @include _calendar_body_active_not_selected {
1550
+ @apply text-on-primary #{!important};
1551
+ }
1552
+
1539
1553
  .mat-datepicker-content {
1540
1554
  &.mat-accent {
1541
1555
  @include _calendar_body_hover {
@@ -1545,6 +1559,10 @@ table {
1545
1559
  @include _calendar_body_in_range {
1546
1560
  @apply bg-accent/20 #{!important};
1547
1561
  }
1562
+
1563
+ @include _calendar_body_active_not_selected {
1564
+ @apply text-on-accent #{!important};
1565
+ }
1548
1566
  }
1549
1567
 
1550
1568
  &.mat-warn {
@@ -1555,5 +1573,9 @@ table {
1555
1573
  @include _calendar_body_in_range {
1556
1574
  @apply bg-warn/20 #{!important};
1557
1575
  }
1576
+
1577
+ @include _calendar_body_active_not_selected {
1578
+ @apply text-on-warn #{!important};
1579
+ }
1558
1580
  }
1559
1581
  }