@zeedhi/common 1.96.0 → 1.96.1

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.
@@ -74,7 +74,7 @@ export declare class Input extends ComponentRender implements IInput {
74
74
  /**
75
75
  * Rules that will validate the input value.
76
76
  */
77
- rules: ((value: any) => boolean | string)[];
77
+ rules: ((value?: any) => boolean | string)[];
78
78
  /**
79
79
  * Shows input border.
80
80
  */
@@ -110,7 +110,7 @@ export declare class Input extends ComponentRender implements IInput {
110
110
  /**
111
111
  * Parsed field rules.
112
112
  */
113
- protected parsedValidations: IDictionary<((value: any) => boolean | string)>;
113
+ protected parsedValidations: IDictionary<((value?: any) => boolean | string)>;
114
114
  protected formatterFn: Function;
115
115
  protected parserFn: Function;
116
116
  protected internalDisplayValue: string;
@@ -188,7 +188,7 @@ export declare class Input extends ComponentRender implements IInput {
188
188
  * Checks the input value are valid to all applied rules.
189
189
  * @returns Input is valid
190
190
  */
191
- isValid(): boolean;
191
+ isValid(value?: any): boolean;
192
192
  /**
193
193
  * Triggered when the input value changes.
194
194
  * @param event DOM event
@@ -1,5 +1,12 @@
1
- import { IComponent } from '../zd-component/interfaces';
1
+ import { IEventParam } from '@zeedhi/core';
2
+ import { IComponent, IComponentEvents, EventDef } from '../zd-component/interfaces';
2
3
  import { IButton } from '../zd-button/interfaces';
4
+ import { Modal } from './modal';
5
+ export declare type IModalEvent = IEventParam<Modal>;
6
+ export interface IModalEvents<T = IEventParam<any>> extends IComponentEvents<T> {
7
+ onShow?: EventDef<T>;
8
+ onHide?: EventDef<T>;
9
+ }
3
10
  export interface IModalGrid {
4
11
  cols?: number | string;
5
12
  xs?: number | string;
@@ -21,6 +28,7 @@ export interface IModal extends IComponent {
21
28
  draggable?: boolean;
22
29
  dragHandle?: string;
23
30
  escKeydownStop?: boolean;
31
+ events?: IModalEvents;
24
32
  }
25
33
  export interface IModalCloseButton extends IButton {
26
34
  modalName: string;
@@ -1,4 +1,4 @@
1
- import { IModal, IModalGrid } from './interfaces';
1
+ import { IModal, IModalEvents, IModalGrid } from './interfaces';
2
2
  import { Component } from '../zd-component/component';
3
3
  /**
4
4
  * Base class for Modal component.
@@ -29,6 +29,10 @@ export declare class Modal extends Component implements IModal {
29
29
  * Set if esc keydown event should to stop propagation
30
30
  */
31
31
  escKeydownStop?: boolean;
32
+ /**
33
+ * Defines modal events.
34
+ */
35
+ events: IModalEvents;
32
36
  /**
33
37
  * Creates a new modal
34
38
  * @param props Modal structure
@@ -12,6 +12,7 @@ export interface ITextInput extends IInput {
12
12
  appendIcon?: string;
13
13
  appendOuterIcon?: string;
14
14
  events?: ITextInputEvents;
15
+ focusOnOuterIconClick?: boolean;
15
16
  prependIcon?: string;
16
17
  prependOuterIcon?: string;
17
18
  type?: string;
@@ -44,6 +44,10 @@ export declare class TextInput extends Input implements ITextInput {
44
44
  * Defines text input value should concat the suffix text.
45
45
  */
46
46
  valueWithSuffix: boolean;
47
+ /**
48
+ * Defines clicks on outer icon should focus the component.
49
+ */
50
+ focusOnOuterIconClick: boolean;
47
51
  protected formatterFn: Function;
48
52
  protected parserFn: Function;
49
53
  /**
@@ -8,6 +8,7 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
8
8
  * Editable columns
9
9
  */
10
10
  columns: GridColumnEditable[];
11
+ currentColumn: GridColumnEditable;
11
12
  /**
12
13
  * Editing rows
13
14
  */
@@ -84,14 +84,7 @@ export declare class TreeGrid extends Grid implements ITreeGrid {
84
84
  * @param collapse Should collapse
85
85
  */
86
86
  navigateToggle(collapse: boolean): void;
87
- /**
88
- * Navigate upwards
89
- */
90
- navigateUp(): void;
91
- /**
92
- * Navigate downwards
93
- */
94
- navigateDown(): void;
87
+ navigateDatasource(up: boolean): void;
95
88
  private removeDuplicates;
96
89
  /**
97
90
  * Select/deselect rows
@@ -0,0 +1,47 @@
1
+ import { IDictionary } from '@zeedhi/core';
2
+ declare type GroupHeader = {
3
+ group: boolean;
4
+ groupRow: IDictionary;
5
+ groupColumnName: string;
6
+ groupHeader: boolean;
7
+ groupIndex: number;
8
+ groupLabel: string;
9
+ groupValue: number | string;
10
+ groupOpened: boolean;
11
+ groupHeaders: GroupHeader[];
12
+ children: IDictionary[];
13
+ };
14
+ declare type GroupFooter = {
15
+ groupFooter: boolean;
16
+ groupIndex: number;
17
+ groupHeaders: GroupHeader[];
18
+ groupLabel: string;
19
+ groupValue: number | string;
20
+ groupSummary?: boolean;
21
+ [key: string]: any;
22
+ };
23
+ declare type DataItem = IDictionary & {
24
+ groupHeaders?: GroupHeader[];
25
+ };
26
+ export declare type InputDataEntry = GroupHeader | DataItem | GroupFooter;
27
+ declare type OutputGroupData = {
28
+ __group: boolean;
29
+ __groupHeader?: boolean;
30
+ __groupFooter?: boolean;
31
+ __groupIndex: number;
32
+ __groupLabel: string;
33
+ __groupValue: string;
34
+ __groupOpened?: boolean;
35
+ __groupSummary?: boolean;
36
+ [key: string]: any;
37
+ };
38
+ export declare type OutputDataEntry = OutputGroupData | IDictionary;
39
+ /**
40
+ * Class used to format grouped data into the ZhReports format
41
+ */
42
+ export declare class GroupedPDFFormatter {
43
+ format(data: InputDataEntry[]): OutputDataEntry[];
44
+ isGroupHeader(entry: InputDataEntry): entry is GroupHeader;
45
+ isGroupFooter(entry: InputDataEntry): entry is GroupFooter;
46
+ }
47
+ export {};
@@ -0,0 +1 @@
1
+ export * from './grouped-pdf-formatter';
@@ -6,3 +6,4 @@ export * from './report-type/xls-report';
6
6
  export * from './report-type/xls2-report';
7
7
  export * from './report-type/xls3-report';
8
8
  export * from './report-type/interfaces';
9
+ export * from './dataset-formatters';
@@ -11,5 +11,5 @@ export declare class Report implements IReport {
11
11
  private getData;
12
12
  private getReportType;
13
13
  getReport(type: string, portrait?: boolean, rowObj?: any, beforeReportEvent?: IBeforeReportEvent): Promise<string>;
14
- private removeColumns;
14
+ private filterColumns;
15
15
  }