@gettrx/core-components-angular 1.0.3 → 1.0.5

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 (35) hide show
  1. package/esm2022/lib/atoms/input/gtr-input.component.mjs +4 -17
  2. package/esm2022/lib/atoms/popover/gtr-popover.component.mjs +2 -2
  3. package/esm2022/lib/atoms/switch/gtr-switch.component.mjs +15 -9
  4. package/esm2022/lib/atoms/toaster/gtr-toaster.component.mjs +85 -0
  5. package/esm2022/lib/atoms/toaster/gtr-toaster.module.mjs +22 -0
  6. package/esm2022/lib/atoms/toaster/index.mjs +2 -0
  7. package/esm2022/lib/atoms/toaster/public_api.mjs +4 -0
  8. package/esm2022/lib/atoms/toaster/services/gtr-toaster.service.mjs +56 -0
  9. package/esm2022/lib/atoms/toaster/util/gtr-toaster.util.mjs +2 -0
  10. package/esm2022/lib/molecules/accordion/accordion/gtr-accordion.component.mjs +2 -2
  11. package/esm2022/lib/molecules/accordion/accordion-wrapper/gtr-accordion-wrapper.component.mjs +18 -16
  12. package/esm2022/lib/molecules/pagination/pagination/gtr-pagination.component.mjs +3 -3
  13. package/esm2022/lib/molecules/stat-card/gtr-stat-card.component.mjs +2 -2
  14. package/esm2022/lib/molecules/tabs/gtr-tabs.module.mjs +19 -0
  15. package/esm2022/lib/molecules/tabs/index.mjs +2 -0
  16. package/esm2022/lib/molecules/tabs/public_api.mjs +4 -0
  17. package/esm2022/lib/molecules/tabs/tab/gtr-tab.component.mjs +34 -0
  18. package/esm2022/lib/molecules/tabs/tabs-wrapper/gtr-tabs-wrapper.component.mjs +92 -0
  19. package/esm2022/public-api.mjs +3 -3
  20. package/fesm2022/gettrx-core-components-angular.mjs +321 -46
  21. package/fesm2022/gettrx-core-components-angular.mjs.map +1 -1
  22. package/lib/atoms/switch/gtr-switch.component.d.ts +7 -5
  23. package/lib/atoms/toaster/gtr-toaster.component.d.ts +27 -0
  24. package/lib/atoms/toaster/gtr-toaster.module.d.ts +10 -0
  25. package/lib/atoms/toaster/index.d.ts +1 -0
  26. package/lib/atoms/toaster/public_api.d.ts +3 -0
  27. package/lib/atoms/toaster/services/gtr-toaster.service.d.ts +14 -0
  28. package/lib/atoms/toaster/util/gtr-toaster.util.d.ts +13 -0
  29. package/lib/molecules/tabs/gtr-tabs.module.d.ts +9 -0
  30. package/lib/molecules/tabs/index.d.ts +1 -0
  31. package/lib/molecules/tabs/public_api.d.ts +3 -0
  32. package/lib/molecules/tabs/tab/gtr-tab.component.d.ts +16 -0
  33. package/lib/molecules/tabs/tabs-wrapper/gtr-tabs-wrapper.component.d.ts +23 -0
  34. package/package.json +3 -3
  35. package/public-api.d.ts +2 -0
@@ -3,11 +3,6 @@ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class GtrSwitchComponent implements ControlValueAccessor {
5
5
  ngControl: NgControl;
6
- constructor(ngControl: NgControl);
7
- writeValue(obj: any): void;
8
- registerOnChange(fn: any): void;
9
- registerOnTouched(fn: any): void;
10
- setDisabledState?(isDisabled: boolean): void;
11
6
  /**
12
7
  * Checked state for gtr switch button
13
8
  * @returns boolean value
@@ -42,6 +37,13 @@ export declare class GtrSwitchComponent implements ControlValueAccessor {
42
37
  * @returns Custom event for latest checked state
43
38
  */
44
39
  gtrChange: EventEmitter<boolean>;
40
+ constructor(ngControl: NgControl);
41
+ onChanged: any;
42
+ onTouched: any;
43
+ writeValue(value: boolean): void;
44
+ registerOnChange(fn: any): void;
45
+ registerOnTouched(fn: any): void;
46
+ setDisabledState?(isDisabled: boolean): void;
45
47
  /**
46
48
  * Local method to handle keyboard events for switch button
47
49
  */
@@ -0,0 +1,27 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { GtrToasterEvent } from './util/gtr-toaster.util';
3
+ import { Subscription } from 'rxjs';
4
+ import { GtrToasterService } from './services/gtr-toaster.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class GtrToasterComponent {
7
+ private toasterV2Service;
8
+ id: string;
9
+ testId: string;
10
+ toasterElement?: ElementRef<HTMLDivElement>;
11
+ duration: number;
12
+ toasterData: GtrToasterEvent;
13
+ open: boolean;
14
+ timeout: any;
15
+ resolvePromise: (data?: any) => void;
16
+ toastSubscription: Subscription;
17
+ constructor(toasterV2Service: GtrToasterService);
18
+ ngOnInit(): void;
19
+ ngOnDestroy(): void;
20
+ showToast(config: any, duration: number, data?: any): Promise<any>;
21
+ scheduleHideToast(duration: number): void;
22
+ hideToast(): void;
23
+ handleKeyDown(event: KeyboardEvent): void;
24
+ subscribeToToasts(): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrToasterComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrToasterComponent, "gtr-toaster", never, { "id": { "alias": "id"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, {}, never, never, false, never>;
27
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./gtr-toaster.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../icon/gtr-icon.module";
5
+ import * as i4 from "../badge/gtr-badge.module";
6
+ export declare class GtrToasterModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrToasterModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GtrToasterModule, [typeof i1.GtrToasterComponent], [typeof i2.CommonModule, typeof i3.GtrIconModule, typeof i4.GtrBadgeModule], [typeof i1.GtrToasterComponent]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<GtrToasterModule>;
10
+ }
@@ -0,0 +1 @@
1
+ export * from './public_api';
@@ -0,0 +1,3 @@
1
+ export { GtrToasterComponent } from './gtr-toaster.component';
2
+ export { GtrToasterModule } from './gtr-toaster.module';
3
+ export { GtrToasterService } from './services/gtr-toaster.service';
@@ -0,0 +1,14 @@
1
+ import { Subject } from 'rxjs';
2
+ import { GtrToasterEvent } from '../util/gtr-toaster.util';
3
+ import * as i0 from "@angular/core";
4
+ export declare class GtrToasterService {
5
+ private toastSubject;
6
+ showToast(config?: GtrToasterEvent, duration?: number, data?: any): void;
7
+ showError(message?: string, duration?: number): void;
8
+ showSuccess(message?: string, duration?: number): void;
9
+ showWarning(message?: string, duration?: number): void;
10
+ showInfo(message?: string, duration?: number): void;
11
+ getToastSubject(): Subject<any>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrToasterService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<GtrToasterService>;
14
+ }
@@ -0,0 +1,13 @@
1
+ export type RGB = `rgb(${number}, ${number}, ${number})`;
2
+ export type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
3
+ export type HEX = `#${string}`;
4
+ export type GtrToasterType = 'success' | 'warning' | 'info' | 'error';
5
+ export interface GtrToasterEvent {
6
+ heading: string;
7
+ type: GtrToasterType;
8
+ message?: string;
9
+ backgroundColor?: RGB | RGBA | HEX;
10
+ color?: RGB | RGBA | HEX;
11
+ messageColor?: RGB | RGBA | HEX;
12
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center-right' | 'center-left';
13
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tab/gtr-tab.component";
3
+ import * as i2 from "./tabs-wrapper/gtr-tabs-wrapper.component";
4
+ import * as i3 from "@angular/common";
5
+ export declare class GtrTabsModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrTabsModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GtrTabsModule, [typeof i1.GtrTabComponent, typeof i2.GtrTabsWrapperComponent], [typeof i3.CommonModule], [typeof i1.GtrTabComponent, typeof i2.GtrTabsWrapperComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<GtrTabsModule>;
9
+ }
@@ -0,0 +1 @@
1
+ export * from './public_api';
@@ -0,0 +1,3 @@
1
+ export { GtrTabComponent } from './tab/gtr-tab.component';
2
+ export { GtrTabsWrapperComponent } from './tabs-wrapper/gtr-tabs-wrapper.component';
3
+ export { GtrTabsModule } from './gtr-tabs.module';
@@ -0,0 +1,16 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class GtrTabComponent {
4
+ label: string;
5
+ active: boolean;
6
+ disabled: boolean;
7
+ tabChange: EventEmitter<any>;
8
+ private _activeTab;
9
+ constructor();
10
+ set activeTab(activeTab: {
11
+ activeTab: GtrTabComponent | GtrTabComponent[];
12
+ index: number;
13
+ } | null);
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrTabComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrTabComponent, "gtr-tab", never, { "label": { "alias": "label"; "required": false; }; "active": { "alias": "active"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "tabChange": "tabChange"; }, never, ["*"], false, never>;
16
+ }
@@ -0,0 +1,23 @@
1
+ import { ElementRef, EventEmitter, QueryList } from '@angular/core';
2
+ import { GtrTabComponent } from '../tab/gtr-tab.component';
3
+ import * as i0 from "@angular/core";
4
+ export declare class GtrTabsWrapperComponent {
5
+ tabs: QueryList<GtrTabComponent>;
6
+ position: 'start' | 'end' | 'center' | 'fill';
7
+ id: string;
8
+ testId: string;
9
+ tabScrollContainerRef: ElementRef;
10
+ tabScrollListRef: ElementRef;
11
+ tabChanges: EventEmitter<any>;
12
+ get tabsContainerClass(): string;
13
+ get tabsWrapperClass(): string;
14
+ get tabListLength(): number;
15
+ ngOnInit(): void;
16
+ ngAfterContentInit(): void;
17
+ ngAfterViewInit(): void;
18
+ selectTab(selectedTab: GtrTabComponent): void;
19
+ onTabListScroll(): void;
20
+ isScrollable(element: HTMLElement): boolean;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<GtrTabsWrapperComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<GtrTabsWrapperComponent, "gtr-tabs-wrapper", never, { "position": { "alias": "position"; "required": false; }; "id": { "alias": "id"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, { "tabChanges": "tabChanges"; }, ["tabs"], ["*"], false, never>;
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gettrx/core-components-angular",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Angular specific wrappers for @gettrx/core-components",
5
5
  "keywords": [
6
6
  "gettrx",
@@ -20,8 +20,8 @@
20
20
  "peerDependencies": {
21
21
  "@angular/common": "^16.1.0",
22
22
  "@angular/core": "^16.1.0",
23
- "@gettrx/core-components": "1.0.3",
24
- "@gettrx/core-styles": "1.0.3"
23
+ "@gettrx/core-components": "1.0.5",
24
+ "@gettrx/core-styles": "1.0.5"
25
25
  },
26
26
  "module": "fesm2022/gettrx-core-components-angular.mjs",
27
27
  "typings": "index.d.ts",
package/public-api.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from './lib/atoms/icon';
14
14
  export * from './lib/atoms/popover';
15
15
  export * from './lib/atoms/radio-button';
16
16
  export * from './lib/atoms/skeleton';
17
+ export * from './lib/atoms/toaster';
17
18
  export * from './lib/molecules/accordion';
18
19
  export * from './lib/molecules/calendar';
19
20
  export * from './lib/molecules/checkbox';
@@ -28,4 +29,5 @@ export * from './lib/molecules/pagination';
28
29
  export * from './lib/molecules/select';
29
30
  export * from './lib/molecules/shared';
30
31
  export * from './lib/molecules/stat-card';
32
+ export * from './lib/molecules/tabs';
31
33
  export * from './lib/molecules/time-picker';