From c51a0139fba6f2a323524015ed11bb5e2cd4572c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Szyma=C5=84ski?= Date: Sun, 18 Jun 2023 20:08:25 +0200 Subject: [PATCH 1/6] feat: cover all notion number formats --- .../src/third-party/property.tsx | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) diff --git a/packages/react-notion-x/src/third-party/property.tsx b/packages/react-notion-x/src/third-party/property.tsx index 04158d58c..40a7b0f5a 100644 --- a/packages/react-notion-x/src/third-party/property.tsx +++ b/packages/react-notion-x/src/third-party/property.tsx @@ -266,6 +266,149 @@ export const PropertyImpl: React.FC = (props) => { value ) break + case 'argentine_peso': + output = formatNumber({ prefix: 'ARS', round: 2, padRight: 2 })( + value + ) + break + case 'baht': + output = formatNumber({ prefix: 'THB', round: 2, padRight: 2 })( + value + ) + break + case 'canadian_dollar': + output = formatNumber({ prefix: 'CA$', round: 2, padRight: 2 })( + value + ) + break + case 'chilean_peso': + output = formatNumber({ prefix: 'CLP', round: 0 })(value) + break + case 'colombian_peso': + output = formatNumber({ prefix: 'COP', round: 0 })(value) + break + case 'danish_krone': + output = formatNumber({ prefix: 'DKK', round: 2, padRight: 2 })( + value + ) + break + case 'dirham': + output = formatNumber({ prefix: 'AED', round: 2, padRight: 2 })( + value + ) + break + case 'forint': + output = formatNumber({ prefix: 'HUF', round: 0 })(value) + break + case 'franc': + output = formatNumber({ prefix: 'CHF', round: 2, padRight: 2 })( + value + ) + break + case 'hong_kong_dollar': + output = formatNumber({ prefix: 'HK$', round: 2, padRight: 2 })( + value + ) + break + case 'koruna': + output = formatNumber({ prefix: 'CZK', round: 2, padRight: 2 })( + value + ) + break + case 'krona': + output = formatNumber({ prefix: 'SEK', round: 2, padRight: 2 })( + value + ) + break + case 'leu': + output = formatNumber({ prefix: 'RON', round: 2, padRight: 2 })( + value + ) + break + case 'lira': + output = formatNumber({ prefix: 'TRY', round: 2, padRight: 2 })( + value + ) + break + case 'mexican_peso': + output = formatNumber({ prefix: 'MX$', round: 2, padRight: 2 })( + value + ) + break + case 'new_taiwan_dollar': + output = formatNumber({ prefix: 'NT$', round: 0 })(value) + break + case 'new_zealand_dollar': + output = formatNumber({ prefix: 'NZ$', round: 2, padRight: 2 })( + value + ) + break + case 'norwegian_krone': + output = formatNumber({ prefix: 'NOK', round: 2, padRight: 2 })( + value + ) + break + case 'number': + output = formatNumber()(value) + break + case 'philippine_peso': + output = formatNumber({ prefix: '₱', round: 2, padRight: 2 })( + value + ) + break + case 'peruvian_sol': + output = formatNumber({ prefix: 'S/', round: 2, padRight: 2 })( + value + ) + break + case 'rand': + output = formatNumber({ prefix: 'ZAR', round: 2, padRight: 2 })( + value + ) + break + case 'real': + output = formatNumber({ prefix: 'R$', round: 2, padRight: 2 })( + value + ) + break + case 'ringgit': + output = formatNumber({ prefix: 'MYR', round: 2, padRight: 2 })( + value + ) + break + case 'riyal': + output = formatNumber({ prefix: 'SAR', round: 2, padRight: 2 })( + value + ) + break + case 'ruble': + output = formatNumber({ prefix: 'RUB', round: 2, padRight: 2 })( + value + ) + break + case 'rupiah': + output = formatNumber({ prefix: 'IDR', round: 0 })(value) + break + case 'shekel': + output = formatNumber({ prefix: '₪', round: 2, padRight: 2 })( + value + ) + break + case 'singapore_dollar': + output = formatNumber({ prefix: 'SGD', round: 2, padRight: 2 })( + value + ) + break + case 'uruguayan_peso': + output = formatNumber({ prefix: 'UYU', round: 2, padRight: 2 })( + value + ) + break + case 'zloty': + output = formatNumber({ prefix: 'PLN', round: 2, padRight: 2 })( + value + ) + break default: return } From d274bca7ad3e5146b11f80e9dbc428804a09afff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Szyma=C5=84ski?= Date: Sun, 18 Jun 2023 20:27:30 +0200 Subject: [PATCH 2/6] add number format types --- packages/notion-types/src/core.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/packages/notion-types/src/core.ts b/packages/notion-types/src/core.ts index 5f0c16e7d..f8712e893 100644 --- a/packages/notion-types/src/core.ts +++ b/packages/notion-types/src/core.ts @@ -69,6 +69,37 @@ export type NumberFormat = | 'rupee' | 'won' | 'yuan' + | 'argentine_peso' + | 'baht' + | 'canadian_dollar' + | 'chilean_peso' + | 'colombian_peso' + | 'danish_krone' + | 'dirham' + | 'forint' + | 'franc' + | 'hong_kong_dollar' + | 'koruna' + | 'krona' + | 'leu' + | 'lira' + | 'mexican_peso' + | 'new_taiwan_dollar' + | 'new_zealand_dollar' + | 'norwegian_krone' + | 'number' + | 'philippine_peso' + | 'peruvian_sol' + | 'rand' + | 'real' + | 'ringgit' + | 'riyal' + | 'ruble' + | 'rupiah' + | 'shekel' + | 'singapore_dollar' + | 'uruguayan_peso' + | 'zloty'; export type Role = 'editor' | 'reader' | 'none' | 'read_and_write' From 8c9b722b5acac1b66d5d4a147c07d0827e8c3cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Szyma=C5=84ski?= Date: Sun, 18 Jun 2023 20:36:55 +0200 Subject: [PATCH 3/6] v6.17.0 --- examples/cra/package.json | 6 +++--- examples/full/package.json | 10 +++++----- examples/minimal/package.json | 8 ++++---- lerna.json | 2 +- packages/notion-client/package.json | 6 +++--- packages/notion-compat/package.json | 8 ++++---- packages/notion-types/package.json | 2 +- packages/notion-utils/package.json | 4 ++-- packages/react-notion-x/package.json | 6 +++--- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/cra/package.json b/examples/cra/package.json index 9a70cd687..d2f8d7f69 100644 --- a/examples/cra/package.json +++ b/examples/cra/package.json @@ -1,6 +1,6 @@ { "name": "notion-x-example-cra", - "version": "6.16.0", + "version": "6.17.0", "private": true, "scripts": { "dev": "GENERATE_SOURCEMAP=false react-scripts start", @@ -12,10 +12,10 @@ "@types/node": "^16.11.26", "@types/react": "^17.0.43", "@types/react-dom": "^17.0.14", - "notion-types": "^6.15.6", + "notion-types": "^6.17.0", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-notion-x": "^6.16.0", + "react-notion-x": "^6.17.0", "react-scripts": "5.0.0", "typescript": "^4.6.3" }, diff --git a/examples/full/package.json b/examples/full/package.json index 9f66c7970..bd551e47e 100644 --- a/examples/full/package.json +++ b/examples/full/package.json @@ -1,6 +1,6 @@ { "name": "notion-x-example-full", - "version": "6.16.0", + "version": "6.17.0", "private": true, "type": "commonjs", "scripts": { @@ -18,14 +18,14 @@ "got": "^12.0.2", "lqip-modern": "^1.2.0", "next": "^12.1.0", - "notion-client": "^6.16.0", - "notion-compat": "^6.16.0", - "notion-utils": "^6.16.0", + "notion-client": "^6.17.0", + "notion-compat": "^6.17.0", + "notion-utils": "^6.17.0", "p-map": "^5.3.0", "p-memoize": "^6.0.1", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-notion-x": "^6.16.0", + "react-notion-x": "^6.17.0", "react-tweet-embed": "^2.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index e1ee476ad..89b1731c9 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -1,6 +1,6 @@ { "name": "notion-x-example-minimal", - "version": "6.16.0", + "version": "6.17.0", "private": true, "type": "commonjs", "scripts": { @@ -11,11 +11,11 @@ }, "dependencies": { "next": "^12.1.0", - "notion-client": "^6.16.0", - "notion-utils": "^6.16.0", + "notion-client": "^6.17.0", + "notion-utils": "^6.17.0", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-notion-x": "^6.16.0" + "react-notion-x": "^6.17.0" }, "devDependencies": { "@types/node": "^16.11.2", diff --git a/lerna.json b/lerna.json index 6eaac2953..ee96a570d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "6.16.0", + "version": "6.17.0", "npmClient": "yarn", "useWorkspaces": true, "packages": [ diff --git a/packages/notion-client/package.json b/packages/notion-client/package.json index dc4086b7a..d365e2bf5 100644 --- a/packages/notion-client/package.json +++ b/packages/notion-client/package.json @@ -1,6 +1,6 @@ { "name": "notion-client", - "version": "6.16.0", + "version": "6.17.0", "type": "module", "description": "Robust TypeScript client for the unofficial Notion API.", "repository": "NotionX/react-notion-x", @@ -23,8 +23,8 @@ }, "dependencies": { "got": "^11.8.1", - "notion-types": "^6.16.0", - "notion-utils": "^6.16.0", + "notion-types": "^6.17.0", + "notion-utils": "^6.17.0", "p-map": "^5.3.0" }, "ava": { diff --git a/packages/notion-compat/package.json b/packages/notion-compat/package.json index faffbccf3..a322b141b 100644 --- a/packages/notion-compat/package.json +++ b/packages/notion-compat/package.json @@ -1,6 +1,6 @@ { "name": "notion-compat", - "version": "6.16.0", + "version": "6.17.0", "type": "module", "description": "Compatibility layer between the official Notion API and unofficial private API.", "repository": "NotionX/react-notion-x", @@ -22,13 +22,13 @@ "test": "ava" }, "dependencies": { - "notion-types": "^6.16.0", - "notion-utils": "^6.16.0", + "notion-types": "^6.17.0", + "notion-utils": "^6.17.0", "p-queue": "^7.2.0" }, "devDependencies": { "@notionhq/client": "^1.0.4", - "notion-client": "^6.16.0" + "notion-client": "^6.17.0" }, "peerDependencies": { "@notionhq/client": "^1.0.4" diff --git a/packages/notion-types/package.json b/packages/notion-types/package.json index b3e3196c2..d198091d5 100644 --- a/packages/notion-types/package.json +++ b/packages/notion-types/package.json @@ -1,6 +1,6 @@ { "name": "notion-types", - "version": "6.16.0", + "version": "6.17.0", "type": "module", "description": "TypeScript types for core Notion data structures.", "repository": "NotionX/react-notion-x", diff --git a/packages/notion-utils/package.json b/packages/notion-utils/package.json index b3008362a..a8561c654 100644 --- a/packages/notion-utils/package.json +++ b/packages/notion-utils/package.json @@ -1,6 +1,6 @@ { "name": "notion-utils", - "version": "6.16.0", + "version": "6.17.0", "type": "module", "description": "Useful utilities for working with Notion data. Isomorphic.", "repository": "NotionX/react-notion-x", @@ -31,7 +31,7 @@ "is-url-superb": "^6.1.0", "mem": "^9.0.2", "normalize-url": "^7.0.3", - "notion-types": "^6.16.0", + "notion-types": "^6.17.0", "p-queue": "^7.2.0" }, "ava": { diff --git a/packages/react-notion-x/package.json b/packages/react-notion-x/package.json index 915abf031..53051aec2 100644 --- a/packages/react-notion-x/package.json +++ b/packages/react-notion-x/package.json @@ -1,6 +1,6 @@ { "name": "react-notion-x", - "version": "6.16.0", + "version": "6.17.0", "type": "module", "description": "Fast and accurate React renderer for Notion.", "repository": "NotionX/react-notion-x", @@ -25,8 +25,8 @@ "@fisch0920/medium-zoom": "^1.0.7", "@matejmazur/react-katex": "^3.1.3", "katex": "^0.15.3", - "notion-types": "^6.16.0", - "notion-utils": "^6.16.0", + "notion-types": "^6.17.0", + "notion-utils": "^6.17.0", "prismjs": "^1.27.0", "react-fast-compare": "^3.2.0", "react-hotkeys-hook": "^3.0.3", From 1f1e855e82e5e046a87020db90eef81b54d13dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Szyma=C5=84ski?= Date: Sun, 18 Jun 2023 20:49:08 +0200 Subject: [PATCH 4/6] Revert "v6.17.0" This reverts commit 8c9b722b5acac1b66d5d4a147c07d0827e8c3cff. --- examples/cra/package.json | 6 +++--- examples/full/package.json | 10 +++++----- examples/minimal/package.json | 8 ++++---- lerna.json | 2 +- packages/notion-client/package.json | 6 +++--- packages/notion-compat/package.json | 8 ++++---- packages/notion-types/package.json | 2 +- packages/notion-utils/package.json | 4 ++-- packages/react-notion-x/package.json | 6 +++--- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/cra/package.json b/examples/cra/package.json index d2f8d7f69..9a70cd687 100644 --- a/examples/cra/package.json +++ b/examples/cra/package.json @@ -1,6 +1,6 @@ { "name": "notion-x-example-cra", - "version": "6.17.0", + "version": "6.16.0", "private": true, "scripts": { "dev": "GENERATE_SOURCEMAP=false react-scripts start", @@ -12,10 +12,10 @@ "@types/node": "^16.11.26", "@types/react": "^17.0.43", "@types/react-dom": "^17.0.14", - "notion-types": "^6.17.0", + "notion-types": "^6.15.6", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-notion-x": "^6.17.0", + "react-notion-x": "^6.16.0", "react-scripts": "5.0.0", "typescript": "^4.6.3" }, diff --git a/examples/full/package.json b/examples/full/package.json index bd551e47e..9f66c7970 100644 --- a/examples/full/package.json +++ b/examples/full/package.json @@ -1,6 +1,6 @@ { "name": "notion-x-example-full", - "version": "6.17.0", + "version": "6.16.0", "private": true, "type": "commonjs", "scripts": { @@ -18,14 +18,14 @@ "got": "^12.0.2", "lqip-modern": "^1.2.0", "next": "^12.1.0", - "notion-client": "^6.17.0", - "notion-compat": "^6.17.0", - "notion-utils": "^6.17.0", + "notion-client": "^6.16.0", + "notion-compat": "^6.16.0", + "notion-utils": "^6.16.0", "p-map": "^5.3.0", "p-memoize": "^6.0.1", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-notion-x": "^6.17.0", + "react-notion-x": "^6.16.0", "react-tweet-embed": "^2.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 89b1731c9..e1ee476ad 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -1,6 +1,6 @@ { "name": "notion-x-example-minimal", - "version": "6.17.0", + "version": "6.16.0", "private": true, "type": "commonjs", "scripts": { @@ -11,11 +11,11 @@ }, "dependencies": { "next": "^12.1.0", - "notion-client": "^6.17.0", - "notion-utils": "^6.17.0", + "notion-client": "^6.16.0", + "notion-utils": "^6.16.0", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-notion-x": "^6.17.0" + "react-notion-x": "^6.16.0" }, "devDependencies": { "@types/node": "^16.11.2", diff --git a/lerna.json b/lerna.json index ee96a570d..6eaac2953 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "6.17.0", + "version": "6.16.0", "npmClient": "yarn", "useWorkspaces": true, "packages": [ diff --git a/packages/notion-client/package.json b/packages/notion-client/package.json index d365e2bf5..dc4086b7a 100644 --- a/packages/notion-client/package.json +++ b/packages/notion-client/package.json @@ -1,6 +1,6 @@ { "name": "notion-client", - "version": "6.17.0", + "version": "6.16.0", "type": "module", "description": "Robust TypeScript client for the unofficial Notion API.", "repository": "NotionX/react-notion-x", @@ -23,8 +23,8 @@ }, "dependencies": { "got": "^11.8.1", - "notion-types": "^6.17.0", - "notion-utils": "^6.17.0", + "notion-types": "^6.16.0", + "notion-utils": "^6.16.0", "p-map": "^5.3.0" }, "ava": { diff --git a/packages/notion-compat/package.json b/packages/notion-compat/package.json index a322b141b..faffbccf3 100644 --- a/packages/notion-compat/package.json +++ b/packages/notion-compat/package.json @@ -1,6 +1,6 @@ { "name": "notion-compat", - "version": "6.17.0", + "version": "6.16.0", "type": "module", "description": "Compatibility layer between the official Notion API and unofficial private API.", "repository": "NotionX/react-notion-x", @@ -22,13 +22,13 @@ "test": "ava" }, "dependencies": { - "notion-types": "^6.17.0", - "notion-utils": "^6.17.0", + "notion-types": "^6.16.0", + "notion-utils": "^6.16.0", "p-queue": "^7.2.0" }, "devDependencies": { "@notionhq/client": "^1.0.4", - "notion-client": "^6.17.0" + "notion-client": "^6.16.0" }, "peerDependencies": { "@notionhq/client": "^1.0.4" diff --git a/packages/notion-types/package.json b/packages/notion-types/package.json index d198091d5..b3e3196c2 100644 --- a/packages/notion-types/package.json +++ b/packages/notion-types/package.json @@ -1,6 +1,6 @@ { "name": "notion-types", - "version": "6.17.0", + "version": "6.16.0", "type": "module", "description": "TypeScript types for core Notion data structures.", "repository": "NotionX/react-notion-x", diff --git a/packages/notion-utils/package.json b/packages/notion-utils/package.json index a8561c654..b3008362a 100644 --- a/packages/notion-utils/package.json +++ b/packages/notion-utils/package.json @@ -1,6 +1,6 @@ { "name": "notion-utils", - "version": "6.17.0", + "version": "6.16.0", "type": "module", "description": "Useful utilities for working with Notion data. Isomorphic.", "repository": "NotionX/react-notion-x", @@ -31,7 +31,7 @@ "is-url-superb": "^6.1.0", "mem": "^9.0.2", "normalize-url": "^7.0.3", - "notion-types": "^6.17.0", + "notion-types": "^6.16.0", "p-queue": "^7.2.0" }, "ava": { diff --git a/packages/react-notion-x/package.json b/packages/react-notion-x/package.json index 53051aec2..915abf031 100644 --- a/packages/react-notion-x/package.json +++ b/packages/react-notion-x/package.json @@ -1,6 +1,6 @@ { "name": "react-notion-x", - "version": "6.17.0", + "version": "6.16.0", "type": "module", "description": "Fast and accurate React renderer for Notion.", "repository": "NotionX/react-notion-x", @@ -25,8 +25,8 @@ "@fisch0920/medium-zoom": "^1.0.7", "@matejmazur/react-katex": "^3.1.3", "katex": "^0.15.3", - "notion-types": "^6.17.0", - "notion-utils": "^6.17.0", + "notion-types": "^6.16.0", + "notion-utils": "^6.16.0", "prismjs": "^1.27.0", "react-fast-compare": "^3.2.0", "react-hotkeys-hook": "^3.0.3", From c578cef7a0f51b9f4350bf7f0e19b08b1aeb2755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Szyma=C5=84ski?= Date: Sun, 18 Jun 2023 20:56:07 +0200 Subject: [PATCH 5/6] whitespaces --- .../src/third-party/property.tsx | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/react-notion-x/src/third-party/property.tsx b/packages/react-notion-x/src/third-party/property.tsx index 40a7b0f5a..c12b0e62a 100644 --- a/packages/react-notion-x/src/third-party/property.tsx +++ b/packages/react-notion-x/src/third-party/property.tsx @@ -267,12 +267,12 @@ export const PropertyImpl: React.FC = (props) => { ) break case 'argentine_peso': - output = formatNumber({ prefix: 'ARS', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'ARS ', round: 2, padRight: 2 })( value ) break case 'baht': - output = formatNumber({ prefix: 'THB', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'THB ', round: 2, padRight: 2 })( value ) break @@ -282,26 +282,26 @@ export const PropertyImpl: React.FC = (props) => { ) break case 'chilean_peso': - output = formatNumber({ prefix: 'CLP', round: 0 })(value) + output = formatNumber({ prefix: 'CLP ', round: 0 })(value) break case 'colombian_peso': - output = formatNumber({ prefix: 'COP', round: 0 })(value) + output = formatNumber({ prefix: 'COP ', round: 0 })(value) break case 'danish_krone': - output = formatNumber({ prefix: 'DKK', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'DKK ', round: 2, padRight: 2 })( value ) break case 'dirham': - output = formatNumber({ prefix: 'AED', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'AED ', round: 2, padRight: 2 })( value ) break case 'forint': - output = formatNumber({ prefix: 'HUF', round: 0 })(value) + output = formatNumber({ prefix: 'HUF ', round: 0 })(value) break case 'franc': - output = formatNumber({ prefix: 'CHF', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'CHF ', round: 2, padRight: 2 })( value ) break @@ -311,22 +311,22 @@ export const PropertyImpl: React.FC = (props) => { ) break case 'koruna': - output = formatNumber({ prefix: 'CZK', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'CZK ', round: 2, padRight: 2 })( value ) break case 'krona': - output = formatNumber({ prefix: 'SEK', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'SEK ', round: 2, padRight: 2 })( value ) break case 'leu': - output = formatNumber({ prefix: 'RON', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'RON ', round: 2, padRight: 2 })( value ) break case 'lira': - output = formatNumber({ prefix: 'TRY', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'TRY ', round: 2, padRight: 2 })( value ) break @@ -344,7 +344,7 @@ export const PropertyImpl: React.FC = (props) => { ) break case 'norwegian_krone': - output = formatNumber({ prefix: 'NOK', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'NOK ', round: 2, padRight: 2 })( value ) break @@ -357,12 +357,12 @@ export const PropertyImpl: React.FC = (props) => { ) break case 'peruvian_sol': - output = formatNumber({ prefix: 'S/', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'PEN ', round: 2, padRight: 2 })( value ) break case 'rand': - output = formatNumber({ prefix: 'ZAR', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'ZAR ', round: 2, padRight: 2 })( value ) break @@ -372,22 +372,22 @@ export const PropertyImpl: React.FC = (props) => { ) break case 'ringgit': - output = formatNumber({ prefix: 'MYR', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'MYR ', round: 2, padRight: 2 })( value ) break case 'riyal': - output = formatNumber({ prefix: 'SAR', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'SAR ', round: 2, padRight: 2 })( value ) break case 'ruble': - output = formatNumber({ prefix: 'RUB', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'RUB ', round: 2, padRight: 2 })( value ) break case 'rupiah': - output = formatNumber({ prefix: 'IDR', round: 0 })(value) + output = formatNumber({ prefix: 'IDR ', round: 0 })(value) break case 'shekel': output = formatNumber({ prefix: '₪', round: 2, padRight: 2 })( @@ -395,17 +395,17 @@ export const PropertyImpl: React.FC = (props) => { ) break case 'singapore_dollar': - output = formatNumber({ prefix: 'SGD', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'SGD ', round: 2, padRight: 2 })( value ) break case 'uruguayan_peso': - output = formatNumber({ prefix: 'UYU', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'UYU ', round: 2, padRight: 2 })( value ) break case 'zloty': - output = formatNumber({ prefix: 'PLN', round: 2, padRight: 2 })( + output = formatNumber({ prefix: 'PLN ', round: 2, padRight: 2 })( value ) break From 79d9753bdf53007e4fa64ae95659b9fe786c32a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Szyma=C5=84ski?= Date: Sun, 18 Jun 2023 21:22:13 +0200 Subject: [PATCH 6/6] prettier --- packages/notion-types/src/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/notion-types/src/core.ts b/packages/notion-types/src/core.ts index f8712e893..a5130f781 100644 --- a/packages/notion-types/src/core.ts +++ b/packages/notion-types/src/core.ts @@ -99,7 +99,7 @@ export type NumberFormat = | 'shekel' | 'singapore_dollar' | 'uruguayan_peso' - | 'zloty'; + | 'zloty' export type Role = 'editor' | 'reader' | 'none' | 'read_and_write'