mis-crystal-design-system 18.0.15 → 18.0.16-test-2

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.
Files changed (30) hide show
  1. package/esm2022/radio-button/radio-button.component.mjs +102 -23
  2. package/esm2022/table/actions-cell/actions-cell.component.mjs +288 -0
  3. package/esm2022/table/public_api.mjs +2 -1
  4. package/esm2022/table/table.component.mjs +195 -109
  5. package/esm2022/table/table.module.mjs +17 -5
  6. package/esm2022/toast/public_api.mjs +3 -1
  7. package/esm2022/toast/toast.component.mjs +73 -16
  8. package/esm2022/toast/toast.constants.mjs +7 -0
  9. package/esm2022/toast/toast.data.service.mjs +1 -1
  10. package/esm2022/toast/toast.interface.mjs +2 -0
  11. package/esm2022/toast/toast.service.mjs +14 -7
  12. package/fesm2022/mis-crystal-design-system-radio-button.mjs +101 -22
  13. package/fesm2022/mis-crystal-design-system-radio-button.mjs.map +1 -1
  14. package/fesm2022/mis-crystal-design-system-table.mjs +848 -464
  15. package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
  16. package/fesm2022/mis-crystal-design-system-toast.mjs +93 -22
  17. package/fesm2022/mis-crystal-design-system-toast.mjs.map +1 -1
  18. package/package.json +13 -13
  19. package/radio-button/radio-button.component.d.ts +18 -17
  20. package/styles/mis-old-icon-styles.scss +498 -498
  21. package/table/actions-cell/actions-cell.component.d.ts +33 -0
  22. package/table/public_api.d.ts +1 -0
  23. package/table/table.component.d.ts +37 -10
  24. package/table/table.module.d.ts +5 -4
  25. package/toast/public_api.d.ts +2 -0
  26. package/toast/toast.component.d.ts +13 -1
  27. package/toast/toast.constants.d.ts +5 -0
  28. package/toast/toast.data.service.d.ts +3 -2
  29. package/toast/toast.interface.d.ts +6 -0
  30. package/toast/toast.service.d.ts +2 -1
@@ -0,0 +1,33 @@
1
+ import { EventEmitter, OnInit } from "@angular/core";
2
+ import { ActionItem } from "../table.component";
3
+ import * as i0 from "@angular/core";
4
+ export declare class ActionsCellComponent implements OnInit {
5
+ set rowData(value: any);
6
+ data: any;
7
+ isChecked: boolean;
8
+ set config(config: any);
9
+ actionItems: ActionItem[];
10
+ actionType: "inline" | "dropdown" | "checkbox";
11
+ submenuAlign: "left" | "right";
12
+ menuAlign: "left" | "right";
13
+ actionClick: EventEmitter<{
14
+ item?: ActionItem;
15
+ data: any;
16
+ isChecked?: boolean;
17
+ }>;
18
+ isDropdownOpen: boolean;
19
+ private _style;
20
+ containerStyle: any;
21
+ ngOnInit(): void;
22
+ private processStyle;
23
+ onActionClick(item: ActionItem, event: Event): void;
24
+ trackByAction(index: number, item: ActionItem): string;
25
+ isSvgFile(iconPath: string): boolean;
26
+ onDocumentClick(): void;
27
+ toggleDropdown(event: Event): void;
28
+ onDropdownItemClick(item: any, event: Event): void;
29
+ onCheckboxChange(event: any): void;
30
+ isDisabled(item: ActionItem): boolean;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActionsCellComponent, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<ActionsCellComponent, "mis-actions-cell", never, { "rowData": { "alias": "rowData"; "required": false; }; "isChecked": { "alias": "isChecked"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "actionClick": "actionClick"; }, never, never, false, never>;
33
+ }
@@ -7,3 +7,4 @@ export { TableConfig, PaginationConfig, RowConfig, ColHeaderConfig, ColConfig }
7
7
  export { SubTableConfig, SubTableColConfig, SubTableColHeaderConfig, SubTableRowConfig } from "./sub-table/sub-table.component";
8
8
  export { TableFilterComponent } from "./filter/filter.component";
9
9
  export { Filter } from "./filter/filter.component";
10
+ export { ActionsCellComponent } from "./actions-cell/actions-cell.component";
@@ -1,10 +1,12 @@
1
1
  import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnInit, QueryList, Renderer2 } from "@angular/core";
2
2
  import { Filter, TableFilterComponent } from "./filter/filter.component";
3
- import { SortState } from './sort-icons.directive';
3
+ import { SortState } from "./sort-icons.directive";
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class TableComponent implements OnInit, AfterViewInit, OnChanges {
6
6
  private renderer;
7
- activeRowIndex: number;
7
+ activeRowIndex: number[];
8
+ hasCheckboxActions: boolean;
9
+ selectAllCheckbox: boolean;
8
10
  showFilter: boolean;
9
11
  filterName: string;
10
12
  filterData: Array<Filter>;
@@ -37,6 +39,10 @@ export declare class TableComponent implements OnInit, AfterViewInit, OnChanges
37
39
  currentSort: SortState | null;
38
40
  multiColumnSort: SortState[];
39
41
  sortChange: EventEmitter<SortState>;
42
+ headerAction?: EventEmitter<{
43
+ type: string;
44
+ payload?: any;
45
+ }>;
40
46
  constructor(renderer: Renderer2);
41
47
  selectRow(index: number): void;
42
48
  ngOnInit(): void;
@@ -53,15 +59,19 @@ export declare class TableComponent implements OnInit, AfterViewInit, OnChanges
53
59
  getContainerHeight(): any;
54
60
  getContainerWidth(): any;
55
61
  getColHeadersRowStyles(): {
56
- 'min-height': any;
57
- 'border-top': any;
58
- 'border-bottom': any;
59
- 'background-color': any;
60
- 'font-size': any;
62
+ "min-height": any;
63
+ "border-top": any;
64
+ "border-bottom": any;
65
+ "background-color": any;
66
+ "font-size": any;
61
67
  };
62
68
  onSortChange(sortState: SortState): void;
69
+ getActionsCellStyle(style: any): any;
70
+ onActionClick(event: any, rowIndex: number): void;
71
+ isRowDisabled(row: any): boolean;
72
+ toggleCheckbox(): void;
63
73
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
64
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "mis-table", never, { "config": { "alias": "tableConfig"; "required": false; }; "subTableconfig": { "alias": "subTableconfig"; "required": false; }; "tableDataLoading": { "alias": "tableDataLoading"; "required": false; }; "expandedIndex": { "alias": "expandedIndex"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "subTableData": { "alias": "subTableData"; "required": false; }; "subTableDataLoading": { "alias": "subTableDataLoading"; "required": false; }; }, { "filtersUpdated": "filtersUpdated"; "pageSelected": "pageSelected"; "sortChange": "sortChange"; }, never, never, false, never>;
74
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "mis-table", never, { "config": { "alias": "tableConfig"; "required": false; }; "subTableconfig": { "alias": "subTableconfig"; "required": false; }; "tableDataLoading": { "alias": "tableDataLoading"; "required": false; }; "expandedIndex": { "alias": "expandedIndex"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "subTableData": { "alias": "subTableData"; "required": false; }; "subTableDataLoading": { "alias": "subTableDataLoading"; "required": false; }; }, { "filtersUpdated": "filtersUpdated"; "pageSelected": "pageSelected"; "sortChange": "sortChange"; "headerAction": "headerAction"; }, never, never, false, never>;
65
75
  }
66
76
  export interface TableConfig {
67
77
  height: string | "100%";
@@ -82,14 +92,16 @@ export interface PaginationConfig {
82
92
  rowsPerPage: number;
83
93
  totalNoOfRows: number;
84
94
  selectedPage?: number;
95
+ disablePageJumping?: boolean;
85
96
  }
86
97
  export interface RowConfig {
87
98
  height?: string | undefined | null;
88
99
  style?: {};
89
100
  action?: any;
101
+ disableRow?: (data: any) => boolean;
90
102
  }
91
103
  export interface ColHeaderConfig {
92
- type: "text" | "number" | "custom";
104
+ type: "text" | "number" | "custom" | "checkbox";
93
105
  data: any;
94
106
  componentRef?: any;
95
107
  filters?: Array<Filter> | null;
@@ -100,8 +112,23 @@ export interface ColHeaderConfig {
100
112
  sortDescIcon?: string;
101
113
  }
102
114
  export interface ColConfig {
103
- type: "text" | "number" | "custom";
115
+ type: "text" | "number" | "custom" | "actions";
104
116
  componentRef?: any;
105
117
  style?: {};
106
118
  action?: any;
119
+ actionItems?: ActionItem[];
120
+ actionType?: "inline" | "dropdown" | "checkbox";
121
+ menuAlign?: "left" | "right";
122
+ }
123
+ export interface ActionItem {
124
+ label: string;
125
+ value: string;
126
+ icon?: string;
127
+ disable?: (data: any) => boolean;
128
+ action?: (data: any) => void;
129
+ children?: ActionItem[];
130
+ submenuAlign?: "left" | "right";
131
+ }
132
+ export interface InternalActionItem extends ActionItem {
133
+ showSubmenu?: boolean;
107
134
  }
@@ -5,12 +5,13 @@ import * as i2 from "./sub-table/sub-table.component";
5
5
  import * as i3 from "./filter/filter.component";
6
6
  import * as i4 from "./custom-table-cell.directive";
7
7
  import * as i5 from "./sort-icons.directive";
8
- import * as i6 from "@angular/common";
9
- import * as i7 from "mis-crystal-design-system/checkbox";
10
- import * as i8 from "@angular/cdk/scrolling";
8
+ import * as i6 from "./actions-cell/actions-cell.component";
9
+ import * as i7 from "@angular/common";
10
+ import * as i8 from "mis-crystal-design-system/checkbox";
11
+ import * as i9 from "@angular/cdk/scrolling";
11
12
  export declare class TableModule {
12
13
  static forRoot(): ModuleWithProviders<TableModule>;
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<TableModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<TableModule, [typeof i1.TableComponent, typeof i2.SubTableComponent, typeof i3.TableFilterComponent, typeof i4.CustomTableCellDirective, typeof i5.SortIconsDirective], [typeof i6.CommonModule, typeof i7.CheckboxModule, typeof i8.ScrollingModule], [typeof i1.TableComponent, typeof i2.SubTableComponent, typeof i3.TableFilterComponent, typeof i4.CustomTableCellDirective, typeof i5.SortIconsDirective]>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TableModule, [typeof i1.TableComponent, typeof i2.SubTableComponent, typeof i3.TableFilterComponent, typeof i4.CustomTableCellDirective, typeof i5.SortIconsDirective, typeof i6.ActionsCellComponent], [typeof i7.CommonModule, typeof i8.CheckboxModule, typeof i9.ScrollingModule], [typeof i1.TableComponent, typeof i2.SubTableComponent, typeof i3.TableFilterComponent, typeof i4.CustomTableCellDirective, typeof i5.SortIconsDirective, typeof i6.ActionsCellComponent]>;
15
16
  static ɵinj: i0.ɵɵInjectorDeclaration<TableModule>;
16
17
  }
@@ -2,3 +2,5 @@ export * from "./toast.service";
2
2
  export * from "./toast.module";
3
3
  export * from "./toast.data.service";
4
4
  export { ToastComponent } from "./toast.component";
5
+ export * from "./toast.interface";
6
+ export * from "./toast.constants";
@@ -1,8 +1,20 @@
1
+ import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
1
2
  import { ToastDataService } from "./toast.data.service";
3
+ import { ToastState } from "./toast.interface";
2
4
  import * as i0 from "@angular/core";
5
+ type Toast = string | {
6
+ text: string;
7
+ state?: ToastState;
8
+ };
3
9
  export declare class ToastComponent {
4
10
  data: ToastDataService;
5
- constructor(data: ToastDataService);
11
+ private sanitizer;
12
+ constructor(data: ToastDataService, sanitizer: DomSanitizer);
13
+ getMessage(toast: Toast): string;
14
+ shouldShowIcon(toast: Toast): boolean;
15
+ getStateIcon(state?: ToastState): SafeHtml;
16
+ private isStringToast;
6
17
  static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>;
7
18
  static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "mis-teams-toast", never, {}, {}, never, never, false, never>;
8
19
  }
20
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const TOAST_STATES: {
2
+ readonly SUCCESS: "success";
3
+ readonly WARNING: "warning";
4
+ readonly ERROR: "error";
5
+ };
@@ -1,9 +1,10 @@
1
+ import { ToastMessage } from "./toast.interface";
1
2
  import * as i0 from "@angular/core";
2
3
  export declare class ToastDataService {
3
4
  private messageMap;
4
- get messages(): string[];
5
+ get messages(): (ToastMessage | string)[];
5
6
  constructor();
6
- updateMessage(msg: string): number;
7
+ updateMessage(msg: ToastMessage | string): number;
7
8
  removeMessage(id: number): void;
8
9
  hasMessage(): boolean;
9
10
  static ɵfac: i0.ɵɵFactoryDeclaration<ToastDataService, never>;
@@ -0,0 +1,6 @@
1
+ export type ToastState = 'success' | 'warning' | 'error';
2
+ export interface ToastMessage {
3
+ text: string;
4
+ state?: ToastState;
5
+ timeout?: number;
6
+ }
@@ -1,5 +1,6 @@
1
1
  import { Overlay } from "@angular/cdk/overlay";
2
2
  import { ToastDataService } from "./toast.data.service";
3
+ import { ToastState } from "./toast.interface";
3
4
  import * as i0 from "@angular/core";
4
5
  type Operations = "created" | "updated" | "deleted" | "create" | "update" | "delete";
5
6
  export declare class ToastService {
@@ -30,7 +31,7 @@ export declare class ToastService {
30
31
  simple: (...args: string[]) => string;
31
32
  simplest: string;
32
33
  };
33
- displayMsg(msg: string, timeout?: number): void;
34
+ displayMsg(message: string, timeout?: number, state?: ToastState): void;
34
35
  private closeToastOverlay;
35
36
  static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
36
37
  static ɵprov: i0.ɵɵInjectableDeclaration<ToastService>;