@wavemaker/app-ng-runtime 11.5.1-rc.5428 → 11.5.1-rc.5430
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.
- app-ng-runtime/components/chart/bundles/index.umd.js +7 -0
- app-ng-runtime/components/chart/esm2020/chart.utils.mjs +8 -1
- app-ng-runtime/components/chart/fesm2015/index.mjs +7 -0
- app-ng-runtime/components/chart/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/chart/fesm2020/index.mjs +7 -0
- app-ng-runtime/components/chart/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/bundles/index.umd.js +158 -156
- app-ng-runtime/components/input/default/esm2020/number/number.component.mjs +7 -6
- app-ng-runtime/components/input/default/esm2020/text/calendar/input-calendar.component.mjs +7 -6
- app-ng-runtime/components/input/default/esm2020/text/color/input-color.component.mjs +7 -6
- app-ng-runtime/components/input/default/esm2020/text/email/input-email.component.mjs +7 -6
- app-ng-runtime/components/input/default/esm2020/text/number/input-number.component.mjs +5 -5
- app-ng-runtime/components/input/default/esm2020/text/text/input-text.component.mjs +8 -7
- app-ng-runtime/components/input/default/esm2020/textarea/textarea.component.mjs +5 -5
- app-ng-runtime/components/input/default/esm2020/textarea/textarea.props.mjs +3 -1
- app-ng-runtime/components/input/default/fesm2015/index.mjs +39 -37
- app-ng-runtime/components/input/default/fesm2015/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/fesm2020/index.mjs +39 -37
- app-ng-runtime/components/input/default/fesm2020/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/number/number.component.d.ts +2 -0
- app-ng-runtime/components/input/default/text/calendar/input-calendar.component.d.ts +2 -0
- app-ng-runtime/components/input/default/text/color/input-color.component.d.ts +2 -0
- app-ng-runtime/components/input/default/text/email/input-email.component.d.ts +2 -0
- app-ng-runtime/components/input/default/text/number/input-number.component.d.ts +2 -0
- app-ng-runtime/components/input/default/text/text/input-text.component.d.ts +2 -0
- app-ng-runtime/components/input/default/textarea/textarea.component.d.ts +2 -0
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/@wavemaker.com/nvd3/build/nv.d3.min.js +1 -1
|
@@ -468,6 +468,12 @@ const getDateFormatedData = (dateFormat, d) => {
|
|
|
468
468
|
}
|
|
469
469
|
return d3.timeFormat(dateFormat)(new Date(moment(moment(d).format()).valueOf()));
|
|
470
470
|
};
|
|
471
|
+
const removeTrailingZeros = value => {
|
|
472
|
+
// Convert value to a string if it's a number
|
|
473
|
+
const stringValue = typeof value === 'number' ? value.toString() : value;
|
|
474
|
+
// Remove trailing zeros
|
|
475
|
+
return stringValue.replace(/\.0+$/, "").replace(/\.0+%$/, "%");
|
|
476
|
+
};
|
|
471
477
|
// Formats the given value according to number format
|
|
472
478
|
const getNumberFormatedData = (numberFormat, d) => {
|
|
473
479
|
let formattedData, divider, prefix;
|
|
@@ -498,6 +504,7 @@ const getNumberFormatedData = (numberFormat, d) => {
|
|
|
498
504
|
// Auto formatting the data when no formating option is chosen
|
|
499
505
|
formattedData = d >= 1000 ? d3.format('.1s')(d) : d;
|
|
500
506
|
}
|
|
507
|
+
formattedData = removeTrailingZeros(formattedData);
|
|
501
508
|
return formattedData;
|
|
502
509
|
};
|
|
503
510
|
// Set the visibility property of the chart x,y axis due to a bug in the nvd3
|