@antscorp/antsomi-ui 1.3.3-beta.6 → 1.3.3-beta.60
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/images/iphone-top-bar.png +0 -0
- package/es/assets/images/iphone.png +0 -0
- package/es/assets/images/stars_slider.png +0 -0
- package/es/components/atoms/Button/index.d.ts +1 -8
- package/es/components/atoms/Empty/Empty.d.ts +6 -5
- package/es/components/atoms/Empty/Empty.js +7 -1
- package/es/components/atoms/Flex/Flex.d.ts +2 -0
- package/es/components/atoms/Flex/Flex.js +1 -0
- package/es/components/atoms/Flex/index.d.ts +1 -0
- package/es/components/atoms/Flex/index.js +1 -0
- package/es/components/atoms/Input/Input.d.ts +14 -3
- package/es/components/atoms/Input/Input.js +7 -3
- package/es/components/atoms/InputDynamic/EditCaretPositioning.d.ts +2 -0
- package/es/components/atoms/InputDynamic/EditCaretPositioning.js +89 -0
- package/es/components/atoms/InputDynamic/InputDynamic.d.ts +30 -0
- package/es/components/atoms/InputDynamic/InputDynamic.js +320 -0
- package/es/components/atoms/InputDynamic/PopupShortLink.d.ts +16 -0
- package/es/components/atoms/InputDynamic/PopupShortLink.js +85 -0
- package/es/components/atoms/InputDynamic/index.d.ts +2 -0
- package/es/components/atoms/InputDynamic/index.js +1 -0
- package/es/components/atoms/InputDynamic/styled.d.ts +12 -0
- package/es/components/atoms/InputDynamic/styled.js +281 -0
- package/es/components/atoms/InputDynamic/utils.d.ts +22 -0
- package/es/components/atoms/InputDynamic/utils.js +751 -0
- package/es/components/atoms/MobileFrame/MobileFrame.d.ts +4 -0
- package/es/components/atoms/MobileFrame/MobileFrame.js +22 -0
- package/es/components/atoms/MobileFrame/constants.d.ts +4 -0
- package/es/components/atoms/MobileFrame/constants.js +4 -0
- package/es/components/atoms/MobileFrame/index.d.ts +2 -0
- package/es/components/atoms/MobileFrame/index.js +1 -0
- package/es/components/atoms/MobileFrame/styled.d.ts +3 -0
- package/es/components/atoms/MobileFrame/styled.js +33 -0
- package/es/components/atoms/Pagination/index.d.ts +1 -0
- package/es/components/atoms/Popover/Popover.d.ts +1 -1
- package/es/components/atoms/Popover/styled.d.ts +1 -1
- package/es/components/atoms/PreviewTabs/PreviewTabs.d.ts +7 -0
- package/es/components/atoms/PreviewTabs/PreviewTabs.js +67 -0
- package/es/components/atoms/PreviewTabs/index.d.ts +2 -0
- package/es/components/atoms/PreviewTabs/index.js +1 -0
- package/es/components/atoms/PreviewTabs/styled.d.ts +6 -0
- package/es/components/atoms/PreviewTabs/styled.js +79 -0
- package/es/components/atoms/Progress/Progress.d.ts +1 -1
- package/es/components/atoms/Radio/index.d.ts +3 -3
- package/es/components/atoms/RateV2/RateV2.d.ts +18 -0
- package/es/components/atoms/RateV2/RateV2.js +73 -0
- package/es/components/atoms/RateV2/index.d.ts +1 -0
- package/es/components/atoms/RateV2/index.js +1 -0
- package/es/components/atoms/RequiredLabel/index.d.ts +1 -0
- package/es/components/atoms/RequiredLabel/index.js +4 -3
- package/es/components/atoms/Slider/index.d.ts +2 -1
- package/es/components/atoms/Slider/index.js +7 -14
- package/es/components/atoms/SliderV2/index.d.ts +6 -0
- package/es/components/atoms/SliderV2/index.js +21 -0
- package/es/components/atoms/Space/Space.d.ts +1 -1
- package/es/components/atoms/Spin/Spin.d.ts +2 -1
- package/es/components/atoms/Statistic/Statistic.d.ts +1 -4
- package/es/components/atoms/index.d.ts +8 -0
- package/es/components/atoms/index.js +6 -0
- package/es/components/common/ConfigProvider/ConfigProvider.js +6 -0
- package/es/components/common/ConfigProvider/GlobalStyle.js +271 -27
- package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
- package/es/components/icons/AudioRecordIcon.d.ts +2 -1
- package/es/components/icons/BugIcon.d.ts +2 -1
- package/es/components/icons/CameraIcon.d.ts +2 -1
- package/es/components/icons/CaptureIcon.d.ts +2 -1
- package/es/components/icons/CheckSlimIcon.d.ts +2 -1
- package/es/components/icons/CloseIcon.d.ts +2 -1
- package/es/components/icons/CommentIcon.d.ts +2 -1
- package/es/components/icons/EventIcon.d.ts +2 -1
- package/es/components/icons/FreeDrawIcon.d.ts +2 -1
- package/es/components/icons/GPTIcon.d.ts +2 -1
- package/es/components/icons/GPTIconV2.d.ts +2 -1
- package/es/components/icons/GPTIconV3.d.ts +2 -1
- package/es/components/icons/HighlightIcon.d.ts +2 -1
- package/es/components/icons/IdeaIcon.d.ts +2 -1
- package/es/components/icons/InvisibleIcon.d.ts +2 -1
- package/es/components/icons/MuteIcon.d.ts +2 -1
- package/es/components/icons/OpenUrlIcon.d.ts +2 -1
- package/es/components/icons/PauseIcon.d.ts +2 -1
- package/es/components/icons/PlaneIcon.d.ts +2 -1
- package/es/components/icons/RequestIcon.d.ts +2 -1
- package/es/components/icons/StopRecordIcon.d.ts +2 -1
- package/es/components/icons/UserIcon.d.ts +2 -1
- package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
- package/es/components/icons/WarningIcon.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
- package/es/components/molecules/Collapse/Collapse.d.ts +3 -3
- package/es/components/molecules/Collapse/Collapse.js +9 -0
- package/es/components/molecules/ColorSetting/styled.d.ts +1 -8
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +2 -2
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +258 -111
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.d.ts +66 -25
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +109 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +48 -4
- package/es/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +22 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.d.ts +20 -0
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +90 -1
- package/es/components/molecules/Drawer/Drawer.d.ts +5 -1
- package/es/components/molecules/Drawer/Drawer.js +3 -1
- package/es/components/molecules/Drawer/index.d.ts +1 -0
- package/es/components/molecules/Form/Form.d.ts +1 -0
- package/es/components/molecules/Form/Form.js +1 -0
- package/es/components/molecules/Form/index.d.ts +1 -0
- package/es/components/molecules/Form/index.js +1 -0
- package/es/components/molecules/IconSelection/styled.d.ts +1 -8
- package/es/components/molecules/Modal/Modal.d.ts +2 -2
- package/es/components/molecules/Modal/index.d.ts +1 -0
- package/es/components/molecules/Modal/styled.d.ts +1 -1
- package/es/components/molecules/ModalV2/ModalV2.d.ts +5 -0
- package/es/components/molecules/ModalV2/ModalV2.js +26 -0
- package/es/components/molecules/ModalV2/index.d.ts +2 -0
- package/es/components/molecules/ModalV2/index.js +1 -0
- package/es/components/molecules/ModalV2/styled.d.ts +7 -0
- package/es/components/molecules/ModalV2/styled.js +22 -0
- package/es/components/molecules/Popconfirm/Popconfirm.d.ts +1 -1
- package/es/components/molecules/PreviewModal/PreviewModal.d.ts +7 -0
- package/es/components/molecules/PreviewModal/PreviewModal.js +30 -0
- package/es/components/molecules/PreviewModal/index.d.ts +2 -0
- package/es/components/molecules/PreviewModal/index.js +1 -0
- package/es/components/molecules/PreviewModal/styled.d.ts +4 -0
- package/es/components/molecules/PreviewModal/styled.js +39 -0
- package/es/components/molecules/ResizeGrid/ResizeGrid.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/ResizeGrid.js +728 -0
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +87 -0
- package/es/components/molecules/ResizeGrid/components/Cell/index.d.ts +1 -0
- package/es/components/molecules/ResizeGrid/components/Cell/index.js +1 -0
- package/es/components/molecules/ResizeGrid/components/Cell/styled.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/components/Cell/styled.js +80 -0
- package/es/components/molecules/ResizeGrid/constant.d.ts +35 -0
- package/es/components/molecules/ResizeGrid/constant.js +111 -0
- package/es/components/molecules/ResizeGrid/index.d.ts +2 -0
- package/es/components/molecules/ResizeGrid/index.js +1 -0
- package/es/components/molecules/ResizeGrid/styled.d.ts +10 -0
- package/es/components/molecules/ResizeGrid/styled.js +56 -0
- package/es/components/molecules/ResizeGrid/types.d.ts +147 -0
- package/es/components/molecules/ResizeGrid/types.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.d.ts +11 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +53 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.d.ts +16 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/index.js +105 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.d.ts +20 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuCell/styled.js +135 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/constants.d.ts +2 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/constants.js +765 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/index.d.ts +3 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/index.js +2 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/styled.d.ts +9 -0
- package/es/components/molecules/RichMenu/RichMenuBlock/styled.js +17 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.d.ts +10 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/RichMenuChatBar.js +32 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.d.ts +6 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/index.js +15 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.d.ts +4 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/TypingChat/styled.js +47 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/index.d.ts +2 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/index.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.d.ts +9 -0
- package/es/components/molecules/RichMenu/RichMenuChatBar/styled.js +37 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.d.ts +10 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/RichMenuMobileView.js +37 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/index.d.ts +1 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/index.js +1 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.d.ts +6 -0
- package/es/components/molecules/RichMenu/RichMenuMobileView/styled.js +20 -0
- package/es/components/molecules/RichMenu/index.d.ts +3 -0
- package/es/components/molecules/RichMenu/index.js +3 -0
- package/es/components/molecules/Select/Select.d.ts +5 -1
- package/es/components/molecules/Select/Select.js +23 -2
- package/es/components/molecules/Select/Test.d.ts +2 -1
- package/es/components/molecules/ShareAccess/ShareAccess.d.ts +3 -0
- package/es/components/molecules/ShareAccess/ShareAccess.js +23 -0
- package/es/components/molecules/ShareAccess/actions.d.ts +16 -0
- package/es/components/molecules/ShareAccess/actions.js +12 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.d.ts +2 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/GeneralAccess.js +70 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/GeneralAccess/styled.js +57 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.d.ts +3 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/LayoutContent.js +14 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/styled.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/LayoutContent/styled.js +7 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.d.ts +2 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/ModalTransferOwnerShip.js +43 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.d.ts +0 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.d.ts +7 -0
- package/es/components/molecules/ShareAccess/components/ModalTransferOwnerShip/styled.js +18 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.d.ts +5 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/PeopleAccess.js +92 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/PeopleAccess/styled.js +46 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.d.ts +5 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/SearchUser.js +73 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/index.js +1 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/styled.d.ts +2 -0
- package/es/components/molecules/ShareAccess/components/SearchUser/styled.js +29 -0
- package/es/components/molecules/ShareAccess/components/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/components/index.js +1 -0
- package/es/components/molecules/ShareAccess/constants.d.ts +61 -0
- package/es/components/molecules/ShareAccess/constants.js +79 -0
- package/es/components/molecules/ShareAccess/context.d.ts +4 -0
- package/es/components/molecules/ShareAccess/context.js +3 -0
- package/es/components/molecules/ShareAccess/hooks/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/hooks/index.js +1 -0
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +15 -0
- package/es/components/molecules/ShareAccess/hooks/useShareAccess.js +15 -0
- package/es/components/molecules/ShareAccess/index.d.ts +1 -0
- package/es/components/molecules/ShareAccess/index.js +1 -0
- package/es/components/molecules/ShareAccess/reducer.d.ts +2 -0
- package/es/components/molecules/ShareAccess/reducer.js +19 -0
- package/es/components/molecules/ShareAccess/types.d.ts +46 -0
- package/es/components/molecules/ShareAccess/types.js +1 -0
- package/es/components/molecules/ShareAccess/utils.d.ts +14 -0
- package/es/components/molecules/ShareAccess/utils.js +22 -0
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +2 -1
- package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
- package/es/components/molecules/index.d.ts +10 -2
- package/es/components/molecules/index.js +8 -2
- package/es/components/organism/Help/styled.d.ts +4 -10
- package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +1 -0
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.js +1 -0
- package/es/constants/richMenu.d.ts +19 -0
- package/es/constants/richMenu.js +19 -0
- package/es/constants/storybook.d.ts +7 -1
- package/es/constants/storybook.js +12 -0
- package/es/constants/theme.js +30 -3
- package/es/hooks/useDebounceCallback.d.ts +1 -0
- package/es/hooks/useDebounceCallback.js +5 -0
- package/es/hooks/useDebounceV2.d.ts +1 -0
- package/es/hooks/useDebounceV2.js +11 -0
- package/es/hooks/useDeepCompareEffect.d.ts +1 -0
- package/es/hooks/useDeepCompareEffect.js +21 -0
- package/es/hooks/usePrevious.d.ts +2 -0
- package/es/hooks/usePrevious.js +9 -0
- package/es/locales/en/translation.json +3 -1
- package/es/locales/i18n.d.ts +3 -0
- package/es/locales/translations.d.ts +2 -0
- package/es/locales/vi/translation.json +2 -1
- package/es/test.d.ts +2 -1
- package/es/test.js +164 -66
- package/es/types/index.d.ts +12 -0
- package/es/types/index.js +2 -1
- package/es/types/richMenu.d.ts +214 -0
- package/es/types/richMenu.js +1 -0
- package/es/types/variables.d.ts +2 -0
- package/es/types/variables.js +1 -0
- package/es/utils/common.d.ts +3 -0
- package/es/utils/common.js +20 -0
- package/es/utils/handleError.d.ts +32 -2
- package/es/utils/handleError.js +42 -4
- package/package.json +12 -9
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import { Col, Row } from 'antd';
|
|
4
|
+
// Molecules
|
|
5
|
+
import { Modal } from '../../molecules';
|
|
6
|
+
// Components
|
|
7
|
+
import { Radio } from '../Radio';
|
|
8
|
+
// Styled
|
|
9
|
+
import { InputShortLink, InputWrapper } from './styled';
|
|
10
|
+
// Utils
|
|
11
|
+
import { validateURL } from './utils';
|
|
12
|
+
const OPTIONS = [
|
|
13
|
+
{
|
|
14
|
+
value: 'individual',
|
|
15
|
+
label: 'Individual',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
value: 'general',
|
|
19
|
+
label: 'General',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
export const PopupShortLink = props => {
|
|
23
|
+
const { open, onClose, onOk, disabledOpts, initSelectedProperties, callback } = props;
|
|
24
|
+
const [state, setState] = useState({
|
|
25
|
+
link: '',
|
|
26
|
+
type: 'individual',
|
|
27
|
+
error: '',
|
|
28
|
+
});
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
let type = 'individual';
|
|
31
|
+
if (initSelectedProperties && initSelectedProperties.keyTag) {
|
|
32
|
+
type = initSelectedProperties.keyTag === 'shortlink' ? 'individual' : 'general';
|
|
33
|
+
}
|
|
34
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { link: initSelectedProperties.link, type: type })));
|
|
35
|
+
}, [initSelectedProperties, setState]);
|
|
36
|
+
const handleClose = () => {
|
|
37
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { link: '', error: '' })));
|
|
38
|
+
if (onClose)
|
|
39
|
+
onClose();
|
|
40
|
+
};
|
|
41
|
+
const handleValidate = ({ urlString = state.link, afterValidate }) => {
|
|
42
|
+
const isValid = validateURL(urlString);
|
|
43
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { error: isValid ? '' : 'Invalid URL' })));
|
|
44
|
+
if (typeof afterValidate === 'function')
|
|
45
|
+
afterValidate(isValid);
|
|
46
|
+
};
|
|
47
|
+
const handleOnChange = (value) => {
|
|
48
|
+
if (state.error)
|
|
49
|
+
handleValidate({ urlString: value });
|
|
50
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { link: value })));
|
|
51
|
+
};
|
|
52
|
+
const handleOnOK = () => {
|
|
53
|
+
handleValidate({
|
|
54
|
+
afterValidate: (isValid) => {
|
|
55
|
+
if (isValid && onOk) {
|
|
56
|
+
if (initSelectedProperties.urlDetected) {
|
|
57
|
+
callback('REPLACE_DETECTED_URL', initSelectedProperties.urlDetected);
|
|
58
|
+
}
|
|
59
|
+
onOk(state.link, state.type);
|
|
60
|
+
handleClose();
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
const onChangeType = (event) => {
|
|
66
|
+
setState(prev => (Object.assign(Object.assign({}, prev), { type: event.target.value })));
|
|
67
|
+
};
|
|
68
|
+
return (React.createElement(Modal, { open: open, onCancel: handleClose, title: React.createElement("div", { style: { color: 'rgba(0, 0, 0, 0.87)', fontWeight: 'normal', fontSize: '16px' } }, "Add Short Link"), okText: "OK", cancelText: "Cancel", closable: false, onOk: handleOnOK, okButtonProps: {
|
|
69
|
+
disabled: !validateURL(state.link),
|
|
70
|
+
type: !validateURL(state.link) ? 'default' : 'primary',
|
|
71
|
+
} },
|
|
72
|
+
React.createElement(Row, null,
|
|
73
|
+
React.createElement(Col, { span: 6 },
|
|
74
|
+
React.createElement("span", { style: { fontSize: 12, color: '#000' } }, "Short link type")),
|
|
75
|
+
React.createElement(Col, { span: 18 },
|
|
76
|
+
React.createElement(Radio.Group, { onChange: onChangeType, value: state.type }, OPTIONS.map(each => (React.createElement(Radio, { key: each.value, disabled: disabledOpts && disabledOpts[each.value], name: "shortlink-type", value: each.value }, each.label)))))),
|
|
77
|
+
React.createElement(Row, null,
|
|
78
|
+
React.createElement(Col, { span: 24 },
|
|
79
|
+
React.createElement(InputWrapper, null,
|
|
80
|
+
React.createElement(InputShortLink, { required: true, isReverseMask: true, isHideErrMessage: true, labelColor: "#000000", id: "input-short-link-url", label: "Your URL", value: state.link, onAfterChange: handleOnChange })))),
|
|
81
|
+
!!state.error && (React.createElement(Row, null,
|
|
82
|
+
React.createElement(Col, { span: 6 }),
|
|
83
|
+
React.createElement(Col, { span: 18 },
|
|
84
|
+
React.createElement("div", null, state.error))))));
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputDynamic } from './InputDynamic';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WrapperInputStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const SpanIcon: import("styled-components").StyledComponent<"span", any, {
|
|
4
|
+
isDisabled?: boolean | undefined;
|
|
5
|
+
}, never>;
|
|
6
|
+
export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const InputShortLink: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof import("react").JSX.IntrinsicElements, any, import("../Input/Input").InputProps, any>;
|
|
8
|
+
export declare const TooltipHover: import("styled-components").StyledComponent<"div", any, {
|
|
9
|
+
top: number;
|
|
10
|
+
left: number;
|
|
11
|
+
isShow: boolean;
|
|
12
|
+
}, never>;
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2
|
+
// Libraries
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Input } from '../Input/Input';
|
|
5
|
+
// Constants
|
|
6
|
+
import { THEME } from '@antscorp/antsomi-ui/es/constants';
|
|
7
|
+
export const WrapperInputStyle = styled.div `
|
|
8
|
+
color: ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorText};
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
.input-wrapper-outter {
|
|
12
|
+
position: relative;
|
|
13
|
+
max-width: 100%;
|
|
14
|
+
min-height: 22px;
|
|
15
|
+
max-height: 6rem;
|
|
16
|
+
overflow: auto;
|
|
17
|
+
padding: 5px;
|
|
18
|
+
border-bottom: 1px solid ${(_b = THEME.token) === null || _b === void 0 ? void 0 : _b.blue1};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.customize-antsomi-profile {
|
|
22
|
+
position: absolute;
|
|
23
|
+
font-size: 20px;
|
|
24
|
+
right: 4px;
|
|
25
|
+
top: 50%;
|
|
26
|
+
transform: translateY(-50%);
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
color: rgb(0, 94, 184);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.styles-input-wrapper {
|
|
32
|
+
border-bottom: 1px solid ${(_c = THEME.token) === null || _c === void 0 ? void 0 : _c.blue1} !important;
|
|
33
|
+
:hover {
|
|
34
|
+
cursor: text;
|
|
35
|
+
background-color: ${(_d = THEME.token) === null || _d === void 0 ? void 0 : _d.blue};
|
|
36
|
+
border-bottom: 1px solid ${(_e = THEME.token) === null || _e === void 0 ? void 0 : _e.blue1};
|
|
37
|
+
}
|
|
38
|
+
:focus-within {
|
|
39
|
+
background-color: ${(_f = THEME.token) === null || _f === void 0 ? void 0 : _f.bw0};
|
|
40
|
+
border-bottom: 1px solid rgb(0, 94, 184);
|
|
41
|
+
}
|
|
42
|
+
:active {
|
|
43
|
+
background-color: ${(_g = THEME.token) === null || _g === void 0 ? void 0 : _g.bw0};
|
|
44
|
+
border-bottom: 1px solid rgb(0, 94, 184);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.input-error {
|
|
49
|
+
border-bottom-color: rgb(239, 51, 64);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.customize-antsomi-profile-outter {
|
|
53
|
+
position: absolute;
|
|
54
|
+
font-size: 20px;
|
|
55
|
+
right: 2.8rem;
|
|
56
|
+
top: 2.3rem;
|
|
57
|
+
transform: translateY(-50%);
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
color: ${(_h = THEME.token) === null || _h === void 0 ? void 0 : _h.blue7};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.input-personal {
|
|
63
|
+
padding: 0px 4px;
|
|
64
|
+
padding-right: 32px;
|
|
65
|
+
outline: none;
|
|
66
|
+
overflow-wrap: normal;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
text-overflow: unset;
|
|
69
|
+
white-space: normal;
|
|
70
|
+
// display: inline-block;
|
|
71
|
+
|
|
72
|
+
.detect-url {
|
|
73
|
+
background-color: #e8feca;
|
|
74
|
+
display: inline;
|
|
75
|
+
position: relative;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/*
|
|
80
|
+
$base-color: ${(_j = THEME.token) === null || _j === void 0 ? void 0 : _j.blue7};
|
|
81
|
+
$bg-base-color: #fff;
|
|
82
|
+
$border-base-color: ${(_k = THEME.token) === null || _k === void 0 ? void 0 : _k.bw3_5};
|
|
83
|
+
$bg-btn-base-color: #f4f6f8; */
|
|
84
|
+
|
|
85
|
+
.antsomi-wrapper-personalization {
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 100%;
|
|
88
|
+
background: $bg-base-color;
|
|
89
|
+
border: 1px solid $border-base-color;
|
|
90
|
+
border-radius: ${(_l = THEME.token) === null || _l === void 0 ? void 0 : _l.borderRadius}px;
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
font-family: Roboto, 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
|
95
|
+
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
|
96
|
+
.header {
|
|
97
|
+
padding: 13px 20px;
|
|
98
|
+
position: relative;
|
|
99
|
+
|
|
100
|
+
.title {
|
|
101
|
+
font-size: 20px;
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
color: $base-color;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:before {
|
|
107
|
+
content: '';
|
|
108
|
+
position: absolute;
|
|
109
|
+
left: 0;
|
|
110
|
+
bottom: 0;
|
|
111
|
+
height: 15px;
|
|
112
|
+
width: 95%;
|
|
113
|
+
border-bottom: 1px solid $border-base-color;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.body {
|
|
118
|
+
overflow: auto;
|
|
119
|
+
flex-grow: 1;
|
|
120
|
+
padding: 0 5px;
|
|
121
|
+
|
|
122
|
+
table {
|
|
123
|
+
width: 100%;
|
|
124
|
+
height: 100%;
|
|
125
|
+
table-layout: fixed;
|
|
126
|
+
border-collapse: collapse;
|
|
127
|
+
border-spacing: 0;
|
|
128
|
+
th,
|
|
129
|
+
td {
|
|
130
|
+
text-align: left;
|
|
131
|
+
padding: 0 15px;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.footer {
|
|
137
|
+
display: flex;
|
|
138
|
+
padding: 15px 25px;
|
|
139
|
+
justify-content: flex-end;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.btn {
|
|
144
|
+
min-width: 100px;
|
|
145
|
+
min-height: 40px;
|
|
146
|
+
border-radius: ${(_m = THEME.token) === null || _m === void 0 ? void 0 : _m.borderRadius}px;
|
|
147
|
+
outline: none;
|
|
148
|
+
border: none;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
|
|
151
|
+
&:focus {
|
|
152
|
+
outline: none !important;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.group-btn {
|
|
157
|
+
width: 222px;
|
|
158
|
+
display: flex;
|
|
159
|
+
justify-content: space-between;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.btn-default {
|
|
163
|
+
background-color: $bg-btn-base-color;
|
|
164
|
+
color: $base-color;
|
|
165
|
+
border: 1px solid #d7dfe8;
|
|
166
|
+
|
|
167
|
+
&:hover {
|
|
168
|
+
background-color: #e3e9ef;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.btn-blue {
|
|
173
|
+
background-color: $base-color;
|
|
174
|
+
color: $bg-base-color;
|
|
175
|
+
border: 1px solid #707070;
|
|
176
|
+
opacity: 0.9;
|
|
177
|
+
|
|
178
|
+
&:hover {
|
|
179
|
+
opacity: 1;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.input-outline {
|
|
184
|
+
border-top-style: hidden;
|
|
185
|
+
border-right-style: hidden;
|
|
186
|
+
border-left-style: hidden;
|
|
187
|
+
height: 27px;
|
|
188
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
|
|
189
|
+
|
|
190
|
+
&:focus {
|
|
191
|
+
outline: none;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.insert-word {
|
|
196
|
+
padding: 5px 8px;
|
|
197
|
+
color: white;
|
|
198
|
+
border: 1px solid;
|
|
199
|
+
border-radius: 20px;
|
|
200
|
+
height: 30px;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
line-height: 1px;
|
|
203
|
+
background: #bbefbe;
|
|
204
|
+
|
|
205
|
+
&.blue {
|
|
206
|
+
background: #3c39ba;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&.orange {
|
|
210
|
+
background: #fbac00;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&.violet-pc {
|
|
214
|
+
background: #6750a7;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
&.disabled {
|
|
218
|
+
background: #ccc;
|
|
219
|
+
}
|
|
220
|
+
&.custom {
|
|
221
|
+
background: #bbefbe;
|
|
222
|
+
// border: 1px solid #BBEFBE;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
em {
|
|
226
|
+
color: white;
|
|
227
|
+
font-style: normal;
|
|
228
|
+
font-size: 13px;
|
|
229
|
+
opacity: 0;
|
|
230
|
+
user-select: none;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
&:hover {
|
|
234
|
+
em {
|
|
235
|
+
opacity: 1;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
`;
|
|
240
|
+
export const SpanIcon = styled.span `
|
|
241
|
+
${({ isDisabled }) => isDisabled && `cursor: not-allowed !important; opacity: 0.5;`}
|
|
242
|
+
font-size: 20px;
|
|
243
|
+
`;
|
|
244
|
+
export const InputWrapper = styled.div `
|
|
245
|
+
.input__wrapper {
|
|
246
|
+
display: flex;
|
|
247
|
+
align-items: center;
|
|
248
|
+
|
|
249
|
+
div.--default {
|
|
250
|
+
min-width: 120px;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
`;
|
|
254
|
+
export const InputShortLink = styled(Input) ``;
|
|
255
|
+
export const TooltipHover = styled.div `
|
|
256
|
+
position: fixed;
|
|
257
|
+
left: ${props => `${props.left}px`};
|
|
258
|
+
top: ${props => `${props.top}px`};
|
|
259
|
+
|
|
260
|
+
display: ${props => (props.isShow ? 'flex' : 'none')};
|
|
261
|
+
justify-content: center;
|
|
262
|
+
align-items: center;
|
|
263
|
+
|
|
264
|
+
background: rgba(0, 0, 0, 0.62);
|
|
265
|
+
transition: opacity 186ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
266
|
+
transform 124ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
267
|
+
color: #fff;
|
|
268
|
+
font-size: 12px;
|
|
269
|
+
box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
270
|
+
0px 3px 14px 2px rgba(0, 0, 0, 0.12);
|
|
271
|
+
border-radius: 4px;
|
|
272
|
+
height: 24px;
|
|
273
|
+
width: auto;
|
|
274
|
+
z-index: 999;
|
|
275
|
+
padding: 5px 10px;
|
|
276
|
+
user-select: none;
|
|
277
|
+
white-space: nowrap;
|
|
278
|
+
text-overflow: ellipsis;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
box-sizing: border-box;
|
|
281
|
+
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare function validateURL(string: string): boolean;
|
|
2
|
+
export declare const getInsertPatternWithAppendSpaceEnd: (id: any, code: any, label: any, bgColor: any) => string;
|
|
3
|
+
export declare const genShortLinkValue: (url: string, type?: string) => {
|
|
4
|
+
id: string;
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const getInsertPattern: (id: any, code: any, label: any, bgColor: any) => string;
|
|
9
|
+
export declare const convertHtmlText: (htmlText: string, format: string | undefined, state: any, objectWidgetInput?: {}, type?: string, init?: string) => string;
|
|
10
|
+
export declare const handleUpdateInputPersonalization: (listIconRemove: any, listBtnElement: any) => void;
|
|
11
|
+
export declare function removeHtmlTag(text: any): string;
|
|
12
|
+
export declare function convertBreakTag(text: any): any;
|
|
13
|
+
export declare function convertDivToBreakTag(text: any): any;
|
|
14
|
+
export declare const pasteHtmlAtCaret: (html: any, selectPastedContent: any, callback?: any) => void;
|
|
15
|
+
export declare const getInsertLinkPatternWithAppendSpaceEnd: (id: string | number, value: string, label: string) => string;
|
|
16
|
+
export declare const validateHTMLTags: {
|
|
17
|
+
escapeCustomTags(t: any): any;
|
|
18
|
+
isCustomTag(t: any): boolean;
|
|
19
|
+
isValidTag(t: any): boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const spacingNonTracking: (data: any) => boolean;
|
|
22
|
+
export declare const initialValue: (initValue: string) => string | undefined;
|