ui-core-abv 0.1.2 → 0.1.3

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.
@@ -6,8 +6,8 @@ export declare class UicButtonComponent {
6
6
  iconOnly: boolean;
7
7
  disabled: boolean;
8
8
  loading: boolean;
9
- size: 't' | 's' | 'm' | 'l' | 'g';
10
- type: 'filled' | 'bordered' | 'ghost';
9
+ size: ButtonSize;
10
+ type: ButtonType;
11
11
  color: ButtonColor;
12
12
  buttonTypeClass: string;
13
13
  ngOnInit(): void;
@@ -15,3 +15,5 @@ export declare class UicButtonComponent {
15
15
  static ɵcmp: i0.ɵɵComponentDeclaration<UicButtonComponent, "ui-button", never, { "text": { "alias": "text"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "iconOnly": { "alias": "iconOnly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "size": { "alias": "size"; "required": false; }; "type": { "alias": "type"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, ["*"], true, never>;
16
16
  }
17
17
  export type ButtonColor = 'primary' | 'secondary' | 'red' | 'green' | 'blue' | 'yellow' | 'black';
18
+ export type ButtonSize = 't' | 's' | 'm' | 'l' | 'g';
19
+ export type ButtonType = 'filled' | 'bordered' | 'ghost';
@@ -1,12 +1,11 @@
1
1
  import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
- import { FormBlock, FormField, FormResult, FormSchema } from '../form.models';
2
+ import { FormField, FormResult, FormSchema } from '../form.models';
3
3
  import { FormGroup } from '@angular/forms';
4
4
  import { AppSelectOption } from '../../inputs/select/select.component';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class UicFormWrapperComponent implements OnChanges {
7
7
  private readonly fb;
8
8
  form: FormGroup;
9
- useSteps: boolean;
10
9
  currentStep: number;
11
10
  schema: FormSchema;
12
11
  externalData: Record<string, AppSelectOption[]>;
@@ -23,14 +22,10 @@ export declare class UicFormWrapperComponent implements OnChanges {
23
22
  private updateDisabledState;
24
23
  private updateExtenalData;
25
24
  private mapValidatorsFromField;
26
- handleSubmit(): void;
25
+ handleSubmit(): FormResult;
27
26
  private handleFormChange;
28
27
  private updateFieldOptions;
29
28
  private collectAllFields;
30
- getCurrentBlocks(): FormBlock[];
31
- nextStep(): void;
32
- prevStep(): void;
33
- getStepTitle(): string;
34
29
  updateFieldValue(name: string, value: any): void;
35
30
  updateFieldDisabled(name: string, disabled: boolean): void;
36
31
  updateFieldLoading(name: string, loading: boolean): void;
@@ -1,14 +1,15 @@
1
1
  import { AppSelectOption } from "../inputs/select/select.component";
2
+ export interface FormStep {
3
+ title: string;
4
+ form: FormSchema;
5
+ required?: boolean;
6
+ okButtonText?: string;
7
+ cancelButtonText?: string;
8
+ }
2
9
  export interface FormSchema {
3
10
  cols: number;
4
- steps?: FormStep[];
5
11
  blocks?: FormBlock[];
6
12
  }
7
- export interface FormStep {
8
- title?: string;
9
- description?: string;
10
- blocks: FormBlock[];
11
- }
12
13
  export interface FormBlock {
13
14
  title?: string;
14
15
  fields: FormField[];
@@ -0,0 +1,13 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class StepTabsComponent {
4
+ tabs: string[];
5
+ currentTab: string;
6
+ navigationEnabled: boolean;
7
+ showStepTitle: boolean;
8
+ currentTabChange: EventEmitter<string>;
9
+ currentIndex: number;
10
+ changeTab(newTab: string): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<StepTabsComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<StepTabsComponent, "ui-step-tabs", never, { "tabs": { "alias": "tabs"; "required": false; }; "currentTab": { "alias": "currentTab"; "required": false; }; "navigationEnabled": { "alias": "navigationEnabled"; "required": false; }; "showStepTitle": { "alias": "showStepTitle"; "required": false; }; }, { "currentTabChange": "currentTabChange"; }, never, never, true, never>;
13
+ }
@@ -0,0 +1,34 @@
1
+ import { EventEmitter, QueryList } from '@angular/core';
2
+ import { FormResult, FormStep } from '../form.models';
3
+ import { ButtonColor } from '../../button/button.component';
4
+ import { UicFormWrapperComponent } from '../form-wrapper/form-wrapper.component';
5
+ import * as i0 from "@angular/core";
6
+ export declare class UicStepsFormComponent {
7
+ allForms: QueryList<UicFormWrapperComponent>;
8
+ steps: FormStep[];
9
+ navigationEnabled: boolean;
10
+ showStepTitle: boolean;
11
+ showButtons: boolean;
12
+ buttonsColor: ButtonColor;
13
+ formSubmit: EventEmitter<FormResult>;
14
+ externalData: {};
15
+ formDisabled: boolean;
16
+ loading: boolean;
17
+ tabs: string[];
18
+ completedForms: Map<string, Record<string, any>>;
19
+ currentTabTitle: string;
20
+ ngOnInit(): void;
21
+ private getFormByTitle;
22
+ updateFieldValue(step: string, controlName: string, value: string): void;
23
+ updateFildDisabled(step: string, controlName: string, value: boolean): void;
24
+ updateFildLoading(step: string, controlName: string, value: boolean): void;
25
+ next(): void;
26
+ back(): void;
27
+ private handleStepSubmit;
28
+ private getMergedForm;
29
+ get currentIdx(): number;
30
+ get isFirst(): boolean;
31
+ get isLast(): boolean;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<UicStepsFormComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicStepsFormComponent, "ui-steps-form", never, { "steps": { "alias": "steps"; "required": false; }; "navigationEnabled": { "alias": "navigationEnabled"; "required": false; }; "showStepTitle": { "alias": "showStepTitle"; "required": false; }; "showButtons": { "alias": "showButtons"; "required": false; }; "buttonsColor": { "alias": "buttonsColor"; "required": false; }; }, { "formSubmit": "formSubmit"; }, never, never, true, never>;
34
+ }
@@ -19,9 +19,10 @@ export declare class UicCheckboxComponent extends base {
19
19
  type: 'check' | 'switch';
20
20
  placeholder: string;
21
21
  loading: boolean;
22
+ noPadding: boolean;
22
23
  disabled: boolean;
23
24
  toggle(): void;
24
25
  static ɵfac: i0.ɵɵFactoryDeclaration<UicCheckboxComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<UicCheckboxComponent, "ui-checkbox", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "label": { "alias": "label"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicCheckboxComponent, "ui-checkbox", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "label": { "alias": "label"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "noPadding": { "alias": "noPadding"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], true, never>;
26
27
  }
27
28
  export {};
@@ -23,6 +23,7 @@ export declare class UicSideModalComponent {
23
23
  ngAfterViewInit(): void;
24
24
  closeOuside(): void;
25
25
  close(): void;
26
+ cancel(): void;
26
27
  onAnimationDone(event: any): void;
27
28
  save(): void;
28
29
  static ɵfac: i0.ɵɵFactoryDeclaration<UicSideModalComponent, never>;
@@ -5,7 +5,10 @@ export interface SideModalConfig<T = any> {
5
5
  footerEnabled?: boolean;
6
6
  footerOkButtonText?: string;
7
7
  showCancelButton?: boolean;
8
+ preventCloseOnCancel?: boolean;
8
9
  footerCancelButtonText?: string;
10
+ footerCancelIcon?: string;
11
+ footerOkIcon?: string;
9
12
  headerEnabled?: boolean;
10
13
  width?: string;
11
14
  }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class UicStatusLabelComponent {
3
+ color: string;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<UicStatusLabelComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicStatusLabelComponent, "ui-status-label", never, { "color": { "alias": "color"; "required": false; }; }, {}, never, ["*"], true, never>;
6
+ }
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { TableAction, TableColums, TableRow, TableFilters, TableRowData } from './table.models';
2
+ import { TableAction, TableColums, TableRow, TableFilters, TableRowData, TableButton } from './table.models';
3
+ import { ActionMenuOption } from '../uic-action-button/uic-action-button.component';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class UicTableComponent {
5
6
  columns: TableColums[];
@@ -28,6 +29,7 @@ export declare class UicTableComponent {
28
29
  filter: string;
29
30
  page: number;
30
31
  getValue(data: TableRowData[], key: string): string | number;
32
+ getMoreActions(actions: TableButton[]): ActionMenuOption[];
31
33
  getFontColor(data: TableRowData[], key: string): string;
32
34
  getBackgroundColor(data: TableRowData[], key: string): import("ui-core-abv").BackgroundColors;
33
35
  isValidRule(data: TableRowData[], key: string[] | undefined): boolean;
@@ -1,16 +1,19 @@
1
- import { ButtonColor } from "../button/button.component";
1
+ import { ButtonColor, ButtonType } from "../button/button.component";
2
2
  export interface TableColums {
3
3
  label: string;
4
4
  key: string;
5
+ width?: number;
5
6
  type: ColumnTypes;
6
7
  sortEnable?: boolean;
7
8
  actions?: TableButton[];
9
+ moreActions?: TableButton[];
8
10
  }
9
11
  export interface TableButton {
10
12
  key: string;
11
13
  color: ButtonColor;
12
14
  icon?: string;
13
15
  text?: string;
16
+ type?: ButtonType;
14
17
  tooltip?: string;
15
18
  rule?: string[];
16
19
  }
@@ -44,7 +47,7 @@ export interface TableAction {
44
47
  rowId: number | string;
45
48
  key: string;
46
49
  }
47
- export type ColumnTypes = 'actions' | 'text' | 'list' | 'user' | 'checkbox' | 'icon-list';
50
+ export type ColumnTypes = 'actions' | 'text' | 'list' | 'user' | 'checkbox' | 'icon-list' | 'status';
48
51
  export type TableTextColors = 'primary' | 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'grey';
49
52
  export type BackgroundColors = 'primary' | 'secondary' | 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'grey' | 'transparent' | 'white';
50
53
  export interface TableFilters {
@@ -0,0 +1,36 @@
1
+ import { ConnectedPosition } from '@angular/cdk/overlay';
2
+ import { EventEmitter, TemplateRef } from '@angular/core';
3
+ import { ButtonSize } from '../button/button.component';
4
+ import * as i0 from "@angular/core";
5
+ export declare class UicActionButtonComponent {
6
+ icon: string;
7
+ options: ActionMenuOption[];
8
+ multiselect: boolean;
9
+ size: ButtonSize;
10
+ optionSelected: EventEmitter<ActionMenuOption>;
11
+ optionsApplied: EventEmitter<ActionMenuOption[]>;
12
+ menuTemplate: TemplateRef<any>;
13
+ private overlayRef;
14
+ private readonly overlay;
15
+ private readonly vcr;
16
+ private readonly host;
17
+ selectedSet: Set<string | number>;
18
+ allSelected: boolean;
19
+ overlayPositions: ConnectedPosition[];
20
+ openMenu(): void;
21
+ /** SINGLE SELECT MODE */
22
+ selectOption(option: ActionMenuOption): void;
23
+ /** MULTISELECT MODE */
24
+ toggleOption(opt: ActionMenuOption): void;
25
+ toggleAll(checked: boolean): void;
26
+ applySelection(): void;
27
+ updateAllSelected(): void;
28
+ closeMenu(): void;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<UicActionButtonComponent, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicActionButtonComponent, "ui-action-button", never, { "icon": { "alias": "icon"; "required": false; }; "options": { "alias": "options"; "required": false; }; "multiselect": { "alias": "multiselect"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "optionSelected": "optionSelected"; "optionsApplied": "optionsApplied"; }, never, never, true, never>;
31
+ }
32
+ export interface ActionMenuOption {
33
+ id: string;
34
+ label: string;
35
+ icon?: string;
36
+ }
@@ -13,8 +13,8 @@ export declare class UicModalService {
13
13
  close(overlayRef: OverlayRef, result?: any): void;
14
14
  closeFloating(overlayRef: OverlayRef, result?: any): void;
15
15
  private readonly _save$;
16
- save$: import("rxjs").Observable<void>;
17
- triggerSave(): void;
16
+ save$: import("rxjs").Observable<boolean>;
17
+ triggerSave(result?: boolean): void;
18
18
  private createOverlayConfig;
19
19
  private createModalInjector;
20
20
  static ɵfac: i0.ɵɵFactoryDeclaration<UicModalService, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-core-abv",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0",
package/public-api.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './lib/components/button/button.component';
2
2
  export * from './lib/components/inputs/checkbox/checkbox.component';
3
3
  export * from './lib/components/inputs/toggle-button/toggle-button.component';
4
4
  export * from './lib/components/dynamic-form/form-wrapper/form-wrapper.component';
5
+ export * from './lib/components/dynamic-form/steps-form/steps-form.component';
5
6
  export * from './lib/components/inputs/input/input.component';
6
7
  export * from './lib/components/inputs/date-picker/date-picker.component';
7
8
  export * from './lib/components/inputs/searcher/searcher.component';
@@ -11,6 +12,7 @@ export * from './lib/components/table/table.models';
11
12
  export * from './lib/components/skeleton-loader/skeleton-loader.component';
12
13
  export * from './lib/components/push-alerts/alert-container/alert-container.component';
13
14
  export * from './lib/components/inputs/ui-slider/ui-slider.component';
15
+ export * from './lib/components/uic-action-button/uic-action-button.component';
14
16
  export * from './lib/animations/animatios.index';
15
17
  export * from './lib/components/dynamic-form/form.models';
16
18
  export * from './lib/services/modal.service';