@zeedhi/common 1.97.5 → 1.98.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.
- package/dist/zd-common.esm.js +6416 -6326
- package/dist/zd-common.umd.js +6415 -6324
- package/package.json +2 -2
- package/types/components/zd-grid/grid-editable.d.ts +1 -0
- package/types/components/zd-grid/grid.d.ts +1 -0
- package/types/components/zd-input/input.d.ts +1 -1
- package/types/components/zd-iterable/iterable.d.ts +1 -0
- package/types/components/zd-select/interfaces.d.ts +2 -1
- package/types/components/zd-select/select.d.ts +9 -0
- package/types/components/zd-select-tree/interfaces.d.ts +4 -2
- package/types/components/zd-select-tree/select-tree.d.ts +9 -0
- package/types/components/zd-svg-map/interfaces.d.ts +7 -1
- package/types/components/zd-svg-map/svg-map.d.ts +14 -1
- package/types/components/zd-tree-grid/tree-grid-editable.d.ts +1 -0
- package/types/services/zd-json-cache/json-cache-service.d.ts +12 -0
- package/types/utils/data-value-out/data-value-out.d.ts +5 -0
- package/types/utils/data-value-out/index.d.ts +2 -0
- package/types/utils/data-value-out/interfaces.d.ts +8 -0
- package/types/utils/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.98.1",
|
|
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": "
|
|
46
|
+
"gitHead": "97cae293ce620f40b3320f15af1384bf4b6fa4d3"
|
|
47
47
|
}
|
|
@@ -230,4 +230,5 @@ export declare class Grid extends Iterable implements IGrid {
|
|
|
230
230
|
callDisableSelection(row: IDictionary<any>): boolean;
|
|
231
231
|
getRowStyleConditions(row: IDictionary<any>): IDictionary<any>;
|
|
232
232
|
private setGridRowsInEvents;
|
|
233
|
+
getColumn(name: string): GridColumn;
|
|
233
234
|
}
|
|
@@ -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
|
-
|
|
118
|
+
formParent?: Form;
|
|
119
119
|
/**
|
|
120
120
|
* Creates a new Input.
|
|
121
121
|
* @param props Input properties
|
|
@@ -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 {
|
|
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
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEventParam } from '@zeedhi/core';
|
|
1
|
+
import { IDictionary, IEventParam } from '@zeedhi/core';
|
|
2
2
|
import { IComponentRender, IComponentEvents, EventDef } from '../zd-component/interfaces';
|
|
3
3
|
import { SvgMap } from './svg-map';
|
|
4
4
|
export interface ISvgMapEventParam extends IEventParam<SvgMap> {
|
|
@@ -7,6 +7,10 @@ export interface ISvgMapEventParam extends IEventParam<SvgMap> {
|
|
|
7
7
|
export interface ISvgMapEvents<T = ISvgMapEventParam | IEventParam<any>> extends IComponentEvents<T> {
|
|
8
8
|
areaClick?: EventDef<T>;
|
|
9
9
|
}
|
|
10
|
+
export declare type TooltipData = {
|
|
11
|
+
labels: IDictionary;
|
|
12
|
+
data: IDictionary[];
|
|
13
|
+
};
|
|
10
14
|
export interface ISvgMap extends IComponentRender {
|
|
11
15
|
areaColor?: string;
|
|
12
16
|
areaHoverColor?: string;
|
|
@@ -17,4 +21,6 @@ export interface ISvgMap extends IComponentRender {
|
|
|
17
21
|
selectedArea?: string | string[];
|
|
18
22
|
src?: string;
|
|
19
23
|
width?: string | number;
|
|
24
|
+
tooltipData?: TooltipData;
|
|
25
|
+
keyColumn?: string;
|
|
20
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ISvgMap, ISvgMapEvents } from './interfaces';
|
|
1
|
+
import { ISvgMap, ISvgMapEvents, TooltipData } from './interfaces';
|
|
2
2
|
import { ComponentRender } from '../zd-component/component-render';
|
|
3
3
|
/**
|
|
4
4
|
* Base class for SvgMap component.
|
|
@@ -42,6 +42,9 @@ export declare class SvgMap extends ComponentRender implements ISvgMap {
|
|
|
42
42
|
* SVG container
|
|
43
43
|
*/
|
|
44
44
|
svgContainer: any;
|
|
45
|
+
tooltipData?: TooltipData | undefined;
|
|
46
|
+
loading?: boolean;
|
|
47
|
+
keyColumn: string;
|
|
45
48
|
/**
|
|
46
49
|
* Map areas
|
|
47
50
|
* @private
|
|
@@ -49,6 +52,8 @@ export declare class SvgMap extends ComponentRender implements ISvgMap {
|
|
|
49
52
|
private mapAreas;
|
|
50
53
|
private srcValue;
|
|
51
54
|
private selectedAreaValue;
|
|
55
|
+
protected viewBeforeUpdate?: Function;
|
|
56
|
+
protected viewUpdate?: Function;
|
|
52
57
|
/**
|
|
53
58
|
* Create a new SVG.
|
|
54
59
|
* @param props SVG properties
|
|
@@ -70,6 +75,14 @@ export declare class SvgMap extends ComponentRender implements ISvgMap {
|
|
|
70
75
|
* @private
|
|
71
76
|
*/
|
|
72
77
|
private getSVG;
|
|
78
|
+
/**
|
|
79
|
+
* setViewBeforeUpdate
|
|
80
|
+
*/
|
|
81
|
+
setViewBeforeUpdate(beforeUpdate: Function): void;
|
|
82
|
+
/**
|
|
83
|
+
* setViewUpdate
|
|
84
|
+
*/
|
|
85
|
+
setViewUpdate(update: Function): void;
|
|
73
86
|
/**
|
|
74
87
|
* Update the SVG container
|
|
75
88
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|
package/types/utils/index.d.ts
CHANGED