@procore/core-react 12.26.5 → 12.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.d.ts +76 -76
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/BadgePill/BadgePill.styles.js +4 -4
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.d.ts +1 -1
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.js +12 -2
- package/dist/Form/Form.js.map +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.styles.d.ts +2 -2
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/Modal/storyHelpers.js +1 -4
- package/dist/Modal/storyHelpers.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.hooks.d.ts +2 -1
- package/dist/NumberInput/NumberInput.hooks.js +40 -0
- package/dist/NumberInput/NumberInput.hooks.js.map +1 -1
- package/dist/NumberInput/NumberInput.js +20 -7
- package/dist/NumberInput/NumberInput.js.map +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/NumberInput/NumberInput.types.d.ts +26 -1
- package/dist/NumberInput/NumberInput.types.js.map +1 -1
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/OverlayTrigger/a11yPresets.d.ts +6 -6
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +3 -3
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.d.ts +76 -76
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/EditorError.js.map +1 -0
- package/dist/TextEditor/StickyToolbar/StickyToolbar.types.js.map +1 -0
- package/dist/TextEditor/StickyToolbar/StickyToolbar.utils.js.map +1 -0
- package/dist/TextEditor/StickyToolbar/index.js.map +1 -0
- package/dist/TextEditor/StickyToolbar/useStickyToolbar.js.map +1 -0
- package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.js.map +1 -0
- package/dist/TextEditor/TextEditor.d.ts +42 -1
- package/dist/TextEditor/TextEditor.js +175 -10
- package/dist/TextEditor/TextEditor.js.map +1 -1
- package/dist/{NextTextEditor/NextTextEditor.styles.js → TextEditor/TextEditor.styles.js} +3 -3
- package/dist/TextEditor/TextEditor.styles.js.map +1 -0
- package/dist/TextEditor/TextEditor.types.d.ts +100 -22
- package/dist/TextEditor/TextEditor.types.js.map +1 -1
- package/dist/TextEditor/index.d.ts +1 -1
- package/dist/TextEditor/index.js +1 -0
- package/dist/TextEditor/index.js.map +1 -1
- package/dist/TextEditor/license_key.js.map +1 -0
- package/dist/TextEditor/plugins/CutPlugin/CutCommand.js.map +1 -0
- package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js.map +1 -0
- package/dist/TextEditor/plugins/CutPlugin/index.js.map +1 -0
- package/dist/{NextTextEditor → TextEditor}/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js +1 -1
- package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js.map +1 -0
- package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.js.map +1 -0
- package/dist/{NextTextEditor/plugins/CutPlugin/CutCommand.js.map → TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js.map} +1 -1
- package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js.map +1 -0
- package/dist/TextEditor/plugins/PasteAsTextPlugin/index.js.map +1 -0
- package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js.map +1 -0
- package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js.map +1 -0
- package/dist/TextEditor/plugins/PastePlugin/index.js.map +1 -0
- package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js.map +1 -0
- package/dist/TextEditor/plugins/TabSpacesPlugin/index.js.map +1 -0
- package/dist/TextEditor/textEditorTheming/icons.js.map +1 -0
- package/dist/TextEditor/textEditorTheming/index.js.map +1 -0
- package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js.map +1 -0
- package/dist/TextEditor/useCKEditorCss.js.map +1 -0
- package/dist/TextEditor/useTabAsNavigation.js.map +1 -0
- package/dist/TextEditor/utils/config.js.map +1 -0
- package/dist/TextEditor/utils/index.js.map +1 -0
- package/dist/TextEditor/utils/locale.js.map +1 -0
- package/dist/TextEditor/utils/plugins.js.map +1 -0
- package/dist/TextEditorOutput/TextEditorOutput.d.ts +1 -3
- package/dist/TextEditorOutput/TextEditorOutput.js +15 -14
- package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -1
- package/dist/{NextTextEditorOutput/NextTextEditorOutput.styles.js → TextEditorOutput/TextEditorOutput.styles.js} +2 -2
- package/dist/TextEditorOutput/TextEditorOutput.styles.js.map +1 -0
- package/dist/TextEditorOutput/TextEditorOutput.types.d.ts +7 -17
- package/dist/TextEditorOutput/TextEditorOutput.types.js.map +1 -1
- package/dist/{NextTextEditorOutput/NextTextEditorOutput.utils.js → TextEditorOutput/TextEditorOutput.utils.js} +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.utils.js.map +1 -0
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +64 -64
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +72 -72
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +15 -15
- 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 +8 -8
- 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 +39 -39
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +30 -30
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +986 -958
- 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 +1 -1
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +46 -46
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +167 -43
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +32 -32
- package/dist/_typedoc/PageLayout/PageLayout.types.json +26 -26
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +30 -30
- 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 +7 -7
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +62 -62
- 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 +14 -14
- 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 +144 -1
- package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +2 -2
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +32 -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 +8 -8
- package/dist/_typedoc/Title/Title.types.json +3 -3
- 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 +7 -7
- 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 +88 -88
- 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/_typedoc/deprecations.json +1 -1
- package/dist/_utils/propsTypedoc.d.ts +0 -2
- package/dist/_utils/propsTypedoc.js +0 -2
- package/dist/_utils/propsTypedoc.js.map +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.js +17 -8
- package/dist/index.js.map +1 -1
- package/jestConfig.d.ts +3 -0
- package/package.json +8 -4
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.d.ts +0 -19
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.js +0 -159
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.js.map +0 -1
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.styles.d.ts +0 -4
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.styles.js +0 -6
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.styles.js.map +0 -1
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.types.d.ts +0 -72
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.types.js +0 -2
- package/dist/DeprecatedTextEditor/DeprecatedTextEditor.types.js.map +0 -1
- package/dist/DeprecatedTextEditor/index.d.ts +0 -2
- package/dist/DeprecatedTextEditor/index.js +0 -3
- package/dist/DeprecatedTextEditor/index.js.map +0 -1
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.d.ts +0 -12
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.js +0 -45
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.js.map +0 -1
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.styles.js +0 -6
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.styles.js.map +0 -1
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.types.d.ts +0 -16
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.types.js +0 -2
- package/dist/DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.types.js.map +0 -1
- package/dist/DeprecatedTextEditorOutput/index.d.ts +0 -2
- package/dist/DeprecatedTextEditorOutput/index.js +0 -2
- package/dist/DeprecatedTextEditorOutput/index.js.map +0 -1
- package/dist/NextTextEditor/EditorError.js.map +0 -1
- package/dist/NextTextEditor/NextTextEditor.d.ts +0 -3
- package/dist/NextTextEditor/NextTextEditor.js +0 -156
- package/dist/NextTextEditor/NextTextEditor.js.map +0 -1
- package/dist/NextTextEditor/NextTextEditor.styles.js.map +0 -1
- package/dist/NextTextEditor/NextTextEditor.types.d.ts +0 -111
- package/dist/NextTextEditor/NextTextEditor.types.js +0 -2
- package/dist/NextTextEditor/NextTextEditor.types.js.map +0 -1
- package/dist/NextTextEditor/StickyToolbar/StickyToolbar.types.js.map +0 -1
- package/dist/NextTextEditor/StickyToolbar/StickyToolbar.utils.js.map +0 -1
- package/dist/NextTextEditor/StickyToolbar/index.js.map +0 -1
- package/dist/NextTextEditor/StickyToolbar/useStickyToolbar.js.map +0 -1
- package/dist/NextTextEditor/StickyToolbar/useStickyToolbar.types.js.map +0 -1
- package/dist/NextTextEditor/index.d.ts +0 -2
- package/dist/NextTextEditor/index.js +0 -3
- package/dist/NextTextEditor/index.js.map +0 -1
- package/dist/NextTextEditor/license_key.js.map +0 -1
- package/dist/NextTextEditor/plugins/CutPlugin/CutPlugin.js.map +0 -1
- package/dist/NextTextEditor/plugins/CutPlugin/index.js.map +0 -1
- package/dist/NextTextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js.map +0 -1
- package/dist/NextTextEditor/plugins/IndentPaddingToMarginPlugin/index.js.map +0 -1
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/index.d.ts +0 -15
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/index.js +0 -65
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/index.js.map +0 -1
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/legacyTinyMceAdapter.d.ts +0 -13
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/legacyTinyMceAdapter.js +0 -80
- package/dist/NextTextEditor/plugins/LegacyPasteAdapter/legacyTinyMceAdapter.js.map +0 -1
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js.map +0 -1
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js.map +0 -1
- package/dist/NextTextEditor/plugins/PasteAsTextPlugin/index.js.map +0 -1
- package/dist/NextTextEditor/plugins/PastePlugin/PasteCommand.js.map +0 -1
- package/dist/NextTextEditor/plugins/PastePlugin/PastePlugin.js.map +0 -1
- package/dist/NextTextEditor/plugins/PastePlugin/index.js.map +0 -1
- package/dist/NextTextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js.map +0 -1
- package/dist/NextTextEditor/plugins/TabSpacesPlugin/index.js.map +0 -1
- package/dist/NextTextEditor/textEditorTheming/icons.js.map +0 -1
- package/dist/NextTextEditor/textEditorTheming/index.js.map +0 -1
- package/dist/NextTextEditor/textEditorTheming/textEditorTheming.styles.js.map +0 -1
- package/dist/NextTextEditor/useCKEditorCss.js.map +0 -1
- package/dist/NextTextEditor/useTabAsNavigation.js.map +0 -1
- package/dist/NextTextEditor/utils/config.js.map +0 -1
- package/dist/NextTextEditor/utils/index.js.map +0 -1
- package/dist/NextTextEditor/utils/locale.js.map +0 -1
- package/dist/NextTextEditor/utils/plugins.js.map +0 -1
- package/dist/NextTextEditorOutput/NextTextEditorOutput.d.ts +0 -8
- package/dist/NextTextEditorOutput/NextTextEditorOutput.js +0 -29
- package/dist/NextTextEditorOutput/NextTextEditorOutput.js.map +0 -1
- package/dist/NextTextEditorOutput/NextTextEditorOutput.styles.d.ts +0 -2
- package/dist/NextTextEditorOutput/NextTextEditorOutput.styles.js.map +0 -1
- package/dist/NextTextEditorOutput/NextTextEditorOutput.types.d.ts +0 -9
- package/dist/NextTextEditorOutput/NextTextEditorOutput.types.js +0 -2
- package/dist/NextTextEditorOutput/NextTextEditorOutput.types.js.map +0 -1
- package/dist/NextTextEditorOutput/NextTextEditorOutput.utils.js.map +0 -1
- package/dist/NextTextEditorOutput/index.d.ts +0 -2
- package/dist/NextTextEditorOutput/index.js +0 -2
- package/dist/NextTextEditorOutput/index.js.map +0 -1
- package/dist/TextEditor/TextEditorDocs.types.d.ts +0 -65
- package/dist/TextEditor/TextEditorDocs.types.js +0 -2
- package/dist/TextEditor/TextEditorDocs.types.js.map +0 -1
- package/dist/TextEditorOutput/TextEditorOutputDocs.types.d.ts +0 -21
- package/dist/TextEditorOutput/TextEditorOutputDocs.types.js +0 -2
- package/dist/TextEditorOutput/TextEditorOutputDocs.types.js.map +0 -1
- package/dist/_typedoc/TextEditor/TextEditorDocs.types.json +0 -98
- package/dist/_typedoc/TextEditorOutput/TextEditorOutputDocs.types.json +0 -38
- package/dist/_utils/TinyMCE.d.ts +0 -21
- package/dist/_utils/TinyMCE.js +0 -86
- package/dist/_utils/TinyMCE.js.map +0 -1
- package/dist/_utils/props.d.ts +0 -4
- package/dist/_utils/props.js +0 -5
- package/dist/_utils/props.js.map +0 -1
- /package/dist/{NextTextEditor → TextEditor}/EditorError.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/EditorError.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/StickyToolbar.types.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/StickyToolbar.types.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/StickyToolbar.utils.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/StickyToolbar.utils.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/index.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/index.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/useStickyToolbar.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/useStickyToolbar.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/useStickyToolbar.types.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/StickyToolbar/useStickyToolbar.types.js +0 -0
- /package/dist/{NextTextEditor/NextTextEditor.styles.d.ts → TextEditor/TextEditor.styles.d.ts} +0 -0
- /package/dist/{NextTextEditor → TextEditor}/license_key.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/license_key.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/CutPlugin/CutCommand.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/CutPlugin/CutCommand.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/CutPlugin/CutPlugin.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/CutPlugin/CutPlugin.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/CutPlugin/index.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/CutPlugin/index.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/IndentPaddingToMarginPlugin/index.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/IndentPaddingToMarginPlugin/index.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PasteAsTextPlugin/PasteAsTextCommand.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PasteAsTextPlugin/PasteAsTextCommand.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PasteAsTextPlugin/PasteAsTextPlugin.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PasteAsTextPlugin/index.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PasteAsTextPlugin/index.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PastePlugin/PasteCommand.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PastePlugin/PasteCommand.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PastePlugin/PastePlugin.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PastePlugin/PastePlugin.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PastePlugin/index.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/PastePlugin/index.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/TabSpacesPlugin/TabSpacesPlugin.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/TabSpacesPlugin/TabSpacesPlugin.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/TabSpacesPlugin/index.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/plugins/TabSpacesPlugin/index.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/textEditorTheming/icons.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/textEditorTheming/icons.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/textEditorTheming/index.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/textEditorTheming/index.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/textEditorTheming/textEditorTheming.styles.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/textEditorTheming/textEditorTheming.styles.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/useCKEditorCss.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/useCKEditorCss.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/useTabAsNavigation.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/useTabAsNavigation.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/utils/config.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/utils/config.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/utils/index.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/utils/index.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/utils/locale.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/utils/locale.js +0 -0
- /package/dist/{NextTextEditor → TextEditor}/utils/plugins.d.ts +0 -0
- /package/dist/{NextTextEditor → TextEditor}/utils/plugins.js +0 -0
- /package/dist/{DeprecatedTextEditorOutput/DeprecatedTextEditorOutput.styles.d.ts → TextEditorOutput/TextEditorOutput.styles.d.ts} +0 -0
- /package/dist/{NextTextEditorOutput/NextTextEditorOutput.utils.d.ts → TextEditorOutput/TextEditorOutput.utils.d.ts} +0 -0
package/dist/Tabs/Tabs.styles.js
CHANGED
|
@@ -17,17 +17,17 @@ var borderRadius = /*#__PURE__*/css(["border-radius:", "px ", "px 0 0;"], spacin
|
|
|
17
17
|
*/
|
|
18
18
|
var StyledTabBase = /*#__PURE__*/styled.div.withConfig({
|
|
19
19
|
displayName: "StyledTabBase",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_27_0__sc-17s58xs-0"
|
|
21
21
|
})(["align-items:center;box-sizing:border-box;cursor:pointer;display:inline-flex;flex:0 0 auto;justify-content:center;position:relative;white-space:nowrap;text-decoration:none;background-color:transparent;border:none;font-family:inherit;padding:0;"]);
|
|
22
22
|
var StyledTabInnerBase = /*#__PURE__*/styled.div.withConfig({
|
|
23
23
|
displayName: "StyledTabInnerBase",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_27_0__sc-17s58xs-1"
|
|
25
25
|
})(["align-self:baseline;box-sizing:border-box;&,> a{display:flex;text-decoration:none;width:100%;}"]);
|
|
26
26
|
|
|
27
27
|
// This so that it can be visible/hidden via CSS down below
|
|
28
28
|
var StyledDropdownTabBase = /*#__PURE__*/styled(StyledTabBase).withConfig({
|
|
29
29
|
displayName: "StyledDropdownTabBase",
|
|
30
|
-
componentId: "core-
|
|
30
|
+
componentId: "core-12_27_0__sc-17s58xs-2"
|
|
31
31
|
})(["", ""], hiddenTab);
|
|
32
32
|
|
|
33
33
|
//// END BASE LAYOUT COMPONENTS FOR TABS ////
|
|
@@ -50,11 +50,11 @@ function getTabStyle() {
|
|
|
50
50
|
}
|
|
51
51
|
var StyledTab = /*#__PURE__*/styled(StyledTabBase).withConfig({
|
|
52
52
|
displayName: "StyledTab",
|
|
53
|
-
componentId: "core-
|
|
53
|
+
componentId: "core-12_27_0__sc-17s58xs-3"
|
|
54
54
|
})(["", ""], getTabStyle);
|
|
55
55
|
var StyledTabInner = /*#__PURE__*/styled(StyledTabInnerBase).withConfig({
|
|
56
56
|
displayName: "StyledTabInner",
|
|
57
|
-
componentId: "core-
|
|
57
|
+
componentId: "core-12_27_0__sc-17s58xs-4"
|
|
58
58
|
})(["", " padding:0 ", "px;font-weight:", ";&,> a{", ";color:", ";height:23px;}", ""], getTypographyIntent('body'), spacing.xs, function (_ref3) {
|
|
59
59
|
var $selected = _ref3.$selected;
|
|
60
60
|
return $selected ? 600 : 400;
|
|
@@ -67,15 +67,15 @@ var StyledTabInner = /*#__PURE__*/styled(StyledTabInnerBase).withConfig({
|
|
|
67
67
|
});
|
|
68
68
|
var StyledDropdownTab = /*#__PURE__*/styled(StyledDropdownTabBase).withConfig({
|
|
69
69
|
displayName: "StyledDropdownTab",
|
|
70
|
-
componentId: "core-
|
|
70
|
+
componentId: "core-12_27_0__sc-17s58xs-5"
|
|
71
71
|
})(["", ""], getTabStyle);
|
|
72
72
|
var StyledDropdownTabInner = /*#__PURE__*/styled(StyledTabInner).withConfig({
|
|
73
73
|
displayName: "StyledDropdownTabInner",
|
|
74
|
-
componentId: "core-
|
|
74
|
+
componentId: "core-12_27_0__sc-17s58xs-6"
|
|
75
75
|
})(["align-items:center;cursor:pointer;display:inline-flex;"]);
|
|
76
76
|
var StyledLink = /*#__PURE__*/styled.span.withConfig({
|
|
77
77
|
displayName: "StyledLink",
|
|
78
|
-
componentId: "core-
|
|
78
|
+
componentId: "core-12_27_0__sc-17s58xs-7"
|
|
79
79
|
})(["align-items:center;display:flex;height:23px;", ";box-sizing:border-box;"], borderRadius);
|
|
80
80
|
|
|
81
81
|
//// END TRADITIONAL DESIGN SYSTEM TAB STYLES ////
|
|
@@ -92,34 +92,34 @@ function getHelixHeaderTabStyles() {
|
|
|
92
92
|
}
|
|
93
93
|
var StyledGlobalNavigationTab = /*#__PURE__*/styled(StyledTabBase).withConfig({
|
|
94
94
|
displayName: "StyledGlobalNavigationTab",
|
|
95
|
-
componentId: "core-
|
|
95
|
+
componentId: "core-12_27_0__sc-17s58xs-8"
|
|
96
96
|
})(["", ""], getHelixHeaderTabStyles);
|
|
97
97
|
var StyledGlobalNavigationDropdownTab = /*#__PURE__*/styled(StyledDropdownTabBase).withConfig({
|
|
98
98
|
displayName: "StyledGlobalNavigationDropdownTab",
|
|
99
|
-
componentId: "core-
|
|
99
|
+
componentId: "core-12_27_0__sc-17s58xs-9"
|
|
100
100
|
})(["", ""], getHelixHeaderTabStyles);
|
|
101
101
|
var StyledGlobalNavigationDropdownTabInner = /*#__PURE__*/styled(StyledTabInnerBase).withConfig({
|
|
102
102
|
displayName: "StyledGlobalNavigationDropdownTabInner",
|
|
103
|
-
componentId: "core-
|
|
103
|
+
componentId: "core-12_27_0__sc-17s58xs-10"
|
|
104
104
|
})(["align-items:center;cursor:pointer;display:inline-flex;"]);
|
|
105
105
|
var StyledGlobalNavigationLink = /*#__PURE__*/styled.span.withConfig({
|
|
106
106
|
displayName: "StyledGlobalNavigationLink",
|
|
107
|
-
componentId: "core-
|
|
107
|
+
componentId: "core-12_27_0__sc-17s58xs-11"
|
|
108
108
|
})(["padding-left:6px;padding-right:6px;"]);
|
|
109
109
|
|
|
110
110
|
//// END HELIX GLOBAL NAVIGATION TAB STYLES ////
|
|
111
111
|
|
|
112
112
|
export var StyledOverlay = /*#__PURE__*/styled(Card).withConfig({
|
|
113
113
|
displayName: "StyledOverlay",
|
|
114
|
-
componentId: "core-
|
|
114
|
+
componentId: "core-12_27_0__sc-17s58xs-12"
|
|
115
115
|
})(["max-height:40vh;", "{padding:0;display:flex;justify-content:center;a{margin:unset;padding:unset;}}", "{padding:0;display:flex;}", "{padding:2px 16px 4px 16px;}", ",", "{color:", ";border-radius:0;display:flex;width:100%;background:inherit;font-weight:inherit;font-size:inherit;padding:0;}[data-selected='true']{", ",", "{border-bottom-color:transparent;color:", ";}}"], StyledItem, StyledLink, StyledTabInnerBase, StyledLink, StyledTabBase, colors.gray15, StyledLink, StyledTabBase, colors.blue50);
|
|
116
116
|
export var StyledTabList = /*#__PURE__*/styled.div.withConfig({
|
|
117
117
|
displayName: "StyledTabList",
|
|
118
|
-
componentId: "core-
|
|
118
|
+
componentId: "core-12_27_0__sc-17s58xs-13"
|
|
119
119
|
})(["display:flex;width:100%;"]);
|
|
120
120
|
export var StyledTabs = /*#__PURE__*/styled.nav.withConfig({
|
|
121
121
|
displayName: "StyledTabs",
|
|
122
|
-
componentId: "core-
|
|
122
|
+
componentId: "core-12_27_0__sc-17s58xs-14"
|
|
123
123
|
})(["background-color:", ";display:flex;overflow:hidden;width:100%;", "{&:nth-child(1n + ", "){&:not(", "){", "}}}", ""], function (_ref6) {
|
|
124
124
|
var $dark = _ref6.$dark;
|
|
125
125
|
return $dark && colors.gray15;
|
|
@@ -48,7 +48,7 @@ var getSlideOutAnimation = function getSlideOutAnimation($placement) {
|
|
|
48
48
|
};
|
|
49
49
|
export var StyledTearsheetContent = /*#__PURE__*/styled.div.withConfig({
|
|
50
50
|
displayName: "StyledTearsheetContent",
|
|
51
|
-
componentId: "core-
|
|
51
|
+
componentId: "core-12_27_0__sc-ljrxoq-0"
|
|
52
52
|
})(["display:flex;z-index:2;width:100%;", " ", " ", " ", ""], function (_ref) {
|
|
53
53
|
var $open = _ref.$open,
|
|
54
54
|
$placement = _ref.$placement;
|
|
@@ -68,7 +68,7 @@ export var StyledTearsheetContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
68
68
|
export var minScrimSize = spacing.xxl * 3;
|
|
69
69
|
export var StyledTearsheetBody = /*#__PURE__*/styled.div.withConfig({
|
|
70
70
|
displayName: "StyledTearsheetBody",
|
|
71
|
-
componentId: "core-
|
|
71
|
+
componentId: "core-12_27_0__sc-ljrxoq-1"
|
|
72
72
|
})(["display:flex;overflow-y:auto;flex-direction:column;background-color:", ";&:focus-visible{", "}", " ", "}"], colors.white, getFocusInset(), function (_ref5) {
|
|
73
73
|
var $block = _ref5.$block,
|
|
74
74
|
$placement = _ref5.$placement,
|
|
@@ -89,7 +89,7 @@ var zoomIn = /*#__PURE__*/keyframes(["from{transform:scale(0);}to{transform:scal
|
|
|
89
89
|
var zoomOut = /*#__PURE__*/keyframes(["from{transform:scale(1);}to{transform:scale(0);}"]);
|
|
90
90
|
export var StyledScrimContainer = /*#__PURE__*/styled.div.withConfig({
|
|
91
91
|
displayName: "StyledScrimContainer",
|
|
92
|
-
componentId: "core-
|
|
92
|
+
componentId: "core-12_27_0__sc-ljrxoq-2"
|
|
93
93
|
})(["", ""], function (_ref7) {
|
|
94
94
|
var $placement = _ref7.$placement;
|
|
95
95
|
var minSizeProp = ['top', 'bottom'].includes($placement) ? 'min-height' : 'min-width';
|
|
@@ -97,7 +97,7 @@ export var StyledScrimContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
97
97
|
});
|
|
98
98
|
export var StyledButtonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
99
99
|
displayName: "StyledButtonContainer",
|
|
100
|
-
componentId: "core-
|
|
100
|
+
componentId: "core-12_27_0__sc-ljrxoq-3"
|
|
101
101
|
})(["", ""], function (_ref8) {
|
|
102
102
|
var $placement = _ref8.$placement;
|
|
103
103
|
switch ($placement) {
|
|
@@ -112,7 +112,7 @@ export var StyledButtonContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
112
112
|
});
|
|
113
113
|
export var StyledButtonCard = /*#__PURE__*/styled(Card).withConfig({
|
|
114
114
|
displayName: "StyledButtonCard",
|
|
115
|
-
componentId: "core-
|
|
115
|
+
componentId: "core-12_27_0__sc-ljrxoq-4"
|
|
116
116
|
})(["display:inline-flex;margin:", "px;", " ", " ", ""], spacing.xl, function (_ref9) {
|
|
117
117
|
var $open = _ref9.$open;
|
|
118
118
|
return $open ? css(["transform:scale(1);"]) : css(["transform:scale(0);"]);
|
|
@@ -3,7 +3,7 @@ import { getInputStyles } from '../Input/Input.styles';
|
|
|
3
3
|
import { spacing } from '../_styles/spacing';
|
|
4
4
|
export var StyledTextArea = /*#__PURE__*/styled.textarea.withConfig({
|
|
5
5
|
displayName: "StyledTextArea",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_27_0__sc-u5mow1-0"
|
|
7
7
|
})(["", ";height:auto;min-height:64px;padding:", "px ", "px;resize:", ";"], getInputStyles, spacing.sm, spacing.md, function (_ref) {
|
|
8
8
|
var _ref$$resize = _ref.$resize,
|
|
9
9
|
$resize = _ref$$resize === void 0 ? 'both' : _ref$$resize;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorError.js","names":["React","Banner","EditorError","_ref","children","createElement","variant","Content","Body"],"sources":["../../src/TextEditor/EditorError.tsx"],"sourcesContent":["import React, { type PropsWithChildren } from 'react'\nimport { Banner } from '../Banner'\n\nexport const EditorError = ({ children }: PropsWithChildren<{}>) => {\n return (\n <Banner variant=\"error\">\n <Banner.Content>\n <Banner.Body>{children}</Banner.Body>\n </Banner.Content>\n </Banner>\n )\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAkC,OAAO;AACrD,SAASC,MAAM,QAAQ,WAAW;AAElC,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAA4C;EAAA,IAAtCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EACpC,oBACEJ,KAAA,CAAAK,aAAA,CAACJ,MAAM;IAACK,OAAO,EAAC;EAAO,gBACrBN,KAAA,CAAAK,aAAA,CAACJ,MAAM,CAACM,OAAO,qBACbP,KAAA,CAAAK,aAAA,CAACJ,MAAM,CAACO,IAAI,QAAEJ,QAAsB,CACtB,CACV,CAAC;AAEb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StickyToolbar.types.js","names":[],"sources":["../../../src/TextEditor/StickyToolbar/StickyToolbar.types.ts"],"sourcesContent":["export interface StickyToolbarState {\n toolbar: HTMLElement | null\n placeholder: HTMLElement | null\n isSticky: boolean\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StickyToolbar.utils.js","names":["StickyToolbarManager","_this","_classCallCheck","_defineProperty","toolbar","placeholder","isSticky","_this$state","state","editorContainer","closest","editorRect","getBoundingClientRect","toolbarHeight","offsetHeight","shouldBeSticky","top","bottom","toggleSticky","updatePosition","_createClass","key","value","sticky","_this$state2","style","height","concat","Object","assign","position","left","width","zIndex","background","borderBottom","resetToolbarStyles","init","_toolbar$parentNode","querySelector","document","createElement","visibility","parentNode","insertBefore","window","addEventListener","handleScroll","destroy","removeEventListener","DOMRect","remove","createStickyToolbar","manager","retryTimeout","retryCount","maxRetries","setTimeout","clearTimeout"],"sources":["../../../src/TextEditor/StickyToolbar/StickyToolbar.utils.ts"],"sourcesContent":["import type { StickyToolbarState } from './StickyToolbar.types'\n\nclass StickyToolbarManager {\n private state: StickyToolbarState = {\n toolbar: null,\n placeholder: null,\n isSticky: false,\n }\n\n private handleScroll = () => {\n const { toolbar, placeholder } = this.state\n if (!toolbar || !placeholder) {\n return\n }\n\n const editorContainer = toolbar.closest('.ck-editor')\n if (!editorContainer) {\n return\n }\n\n const editorRect = editorContainer.getBoundingClientRect()\n const toolbarHeight = toolbar.offsetHeight\n const shouldBeSticky =\n editorRect.top <= 0 && editorRect.bottom > toolbarHeight\n\n if (shouldBeSticky !== this.state.isSticky) {\n this.toggleSticky(shouldBeSticky, editorRect)\n } else if (shouldBeSticky) {\n this.updatePosition(editorRect)\n }\n }\n\n private toggleSticky(sticky: boolean, editorRect: DOMRect) {\n const { toolbar, placeholder } = this.state\n if (!toolbar || !placeholder) {\n return\n }\n\n this.state.isSticky = sticky\n\n if (sticky) {\n placeholder.style.height = `${toolbar.offsetHeight}px`\n Object.assign(toolbar.style, {\n position: 'fixed',\n top: '0px',\n left: `${editorRect.left}px`,\n width: `${editorRect.width}px`,\n zIndex: '1000',\n background: 'var(--ck-color-toolbar-background, #fff)',\n borderBottom: '1px solid var(--ck-color-toolbar-border, #ccc)',\n })\n } else {\n placeholder.style.height = '0px'\n this.resetToolbarStyles(toolbar)\n }\n }\n\n private updatePosition(editorRect: DOMRect) {\n const { toolbar } = this.state\n if (!toolbar) {\n return\n }\n\n toolbar.style.left = `${editorRect.left}px`\n toolbar.style.width = `${editorRect.width}px`\n }\n\n private resetToolbarStyles(toolbar: HTMLElement) {\n Object.assign(toolbar.style, {\n position: '',\n top: '',\n left: '',\n width: '',\n zIndex: '',\n background: '',\n borderBottom: '',\n })\n }\n\n init(editorContainer: HTMLElement): boolean {\n const toolbar = editorContainer.querySelector('.ck-toolbar') as HTMLElement\n if (!toolbar) {\n return false\n }\n\n this.resetToolbarStyles(toolbar)\n\n const placeholder = document.createElement('div')\n placeholder.style.height = '0px'\n placeholder.style.visibility = 'hidden'\n toolbar.parentNode?.insertBefore(placeholder, toolbar)\n\n this.state = { toolbar, placeholder, isSticky: false }\n\n window.addEventListener('scroll', this.handleScroll)\n window.addEventListener('resize', this.handleScroll)\n\n this.handleScroll()\n\n return true\n }\n\n destroy(): void {\n window.removeEventListener('scroll', this.handleScroll)\n window.removeEventListener('resize', this.handleScroll)\n\n if (this.state.isSticky && this.state.toolbar) {\n this.toggleSticky(false, new DOMRect())\n }\n\n if (this.state.placeholder) {\n this.state.placeholder.remove()\n }\n\n this.state = { toolbar: null, placeholder: null, isSticky: false }\n }\n}\n\nexport function createStickyToolbar(editorContainer: HTMLElement) {\n const manager = new StickyToolbarManager()\n let retryTimeout: ReturnType<typeof setTimeout> | null = null\n let retryCount = 0\n const maxRetries = 50\n\n const init = () => {\n if (!manager.init(editorContainer)) {\n if (retryCount < maxRetries) {\n retryCount++\n retryTimeout = setTimeout(init, 100)\n }\n }\n }\n\n init()\n\n return {\n destroy: () => {\n if (retryTimeout) {\n clearTimeout(retryTimeout)\n retryTimeout = null\n }\n manager.destroy()\n },\n }\n}\n"],"mappings":";;;;;;;IAEMA,oBAAoB;EAAA,SAAAA,qBAAA;IAAA,IAAAC,KAAA;IAAAC,eAAA,OAAAF,oBAAA;IAAAG,eAAA,gBACY;MAClCC,OAAO,EAAE,IAAI;MACbC,WAAW,EAAE,IAAI;MACjBC,QAAQ,EAAE;IACZ,CAAC;IAAAH,eAAA,uBAEsB,YAAM;MAC3B,IAAAI,WAAA,GAAiCN,KAAI,CAACO,KAAK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QAAEJ,OAAO,EAAE,IAAI;QAAEC,WAAW,EAAE,IAAI;QAAEC,QAAQ,EAAE;MAAM,CAAC;IACpE;EAAC;AAAA;AAGH,OAAO,SAAS8C,mBAAmBA,CAAC3C,eAA4B,EAAE;EAChE,IAAM4C,OAAO,GAAG,IAAIrD,oBAAoB,CAAC,CAAC;EAC1C,IAAIsD,YAAkD,GAAG,IAAI;EAC7D,IAAIC,UAAU,GAAG,CAAC;EAClB,IAAMC,UAAU,GAAG,EAAE;EAErB,IAAMnB,KAAI,GAAG,SAAPA,IAAIA,CAAA,EAAS;IACjB,IAAI,CAACgB,OAAO,CAAChB,IAAI,CAAC5B,eAAe,CAAC,EAAE;MAClC,IAAI8C,UAAU,GAAGC,UAAU,EAAE;QAC3BD,UAAU,EAAE;QACZD,YAAY,GAAGG,UAAU,CAACpB,KAAI,EAAE,GAAG,CAAC;MACtC;IACF;EACF,CAAC;EAEDA,KAAI,CAAC,CAAC;EAEN,OAAO;IACLW,OAAO,EAAE,SAATA,OAAOA,CAAA,EAAQ;MACb,IAAIM,YAAY,EAAE;QAChBI,YAAY,CAACJ,YAAY,CAAC;QAC1BA,YAAY,GAAG,IAAI;MACrB;MACAD,OAAO,CAACL,OAAO,CAAC,CAAC;IACnB;EACF,CAAC;AACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["createStickyToolbar","useStickyToolbar"],"sources":["../../../src/TextEditor/StickyToolbar/index.ts"],"sourcesContent":["export type { StickyToolbarState } from './StickyToolbar.types'\nexport { createStickyToolbar } from './StickyToolbar.utils'\nexport { useStickyToolbar } from './useStickyToolbar'\nexport type {\n UseStickyToolbarProps,\n UseStickyToolbarReturn,\n} from './useStickyToolbar.types'\n"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,gBAAgB,QAAQ,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStickyToolbar.js","names":["useEffect","useMemo","createStickyToolbar","useStickyToolbar","_ref","enabled","editorRef","config","editor","_ref$cssLoading","cssLoading","enhancedConfig","_objectSpread","ui","viewportOffset","top","right","bottom","left","current","view","stickyPanel","isActive","stickyToolbar","destroy"],"sources":["../../../src/TextEditor/StickyToolbar/useStickyToolbar.ts"],"sourcesContent":["import { useEffect, useMemo } from 'react'\n\nimport { createStickyToolbar } from './StickyToolbar.utils'\nimport type {\n UseStickyToolbarProps,\n UseStickyToolbarReturn,\n} from './useStickyToolbar.types'\n\nexport function useStickyToolbar({\n enabled,\n editorRef,\n config,\n editor,\n cssLoading = false,\n}: UseStickyToolbarProps): UseStickyToolbarReturn {\n const enhancedConfig = useMemo(() => {\n if (!enabled) {\n return config\n }\n\n // Disable CKEditor's built-in sticky toolbar\n return {\n ...config,\n ui: {\n ...config.ui,\n viewportOffset: {\n top: 10000,\n right: 0,\n bottom: 0,\n left: 0,\n },\n },\n }\n }, [enabled, config])\n\n useEffect(() => {\n if (!enabled || !editorRef.current || cssLoading) {\n return\n }\n\n // Disable CKEditor's built-in sticky toolbar\n if (editor?.ui.view.stickyPanel) {\n editor.ui.view.stickyPanel.isActive = false\n }\n\n const stickyToolbar = createStickyToolbar(editorRef.current)\n return stickyToolbar.destroy\n }, [enabled, editorRef, editor, cssLoading])\n\n return { config: enhancedConfig }\n}\n"],"mappings":";;;;;;AAAA,SAASA,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAE1C,SAASC,mBAAmB,QAAQ,uBAAuB;AAM3D,OAAO,SAASC,gBAAgBA,CAAAC,IAAA,EAMkB;EAAA,IALhDC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAAC,eAAA,GAAAL,IAAA,CACNM,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;EAElB,IAAME,cAAc,GAAGV,OAAO,CAAC,YAAM;IACnC,IAAI,CAACI,OAAO,EAAE;MACZ,OAAOE,MAAM;IACf;;IAEA;IACA,OAAAK,aAAA,CAAAA,aAAA,KACKL,MAAM;MACTM,EAAE,EAAAD,aAAA,CAAAA,aAAA,KACGL,MAAM,CAACM,EAAE;QACZC,cAAc,EAAE;UACdC,GAAG,EAAE,KAAK;UACVC,KAAK,EAAE,CAAC;UACRC,MAAM,EAAE,CAAC;UACTC,IAAI,EAAE;QACR;MAAC;IACF;EAEL,CAAC,EAAE,CAACb,OAAO,EAAEE,MAAM,CAAC,CAAC;EAErBP,SAAS,CAAC,YAAM;IACd,IAAI,CAACK,OAAO,IAAI,CAACC,SAAS,CAACa,OAAO,IAAIT,UAAU,EAAE;MAChD;IACF;;IAEA;IACA,IAAIF,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEK,EAAE,CAACO,IAAI,CAACC,WAAW,EAAE;MAC/Bb,MAAM,CAACK,EAAE,CAACO,IAAI,CAACC,WAAW,CAACC,QAAQ,GAAG,KAAK;IAC7C;IAEA,IAAMC,aAAa,GAAGrB,mBAAmB,CAACI,SAAS,CAACa,OAAO,CAAC;IAC5D,OAAOI,aAAa,CAACC,OAAO;EAC9B,CAAC,EAAE,CAACnB,OAAO,EAAEC,SAAS,EAAEE,MAAM,EAAEE,UAAU,CAAC,CAAC;EAE5C,OAAO;IAAEH,MAAM,EAAEI;EAAe,CAAC;AACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStickyToolbar.types.js","names":[],"sources":["../../../src/TextEditor/StickyToolbar/useStickyToolbar.types.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig } from 'ckeditor5'\nimport type { RefObject } from 'react'\n\nexport interface UseStickyToolbarProps {\n enabled: boolean\n editorRef: RefObject<HTMLDivElement>\n config: EditorConfig\n editor?: ClassicEditor | null\n cssLoading?: boolean\n}\n\nexport interface UseStickyToolbarReturn {\n config: EditorConfig\n}\n"],"mappings":""}
|
|
@@ -1,3 +1,44 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TextEditorProps } from './TextEditor.types';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* To ensure your Jest tests work with the new CKEditor implementation, wrap your Jest configuration with `coreReactJestConfig`:
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
*
|
|
8
|
+
* // Using Jest config file
|
|
9
|
+
*
|
|
10
|
+
* const { coreReactJestConfig } = require('@procore/core-react/jestConfig')
|
|
11
|
+
*
|
|
12
|
+
* module.exports = coreReactJestConfig({
|
|
13
|
+
* // Your existing Jest config
|
|
14
|
+
* })
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* // Using Hammer
|
|
19
|
+
*
|
|
20
|
+
* import { coreReactJestConfig } from '@procore/core-react/jestConfig'
|
|
21
|
+
*
|
|
22
|
+
* export default {
|
|
23
|
+
* testJest: (defaultConfig) =>
|
|
24
|
+
* coreReactJestConfig({
|
|
25
|
+
* ...defaultConfig,
|
|
26
|
+
* // Your existing Jest config
|
|
27
|
+
* }),
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
*
|
|
32
|
+
* // Using Core Scripts
|
|
33
|
+
*
|
|
34
|
+
* const { coreReactJestConfig } = require('@procore/core-react/jestConfig')
|
|
35
|
+
*
|
|
36
|
+
* module.exports = () => ({
|
|
37
|
+
* jestOverride: (defaultConfig) =>
|
|
38
|
+
* coreReactJestConfig({
|
|
39
|
+
* ...defaultConfig,
|
|
40
|
+
* // Your existing Jest config
|
|
41
|
+
* }),
|
|
42
|
+
* })
|
|
43
|
+
*/
|
|
44
|
+
export declare function TextEditor({ disabled, error, value, initialValue, onChange, onInit, onBlur, config: externalConfig, plugins: stringPlugins, locale: propLocale, ...restProps }: TextEditorProps): React.JSX.Element | null;
|
|
@@ -1,15 +1,180 @@
|
|
|
1
|
-
|
|
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
|
+
var _excluded = ["disabled", "error", "value", "initialValue", "onChange", "onInit", "onBlur", "config", "plugins", "locale"];
|
|
3
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
+
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); }
|
|
9
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
10
|
+
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."); }
|
|
11
|
+
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; } }
|
|
12
|
+
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; }
|
|
13
|
+
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; } }
|
|
14
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
2
15
|
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
16
|
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; }
|
|
17
|
+
import { CKEditor } from '@ckeditor/ckeditor5-react';
|
|
18
|
+
import { ClassicEditor } from 'ckeditor5';
|
|
4
19
|
import React from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
20
|
+
import { useOverridableFocusScope } from '../_hooks/FocusScopeOverride';
|
|
21
|
+
import { useI18nContext } from '../_hooks/I18n';
|
|
22
|
+
import { useZIndexContext } from '../_hooks/ZIndex';
|
|
23
|
+
import { useStickyToolbar } from './StickyToolbar';
|
|
24
|
+
import { GlobalEditorStyles, StyledTextEditor } from './TextEditor.styles';
|
|
25
|
+
import { TextEditorContext } from './TextEditorProvider';
|
|
26
|
+
import { TextEditorTheme } from './textEditorTheming';
|
|
27
|
+
import { useCKEditorCss } from './useCKEditorCss';
|
|
28
|
+
import { useTabAsNavigation } from './useTabAsNavigation';
|
|
29
|
+
import { addButtonDataAttributes, addPluginsFromStringArray, getDefaultConfig } from './utils';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* To ensure your Jest tests work with the new CKEditor implementation, wrap your Jest configuration with `coreReactJestConfig`:
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
*
|
|
36
|
+
* // Using Jest config file
|
|
37
|
+
*
|
|
38
|
+
* const { coreReactJestConfig } = require('@procore/core-react/jestConfig')
|
|
39
|
+
*
|
|
40
|
+
* module.exports = coreReactJestConfig({
|
|
41
|
+
* // Your existing Jest config
|
|
42
|
+
* })
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
*
|
|
46
|
+
* // Using Hammer
|
|
47
|
+
*
|
|
48
|
+
* import { coreReactJestConfig } from '@procore/core-react/jestConfig'
|
|
49
|
+
*
|
|
50
|
+
* export default {
|
|
51
|
+
* testJest: (defaultConfig) =>
|
|
52
|
+
* coreReactJestConfig({
|
|
53
|
+
* ...defaultConfig,
|
|
54
|
+
* // Your existing Jest config
|
|
55
|
+
* }),
|
|
56
|
+
* }
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
*
|
|
60
|
+
* // Using Core Scripts
|
|
61
|
+
*
|
|
62
|
+
* const { coreReactJestConfig } = require('@procore/core-react/jestConfig')
|
|
63
|
+
*
|
|
64
|
+
* module.exports = () => ({
|
|
65
|
+
* jestOverride: (defaultConfig) =>
|
|
66
|
+
* coreReactJestConfig({
|
|
67
|
+
* ...defaultConfig,
|
|
68
|
+
* // Your existing Jest config
|
|
69
|
+
* }),
|
|
70
|
+
* })
|
|
71
|
+
*/
|
|
72
|
+
export function TextEditor(_ref) {
|
|
73
|
+
var disabled = _ref.disabled,
|
|
74
|
+
error = _ref.error,
|
|
75
|
+
value = _ref.value,
|
|
76
|
+
initialValue = _ref.initialValue,
|
|
77
|
+
onChange = _ref.onChange,
|
|
78
|
+
onInit = _ref.onInit,
|
|
79
|
+
onBlur = _ref.onBlur,
|
|
80
|
+
externalConfig = _ref.config,
|
|
81
|
+
stringPlugins = _ref.plugins,
|
|
82
|
+
propLocale = _ref.locale,
|
|
83
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
84
|
+
var _useCKEditorCss = useCKEditorCss(),
|
|
85
|
+
cssLoading = _useCKEditorCss.isLoading;
|
|
86
|
+
var editorRef = React.useRef(null);
|
|
87
|
+
var editorInstanceRef = React.useRef(null);
|
|
88
|
+
var initialValueRef = React.useRef(value || initialValue || '');
|
|
89
|
+
var _React$useState = React.useState(false),
|
|
90
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
91
|
+
isDirtyState = _React$useState2[0],
|
|
92
|
+
setIsDirtyState = _React$useState2[1];
|
|
93
|
+
var _useI18nContext = useI18nContext(),
|
|
94
|
+
contextLocale = _useI18nContext.locale;
|
|
95
|
+
var locale = propLocale || contextLocale;
|
|
96
|
+
React.useEffect(function () {
|
|
97
|
+
if (value !== undefined) {
|
|
98
|
+
initialValueRef.current = value;
|
|
99
|
+
}
|
|
100
|
+
}, [value]);
|
|
101
|
+
var _useZIndexContext = useZIndexContext(),
|
|
102
|
+
zIndex = _useZIndexContext.value;
|
|
103
|
+
var _React$useContext = React.useContext(TextEditorContext),
|
|
104
|
+
features = _React$useContext.features;
|
|
105
|
+
var enableStickyToolbar = !!(features !== null && features !== void 0 && features.stickyToolbar);
|
|
106
|
+
var enableTabAsNavigation = !!(features !== null && features !== void 0 && features.tabAsNavigation);
|
|
107
|
+
var mergedConfig = React.useMemo(function () {
|
|
108
|
+
var defaultConfig = getDefaultConfig(locale);
|
|
109
|
+
|
|
110
|
+
// Handle string plugins for backward compatibility
|
|
111
|
+
var configWithPlugins = stringPlugins !== null && stringPlugins !== void 0 && stringPlugins.length ? addPluginsFromStringArray(defaultConfig, stringPlugins) : defaultConfig;
|
|
112
|
+
|
|
113
|
+
// Apply any external CKEditor config overrides provided by the consumer
|
|
114
|
+
var externalResult = typeof externalConfig === 'function' ? externalConfig(configWithPlugins) : undefined;
|
|
115
|
+
// Merge default config (with plugins) and consumer overrides
|
|
116
|
+
var finalConfig = _objectSpread(_objectSpread({}, configWithPlugins), externalResult !== null && externalResult !== void 0 ? externalResult : {});
|
|
117
|
+
return finalConfig;
|
|
118
|
+
}, [externalConfig, locale, stringPlugins]);
|
|
119
|
+
var focusScope = useOverridableFocusScope();
|
|
120
|
+
React.useEffect(function () {
|
|
121
|
+
focusScope.setProps({
|
|
122
|
+
contain: false
|
|
123
|
+
});
|
|
124
|
+
}, [focusScope]);
|
|
125
|
+
var handleChange = function handleChange(_event, editor) {
|
|
126
|
+
var data = editor.getData();
|
|
127
|
+
var isDirty = data !== initialValueRef.current;
|
|
128
|
+
|
|
129
|
+
// Call onDirty only on first content modification
|
|
130
|
+
if (isDirty && !isDirtyState) {
|
|
131
|
+
setIsDirtyState(true);
|
|
132
|
+
}
|
|
133
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data, isDirty);
|
|
134
|
+
};
|
|
135
|
+
var handleReady = function handleReady(editor) {
|
|
136
|
+
addButtonDataAttributes(editor);
|
|
137
|
+
editorInstanceRef.current = editor;
|
|
138
|
+
if (initialValue) {
|
|
139
|
+
editor.setData(initialValue);
|
|
140
|
+
}
|
|
141
|
+
onInit === null || onInit === void 0 ? void 0 : onInit(editor);
|
|
142
|
+
};
|
|
143
|
+
var handleBlur = function handleBlur(event, editor) {
|
|
144
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event, editor);
|
|
145
|
+
};
|
|
146
|
+
var _useStickyToolbar = useStickyToolbar({
|
|
147
|
+
config: mergedConfig,
|
|
148
|
+
enabled: enableStickyToolbar,
|
|
149
|
+
editor: editorInstanceRef.current,
|
|
150
|
+
editorRef: editorRef,
|
|
151
|
+
cssLoading: cssLoading
|
|
152
|
+
}),
|
|
153
|
+
stickyConfig = _useStickyToolbar.config;
|
|
154
|
+
var _useTabAsNavigation = useTabAsNavigation({
|
|
155
|
+
config: stickyConfig,
|
|
156
|
+
enabled: enableTabAsNavigation,
|
|
157
|
+
editor: editorInstanceRef.current
|
|
158
|
+
}),
|
|
159
|
+
config = _useTabAsNavigation.config;
|
|
160
|
+
var editorKey = "".concat(locale, "-").concat(enableTabAsNavigation);
|
|
161
|
+
if (cssLoading) {
|
|
162
|
+
return null;
|
|
12
163
|
}
|
|
13
|
-
return /*#__PURE__*/React.createElement(
|
|
14
|
-
|
|
164
|
+
return /*#__PURE__*/React.createElement(StyledTextEditor, {
|
|
165
|
+
ref: editorRef,
|
|
166
|
+
key: editorKey,
|
|
167
|
+
error: error
|
|
168
|
+
}, /*#__PURE__*/React.createElement(GlobalEditorStyles, {
|
|
169
|
+
zIndex: zIndex + 1
|
|
170
|
+
}), /*#__PURE__*/React.createElement(TextEditorTheme, null), /*#__PURE__*/React.createElement(CKEditor, _extends({}, restProps, {
|
|
171
|
+
editor: ClassicEditor,
|
|
172
|
+
config: config,
|
|
173
|
+
disabled: disabled,
|
|
174
|
+
data: value,
|
|
175
|
+
onChange: handleChange,
|
|
176
|
+
onReady: handleReady,
|
|
177
|
+
onBlur: handleBlur
|
|
178
|
+
})));
|
|
179
|
+
}
|
|
15
180
|
//# sourceMappingURL=TextEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.js","names":["React","DeprecatedTextEditor","NextTextEditor","TextEditor","props","tinyMCE","restProps","_objectWithoutProperties","_excluded","createElement"],"sources":["../../src/TextEditor/TextEditor.tsx"],"sourcesContent":["import React from 'react'\nimport { DeprecatedTextEditor } from '../DeprecatedTextEditor'\nimport { NextTextEditor } from '../NextTextEditor'\nimport type { TextEditorProps } from './TextEditor.types'\n\nexport const TextEditor = (props: TextEditorProps) => {\n const { tinyMCE, ...restProps } = props\n\n if (tinyMCE) {\n return <DeprecatedTextEditor {...restProps} />\n }\n\n return <NextTextEditor {...restProps} />\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,cAAc,QAAQ,mBAAmB;AAGlD,OAAO,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,KAAsB,EAAK;EACpD,IAAQC,OAAO,GAAmBD,KAAK,CAA/BC,OAAO;IAAKC,SAAS,GAAAC,wBAAA,CAAKH,KAAK,EAAAI,SAAA;EAEvC,IAAIH,OAAO,EAAE;IACX,oBAAOL,KAAA,CAAAS,aAAA,CAACR,oBAAoB,EAAKK,SAAY,CAAC;EAChD;EAEA,oBAAON,KAAA,CAAAS,aAAA,CAACP,cAAc,EAAKI,SAAY,CAAC;AAC1C,CAAC"}
|
|
1
|
+
{"version":3,"file":"TextEditor.js","names":["CKEditor","ClassicEditor","React","useOverridableFocusScope","useI18nContext","useZIndexContext","useStickyToolbar","GlobalEditorStyles","StyledTextEditor","TextEditorContext","TextEditorTheme","useCKEditorCss","useTabAsNavigation","addButtonDataAttributes","addPluginsFromStringArray","getDefaultConfig","TextEditor","_ref","disabled","error","value","initialValue","onChange","onInit","onBlur","externalConfig","config","stringPlugins","plugins","propLocale","locale","restProps","_objectWithoutProperties","_excluded","_useCKEditorCss","cssLoading","isLoading","editorRef","useRef","editorInstanceRef","initialValueRef","_React$useState","useState","_React$useState2","_slicedToArray","isDirtyState","setIsDirtyState","_useI18nContext","contextLocale","useEffect","undefined","current","_useZIndexContext","zIndex","_React$useContext","useContext","features","enableStickyToolbar","stickyToolbar","enableTabAsNavigation","tabAsNavigation","mergedConfig","useMemo","defaultConfig","configWithPlugins","length","externalResult","finalConfig","_objectSpread","focusScope","setProps","contain","handleChange","_event","editor","data","getData","isDirty","handleReady","setData","handleBlur","event","_useStickyToolbar","enabled","stickyConfig","_useTabAsNavigation","editorKey","concat","createElement","ref","key","_extends","onReady"],"sources":["../../src/TextEditor/TextEditor.tsx"],"sourcesContent":["import { CKEditor } from '@ckeditor/ckeditor5-react'\nimport type { EditorConfig } from 'ckeditor5'\nimport { ClassicEditor, type EventInfo } from 'ckeditor5'\nimport React from 'react'\n\nimport { useOverridableFocusScope } from '../_hooks/FocusScopeOverride'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useZIndexContext } from '../_hooks/ZIndex'\nimport { useStickyToolbar } from './StickyToolbar'\nimport { GlobalEditorStyles, StyledTextEditor } from './TextEditor.styles'\nimport type { TextEditorProps } from './TextEditor.types'\nimport { TextEditorContext } from './TextEditorProvider'\nimport { TextEditorTheme } from './textEditorTheming'\nimport { useCKEditorCss } from './useCKEditorCss'\nimport { useTabAsNavigation } from './useTabAsNavigation'\nimport {\n addButtonDataAttributes,\n addPluginsFromStringArray,\n getDefaultConfig,\n} from './utils'\n\n/**\n * To ensure your Jest tests work with the new CKEditor implementation, wrap your Jest configuration with `coreReactJestConfig`:\n *\n * @example\n *\n * // Using Jest config file\n *\n * const { coreReactJestConfig } = require('@procore/core-react/jestConfig')\n *\n * module.exports = coreReactJestConfig({\n * // Your existing Jest config\n * })\n *\n * @example\n *\n * // Using Hammer\n *\n * import { coreReactJestConfig } from '@procore/core-react/jestConfig'\n *\n * export default {\n * testJest: (defaultConfig) =>\n * coreReactJestConfig({\n * ...defaultConfig,\n * // Your existing Jest config\n * }),\n * }\n *\n * @example\n *\n * // Using Core Scripts\n *\n * const { coreReactJestConfig } = require('@procore/core-react/jestConfig')\n *\n * module.exports = () => ({\n * jestOverride: (defaultConfig) =>\n * coreReactJestConfig({\n * ...defaultConfig,\n * // Your existing Jest config\n * }),\n * })\n */\nexport function TextEditor({\n disabled,\n error,\n value,\n initialValue,\n onChange,\n onInit,\n onBlur,\n config: externalConfig,\n plugins: stringPlugins,\n locale: propLocale,\n ...restProps\n}: TextEditorProps) {\n const { isLoading: cssLoading } = useCKEditorCss()\n\n const editorRef = React.useRef<HTMLDivElement>(null)\n const editorInstanceRef = React.useRef<ClassicEditor | null>(null)\n const initialValueRef = React.useRef<string>(value || initialValue || '')\n const [isDirtyState, setIsDirtyState] = React.useState(false)\n const { locale: contextLocale } = useI18nContext()\n const locale = propLocale || contextLocale\n\n React.useEffect(() => {\n if (value !== undefined) {\n initialValueRef.current = value\n }\n }, [value])\n\n const { value: zIndex } = useZIndexContext()\n\n const { features } = React.useContext(TextEditorContext)\n const enableStickyToolbar = !!features?.stickyToolbar\n const enableTabAsNavigation = !!features?.tabAsNavigation\n\n const mergedConfig = React.useMemo(() => {\n const defaultConfig = getDefaultConfig(locale)\n\n // Handle string plugins for backward compatibility\n const configWithPlugins = stringPlugins?.length\n ? addPluginsFromStringArray(defaultConfig, stringPlugins)\n : defaultConfig\n\n // Apply any external CKEditor config overrides provided by the consumer\n const externalResult =\n typeof externalConfig === 'function'\n ? externalConfig(configWithPlugins)\n : undefined\n // Merge default config (with plugins) and consumer overrides\n let finalConfig: EditorConfig = {\n ...configWithPlugins,\n ...(externalResult ?? {}),\n }\n\n return finalConfig\n }, [externalConfig, locale, stringPlugins])\n\n const focusScope = useOverridableFocusScope()\n React.useEffect(() => {\n focusScope.setProps({ contain: false })\n }, [focusScope])\n\n const handleChange = (\n _event: EventInfo<string, unknown>,\n editor: ClassicEditor\n ) => {\n const data = editor.getData()\n const isDirty = data !== initialValueRef.current\n\n // Call onDirty only on first content modification\n if (isDirty && !isDirtyState) {\n setIsDirtyState(true)\n }\n\n onChange?.(data, isDirty)\n }\n\n const handleReady = (editor: ClassicEditor) => {\n addButtonDataAttributes(editor)\n editorInstanceRef.current = editor\n\n if (initialValue) {\n editor.setData(initialValue)\n }\n\n onInit?.(editor)\n }\n\n const handleBlur = (\n event: EventInfo<string, unknown>,\n editor: ClassicEditor\n ) => {\n onBlur?.(event, editor)\n }\n\n const { config: stickyConfig } = useStickyToolbar({\n config: mergedConfig,\n enabled: enableStickyToolbar,\n editor: editorInstanceRef.current,\n editorRef,\n cssLoading,\n })\n\n const { config } = useTabAsNavigation({\n config: stickyConfig,\n enabled: enableTabAsNavigation,\n editor: editorInstanceRef.current,\n })\n\n const editorKey = `${locale}-${enableTabAsNavigation}`\n\n if (cssLoading) {\n return null\n }\n\n return (\n <StyledTextEditor ref={editorRef} key={editorKey} error={error}>\n <GlobalEditorStyles zIndex={zIndex + 1} />\n <TextEditorTheme />\n <CKEditor\n {...restProps}\n editor={ClassicEditor}\n config={config}\n disabled={disabled}\n data={value}\n onChange={handleChange}\n onReady={handleReady}\n onBlur={handleBlur}\n />\n </StyledTextEditor>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAASA,QAAQ,QAAQ,2BAA2B;AAEpD,SAASC,aAAa,QAAwB,WAAW;AACzD,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,wBAAwB,QAAQ,8BAA8B;AACvE,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,SAASC,kBAAkB,EAAEC,gBAAgB,QAAQ,qBAAqB;AAE1E,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC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MAAM,EAAEnC,iBAAiB,CAACY,OAAO;MACjCd,SAAS,EAATA,SAAS;MACTF,UAAU,EAAVA;IACF,CAAC,CAAC;IANciD,YAAY,GAAAF,iBAAA,CAApBxD,MAAM;EAQd,IAAA2D,mBAAA,GAAmBzE,kBAAkB,CAAC;MACpCc,MAAM,EAAE0D,YAAY;MACpBD,OAAO,EAAExB,qBAAqB;MAC9Be,MAAM,EAAEnC,iBAAiB,CAACY;IAC5B,CAAC,CAAC;IAJMzB,MAAM,GAAA2D,mBAAA,CAAN3D,MAAM;EAMd,IAAM4D,SAAS,MAAAC,MAAA,CAAMzD,MAAM,OAAAyD,MAAA,CAAI5B,qBAAqB,CAAE;EAEtD,IAAIxB,UAAU,EAAE;IACd,OAAO,IAAI;EACb;EAEA,oBACEjC,KAAA,CAAAsF,aAAA,CAAChF,gBAAgB;IAACiF,GAAG,EAAEpD,SAAU;IAACqD,GAAG,EAAEJ,SAAU;IAACnE,KAAK,EAAEA;EAAM,gBAC7DjB,KAAA,CAAAsF,aAAA,CAACjF,kBAAkB;IAAC8C,MAAM,EAAEA,MAAM,GAAG;EAAE,CAAE,CAAC,eAC1CnD,KAAA,CAAAsF,aAAA,CAAC9E,eAAe,MAAE,CAAC,eACnBR,KAAA,CAAAsF,aAAA,CAACxF,QAAQ,EAAA2F,QAAA,KACH5D,SAAS;IACb2C,MAAM,EAAEzE,aAAc;IACtByB,MAAM,EAAEA,MAAO;IACfR,QAAQ,EAAEA,QAAS;IACnByD,IAAI,EAAEvD,KAAM;IACZE,QAAQ,EAAEkD,YAAa;IACvBoB,OAAO,EAAEd,WAAY;IACrBtD,MAAM,EAAEwD;EAAW,EACpB,CACe,CAAC;AAEvB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { createGlobalStyle } from 'styled-components';
|
|
2
2
|
import { colors } from '../_styles/colors';
|
|
3
|
-
export var GlobalEditorStyles = /*#__PURE__*/createGlobalStyle([":root{--ck-z-default:", ";--ck-z-modal:", ";}.ck-body-wrapper{--ck-z-default:", ";--ck-z-modal:", ";}.ck-balloon-panel{z-index:", " !important;}.ck-content{padding:16px 28px !important;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen,Ubuntu,Cantarell,\"Open Sans\",\"Helvetica Neue\",sans-serif;line-height:1.4;p{margin-top:0 !important;margin-bottom:0 !important;}
|
|
3
|
+
export var GlobalEditorStyles = /*#__PURE__*/createGlobalStyle([":root{--ck-z-default:", ";--ck-z-modal:", ";}.ck-body-wrapper{--ck-z-default:", ";--ck-z-modal:", ";}.ck-balloon-panel{z-index:", " !important;}.ck-content{padding:16px 28px !important;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen,Ubuntu,Cantarell,\"Open Sans\",\"Helvetica Neue\",sans-serif;line-height:1.4;p{margin-top:0 !important;margin-bottom:0 !important;}ol,ol ol,ol ol ol{list-style-type:revert-layer;}}"], function (_ref) {
|
|
4
4
|
var zIndex = _ref.zIndex;
|
|
5
5
|
return zIndex;
|
|
6
6
|
}, function (_ref2) {
|
|
@@ -18,9 +18,9 @@ export var GlobalEditorStyles = /*#__PURE__*/createGlobalStyle([":root{--ck-z-de
|
|
|
18
18
|
});
|
|
19
19
|
export var StyledTextEditor = /*#__PURE__*/styled.div.withConfig({
|
|
20
20
|
displayName: "StyledTextEditor",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_27_0__sc-1hpwgdu-0"
|
|
22
22
|
})(["", ""], function (_ref6) {
|
|
23
23
|
var error = _ref6.error;
|
|
24
24
|
return error && "\n .ck-sticky-panel__content {\n border-top-color: ".concat(colors.red50, " !important;\n border-left-color: ").concat(colors.red50, " !important;\n border-right-color: ").concat(colors.red50, " !important;\n }\n\n .ck-editor__editable {\n border-left-color: ").concat(colors.red50, " !important;\n border-right-color: ").concat(colors.red50, " !important;\n border-bottom-color: ").concat(colors.red50, " !important;\n }\n ");
|
|
25
25
|
});
|
|
26
|
-
//# sourceMappingURL=
|
|
26
|
+
//# sourceMappingURL=TextEditor.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextEditor.styles.js","names":["styled","createGlobalStyle","colors","GlobalEditorStyles","_ref","zIndex","_ref2","_ref3","_ref4","_ref5","StyledTextEditor","div","withConfig","displayName","componentId","_ref6","error","concat","red50"],"sources":["../../src/TextEditor/TextEditor.styles.ts"],"sourcesContent":["import styled, { createGlobalStyle } from 'styled-components'\nimport { colors } from '../_styles/colors'\n\nexport const GlobalEditorStyles = createGlobalStyle<{\n zIndex: number\n}>`\n :root {\n --ck-z-default: ${({ zIndex }) => zIndex};\n --ck-z-modal: ${({ zIndex }) => zIndex + 999};\n }\n \n .ck-body-wrapper {\n --ck-z-default: ${({ zIndex }) => zIndex};\n --ck-z-modal: ${({ zIndex }) => zIndex + 999};\n }\n \n .ck-balloon-panel {\n z-index: ${({ zIndex }) => zIndex + 1000} !important;\n }\n\n .ck-content {\n padding: 16px 28px !important;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n \"Segoe UI\",\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n \"Open Sans\",\n \"Helvetica Neue\",\n sans-serif;\n line-height: 1.4;\n\n p {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n ol,\n ol ol,\n ol ol ol {\n list-style-type: revert-layer;\n }\n }\n`\n\nexport const StyledTextEditor = styled.div<{\n error?: boolean\n}>`\n ${({ error }) =>\n error &&\n `\n .ck-sticky-panel__content {\n border-top-color: ${colors.red50} !important;\n border-left-color: ${colors.red50} !important;\n border-right-color: ${colors.red50} !important;\n }\n\n .ck-editor__editable {\n border-left-color: ${colors.red50} !important;\n border-right-color: ${colors.red50} !important;\n border-bottom-color: ${colors.red50} !important;\n }\n `}\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,iBAAiB,QAAQ,mBAAmB;AAC7D,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,OAAO,IAAMC,kBAAkB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-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import type { ClassicEditor, EditorConfig, EventInfo } from 'ckeditor5';
|
|
2
|
+
import type { Locale } from '../_hooks/I18n';
|
|
3
|
+
export interface TextEditorProps {
|
|
4
|
+
/**
|
|
5
|
+
* Unique identifier for the editor
|
|
6
|
+
*
|
|
7
|
+
* @since 10.19.0
|
|
8
|
+
*/
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Initial value of the editor
|
|
12
|
+
*
|
|
13
|
+
* @deprecated `initialValue` has been deprecated and will be removed in a future version.
|
|
14
|
+
* Please use the `value` prop instead
|
|
15
|
+
* @deprecatedSince 10.20.0
|
|
16
|
+
* @since 10.19.0
|
|
17
|
+
*/
|
|
18
|
+
initialValue?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The current value of the editor
|
|
21
|
+
*
|
|
22
|
+
* @since 10.19.0
|
|
23
|
+
*/
|
|
24
|
+
value?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Indicates if the editor is disabled
|
|
27
|
+
*
|
|
28
|
+
* @since 10.19.0
|
|
29
|
+
*/
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Indicates if the editor is in an error state
|
|
33
|
+
*
|
|
34
|
+
* @since 10.19.0
|
|
35
|
+
*/
|
|
36
|
+
error?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Locale which will be used for localization. Can be passed directly or
|
|
39
|
+
* set by wrapping components in I18n provider.
|
|
40
|
+
* @since 10.19.0
|
|
41
|
+
*/
|
|
42
|
+
locale?: Locale;
|
|
43
|
+
/**
|
|
44
|
+
* Array of plugin names to add to the editor in addition to the defaults.
|
|
45
|
+
* This provides backward compatibility with the deprecated TinyMCE version of the editor.
|
|
46
|
+
* Supports plugin names like 'link', 'image', 'table', etc.
|
|
47
|
+
*
|
|
48
|
+
* @since 12.26.0
|
|
49
|
+
*/
|
|
50
|
+
plugins?: string[];
|
|
51
|
+
/**
|
|
52
|
+
* Configuration function for customizing the editor
|
|
53
|
+
*
|
|
54
|
+
* @param defaultConfig - The default CKEditor configuration
|
|
55
|
+
* @returns Customized configuration object
|
|
56
|
+
* @since 12.26.0
|
|
57
|
+
*/
|
|
58
|
+
config?: (defaultConfig: EditorConfig) => EditorConfig;
|
|
59
|
+
/**
|
|
60
|
+
* Callback fired when the editor content changes
|
|
61
|
+
*
|
|
62
|
+
* @param value - The current content of the editor
|
|
63
|
+
* @param isDirty - Whether the content differs from the initial value
|
|
64
|
+
* @since 10.19.0
|
|
65
|
+
*/
|
|
66
|
+
onChange?: (value: string, isDirty?: boolean) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Callback fired when the editor gains focus
|
|
69
|
+
*
|
|
70
|
+
* @since 10.19.0
|
|
71
|
+
*/
|
|
72
|
+
onFocus?: (event: EventInfo, editor: ClassicEditor) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Callback fired when the editor loses focus
|
|
75
|
+
*
|
|
76
|
+
* @since 10.19.0
|
|
77
|
+
*/
|
|
78
|
+
onBlur?: (event: EventInfo, editor: ClassicEditor) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Callback fired when an error occurs in the editor
|
|
81
|
+
*
|
|
82
|
+
* @since 10.19.0
|
|
83
|
+
*/
|
|
84
|
+
onError?: (error: Error, details: {
|
|
85
|
+
phase: 'initialization' | 'runtime';
|
|
86
|
+
willEditorRestart?: boolean;
|
|
87
|
+
}) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Callback fired when the editor is ready
|
|
90
|
+
*
|
|
91
|
+
* @since 10.19.0
|
|
92
|
+
*/
|
|
93
|
+
onInit?: (editor: ClassicEditor) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Callback fired after the editor instance is destroyed
|
|
96
|
+
*
|
|
97
|
+
* @since 10.19.0
|
|
98
|
+
*/
|
|
99
|
+
onAfterDestroy?: () => void;
|
|
100
|
+
}
|