@procore/core-react 12.17.5 → 12.17.6
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/AnchorNavigation/AnchorNavigationProvider.js +5 -5
- package/dist/Avatar/Avatar.js +9 -9
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.js +14 -14
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.js +1 -1
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.js +8 -8
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.js +3 -3
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +9 -9
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.js +7 -7
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.js +4 -4
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.js +3 -3
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.js +9 -9
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +2 -2
- package/dist/CheckboxGroup/CheckboxGroup.js +8 -8
- package/dist/ClickOutside/ClickOutside.js +3 -3
- package/dist/ContactItem/ContactItem.js +3 -3
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.js +11 -11
- package/dist/DateInput/DateInput.styles.js +10 -10
- package/dist/DateSelect/DateSelect.js +8 -8
- package/dist/DetailPage/DetailPage.js +3 -3
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/DetailPage/examples/TableExample.js +5 -5
- package/dist/DetailPageTemplate/DetailPageTemplate.js +3 -3
- package/dist/Dropdown/Dropdown.js +8 -8
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.helpers.js +14 -14
- package/dist/DropdownFlyout/DropdownFlyout.js +8 -8
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.hooks.js +16 -16
- package/dist/Dropzone/Dropzone.js +13 -13
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.js +3 -3
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.js +3 -3
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.js +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerModal.js +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.js +5 -5
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileExplorer/useSidebarNavigation.js +8 -8
- package/dist/FileSelect/FileSelect.js +21 -21
- package/dist/FileSelect/FileSelect.js.map +1 -1
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.js +5 -5
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.js +8 -8
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.js +20 -20
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.js +19 -19
- package/dist/FileSelect/LocalSource/LocalSource.js.map +1 -1
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/ProgressAnnouncer/ProgressAnnouncer.js +11 -11
- package/dist/FileSelect/SourceItem/SourceItem.js +3 -3
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.js +8 -8
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.js +21 -21
- package/dist/FileSelect/TreeSource/TreeSource.js.map +1 -1
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileSelect/storyHelpers.js +4 -4
- package/dist/FileSelect/storyHelpers.js.map +1 -1
- package/dist/FileToken/FileToken.js +8 -8
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.js +9 -9
- package/dist/FilterToken/FilterToken.styles.js +2 -2
- package/dist/Flex/Flex.js +3 -3
- package/dist/FlexList/FlexList.js +3 -3
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.js +22 -18
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/FormFieldTooltip.js +1 -1
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/Form/stories/util.js +9 -9
- package/dist/GhostPlaceholder/GhostPlaceholder.js +3 -3
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.js +3 -3
- package/dist/Grid/Grid.styles.js +3 -3
- package/dist/Grid/Grid.utils.js +5 -5
- package/dist/GroupSelect/GroupSelect.js +17 -17
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.js +3 -3
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.js +3 -3
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.js +3 -3
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.js +3 -3
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/Menu/Menu.js +15 -15
- package/dist/MenuImperative/MenuImperative.js +15 -15
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/MenuImperative/sensors.js +8 -8
- package/dist/MenuImperative/sensors.js.map +1 -1
- package/dist/Modal/ChildRegistry.context.js +11 -11
- package/dist/Modal/Modal.js +8 -8
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/Modal/Modal.types.d.ts +3 -1
- package/dist/Modal/Modal.types.js.map +1 -1
- package/dist/Modal/storyHelpers.js +7 -7
- package/dist/MultiSelect/MultiSelect.js +17 -17
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.js +14 -14
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextMenu/NextMenuItem.js +3 -3
- package/dist/NextMenu/sampleData.js +7 -6
- package/dist/NextMenu/sampleData.js.map +1 -1
- package/dist/NextTile/NextTile.js +9 -9
- package/dist/Notation/Notation.js +4 -4
- package/dist/NumberInput/NumberInput.hooks.js +5 -5
- package/dist/NumberInput/NumberInput.js +14 -14
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/NumberInput/NumberInput.utils.js +11 -11
- package/dist/Overlay/OverlayArrow.js +4 -4
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.js +15 -15
- package/dist/OverlayTrigger/a11yPresets.js +6 -6
- package/dist/PageFooterTemplate/PageFooterTemplate.js +3 -3
- package/dist/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageHeaderTemplate/PageHeaderTemplate.js +3 -3
- package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageHeaderTemplate/PageHeaderTemplate.utils.js +5 -5
- package/dist/PageLayout/PageLayout.js +15 -15
- package/dist/PageLayout/PageLayout.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate.js +3 -3
- package/dist/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/PageTemplate/PageTemplateCard.js +3 -3
- package/dist/Pagination/Pagination.js +3 -3
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Pagination/PaginationSelect.js +3 -3
- package/dist/Panel/Panel.js +8 -8
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.js +3 -3
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.js +8 -8
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.js +9 -9
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.js +3 -3
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.js +8 -8
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.js +3 -3
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.hooks.js +5 -5
- package/dist/Search/Search.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.js +14 -14
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.js +14 -14
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +8 -8
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.js +3 -3
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/SettingsPage/SettingsPage.js +3 -3
- package/dist/SettingsPageTemplate/SettingsPageTemplate.js +3 -3
- package/dist/Slider/Slider.js +8 -8
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.js +3 -3
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.context.js +5 -5
- package/dist/SplitViewCard/SplitViewCard.js +8 -8
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.js +8 -8
- package/dist/SuperSelect/SuperSelect.js +7 -7
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/SuperSelect/SuperSelect.utils.js +14 -14
- package/dist/SuperSelect/presets/contactsPreset.js +3 -3
- package/dist/SuperSelect/presets/filterPreset.js +1 -1
- package/dist/SuperSelect/useSuperSelect.js +14 -14
- package/dist/Switch/Switch.js +3 -3
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.js +9 -9
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.js +3 -3
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.js +17 -17
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.js +11 -11
- package/dist/Tearsheet/Tearsheet.js.map +1 -1
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.js +3 -3
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/TextEditor.js +17 -17
- package/dist/TextEditorOutput/TextEditorOutput.js +9 -9
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +8 -0
- package/dist/Thumbnail/Thumbnail.hooks.js +8 -8
- package/dist/Thumbnail/Thumbnail.js +9 -9
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/Thumbnail/Thumbnail.utils.js +9 -9
- package/dist/Thumbnail/ThumbnailCaption.js +3 -3
- package/dist/Thumbnail/ThumbnailDocumentIcon.js +5 -5
- package/dist/Thumbnail/ThumbnailPreview.js +5 -5
- package/dist/ThumbnailGrid/ThumbnailGrid.hooks.js +5 -5
- package/dist/ThumbnailGrid/ThumbnailGrid.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredDropdown/TieredDropdown.js +14 -14
- package/dist/TieredDropdown/useSearch.js +5 -5
- package/dist/TieredSelect/LeafSelectionTieredSelect.js +8 -8
- package/dist/TieredSelect/TierSelectionTieredSelect.js +17 -17
- package/dist/TieredSelect/TieredSelect.js +8 -8
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/TieredSelect/TieredSelectMenu.js +17 -17
- package/dist/Tile/Tile.js +3 -3
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.js +3 -3
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.js +4 -4
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.js +4 -4
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ActionIcon.js +3 -3
- package/dist/ToolHeader/ToolHeader.js +9 -9
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.js +3 -3
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js +3 -3
- package/dist/Tooltip/Tooltip.js +8 -8
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.hooks.js +14 -14
- package/dist/Tree/Tree.hooks.js.map +1 -1
- package/dist/Tree/Tree.js +14 -14
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/Anchor.js +19 -16
- package/dist/_hooks/Anchor.js.map +1 -1
- package/dist/_hooks/Buffer.js +8 -7
- package/dist/_hooks/Buffer.js.map +1 -1
- package/dist/_hooks/ClickOutside.js +2 -1
- package/dist/_hooks/ClickOutside.js.map +1 -1
- package/dist/_hooks/DateTime/DateTime.js +17 -17
- package/dist/_hooks/DelayedCallback.js +1 -1
- package/dist/_hooks/DelayedToggle.js +7 -2
- package/dist/_hooks/DelayedToggle.js.map +1 -1
- package/dist/_hooks/Deprecation.js +1 -0
- package/dist/_hooks/Deprecation.js.map +1 -1
- package/dist/_hooks/EventListener.js +5 -5
- package/dist/_hooks/FocusScopeOverride.js +6 -6
- package/dist/_hooks/Hotkey.js +2 -2
- package/dist/_hooks/I18n.js +13 -13
- package/dist/_hooks/InjectedScript.js +8 -7
- package/dist/_hooks/InjectedScript.js.map +1 -1
- package/dist/_hooks/IntersectionObserver/useIntersectionObserver.js +5 -5
- package/dist/_hooks/ListNavigation.js +9 -7
- package/dist/_hooks/ListNavigation.js.map +1 -1
- package/dist/_hooks/OverflowObserver/OverflowObserver.js +6 -6
- package/dist/_hooks/ResizeObserver.js +5 -5
- package/dist/_hooks/TextEntry.js +5 -2
- package/dist/_hooks/TextEntry.js.map +1 -1
- package/dist/_hooks/Timer.js +1 -0
- package/dist/_hooks/Timer.js.map +1 -1
- package/dist/_hooks/Trigger.js +19 -13
- package/dist/_hooks/Trigger.js.map +1 -1
- package/dist/_hooks/Visibility.js +9 -7
- package/dist/_hooks/Visibility.js.map +1 -1
- package/dist/_hooks/ZIndex.js +7 -7
- package/dist/_hooks/getI18nProviderLocale.js +2 -1
- package/dist/_hooks/getI18nProviderLocale.js.map +1 -1
- package/dist/_hooks/useCurrentMedia.js +5 -5
- package/dist/_hooks/useFileUploader.js +15 -15
- package/dist/_hooks/useFileUploader.js.map +1 -1
- package/dist/_hooks/useFocusWithin.js +5 -5
- package/dist/_hooks/useMediaLessThan.js +5 -5
- package/dist/_hooks/useSet.js +5 -5
- package/dist/_styles/colors.js +6 -6
- package/dist/_styles/spacing.d.ts +27 -0
- package/dist/_styles/spacing.js +27 -0
- package/dist/_styles/spacing.js.map +1 -1
- 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 +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 +745 -745
- 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 +50 -50
- 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 +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 +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 +19 -19
- 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 +11 -11
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +6 -6
- 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/dist/_utils/TinyMCE.js +4 -4
- package/dist/_utils/closeWithConfirm.js +5 -5
- package/dist/_utils/dateTime.js +6 -6
- package/dist/_utils/getAnchorPosition.js +11 -11
- package/dist/_utils/partition.js +5 -5
- package/dist/_utils/runInQueue.js +4 -4
- package/dist/_utils/runInQueue.js.map +1 -1
- package/dist/_utils/slotify.js +7 -7
- package/dist/_utils/triggerListeners.js +6 -6
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListNavigation.js","names":["React","clamp","max","n","Math","min","wrap","useListNavigation","_ref","_ref$circular","circular","_ref$initialIndex","initialIndex","_ref$size","size","initialSize","_React$useState","useState","_React$useState2","_slicedToArray","index","setIndex","_React$useState3","_React$useState4","setSize","set","useCallback","i","clear","increment","incrementBy","amount","decrement","decrementBy","reset","ListNavigation","_ref2","children","props","_objectWithoutProperties","_excluded","listNavigation"],"sources":["../../src/_hooks/ListNavigation.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface ListNavigationConfig {\n circular?: boolean\n initialIndex?: number\n size?: number\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface ListNavigationApi {\n clear: () => void\n decrement: () => void\n decrementBy: (amount: number) => void\n increment: () => void\n incrementBy: (amount: number) => void\n index: number\n reset: () => void\n set: (index: number) => void\n setSize: (index: number) => void\n size: number\n}\n\ninterface Props extends ListNavigationConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends ListNavigationConfig {\n children: (props: ListNavigationApi) => {}\n}\n\nfunction clamp(max: number, n: number) {\n return Math.min(max - 1, Math.max(0, n))\n}\n\nfunction wrap(max: number, n: number) {\n if (max === 0) {\n return n\n }\n\n return n < 0 ? max + n : n % max\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useListNavigation({\n circular = false,\n initialIndex = 0,\n size: initialSize = 0,\n}: ListNavigationConfig): ListNavigationApi {\n const [index, setIndex] = React.useState(initialIndex)\n\n const [size, setSize] = React.useState(initialSize)\n\n const set = React.useCallback(\n function (i: number) {\n if (size === 0) {\n setIndex(i)\n } else {\n setIndex(clamp(size, circular ? wrap(size, i) : i))\n }\n },\n [circular, size]\n )\n\n function clear() {\n set(0)\n }\n\n function increment() {\n set(index + 1)\n }\n\n function incrementBy(amount: number) {\n set(index + amount)\n }\n\n function decrement() {\n set(index - 1)\n }\n\n function decrementBy(amount: number) {\n set(index - amount)\n }\n\n function reset() {\n set(initialIndex)\n }\n\n return {\n clear,\n decrement,\n decrementBy,\n increment,\n incrementBy,\n index,\n reset,\n set,\n setSize,\n size,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function ListNavigation({ children, ...props }: RenderProps) {\n const listNavigation = useListNavigation(props)\n\n return typeof children === 'function' ? children(listNavigation) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"ListNavigation.js","names":["React","clamp","max","n","Math","min","wrap","useListNavigation","_ref","_ref$circular","circular","_ref$initialIndex","initialIndex","_ref$size","size","initialSize","_React$useState","useState","_React$useState2","_slicedToArray","index","setIndex","_React$useState3","_React$useState4","setSize","set","useCallback","i","clear","increment","incrementBy","amount","decrement","decrementBy","reset","ListNavigation","_ref2","children","props","_objectWithoutProperties","_excluded","listNavigation"],"sources":["../../src/_hooks/ListNavigation.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface ListNavigationConfig {\n circular?: boolean\n initialIndex?: number\n size?: number\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface ListNavigationApi {\n clear: () => void\n decrement: () => void\n decrementBy: (amount: number) => void\n increment: () => void\n incrementBy: (amount: number) => void\n index: number\n reset: () => void\n set: (index: number) => void\n setSize: (index: number) => void\n size: number\n}\n\ninterface Props extends ListNavigationConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends ListNavigationConfig {\n children: (props: ListNavigationApi) => {}\n}\n\nfunction clamp(max: number, n: number) {\n return Math.min(max - 1, Math.max(0, n))\n}\n\nfunction wrap(max: number, n: number) {\n if (max === 0) {\n return n\n }\n\n return n < 0 ? max + n : n % max\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useListNavigation({\n circular = false,\n initialIndex = 0,\n size: initialSize = 0,\n}: ListNavigationConfig): ListNavigationApi {\n const [index, setIndex] = React.useState(initialIndex)\n\n const [size, setSize] = React.useState(initialSize)\n\n const set = React.useCallback(\n function (i: number) {\n if (size === 0) {\n setIndex(i)\n } else {\n setIndex(clamp(size, circular ? wrap(size, i) : i))\n }\n },\n [circular, size]\n )\n\n function clear() {\n set(0)\n }\n\n function increment() {\n set(index + 1)\n }\n\n function incrementBy(amount: number) {\n set(index + amount)\n }\n\n function decrement() {\n set(index - 1)\n }\n\n function decrementBy(amount: number) {\n set(index - amount)\n }\n\n function reset() {\n set(initialIndex)\n }\n\n return {\n clear,\n decrement,\n decrementBy,\n increment,\n incrementBy,\n index,\n reset,\n set,\n setSize,\n size,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function ListNavigation({ children, ...props }: RenderProps) {\n const listNavigation = useListNavigation(props)\n\n return typeof children === 'function' ? children(listNavigation) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAEA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;;AAsBA,SAASC,KAAKA,CAACC,GAAW,EAAEC,CAAS,EAAE;EACrC,OAAOC,IAAI,CAACC,GAAG,CAACH,GAAG,GAAG,CAAC,EAAEE,IAAI,CAACF,GAAG,CAAC,CAAC,EAAEC,CAAC,CAAC,CAAC;AAC1C;AAEA,SAASG,IAAIA,CAACJ,GAAW,EAAEC,CAAS,EAAE;EACpC,IAAID,GAAG,KAAK,CAAC,EAAE;IACb,OAAOC,CAAC;EACV;EAEA,OAAOA,CAAC,GAAG,CAAC,GAAGD,GAAG,GAAGC,CAAC,GAAGA,CAAC,GAAGD,GAAG;AAClC;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASK,iBAAiBA,CAAAC,IAAA,EAIW;EAAA,IAAAC,aAAA,GAAAD,IAAA,CAH1CE,QAAQ;IAARA,QAAQ,GAAAD,aAAA,cAAG,KAAK,GAAAA,aAAA;IAAAE,iBAAA,GAAAH,IAAA,CAChBI,YAAY;IAAZA,YAAY,GAAAD,iBAAA,cAAG,CAAC,GAAAA,iBAAA;IAAAE,SAAA,GAAAL,IAAA,CAChBM,IAAI;IAAEC,WAAW,GAAAF,SAAA,cAAG,CAAC,GAAAA,SAAA;EAErB,IAAAG,eAAA,GAA0BhB,KAAK,CAACiB,QAAQ,CAACL,YAAY,CAAC;IAAAM,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA/CI,KAAK,GAAAF,gBAAA;IAAEG,QAAQ,GAAAH,gBAAA;EAEtB,IAAAI,gBAAA,GAAwBtB,KAAK,CAACiB,QAAQ,CAACF,WAAW,CAAC;IAAAQ,gBAAA,GAAAJ,cAAA,CAAAG,gBAAA;IAA5CR,IAAI,GAAAS,gBAAA;IAAEC,OAAO,GAAAD,gBAAA;EAEpB,IAAME,GAAG,GAAGzB,KAAK,CAAC0B,WAAW,CAC3B,UAAUC,CAAS,EAAE;IACnB,IAAIb,IAAI,KAAK,CAAC,EAAE;MACdO,QAAQ,CAACM,CAAC,CAAC;IACb,CAAC,MAAM;MACLN,QAAQ,CAACpB,KAAK,CAACa,IAAI,EAAEJ,QAAQ,GAAGJ,IAAI,CAACQ,IAAI,EAAEa,CAAC,CAAC,GAAGA,CAAC,CAAC,CAAC;IACrD;EACF,CAAC,EACD,CAACjB,QAAQ,EAAEI,IAAI,CACjB,CAAC;EAED,SAASc,KAAKA,CAAA,EAAG;IACfH,GAAG,CAAC,CAAC,CAAC;EACR;EAEA,SAASI,SAASA,CAAA,EAAG;IACnBJ,GAAG,CAACL,KAAK,GAAG,CAAC,CAAC;EAChB;EAEA,SAASU,WAAWA,CAACC,MAAc,EAAE;IACnCN,GAAG,CAACL,KAAK,GAAGW,MAAM,CAAC;EACrB;EAEA,SAASC,SAASA,CAAA,EAAG;IACnBP,GAAG,CAACL,KAAK,GAAG,CAAC,CAAC;EAChB;EAEA,SAASa,WAAWA,CAACF,MAAc,EAAE;IACnCN,GAAG,CAACL,KAAK,GAAGW,MAAM,CAAC;EACrB;EAEA,SAASG,KAAKA,CAAA,EAAG;IACfT,GAAG,CAACb,YAAY,CAAC;EACnB;EAEA,OAAO;IACLgB,KAAK,EAALA,KAAK;IACLI,SAAS,EAATA,SAAS;IACTC,WAAW,EAAXA,WAAW;IACXJ,SAAS,EAATA,SAAS;IACTC,WAAW,EAAXA,WAAW;IACXV,KAAK,EAALA,KAAK;IACLc,KAAK,EAALA,KAAK;IACLT,GAAG,EAAHA,GAAG;IACHD,OAAO,EAAPA,OAAO;IACPV,IAAI,EAAJA;EACF,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASqB,cAAcA,CAAAC,KAAA,EAAsC;EAAA,IAAnCC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EACjD,IAAMC,cAAc,GAAGlC,iBAAiB,CAAC+B,KAAK,CAAC;EAE/C,OAAO,OAAOD,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACI,cAAc,CAAC,GAAGJ,QAAQ;AAC7E"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function _slicedToArray(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
function _unsupportedIterableToArray(
|
|
5
|
-
function _arrayLikeToArray(
|
|
6
|
-
function _iterableToArrayLimit(
|
|
7
|
-
function _arrayWithHoles(
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
// Browsers occasionally miscalculate scroll and client width/height by one pixel up or down
|
|
10
10
|
// so we're use |x| > 1 instead of x > 0 assertion eliminating the issue at the cost of
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import React from 'react';
|
|
8
8
|
export function useResizeObserver(callback) {
|
|
9
9
|
var _React$useState = React.useState(null),
|
package/dist/_hooks/TextEntry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["children"];
|
|
2
|
-
function _objectWithoutProperties(
|
|
3
|
-
function _objectWithoutPropertiesLoose(
|
|
2
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import { isEmpty } from 'ramda';
|
|
5
5
|
import { useBuffer } from './Buffer';
|
|
6
6
|
|
|
@@ -10,14 +10,17 @@ import { useBuffer } from './Buffer';
|
|
|
10
10
|
* @deprecatedSince 9
|
|
11
11
|
* @deprecated Never officially documented/supported
|
|
12
12
|
*/
|
|
13
|
+
|
|
13
14
|
/**
|
|
14
15
|
* @deprecatedSince 9
|
|
15
16
|
* @deprecated Never officially documented/supported
|
|
16
17
|
*/
|
|
18
|
+
|
|
17
19
|
/**
|
|
18
20
|
* @deprecatedSince 9
|
|
19
21
|
* @deprecated Never officially documented/supported
|
|
20
22
|
*/
|
|
23
|
+
|
|
21
24
|
/* HOOK */
|
|
22
25
|
/**
|
|
23
26
|
* @deprecatedSince 9.7.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEntry.js","names":["isEmpty","useBuffer","useTextEntry","_ref","_ref$initialValue","initialValue","_ref$onChange","onChange","_useBuffer","value","update","clear","reset","target","empty","event","TextEntry","_ref2","children","props","_objectWithoutProperties","_excluded","textEntry"],"sources":["../../src/_hooks/TextEntry.tsx"],"sourcesContent":["import { isEmpty } from 'ramda'\nimport type React from 'react'\nimport { useBuffer } from './Buffer'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type ChangeEvent = React.ChangeEvent<HTMLInputElement>\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TextEntryConfig {\n initialValue?: string\n onChange: (event: ChangeEvent) => void\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TextEntryApi {\n clear: () => void\n empty: boolean\n onChange: (event: ChangeEvent) => void\n reset: () => void\n value: string\n}\n\ninterface Props extends TextEntryConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends TextEntryConfig {\n children: (props: TextEntryApi) => {}\n}\n\n/* HOOK */\n/**\n * @deprecatedSince 9.7.0\n * @deprecated A wrapper around useBuffer (deprecated) that would also call onChange. A trivial hook for storing a string. Write your own or use a hook utility lib.\n * \n * **Source:**\n * ```\nexport function useTextEntry({\n initialValue = '',\n onChange = () => {},\n}) {\n const { value, update, clear, reset } = useBuffer({ initialValue })\n\n return {\n clear: () => {\n onChange({ target: { value: '' } })\n clear()\n },\n empty: Ramda.isEmpty(value),\n onChange: (event) => {\n onChange(event)\n update(event.target.value)\n },\n reset: () => {\n onChange({ target: { value } })\n reset()\n },\n value,\n }\n}\n```\n */\nexport function useTextEntry({\n initialValue = '',\n onChange = () => {},\n}: TextEntryConfig) {\n const { value, update, clear, reset } = useBuffer({ initialValue })\n\n return {\n clear: () => {\n onChange({ target: { value: '' } } as ChangeEvent)\n clear()\n },\n empty: isEmpty(value),\n onChange: (event: ChangeEvent) => {\n onChange(event)\n update(event.target.value)\n },\n reset: () => {\n onChange({ target: { value } } as ChangeEvent)\n reset()\n },\n value,\n }\n}\n\n/* RENDER PROP */\n/**\n * @deprecatedSince 9.7.0\n * @deprecated\n */\nexport function TextEntry({ children, ...props }: RenderProps) {\n const textEntry = useTextEntry(props)\n\n return typeof children === 'function' ? children(textEntry) : children\n}\n"],"mappings":";;;AAAA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"TextEntry.js","names":["isEmpty","useBuffer","useTextEntry","_ref","_ref$initialValue","initialValue","_ref$onChange","onChange","_useBuffer","value","update","clear","reset","target","empty","event","TextEntry","_ref2","children","props","_objectWithoutProperties","_excluded","textEntry"],"sources":["../../src/_hooks/TextEntry.tsx"],"sourcesContent":["import { isEmpty } from 'ramda'\nimport type React from 'react'\nimport { useBuffer } from './Buffer'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type ChangeEvent = React.ChangeEvent<HTMLInputElement>\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TextEntryConfig {\n initialValue?: string\n onChange: (event: ChangeEvent) => void\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TextEntryApi {\n clear: () => void\n empty: boolean\n onChange: (event: ChangeEvent) => void\n reset: () => void\n value: string\n}\n\ninterface Props extends TextEntryConfig {\n children?: React.ReactNode\n}\n\ninterface RenderProps extends TextEntryConfig {\n children: (props: TextEntryApi) => {}\n}\n\n/* HOOK */\n/**\n * @deprecatedSince 9.7.0\n * @deprecated A wrapper around useBuffer (deprecated) that would also call onChange. A trivial hook for storing a string. Write your own or use a hook utility lib.\n * \n * **Source:**\n * ```\nexport function useTextEntry({\n initialValue = '',\n onChange = () => {},\n}) {\n const { value, update, clear, reset } = useBuffer({ initialValue })\n\n return {\n clear: () => {\n onChange({ target: { value: '' } })\n clear()\n },\n empty: Ramda.isEmpty(value),\n onChange: (event) => {\n onChange(event)\n update(event.target.value)\n },\n reset: () => {\n onChange({ target: { value } })\n reset()\n },\n value,\n }\n}\n```\n */\nexport function useTextEntry({\n initialValue = '',\n onChange = () => {},\n}: TextEntryConfig) {\n const { value, update, clear, reset } = useBuffer({ initialValue })\n\n return {\n clear: () => {\n onChange({ target: { value: '' } } as ChangeEvent)\n clear()\n },\n empty: isEmpty(value),\n onChange: (event: ChangeEvent) => {\n onChange(event)\n update(event.target.value)\n },\n reset: () => {\n onChange({ target: { value } } as ChangeEvent)\n reset()\n },\n value,\n }\n}\n\n/* RENDER PROP */\n/**\n * @deprecatedSince 9.7.0\n * @deprecated\n */\nexport function TextEntry({ children, ...props }: RenderProps) {\n const textEntry = useTextEntry(props)\n\n return typeof children === 'function' ? children(textEntry) : children\n}\n"],"mappings":";;;AAAA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAAC,IAAA,EAGR;EAAA,IAAAC,iBAAA,GAAAD,IAAA,CAFlBE,YAAY;IAAZA,YAAY,GAAAD,iBAAA,cAAG,EAAE,GAAAA,iBAAA;IAAAE,aAAA,GAAAH,IAAA,CACjBI,QAAQ;IAARA,SAAQ,GAAAD,aAAA,cAAG,YAAM,CAAC,CAAC,GAAAA,aAAA;EAEnB,IAAAE,UAAA,GAAwCP,SAAS,CAAC;MAAEI,YAAY,EAAZA;IAAa,CAAC,CAAC;IAA3DI,KAAK,GAAAD,UAAA,CAALC,KAAK;IAAEC,MAAM,GAAAF,UAAA,CAANE,MAAM;IAAEC,MAAK,GAAAH,UAAA,CAALG,KAAK;IAAEC,MAAK,GAAAJ,UAAA,CAALI,KAAK;EAEnC,OAAO;IACLD,KAAK,EAAE,SAAAA,MAAA,EAAM;MACXJ,SAAQ,CAAC;QAAEM,MAAM,EAAE;UAAEJ,KAAK,EAAE;QAAG;MAAE,CAAgB,CAAC;MAClDE,MAAK,CAAC,CAAC;IACT,CAAC;IACDG,KAAK,EAAEd,OAAO,CAACS,KAAK,CAAC;IACrBF,QAAQ,EAAE,SAAAA,SAACQ,KAAkB,EAAK;MAChCR,SAAQ,CAACQ,KAAK,CAAC;MACfL,MAAM,CAACK,KAAK,CAACF,MAAM,CAACJ,KAAK,CAAC;IAC5B,CAAC;IACDG,KAAK,EAAE,SAAAA,MAAA,EAAM;MACXL,SAAQ,CAAC;QAAEM,MAAM,EAAE;UAAEJ,KAAK,EAALA;QAAM;MAAE,CAAgB,CAAC;MAC9CG,MAAK,CAAC,CAAC;IACT,CAAC;IACDH,KAAK,EAALA;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,SAASA,CAAAC,KAAA,EAAsC;EAAA,IAAnCC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EAC5C,IAAMC,SAAS,GAAGpB,YAAY,CAACiB,KAAK,CAAC;EAErC,OAAO,OAAOD,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACI,SAAS,CAAC,GAAGJ,QAAQ;AACxE"}
|
package/dist/_hooks/Timer.js
CHANGED
package/dist/_hooks/Timer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timer.js","names":["React","useTimer","config","timer","useRef","cancel","current","clearTimeout","reset","setTimer","callback","duration","window","setTimeout","timerId","Timer","_ref","children"],"sources":["../../src/_hooks/Timer.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface TimerConfig {}\n\ninterface Props {\n children: React.ReactNode\n}\n\ntype TimerId = number | null\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TimerApi {\n cancel: () => void\n reset: () => void\n setTimer: (callback: () => void, duration: number) => void\n timerId: TimerId\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTimer(config: TimerConfig): TimerApi {\n const timer = React.useRef<TimerId>(null)\n\n return {\n cancel: () => {\n timer.current && clearTimeout(timer.current)\n },\n reset: () => {\n timer.current && clearTimeout(timer.current)\n },\n setTimer: (callback, duration) => {\n timer.current && clearTimeout(timer.current)\n timer.current = window.setTimeout(callback, duration)\n },\n timerId: timer.current,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Timer({\n children,\n}: {\n children: (timer: TimerApi) => unknown\n}) {\n const timer = useTimer({})\n\n return typeof children === 'function' ? children(timer) : children\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAUA;AACA;AACA;AACA;;AAQA
|
|
1
|
+
{"version":3,"file":"Timer.js","names":["React","useTimer","config","timer","useRef","cancel","current","clearTimeout","reset","setTimer","callback","duration","window","setTimeout","timerId","Timer","_ref","children"],"sources":["../../src/_hooks/Timer.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface TimerConfig {}\n\ninterface Props {\n children: React.ReactNode\n}\n\ntype TimerId = number | null\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TimerApi {\n cancel: () => void\n reset: () => void\n setTimer: (callback: () => void, duration: number) => void\n timerId: TimerId\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTimer(config: TimerConfig): TimerApi {\n const timer = React.useRef<TimerId>(null)\n\n return {\n cancel: () => {\n timer.current && clearTimeout(timer.current)\n },\n reset: () => {\n timer.current && clearTimeout(timer.current)\n },\n setTimer: (callback, duration) => {\n timer.current && clearTimeout(timer.current)\n timer.current = window.setTimeout(callback, duration)\n },\n timerId: timer.current,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Timer({\n children,\n}: {\n children: (timer: TimerApi) => unknown\n}) {\n const timer = useTimer({})\n\n return typeof children === 'function' ? children(timer) : children\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAUA;AACA;AACA;AACA;;AAQA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAACC,MAAmB,EAAY;EACtD,IAAMC,KAAK,GAAGH,KAAK,CAACI,MAAM,CAAU,IAAI,CAAC;EAEzC,OAAO;IACLC,MAAM,EAAE,SAAAA,OAAA,EAAM;MACZF,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;IAC9C,CAAC;IACDE,KAAK,EAAE,SAAAA,MAAA,EAAM;MACXL,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;IAC9C,CAAC;IACDG,QAAQ,EAAE,SAAAA,SAACC,QAAQ,EAAEC,QAAQ,EAAK;MAChCR,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;MAC5CH,KAAK,CAACG,OAAO,GAAGM,MAAM,CAACC,UAAU,CAACH,QAAQ,EAAEC,QAAQ,CAAC;IACvD,CAAC;IACDG,OAAO,EAAEX,KAAK,CAACG;EACjB,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASS,KAAKA,CAAAC,IAAA,EAIlB;EAAA,IAHDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAIR,IAAMd,KAAK,GAAGF,QAAQ,CAAC,CAAC,CAAC,CAAC;EAE1B,OAAO,OAAOgB,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACd,KAAK,CAAC,GAAGc,QAAQ;AACpE"}
|
package/dist/_hooks/Trigger.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["children", "triggerRef"];
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
5
|
-
function _defineProperty(
|
|
6
|
-
function _toPropertyKey(
|
|
7
|
-
function _toPrimitive(
|
|
8
|
-
function _objectWithoutProperties(
|
|
9
|
-
function _objectWithoutPropertiesLoose(
|
|
10
|
-
function _toConsumableArray(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
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); }
|
|
8
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
10
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
11
11
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
-
function _unsupportedIterableToArray(
|
|
13
|
-
function _iterableToArray(
|
|
14
|
-
function _arrayWithoutHoles(
|
|
15
|
-
function _arrayLikeToArray(
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
14
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
15
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import { triggerListeners } from '../_utils/triggerListeners';
|
|
18
18
|
import { useHotkey } from './Hotkey';
|
|
@@ -23,23 +23,29 @@ import { useHotkey } from './Hotkey';
|
|
|
23
23
|
* @deprecatedSince 9
|
|
24
24
|
* @deprecated Never officially documented/supported
|
|
25
25
|
*/
|
|
26
|
+
|
|
26
27
|
/**
|
|
27
28
|
* @deprecatedSince 9
|
|
28
29
|
* @deprecated Never officially documented/supported
|
|
29
30
|
*/
|
|
31
|
+
|
|
30
32
|
/**
|
|
31
33
|
* @deprecatedSince 9
|
|
32
34
|
* @deprecated Never officially documented/supported
|
|
33
35
|
*/
|
|
36
|
+
|
|
34
37
|
/**
|
|
35
38
|
* @deprecatedSince 9
|
|
36
39
|
* @deprecated Never officially documented/supported
|
|
37
40
|
*/
|
|
41
|
+
|
|
38
42
|
/**
|
|
39
43
|
* @deprecatedSince 9
|
|
40
44
|
* @deprecated Never officially documented/supported
|
|
41
45
|
*/
|
|
46
|
+
|
|
42
47
|
/* HOOK */
|
|
48
|
+
|
|
43
49
|
/**
|
|
44
50
|
* @deprecatedSince 9
|
|
45
51
|
* @deprecated Never officially documented/supported
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trigger.js","names":["React","triggerListeners","useHotkey","useTrigger","_ref","disable","_ref$disableKeys","disableKeys","enable","_ref$enableKeys","enableKeys","_ref$isEnabled","isEnabled","_ref$trigger","trigger","triggerRef","off","on","scope","value","key","handler","preventDefault","event","concat","_toConsumableArray","isVisible","toggle","Trigger","_ref2","children","props","_objectWithoutProperties","_excluded","_objectSpread","element","cloneElement","open"],"sources":["../../src/_hooks/Trigger.tsx"],"sourcesContent":["import React from 'react'\nimport { triggerListeners } from '../_utils/triggerListeners'\nimport type { RenderProp } from '../_utils/types'\nimport { useHotkey } from './Hotkey'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type TriggerVariant =\n | 'click'\n | 'hover'\n | 'none'\n | 'contextmenu'\n | 'focus'\n | 'always'\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerConfig {\n disable: React.EventHandler<any>\n disableKeys?: string[]\n enable: React.EventHandler<any>\n enableKeys?: string[]\n isEnabled?: boolean\n trigger?: TriggerVariant | TriggerVariant[]\n triggerRef: React.RefObject<HTMLElement>\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerProps extends TriggerConfig {\n children: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerRenderProps\n extends TriggerConfig,\n RenderProp<TriggerApi> {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerApi {\n disable: React.EventHandler<any>\n enable: React.EventHandler<any>\n isVisible: boolean\n toggle: React.EventHandler<any>\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTrigger({\n disable,\n disableKeys = [],\n enable,\n enableKeys = [],\n isEnabled = false,\n trigger = 'click',\n triggerRef,\n}: TriggerConfig): TriggerApi {\n triggerListeners({\n off: disable,\n on: enable,\n scope: triggerRef,\n trigger,\n value: isEnabled,\n })\n\n useHotkey({\n key: enableKeys,\n handler: enable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n useHotkey({\n key: disableKeys,\n handler: disable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n // prevent keyup event from firing on FF\n useHotkey({\n event: 'keyup',\n key: [...enableKeys, ...disableKeys],\n handler: () => {},\n preventDefault: true,\n scope: triggerRef,\n })\n\n return {\n disable,\n enable,\n isVisible: isEnabled,\n toggle: isEnabled ? disable : enable,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Trigger({\n children,\n triggerRef,\n ...props\n}: TriggerRenderProps) {\n const trigger = useTrigger({ ...props, triggerRef })\n\n const element =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => React.ReactElement)(trigger)\n : (children as React.ReactElement)\n\n return React.cloneElement(element, {\n open: trigger.isVisible,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"Trigger.js","names":["React","triggerListeners","useHotkey","useTrigger","_ref","disable","_ref$disableKeys","disableKeys","enable","_ref$enableKeys","enableKeys","_ref$isEnabled","isEnabled","_ref$trigger","trigger","triggerRef","off","on","scope","value","key","handler","preventDefault","event","concat","_toConsumableArray","isVisible","toggle","Trigger","_ref2","children","props","_objectWithoutProperties","_excluded","_objectSpread","element","cloneElement","open"],"sources":["../../src/_hooks/Trigger.tsx"],"sourcesContent":["import React from 'react'\nimport { triggerListeners } from '../_utils/triggerListeners'\nimport type { RenderProp } from '../_utils/types'\nimport { useHotkey } from './Hotkey'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type TriggerVariant =\n | 'click'\n | 'hover'\n | 'none'\n | 'contextmenu'\n | 'focus'\n | 'always'\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerConfig {\n disable: React.EventHandler<any>\n disableKeys?: string[]\n enable: React.EventHandler<any>\n enableKeys?: string[]\n isEnabled?: boolean\n trigger?: TriggerVariant | TriggerVariant[]\n triggerRef: React.RefObject<HTMLElement>\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerProps extends TriggerConfig {\n children: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerRenderProps\n extends TriggerConfig,\n RenderProp<TriggerApi> {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerApi {\n disable: React.EventHandler<any>\n enable: React.EventHandler<any>\n isVisible: boolean\n toggle: React.EventHandler<any>\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTrigger({\n disable,\n disableKeys = [],\n enable,\n enableKeys = [],\n isEnabled = false,\n trigger = 'click',\n triggerRef,\n}: TriggerConfig): TriggerApi {\n triggerListeners({\n off: disable,\n on: enable,\n scope: triggerRef,\n trigger,\n value: isEnabled,\n })\n\n useHotkey({\n key: enableKeys,\n handler: enable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n useHotkey({\n key: disableKeys,\n handler: disable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n // prevent keyup event from firing on FF\n useHotkey({\n event: 'keyup',\n key: [...enableKeys, ...disableKeys],\n handler: () => {},\n preventDefault: true,\n scope: triggerRef,\n })\n\n return {\n disable,\n enable,\n isVisible: isEnabled,\n toggle: isEnabled ? disable : enable,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Trigger({\n children,\n triggerRef,\n ...props\n}: TriggerRenderProps) {\n const trigger = useTrigger({ ...props, triggerRef })\n\n const element =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => React.ReactElement)(trigger)\n : (children as React.ReactElement)\n\n return React.cloneElement(element, {\n open: trigger.isVisible,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAQA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAAC,IAAA,EAQI;EAAA,IAP5BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAAC,gBAAA,GAAAF,IAAA,CACPG,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,EAAE,GAAAA,gBAAA;IAChBE,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAAC,eAAA,GAAAL,IAAA,CACNM,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,EAAE,GAAAA,eAAA;IAAAE,cAAA,GAAAP,IAAA,CACfQ,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,KAAK,GAAAA,cAAA;IAAAE,YAAA,GAAAT,IAAA,CACjBU,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,OAAO,GAAAA,YAAA;IACjBE,UAAU,GAAAX,IAAA,CAAVW,UAAU;EAEVd,gBAAgB,CAAC;IACfe,GAAG,EAAEX,OAAO;IACZY,EAAE,EAAET,MAAM;IACVU,KAAK,EAAEH,UAAU;IACjBD,OAAO,EAAPA,OAAO;IACPK,KAAK,EAAEP;EACT,CAAC,CAAC;EAEFV,SAAS,CAAC;IACRkB,GAAG,EAAEV,UAAU;IACfW,OAAO,EAAEb,MAAM;IACfc,cAAc,EAAE,IAAI;IACpBJ,KAAK,EAAEH;EACT,CAAC,CAAC;EAEFb,SAAS,CAAC;IACRkB,GAAG,EAAEb,WAAW;IAChBc,OAAO,EAAEhB,OAAO;IAChBiB,cAAc,EAAE,IAAI;IACpBJ,KAAK,EAAEH;EACT,CAAC,CAAC;;EAEF;EACAb,SAAS,CAAC;IACRqB,KAAK,EAAE,OAAO;IACdH,GAAG,KAAAI,MAAA,CAAAC,kBAAA,CAAMf,UAAU,GAAAe,kBAAA,CAAKlB,WAAW,EAAC;IACpCc,OAAO,EAAE,SAAAA,QAAA,EAAM,CAAC,CAAC;IACjBC,cAAc,EAAE,IAAI;IACpBJ,KAAK,EAAEH;EACT,CAAC,CAAC;EAEF,OAAO;IACLV,OAAO,EAAPA,OAAO;IACPG,MAAM,EAANA,MAAM;IACNkB,SAAS,EAAEd,SAAS;IACpBe,MAAM,EAAEf,SAAS,GAAGP,OAAO,GAAGG;EAChC,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASoB,OAAOA,CAAAC,KAAA,EAIA;EAAA,IAHrBC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IACRf,UAAU,GAAAc,KAAA,CAAVd,UAAU;IACPgB,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EAER,IAAMnB,OAAO,GAAGX,UAAU,CAAA+B,aAAA,CAAAA,aAAA,KAAMH,KAAK;IAAEhB,UAAU,EAAVA;EAAU,EAAE,CAAC;EAEpD,IAAMoB,OAAO,GACX,OAAOL,QAAQ,KAAK,UAAU,GACzBA,QAAQ,CAA+ChB,OAAO,CAAC,GAC/DgB,QAA+B;EAEtC,oBAAO9B,KAAK,CAACoC,YAAY,CAACD,OAAO,EAAE;IACjCE,IAAI,EAAEvB,OAAO,CAACY;EAChB,CAAC,CAAC;AACJ"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var _excluded = ["children"];
|
|
2
|
-
function _objectWithoutProperties(
|
|
3
|
-
function _objectWithoutPropertiesLoose(
|
|
4
|
-
function _slicedToArray(
|
|
2
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _arrayLikeToArray(
|
|
8
|
-
function _iterableToArrayLimit(
|
|
9
|
-
function _arrayWithHoles(
|
|
6
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
7
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
8
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
|
|
12
12
|
/* TYPES */
|
|
@@ -15,10 +15,12 @@ import React from 'react';
|
|
|
15
15
|
* @deprecatedSince 9
|
|
16
16
|
* @deprecated Never officially documented/supported
|
|
17
17
|
*/
|
|
18
|
+
|
|
18
19
|
/**
|
|
19
20
|
* @deprecatedSince 9
|
|
20
21
|
* @deprecated Never officially documented/supported
|
|
21
22
|
*/
|
|
23
|
+
|
|
22
24
|
/* HOOK */
|
|
23
25
|
|
|
24
26
|
function noop() {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Visibility.js","names":["React","noop","useVisibility","_ref","_ref$afterHide","afterHide","_ref$afterShow","afterShow","_ref$initialIsVisible","initialIsVisible","_React$useState","useState","_React$useState2","_slicedToArray","isVisible","setVisibility","hide","e","show","toggle","Visibility","_ref2","children","props","_objectWithoutProperties","_excluded","visibility"],"sources":["../../src/_hooks/Visibility.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface VisibilityConfig {\n afterHide?: (e?: Event) => void\n afterShow?: () => void\n initialIsVisible?: boolean\n}\n\ninterface VisibilityApi {\n hide: (e?: Event) => any\n isVisible: boolean\n show: () => any\n toggle: () => any\n}\n\ninterface Props extends VisibilityConfig {\n children?: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface RenderProps extends VisibilityConfig {\n children: (props: VisibilityApi) => React.ReactElement<{}>\n}\n\n/* HOOK */\n\nfunction noop() {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useVisibility({\n afterHide = noop,\n afterShow = noop,\n initialIsVisible = false,\n}: VisibilityConfig): VisibilityApi {\n const [isVisible, setVisibility] = React.useState(initialIsVisible)\n\n const hide = (e?: Event) => {\n setVisibility(false)\n\n if (isVisible) {\n afterHide(e)\n }\n }\n\n const show = () => {\n setVisibility(true)\n\n if (!isVisible) {\n afterShow()\n }\n }\n\n const toggle = isVisible ? hide : show\n\n return {\n hide,\n isVisible,\n show,\n toggle,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Visibility({ children, ...props }: RenderProps) {\n const visibility = useVisibility(props)\n\n return typeof children === 'function' ? children(visibility) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAEA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"Visibility.js","names":["React","noop","useVisibility","_ref","_ref$afterHide","afterHide","_ref$afterShow","afterShow","_ref$initialIsVisible","initialIsVisible","_React$useState","useState","_React$useState2","_slicedToArray","isVisible","setVisibility","hide","e","show","toggle","Visibility","_ref2","children","props","_objectWithoutProperties","_excluded","visibility"],"sources":["../../src/_hooks/Visibility.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface VisibilityConfig {\n afterHide?: (e?: Event) => void\n afterShow?: () => void\n initialIsVisible?: boolean\n}\n\ninterface VisibilityApi {\n hide: (e?: Event) => any\n isVisible: boolean\n show: () => any\n toggle: () => any\n}\n\ninterface Props extends VisibilityConfig {\n children?: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface RenderProps extends VisibilityConfig {\n children: (props: VisibilityApi) => React.ReactElement<{}>\n}\n\n/* HOOK */\n\nfunction noop() {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useVisibility({\n afterHide = noop,\n afterShow = noop,\n initialIsVisible = false,\n}: VisibilityConfig): VisibilityApi {\n const [isVisible, setVisibility] = React.useState(initialIsVisible)\n\n const hide = (e?: Event) => {\n setVisibility(false)\n\n if (isVisible) {\n afterHide(e)\n }\n }\n\n const show = () => {\n setVisibility(true)\n\n if (!isVisible) {\n afterShow()\n }\n }\n\n const toggle = isVisible ? hide : show\n\n return {\n hide,\n isVisible,\n show,\n toggle,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Visibility({ children, ...props }: RenderProps) {\n const visibility = useVisibility(props)\n\n return typeof children === 'function' ? children(visibility) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAEA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;;AAKA;;AAEA,SAASC,IAAIA,CAAA,EAAG,CAAC;;AAEjB;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAIO;EAAA,IAAAC,cAAA,GAAAD,IAAA,CAHlCE,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAGH,IAAI,GAAAG,cAAA;IAAAE,cAAA,GAAAH,IAAA,CAChBI,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAGL,IAAI,GAAAK,cAAA;IAAAE,qBAAA,GAAAL,IAAA,CAChBM,gBAAgB;IAAhBA,gBAAgB,GAAAD,qBAAA,cAAG,KAAK,GAAAA,qBAAA;EAExB,IAAAE,eAAA,GAAmCV,KAAK,CAACW,QAAQ,CAACF,gBAAgB,CAAC;IAAAG,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA5DI,SAAS,GAAAF,gBAAA;IAAEG,aAAa,GAAAH,gBAAA;EAE/B,IAAMI,IAAI,GAAG,SAAPA,IAAIA,CAAIC,CAAS,EAAK;IAC1BF,aAAa,CAAC,KAAK,CAAC;IAEpB,IAAID,SAAS,EAAE;MACbT,SAAS,CAACY,CAAC,CAAC;IACd;EACF,CAAC;EAED,IAAMC,IAAI,GAAG,SAAPA,IAAIA,CAAA,EAAS;IACjBH,aAAa,CAAC,IAAI,CAAC;IAEnB,IAAI,CAACD,SAAS,EAAE;MACdP,SAAS,CAAC,CAAC;IACb;EACF,CAAC;EAED,IAAMY,MAAM,GAAGL,SAAS,GAAGE,IAAI,GAAGE,IAAI;EAEtC,OAAO;IACLF,IAAI,EAAJA,IAAI;IACJF,SAAS,EAATA,SAAS;IACTI,IAAI,EAAJA,IAAI;IACJC,MAAM,EAANA;EACF,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAAC,KAAA,EAAsC;EAAA,IAAnCC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EAC7C,IAAMC,UAAU,GAAGxB,aAAa,CAACqB,KAAK,CAAC;EAEvC,OAAO,OAAOD,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACI,UAAU,CAAC,GAAGJ,QAAQ;AACzE"}
|
package/dist/_hooks/ZIndex.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var _excluded = ["children"],
|
|
2
2
|
_excluded2 = ["children"];
|
|
3
|
-
function _objectWithoutProperties(
|
|
4
|
-
function _objectWithoutPropertiesLoose(
|
|
5
|
-
function _slicedToArray(
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
6
6
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _unsupportedIterableToArray(
|
|
8
|
-
function _arrayLikeToArray(
|
|
9
|
-
function _iterableToArrayLimit(
|
|
10
|
-
function _arrayWithHoles(
|
|
7
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
8
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
export var defaultZIndex = 9999;
|
|
13
13
|
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated you can use TMS_SUPPORTED_LOCALE from [Globalization toolkit](https://github.com/procore/globalization-toolkit)
|
|
4
4
|
* @deprecatedSince 12.10.0
|
|
5
|
-
*/
|
|
5
|
+
*/
|
|
6
|
+
// TODO breaking change requiring a new minimum version of the peerDep, replace with GTK imports
|
|
6
7
|
var SUPPORTED_LOCALES = ['de-DE', 'en-AU', 'en-CA', 'en-GB', 'en', 'es-ES', 'es', 'fr-CA', 'fr-FR', 'is-IS', 'ja-JP', 'pl-PL', 'pseudo', 'pt-BR', 'th-TH', 'zh-SG'];
|
|
7
8
|
/*
|
|
8
9
|
all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'
|
|
@@ -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>\n/**\n * @deprecated you can use TMS_SUPPORTED_LOCALE from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\n */\n// TODO breaking change requiring a new minimum version of the peerDep, replace with GTK imports\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 'pl-PL',\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*/\n/**\n * @deprecated you can use OVERWRITE_LOCALE_MAP from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\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 * @deprecatedSince 12.10.0\n * @deprecated you can use getOverrideLocale from [Globalization toolkit](https://procore.github.io/globalization-toolkit/#md:getoverridelocale-function)\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;AACA;AACA;AACA
|
|
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>\n/**\n * @deprecated you can use TMS_SUPPORTED_LOCALE from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\n */\n// TODO breaking change requiring a new minimum version of the peerDep, replace with GTK imports\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 'pl-PL',\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*/\n/**\n * @deprecated you can use OVERWRITE_LOCALE_MAP from [Globalization toolkit](https://github.com/procore/globalization-toolkit)\n * @deprecatedSince 12.10.0\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 * @deprecatedSince 12.10.0\n * @deprecated you can use getOverrideLocale from [Globalization toolkit](https://procore.github.io/globalization-toolkit/#md:getoverridelocale-function)\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;AACA;AACA;AACA;AACA;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,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,CACR;AACD;AACA;AACA;AACA;AACA;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;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,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
/* eslint-disable no-magic-numbers */
|
|
8
8
|
import React from 'react';
|
|
9
9
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function asyncGeneratorStep(
|
|
3
|
-
function _asyncToGenerator(
|
|
4
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return { value: void 0, done: !0 }; } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable || "" === iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } throw new TypeError(_typeof(iterable) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
5
|
-
function _awaitAsyncGenerator(
|
|
6
|
-
function _wrapAsyncGenerator(
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function _OverloadYield(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
3
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
4
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
5
|
+
function _awaitAsyncGenerator(e) { return new _OverloadYield(e, 0); }
|
|
6
|
+
function _wrapAsyncGenerator(e) { return function () { return new AsyncGenerator(e.apply(this, arguments)); }; }
|
|
7
|
+
function AsyncGenerator(e) { var r, t; function resume(r, t) { try { var n = e[r](t), o = n.value, u = o instanceof _OverloadYield; Promise.resolve(u ? o.v : o).then(function (t) { if (u) { var i = "return" === r ? "return" : "next"; if (!o.k || t.done) return resume(i, t); t = e[i](t).value; } settle(n.done ? "return" : "normal", t); }, function (e) { resume("throw", e); }); } catch (e) { settle("throw", e); } } function settle(e, n) { switch (e) { case "return": r.resolve({ value: n, done: !0 }); break; case "throw": r.reject(n); break; default: r.resolve({ value: n, done: !1 }); } (r = r.next) ? resume(r.key, r.arg) : t = null; } this._invoke = function (e, n) { return new Promise(function (o, u) { var i = { key: e, arg: n, resolve: o, reject: u, next: null }; t ? t = t.next = i : (r = t = i, resume(e, n)); }); }, "function" != typeof e["return"] && (this["return"] = void 0); }
|
|
8
|
+
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { return this; }, AsyncGenerator.prototype.next = function (e) { return this._invoke("next", e); }, AsyncGenerator.prototype["throw"] = function (e) { return this._invoke("throw", e); }, AsyncGenerator.prototype["return"] = function (e) { return this._invoke("return", e); };
|
|
9
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
10
10
|
import axios from 'axios';
|
|
11
11
|
import { isFunction } from '../_utils/isFunction';
|
|
12
12
|
import { runInQueue } from '../_utils/runInQueue';
|
|
@@ -109,7 +109,7 @@ export function useFileUploader(_ref) {
|
|
|
109
109
|
};
|
|
110
110
|
upload = /*#__PURE__*/function () {
|
|
111
111
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file) {
|
|
112
|
-
var getEndpoint, execFileUpload,
|
|
112
|
+
var getEndpoint, execFileUpload, response;
|
|
113
113
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
114
114
|
while (1) switch (_context2.prev = _context2.next) {
|
|
115
115
|
case 0:
|
|
@@ -133,8 +133,8 @@ export function useFileUploader(_ref) {
|
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
135
|
case 5:
|
|
136
|
-
|
|
137
|
-
onComplete === null || onComplete === void 0 ? void 0 : onComplete(file.id,
|
|
136
|
+
response = _context2.sent;
|
|
137
|
+
onComplete === null || onComplete === void 0 ? void 0 : onComplete(file.id, response);
|
|
138
138
|
_context2.next = 12;
|
|
139
139
|
break;
|
|
140
140
|
case 9:
|
|
@@ -190,7 +190,7 @@ function uploadFileViaNetwork(_x4, _x5, _x6) {
|
|
|
190
190
|
}
|
|
191
191
|
function _uploadFileViaNetwork() {
|
|
192
192
|
_uploadFileViaNetwork = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref6, file, _ref7) {
|
|
193
|
-
var getEndpoint, _ref6$getMethod, getMethod, _ref6$getHeaders, getHeaders, getPayload, _ref6$getPayloadKey, getPayloadKey, onProgress, onSuccess, onError, endpoint, method, headers, payload,
|
|
193
|
+
var getEndpoint, _ref6$getMethod, getMethod, _ref6$getHeaders, getHeaders, getPayload, _ref6$getPayloadKey, getPayloadKey, onProgress, onSuccess, onError, endpoint, method, headers, payload, response;
|
|
194
194
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
195
195
|
while (1) switch (_context5.prev = _context5.next) {
|
|
196
196
|
case 0:
|
|
@@ -219,8 +219,8 @@ function _uploadFileViaNetwork() {
|
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
221
|
case 9:
|
|
222
|
-
|
|
223
|
-
onSuccess(
|
|
222
|
+
response = _context5.sent;
|
|
223
|
+
onSuccess(response.data);
|
|
224
224
|
_context5.next = 16;
|
|
225
225
|
break;
|
|
226
226
|
case 13:
|