@sarasanalytics-com/design-system 0.0.7 → 0.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 (28) hide show
  1. package/esm2022/interfaces/select-interface.mjs +1 -1
  2. package/esm2022/lib/card/card-footer-actions/card-footer-actions.component.mjs +11 -0
  3. package/esm2022/lib/card/card-icon/card-icon.component.mjs +11 -0
  4. package/esm2022/lib/card/card-title-actions/card-title-actions.component.mjs +11 -0
  5. package/esm2022/lib/card/card.component.mjs +53 -0
  6. package/esm2022/lib/form-input/form-input.component.mjs +152 -0
  7. package/esm2022/lib/form-select/form-select.component.mjs +3 -3
  8. package/esm2022/lib/icon/icon.component.mjs +50 -0
  9. package/esm2022/lib/icon/icon.service.mjs +29 -0
  10. package/esm2022/lib/left-nav/left-nav.component.mjs +117 -0
  11. package/esm2022/lib/toast/toast.component.mjs +52 -6
  12. package/esm2022/public-api.mjs +8 -1
  13. package/esm2022/utils/validators.mjs +70 -0
  14. package/fesm2022/sarasanalytics-com-design-system.mjs +524 -10
  15. package/fesm2022/sarasanalytics-com-design-system.mjs.map +1 -1
  16. package/interfaces/select-interface.d.ts +1 -0
  17. package/lib/card/card-footer-actions/card-footer-actions.component.d.ts +5 -0
  18. package/lib/card/card-icon/card-icon.component.d.ts +5 -0
  19. package/lib/card/card-title-actions/card-title-actions.component.d.ts +5 -0
  20. package/lib/card/card.component.d.ts +17 -0
  21. package/lib/form-input/form-input.component.d.ts +62 -0
  22. package/lib/icon/icon.component.d.ts +16 -0
  23. package/lib/icon/icon.service.d.ts +11 -0
  24. package/lib/left-nav/left-nav.component.d.ts +38 -0
  25. package/lib/toast/toast.component.d.ts +19 -4
  26. package/package.json +1 -1
  27. package/public-api.d.ts +7 -0
  28. package/utils/validators.d.ts +3 -0
@@ -0,0 +1,16 @@
1
+ import { SimpleChanges } from '@angular/core';
2
+ import { IconService } from './icon.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class IconComponent {
5
+ iconService: IconService;
6
+ icon: string;
7
+ size: string;
8
+ color: string;
9
+ svgIcon: any;
10
+ iconStyles: any;
11
+ constructor();
12
+ ngOnInit(): void;
13
+ ngOnChanges(changes: SimpleChanges): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "sa-icon", never, { "icon": { "alias": "icon"; "required": false; }; "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
16
+ }
@@ -0,0 +1,11 @@
1
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
2
+ import * as i0 from "@angular/core";
3
+ export declare class IconService {
4
+ private sanitizer;
5
+ private path;
6
+ constructor(sanitizer: DomSanitizer);
7
+ getSvg(iconName: string): SafeHtml;
8
+ setIconPath(path: string): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<IconService>;
11
+ }
@@ -0,0 +1,38 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
+ import * as i0 from "@angular/core";
4
+ export declare class LeftNavComponent {
5
+ private route;
6
+ private router;
7
+ data: ILeftNav;
8
+ clickEvent: EventEmitter<ILeftNavClickEvent>;
9
+ private activeItem;
10
+ constructor(route: ActivatedRoute, router: Router);
11
+ ngOnInit(): void;
12
+ setItemActive(index: number): void;
13
+ onNavItemClick(item: ILeftNavItem, index: number, event?: any): void;
14
+ onFooterItemClick(item: ILeftNavItem, index: number, event?: any): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<LeftNavComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<LeftNavComponent, "sa-left-nav", never, { "data": { "alias": "data"; "required": false; }; }, { "clickEvent": "click"; }, never, ["*"], true, never>;
17
+ }
18
+ export interface ILeftNav {
19
+ items?: ILeftNavItem[];
20
+ footerItems?: ILeftNavItem[];
21
+ }
22
+ export interface ILeftNavItem {
23
+ title: string;
24
+ icon?: string;
25
+ disable?: boolean;
26
+ tooltip?: string;
27
+ relativePath?: boolean;
28
+ path?: string;
29
+ active?: boolean;
30
+ type?: 'ICON' | 'AVATAR';
31
+ }
32
+ export interface ILeftNavClickEvent {
33
+ type: 'NAV_ITEM_CLICK' | 'FOOTER_ITEM_CLICK' | 'LOGO_CLICK';
34
+ event: any;
35
+ item: ILeftNavItem;
36
+ }
37
+ export declare enum ILeftNavTypes {
38
+ }
@@ -1,18 +1,33 @@
1
- import { EventEmitter, OnChanges } from '@angular/core';
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class ToastComponent implements OnChanges {
4
4
  finishPercentage: number;
5
5
  heading: string;
6
6
  subHeading: string;
7
7
  statusIcon: string;
8
- status: string;
8
+ status: 'success' | 'failure' | 'caution' | 'positive' | 'negative' | 'tentative';
9
9
  firstButtonName: string;
10
10
  secondButtonName: string;
11
+ closable: boolean;
12
+ filled: boolean;
13
+ width: number | string;
14
+ toastEvent: EventEmitter<IToastEvent>;
11
15
  firstButton: EventEmitter<any>;
12
16
  secondButton: EventEmitter<any>;
13
17
  closed: EventEmitter<any>;
14
- ngOnChanges(): void;
18
+ toastStyles: {
19
+ backgroundColor: string;
20
+ color: string;
21
+ width: string;
22
+ };
23
+ ngOnChanges(changes: SimpleChanges): void;
15
24
  clicked(num: number): void;
25
+ closeToast(): void;
16
26
  static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "sa-toast", never, { "finishPercentage": { "alias": "finishPercentage"; "required": false; }; "heading": { "alias": "heading"; "required": false; }; "subHeading": { "alias": "subHeading"; "required": false; }; "statusIcon": { "alias": "statusIcon"; "required": false; }; "status": { "alias": "status"; "required": false; }; "firstButtonName": { "alias": "firstButtonName"; "required": false; }; "secondButtonName": { "alias": "secondButtonName"; "required": false; }; }, { "firstButton": "firstButton"; "secondButton": "secondButton"; "closed": "closed"; }, never, never, true, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "sa-toast", never, { "finishPercentage": { "alias": "finishPercentage"; "required": false; }; "heading": { "alias": "heading"; "required": false; }; "subHeading": { "alias": "subHeading"; "required": false; }; "statusIcon": { "alias": "statusIcon"; "required": false; }; "status": { "alias": "status"; "required": false; }; "firstButtonName": { "alias": "firstButtonName"; "required": false; }; "secondButtonName": { "alias": "secondButtonName"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "filled": { "alias": "filled"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "toastEvent": "toastEvent"; "firstButton": "firstButton"; "secondButton": "secondButton"; "closed": "closed"; }, never, never, true, never>;
28
+ }
29
+ export interface IToastEvent {
30
+ type: 'TOAST_CLOSED' | 'ACTION_CLICKED';
31
+ event?: any;
32
+ params?: any;
18
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarasanalytics-com/design-system",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0"
package/public-api.d.ts CHANGED
@@ -17,3 +17,10 @@ export * from './interfaces/button-interface';
17
17
  export * from './interfaces/chip-interface';
18
18
  export * from './interfaces/select-interface';
19
19
  export * from './interfaces/tab-interface';
20
+ export * from './lib/icon/icon.component';
21
+ export * from './lib/left-nav/left-nav.component';
22
+ export * from './lib/form-input/form-input.component';
23
+ export * from './lib/card/card.component';
24
+ export * from './lib/card/card-icon/card-icon.component';
25
+ export * from './lib/card/card-footer-actions/card-footer-actions.component';
26
+ export * from './lib/card/card-title-actions/card-title-actions.component';
@@ -0,0 +1,3 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ export declare function phoneNumberValidator(dependent?: string): ValidatorFn;
3
+ export declare function getValidationMessage(errors: any): string;