@antscorp/antsomi-ui 1.3.3-beta.93 → 1.3.3-beta.94
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/index.d.ts +1 -1
- package/es/components/atoms/index.js +1 -1
- package/es/components/molecules/EditorScript/EditorScript.js +1 -1
- package/es/components/molecules/PreviewModal/PreviewModal.js +1 -1
- package/es/components/molecules/UploadImage/index.js +3 -3
- package/es/locales/en/translation.json +6 -3
- package/es/locales/i18n.d.ts +4 -1
- package/es/locales/translations.d.ts +4 -1
- package/es/models/SavedMedia.d.ts +2 -0
- package/es/models/SavedMedia.js +4 -0
- package/es/models/Upload.d.ts +2 -0
- package/es/models/Upload.js +3 -0
- package/es/services/MediaTemplateDesign/UploadFile/index.js +1 -0
- package/es/test.js +23 -0
- package/es/types/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -31,9 +31,9 @@ export { Alert } from './Alert';
|
|
|
31
31
|
export { ScrollBox } from './ScrollBox';
|
|
32
32
|
export { Rate } from './Rate';
|
|
33
33
|
export { SliderV2 } from './SliderV2';
|
|
34
|
+
export { InputDynamic } from './InputDynamic';
|
|
34
35
|
export * from './Flex';
|
|
35
36
|
export * from './RateV2';
|
|
36
|
-
export { InputDynamic } from './InputDynamic';
|
|
37
37
|
export * from './PreviewTabs';
|
|
38
38
|
export * from './MobileFrame';
|
|
39
39
|
export * from './SlideBar';
|
|
@@ -31,9 +31,9 @@ export { Alert } from './Alert';
|
|
|
31
31
|
export { ScrollBox } from './ScrollBox';
|
|
32
32
|
export { Rate } from './Rate';
|
|
33
33
|
export { SliderV2 } from './SliderV2';
|
|
34
|
+
export { InputDynamic } from './InputDynamic';
|
|
34
35
|
export * from './Flex';
|
|
35
36
|
export * from './RateV2';
|
|
36
|
-
export { InputDynamic } from './InputDynamic';
|
|
37
37
|
export * from './PreviewTabs';
|
|
38
38
|
export * from './MobileFrame';
|
|
39
39
|
export * from './SlideBar';
|
|
@@ -71,7 +71,7 @@ export const EditorScript = props => {
|
|
|
71
71
|
transform: 'scaleX(-1)',
|
|
72
72
|
} }),
|
|
73
73
|
t(translations.expandEditor.title)))),
|
|
74
|
-
React.createElement(Modal, { visible: isExpandEditor, title: expandModalLabel, onCancel: onCancelModal, centered: true, width: 1000, footer: React.createElement(Button, { onClick: onCancelModal }, t(translations.close)) }, renderAceEditor('500px'))));
|
|
74
|
+
React.createElement(Modal, { visible: isExpandEditor, title: expandModalLabel, onCancel: onCancelModal, centered: true, width: 1000, footer: React.createElement(Button, { onClick: onCancelModal }, t(translations.close.title)) }, renderAceEditor('500px'))));
|
|
75
75
|
};
|
|
76
76
|
EditorScript.defaultProps = {
|
|
77
77
|
expandModalLabel: 'Editor Script',
|
|
@@ -25,6 +25,6 @@ export const PreviewModal = props => {
|
|
|
25
25
|
React.createElement(ModalHeader, { className: modalHeaderClassName },
|
|
26
26
|
React.createElement(Button, { className: "close-btn", onClick: onCancel },
|
|
27
27
|
React.createElement(Icon, { type: "icon-ants-remove-slim", size: 12 }),
|
|
28
|
-
t(translations.close))),
|
|
28
|
+
t(translations.close.title))),
|
|
29
29
|
React.createElement(ModalBody, { className: modalBodyClassName }, children)));
|
|
30
30
|
};
|
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
12
12
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
13
13
|
// Libraries
|
|
14
|
-
import React, { lazy,
|
|
14
|
+
import React, { lazy, useEffect, useState, useRef } from 'react';
|
|
15
15
|
import Upload from 'antd/lib/upload';
|
|
16
16
|
// Hooks
|
|
17
17
|
import { useDeepCompareEffect } from '@antscorp/antsomi-ui/es/hooks';
|
|
@@ -136,8 +136,7 @@ export const UploadImage = props => {
|
|
|
136
136
|
var _a;
|
|
137
137
|
return (React.createElement(WrapperListImages, { className: "ants-group", key: idx },
|
|
138
138
|
React.createElement(Boxed, null,
|
|
139
|
-
React.createElement(
|
|
140
|
-
React.createElement(LazyThumbnail, { mode: mode, media: media })),
|
|
139
|
+
React.createElement(Image, { src: mode === 'video' ? media.thumbnail : media.url, alt: "img", loading: "lazy" }),
|
|
141
140
|
React.createElement(WrapperBtn, { className: "group-hover" },
|
|
142
141
|
React.createElement(Button, { onClick: () => handleSelectMedia(media), style: { backgroundColor: 'rgb(255,255,255)' } }, "USE"),
|
|
143
142
|
React.createElement(Button, { onClick: () => handleRemoveUploadedMedia(media), style: { backgroundColor: 'rgb(255,255,255)' } },
|
|
@@ -249,6 +248,7 @@ export const UploadImage = props => {
|
|
|
249
248
|
name: data.fileName,
|
|
250
249
|
properties: {
|
|
251
250
|
url: data.url,
|
|
251
|
+
thumbnail: data.thumbnail || '',
|
|
252
252
|
file: data.file,
|
|
253
253
|
extension: data.extension,
|
|
254
254
|
dimensions_file: data.dimensionsFile,
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"firstDayOfMonth": "First day of this month",
|
|
15
15
|
"firstDayOfQuarter": "First day of this quarter",
|
|
16
16
|
"firstDayOfYear": "First day of this year",
|
|
17
|
-
"lastDayOfWeekMonSun": "
|
|
18
|
-
"lastDayOfWeekSunSat": "
|
|
17
|
+
"lastDayOfWeekMonSun": "First day of this week (Mon - Sun)",
|
|
18
|
+
"lastDayOfWeekSunSat": "First day of this week (Sun - Sat)",
|
|
19
19
|
"lastDayOfMonth": "Last day of this month",
|
|
20
20
|
"lastDayOfQuarter": "Last day of this quarter",
|
|
21
21
|
"lastDayOfYear": "Last day of this year",
|
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
"title": "Edit",
|
|
35
35
|
"description": ""
|
|
36
36
|
},
|
|
37
|
+
"close": {
|
|
38
|
+
"title": "Close",
|
|
39
|
+
"description": ""
|
|
40
|
+
},
|
|
37
41
|
"duplicate": {
|
|
38
42
|
"title": "Duplicate"
|
|
39
43
|
},
|
|
@@ -224,6 +228,5 @@
|
|
|
224
228
|
"ninth": "Ninth",
|
|
225
229
|
"tenth": "Tenth"
|
|
226
230
|
},
|
|
227
|
-
"close": "Close",
|
|
228
231
|
"cellAction": "Click to add image"
|
|
229
232
|
}
|
package/es/locales/i18n.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ export declare const translationsJson: {
|
|
|
36
36
|
title: string;
|
|
37
37
|
description: string;
|
|
38
38
|
};
|
|
39
|
+
close: {
|
|
40
|
+
title: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
39
43
|
duplicate: {
|
|
40
44
|
title: string;
|
|
41
45
|
};
|
|
@@ -226,7 +230,6 @@ export declare const translationsJson: {
|
|
|
226
230
|
ninth: string;
|
|
227
231
|
tenth: string;
|
|
228
232
|
};
|
|
229
|
-
close: string;
|
|
230
233
|
cellAction: string;
|
|
231
234
|
};
|
|
232
235
|
};
|
|
@@ -36,6 +36,10 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
|
|
|
36
36
|
title: string;
|
|
37
37
|
description: string;
|
|
38
38
|
};
|
|
39
|
+
close: {
|
|
40
|
+
title: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
39
43
|
duplicate: {
|
|
40
44
|
title: string;
|
|
41
45
|
};
|
|
@@ -226,7 +230,6 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
|
|
|
226
230
|
ninth: string;
|
|
227
231
|
tenth: string;
|
|
228
232
|
};
|
|
229
|
-
close: string;
|
|
230
233
|
cellAction: string;
|
|
231
234
|
}>, current?: string) => void;
|
|
232
235
|
export declare const t: (id: string, ...rest: any[]) => [string, ...any[]];
|
|
@@ -6,6 +6,7 @@ export type TSavedMedia = {
|
|
|
6
6
|
name: string;
|
|
7
7
|
properties: {
|
|
8
8
|
url: string;
|
|
9
|
+
thumbnail: string;
|
|
9
10
|
size: number;
|
|
10
11
|
file: {
|
|
11
12
|
path: string;
|
|
@@ -26,6 +27,7 @@ export declare class SavedMedia extends Model<TSavedMedia> {
|
|
|
26
27
|
get id(): string;
|
|
27
28
|
get name(): string;
|
|
28
29
|
get url(): string;
|
|
30
|
+
get thumbnail(): string;
|
|
29
31
|
get createdAt(): moment.Moment | null;
|
|
30
32
|
get size(): number;
|
|
31
33
|
get sizeString(): string;
|
package/es/models/SavedMedia.js
CHANGED
|
@@ -11,6 +11,10 @@ export class SavedMedia extends Model {
|
|
|
11
11
|
var _a;
|
|
12
12
|
return ((_a = this.model.properties) === null || _a === void 0 ? void 0 : _a.url) || '';
|
|
13
13
|
}
|
|
14
|
+
get thumbnail() {
|
|
15
|
+
var _a;
|
|
16
|
+
return ((_a = this.model.properties) === null || _a === void 0 ? void 0 : _a.thumbnail) || '';
|
|
17
|
+
}
|
|
14
18
|
get createdAt() {
|
|
15
19
|
return moment(this.model.ctime, true).isValid() ? moment(this.model.ctime) : null;
|
|
16
20
|
}
|
package/es/models/Upload.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Model } from './model';
|
|
2
2
|
type TUpload = {
|
|
3
3
|
url: string;
|
|
4
|
+
thumbnail: string;
|
|
4
5
|
file: {
|
|
5
6
|
path: string;
|
|
6
7
|
};
|
|
@@ -20,6 +21,7 @@ export declare class Upload extends Model<TUpload> {
|
|
|
20
21
|
path: string;
|
|
21
22
|
} | undefined;
|
|
22
23
|
get url(): string;
|
|
24
|
+
get thumbnail(): string | undefined;
|
|
23
25
|
get extension(): string;
|
|
24
26
|
get dimensionsFile(): {
|
|
25
27
|
height: number;
|
package/es/models/Upload.js
CHANGED
|
@@ -78,6 +78,7 @@ export const uploadFile = (domainUrl, slug, infos, files) => __awaiter(void 0, v
|
|
|
78
78
|
? uploadData.map((file) => new Upload({
|
|
79
79
|
url: file.url,
|
|
80
80
|
file: file.file,
|
|
81
|
+
thumbnail: file.thumbnail || '',
|
|
81
82
|
extension: file.extension,
|
|
82
83
|
dimensions_file: file.dimensions_file,
|
|
83
84
|
size: file.size,
|
package/es/test.js
CHANGED
|
@@ -157,6 +157,29 @@ export const App = () => {
|
|
|
157
157
|
// previewUrl: '',
|
|
158
158
|
// });
|
|
159
159
|
} })))));
|
|
160
|
+
// --------------------------- Test SlideBar end -------------------------------------------
|
|
161
|
+
// ---------------------------- Test Input Dynamic start ------------------------------
|
|
162
|
+
// return (
|
|
163
|
+
// <div
|
|
164
|
+
// style={{
|
|
165
|
+
// width: 500,
|
|
166
|
+
// height: 500,
|
|
167
|
+
// border: '1px solid black',
|
|
168
|
+
// margin: '0 auto',
|
|
169
|
+
// padding: 12,
|
|
170
|
+
// borderRadius: '10px',
|
|
171
|
+
// }}
|
|
172
|
+
// >
|
|
173
|
+
// <InputDynamic
|
|
174
|
+
// errors={[]}
|
|
175
|
+
// onChange={dataOut => setValueShortlink(dataOut)}
|
|
176
|
+
// onError={() => {}}
|
|
177
|
+
// isViewMode={false}
|
|
178
|
+
// canMultipleLine={false}
|
|
179
|
+
// value={valueShortlink}
|
|
180
|
+
// />
|
|
181
|
+
// </div>
|
|
182
|
+
// );
|
|
160
183
|
// ---------------------------- Test Input Dynamic End ------------------------------
|
|
161
184
|
// ---------------------------- Test Helps Start ------------------------------
|
|
162
185
|
// return (
|
package/es/types/index.d.ts
CHANGED
|
@@ -14,10 +14,10 @@ export type TConfigErrorInfo = {
|
|
|
14
14
|
priority?: 'low' | 'medium' | 'high';
|
|
15
15
|
from?: 'try-catch' | 'error-boundary';
|
|
16
16
|
};
|
|
17
|
+
export * from './richMenu';
|
|
18
|
+
export * from './variables';
|
|
17
19
|
export type PayloadInfo = {
|
|
18
20
|
userId?: string;
|
|
19
21
|
token?: string;
|
|
20
22
|
accountId?: string;
|
|
21
23
|
};
|
|
22
|
-
export * from './richMenu';
|
|
23
|
-
export * from './variables';
|