@procore/core-react 12.22.0 → 12.24.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 +28 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.d.ts +8 -8
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/BadgePill/BadgePill.d.ts +3 -0
- package/dist/BadgePill/BadgePill.js +25 -0
- package/dist/BadgePill/BadgePill.js.map +1 -0
- package/dist/BadgePill/BadgePill.styles.d.ts +12 -0
- package/dist/BadgePill/BadgePill.styles.js +33 -0
- package/dist/BadgePill/BadgePill.styles.js.map +1 -0
- package/dist/BadgePill/BadgePill.types.d.ts +50 -0
- package/dist/BadgePill/BadgePill.types.js +2 -0
- package/dist/BadgePill/BadgePill.types.js.map +1 -0
- package/dist/BadgePill/index.d.ts +2 -0
- package/dist/BadgePill/index.js +2 -0
- package/dist/BadgePill/index.js.map +1 -0
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.js +2 -0
- package/dist/ContactItem/ContactItem.js.map +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.styles.d.ts +2 -2
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/Loader/Loader.types.d.ts +3 -2
- package/dist/Loader/Loader.types.js.map +1 -1
- package/dist/Menu/Menu.js +2 -0
- package/dist/Menu/Menu.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.js +2 -0
- package/dist/NumberInput/NumberInput.js.map +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.js +6 -2
- package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.types.d.ts +7 -2
- package/dist/OverlayTrigger/OverlayTrigger.types.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.js +6 -4
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/ProgressBar/ProgressBar.types.d.ts +1 -1
- package/dist/ProgressBar/ProgressBar.types.js.map +1 -1
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.js +14 -5
- package/dist/Spinner/Spinner.js.map +1 -1
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.js +1 -1
- package/dist/SuperSelect/SuperSelect.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +6 -6
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/ClickOutside.js +19 -5
- package/dist/_hooks/ClickOutside.js.map +1 -1
- package/dist/_hooks/I18n.d.ts +92 -9
- package/dist/_hooks/I18n.js +63 -28
- package/dist/_hooks/I18n.js.map +1 -1
- package/dist/_locales/de-DE.json +4 -1
- package/dist/_locales/en-AU.json +3 -0
- package/dist/_locales/en-CA.json +3 -0
- package/dist/_locales/en-GB.json +3 -0
- package/dist/_locales/en.json +3 -0
- package/dist/_locales/es-ES.json +4 -1
- package/dist/_locales/es.json +3 -0
- package/dist/_locales/fr-CA.json +6 -3
- package/dist/_locales/fr-FR.json +4 -1
- package/dist/_locales/is-IS.json +3 -0
- package/dist/_locales/it-IT.json +3 -0
- package/dist/_locales/ja-JP.json +3 -0
- package/dist/_locales/pl-PL.json +3 -0
- package/dist/_locales/pseudo.json +3 -0
- package/dist/_locales/pt-BR.json +3 -0
- package/dist/_locales/th-TH.json +3 -0
- package/dist/_locales/zh-SG.json +3 -0
- package/dist/_locales/zh-TW.json +375 -0
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +13 -13
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +30 -30
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +741 -741
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +4 -4
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +46 -46
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +41 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +29 -29
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +28 -28
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +16 -6
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +60 -60
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +12 -12
- package/dist/_typedoc/Switch/Switch.types.json +3 -3
- package/dist/_typedoc/Table/Table.types.json +101 -101
- package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +30 -30
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +4 -4
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/package.json +82 -81
package/dist/_hooks/I18n.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { I18njs, I18njsConfig } from '@procore/core-i18n-js';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { type PropsWithChildren } from 'react';
|
|
3
3
|
declare type I18nConfig = Omit<I18njsConfig, 'I18n'>;
|
|
4
|
+
declare type I18nWithCDNFlag = I18njs & {
|
|
5
|
+
enableCDN?: boolean;
|
|
6
|
+
};
|
|
4
7
|
/**
|
|
5
8
|
* @deprecated this type will no longer be supported from core-i18n-js,
|
|
6
9
|
* to have a type safe Locale use TmsSupportedLocale or AllLocales from [Globalization toolkit](https://github.com/procore/globalization-toolkit)
|
|
@@ -351,6 +354,9 @@ export declare const coreTranslations: {
|
|
|
351
354
|
searchPlaceholder: string;
|
|
352
355
|
spinnerLabel: string;
|
|
353
356
|
};
|
|
357
|
+
spinner: {
|
|
358
|
+
loading: string;
|
|
359
|
+
};
|
|
354
360
|
token: {
|
|
355
361
|
remove: string;
|
|
356
362
|
};
|
|
@@ -723,6 +729,9 @@ export declare const coreTranslations: {
|
|
|
723
729
|
searchPlaceholder: string;
|
|
724
730
|
spinnerLabel: string;
|
|
725
731
|
};
|
|
732
|
+
spinner: {
|
|
733
|
+
loading: string;
|
|
734
|
+
};
|
|
726
735
|
token: {
|
|
727
736
|
remove: string;
|
|
728
737
|
};
|
|
@@ -1095,6 +1104,9 @@ export declare const coreTranslations: {
|
|
|
1095
1104
|
searchPlaceholder: string;
|
|
1096
1105
|
spinnerLabel: string;
|
|
1097
1106
|
};
|
|
1107
|
+
spinner: {
|
|
1108
|
+
loading: string;
|
|
1109
|
+
};
|
|
1098
1110
|
token: {
|
|
1099
1111
|
remove: string;
|
|
1100
1112
|
};
|
|
@@ -1467,6 +1479,9 @@ export declare const coreTranslations: {
|
|
|
1467
1479
|
searchPlaceholder: string;
|
|
1468
1480
|
spinnerLabel: string;
|
|
1469
1481
|
};
|
|
1482
|
+
spinner: {
|
|
1483
|
+
loading: string;
|
|
1484
|
+
};
|
|
1470
1485
|
token: {
|
|
1471
1486
|
remove: string;
|
|
1472
1487
|
};
|
|
@@ -1839,6 +1854,9 @@ export declare const coreTranslations: {
|
|
|
1839
1854
|
searchPlaceholder: string;
|
|
1840
1855
|
spinnerLabel: string;
|
|
1841
1856
|
};
|
|
1857
|
+
spinner: {
|
|
1858
|
+
loading: string;
|
|
1859
|
+
};
|
|
1842
1860
|
token: {
|
|
1843
1861
|
remove: string;
|
|
1844
1862
|
};
|
|
@@ -2211,6 +2229,9 @@ export declare const coreTranslations: {
|
|
|
2211
2229
|
searchPlaceholder: string;
|
|
2212
2230
|
spinnerLabel: string;
|
|
2213
2231
|
};
|
|
2232
|
+
spinner: {
|
|
2233
|
+
loading: string;
|
|
2234
|
+
};
|
|
2214
2235
|
token: {
|
|
2215
2236
|
remove: string;
|
|
2216
2237
|
};
|
|
@@ -2272,6 +2293,11 @@ export declare const coreTranslations: {
|
|
|
2272
2293
|
emailSendErrorTitle: string;
|
|
2273
2294
|
emailBodyRequiredError: string;
|
|
2274
2295
|
emailContentValidationError: string;
|
|
2296
|
+
/**
|
|
2297
|
+
* @deprecated this type will no longer be supported from core-i18n-js,
|
|
2298
|
+
* to have a type safe Locale use TmsSupportedLocale or AllLocales from [Globalization toolkit](https://github.com/procore/globalization-toolkit)
|
|
2299
|
+
* @deprecatedSince 12.10.0
|
|
2300
|
+
*/
|
|
2275
2301
|
emailContentDisclaimer: string;
|
|
2276
2302
|
recipientSelectPlaceholder: string;
|
|
2277
2303
|
emailRecipientRequiredError: string;
|
|
@@ -2583,6 +2609,9 @@ export declare const coreTranslations: {
|
|
|
2583
2609
|
searchPlaceholder: string;
|
|
2584
2610
|
spinnerLabel: string;
|
|
2585
2611
|
};
|
|
2612
|
+
spinner: {
|
|
2613
|
+
loading: string;
|
|
2614
|
+
};
|
|
2586
2615
|
token: {
|
|
2587
2616
|
remove: string;
|
|
2588
2617
|
};
|
|
@@ -2955,6 +2984,9 @@ export declare const coreTranslations: {
|
|
|
2955
2984
|
searchPlaceholder: string;
|
|
2956
2985
|
spinnerLabel: string;
|
|
2957
2986
|
};
|
|
2987
|
+
spinner: {
|
|
2988
|
+
loading: string;
|
|
2989
|
+
};
|
|
2958
2990
|
token: {
|
|
2959
2991
|
remove: string;
|
|
2960
2992
|
};
|
|
@@ -3327,6 +3359,9 @@ export declare const coreTranslations: {
|
|
|
3327
3359
|
searchPlaceholder: string;
|
|
3328
3360
|
spinnerLabel: string;
|
|
3329
3361
|
};
|
|
3362
|
+
spinner: {
|
|
3363
|
+
loading: string;
|
|
3364
|
+
};
|
|
3330
3365
|
token: {
|
|
3331
3366
|
remove: string;
|
|
3332
3367
|
};
|
|
@@ -3699,6 +3734,9 @@ export declare const coreTranslations: {
|
|
|
3699
3734
|
searchPlaceholder: string;
|
|
3700
3735
|
spinnerLabel: string;
|
|
3701
3736
|
};
|
|
3737
|
+
spinner: {
|
|
3738
|
+
loading: string;
|
|
3739
|
+
};
|
|
3702
3740
|
token: {
|
|
3703
3741
|
remove: string;
|
|
3704
3742
|
};
|
|
@@ -4071,6 +4109,9 @@ export declare const coreTranslations: {
|
|
|
4071
4109
|
searchPlaceholder: string;
|
|
4072
4110
|
spinnerLabel: string;
|
|
4073
4111
|
};
|
|
4112
|
+
spinner: {
|
|
4113
|
+
loading: string;
|
|
4114
|
+
};
|
|
4074
4115
|
token: {
|
|
4075
4116
|
remove: string;
|
|
4076
4117
|
};
|
|
@@ -4443,6 +4484,9 @@ export declare const coreTranslations: {
|
|
|
4443
4484
|
searchPlaceholder: string;
|
|
4444
4485
|
spinnerLabel: string;
|
|
4445
4486
|
};
|
|
4487
|
+
spinner: {
|
|
4488
|
+
loading: string;
|
|
4489
|
+
};
|
|
4446
4490
|
token: {
|
|
4447
4491
|
remove: string;
|
|
4448
4492
|
};
|
|
@@ -4815,6 +4859,9 @@ export declare const coreTranslations: {
|
|
|
4815
4859
|
searchPlaceholder: string;
|
|
4816
4860
|
spinnerLabel: string;
|
|
4817
4861
|
};
|
|
4862
|
+
spinner: {
|
|
4863
|
+
loading: string;
|
|
4864
|
+
};
|
|
4818
4865
|
token: {
|
|
4819
4866
|
remove: string;
|
|
4820
4867
|
};
|
|
@@ -4950,6 +4997,15 @@ export declare const coreTranslations: {
|
|
|
4950
4997
|
toast: {
|
|
4951
4998
|
itemAdded: string;
|
|
4952
4999
|
itemAdditionFailed: string;
|
|
5000
|
+
/**
|
|
5001
|
+
* Provider to wrap the application with the I18n context.
|
|
5002
|
+
* @param {PropsWithChildren<UseI18n>} props - The I18n configuration.
|
|
5003
|
+
* @param {React.ReactNode} props.children - The children to render.
|
|
5004
|
+
* @param {UseI18n} props.locale - The locale to use.
|
|
5005
|
+
* @param {Record<string, string>} props.translations - The translations to use.
|
|
5006
|
+
* @param {boolean} props.enableCDN - Whether to pull core-react translations from the CDN or not, by default it follows the value passed down through the parent I18nProvider.
|
|
5007
|
+
* @returns {React.ReactNode} The I18n context instance.
|
|
5008
|
+
*/
|
|
4953
5009
|
itemRemoved: string;
|
|
4954
5010
|
requestError: string;
|
|
4955
5011
|
};
|
|
@@ -5187,6 +5243,9 @@ export declare const coreTranslations: {
|
|
|
5187
5243
|
searchPlaceholder: string;
|
|
5188
5244
|
spinnerLabel: string;
|
|
5189
5245
|
};
|
|
5246
|
+
spinner: {
|
|
5247
|
+
loading: string;
|
|
5248
|
+
};
|
|
5190
5249
|
token: {
|
|
5191
5250
|
remove: string;
|
|
5192
5251
|
};
|
|
@@ -5559,6 +5618,9 @@ export declare const coreTranslations: {
|
|
|
5559
5618
|
searchPlaceholder: string;
|
|
5560
5619
|
spinnerLabel: string;
|
|
5561
5620
|
};
|
|
5621
|
+
spinner: {
|
|
5622
|
+
loading: string;
|
|
5623
|
+
};
|
|
5562
5624
|
token: {
|
|
5563
5625
|
remove: string;
|
|
5564
5626
|
};
|
|
@@ -5931,6 +5993,9 @@ export declare const coreTranslations: {
|
|
|
5931
5993
|
searchPlaceholder: string;
|
|
5932
5994
|
spinnerLabel: string;
|
|
5933
5995
|
};
|
|
5996
|
+
spinner: {
|
|
5997
|
+
loading: string;
|
|
5998
|
+
};
|
|
5934
5999
|
token: {
|
|
5935
6000
|
remove: string;
|
|
5936
6001
|
};
|
|
@@ -5961,11 +6026,29 @@ export declare const coreTranslations: {
|
|
|
5961
6026
|
};
|
|
5962
6027
|
};
|
|
5963
6028
|
};
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
6029
|
+
declare type UseI18n = I18nConfig & {
|
|
6030
|
+
enableCDN?: boolean;
|
|
6031
|
+
};
|
|
6032
|
+
/**
|
|
6033
|
+
* Hook to create I18n object.
|
|
6034
|
+
* @param {UseI18n} props - The I18n configuration.
|
|
6035
|
+
* @param {string} props.locale - The locale to use.
|
|
6036
|
+
* @param {Record<string, string>} props.translations - The translations to use.
|
|
6037
|
+
* @param {boolean} props.enableCDN - Whether to pull core-react translations from the CDN or not, by default it follows the value passed down through the parent I18nProvider.
|
|
6038
|
+
* @returns {I18nWithCDNFlag} The I18n object.
|
|
6039
|
+
*/
|
|
6040
|
+
export declare function useI18n({ locale, translations: _translations, enableCDN, }: UseI18n): I18nWithCDNFlag;
|
|
6041
|
+
export declare const I18nContext: React.Context<I18nWithCDNFlag>;
|
|
6042
|
+
/**
|
|
6043
|
+
* Provider to wrap the application with the I18n context.
|
|
6044
|
+
* @param {PropsWithChildren<UseI18n>} props - The I18n configuration.
|
|
6045
|
+
* @param {React.ReactNode} props.children - The children to render.
|
|
6046
|
+
* @param {UseI18n} props.locale - The locale to use.
|
|
6047
|
+
* @param {Record<string, string>} props.translations - The translations to use.
|
|
6048
|
+
* @param {boolean} props.enableCDN - Whether to pull core-react translations from the CDN or not, by default it follows the value passed down through the parent I18nProvider.
|
|
6049
|
+
* @returns {React.ReactNode} The I18n context instance.
|
|
6050
|
+
*/
|
|
6051
|
+
export declare function I18nProvider({ children, ...props }: PropsWithChildren<UseI18n>): React.JSX.Element;
|
|
5969
6052
|
declare type DeepStringRecord = {
|
|
5970
6053
|
[key: string]: string | DeepStringRecord;
|
|
5971
6054
|
};
|
|
@@ -6008,10 +6091,10 @@ declare type PluralizationParams<T extends PluralizationForm> = {
|
|
|
6008
6091
|
};
|
|
6009
6092
|
declare type InterpolationOrPluralizationParams<T> = T extends PluralizationForm ? [PluralizationParams<T>] : T extends string ? InterpolationParams<T> extends never ? [ExplicitTranslateOptions?] : [InterpolationParams<T>] : [ExplicitTranslateOptions?];
|
|
6010
6093
|
declare type TypedTranslate<Translations> = <P extends DotNestedKeys<Translations>>(path: P, ...args: InterpolationOrPluralizationParams<StringLiteralPathValue<Translations, P>>) => StringLiteralPathValue<Translations, P>;
|
|
6011
|
-
declare type I18njsWithTypedTranslate<Translations> = Omit<
|
|
6094
|
+
declare type I18njsWithTypedTranslate<Translations> = Omit<I18nWithCDNFlag, 't' | 'translate'> & {
|
|
6012
6095
|
t: TypedTranslate<Translations>;
|
|
6013
6096
|
translate: TypedTranslate<Translations>;
|
|
6014
6097
|
};
|
|
6015
|
-
export declare function useI18nContext<Translations extends DeepStringRecord | undefined = undefined>(): Translations extends undefined ?
|
|
6016
|
-
export declare function useI18nContext():
|
|
6098
|
+
export declare function useI18nContext<Translations extends DeepStringRecord | undefined = undefined>(): Translations extends undefined ? I18nWithCDNFlag : I18njsWithTypedTranslate<NonNullable<Translations>>;
|
|
6099
|
+
export declare function useI18nContext(): I18nWithCDNFlag;
|
|
6017
6100
|
export {};
|
package/dist/_hooks/I18n.js
CHANGED
|
@@ -13,6 +13,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
13
13
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
+
import { getFallbackList, isCDNFeatureFlagEnabled, useRequestTranslations } from '@procore/cdn-translations';
|
|
16
17
|
import { createI18njs } from '@procore/core-i18n-js';
|
|
17
18
|
import * as R from 'ramda';
|
|
18
19
|
import React from 'react';
|
|
@@ -40,7 +41,7 @@ import { OVERWRITE_LOCALE_MAP } from './getI18nProviderLocale';
|
|
|
40
41
|
* @deprecatedSince 12.10.0
|
|
41
42
|
*/
|
|
42
43
|
|
|
43
|
-
/* Set up
|
|
44
|
+
/* Set up core translations */
|
|
44
45
|
export var coreTranslations = {
|
|
45
46
|
'de-DE': deDE,
|
|
46
47
|
en: en,
|
|
@@ -59,11 +60,6 @@ export var coreTranslations = {
|
|
|
59
60
|
'zh-SG': zhSG,
|
|
60
61
|
'pl-PL': plPL
|
|
61
62
|
};
|
|
62
|
-
function getValidLocale(_ref) {
|
|
63
|
-
var locale = _ref.locale,
|
|
64
|
-
translations = _ref.translations;
|
|
65
|
-
return locale;
|
|
66
|
-
}
|
|
67
63
|
var FALLBACK_LOCALE_MAP = _objectSpread({
|
|
68
64
|
'es-ES': 'es',
|
|
69
65
|
'fr-FR': 'fr-CA'
|
|
@@ -74,38 +70,77 @@ function getTranslationFallbacks(locale) {
|
|
|
74
70
|
}
|
|
75
71
|
return ['en'];
|
|
76
72
|
}
|
|
77
|
-
function setTranslationFallbacks(I18n) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
73
|
+
function setTranslationFallbacks(I18n, isCDNEnabled) {
|
|
74
|
+
if (isCDNEnabled === true) {
|
|
75
|
+
I18n.locales[I18n.locale] = function () {
|
|
76
|
+
return getFallbackList(I18n.locale);
|
|
77
|
+
};
|
|
78
|
+
} else {
|
|
79
|
+
I18n.locales[I18n.locale] = function () {
|
|
80
|
+
var fallbacks = getTranslationFallbacks(I18n.locale).filter(function (locale) {
|
|
81
|
+
return locale !== I18n.locale;
|
|
82
|
+
});
|
|
83
|
+
return [I18n.locale].concat(_toConsumableArray(fallbacks));
|
|
84
|
+
};
|
|
85
|
+
}
|
|
84
86
|
return I18n;
|
|
85
87
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Hook to create I18n object.
|
|
90
|
+
* @param {UseI18n} props - The I18n configuration.
|
|
91
|
+
* @param {string} props.locale - The locale to use.
|
|
92
|
+
* @param {Record<string, string>} props.translations - The translations to use.
|
|
93
|
+
* @param {boolean} props.enableCDN - Whether to pull core-react translations from the CDN or not, by default it follows the value passed down through the parent I18nProvider.
|
|
94
|
+
* @returns {I18nWithCDNFlag} The I18n object.
|
|
95
|
+
*/
|
|
96
|
+
export function useI18n(_ref) {
|
|
97
|
+
var locale = _ref.locale,
|
|
98
|
+
_ref$translations = _ref.translations,
|
|
99
|
+
_translations = _ref$translations === void 0 ? {} : _ref$translations,
|
|
100
|
+
enableCDN = _ref.enableCDN;
|
|
101
|
+
var i18nContext = React.useContext(I18nContext);
|
|
102
|
+
var isCDNEnabled = isCDNFeatureFlagEnabled(i18nContext, enableCDN);
|
|
103
|
+
var coreCDNTranslations = useRequestTranslations({
|
|
104
|
+
locale: locale !== null && locale !== void 0 ? locale : 'en',
|
|
105
|
+
type: 'file',
|
|
106
|
+
absolute_file_path: function absolute_file_path(locale) {
|
|
107
|
+
return "core/packages/core-react/src/_locales/".concat(locale, ".json");
|
|
108
|
+
}
|
|
109
|
+
}, {
|
|
110
|
+
en: en,
|
|
111
|
+
pseudo: pseudo
|
|
112
|
+
}, {
|
|
113
|
+
oldTranslations: coreTranslations,
|
|
114
|
+
enableCDN: isCDNEnabled
|
|
94
115
|
});
|
|
116
|
+
var translations = R.mergeDeepLeft(_translations, coreCDNTranslations.translations);
|
|
95
117
|
var I18n = createI18njs({
|
|
96
118
|
locale: locale,
|
|
97
119
|
translations: translations
|
|
98
120
|
});
|
|
99
|
-
|
|
121
|
+
var I18nWithFallbacks = setTranslationFallbacks(I18n, isCDNEnabled);
|
|
122
|
+
I18nWithFallbacks.enableCDN = isCDNEnabled;
|
|
123
|
+
return I18nWithFallbacks;
|
|
100
124
|
}
|
|
101
125
|
export var I18nContext = /*#__PURE__*/React.createContext(createI18njs({
|
|
102
126
|
locale: 'en',
|
|
103
|
-
translations:
|
|
127
|
+
translations: {
|
|
128
|
+
en: coreTranslations.en
|
|
129
|
+
}
|
|
104
130
|
}));
|
|
105
131
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Provider to wrap the application with the I18n context.
|
|
134
|
+
* @param {PropsWithChildren<UseI18n>} props - The I18n configuration.
|
|
135
|
+
* @param {React.ReactNode} props.children - The children to render.
|
|
136
|
+
* @param {UseI18n} props.locale - The locale to use.
|
|
137
|
+
* @param {Record<string, string>} props.translations - The translations to use.
|
|
138
|
+
* @param {boolean} props.enableCDN - Whether to pull core-react translations from the CDN or not, by default it follows the value passed down through the parent I18nProvider.
|
|
139
|
+
* @returns {React.ReactNode} The I18n context instance.
|
|
140
|
+
*/
|
|
141
|
+
export function I18nProvider(_ref2) {
|
|
142
|
+
var children = _ref2.children,
|
|
143
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
109
144
|
return /*#__PURE__*/React.createElement(I18nContext.Provider, {
|
|
110
145
|
value: useI18n(props)
|
|
111
146
|
}, children);
|
|
@@ -131,9 +166,9 @@ export function I18nProvider(_ref3) {
|
|
|
131
166
|
* @template Translations - An optional generic to provide type safety for translations.
|
|
132
167
|
* If specified, it enables typed access to the `t` and `translate` methods of the I18n instance.
|
|
133
168
|
* These methods will have type safe access to both the tranlsation scope as well as the interpolation variables.
|
|
134
|
-
* If not specified, the default
|
|
169
|
+
* If not specified, the default I18nWithCDN instance is returned.
|
|
135
170
|
*
|
|
136
|
-
* @returns {
|
|
171
|
+
* @returns {I18nWithCDNFlag | I18njsWithTypedTranslate<Translations>} The I18n context instance,
|
|
137
172
|
* either with or without typed translations based on the provided generic.
|
|
138
173
|
*/
|
|
139
174
|
export function useI18nContext() {
|
package/dist/_hooks/I18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I18n.js","names":["createI18njs","R","React","deDE","enAU","enCA","enGB","en","esES","es","frCA","frFR","isIS","jaJP","plPL","pseudo","ptBR","thTH","zhSG","OVERWRITE_LOCALE_MAP","coreTranslations","getValidLocale","_ref","locale","translations","FALLBACK_LOCALE_MAP","_objectSpread","getTranslationFallbacks","setTranslationFallbacks","I18n","locales","fallbacks","filter","concat","_toConsumableArray","useI18n","_ref2","_locale","_ref2$translations","_translations","mergeDeepLeft","I18nContext","createContext","I18nProvider","_ref3","children","props","_objectWithoutProperties","_excluded","createElement","Provider","value","useI18nContext","ctx","useContext"],"sources":["../../src/_hooks/I18n.tsx"],"sourcesContent":["import type { I18njs, I18njsConfig } from '@procore/core-i18n-js'\nimport { createI18njs } from '@procore/core-i18n-js'\nimport * as R from 'ramda'\nimport React from 'react'\nimport deDE from '../_locales/de-DE.json'\nimport enAU from '../_locales/en-AU.json'\nimport enCA from '../_locales/en-CA.json'\nimport enGB from '../_locales/en-GB.json'\nimport en from '../_locales/en.json'\nimport esES from '../_locales/es-ES.json'\nimport es from '../_locales/es.json'\nimport frCA from '../_locales/fr-CA.json'\nimport frFR from '../_locales/fr-FR.json'\nimport isIS from '../_locales/is-IS.json'\nimport jaJP from '../_locales/ja-JP.json'\nimport plPL from '../_locales/pl-PL.json'\nimport pseudo from '../_locales/pseudo.json'\nimport ptBR from '../_locales/pt-BR.json'\nimport thTH from '../_locales/th-TH.json'\nimport zhSG from '../_locales/zh-SG.json'\nimport { OVERWRITE_LOCALE_MAP } from './getI18nProviderLocale'\n\ntype I18nConfig = Omit<I18njsConfig, 'I18n'>\n\n/**\n * @deprecated this type will no longer be supported from core-i18n-js,\n * to have a type safe Locale use TmsSupportedLocale or AllLocales from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\n */\nexport type Locale =\n | 'de-DE'\n | 'en-AE'\n | 'en-AU'\n | 'en-CA'\n | 'en-GB'\n | 'en-SG'\n | 'en'\n | 'es-ES'\n | 'es'\n | 'fr-CA'\n | 'fr-FR'\n | 'is-IS'\n | 'ja-JP'\n | 'pt-BR'\n | 'th-TH'\n | 'zh-SG'\n | 'pseudo'\n | 'pl-PL'\n\n/* Set up i18n-js */\nexport const coreTranslations = {\n 'de-DE': deDE,\n en,\n 'en-AU': enAU,\n 'en-CA': enCA,\n 'en-GB': enGB,\n es,\n 'es-ES': esES,\n 'fr-CA': frCA,\n 'fr-FR': frFR,\n 'is-IS': isIS,\n 'ja-JP': jaJP,\n pseudo,\n 'pt-BR': ptBR,\n 'th-TH': thTH,\n 'zh-SG': zhSG,\n 'pl-PL': plPL,\n} as const\n\nfunction getValidLocale({ locale, translations }: I18njsConfig) {\n return locale\n}\n\nconst FALLBACK_LOCALE_MAP: Record<string, Locale> = {\n 'es-ES': 'es',\n 'fr-FR': 'fr-CA',\n ...OVERWRITE_LOCALE_MAP,\n}\n\nfunction getTranslationFallbacks(locale: string): Locale[] {\n if (FALLBACK_LOCALE_MAP[locale]) {\n return [FALLBACK_LOCALE_MAP[locale], 'en']\n }\n\n return ['en']\n}\n\nfunction setTranslationFallbacks(I18n: I18njs) {\n I18n.locales[I18n.locale] = function () {\n const fallbacks = getTranslationFallbacks(I18n.locale).filter(\n (locale) => locale !== I18n.locale\n )\n return [I18n.locale, ...fallbacks]\n }\n\n return I18n\n}\n\nexport function useI18n({\n locale: _locale,\n translations: _translations = {},\n}: I18njsConfig): I18njs {\n const translations = R.mergeDeepLeft(_translations, coreTranslations)\n const locale = getValidLocale({ locale: _locale, translations })\n const I18n = createI18njs({\n locale,\n translations,\n })\n return setTranslationFallbacks(I18n)\n}\n\nexport const I18nContext: React.Context<I18njs> = React.createContext(\n createI18njs({\n locale: 'en',\n translations: coreTranslations, // inject our translations\n })\n)\n\nexport function I18nProvider({\n children,\n ...props\n}: I18nConfig & { children: React.ReactNode }) {\n return (\n <I18nContext.Provider value={useI18n(props)}>\n {children}\n </I18nContext.Provider>\n )\n}\n\n// Base type of user provider translations type\ntype DeepStringRecord = {\n [key: string]: string | DeepStringRecord\n}\n\ntype PluralizationForm = {\n zero?: string\n one: string\n other: string\n}\n\n// Type to get nested key paths with dot notation\ntype DotPrefix<T extends string> = T extends '' ? '' : `.${T}`\ntype DotNestedKeys<T> = (\n T extends string\n ? ''\n : T extends DeepStringRecord\n ? {\n [K in keyof T]: K extends string\n ? T[K] extends PluralizationForm\n ? `${K}`\n : T[K] extends DeepStringRecord\n ? `${K}${DotPrefix<DotNestedKeys<T[K]>>}`\n : `${K}`\n : never\n }[keyof T]\n : ''\n) extends infer D\n ? Extract<D, string>\n : never\n\n// Type to get the literal string type from a path\ntype StringLiteralPathValue<\n T,\n P extends string\n> = P extends `${infer K}.${infer Rest}`\n ? K extends keyof T\n ? T[K] extends PluralizationForm\n ? T[K]\n : T[K] extends DeepStringRecord\n ? StringLiteralPathValue<T[K], Rest>\n : never\n : never\n : P extends keyof T\n ? T[P] extends PluralizationForm\n ? T[P]\n : T[P] extends string\n ? T[P]\n : never\n : never\n\n// Check if a string has any interpolation variables\ntype HasInterpolation<T extends string> =\n T extends `${string}%{${string}}${string}` ? true : false\n\n// Extract interpolation variables from a string\ntype ExtractInterpolationVars<T extends string> =\n T extends `${infer _Before}%{${infer Param}}${infer After}`\n ? Param | ExtractInterpolationVars<After>\n : never\n\n// always allowed values in the interpolation object (remove [key: string]: any in favor of our strong types)\ntype ExplicitTranslateOptions = {\n [K in keyof I18n.TranslateOptions as string extends K\n ? never\n : K]: I18n.TranslateOptions[K]\n}\n\ntype InterpolationParams<T extends string> = HasInterpolation<T> extends true\n ? {\n [K in ExtractInterpolationVars<T>]: string\n } & {\n [K in keyof ExplicitTranslateOptions]?: ExplicitTranslateOptions[K]\n }\n : never\n\ntype PluralizationParams<T extends PluralizationForm> = {\n count: number\n} & (\n | (T['zero'] extends string\n ? { count: 0 } & { [K in ExtractInterpolationVars<T['zero']>]: string }\n : {})\n | (T['one'] extends string\n ? { count: 1 } & { [K in ExtractInterpolationVars<T['one']>]: string }\n : {})\n | (T['other'] extends string\n ? { count: number } & {\n [K in ExtractInterpolationVars<T['other']>]: string\n }\n : {})\n) & {\n [K in keyof ExplicitTranslateOptions]?: ExplicitTranslateOptions[K]\n }\n\ntype InterpolationOrPluralizationParams<T> = T extends PluralizationForm\n ? [PluralizationParams<T>]\n : T extends string\n ? InterpolationParams<T> extends never\n ? [ExplicitTranslateOptions?]\n : [InterpolationParams<T>]\n : [ExplicitTranslateOptions?]\n\ntype TypedTranslate<Translations> = <P extends DotNestedKeys<Translations>>(\n path: P,\n ...args: InterpolationOrPluralizationParams<\n StringLiteralPathValue<Translations, P>\n >\n) => StringLiteralPathValue<Translations, P>\n\ntype I18njsWithTypedTranslate<Translations> = Omit<\n I18njs,\n 't' | 'translate'\n> & {\n t: TypedTranslate<Translations>\n translate: TypedTranslate<Translations>\n}\n\nexport function useI18nContext<\n Translations extends DeepStringRecord | undefined = undefined\n>(): Translations extends undefined\n ? I18njs\n : I18njsWithTypedTranslate<NonNullable<Translations>>\n// overload for when no generic is provided\nexport function useI18nContext(): I18njs\n\n/**\n * Hook to access the I18n context.\n *\n * @template Translations - An optional generic to provide type safety for translations.\n * If specified, it enables typed access to the `t` and `translate` methods of the I18n instance.\n * These methods will have type safe access to both the tranlsation scope as well as the interpolation variables.\n * If not specified, the default I18njs instance is returned.\n *\n * @returns {I18njs | I18njsWithTypedTranslate<Translations>} The I18n context instance,\n * either with or without typed translations based on the provided generic.\n */\nexport function useI18nContext<\n Translations extends DeepStringRecord | undefined = undefined\n>() {\n const ctx = React.useContext(I18nContext)\n\n if (!ctx) {\n // TODO investigate a way to do warnings that won't annoy people\n // we probably need to introduce a build system to have nice dev warnings\n // console.warn()\n }\n\n // Cast to typing if user has provided a type\n return ctx as Translations extends undefined\n ? I18njs\n : I18njsWithTypedTranslate<NonNullable<Translations>>\n}\n"],"mappings":";;;;;;;;;;;;;;;AACA,SAASA,YAAY,QAAQ,uBAAuB;AACpD,OAAO,KAAKC,CAAC,MAAM,OAAO;AAC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aAAa,CACnE1C,YAAY,CAAC;EACXuB,MAAM,EAAE,IAAI;EACZC,YAAY,EAAEJ,gBAAgB,CAAE;AAClC,CAAC,CACH,CAAC;;AAED,OAAO,SAASuB,YAAYA,CAAAC,KAAA,EAGmB;EAAA,IAF7CC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IACLC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EAER,oBACE9C,KAAA,CAAA+C,aAAA,CAACR,WAAW,CAACS,QAAQ;IAACC,KAAK,EAAEhB,OAAO,CAACW,KAAK;EAAE,GACzCD,QACmB,CAAC;AAE3B;;AAEA;;AAWA;;AAoBA;;AAoBA;;AAIA;;AAMA;;AA6DA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,cAAcA,CAAA,EAE1B;EACF,IAAMC,GAAG,GAAGnD,KAAK,CAACoD,UAAU,CAACb,WAAW,CAAC;EAEzC,IAAI,CAACY,GAAG,EAAE;IACR;IACA;IACA;EAAA;;EAGF;EACA,OAAOA,GAAG;AAGZ"}
|
|
1
|
+
{"version":3,"file":"I18n.js","names":["getFallbackList","isCDNFeatureFlagEnabled","useRequestTranslations","createI18njs","R","React","deDE","enAU","enCA","enGB","en","esES","es","frCA","frFR","isIS","jaJP","plPL","pseudo","ptBR","thTH","zhSG","OVERWRITE_LOCALE_MAP","coreTranslations","FALLBACK_LOCALE_MAP","_objectSpread","getTranslationFallbacks","locale","setTranslationFallbacks","I18n","isCDNEnabled","locales","fallbacks","filter","concat","_toConsumableArray","useI18n","_ref","_ref$translations","translations","_translations","enableCDN","i18nContext","useContext","I18nContext","coreCDNTranslations","type","absolute_file_path","oldTranslations","mergeDeepLeft","I18nWithFallbacks","createContext","I18nProvider","_ref2","children","props","_objectWithoutProperties","_excluded","createElement","Provider","value","useI18nContext","ctx"],"sources":["../../src/_hooks/I18n.tsx"],"sourcesContent":["import {\n getFallbackList,\n isCDNFeatureFlagEnabled,\n useRequestTranslations,\n} from '@procore/cdn-translations'\nimport type { I18njs, I18njsConfig } from '@procore/core-i18n-js'\nimport { createI18njs } from '@procore/core-i18n-js'\nimport * as R from 'ramda'\nimport React, { type PropsWithChildren } from 'react'\nimport deDE from '../_locales/de-DE.json'\nimport enAU from '../_locales/en-AU.json'\nimport enCA from '../_locales/en-CA.json'\nimport enGB from '../_locales/en-GB.json'\nimport en from '../_locales/en.json'\nimport esES from '../_locales/es-ES.json'\nimport es from '../_locales/es.json'\nimport frCA from '../_locales/fr-CA.json'\nimport frFR from '../_locales/fr-FR.json'\nimport isIS from '../_locales/is-IS.json'\nimport jaJP from '../_locales/ja-JP.json'\nimport plPL from '../_locales/pl-PL.json'\nimport pseudo from '../_locales/pseudo.json'\nimport ptBR from '../_locales/pt-BR.json'\nimport thTH from '../_locales/th-TH.json'\nimport zhSG from '../_locales/zh-SG.json'\nimport { OVERWRITE_LOCALE_MAP } from './getI18nProviderLocale'\n\ntype I18nConfig = Omit<I18njsConfig, 'I18n'>\n\ntype I18nWithCDNFlag = I18njs & {\n enableCDN?: boolean\n}\n\n/**\n * @deprecated this type will no longer be supported from core-i18n-js,\n * to have a type safe Locale use TmsSupportedLocale or AllLocales from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\n */\nexport type Locale =\n | 'de-DE'\n | 'en-AE'\n | 'en-AU'\n | 'en-CA'\n | 'en-GB'\n | 'en-SG'\n | 'en'\n | 'es-ES'\n | 'es'\n | 'fr-CA'\n | 'fr-FR'\n | 'is-IS'\n | 'ja-JP'\n | 'pt-BR'\n | 'th-TH'\n | 'zh-SG'\n | 'pseudo'\n | 'pl-PL'\n\n/* Set up core translations */\nexport const coreTranslations = {\n 'de-DE': deDE,\n en,\n 'en-AU': enAU,\n 'en-CA': enCA,\n 'en-GB': enGB,\n es,\n 'es-ES': esES,\n 'fr-CA': frCA,\n 'fr-FR': frFR,\n 'is-IS': isIS,\n 'ja-JP': jaJP,\n pseudo,\n 'pt-BR': ptBR,\n 'th-TH': thTH,\n 'zh-SG': zhSG,\n 'pl-PL': plPL,\n} as const\n\nconst FALLBACK_LOCALE_MAP: Record<string, Locale> = {\n 'es-ES': 'es',\n 'fr-FR': 'fr-CA',\n ...OVERWRITE_LOCALE_MAP,\n}\n\nfunction getTranslationFallbacks(locale: string): Locale[] {\n if (FALLBACK_LOCALE_MAP[locale]) {\n return [FALLBACK_LOCALE_MAP[locale], 'en']\n }\n\n return ['en']\n}\n\nfunction setTranslationFallbacks(\n I18n: I18nWithCDNFlag,\n isCDNEnabled: boolean | undefined\n) {\n if (isCDNEnabled === true) {\n I18n.locales[I18n.locale] = function () {\n return getFallbackList(I18n.locale)\n }\n } else {\n I18n.locales[I18n.locale] = function () {\n const fallbacks = getTranslationFallbacks(I18n.locale).filter(\n (locale) => locale !== I18n.locale\n )\n return [I18n.locale, ...fallbacks]\n }\n }\n\n return I18n\n}\n\ntype UseI18n = I18nConfig & {\n enableCDN?: boolean\n}\n\n/**\n * Hook to create I18n object.\n * @param {UseI18n} props - The I18n configuration.\n * @param {string} props.locale - The locale to use.\n * @param {Record<string, string>} props.translations - The translations to use.\n * @param {boolean} props.enableCDN - Whether to pull core-react translations from the CDN or not, by default it follows the value passed down through the parent I18nProvider.\n * @returns {I18nWithCDNFlag} The I18n object.\n */\nexport function useI18n({\n locale,\n translations: _translations = {},\n enableCDN,\n}: UseI18n): I18nWithCDNFlag {\n const i18nContext: I18nWithCDNFlag | undefined = React.useContext(I18nContext)\n\n const isCDNEnabled = isCDNFeatureFlagEnabled(i18nContext, enableCDN)\n\n const coreCDNTranslations = useRequestTranslations(\n {\n locale: locale ?? 'en',\n type: 'file',\n absolute_file_path: (locale) =>\n `core/packages/core-react/src/_locales/${locale}.json`,\n },\n { en, pseudo },\n {\n oldTranslations: coreTranslations,\n enableCDN: isCDNEnabled,\n }\n )\n\n const translations = R.mergeDeepLeft(\n _translations,\n coreCDNTranslations.translations\n )\n\n const I18n = createI18njs({\n locale,\n translations,\n })\n\n const I18nWithFallbacks = setTranslationFallbacks(I18n, isCDNEnabled)\n\n I18nWithFallbacks.enableCDN = isCDNEnabled\n\n return I18nWithFallbacks\n}\n\nexport const I18nContext: React.Context<I18nWithCDNFlag> = React.createContext(\n createI18njs({\n locale: 'en',\n translations: { en: coreTranslations.en },\n })\n)\n\n/**\n * Provider to wrap the application with the I18n context.\n * @param {PropsWithChildren<UseI18n>} props - The I18n configuration.\n * @param {React.ReactNode} props.children - The children to render.\n * @param {UseI18n} props.locale - The locale to use.\n * @param {Record<string, string>} props.translations - The translations to use.\n * @param {boolean} props.enableCDN - Whether to pull core-react translations from the CDN or not, by default it follows the value passed down through the parent I18nProvider.\n * @returns {React.ReactNode} The I18n context instance.\n */\nexport function I18nProvider({\n children,\n ...props\n}: PropsWithChildren<UseI18n>) {\n return (\n <I18nContext.Provider value={useI18n(props)}>\n {children}\n </I18nContext.Provider>\n )\n}\n\n// Base type of user provider translations type\ntype DeepStringRecord = {\n [key: string]: string | DeepStringRecord\n}\n\ntype PluralizationForm = {\n zero?: string\n one: string\n other: string\n}\n\n// Type to get nested key paths with dot notation\ntype DotPrefix<T extends string> = T extends '' ? '' : `.${T}`\ntype DotNestedKeys<T> = (\n T extends string\n ? ''\n : T extends DeepStringRecord\n ? {\n [K in keyof T]: K extends string\n ? T[K] extends PluralizationForm\n ? `${K}`\n : T[K] extends DeepStringRecord\n ? `${K}${DotPrefix<DotNestedKeys<T[K]>>}`\n : `${K}`\n : never\n }[keyof T]\n : ''\n) extends infer D\n ? Extract<D, string>\n : never\n\n// Type to get the literal string type from a path\ntype StringLiteralPathValue<\n T,\n P extends string\n> = P extends `${infer K}.${infer Rest}`\n ? K extends keyof T\n ? T[K] extends PluralizationForm\n ? T[K]\n : T[K] extends DeepStringRecord\n ? StringLiteralPathValue<T[K], Rest>\n : never\n : never\n : P extends keyof T\n ? T[P] extends PluralizationForm\n ? T[P]\n : T[P] extends string\n ? T[P]\n : never\n : never\n\n// Check if a string has any interpolation variables\ntype HasInterpolation<T extends string> =\n T extends `${string}%{${string}}${string}` ? true : false\n\n// Extract interpolation variables from a string\ntype ExtractInterpolationVars<T extends string> =\n T extends `${infer _Before}%{${infer Param}}${infer After}`\n ? Param | ExtractInterpolationVars<After>\n : never\n\n// always allowed values in the interpolation object (remove [key: string]: any in favor of our strong types)\ntype ExplicitTranslateOptions = {\n [K in keyof I18n.TranslateOptions as string extends K\n ? never\n : K]: I18n.TranslateOptions[K]\n}\n\ntype InterpolationParams<T extends string> = HasInterpolation<T> extends true\n ? {\n [K in ExtractInterpolationVars<T>]: string\n } & {\n [K in keyof ExplicitTranslateOptions]?: ExplicitTranslateOptions[K]\n }\n : never\n\ntype PluralizationParams<T extends PluralizationForm> = {\n count: number\n} & (\n | (T['zero'] extends string\n ? { count: 0 } & { [K in ExtractInterpolationVars<T['zero']>]: string }\n : {})\n | (T['one'] extends string\n ? { count: 1 } & { [K in ExtractInterpolationVars<T['one']>]: string }\n : {})\n | (T['other'] extends string\n ? { count: number } & {\n [K in ExtractInterpolationVars<T['other']>]: string\n }\n : {})\n) & {\n [K in keyof ExplicitTranslateOptions]?: ExplicitTranslateOptions[K]\n }\n\ntype InterpolationOrPluralizationParams<T> = T extends PluralizationForm\n ? [PluralizationParams<T>]\n : T extends string\n ? InterpolationParams<T> extends never\n ? [ExplicitTranslateOptions?]\n : [InterpolationParams<T>]\n : [ExplicitTranslateOptions?]\n\ntype TypedTranslate<Translations> = <P extends DotNestedKeys<Translations>>(\n path: P,\n ...args: InterpolationOrPluralizationParams<\n StringLiteralPathValue<Translations, P>\n >\n) => StringLiteralPathValue<Translations, P>\n\ntype I18njsWithTypedTranslate<Translations> = Omit<\n I18nWithCDNFlag,\n 't' | 'translate'\n> & {\n t: TypedTranslate<Translations>\n translate: TypedTranslate<Translations>\n}\n\nexport function useI18nContext<\n Translations extends DeepStringRecord | undefined = undefined\n>(): Translations extends undefined\n ? I18nWithCDNFlag\n : I18njsWithTypedTranslate<NonNullable<Translations>>\n// overload for when no generic is provided\nexport function useI18nContext(): I18nWithCDNFlag\n\n/**\n * Hook to access the I18n context.\n *\n * @template Translations - An optional generic to provide type safety for translations.\n * If specified, it enables typed access to the `t` and `translate` methods of the I18n instance.\n * These methods will have type safe access to both the tranlsation scope as well as the interpolation variables.\n * If not specified, the default I18nWithCDN instance is returned.\n *\n * @returns {I18nWithCDNFlag | I18njsWithTypedTranslate<Translations>} The I18n context instance,\n * either with or without typed translations based on the provided generic.\n */\nexport function useI18nContext<\n Translations extends DeepStringRecord | undefined = undefined\n>() {\n const ctx = React.useContext(I18nContext)\n\n if (!ctx) {\n // TODO investigate a way to do warnings that won't annoy people\n // we probably need to introduce a build system to have nice dev warnings\n // console.warn()\n }\n\n // Cast to typing if user has provided a type\n return ctx as Translations extends undefined\n ? I18nWithCDNFlag\n : I18njsWithTypedTranslate<NonNullable<Translations>>\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SACEA,eAAe,EACfC,uBAAuB,EACvBC,sBAAsB,QACjB,2BAA2B;AAElC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,OAAO,KAAKC,CAAC,MAAM,OAAO;AAC1B,OAAOC,KAAK,MAAkC,OAAO;AACrD,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,EAAE,MAAM,qBAAqB;AACpC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,EAAE,MAAM,qBAAqB;AACpC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,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CAAC;EAErEoB,iBAAiB,CAACT,SAAS,GAAGX,YAAY;EAE1C,OAAOoB,iBAAiB;AAC1B;AAEA,OAAO,IAAMN,WAA2C,gBAAGvC,KAAK,CAAC8C,aAAa,CAC5EhD,YAAY,CAAC;EACXwB,MAAM,EAAE,IAAI;EACZY,YAAY,EAAE;IAAE7B,EAAE,EAAEa,gBAAgB,CAACb;EAAG;AAC1C,CAAC,CACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS0C,YAAYA,CAAAC,KAAA,EAGG;EAAA,IAF7BC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IACLC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EAER,oBACEpD,KAAA,CAAAqD,aAAA,CAACd,WAAW,CAACe,QAAQ;IAACC,KAAK,EAAExB,OAAO,CAACmB,KAAK;EAAE,GACzCD,QACmB,CAAC;AAE3B;;AAEA;;AAWA;;AAoBA;;AAoBA;;AAIA;;AAMA;;AA6DA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,cAAcA,CAAA,EAE1B;EACF,IAAMC,GAAG,GAAGzD,KAAK,CAACsC,UAAU,CAACC,WAAW,CAAC;EAEzC,IAAI,CAACkB,GAAG,EAAE;IACR;IACA;IACA;EAAA;;EAGF;EACA,OAAOA,GAAG;AAGZ"}
|
package/dist/_locales/de-DE.json
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"newItem" : "Verlinkte Elemente verknüpfen",
|
|
83
83
|
"noRelatedItems" : {
|
|
84
84
|
"title" : "Verlinkte Elemente zum Einstieg verknüpfen",
|
|
85
|
-
"description" : "Das Verknüpfen von Elementen mit
|
|
85
|
+
"description" : "Das Verknüpfen von Elementen mit {{itemName}} macht es für Sie und Ihr Team einfacher, relevante Informationen in Procore zu finden."
|
|
86
86
|
},
|
|
87
87
|
"noItems" : {
|
|
88
88
|
"title" : "Es gibt keine anzuzeigenden Elemente.",
|
|
@@ -341,6 +341,9 @@
|
|
|
341
341
|
"searchPlaceholder" : "Suchen",
|
|
342
342
|
"spinnerLabel" : "Wird geladen"
|
|
343
343
|
},
|
|
344
|
+
"spinner" : {
|
|
345
|
+
"loading" : "Wird geladen"
|
|
346
|
+
},
|
|
344
347
|
"token" : {
|
|
345
348
|
"remove" : "Auswahl entfernen"
|
|
346
349
|
},
|
package/dist/_locales/en-AU.json
CHANGED
package/dist/_locales/en-CA.json
CHANGED
package/dist/_locales/en-GB.json
CHANGED
package/dist/_locales/en.json
CHANGED
package/dist/_locales/es-ES.json
CHANGED
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"incorrectFileNumber" : "Lo sentimos, no es posible cargar este número de archivos de archivos a la vez.",
|
|
185
185
|
"invalidAmountAttachments" : {
|
|
186
186
|
"one" : "Solo se puede adjuntar {{count}} archivo.",
|
|
187
|
-
"other" : "Solo se
|
|
187
|
+
"other" : "Solo se pueden adjuntar {{count}} archivos."
|
|
188
188
|
},
|
|
189
189
|
"hideDetails" : "Ocultar detalles",
|
|
190
190
|
"showDetails" : "Mostrar detalles",
|
|
@@ -341,6 +341,9 @@
|
|
|
341
341
|
"searchPlaceholder" : "Buscar",
|
|
342
342
|
"spinnerLabel" : "Cargando"
|
|
343
343
|
},
|
|
344
|
+
"spinner" : {
|
|
345
|
+
"loading" : "Cargando"
|
|
346
|
+
},
|
|
344
347
|
"token" : {
|
|
345
348
|
"remove" : "Eliminar selección"
|
|
346
349
|
},
|
package/dist/_locales/es.json
CHANGED
package/dist/_locales/fr-CA.json
CHANGED
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
},
|
|
91
91
|
"noResultsSearchQuery" : {
|
|
92
92
|
"title" : "Aucun item ne correspond à votre recherche",
|
|
93
|
-
"description" : "Vérifiez l'orthographe et les options de filtrage, ou recherchez un autre mot
|
|
93
|
+
"description" : "Vérifiez l'orthographe et les options de filtrage, ou recherchez un autre mot-clé."
|
|
94
94
|
},
|
|
95
95
|
"noResultsServerError" : {
|
|
96
|
-
"title" : "Une erreur s
|
|
96
|
+
"title" : "Une erreur s'est produite",
|
|
97
97
|
"description" : "S'il vous plaît, vérifiez votre connexion Internet et réessayez.",
|
|
98
98
|
"action" : "Réessayer"
|
|
99
99
|
},
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"dataTable" : {
|
|
120
120
|
"emptyState" : {
|
|
121
121
|
"noFilteredResults" : {
|
|
122
|
-
"description" : "Vérifiez l'orthographe et les options de filtrage, ou recherchez un autre mot
|
|
122
|
+
"description" : "Vérifiez l'orthographe et les options de filtrage, ou recherchez un autre mot-clé.",
|
|
123
123
|
"title" : "Aucun item ne correspond à votre recherche"
|
|
124
124
|
}
|
|
125
125
|
},
|
|
@@ -341,6 +341,9 @@
|
|
|
341
341
|
"searchPlaceholder" : "Rechercher",
|
|
342
342
|
"spinnerLabel" : "Chargement"
|
|
343
343
|
},
|
|
344
|
+
"spinner" : {
|
|
345
|
+
"loading" : "Chargement"
|
|
346
|
+
},
|
|
344
347
|
"token" : {
|
|
345
348
|
"remove" : "Supprimer la sélection"
|
|
346
349
|
},
|
package/dist/_locales/fr-FR.json
CHANGED
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
},
|
|
179
179
|
"dragAndDrop" : "ou glisser-déposer",
|
|
180
180
|
"incorrectFileTypeMessage" : {
|
|
181
|
-
"one" : "Désolé - ce type de fichier n
|
|
181
|
+
"one" : "Désolé - ce type de fichier n'est pas autorisé.",
|
|
182
182
|
"other" : "Désolé, certains de ces types de fichiers ne sont pas autorisés."
|
|
183
183
|
},
|
|
184
184
|
"incorrectFileNumber" : "Désolé, nous ne pouvons pas télécharger ce nombre de fichiers à la fois.",
|
|
@@ -341,6 +341,9 @@
|
|
|
341
341
|
"searchPlaceholder" : "Rechercher",
|
|
342
342
|
"spinnerLabel" : "Chargement"
|
|
343
343
|
},
|
|
344
|
+
"spinner" : {
|
|
345
|
+
"loading" : "Chargement"
|
|
346
|
+
},
|
|
344
347
|
"token" : {
|
|
345
348
|
"remove" : "Supprimer la sélection"
|
|
346
349
|
},
|
package/dist/_locales/is-IS.json
CHANGED
package/dist/_locales/it-IT.json
CHANGED
package/dist/_locales/ja-JP.json
CHANGED
package/dist/_locales/pl-PL.json
CHANGED