@procore/globalization-toolkit 3.4.3 → 3.5.0
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/CHANGELOG.md +14 -0
- package/README.md +116 -0
- package/dist/Formatter.types.d.ts +2 -2
- package/dist/Formatter.types.js +1 -0
- package/dist/Formatter.types.js.map +1 -1
- package/dist/FormatterUtils.d.ts +2 -0
- package/dist/FormatterUtils.js +31 -4
- package/dist/FormatterUtils.js.map +1 -1
- package/dist/dateTimes/DateTimeUtils.js +2 -2
- package/dist/dateTimes/DateTimeUtils.js.map +1 -1
- package/dist/generateSupportDocsURL/GenerateSupportDocsURL.d.ts +4 -0
- package/dist/generateSupportDocsURL/GenerateSupportDocsURL.js +36 -0
- package/dist/generateSupportDocsURL/GenerateSupportDocsURL.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/CoreNumberFormatter.d.ts +5 -0
- package/dist/lib/CoreNumberFormatter.js +27 -0
- package/dist/lib/CoreNumberFormatter.js.map +1 -0
- package/dist/numbers/CurrencyUtils.js +8 -7
- package/dist/numbers/CurrencyUtils.js.map +1 -1
- package/dist/numbers/NumberFormatter.test.constants.js +346 -188
- package/dist/numbers/NumberFormatter.test.constants.js.map +1 -1
- package/dist/numbers/NumberUtils.js +6 -6
- package/dist/numbers/NumberUtils.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @procore/globalization-toolkit
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a7c1fee: Added new functions, `getSupportDocsBaseURL` and `generateSupportDocsURL`, for localized support documentation.
|
|
8
|
+
- 59687a9: Add locale sanitization as part of this ticket [GLB-1282](https://procoretech.atlassian.net/browse/GLB-1282)
|
|
9
|
+
- 3630bc6: Add support for Italian
|
|
10
|
+
|
|
11
|
+
## 3.4.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Adding the currency symbol for the emarati dirham
|
|
16
|
+
|
|
3
17
|
## 3.4.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -11,6 +11,8 @@ Before implementing the Globalization Toolkit (GTK), please review the [Globaliz
|
|
|
11
11
|
## [Engineering Documentation](https://procore.github.io/globalization-toolkit/)
|
|
12
12
|
The engineering documentation contains technical documentation for the GTK repo. It details classes, types, interfaces, and features. Continue reading for install and usage instructions.
|
|
13
13
|
Further reading on the GTK:
|
|
14
|
+
|
|
15
|
+
- [Add new Locale to GTK](#add-new-locale)
|
|
14
16
|
- [GTK Adoption Training Presentation](https://docs.google.com/presentation/d/1FtB2DR5qroKgGcxxWsu5Ac9QHA01I7WM75FUeB67izE/edit?usp=sharing)
|
|
15
17
|
- [GTK SDR](https://github.com/procore/system-design-records/blob/main/lifecycle/2-pilot/internationalization/0002-globalization-toolkit.md)
|
|
16
18
|
- [GTK FAQ](https://github.com/procore/globalization-toolkit/blob/41ada23bfa8956c68a7c853da70ec11f766b417a/FAQ.md)
|
|
@@ -263,6 +265,8 @@ The DateTimeFormatter has 3 available functions:
|
|
|
263
265
|
- `formatDateTimeToParts(value: Date)`, and
|
|
264
266
|
- `getStartDayOfTheWeek()`
|
|
265
267
|
|
|
268
|
+
### Allowed Formatting Option Subsets
|
|
269
|
+
|
|
266
270
|
The DateTimeOptions can be used in two ways, but the two options cannot be combined. This follows the pattern of Intl.DateTimeFormat.
|
|
267
271
|
1. Style Options:
|
|
268
272
|
- timeStyle: 'short', 'medium', 'long', 'full'
|
|
@@ -276,6 +280,25 @@ The DateTimeOptions can be used in two ways, but the two options cannot be combi
|
|
|
276
280
|
- minute: 'numeric', '2-digit'
|
|
277
281
|
- second: 'numeric', '2-digit'
|
|
278
282
|
|
|
283
|
+
### Allowed Combinations
|
|
284
|
+
|
|
285
|
+
The following combinations of parameters are allowed for DateTime formatting:
|
|
286
|
+
|
|
287
|
+
1. **Date Only:**
|
|
288
|
+
- `year`, `month`, `day`
|
|
289
|
+
- `year`, `month`, `day`, `weekday`
|
|
290
|
+
|
|
291
|
+
2. **Time Only:**
|
|
292
|
+
- `hour`, `minute`
|
|
293
|
+
- `hour`, `minute`, `second`
|
|
294
|
+
|
|
295
|
+
3. **Date and Time:**
|
|
296
|
+
- `year`, `month`, `day`, `hour`, `minute`, `second`, `weekday`
|
|
297
|
+
- `year`, `month`, `day`, `hour`, `minute`, `weekday`
|
|
298
|
+
- `year`, `month`, `day`, `hour`, `minute`, `second`
|
|
299
|
+
|
|
300
|
+
**Note:** The subsets of parameters must follow the Intl standards. The Intl.DateTimeFormat API, which GTK relies on, has specific requirements for including certain date and time components together to ensure proper formatting. For example, if you want to include `year`, `month`, `day`, `hour`, and `minute`, you must also include `weekday` and `second`. This is because the Intl standards are designed to provide consistent and culturally appropriate formatting, and omitting certain components can lead to ambiguous or incorrect representations of date and time.
|
|
301
|
+
|
|
279
302
|
Below code blocks display usage of the DateTimeFormatter class and available functions.
|
|
280
303
|
[formatDateTime(value: Date)](https://procore.github.io/globalization-toolkit/classes/DateTimeFormatter.html#formatDateTime)
|
|
281
304
|
SIMPLE OPTIONS
|
|
@@ -454,6 +477,39 @@ console.log(locale4); // Output: ['en']
|
|
|
454
477
|
|
|
455
478
|
```
|
|
456
479
|
|
|
480
|
+
### `getSupportDocsBaseURL` and `generateSupportDocsURL` Functions
|
|
481
|
+
|
|
482
|
+
The `getSupportDocsBaseURL` function returns the appropriate Procore support base URL for a given locale. This is useful for directing users to the correct localized support site. If the locale is not directly supported, it defaults to the main support base URL.
|
|
483
|
+
|
|
484
|
+
The `generateSupportDocsURL` function generates a full support URL for a given path or URL and locale, ensuring the link points to the correct localized support site. It accepts both relative and absolute URLs.
|
|
485
|
+
|
|
486
|
+
#### Usage
|
|
487
|
+
Here are examples of how to use the `getSupportDocsBaseURL` and `generateSupportDocsURL` functions:
|
|
488
|
+
|
|
489
|
+
```ts
|
|
490
|
+
import { getSupportDocsBaseURL, generateSupportDocsURL } from '@procore/globalization-toolkit';
|
|
491
|
+
|
|
492
|
+
// Example 1: Get the support domain for a known supported locale
|
|
493
|
+
const domain1 = getSupportDocsBaseURL('ja-JP');
|
|
494
|
+
console.log(domain1); // Output: 'https://ja-jp.support.procore.com'
|
|
495
|
+
|
|
496
|
+
// Example 2: Get the support domain for an unsupported locale
|
|
497
|
+
const domain2 = getSupportDocsBaseURL('unknown');
|
|
498
|
+
console.log(domain2); // Output: 'https://support.procore.com'
|
|
499
|
+
|
|
500
|
+
// Example 3: Generate a support URL for a relative path and supported locale
|
|
501
|
+
const url1 = generateSupportDocsURL('/foo/bar', 'fr-FR');
|
|
502
|
+
console.log(url1); // Output: 'https://fr.support.procore.com/foo/bar'
|
|
503
|
+
|
|
504
|
+
// Example 4: Generate a support URL for an absolute URL and supported locale
|
|
505
|
+
const url2 = generateSupportDocsURL('https://support.procore.com/help/article', 'de-DE');
|
|
506
|
+
console.log(url2); // Output: 'https://de.support.procore.com/help/article'
|
|
507
|
+
|
|
508
|
+
// Example 5: Generate a support URL for a relative path and unsupported locale
|
|
509
|
+
const url3 = generateSupportDocsURL('/help', 'unknown');
|
|
510
|
+
console.log(url3); // Output: 'https://support.procore.com/help'
|
|
511
|
+
```
|
|
512
|
+
|
|
457
513
|
### `getTranslationsFromLocale` Function
|
|
458
514
|
|
|
459
515
|
The getTranslationsFromLocale function is a utility designed to load and merge translations for a given locale and its fallback locales. It is part of the @procore/globalization-toolkit and provides a robust way to handle multiple languages in your application.
|
|
@@ -496,6 +552,66 @@ $ npm run build
|
|
|
496
552
|
|
|
497
553
|
(Delete build `npm run clean`)
|
|
498
554
|
|
|
555
|
+
## Add new locale
|
|
556
|
+
|
|
557
|
+
When adding a new locale to the Globalization Toolkit, follow these steps:
|
|
558
|
+
|
|
559
|
+
1. Add the new locale to `TMS_SUPPORTED_LOCALES` in `src/Formatter.types.ts`:
|
|
560
|
+
```ts
|
|
561
|
+
export const TMS_SUPPORTED_LOCALES = [
|
|
562
|
+
// ... existing locales ...
|
|
563
|
+
"new-locale", // e.g., "fr-BE"
|
|
564
|
+
] as const;
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
2. If the locale needs special handling for formatting or if it is not compatible with INTL locales, add it to the `getFormatterLocale` function in `src/FormatterUtils.ts`:
|
|
568
|
+
```ts
|
|
569
|
+
export const getFormatterLocale = (locale: string): string => {
|
|
570
|
+
const newLocale = getOverrideLocale(locale);
|
|
571
|
+
switch (locale) {
|
|
572
|
+
// ... existing cases ...
|
|
573
|
+
case "new-locale":
|
|
574
|
+
return "fallback-locale"; // e.g., "fr-FR"
|
|
575
|
+
default:
|
|
576
|
+
return newLocale === "en" ? "en-US" : newLocale;
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
3. If the locale needs a fallback locale for translations, add it to `FALLBACK_LOCALE_MAP` in `src/getFallbackLocaleList/GetFallbackLocaleList.ts`:
|
|
582
|
+
```ts
|
|
583
|
+
export const FALLBACK_LOCALE_MAP: Record<string, TmsSupportedLocale> = {
|
|
584
|
+
// ... existing mappings ...
|
|
585
|
+
"new-locale": "fallback-locale", // e.g., "fr-BE": "fr-FR"
|
|
586
|
+
};
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
4. If the locale should override another locale, add it to `OVERWRITE_LOCALE_MAP` in `src/getOverrideLocale/GetOverrideLocale.ts`:
|
|
590
|
+
```ts
|
|
591
|
+
export const OVERWRITE_LOCALE_MAP: Record<string, TmsSupportedLocale> = {
|
|
592
|
+
// ... existing mappings ...
|
|
593
|
+
"custom-locale": "new-locale", // e.g., "fr-CA": "fr-FR"
|
|
594
|
+
} as const;
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
5. Add tests for the new locale in `src/FormatterUtils.test.ts`:
|
|
598
|
+
```ts
|
|
599
|
+
describe("validateLocale", () => {
|
|
600
|
+
// ... existing tests ...
|
|
601
|
+
it("new-locale should be compatible with Intl.NumberFormat", async () => {
|
|
602
|
+
await expect(async () => {
|
|
603
|
+
validateLocale(getFormatterLocale("new-locale"));
|
|
604
|
+
}).not.toThrowError();
|
|
605
|
+
});
|
|
606
|
+
});
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
6. Update the documentation to reflect the new locale support.
|
|
610
|
+
|
|
611
|
+
Note: Make sure the new locale follows the industry standard format of `<language>-<region>` (e.g., `en-US`, `fr-FR`). The locale must be supported by `Intl.NumberFormat` or mapped to a locale supported by `Intl.NumberFormat` for proper formatting.
|
|
612
|
+
|
|
613
|
+
7. Update [`LOCALE_URL_PREFIX_MAP`](./src/generateSupportDocsURL/GenerateSupportDocsURL.ts) with locale mapping when its support subdomain (mindtouch) is ready.
|
|
614
|
+
|
|
499
615
|
## Testing
|
|
500
616
|
|
|
501
617
|
```sh
|
|
@@ -2,9 +2,9 @@ export type DatesAndNumbersLocale = string;
|
|
|
2
2
|
export type FormatterOptions = {
|
|
3
3
|
locale: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const TMS_SUPPORTED_LOCALES: readonly ["de-DE", "en-AU", "en-CA", "en-GB", "en", "es-ES", "es", "fr-CA", "fr-FR", "is-IS", "ja-JP", "pl-PL", "pseudo", "pt-BR", "th-TH", "zh-SG"];
|
|
5
|
+
export declare const TMS_SUPPORTED_LOCALES: readonly ["de-DE", "en-AU", "en-CA", "en-GB", "en", "es-ES", "es", "fr-CA", "fr-FR", "is-IS", "it-IT", "ja-JP", "pl-PL", "pseudo", "pt-BR", "th-TH", "zh-SG"];
|
|
6
6
|
export declare const UNSUPPORTED_LOCALES: readonly ["en-AE", "en-SG"];
|
|
7
|
-
export declare const ALL_LOCALES: ("de-DE" | "en-AU" | "en-CA" | "en-GB" | "en" | "es-ES" | "es" | "fr-CA" | "fr-FR" | "is-IS" | "ja-JP" | "pl-PL" | "pseudo" | "pt-BR" | "th-TH" | "zh-SG" | "en-AE" | "en-SG")[];
|
|
7
|
+
export declare const ALL_LOCALES: ("de-DE" | "en-AU" | "en-CA" | "en-GB" | "en" | "es-ES" | "es" | "fr-CA" | "fr-FR" | "is-IS" | "it-IT" | "ja-JP" | "pl-PL" | "pseudo" | "pt-BR" | "th-TH" | "zh-SG" | "en-AE" | "en-SG")[];
|
|
8
8
|
export type TmsSupportedLocale = (typeof TMS_SUPPORTED_LOCALES)[number];
|
|
9
9
|
export type AllLocale = TmsSupportedLocale | (typeof UNSUPPORTED_LOCALES)[number];
|
|
10
10
|
export type MapLocalesToTranslations<Locales extends string = TmsSupportedLocale, TranslationType = DeepNestedRecords> = Record<Locales, TranslationType>;
|
package/dist/Formatter.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Formatter.types.js","sourceRoot":"","sources":["../src/Formatter.types.ts"],"names":[],"mappings":";;;AAWa,QAAA,qBAAqB,GAAG;IACnC,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;CACC,CAAC;AAEE,QAAA,mBAAmB,GAAG,CAAC,OAAO,EAAE,OAAO,CAAU,CAAC;AAElD,QAAA,WAAW,GAAG,CAAC,GAAG,6BAAqB,EAAE,GAAG,2BAAmB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Formatter.types.js","sourceRoot":"","sources":["../src/Formatter.types.ts"],"names":[],"mappings":";;;AAWa,QAAA,qBAAqB,GAAG;IACnC,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;CACC,CAAC;AAEE,QAAA,mBAAmB,GAAG,CAAC,OAAO,EAAE,OAAO,CAAU,CAAC;AAElD,QAAA,WAAW,GAAG,CAAC,GAAG,6BAAqB,EAAE,GAAG,2BAAmB,CAAC,CAAC"}
|
package/dist/FormatterUtils.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { FormatterOptions } from "./Formatter.types";
|
|
2
|
+
export declare const sanitizeLocale: (locale: string) => string;
|
|
2
3
|
export declare function validateLocale(locale: string): FormatterOptions["locale"];
|
|
4
|
+
export declare function getINTLCompatibleLocale(locale: string): FormatterOptions["locale"];
|
|
3
5
|
export declare function escapeRegEx(value: string): string;
|
package/dist/FormatterUtils.js
CHANGED
|
@@ -1,18 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.escapeRegEx = exports.validateLocale = void 0;
|
|
3
|
+
exports.escapeRegEx = exports.getINTLCompatibleLocale = exports.validateLocale = exports.sanitizeLocale = void 0;
|
|
4
|
+
const GetOverrideLocale_1 = require("./getOverrideLocale/GetOverrideLocale");
|
|
5
|
+
const sanitizeLocale = (locale) => {
|
|
6
|
+
const newLocale = (0, GetOverrideLocale_1.getOverrideLocale)(locale);
|
|
7
|
+
switch (locale) {
|
|
8
|
+
case "en-CA":
|
|
9
|
+
case "pseudo":
|
|
10
|
+
return "en-US";
|
|
11
|
+
case "en-international":
|
|
12
|
+
return "en-GB";
|
|
13
|
+
case "es":
|
|
14
|
+
return "es-419";
|
|
15
|
+
case "fr-CA":
|
|
16
|
+
return "fr-FR";
|
|
17
|
+
default:
|
|
18
|
+
return newLocale === "en" ? "en-US" : newLocale;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.sanitizeLocale = sanitizeLocale;
|
|
4
22
|
function validateLocale(locale) {
|
|
5
23
|
try {
|
|
6
24
|
new Intl.NumberFormat(locale);
|
|
7
25
|
return locale;
|
|
8
26
|
}
|
|
9
27
|
catch (_a) {
|
|
10
|
-
const
|
|
11
|
-
console.
|
|
12
|
-
throw new Error(
|
|
28
|
+
const warnMessage = `@procore/globalization-toolkit: ${locale} is not supported by Intl.NumberFormat.`;
|
|
29
|
+
console.warn(warnMessage);
|
|
30
|
+
throw new Error(warnMessage);
|
|
13
31
|
}
|
|
14
32
|
}
|
|
15
33
|
exports.validateLocale = validateLocale;
|
|
34
|
+
function getINTLCompatibleLocale(locale) {
|
|
35
|
+
try {
|
|
36
|
+
return validateLocale(locale);
|
|
37
|
+
}
|
|
38
|
+
catch (_a) {
|
|
39
|
+
return (0, exports.sanitizeLocale)(locale);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.getINTLCompatibleLocale = getINTLCompatibleLocale;
|
|
16
43
|
function escapeRegEx(value) {
|
|
17
44
|
return value.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
18
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormatterUtils.js","sourceRoot":"","sources":["../src/FormatterUtils.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"FormatterUtils.js","sourceRoot":"","sources":["../src/FormatterUtils.ts"],"names":[],"mappings":";;;AACA,6EAA0E;AAcnE,MAAM,cAAc,GAAG,CAAC,MAAc,EAAU,EAAE;IACvD,MAAM,SAAS,GAAG,IAAA,qCAAiB,EAAC,MAAM,CAAC,CAAC;IAC5C,QAAQ,MAAM,EAAE;QACd,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ;YACX,OAAO,OAAO,CAAC;QACjB,KAAK,kBAAkB;YACrB,OAAO,OAAO,CAAC;QACjB,KAAK,IAAI;YACP,OAAO,QAAQ,CAAC;QAClB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;KACnD;AACH,CAAC,CAAC;AAfW,QAAA,cAAc,kBAezB;AAEF,SAAgB,cAAc,CAAC,MAAc;IAC3C,IAAI;QACF,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAC9B,OAAO,MAAM,CAAC;KACf;IAAC,WAAM;QACN,MAAM,WAAW,GAAG,mCAAmC,MAAM,yCAAyC,CAAC;QACvG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;KAC9B;AACH,CAAC;AATD,wCASC;AAED,SAAgB,uBAAuB,CACrC,MAAc;IAEd,IAAI;QACF,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;KAC/B;IAAC,WAAM;QACN,OAAO,IAAA,sBAAc,EAAC,MAAM,CAAC,CAAC;KAC/B;AACH,CAAC;AARD,0DAQC;AAED,SAAgB,WAAW,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;AACzD,CAAC;AAFD,kCAEC"}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.transformOptions = exports.getDateTimeFormatter = void 0;
|
|
4
4
|
const FormatterUtils_1 = require("../FormatterUtils");
|
|
5
5
|
function getDateTimeFormatter(dateTimeOptions) {
|
|
6
|
-
(0, FormatterUtils_1.
|
|
6
|
+
const locale = (0, FormatterUtils_1.getINTLCompatibleLocale)(dateTimeOptions.locale);
|
|
7
7
|
const dateTimeFormatOptions = exports.transformOptions(dateTimeOptions);
|
|
8
|
-
return new Intl.DateTimeFormat(
|
|
8
|
+
return new Intl.DateTimeFormat(locale, dateTimeFormatOptions);
|
|
9
9
|
}
|
|
10
10
|
exports.getDateTimeFormatter = getDateTimeFormatter;
|
|
11
11
|
function transformOptions(dateTimeOptions) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeUtils.js","sourceRoot":"","sources":["../../src/dateTimes/DateTimeUtils.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"DateTimeUtils.js","sourceRoot":"","sources":["../../src/dateTimes/DateTimeUtils.ts"],"names":[],"mappings":";;;AAAA,sDAA4D;AAG5D,SAAgB,oBAAoB,CAClC,eAAgC;IAEhC,MAAM,MAAM,GAAG,IAAA,wCAAuB,EAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAE/D,MAAM,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAExE,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;AAChE,CAAC;AARD,oDAQC;AAED,SAAgB,gBAAgB,CAC9B,eAAgC;IAEhC,MAAM,qBAAqB,GAA+B,EAAE,CAAC;IAE7D,qBAAqB,CAAC,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;IAC1D,qBAAqB,CAAC,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC;IAClE,qBAAqB,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;IACtD,qBAAqB,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;IAC5D,qBAAqB,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;IAC5D,qBAAqB,CAAC,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC;IACxD,qBAAqB,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;IAClD,qBAAqB,CAAC,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC;IACpD,qBAAqB,CAAC,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC;IAChD,qBAAqB,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;IAClD,qBAAqB,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;IACtD,qBAAqB,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;IAEtD,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAnBD,4CAmBC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TmsSupportedLocale } from "../Formatter.types";
|
|
2
|
+
export type SupportDocsBaseURL = "https://support.procore.com" | `https://${string}.support.procore.com`;
|
|
3
|
+
export declare function getSupportDocsBaseURL(locale: TmsSupportedLocale): SupportDocsBaseURL;
|
|
4
|
+
export declare function generateSupportDocsURL(url: string, locale: TmsSupportedLocale): string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateSupportDocsURL = exports.getSupportDocsBaseURL = void 0;
|
|
4
|
+
const LOCALE_URL_PREFIX_MAP = new Map([
|
|
5
|
+
["de-DE", "de"],
|
|
6
|
+
["en-AU", "en-au"],
|
|
7
|
+
["en-CA", "en-ca"],
|
|
8
|
+
["en-GB", "en-gb"],
|
|
9
|
+
["es", "es"],
|
|
10
|
+
["es-ES", "es-es"],
|
|
11
|
+
["fr-CA", "fr-ca"],
|
|
12
|
+
["fr-FR", "fr"],
|
|
13
|
+
["ja-JP", "ja-jp"],
|
|
14
|
+
["pt-BR", "pt-br"],
|
|
15
|
+
["zh-SG", "zh-sg"],
|
|
16
|
+
]);
|
|
17
|
+
function getSupportDocsBaseURL(locale) {
|
|
18
|
+
const prefix = LOCALE_URL_PREFIX_MAP.get(locale);
|
|
19
|
+
return prefix
|
|
20
|
+
? `https://${prefix}.support.procore.com`
|
|
21
|
+
: "https://support.procore.com";
|
|
22
|
+
}
|
|
23
|
+
exports.getSupportDocsBaseURL = getSupportDocsBaseURL;
|
|
24
|
+
function generateSupportDocsURL(url, locale) {
|
|
25
|
+
const baseURL = getSupportDocsBaseURL(locale);
|
|
26
|
+
try {
|
|
27
|
+
const parsed = new URL(url);
|
|
28
|
+
return `${baseURL}${parsed.pathname}${parsed.search}`;
|
|
29
|
+
}
|
|
30
|
+
catch (_a) {
|
|
31
|
+
console.error(`Failed to parse URL: ${url}`);
|
|
32
|
+
}
|
|
33
|
+
return url.startsWith("/") ? `${baseURL}${url}` : `${baseURL}/${url}`;
|
|
34
|
+
}
|
|
35
|
+
exports.generateSupportDocsURL = generateSupportDocsURL;
|
|
36
|
+
//# sourceMappingURL=GenerateSupportDocsURL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenerateSupportDocsURL.js","sourceRoot":"","sources":["../../src/generateSupportDocsURL/GenerateSupportDocsURL.ts"],"names":[],"mappings":";;;AAUA,MAAM,qBAAqB,GAAmC,IAAI,GAAG,CAAC;IACpE,CAAC,OAAO,EAAE,IAAI,CAAC;IACf,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,IAAI,EAAE,IAAI,CAAC;IACZ,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,IAAI,CAAC;IACf,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAaH,SAAgB,qBAAqB,CACnC,MAA0B;IAE1B,MAAM,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,MAAM;QACX,CAAC,CAAC,WAAW,MAAM,sBAAsB;QACzC,CAAC,CAAC,6BAA6B,CAAC;AACpC,CAAC;AAPD,sDAOC;AAQD,SAAgB,sBAAsB,CACpC,GAAW,EACX,MAA0B;IAE1B,MAAM,OAAO,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAE9C,IAAI;QACF,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;KACvD;IAAC,WAAM;QAEN,OAAO,CAAC,KAAK,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,GAAG,EAAE,CAAC;AACxE,CAAC;AAfD,wDAeC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { NumberFormatter, formatNumber, formatNumberToParts, parseNumber, getNum
|
|
|
2
2
|
export { CurrencyFormatter, formatCurrency, formatCurrencyToParts, parseCurrency, getCurrencySeparators, getSupportedCurrencies, } from "./numbers/CurrencyFormatter";
|
|
3
3
|
export { DateTimeFormatter, formatDateTime, formatDateTimeToLocalISOString, formatDateTimeToParts, getStartDayOfTheWeek, getDatePartsWithPlaceholders, getDatePlaceholder, formatRelativeTime, } from "./dateTimes/DateTimeFormatter";
|
|
4
4
|
export { getOverrideLocale, OVERWRITE_LOCALE_MAP, } from "./getOverrideLocale/GetOverrideLocale";
|
|
5
|
+
export { type SupportDocsBaseURL, generateSupportDocsURL, getSupportDocsBaseURL, } from "./generateSupportDocsURL/GenerateSupportDocsURL";
|
|
5
6
|
export { getFallbackLocaleList, FALLBACK_LOCALE_MAP, } from "./getFallbackLocaleList/GetFallbackLocaleList";
|
|
6
7
|
export { type Translations, getTranslationsFromLocale, } from "./getTranslationsFromLocale/GetTranslationsFromLocale";
|
|
7
8
|
export type { Percent, NumberOptions, NumberFormatPart, Separators, } from "./numbers/Number.types";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALL_LOCALES = exports.TMS_SUPPORTED_LOCALES = exports.getTranslationsFromLocale = exports.FALLBACK_LOCALE_MAP = exports.getFallbackLocaleList = exports.OVERWRITE_LOCALE_MAP = exports.getOverrideLocale = exports.formatRelativeTime = exports.getDatePlaceholder = exports.getDatePartsWithPlaceholders = exports.getStartDayOfTheWeek = exports.formatDateTimeToParts = exports.formatDateTimeToLocalISOString = exports.formatDateTime = exports.DateTimeFormatter = exports.getSupportedCurrencies = exports.getCurrencySeparators = exports.parseCurrency = exports.formatCurrencyToParts = exports.formatCurrency = exports.CurrencyFormatter = exports.getNumberSeparators = exports.parseNumber = exports.formatNumberToParts = exports.formatNumber = exports.NumberFormatter = void 0;
|
|
3
|
+
exports.ALL_LOCALES = exports.TMS_SUPPORTED_LOCALES = exports.getTranslationsFromLocale = exports.FALLBACK_LOCALE_MAP = exports.getFallbackLocaleList = exports.getSupportDocsBaseURL = exports.generateSupportDocsURL = exports.OVERWRITE_LOCALE_MAP = exports.getOverrideLocale = exports.formatRelativeTime = exports.getDatePlaceholder = exports.getDatePartsWithPlaceholders = exports.getStartDayOfTheWeek = exports.formatDateTimeToParts = exports.formatDateTimeToLocalISOString = exports.formatDateTime = exports.DateTimeFormatter = exports.getSupportedCurrencies = exports.getCurrencySeparators = exports.parseCurrency = exports.formatCurrencyToParts = exports.formatCurrency = exports.CurrencyFormatter = exports.getNumberSeparators = exports.parseNumber = exports.formatNumberToParts = exports.formatNumber = exports.NumberFormatter = void 0;
|
|
4
4
|
var NumberFormatter_1 = require("./numbers/NumberFormatter");
|
|
5
5
|
Object.defineProperty(exports, "NumberFormatter", { enumerable: true, get: function () { return NumberFormatter_1.NumberFormatter; } });
|
|
6
6
|
Object.defineProperty(exports, "formatNumber", { enumerable: true, get: function () { return NumberFormatter_1.formatNumber; } });
|
|
@@ -26,6 +26,9 @@ Object.defineProperty(exports, "formatRelativeTime", { enumerable: true, get: fu
|
|
|
26
26
|
var GetOverrideLocale_1 = require("./getOverrideLocale/GetOverrideLocale");
|
|
27
27
|
Object.defineProperty(exports, "getOverrideLocale", { enumerable: true, get: function () { return GetOverrideLocale_1.getOverrideLocale; } });
|
|
28
28
|
Object.defineProperty(exports, "OVERWRITE_LOCALE_MAP", { enumerable: true, get: function () { return GetOverrideLocale_1.OVERWRITE_LOCALE_MAP; } });
|
|
29
|
+
var GenerateSupportDocsURL_1 = require("./generateSupportDocsURL/GenerateSupportDocsURL");
|
|
30
|
+
Object.defineProperty(exports, "generateSupportDocsURL", { enumerable: true, get: function () { return GenerateSupportDocsURL_1.generateSupportDocsURL; } });
|
|
31
|
+
Object.defineProperty(exports, "getSupportDocsBaseURL", { enumerable: true, get: function () { return GenerateSupportDocsURL_1.getSupportDocsBaseURL; } });
|
|
29
32
|
var GetFallbackLocaleList_1 = require("./getFallbackLocaleList/GetFallbackLocaleList");
|
|
30
33
|
Object.defineProperty(exports, "getFallbackLocaleList", { enumerable: true, get: function () { return GetFallbackLocaleList_1.getFallbackLocaleList; } });
|
|
31
34
|
Object.defineProperty(exports, "FALLBACK_LOCALE_MAP", { enumerable: true, get: function () { return GetFallbackLocaleList_1.FALLBACK_LOCALE_MAP; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6DAMmC;AALjC,kHAAA,eAAe,OAAA;AACf,+GAAA,YAAY,OAAA;AACZ,sHAAA,mBAAmB,OAAA;AACnB,8GAAA,WAAW,OAAA;AACX,sHAAA,mBAAmB,OAAA;AAErB,iEAOqC;AANnC,sHAAA,iBAAiB,OAAA;AACjB,mHAAA,cAAc,OAAA;AACd,0HAAA,qBAAqB,OAAA;AACrB,kHAAA,aAAa,OAAA;AACb,0HAAA,qBAAqB,OAAA;AACrB,2HAAA,sBAAsB,OAAA;AAExB,mEASuC;AARrC,sHAAA,iBAAiB,OAAA;AACjB,mHAAA,cAAc,OAAA;AACd,mIAAA,8BAA8B,OAAA;AAC9B,0HAAA,qBAAqB,OAAA;AACrB,yHAAA,oBAAoB,OAAA;AACpB,iIAAA,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ALzB,wHAAA,qBAAqB,OAAA;AAErB,8GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoreNumberFormatter = void 0;
|
|
4
|
+
const Currency_types_1 = require("../numbers/Currency.types");
|
|
5
|
+
class CoreNumberFormatter extends Intl.NumberFormat {
|
|
6
|
+
constructor(locales, options) {
|
|
7
|
+
super(locales, options);
|
|
8
|
+
this.currencySymbols = new Map([
|
|
9
|
+
["AED", "\u0625\u002E\u062F"],
|
|
10
|
+
]);
|
|
11
|
+
}
|
|
12
|
+
format(value) {
|
|
13
|
+
let formattedValue = super.format(value);
|
|
14
|
+
const currency = this.resolvedOptions().currency;
|
|
15
|
+
const currencyDisplay = this.resolvedOptions().currencyDisplay;
|
|
16
|
+
const symbol = this.currencySymbols.get(currency);
|
|
17
|
+
if (symbol !== undefined && Currency_types_1.CurrencyDisplay.SYMBOL == currencyDisplay) {
|
|
18
|
+
const symbol = this.currencySymbols.get(currency);
|
|
19
|
+
formattedValue = formattedValue
|
|
20
|
+
.replace(/\p{Sc}|\b[A-Z]{3}\b/gu, symbol)
|
|
21
|
+
.trim();
|
|
22
|
+
}
|
|
23
|
+
return formattedValue;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.CoreNumberFormatter = CoreNumberFormatter;
|
|
27
|
+
//# sourceMappingURL=CoreNumberFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoreNumberFormatter.js","sourceRoot":"","sources":["../../src/lib/CoreNumberFormatter.ts"],"names":[],"mappings":";;;AAAA,8DAA4D;AAG5D,MAAa,mBAAoB,SAAQ,IAAI,CAAC,YAAY;IACxD,YAAY,OAA2B,EAAE,OAAkC;QACzE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAI1B,oBAAe,GAAG,IAAI,GAAG,CAAiB;YACxC,CAAC,KAAK,EAAE,oBAAoB,CAAC;SAC9B,CAAC,CAAC;IALH,CAAC;IAQD,MAAM,CAAC,KAAa;QAElB,IAAI,cAAc,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAGzC,MAAM,QAAQ,GAAW,IAAI,CAAC,eAAe,EAAE,CAAC,QAAS,CAAC;QAC1D,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC,eAAgB,CAAC;QAChE,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAElD,IAAI,MAAM,KAAK,SAAS,IAAI,gCAAe,CAAC,MAAM,IAAI,eAAe,EAAE;YAErE,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC;YACnD,cAAc,GAAG,cAAc;iBAC5B,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC;iBACxC,IAAI,EAAE,CAAC;SACX;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF;AA9BD,kDA8BC"}
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.supportedCurrencies = exports.validateCurrencyOptions = exports.validateOptions = exports.transformCurrencyOptions = exports.transformOptions = exports.getCurrencyFormatter = void 0;
|
|
4
4
|
const FormatterUtils_1 = require("../FormatterUtils");
|
|
5
|
+
const CoreNumberFormatter_1 = require("../lib/CoreNumberFormatter");
|
|
5
6
|
const SupportedCurrencies_1 = require("./SupportedCurrencies");
|
|
6
7
|
const NumberUtils_1 = require("./NumberUtils");
|
|
7
8
|
function getCurrencyFormatter(options) {
|
|
8
|
-
exports.validateOptions(options);
|
|
9
|
-
const intlOptions = exports.transformOptions(
|
|
10
|
-
return new
|
|
9
|
+
const newOptions = exports.validateOptions(options);
|
|
10
|
+
const intlOptions = exports.transformOptions(newOptions);
|
|
11
|
+
return new CoreNumberFormatter_1.CoreNumberFormatter(newOptions.locale, intlOptions);
|
|
11
12
|
}
|
|
12
13
|
exports.getCurrencyFormatter = getCurrencyFormatter;
|
|
13
14
|
function transformOptions(options) {
|
|
@@ -24,10 +25,10 @@ function transformCurrencyOptions(options) {
|
|
|
24
25
|
}
|
|
25
26
|
exports.transformCurrencyOptions = transformCurrencyOptions;
|
|
26
27
|
function validateOptions(options) {
|
|
27
|
-
(0, FormatterUtils_1.
|
|
28
|
-
(0, NumberUtils_1.validateNumberOptionsBasic)(
|
|
29
|
-
exports.validateCurrencyOptions(
|
|
30
|
-
return
|
|
28
|
+
const updatedOptions = Object.assign(Object.assign({}, options), { locale: (0, FormatterUtils_1.getINTLCompatibleLocale)(options.locale) });
|
|
29
|
+
(0, NumberUtils_1.validateNumberOptionsBasic)(updatedOptions);
|
|
30
|
+
exports.validateCurrencyOptions(updatedOptions);
|
|
31
|
+
return updatedOptions;
|
|
31
32
|
}
|
|
32
33
|
exports.validateOptions = validateOptions;
|
|
33
34
|
function validateCurrencyOptions(currencyOptions) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyUtils.js","sourceRoot":"","sources":["../../src/numbers/CurrencyUtils.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"CurrencyUtils.js","sourceRoot":"","sources":["../../src/numbers/CurrencyUtils.ts"],"names":[],"mappings":";;;AAAA,sDAA4D;AAC5D,oEAAiE;AAEjE,+DAG+B;AAC/B,+CAGuB;AAEvB,SAAgB,oBAAoB,CAClC,OAAwB;IAExB,MAAM,UAAU,GAAoB,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACrE,MAAM,WAAW,GACf,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC,OAAO,IAAI,yCAAmB,CAAC,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AACjE,CAAC;AAPD,oDAOC;AAED,SAAgB,gBAAgB,CAC9B,OAAwB;IA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