@zeedhi/common 1.96.1 → 1.96.2
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
|
@@ -4973,11 +4973,12 @@ class FileInput extends TextInput {
|
|
|
4973
4973
|
this.rules = Object.keys(this.parsedValidations)
|
|
4974
4974
|
.map((key) => {
|
|
4975
4975
|
const validation = this.parsedValidations[key];
|
|
4976
|
-
if (key !== 'maxFileSize')
|
|
4976
|
+
if (key !== 'maxFileSize') {
|
|
4977
4977
|
return (value) => {
|
|
4978
4978
|
const testValue = value !== undefined ? value : this.value;
|
|
4979
4979
|
return validation(testValue);
|
|
4980
4980
|
};
|
|
4981
|
+
}
|
|
4981
4982
|
return () => {
|
|
4982
4983
|
if (this.viewGetFileSizes) {
|
|
4983
4984
|
const fileSizes = this.viewGetFileSizes();
|
|
@@ -5780,12 +5781,12 @@ FormatterParserProvider.registerFormatter('column_ZdSelect', ({ column, value, r
|
|
|
5780
5781
|
const { dataText, formatterDataText, dataTextSeparator, dataValue, } = componentProps;
|
|
5781
5782
|
let currentRow = row;
|
|
5782
5783
|
if (dataValue) {
|
|
5784
|
+
const dataTextColumns = Array.isArray(dataText) ? dataText : [dataText];
|
|
5785
|
+
const columns = Array.isArray(formatterDataText) ? formatterDataText : [formatterDataText];
|
|
5783
5786
|
if (!formatterDataText) {
|
|
5784
5787
|
currentRow = column.getLookupData(dataValue, value[dataValue] || value);
|
|
5785
5788
|
}
|
|
5786
|
-
else {
|
|
5787
|
-
const columns = Array.isArray(formatterDataText) ? formatterDataText : [formatterDataText];
|
|
5788
|
-
const dataTextColumns = Array.isArray(dataText) ? dataText : [dataText];
|
|
5789
|
+
else if (columns.length === dataTextColumns.length) {
|
|
5789
5790
|
const loopkupRow = {};
|
|
5790
5791
|
columns.forEach((item, index) => {
|
|
5791
5792
|
const dataTextValue = dataTextColumns[index];
|
|
@@ -6531,6 +6532,7 @@ class GridEditable extends Grid {
|
|
|
6531
6532
|
active: true,
|
|
6532
6533
|
},
|
|
6533
6534
|
};
|
|
6535
|
+
this.viewEnterEdit = null;
|
|
6534
6536
|
this.newRowIdentifier = '__added_row';
|
|
6535
6537
|
this.doubleClickEdit = this.getInitValue('doubleClickEdit', props.doubleClickEdit, this.doubleClickEdit);
|
|
6536
6538
|
this.canEditRow = this.getInitValue('canEditRow', props.canEditRow, this.canEditRow);
|
|
@@ -6538,6 +6540,9 @@ class GridEditable extends Grid {
|
|
|
6538
6540
|
this.singleEdit = this.getInitValue('singleEdit', props.singleEdit, this.singleEdit);
|
|
6539
6541
|
this.createAccessors();
|
|
6540
6542
|
}
|
|
6543
|
+
setViewEnterEdit(viewEnterEdit) {
|
|
6544
|
+
this.viewEnterEdit = viewEnterEdit;
|
|
6545
|
+
}
|
|
6541
6546
|
onMounted(element) {
|
|
6542
6547
|
super.onMounted(element);
|
|
6543
6548
|
KeyMap.bind(this.cancelEditedRowsKeyMapping, this, element);
|
|
@@ -7062,6 +7067,15 @@ class GridEditable extends Grid {
|
|
|
7062
7067
|
delete rows[foundRow[uniqueKey]];
|
|
7063
7068
|
this.editedRows = rows;
|
|
7064
7069
|
}
|
|
7070
|
+
/**
|
|
7071
|
+
* Makes the cell enter edit mode
|
|
7072
|
+
*/
|
|
7073
|
+
enterEdit(rowKey, columnName) {
|
|
7074
|
+
if (!this.viewEnterEdit) {
|
|
7075
|
+
throw new Error('viewEnterEdit method not assigned');
|
|
7076
|
+
}
|
|
7077
|
+
this.viewEnterEdit(rowKey, columnName);
|
|
7078
|
+
}
|
|
7065
7079
|
}
|
|
7066
7080
|
|
|
7067
7081
|
/**
|
|
@@ -13151,12 +13165,16 @@ class TreeGridEditable extends TreeGrid {
|
|
|
13151
13165
|
active: true,
|
|
13152
13166
|
},
|
|
13153
13167
|
};
|
|
13168
|
+
this.viewEnterEdit = null;
|
|
13154
13169
|
this.doubleClickEdit = this.getInitValue('doubleClickEdit', props.doubleClickEdit, this.doubleClickEdit);
|
|
13155
13170
|
this.canEditRow = this.getInitValue('canEditRow', props.canEditRow, this.canEditRow);
|
|
13156
13171
|
this.singleEdit = this.getInitValue('singleEdit', props.singleEdit, this.singleEdit);
|
|
13157
13172
|
this.noDataSlot = this.changeDefaultSlotNames(this.noDataSlot);
|
|
13158
13173
|
this.createAccessors();
|
|
13159
13174
|
}
|
|
13175
|
+
setViewEnterEdit(viewEnterEdit) {
|
|
13176
|
+
this.viewEnterEdit = viewEnterEdit;
|
|
13177
|
+
}
|
|
13160
13178
|
onMounted(element) {
|
|
13161
13179
|
super.onMounted(element);
|
|
13162
13180
|
KeyMap.bind(this.cancelEditedRowsKeyMapping, this, element);
|
|
@@ -13600,6 +13618,15 @@ class TreeGridEditable extends TreeGrid {
|
|
|
13600
13618
|
delete rows[foundRow[uniqueKey]];
|
|
13601
13619
|
this.editedRows = rows;
|
|
13602
13620
|
}
|
|
13621
|
+
/**
|
|
13622
|
+
* Makes the cell enter edit mode
|
|
13623
|
+
*/
|
|
13624
|
+
enterEdit(rowKey, columnName) {
|
|
13625
|
+
if (!this.viewEnterEdit) {
|
|
13626
|
+
throw new Error('viewEnterEdit method not assigned');
|
|
13627
|
+
}
|
|
13628
|
+
this.viewEnterEdit(rowKey, columnName);
|
|
13629
|
+
}
|
|
13603
13630
|
}
|
|
13604
13631
|
|
|
13605
13632
|
class Icons {
|
package/dist/zd-common.umd.js
CHANGED
|
@@ -4980,11 +4980,12 @@
|
|
|
4980
4980
|
this.rules = Object.keys(this.parsedValidations)
|
|
4981
4981
|
.map((key) => {
|
|
4982
4982
|
const validation = this.parsedValidations[key];
|
|
4983
|
-
if (key !== 'maxFileSize')
|
|
4983
|
+
if (key !== 'maxFileSize') {
|
|
4984
4984
|
return (value) => {
|
|
4985
4985
|
const testValue = value !== undefined ? value : this.value;
|
|
4986
4986
|
return validation(testValue);
|
|
4987
4987
|
};
|
|
4988
|
+
}
|
|
4988
4989
|
return () => {
|
|
4989
4990
|
if (this.viewGetFileSizes) {
|
|
4990
4991
|
const fileSizes = this.viewGetFileSizes();
|
|
@@ -5787,12 +5788,12 @@
|
|
|
5787
5788
|
const { dataText, formatterDataText, dataTextSeparator, dataValue, } = componentProps;
|
|
5788
5789
|
let currentRow = row;
|
|
5789
5790
|
if (dataValue) {
|
|
5791
|
+
const dataTextColumns = Array.isArray(dataText) ? dataText : [dataText];
|
|
5792
|
+
const columns = Array.isArray(formatterDataText) ? formatterDataText : [formatterDataText];
|
|
5790
5793
|
if (!formatterDataText) {
|
|
5791
5794
|
currentRow = column.getLookupData(dataValue, value[dataValue] || value);
|
|
5792
5795
|
}
|
|
5793
|
-
else {
|
|
5794
|
-
const columns = Array.isArray(formatterDataText) ? formatterDataText : [formatterDataText];
|
|
5795
|
-
const dataTextColumns = Array.isArray(dataText) ? dataText : [dataText];
|
|
5796
|
+
else if (columns.length === dataTextColumns.length) {
|
|
5796
5797
|
const loopkupRow = {};
|
|
5797
5798
|
columns.forEach((item, index) => {
|
|
5798
5799
|
const dataTextValue = dataTextColumns[index];
|
|
@@ -6538,6 +6539,7 @@
|
|
|
6538
6539
|
active: true,
|
|
6539
6540
|
},
|
|
6540
6541
|
};
|
|
6542
|
+
this.viewEnterEdit = null;
|
|
6541
6543
|
this.newRowIdentifier = '__added_row';
|
|
6542
6544
|
this.doubleClickEdit = this.getInitValue('doubleClickEdit', props.doubleClickEdit, this.doubleClickEdit);
|
|
6543
6545
|
this.canEditRow = this.getInitValue('canEditRow', props.canEditRow, this.canEditRow);
|
|
@@ -6545,6 +6547,9 @@
|
|
|
6545
6547
|
this.singleEdit = this.getInitValue('singleEdit', props.singleEdit, this.singleEdit);
|
|
6546
6548
|
this.createAccessors();
|
|
6547
6549
|
}
|
|
6550
|
+
setViewEnterEdit(viewEnterEdit) {
|
|
6551
|
+
this.viewEnterEdit = viewEnterEdit;
|
|
6552
|
+
}
|
|
6548
6553
|
onMounted(element) {
|
|
6549
6554
|
super.onMounted(element);
|
|
6550
6555
|
core.KeyMap.bind(this.cancelEditedRowsKeyMapping, this, element);
|
|
@@ -7069,6 +7074,15 @@
|
|
|
7069
7074
|
delete rows[foundRow[uniqueKey]];
|
|
7070
7075
|
this.editedRows = rows;
|
|
7071
7076
|
}
|
|
7077
|
+
/**
|
|
7078
|
+
* Makes the cell enter edit mode
|
|
7079
|
+
*/
|
|
7080
|
+
enterEdit(rowKey, columnName) {
|
|
7081
|
+
if (!this.viewEnterEdit) {
|
|
7082
|
+
throw new Error('viewEnterEdit method not assigned');
|
|
7083
|
+
}
|
|
7084
|
+
this.viewEnterEdit(rowKey, columnName);
|
|
7085
|
+
}
|
|
7072
7086
|
}
|
|
7073
7087
|
|
|
7074
7088
|
/**
|
|
@@ -13158,12 +13172,16 @@
|
|
|
13158
13172
|
active: true,
|
|
13159
13173
|
},
|
|
13160
13174
|
};
|
|
13175
|
+
this.viewEnterEdit = null;
|
|
13161
13176
|
this.doubleClickEdit = this.getInitValue('doubleClickEdit', props.doubleClickEdit, this.doubleClickEdit);
|
|
13162
13177
|
this.canEditRow = this.getInitValue('canEditRow', props.canEditRow, this.canEditRow);
|
|
13163
13178
|
this.singleEdit = this.getInitValue('singleEdit', props.singleEdit, this.singleEdit);
|
|
13164
13179
|
this.noDataSlot = this.changeDefaultSlotNames(this.noDataSlot);
|
|
13165
13180
|
this.createAccessors();
|
|
13166
13181
|
}
|
|
13182
|
+
setViewEnterEdit(viewEnterEdit) {
|
|
13183
|
+
this.viewEnterEdit = viewEnterEdit;
|
|
13184
|
+
}
|
|
13167
13185
|
onMounted(element) {
|
|
13168
13186
|
super.onMounted(element);
|
|
13169
13187
|
core.KeyMap.bind(this.cancelEditedRowsKeyMapping, this, element);
|
|
@@ -13607,6 +13625,15 @@
|
|
|
13607
13625
|
delete rows[foundRow[uniqueKey]];
|
|
13608
13626
|
this.editedRows = rows;
|
|
13609
13627
|
}
|
|
13628
|
+
/**
|
|
13629
|
+
* Makes the cell enter edit mode
|
|
13630
|
+
*/
|
|
13631
|
+
enterEdit(rowKey, columnName) {
|
|
13632
|
+
if (!this.viewEnterEdit) {
|
|
13633
|
+
throw new Error('viewEnterEdit method not assigned');
|
|
13634
|
+
}
|
|
13635
|
+
this.viewEnterEdit(rowKey, columnName);
|
|
13636
|
+
}
|
|
13610
13637
|
}
|
|
13611
13638
|
|
|
13612
13639
|
class Icons {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/common",
|
|
3
|
-
"version": "1.96.
|
|
3
|
+
"version": "1.96.2",
|
|
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": "02a1782aa3a4e4c0bdbf29c41297467071e6e132"
|
|
47
47
|
}
|
|
@@ -45,6 +45,8 @@ export declare class GridEditable extends Grid implements IGridEditable {
|
|
|
45
45
|
private invalidComponents;
|
|
46
46
|
editingNewRows: boolean;
|
|
47
47
|
protected cancelEditedRowsKeyMapping: IKeyMap;
|
|
48
|
+
protected viewEnterEdit: ((rowKey: string, columnName: string) => void) | null;
|
|
49
|
+
setViewEnterEdit(viewEnterEdit: (rowKey: string, columnName: string) => void): void;
|
|
48
50
|
constructor(props: IGridEditable);
|
|
49
51
|
onMounted(element: any): void;
|
|
50
52
|
onBeforeDestroy(): void;
|
|
@@ -209,4 +211,8 @@ export declare class GridEditable extends Grid implements IGridEditable {
|
|
|
209
211
|
private changeCell;
|
|
210
212
|
callCanEditRow(row: IDictionary<any>): any;
|
|
211
213
|
changeData(data?: IDictionary<any>[]): void;
|
|
214
|
+
/**
|
|
215
|
+
* Makes the cell enter edit mode
|
|
216
|
+
*/
|
|
217
|
+
enterEdit(rowKey: string, columnName: string): void;
|
|
212
218
|
}
|
|
@@ -36,6 +36,8 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
|
|
|
36
36
|
*/
|
|
37
37
|
doubleClickEdit: boolean;
|
|
38
38
|
protected cancelEditedRowsKeyMapping: any;
|
|
39
|
+
protected viewEnterEdit: ((rowKey: string, columnName: string) => void) | null;
|
|
40
|
+
setViewEnterEdit(viewEnterEdit: (rowKey: string, columnName: string) => void): void;
|
|
39
41
|
constructor(props: ITreeGridEditable);
|
|
40
42
|
onMounted(element: any): void;
|
|
41
43
|
onBeforeDestroy(): void;
|
|
@@ -190,4 +192,8 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
|
|
|
190
192
|
private changeCell;
|
|
191
193
|
callCanEditRow(row: IDictionary<any>): boolean;
|
|
192
194
|
changeData(data?: IDictionary<any>[]): void;
|
|
195
|
+
/**
|
|
196
|
+
* Makes the cell enter edit mode
|
|
197
|
+
*/
|
|
198
|
+
enterEdit(rowKey: string, columnName: string): void;
|
|
193
199
|
}
|