@zeedhi/common 1.97.4 → 1.98.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.97.4",
3
+ "version": "1.98.0",
4
4
  "description": "Zeedhi Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -43,5 +43,5 @@
43
43
  "lodash.times": "4.3.*",
44
44
  "mockdate": "3.0.*"
45
45
  },
46
- "gitHead": "052cd88ccb75d186580d431224412c56801353de"
46
+ "gitHead": "b77a8864037793822c9256dbb5eff8ebeb0c308b"
47
47
  }
@@ -115,7 +115,7 @@ export declare class Input extends ComponentRender implements IInput {
115
115
  protected parserFn: Function;
116
116
  protected internalDisplayValue: string;
117
117
  protected internalValue: any;
118
- protected formParent?: Form;
118
+ formParent?: Form;
119
119
  /**
120
120
  * Creates a new Input.
121
121
  * @param props Input properties
@@ -94,4 +94,5 @@ export declare class Iterable extends ComponentRender implements IIterable {
94
94
  */
95
95
  changeLayout(event?: Event, element?: any): void;
96
96
  setSearch(search: string): Promise<any>;
97
+ isColumnSearchable(column: Column): boolean;
97
98
  }
@@ -1,8 +1,9 @@
1
1
  import { IDatasource } from '@zeedhi/core';
2
2
  import { ITextInput } from '../zd-text-input/interfaces';
3
3
  import { IComponentRender } from '../zd-component/interfaces';
4
+ import { ISelectDataValueOut } from '../../utils';
4
5
  export declare type SearchParam = 'SEARCH' | 'FILTER' | 'FIND' | 'DYNAMIC_FILTER';
5
- export interface ISelect extends ITextInput {
6
+ export interface ISelect extends ITextInput, ISelectDataValueOut {
6
7
  autocomplete?: boolean;
7
8
  autoSelection?: boolean;
8
9
  datasource?: IDatasource;
@@ -2,6 +2,7 @@ import { Datasource, IDictionary } from '@zeedhi/core';
2
2
  import { IComponentRender } from '../zd-component/interfaces';
3
3
  import { ISelect, SearchParam } from './interfaces';
4
4
  import { TextInput } from '../zd-text-input/text-input';
5
+ import { ISelectDataValueOutItem } from '../../utils';
5
6
  /**
6
7
  * Base class for Select component.
7
8
  */
@@ -82,6 +83,14 @@ export declare class Select extends TextInput implements ISelect {
82
83
  * Defines if data handling should be manual or automatic
83
84
  */
84
85
  searchParam: SearchParam;
86
+ /**
87
+ * Defines other columns that must me set on form on change
88
+ */
89
+ dataValueOut: ISelectDataValueOutItem[];
90
+ /**
91
+ * Defines the name of the form target to set using dataValueOut
92
+ */
93
+ dataValueOutFormName: string;
85
94
  protected dsSearch: {
86
95
  SEARCH: (value: any, searchIn: string) => {
87
96
  searchIn: string[];
@@ -1,6 +1,8 @@
1
1
  import { IDictionary, IEventParam, IDatasource } from '@zeedhi/core';
2
- import { IComponentRender, IComponentEvents, EventDef } from '../zd-component/interfaces';
2
+ import { IComponentEvents, EventDef } from '../zd-component/interfaces';
3
3
  import { SelectTree } from './select-tree';
4
+ import { ITextInput } from '../zd-text-input/interfaces';
5
+ import { ISelectDataValueOut } from '../../utils';
4
6
  export interface ISelectTreeNode<T> {
5
7
  id: string | number;
6
8
  label: string;
@@ -10,7 +12,7 @@ export interface ISelectTreeNode<T> {
10
12
  children?: ISelectTreeNode<T>[] | null;
11
13
  row?: IDictionary<any>;
12
14
  }
13
- export interface ISelectTree extends IComponentRender {
15
+ export interface ISelectTree extends ITextInput, ISelectDataValueOut {
14
16
  nodes?: ISelectTreeNode<IDictionary>[];
15
17
  alwaysOpen?: boolean;
16
18
  placeholder?: string;
@@ -1,6 +1,7 @@
1
1
  import { IDictionary, Datasource } from '@zeedhi/core';
2
2
  import { TextInput } from '../zd-text-input/text-input';
3
3
  import { ISelectTree, ISelectTreeNode, ISelectTreeEvents } from './interfaces';
4
+ import { ISelectDataValueOutItem } from '../../utils';
4
5
  /**
5
6
  * Base class for Select Tree component.
6
7
  */
@@ -107,6 +108,14 @@ export declare class SelectTree extends TextInput implements ISelectTree {
107
108
  */
108
109
  autoSelection: boolean;
109
110
  getFilteredNodes?: () => boolean | Object;
111
+ /**
112
+ * Defines other columns that must me set on form on change
113
+ */
114
+ dataValueOut: ISelectDataValueOutItem[];
115
+ /**
116
+ * Defines the name of the form target to set using dataValueOut
117
+ */
118
+ dataValueOutFormName: string;
110
119
  /**
111
120
  * Creates a new instance of SelectTree
112
121
  * @param props
@@ -0,0 +1,5 @@
1
+ import { ISelectDataValueOut } from './interfaces';
2
+ export declare class DataValueOutHelper {
3
+ private static getFormParent;
4
+ static setDataValueOut(select: ISelectDataValueOut, value: any): void;
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from './interfaces';
2
+ export * from './data-value-out';
@@ -0,0 +1,8 @@
1
+ export interface ISelectDataValueOutItem {
2
+ column: string;
3
+ columnOnForm: string;
4
+ }
5
+ export interface ISelectDataValueOut {
6
+ dataValueOut?: ISelectDataValueOutItem[];
7
+ dataValueOutFormName?: string;
8
+ }
@@ -3,3 +3,4 @@ export * from './themes/themes';
3
3
  export * from './watch-url/watch-url';
4
4
  export * from './report';
5
5
  export * from './tree-data-structure';
6
+ export * from './data-value-out';