@zeedhi/common 1.43.0 → 1.43.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 +5 -5
- package/dist/zd-common.umd.js +5 -5
- package/package.json +2 -2
package/dist/zd-common.esm.js
CHANGED
|
@@ -4870,7 +4870,7 @@ class GridColumn extends Column {
|
|
|
4870
4870
|
}
|
|
4871
4871
|
}
|
|
4872
4872
|
FormatterParserProvider.registerFormatter('column_ZdSelect', ({ column, value, row, componentProps, }) => {
|
|
4873
|
-
if (
|
|
4873
|
+
if (value === null || value === undefined)
|
|
4874
4874
|
return '';
|
|
4875
4875
|
const { dataText, formatterDataText, dataTextSeparator, dataValue, } = componentProps;
|
|
4876
4876
|
let currentRow = row;
|
|
@@ -4918,7 +4918,7 @@ FormatterParserProvider.registerFormatter('column_ZdSelect', ({ column, value, r
|
|
|
4918
4918
|
});
|
|
4919
4919
|
return dataTextNames.reduce((result, columnName, index) => {
|
|
4920
4920
|
const rowCell = currentRow[columnName];
|
|
4921
|
-
if (rowCell) {
|
|
4921
|
+
if (rowCell !== undefined && rowCell !== null) {
|
|
4922
4922
|
const separator = index > 0 ? (dataTextSeparator || ' | ') : '';
|
|
4923
4923
|
const mask = masks[index];
|
|
4924
4924
|
const maskValue = typeof mask === 'function' ? mask(rowCell) : mask;
|
|
@@ -6672,10 +6672,10 @@ class Select extends TextInput {
|
|
|
6672
6672
|
}
|
|
6673
6673
|
}
|
|
6674
6674
|
FormatterParserProvider.registerFormatter('ZdSelect', (value, { dataText, dataTextSeparator = ' | ', }) => {
|
|
6675
|
-
if (
|
|
6675
|
+
if (value === null || value === undefined) {
|
|
6676
6676
|
return null;
|
|
6677
6677
|
}
|
|
6678
|
-
if (typeof value === 'string' || typeof value === 'number') {
|
|
6678
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
6679
6679
|
return value;
|
|
6680
6680
|
}
|
|
6681
6681
|
const dataTextArr = Array.isArray(dataText) ? dataText : [dataText];
|
|
@@ -6698,7 +6698,7 @@ FormatterParserProvider.registerFormatter('ZdSelect', (value, { dataText, dataTe
|
|
|
6698
6698
|
}
|
|
6699
6699
|
});
|
|
6700
6700
|
return dataTextNames.reduce((result, column, index) => {
|
|
6701
|
-
if (value[column]) {
|
|
6701
|
+
if (value[column] !== null && value[column] !== undefined) {
|
|
6702
6702
|
const separator = index > 0 ? dataTextSeparator : '';
|
|
6703
6703
|
let masked = value[column];
|
|
6704
6704
|
if (masks[index]) {
|
package/dist/zd-common.umd.js
CHANGED
|
@@ -4877,7 +4877,7 @@
|
|
|
4877
4877
|
}
|
|
4878
4878
|
}
|
|
4879
4879
|
core.FormatterParserProvider.registerFormatter('column_ZdSelect', ({ column, value, row, componentProps, }) => {
|
|
4880
|
-
if (
|
|
4880
|
+
if (value === null || value === undefined)
|
|
4881
4881
|
return '';
|
|
4882
4882
|
const { dataText, formatterDataText, dataTextSeparator, dataValue, } = componentProps;
|
|
4883
4883
|
let currentRow = row;
|
|
@@ -4925,7 +4925,7 @@
|
|
|
4925
4925
|
});
|
|
4926
4926
|
return dataTextNames.reduce((result, columnName, index) => {
|
|
4927
4927
|
const rowCell = currentRow[columnName];
|
|
4928
|
-
if (rowCell) {
|
|
4928
|
+
if (rowCell !== undefined && rowCell !== null) {
|
|
4929
4929
|
const separator = index > 0 ? (dataTextSeparator || ' | ') : '';
|
|
4930
4930
|
const mask = masks[index];
|
|
4931
4931
|
const maskValue = typeof mask === 'function' ? mask(rowCell) : mask;
|
|
@@ -6679,10 +6679,10 @@
|
|
|
6679
6679
|
}
|
|
6680
6680
|
}
|
|
6681
6681
|
core.FormatterParserProvider.registerFormatter('ZdSelect', (value, { dataText, dataTextSeparator = ' | ', }) => {
|
|
6682
|
-
if (
|
|
6682
|
+
if (value === null || value === undefined) {
|
|
6683
6683
|
return null;
|
|
6684
6684
|
}
|
|
6685
|
-
if (typeof value === 'string' || typeof value === 'number') {
|
|
6685
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
6686
6686
|
return value;
|
|
6687
6687
|
}
|
|
6688
6688
|
const dataTextArr = Array.isArray(dataText) ? dataText : [dataText];
|
|
@@ -6705,7 +6705,7 @@
|
|
|
6705
6705
|
}
|
|
6706
6706
|
});
|
|
6707
6707
|
return dataTextNames.reduce((result, column, index) => {
|
|
6708
|
-
if (value[column]) {
|
|
6708
|
+
if (value[column] !== null && value[column] !== undefined) {
|
|
6709
6709
|
const separator = index > 0 ? dataTextSeparator : '';
|
|
6710
6710
|
let masked = value[column];
|
|
6711
6711
|
if (masks[index]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/common",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.1",
|
|
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": "
|
|
40
|
+
"gitHead": "dea0dcc3bb44548e97613b82580964acdc07411d"
|
|
41
41
|
}
|