@procore/core-react 12.8.0 → 12.8.1
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/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- 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.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 +2 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.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/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.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageLayout/PageLayout.styles.js +15 -15
- package/dist/Pagination/Pagination.styles.js +5 -5
- 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/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 +6 -6
- 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.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- 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.js +3 -1
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.js +29 -24
- package/dist/Tabs/Tabs.styles.js.map +1 -1
- 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.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/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/I18n.d.ts +360 -0
- package/dist/_hooks/I18n.js +2 -0
- package/dist/_hooks/I18n.js.map +1 -1
- package/dist/_hooks/getI18nProviderLocale.js +1 -1
- package/dist/_hooks/getI18nProviderLocale.js.map +1 -1
- package/dist/_locales/pseudo.json +360 -0
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
- 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 +12 -12
- 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 +29 -29
- package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
- package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
- 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 +726 -726
- 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 +31 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +27 -27
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +47 -47
- package/dist/_typedoc/Popover/Popover.types.json +14 -14
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -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 +14 -14
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
- package/dist/_typedoc/Select/Select.types.json +57 -57
- 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/Switch/Switch.types.json +3 -3
- package/dist/_typedoc/Table/Table.types.json +99 -99
- package/dist/_typedoc/Tabs/Tabs.types.json +19 -19
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
- 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 +3 -3
- package/dist/_typedoc/Token/Token.types.json +4 -4
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- 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 +3 -1
package/dist/_hooks/I18n.d.ts
CHANGED
|
@@ -3968,6 +3968,366 @@ export declare const coreTranslations: {
|
|
|
3968
3968
|
};
|
|
3969
3969
|
};
|
|
3970
3970
|
};
|
|
3971
|
+
readonly pseudo: {
|
|
3972
|
+
core: {
|
|
3973
|
+
banner: {
|
|
3974
|
+
dismissAlert: string;
|
|
3975
|
+
};
|
|
3976
|
+
breadcrumbs: {
|
|
3977
|
+
label: string;
|
|
3978
|
+
};
|
|
3979
|
+
calendar: {
|
|
3980
|
+
navigationLabel: string;
|
|
3981
|
+
};
|
|
3982
|
+
connected: {
|
|
3983
|
+
fileSelect: {
|
|
3984
|
+
documents: string;
|
|
3985
|
+
drawings: string;
|
|
3986
|
+
forms: string;
|
|
3987
|
+
photos: string;
|
|
3988
|
+
selectAlbum: string;
|
|
3989
|
+
selectAnAlbum: string;
|
|
3990
|
+
selectArea: string;
|
|
3991
|
+
selectAnArea: string;
|
|
3992
|
+
selectDiscipline: string;
|
|
3993
|
+
selectADiscipline: string;
|
|
3994
|
+
selectSet: string;
|
|
3995
|
+
selectASet: string;
|
|
3996
|
+
selectTemplate: string;
|
|
3997
|
+
selectATemplate: string;
|
|
3998
|
+
};
|
|
3999
|
+
emails: {
|
|
4000
|
+
emailSendErrorTitle: string;
|
|
4001
|
+
emailBodyRequiredError: string;
|
|
4002
|
+
emailContentValidationError: string;
|
|
4003
|
+
emailContentDisclaimer: string;
|
|
4004
|
+
recipientSelectPlaceholder: string;
|
|
4005
|
+
emailRecipientRequiredError: string;
|
|
4006
|
+
emailSubjectRequiredError: string;
|
|
4007
|
+
goToAllEmails: string;
|
|
4008
|
+
sendEmail: string;
|
|
4009
|
+
replyAll: string;
|
|
4010
|
+
downloadAll: string;
|
|
4011
|
+
showAll: string;
|
|
4012
|
+
showLess: string;
|
|
4013
|
+
composeEmailPageTitle: string;
|
|
4014
|
+
emailSentMessage: string;
|
|
4015
|
+
from: string;
|
|
4016
|
+
to: string;
|
|
4017
|
+
cc: string;
|
|
4018
|
+
bcc: string;
|
|
4019
|
+
downloadPdfLong: string;
|
|
4020
|
+
downloadPdfShort: string;
|
|
4021
|
+
privateEmailDisclaimer: string;
|
|
4022
|
+
privateLabel: string;
|
|
4023
|
+
settingsLink: string;
|
|
4024
|
+
composeNewEmail: string;
|
|
4025
|
+
startNewCommunication: string;
|
|
4026
|
+
emptyStateTitle: string;
|
|
4027
|
+
emptyStateDescription: string;
|
|
4028
|
+
reply: string;
|
|
4029
|
+
cancel: string;
|
|
4030
|
+
subject: string;
|
|
4031
|
+
subjectPlaceholder: string;
|
|
4032
|
+
};
|
|
4033
|
+
distributionSelect: {
|
|
4034
|
+
noCompany: string;
|
|
4035
|
+
peopleCount: string;
|
|
4036
|
+
distributionGroups: string;
|
|
4037
|
+
people: string;
|
|
4038
|
+
};
|
|
4039
|
+
relatedItems: {
|
|
4040
|
+
cancel: string;
|
|
4041
|
+
close: string;
|
|
4042
|
+
date: string;
|
|
4043
|
+
itemType: string;
|
|
4044
|
+
itemTypeGroupLabel: {
|
|
4045
|
+
dailyLog: string;
|
|
4046
|
+
prostoreFile: string;
|
|
4047
|
+
};
|
|
4048
|
+
itemName: string;
|
|
4049
|
+
loading: string;
|
|
4050
|
+
notes: string;
|
|
4051
|
+
notesPlaceholder: string;
|
|
4052
|
+
newItem: string;
|
|
4053
|
+
noRelatedItems: {
|
|
4054
|
+
title: string;
|
|
4055
|
+
description: string;
|
|
4056
|
+
};
|
|
4057
|
+
noItems: {
|
|
4058
|
+
title: string;
|
|
4059
|
+
description: string;
|
|
4060
|
+
};
|
|
4061
|
+
noResultsSearchQuery: {
|
|
4062
|
+
title: string;
|
|
4063
|
+
description: string;
|
|
4064
|
+
};
|
|
4065
|
+
noResultsServerError: {
|
|
4066
|
+
title: string;
|
|
4067
|
+
description: string;
|
|
4068
|
+
action: string;
|
|
4069
|
+
};
|
|
4070
|
+
panelTitle: string;
|
|
4071
|
+
search: string;
|
|
4072
|
+
searchItemType: string;
|
|
4073
|
+
submit: string;
|
|
4074
|
+
toast: {
|
|
4075
|
+
itemAdded: string;
|
|
4076
|
+
itemAdditionFailed: string;
|
|
4077
|
+
itemRemoved: string;
|
|
4078
|
+
requestError: string;
|
|
4079
|
+
};
|
|
4080
|
+
};
|
|
4081
|
+
};
|
|
4082
|
+
dateTimeFormat: {
|
|
4083
|
+
dateAtTime: string;
|
|
4084
|
+
timeOnDate: string;
|
|
4085
|
+
};
|
|
4086
|
+
table: {
|
|
4087
|
+
sortableColumn: string;
|
|
4088
|
+
};
|
|
4089
|
+
dataTable: {
|
|
4090
|
+
emptyState: {
|
|
4091
|
+
noFilteredResults: {
|
|
4092
|
+
description: string;
|
|
4093
|
+
title: string;
|
|
4094
|
+
};
|
|
4095
|
+
};
|
|
4096
|
+
exporting: string;
|
|
4097
|
+
filters: {
|
|
4098
|
+
filters: string;
|
|
4099
|
+
moreFilters: string;
|
|
4100
|
+
clearAllFilters: string;
|
|
4101
|
+
};
|
|
4102
|
+
grandTotals: string;
|
|
4103
|
+
search: string;
|
|
4104
|
+
subtotals: string;
|
|
4105
|
+
tableSettings: {
|
|
4106
|
+
configureColumns: string;
|
|
4107
|
+
resetToDefault: string;
|
|
4108
|
+
rowHeight: string;
|
|
4109
|
+
small: string;
|
|
4110
|
+
medium: string;
|
|
4111
|
+
large: string;
|
|
4112
|
+
tableSettings: string;
|
|
4113
|
+
};
|
|
4114
|
+
};
|
|
4115
|
+
dateInput: {
|
|
4116
|
+
clear: string;
|
|
4117
|
+
ariaLabel: string;
|
|
4118
|
+
segment: {
|
|
4119
|
+
ariaLabel: {
|
|
4120
|
+
withValue: {
|
|
4121
|
+
month: string;
|
|
4122
|
+
day: string;
|
|
4123
|
+
year: string;
|
|
4124
|
+
};
|
|
4125
|
+
withoutValue: {
|
|
4126
|
+
month: string;
|
|
4127
|
+
day: string;
|
|
4128
|
+
year: string;
|
|
4129
|
+
};
|
|
4130
|
+
};
|
|
4131
|
+
ariaValueText: {
|
|
4132
|
+
empty: string;
|
|
4133
|
+
};
|
|
4134
|
+
};
|
|
4135
|
+
clearButton: {
|
|
4136
|
+
ariaLabel: string;
|
|
4137
|
+
};
|
|
4138
|
+
};
|
|
4139
|
+
dropdown: {
|
|
4140
|
+
search: string;
|
|
4141
|
+
moreOptions: string;
|
|
4142
|
+
loading: string;
|
|
4143
|
+
};
|
|
4144
|
+
dropzone: {
|
|
4145
|
+
uploadFiles: {
|
|
4146
|
+
one: string;
|
|
4147
|
+
other: string;
|
|
4148
|
+
};
|
|
4149
|
+
dragAndDrop: string;
|
|
4150
|
+
incorrectFileTypeMessage: {
|
|
4151
|
+
one: string;
|
|
4152
|
+
other: string;
|
|
4153
|
+
};
|
|
4154
|
+
incorrectFileNumber: string;
|
|
4155
|
+
invalidAmountAttachments: {
|
|
4156
|
+
one: string;
|
|
4157
|
+
other: string;
|
|
4158
|
+
};
|
|
4159
|
+
hideDetails: string;
|
|
4160
|
+
showDetails: string;
|
|
4161
|
+
errorTitle: string;
|
|
4162
|
+
oneFileAtATimeError: string;
|
|
4163
|
+
multipleErrorsMessage: string;
|
|
4164
|
+
maxFileSizeErrorGroup: string;
|
|
4165
|
+
minFileSizeErrorGroup: string;
|
|
4166
|
+
maxFileNumberErrorGroup: string;
|
|
4167
|
+
wrongFileTypeErrorGroup: string;
|
|
4168
|
+
standaloneMaxFileNumberError: string;
|
|
4169
|
+
standaloneUnsupportedFileTypeError: string;
|
|
4170
|
+
standaloneMinFileSizeError: string;
|
|
4171
|
+
standaloneMaxFileSizeError: string;
|
|
4172
|
+
uploadTotalProgress: {
|
|
4173
|
+
withFailed: string;
|
|
4174
|
+
withoutFailed: string;
|
|
4175
|
+
};
|
|
4176
|
+
};
|
|
4177
|
+
modal: {
|
|
4178
|
+
a11y: {
|
|
4179
|
+
close: string;
|
|
4180
|
+
};
|
|
4181
|
+
cancel: string;
|
|
4182
|
+
};
|
|
4183
|
+
multiSelect: {
|
|
4184
|
+
clearAll: string;
|
|
4185
|
+
selectValues: string;
|
|
4186
|
+
noResults: string;
|
|
4187
|
+
};
|
|
4188
|
+
tearsheet: {
|
|
4189
|
+
a11y: {
|
|
4190
|
+
close: string;
|
|
4191
|
+
};
|
|
4192
|
+
};
|
|
4193
|
+
fileAttacher: {
|
|
4194
|
+
attachFiles: {
|
|
4195
|
+
one: string;
|
|
4196
|
+
other: string;
|
|
4197
|
+
};
|
|
4198
|
+
};
|
|
4199
|
+
fileToken: {
|
|
4200
|
+
uploading: string;
|
|
4201
|
+
};
|
|
4202
|
+
tree: {
|
|
4203
|
+
selectionLimit: {
|
|
4204
|
+
one: string;
|
|
4205
|
+
other: string;
|
|
4206
|
+
};
|
|
4207
|
+
unsupportedFileType: {
|
|
4208
|
+
specific: string;
|
|
4209
|
+
unspecific: string;
|
|
4210
|
+
};
|
|
4211
|
+
};
|
|
4212
|
+
fileExplorer: {
|
|
4213
|
+
filesSelectedWithLimit: string;
|
|
4214
|
+
ungroupedThumbnailGridGroup: string;
|
|
4215
|
+
filesSelected: {
|
|
4216
|
+
one: string;
|
|
4217
|
+
other: string;
|
|
4218
|
+
};
|
|
4219
|
+
cancelAction: string;
|
|
4220
|
+
attachAction: string;
|
|
4221
|
+
maxNumberOfFilesSelected: string;
|
|
4222
|
+
modalTitle: string;
|
|
4223
|
+
filesPendingUpload: string;
|
|
4224
|
+
noSelectedItems: string;
|
|
4225
|
+
emptySearchResults: string;
|
|
4226
|
+
noItems: string;
|
|
4227
|
+
searchPlaceholder: string;
|
|
4228
|
+
uploadFailed: string;
|
|
4229
|
+
supportedFileTypes: string;
|
|
4230
|
+
};
|
|
4231
|
+
form: {
|
|
4232
|
+
closeWithConfirm: {
|
|
4233
|
+
confirmMessage: string;
|
|
4234
|
+
};
|
|
4235
|
+
checkbox: {
|
|
4236
|
+
no: string;
|
|
4237
|
+
yes: string;
|
|
4238
|
+
checked: string;
|
|
4239
|
+
unchecked: string;
|
|
4240
|
+
};
|
|
4241
|
+
errorBanner: {
|
|
4242
|
+
coundNotCreateItem: string;
|
|
4243
|
+
couldNotUpdateItem: string;
|
|
4244
|
+
fixErrorsToCreate: string;
|
|
4245
|
+
fixErrorsToUpdate: string;
|
|
4246
|
+
};
|
|
4247
|
+
field: {
|
|
4248
|
+
tooltipHelp: string;
|
|
4249
|
+
};
|
|
4250
|
+
};
|
|
4251
|
+
menu: {
|
|
4252
|
+
search: string;
|
|
4253
|
+
};
|
|
4254
|
+
pagination: {
|
|
4255
|
+
interval: string;
|
|
4256
|
+
notation: string;
|
|
4257
|
+
page: string;
|
|
4258
|
+
nextPage: string;
|
|
4259
|
+
prevPage: string;
|
|
4260
|
+
};
|
|
4261
|
+
search: {
|
|
4262
|
+
clear: string;
|
|
4263
|
+
goSearch: string;
|
|
4264
|
+
};
|
|
4265
|
+
select: {
|
|
4266
|
+
clear: string;
|
|
4267
|
+
search: string;
|
|
4268
|
+
};
|
|
4269
|
+
tabs: {
|
|
4270
|
+
more: string;
|
|
4271
|
+
};
|
|
4272
|
+
thumbnail: {
|
|
4273
|
+
checked: string;
|
|
4274
|
+
};
|
|
4275
|
+
thumbnailList: {
|
|
4276
|
+
removeUpload: string;
|
|
4277
|
+
uploading: string;
|
|
4278
|
+
};
|
|
4279
|
+
toast: {
|
|
4280
|
+
a11y: {
|
|
4281
|
+
dismiss: string;
|
|
4282
|
+
};
|
|
4283
|
+
};
|
|
4284
|
+
fileList: {
|
|
4285
|
+
downloadAll: string;
|
|
4286
|
+
download: string;
|
|
4287
|
+
noPreview: string;
|
|
4288
|
+
};
|
|
4289
|
+
tieredSelect: {
|
|
4290
|
+
emptyMessage: string;
|
|
4291
|
+
goToTier: string;
|
|
4292
|
+
placeholder: string;
|
|
4293
|
+
quickCreateActionLabel: string;
|
|
4294
|
+
quickCreateCancelLabel: string;
|
|
4295
|
+
quickCreateCreateLabel: string;
|
|
4296
|
+
quickCreatePlaceholder: string;
|
|
4297
|
+
searchEmptyMessage: string;
|
|
4298
|
+
searchPlaceholder: string;
|
|
4299
|
+
spinnerLabel: string;
|
|
4300
|
+
};
|
|
4301
|
+
tieredDropdown: {
|
|
4302
|
+
emptyMessage: string;
|
|
4303
|
+
searchEmptyMessage: string;
|
|
4304
|
+
searchPlaceholder: string;
|
|
4305
|
+
spinnerLabel: string;
|
|
4306
|
+
};
|
|
4307
|
+
token: {
|
|
4308
|
+
remove: string;
|
|
4309
|
+
};
|
|
4310
|
+
toolHeader: {
|
|
4311
|
+
settingsAction: string;
|
|
4312
|
+
};
|
|
4313
|
+
fileSelect: {
|
|
4314
|
+
localFilesSource: string;
|
|
4315
|
+
uploadFailed: string;
|
|
4316
|
+
maxNumberOfFilesSelected: string;
|
|
4317
|
+
};
|
|
4318
|
+
required: {
|
|
4319
|
+
requiredFields: string;
|
|
4320
|
+
};
|
|
4321
|
+
avatarStack: {
|
|
4322
|
+
viewAll: string;
|
|
4323
|
+
close: string;
|
|
4324
|
+
};
|
|
4325
|
+
panel: {
|
|
4326
|
+
close: string;
|
|
4327
|
+
goBack: string;
|
|
4328
|
+
};
|
|
4329
|
+
};
|
|
4330
|
+
};
|
|
3971
4331
|
readonly 'pt-BR': {
|
|
3972
4332
|
core: {
|
|
3973
4333
|
banner: {
|
package/dist/_hooks/I18n.js
CHANGED
|
@@ -15,6 +15,7 @@ import frCA from '../_locales/fr-CA.json';
|
|
|
15
15
|
import frFR from '../_locales/fr-FR.json';
|
|
16
16
|
import isIS from '../_locales/is-IS.json';
|
|
17
17
|
import jaJP from '../_locales/ja-JP.json';
|
|
18
|
+
import pseudo from '../_locales/pseudo.json';
|
|
18
19
|
import ptBR from '../_locales/pt-BR.json';
|
|
19
20
|
import thTH from '../_locales/th-TH.json';
|
|
20
21
|
import zhSG from '../_locales/zh-SG.json';
|
|
@@ -32,6 +33,7 @@ export var coreTranslations = {
|
|
|
32
33
|
'fr-FR': frFR,
|
|
33
34
|
'is-IS': isIS,
|
|
34
35
|
'ja-JP': jaJP,
|
|
36
|
+
pseudo: pseudo,
|
|
35
37
|
'pt-BR': ptBR,
|
|
36
38
|
'th-TH': thTH,
|
|
37
39
|
'zh-SG': zhSG
|
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","ptBR","thTH","zhSG","OVERWRITE_LOCALE_MAP","coreTranslations","getValidLocale","_ref","locale","translations","FALLBACK_LOCALE_MAP","getTranslationFallbacks","setTranslationFallbacks","_ref2","I18n","locales","useI18n","_ref3","_locale","_ref3$translations","_translations","mergeDeepLeft","I18nContext","createContext","I18nProvider","_ref4","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 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 RequiredI18nConfig = {\n I18n: I18njs\n locale: string\n}\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\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 'pt-BR': ptBR,\n 'th-TH': thTH,\n 'zh-SG': zhSG,\n} as const\n\nfunction getValidLocale({ locale, translations }: I18njsConfig) {\n return locale\n}\n\nconst FALLBACK_LOCALE_MAP: Record<string, string> = {\n 'es-ES': 'es',\n 'fr-FR': 'fr-CA',\n}\n\nfunction getTranslationFallbacks(locale: string) {\n if (locale === 'en') {\n return ['en']\n }\n\n if (OVERWRITE_LOCALE_MAP[locale]) {\n return [OVERWRITE_LOCALE_MAP[locale], 'en']\n }\n\n if (FALLBACK_LOCALE_MAP[locale]) {\n return [locale, FALLBACK_LOCALE_MAP[locale], 'en']\n }\n\n return [locale, 'en']\n}\n\nfunction setTranslationFallbacks({ I18n, locale }: RequiredI18nConfig) {\n I18n.locales[locale] = function () {\n return getTranslationFallbacks(locale)\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, locale: locale || 'en' })\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\nexport function useI18nContext() {\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 return ctx\n}\n"],"mappings":";;;AACA,SAASA,YAAY,QAAQ,uBAAuB;AACpD,OAAO,KAAKC,CAAC,MAAM,OAAO;AAC1B,OAAOC,KAAK,MAAM,OAAO;AACzB,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,IAAI,MAAM,wBAAwB;AACzC,OAAOC,IAAI,MAAM,wBAAwB;AACzC,SAASC,oBAAoB,QAAQ,yBAAyB;AA4B9D;AACA,OAAO,IAAMC,gBAAgB,GAAG;EAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"I18n.js","names":["createI18njs","R","React","deDE","enAU","enCA","enGB","en","esES","es","frCA","frFR","isIS","jaJP","pseudo","ptBR","thTH","zhSG","OVERWRITE_LOCALE_MAP","coreTranslations","getValidLocale","_ref","locale","translations","FALLBACK_LOCALE_MAP","getTranslationFallbacks","setTranslationFallbacks","_ref2","I18n","locales","useI18n","_ref3","_locale","_ref3$translations","_translations","mergeDeepLeft","I18nContext","createContext","I18nProvider","_ref4","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 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 RequiredI18nConfig = {\n I18n: I18njs\n locale: string\n}\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\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} as const\n\nfunction getValidLocale({ locale, translations }: I18njsConfig) {\n return locale\n}\n\nconst FALLBACK_LOCALE_MAP: Record<string, string> = {\n 'es-ES': 'es',\n 'fr-FR': 'fr-CA',\n}\n\nfunction getTranslationFallbacks(locale: string) {\n if (locale === 'en') {\n return ['en']\n }\n\n if (OVERWRITE_LOCALE_MAP[locale]) {\n return [OVERWRITE_LOCALE_MAP[locale], 'en']\n }\n\n if (FALLBACK_LOCALE_MAP[locale]) {\n return [locale, FALLBACK_LOCALE_MAP[locale], 'en']\n }\n\n return [locale, 'en']\n}\n\nfunction setTranslationFallbacks({ I18n, locale }: RequiredI18nConfig) {\n I18n.locales[locale] = function () {\n return getTranslationFallbacks(locale)\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, locale: locale || 'en' })\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\nexport function useI18nContext() {\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 return ctx\n}\n"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// All and only locales that will receive smartling translations and can be directly fed into <I18nProvider>
|
|
2
|
-
var SUPPORTED_LOCALES = ['de-DE', 'en-AU', 'en-CA', 'en-GB', 'en', 'es-ES', 'es', 'fr-CA', 'fr-FR', 'is-IS', 'ja-JP', 'pt-BR', 'th-TH', 'zh-SG'];
|
|
2
|
+
var SUPPORTED_LOCALES = ['de-DE', 'en-AU', 'en-CA', 'en-GB', 'en', 'es-ES', 'es', 'fr-CA', 'fr-FR', 'is-IS', 'ja-JP', 'pseudo', 'pt-BR', 'th-TH', 'zh-SG'];
|
|
3
3
|
/*
|
|
4
4
|
all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'
|
|
5
5
|
this should match https://github.com/procore/procore/blob/d0515461046b8d018c8fa8ede1ca8b7aa2fcacf8/config/application.rb#L234C1-L240C7
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getI18nProviderLocale.js","names":["SUPPORTED_LOCALES","OVERWRITE_LOCALE_MAP","getI18nProviderLocale","envLocale","includes"],"sources":["../../src/_hooks/getI18nProviderLocale.ts"],"sourcesContent":["import type { Locale } from './I18n'\n\n// All and only locales that will receive smartling translations and can be directly fed into <I18nProvider>\nconst SUPPORTED_LOCALES: Locale[] = [\n 'de-DE',\n 'en-AU',\n 'en-CA',\n 'en-GB',\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]\n/*\n all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'\n this should match https://github.com/procore/procore/blob/d0515461046b8d018c8fa8ede1ca8b7aa2fcacf8/config/application.rb#L234C1-L240C7\n for any locales that are not listed in SUPPORTED_LOCALES\n*/\nexport const OVERWRITE_LOCALE_MAP: Record<string, Locale> = {\n 'en-AE': 'en-GB',\n 'en-SG': 'en-GB',\n 'es-419': 'es',\n} as const\n\n/**\n * Returns the locale that should be used for the I18nProvider based on the environment locale\n * @param envLocale - the locale from the environment\n * @returns the locale that should be used for the I18nProvider\n */\nexport function getI18nProviderLocale(envLocale: string): Locale {\n if (SUPPORTED_LOCALES.includes(envLocale as Locale)) {\n return envLocale as Locale\n }\n if (OVERWRITE_LOCALE_MAP[envLocale]) {\n return OVERWRITE_LOCALE_MAP[envLocale]\n }\n\n return 'en'\n}\n"],"mappings":"AAEA;AACA,IAAMA,iBAA2B,GAAG,CAClC,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,CACR;AACD;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,oBAA4C,GAAG;EAC1D,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,OAAO;EAChB,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAACC,SAAiB,EAAU;EAC/D,IAAIH,iBAAiB,CAACI,QAAQ,CAACD,SAAmB,CAAC,EAAE;IACnD,OAAOA,SAAS;EAClB;EACA,IAAIF,oBAAoB,CAACE,SAAS,CAAC,EAAE;IACnC,OAAOF,oBAAoB,CAACE,SAAS,CAAC;EACxC;EAEA,OAAO,IAAI;AACb"}
|
|
1
|
+
{"version":3,"file":"getI18nProviderLocale.js","names":["SUPPORTED_LOCALES","OVERWRITE_LOCALE_MAP","getI18nProviderLocale","envLocale","includes"],"sources":["../../src/_hooks/getI18nProviderLocale.ts"],"sourcesContent":["import type { Locale } from './I18n'\n\n// All and only locales that will receive smartling translations and can be directly fed into <I18nProvider>\nconst SUPPORTED_LOCALES: Locale[] = [\n 'de-DE',\n 'en-AU',\n 'en-CA',\n 'en-GB',\n 'en',\n 'es-ES',\n 'es',\n 'fr-CA',\n 'fr-FR',\n 'is-IS',\n 'ja-JP',\n 'pseudo',\n 'pt-BR',\n 'th-TH',\n 'zh-SG',\n]\n/*\n all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'\n this should match https://github.com/procore/procore/blob/d0515461046b8d018c8fa8ede1ca8b7aa2fcacf8/config/application.rb#L234C1-L240C7\n for any locales that are not listed in SUPPORTED_LOCALES\n*/\nexport const OVERWRITE_LOCALE_MAP: Record<string, Locale> = {\n 'en-AE': 'en-GB',\n 'en-SG': 'en-GB',\n 'es-419': 'es',\n} as const\n\n/**\n * Returns the locale that should be used for the I18nProvider based on the environment locale\n * @param envLocale - the locale from the environment\n * @returns the locale that should be used for the I18nProvider\n */\nexport function getI18nProviderLocale(envLocale: string): Locale {\n if (SUPPORTED_LOCALES.includes(envLocale as Locale)) {\n return envLocale as Locale\n }\n if (OVERWRITE_LOCALE_MAP[envLocale]) {\n return OVERWRITE_LOCALE_MAP[envLocale]\n }\n\n return 'en'\n}\n"],"mappings":"AAEA;AACA,IAAMA,iBAA2B,GAAG,CAClC,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,CACR;AACD;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,oBAA4C,GAAG;EAC1D,OAAO,EAAE,OAAO;EAChB,OAAO,EAAE,OAAO;EAChB,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAACC,SAAiB,EAAU;EAC/D,IAAIH,iBAAiB,CAACI,QAAQ,CAACD,SAAmB,CAAC,EAAE;IACnD,OAAOA,SAAS;EAClB;EACA,IAAIF,oBAAoB,CAACE,SAAS,CAAC,EAAE;IACnC,OAAOF,oBAAoB,CAACE,SAAS,CAAC;EACxC;EAEA,OAAO,IAAI;AACb"}
|