@procore/core-react 11.24.4 → 11.25.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/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.d.ts +7 -7
- package/dist/AvatarStack/AvatarStack.styles.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +26 -6
- package/dist/Checkbox/Checkbox.js.map +1 -1
- package/dist/Checkbox/Checkbox.styles.d.ts +6 -2
- package/dist/Checkbox/Checkbox.styles.js +21 -17
- package/dist/Checkbox/Checkbox.styles.js.map +1 -1
- package/dist/Checkbox/Checkbox.types.d.ts +10 -0
- package/dist/Checkbox/Checkbox.types.js.map +1 -1
- package/dist/ContactItem/ContactItem.styles.d.ts +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.d.ts +3 -3
- 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.d.ts +2 -2
- package/dist/DropdownFlyout/DropdownFlyout.helpers.d.ts +1 -1
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.d.ts +2 -2
- 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.d.ts +1 -1
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.d.ts +2 -2
- 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.d.ts +2 -2
- 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.d.ts +72 -72
- package/dist/Form/Form.js +67 -35
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.d.ts +8 -4
- package/dist/Form/Form.styles.js +49 -35
- package/dist/Form/Form.styles.js.map +1 -1
- package/dist/Form/Form.types.d.ts +28 -1
- package/dist/Form/Form.types.js.map +1 -1
- package/dist/Form/FormFieldTooltip.d.ts +4 -0
- package/dist/Form/FormFieldTooltip.js +18 -0
- package/dist/Form/FormFieldTooltip.js.map +1 -0
- package/dist/Form/stories/util.d.ts +5 -3
- package/dist/Form/stories/util.js +61 -17
- package/dist/Form/stories/util.js.map +1 -1
- package/dist/Grid/Grid.d.ts +1 -1
- 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/Menu/Menu.d.ts +4 -4
- package/dist/MenuImperative/MenuImperative.d.ts +3 -3
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/ChildRegistry.context.d.ts +1 -1
- package/dist/Modal/Modal.d.ts +1 -1
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/Modal/storyHelpers.d.ts +2 -2
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextTile/NextTile.d.ts +1 -1
- 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/OverlayTrigger/OverlayTrigger.d.ts +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.js +9 -3
- package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.types.d.ts +2 -1
- package/dist/OverlayTrigger/OverlayTrigger.types.js.map +1 -1
- package/dist/OverlayTrigger/a11yPresets.d.ts +48 -48
- package/dist/PageLayout/PageLayout.d.ts +1 -1
- package/dist/PageLayout/PageLayout.styles.js +13 -13
- 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.d.ts +1 -1
- 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 +6 -4
- package/dist/Required/Required.styles.js.map +1 -1
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.d.ts +2 -2
- package/dist/Section/Section.styles.js +6 -6
- package/dist/SegmentedController/SegmentedController.d.ts +2 -2
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +3 -1
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Select/Select.types.d.ts +3 -2
- package/dist/Select/Select.types.js.map +1 -1
- package/dist/Semantic/Semantic.styles.d.ts +1 -1
- package/dist/Semantic/Semantic.styles.js +8 -8
- package/dist/Sidebar/Sidebar.styles.js +7 -7
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SuperSelect/SuperSelect.components.d.ts +29 -29
- package/dist/SuperSelect/SuperSelect.d.ts +29 -29
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/SuperSelect/useSuperSelect.d.ts +87 -87
- 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.d.ts +1 -1
- package/dist/Tabs/Tabs.styles.js +8 -8
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/TextEditor.d.ts +3 -3
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.d.ts +3 -3
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +226 -210
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/ThumbnailCaption.d.ts +2 -2
- package/dist/Thumbnail/ThumbnailDocumentIcon.d.ts +2 -2
- package/dist/Thumbnail/ThumbnailPreview.d.ts +2 -2
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +2 -2
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.d.ts +1 -1
- 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/ActionIcon.d.ts +2 -2
- package/dist/ToolHeader/ToolHeader.d.ts +2 -2
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.hooks.js +58 -36
- package/dist/Tree/Tree.hooks.js.map +1 -1
- package/dist/Tree/Tree.js +1 -1
- package/dist/Tree/Tree.js.map +1 -1
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Tree/Tree.types.d.ts +7 -3
- package/dist/Tree/Tree.types.js.map +1 -1
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.colors.story.d.ts +2 -2
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.d.ts +2 -2
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/Analytics.d.ts +1 -1
- package/dist/_hooks/Anchor.d.ts +1 -1
- package/dist/_hooks/BoundingRect.d.ts +1 -1
- package/dist/_hooks/Buffer.d.ts +1 -1
- package/dist/_hooks/ClickOutside.d.ts +3 -2
- package/dist/_hooks/ClickOutside.js +8 -3
- package/dist/_hooks/ClickOutside.js.map +1 -1
- package/dist/_hooks/DateTime/DateTime.d.ts +1 -1
- package/dist/_hooks/DelayedToggle.d.ts +1 -1
- package/dist/_hooks/Event.d.ts +1 -1
- package/dist/_hooks/EventListener.js +14 -4
- package/dist/_hooks/EventListener.js.map +1 -1
- package/dist/_hooks/I18n.d.ts +387 -2
- package/dist/_hooks/InjectedScript.d.ts +1 -1
- package/dist/_hooks/ListNavigation.d.ts +1 -1
- package/dist/_hooks/TextEntry.d.ts +1 -1
- package/dist/_hooks/Timer.d.ts +1 -1
- package/dist/_hooks/Trigger.d.ts +1 -1
- package/dist/_hooks/Visibility.d.ts +1 -1
- package/dist/_hooks/ZIndex.d.ts +1 -1
- package/dist/_hooks/__tests__/EventListener.test.js +46 -0
- package/dist/_hooks/useSet.js +3 -3
- package/dist/_hooks/useSet.js.map +1 -1
- package/dist/_locales/de-DE.json +3 -1
- package/dist/_locales/en-AU.json +3 -1
- package/dist/_locales/en-CA.json +3 -1
- package/dist/_locales/en-GB.json +3 -1
- package/dist/_locales/en.json +3 -1
- package/dist/_locales/es-ES.json +3 -1
- package/dist/_locales/es.json +3 -1
- package/dist/_locales/fr-CA.json +3 -1
- package/dist/_locales/fr-FR.json +3 -1
- package/dist/_locales/is-IS.json +3 -1
- package/dist/_locales/ja-JP.json +360 -1
- package/dist/_locales/pt-BR.json +3 -1
- package/dist/_locales/th-TH.json +3 -1
- package/dist/_locales/zh-SG.json +3 -1
- 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 +11 -11
- 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 +27 -7
- 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 +4 -4
- 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 +11 -11
- 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 +980 -700
- 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 +41 -41
- 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 +38 -38
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +40 -30
- package/dist/_typedoc/PageLayout/PageLayout.types.json +22 -22
- 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 +56 -46
- 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 +75 -55
- 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 +106 -96
- package/dist/_typedoc/Tabs/Tabs.types.json +17 -17
- 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/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 +94 -94
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +8 -8
- package/dist/_typedoc/_utils/types.json +3 -3
- package/package.json +1 -1
package/dist/_hooks/I18n.d.ts
CHANGED
|
@@ -270,6 +270,8 @@ export declare const coreTranslations: {
|
|
|
270
270
|
checkbox: {
|
|
271
271
|
no: string;
|
|
272
272
|
yes: string;
|
|
273
|
+
deselected: string;
|
|
274
|
+
selected: string;
|
|
273
275
|
};
|
|
274
276
|
errorBanner: {
|
|
275
277
|
coundNotCreateItem: string;
|
|
@@ -628,6 +630,8 @@ export declare const coreTranslations: {
|
|
|
628
630
|
checkbox: {
|
|
629
631
|
no: string;
|
|
630
632
|
yes: string;
|
|
633
|
+
deselected: string;
|
|
634
|
+
selected: string;
|
|
631
635
|
};
|
|
632
636
|
errorBanner: {
|
|
633
637
|
coundNotCreateItem: string;
|
|
@@ -986,6 +990,8 @@ export declare const coreTranslations: {
|
|
|
986
990
|
checkbox: {
|
|
987
991
|
no: string;
|
|
988
992
|
yes: string;
|
|
993
|
+
deselected: string;
|
|
994
|
+
selected: string;
|
|
989
995
|
};
|
|
990
996
|
errorBanner: {
|
|
991
997
|
coundNotCreateItem: string;
|
|
@@ -1344,6 +1350,8 @@ export declare const coreTranslations: {
|
|
|
1344
1350
|
checkbox: {
|
|
1345
1351
|
no: string;
|
|
1346
1352
|
yes: string;
|
|
1353
|
+
deselected: string;
|
|
1354
|
+
selected: string;
|
|
1347
1355
|
};
|
|
1348
1356
|
errorBanner: {
|
|
1349
1357
|
coundNotCreateItem: string;
|
|
@@ -1702,6 +1710,8 @@ export declare const coreTranslations: {
|
|
|
1702
1710
|
checkbox: {
|
|
1703
1711
|
no: string;
|
|
1704
1712
|
yes: string;
|
|
1713
|
+
deselected: string;
|
|
1714
|
+
selected: string;
|
|
1705
1715
|
};
|
|
1706
1716
|
errorBanner: {
|
|
1707
1717
|
coundNotCreateItem: string;
|
|
@@ -2093,6 +2103,8 @@ export declare const coreTranslations: {
|
|
|
2093
2103
|
checkbox: {
|
|
2094
2104
|
no: string;
|
|
2095
2105
|
yes: string;
|
|
2106
|
+
deselected: string;
|
|
2107
|
+
selected: string;
|
|
2096
2108
|
};
|
|
2097
2109
|
errorBanner: {
|
|
2098
2110
|
coundNotCreateItem: string;
|
|
@@ -2451,6 +2463,8 @@ export declare const coreTranslations: {
|
|
|
2451
2463
|
checkbox: {
|
|
2452
2464
|
no: string;
|
|
2453
2465
|
yes: string;
|
|
2466
|
+
deselected: string;
|
|
2467
|
+
selected: string;
|
|
2454
2468
|
};
|
|
2455
2469
|
errorBanner: {
|
|
2456
2470
|
coundNotCreateItem: string;
|
|
@@ -2809,6 +2823,8 @@ export declare const coreTranslations: {
|
|
|
2809
2823
|
checkbox: {
|
|
2810
2824
|
no: string;
|
|
2811
2825
|
yes: string;
|
|
2826
|
+
deselected: string;
|
|
2827
|
+
selected: string;
|
|
2812
2828
|
};
|
|
2813
2829
|
errorBanner: {
|
|
2814
2830
|
coundNotCreateItem: string;
|
|
@@ -3167,6 +3183,8 @@ export declare const coreTranslations: {
|
|
|
3167
3183
|
checkbox: {
|
|
3168
3184
|
no: string;
|
|
3169
3185
|
yes: string;
|
|
3186
|
+
deselected: string;
|
|
3187
|
+
selected: string;
|
|
3170
3188
|
};
|
|
3171
3189
|
errorBanner: {
|
|
3172
3190
|
coundNotCreateItem: string;
|
|
@@ -3525,6 +3543,8 @@ export declare const coreTranslations: {
|
|
|
3525
3543
|
checkbox: {
|
|
3526
3544
|
no: string;
|
|
3527
3545
|
yes: string;
|
|
3546
|
+
deselected: string;
|
|
3547
|
+
selected: string;
|
|
3528
3548
|
};
|
|
3529
3549
|
errorBanner: {
|
|
3530
3550
|
coundNotCreateItem: string;
|
|
@@ -3617,7 +3637,366 @@ export declare const coreTranslations: {
|
|
|
3617
3637
|
};
|
|
3618
3638
|
};
|
|
3619
3639
|
readonly 'it-IT': {};
|
|
3620
|
-
readonly 'ja-JP': {
|
|
3640
|
+
readonly 'ja-JP': {
|
|
3641
|
+
core: {
|
|
3642
|
+
banner: {
|
|
3643
|
+
dismissAlert: string;
|
|
3644
|
+
};
|
|
3645
|
+
breadcrumbs: {
|
|
3646
|
+
label: string;
|
|
3647
|
+
};
|
|
3648
|
+
calendar: {
|
|
3649
|
+
navigationLabel: string;
|
|
3650
|
+
};
|
|
3651
|
+
connected: {
|
|
3652
|
+
fileSelect: {
|
|
3653
|
+
documents: string;
|
|
3654
|
+
drawings: string;
|
|
3655
|
+
forms: string;
|
|
3656
|
+
photos: string;
|
|
3657
|
+
selectAlbum: string;
|
|
3658
|
+
selectAnAlbum: string;
|
|
3659
|
+
selectArea: string;
|
|
3660
|
+
selectAnArea: string;
|
|
3661
|
+
selectDiscipline: string;
|
|
3662
|
+
selectADiscipline: string;
|
|
3663
|
+
selectSet: string;
|
|
3664
|
+
selectASet: string;
|
|
3665
|
+
selectTemplate: string;
|
|
3666
|
+
selectATemplate: string;
|
|
3667
|
+
};
|
|
3668
|
+
emails: {
|
|
3669
|
+
emailSendErrorTitle: string;
|
|
3670
|
+
emailBodyRequiredError: string;
|
|
3671
|
+
emailContentValidationError: string;
|
|
3672
|
+
emailContentDisclaimer: string;
|
|
3673
|
+
recipientSelectPlaceholder: string;
|
|
3674
|
+
emailRecipientRequiredError: string;
|
|
3675
|
+
emailSubjectRequiredError: string;
|
|
3676
|
+
goToAllEmails: string;
|
|
3677
|
+
sendEmail: string;
|
|
3678
|
+
replyAll: string;
|
|
3679
|
+
downloadAll: string;
|
|
3680
|
+
showAll: string;
|
|
3681
|
+
showLess: string;
|
|
3682
|
+
composeEmailPageTitle: string;
|
|
3683
|
+
emailSentMessage: string;
|
|
3684
|
+
from: string;
|
|
3685
|
+
to: string;
|
|
3686
|
+
cc: string;
|
|
3687
|
+
bcc: string;
|
|
3688
|
+
downloadPdfLong: string;
|
|
3689
|
+
downloadPdfShort: string;
|
|
3690
|
+
privateEmailDisclaimer: string;
|
|
3691
|
+
privateLabel: string;
|
|
3692
|
+
settingsLink: string;
|
|
3693
|
+
composeNewEmail: string;
|
|
3694
|
+
startNewCommunication: string;
|
|
3695
|
+
emptyStateTitle: string;
|
|
3696
|
+
emptyStateDescription: string;
|
|
3697
|
+
reply: string;
|
|
3698
|
+
cancel: string;
|
|
3699
|
+
subject: string;
|
|
3700
|
+
subjectPlaceholder: string;
|
|
3701
|
+
};
|
|
3702
|
+
distributionSelect: {
|
|
3703
|
+
noCompany: string;
|
|
3704
|
+
peopleCount: string;
|
|
3705
|
+
distributionGroups: string;
|
|
3706
|
+
people: string;
|
|
3707
|
+
};
|
|
3708
|
+
relatedItems: {
|
|
3709
|
+
cancel: string;
|
|
3710
|
+
close: string;
|
|
3711
|
+
date: string;
|
|
3712
|
+
itemType: string;
|
|
3713
|
+
itemTypeGroupLabel: {
|
|
3714
|
+
dailyLog: string;
|
|
3715
|
+
prostoreFile: string;
|
|
3716
|
+
};
|
|
3717
|
+
itemName: string;
|
|
3718
|
+
loading: string;
|
|
3719
|
+
notes: string;
|
|
3720
|
+
notesPlaceholder: string;
|
|
3721
|
+
newItem: string;
|
|
3722
|
+
noRelatedItems: {
|
|
3723
|
+
title: string;
|
|
3724
|
+
description: string;
|
|
3725
|
+
};
|
|
3726
|
+
noItems: {
|
|
3727
|
+
title: string;
|
|
3728
|
+
description: string;
|
|
3729
|
+
};
|
|
3730
|
+
noResultsSearchQuery: {
|
|
3731
|
+
title: string;
|
|
3732
|
+
description: string;
|
|
3733
|
+
};
|
|
3734
|
+
noResultsServerError: {
|
|
3735
|
+
title: string;
|
|
3736
|
+
description: string;
|
|
3737
|
+
action: string;
|
|
3738
|
+
};
|
|
3739
|
+
panelTitle: string;
|
|
3740
|
+
search: string;
|
|
3741
|
+
searchItemType: string;
|
|
3742
|
+
submit: string;
|
|
3743
|
+
toast: {
|
|
3744
|
+
itemAdded: string;
|
|
3745
|
+
itemAdditionFailed: string;
|
|
3746
|
+
itemRemoved: string;
|
|
3747
|
+
requestError: string;
|
|
3748
|
+
};
|
|
3749
|
+
};
|
|
3750
|
+
};
|
|
3751
|
+
dateTimeFormat: {
|
|
3752
|
+
dateAtTime: string;
|
|
3753
|
+
timeOnDate: string;
|
|
3754
|
+
};
|
|
3755
|
+
table: {
|
|
3756
|
+
sortableColumn: string;
|
|
3757
|
+
};
|
|
3758
|
+
dataTable: {
|
|
3759
|
+
emptyState: {
|
|
3760
|
+
noFilteredResults: {
|
|
3761
|
+
description: string;
|
|
3762
|
+
title: string;
|
|
3763
|
+
};
|
|
3764
|
+
};
|
|
3765
|
+
exporting: string;
|
|
3766
|
+
filters: {
|
|
3767
|
+
filters: string;
|
|
3768
|
+
moreFilters: string;
|
|
3769
|
+
clearAllFilters: string;
|
|
3770
|
+
};
|
|
3771
|
+
grandTotals: string;
|
|
3772
|
+
search: string;
|
|
3773
|
+
subtotals: string;
|
|
3774
|
+
tableSettings: {
|
|
3775
|
+
configureColumns: string;
|
|
3776
|
+
resetToDefault: string;
|
|
3777
|
+
rowHeight: string;
|
|
3778
|
+
small: string;
|
|
3779
|
+
medium: string;
|
|
3780
|
+
large: string;
|
|
3781
|
+
tableSettings: string;
|
|
3782
|
+
};
|
|
3783
|
+
};
|
|
3784
|
+
dateInput: {
|
|
3785
|
+
clear: string;
|
|
3786
|
+
ariaLabel: string;
|
|
3787
|
+
segment: {
|
|
3788
|
+
ariaLabel: {
|
|
3789
|
+
withValue: {
|
|
3790
|
+
month: string;
|
|
3791
|
+
day: string;
|
|
3792
|
+
year: string;
|
|
3793
|
+
};
|
|
3794
|
+
withoutValue: {
|
|
3795
|
+
month: string;
|
|
3796
|
+
day: string;
|
|
3797
|
+
year: string;
|
|
3798
|
+
};
|
|
3799
|
+
};
|
|
3800
|
+
ariaValueText: {
|
|
3801
|
+
empty: string;
|
|
3802
|
+
};
|
|
3803
|
+
};
|
|
3804
|
+
clearButton: {
|
|
3805
|
+
ariaLabel: string;
|
|
3806
|
+
};
|
|
3807
|
+
};
|
|
3808
|
+
dropdown: {
|
|
3809
|
+
search: string;
|
|
3810
|
+
moreOptions: string;
|
|
3811
|
+
loading: string;
|
|
3812
|
+
};
|
|
3813
|
+
dropzone: {
|
|
3814
|
+
uploadFiles: {
|
|
3815
|
+
one: string;
|
|
3816
|
+
other: string;
|
|
3817
|
+
};
|
|
3818
|
+
dragAndDrop: string;
|
|
3819
|
+
incorrectFileTypeMessage: {
|
|
3820
|
+
one: string;
|
|
3821
|
+
other: string;
|
|
3822
|
+
};
|
|
3823
|
+
incorrectFileNumber: string;
|
|
3824
|
+
invalidAmountAttachments: {
|
|
3825
|
+
one: string;
|
|
3826
|
+
other: string;
|
|
3827
|
+
};
|
|
3828
|
+
hideDetails: string;
|
|
3829
|
+
showDetails: string;
|
|
3830
|
+
errorTitle: string;
|
|
3831
|
+
oneFileAtATimeError: string;
|
|
3832
|
+
multipleErrorsMessage: string;
|
|
3833
|
+
maxFileSizeErrorGroup: string;
|
|
3834
|
+
minFileSizeErrorGroup: string;
|
|
3835
|
+
maxFileNumberErrorGroup: string;
|
|
3836
|
+
wrongFileTypeErrorGroup: string;
|
|
3837
|
+
standaloneMaxFileNumberError: string;
|
|
3838
|
+
standaloneUnsupportedFileTypeError: string;
|
|
3839
|
+
standaloneMinFileSizeError: string;
|
|
3840
|
+
standaloneMaxFileSizeError: string;
|
|
3841
|
+
uploadTotalProgress: {
|
|
3842
|
+
withFailed: string;
|
|
3843
|
+
withoutFailed: string;
|
|
3844
|
+
};
|
|
3845
|
+
};
|
|
3846
|
+
modal: {
|
|
3847
|
+
a11y: {
|
|
3848
|
+
close: string;
|
|
3849
|
+
};
|
|
3850
|
+
cancel: string;
|
|
3851
|
+
};
|
|
3852
|
+
multiSelect: {
|
|
3853
|
+
clearAll: string;
|
|
3854
|
+
selectValues: string;
|
|
3855
|
+
noResults: string;
|
|
3856
|
+
};
|
|
3857
|
+
tearsheet: {
|
|
3858
|
+
a11y: {
|
|
3859
|
+
close: string;
|
|
3860
|
+
};
|
|
3861
|
+
};
|
|
3862
|
+
fileAttacher: {
|
|
3863
|
+
attachFiles: {
|
|
3864
|
+
one: string;
|
|
3865
|
+
other: string;
|
|
3866
|
+
};
|
|
3867
|
+
};
|
|
3868
|
+
fileToken: {
|
|
3869
|
+
uploading: string;
|
|
3870
|
+
};
|
|
3871
|
+
tree: {
|
|
3872
|
+
selectionLimit: {
|
|
3873
|
+
one: string;
|
|
3874
|
+
other: string;
|
|
3875
|
+
};
|
|
3876
|
+
unsupportedFileType: {
|
|
3877
|
+
specific: string;
|
|
3878
|
+
unspecific: string;
|
|
3879
|
+
};
|
|
3880
|
+
};
|
|
3881
|
+
fileExplorer: {
|
|
3882
|
+
filesSelectedWithLimit: string;
|
|
3883
|
+
ungroupedThumbnailGridGroup: string;
|
|
3884
|
+
filesSelected: {
|
|
3885
|
+
one: string;
|
|
3886
|
+
other: string;
|
|
3887
|
+
};
|
|
3888
|
+
cancelAction: string;
|
|
3889
|
+
attachAction: string;
|
|
3890
|
+
maxNumberOfFilesSelected: string;
|
|
3891
|
+
modalTitle: string;
|
|
3892
|
+
filesPendingUpload: string;
|
|
3893
|
+
noSelectedItems: string;
|
|
3894
|
+
emptySearchResults: string;
|
|
3895
|
+
noItems: string;
|
|
3896
|
+
searchPlaceholder: string;
|
|
3897
|
+
uploadFailed: string;
|
|
3898
|
+
supportedFileTypes: string;
|
|
3899
|
+
};
|
|
3900
|
+
form: {
|
|
3901
|
+
closeWithConfirm: {
|
|
3902
|
+
confirmMessage: string;
|
|
3903
|
+
};
|
|
3904
|
+
checkbox: {
|
|
3905
|
+
no: string;
|
|
3906
|
+
yes: string;
|
|
3907
|
+
deselected: string;
|
|
3908
|
+
selected: string;
|
|
3909
|
+
};
|
|
3910
|
+
errorBanner: {
|
|
3911
|
+
coundNotCreateItem: string;
|
|
3912
|
+
couldNotUpdateItem: string;
|
|
3913
|
+
fixErrorsToCreate: string;
|
|
3914
|
+
fixErrorsToUpdate: string;
|
|
3915
|
+
};
|
|
3916
|
+
field: {
|
|
3917
|
+
tooltipHelp: string;
|
|
3918
|
+
};
|
|
3919
|
+
};
|
|
3920
|
+
menu: {
|
|
3921
|
+
search: string;
|
|
3922
|
+
};
|
|
3923
|
+
pagination: {
|
|
3924
|
+
interval: string;
|
|
3925
|
+
notation: string;
|
|
3926
|
+
page: string;
|
|
3927
|
+
nextPage: string;
|
|
3928
|
+
prevPage: string;
|
|
3929
|
+
};
|
|
3930
|
+
search: {
|
|
3931
|
+
clear: string;
|
|
3932
|
+
goSearch: string;
|
|
3933
|
+
};
|
|
3934
|
+
select: {
|
|
3935
|
+
clear: string;
|
|
3936
|
+
search: string;
|
|
3937
|
+
};
|
|
3938
|
+
tabs: {
|
|
3939
|
+
more: string;
|
|
3940
|
+
};
|
|
3941
|
+
thumbnail: {
|
|
3942
|
+
checked: string;
|
|
3943
|
+
};
|
|
3944
|
+
thumbnailList: {
|
|
3945
|
+
removeUpload: string;
|
|
3946
|
+
uploading: string;
|
|
3947
|
+
};
|
|
3948
|
+
toast: {
|
|
3949
|
+
a11y: {
|
|
3950
|
+
dismiss: string;
|
|
3951
|
+
};
|
|
3952
|
+
};
|
|
3953
|
+
fileList: {
|
|
3954
|
+
downloadAll: string;
|
|
3955
|
+
download: string;
|
|
3956
|
+
noPreview: string;
|
|
3957
|
+
};
|
|
3958
|
+
tieredSelect: {
|
|
3959
|
+
emptyMessage: string;
|
|
3960
|
+
goToTier: string;
|
|
3961
|
+
placeholder: string;
|
|
3962
|
+
quickCreateActionLabel: string;
|
|
3963
|
+
quickCreateCancelLabel: string;
|
|
3964
|
+
quickCreateCreateLabel: string;
|
|
3965
|
+
quickCreatePlaceholder: string;
|
|
3966
|
+
searchEmptyMessage: string;
|
|
3967
|
+
searchPlaceholder: string;
|
|
3968
|
+
spinnerLabel: string;
|
|
3969
|
+
};
|
|
3970
|
+
tieredDropdown: {
|
|
3971
|
+
emptyMessage: string;
|
|
3972
|
+
searchEmptyMessage: string;
|
|
3973
|
+
searchPlaceholder: string;
|
|
3974
|
+
spinnerLabel: string;
|
|
3975
|
+
};
|
|
3976
|
+
token: {
|
|
3977
|
+
remove: string;
|
|
3978
|
+
};
|
|
3979
|
+
toolHeader: {
|
|
3980
|
+
settingsAction: string;
|
|
3981
|
+
};
|
|
3982
|
+
fileSelect: {
|
|
3983
|
+
localFilesSource: string;
|
|
3984
|
+
uploadFailed: string;
|
|
3985
|
+
maxNumberOfFilesSelected: string;
|
|
3986
|
+
};
|
|
3987
|
+
required: {
|
|
3988
|
+
requiredFields: string;
|
|
3989
|
+
};
|
|
3990
|
+
avatarStack: {
|
|
3991
|
+
viewAll: string;
|
|
3992
|
+
close: string;
|
|
3993
|
+
};
|
|
3994
|
+
panel: {
|
|
3995
|
+
close: string;
|
|
3996
|
+
goBack: string;
|
|
3997
|
+
};
|
|
3998
|
+
};
|
|
3999
|
+
};
|
|
3621
4000
|
readonly ko: {};
|
|
3622
4001
|
readonly 'pt-BR': {
|
|
3623
4002
|
core: {
|
|
@@ -3886,6 +4265,8 @@ export declare const coreTranslations: {
|
|
|
3886
4265
|
checkbox: {
|
|
3887
4266
|
no: string;
|
|
3888
4267
|
yes: string;
|
|
4268
|
+
deselected: string;
|
|
4269
|
+
selected: string;
|
|
3889
4270
|
};
|
|
3890
4271
|
errorBanner: {
|
|
3891
4272
|
coundNotCreateItem: string;
|
|
@@ -4244,6 +4625,8 @@ export declare const coreTranslations: {
|
|
|
4244
4625
|
checkbox: {
|
|
4245
4626
|
no: string;
|
|
4246
4627
|
yes: string;
|
|
4628
|
+
deselected: string;
|
|
4629
|
+
selected: string;
|
|
4247
4630
|
};
|
|
4248
4631
|
errorBanner: {
|
|
4249
4632
|
coundNotCreateItem: string;
|
|
@@ -4602,6 +4985,8 @@ export declare const coreTranslations: {
|
|
|
4602
4985
|
checkbox: {
|
|
4603
4986
|
no: string;
|
|
4604
4987
|
yes: string;
|
|
4988
|
+
deselected: string;
|
|
4989
|
+
selected: string;
|
|
4605
4990
|
};
|
|
4606
4991
|
errorBanner: {
|
|
4607
4992
|
coundNotCreateItem: string;
|
|
@@ -4698,6 +5083,6 @@ export declare function useI18n({ locale: _locale, translations: _translations,
|
|
|
4698
5083
|
export declare const I18nContext: React.Context<I18njs>;
|
|
4699
5084
|
export declare function I18nProvider({ children, ...props }: I18nConfig & {
|
|
4700
5085
|
children: React.ReactNode;
|
|
4701
|
-
}): JSX.Element;
|
|
5086
|
+
}): React.JSX.Element;
|
|
4702
5087
|
export declare function useI18nContext(): I18njs;
|
|
4703
5088
|
export {};
|
|
@@ -35,7 +35,7 @@ export declare const InjectedScriptContext: React.Context<InjectedScriptApi>;
|
|
|
35
35
|
* @deprecatedSince 9
|
|
36
36
|
* @deprecated Never officially documented/supported
|
|
37
37
|
*/
|
|
38
|
-
export declare function InjectedScriptProvider({ children, ...props }: Props): JSX.Element;
|
|
38
|
+
export declare function InjectedScriptProvider({ children, ...props }: Props): React.JSX.Element;
|
|
39
39
|
/**
|
|
40
40
|
* @deprecatedSince 9
|
|
41
41
|
* @deprecated Never officially documented/supported
|
|
@@ -65,7 +65,7 @@ export declare const ListNavigationContext: React.Context<ListNavigationApi>;
|
|
|
65
65
|
* @deprecatedSince 9
|
|
66
66
|
* @deprecated Never officially documented/supported
|
|
67
67
|
*/
|
|
68
|
-
export declare function ListNavigationProvider({ children, ...props }: Props): JSX.Element;
|
|
68
|
+
export declare function ListNavigationProvider({ children, ...props }: Props): React.JSX.Element;
|
|
69
69
|
/**
|
|
70
70
|
* @deprecatedSince 9
|
|
71
71
|
* @deprecated Never officially documented/supported
|
|
@@ -86,7 +86,7 @@ export declare const TextEntryContext: React.Context<{
|
|
|
86
86
|
* @deprecatedSince 9.7.0
|
|
87
87
|
* @deprecated
|
|
88
88
|
*/
|
|
89
|
-
export declare function TextEntryProvider({ children, ...props }: Props): JSX.Element;
|
|
89
|
+
export declare function TextEntryProvider({ children, ...props }: Props): React.JSX.Element;
|
|
90
90
|
/**
|
|
91
91
|
* @deprecatedSince 9.7.0
|
|
92
92
|
* @deprecated
|
package/dist/_hooks/Timer.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const TimerContext: React.Context<TimerApi>;
|
|
|
36
36
|
* @deprecatedSince 9
|
|
37
37
|
* @deprecated Never officially documented/supported
|
|
38
38
|
*/
|
|
39
|
-
export declare function TimerProvider({ children }: Props): JSX.Element;
|
|
39
|
+
export declare function TimerProvider({ children }: Props): React.JSX.Element;
|
|
40
40
|
/**
|
|
41
41
|
* @deprecatedSince 9
|
|
42
42
|
* @deprecated Never officially documented/supported
|
package/dist/_hooks/Trigger.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare const TriggerContext: React.Context<TriggerApi>;
|
|
|
65
65
|
* @deprecatedSince 9
|
|
66
66
|
* @deprecated Never officially documented/supported
|
|
67
67
|
*/
|
|
68
|
-
export declare function TriggerProvider({ children, ...props }: TriggerProps): JSX.Element;
|
|
68
|
+
export declare function TriggerProvider({ children, ...props }: TriggerProps): React.JSX.Element;
|
|
69
69
|
/**
|
|
70
70
|
* @deprecatedSince 9
|
|
71
71
|
* @deprecated Never officially documented/supported
|
|
@@ -43,7 +43,7 @@ export declare const VisibilityContext: React.Context<VisibilityApi>;
|
|
|
43
43
|
* @deprecatedSince 9
|
|
44
44
|
* @deprecated Never officially documented/supported
|
|
45
45
|
*/
|
|
46
|
-
export declare function VisibilityProvider({ children, ...props }: Props): JSX.Element;
|
|
46
|
+
export declare function VisibilityProvider({ children, ...props }: Props): React.JSX.Element;
|
|
47
47
|
/**
|
|
48
48
|
* @deprecatedSince 9
|
|
49
49
|
* @deprecated Never officially documented/supported
|
package/dist/_hooks/ZIndex.d.ts
CHANGED
|
@@ -20,6 +20,6 @@ export declare function useZIndex({ initialValue, }: ZIndexConfig): ZIndexApi;
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function ZIndex({ children, ...props }: RenderProps): {};
|
|
22
22
|
export declare const ZIndexContext: React.Context<ZIndexApi>;
|
|
23
|
-
export declare function ZIndexProvider({ children, ...props }: Props): JSX.Element;
|
|
23
|
+
export declare function ZIndexProvider({ children, ...props }: Props): React.JSX.Element;
|
|
24
24
|
export declare function useZIndexContext(): ZIndexApi;
|
|
25
25
|
export {};
|
|
@@ -20,6 +20,21 @@ const mockScope = () => {
|
|
|
20
20
|
return { current: scope }
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const mockWindowScope = () => {
|
|
24
|
+
const listeners = {}
|
|
25
|
+
|
|
26
|
+
const scope = {
|
|
27
|
+
addEventListener: jest.fn((event, cb) => {
|
|
28
|
+
listeners[event] = cb
|
|
29
|
+
}),
|
|
30
|
+
removeEventListener: jest.fn((event, cb) => {
|
|
31
|
+
listeners[event] = null
|
|
32
|
+
}),
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return scope
|
|
36
|
+
}
|
|
37
|
+
|
|
23
38
|
const Enhanced = (props) => {
|
|
24
39
|
useEventListener(props)
|
|
25
40
|
|
|
@@ -44,6 +59,37 @@ describe('useEventListener', () => {
|
|
|
44
59
|
})
|
|
45
60
|
})
|
|
46
61
|
|
|
62
|
+
describe('scope types', () => {
|
|
63
|
+
const scopeA = mockWindowScope()
|
|
64
|
+
|
|
65
|
+
mount(<Enhanced event="scroll" handler={noop} scope={scopeA} />)
|
|
66
|
+
|
|
67
|
+
it('adds listeners to custom window scope', (done) => {
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
expect(scopeA.addEventListener).toBeCalledTimes(1)
|
|
70
|
+
done()
|
|
71
|
+
}, 10)
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
it('adds listeners to ref scope', (done) => {
|
|
75
|
+
const scopeB = mockScope()
|
|
76
|
+
|
|
77
|
+
mount(<Enhanced event="scroll" handler={noop} scope={scopeB} />)
|
|
78
|
+
|
|
79
|
+
setTimeout(() => {
|
|
80
|
+
expect(scopeB.current.addEventListener).toBeCalledTimes(1)
|
|
81
|
+
done()
|
|
82
|
+
}, 10)
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
it('adds listeners to window when no scope is passed', () => {
|
|
86
|
+
global.addEventListener = jest.fn()
|
|
87
|
+
mount(<Enhanced event="scroll" handler={noop} />)
|
|
88
|
+
|
|
89
|
+
expect(global.addEventListener).toHaveBeenCalled()
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
|
|
47
93
|
describe('event type changes', () => {
|
|
48
94
|
const scope = mockScope()
|
|
49
95
|
|
package/dist/_hooks/useSet.js
CHANGED
|
@@ -18,18 +18,18 @@ export function useSet() {
|
|
|
18
18
|
setCollection = _React$useState2[1];
|
|
19
19
|
var removeFromSet = React.useCallback(function (collection, item) {
|
|
20
20
|
collection["delete"](item);
|
|
21
|
-
onRemove
|
|
21
|
+
onRemove === null || onRemove === void 0 ? void 0 : onRemove(item);
|
|
22
22
|
return new Set(collection);
|
|
23
23
|
}, [onRemove]);
|
|
24
24
|
var addToSet = React.useCallback(function (collection, item) {
|
|
25
25
|
collection.add(item);
|
|
26
|
-
onAdd
|
|
26
|
+
onAdd === null || onAdd === void 0 ? void 0 : onAdd(item);
|
|
27
27
|
return new Set(collection);
|
|
28
28
|
}, [onAdd]);
|
|
29
29
|
var updateCollection = React.useCallback(function (updater) {
|
|
30
30
|
setCollection(function (prevCollection) {
|
|
31
31
|
var newCollection = updater(prevCollection);
|
|
32
|
-
onChange
|
|
32
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newCollection);
|
|
33
33
|
return newCollection;
|
|
34
34
|
});
|
|
35
35
|
}, [onChange]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSet.js","names":["React","useSet","_ref","arguments","length","undefined","_ref$initialValue","initialValue","Set","onChange","onAdd","onRemove","_React$useState","useState","_React$useState2","_slicedToArray","collection","setCollection","removeFromSet","useCallback","item","addToSet","add","updateCollection","updater","prevCollection","newCollection","has","remove","set","toggle","removeAll"],"sources":["../../src/_hooks/useSet.ts"],"sourcesContent":["import React from 'react'\n\nexport interface SetHookConfig<T> {\n /**\n * @since 10.19.0\n */\n initialValue?: Set<T>\n /**\n * @since 10.19.0\n */\n onChange?: (newCollection: Set<T>) => void\n /**\n * @since 10.19.0\n */\n onAdd?: (item: T) => void\n /**\n * @since 10.19.0\n */\n onRemove?: (item: T) => void\n}\n\nexport function useSet<T>({\n initialValue = new Set(),\n onChange,\n onAdd,\n onRemove,\n}: SetHookConfig<T> = {}) {\n const [collection, setCollection] = React.useState<Set<T>>(initialValue)\n\n const removeFromSet = React.useCallback(\n (collection: Set<T>, item: T) => {\n collection.delete(item)\n onRemove
|
|
1
|
+
{"version":3,"file":"useSet.js","names":["React","useSet","_ref","arguments","length","undefined","_ref$initialValue","initialValue","Set","onChange","onAdd","onRemove","_React$useState","useState","_React$useState2","_slicedToArray","collection","setCollection","removeFromSet","useCallback","item","addToSet","add","updateCollection","updater","prevCollection","newCollection","has","remove","set","toggle","removeAll"],"sources":["../../src/_hooks/useSet.ts"],"sourcesContent":["import React from 'react'\n\nexport interface SetHookConfig<T> {\n /**\n * @since 10.19.0\n */\n initialValue?: Set<T>\n /**\n * @since 10.19.0\n */\n onChange?: (newCollection: Set<T>) => void\n /**\n * @since 10.19.0\n */\n onAdd?: (item: T) => void\n /**\n * @since 10.19.0\n */\n onRemove?: (item: T) => void\n}\n\nexport function useSet<T>({\n initialValue = new Set(),\n onChange,\n onAdd,\n onRemove,\n}: SetHookConfig<T> = {}) {\n const [collection, setCollection] = React.useState<Set<T>>(initialValue)\n\n const removeFromSet = React.useCallback(\n (collection: Set<T>, item: T) => {\n collection.delete(item)\n onRemove?.(item)\n return new Set(collection)\n },\n [onRemove]\n )\n\n const addToSet = React.useCallback(\n (collection: Set<T>, item: T) => {\n collection.add(item)\n onAdd?.(item)\n return new Set(collection)\n },\n [onAdd]\n )\n\n const updateCollection = React.useCallback(\n (updater: (prevCollection: Set<T>) => Set<T>) => {\n setCollection((prevCollection) => {\n const newCollection = updater(prevCollection)\n onChange?.(newCollection)\n return newCollection\n })\n },\n [onChange]\n )\n\n const has = React.useCallback((item: T) => collection.has(item), [collection])\n\n const add = React.useCallback(\n (item: T) =>\n updateCollection((prevCollection) => addToSet(prevCollection, item)),\n [addToSet, updateCollection]\n )\n\n const remove = React.useCallback(\n (item: T) =>\n updateCollection((prevCollection) => removeFromSet(prevCollection, item)),\n [removeFromSet, updateCollection]\n )\n\n const set = React.useCallback(\n (newCollection: Set<T>) => updateCollection(() => newCollection),\n [updateCollection]\n )\n\n const toggle = React.useCallback(\n (item: T) =>\n updateCollection((prevCollection) =>\n prevCollection.has(item)\n ? removeFromSet(prevCollection, item)\n : addToSet(prevCollection, item)\n ),\n [addToSet, removeFromSet, updateCollection]\n )\n\n const removeAll = React.useCallback(\n () => updateCollection(() => new Set()),\n [updateCollection]\n )\n\n return {\n collection,\n setCollection: set,\n has,\n add,\n remove,\n removeAll,\n toggle,\n }\n}\n"],"mappings":"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"}
|
package/dist/_locales/de-DE.json
CHANGED