@antscorp/antsomi-ui 2.0.92-text-editor-beta.6 → 2.0.93
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/es/assets/css/main.scss +2 -4
- package/es/components/icons/LazyIcon/LazyIcon.d.ts +9 -18
- package/es/components/icons/LazyIcon/LazyIcon.js +9 -18
- package/es/components/icons/index.d.ts +9 -18
- package/es/components/icons/index.js +9 -18
- package/es/components/molecules/EmojiCollections/CommonCollection/index.js +2 -2
- package/es/components/molecules/EmojiCollections/types.d.ts +0 -1
- package/es/components/molecules/EmojiPopover/EmojiPopover.d.ts +0 -1
- package/es/components/molecules/EmojiPopover/EmojiPopover.js +6 -10
- package/es/components/molecules/EmojiPopover/styled.d.ts +2 -2
- package/es/components/molecules/EmojiPopover/styled.js +1 -1
- package/es/components/molecules/TagifyInput/patternHandlers.js +12 -0
- package/es/components/molecules/TagifyInput/utils.d.ts +1 -0
- package/es/components/molecules/TagifyInput/utils.js +1 -0
- package/es/components/molecules/VirtualizedMenu/VirtualizedMenu.d.ts +3 -6
- package/es/components/molecules/VirtualizedMenu/__mocks__/index.js +982 -2594
- package/es/components/molecules/VirtualizedMenu/components/Item/Item.d.ts +11 -1
- package/es/components/molecules/VirtualizedMenu/components/Item/Item.js +25 -53
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.d.ts +5 -8
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/MenuInline.js +46 -289
- package/es/components/molecules/VirtualizedMenu/components/MenuInline/index.js +0 -1
- package/es/components/molecules/VirtualizedMenu/styled.d.ts +2 -2
- package/es/components/molecules/VirtualizedMenu/styled.js +4 -23
- package/es/components/molecules/VirtualizedMenu/types.d.ts +10 -27
- package/es/components/molecules/VirtualizedMenu/utils.d.ts +5 -8
- package/es/components/molecules/VirtualizedMenu/utils.js +18 -13
- package/es/components/molecules/index.d.ts +0 -1
- package/es/components/molecules/index.js +0 -1
- package/es/components/organism/index.d.ts +0 -1
- package/es/components/organism/index.js +0 -1
- package/es/constants/api.js +3 -3
- package/es/hooks/index.d.ts +0 -4
- package/es/hooks/index.js +0 -4
- package/es/locales/i18n.d.ts +1 -1
- package/es/utils/common.d.ts +9 -14
- package/es/utils/common.js +23 -60
- package/es/utils/index.d.ts +0 -1
- package/es/utils/index.js +0 -1
- package/es/utils/web.d.ts +0 -15
- package/es/utils/web.js +0 -39
- package/package.json +4 -22
- package/es/components/atoms/Eyedropper/Eyedropper.d.ts +0 -2
- package/es/components/atoms/Eyedropper/Eyedropper.js +0 -53
- package/es/components/atoms/Eyedropper/index.d.ts +0 -0
- package/es/components/atoms/Eyedropper/index.js +0 -1
- package/es/components/atoms/Eyedropper/styled.d.ts +0 -9
- package/es/components/atoms/Eyedropper/styled.js +0 -45
- package/es/components/atoms/Eyedropper/types.d.ts +0 -5
- package/es/components/atoms/Eyedropper/types.js +0 -1
- package/es/components/icons/ALignRightIcon.d.ts +0 -3
- package/es/components/icons/ALignRightIcon.js +0 -7
- package/es/components/icons/AlignCenterIcon.d.ts +0 -3
- package/es/components/icons/AlignCenterIcon.js +0 -7
- package/es/components/icons/AlignJustifyIcon.d.ts +0 -3
- package/es/components/icons/AlignJustifyIcon.js +0 -7
- package/es/components/icons/AlignLeftIcon.d.ts +0 -3
- package/es/components/icons/AlignLeftIcon.js +0 -7
- package/es/components/icons/ArrowDropDownIcon.d.ts +0 -3
- package/es/components/icons/ArrowDropDownIcon.js +0 -7
- package/es/components/icons/ChevronRightIcon.d.ts +0 -3
- package/es/components/icons/ChevronRightIcon.js +0 -7
- package/es/components/icons/ColorizeIcon.d.ts +0 -3
- package/es/components/icons/ColorizeIcon.js +0 -7
- package/es/components/icons/LinkOffIcon.d.ts +0 -3
- package/es/components/icons/LinkOffIcon.js +0 -7
- package/es/components/icons/MinusIcon.d.ts +0 -3
- package/es/components/icons/MinusIcon.js +0 -7
- package/es/components/index.scss +0 -2
- package/es/components/molecules/EyedropperButton/EyedropperButton.d.ts +0 -11
- package/es/components/molecules/EyedropperButton/EyedropperButton.js +0 -34
- package/es/components/molecules/EyedropperButton/index.d.ts +0 -0
- package/es/components/molecules/EyedropperButton/index.js +0 -1
- package/es/components/molecules/EyedropperButton/styled.d.ts +0 -7
- package/es/components/molecules/EyedropperButton/styled.js +0 -23
- package/es/components/molecules/FontSizeInput/FontSizeInput.d.ts +0 -3
- package/es/components/molecules/FontSizeInput/FontSizeInput.js +0 -134
- package/es/components/molecules/FontSizeInput/components/FontSizeControl.d.ts +0 -8
- package/es/components/molecules/FontSizeInput/components/FontSizeControl.js +0 -14
- package/es/components/molecules/FontSizeInput/components/FontSizeDropdown.d.ts +0 -21
- package/es/components/molecules/FontSizeInput/components/FontSizeDropdown.js +0 -19
- package/es/components/molecules/FontSizeInput/constants.d.ts +0 -2
- package/es/components/molecules/FontSizeInput/constants.js +0 -5
- package/es/components/molecules/FontSizeInput/index.d.ts +0 -2
- package/es/components/molecules/FontSizeInput/index.js +0 -1
- package/es/components/molecules/FontSizeInput/styled.d.ts +0 -7
- package/es/components/molecules/FontSizeInput/styled.js +0 -40
- package/es/components/molecules/FontSizeInput/styles.scss +0 -15
- package/es/components/molecules/FontSizeInput/types.d.ts +0 -23
- package/es/components/molecules/FontSizeInput/types.js +0 -1
- package/es/components/molecules/FontSizeInput/utils.d.ts +0 -7
- package/es/components/molecules/FontSizeInput/utils.js +0 -9
- package/es/components/molecules/index.scss +0 -1
- package/es/components/organism/ActivityTimeline/__mocks__/event_tracking.json +0 -1290
- package/es/components/organism/ActivityTimeline/__mocks__/timeline.json +0 -3059
- package/es/components/organism/TextEditor/TextEditor.d.ts +0 -3
- package/es/components/organism/TextEditor/TextEditor.js +0 -264
- package/es/components/organism/TextEditor/__mocks__/text-block.settings.json +0 -320
- package/es/components/organism/TextEditor/__mocks__/text-contennt.d.ts +0 -1
- package/es/components/organism/TextEditor/__mocks__/text-contennt.js +0 -38
- package/es/components/organism/TextEditor/constants.d.ts +0 -177
- package/es/components/organism/TextEditor/constants.js +0 -323
- package/es/components/organism/TextEditor/extensions/BackgroundColor.d.ts +0 -25
- package/es/components/organism/TextEditor/extensions/BackgroundColor.js +0 -46
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu-plugin.d.ts +0 -140
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu-plugin.js +0 -366
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu.d.ts +0 -15
- package/es/components/organism/TextEditor/extensions/BubbleMenu/bubble-menu.js +0 -31
- package/es/components/organism/TextEditor/extensions/BubbleMenu/index.d.ts +0 -2
- package/es/components/organism/TextEditor/extensions/BubbleMenu/index.js +0 -2
- package/es/components/organism/TextEditor/extensions/ClearFormatting.d.ts +0 -16
- package/es/components/organism/TextEditor/extensions/ClearFormatting.js +0 -26
- package/es/components/organism/TextEditor/extensions/Color.d.ts +0 -6
- package/es/components/organism/TextEditor/extensions/Color.js +0 -34
- package/es/components/organism/TextEditor/extensions/Emoji.d.ts +0 -57
- package/es/components/organism/TextEditor/extensions/Emoji.js +0 -184
- package/es/components/organism/TextEditor/extensions/FontFamily.d.ts +0 -6
- package/es/components/organism/TextEditor/extensions/FontFamily.js +0 -36
- package/es/components/organism/TextEditor/extensions/FontSize.d.ts +0 -31
- package/es/components/organism/TextEditor/extensions/FontSize.js +0 -46
- package/es/components/organism/TextEditor/extensions/FontWeight.d.ts +0 -23
- package/es/components/organism/TextEditor/extensions/FontWeight.js +0 -41
- package/es/components/organism/TextEditor/extensions/Indent.d.ts +0 -21
- package/es/components/organism/TextEditor/extensions/Indent.js +0 -63
- package/es/components/organism/TextEditor/extensions/LetterSpacing.d.ts +0 -32
- package/es/components/organism/TextEditor/extensions/LetterSpacing.js +0 -48
- package/es/components/organism/TextEditor/extensions/LineHeight.d.ts +0 -20
- package/es/components/organism/TextEditor/extensions/LineHeight.js +0 -36
- package/es/components/organism/TextEditor/extensions/Link.d.ts +0 -29
- package/es/components/organism/TextEditor/extensions/Link.js +0 -187
- package/es/components/organism/TextEditor/extensions/ListItemMarker.d.ts +0 -13
- package/es/components/organism/TextEditor/extensions/ListItemMarker.js +0 -174
- package/es/components/organism/TextEditor/extensions/OrderedList.d.ts +0 -56
- package/es/components/organism/TextEditor/extensions/OrderedList.js +0 -187
- package/es/components/organism/TextEditor/extensions/SmartTag.d.ts +0 -39
- package/es/components/organism/TextEditor/extensions/SmartTag.js +0 -167
- package/es/components/organism/TextEditor/extensions/StyleMemory.d.ts +0 -36
- package/es/components/organism/TextEditor/extensions/StyleMemory.js +0 -163
- package/es/components/organism/TextEditor/extensions/TextTransform.d.ts +0 -30
- package/es/components/organism/TextEditor/extensions/TextTransform.js +0 -36
- package/es/components/organism/TextEditor/extensions/UnorderedList.d.ts +0 -55
- package/es/components/organism/TextEditor/extensions/UnorderedList.js +0 -176
- package/es/components/organism/TextEditor/hooks/index.d.ts +0 -6
- package/es/components/organism/TextEditor/hooks/index.js +0 -6
- package/es/components/organism/TextEditor/hooks/useColorSet.d.ts +0 -4
- package/es/components/organism/TextEditor/hooks/useColorSet.js +0 -22
- package/es/components/organism/TextEditor/hooks/useDocumentState.d.ts +0 -18
- package/es/components/organism/TextEditor/hooks/useDocumentState.js +0 -42
- package/es/components/organism/TextEditor/hooks/useMarkTracking.d.ts +0 -26
- package/es/components/organism/TextEditor/hooks/useMarkTracking.js +0 -68
- package/es/components/organism/TextEditor/hooks/usePersistence.d.ts +0 -31
- package/es/components/organism/TextEditor/hooks/usePersistence.js +0 -169
- package/es/components/organism/TextEditor/hooks/useStyleMemory.d.ts +0 -6
- package/es/components/organism/TextEditor/hooks/useStyleMemory.js +0 -42
- package/es/components/organism/TextEditor/hooks/useStylePresets.d.ts +0 -34
- package/es/components/organism/TextEditor/hooks/useStylePresets.js +0 -83
- package/es/components/organism/TextEditor/index.d.ts +0 -16
- package/es/components/organism/TextEditor/index.js +0 -8
- package/es/components/organism/TextEditor/index.scss +0 -61
- package/es/components/organism/TextEditor/provider.d.ts +0 -14
- package/es/components/organism/TextEditor/provider.js +0 -33
- package/es/components/organism/TextEditor/store.d.ts +0 -13
- package/es/components/organism/TextEditor/store.js +0 -20
- package/es/components/organism/TextEditor/styled.d.ts +0 -10
- package/es/components/organism/TextEditor/styled.js +0 -94
- package/es/components/organism/TextEditor/types.d.ts +0 -139
- package/es/components/organism/TextEditor/types.js +0 -5
- package/es/components/organism/TextEditor/ui/BubbleMenu/BubbleMenu.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/BubbleMenu/BubbleMenu.js +0 -84
- package/es/components/organism/TextEditor/ui/BubbleMenu/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/BubbleMenu/index.js +0 -1
- package/es/components/organism/TextEditor/ui/BubbleToolbar/BubbleToolbar.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/BubbleToolbar/BubbleToolbar.js +0 -1
- package/es/components/organism/TextEditor/ui/BubbleToolbar/index.d.ts +0 -0
- package/es/components/organism/TextEditor/ui/BubbleToolbar/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Button/Button.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/Button/Button.js +0 -31
- package/es/components/organism/TextEditor/ui/Button/index.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/Button/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Button/types.d.ts +0 -10
- package/es/components/organism/TextEditor/ui/Button/types.js +0 -1
- package/es/components/organism/TextEditor/ui/ColorPicker/ColorPicker.d.ts +0 -39
- package/es/components/organism/TextEditor/ui/ColorPicker/ColorPicker.js +0 -131
- package/es/components/organism/TextEditor/ui/ColorPicker/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/ColorPicker/index.js +0 -1
- package/es/components/organism/TextEditor/ui/DropdownButton/DropdownButton.d.ts +0 -17
- package/es/components/organism/TextEditor/ui/DropdownButton/DropdownButton.js +0 -51
- package/es/components/organism/TextEditor/ui/DropdownButton/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/DropdownButton/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Emoji/EmojiList.d.ts +0 -11
- package/es/components/organism/TextEditor/ui/Emoji/EmojiList.js +0 -66
- package/es/components/organism/TextEditor/ui/Emoji/index.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/Emoji/index.js +0 -2
- package/es/components/organism/TextEditor/ui/Emoji/suggestion.d.ts +0 -4
- package/es/components/organism/TextEditor/ui/Emoji/suggestion.js +0 -71
- package/es/components/organism/TextEditor/ui/FontPopover/FontPopover.d.ts +0 -12
- package/es/components/organism/TextEditor/ui/FontPopover/FontPopover.js +0 -69
- package/es/components/organism/TextEditor/ui/FontPopover/styled.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/FontPopover/styled.js +0 -22
- package/es/components/organism/TextEditor/ui/Popover/Popover.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/Popover/Popover.js +0 -9
- package/es/components/organism/TextEditor/ui/Popover/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/Popover/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Select/Select.d.ts +0 -4
- package/es/components/organism/TextEditor/ui/Select/Select.js +0 -7
- package/es/components/organism/TextEditor/ui/Select/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/Select/index.js +0 -1
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/SplitButtonDropdown.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/SplitButtonDropdown.js +0 -44
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/index.js +0 -1
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/styled.d.ts +0 -2
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/styled.js +0 -52
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/types.d.ts +0 -19
- package/es/components/organism/TextEditor/ui/SplitButtonDropdown/types.js +0 -1
- package/es/components/organism/TextEditor/ui/TextAlignSelect/TextAlignSelect.d.ts +0 -30
- package/es/components/organism/TextEditor/ui/TextAlignSelect/TextAlignSelect.js +0 -77
- package/es/components/organism/TextEditor/ui/TextAlignSelect/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/TextAlignSelect/index.js +0 -1
- package/es/components/organism/TextEditor/ui/Toolbar/Toolbar.d.ts +0 -16
- package/es/components/organism/TextEditor/ui/Toolbar/Toolbar.js +0 -42
- package/es/components/organism/TextEditor/ui/Toolbar/actions/BoldAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/BoldAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/BulletListAction.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/Toolbar/actions/BulletListAction.js +0 -93
- package/es/components/organism/TextEditor/ui/Toolbar/actions/ClearFormattingAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/ClearFormattingAction.js +0 -20
- package/es/components/organism/TextEditor/ui/Toolbar/actions/EmojiAction.d.ts +0 -4
- package/es/components/organism/TextEditor/ui/Toolbar/actions/EmojiAction.js +0 -31
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontFamilyAction.d.ts +0 -7
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontFamilyAction.js +0 -28
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontSizeAction.d.ts +0 -7
- package/es/components/organism/TextEditor/ui/Toolbar/actions/FontSizeAction.js +0 -44
- package/es/components/organism/TextEditor/ui/Toolbar/actions/HistoryAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/HistoryAction.js +0 -21
- package/es/components/organism/TextEditor/ui/Toolbar/actions/IndentAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/IndentAction.js +0 -17
- package/es/components/organism/TextEditor/ui/Toolbar/actions/ItalicAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/ItalicAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/LetterSpacing.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/LetterSpacing.js +0 -28
- package/es/components/organism/TextEditor/ui/Toolbar/actions/LinkAction.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/Toolbar/actions/LinkAction.js +0 -17
- package/es/components/organism/TextEditor/ui/Toolbar/actions/OrderedListAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/OrderedListAction.js +0 -67
- package/es/components/organism/TextEditor/ui/Toolbar/actions/OutdentAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/OutdentAction.js +0 -17
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SmartTagAction.d.ts +0 -7
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SmartTagAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SpacingAction.d.ts +0 -10
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SpacingAction.js +0 -45
- package/es/components/organism/TextEditor/ui/Toolbar/actions/StrikeAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/StrikeAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SubscriptAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SubscriptAction.js +0 -26
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SuperscriptAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/SuperscriptAction.js +0 -26
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextAlignAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextAlignAction.js +0 -3
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextBackgroundColorAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextBackgroundColorAction.js +0 -29
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextColorAction.d.ts +0 -14
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextColorAction.js +0 -22
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextTransformAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/TextTransformAction.js +0 -36
- package/es/components/organism/TextEditor/ui/Toolbar/actions/UnderlineAction.d.ts +0 -5
- package/es/components/organism/TextEditor/ui/Toolbar/actions/UnderlineAction.js +0 -18
- package/es/components/organism/TextEditor/ui/Toolbar/actions/UnsetLink.d.ts +0 -6
- package/es/components/organism/TextEditor/ui/Toolbar/actions/UnsetLink.js +0 -19
- package/es/components/organism/TextEditor/ui/Toolbar/actions/index.d.ts +0 -24
- package/es/components/organism/TextEditor/ui/Toolbar/actions/index.js +0 -24
- package/es/components/organism/TextEditor/ui/Toolbar/index.d.ts +0 -1
- package/es/components/organism/TextEditor/ui/Toolbar/index.js +0 -1
- package/es/components/organism/TextEditor/utils/documentState.d.ts +0 -57
- package/es/components/organism/TextEditor/utils/documentState.js +0 -100
- package/es/components/organism/TextEditor/utils/font.d.ts +0 -73
- package/es/components/organism/TextEditor/utils/font.js +0 -160
- package/es/components/organism/TextEditor/utils/htmlProcessing.d.ts +0 -75
- package/es/components/organism/TextEditor/utils/htmlProcessing.js +0 -343
- package/es/components/organism/TextEditor/utils/indent.d.ts +0 -11
- package/es/components/organism/TextEditor/utils/indent.js +0 -56
- package/es/components/organism/TextEditor/utils/index.d.ts +0 -8
- package/es/components/organism/TextEditor/utils/index.js +0 -16
- package/es/components/organism/TextEditor/utils/link.d.ts +0 -108
- package/es/components/organism/TextEditor/utils/link.js +0 -151
- package/es/components/organism/TextEditor/utils/menu.d.ts +0 -134
- package/es/components/organism/TextEditor/utils/menu.js +0 -317
- package/es/components/organism/TextEditor/utils/selection.d.ts +0 -25
- package/es/components/organism/TextEditor/utils/selection.js +0 -57
- package/es/components/organism/TextEditor/utils/shared.d.ts +0 -1
- package/es/components/organism/TextEditor/utils/shared.js +0 -9
- package/es/components/organism/TextEditor/utils/smartTag.d.ts +0 -49
- package/es/components/organism/TextEditor/utils/smartTag.js +0 -89
- package/es/components/organism/TextEditor/utils/style.d.ts +0 -78
- package/es/components/organism/TextEditor/utils/style.js +0 -193
- package/es/components/organism/index.scss +0 -1
- package/es/hooks/useBroadcastedLocalStorage.d.ts +0 -5
- package/es/hooks/useBroadcastedLocalStorage.js +0 -71
- package/es/hooks/useElementSize.d.ts +0 -7
- package/es/hooks/useElementSize.js +0 -56
- package/es/hooks/useEyedropper/attach.d.ts +0 -4
- package/es/hooks/useEyedropper/attach.js +0 -9
- package/es/hooks/useEyedropper/eyedropper.d.ts +0 -69
- package/es/hooks/useEyedropper/eyedropper.js +0 -205
- package/es/hooks/useEyedropper/index.d.ts +0 -2
- package/es/hooks/useEyedropper/index.js +0 -7
- package/es/hooks/useEyedropper/support.d.ts +0 -1
- package/es/hooks/useEyedropper/support.js +0 -3
- package/es/hooks/useEyedropper/types.d.ts +0 -9
- package/es/hooks/useEyedropper/types.js +0 -1
- package/es/hooks/useEyedropper/useEyedropper.d.ts +0 -8
- package/es/hooks/useEyedropper/useEyedropper.js +0 -50
- package/es/hooks/useEyedropper/utils.d.ts +0 -11
- package/es/hooks/useEyedropper/utils.js +0 -17
- package/es/hooks/useIsMounted.d.ts +0 -1
- package/es/hooks/useIsMounted.js +0 -11
- package/es/utils/tree.d.ts +0 -225
- package/es/utils/tree.js +0 -469
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ANTSOMI_COMPONENT_PREFIX_CLS } from '@antscorp/antsomi-ui/es/constants';
|
|
3
|
-
import { useDeepCompareMemo } from '@antscorp/antsomi-ui/es/hooks';
|
|
4
|
-
import SubScript from '@tiptap/extension-subscript';
|
|
5
|
-
import Superscript from '@tiptap/extension-superscript';
|
|
6
|
-
import TextAlign from '@tiptap/extension-text-align';
|
|
7
|
-
import { TextStyleKit } from '@tiptap/extension-text-style';
|
|
8
|
-
import { Selection } from '@tiptap/extensions';
|
|
9
|
-
import { useEditor } from '@tiptap/react';
|
|
10
|
-
import StarterKit from '@tiptap/starter-kit';
|
|
11
|
-
import clsx from 'clsx';
|
|
12
|
-
import produce from 'immer';
|
|
13
|
-
import { isBoolean, omit } from 'lodash';
|
|
14
|
-
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useRef, } from 'react';
|
|
15
|
-
import { useDebouncedCallback } from 'use-debounce';
|
|
16
|
-
import { DEFAULT_TEXT_STYLE } from './constants';
|
|
17
|
-
import { BackgroundColor } from './extensions/BackgroundColor';
|
|
18
|
-
import { Color } from './extensions/Color';
|
|
19
|
-
import { Emoji } from './extensions/Emoji';
|
|
20
|
-
import { FontFamily } from './extensions/FontFamily';
|
|
21
|
-
import { FontSize } from './extensions/FontSize';
|
|
22
|
-
import { FontWeight } from './extensions/FontWeight';
|
|
23
|
-
import { Indent } from './extensions/Indent';
|
|
24
|
-
import { LetterSpacing } from './extensions/LetterSpacing';
|
|
25
|
-
import { LineHeight } from './extensions/LineHeight';
|
|
26
|
-
import { CustomLink } from './extensions/Link';
|
|
27
|
-
import { CustomOrderedList } from './extensions/OrderedList';
|
|
28
|
-
import { SmartTag } from './extensions/SmartTag';
|
|
29
|
-
import { TextTransform } from './extensions/TextTransform';
|
|
30
|
-
import { CustomUnorderedList } from './extensions/UnorderedList';
|
|
31
|
-
import { ClearFormatting } from './extensions/ClearFormatting';
|
|
32
|
-
import { useTextEditorStore } from './provider';
|
|
33
|
-
import { StyledBubbleMenu, StyledEditorContent } from './styled';
|
|
34
|
-
import { emojiSuggestion } from './ui/Emoji';
|
|
35
|
-
import { Toolbar } from './ui/Toolbar';
|
|
36
|
-
import { defaultShouldShowBubbleMenu, handleLinkAction, handleSmartTagAction, isDynamicLink, isShowLinkToolbar, safeParseHTMLContent, } from './utils';
|
|
37
|
-
export const TextEditor = memo(forwardRef((props, ref) => {
|
|
38
|
-
const { id, className, config, editable = true, initialContent = '', dataAttributes, onUpdateDebounced = 400, defaultTextStyle: defaultTextStyleProp, linkHandler: outerLinkHandler, smartTagHandler: outerSmartTagHandler, bubbleMenuProps, style, render, onUpdate, onFocus, } = props;
|
|
39
|
-
const isShowBubbleMenu = useTextEditorStore(state => state.isShowBubbleMenu);
|
|
40
|
-
const setBubbleMenuContainer = useTextEditorStore(state => state.setBubbleMenuContainer);
|
|
41
|
-
const defaultTextStyle = useDeepCompareMemo(() => ({
|
|
42
|
-
...DEFAULT_TEXT_STYLE,
|
|
43
|
-
...defaultTextStyleProp,
|
|
44
|
-
}), [defaultTextStyleProp]);
|
|
45
|
-
const handleOnUpdateDebounce = useDebouncedCallback((editor) => {
|
|
46
|
-
const html = editor.getHTML();
|
|
47
|
-
const text = editor.getText();
|
|
48
|
-
const json = editor.getJSON();
|
|
49
|
-
onUpdate?.({ html, text, json });
|
|
50
|
-
}, onUpdateDebounced);
|
|
51
|
-
const contentRef = useRef(null);
|
|
52
|
-
const editor = useEditor({
|
|
53
|
-
extensions: [
|
|
54
|
-
StarterKit.configure({
|
|
55
|
-
link: false,
|
|
56
|
-
bulletList: false,
|
|
57
|
-
orderedList: false,
|
|
58
|
-
listItem: {
|
|
59
|
-
HTMLAttributes: {
|
|
60
|
-
style: 'line-height:normal;',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
undoRedo: {
|
|
64
|
-
depth: 100,
|
|
65
|
-
},
|
|
66
|
-
}),
|
|
67
|
-
CustomUnorderedList,
|
|
68
|
-
CustomOrderedList,
|
|
69
|
-
FontWeight.configure({
|
|
70
|
-
defaultWeight: defaultTextStyle.fontWeight,
|
|
71
|
-
}),
|
|
72
|
-
LineHeight.configure({
|
|
73
|
-
defaultHeight: defaultTextStyle.lineHeight,
|
|
74
|
-
}),
|
|
75
|
-
FontFamily.configure({
|
|
76
|
-
defaultFontFamily: defaultTextStyle.fontFamily,
|
|
77
|
-
}),
|
|
78
|
-
FontSize.configure({
|
|
79
|
-
defaultFontSize: defaultTextStyle.fontSize,
|
|
80
|
-
}),
|
|
81
|
-
LetterSpacing.configure({
|
|
82
|
-
defaultLetterSpacing: defaultTextStyle.letterSpacing,
|
|
83
|
-
}),
|
|
84
|
-
Color.configure({
|
|
85
|
-
defaultColor: defaultTextStyle.color,
|
|
86
|
-
}),
|
|
87
|
-
BackgroundColor.configure({
|
|
88
|
-
defaultBackgroundColor: defaultTextStyle.backgroundColor,
|
|
89
|
-
}),
|
|
90
|
-
TextStyleKit.configure({
|
|
91
|
-
backgroundColor: false,
|
|
92
|
-
color: false,
|
|
93
|
-
textStyle: {
|
|
94
|
-
mergeNestedSpanStyles: true,
|
|
95
|
-
},
|
|
96
|
-
}),
|
|
97
|
-
TextTransform,
|
|
98
|
-
Superscript,
|
|
99
|
-
SubScript,
|
|
100
|
-
Selection.configure({
|
|
101
|
-
className: 'selection',
|
|
102
|
-
}),
|
|
103
|
-
SmartTag.configure({
|
|
104
|
-
highlight: config?.SmartTag?.highlight,
|
|
105
|
-
}),
|
|
106
|
-
TextAlign.configure({
|
|
107
|
-
types: ['heading', 'paragraph'],
|
|
108
|
-
}),
|
|
109
|
-
CustomLink.configure({
|
|
110
|
-
openOnClick: false,
|
|
111
|
-
HTMLAttributes: {
|
|
112
|
-
class: 'link',
|
|
113
|
-
style: 'text-decoration:inherit;color:inherit;',
|
|
114
|
-
rel: undefined,
|
|
115
|
-
},
|
|
116
|
-
highlight: config?.Link?.highlightDynamic,
|
|
117
|
-
}),
|
|
118
|
-
Indent,
|
|
119
|
-
Emoji.configure({
|
|
120
|
-
suggestion: emojiSuggestion({
|
|
121
|
-
container: bubbleMenuProps?.container,
|
|
122
|
-
}),
|
|
123
|
-
}),
|
|
124
|
-
ClearFormatting.configure({
|
|
125
|
-
defaultTextStyle,
|
|
126
|
-
}),
|
|
127
|
-
],
|
|
128
|
-
content: initialContent,
|
|
129
|
-
onCreate: ({ editor }) => {
|
|
130
|
-
if (!contentRef.current?.parentElement) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
const safeParseContent = safeParseHTMLContent({
|
|
134
|
-
html: initialContent,
|
|
135
|
-
wrapperElement: contentRef.current.parentElement,
|
|
136
|
-
defaultStyle: defaultTextStyle,
|
|
137
|
-
});
|
|
138
|
-
if (safeParseContent !== initialContent) {
|
|
139
|
-
editor.commands.setContent(safeParseContent);
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
onUpdate: ({ editor }) => {
|
|
143
|
-
handleOnUpdateDebounce(editor);
|
|
144
|
-
},
|
|
145
|
-
onFocus: ({ event }) => {
|
|
146
|
-
onFocus?.(event);
|
|
147
|
-
},
|
|
148
|
-
editorProps: {
|
|
149
|
-
attributes: { spellcheck: 'false' },
|
|
150
|
-
handleKeyDown(view, event) {
|
|
151
|
-
if (event.ctrlKey && event.key === 'k') {
|
|
152
|
-
// Add this line to prevent browser's default behavior.
|
|
153
|
-
event.preventDefault();
|
|
154
|
-
handleLinkAction(view, outerLinkHandler);
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
});
|
|
159
|
-
useEffect(() => {
|
|
160
|
-
if (editable === undefined) {
|
|
161
|
-
editor?.setEditable(true);
|
|
162
|
-
}
|
|
163
|
-
else if (isBoolean(editable)) {
|
|
164
|
-
editor?.setEditable(editable);
|
|
165
|
-
}
|
|
166
|
-
}, [editor, editable]);
|
|
167
|
-
useEffect(() => {
|
|
168
|
-
if (editor && config?.SmartTag?.highlight !== undefined) {
|
|
169
|
-
editor.chain().updateSmartTagHighlight(config.SmartTag.highlight).run();
|
|
170
|
-
}
|
|
171
|
-
}, [editor, config?.SmartTag?.highlight]);
|
|
172
|
-
useEffect(() => {
|
|
173
|
-
if (!isBoolean(config?.Link?.highlightDynamic)) {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
editor
|
|
177
|
-
.chain()
|
|
178
|
-
.updateCustomLinkAttrsGlobally(currentAttrs => isDynamicLink(currentAttrs), ({ currentAttrs }) => ({
|
|
179
|
-
attrs: produce(currentAttrs, draft => {
|
|
180
|
-
const updatedClass = new Set(String(currentAttrs.class).split(' '));
|
|
181
|
-
if (config?.Link?.highlightDynamic) {
|
|
182
|
-
updatedClass.add('highlight');
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
updatedClass.delete('highlight');
|
|
186
|
-
}
|
|
187
|
-
draft.class = [...updatedClass].join(' ');
|
|
188
|
-
}),
|
|
189
|
-
}))
|
|
190
|
-
.run();
|
|
191
|
-
}, [config?.Link?.highlightDynamic, editor]);
|
|
192
|
-
const handleSetSmartTag = useCallback(({ id, content }) => {
|
|
193
|
-
editor?.chain().focus().setSmartTag({ id, content }).run();
|
|
194
|
-
}, [editor]);
|
|
195
|
-
const handleDeleteSmartTag = useCallback(id => {
|
|
196
|
-
editor
|
|
197
|
-
?.chain()
|
|
198
|
-
.deleteSmartTagGlobally(attrs => attrs.id === id)
|
|
199
|
-
.run();
|
|
200
|
-
}, [editor]);
|
|
201
|
-
const handleUpdateSmartTagAttrs = useCallback((id, updatedAttrs) => editor
|
|
202
|
-
?.chain()
|
|
203
|
-
.updateSmartTagAttrsGlobally(attrs => {
|
|
204
|
-
if (attrs.id === id)
|
|
205
|
-
return updatedAttrs;
|
|
206
|
-
})
|
|
207
|
-
.run(), [editor]);
|
|
208
|
-
const shouldShowBubbleMenu = useCallback((params) => {
|
|
209
|
-
const { state, view, element } = params;
|
|
210
|
-
if (isShowLinkToolbar(state)) {
|
|
211
|
-
return true;
|
|
212
|
-
}
|
|
213
|
-
return defaultShouldShowBubbleMenu({
|
|
214
|
-
state,
|
|
215
|
-
view,
|
|
216
|
-
element,
|
|
217
|
-
editor: params.editor,
|
|
218
|
-
});
|
|
219
|
-
}, []);
|
|
220
|
-
const handleBlur = useCallback((perserveSelection) => {
|
|
221
|
-
if (perserveSelection) {
|
|
222
|
-
editor?.chain().blur().run();
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
editor?.chain().blur().setTextSelection({ from: 0, to: 0 }).run();
|
|
226
|
-
}
|
|
227
|
-
}, [editor]);
|
|
228
|
-
const handleBubbleMenuRef = useCallback((htmlElement) => {
|
|
229
|
-
setBubbleMenuContainer(htmlElement);
|
|
230
|
-
}, [setBubbleMenuContainer]);
|
|
231
|
-
useImperativeHandle(ref, () => ({
|
|
232
|
-
setLink: params => {
|
|
233
|
-
editor?.chain().setCustomLink(params).run();
|
|
234
|
-
},
|
|
235
|
-
deleteLink: predicate => {
|
|
236
|
-
editor?.chain().deleteCustomLink(predicate).run();
|
|
237
|
-
},
|
|
238
|
-
updateLinkAttrs: (predicate, updateFn) => {
|
|
239
|
-
editor.chain().updateCustomLinkAttrsGlobally(predicate, updateFn).run();
|
|
240
|
-
},
|
|
241
|
-
setSmartTag: handleSetSmartTag,
|
|
242
|
-
deleteSmartTag: handleDeleteSmartTag,
|
|
243
|
-
updateSmartTagAttrs: handleUpdateSmartTagAttrs,
|
|
244
|
-
blur: handleBlur,
|
|
245
|
-
style: contentRef.current?.style,
|
|
246
|
-
editor,
|
|
247
|
-
}));
|
|
248
|
-
if (!editor) {
|
|
249
|
-
return null;
|
|
250
|
-
}
|
|
251
|
-
return (_jsxs(_Fragment, { children: [_jsx(StyledEditorContent, { className: clsx(`${ANTSOMI_COMPONENT_PREFIX_CLS}-text-editor`, className), "$textStyle": defaultTextStyle, style: {
|
|
252
|
-
// Inline styles apply to inner html elements (support email client)
|
|
253
|
-
...omit(defaultTextStyle, ['fontSize']),
|
|
254
|
-
...style,
|
|
255
|
-
}, id: id, ref: contentRef, editor: editor, ...dataAttributes }), _jsx(StyledBubbleMenu, { ref: handleBubbleMenuRef, editor: editor, shouldShow: shouldShowBubbleMenu, resizeDelay: 700, ...bubbleMenuProps, children: isShowBubbleMenu && (_jsx(Toolbar, { config: config, editor: editor, defaultTextStyle: defaultTextStyle, linkHanlder: {
|
|
256
|
-
onUpsert: () => {
|
|
257
|
-
handleLinkAction(editor.view, outerLinkHandler);
|
|
258
|
-
},
|
|
259
|
-
}, smartTagHandler: {
|
|
260
|
-
onUpsert: (event) => {
|
|
261
|
-
handleSmartTagAction(event, editor.view, outerSmartTagHandler);
|
|
262
|
-
},
|
|
263
|
-
}, render: render })) })] }));
|
|
264
|
-
}));
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "7ctw1n8f4i31mb8yuoec",
|
|
3
|
-
"type": "text",
|
|
4
|
-
"settings": {
|
|
5
|
-
"link": {
|
|
6
|
-
"data": {
|
|
7
|
-
"2o83ijfx": {
|
|
8
|
-
"text": "Dynamic Link 2\n\n",
|
|
9
|
-
"type": "content-source::csgjqgun::1",
|
|
10
|
-
"index": 1,
|
|
11
|
-
"title": "Same link 1",
|
|
12
|
-
"linkType": "dynamic",
|
|
13
|
-
"attribute": {
|
|
14
|
-
"key": "page_url",
|
|
15
|
-
"label": "Page url",
|
|
16
|
-
"value": "page_url",
|
|
17
|
-
"disabled": false
|
|
18
|
-
},
|
|
19
|
-
"openNewTab": true
|
|
20
|
-
},
|
|
21
|
-
"63g9c32g": {
|
|
22
|
-
"text": "Dynamic Link\n\n",
|
|
23
|
-
"type": "content-source::csgjqgun::1",
|
|
24
|
-
"index": 1,
|
|
25
|
-
"title": "Product Page Dynamic Link",
|
|
26
|
-
"linkType": "dynamic",
|
|
27
|
-
"attribute": {
|
|
28
|
-
"key": "page_url",
|
|
29
|
-
"label": "Page url",
|
|
30
|
-
"value": "page_url",
|
|
31
|
-
"disabled": false
|
|
32
|
-
},
|
|
33
|
-
"openNewTab": true
|
|
34
|
-
},
|
|
35
|
-
"jkeswcp5": {
|
|
36
|
-
"url": "https://ant.design/components/modal",
|
|
37
|
-
"text": "Offer",
|
|
38
|
-
"title": "Test",
|
|
39
|
-
"linkType": "static",
|
|
40
|
-
"openNewTab": false
|
|
41
|
-
},
|
|
42
|
-
"v9sifsn8": {
|
|
43
|
-
"url": "https://claude.ai/new",
|
|
44
|
-
"text": "Bo",
|
|
45
|
-
"title": "Link 1",
|
|
46
|
-
"linkType": "static",
|
|
47
|
-
"openNewTab": true
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"selectedId": ""
|
|
51
|
-
},
|
|
52
|
-
"name": "Text",
|
|
53
|
-
"type": "text",
|
|
54
|
-
"editor": "TextElementEditor",
|
|
55
|
-
"styles": {
|
|
56
|
-
"color": "#000000",
|
|
57
|
-
"fontSize": "16px",
|
|
58
|
-
"fontStyle": "normal",
|
|
59
|
-
"textAlign": "left",
|
|
60
|
-
"fontFamily": "Montserrat",
|
|
61
|
-
"fontWeight": 400,
|
|
62
|
-
"lineHeight": "1",
|
|
63
|
-
"letterSpacing": "0",
|
|
64
|
-
"textTransform": "none",
|
|
65
|
-
"textDecoration": "none"
|
|
66
|
-
},
|
|
67
|
-
"altText": "",
|
|
68
|
-
"dynamic": {
|
|
69
|
-
"data": {
|
|
70
|
-
"awh4d18k": {
|
|
71
|
-
"type": "event-attribute",
|
|
72
|
-
"event": "896830:779154",
|
|
73
|
-
"source": [556430427],
|
|
74
|
-
"attribute": {
|
|
75
|
-
"type": 1,
|
|
76
|
-
"label": "Last modified on",
|
|
77
|
-
"value": "ad_zone.utime",
|
|
78
|
-
"status": 1,
|
|
79
|
-
"children": [],
|
|
80
|
-
"dataType": "datetime",
|
|
81
|
-
"itemTypeId": -1013,
|
|
82
|
-
"itemTypeName": "ad_zone",
|
|
83
|
-
"propertyName": "utime",
|
|
84
|
-
"eventPropertySyntax": "dims.ad_zone_id",
|
|
85
|
-
"datetimeFormatSettings": {
|
|
86
|
-
"type": "datetime",
|
|
87
|
-
"language": "en",
|
|
88
|
-
"hasDateFormat": true,
|
|
89
|
-
"hasTimeFormat": true,
|
|
90
|
-
"dateParseFormat": "MM/DD/YYYY",
|
|
91
|
-
"dateParseOption": "medium",
|
|
92
|
-
"timeParseFormat": "12hour",
|
|
93
|
-
"timeParseOption": "medium",
|
|
94
|
-
"dateFormatString": "MMM DD, YYYY h:mm:ss A"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"mappingKey": "7ctw1n8f4i31mb8yuoec-awh4d18k",
|
|
98
|
-
"mappingFields": "event.ad_zone.utime"
|
|
99
|
-
},
|
|
100
|
-
"bcz6fw4b": {
|
|
101
|
-
"type": "content-source::csgjqgun::1",
|
|
102
|
-
"index": 1,
|
|
103
|
-
"attribute": {
|
|
104
|
-
"key": "price",
|
|
105
|
-
"label": "Price",
|
|
106
|
-
"value": "price",
|
|
107
|
-
"status": "1",
|
|
108
|
-
"dataType": "number",
|
|
109
|
-
"disabled": false,
|
|
110
|
-
"itemTypeName": "product",
|
|
111
|
-
"numberFormatSettings": {
|
|
112
|
-
"type": "number",
|
|
113
|
-
"decimal": ".",
|
|
114
|
-
"grouping": ",",
|
|
115
|
-
"isCompact": false,
|
|
116
|
-
"prefixType": "code",
|
|
117
|
-
"currencyCode": "USD",
|
|
118
|
-
"decimalPlaces": 2
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"mappingKey": "7ctw1n8f4i31mb8yuoec-bcz6fw4b",
|
|
122
|
-
"mappingFields": "groups.csgjqgun[1].price"
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
"highlight": true,
|
|
126
|
-
"selectedId": ""
|
|
127
|
-
},
|
|
128
|
-
"rawHTML": "<div class=\"fr-element fr-view\" dir=\"auto\" contenteditable=\"true\" aria-disabled=\"false\" spellcheck=\"true\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"true\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"false\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"true\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"true\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"true\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"true\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"true\" style=\"font-family: Montserrat;\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"true\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"true\"><div class=\"fr-element fr-view\" contenteditable=\"true\" dir=\"auto\" spellcheck=\"true\"><p style=\"font-size: 16px;\"><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\"><span data-dynamic=\"true\" data-dynamic-id=\"bcz6fw4b\" style=\"direction: unset; unicode-bidi: bidi-override; text-align: right; background-color: rgba(0, 199, 97, 0.2);\">******</span> </span></p><p style=\"font-size: 16px;\"><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\">Special </span><span style=\"font-family: Georgia; font-size: 22px; letter-spacing: 0px;\"><a data-link-id=\"v9sifsn8\" href=\"https://claude.ai/new\" target=\"_blank\" title=\"Link 1\"><span style=\"font-weight: 200;\">Bo</span></a><span style=\"font-weight: 200;\">nus</span></span><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\"> <a data-link-id=\"jkeswcp5\" href=\"https://ant.design/components/modal\" style=\"color: inherit;\" target=\"_self\" title=\"Test\"><span style=\"color: rgb(147, 101, 184);\">Off</span>er</a> H<span style=\"background-color: rgb(87, 184, 194);\">as Been </span><span data-dynamic=\"true\" data-dynamic-id=\"awh4d18k\" style=\"direction: unset; unicode-bidi: bidi-override; text-align: right; background-color: rgb(87, 184, 194); color: rgb(226, 80, 65);\"><strong><em>Last modified on</em></strong></span></span></p><p style=\"font-size: 16px;\"><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\"><span style=\"background-color: rgb(87, 184, 194);\">c</span>ó <strong><em>chuyện</em></strong> gì <strong><u>hô</u></strong></span><strong>m <span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\">nay không? </span></strong></p><p style=\"font-size: 16px;\"></p><p><a data-dynamic=\"true\" data-link-id=\"63g9c32g\" href=\"https://sandbox-magento.antsomi.com/argus-all-weather-tank.html\" style=\"background-color: rgba(0, 199, 97, 0.2);\" target=\"_blank\" title=\"Product Page Dynamic Link\"><span style=\"font-size: 22px;\"><strong>Dynamic Link\n\n</strong></span></a></p><p style=\"font-size: 16px;\"><strong></strong></p><p style=\"font-size: 16px;\"><strong></strong><a data-link-id=\"2o83ijfx\" data-dynamic=\"true\" title=\"Same link 1\" target=\"_blank\" href=\"https://sandbox-magento.antsomi.com/montana-wind-jacket.html\" style=\"background-color: rgba(0, 199, 97, 0.2);\"><strong><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\">Dynamic Link 2\n\n</span></strong></a></p><p style=\"font-size: 16px;\"><strong></strong></p><p style=\"font-size: 16px;\"><strong><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\">Danh sách</span></strong></p><ul style=\"font-size: 16px;\"><li style=\"line-height: 2.3;\"><strong><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\">Giá trị 1</span></strong></li><li style=\"line-height: 2.3;\"><strong><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\"><strong>Giá <span style=\"color: rgb(137, 18, 221);\">t<em>r</em>ị</span> 2</strong></span></strong></li><li style=\"line-height: 2.3;\"><strong><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\">Giá trị 3</span></strong></li></ul><p style=\"font-size: 16px;\"><strong><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\"><em>Number list</em></span></strong></p><ol style=\"font-size: 16px;\"><li><strong><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\"><em>Item 1</em></span></strong></li><li><strong><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\"><em>Item 2</em></span></strong></li><li><strong><span style=\"font-family: Montserrat; font-size: 22px; letter-spacing: 0px;\"><em>Item 3</em></span></strong></li></ol></div></div></div></div></div></div></div></div></div></div></div>",
|
|
129
|
-
"component": "TextElement",
|
|
130
|
-
"linkStyles": {
|
|
131
|
-
"color": "#1e5494",
|
|
132
|
-
"textDecoration": "underline"
|
|
133
|
-
},
|
|
134
|
-
"blockStyles": {
|
|
135
|
-
"top": "0px",
|
|
136
|
-
"left": "0px",
|
|
137
|
-
"right": "0px",
|
|
138
|
-
"width": "auto",
|
|
139
|
-
"bottom": "0px",
|
|
140
|
-
"height": "auto",
|
|
141
|
-
"zIndex": 0,
|
|
142
|
-
"maxWidth": "100%",
|
|
143
|
-
"position": "relative",
|
|
144
|
-
"boxShadow": "none",
|
|
145
|
-
"marginTop": "0px",
|
|
146
|
-
"background": "transparent",
|
|
147
|
-
"marginLeft": "0px",
|
|
148
|
-
"paddingTop": "0px",
|
|
149
|
-
"borderColor": "#000000",
|
|
150
|
-
"borderStyle": "none",
|
|
151
|
-
"marginRight": "0px",
|
|
152
|
-
"paddingLeft": "0px",
|
|
153
|
-
"marginBottom": "0px",
|
|
154
|
-
"paddingRight": "0px",
|
|
155
|
-
"paddingBottom": "0px",
|
|
156
|
-
"borderTopWidth": "0px",
|
|
157
|
-
"borderLeftWidth": "0px",
|
|
158
|
-
"borderRightWidth": "0px",
|
|
159
|
-
"borderBottomWidth": "0px",
|
|
160
|
-
"borderTopLeftRadius": "0px",
|
|
161
|
-
"borderTopRightRadius": "0px",
|
|
162
|
-
"borderBottomLeftRadius": "0px",
|
|
163
|
-
"borderBottomRightRadius": "0px"
|
|
164
|
-
},
|
|
165
|
-
"breakpoints": {
|
|
166
|
-
"sm": {
|
|
167
|
-
"blockStyles": {},
|
|
168
|
-
"blockHoverStyles": {},
|
|
169
|
-
"blockStylesSettings": {},
|
|
170
|
-
"blockHoverStylesSettings": {}
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
"textStyling": {
|
|
174
|
-
"isEllipsisText": true,
|
|
175
|
-
"selectLineDisplay": ""
|
|
176
|
-
},
|
|
177
|
-
"blockHoverStyles": {
|
|
178
|
-
"top": "0px",
|
|
179
|
-
"left": "0px",
|
|
180
|
-
"right": "0px",
|
|
181
|
-
"width": "auto",
|
|
182
|
-
"bottom": "0px",
|
|
183
|
-
"height": "auto",
|
|
184
|
-
"zIndex": 0,
|
|
185
|
-
"maxWidth": "100%",
|
|
186
|
-
"position": "relative",
|
|
187
|
-
"boxShadow": "none",
|
|
188
|
-
"marginTop": "0px",
|
|
189
|
-
"background": "transparent",
|
|
190
|
-
"marginLeft": "0px",
|
|
191
|
-
"paddingTop": "0px",
|
|
192
|
-
"borderColor": "#000000",
|
|
193
|
-
"borderStyle": "none",
|
|
194
|
-
"marginRight": "0px",
|
|
195
|
-
"paddingLeft": "0px",
|
|
196
|
-
"marginBottom": "0px",
|
|
197
|
-
"paddingRight": "0px",
|
|
198
|
-
"paddingBottom": "0px",
|
|
199
|
-
"borderTopWidth": "0px",
|
|
200
|
-
"borderLeftWidth": "0px",
|
|
201
|
-
"borderRightWidth": "0px",
|
|
202
|
-
"borderBottomWidth": "0px",
|
|
203
|
-
"borderTopLeftRadius": "0px",
|
|
204
|
-
"borderTopRightRadius": "0px",
|
|
205
|
-
"borderBottomLeftRadius": "0px",
|
|
206
|
-
"borderBottomRightRadius": "0px"
|
|
207
|
-
},
|
|
208
|
-
"blockStylesSettings": {
|
|
209
|
-
"hidden": false,
|
|
210
|
-
"customId": "",
|
|
211
|
-
"gradients": [
|
|
212
|
-
{
|
|
213
|
-
"gradientColor": "#ffffff",
|
|
214
|
-
"gradientColorLocation": 0
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"gradientColor": "#000000",
|
|
218
|
-
"gradientColorLocation": 50
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
"customClass": "",
|
|
222
|
-
"linearAngle": 45,
|
|
223
|
-
"gradientType": "linear-gradient",
|
|
224
|
-
"heightSuffix": "auto",
|
|
225
|
-
"marginSuffix": "px",
|
|
226
|
-
"boxShadowBlur": "0px",
|
|
227
|
-
"paddingSuffix": "px",
|
|
228
|
-
"backgroundSize": "cover",
|
|
229
|
-
"boxShadowColor": "#ffffff",
|
|
230
|
-
"boxShadowInset": false,
|
|
231
|
-
"boxShadowStyle": "none",
|
|
232
|
-
"radialPosition": "center center",
|
|
233
|
-
"backgroundColor": "transparent",
|
|
234
|
-
"boxShadowSpread": "0px",
|
|
235
|
-
"backgroundRepeat": "no-repeat",
|
|
236
|
-
"displayCondition": {
|
|
237
|
-
"pool": null,
|
|
238
|
-
"type": "visitor-attribute",
|
|
239
|
-
"value": "2025-04-22 23:59:59",
|
|
240
|
-
"operator": "after_date",
|
|
241
|
-
"attribute": {
|
|
242
|
-
"key": "date_created",
|
|
243
|
-
"label": "Created date",
|
|
244
|
-
"value": "date_created",
|
|
245
|
-
"status": 1,
|
|
246
|
-
"dataType": "datetime",
|
|
247
|
-
"disabled": false,
|
|
248
|
-
"displayFormat": {
|
|
249
|
-
"type": "DATE_AND_TIME",
|
|
250
|
-
"config": {}
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
"condition": "show_when",
|
|
254
|
-
"time_unit": "",
|
|
255
|
-
"value_type": "normal",
|
|
256
|
-
"event_metadata": {}
|
|
257
|
-
},
|
|
258
|
-
"borderRadiusStyle": "none",
|
|
259
|
-
"boxShadowVertical": "0px",
|
|
260
|
-
"linkedMarginInput": true,
|
|
261
|
-
"backgroundPosition": "left top",
|
|
262
|
-
"borderRadiusSuffix": "px",
|
|
263
|
-
"linkedPaddingInput": false,
|
|
264
|
-
"boxShadowHorizontal": "0px",
|
|
265
|
-
"backgroundColorStyle": "color",
|
|
266
|
-
"linkedBorderWidthInput": true,
|
|
267
|
-
"linkedBorderRadiusInput": true
|
|
268
|
-
},
|
|
269
|
-
"defaultDynamicIndex": 1,
|
|
270
|
-
"blockHoverStylesSettings": {
|
|
271
|
-
"hidden": false,
|
|
272
|
-
"customId": "",
|
|
273
|
-
"editHover": false,
|
|
274
|
-
"gradients": [
|
|
275
|
-
{
|
|
276
|
-
"gradientColor": "#ffffff",
|
|
277
|
-
"gradientColorLocation": 0
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
"gradientColor": "#000000",
|
|
281
|
-
"gradientColorLocation": 50
|
|
282
|
-
}
|
|
283
|
-
],
|
|
284
|
-
"customClass": "",
|
|
285
|
-
"linearAngle": 45,
|
|
286
|
-
"gradientType": "linear-gradient",
|
|
287
|
-
"heightSuffix": "auto",
|
|
288
|
-
"marginSuffix": "px",
|
|
289
|
-
"boxShadowBlur": "0px",
|
|
290
|
-
"paddingSuffix": "px",
|
|
291
|
-
"backgroundSize": "cover",
|
|
292
|
-
"boxShadowColor": "#ffffff",
|
|
293
|
-
"boxShadowInset": false,
|
|
294
|
-
"boxShadowStyle": "none",
|
|
295
|
-
"radialPosition": "center center",
|
|
296
|
-
"backgroundColor": "transparent",
|
|
297
|
-
"boxShadowSpread": "0px",
|
|
298
|
-
"backgroundRepeat": "no-repeat",
|
|
299
|
-
"displayCondition": {
|
|
300
|
-
"type": "",
|
|
301
|
-
"index": 1,
|
|
302
|
-
"value": "",
|
|
303
|
-
"operator": "",
|
|
304
|
-
"attribute": {},
|
|
305
|
-
"condition": ""
|
|
306
|
-
},
|
|
307
|
-
"borderRadiusStyle": "none",
|
|
308
|
-
"boxShadowVertical": "0px",
|
|
309
|
-
"linkedMarginInput": true,
|
|
310
|
-
"backgroundPosition": "left top",
|
|
311
|
-
"borderRadiusSuffix": "px",
|
|
312
|
-
"linkedPaddingInput": false,
|
|
313
|
-
"boxShadowHorizontal": "0px",
|
|
314
|
-
"backgroundColorStyle": "color",
|
|
315
|
-
"linkedBorderWidthInput": true,
|
|
316
|
-
"linkedBorderRadiusInput": true
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
"createdAt": "18/04/2025 - 11:03:44"
|
|
320
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const HTML_DOM: string;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import SETTINGS from './text-block.settings.json';
|
|
2
|
-
const CONTENT_WITH_INHERITED_STYLES = `
|
|
3
|
-
<div class="fr-box" role="application">
|
|
4
|
-
<div class="fr-wrapper" dir="auto">
|
|
5
|
-
<div class="fr-element fr-view" dir="auto" contenteditable="true" aria-disabled="false" spellcheck="true">
|
|
6
|
-
<p style="text-align: center;">
|
|
7
|
-
<span style="font-family: Montserrat; font-size: 22px; letter-spacing: 0px; color: rgb(0, 0, 0);">
|
|
8
|
-
<span id="isPasted" style="font-weight: 800; font-size: 34px; line-height: inherit; font-family: Montserrat; letter-spacing: 0px; text-align: center; text-transform: none; color: rgb(77, 96, 116);">Receive </span>
|
|
9
|
-
<span style="font-weight: 400; font-size: 34px; line-height: inherit; font-family: Montserrat; color: rgb(0, 0, 0); letter-spacing: normal; text-align: center; text-transform: none;">
|
|
10
|
-
<span style="font-weight: 800; font-size: inherit; line-height: inherit; font-family: Montserrat; letter-spacing: 0px; color: rgb(255, 79, 66);"><u>10% Off</u></span>
|
|
11
|
-
</span>
|
|
12
|
-
<span style="font-weight: 800; font-size: 34px; line-height: inherit; font-family: Montserrat; letter-spacing: 0px; text-align: center; text-transform: none; color: rgb(77, 96, 116);"> Your First Order!</span>
|
|
13
|
-
</span>
|
|
14
|
-
</p>
|
|
15
|
-
</div>
|
|
16
|
-
<span class="fr-placeholder" style="font-size: 12px; line-height: 12px; margin-top: 0px; padding-top: 0px; padding-left: 0px; margin-left: 0px; padding-right: 0px; margin-right: 0px; text-align: left;">Enter your text here</span>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
`;
|
|
20
|
-
export const HTML_DOM = `<!doctype html>
|
|
21
|
-
<html lang="en">
|
|
22
|
-
<head>
|
|
23
|
-
<meta charset="UTF-8" />
|
|
24
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
25
|
-
<title>Raw HTML</title>
|
|
26
|
-
</head>
|
|
27
|
-
<body>
|
|
28
|
-
<p style="line-height: 1.4; text-align: center;">
|
|
29
|
-
<span style="font-family: Poppins; font-weight: 500;">Enter your email address below for a chance to spin the wheel and save big on your next purchase. <span class="fr-emoticon fr-deletable">😁</span></span>
|
|
30
|
-
<span style="font-family: Montserrat; font-size: 22px; letter-spacing: 0px; color: rgb(0, 0, 0);"></span>
|
|
31
|
-
</p>
|
|
32
|
-
|
|
33
|
-
${CONTENT_WITH_INHERITED_STYLES}
|
|
34
|
-
|
|
35
|
-
${SETTINGS.settings.rawHTML}
|
|
36
|
-
</body>
|
|
37
|
-
</html>
|
|
38
|
-
`;
|