suis 1.6.1 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,7 @@ import { ElementRef, EventEmitter } from '@angular/core';
2
2
  import { SuisInputBase } from '../../../shared/classes/suis-input.base';
3
3
  import { SuisSelectOption } from '../interfaces/suis-select-option.interfaces';
4
4
  import { SuisSelectOptionDirective } from '../directives/suis-select-option.directive';
5
+ import { SuisSortOptional } from '../../../types/suis-sort.type';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare abstract class SuisSelectBase<T> extends SuisInputBase {
7
8
  /** @internal */
@@ -16,6 +17,10 @@ export declare abstract class SuisSelectBase<T> extends SuisInputBase {
16
17
  * Options displayed in dropdown list. Type of SuisSelectOption[].
17
18
  */
18
19
  options: SuisSelectOption[];
20
+ /**
21
+ * Defines way of sorting options. Type of SuisSortOptional. By default set to 'asc'.
22
+ */
23
+ sortOptions: SuisSortOptional;
19
24
  /**
20
25
  * Displays search input above options. By default set to true.
21
26
  */
@@ -51,5 +56,5 @@ export declare abstract class SuisSelectBase<T> extends SuisInputBase {
51
56
  /** @internal */
52
57
  optionTrackBy(index: number, option: SuisSelectOption): string;
53
58
  static ɵfac: i0.ɵɵFactoryDeclaration<SuisSelectBase<any>, never>;
54
- static ɵdir: i0.ɵɵDirectiveDeclaration<SuisSelectBase<any>, never, never, { "options": { "alias": "options"; "required": false; }; "search": { "alias": "search"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; }, { "searchPhraseChanged": "searchPhraseChanged"; }, ["suisSelectOption"], never, false, never>;
59
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SuisSelectBase<any>, never, never, { "options": { "alias": "options"; "required": false; }; "sortOptions": { "alias": "sortOptions"; "required": false; }; "search": { "alias": "search"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; }, { "searchPhraseChanged": "searchPhraseChanged"; }, ["suisSelectOption"], never, false, never>;
55
60
  }
@@ -1,8 +1,9 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import { SuisSelectGroupOption } from '../interfaces/suis-select-group-option.interfaces';
3
+ import { SuisSortOptional } from '../../../types/suis-sort.type';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class SuisSelectSortGroupOptionsPipe implements PipeTransform {
5
- transform(options: SuisSelectGroupOption[]): SuisSelectGroupOption[];
6
+ transform(options: SuisSelectGroupOption[], sortOptions: SuisSortOptional): SuisSelectGroupOption[];
6
7
  static ɵfac: i0.ɵɵFactoryDeclaration<SuisSelectSortGroupOptionsPipe, never>;
7
8
  static ɵpipe: i0.ɵɵPipeDeclaration<SuisSelectSortGroupOptionsPipe, "suisSelectSortGroupOptions", true>;
8
9
  }
@@ -1,8 +1,9 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import { SuisSelectOption } from '../interfaces/suis-select-option.interfaces';
3
+ import { SuisSortOptional } from '../../../types';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class SuisSelectSortOptionsPipe implements PipeTransform {
5
- transform(options: SuisSelectOption[], optionLabel: string): SuisSelectOption[];
6
+ transform(options: SuisSelectOption[], optionLabel: string, sortOptions: SuisSortOptional): SuisSelectOption[];
6
7
  static ɵfac: i0.ɵɵFactoryDeclaration<SuisSelectSortOptionsPipe, never>;
7
8
  static ɵpipe: i0.ɵɵPipeDeclaration<SuisSelectSortOptionsPipe, "suisSelectSortOptions", true>;
8
9
  }
@@ -1 +1,2 @@
1
1
  export type SuisSort = 'asc' | 'desc';
2
+ export type SuisSortOptional = SuisSort | 'none';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suis",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "main": "src/index.ts",
5
5
  "author": "Karol Jaskółka",
6
6
  "description": "Angular 16+ Component Library",