@zeedhi/common 1.111.1 → 1.113.0

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.
@@ -28,6 +28,8 @@ export interface IColumn extends IComponent {
28
28
  events?: IIterableEvents;
29
29
  xlsType?: string;
30
30
  searchMode?: ColumnSearchMode;
31
+ searchable?: boolean;
32
+ valueIn?: string;
31
33
  }
32
34
  export interface IIterable extends IComponentRender {
33
35
  columns?: IColumn[];
@@ -65,6 +67,7 @@ export interface ISearch extends ITextInput {
65
67
  showHelper?: boolean;
66
68
  appendIcon?: string;
67
69
  lazyAttach?: boolean;
70
+ hideSearchField?: boolean;
68
71
  }
69
72
  export interface IIterableColumnsButton extends IButton {
70
73
  iterableComponentName?: string;
@@ -14,6 +14,10 @@ export declare class Search extends TextInput implements ISearch {
14
14
  */
15
15
  iterableComponent: Iterable;
16
16
  lazyAttach: boolean;
17
+ /**
18
+ * * hide the option to select search field
19
+ */
20
+ hideSearchField: boolean;
17
21
  /**
18
22
  * Creates a new Iterable Page component.
19
23
  * @param props Iterable page component properties
@@ -91,7 +91,7 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
91
91
  * @param element DOM Element
92
92
  */
93
93
  selectAllClick(isSelected: boolean, event?: Event, element?: any): void;
94
- getVisibleValue(row: IDictionary, column: IGridColumnEditable): any;
94
+ getVisibleValue(row: IDictionary, column: GridColumnEditable): any;
95
95
  /**
96
96
  * Returns editable component properties based on the column definition
97
97
  * @param column Column definition
@@ -99,10 +99,10 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
99
99
  * @param cellProps Column conditional props
100
100
  * @param events Component events
101
101
  */
102
- getEditableComponent(column: IGridColumnEditable, row: IDictionary<any>, cellProps: IDictionary<any>, events: any): {
102
+ getEditableComponent(column: GridColumnEditable, row: IDictionary<any>, cellProps: IDictionary<any>, events: any): {
103
103
  name: string;
104
104
  parent: TreeGridEditable;
105
- align: "left" | "center" | "right" | undefined;
105
+ align: import("..").ColumnAlign;
106
106
  showLabel: boolean;
107
107
  showHelper: boolean;
108
108
  dense: boolean;
@@ -128,7 +128,7 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
128
128
  * @param column Column
129
129
  * @param row Row
130
130
  */
131
- isEdited(column: IGridColumnEditable, row: IDictionary): boolean;
131
+ isEdited(column: GridColumnEditable, row: IDictionary): boolean;
132
132
  /**
133
133
  * Checks if column is valid
134
134
  * @param column Column
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,3 @@
1
1
  import './column-zdselect';
2
2
  import './column-zdselectmultiple';
3
+ import './column-zdtextinput';
@@ -1,17 +1,21 @@
1
1
  import { IDictionary } from '@zeedhi/core';
2
2
  import { IColumn } from '../../../components';
3
- import { IReportType, MetadataFilter, LabelFormatter } from './interfaces';
3
+ import { IReportType, MetadataFilter, LabelFormatter, BuildDatasetParams } from './interfaces';
4
4
  import { ReportColumnTransformer } from './report-column-transformer';
5
5
  export declare abstract class BaseReport implements IReportType {
6
6
  reportColumnTransformer: ReportColumnTransformer;
7
+ labelFormatter?: LabelFormatter;
7
8
  constructor(labelFormatter?: LabelFormatter);
8
9
  protected getReportColumnTransformer(labelFormatter?: LabelFormatter): ReportColumnTransformer;
9
10
  abstract getFileType(): string;
10
11
  abstract route: string;
11
- abstract buildDataset(data: IDictionary<any>[], metadata?: any): any;
12
+ abstract buildDataset(params: BuildDatasetParams): any;
12
13
  abstract buildMetadata(name: string, title: string, columns: IColumn[], filter?: IDictionary<any>, portrait?: boolean): Promise<any>;
14
+ private getColumnLabel;
13
15
  protected buildFilter(filter: IDictionary, columns: IColumn[]): MetadataFilter;
14
16
  protected formatLangCode(lang?: string): string;
15
17
  protected expressionZeedhiToXls: any;
16
18
  protected colunmXLS: string;
19
+ protected filterColumns(columns: IColumn[]): IColumn[];
20
+ protected buildCols(columns: IColumn[]): import("./interfaces").MetadataColumn;
17
21
  }
@@ -1,9 +1,10 @@
1
1
  import { IDictionary } from '@zeedhi/core';
2
2
  import { IColumn } from '../../../components';
3
3
  import { BaseReport } from './base-report';
4
+ import { BuildDatasetParams } from './interfaces';
4
5
  export declare class CSVReport extends BaseReport {
5
6
  getFileType(): string;
6
7
  readonly route: string;
7
- buildDataset(data: IDictionary<any>[], columns: IColumn[]): string;
8
+ buildDataset({ data, columns }: Omit<BuildDatasetParams, 'metadata'>): string;
8
9
  buildMetadata(name: string, title: string, columns: IColumn[], filter?: IDictionary<any>): Promise<string>;
9
10
  }
@@ -1,10 +1,14 @@
1
1
  import { IDictionary } from '@zeedhi/core';
2
2
  import { IColumn } from '../../../components';
3
+ export declare type BuildDatasetParams = {
4
+ data: IDictionary[];
5
+ columns: IColumn[];
6
+ metadata: IMetadataObj;
7
+ };
3
8
  export interface IReportType {
4
9
  readonly route: string;
5
10
  type?: string;
6
- buildDataset(data: IDictionary[], metadata: any): any;
7
- buildDataset(data: IDictionary[], metadata?: any, columns?: IColumn[]): any;
11
+ buildDataset(params: BuildDatasetParams): any;
8
12
  buildMetadata(name: string, title: string, columns: IColumn[], filter?: IDictionary, portrait?: boolean): Promise<any>;
9
13
  }
10
14
  export declare type MetadataColumn = IDictionary<{
@@ -7,7 +7,9 @@ export declare class PDFReport extends BaseReport {
7
7
  getFileType(): string;
8
8
  readonly route: string;
9
9
  protected getReportColumnTransformer(labelFormatter?: LabelFormatter): ReportColumnTransformer;
10
- buildDataset(data: IDictionary<any>[]): string;
10
+ buildDataset({ data }: {
11
+ data: IDictionary[];
12
+ }): string;
11
13
  private getFormatOfColumn;
12
14
  private isNumberComponent;
13
15
  private checkAccessor;
@@ -1,10 +1,11 @@
1
1
  import { IDictionary } from '@zeedhi/core';
2
2
  import { IColumn } from '../../../components';
3
3
  import { BaseReport } from './base-report';
4
+ import { BuildDatasetParams } from './interfaces';
4
5
  export declare class XLSReport extends BaseReport {
5
6
  getFileType(): string;
6
7
  readonly route: string;
7
- buildDataset(data: IDictionary<any>[], columns: IColumn[]): string;
8
+ buildDataset({ data, columns }: Omit<BuildDatasetParams, 'metadata'>): string;
8
9
  private formatRawDataSet;
9
10
  buildMetadata(name: string, title: string, columns: IColumn[], filter?: IDictionary<any>): Promise<string>;
10
11
  }
@@ -1,11 +1,11 @@
1
1
  import { IDictionary } from '@zeedhi/core';
2
2
  import { IColumn } from '../../../components';
3
3
  import { BaseReport } from './base-report';
4
- import { IMetadataObj } from './interfaces';
4
+ import { BuildDatasetParams, IMetadataObj } from './interfaces';
5
5
  export declare class XLS2Report extends BaseReport {
6
6
  getFileType(): string;
7
7
  readonly route: string;
8
- buildDataset(data: IDictionary<any>[], metadata: IMetadataObj): string;
8
+ buildDataset({ data, metadata }: Omit<BuildDatasetParams, 'columns'>): string;
9
9
  buildMetadata(name: string, title: string, columns: IColumn[], filter?: IDictionary<any>): Promise<string>;
10
10
  private getColumnsName;
11
11
  private initVars;
@@ -1,11 +1,11 @@
1
1
  import { IDictionary } from '@zeedhi/core';
2
2
  import { IColumn } from '../../../components';
3
3
  import { BaseReport } from './base-report';
4
- import { IMetadataObj } from './interfaces';
4
+ import { BuildDatasetParams, IMetadataObj } from './interfaces';
5
5
  export declare class XLS3Report extends BaseReport {
6
6
  getFileType(): string;
7
7
  readonly route: string;
8
- buildDataset(data: IDictionary<any>[], metadata: IMetadataObj): string;
8
+ buildDataset({ data, metadata }: Omit<BuildDatasetParams, 'columns'>): string;
9
9
  buildMetadata(name: string, title: string, columns: IColumn[], filter?: IDictionary<any>): Promise<string>;
10
10
  private getColumnsNameFormat3;
11
11
  private initVars;
@@ -14,5 +14,4 @@ export declare class Report implements IReport {
14
14
  private getData;
15
15
  private getReportType;
16
16
  getReport(type: string, portrait?: boolean, rowObj?: any, beforeReportEvent?: IBeforeReportEvent, labelFormatter?: LabelFormatter): Promise<string>;
17
- private filterColumns;
18
17
  }
@@ -1,12 +0,0 @@
1
- export interface IJSONObject {
2
- path: string;
3
- }
4
- export declare class JsonCacheService {
5
- /**
6
- * jsons collection
7
- */
8
- static jsonCollection: IJSONObject[];
9
- static saveJSONCache(jsonCollection: IJSONObject[]): Promise<void>;
10
- static getJSONCache(path: string): any;
11
- static clearJSONCache(jsonCollection: IJSONObject[]): void;
12
- }