@indice/ng-components 0.2.160-beta.7 → 0.2.160-beta.9

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.
@@ -0,0 +1,26 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { MenuOption } from '../../types';
3
+ import { SearchOption, FilterClause } from './models';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AdvancedSearchComponent implements OnInit {
6
+ advancedSearchChanged: EventEmitter<FilterClause[]>;
7
+ searchOptions: SearchOption[];
8
+ filters: FilterClause[];
9
+ menuOptions: MenuOption[];
10
+ selectedField?: SearchOption;
11
+ fieldValue?: string;
12
+ fieldValueDateFrom: any;
13
+ fieldValueDateTo: any;
14
+ menuOptionsDictionary: {
15
+ [key: string]: MenuOption[];
16
+ };
17
+ constructor();
18
+ ngOnInit(): void;
19
+ selectedFieldChanged(field: string): void;
20
+ selectedFieldValueChanged(fieldValue: string): void;
21
+ search(): void;
22
+ removeFilter(index: number): void;
23
+ clear(): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<AdvancedSearchComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<AdvancedSearchComponent, "lib-advanced-search", never, { "searchOptions": "search-options"; "filters": "filters"; }, { "advancedSearchChanged": "advancedSearchChanged"; }, never, never, false>;
26
+ }
@@ -0,0 +1,83 @@
1
+ export declare namespace Operators {
2
+ const EQUALS: {
3
+ label: string;
4
+ value: string;
5
+ description: string;
6
+ };
7
+ const NOT_EQUALS: {
8
+ label: string;
9
+ value: string;
10
+ description: string;
11
+ };
12
+ const GREATER_THAN: {
13
+ label: string;
14
+ value: string;
15
+ description: string;
16
+ };
17
+ const LESS_THAN: {
18
+ label: string;
19
+ value: string;
20
+ description: string;
21
+ };
22
+ const GREATER_THAN_EQUAL: {
23
+ label: string;
24
+ value: string;
25
+ description: string;
26
+ };
27
+ const LESS_THAN_EQUAL: {
28
+ label: string;
29
+ value: string;
30
+ description: string;
31
+ };
32
+ const CONTAINS: {
33
+ label: string;
34
+ value: string;
35
+ description: string;
36
+ };
37
+ const IN: {
38
+ label: string;
39
+ value: string;
40
+ description: string;
41
+ };
42
+ }
43
+ export declare enum QueryParameters {
44
+ VIEW = "view",
45
+ PAGE_SIZE = "pagesize",
46
+ PAGE = "page",
47
+ SEARCH = "search",
48
+ SORT_FIELD = "sort",
49
+ SORT_DIRECTION = "dir",
50
+ FILTER = "filter",
51
+ FILTER_FROM = "from",
52
+ FILTER_TO = "to"
53
+ }
54
+ export interface SearchOption {
55
+ name: string;
56
+ field: string;
57
+ dataType: FilterClause.Dt;
58
+ array?: boolean;
59
+ multiTerm?: boolean;
60
+ options?: SelectInputOption[];
61
+ placeholder?: string;
62
+ }
63
+ export interface SelectInputOption {
64
+ value: any;
65
+ label: string;
66
+ description?: string;
67
+ }
68
+ export declare namespace FilterClause {
69
+ type Op = 'eq' | 'neq' | 'gt' | 'lt' | 'gte' | 'lte' | 'contains' | 'in';
70
+ type Dt = 'string' | 'integer' | 'number' | 'boolean' | 'datetime' | 'array' | 'daterange' | undefined;
71
+ }
72
+ export declare class FilterClause {
73
+ member: string;
74
+ value: any;
75
+ operator: FilterClause.Op;
76
+ dataType: FilterClause.Dt;
77
+ uiName: string | undefined;
78
+ uiOperator: string | undefined;
79
+ uiValue: string | undefined;
80
+ constructor(member: string, value: any, operator?: FilterClause.Op, dataType?: FilterClause.Dt, searchOptions?: SearchOption[]);
81
+ static parse(text: string): FilterClause | undefined;
82
+ toString(): string;
83
+ }
@@ -3,8 +3,11 @@ import { MenuOption } from '../../types';
3
3
  import { ListTileComponent } from './list-tile.component';
4
4
  import { ListColumnComponent } from './list-column.component';
5
5
  import { ListDetailsSectionComponent } from './list-details-section.component';
6
+ import { FilterClause, SearchOption } from '../advanced-search/models';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class ListViewComponent implements OnChanges {
9
+ searchOptions: SearchOption[];
10
+ filters: FilterClause[];
8
11
  busy: boolean;
9
12
  items: any[] | null | undefined;
10
13
  count: number | null;
@@ -30,6 +33,7 @@ export declare class ListViewComponent implements OnChanges {
30
33
  }>;
31
34
  sortChanged: EventEmitter<string>;
32
35
  sortdirChanged: EventEmitter<string>;
36
+ advancedSearchChanged: EventEmitter<FilterClause[]>;
33
37
  private multipleFullWidth;
34
38
  expandIcon: string;
35
39
  collapseIcon: string;
@@ -49,8 +53,9 @@ export declare class ListViewComponent implements OnChanges {
49
53
  emitPageSizeChanged($event: number): void;
50
54
  emitSortChanged($event: string): void;
51
55
  emitSortdirChanged($event: string): void;
56
+ emitAdvancedSearchChanged($event: FilterClause[]): void;
52
57
  toggleDetails(item: any): void;
53
58
  private setTilesDeckClass;
54
59
  static ɵfac: i0.ɵɵFactoryDeclaration<ListViewComponent, never>;
55
- static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent, "lib-list-view", never, { "busy": "busy"; "items": "items"; "count": "count"; "page": "page"; "view": "view"; "sort": "sort"; "pageSize": "page-size"; "pageSizeOptions": "page-size-options"; "sortOptions": "sort-options"; "sortdir": "sort-dir"; "tilesCount": "tiles-count"; "showPager": "show-pager"; "pagerPosition": "pager-position"; "detailsSectionPropertyCount": "details-section-property-count"; }, { "pageChanged": "pageChanged"; "pageSizeChanged": "pageSizeChanged"; "detailsOpened": "detailsOpened"; "sortChanged": "sortChanged"; "sortdirChanged": "sortdirChanged"; }, ["tiles", "details", "cols"], ["*"], false>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent, "lib-list-view", never, { "searchOptions": "search-options"; "filters": "filters"; "busy": "busy"; "items": "items"; "count": "count"; "page": "page"; "view": "view"; "sort": "sort"; "pageSize": "page-size"; "pageSizeOptions": "page-size-options"; "sortOptions": "sort-options"; "sortdir": "sort-dir"; "tilesCount": "tiles-count"; "showPager": "show-pager"; "pagerPosition": "pager-position"; "detailsSectionPropertyCount": "details-section-property-count"; }, { "pageChanged": "pageChanged"; "pageSizeChanged": "pageSizeChanged"; "detailsOpened": "detailsOpened"; "sortChanged": "sortChanged"; "sortdirChanged": "sortdirChanged"; "advancedSearchChanged": "advancedSearchChanged"; }, ["tiles", "details", "cols"], ["*"], false>;
56
61
  }
@@ -1,3 +1,5 @@
1
+ import { SearchOption } from 'projects/ng-components/src/lib/controls/advanced-search/models';
2
+ import { FilterClause } from './../controls/advanced-search/models';
1
3
  import { Observable } from 'rxjs';
2
4
  import { OnInit, OnDestroy } from '@angular/core';
3
5
  import { ActivatedRoute, Router } from '@angular/router';
@@ -17,6 +19,8 @@ export declare abstract class BaseListComponent<T> implements OnInit, OnDestroy
17
19
  sort: string | null;
18
20
  sortdir: string | null;
19
21
  search: string | null;
22
+ filters: FilterClause[];
23
+ searchOptions?: SearchOption[];
20
24
  sortOptions: MenuOption[];
21
25
  metaItems: HeaderMetaItem[];
22
26
  abstract newItemLink: string | null;
@@ -25,7 +29,14 @@ export declare abstract class BaseListComponent<T> implements OnInit, OnDestroy
25
29
  ngOnDestroy(): void;
26
30
  getViewActions(): Observable<ViewAction[]>;
27
31
  ngOnInit(): void;
32
+ /**
33
+ * Get filters from a querystring
34
+ * @param queryParamMap
35
+ * @returns filters found from a paramMap
36
+ */
37
+ private getFiltersFrom;
28
38
  private setRouteParams;
39
+ private filterClausesToString;
29
40
  actionHandler($event: ViewAction): void;
30
41
  private load;
31
42
  private updateHeaderMeta;
@@ -36,6 +47,7 @@ export declare abstract class BaseListComponent<T> implements OnInit, OnDestroy
36
47
  pageSizeChanged(pageSize: number): void;
37
48
  sortChanged(sort: string): void;
38
49
  sortdirChanged(sortdir: string): void;
50
+ advancedSearchChanged(filters: FilterClause[]): void;
39
51
  searchChanged(searchText: string | null): void;
40
52
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseListComponent<any>, never>;
41
53
  static ɵcmp: i0.ɵɵComponentDeclaration<BaseListComponent<any>, "ng-component", never, {}, {}, never, never, false>;
@@ -48,12 +48,14 @@ import * as i45 from "./controls/stepper/lib-step-info.directive";
48
48
  import * as i46 from "./layouts/shell/shell-sidebar-header/shell-sidebar-header.component";
49
49
  import * as i47 from "./layouts/shell/shell-sidebar-layout/shell-sidebar-layout.component";
50
50
  import * as i48 from "./layouts/shell/shell-stacked-layout/shell-stacked-layout.component";
51
- import * as i49 from "@angular/common";
52
- import * as i50 from "@angular/router";
53
- import * as i51 from "@indice/ng-auth";
51
+ import * as i49 from "./controls/advanced-search/advanced-search.component";
52
+ import * as i50 from "@angular/common";
53
+ import * as i51 from "@angular/router";
54
+ import * as i52 from "@indice/ng-auth";
55
+ import * as i53 from "@angular/forms";
54
56
  export declare class IndiceComponentsModule {
55
57
  static forRoot(): ModuleWithProviders<IndiceComponentsModule>;
56
58
  static ɵfac: i0.ɵɵFactoryDeclaration<IndiceComponentsModule, never>;
57
- static ɵmod: i0.ɵɵNgModuleDeclaration<IndiceComponentsModule, [typeof i1.ClickOutsideDirective, typeof i2.DynamicComponentHostDirective, typeof i3.DropDownMenuComponent, typeof i4.PagerComponent, typeof i5.ListViewComponent, typeof i6.ListColumnComponent, typeof i7.ListTileComponent, typeof i8.ListDetailsSectionComponent, typeof i9.ListViewEmptyStateComponent, typeof i10.SkeletonLoaderComponent, typeof i11.CollapsiblePanelComponent, typeof i12.KpiTileComponent, typeof i13.SidePaneComponent, typeof i14.DatepickerComponent, typeof i15.AvatarInitialsComponent, typeof i16.ToggleComponent, typeof i17.ComboboxComponent, typeof i18.ToasterContainerComponent, typeof i19.ToasterComponent, typeof i20.ShellLayoutComponent, typeof i21.ShellHeaderComponent, typeof i22.ShellFooterComponent, typeof i23.ViewLayoutComponent, typeof i24.SideViewLayoutComponent, typeof i25.ModelViewLayoutComponent, typeof i26.FormLayoutComponent, typeof i27.AuthCallbackComponent, typeof i28.AuthRenewComponent, typeof i29.LoggedOutComponent, typeof i30.ErrorComponent, typeof i31.PageNotFoundComponent, typeof i32.UnauthorizedComponent, typeof i33.AddressPipe, typeof i34.DurationFormatPipe, typeof i35.NavLinksListComponent, typeof i36.NotificationsIndicatorComponent, typeof i37.LanguageSelectionComponent, typeof i38.UserProfileMenuComponent, typeof i39.ShellSidebarComponent, typeof i40.LibTabComponent, typeof i41.LibTabGroupComponent, typeof i42.LibStepperComponent, typeof i43.LibStepComponent, typeof i44.LibStepLabelDirective, typeof i45.LibStepInfoDirective, typeof i46.ShellSidebarHeaderComponent, typeof i47.ShellSidebarLayoutComponent, typeof i48.ShellStackedLayoutComponent], [typeof i49.CommonModule, typeof i50.RouterModule, typeof i51.IndiceAuthModule], [typeof i33.AddressPipe, typeof i27.AuthCallbackComponent, typeof i28.AuthRenewComponent, typeof i15.AvatarInitialsComponent, typeof i1.ClickOutsideDirective, typeof i11.CollapsiblePanelComponent, typeof i17.ComboboxComponent, typeof i14.DatepickerComponent, typeof i3.DropDownMenuComponent, typeof i34.DurationFormatPipe, typeof i30.ErrorComponent, typeof i26.FormLayoutComponent, typeof i12.KpiTileComponent, typeof i43.LibStepComponent, typeof i45.LibStepInfoDirective, typeof i44.LibStepLabelDirective, typeof i42.LibStepperComponent, typeof i40.LibTabComponent, typeof i41.LibTabGroupComponent, typeof i6.ListColumnComponent, typeof i8.ListDetailsSectionComponent, typeof i7.ListTileComponent, typeof i5.ListViewComponent, typeof i9.ListViewEmptyStateComponent, typeof i29.LoggedOutComponent, typeof i25.ModelViewLayoutComponent, typeof i31.PageNotFoundComponent, typeof i4.PagerComponent, typeof i22.ShellFooterComponent, typeof i21.ShellHeaderComponent, typeof i20.ShellLayoutComponent, typeof i13.SidePaneComponent, typeof i24.SideViewLayoutComponent, typeof i10.SkeletonLoaderComponent, typeof i19.ToasterComponent, typeof i18.ToasterContainerComponent, typeof i16.ToggleComponent, typeof i32.UnauthorizedComponent, typeof i23.ViewLayoutComponent]>;
59
+ static ɵmod: i0.ɵɵNgModuleDeclaration<IndiceComponentsModule, [typeof i1.ClickOutsideDirective, typeof i2.DynamicComponentHostDirective, typeof i3.DropDownMenuComponent, typeof i4.PagerComponent, typeof i5.ListViewComponent, typeof i6.ListColumnComponent, typeof i7.ListTileComponent, typeof i8.ListDetailsSectionComponent, typeof i9.ListViewEmptyStateComponent, typeof i10.SkeletonLoaderComponent, typeof i11.CollapsiblePanelComponent, typeof i12.KpiTileComponent, typeof i13.SidePaneComponent, typeof i14.DatepickerComponent, typeof i15.AvatarInitialsComponent, typeof i16.ToggleComponent, typeof i17.ComboboxComponent, typeof i18.ToasterContainerComponent, typeof i19.ToasterComponent, typeof i20.ShellLayoutComponent, typeof i21.ShellHeaderComponent, typeof i22.ShellFooterComponent, typeof i23.ViewLayoutComponent, typeof i24.SideViewLayoutComponent, typeof i25.ModelViewLayoutComponent, typeof i26.FormLayoutComponent, typeof i27.AuthCallbackComponent, typeof i28.AuthRenewComponent, typeof i29.LoggedOutComponent, typeof i30.ErrorComponent, typeof i31.PageNotFoundComponent, typeof i32.UnauthorizedComponent, typeof i33.AddressPipe, typeof i34.DurationFormatPipe, typeof i35.NavLinksListComponent, typeof i36.NotificationsIndicatorComponent, typeof i37.LanguageSelectionComponent, typeof i38.UserProfileMenuComponent, typeof i39.ShellSidebarComponent, typeof i40.LibTabComponent, typeof i41.LibTabGroupComponent, typeof i42.LibStepperComponent, typeof i43.LibStepComponent, typeof i44.LibStepLabelDirective, typeof i45.LibStepInfoDirective, typeof i46.ShellSidebarHeaderComponent, typeof i47.ShellSidebarLayoutComponent, typeof i48.ShellStackedLayoutComponent, typeof i49.AdvancedSearchComponent], [typeof i50.CommonModule, typeof i51.RouterModule, typeof i52.IndiceAuthModule, typeof i53.FormsModule], [typeof i33.AddressPipe, typeof i27.AuthCallbackComponent, typeof i28.AuthRenewComponent, typeof i15.AvatarInitialsComponent, typeof i1.ClickOutsideDirective, typeof i11.CollapsiblePanelComponent, typeof i17.ComboboxComponent, typeof i14.DatepickerComponent, typeof i3.DropDownMenuComponent, typeof i34.DurationFormatPipe, typeof i30.ErrorComponent, typeof i26.FormLayoutComponent, typeof i12.KpiTileComponent, typeof i43.LibStepComponent, typeof i45.LibStepInfoDirective, typeof i44.LibStepLabelDirective, typeof i42.LibStepperComponent, typeof i40.LibTabComponent, typeof i41.LibTabGroupComponent, typeof i6.ListColumnComponent, typeof i8.ListDetailsSectionComponent, typeof i7.ListTileComponent, typeof i5.ListViewComponent, typeof i9.ListViewEmptyStateComponent, typeof i29.LoggedOutComponent, typeof i25.ModelViewLayoutComponent, typeof i31.PageNotFoundComponent, typeof i4.PagerComponent, typeof i22.ShellFooterComponent, typeof i21.ShellHeaderComponent, typeof i20.ShellLayoutComponent, typeof i13.SidePaneComponent, typeof i24.SideViewLayoutComponent, typeof i10.SkeletonLoaderComponent, typeof i19.ToasterComponent, typeof i18.ToasterContainerComponent, typeof i16.ToggleComponent, typeof i32.UnauthorizedComponent, typeof i23.ViewLayoutComponent]>;
58
60
  static ɵinj: i0.ɵɵInjectorDeclaration<IndiceComponentsModule>;
59
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indice/ng-components",
3
- "version": "0.2.160-beta.7",
3
+ "version": "0.2.160-beta.9",
4
4
  "description": "Indice common components for Angular v12",
5
5
  "repository": {
6
6
  "type": "git",