@antscorp/antsomi-ui 1.3.3-beta.3 → 1.3.3-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/public/icons/stars_slider.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/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 +29 -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 +98 -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 +279 -0
- package/es/components/atoms/InputDynamic/utils.d.ts +22 -0
- package/es/components/atoms/InputDynamic/utils.js +751 -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/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/styled.d.ts +1 -1
- package/es/components/atoms/Statistic/Statistic.d.ts +1 -4
- package/es/components/atoms/index.d.ts +6 -0
- package/es/components/atoms/index.js +4 -0
- package/es/components/common/ConfigProvider/GlobalStyle.js +69 -2
- 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/FontSetting/constants.d.ts +3 -0
- package/es/components/molecules/FontSetting/constants.js +22 -0
- package/es/components/molecules/FontSetting/index.d.ts +10 -4
- package/es/components/molecules/FontSetting/index.js +36 -35
- package/es/components/molecules/FontSetting/types.d.ts +1 -1
- 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 +640 -0
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.d.ts +3 -0
- package/es/components/molecules/ResizeGrid/components/Cell/Cell.js +85 -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 +55 -0
- package/es/components/molecules/ResizeGrid/types.d.ts +144 -0
- package/es/components/molecules/ResizeGrid/types.js +1 -0
- package/es/components/molecules/Select/Select.d.ts +6 -4
- package/es/components/molecules/Select/Select.js +23 -2
- package/es/components/molecules/TreeSelect/TreeSelect.d.ts +3 -4
- package/es/components/molecules/index.d.ts +6 -0
- package/es/components/molecules/index.js +4 -0
- package/es/components/organism/Help/styled.d.ts +6 -16
- package/es/components/organism/Table/ExplorePivotTable/styled.d.ts +1 -0
- package/es/constants/theme.js +30 -3
- package/es/hooks/useDeepCompareEffect.d.ts +1 -0
- package/es/hooks/useDeepCompareEffect.js +21 -0
- package/es/locales/en/translation.json +2 -1
- package/es/locales/i18n.d.ts +2 -0
- package/es/locales/translations.d.ts +1 -0
- package/es/locales/vi/translation.json +2 -1
- package/es/test.js +164 -66
- package/es/utils/common.d.ts +2 -0
- package/es/utils/common.js +16 -0
- package/package.json +8 -4
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
|
+
import { Col, Row } from 'antd';
|
|
4
|
+
import { useImmer } from 'use-immer';
|
|
5
|
+
// Molecules
|
|
6
|
+
import { Modal } from '../../molecules';
|
|
7
|
+
// Components
|
|
8
|
+
import { Radio } from '../Radio';
|
|
9
|
+
// Styled
|
|
10
|
+
import { InputShortLink, InputWrapper } from './styled';
|
|
11
|
+
// Utils
|
|
12
|
+
import { validateURL } from './utils';
|
|
13
|
+
const OPTIONS = [
|
|
14
|
+
{
|
|
15
|
+
value: 'individual',
|
|
16
|
+
label: 'Individual',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
value: 'general',
|
|
20
|
+
label: 'General',
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
export const PopupShortLink = props => {
|
|
24
|
+
const { open, onClose, onOk, disabledOpts, initSelectedProperties, callback } = props;
|
|
25
|
+
const [state, setState] = useImmer({
|
|
26
|
+
link: '',
|
|
27
|
+
type: 'individual',
|
|
28
|
+
error: '',
|
|
29
|
+
});
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
let type = 'individual';
|
|
32
|
+
if (initSelectedProperties && initSelectedProperties.keyTag) {
|
|
33
|
+
type = initSelectedProperties.keyTag === 'shortlink' ? 'individual' : 'general';
|
|
34
|
+
}
|
|
35
|
+
setState(draft => {
|
|
36
|
+
draft.link = initSelectedProperties.link;
|
|
37
|
+
draft.type = type;
|
|
38
|
+
});
|
|
39
|
+
}, [initSelectedProperties, setState]);
|
|
40
|
+
const handleClose = () => {
|
|
41
|
+
setState(draft => {
|
|
42
|
+
draft.link = '';
|
|
43
|
+
draft.error = '';
|
|
44
|
+
});
|
|
45
|
+
if (onClose)
|
|
46
|
+
onClose();
|
|
47
|
+
};
|
|
48
|
+
const handleValidate = ({ urlString = state.link, afterValidate }) => {
|
|
49
|
+
const isValid = validateURL(urlString);
|
|
50
|
+
setState(draft => {
|
|
51
|
+
draft.error = isValid ? '' : 'Invalid URL';
|
|
52
|
+
});
|
|
53
|
+
if (typeof afterValidate === 'function')
|
|
54
|
+
afterValidate(isValid);
|
|
55
|
+
};
|
|
56
|
+
const handleOnChange = (value) => {
|
|
57
|
+
if (state.error)
|
|
58
|
+
handleValidate({ urlString: value });
|
|
59
|
+
setState(draft => {
|
|
60
|
+
draft.link = value;
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
const handleOnOK = () => {
|
|
64
|
+
handleValidate({
|
|
65
|
+
afterValidate: (isValid) => {
|
|
66
|
+
if (isValid && onOk) {
|
|
67
|
+
if (initSelectedProperties.urlDetected) {
|
|
68
|
+
callback('REPLACE_DETECTED_URL', initSelectedProperties.urlDetected);
|
|
69
|
+
}
|
|
70
|
+
onOk(state.link, state.type);
|
|
71
|
+
handleClose();
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
const onChangeType = (event) => {
|
|
77
|
+
setState(draft => {
|
|
78
|
+
draft.type = event.target.value;
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
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: {
|
|
82
|
+
disabled: !validateURL(state.link),
|
|
83
|
+
type: !validateURL(state.link) ? 'default' : 'primary',
|
|
84
|
+
} },
|
|
85
|
+
React.createElement(Row, null,
|
|
86
|
+
React.createElement(Col, { span: 6 },
|
|
87
|
+
React.createElement("span", { style: { fontSize: 12, color: '#000' } }, "Short link type")),
|
|
88
|
+
React.createElement(Col, { span: 18 },
|
|
89
|
+
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)))))),
|
|
90
|
+
React.createElement(Row, null,
|
|
91
|
+
React.createElement(Col, { span: 24 },
|
|
92
|
+
React.createElement(InputWrapper, null,
|
|
93
|
+
React.createElement(InputShortLink, { required: true, isReverseMask: true, isHideErrMessage: true, labelColor: "#000000", id: "input-short-link-url", label: "Your URL", value: state.link, onAfterChange: handleOnChange })))),
|
|
94
|
+
!!state.error && (React.createElement(Row, null,
|
|
95
|
+
React.createElement(Col, { span: 6 }),
|
|
96
|
+
React.createElement(Col, { span: 18 },
|
|
97
|
+
React.createElement("div", null, state.error))))));
|
|
98
|
+
};
|
|
@@ -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 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,279 @@
|
|
|
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 ? 'block' : 'none')};
|
|
261
|
+
|
|
262
|
+
background: rgba(0, 0, 0, 0.62);
|
|
263
|
+
transition: opacity 186ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
264
|
+
transform 124ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
265
|
+
color: #fff;
|
|
266
|
+
font-size: 12px;
|
|
267
|
+
box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
268
|
+
0px 3px 14px 2px rgba(0, 0, 0, 0.12);
|
|
269
|
+
border-radius: 4px;
|
|
270
|
+
height: 24px;
|
|
271
|
+
width: auto;
|
|
272
|
+
z-index: 999;
|
|
273
|
+
padding: 5px 10px;
|
|
274
|
+
user-select: none;
|
|
275
|
+
white-space: nowrap;
|
|
276
|
+
text-overflow: ellipsis;
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
box-sizing: border-box;
|
|
279
|
+
`;
|
|
@@ -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;
|