@gettrx/core-components-angular 1.0.6 → 1.0.8

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 (57) hide show
  1. package/esm2022/lib/atoms/badge/gtr-badge.component.mjs +3 -3
  2. package/esm2022/lib/atoms/input/gtr-input.component.mjs +3 -3
  3. package/esm2022/lib/atoms/textarea/gtr-textarea.component.mjs +3 -3
  4. package/esm2022/lib/molecules/calendar/calendar/gtr-calendar.component.mjs +10 -6
  5. package/esm2022/lib/molecules/calendar/gtr-calendar.utils.mjs +4 -4
  6. package/esm2022/lib/molecules/date-picker/gtr-date-picker.component.mjs +5 -4
  7. package/esm2022/lib/molecules/date-range-picker/date-range-picker/gtr-date-range-picker.component.mjs +11 -5
  8. package/esm2022/lib/molecules/date-range-picker/gtr-date-range-picker.module.mjs +2 -4
  9. package/esm2022/lib/molecules/form/input-group/gtr-input-group.component.mjs +6 -2
  10. package/esm2022/lib/molecules/select/helpers/pipes/format-selected-value/gtr-format-selected-value.pipe.mjs +3 -3
  11. package/esm2022/lib/molecules/select/select/gtr-select.component.mjs +3 -3
  12. package/esm2022/lib/molecules/stat-card/gtr-stat-card.component.mjs +8 -5
  13. package/esm2022/lib/molecules/table/gtr-create-component.pipe.mjs +88 -0
  14. package/esm2022/lib/molecules/table/gtr-fetch-attribute.pipe.mjs +21 -0
  15. package/esm2022/lib/molecules/table/gtr-table.component.mjs +138 -0
  16. package/esm2022/lib/molecules/table/gtr-table.interface.mjs +8 -0
  17. package/esm2022/lib/molecules/table/gtr-table.module.mjs +20 -0
  18. package/esm2022/lib/molecules/table/index.mjs +2 -0
  19. package/esm2022/lib/molecules/table/public_api.mjs +5 -0
  20. package/esm2022/lib/molecules/table/table-main/gtr-table-main.component.mjs +148 -0
  21. package/esm2022/lib/molecules/table/table-responsive/gtr-table-responsive.component.mjs +185 -0
  22. package/esm2022/lib/molecules/time-picker/gtr-time-picker.component.mjs +2 -2
  23. package/esm2022/public-api.mjs +2 -6
  24. package/fesm2022/gettrx-core-components-angular.mjs +603 -902
  25. package/fesm2022/gettrx-core-components-angular.mjs.map +1 -1
  26. package/lib/atoms/badge/gtr-badge.component.d.ts +1 -0
  27. package/lib/atoms/input/gtr-input.component.d.ts +1 -1
  28. package/lib/atoms/textarea/gtr-textarea.component.d.ts +1 -1
  29. package/lib/molecules/calendar/calendar/gtr-calendar.component.d.ts +2 -2
  30. package/lib/molecules/date-range-picker/date-range-picker/gtr-date-range-picker.component.d.ts +8 -1
  31. package/lib/molecules/date-range-picker/gtr-date-range-picker.module.d.ts +1 -1
  32. package/lib/molecules/form/input-group/gtr-input-group.component.d.ts +2 -1
  33. package/lib/molecules/select/helpers/pipes/format-selected-value/gtr-format-selected-value.pipe.d.ts +1 -1
  34. package/lib/molecules/stat-card/gtr-stat-card.component.d.ts +1 -0
  35. package/lib/molecules/table/gtr-create-component.pipe.d.ts +17 -0
  36. package/lib/molecules/table/gtr-fetch-attribute.pipe.d.ts +9 -0
  37. package/lib/molecules/table/gtr-table.component.d.ts +83 -0
  38. package/lib/molecules/table/gtr-table.interface.d.ts +78 -0
  39. package/lib/molecules/table/gtr-table.module.d.ts +9 -0
  40. package/lib/molecules/table/index.d.ts +1 -0
  41. package/lib/molecules/table/public_api.d.ts +5 -0
  42. package/lib/molecules/table/table-main/gtr-table-main.component.d.ts +53 -0
  43. package/lib/molecules/table/table-responsive/gtr-table-responsive.component.d.ts +75 -0
  44. package/package.json +2 -3
  45. package/public-api.d.ts +1 -4
  46. package/esm2022/generated/angular-component-lib/utils.mjs +0 -51
  47. package/esm2022/generated/components.mjs +0 -729
  48. package/esm2022/generated/proxies-list.mjs +0 -30
  49. package/esm2022/generated/text-value-accessor.mjs +0 -36
  50. package/esm2022/generated/value-accessor.mjs +0 -40
  51. package/esm2022/gettrx-module.mjs +0 -26
  52. package/generated/angular-component-lib/utils.d.ts +0 -9
  53. package/generated/components.d.ts +0 -378
  54. package/generated/proxies-list.d.ts +0 -2
  55. package/generated/text-value-accessor.d.ts +0 -8
  56. package/generated/value-accessor.d.ts +0 -18
  57. package/gettrx-module.d.ts +0 -10
@@ -14,6 +14,7 @@ export declare class GtrBadgeComponent {
14
14
  bottom?: string;
15
15
  left?: string;
16
16
  right?: string;
17
+ align?: string;
17
18
  };
18
19
  backgroundColor?: string;
19
20
  iconName?: string;
@@ -156,5 +156,5 @@ export declare class GtrInputComponent implements ControlValueAccessor {
156
156
  get isShowDefaultError(): boolean;
157
157
  get isInputInvalid(): boolean;
158
158
  static ɵfac: i0.ɵɵFactoryDeclaration<GtrInputComponent, [{ optional: true; self: true; }]>;
159
- static ɵcmp: i0.ɵɵComponentDeclaration<GtrInputComponent, "gtr-input", never, { "inputWrapperId": { "alias": "inputWrapperId"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "inputIcon": { "alias": "inputIcon"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "iconFontWeight": { "alias": "iconFontWeight"; "required": false; }; "inputLabel": { "alias": "inputLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "validateLabel": { "alias": "validateLabel"; "required": false; }; "isNumber": { "alias": "isNumber"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "isOnlyView": { "alias": "isOnlyView"; "required": false; }; "defaultValidation": { "alias": "defaultValidation"; "required": false; }; "required": { "alias": "required"; "required": false; }; "isValid": { "alias": "isValid"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; }, { "inputChanged": "inputChanged"; "handleError": "handleError"; }, never, never, false, never>;
159
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrInputComponent, "gtr-input", never, { "inputWrapperId": { "alias": "inputWrapperId"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "inputIcon": { "alias": "inputIcon"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "iconFontWeight": { "alias": "iconFontWeight"; "required": false; }; "inputLabel": { "alias": "inputLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "validateLabel": { "alias": "validateLabel"; "required": false; }; "isNumber": { "alias": "isNumber"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "isOnlyView": { "alias": "isOnlyView"; "required": false; }; "defaultValidation": { "alias": "defaultValidation"; "required": false; }; "required": { "alias": "required"; "required": false; }; "isValid": { "alias": "isValid"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; }, { "inputChanged": "inputChanged"; "handleError": "handleError"; }, never, ["[slot='custom-error']"], false, never>;
160
160
  }
@@ -108,5 +108,5 @@ export declare class GtrTextareaComponent implements ControlValueAccessor {
108
108
  get isInputInvalid(): boolean;
109
109
  render(): void;
110
110
  static ɵfac: i0.ɵɵFactoryDeclaration<GtrTextareaComponent, [{ optional: true; self: true; }]>;
111
- static ɵcmp: i0.ɵɵComponentDeclaration<GtrTextareaComponent, "gtr-textarea", never, { "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "textareaLabel": { "alias": "textareaLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "textAreaWrapperId": { "alias": "textAreaWrapperId"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "isValid": { "alias": "isValid"; "required": false; }; "isOnlyView": { "alias": "isOnlyView"; "required": false; }; "defaultValidation": { "alias": "defaultValidation"; "required": false; }; }, { "textareaChanged": "textareaChanged"; "handleError": "handleError"; }, never, never, false, never>;
111
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrTextareaComponent, "gtr-textarea", never, { "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "textareaLabel": { "alias": "textareaLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "textAreaWrapperId": { "alias": "textAreaWrapperId"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "isValid": { "alias": "isValid"; "required": false; }; "isOnlyView": { "alias": "isOnlyView"; "required": false; }; "defaultValidation": { "alias": "defaultValidation"; "required": false; }; }, { "textareaChanged": "textareaChanged"; "handleError": "handleError"; }, never, ["[slot='custom-error']"], false, never>;
112
112
  }
@@ -81,8 +81,8 @@ export declare class GtrCalendarComponent implements OnInit, OnDestroy {
81
81
  /**
82
82
  * Max selectable date.
83
83
  */
84
- set maxDate(value: Date | string | null | undefined);
85
- get maxDate(): Date | string | null | undefined;
84
+ set maxDate(value: Date | string | null);
85
+ get maxDate(): Date | string | null;
86
86
  private _maxDate;
87
87
  /**
88
88
  * Min selectable date.
@@ -23,6 +23,7 @@ export declare class GtrDateRangePickerComponent implements OnInit, OnDestroy, C
23
23
  constructor(breakpointObserver: BreakpointObserver);
24
24
  id: string;
25
25
  testid: string;
26
+ required: boolean;
26
27
  /**
27
28
  * Set the format of day name.
28
29
  * @default 'numeric'
@@ -141,6 +142,12 @@ export declare class GtrDateRangePickerComponent implements OnInit, OnDestroy, C
141
142
  * @default undefined
142
143
  */
143
144
  valid?: boolean;
145
+ /**
146
+ * Toggle visual validation feedback.
147
+ * @type boolean | undefined
148
+ * @default undefined
149
+ */
150
+ invalid?: boolean;
144
151
  /**
145
152
  * Toggle the visibility of the dropdown date-picker component.
146
153
  * @type boolean
@@ -268,5 +275,5 @@ export declare class GtrDateRangePickerComponent implements OnInit, OnDestroy, C
268
275
  handleStartTimeChange(time: Date | undefined): void;
269
276
  handleEndTimeChange(time: Date | undefined): void;
270
277
  static ɵfac: i0.ɵɵFactoryDeclaration<GtrDateRangePickerComponent, never>;
271
- static ɵcmp: i0.ɵɵComponentDeclaration<GtrDateRangePickerComponent, "gtr-date-range-picker", ["gtrDateRangePicker"], { "id": { "alias": "id"; "required": false; }; "testid": { "alias": "testid"; "required": false; }; "dayFormat": { "alias": "dayFormat"; "required": false; }; "calendars": { "alias": "calendars"; "required": false; }; "cleaner": { "alias": "cleaner"; "required": false; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; }; "format": { "alias": "format"; "required": false; }; "indicator": { "alias": "indicator"; "required": false; }; "inputReadOnly": { "alias": "inputReadOnly"; "required": false; }; "navYearFirst": { "alias": "navYearFirst"; "required": false; }; "alwaysOpen": { "alias": "alwaysOpen"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ranges": { "alias": "ranges"; "required": false; }; "rangesType": { "alias": "rangesType"; "required": false; }; "rangesButtonsColor": { "alias": "rangesButtonsColor"; "required": false; }; "rangesButtonsSize": { "alias": "rangesButtonsSize"; "required": false; }; "rangesButtonsVariant": { "alias": "rangesButtonsVariant"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "size": { "alias": "size"; "required": false; }; "timepicker": { "alias": "timepicker"; "required": false; }; "valid": { "alias": "valid"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "calendarDate": { "alias": "calendarDate"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "navigation": { "alias": "navigation"; "required": false; }; "range": { "alias": "range"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "weekdayFormat": { "alias": "weekdayFormat"; "required": false; }; "popperjsOptions": { "alias": "popperOptions"; "required": false; }; "selectAdjacentDays": { "alias": "selectAdjacentDays"; "required": false; }; "showAdjacentDays": { "alias": "showAdjacentDays"; "required": false; }; }, { "valueChange": "valueChange"; "calendarCellHover": "calendarCellHover"; "calendarDateChange": "calendarDateChange"; "endDateChange": "endDateChange"; "startDateChange": "startDateChange"; }, ["contentTemplates"], ["*", "*"], false, never>;
278
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrDateRangePickerComponent, "gtr-date-range-picker", ["gtrDateRangePicker"], { "id": { "alias": "id"; "required": false; }; "testid": { "alias": "testid"; "required": false; }; "required": { "alias": "required"; "required": false; }; "dayFormat": { "alias": "dayFormat"; "required": false; }; "calendars": { "alias": "calendars"; "required": false; }; "cleaner": { "alias": "cleaner"; "required": false; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; }; "format": { "alias": "format"; "required": false; }; "indicator": { "alias": "indicator"; "required": false; }; "inputReadOnly": { "alias": "inputReadOnly"; "required": false; }; "navYearFirst": { "alias": "navYearFirst"; "required": false; }; "alwaysOpen": { "alias": "alwaysOpen"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ranges": { "alias": "ranges"; "required": false; }; "rangesType": { "alias": "rangesType"; "required": false; }; "rangesButtonsColor": { "alias": "rangesButtonsColor"; "required": false; }; "rangesButtonsSize": { "alias": "rangesButtonsSize"; "required": false; }; "rangesButtonsVariant": { "alias": "rangesButtonsVariant"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "size": { "alias": "size"; "required": false; }; "timepicker": { "alias": "timepicker"; "required": false; }; "valid": { "alias": "valid"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "calendarDate": { "alias": "calendarDate"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "navigation": { "alias": "navigation"; "required": false; }; "range": { "alias": "range"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "weekdayFormat": { "alias": "weekdayFormat"; "required": false; }; "popperjsOptions": { "alias": "popperOptions"; "required": false; }; "selectAdjacentDays": { "alias": "selectAdjacentDays"; "required": false; }; "showAdjacentDays": { "alias": "showAdjacentDays"; "required": false; }; }, { "valueChange": "valueChange"; "calendarCellHover": "calendarCellHover"; "calendarDateChange": "calendarDateChange"; "endDateChange": "endDateChange"; "startDateChange": "startDateChange"; }, ["contentTemplates"], ["*", "*"], false, never>;
272
279
  }
@@ -13,6 +13,6 @@ import * as i11 from "../form/input-group-text/gtr-input-group-text.directive";
13
13
  import * as i12 from "../../atoms/icon/gtr-icon.module";
14
14
  export declare class GtrDateRangePickerModule {
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<GtrDateRangePickerModule, never>;
16
- static ɵmod: i0.ɵɵNgModuleDeclaration<GtrDateRangePickerModule, [typeof i1.GtrDateRangePickerComponent], [typeof i2.NgClass, typeof i2.NgIf, typeof i2.NgForOf, typeof i2.NgTemplateOutlet, typeof i3.ReactiveFormsModule, typeof i4.GtrCalendarComponent, typeof i5.GtrTimePickerComponent, typeof i6.GtrButtonDirective, typeof i7.GtrDropdownComponent, typeof i7.GtrDropdownToggleDirective, typeof i8.GtrDropdownMenuDirective, typeof i9.GtrInputGroupComponent, typeof i10.GtrFormControlDirective, typeof i11.GtrInputGroupTextDirective, typeof i12.GtrIconModule, typeof i6.GtrButtonDirective], [typeof i1.GtrDateRangePickerComponent]>;
16
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GtrDateRangePickerModule, [typeof i1.GtrDateRangePickerComponent], [typeof i2.NgClass, typeof i2.NgIf, typeof i2.NgForOf, typeof i2.NgTemplateOutlet, typeof i3.ReactiveFormsModule, typeof i4.GtrCalendarComponent, typeof i5.GtrTimePickerComponent, typeof i6.GtrButtonDirective, typeof i7.GtrDropdownComponent, typeof i7.GtrDropdownToggleDirective, typeof i8.GtrDropdownMenuDirective, typeof i9.GtrInputGroupComponent, typeof i10.GtrFormControlDirective, typeof i11.GtrInputGroupTextDirective, typeof i12.GtrIconModule], [typeof i1.GtrDateRangePickerComponent]>;
17
17
  static ɵinj: i0.ɵɵInjectorDeclaration<GtrDateRangePickerModule>;
18
18
  }
@@ -4,8 +4,9 @@ export declare class GtrInputGroupComponent {
4
4
  * Size the component small or large.
5
5
  */
6
6
  sizing: string | 'sm' | 'lg' | '';
7
+ invalid: boolean | undefined;
7
8
  get hostClasses(): any;
8
9
  constructor();
9
10
  static ɵfac: i0.ɵɵFactoryDeclaration<GtrInputGroupComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<GtrInputGroupComponent, "gtr-input-group", never, { "sizing": { "alias": "sizing"; "required": false; }; }, {}, never, ["*"], true, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrInputGroupComponent, "gtr-input-group", never, { "sizing": { "alias": "sizing"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; }, {}, never, ["*"], true, never>;
11
12
  }
@@ -4,5 +4,5 @@ export declare class GtrFormatSelectedValuePipe implements PipeTransform {
4
4
  private readonly _limitText;
5
5
  transform(value: any, options: any[], valueKey: string, selectedLabel: string, labelKey: string, textLimit: number, multiple: boolean, selectedValueLazy: any[], selectedValues: any[] | undefined, lazyLoaded: boolean): any;
6
6
  static ɵfac: i0.ɵɵFactoryDeclaration<GtrFormatSelectedValuePipe, never>;
7
- static ɵpipe: i0.ɵɵPipeDeclaration<GtrFormatSelectedValuePipe, "GtrFormatSelectedValue", true>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<GtrFormatSelectedValuePipe, "gtrFormatSelectedValue", true>;
8
8
  }
@@ -13,6 +13,7 @@ export declare class GtrStatCardComponent {
13
13
  private renderer;
14
14
  iconContainer?: ElementRef;
15
15
  labelContainer?: ElementRef;
16
+ dateSelectWrapper?: ElementRef;
16
17
  showSkeletonLoading: boolean;
17
18
  /**
18
19
  * Stats
@@ -0,0 +1,17 @@
1
+ import { ComponentRef, PipeTransform, QueryList, Type, ViewContainerRef } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class GtrCreateComponentPipe implements PipeTransform {
5
+ closed$: Subject<any>;
6
+ componentRef?: ComponentRef<any> | null;
7
+ constructor();
8
+ transform(component: any, container: QueryList<ViewContainerRef>, isDestroy?: boolean): void;
9
+ createDynamicComponent<T>(component: Type<T>, viewRef: ViewContainerRef): ComponentRef<T> | null;
10
+ updateInstance(instances: Array<object>): void;
11
+ detectChanges(ref: any, events: any[]): void;
12
+ clickHandler(event?: any): void;
13
+ eventHandler(event?: any): void;
14
+ destroyComponent(): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrCreateComponentPipe, never>;
16
+ static ɵpipe: i0.ɵɵPipeDeclaration<GtrCreateComponentPipe, "gtrCreateComponent", true>;
17
+ }
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { TCOLUMN, THEAD } from './gtr-table.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class GtrFetchAttributePipe implements PipeTransform {
5
+ constructor();
6
+ transform(column: TCOLUMN | any, attribute: string, index: number, data: THEAD[] | any[]): any;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrFetchAttributePipe, never>;
8
+ static ɵpipe: i0.ɵɵPipeDeclaration<GtrFetchAttributePipe, "gtrFetchAttribute", true>;
9
+ }
@@ -0,0 +1,83 @@
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
+ import { THEAD, TROW } from './gtr-table.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class GtrTableComponent implements OnDestroy {
5
+ constructor();
6
+ switchState: boolean;
7
+ /**
8
+ * Set the table type.
9
+ * @default 'boolean'
10
+ * @type TableType
11
+ */
12
+ isResponsive: boolean;
13
+ /**
14
+ * Set the skeleton loading state.
15
+ * @default 'boolean'
16
+ * @type LoadingState
17
+ */
18
+ loading: boolean;
19
+ /**
20
+ * Set the hide/show state of checbox.
21
+ * @default 'boolean'
22
+ * @type CheckBox State
23
+ */
24
+ enableSelection: boolean;
25
+ /**
26
+ * Set the id of main web table.
27
+ * @default 'string'
28
+ * @type CheckBox State
29
+ */
30
+ tableMainId: string;
31
+ /**
32
+ * Set id of responsive table.
33
+ * @default 'string'
34
+ * @type CheckBox State
35
+ */
36
+ tableResponsiveId: string;
37
+ /**
38
+ * Table columns
39
+ */
40
+ columns: THEAD[];
41
+ /**
42
+ * Table data
43
+ */
44
+ data: TROW[];
45
+ /**
46
+ * The selection changed eventemitter
47
+ * @default '{ value: any; all: boolean }'
48
+ * @type Event Emitter
49
+ */
50
+ onSelection: EventEmitter<{
51
+ value: any;
52
+ all: boolean;
53
+ }>;
54
+ /**
55
+ * Action eventemitter
56
+ */
57
+ onAction: EventEmitter<any>;
58
+ /**
59
+ * Sorting eventemitter
60
+ */
61
+ onSort: EventEmitter<any>;
62
+ /**
63
+ * To check screen size
64
+ */
65
+ onResize(event: {
66
+ target: {
67
+ innerWidth: number;
68
+ };
69
+ }): void;
70
+ ngOnInit(): void;
71
+ selectionChange(ev: any): void;
72
+ actionDone(ev: {
73
+ value: boolean;
74
+ id: number;
75
+ }): void;
76
+ sorting(ev: {
77
+ value: boolean;
78
+ id: number;
79
+ }): void;
80
+ ngOnDestroy(): void;
81
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrTableComponent, never>;
82
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrTableComponent, "gtr-table", ["gtrTable"], { "isResponsive": { "alias": "isResponsive"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "enableSelection": { "alias": "enableSelection"; "required": false; }; "tableMainId": { "alias": "tableMainId"; "required": false; }; "tableResponsiveId": { "alias": "tableResponsiveId"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "onSelection": "onSelection"; "onAction": "onAction"; "onSort": "onSort"; }, never, never, true, never>;
83
+ }
@@ -0,0 +1,78 @@
1
+ interface TEXPAND {
2
+ isExpanded: boolean;
3
+ expandAfter: number;
4
+ }
5
+ interface TSORT {
6
+ hasSorting: boolean;
7
+ sort: -1 | 1 | 0;
8
+ }
9
+ interface TCOMPONENT {
10
+ name: any;
11
+ events: string[];
12
+ properties: Array<object>;
13
+ text: string;
14
+ }
15
+ export type RGB = `rgb(${number}, ${number}, ${number})`;
16
+ export type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
17
+ export type HEX = `#${string}`;
18
+ interface TACTIONS {
19
+ type: 'button' | 'icon' | 'dropdown' | 'input' | 'textarea' | 'toggle';
20
+ icon: string;
21
+ color: string | RGB | RGBA | HEX;
22
+ name: string;
23
+ size?: string;
24
+ hide?: boolean;
25
+ }
26
+ export interface STYLES {
27
+ min?: string;
28
+ max?: string;
29
+ }
30
+ export interface TCOLUMN {
31
+ align?: 'left' | 'right' | 'center' | 'top' | 'bottom';
32
+ styles?: STYLES;
33
+ value: any | TCOMPONENT;
34
+ hide?: boolean;
35
+ type?: 'string' | 'component' | 'innerHTML' | 'actions' | 'status';
36
+ wrap?: 'TRUNCATE' | 'WRAP' | 'INNERHTMLWRAP' | 'SPLITHEADING';
37
+ label?: string;
38
+ priority?: 'HIGH' | 'LOW';
39
+ color?: string | RGB | RGBA | HEX;
40
+ sorting?: TSORT;
41
+ actions?: TACTIONS[];
42
+ }
43
+ export interface TROW {
44
+ id: any;
45
+ expand: TEXPAND;
46
+ isSelected?: boolean;
47
+ columnsData: TCOLUMN[];
48
+ }
49
+ export interface SkeletonConfigs {
50
+ mainTable: SkeletonMainTableConfigs;
51
+ resposvieTable: SkeletonResponsiveTableConfigs;
52
+ }
53
+ export interface SkeletonMainTableConfigs {
54
+ width?: string;
55
+ height?: string;
56
+ className?: string;
57
+ repeat?: number;
58
+ }
59
+ export interface SkeletonResponsiveTableConfigs {
60
+ width?: string;
61
+ height?: string;
62
+ className?: string;
63
+ repeat?: number;
64
+ }
65
+ export interface THEAD {
66
+ align?: 'left' | 'right' | 'center' | 'top' | 'bottom';
67
+ headingType?: 'string' | 'innerHTML';
68
+ hide?: boolean;
69
+ styles?: STYLES;
70
+ label: string;
71
+ sorting: TSORT;
72
+ type?: 'string' | 'component' | 'innerHTML' | 'actions' | 'status';
73
+ color?: string | RGB | RGBA | HEX;
74
+ wrap?: 'TRUNCATE' | 'WRAP' | 'INNERHTMLWRAP' | 'SPLITHEADING';
75
+ priority?: 'HIGH' | 'LOW';
76
+ skeletonConfigs?: SkeletonConfigs;
77
+ }
78
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./gtr-table.component";
3
+ import * as i2 from "./table-responsive/gtr-table-responsive.component";
4
+ import * as i3 from "./table-main/gtr-table-main.component";
5
+ export declare class GtrTableModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrTableModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GtrTableModule, never, [typeof i1.GtrTableComponent, typeof i2.GtrTableResponsiveComponent, typeof i3.GtrTableMainComponent], [typeof i1.GtrTableComponent, typeof i2.GtrTableResponsiveComponent, typeof i3.GtrTableMainComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<GtrTableModule>;
9
+ }
@@ -0,0 +1 @@
1
+ export * from './public_api';
@@ -0,0 +1,5 @@
1
+ export { GtrTableResponsiveComponent } from './table-responsive/gtr-table-responsive.component';
2
+ export { GtrTableMainComponent } from './table-main/gtr-table-main.component';
3
+ export { GtrTableComponent } from './gtr-table.component';
4
+ export { GtrTableModule } from './gtr-table.module';
5
+ export { TROW, THEAD, TCOLUMN } from './gtr-table.interface';
@@ -0,0 +1,53 @@
1
+ import { AfterViewChecked, ChangeDetectorRef, EventEmitter, OnDestroy, QueryList, ViewContainerRef } from '@angular/core';
2
+ import { THEAD, TROW } from '../gtr-table.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class GtrTableMainComponent implements OnDestroy, AfterViewChecked {
5
+ private cdRef;
6
+ constructor(cdRef: ChangeDetectorRef);
7
+ templateRef: QueryList<ViewContainerRef>;
8
+ childRowRef: QueryList<ViewContainerRef>;
9
+ /**
10
+ * Set the hide/show state of checbox.
11
+ * @default 'boolean'
12
+ * @type CheckBox State
13
+ */
14
+ enableSelection: boolean;
15
+ isLoading: boolean;
16
+ /**
17
+ * Table columns
18
+ */
19
+ columns: THEAD[];
20
+ /**
21
+ * Table columns
22
+ */
23
+ tableMainId: string;
24
+ /**
25
+ * Table data
26
+ */
27
+ data: TROW[];
28
+ /**
29
+ * The selection changed eventemitter
30
+ */
31
+ onSelection: EventEmitter<{
32
+ lastSelected?: any;
33
+ selectedRows: any;
34
+ all: boolean;
35
+ }>;
36
+ /**
37
+ * Action eventemitter
38
+ */
39
+ onAction: EventEmitter<any>;
40
+ /**
41
+ * Sorting eventemitter
42
+ */
43
+ onSort: EventEmitter<any>;
44
+ ngAfterViewChecked(): void;
45
+ onSorting(sortType: number, column: any): void;
46
+ actionDone(event: any, rowId: any, action: any): void;
47
+ selectAll(event: any): void;
48
+ fectchSelection(): boolean;
49
+ selectionDone(event: any, item: any): void;
50
+ ngOnDestroy(): void;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrTableMainComponent, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrTableMainComponent, "gtr-table-main", ["gtrTableMain"], { "enableSelection": { "alias": "enableSelection"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "tableMainId": { "alias": "tableMainId"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "onSelection": "onSelection"; "onAction": "onAction"; "onSort": "onSort"; }, never, never, true, never>;
53
+ }
@@ -0,0 +1,75 @@
1
+ import { AfterViewChecked, ChangeDetectorRef, EventEmitter, OnDestroy, QueryList, ViewContainerRef } from '@angular/core';
2
+ import { TCOLUMN, THEAD, TROW } from '../gtr-table.interface';
3
+ import { GtrFetchAttributePipe } from '../gtr-fetch-attribute.pipe';
4
+ import * as i0 from "@angular/core";
5
+ export declare class GtrTableResponsiveComponent implements OnDestroy, AfterViewChecked {
6
+ private cdRef;
7
+ private attributesPipe;
8
+ templateRef: QueryList<ViewContainerRef>;
9
+ isLoading: boolean;
10
+ constructor(cdRef: ChangeDetectorRef, attributesPipe: GtrFetchAttributePipe);
11
+ /**
12
+ * Set the hide/show state of checbox.
13
+ * @default 'boolean'
14
+ * @type CheckBox State
15
+ */
16
+ enableSelection: boolean;
17
+ /**
18
+ * Table columns
19
+ */
20
+ columns: THEAD[];
21
+ /**
22
+ * Table data
23
+ */
24
+ data: TROW[];
25
+ /**
26
+ * Table data
27
+ */
28
+ tableResponsiveId: string;
29
+ /**
30
+ * The selection changed eventemitter
31
+ */
32
+ onSelection: EventEmitter<any>;
33
+ /**
34
+ * Action eventemitter
35
+ */
36
+ onAction: EventEmitter<any>;
37
+ /**
38
+ * Sorting eventemitter
39
+ */
40
+ onSort: EventEmitter<any>;
41
+ /**
42
+ * To check screen size
43
+ */
44
+ onResize(event: {
45
+ target: {
46
+ innerWidth: any;
47
+ };
48
+ }): void;
49
+ ngAfterViewChecked(): void;
50
+ fetchSelection(): boolean;
51
+ /**
52
+ * The method is used to emit Select All state
53
+ */
54
+ selectAll(event: any): void;
55
+ /**
56
+ * The method is used to emit selected rows
57
+ */
58
+ selectionDone(event: any, item: any): void;
59
+ /**
60
+ * The method is used to emit action
61
+ */
62
+ actionDone(value: string, row: any, action: any): void;
63
+ getActions(columns: TCOLUMN[] | undefined): TCOLUMN | undefined;
64
+ /**
65
+ * The method is used to check show/hidden state of row
66
+ */
67
+ checkRowHiddenState(row: any, column: any, expandAttributes: any, i: number): boolean | undefined;
68
+ /**
69
+ * The method is used to toggle show/hide state of row
70
+ */
71
+ expandRow(row: any): void;
72
+ ngOnDestroy(): void;
73
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrTableResponsiveComponent, never>;
74
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrTableResponsiveComponent, "gtr-table-responsive", ["gtrTableResponsive"], { "isLoading": { "alias": "isLoading"; "required": false; }; "enableSelection": { "alias": "enableSelection"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "tableResponsiveId": { "alias": "tableResponsiveId"; "required": false; }; }, { "onSelection": "onSelection"; "onAction": "onAction"; "onSort": "onSort"; }, never, never, true, never>;
75
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gettrx/core-components-angular",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Angular specific wrappers for @gettrx/core-components",
5
5
  "keywords": [
6
6
  "gettrx",
@@ -20,8 +20,7 @@
20
20
  "peerDependencies": {
21
21
  "@angular/common": "^16.1.0",
22
22
  "@angular/core": "^16.1.0",
23
- "@gettrx/core-components": "1.0.6",
24
- "@gettrx/core-styles": "1.0.6"
23
+ "@gettrx/core-styles": "1.0.8"
25
24
  },
26
25
  "module": "fesm2022/gettrx-core-components-angular.mjs",
27
26
  "typings": "index.d.ts",
package/public-api.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- export * from './generated/components';
2
- export { TextValueAccessor } from './generated/text-value-accessor';
3
- export { ValueAccessor } from './generated/value-accessor';
4
- export { GettrxModule } from './gettrx-module';
5
1
  export * from './lib/core-components.types';
6
2
  export * from './lib/atoms/badge';
7
3
  export * from './lib/atoms/button-directive';
@@ -29,5 +25,6 @@ export * from './lib/molecules/pagination';
29
25
  export * from './lib/molecules/select';
30
26
  export * from './lib/molecules/shared';
31
27
  export * from './lib/molecules/stat-card';
28
+ export * from './lib/molecules/table';
32
29
  export * from './lib/molecules/tabs';
33
30
  export * from './lib/molecules/time-picker';
@@ -1,51 +0,0 @@
1
- /* eslint-disable */
2
- /* tslint:disable */
3
- import { fromEvent } from 'rxjs';
4
- export const proxyInputs = (Cmp, inputs) => {
5
- const Prototype = Cmp.prototype;
6
- inputs.forEach((item) => {
7
- Object.defineProperty(Prototype, item, {
8
- get() {
9
- return this.el[item];
10
- },
11
- set(val) {
12
- this.z.runOutsideAngular(() => (this.el[item] = val));
13
- },
14
- });
15
- });
16
- };
17
- export const proxyMethods = (Cmp, methods) => {
18
- const Prototype = Cmp.prototype;
19
- methods.forEach((methodName) => {
20
- Prototype[methodName] = function () {
21
- const args = arguments;
22
- return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));
23
- };
24
- });
25
- };
26
- export const proxyOutputs = (instance, el, events) => {
27
- events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));
28
- };
29
- export const defineCustomElement = (tagName, customElement) => {
30
- if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
31
- customElements.define(tagName, customElement);
32
- }
33
- };
34
- // tslint:disable-next-line: only-arrow-functions
35
- export function ProxyCmp(opts) {
36
- const decorator = function (cls) {
37
- const { defineCustomElementFn, inputs, methods } = opts;
38
- if (defineCustomElementFn !== undefined) {
39
- defineCustomElementFn();
40
- }
41
- if (inputs) {
42
- proxyInputs(cls, inputs);
43
- }
44
- if (methods) {
45
- proxyMethods(cls, methods);
46
- }
47
- return cls;
48
- };
49
- return decorator;
50
- }
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvZ2VuZXJhdGVkL2FuZ3VsYXItY29tcG9uZW50LWxpYi91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvQkFBb0I7QUFDcEIsb0JBQW9CO0FBQ3BCLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFFakMsTUFBTSxDQUFDLE1BQU0sV0FBVyxHQUFHLENBQUMsR0FBUSxFQUFFLE1BQ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