@zeedhi/common 1.71.0 → 1.73.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/dist/zd-common.esm.js
CHANGED
|
@@ -4712,6 +4712,7 @@ class Column extends Component {
|
|
|
4712
4712
|
this.align = 'left';
|
|
4713
4713
|
this.label = '';
|
|
4714
4714
|
this.mask = '';
|
|
4715
|
+
this.actionFixed = false;
|
|
4715
4716
|
this.sortable = true;
|
|
4716
4717
|
this.loading = false;
|
|
4717
4718
|
this.componentProps = {};
|
|
@@ -4746,7 +4747,7 @@ class Column extends Component {
|
|
|
4746
4747
|
data.forEach((row) => {
|
|
4747
4748
|
lookupData[row[lookupColumn]] = row;
|
|
4748
4749
|
});
|
|
4749
|
-
this.lookupData = lookupData;
|
|
4750
|
+
this.lookupData = Object.assign(Object.assign({}, this.lookupData), lookupData);
|
|
4750
4751
|
this.lookupDataCount += 1;
|
|
4751
4752
|
this.loading = false;
|
|
4752
4753
|
});
|
|
@@ -4760,6 +4761,7 @@ class Column extends Component {
|
|
|
4760
4761
|
this.mask = this.getInitValue('mask', props.mask, this.mask);
|
|
4761
4762
|
this.overflow = this.getInitValue('overflow', props.overflow, this.overflow);
|
|
4762
4763
|
this.type = this.getInitValue('type', props.type, this.type);
|
|
4764
|
+
this.actionFixed = this.getInitValue('actionFixed', props.actionFixed, this.actionFixed);
|
|
4763
4765
|
this.sortable = this.getInitValue('sortable', props.sortable, this.sortable);
|
|
4764
4766
|
this.loading = this.getInitValue('loading', props.loading, this.loading);
|
|
4765
4767
|
this.style = this.getInitValue('style', props.style, this.style);
|
|
@@ -4825,9 +4827,15 @@ class Column extends Component {
|
|
|
4825
4827
|
this.lookupData[value] = this.lookupDatasource.data[dataIndex];
|
|
4826
4828
|
return this.lookupData[value];
|
|
4827
4829
|
}
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4830
|
+
const hasLookupColumn = this.lookupDatasource.data.every((row) => Reflect.has(row, lookupColumn));
|
|
4831
|
+
if (hasLookupColumn) {
|
|
4832
|
+
this.dataToLookup = (this.dataToLookup || []);
|
|
4833
|
+
this.dataToLookup.push(value);
|
|
4834
|
+
this.lookup(lookupColumn);
|
|
4835
|
+
}
|
|
4836
|
+
else {
|
|
4837
|
+
console.warn(`Row datasource do not have a key: ${lookupColumn}`);
|
|
4838
|
+
}
|
|
4831
4839
|
return emptyRow;
|
|
4832
4840
|
}
|
|
4833
4841
|
/**
|
|
@@ -4957,6 +4965,10 @@ class Iterable extends ComponentRender {
|
|
|
4957
4965
|
* Uses virtual scrolling to render data.
|
|
4958
4966
|
*/
|
|
4959
4967
|
this.virtualScroll = false;
|
|
4968
|
+
/**
|
|
4969
|
+
* Number of lines outside the viewport to cache when using virtual scroll.
|
|
4970
|
+
*/
|
|
4971
|
+
this.virtualScrollCache = 5;
|
|
4960
4972
|
/**
|
|
4961
4973
|
* Dictionary of rowKey ponting to Dictionary of colName pointing to Dictionary of prop pointing to the
|
|
4962
4974
|
* condition (applied) return value
|
|
@@ -4974,6 +4986,7 @@ class Iterable extends ComponentRender {
|
|
|
4974
4986
|
this.pageSizes = this.getInitValue('pageSizes', props.pageSizes, this.pageSizes);
|
|
4975
4987
|
this.searchVisibleOnly = this.getInitValue('searchVisibleOnly', props.searchVisibleOnly, this.defaultSearchVisibleOnly);
|
|
4976
4988
|
this.virtualScroll = this.getInitValue('virtualScroll', props.virtualScroll, this.virtualScroll);
|
|
4989
|
+
this.virtualScrollCache = this.getInitValue('virtualScrollCache', props.virtualScrollCache, this.virtualScrollCache);
|
|
4977
4990
|
}
|
|
4978
4991
|
createController() {
|
|
4979
4992
|
const controller = new IterableController(this);
|
package/dist/zd-common.umd.js
CHANGED
|
@@ -4719,6 +4719,7 @@
|
|
|
4719
4719
|
this.align = 'left';
|
|
4720
4720
|
this.label = '';
|
|
4721
4721
|
this.mask = '';
|
|
4722
|
+
this.actionFixed = false;
|
|
4722
4723
|
this.sortable = true;
|
|
4723
4724
|
this.loading = false;
|
|
4724
4725
|
this.componentProps = {};
|
|
@@ -4753,7 +4754,7 @@
|
|
|
4753
4754
|
data.forEach((row) => {
|
|
4754
4755
|
lookupData[row[lookupColumn]] = row;
|
|
4755
4756
|
});
|
|
4756
|
-
this.lookupData = lookupData;
|
|
4757
|
+
this.lookupData = Object.assign(Object.assign({}, this.lookupData), lookupData);
|
|
4757
4758
|
this.lookupDataCount += 1;
|
|
4758
4759
|
this.loading = false;
|
|
4759
4760
|
});
|
|
@@ -4767,6 +4768,7 @@
|
|
|
4767
4768
|
this.mask = this.getInitValue('mask', props.mask, this.mask);
|
|
4768
4769
|
this.overflow = this.getInitValue('overflow', props.overflow, this.overflow);
|
|
4769
4770
|
this.type = this.getInitValue('type', props.type, this.type);
|
|
4771
|
+
this.actionFixed = this.getInitValue('actionFixed', props.actionFixed, this.actionFixed);
|
|
4770
4772
|
this.sortable = this.getInitValue('sortable', props.sortable, this.sortable);
|
|
4771
4773
|
this.loading = this.getInitValue('loading', props.loading, this.loading);
|
|
4772
4774
|
this.style = this.getInitValue('style', props.style, this.style);
|
|
@@ -4832,9 +4834,15 @@
|
|
|
4832
4834
|
this.lookupData[value] = this.lookupDatasource.data[dataIndex];
|
|
4833
4835
|
return this.lookupData[value];
|
|
4834
4836
|
}
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4837
|
+
const hasLookupColumn = this.lookupDatasource.data.every((row) => Reflect.has(row, lookupColumn));
|
|
4838
|
+
if (hasLookupColumn) {
|
|
4839
|
+
this.dataToLookup = (this.dataToLookup || []);
|
|
4840
|
+
this.dataToLookup.push(value);
|
|
4841
|
+
this.lookup(lookupColumn);
|
|
4842
|
+
}
|
|
4843
|
+
else {
|
|
4844
|
+
console.warn(`Row datasource do not have a key: ${lookupColumn}`);
|
|
4845
|
+
}
|
|
4838
4846
|
return emptyRow;
|
|
4839
4847
|
}
|
|
4840
4848
|
/**
|
|
@@ -4964,6 +4972,10 @@
|
|
|
4964
4972
|
* Uses virtual scrolling to render data.
|
|
4965
4973
|
*/
|
|
4966
4974
|
this.virtualScroll = false;
|
|
4975
|
+
/**
|
|
4976
|
+
* Number of lines outside the viewport to cache when using virtual scroll.
|
|
4977
|
+
*/
|
|
4978
|
+
this.virtualScrollCache = 5;
|
|
4967
4979
|
/**
|
|
4968
4980
|
* Dictionary of rowKey ponting to Dictionary of colName pointing to Dictionary of prop pointing to the
|
|
4969
4981
|
* condition (applied) return value
|
|
@@ -4981,6 +4993,7 @@
|
|
|
4981
4993
|
this.pageSizes = this.getInitValue('pageSizes', props.pageSizes, this.pageSizes);
|
|
4982
4994
|
this.searchVisibleOnly = this.getInitValue('searchVisibleOnly', props.searchVisibleOnly, this.defaultSearchVisibleOnly);
|
|
4983
4995
|
this.virtualScroll = this.getInitValue('virtualScroll', props.virtualScroll, this.virtualScroll);
|
|
4996
|
+
this.virtualScrollCache = this.getInitValue('virtualScrollCache', props.virtualScrollCache, this.virtualScrollCache);
|
|
4984
4997
|
}
|
|
4985
4998
|
createController() {
|
|
4986
4999
|
const controller = new IterableController(this);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.73.0",
|
|
4
4
|
"description": "Zeedhi Common",
|
|
5
5
|
"author": "Zeedhi <zeedhi@teknisa.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"lodash.times": "^4.3.2",
|
|
40
40
|
"mockdate": "^3.0.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "667a76461a83554592072568c8313ed15a013bcb"
|
|
43
43
|
}
|
|
@@ -17,6 +17,7 @@ export interface IColumn extends IComponent {
|
|
|
17
17
|
overflow?: string | number;
|
|
18
18
|
mask?: string;
|
|
19
19
|
type?: ColumnType;
|
|
20
|
+
actionFixed?: boolean;
|
|
20
21
|
sortable?: boolean;
|
|
21
22
|
loading?: boolean;
|
|
22
23
|
componentProps?: IComponent;
|
|
@@ -30,6 +31,7 @@ export interface IIterable extends IComponentRender {
|
|
|
30
31
|
datasource?: IDatasource;
|
|
31
32
|
pageSizes?: string[];
|
|
32
33
|
virtualScroll?: boolean;
|
|
34
|
+
virtualScrollCache?: number;
|
|
33
35
|
searchVisibleOnly?: boolean;
|
|
34
36
|
}
|
|
35
37
|
export interface IIterablePageComponent extends IComponentRender {
|
|
@@ -26,6 +26,10 @@ export declare class Iterable extends ComponentRender implements IIterable {
|
|
|
26
26
|
* Uses virtual scrolling to render data.
|
|
27
27
|
*/
|
|
28
28
|
virtualScroll: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Number of lines outside the viewport to cache when using virtual scroll.
|
|
31
|
+
*/
|
|
32
|
+
virtualScrollCache: number;
|
|
29
33
|
/**
|
|
30
34
|
* Dictionary of rowKey ponting to Dictionary of colName pointing to Dictionary of prop pointing to the
|
|
31
35
|
* condition (applied) return value
|