@zeedhi/common 1.54.0 → 1.56.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/common",
3
- "version": "1.54.0",
3
+ "version": "1.56.0",
4
4
  "description": "Zeedhi Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -37,5 +37,5 @@
37
37
  "lodash.times": "^4.3.2",
38
38
  "mockdate": "^3.0.2"
39
39
  },
40
- "gitHead": "338fa7c142e0a73239dc51f238c7f21c6b403f2b"
40
+ "gitHead": "b8c326c0ff6cb648592ca9ed0d350353b15ed32e"
41
41
  }
@@ -1,14 +1,14 @@
1
- import scss from 'rollup-plugin-scss';
2
-
3
- export default {
4
- input: './src/styles/index.scss',
5
- output: {
6
- format: 'esm',
7
- },
8
- plugins: [
9
- scss({
10
- output: 'dist/style.css',
11
- outputStyle: 'compressed',
12
- }),
13
- ],
14
- };
1
+ import scss from 'rollup-plugin-scss';
2
+
3
+ export default {
4
+ input: './src/styles/index.scss',
5
+ output: {
6
+ format: 'esm',
7
+ },
8
+ plugins: [
9
+ scss({
10
+ output: 'dist/style.css',
11
+ outputStyle: 'compressed',
12
+ }),
13
+ ],
14
+ };
@@ -1,9 +1,9 @@
1
- {
2
- // extend your base config so you don't have to redefine your compilerOptions
3
- "extends": "./tsconfig.json",
4
- "include": [
5
- "./src/**/*.ts",
6
- "./tests/**/*.ts",
7
- ],
8
- "exclude": ["node_modules"]
1
+ {
2
+ // extend your base config so you don't have to redefine your compilerOptions
3
+ "extends": "./tsconfig.json",
4
+ "include": [
5
+ "./src/**/*.ts",
6
+ "./tests/**/*.ts",
7
+ ],
8
+ "exclude": ["node_modules"]
9
9
  }
@@ -72,6 +72,7 @@ export * from './zd-input/input';
72
72
  export * from './zd-input/interfaces';
73
73
  export * from './zd-iterable/column';
74
74
  export * from './zd-iterable/iterable';
75
+ export * from './zd-iterable/column-not-found';
75
76
  export * from './zd-iterable/iterable-columns-button';
76
77
  export * from './zd-iterable/iterable-columns-button-controller';
77
78
  export * from './zd-iterable/iterable-page-component';
@@ -3,6 +3,7 @@ import { ComponentRender } from '../zd-component/component-render';
3
3
  import { IButton } from '../zd-button/interfaces';
4
4
  import { Modal } from '../zd-modal/modal';
5
5
  import { IModal } from '../zd-modal/interfaces';
6
+ import { IComponentRender } from '../zd-component/interfaces';
6
7
  /**
7
8
  * Base class for Dashboard component.
8
9
  */
@@ -13,11 +14,12 @@ export declare class Dashboard extends ComponentRender implements IDashboard {
13
14
  cards: IDashboardCard[];
14
15
  addModal?: Modal;
15
16
  editModal?: Modal;
16
- deleteCardId: string;
17
17
  overrideNamedProps: any;
18
18
  removePadding: boolean;
19
19
  height: string | number;
20
20
  heightAdjust: string | number;
21
+ cardFooterSlot?: IComponentRender[];
22
+ currentCardId?: string;
21
23
  addModalDef: IModal;
22
24
  editModalDef: IModal;
23
25
  /**
@@ -28,7 +30,8 @@ export declare class Dashboard extends ComponentRender implements IDashboard {
28
30
  onMounted(element: any): void;
29
31
  onBeforeDestroy(): void;
30
32
  addCard(): void;
31
- deleteCard(): void;
33
+ deleteCard(cardId: string): void;
34
+ deleteAndCloseDialog(cardId: string): void;
32
35
  showDeleteCardDialog(cardId: string): void;
33
36
  private hideDialog;
34
37
  updateCard(): void;
@@ -50,7 +53,7 @@ export declare class Dashboard extends ComponentRender implements IDashboard {
50
53
  local: boolean;
51
54
  overrideNamedProps: any;
52
55
  };
53
- getFooterRightSlot(cardId: string): ({
56
+ getFooterRightSlot(cardId: string): IComponentRender[] | ({
54
57
  name: string;
55
58
  component: string;
56
59
  bottom: boolean;
@@ -81,4 +84,5 @@ export declare class Dashboard extends ComponentRender implements IDashboard {
81
84
  }[];
82
85
  })[];
83
86
  private getCardId;
87
+ selectCard(cardId: string): void;
84
88
  }
@@ -18,6 +18,7 @@ export interface IDashboard extends IComponentRender {
18
18
  removePadding?: boolean;
19
19
  height?: string | number;
20
20
  heightAdjust?: string | number;
21
+ cardFooterSlot?: IComponentRender[];
21
22
  }
22
23
  export interface IDashboardCard extends Omit<ICard, 'name' | 'component'> {
23
24
  cardId: string;
@@ -55,7 +55,7 @@ export declare class Date extends TextInput implements IDate {
55
55
  /**
56
56
  * Determines the type of the picker - date for date picker, month for month picker.
57
57
  */
58
- pickerType: string;
58
+ protected pickerType: string;
59
59
  /**
60
60
  * Helper options.
61
61
  */
@@ -16,7 +16,6 @@ export interface IDate extends ITextInput {
16
16
  fullWidth?: boolean;
17
17
  locale?: string;
18
18
  inputFormat?: string;
19
- pickerType?: string;
20
19
  scrollable?: boolean;
21
20
  showDatePicker?: boolean;
22
21
  showWeek?: boolean;
@@ -70,10 +70,17 @@ export declare class Form extends ComponentRender implements IForm {
70
70
  componentId?: number | undefined;
71
71
  cssClass?: string | undefined;
72
72
  cssStyle?: string | object | undefined;
73
+ /**
74
+ * Children component structure if the component has children.
75
+ */
73
76
  events?: import("..").IComponentEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
74
77
  directives?: import("..").IComponentDirectives | undefined;
75
78
  isVisible?: string | boolean | undefined;
76
79
  dark?: boolean | undefined;
80
+ /**
81
+ * Applies the align-items css property.
82
+ * Available options are start, center, end, space-between, space-around and stretch.
83
+ */
77
84
  light?: boolean | undefined;
78
85
  keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
79
86
  name: string;
@@ -18,6 +18,9 @@ export declare class GridColumn extends Column implements IGridColumn {
18
18
  [key: string]: any;
19
19
  children?: import("..").IComponentRender[] | undefined;
20
20
  component: string;
21
+ /**
22
+ * Base class for Grid column
23
+ */
21
24
  componentId?: number | undefined;
22
25
  cssClass?: string | undefined;
23
26
  cssStyle?: string | object | undefined;
@@ -26,11 +29,12 @@ export declare class GridColumn extends Column implements IGridColumn {
26
29
  isVisible?: string | boolean | undefined;
27
30
  dark?: boolean | undefined;
28
31
  light?: boolean | undefined;
29
- keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
30
- name: string; /**
32
+ /**
31
33
  * Creates a new Grid Column.
32
34
  * @param props Grid column properties
33
35
  */
36
+ keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
37
+ name: string;
34
38
  parent?: import("..").Component | undefined;
35
39
  }[];
36
40
  /**
@@ -105,6 +105,15 @@ export declare class Grid extends Iterable implements IGrid {
105
105
  * @public
106
106
  */
107
107
  resizeColumns: boolean;
108
+ /**
109
+ * Disable selection of specific rows using controller
110
+ * @public
111
+ */
112
+ disableSelection?: (args: {
113
+ row: IDictionary<any>;
114
+ component: Grid;
115
+ }) => boolean;
116
+ showSelectAll: boolean;
108
117
  /**
109
118
  * Creates a new Grid.
110
119
  * @param props Grid properties
@@ -167,4 +176,5 @@ export declare class Grid extends Iterable implements IGrid {
167
176
  deleteRows(): Promise<any[]>;
168
177
  getActionComponent(actionComponent: IComponent, column: GridColumn, row: IDictionary, parentPath?: string): IComponent;
169
178
  protected changeDefaultSlotNames(slot: IComponentRender[]): IComponentRender[];
179
+ callDisableSelection(row: IDictionary<any>): boolean;
170
180
  }
@@ -41,6 +41,11 @@ export interface IGrid extends IIterable {
41
41
  loadingText?: string;
42
42
  noDataText?: string;
43
43
  noResultsText?: string;
44
+ disableSelection?: (args: {
45
+ row: IDictionary<any>;
46
+ component: Grid;
47
+ }) => boolean;
48
+ showSelectAll?: boolean;
44
49
  }
45
50
  export interface IGridColumn extends IColumn {
46
51
  children?: IChildrenActionColumn[];
@@ -16,10 +16,11 @@ export declare class Month extends Date implements IMonth {
16
16
  * Defines the month input format.
17
17
  */
18
18
  inputFormat?: string;
19
+ protected isoFormat: string;
19
20
  /**
20
21
  * Determines the type of the picker - month for month picker.
21
22
  */
22
- pickerType: string;
23
+ protected pickerType: string;
23
24
  protected formatterFn: Function;
24
25
  protected parserFn: Function;
25
26
  /**
@@ -27,5 +28,4 @@ export declare class Month extends Date implements IMonth {
27
28
  * @param props Month properties
28
29
  */
29
30
  constructor(props: IMonth);
30
- protected maskFormat(format: string): string;
31
31
  }
@@ -10,7 +10,7 @@ export declare abstract class BaseReport implements IReportType {
10
10
  totalWidth: number;
11
11
  };
12
12
  protected buildColumns(columns: IColumn[]): MetadataColumn;
13
- protected buildFilter(filter: IDictionary): MetadataFilter;
13
+ protected buildFilter(filter: IDictionary, columns: IColumn[]): MetadataFilter;
14
14
  protected formatLangCode(lang?: string): string;
15
15
  protected expressionZeedhiToXls: any;
16
16
  protected colunmXLS: string;