@antscorp/antsomi-ui 1.3.5-beta.143 → 1.3.5-beta.144
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.
|
@@ -5,7 +5,7 @@ import Icon from '@antscorp/icons';
|
|
|
5
5
|
export const BigImage = React.memo(props => {
|
|
6
6
|
const { url, isDefaultThumbnail, isHideDefaultButton, index, onClickDefaultButton } = props;
|
|
7
7
|
return (React.createElement("div", { className: "image-container--big" },
|
|
8
|
-
url ? React.createElement(Image, { preview: false, width: "80%", height: "96%", src: url }) : null,
|
|
8
|
+
url ? (React.createElement(Image, { preview: false, width: "80%", height: "96%", src: url.includes('nocache') ? url : `${url}?nocache=${new Date().getTime()}` })) : null,
|
|
9
9
|
isHideDefaultButton ? null : (React.createElement(Button, { className: "set-default-button", onClick: () => onClickDefaultButton && onClickDefaultButton(index) },
|
|
10
10
|
isDefaultThumbnail ? React.createElement(Icon, { type: "icon-ants-check", style: { fontSize: '12px' } }) : null,
|
|
11
11
|
isDefaultThumbnail ? 'Default thumbnail' : 'Set as default'))));
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { Image } from 'antd';
|
|
3
3
|
export const SmallImage = React.memo(props => {
|
|
4
4
|
const { url, isSelected, index, onClick } = props;
|
|
5
|
-
return (React.createElement("div", { className: `image-container--small ${isSelected ? 'image-container--selected' : ''}`, onClick: () => onClick && onClick(index) }, url ? React.createElement(Image, { preview: false, width: "80%", height: "96%", src: url }) : null));
|
|
5
|
+
return (React.createElement("div", { className: `image-container--small ${isSelected ? 'image-container--selected' : ''}`, onClick: () => onClick && onClick(index) }, url ? (React.createElement(Image, { preview: false, width: "80%", height: "96%", src: url.includes('nocache') ? url : `${url}?nocache=${new Date().getTime()}` })) : null));
|
|
6
6
|
});
|
package/es/test.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@antscorp/icons/main.css';
|
|
3
|
-
export declare const BACKGROUND_COLOR_STYLE: {
|
|
4
|
-
SOLID: {
|
|
5
|
-
value: string;
|
|
6
|
-
label: string;
|
|
7
|
-
};
|
|
8
|
-
GRADIENT: {
|
|
9
|
-
value: string;
|
|
10
|
-
label: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export declare const customColors: string[];
|
|
14
3
|
export declare const App: () => React.JSX.Element;
|
package/es/test.js
CHANGED
|
@@ -1,461 +1,111 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
-
import React
|
|
11
|
+
import React from 'react';
|
|
3
12
|
import { createRoot } from 'react-dom/client';
|
|
4
13
|
import '@antscorp/icons/main.css';
|
|
5
|
-
import { ConfigProvider,
|
|
14
|
+
import { ConfigProvider, TemplateSaveAs, useTemplateSave } from './components';
|
|
15
|
+
// Constants
|
|
16
|
+
import { GET_LIST_TYPE, OBJECT_TYPES, PUBLIC_LEVEL } from './constants';
|
|
17
|
+
// import { Slider } from 'antd';
|
|
6
18
|
// Queries configs
|
|
7
|
-
import
|
|
19
|
+
import axios from 'axios';
|
|
20
|
+
import { get } from 'lodash';
|
|
21
|
+
import { MENU_PERMISSION } from './components/molecules/ShareAccess/constants';
|
|
8
22
|
import { QueryClientProviderAntsomiUI, queryClientAntsomiUI } from './queries';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
const SHARE_ACCESS_DEFAULT_VALUE = {
|
|
24
|
+
ownerId: 1600085510,
|
|
25
|
+
isPublic: 1,
|
|
26
|
+
listAccess: [
|
|
27
|
+
{
|
|
28
|
+
userId: 1600085510,
|
|
29
|
+
role: 1,
|
|
30
|
+
email: 'vinlt@antsomi.com',
|
|
31
|
+
avatar: '//c0-platform.ants.tech/avatar/2023/05/04/b3rg0ye8oa.png',
|
|
32
|
+
fullName: 'Truong Vi',
|
|
33
|
+
allowEdit: 1,
|
|
34
|
+
allowView: 1,
|
|
35
|
+
allowComment: 1,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
userId: 1600085513,
|
|
39
|
+
role: 2,
|
|
40
|
+
email: 'vinlt@antsomi.com',
|
|
41
|
+
avatar: '//c0-platform.ants.tech/avatar/2023/05/04/b3rg0ye8oa.png',
|
|
42
|
+
fullName: 'Truong Vi 2',
|
|
43
|
+
allowEdit: 0,
|
|
44
|
+
allowView: 0,
|
|
45
|
+
allowComment: 1,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
publicRole: null,
|
|
18
49
|
};
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'#5858e9',
|
|
30
|
-
'#57b8c2',
|
|
50
|
+
const thumbnailPortrait = [
|
|
51
|
+
'https://images.unsplash.com/photo-1515734674582-29010bb37906?q=80&w=1887&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
52
|
+
'https://images.unsplash.com/photo-1571423483570-eb27018d1ec0?q=80&w=1887&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
53
|
+
'https://images.creativefabrica.com/products/previews/2023/11/03/jG9YjMvHg/2XfoTnjLlEvPMgjGeu0VIDk96mr-desktop.jpg',
|
|
54
|
+
];
|
|
55
|
+
// const thumbnailPortrait = [];
|
|
56
|
+
const thumbnailLandscape = [
|
|
57
|
+
'https://images.creativefabrica.com/products/previews/2023/10/27/mWT9IwQN7/2XL1J9SW0srS03MukpeIzEyg2Hb-desktop.jpg',
|
|
58
|
+
'https://thedaily.case.edu/wp-content/uploads/2023/06/underwater-view-1024x439.jpg',
|
|
59
|
+
'https://images.unsplash.com/photo-1502134249126-9f3755a50d78?q=80&w=1770&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
31
60
|
];
|
|
61
|
+
const thumbnails = [...thumbnailPortrait, ...thumbnailLandscape];
|
|
62
|
+
const userId = 1600084823;
|
|
63
|
+
const network_id = 33167;
|
|
64
|
+
const token = '5474r2x214z294d4v284y4b4q4l5g406y2r2y2n4f5';
|
|
65
|
+
const getUserInfos = (email) => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
+
const type = 'search-user-info';
|
|
67
|
+
const res = yield axios.get(`https://permission.antsomi.com/api/account/info?userId=${userId}&network_id=${network_id}&_token=${token}&_user_id=${userId}&_account_id=${userId}&_lang=en&type=${type}&email=${email}`, {
|
|
68
|
+
method: 'GET',
|
|
69
|
+
});
|
|
70
|
+
const data = get(res, 'data.data');
|
|
71
|
+
return data;
|
|
72
|
+
});
|
|
32
73
|
export const App = () => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
calculationType: 'minus',
|
|
40
|
-
value: 1,
|
|
74
|
+
const { categoryItems, templateItems, value: templateValue, onChange: onChangeValue, searchNameProps, form, } = useTemplateSave({
|
|
75
|
+
service: {
|
|
76
|
+
url: 'https://sandbox-media-template.antsomi.com/cdp/api/v1',
|
|
77
|
+
token: '5474r2x214z254a4u2a4y444m4j5p27444c4h4h4n5t5',
|
|
78
|
+
userId: '1600080515',
|
|
79
|
+
accountId: '1600080515',
|
|
41
80
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
disabled: true,
|
|
52
|
-
prefix: 'Item',
|
|
53
|
-
isViewMode: false,
|
|
54
|
-
isShowAdd: true,
|
|
55
|
-
limit: {
|
|
56
|
-
min: 1,
|
|
57
|
-
max: 2,
|
|
81
|
+
config: {
|
|
82
|
+
getListType: GET_LIST_TYPE.OWNER,
|
|
83
|
+
objectType: OBJECT_TYPES.MEDIA_TEMPLATE,
|
|
84
|
+
publicLevel: PUBLIC_LEVEL.RESTRICTED,
|
|
85
|
+
limitListPerPage: 20,
|
|
86
|
+
},
|
|
87
|
+
defaultValue: {
|
|
88
|
+
accessInfo: SHARE_ACCESS_DEFAULT_VALUE,
|
|
89
|
+
saveOption: 'save-new',
|
|
58
90
|
},
|
|
59
|
-
activeId: '1',
|
|
60
|
-
options: Array.from({ length: 5 }, (_, index) => ({
|
|
61
|
-
label: `Item ${index + 1}`,
|
|
62
|
-
value: `${index + 1}`,
|
|
63
|
-
})),
|
|
64
|
-
isShowLabelSequentially: false,
|
|
65
91
|
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
// onRemoveObjectTemplate,
|
|
81
|
-
// } = useTemplateListing({
|
|
82
|
-
// serviceAuth: {
|
|
83
|
-
// url: 'https://sandbox-media-template.antsomi.com/cdp/api/v1',
|
|
84
|
-
// token: '5474r2x214z254a4u2a4y444m4j5p27444c4h4h4n5t5',
|
|
85
|
-
// userId: '1600080515',
|
|
86
|
-
// accountId: '1600080515',
|
|
87
|
-
// },
|
|
88
|
-
// config: {
|
|
89
|
-
// getListType: GET_LIST_TYPE.OWNER,
|
|
90
|
-
// objectType: 1,
|
|
91
|
-
// publicLevel: 0,
|
|
92
|
-
// limitListPerPage: 10,
|
|
93
|
-
// },
|
|
94
|
-
// checkedCategoriesDefault: {
|
|
95
|
-
// device_type: [1, 2],
|
|
96
|
-
// template_type: [1, 2, 3, 4, 5],
|
|
97
|
-
// },
|
|
98
|
-
// });
|
|
99
|
-
//
|
|
100
|
-
const callbackColorSetting = (key, dataIn) => {
|
|
101
|
-
switch (key) {
|
|
102
|
-
case 'ON_ADD_NEW_PRESET':
|
|
103
|
-
// eslint-disable-next-line no-case-declarations
|
|
104
|
-
const { customColors = [] } = dataIn;
|
|
105
|
-
setColorSettingState(prev => (Object.assign(Object.assign({}, prev), { customColors })));
|
|
106
|
-
break;
|
|
107
|
-
case 'ON_EDIT_CLICKED': {
|
|
108
|
-
// eslint-disable-next-line no-console
|
|
109
|
-
console.log('insideee.dev - clicked edit preset :>');
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
default:
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
const handleChangeColorSetting = (colorOut) => {
|
|
117
|
-
setColorSettingState(prev => (Object.assign(Object.assign({}, prev), { color: colorOut })));
|
|
118
|
-
};
|
|
119
|
-
const handleChangeRadio = e => {
|
|
120
|
-
const { value = '' } = e.target;
|
|
121
|
-
setRadioValue(value);
|
|
122
|
-
};
|
|
123
|
-
const handleChangeSlider = value => {
|
|
124
|
-
setSliderValue(value);
|
|
125
|
-
};
|
|
126
|
-
const handleSetIcon = value => {
|
|
127
|
-
setIcon(value);
|
|
128
|
-
};
|
|
129
|
-
const callbackSlideBar = (type, data) => {
|
|
130
|
-
console.log({ type, data });
|
|
131
|
-
};
|
|
132
|
-
// --------------------------- Test SlideBar start -------------------------------------------
|
|
133
|
-
// return (
|
|
134
|
-
// <div
|
|
135
|
-
// style={{
|
|
136
|
-
// width: 500,
|
|
137
|
-
// height: 500,
|
|
138
|
-
// border: '1px solid black',
|
|
139
|
-
// margin: '0 auto',
|
|
140
|
-
// padding: 12,
|
|
141
|
-
// borderRadius: '10px',
|
|
142
|
-
// }}
|
|
143
|
-
// >
|
|
144
|
-
// <SlideBar {...stateSlideBar} callback={callbackSlideBar} />
|
|
145
|
-
// </div>
|
|
146
|
-
// );
|
|
147
|
-
// --------------------------- Test SlideBar end -------------------------------------------
|
|
148
|
-
// ---------------------------- Test Input Dynamic start ------------------------------
|
|
149
|
-
// return (
|
|
150
|
-
// <div
|
|
151
|
-
// style={{
|
|
152
|
-
// width: 500,
|
|
153
|
-
// height: 500,
|
|
154
|
-
// border: '1px solid black',
|
|
155
|
-
// margin: '0 auto',
|
|
156
|
-
// padding: 12,
|
|
157
|
-
// borderRadius: '10px',
|
|
158
|
-
// }}
|
|
159
|
-
// >
|
|
160
|
-
// <InputDynamic
|
|
161
|
-
// errors={[]}
|
|
162
|
-
// onChange={dataOut => setValueShortlink(dataOut)}
|
|
163
|
-
// onError={() => {}}
|
|
164
|
-
// isViewMode={false}
|
|
165
|
-
// canMultipleLine={false}
|
|
166
|
-
// value={valueShortlink}
|
|
167
|
-
// />
|
|
168
|
-
// </div>
|
|
169
|
-
// );
|
|
170
|
-
return (React.createElement(QueryClientProviderAntsomiUI, { client: queryClientAntsomiUI },
|
|
171
|
-
React.createElement("div", { style: {
|
|
172
|
-
width: 500,
|
|
173
|
-
height: 500,
|
|
174
|
-
border: '1px solid black',
|
|
175
|
-
margin: '0 auto',
|
|
176
|
-
padding: 12,
|
|
177
|
-
borderRadius: '10px',
|
|
178
|
-
} },
|
|
179
|
-
React.createElement(InputDynamic, { errors: [], onChange: dataOut => setValueShortlink(dataOut), onError: () => { }, isViewMode: false, canMultipleLine: false, allowDynamicOptions: ['addPersonalization', 'shortlink'], value: valueShortlink }),
|
|
180
|
-
React.createElement(SettingWrapper, { vertical: true, label: "Background Image", containerStyle: { gap: '20px' } },
|
|
181
|
-
React.createElement(UploadImage, { domainMedia: "https://sandbox-media-template.antsomi.com", slug: "cdp/api/v1", labelButtonSelect: "Select Toggle from Computor", labelHeadingModal: "Toggle Selection", searchPlaceholder: "Search toggle", paramConfigs: {
|
|
182
|
-
token: '5474r2x214z294b423a4y474d4j5q274p4g494f4k5p5',
|
|
183
|
-
userId: '1600084695',
|
|
184
|
-
accountId: '1600084695',
|
|
185
|
-
},
|
|
186
|
-
// title="Background Image"
|
|
187
|
-
selectedImage: {
|
|
188
|
-
url: 'https://th.bing.com/th?id=OSK.8664d1b5838c79a3d74a3e97739978b5&w=148&h=148&c=7&o=6&dpr=2&pid=SANGAM',
|
|
189
|
-
}, onChangeImage: image => { }, onRemoveImage: () => {
|
|
190
|
-
// onChangeSettings('backgroundImageObj', {
|
|
191
|
-
// name: '',
|
|
192
|
-
// previewUrl: '',
|
|
193
|
-
// });
|
|
194
|
-
} })))));
|
|
195
|
-
// --------------------------- Test SlideBar end -------------------------------------------
|
|
196
|
-
// ---------------------------- Test Input Dynamic start ------------------------------
|
|
197
|
-
// return (
|
|
198
|
-
// <div
|
|
199
|
-
// style={{
|
|
200
|
-
// width: 500,
|
|
201
|
-
// height: 500,
|
|
202
|
-
// border: '1px solid black',
|
|
203
|
-
// margin: '0 auto',
|
|
204
|
-
// padding: 12,
|
|
205
|
-
// borderRadius: '10px',
|
|
206
|
-
// }}
|
|
207
|
-
// >
|
|
208
|
-
// <SlideBar {...stateSlideBar} callback={callbackSlideBar} />
|
|
209
|
-
// </div>
|
|
210
|
-
// );
|
|
211
|
-
// --------------------------- Test SlideBar end -------------------------------------------
|
|
212
|
-
// --------------------------- Test Content Source start ----------------------------------
|
|
213
|
-
return (React.createElement("div", { style: {
|
|
214
|
-
width: 500,
|
|
215
|
-
height: 500,
|
|
216
|
-
border: '1px solid black',
|
|
217
|
-
margin: '0 auto',
|
|
218
|
-
padding: 12,
|
|
219
|
-
borderRadius: '10px',
|
|
220
|
-
} },
|
|
221
|
-
React.createElement(ContentSource, { serviceAuth: {
|
|
222
|
-
url: 'https://sandbox-media-template.antsomi.com/cdp/api/v1',
|
|
223
|
-
token: '5474r2x214z2a4b403e4y4x5r4w524z5f4j464n4f5w5',
|
|
224
|
-
userId: '1600085679',
|
|
225
|
-
accountId: '1600085679',
|
|
226
|
-
} })));
|
|
227
|
-
// --------------------------- Test Content Source end ----------------------------------
|
|
228
|
-
// ---------------------------- Test Input Dynamic start ------------------------------
|
|
229
|
-
return (React.createElement("div", { style: {
|
|
230
|
-
width: 500,
|
|
231
|
-
height: 500,
|
|
232
|
-
border: '1px solid black',
|
|
233
|
-
margin: '0 auto',
|
|
234
|
-
padding: 12,
|
|
235
|
-
borderRadius: '10px',
|
|
236
|
-
} },
|
|
237
|
-
React.createElement(InputDynamic, { errors: [], onChange: dataOut => setValueShortlink(dataOut), onError: () => { }, isRealTime: true, isViewMode: false, canMultipleLine: false, value: valueShortlink })));
|
|
238
|
-
// ---------------------------- Test Input Dynamic End ------------------------------
|
|
239
|
-
// ---------------------------- Test Helps Start ------------------------------
|
|
240
|
-
// return (
|
|
241
|
-
// <div style={{ display: 'flex', justifyContent: 'center', width: '100vw', height: '100vh' }}>
|
|
242
|
-
// <Help />
|
|
243
|
-
// </div>
|
|
244
|
-
// );
|
|
245
|
-
// ---------------------------- Test Helps End ------------------------------
|
|
246
|
-
// ------------------------ Media template components test start -------------------------
|
|
247
|
-
// return (
|
|
248
|
-
// <ConfigProvider>
|
|
249
|
-
// <div
|
|
250
|
-
// style={{
|
|
251
|
-
// width: 500,
|
|
252
|
-
// height: 1000,
|
|
253
|
-
// border: '1px solid black',
|
|
254
|
-
// margin: '0 auto',
|
|
255
|
-
// padding: 12,
|
|
256
|
-
// borderRadius: '10px',
|
|
257
|
-
// marginTop: 12,
|
|
258
|
-
// }}
|
|
259
|
-
// >
|
|
260
|
-
// <h2 style={{ textAlign: 'center' }}>Test component of media template</h2>
|
|
261
|
-
// <Space size={20} direction="vertical">
|
|
262
|
-
// {/* <SettingWrapper vertical label="Color Setting">
|
|
263
|
-
// <ColorSetting
|
|
264
|
-
// label="Background Color"
|
|
265
|
-
// labelStyling={{ color: THEME.token?.colorIcon }}
|
|
266
|
-
// color={colorSettingState.color}
|
|
267
|
-
// customColors={colorSettingState.customColors}
|
|
268
|
-
// callback={callbackColorSetting}
|
|
269
|
-
// onChange={handleChangeColorSetting}
|
|
270
|
-
// />
|
|
271
|
-
// </SettingWrapper>
|
|
272
|
-
// <SettingWrapper vertical label="Input number with unit">
|
|
273
|
-
// <InputNumberWithUnit
|
|
274
|
-
// unit="px"
|
|
275
|
-
// min={0}
|
|
276
|
-
// max={2000}
|
|
277
|
-
// value={700}
|
|
278
|
-
// onChange={value => {
|
|
279
|
-
// console.log('onChange:: ', value);
|
|
280
|
-
// }}
|
|
281
|
-
// onChangeUnit={unit => {
|
|
282
|
-
// console.log('onChangeUnit:: ', unit);
|
|
283
|
-
// }}
|
|
284
|
-
// />
|
|
285
|
-
// </SettingWrapper>
|
|
286
|
-
// <SettingWrapper label="Radio Group">
|
|
287
|
-
// <RadioGroup
|
|
288
|
-
// options={Object.values(BACKGROUND_COLOR_STYLE)}
|
|
289
|
-
// value={radioValue}
|
|
290
|
-
// onChange={e => handleChangeRadio(e)}
|
|
291
|
-
// />
|
|
292
|
-
// </SettingWrapper> */}
|
|
293
|
-
// <SettingWrapper vertical label="Color Setting">
|
|
294
|
-
// <GradientSetting />
|
|
295
|
-
// </SettingWrapper>
|
|
296
|
-
// <SliderWithInputNumber
|
|
297
|
-
// label="Size (px)"
|
|
298
|
-
// labelStyling={{ marginTop: 10 }}
|
|
299
|
-
// min={0}
|
|
300
|
-
// max={100}
|
|
301
|
-
// value={sliderValue}
|
|
302
|
-
// onAfterChange={handleChangeSlider}
|
|
303
|
-
// />
|
|
304
|
-
// <EdgeSetting
|
|
305
|
-
// label="Notification Spacing"
|
|
306
|
-
// unit="px"
|
|
307
|
-
// linked={false}
|
|
308
|
-
// values={edge}
|
|
309
|
-
// // edgeLabels={[t(translations.column.title), t(translations.row.title)]}
|
|
310
|
-
// onChange={({ values, linked, unit }) => {
|
|
311
|
-
// setEdge(values);
|
|
312
|
-
// // onUpdateSettings({
|
|
313
|
-
// // gapX: values[0] + unit,
|
|
314
|
-
// // gapY: values[1] + unit,
|
|
315
|
-
// // gapSuffix: unit,
|
|
316
|
-
// // linkedGapInput: linked,
|
|
317
|
-
// // });
|
|
318
|
-
// }}
|
|
319
|
-
// />
|
|
320
|
-
// <PositionSetting
|
|
321
|
-
// settings={{ linkedPositionInput: false, positionSuffix: 'px' }}
|
|
322
|
-
// styles={{ top: '10px', right: '20px', bottom: '30', left: '40' }}
|
|
323
|
-
// onChange={() => {}}
|
|
324
|
-
// />
|
|
325
|
-
// </Space>
|
|
326
|
-
// <Space size={10} direction="vertical">
|
|
327
|
-
// <SettingWrapper vertical label="Background Image" containerStyle={{ gap: '20px' }}>
|
|
328
|
-
// <UploadImage
|
|
329
|
-
// domainMedia="https://sandbox-media-template.antsomi.com"
|
|
330
|
-
// slug="cdp/api/v1"
|
|
331
|
-
// labelButtonSelect="Select Toggle from Computor"
|
|
332
|
-
// labelHeadingModal="Toggle Selection"
|
|
333
|
-
// searchPlaceholder="Search toggle"
|
|
334
|
-
// paramConfigs={{
|
|
335
|
-
// token: '5474r2x214z294b423a4y474d4j5q274p4g494f4k5p5',
|
|
336
|
-
// userId: '1600084695',
|
|
337
|
-
// accountId: '1600084695',
|
|
338
|
-
// }}
|
|
339
|
-
// // title="Background Image"
|
|
340
|
-
// selectedImage={{
|
|
341
|
-
// url: 'https://th.bing.com/th?id=OSK.8664d1b5838c79a3d74a3e97739978b5&w=148&h=148&c=7&o=6&dpr=2&pid=SANGAM',
|
|
342
|
-
// }}
|
|
343
|
-
// onChangeImage={image =>
|
|
344
|
-
// // onChangeSettings('backgroundImageObj', {
|
|
345
|
-
// // name: image.name,
|
|
346
|
-
// // previewUrl: image.url,
|
|
347
|
-
// // })
|
|
348
|
-
// {}
|
|
349
|
-
// }
|
|
350
|
-
// onRemoveImage={() => {
|
|
351
|
-
// // onChangeSettings('backgroundImageObj', {
|
|
352
|
-
// // name: '',
|
|
353
|
-
// // previewUrl: '',
|
|
354
|
-
// // });
|
|
355
|
-
// }}
|
|
356
|
-
// />
|
|
357
|
-
// </SettingWrapper>
|
|
358
|
-
// <SettingWrapper vertical label="Icon">
|
|
359
|
-
// <IconSelection
|
|
360
|
-
// isOpen={false}
|
|
361
|
-
// labelHeadingModal="Toggle Selection"
|
|
362
|
-
// searchPlaceholder="Search for toggle..."
|
|
363
|
-
// icon={icon}
|
|
364
|
-
// onChange={handleSetIcon}
|
|
365
|
-
// iconTypes={['cus', 'font-awesome']}
|
|
366
|
-
// onChangeSvg={value => {
|
|
367
|
-
// console.log('onChangeSvg', value);
|
|
368
|
-
// }}
|
|
369
|
-
// />
|
|
370
|
-
// </SettingWrapper>
|
|
371
|
-
// </Space>
|
|
372
|
-
// </div>
|
|
373
|
-
// </ConfigProvider>
|
|
374
|
-
// );
|
|
375
|
-
// const [time, setTime] = useState<string[]>([]);
|
|
376
|
-
// const [times, setTimes] = useState<Value>({
|
|
377
|
-
// rangeInfo: { type: 'last_14_days' },
|
|
378
|
-
// rangeValue: [{ start: null, end: null }],
|
|
379
|
-
// });
|
|
380
|
-
// return (
|
|
381
|
-
// <ConfigProvider>
|
|
382
|
-
// <div
|
|
383
|
-
// style={{
|
|
384
|
-
// width: 500,
|
|
385
|
-
// height: 1000,
|
|
386
|
-
// border: '1px solid black',
|
|
387
|
-
// margin: '0 auto',
|
|
388
|
-
// padding: 12,
|
|
389
|
-
// borderRadius: '10px',
|
|
390
|
-
// marginTop: 12,
|
|
391
|
-
// }}
|
|
392
|
-
// >
|
|
393
|
-
// <h2 style={{ textAlign: 'center' }}>Test component of media template</h2>
|
|
394
|
-
// <CalendarSelection
|
|
395
|
-
// value={times}
|
|
396
|
-
// onChange={(value, info) => {
|
|
397
|
-
// console.log({ info, value });
|
|
398
|
-
// // setTime([value.rangeValue[0].start, value.rangeValue[0].end]);
|
|
399
|
-
// setTimes(value);
|
|
400
|
-
// }}
|
|
401
|
-
// />
|
|
402
|
-
// </div>
|
|
403
|
-
// </ConfigProvider>
|
|
404
|
-
// );
|
|
405
|
-
// ------------------------ Media template components test end -------------------------
|
|
406
|
-
// return (
|
|
407
|
-
// <div style={{ width: '500px', margin: '32px' }}>
|
|
408
|
-
// <GradientSetting onChange={e => console.log('gradient change')} />
|
|
409
|
-
// <br />
|
|
410
|
-
// <br />
|
|
411
|
-
// <br />
|
|
412
|
-
// <br />
|
|
413
|
-
// <Slider
|
|
414
|
-
// className="test-classname"
|
|
415
|
-
// min={-10}
|
|
416
|
-
// max={10}
|
|
417
|
-
// onChange={e => console.log('slider change', e)}
|
|
418
|
-
// />
|
|
419
|
-
// <br />
|
|
420
|
-
// <br />
|
|
421
|
-
// <Rate />
|
|
422
|
-
// <br />
|
|
423
|
-
// <br />
|
|
424
|
-
// <Slider className="test-classname" />
|
|
425
|
-
// </div>
|
|
426
|
-
// );
|
|
427
|
-
// ------------------------ Template Listing test -------------------------
|
|
428
|
-
// return (
|
|
429
|
-
// <div
|
|
430
|
-
// style={{
|
|
431
|
-
// height: '50vh',
|
|
432
|
-
// }}
|
|
433
|
-
// >
|
|
434
|
-
// <TemplateListing
|
|
435
|
-
// templatesProps={{
|
|
436
|
-
// items: templateItems,
|
|
437
|
-
// loading: isLoadingTemplateList,
|
|
438
|
-
// onLoadMoreTemplates,
|
|
439
|
-
// }}
|
|
440
|
-
// categoryListingProps={{
|
|
441
|
-
// loading: isLoadingCategoryList,
|
|
442
|
-
// items: categoryItems,
|
|
443
|
-
// checkedCategories,
|
|
444
|
-
// openKeys: openCategoryKeys,
|
|
445
|
-
// onOpenChange: onChangeOpenCategoryKeys,
|
|
446
|
-
// onMenuChange: onChangeCheckedCategories,
|
|
447
|
-
// }}
|
|
448
|
-
// templateItemProps={{
|
|
449
|
-
// removeModalProps: {
|
|
450
|
-
// // onOk
|
|
451
|
-
// onOk: onRemoveObjectTemplate,
|
|
452
|
-
// },
|
|
453
|
-
// }}
|
|
454
|
-
// />
|
|
455
|
-
// </div>
|
|
456
|
-
// );
|
|
92
|
+
return (React.createElement(TemplateSaveAs, { form: form, imageReview: {
|
|
93
|
+
thumbnails,
|
|
94
|
+
skeleton: true,
|
|
95
|
+
}, categories: categoryItems, templateNames: templateItems, shareAccess: {
|
|
96
|
+
show: true,
|
|
97
|
+
userId: 1600085510,
|
|
98
|
+
userPermission: {
|
|
99
|
+
edit: MENU_PERMISSION.CREATED_BY_USER,
|
|
100
|
+
view: MENU_PERMISSION.NONE,
|
|
101
|
+
},
|
|
102
|
+
getUserInfo: getUserInfos,
|
|
103
|
+
}, templateNamesOptions: Object.assign({}, searchNameProps), value: templateValue, onChange: value => {
|
|
104
|
+
onChangeValue(value);
|
|
105
|
+
} }));
|
|
457
106
|
};
|
|
458
107
|
const container = document.getElementById('root');
|
|
459
108
|
const root = createRoot(container);
|
|
460
|
-
root.render(React.createElement(
|
|
461
|
-
React.createElement(
|
|
109
|
+
root.render(React.createElement(QueryClientProviderAntsomiUI, { client: queryClientAntsomiUI },
|
|
110
|
+
React.createElement(ConfigProvider, { locale: "en" },
|
|
111
|
+
React.createElement(App, null))));
|