From a6e3538195d39bc6922c40c64e27f3bf85b55e32 Mon Sep 17 00:00:00 2001 From: Danijel Beljan Date: Thu, 10 Aug 2023 18:54:02 +0200 Subject: [PATCH 1/2] Fixed incorrect formatting --- dist/routes.js | 8 ++++---- src/helpers/data.ts | 2 +- tests/dom/formatting.spec.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/routes.js b/dist/routes.js index c34fd21b..16bfb8a7 100644 --- a/dist/routes.js +++ b/dist/routes.js @@ -197,7 +197,7 @@ function formatCell(rawValue, type, useGroupingSeparator = false) { else { prefix = '➙ '; } - label = `${prefix}${parsedRawValue}%`; + label = `${prefix}${formatLocale.format(`${separator}`)(parsedRawValue)}%`; break; default: label = parsedRawValue.toString(); @@ -2906,7 +2906,7 @@ var optionAvailability = { if (typeof item.options.minibar.selectedColumn === 'number') { const type = getMinibarNumbersWithType(item.data.table, item.options.minibar.selectedColumn).type; return { - available: type === 'mixed' || type === 'positive', + available: type === MINIBAR_TYPE.MIXED || type === MINIBAR_TYPE.POSITIVE, }; } } @@ -2914,7 +2914,7 @@ var optionAvailability = { if (typeof item.options.minibar.selectedColumn === 'number') { const type = getMinibarNumbersWithType(item.data.table, item.options.minibar.selectedColumn).type; return { - available: type === 'mixed' || type === 'negative', + available: type === MINIBAR_TYPE.MIXED || type === MINIBAR_TYPE.NEGATIVE, }; } } @@ -2922,7 +2922,7 @@ var optionAvailability = { if (typeof item.options.minibar.selectedColumn === 'number') { const type = getMinibarNumbersWithType(item.data.table, item.options.minibar.selectedColumn).type; return { - available: type === 'mixed', + available: type === MINIBAR_TYPE.MIXED, }; } } diff --git a/src/helpers/data.ts b/src/helpers/data.ts index a57ccf68..9b84b4bc 100644 --- a/src/helpers/data.ts +++ b/src/helpers/data.ts @@ -188,7 +188,7 @@ function formatCell(rawValue: QTableCellDataRaw, type: FormattingType, useGroupi prefix = '➙ '; } - label = `${prefix}${parsedRawValue}%`; + label = `${prefix}${formatLocale.format(`${separator}`)(parsedRawValue)}%`; break; default: diff --git a/tests/dom/formatting.spec.ts b/tests/dom/formatting.spec.ts index 31f82e4a..e2683e35 100644 --- a/tests/dom/formatting.spec.ts +++ b/tests/dom/formatting.spec.ts @@ -51,7 +51,7 @@ describe('formatting', () => { '1,0% ', '1,00% ', '1,000% ', - '➘ -1% ', + '➘ –1% ', // Row 3. '9999 ', From 844604e62fd5269fb8a5a40613cd832c63de9d59 Mon Sep 17 00:00:00 2001 From: Danijel Beljan Date: Thu, 10 Aug 2023 19:00:16 +0200 Subject: [PATCH 2/2] release-7.3.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 614c46b8..e564785d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "q-table", - "version": "7.3.0", + "version": "7.3.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 12a8b0cd..19a24587 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "q-table", - "version": "7.3.0", + "version": "7.3.1", "description": "", "main": "index.js", "type": "module",