mis-crystal-design-system 2.3.3 → 2.3.7

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 (42) hide show
  1. package/bundles/mis-crystal-design-system-dropdown.umd.js +1 -1
  2. package/bundles/mis-crystal-design-system-dropdown.umd.min.js +1 -1
  3. package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +1 -1
  4. package/bundles/mis-crystal-design-system-table.umd.js +3 -3
  5. package/bundles/mis-crystal-design-system-table.umd.min.js +1 -1
  6. package/bundles/mis-crystal-design-system-table.umd.min.js.map +1 -1
  7. package/bundles/mis-crystal-design-system-widgets.umd.js +477 -0
  8. package/bundles/mis-crystal-design-system-widgets.umd.js.map +1 -0
  9. package/bundles/mis-crystal-design-system-widgets.umd.min.js +16 -0
  10. package/bundles/mis-crystal-design-system-widgets.umd.min.js.map +1 -0
  11. package/dropdown/mis-crystal-design-system-dropdown.metadata.json +1 -1
  12. package/esm2015/dropdown/dropdown.component.js +1 -1
  13. package/esm2015/table/filter/filter.component.js +1 -1
  14. package/esm2015/table/table.component.js +2 -2
  15. package/esm2015/widgets/classes/async-widget.js +22 -0
  16. package/esm2015/widgets/classes/base-widget.js +32 -0
  17. package/esm2015/widgets/classes/sync-widget.js +20 -0
  18. package/esm2015/widgets/classes/widget-group.js +32 -0
  19. package/esm2015/widgets/index.js +2 -0
  20. package/esm2015/widgets/interfaces/widgets.model.js +2 -0
  21. package/esm2015/widgets/mis-crystal-design-system-widgets.js +5 -0
  22. package/esm2015/widgets/public_api.js +7 -0
  23. package/esm2015/widgets/services/widget.service.js +16 -0
  24. package/esm2015/widgets/widgets.module.js +12 -0
  25. package/fesm2015/mis-crystal-design-system-dropdown.js +1 -1
  26. package/fesm2015/mis-crystal-design-system-table.js +3 -3
  27. package/fesm2015/mis-crystal-design-system-widgets.js +122 -0
  28. package/fesm2015/mis-crystal-design-system-widgets.js.map +1 -0
  29. package/package.json +1 -1
  30. package/table/mis-crystal-design-system-table.metadata.json +1 -1
  31. package/widgets/classes/async-widget.d.ts +8 -0
  32. package/widgets/classes/base-widget.d.ts +14 -0
  33. package/widgets/classes/sync-widget.d.ts +8 -0
  34. package/widgets/classes/widget-group.d.ts +16 -0
  35. package/widgets/index.d.ts +1 -0
  36. package/widgets/interfaces/widgets.model.d.ts +13 -0
  37. package/widgets/mis-crystal-design-system-widgets.d.ts +4 -0
  38. package/widgets/mis-crystal-design-system-widgets.metadata.json +1 -0
  39. package/widgets/package.json +11 -0
  40. package/widgets/public_api.d.ts +6 -0
  41. package/widgets/services/widget.service.d.ts +6 -0
  42. package/widgets/widgets.module.d.ts +2 -0
@@ -0,0 +1,122 @@
1
+ import { ReplaySubject, Subject } from 'rxjs';
2
+ import { switchMap, tap } from 'rxjs/operators';
3
+ import { NgModule } from '@angular/core';
4
+ import { CommonModule } from '@angular/common';
5
+
6
+ class BaseWidget {
7
+ constructor(data, customStates = []) {
8
+ // Get loader stream
9
+ this.loader$ = new ReplaySubject(1);
10
+ this.loader = this.loader$.asObservable();
11
+ this.state = {};
12
+ // reset data/stream
13
+ this.reset$ = new Subject();
14
+ this.customStates = customStates;
15
+ }
16
+ // Toggle loader with value
17
+ toggleLoader(value) {
18
+ this.loader$.next(value);
19
+ }
20
+ // Trigger widget refresh
21
+ reset() {
22
+ this.reset$.next();
23
+ }
24
+ updateValue(data) { }
25
+ updateCustomStates(customStates, value) {
26
+ if (customStates.length > 0) {
27
+ customStates.forEach(customState => {
28
+ this.state = Object.assign(Object.assign({}, this.state), customState(value));
29
+ });
30
+ }
31
+ else {
32
+ this.state = {};
33
+ }
34
+ }
35
+ }
36
+
37
+ class SyncWidget extends BaseWidget {
38
+ // @param dataStream: Stream to subscribe to when widget refreshed
39
+ constructor(data, customStates = []) {
40
+ super(data, customStates);
41
+ if (data) {
42
+ this.value = data;
43
+ }
44
+ }
45
+ // Change data value
46
+ updateValue(value) {
47
+ this.value = value;
48
+ this.updateCustomStates(this.customStates, value);
49
+ }
50
+ reset() {
51
+ super.reset();
52
+ this.value = null;
53
+ }
54
+ }
55
+
56
+ // Data type that the stream will return
57
+ class AsyncWidget extends BaseWidget {
58
+ // @param dataStream: Stream to subscribe to when widget refreshed
59
+ constructor(dataStream, customStates = []) {
60
+ super(dataStream, customStates);
61
+ if (dataStream) {
62
+ this.updateValue(dataStream);
63
+ }
64
+ }
65
+ // Change widget data stream
66
+ updateValue(dataStream) {
67
+ this.value = this.reset$.pipe(switchMap(() => {
68
+ this.toggleLoader(true);
69
+ return dataStream.pipe(tap(() => {
70
+ this.toggleLoader(false);
71
+ }), tap((value) => this.updateCustomStates(this.customStates, value)));
72
+ }));
73
+ }
74
+ }
75
+
76
+ class WidgetGroup extends BaseWidget {
77
+ constructor(widgets) {
78
+ super();
79
+ this.items = new Map();
80
+ Object.keys(widgets).forEach(key => {
81
+ this.addWidget(key, widgets[key]);
82
+ });
83
+ }
84
+ get value() {
85
+ const keys = Array.from(this.items.keys());
86
+ return keys.reduce((acc, key) => {
87
+ return Object.assign(Object.assign({}, acc), { [key]: this.get(key).value });
88
+ }, {});
89
+ }
90
+ get widgets() {
91
+ return Array.from(this.items.values());
92
+ }
93
+ addWidget(key, widget) {
94
+ this.items.set(key, widget);
95
+ }
96
+ get(key) {
97
+ return this.items.get(key);
98
+ }
99
+ removeWidget(key) {
100
+ this.items.delete(key);
101
+ }
102
+ reset() {
103
+ this.widgets.forEach(widget => widget.reset());
104
+ }
105
+ }
106
+
107
+ class WidgetsModule {
108
+ }
109
+ WidgetsModule.decorators = [
110
+ { type: NgModule, args: [{
111
+ declarations: [],
112
+ imports: [CommonModule],
113
+ providers: []
114
+ },] }
115
+ ];
116
+
117
+ /**
118
+ * Generated bundle index. Do not edit.
119
+ */
120
+
121
+ export { AsyncWidget, BaseWidget, SyncWidget, WidgetGroup, WidgetsModule };
122
+ //# sourceMappingURL=mis-crystal-design-system-widgets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mis-crystal-design-system-widgets.js","sources":["../../../projects/mis-components/widgets/classes/base-widget.ts","../../../projects/mis-components/widgets/classes/sync-widget.ts","../../../projects/mis-components/widgets/classes/async-widget.ts","../../../projects/mis-components/widgets/classes/widget-group.ts","../../../projects/mis-components/widgets/widgets.module.ts","../../../projects/mis-components/widgets/mis-crystal-design-system-widgets.ts"],"sourcesContent":["import { ReplaySubject, Subject } from \"rxjs\";\nimport { CustomState, WidgetStateMap } from \"../interfaces/widgets.model\";\n\nexport class BaseWidget<D> {\n // Get loader stream\n private loader$ = new ReplaySubject<boolean>(1);\n loader = this.loader$.asObservable();\n protected customStates: Array<CustomState<D>>;\n state: WidgetStateMap = {};\n\n constructor(data?: unknown, customStates: Array<CustomState<D>> = []) {\n this.customStates = customStates;\n }\n\n // Toggle loader with value\n toggleLoader(value: boolean): void {\n this.loader$.next(value);\n }\n // reset data/stream\n protected reset$ = new Subject<void>();\n\n // Trigger widget refresh\n reset(): void {\n this.reset$.next();\n }\n\n updateValue(data: unknown): void {}\n\n protected updateCustomStates(customStates: Array<CustomState<D>>, value: D): void {\n if (customStates.length > 0) {\n customStates.forEach(customState => {\n this.state = { ...this.state, ...customState(value) };\n });\n } else {\n this.state = {};\n }\n }\n}\n","import { CustomState } from \"../interfaces/widgets.model\";\nimport { BaseWidget } from \"./base-widget\";\n\nexport class SyncWidget<D = any> extends BaseWidget<D> {\n // DataObject with widget functionalities\n value: D;\n\n // @param dataStream: Stream to subscribe to when widget refreshed\n constructor(data?: D, customStates: Array<CustomState<D>> = []) {\n super(data, customStates);\n if (data) {\n this.value = data;\n }\n }\n\n // Change data value\n updateValue(value: D): void {\n this.value = value;\n this.updateCustomStates(this.customStates, value);\n }\n\n reset(): void {\n super.reset();\n this.value = null;\n }\n}\n","import { Observable } from \"rxjs\";\nimport { tap, switchMap } from \"rxjs/operators\";\nimport { CustomState, WidgetStateMap } from \"../interfaces/widgets.model\";\nimport { BaseWidget } from \"./base-widget\";\n// Data type that the stream will return\nexport class AsyncWidget<D = any> extends BaseWidget<D> {\n // Stream with widget functionalities\n value: Observable<D>;\n\n // @param dataStream: Stream to subscribe to when widget refreshed\n constructor(dataStream?: Observable<D>, customStates: Array<CustomState<D>> = []) {\n super(dataStream, customStates);\n if (dataStream) {\n this.updateValue(dataStream);\n }\n }\n\n // Change widget data stream\n updateValue(dataStream: Observable<D>): void {\n this.value = this.reset$.pipe(\n switchMap(() => {\n this.toggleLoader(true);\n return dataStream.pipe(\n tap(() => {\n this.toggleLoader(false);\n }),\n tap((value: D) => this.updateCustomStates(this.customStates, value))\n );\n })\n );\n }\n}\n","import { BaseWidget } from \"./base-widget\";\nimport { WidgetMap } from \"../interfaces/widgets.model\";\nimport { AsyncWidget } from \"./async-widget\";\nimport { SyncWidget } from \"./sync-widget\";\n\nexport class WidgetGroup extends BaseWidget<any> {\n private items = new Map<string, SyncWidget | AsyncWidget | WidgetGroup>();\n\n constructor(widgets: WidgetMap) {\n super();\n Object.keys(widgets).forEach(key => {\n this.addWidget(key, widgets[key]);\n });\n }\n\n get value(): { [key: string]: any } {\n const keys = Array.from(this.items.keys());\n return keys.reduce((acc, key) => {\n return { ...acc, [key]: this.get(key).value };\n }, {});\n }\n\n get widgets() {\n return Array.from(this.items.values());\n }\n\n addWidget(key: string, widget: SyncWidget | AsyncWidget): void {\n this.items.set(key, widget);\n }\n\n get(key: string): SyncWidget | AsyncWidget | WidgetGroup {\n return this.items.get(key);\n }\n\n removeWidget(key: string): void {\n this.items.delete(key);\n }\n\n reset(): void {\n this.widgets.forEach(widget => widget.reset());\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { WidgetService } from \"./services/widget.service\";\n\n@NgModule({\n declarations: [],\n imports: [CommonModule],\n providers: []\n})\nexport class WidgetsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAGa,UAAU;IAOrB,YAAY,IAAc,EAAE,eAAsC,EAAE;;QAL5D,YAAO,GAAG,IAAI,aAAa,CAAU,CAAC,CAAC,CAAC;QAChD,WAAM,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAErC,UAAK,GAAmB,EAAE,CAAC;;QAWjB,WAAM,GAAG,IAAI,OAAO,EAAQ,CAAC;QARrC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;KAClC;;IAGD,YAAY,CAAC,KAAc;QACzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC1B;;IAKD,KAAK;QACH,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KACpB;IAED,WAAW,CAAC,IAAa,KAAU;IAEzB,kBAAkB,CAAC,YAAmC,EAAE,KAAQ;QACxE,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,YAAY,CAAC,OAAO,CAAC,WAAW;gBAC9B,IAAI,CAAC,KAAK,mCAAQ,IAAI,CAAC,KAAK,GAAK,WAAW,CAAC,KAAK,CAAC,CAAE,CAAC;aACvD,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;SACjB;KACF;;;MCjCU,UAAoB,SAAQ,UAAa;;IAKpD,YAAY,IAAQ,EAAE,eAAsC,EAAE;QAC5D,KAAK,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAC1B,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;SACnB;KACF;;IAGD,WAAW,CAAC,KAAQ;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;KACnD;IAED,KAAK;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;KACnB;;;ACpBH;MACa,WAAqB,SAAQ,UAAa;;IAKrD,YAAY,UAA0B,EAAE,eAAsC,EAAE;QAC9E,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAChC,IAAI,UAAU,EAAE;YACd,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SAC9B;KACF;;IAGD,WAAW,CAAC,UAAyB;QACnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAC3B,SAAS,CAAC;YACR,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACxB,OAAO,UAAU,CAAC,IAAI,CACpB,GAAG,CAAC;gBACF,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;aAC1B,CAAC,EACF,GAAG,CAAC,CAAC,KAAQ,KAAK,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CACrE,CAAC;SACH,CAAC,CACH,CAAC;KACH;;;MCzBU,WAAY,SAAQ,UAAe;IAG9C,YAAY,OAAkB;QAC5B,KAAK,EAAE,CAAC;QAHF,UAAK,GAAG,IAAI,GAAG,EAAkD,CAAC;QAIxE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG;YAC9B,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;SACnC,CAAC,CAAC;KACJ;IAED,IAAI,KAAK;QACP,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG;YAC1B,uCAAY,GAAG,KAAE,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,IAAG;SAC/C,EAAE,EAAE,CAAC,CAAC;KACR;IAED,IAAI,OAAO;QACT,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;KACxC;IAED,SAAS,CAAC,GAAW,EAAE,MAAgC;QACrD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;KAC7B;IAED,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KAC5B;IAED,YAAY,CAAC,GAAW;QACtB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;KACxB;IAED,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;KAChD;;;MC/BU,aAAa;;;YALzB,QAAQ,SAAC;gBACR,YAAY,EAAE,EAAE;gBAChB,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,SAAS,EAAE,EAAE;aACd;;;ACRD;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mis-crystal-design-system",
3
- "version": "2.3.3",
3
+ "version": "2.3.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "*",
6
6
  "@angular/core": "*",
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"sub-table","template":"<div\n id=\"main-container\"\n [ngStyle]=\"{\n height: getContainerHeight(),\n width: getContainerWidth()\n }\"\n>\n <div id=\"table-container\" #table>\n <div\n id=\"col-headers-container\"\n *ngIf=\"!!config.showHeader\"\n [ngStyle]=\"{\n height: getColHeadersRowHeight(),\n 'border-top': getColHeadersRowBorderTop(),\n 'border-bottom': getColHeadersRowBorderBottom()\n }\"\n >\n <div\n class=\"col-header\"\n (click)=\"colHeader?.action ? colHeader?.action(colHeader) : null\"\n *ngFor=\"let colHeader of config?.colHeaderConfig\"\n [style]=\"colHeader?.style\"\n [ngStyle]=\"{\n width: colHeader?.style?.width || '',\n cursor: colHeader.action ? 'pointer' : 'default',\n 'justify-content': colHeader?.style?.justifyContent ? colHeader?.style?.justifyContent :\n colHeader.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\">\n <p *ngIf=\"colHeader?.type !== 'custom'\" class=\"col-header-text\">\n {{ colHeader?.data || \" \" }}\n </p>\n <ng-template\n *ngIf=\"colHeader?.type === 'custom'\"\n customTableCell\n [customComponent]=\"colHeader?.componentRef\"\n [data]=\"colHeader.data\"\n ></ng-template>\n </div>\n </div>\n <div>\n <cdk-virtual-scroll-viewport [minBufferPx]=\"config.dataContainerMaxHeight || '400'\" [maxBufferPx]=\"config.dataContainerMaxHeight + 200 || '600'\" [style.overflow]=\"'overlay'\" [style.height]=\"config.dataContainerMaxHeight || '400px'\" itemSize=\"50\" id=\"data-container\">\n <div\n class=\"row-wrapper\"\n *cdkVirtualFor=\"let row of tableData; let i = index\"\n [ngStyle]=\"{\n backgroundColor: i % 2 === 0 ? '#FAFAFA' : null\n }\"\n >\n <div class=\"t-row\">\n <div\n (click)=\"\n config?.colConfig[i]?.action\n ? config?.colConfig[i]?.action(col)\n : null\n \"\n *ngFor=\"let col of row; let i = index\"\n [ngStyle]=\"{\n width: config?.colConfig[i]?.style?.width || config?.colHeaderConfig[i]?.style?.width || ''\n }\"\n class=\"t-col-container\"\n >\n <div\n class=\"t-col\"\n [style]=\"config.colConfig[i]?.style\"\n [ngStyle]=\"{\n width: '100%',\n cursor: config.colConfig[i].action ? 'pointer' : 'default',\n 'justify-content': config.colConfig[i]?.style?.justifyContent ? config.colConfig[i]?.style?.justifyContent :\n config.colConfig[i].type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\">\n <p\n *ngIf=\"config.colConfig[i].type !== 'custom'\"\n [ngStyle]=\"{\n color: config?.colConfig[i]?.style?.color\n ? config?.colConfig[i]?.style?.color\n : ''\n }\"\n class=\"t-col-text\"\n >\n {{ col }}\n </p>\n <ng-template\n *ngIf=\"config.colConfig[i].type === 'custom'\"\n [customComponent]=\"config.colConfig[i].componentRef\"\n [data]=\"col\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n </div>\n</div>\n","styles":["#main-container{font-family:Lato,sans-serif}#table-container{height:inherit}#col-headers-container{display:flex;background-color:#fff;height:36px;border-bottom:1px solid #e0e0e0}#data-container{overflow:scroll;width:100%}#data-container::-webkit-scrollbar{width:8px}#data-container::-webkit-scrollbar-thumb{background:#9aa7b4}.col-header{height:100%;width:160px;padding:0 16px}.col-header,.col-header-text{display:flex;align-items:center}.col-header-text{font-style:normal;font-weight:700;font-size:14px;line-height:20px;letter-spacing:.25px;margin:0}.t-row{display:flex;align-items:center;height:36px;width:100%;border-bottom:1px solid #e0e0e0}.t-row:hover{background-color:#f1fdf8}.t-col-container{padding:0 16px;height:100%}.t-col{height:100%}.t-col,.t-col-text{display:flex;align-items:center}.t-col-text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;letter-spacing:.2px;margin:0}"]}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"tableData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"table":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":21,"character":3},"arguments":["table"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":22,"character":32}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"getContainerHeight":[{"__symbolic":"method"}],"getContainerWidth":[{"__symbolic":"method"}],"getColHeadersRowHeight":[{"__symbolic":"method"}],"getColHeadersRowBorderTop":[{"__symbolic":"method"}],"getColHeadersRowBorderBottom":[{"__symbolic":"method"}]}},"TableComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":15,"character":1},"arguments":[{"selector":"mis-table","template":"<div\n [ngStyle]=\"{\n height: getContainerHeight(),\n width: getContainerWidth(),\n 'overflow-x': config.canScrollHorizontally ? 'auto' : 'unset'\n }\"\n id=\"main-container\"\n>\n <mis-table-filter\n #filter\n (filtersApplied)=\"updateAppliedFilters($event)\"\n *ngIf=\"showFilter\"\n [containerStyles]=\"filterContainerStyles\"\n [filtersData]=\"filterData\"\n ></mis-table-filter>\n <div #table id=\"table-container\" [ngClass]=\"{ 'scrollbar': expandedIndex < 0, 'no-scrollbar': !(expandedIndex < 0), 'scroll-horizontally': config.canScrollHorizontally }\">\n <div\n [ngStyle]=\"{\n 'min-height': getColHeadersRowHeight(),\n 'border-top': getColHeadersRowBorderTop(),\n 'border-bottom': getColHeadersRowBorderBottom()\n }\"\n id=\"col-headers-container\"\n >\n <div\n #colHeaderRef\n (click)=\"colHeader?.action ? colHeader?.action(colHeader) : null\"\n *ngFor=\"let colHeader of config?.colHeaderConfig\"\n class=\"col-header\"\n [ngStyle]=\"{\n width: colHeader?.style?.width || '',\n cursor: colHeader.action ? 'pointer' : 'default',\n 'justify-content': colHeader?.style?.justifyContent ? colHeader?.style?.justifyContent :\n colHeader.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\">\n <p *ngIf=\"colHeader?.type !== 'custom'\" class=\"col-header-text\">\n {{ colHeader?.data || \" \" }}\n </p>\n <span\n (click)=\"\n filterData = colHeader.filters;\n toggleFilter(colHeader.data);\n $event.stopPropagation()\n \"\n *ngIf=\"\n colHeader?.type !== 'custom' &&\n colHeader?.filters &&\n colHeader?.filters?.length > 0\n \"\n class=\"filter-icon\"\n >\n <span *ngIf=\"appliedFilters[colHeader.data]?.length > 0\" id=\"filter-active\"></span>\n <svg\n fill=\"none\"\n height=\"10\"\n viewBox=\"0 0 13 10\"\n width=\"13\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clip-rule=\"evenodd\"\n d=\"M4.97546 10H7.64213V8H4.97546V10ZM0.308472 0V2H12.3085V0H0.308472ZM2.30847 6H10.3085V4H2.30847V6Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <ng-template\n *ngIf=\"colHeader?.type === 'custom'\"\n [customComponent]=\"colHeader?.componentRef\"\n [data]=\"colHeader.data\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n <div id=\"data-container\">\n <div class=\"row-wrapper\" *ngFor=\"let row of tableData; let i = index\">\n <div class=\"t-row\" [ngStyle]=\"{'min-height': (config?.rowConfig?.height) ? config.rowConfig.height: '44px'}\">\n <div\n (click)=\"\n config?.colConfig[i]?.action\n ? config?.colConfig[i]?.action(col)\n : null\n \"\n *ngFor=\"let col of row; let i = index\"\n [ngStyle]=\"{\n width: config?.colConfig[i]?.style?.width || config?.colHeaderConfig[i]?.style?.width || ''\n }\"\n class=\"t-col-container\"\n >\n <div\n class=\"t-col\"\n [style]=\"config.colConfig[i]?.style\"\n [ngStyle]=\"{\n width: '100%',\n cursor: config.colConfig[i].action ? 'pointer' : 'default',\n 'justify-content': config.colConfig[i]?.style?.justifyContent ? config.colConfig[i]?.style?.justifyContent :\n config.colConfig[i].type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\">\n <p\n *ngIf=\"config.colConfig[i].type !== 'custom'\"\n [ngStyle]=\"{\n color: config?.colConfig[i]?.style?.color\n ? config?.colConfig[i]?.style?.color\n : ''\n }\"\n class=\"t-col-text\"\n >\n {{ col }}\n </p>\n <ng-template\n *ngIf=\"config.colConfig[i].type === 'custom'\"\n [customComponent]=\"config.colConfig[i].componentRef\"\n [data]=\"col\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n </div>\n <div *ngIf=\"config?.canExpand && expandedIndex === i\" class=\"sub-row\">\n <ng-container *ngIf=\"subTableDataLoading\">\n <div\n style=\"\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 16px;\n \"\n >\n Loading...\n </div>\n </ng-container>\n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length === 0\">\n <div\n style=\"\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 16px;\n \"\n >\n No Data Available...\n </div>\n </ng-container>\n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length > 0\">\n <sub-table [config]=\"subTableconfig\" [tableData]=\"subTableData\"></sub-table>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"config?.paginationConfig\" id=\"pagination-container\">\n <p id=\"pagination-text\">\n Showing\n {{ (selectedPage - 1) * config.paginationConfig.rowsPerPage + 1 }}-{{\n (selectedPage - 1) * config.paginationConfig.rowsPerPage +\n tableData.length\n }}\n of {{ config.paginationConfig.totalNoOfRows }} items\n </p>\n <div id=\"pages-container\">\n <span (click)=\"updateSelectedPage(selectedPage - 1)\" class=\"page\">\n <svg\n fill=\"none\"\n height=\"10\"\n viewBox=\"0 0 7 10\"\n width=\"7\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clip-rule=\"evenodd\"\n d=\"M0.857405 5.56295C0.855794 5.56139 0.854188 5.55982 0.852588 5.55824C0.695955 5.40408 0.617641 5.20203 0.617647 4.99998C0.617641 4.79793 0.695955 4.59588 0.852588 4.44172C0.854188 4.44014 0.855794 4.43858 0.857404 4.43702L5.13066 0.231231C5.44392 -0.0770771 5.9518 -0.0770771 6.26506 0.231231C6.57831 0.53954 6.57831 1.03941 6.26506 1.34772L2.5542 4.99998L6.26506 8.65225C6.57831 8.96055 6.57831 9.46042 6.26506 9.76873C5.9518 10.077 5.44392 10.077 5.13066 9.76873L0.857405 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <div *ngFor=\"let pageNumber of pages\">\n <span\n (click)=\"updateSelectedPage(pageNumber)\"\n *ngIf=\"pageNumber != 0\"\n [ngClass]=\"{ 'page-active': pageNumber == selectedPage }\"\n class=\"page\"\n >{{ pageNumber }}</span\n >\n <span *ngIf=\"pageNumber == 0\" class=\"page-seperator\">\n <div style=\"display: flex\">\n <span class=\"dot\" style=\"margin-right: 4px\"></span>\n <span class=\"dot\" style=\"margin-right: 4px\"></span>\n <span class=\"dot\"></span>\n </div>\n </span>\n </div>\n <span (click)=\"updateSelectedPage(selectedPage + 1)\" class=\"page\">\n <svg\n fill=\"none\"\n height=\"10\"\n viewBox=\"0 0 7 10\"\n width=\"7\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clip-rule=\"evenodd\"\n d=\"M6.1426 5.56295C6.14421 5.56139 6.14581 5.55982 6.14741 5.55824C6.30405 5.40408 6.38236 5.20203 6.38236 4.99998C6.38236 4.79793 6.30405 4.59588 6.14741 4.44172C6.14581 4.44014 6.14421 4.43858 6.1426 4.43702L1.86934 0.231231C1.55608 -0.0770771 1.0482 -0.0770771 0.734942 0.231231C0.421688 0.53954 0.421688 1.03941 0.734942 1.34772L4.4458 4.99998L0.734941 8.65225C0.421686 8.96055 0.421686 9.46042 0.734941 9.76873C1.0482 10.077 1.55608 10.077 1.86934 9.76873L6.1426 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n </div>\n </div>\n</div>\n","styles":["#main-container{font-family:Lato,sans-serif;position:relative}.no-scrollbar::-webkit-scrollbar{width:0}.scrollbar::-webkit-scrollbar{width:8px;height:8px}.scrollbar::-webkit-scrollbar-thumb{background:#9aa7b4}#table-container{height:inherit;overflow-y:auto}.scroll-horizontally{height:inherit;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container{display:flex;align-items:center;position:-webkit-sticky;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header{padding:0 16px;height:100%}.col-header,.col-header-text{display:flex;align-items:center}.col-header-text{font-style:normal;font-weight:700;font-size:14px;line-height:20px;letter-spacing:.2px;margin:0}.filter-icon{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row{height:auto;border-bottom:none}.loader ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#0937b2}.t-row{display:flex;align-items:center;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row:hover{background-color:#f1fdf8}.t-col-container{padding:0 16px;height:100%}.t-col{height:100%}.t-col,.t-col-text{display:flex;align-items:center}.t-col-text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;margin:0}#pagination-container{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container{display:flex;margin-right:32px}.page{border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;cursor:pointer}.page,.page-seperator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active{color:#0937b2;border:1px solid #0937b2}"]}]}],"members":{"filtersUpdated":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":28,"character":3}}]}],"filter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":32,"character":3},"arguments":["filter"]}]}],"colHeaders":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChildren","line":33,"character":3},"arguments":["colHeaderRef"]}]}],"pageSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":39,"character":3}}]}],"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3},"arguments":["tableConfig"]}]}],"subTableconfig":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":3}}]}],"tableDataLoading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"expandedIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"tableData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"subTableData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"subTableDataLoading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}}]}],"table":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":48,"character":3},"arguments":["table"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":50,"character":32}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"initializeFilters":[{"__symbolic":"method"}],"toggleFilter":[{"__symbolic":"method"}],"updateAppliedFilters":[{"__symbolic":"method"}],"initializePagination":[{"__symbolic":"method"}],"updateSelectedPage":[{"__symbolic":"method"}],"getContainerHeight":[{"__symbolic":"method"}],"getContainerWidth":[{"__symbolic":"method"}],"getColHeadersRowHeight":[{"__symbolic":"method"}],"getColHeadersRowBorderTop":[{"__symbolic":"method"}],"getColHeadersRowBorderBottom":[{"__symbolic":"method"}]}},"CustomTableCellDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":7,"character":1},"arguments":[{"selector":"[customTableCell]"}]}],"members":{"customComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":26,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":27,"character":38}]}],"createComponent":[{"__symbolic":"method"}],"setData":[{"__symbolic":"method"}]}},"TableModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":9,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"TableComponent"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"TableFilterComponent"},{"__symbolic":"reference","name":"CustomTableCellDirective"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":17,"character":4},{"__symbolic":"reference","module":"mis-crystal-design-system/checkbox","name":"CheckboxModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ScrollingModule","line":19,"character":4}],"exports":[{"__symbolic":"reference","name":"TableComponent"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"TableFilterComponent"},{"__symbolic":"reference","name":"CustomTableCellDirective"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"TableModule"},"providers":[]}}}},"TableConfig":{"__symbolic":"interface"},"PaginationConfig":{"__symbolic":"interface"},"RowConfig":{"__symbolic":"interface"},"ColHeaderConfig":{"__symbolic":"interface"},"ColConfig":{"__symbolic":"interface"},"SubTableConfig":{"__symbolic":"interface"},"SubTableColConfig":{"__symbolic":"interface"},"SubTableColHeaderConfig":{"__symbolic":"interface"},"SubTableRowConfig":{"__symbolic":"interface"},"TableFilterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"mis-table-filter","template":"<div id=\"main-container\"\n #mainContainer\n [ngStyle]=\"containerStyles\"\n>\n <div id=\"search-bar-container\">\n <input (keyup)=\"updateSearchValue($event)\" type=\"text\" placeholder=\"Search\">\n <svg id=\"search-icon\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.21496 8.14563C1.21496 4.3179 4.33709 1.21165 8.19249 1.21165C12.0479 1.21165 15.17 4.3179 15.17 8.14563C15.17 9.69308 14.6598 11.1226 13.797 12.2767L12.3684 13.7013C11.2043 14.5668 9.75891 15.0796 8.19249 15.0796C4.33709 15.0796 1.21496 11.9734 1.21496 8.14563ZM12.9419 14.7835C11.602 15.7329 9.96259 16.2913 8.19249 16.2913C3.66965 16.2913 -0.00012207 12.6461 -0.00012207 8.14563C-0.00012207 3.64512 3.66965 0 8.19249 0C12.7153 0 16.3851 3.64512 16.3851 8.14563C16.3851 9.93713 15.8036 11.5931 14.8183 12.9375L16.836 14.4048C17.6704 14.912 18.7553 15.6543 17.2453 17.215C15.7352 18.7756 15.0098 17.6663 14.499 16.8364L12.9419 14.7835Z\" fill=\"#6A737D\"/>\n </svg>\n </div>\n <div id=\"filters-main-container\">\n <div class=\"filters-sub-container\">\n <div *ngFor=\"let filter of getCheckedFilters()\">\n <div class=\"filter\">\n <mis-checkbox\n [checked]=\"true\"\n [name]=\"filter.value\"\n (valueChange)=\"updateFilter($event)\"\n ></mis-checkbox>\n <span class=\"filter-text\">{{filter.name}}</span>\n </div>\n </div>\n </div>\n <div class=\"separator\" style=\"margin: 16px 0px;\" *ngIf=\"getCheckedFilters().length && (getCheckedFilters().length < filtersData.length)\"></div>\n <div class=\"filters-sub-container\">\n <div *ngFor=\"let filter of getFiltersBasedOnSearchValue()\">\n <div class=\"filter\" *ngIf=\"!filter.checked\">\n <mis-checkbox\n [checked]=\"false\"\n [name]=\"filter.value\"\n (valueChange)=\"updateFilter($event)\"\n ></mis-checkbox>\n <span class=\"filter-text\">{{filter.name}}</span>\n </div>\n </div>\n <div id=\"no-results-container\" *ngIf=\"getFiltersBasedOnSearchValue().length < 1\">\n <span class=\"filter-text\">No matches found</span>\n </div>\n </div>\n <div class=\"separator\" style=\"margin: 16px 0px;\"></div>\n <div id=\"buttons-container\">\n <button id=\"reset-btn\" style=\"margin-right: 8px;\" (click)=\"resetFilters()\">Reset</button>\n <button id=\"apply-btn\" (click)=\"applyFilters()\">Apply</button>\n </div>\n </div>\n</div>\n","styles":["#main-container{position:absolute;background:#fff;z-index:2;right:calc(50% - 128px);width:256px;padding:16px;font-family:Lato,sans-serif;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);border-radius:8px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#9aa7b4}#search-bar-container{width:100%;position:relative;margin-bottom:8px}input{width:100%;padding:12px 12px 12px 42px;border:1px solid #000;border-radius:4px;height:48px;box-shadow:none;outline:none;font-style:normal;font-weight:400;font-size:15px;line-height:20px;letter-spacing:.1px;color:#181f33}input:focus{border:1px solid #0937b2}#search-icon{position:absolute;top:15px;left:12px}.filters-sub-container{max-height:144px;overflow-y:auto}.filter{height:36px;display:flex;justify-content:flex-start;align-items:center}.filter-text{font-size:14px;line-height:20px;padding-right:8px;letter-spacing:.2px;color:#181f33;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#no-results-container{height:36px;display:flex;justify-content:center;align-items:center}.separator{border:1px solid #e0e0e0}#buttons-container{display:flex;justify-content:center;align-items:center}button{width:calc(50% - 4px);border:none;box-shadow:none;outline:none;font-size:16px;line-height:24px;text-align:center;letter-spacing:.2px;padding:10px 30px;background:none;border-radius:8px}#apply-btn{background:#0937b2;color:#fff}#reset-btn{background:#fff;color:#0937b2}"]}]}],"members":{"filtersData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"containerStyles":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"filtersApplied":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":21,"character":3},"arguments":["mainContainer"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"resetFilters":[{"__symbolic":"method"}],"applyFilters":[{"__symbolic":"method"}],"updateSearchValue":[{"__symbolic":"method"}],"updateFilter":[{"__symbolic":"method"}],"getFiltersBasedOnSearchValue":[{"__symbolic":"method"}],"getCheckedFilters":[{"__symbolic":"method"}]}},"Filter":{"__symbolic":"interface"}},"origins":{"ɵa":"./sub-table/sub-table.component","TableComponent":"./table.component","CustomTableCellDirective":"./custom-table-cell.directive","TableModule":"./table.module","TableConfig":"./table.component","PaginationConfig":"./table.component","RowConfig":"./table.component","ColHeaderConfig":"./table.component","ColConfig":"./table.component","SubTableConfig":"./sub-table/sub-table.component","SubTableColConfig":"./sub-table/sub-table.component","SubTableColHeaderConfig":"./sub-table/sub-table.component","SubTableRowConfig":"./sub-table/sub-table.component","TableFilterComponent":"./filter/filter.component","Filter":"./filter/filter.component"},"importAs":"mis-crystal-design-system/table"}
1
+ {"__symbolic":"module","version":4,"metadata":{"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"sub-table","template":"<div\n id=\"main-container\"\n [ngStyle]=\"{\n height: getContainerHeight(),\n width: getContainerWidth()\n }\"\n>\n <div id=\"table-container\" #table>\n <div\n id=\"col-headers-container\"\n *ngIf=\"!!config.showHeader\"\n [ngStyle]=\"{\n height: getColHeadersRowHeight(),\n 'border-top': getColHeadersRowBorderTop(),\n 'border-bottom': getColHeadersRowBorderBottom()\n }\"\n >\n <div\n class=\"col-header\"\n (click)=\"colHeader?.action ? colHeader?.action(colHeader) : null\"\n *ngFor=\"let colHeader of config?.colHeaderConfig\"\n [style]=\"colHeader?.style\"\n [ngStyle]=\"{\n width: colHeader?.style?.width || '',\n cursor: colHeader.action ? 'pointer' : 'default',\n 'justify-content': colHeader?.style?.justifyContent ? colHeader?.style?.justifyContent :\n colHeader.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\">\n <p *ngIf=\"colHeader?.type !== 'custom'\" class=\"col-header-text\">\n {{ colHeader?.data || \" \" }}\n </p>\n <ng-template\n *ngIf=\"colHeader?.type === 'custom'\"\n customTableCell\n [customComponent]=\"colHeader?.componentRef\"\n [data]=\"colHeader.data\"\n ></ng-template>\n </div>\n </div>\n <div>\n <cdk-virtual-scroll-viewport [minBufferPx]=\"config.dataContainerMaxHeight || '400'\" [maxBufferPx]=\"config.dataContainerMaxHeight + 200 || '600'\" [style.overflow]=\"'overlay'\" [style.height]=\"config.dataContainerMaxHeight || '400px'\" itemSize=\"50\" id=\"data-container\">\n <div\n class=\"row-wrapper\"\n *cdkVirtualFor=\"let row of tableData; let i = index\"\n [ngStyle]=\"{\n backgroundColor: i % 2 === 0 ? '#FAFAFA' : null\n }\"\n >\n <div class=\"t-row\">\n <div\n (click)=\"\n config?.colConfig[i]?.action\n ? config?.colConfig[i]?.action(col)\n : null\n \"\n *ngFor=\"let col of row; let i = index\"\n [ngStyle]=\"{\n width: config?.colConfig[i]?.style?.width || config?.colHeaderConfig[i]?.style?.width || ''\n }\"\n class=\"t-col-container\"\n >\n <div\n class=\"t-col\"\n [style]=\"config.colConfig[i]?.style\"\n [ngStyle]=\"{\n width: '100%',\n cursor: config.colConfig[i].action ? 'pointer' : 'default',\n 'justify-content': config.colConfig[i]?.style?.justifyContent ? config.colConfig[i]?.style?.justifyContent :\n config.colConfig[i].type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\">\n <p\n *ngIf=\"config.colConfig[i].type !== 'custom'\"\n [ngStyle]=\"{\n color: config?.colConfig[i]?.style?.color\n ? config?.colConfig[i]?.style?.color\n : ''\n }\"\n class=\"t-col-text\"\n >\n {{ col }}\n </p>\n <ng-template\n *ngIf=\"config.colConfig[i].type === 'custom'\"\n [customComponent]=\"config.colConfig[i].componentRef\"\n [data]=\"col\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n </div>\n</div>\n","styles":["#main-container{font-family:Lato,sans-serif}#table-container{height:inherit}#col-headers-container{display:flex;background-color:#fff;height:36px;border-bottom:1px solid #e0e0e0}#data-container{overflow:scroll;width:100%}#data-container::-webkit-scrollbar{width:8px}#data-container::-webkit-scrollbar-thumb{background:#9aa7b4}.col-header{height:100%;width:160px;padding:0 16px}.col-header,.col-header-text{display:flex;align-items:center}.col-header-text{font-style:normal;font-weight:700;font-size:14px;line-height:20px;letter-spacing:.25px;margin:0}.t-row{display:flex;align-items:center;height:36px;width:100%;border-bottom:1px solid #e0e0e0}.t-row:hover{background-color:#f1fdf8}.t-col-container{padding:0 16px;height:100%}.t-col{height:100%}.t-col,.t-col-text{display:flex;align-items:center}.t-col-text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;letter-spacing:.2px;margin:0}"]}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"tableData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"table":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":21,"character":3},"arguments":["table"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":22,"character":32}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"getContainerHeight":[{"__symbolic":"method"}],"getContainerWidth":[{"__symbolic":"method"}],"getColHeadersRowHeight":[{"__symbolic":"method"}],"getColHeadersRowBorderTop":[{"__symbolic":"method"}],"getColHeadersRowBorderBottom":[{"__symbolic":"method"}]}},"TableComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":15,"character":1},"arguments":[{"selector":"mis-table","template":"<div\n [ngStyle]=\"{\n height: getContainerHeight(),\n width: getContainerWidth(),\n 'overflow-x': config.canScrollHorizontally ? 'auto' : 'unset'\n }\"\n id=\"main-container\"\n>\n <mis-table-filter\n #filter\n (filtersApplied)=\"updateAppliedFilters($event)\"\n *ngIf=\"showFilter\"\n [containerStyles]=\"filterContainerStyles\"\n [filtersData]=\"filterData\"\n ></mis-table-filter>\n <div #table id=\"table-container\" [ngClass]=\"{ 'no-scrollbar': expandedIndex < 0, 'scrollbar': !(expandedIndex < 0), 'scroll-horizontally': config.canScrollHorizontally }\">\n <div\n [ngStyle]=\"{\n 'min-height': getColHeadersRowHeight(),\n 'border-top': getColHeadersRowBorderTop(),\n 'border-bottom': getColHeadersRowBorderBottom()\n }\"\n id=\"col-headers-container\"\n >\n <div\n #colHeaderRef\n (click)=\"colHeader?.action ? colHeader?.action(colHeader) : null\"\n *ngFor=\"let colHeader of config?.colHeaderConfig\"\n class=\"col-header\"\n [ngStyle]=\"{\n width: colHeader?.style?.width || '',\n cursor: colHeader.action ? 'pointer' : 'default',\n 'justify-content': colHeader?.style?.justifyContent ? colHeader?.style?.justifyContent :\n colHeader.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\">\n <p *ngIf=\"colHeader?.type !== 'custom'\" class=\"col-header-text\">\n {{ colHeader?.data || \" \" }}\n </p>\n <span\n (click)=\"\n filterData = colHeader.filters;\n toggleFilter(colHeader.data);\n $event.stopPropagation()\n \"\n *ngIf=\"\n colHeader?.type !== 'custom' &&\n colHeader?.filters &&\n colHeader?.filters?.length > 0\n \"\n class=\"filter-icon\"\n >\n <span *ngIf=\"appliedFilters[colHeader.data]?.length > 0\" id=\"filter-active\"></span>\n <svg\n fill=\"none\"\n height=\"10\"\n viewBox=\"0 0 13 10\"\n width=\"13\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clip-rule=\"evenodd\"\n d=\"M4.97546 10H7.64213V8H4.97546V10ZM0.308472 0V2H12.3085V0H0.308472ZM2.30847 6H10.3085V4H2.30847V6Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <ng-template\n *ngIf=\"colHeader?.type === 'custom'\"\n [customComponent]=\"colHeader?.componentRef\"\n [data]=\"colHeader.data\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n <div id=\"data-container\">\n <div class=\"row-wrapper\" *ngFor=\"let row of tableData; let i = index\">\n <div class=\"t-row\" [ngStyle]=\"{'min-height': (config?.rowConfig?.height) ? config.rowConfig.height: '44px'}\">\n <div\n (click)=\"\n config?.colConfig[i]?.action\n ? config?.colConfig[i]?.action(col)\n : null\n \"\n *ngFor=\"let col of row; let i = index\"\n [ngStyle]=\"{\n width: config?.colConfig[i]?.style?.width || config?.colHeaderConfig[i]?.style?.width || ''\n }\"\n class=\"t-col-container\"\n >\n <div\n class=\"t-col\"\n [style]=\"config.colConfig[i]?.style\"\n [ngStyle]=\"{\n width: '100%',\n cursor: config.colConfig[i].action ? 'pointer' : 'default',\n 'justify-content': config.colConfig[i]?.style?.justifyContent ? config.colConfig[i]?.style?.justifyContent :\n config.colConfig[i].type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\">\n <p\n *ngIf=\"config.colConfig[i].type !== 'custom'\"\n [ngStyle]=\"{\n color: config?.colConfig[i]?.style?.color\n ? config?.colConfig[i]?.style?.color\n : ''\n }\"\n class=\"t-col-text\"\n >\n {{ col }}\n </p>\n <ng-template\n *ngIf=\"config.colConfig[i].type === 'custom'\"\n [customComponent]=\"config.colConfig[i].componentRef\"\n [data]=\"col\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n </div>\n <div *ngIf=\"config?.canExpand && expandedIndex === i\" class=\"sub-row\">\n <ng-container *ngIf=\"subTableDataLoading\">\n <div\n style=\"\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 16px;\n \"\n >\n Loading...\n </div>\n </ng-container>\n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length === 0\">\n <div\n style=\"\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 16px;\n \"\n >\n No Data Available...\n </div>\n </ng-container>\n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length > 0\">\n <sub-table [config]=\"subTableconfig\" [tableData]=\"subTableData\"></sub-table>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"config?.paginationConfig\" id=\"pagination-container\">\n <p id=\"pagination-text\">\n Showing\n {{ (selectedPage - 1) * config.paginationConfig.rowsPerPage + 1 }}-{{\n (selectedPage - 1) * config.paginationConfig.rowsPerPage +\n tableData.length\n }}\n of {{ config.paginationConfig.totalNoOfRows }} items\n </p>\n <div id=\"pages-container\">\n <span (click)=\"updateSelectedPage(selectedPage - 1)\" class=\"page\">\n <svg\n fill=\"none\"\n height=\"10\"\n viewBox=\"0 0 7 10\"\n width=\"7\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clip-rule=\"evenodd\"\n d=\"M0.857405 5.56295C0.855794 5.56139 0.854188 5.55982 0.852588 5.55824C0.695955 5.40408 0.617641 5.20203 0.617647 4.99998C0.617641 4.79793 0.695955 4.59588 0.852588 4.44172C0.854188 4.44014 0.855794 4.43858 0.857404 4.43702L5.13066 0.231231C5.44392 -0.0770771 5.9518 -0.0770771 6.26506 0.231231C6.57831 0.53954 6.57831 1.03941 6.26506 1.34772L2.5542 4.99998L6.26506 8.65225C6.57831 8.96055 6.57831 9.46042 6.26506 9.76873C5.9518 10.077 5.44392 10.077 5.13066 9.76873L0.857405 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <div *ngFor=\"let pageNumber of pages\">\n <span\n (click)=\"updateSelectedPage(pageNumber)\"\n *ngIf=\"pageNumber != 0\"\n [ngClass]=\"{ 'page-active': pageNumber == selectedPage }\"\n class=\"page\"\n >{{ pageNumber }}</span\n >\n <span *ngIf=\"pageNumber == 0\" class=\"page-seperator\">\n <div style=\"display: flex\">\n <span class=\"dot\" style=\"margin-right: 4px\"></span>\n <span class=\"dot\" style=\"margin-right: 4px\"></span>\n <span class=\"dot\"></span>\n </div>\n </span>\n </div>\n <span (click)=\"updateSelectedPage(selectedPage + 1)\" class=\"page\">\n <svg\n fill=\"none\"\n height=\"10\"\n viewBox=\"0 0 7 10\"\n width=\"7\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clip-rule=\"evenodd\"\n d=\"M6.1426 5.56295C6.14421 5.56139 6.14581 5.55982 6.14741 5.55824C6.30405 5.40408 6.38236 5.20203 6.38236 4.99998C6.38236 4.79793 6.30405 4.59588 6.14741 4.44172C6.14581 4.44014 6.14421 4.43858 6.1426 4.43702L1.86934 0.231231C1.55608 -0.0770771 1.0482 -0.0770771 0.734942 0.231231C0.421688 0.53954 0.421688 1.03941 0.734942 1.34772L4.4458 4.99998L0.734941 8.65225C0.421686 8.96055 0.421686 9.46042 0.734941 9.76873C1.0482 10.077 1.55608 10.077 1.86934 9.76873L6.1426 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n </div>\n </div>\n</div>\n","styles":["#main-container{font-family:Lato,sans-serif;position:relative}.no-scrollbar::-webkit-scrollbar{width:0}.scrollbar::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container{height:inherit;overflow-y:auto}.scroll-horizontally{height:inherit;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container{display:flex;align-items:center;position:-webkit-sticky;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header{padding:0 16px;height:100%}.col-header,.col-header-text{display:flex;align-items:center}.col-header-text{font-style:normal;font-weight:700;font-size:14px;line-height:20px;letter-spacing:.2px;margin:0}.filter-icon{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row{height:auto;border-bottom:none}.loader ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#0937b2}.t-row{display:flex;align-items:center;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row:hover{background-color:#f1fdf8}.t-col-container{padding:0 16px;height:100%}.t-col{height:100%}.t-col,.t-col-text{display:flex;align-items:center}.t-col-text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;margin:0}#pagination-container{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container{display:flex;margin-right:32px}.page{border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;cursor:pointer}.page,.page-seperator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active{color:#0937b2;border:1px solid #0937b2}"]}]}],"members":{"filtersUpdated":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":28,"character":3}}]}],"filter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":32,"character":3},"arguments":["filter"]}]}],"colHeaders":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChildren","line":33,"character":3},"arguments":["colHeaderRef"]}]}],"pageSelected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":39,"character":3}}]}],"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3},"arguments":["tableConfig"]}]}],"subTableconfig":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":3}}]}],"tableDataLoading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"expandedIndex":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"tableData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"subTableData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"subTableDataLoading":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}}]}],"table":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":48,"character":3},"arguments":["table"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":50,"character":32}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"initializeFilters":[{"__symbolic":"method"}],"toggleFilter":[{"__symbolic":"method"}],"updateAppliedFilters":[{"__symbolic":"method"}],"initializePagination":[{"__symbolic":"method"}],"updateSelectedPage":[{"__symbolic":"method"}],"getContainerHeight":[{"__symbolic":"method"}],"getContainerWidth":[{"__symbolic":"method"}],"getColHeadersRowHeight":[{"__symbolic":"method"}],"getColHeadersRowBorderTop":[{"__symbolic":"method"}],"getColHeadersRowBorderBottom":[{"__symbolic":"method"}]}},"CustomTableCellDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":7,"character":1},"arguments":[{"selector":"[customTableCell]"}]}],"members":{"customComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":26,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":27,"character":38}]}],"createComponent":[{"__symbolic":"method"}],"setData":[{"__symbolic":"method"}]}},"TableModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":9,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"TableComponent"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"TableFilterComponent"},{"__symbolic":"reference","name":"CustomTableCellDirective"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":17,"character":4},{"__symbolic":"reference","module":"mis-crystal-design-system/checkbox","name":"CheckboxModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ScrollingModule","line":19,"character":4}],"exports":[{"__symbolic":"reference","name":"TableComponent"},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"TableFilterComponent"},{"__symbolic":"reference","name":"CustomTableCellDirective"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"TableModule"},"providers":[]}}}},"TableConfig":{"__symbolic":"interface"},"PaginationConfig":{"__symbolic":"interface"},"RowConfig":{"__symbolic":"interface"},"ColHeaderConfig":{"__symbolic":"interface"},"ColConfig":{"__symbolic":"interface"},"SubTableConfig":{"__symbolic":"interface"},"SubTableColConfig":{"__symbolic":"interface"},"SubTableColHeaderConfig":{"__symbolic":"interface"},"SubTableRowConfig":{"__symbolic":"interface"},"TableFilterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"mis-table-filter","template":"<div id=\"main-container\"\n #mainContainer\n [ngStyle]=\"containerStyles\"\n>\n <div id=\"search-bar-container\">\n <input (keyup)=\"updateSearchValue($event)\" type=\"text\" placeholder=\"Search\">\n <svg id=\"search-icon\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.21496 8.14563C1.21496 4.3179 4.33709 1.21165 8.19249 1.21165C12.0479 1.21165 15.17 4.3179 15.17 8.14563C15.17 9.69308 14.6598 11.1226 13.797 12.2767L12.3684 13.7013C11.2043 14.5668 9.75891 15.0796 8.19249 15.0796C4.33709 15.0796 1.21496 11.9734 1.21496 8.14563ZM12.9419 14.7835C11.602 15.7329 9.96259 16.2913 8.19249 16.2913C3.66965 16.2913 -0.00012207 12.6461 -0.00012207 8.14563C-0.00012207 3.64512 3.66965 0 8.19249 0C12.7153 0 16.3851 3.64512 16.3851 8.14563C16.3851 9.93713 15.8036 11.5931 14.8183 12.9375L16.836 14.4048C17.6704 14.912 18.7553 15.6543 17.2453 17.215C15.7352 18.7756 15.0098 17.6663 14.499 16.8364L12.9419 14.7835Z\" fill=\"#6A737D\"/>\n </svg>\n </div>\n <div id=\"filters-main-container\">\n <div class=\"filters-sub-container\">\n <div *ngFor=\"let filter of getCheckedFilters()\">\n <div class=\"filter\">\n <mis-checkbox\n [checked]=\"true\"\n [name]=\"filter.value\"\n (valueChange)=\"updateFilter($event)\"\n ></mis-checkbox>\n <span class=\"filter-text\">{{filter.name}}</span>\n </div>\n </div>\n </div>\n <div class=\"separator\" style=\"margin: 16px 0px;\" *ngIf=\"getCheckedFilters().length && (getCheckedFilters().length < filtersData.length)\"></div>\n <div class=\"filters-sub-container\">\n <div *ngFor=\"let filter of getFiltersBasedOnSearchValue()\">\n <div class=\"filter\" *ngIf=\"!filter.checked\">\n <mis-checkbox\n [checked]=\"false\"\n [name]=\"filter.value\"\n (valueChange)=\"updateFilter($event)\"\n ></mis-checkbox>\n <span class=\"filter-text\">{{filter.name}}</span>\n </div>\n </div>\n <div id=\"no-results-container\" *ngIf=\"getFiltersBasedOnSearchValue().length < 1\">\n <span class=\"filter-text\">No matches found</span>\n </div>\n </div>\n <div class=\"separator\" style=\"margin: 16px 0px;\"></div>\n <div id=\"buttons-container\">\n <button id=\"reset-btn\" style=\"margin-right: 8px;\" (click)=\"resetFilters()\">Reset</button>\n <button id=\"apply-btn\" (click)=\"applyFilters()\">Apply</button>\n </div>\n </div>\n</div>\n","styles":["#main-container{position:absolute;background:#fff;z-index:2;right:calc(50% - 128px);width:256px;padding:16px;font-family:Lato,sans-serif;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);border-radius:8px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#9aa7b4}#search-bar-container{width:100%;position:relative;margin-bottom:8px}input{width:100%;padding:12px 12px 12px 42px;border:1px solid #000;border-radius:4px;height:48px;box-shadow:none;outline:none;font-style:normal;font-weight:400;font-size:15px;line-height:20px;letter-spacing:.1px;color:#181f33}input:focus{border:1px solid #0937b2}#search-icon{position:absolute;top:15px;left:12px}.filters-sub-container{max-height:144px;overflow-y:auto}.filter{height:36px;display:flex;justify-content:flex-start;align-items:center}.filter-text{font-size:14px;line-height:20px;padding-left:8px;letter-spacing:.2px;color:#181f33;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#no-results-container{height:36px;display:flex;justify-content:center;align-items:center}.separator{border:1px solid #e0e0e0}#buttons-container{display:flex;justify-content:center;align-items:center}button{width:calc(50% - 4px);border:none;box-shadow:none;outline:none;font-size:16px;line-height:24px;text-align:center;letter-spacing:.2px;padding:10px 30px;background:none;border-radius:8px}#apply-btn{background:#0937b2;color:#fff}#reset-btn{background:#fff;color:#0937b2}"]}]}],"members":{"filtersData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"containerStyles":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"filtersApplied":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":21,"character":3},"arguments":["mainContainer"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"resetFilters":[{"__symbolic":"method"}],"applyFilters":[{"__symbolic":"method"}],"updateSearchValue":[{"__symbolic":"method"}],"updateFilter":[{"__symbolic":"method"}],"getFiltersBasedOnSearchValue":[{"__symbolic":"method"}],"getCheckedFilters":[{"__symbolic":"method"}]}},"Filter":{"__symbolic":"interface"}},"origins":{"ɵa":"./sub-table/sub-table.component","TableComponent":"./table.component","CustomTableCellDirective":"./custom-table-cell.directive","TableModule":"./table.module","TableConfig":"./table.component","PaginationConfig":"./table.component","RowConfig":"./table.component","ColHeaderConfig":"./table.component","ColConfig":"./table.component","SubTableConfig":"./sub-table/sub-table.component","SubTableColConfig":"./sub-table/sub-table.component","SubTableColHeaderConfig":"./sub-table/sub-table.component","SubTableRowConfig":"./sub-table/sub-table.component","TableFilterComponent":"./filter/filter.component","Filter":"./filter/filter.component"},"importAs":"mis-crystal-design-system/table"}
@@ -0,0 +1,8 @@
1
+ import { Observable } from "rxjs";
2
+ import { CustomState } from "../interfaces/widgets.model";
3
+ import { BaseWidget } from "./base-widget";
4
+ export declare class AsyncWidget<D = any> extends BaseWidget<D> {
5
+ value: Observable<D>;
6
+ constructor(dataStream?: Observable<D>, customStates?: Array<CustomState<D>>);
7
+ updateValue(dataStream: Observable<D>): void;
8
+ }
@@ -0,0 +1,14 @@
1
+ import { Subject } from "rxjs";
2
+ import { CustomState, WidgetStateMap } from "../interfaces/widgets.model";
3
+ export declare class BaseWidget<D> {
4
+ private loader$;
5
+ loader: import("rxjs").Observable<boolean>;
6
+ protected customStates: Array<CustomState<D>>;
7
+ state: WidgetStateMap;
8
+ constructor(data?: unknown, customStates?: Array<CustomState<D>>);
9
+ toggleLoader(value: boolean): void;
10
+ protected reset$: Subject<void>;
11
+ reset(): void;
12
+ updateValue(data: unknown): void;
13
+ protected updateCustomStates(customStates: Array<CustomState<D>>, value: D): void;
14
+ }
@@ -0,0 +1,8 @@
1
+ import { CustomState } from "../interfaces/widgets.model";
2
+ import { BaseWidget } from "./base-widget";
3
+ export declare class SyncWidget<D = any> extends BaseWidget<D> {
4
+ value: D;
5
+ constructor(data?: D, customStates?: Array<CustomState<D>>);
6
+ updateValue(value: D): void;
7
+ reset(): void;
8
+ }
@@ -0,0 +1,16 @@
1
+ import { BaseWidget } from "./base-widget";
2
+ import { WidgetMap } from "../interfaces/widgets.model";
3
+ import { AsyncWidget } from "./async-widget";
4
+ import { SyncWidget } from "./sync-widget";
5
+ export declare class WidgetGroup extends BaseWidget<any> {
6
+ private items;
7
+ constructor(widgets: WidgetMap);
8
+ get value(): {
9
+ [key: string]: any;
10
+ };
11
+ get widgets(): (AsyncWidget<any> | SyncWidget<any> | WidgetGroup)[];
12
+ addWidget(key: string, widget: SyncWidget | AsyncWidget): void;
13
+ get(key: string): SyncWidget | AsyncWidget | WidgetGroup;
14
+ removeWidget(key: string): void;
15
+ reset(): void;
16
+ }
@@ -0,0 +1 @@
1
+ export * from "./public_api";
@@ -0,0 +1,13 @@
1
+ import { AsyncWidget } from "../classes/async-widget";
2
+ import { BaseWidget } from "../classes/base-widget";
3
+ import { SyncWidget } from "../classes/sync-widget";
4
+ export interface WidgetMap {
5
+ [key: string]: AsyncWidget | SyncWidget;
6
+ }
7
+ export interface WidgetTap {
8
+ (widget: BaseWidget<unknown>): void;
9
+ }
10
+ export declare type CustomState<D> = (data: D) => WidgetStateMap;
11
+ export interface WidgetStateMap {
12
+ [key: string]: boolean;
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"SyncWidget":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"BaseWidget"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":21,"context":{"typeName":"D"},"module":"./classes/sync-widget"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"CustomState"}]}]}],"updateValue":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}]}},"AsyncWidget":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"BaseWidget"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":10,"character":38,"context":{"typeName":"D"},"module":"./classes/async-widget"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"CustomState"}]}]}],"updateValue":[{"__symbolic":"method"}]}},"BaseWidget":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Expression form not supported","line":10,"character":21,"module":"./classes/base-widget"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"CustomState"}]}]}],"toggleLoader":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"updateValue":[{"__symbolic":"method"}],"updateCustomStates":[{"__symbolic":"method"}]}},"WidgetGroup":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"BaseWidget"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"WidgetMap"}]}],"addWidget":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"removeWidget":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}]}},"WidgetMap":{"__symbolic":"interface"},"WidgetTap":{"__symbolic":"interface"},"CustomState":{"__symbolic":"interface"},"WidgetStateMap":{"__symbolic":"interface"},"WidgetsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":6,"character":12}],"providers":[]}]}],"members":{}}},"origins":{"SyncWidget":"./classes/sync-widget","AsyncWidget":"./classes/async-widget","BaseWidget":"./classes/base-widget","WidgetGroup":"./classes/widget-group","WidgetMap":"./interfaces/widgets.model","WidgetTap":"./interfaces/widgets.model","CustomState":"./interfaces/widgets.model","WidgetStateMap":"./interfaces/widgets.model","WidgetsModule":"./widgets.module"},"importAs":"mis-crystal-design-system/widgets"}
@@ -0,0 +1,11 @@
1
+ {
2
+ "main": "../bundles/mis-crystal-design-system-widgets.umd.js",
3
+ "module": "../fesm2015/mis-crystal-design-system-widgets.js",
4
+ "es2015": "../fesm2015/mis-crystal-design-system-widgets.js",
5
+ "esm2015": "../esm2015/widgets/mis-crystal-design-system-widgets.js",
6
+ "fesm2015": "../fesm2015/mis-crystal-design-system-widgets.js",
7
+ "typings": "mis-crystal-design-system-widgets.d.ts",
8
+ "metadata": "mis-crystal-design-system-widgets.metadata.json",
9
+ "sideEffects": false,
10
+ "name": "mis-crystal-design-system/widgets"
11
+ }
@@ -0,0 +1,6 @@
1
+ export * from "./classes/sync-widget";
2
+ export * from "./classes/async-widget";
3
+ export * from "./classes/base-widget";
4
+ export * from "./classes/widget-group";
5
+ export * from "./interfaces/widgets.model";
6
+ export * from "./widgets.module";
@@ -0,0 +1,6 @@
1
+ export declare class WidgetService {
2
+ private refresh$;
3
+ refresh: import("rxjs").Observable<string[]>;
4
+ constructor();
5
+ refreshWidgets(types?: string[]): void;
6
+ }
@@ -0,0 +1,2 @@
1
+ export declare class WidgetsModule {
2
+ }