@antscorp/antsomi-ui 1.3.3-beta.35 → 1.3.3-beta.37
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/components/atoms/Alert/Alert.js +13 -6
- package/es/components/atoms/Button/index.js +1 -1
- package/es/components/atoms/Button/test.js +6 -6
- package/es/components/atoms/DividerPure/DividerPure.js +4 -15
- package/es/components/atoms/DividerPure/styled.js +36 -6
- package/es/components/atoms/Empty/Empty.js +1 -1
- package/es/components/atoms/FloatButton/index.js +1 -1
- package/es/components/atoms/Grid/Grid.js +2 -2
- package/es/components/atoms/Icon/index.js +28 -15
- package/es/components/atoms/Input/Input.js +21 -32
- package/es/components/atoms/Input/styled.js +102 -12
- package/es/components/atoms/InputDynamic/EditCaretPositioning.js +13 -13
- package/es/components/atoms/InputDynamic/InputDynamic.d.ts +2 -1
- package/es/components/atoms/InputDynamic/InputDynamic.js +83 -97
- package/es/components/atoms/InputDynamic/PopupShortLink.js +20 -21
- package/es/components/atoms/InputDynamic/styled.d.ts +1 -1
- package/es/components/atoms/InputDynamic/styled.js +275 -13
- package/es/components/atoms/InputDynamic/utils.js +104 -114
- package/es/components/atoms/InputNumber/InputNumber.js +3 -14
- package/es/components/atoms/MobileFrame/MobileFrame.js +3 -14
- package/es/components/atoms/MobileFrame/constants.js +1 -1
- package/es/components/atoms/MobileFrame/styled.js +29 -8
- package/es/components/atoms/Pagination/Pagination.js +1 -1
- package/es/components/atoms/Popover/Popover.js +1 -1
- package/es/components/atoms/Popover/styled.js +1 -6
- package/es/components/atoms/PreviewTabs/PreviewTabs.js +20 -31
- package/es/components/atoms/PreviewTabs/styled.js +71 -10
- package/es/components/atoms/Progress/Progress.js +1 -1
- package/es/components/atoms/Radio/index.js +18 -8
- package/es/components/atoms/Rate/Rate.js +1 -1
- package/es/components/atoms/RateV2/RateV2.js +24 -30
- package/es/components/atoms/RequiredLabel/index.js +3 -14
- package/es/components/atoms/RequiredLabel/styled.js +5 -7
- package/es/components/atoms/ScrollBox/index.js +14 -25
- package/es/components/atoms/Segmented/Segmented.js +1 -1
- package/es/components/atoms/Skeleton/Skeleton.js +1 -1
- package/es/components/atoms/Slider/index.js +7 -18
- package/es/components/atoms/Slider/styled.js +38 -10
- package/es/components/atoms/SliderV2/index.js +10 -21
- package/es/components/atoms/Space/Space.js +6 -7
- package/es/components/atoms/Spin/Spin.d.ts +2 -1
- package/es/components/atoms/Spin/Spin.js +3 -14
- package/es/components/atoms/Spin/styled.d.ts +1 -1
- package/es/components/atoms/Spin/styled.js +3 -6
- package/es/components/atoms/Statistic/Statistic.js +1 -1
- package/es/components/atoms/Steps/Steps.js +1 -1
- package/es/components/atoms/Switch/Switch.js +1 -1
- package/es/components/atoms/Text/index.js +4 -15
- package/es/components/atoms/Text/styled.js +40 -11
- package/es/components/atoms/Timeline/Timeline.js +1 -1
- package/es/components/atoms/Watermark/Watermark.js +1 -1
- package/es/components/common/ConfigProvider/ConfigProvider.js +4 -15
- package/es/components/common/ConfigProvider/GlobalStyle.js +569 -8
- package/es/components/icons/AccountCircle.js +2 -13
- package/es/components/icons/AddShoppingCart.js +2 -13
- package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
- package/es/components/icons/ArrowGrowIcon.js +2 -13
- package/es/components/icons/AssignmentInd.js +2 -13
- package/es/components/icons/AudioRecordIcon.d.ts +2 -1
- package/es/components/icons/AudioRecordIcon.js +2 -13
- package/es/components/icons/BugIcon.d.ts +2 -1
- package/es/components/icons/BugIcon.js +2 -13
- package/es/components/icons/Call.js +2 -13
- package/es/components/icons/CameraIcon.d.ts +2 -1
- package/es/components/icons/CameraIcon.js +2 -13
- package/es/components/icons/CaptureIcon.d.ts +2 -1
- package/es/components/icons/CaptureIcon.js +2 -13
- package/es/components/icons/Category.js +2 -13
- package/es/components/icons/ChatBubbleOutline.js +2 -13
- package/es/components/icons/CheckSlimIcon.d.ts +2 -1
- package/es/components/icons/CheckSlimIcon.js +2 -13
- package/es/components/icons/CircleNotifications.js +2 -13
- package/es/components/icons/CloseIcon.d.ts +2 -1
- package/es/components/icons/CloseIcon.js +2 -13
- package/es/components/icons/CommentIcon.d.ts +2 -1
- package/es/components/icons/CommentIcon.js +2 -13
- package/es/components/icons/ConfirmationNumber.js +2 -13
- package/es/components/icons/DesktopWindows.js +2 -13
- package/es/components/icons/EventIcon.d.ts +2 -1
- package/es/components/icons/EventIcon.js +2 -13
- package/es/components/icons/FactCheck.js +2 -13
- package/es/components/icons/FreeDrawIcon.d.ts +2 -1
- package/es/components/icons/FreeDrawIcon.js +2 -13
- package/es/components/icons/GPTIcon.d.ts +2 -1
- package/es/components/icons/GPTIcon.js +2 -2
- package/es/components/icons/GPTIconV2.d.ts +2 -1
- package/es/components/icons/GPTIconV2.js +2 -2
- package/es/components/icons/GPTIconV3.d.ts +2 -1
- package/es/components/icons/GPTIconV3.js +2 -13
- package/es/components/icons/HighlightIcon.d.ts +2 -1
- package/es/components/icons/HighlightIcon.js +2 -13
- package/es/components/icons/HightlightAlt.js +2 -13
- package/es/components/icons/HowToReg.js +2 -13
- package/es/components/icons/IdeaIcon.d.ts +2 -1
- package/es/components/icons/IdeaIcon.js +2 -13
- package/es/components/icons/Interactive.js +2 -13
- package/es/components/icons/InvisibleIcon.d.ts +2 -1
- package/es/components/icons/InvisibleIcon.js +2 -13
- package/es/components/icons/List.js +2 -13
- package/es/components/icons/LocalMallIcon.js +2 -13
- package/es/components/icons/MobileFriendly.js +2 -13
- package/es/components/icons/MuteIcon.d.ts +2 -1
- package/es/components/icons/MuteIcon.js +2 -13
- package/es/components/icons/NotificationsActive.js +2 -13
- package/es/components/icons/OpenUrlIcon.d.ts +2 -1
- package/es/components/icons/OpenUrlIcon.js +2 -13
- package/es/components/icons/PauseIcon.d.ts +2 -1
- package/es/components/icons/PauseIcon.js +2 -13
- package/es/components/icons/Payment.js +2 -13
- package/es/components/icons/PersonAddDisabled.js +2 -13
- package/es/components/icons/PhoneCallback.js +2 -13
- package/es/components/icons/PlaneIcon.d.ts +2 -1
- package/es/components/icons/PlaneIcon.js +2 -13
- package/es/components/icons/Preview.js +2 -13
- package/es/components/icons/Redeem.js +2 -13
- package/es/components/icons/RemoveRedEye.js +2 -13
- package/es/components/icons/RemoveShoppingCart.js +2 -13
- package/es/components/icons/RequestIcon.d.ts +2 -1
- package/es/components/icons/RequestIcon.js +2 -13
- package/es/components/icons/Search.js +2 -13
- package/es/components/icons/ShoppingBag.js +2 -13
- package/es/components/icons/ShoppingCart.js +2 -13
- package/es/components/icons/StopRecordIcon.d.ts +2 -1
- package/es/components/icons/StopRecordIcon.js +2 -13
- package/es/components/icons/Store.js +2 -13
- package/es/components/icons/UserIcon.d.ts +2 -1
- package/es/components/icons/UserIcon.js +2 -13
- package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
- package/es/components/icons/VerticalDotsIcon.js +2 -13
- package/es/components/icons/WarningIcon.d.ts +2 -1
- package/es/components/icons/WarningIcon.js +2 -13
- package/es/components/icons/Web.js +2 -13
- package/es/components/icons/WebAsset.js +2 -13
- package/es/components/molecules/AlignSetting/index.js +9 -20
- package/es/components/molecules/AlignSetting/styled.js +5 -6
- package/es/components/molecules/AlignSetting/utils.js +2 -2
- package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/CaptureScreen.js +240 -269
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.js +25 -36
- package/es/components/molecules/CaptureScreen/components/CommentBox/styled.js +129 -15
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
- package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.js +2 -2
- package/es/components/molecules/CaptureScreen/components/Cursor/styled.js +73 -10
- package/es/components/molecules/CaptureScreen/constants.js +7 -7
- package/es/components/molecules/CaptureScreen/hooks/useImageEditor.d.ts +1 -1
- package/es/components/molecules/CaptureScreen/hooks/useImageEditor.js +23 -23
- package/es/components/molecules/CaptureScreen/styled.js +247 -28
- package/es/components/molecules/CaptureScreen/themes/black.js +1 -1
- package/es/components/molecules/CaptureScreen/themes/white.js +1 -1
- package/es/components/molecules/CaptureScreen/utils.js +29 -32
- package/es/components/molecules/Card/Card.js +1 -1
- package/es/components/molecules/ChatBox/ChatBox.js +81 -147
- package/es/components/molecules/ChatBox/MessageItem.js +20 -22
- package/es/components/molecules/ChatBox/constants.js +2 -2
- package/es/components/molecules/ChatBox/styled.js +275 -13
- package/es/components/molecules/Collapse/Collapse.js +3 -4
- package/es/components/molecules/ColorPicker/ChromePicker/index.js +1 -1
- package/es/components/molecules/ColorPicker/ChromePicker/styled.js +11 -6
- package/es/components/molecules/ColorPicker/CustomPicker/index.js +21 -33
- package/es/components/molecules/ColorPicker/CustomPicker/styled.js +95 -14
- package/es/components/molecules/ColorPicker/SketchPicker/index.js +1 -12
- package/es/components/molecules/ColorPicker/SketchPicker/styled.js +6 -6
- package/es/components/molecules/ColorPicker/index.js +17 -17
- package/es/components/molecules/ColorPicker/styled.js +8 -6
- package/es/components/molecules/ColorSetting/index.js +15 -35
- package/es/components/molecules/ColorSetting/styled.js +36 -9
- package/es/components/molecules/DatePicker/DatePicker.js +1 -1
- package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +112 -146
- package/es/components/molecules/DatePicker/components/AdvancedPicker/constants.js +10 -10
- package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.js +45 -12
- package/es/components/molecules/DatePicker/components/AdvancedPicker/utils.js +3 -8
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.js +9 -28
- package/es/components/molecules/DatePicker/components/AdvancedRangePicker/constants.js +1 -1
- package/es/components/molecules/Drawer/Drawer.js +1 -1
- package/es/components/molecules/EdgeSetting/index.js +45 -69
- package/es/components/molecules/EdgeSetting/styled.js +13 -8
- package/es/components/molecules/FontFamilySelect/constants.js +1 -1
- package/es/components/molecules/FontFamilySelect/index.js +10 -33
- package/es/components/molecules/FontSetting/constants.js +2 -2
- package/es/components/molecules/FontSetting/index.js +22 -36
- package/es/components/molecules/FontWeightSelect/constants.js +1 -1
- package/es/components/molecules/FontWeightSelect/index.js +9 -32
- package/es/components/molecules/GradientSetting/index.js +35 -55
- package/es/components/molecules/GradientSetting/styled.js +58 -6
- package/es/components/molecules/IconSelection/components/Icon/index.js +8 -19
- package/es/components/molecules/IconSelection/constants.js +31 -37
- package/es/components/molecules/IconSelection/index.js +43 -56
- package/es/components/molecules/IconSelection/styled.js +74 -10
- package/es/components/molecules/IconSelection/types.js +1 -3
- package/es/components/molecules/IconSelection/utils.js +3 -3
- package/es/components/molecules/InputNumber/index.js +12 -23
- package/es/components/molecules/InputNumberWithUnit/index.js +5 -19
- package/es/components/molecules/InputNumberWithUnit/styled.js +15 -6
- package/es/components/molecules/InputSearch/index.js +3 -14
- package/es/components/molecules/InputSearch/styled.js +43 -6
- package/es/components/molecules/Modal/Modal.d.ts +2 -2
- package/es/components/molecules/Modal/Modal.js +8 -23
- package/es/components/molecules/Modal/styled.d.ts +1 -1
- package/es/components/molecules/Modal/styled.js +69 -17
- package/es/components/molecules/ModalV2/ModalV2.js +6 -17
- package/es/components/molecules/ModalV2/styled.d.ts +1 -1
- package/es/components/molecules/ModalV2/styled.js +19 -6
- package/es/components/molecules/Popconfirm/Popconfirm.js +1 -1
- package/es/components/molecules/PopupDraggable/PopupDraggable.js +13 -25
- package/es/components/molecules/PopupDraggable/styled.js +47 -11
- package/es/components/molecules/PreviewModal/PreviewModal.js +5 -16
- package/es/components/molecules/PreviewModal/styled.js +30 -9
- package/es/components/molecules/RadioGroup/index.js +3 -14
- package/es/components/molecules/RadioGroup/styled.js +11 -7
- package/es/components/molecules/ResizeGrid/ResizeGrid.js +275 -338
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +23 -37
- package/es/components/molecules/ResizeGrid/components/Cell/styled.js +78 -6
- package/es/components/molecules/ResizeGrid/constant.js +26 -37
- package/es/components/molecules/ResizeGrid/styled.js +54 -9
- package/es/components/molecules/Result/Result.js +1 -1
- package/es/components/molecules/RichMenuBlock/RichMenuBlock.js +23 -34
- package/es/components/molecules/RichMenuBlock/RichMenuCell/index.js +11 -11
- package/es/components/molecules/RichMenuBlock/RichMenuCell/styled.js +34 -18
- package/es/components/molecules/RichMenuBlock/constants.js +1 -1
- package/es/components/molecules/RichMenuBlock/styled.js +15 -16
- package/es/components/molecules/RichMenuChatBar/RichMenuChatBar.js +6 -17
- package/es/components/molecules/RichMenuChatBar/TypingChat/index.js +3 -3
- package/es/components/molecules/RichMenuChatBar/TypingChat/styled.js +43 -8
- package/es/components/molecules/RichMenuChatBar/styled.js +25 -10
- package/es/components/molecules/RichMenuMobileView/RichMenuMobileView.js +7 -22
- package/es/components/molecules/RichMenuMobileView/styled.js +18 -11
- package/es/components/molecules/Select/Select.d.ts +4 -2
- package/es/components/molecules/Select/Select.js +9 -20
- package/es/components/molecules/Select/Test.d.ts +2 -1
- package/es/components/molecules/Select/Test.js +2 -2
- package/es/components/molecules/Select/styled.js +34 -7
- package/es/components/molecules/SettingWrapper/index.js +2 -2
- package/es/components/molecules/SettingWrapper/styled.js +15 -9
- package/es/components/molecules/SettingWrapperPopover/index.js +4 -16
- package/es/components/molecules/SliderWithInputNumber/index.js +8 -19
- package/es/components/molecules/SliderWithInputNumber/styled.js +3 -6
- package/es/components/molecules/TextDecorationSelect/constants.js +1 -1
- package/es/components/molecules/TextDecorationSelect/index.js +9 -32
- package/es/components/molecules/TextTransformSelect/constants.js +1 -1
- package/es/components/molecules/TextTransformSelect/index.js +9 -32
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +4 -2
- package/es/components/molecules/TreeSelect/TreeSelect.js +1 -1
- package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
- package/es/components/molecules/UploadImage/MediaIcon.js +2 -2
- package/es/components/molecules/UploadImage/index.js +182 -280
- package/es/components/molecules/UploadImage/styled.js +129 -16
- package/es/components/organism/Help/Help.js +422 -530
- package/es/components/organism/Help/constants.js +11 -12
- package/es/components/organism/Help/styled.d.ts +6 -2
- package/es/components/organism/Help/styled.js +257 -48
- package/es/components/organism/Help/utils.js +11 -11
- package/es/components/organism/PositionSetting/config.js +2 -2
- package/es/components/organism/PositionSetting/index.js +15 -27
- package/es/components/organism/PositionSetting/styled.js +1 -6
- package/es/components/organism/Table/CrossTabTable/CrossTabTable.js +10 -10
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/CustomCell.js +6 -6
- package/es/components/organism/Table/CrossTabTable/components/CustomCell/styled.js +12 -6
- package/es/components/organism/Table/CrossTabTable/constants.js +3 -3
- package/es/components/organism/Table/CrossTabTable/styled.js +12 -6
- package/es/components/organism/Table/CrossTabTable/utils.js +1 -1
- package/es/components/organism/Table/ExplorePivotTable/ExplorePivotTable.js +12 -23
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/CustomCell.js +8 -8
- package/es/components/organism/Table/ExplorePivotTable/components/CustomCell/styled.js +20 -8
- package/es/components/organism/Table/ExplorePivotTable/constants.js +2 -2
- package/es/components/organism/Table/ExplorePivotTable/styled.js +13 -7
- package/es/components/organism/Table/ExplorePivotTable/utils.js +52 -72
- package/es/constants/gradientSetting.js +4 -4
- package/es/constants/keyCode.js +387 -387
- package/es/constants/richMenu.js +2 -2
- package/es/constants/storybook.d.ts +2 -1
- package/es/constants/storybook.js +2 -2
- package/es/constants/theme.js +6 -6
- package/es/hooks/index.js +1 -1
- package/es/hooks/useDebounce.js +5 -5
- package/es/hooks/useDeepCompareEffect.js +1 -1
- package/es/locales/i18n.js +2 -2
- package/es/locales/translations.js +7 -23
- package/es/models/SavedImage.js +23 -68
- package/es/models/Upload.js +19 -64
- package/es/models/model.js +3 -5
- package/es/services/MediaTemplateDesign/UploadFile/index.js +46 -102
- package/es/services/Ticket.js +48 -89
- package/es/services/constants.js +3 -3
- package/es/services/index.js +19 -30
- package/es/test.d.ts +2 -1
- package/es/test.js +25 -36
- package/es/utils/color.js +22 -22
- package/es/utils/common.js +75 -88
- package/es/utils/handleError.js +8 -49
- package/es/utils/loadable.js +6 -18
- package/es/utils/web.js +20 -26
- package/package.json +2 -2
|
@@ -14,57 +14,49 @@ import { decode } from 'html-entities';
|
|
|
14
14
|
import { getObjectPropSafely, random } from '@antscorp/antsomi-ui/es/utils';
|
|
15
15
|
export function validateURL(string) {
|
|
16
16
|
// eslint-disable-next-line no-useless-escape
|
|
17
|
-
|
|
17
|
+
const regexp = /^((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/;
|
|
18
18
|
return regexp.test(string);
|
|
19
19
|
}
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var id = random(5);
|
|
27
|
-
var keyTag = 'shortlink';
|
|
20
|
+
export const getInsertPatternWithAppendSpaceEnd = (id, code, label, bgColor) => `<button id="${id}" contenteditable="false" class="insert-word" style="max-width: 250px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding: 5px 8px; color: white; font-size: inherit; outline: none; border: 1px solid transparent; border-radius: 1.2rem; margin-top: 2px; cursor: pointer; background: ${bgColor}; height: auto" value=${code
|
|
21
|
+
.replace(/\s/gm, ' ')
|
|
22
|
+
.replace(/"/gm, '"')}><span style="line-height: 20px;margin-right: 8px;pointer-events:none;">${label}</span><em class="editor-icon-remove" style="color: white;font-style: normal; marign-left: 4px; position: relative; z-index: 1;font-size: 1rem;font-weight: bold">x</em></button> `;
|
|
23
|
+
export const genShortLinkValue = (url, type) => {
|
|
24
|
+
const id = random(5);
|
|
25
|
+
let keyTag = 'shortlink';
|
|
28
26
|
if (type === 'general') {
|
|
29
27
|
keyTag = 'shortlink_static';
|
|
30
28
|
}
|
|
31
29
|
return {
|
|
32
|
-
id
|
|
33
|
-
value:
|
|
34
|
-
label:
|
|
30
|
+
id,
|
|
31
|
+
value: `#{${keyTag}(${url})}`,
|
|
32
|
+
label: `https://ants.ly/${id}`,
|
|
35
33
|
};
|
|
36
34
|
};
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export var convertHtmlText = function (htmlText, format, state, objectWidgetInput, type, init) {
|
|
43
|
-
if (format === void 0) { format = 'raw'; }
|
|
44
|
-
if (objectWidgetInput === void 0) { objectWidgetInput = {}; }
|
|
45
|
-
if (type === void 0) { type = ''; }
|
|
46
|
-
if (init === void 0) { init = ''; }
|
|
47
|
-
var result = htmlText;
|
|
35
|
+
export const getInsertPattern = (id, code, label, bgColor) => `<button id="${id}" contenteditable="false" class="insert-word" style="padding: 5px 8px; color: white; font-size: inherit; outline: none; border: 1px solid transparent; border-radius: 1.2rem; height: auto; margin-top: 2px; cursor: pointer; background: ${bgColor}" value=${code
|
|
36
|
+
.replace(/\s/gm, ' ')
|
|
37
|
+
.replace(/"/gm, '"')}><span style="line-height: 20px;margin-right: 8px;pointer-events:none;">${label}</span><em class="editor-icon-remove" style="color: white;font-style: normal; marign-left: 4px; position: relative; z-index: 1;font-size: 1rem;font-weight: bold">x</em></button>`;
|
|
38
|
+
export const convertHtmlText = (htmlText, format = 'raw', state, objectWidgetInput = {}, type = '', init = '') => {
|
|
39
|
+
const result = htmlText;
|
|
48
40
|
try {
|
|
49
41
|
if (format && format.toLowerCase() === 'raw') {
|
|
50
42
|
// pattern find all button insert word
|
|
51
|
-
|
|
43
|
+
const regexInsertPattern = type === 'input'
|
|
52
44
|
? /<button .*?class="insert-word.*?".*? value="([^"]*?)".*?>(.*?)<\/button>/gim
|
|
53
45
|
: /<button .*?class="insert-word.*?".*? value=(.*?)>(.*?)<\/button>/gim;
|
|
54
46
|
// pattern find all symbol `"`
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
const regexQuot = /"/gm;
|
|
48
|
+
const regexSpace = / /gm;
|
|
49
|
+
const regexSpaceV2 = /nbsp;/gm;
|
|
50
|
+
const regexShortLink = /#{shortlink\(.*?\)}/;
|
|
51
|
+
const regexShortLinkStatic = /#{shortlink_static\(.*?\)}/;
|
|
60
52
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
const replacer = (match, p1, p2, p3, offset, string) => {
|
|
54
|
+
const newPlacer = p1
|
|
63
55
|
.replace(/"/gm, '')
|
|
64
|
-
.replace(
|
|
65
|
-
.replace(
|
|
66
|
-
.replace(
|
|
67
|
-
if (!
|
|
56
|
+
.replace(regexQuot, '"')
|
|
57
|
+
.replace(regexSpace, ' ')
|
|
58
|
+
.replace(regexSpaceV2, ' ');
|
|
59
|
+
if (!regexShortLink.test(newPlacer) || !regexShortLinkStatic.test(newPlacer)) {
|
|
68
60
|
return newPlacer.replace(/&/gm, '');
|
|
69
61
|
}
|
|
70
62
|
return newPlacer;
|
|
@@ -83,55 +75,55 @@ export var convertHtmlText = function (htmlText, format, state, objectWidgetInpu
|
|
|
83
75
|
}
|
|
84
76
|
}
|
|
85
77
|
if (format && format.toLowerCase() === 'html') {
|
|
86
|
-
|
|
78
|
+
const insertPattern = /#{.*?}/gm;
|
|
87
79
|
if (insertPattern.test(htmlText)) {
|
|
88
|
-
|
|
80
|
+
const htmlReplacer = (matcher) => {
|
|
89
81
|
// const regex = /(\w+.\w+)|(\(\w+)\)|"(.*?)"/gmi;
|
|
90
82
|
// const regex = /(\w+.\w+)|(\(\w+)\)|"(.*?)"/gim;
|
|
91
83
|
// const regex = /(\w+)|(\(\w+)\)|"(.*?)"/gim;
|
|
92
84
|
// const found = matcher.match(regex);
|
|
93
|
-
|
|
94
|
-
|
|
85
|
+
const found = matcher.replace(/#|{|}|/g, '').split('.');
|
|
86
|
+
const foundLink = found[0].split('(');
|
|
95
87
|
if (found && found.length) {
|
|
96
|
-
|
|
88
|
+
let bgColor = '#ccc';
|
|
97
89
|
// console.log(found);
|
|
98
90
|
if (found[0] === 'customer') {
|
|
99
|
-
|
|
91
|
+
bgColor = '#3C39BA';
|
|
100
92
|
}
|
|
101
93
|
else if (found[0] === 'visitor') {
|
|
102
|
-
|
|
94
|
+
bgColor = '#009000';
|
|
103
95
|
}
|
|
104
96
|
else if (found[0] === 'event') {
|
|
105
|
-
|
|
97
|
+
bgColor = '#FBAC00';
|
|
106
98
|
}
|
|
107
99
|
else if (found[0] === 'objectWidget') {
|
|
108
|
-
|
|
100
|
+
bgColor = '#24abb9';
|
|
109
101
|
}
|
|
110
102
|
else if (found[0] === 'productTemplate') {
|
|
111
|
-
|
|
103
|
+
bgColor = '#9238b5';
|
|
112
104
|
}
|
|
113
105
|
else if (found[0] === 'promotion_code' ||
|
|
114
106
|
foundLink[0] === 'nontrackurl' ||
|
|
115
107
|
foundLink[0] === 'shortlink' ||
|
|
116
108
|
foundLink[0] === 'shortlink_static') {
|
|
117
|
-
|
|
109
|
+
bgColor = '#6750A7';
|
|
118
110
|
}
|
|
119
111
|
else if (found[0] === 'custom') {
|
|
120
|
-
|
|
112
|
+
bgColor = '#BBEFBE';
|
|
121
113
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
114
|
+
let label = getObjectPropSafely(() => {
|
|
115
|
+
const foundAttribute = '';
|
|
116
|
+
let codeTag = '';
|
|
125
117
|
if (found.length === 2) {
|
|
126
118
|
if (found[0] === 'objectWidget' && found[1].startsWith('custom_')) {
|
|
127
|
-
|
|
128
|
-
|
|
119
|
+
bgColor = '#1890F0';
|
|
120
|
+
const contentWidget = found[1].substring(7);
|
|
129
121
|
// remove custom_ for get right content
|
|
130
122
|
if (contentWidget.length > 0) {
|
|
131
123
|
if (objectWidgetInput[contentWidget] !== undefined) {
|
|
132
124
|
return objectWidgetInput[contentWidget].name;
|
|
133
125
|
}
|
|
134
|
-
|
|
126
|
+
bgColor = '#ccc';
|
|
135
127
|
// return contentWidget;
|
|
136
128
|
return 'Unknow Widget';
|
|
137
129
|
}
|
|
@@ -145,8 +137,8 @@ export var convertHtmlText = function (htmlText, format, state, objectWidgetInpu
|
|
|
145
137
|
codeTag = found[1];
|
|
146
138
|
}
|
|
147
139
|
else {
|
|
148
|
-
|
|
149
|
-
codeTag =
|
|
140
|
+
const splitString = found[2].split('||');
|
|
141
|
+
codeTag = `${found[1]}.${splitString[0]}`;
|
|
150
142
|
}
|
|
151
143
|
}
|
|
152
144
|
// console.log('foundAttribute', found, foundAttribute, codeTag);
|
|
@@ -155,28 +147,28 @@ export var convertHtmlText = function (htmlText, format, state, objectWidgetInpu
|
|
|
155
147
|
}
|
|
156
148
|
// bgColor = '#ccc';
|
|
157
149
|
// return `${found[0]}.${codeTag}`;
|
|
158
|
-
return
|
|
150
|
+
return `${codeTag}`;
|
|
159
151
|
});
|
|
160
152
|
if (foundLink[0] === 'nontrackurl') {
|
|
161
153
|
label = 'Non tracking Link';
|
|
162
154
|
}
|
|
163
155
|
if (foundLink[0] === 'shortlink' || foundLink[0] === 'shortlink_static') {
|
|
164
|
-
|
|
156
|
+
const url = get(matcher.match(/\((.*?)\)/), '.1', '');
|
|
165
157
|
label = genShortLinkValue(url).label;
|
|
166
158
|
}
|
|
167
159
|
// console.log(type);
|
|
168
160
|
if (type === 'input') {
|
|
169
161
|
if (init === 'add') {
|
|
170
|
-
return getInsertPatternWithAppendSpaceEnd(random(8), matcher, label || found[0],
|
|
162
|
+
return getInsertPatternWithAppendSpaceEnd(random(8), matcher, label || found[0], bgColor);
|
|
171
163
|
}
|
|
172
|
-
return getInsertPattern(random(8), matcher, label || found[0],
|
|
164
|
+
return getInsertPattern(random(8), matcher, label || found[0], bgColor);
|
|
173
165
|
}
|
|
174
|
-
return getInsertPattern(random(8), matcher, label || found[0],
|
|
166
|
+
return getInsertPattern(random(8), matcher, label || found[0], bgColor);
|
|
175
167
|
}
|
|
176
168
|
return matcher;
|
|
177
169
|
};
|
|
178
170
|
try {
|
|
179
|
-
return
|
|
171
|
+
return `${result.replace(insertPattern, htmlReplacer)}`;
|
|
180
172
|
}
|
|
181
173
|
catch (error) {
|
|
182
174
|
// eslint-disable-next-line no-console
|
|
@@ -192,11 +184,11 @@ export var convertHtmlText = function (htmlText, format, state, objectWidgetInpu
|
|
|
192
184
|
}
|
|
193
185
|
return result;
|
|
194
186
|
};
|
|
195
|
-
export
|
|
196
|
-
listIconRemove.forEach(
|
|
187
|
+
export const handleUpdateInputPersonalization = (listIconRemove, listBtnElement) => {
|
|
188
|
+
listIconRemove.forEach((each) => {
|
|
197
189
|
each.innerHTML = '';
|
|
198
190
|
each.innerHTML = '✕';
|
|
199
|
-
|
|
191
|
+
const styleBtnRemove = each.style;
|
|
200
192
|
styleBtnRemove.fontSize = '13px';
|
|
201
193
|
styleBtnRemove.color = '#305FB8';
|
|
202
194
|
styleBtnRemove.marginLeft = '-12px';
|
|
@@ -210,8 +202,8 @@ export var handleUpdateInputPersonalization = function (listIconRemove, listBtnE
|
|
|
210
202
|
styleBtnRemove.transform = 'translate(-50%, -50%)';
|
|
211
203
|
styleBtnRemove.left = '100%';
|
|
212
204
|
});
|
|
213
|
-
listBtnElement.forEach(
|
|
214
|
-
|
|
205
|
+
listBtnElement.forEach((each) => {
|
|
206
|
+
const styleBtnElement = each.style;
|
|
215
207
|
styleBtnElement.position = 'relative';
|
|
216
208
|
styleBtnElement.color = '#000';
|
|
217
209
|
styleBtnElement.padding = '3px 8px';
|
|
@@ -222,7 +214,7 @@ export var handleUpdateInputPersonalization = function (listIconRemove, listBtnE
|
|
|
222
214
|
});
|
|
223
215
|
};
|
|
224
216
|
export function removeHtmlTag(text) {
|
|
225
|
-
text =
|
|
217
|
+
text = `${text}`.replace(/(<([^>]+)>)/gi, '');
|
|
226
218
|
text = text.replace(/ /gm, ' ');
|
|
227
219
|
return decode(text.trim());
|
|
228
220
|
}
|
|
@@ -232,14 +224,14 @@ export function convertBreakTag(text) {
|
|
|
232
224
|
export function convertDivToBreakTag(text) {
|
|
233
225
|
return text.replace(/<div>/gi, '<br>').replace(/<\/div>/gi, '');
|
|
234
226
|
}
|
|
235
|
-
export
|
|
227
|
+
export const pasteHtmlAtCaret = (html, selectPastedContent, callback) => {
|
|
236
228
|
try {
|
|
237
229
|
// console.log('callback', callback, typeof callback);
|
|
238
230
|
if (typeof callback === 'function') {
|
|
239
231
|
callback();
|
|
240
232
|
}
|
|
241
|
-
|
|
242
|
-
|
|
233
|
+
let sel;
|
|
234
|
+
let range;
|
|
243
235
|
if (window.getSelection) {
|
|
244
236
|
// IE9 and non-IE
|
|
245
237
|
sel = window.getSelection();
|
|
@@ -249,16 +241,16 @@ export var pasteHtmlAtCaret = function (html, selectPastedContent, callback) {
|
|
|
249
241
|
// Range.createContextualFragment() would be useful here but is
|
|
250
242
|
// only relatively recently standardized and is not supported in
|
|
251
243
|
// some browsers (IE9, for one)
|
|
252
|
-
|
|
244
|
+
const el = document.createElement('div');
|
|
253
245
|
el.innerHTML = html;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
246
|
+
const frag = document.createDocumentFragment();
|
|
247
|
+
let node;
|
|
248
|
+
let lastNode;
|
|
257
249
|
// eslint-disable-next-line no-cond-assign
|
|
258
250
|
while ((node = el.firstChild)) {
|
|
259
251
|
lastNode = frag.appendChild(node);
|
|
260
252
|
}
|
|
261
|
-
|
|
253
|
+
const firstNode = frag.firstChild;
|
|
262
254
|
range.insertNode(frag);
|
|
263
255
|
// Preserve the selection
|
|
264
256
|
if (lastNode) {
|
|
@@ -278,7 +270,7 @@ export var pasteHtmlAtCaret = function (html, selectPastedContent, callback) {
|
|
|
278
270
|
}
|
|
279
271
|
else if ((sel = document.selection) && sel.type !== 'Control') {
|
|
280
272
|
// IE < 9
|
|
281
|
-
|
|
273
|
+
const originalRange = sel.createRange();
|
|
282
274
|
originalRange.collapse(true);
|
|
283
275
|
sel.createRange().pasteHTML(html);
|
|
284
276
|
if (selectPastedContent) {
|
|
@@ -293,14 +285,12 @@ export var pasteHtmlAtCaret = function (html, selectPastedContent, callback) {
|
|
|
293
285
|
console.log(error);
|
|
294
286
|
}
|
|
295
287
|
};
|
|
296
|
-
export
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
.replace(/"/gm, '"'), "><span style=\"line-height: 20px;margin-right: 8px;pointer-events:none;\">").concat(label, "</span><em class=\"editor-icon-remove\" style=\"color: white;font-style: normal; marign-left: 4px; position: relative; z-index: 999;font-size: 1rem;font-weight: bold\">x</em></button> ");
|
|
300
|
-
};
|
|
288
|
+
export const getInsertLinkPatternWithAppendSpaceEnd = (id, value, label) => `<button id="${id}" contenteditable="false" class="insert-word" style="padding: 5px 8px; color: #000; font-size: inherit; outline: none; border: 1px solid transparent; border-radius: 1.2rem; margin-top: 2px; cursor: pointer; height: auto; background-color: #CAE5FE" value=${value
|
|
289
|
+
.replace(/\s/gm, ' ')
|
|
290
|
+
.replace(/"/gm, '"')}><span style="line-height: 20px;margin-right: 8px;pointer-events:none;">${label}</span><em class="editor-icon-remove" style="color: white;font-style: normal; marign-left: 4px; position: relative; z-index: 999;font-size: 1rem;font-weight: bold">x</em></button> `;
|
|
301
291
|
// eslint-disable-next-line func-names
|
|
302
|
-
export
|
|
303
|
-
|
|
292
|
+
export const validateHTMLTags = (function () {
|
|
293
|
+
const e = [
|
|
304
294
|
'<a ',
|
|
305
295
|
'<a>',
|
|
306
296
|
'</a>',
|
|
@@ -652,8 +642,8 @@ export var validateHTMLTags = (function () {
|
|
|
652
642
|
'<wbr ',
|
|
653
643
|
'</wbr>',
|
|
654
644
|
];
|
|
655
|
-
|
|
656
|
-
escapeCustomTags
|
|
645
|
+
const t = {
|
|
646
|
+
escapeCustomTags(t) {
|
|
657
647
|
if (!t || typeof t !== 'string')
|
|
658
648
|
return t;
|
|
659
649
|
for (var r = 0, a = [], i = [], o = [], s = t, n = 0; n <= t.length; n++)
|
|
@@ -664,15 +654,15 @@ export var validateHTMLTags = (function () {
|
|
|
664
654
|
var d = t.indexOf('<', r);
|
|
665
655
|
if (d === -1)
|
|
666
656
|
break;
|
|
667
|
-
|
|
668
|
-
|
|
657
|
+
const l = t.indexOf(' ', d + 1);
|
|
658
|
+
const p = t.indexOf('/>', d + 1);
|
|
669
659
|
var u = t.indexOf('>', d + 1);
|
|
670
|
-
|
|
660
|
+
const b = [];
|
|
671
661
|
l != -1 && b.push(l), p != -1 && b.push(p), u != -1 && b.push(u);
|
|
672
662
|
var f;
|
|
673
|
-
|
|
663
|
+
const m = Math.min(...b);
|
|
674
664
|
var h = t.substring(d, m + 1);
|
|
675
|
-
(f = e.some(
|
|
665
|
+
(f = e.some(e => {
|
|
676
666
|
if (h === e)
|
|
677
667
|
return a.push({ index: d, type: 'lt' }, { index: u, type: 'gt' }), !0;
|
|
678
668
|
})),
|
|
@@ -680,30 +670,30 @@ export var validateHTMLTags = (function () {
|
|
|
680
670
|
f ? (r = m) : (r += 1);
|
|
681
671
|
}
|
|
682
672
|
for (n = 0; n < i.length; n++) {
|
|
683
|
-
a.some(
|
|
673
|
+
a.some((e) => e.index === i[n].index) || o.push(i[n]);
|
|
684
674
|
}
|
|
685
675
|
for (n = o.length - 1; n >= 0; n--)
|
|
686
676
|
o[n].type == 'lt'
|
|
687
|
-
? (s =
|
|
677
|
+
? (s = `${s.substring(0, o[n].index)}<${s.substring(o[n].index + 1)}`)
|
|
688
678
|
: o[n].type == 'gt' &&
|
|
689
|
-
(s =
|
|
679
|
+
(s = `${s.substring(0, o[n].index)}>${s.substring(o[n].index + 1)}`);
|
|
690
680
|
return s;
|
|
691
681
|
},
|
|
692
|
-
isCustomTag
|
|
682
|
+
isCustomTag(t) {
|
|
693
683
|
if (!t || typeof t !== 'string')
|
|
694
684
|
return !1;
|
|
695
685
|
for (var r = !1, a = 0, i = 0; i <= t.length;) {
|
|
696
|
-
|
|
686
|
+
const o = t.indexOf('<', a);
|
|
697
687
|
if (o == -1)
|
|
698
688
|
break;
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
689
|
+
const s = t.indexOf(' ', o + 1);
|
|
690
|
+
const n = t.indexOf('/>', o + 1);
|
|
691
|
+
const d = t.indexOf('>', o + 1);
|
|
692
|
+
const l = [];
|
|
703
693
|
s != -1 && l.push(s), n != -1 && l.push(n), d != -1 && l.push(d);
|
|
704
|
-
|
|
694
|
+
const p = Math.min(...l);
|
|
705
695
|
var u = t.substring(o, p + 1);
|
|
706
|
-
if ((e.some(
|
|
696
|
+
if ((e.some((t, a) => {
|
|
707
697
|
if (u === t)
|
|
708
698
|
return !0;
|
|
709
699
|
a + 1 == e.length && (r = !0);
|
|
@@ -714,21 +704,21 @@ export var validateHTMLTags = (function () {
|
|
|
714
704
|
}
|
|
715
705
|
return r;
|
|
716
706
|
},
|
|
717
|
-
isValidTag
|
|
707
|
+
isValidTag(t) {
|
|
718
708
|
if (!t || typeof t !== 'string')
|
|
719
709
|
return !1;
|
|
720
710
|
for (var r = !1, a = 0, i = 0; i <= t.length;) {
|
|
721
|
-
|
|
711
|
+
const o = t.indexOf('<', a);
|
|
722
712
|
if (o == -1)
|
|
723
713
|
break;
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
714
|
+
const s = t.indexOf(' ', o + 1);
|
|
715
|
+
const n = t.indexOf('/>', o + 1);
|
|
716
|
+
const d = t.indexOf('>', o + 1);
|
|
717
|
+
const l = [];
|
|
728
718
|
s != -1 && l.push(s), n != -1 && l.push(n), d != -1 && l.push(d);
|
|
729
|
-
|
|
719
|
+
const p = Math.min(...l);
|
|
730
720
|
var u = t.substring(o, p + 1);
|
|
731
|
-
if ((r = e.some(
|
|
721
|
+
if ((r = e.some(e => u === e)))
|
|
732
722
|
break;
|
|
733
723
|
(i = p), r ? (a = p) : (a += 1);
|
|
734
724
|
}
|
|
@@ -738,19 +728,19 @@ export var validateHTMLTags = (function () {
|
|
|
738
728
|
return t;
|
|
739
729
|
})();
|
|
740
730
|
// Fix bug con trỏ input check text Value đã có thẻ <br/>
|
|
741
|
-
export
|
|
731
|
+
export const spacingNonTracking = (data) => {
|
|
742
732
|
// eslint-disable-next-line prefer-regex-literals
|
|
743
|
-
|
|
733
|
+
const regexHasBannedPrefix = new RegExp(/<br\s*\/?>/gi);
|
|
744
734
|
if (typeof data === 'string' && regexHasBannedPrefix.test(data)) {
|
|
745
735
|
return true;
|
|
746
736
|
}
|
|
747
737
|
return false;
|
|
748
738
|
};
|
|
749
|
-
export
|
|
739
|
+
export const initialValue = (initValue) => {
|
|
750
740
|
try {
|
|
751
|
-
|
|
741
|
+
const newTextValue = convertHtmlText(initValue, 'html', {}, {}, 'input', '');
|
|
752
742
|
if (newTextValue && !newTextValue.endsWith(' ')) {
|
|
753
|
-
return
|
|
743
|
+
return `${newTextValue} `;
|
|
754
744
|
}
|
|
755
745
|
return newTextValue;
|
|
756
746
|
}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
2
|
var t = {};
|
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -26,10 +15,10 @@ import clsx from 'clsx';
|
|
|
26
15
|
import { InputNumber as AntdInputNumber } from 'antd';
|
|
27
16
|
// Icons
|
|
28
17
|
import Icon from '@antscorp/icons';
|
|
29
|
-
export
|
|
18
|
+
export const InputNumber = props => {
|
|
30
19
|
// Props
|
|
31
|
-
|
|
32
|
-
return (React.createElement(AntdInputNumber,
|
|
20
|
+
const { showHandler, className } = props, restOfProps = __rest(props, ["showHandler", "className"]);
|
|
21
|
+
return (React.createElement(AntdInputNumber, Object.assign({}, restOfProps, { className: clsx(className, {
|
|
33
22
|
'--show-handler': showHandler,
|
|
34
23
|
}), upHandler: React.createElement(Icon, { type: "icon-ants-caret-up", style: { fontSize: 8 } }), downHandler: React.createElement(Icon, { type: "icon-ants-caret-down", style: { fontSize: 8 } }) })));
|
|
35
24
|
};
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
2
|
var t = {};
|
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -24,9 +13,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
13
|
import React from 'react';
|
|
25
14
|
// Styled
|
|
26
15
|
import { MobileWrapper, MobileInner, MobileBottomLine } from './styled';
|
|
27
|
-
export
|
|
28
|
-
var children = _a
|
|
29
|
-
return (React.createElement(MobileWrapper,
|
|
16
|
+
export const MobileFrame = (_a) => {
|
|
17
|
+
var { children } = _a, restOfProps = __rest(_a, ["children"]);
|
|
18
|
+
return (React.createElement(MobileWrapper, Object.assign({}, restOfProps),
|
|
30
19
|
React.createElement(MobileInner, null,
|
|
31
20
|
children,
|
|
32
21
|
React.createElement(MobileBottomLine, null))));
|
|
@@ -1,12 +1,33 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
1
|
// Libraries
|
|
6
2
|
import styled from 'styled-components';
|
|
7
3
|
// Assets
|
|
8
4
|
import MobileFrame from '@antscorp/antsomi-ui/es/assets/images/iphone.png';
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
export const MobileWrapper = styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
width: 100%;
|
|
9
|
+
background: url(${MobileFrame}) no-repeat center center;
|
|
10
|
+
background-size: contain;
|
|
11
|
+
`;
|
|
12
|
+
export const MobileInner = styled.div `
|
|
13
|
+
position: relative;
|
|
14
|
+
width: 100%;
|
|
15
|
+
max-width: 336px;
|
|
16
|
+
height: 695px;
|
|
17
|
+
margin: 61px 23px 20px 24px;
|
|
18
|
+
border-bottom-left-radius: 50px;
|
|
19
|
+
border-bottom-right-radius: 50px;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
`;
|
|
22
|
+
export const MobileBottomLine = styled.div `
|
|
23
|
+
width: 145px;
|
|
24
|
+
height: 5px;
|
|
25
|
+
background-color: #000000;
|
|
26
|
+
border-radius: 20px;
|
|
27
|
+
position: absolute;
|
|
28
|
+
margin: auto;
|
|
29
|
+
bottom: 10px;
|
|
30
|
+
left: 50%;
|
|
31
|
+
transform: translateX(-50%);
|
|
32
|
+
z-index: 10;
|
|
33
|
+
`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Pagination as AntdPagination } from 'antd';
|
|
2
|
-
export
|
|
2
|
+
export const Pagination = AntdPagination;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Popover as AntdPopover } from 'antd';
|
|
2
|
-
export
|
|
2
|
+
export const Popover = AntdPopover;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
1
|
// Libraries
|
|
6
2
|
import styled from 'styled-components';
|
|
7
3
|
// Components
|
|
8
4
|
import { Popover as AntdPopover } from 'antd';
|
|
9
|
-
export
|
|
10
|
-
var templateObject_1;
|
|
5
|
+
export const PopoverWrapper = styled(AntdPopover) ``;
|