@dreamcommerce/aurora 2.23.2-1 → 2.23.2-3
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/build/cjs/packages/aurora/src/components/xhr_image_picker/index.js +9 -2
- package/build/cjs/packages/aurora/src/components/xhr_image_picker/index.js.map +1 -1
- package/build/cjs/packages/aurora/src/css/image_picker/main.module.less.js +1 -1
- package/build/cjs/packages/aurora/src/index.js +2 -2
- package/build/esm/packages/aurora/src/components/xhr_image_picker/index.js +9 -2
- package/build/esm/packages/aurora/src/components/xhr_image_picker/index.js.map +1 -1
- package/build/esm/packages/aurora/src/css/image_picker/main.module.less.js +1 -1
- package/build/esm/packages/aurora/src/index.js +1 -1
- package/package.json +1 -1
|
@@ -6,15 +6,16 @@ var React = require('react');
|
|
|
6
6
|
var useTranslation = require('../../../../../external/react-i18next/dist/es/useTranslation.js');
|
|
7
7
|
var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
8
8
|
var constants = require('../file_picker/constants.js');
|
|
9
|
+
var utilities = require('@dreamcommerce/utilities');
|
|
9
10
|
var css_classes = require('../image_picker/css_classes.js');
|
|
10
11
|
var icon_image = require('../../assets/icon_image.js');
|
|
11
12
|
var main_module = require('../../css/image_picker/main.module.less.js');
|
|
12
13
|
var index = require('../image_picker/index.js');
|
|
14
|
+
var index$1 = require('../loader/index.js');
|
|
13
15
|
var use_modals_context = require('../modal_new/hooks/use_modals_context.js');
|
|
14
16
|
var modal = require('../modal_new/components/modal/modal.js');
|
|
15
17
|
var http_requester_contants = require('../../../../star_core/build/esm/packages/star_core/src/features/http_requester/http_requester_contants.js');
|
|
16
18
|
var use_http_api = require('../../hooks/use_http_api.js');
|
|
17
|
-
var index$1 = require('../loader/index.js');
|
|
18
19
|
|
|
19
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
21
|
|
|
@@ -73,6 +74,11 @@ var XhrImagePicker = function XhrImagePicker(_ref) {
|
|
|
73
74
|
isLoading = _useState10[0],
|
|
74
75
|
setIsLoading = _useState10[1];
|
|
75
76
|
|
|
77
|
+
var _useState11 = React.useState(),
|
|
78
|
+
_useState12 = _rollupPluginBabelHelpers.slicedToArray(_useState11, 2),
|
|
79
|
+
imageExtenstion = _useState12[0],
|
|
80
|
+
setImageExtenstion = _useState12[1];
|
|
81
|
+
|
|
76
82
|
var handleControlChange = /*#__PURE__*/function () {
|
|
77
83
|
var _ref2 = _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers.regeneratorRuntime().mark(function _callee(file) {
|
|
78
84
|
var fileList, fileAsDataUrl, _httpApi$fetch, response, cancelRequest, responseObject;
|
|
@@ -134,6 +140,7 @@ var XhrImagePicker = function XhrImagePicker(_ref) {
|
|
|
134
140
|
|
|
135
141
|
React.useEffect(function () {
|
|
136
142
|
initialImageFile.current = initialFile;
|
|
143
|
+
image && setImageExtenstion(utilities.FileUtils.getFileExtension(image === null || image === void 0 ? void 0 : image.name));
|
|
137
144
|
|
|
138
145
|
var setFileFromUrl = /*#__PURE__*/function () {
|
|
139
146
|
var _ref3 = _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers.regeneratorRuntime().mark(function _callee2(fileData) {
|
|
@@ -194,7 +201,7 @@ var XhrImagePicker = function XhrImagePicker(_ref) {
|
|
|
194
201
|
allowedExtensions: allowedExtensions,
|
|
195
202
|
initialFile: initialImageFile.current,
|
|
196
203
|
onImageSizeUpdated: onImageSizeUpdated,
|
|
197
|
-
topButtons: ImageEditor && /*#__PURE__*/React__default['default'].createElement("button", {
|
|
204
|
+
topButtons: ImageEditor && imageExtenstion !== 'svg' && /*#__PURE__*/React__default['default'].createElement("button", {
|
|
198
205
|
className: main_module['default'][css_classes['default'].imagePickerEditButton],
|
|
199
206
|
onClick: function onClick() {
|
|
200
207
|
return showModal(modalId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iEAAqE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iEAAqE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var styleInject_es = require('../../../../../external/style-inject/dist/style-inject.es.js');
|
|
6
6
|
|
|
7
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_image-picker__wrapper__2RK3f {\n position: relative;\n border: 1px dashed #abb4cd;\n border-radius: 2px;\n}\n.main-module_image-picker__wrapper-error__kCZeA {\n border-color: #e60c54;\n}\n.main-module_image-picker__wrapper-error__kCZeA:hover {\n border-color: #e60c54;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc {\n position: relative;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc .main-module_image-picker__label__1i_Fq {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 46px;\n left: 0;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc .main-module_image-picker__description__1v13N {\n display: none;\n}\n.main-module_image-picker__wrapper__2RK3f:hover {\n border-color: #135cc8;\n}\n.main-module_image-picker__wrapper__2RK3f:hover .main-module_image-picker__upload-icon__3sMvN {\n fill: #3c83ec;\n}\n.main-module_image-picker__wrapper-top-buttons__241RY {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n top: 1rem;\n right: 1rem;\n z-index: 10;\n}\n.main-module_image-picker__edit-button__3O-iq {\n display: flex;\n align-items: center;\n gap: 4px;\n background-color: #ffffff;\n background-image: none;\n border: 1px solid #3c83ec;\n border-radius: 2px;\n padding: 0.5rem;\n color: #3c83ec;\n cursor: pointer;\n}\n.main-module_image-picker__edit-button__3O-iq:hover {\n border-color: #135cc8;\n color: #135cc8;\n}\n.main-module_image-picker__edit-button__3O-iq:hover svg {\n fill: #135cc8;\n}\n.main-module_image-picker__label__1i_Fq {\n cursor: pointer;\n}\n.main-module_image-picker__input__3Wu2I {\n display: none;\n}\n.main-module_image-picker__description__1v13N {\n padding: 2rem 0;\n text-align: center;\n color: #3c83ec;\n}\n.main-module_image-picker__supported-formats__1_R_X {\n font-size: 12px;\n color: #59687e;\n}\n.main-module_image-picker__upload-icon__3sMvN {\n width: 1rem;\n height: auto;\n margin-bottom: 1rem;\n fill: #abb4cd;\n}\n.main-module_image-picker__delete-button__21_kT {\n display: flex;\n align-items: center;\n font-size: 12px;\n color: #3c83ec;\n cursor: pointer;\n background: transparent;\n}\n.main-module_image-picker__delete-button__21_kT:hover .main-module_image-picker__delete-label__3v2ot {\n text-decoration: underline;\n}\n.main-module_image-picker__delete-button__21_kT .main-module_image-picker__delete-label__3v2ot {\n color: #3c83ec;\n}\n.main-module_image-picker__delete-button__21_kT svg {\n fill: #3c83ec;\n}\n.main-module_image-picker__wrong-file-format-icon__X-NL0 {\n margin: 2rem 0 0.5rem;\n fill: #ffffff;\n}\n.main-module_image-picker__delete-icon__30pkO {\n fill: #3c83ec;\n margin-right: 0.5rem;\n}\n.main-module_image-picker__selected-file__3bRqa {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 46px;\n}\n.main-module_image-picker__selected-file-name-wrapper__37MKd,\n.main-module_image-picker__selected-file-remove-wrapper__2v4W2 {\n padding: 1rem;\n}\n.main-module_image-picker__selected-file-remove-wrapper__2v4W2 {\n display: flex;\n justify-content: flex-end;\n}\n.main-module_image-picker__selected-file-name-wrapper__37MKd {\n color: #59687e;\n}\n.main-module_image-picker__image-preview-wrapper__1jPXU {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 130px;\n}\n.main-module_image-picker__image-preview-wrapper__1jPXU svg {\n fill: transparent;\n}\n.main-module_image-picker__image-preview__12pRu {\n max-width: 100%;\n max-height: 100%;\n}\n.main-module_image-picker__error-text__rXAvw {\n margin-top: 0.5rem;\n color: #e60c54;\n}\n.main-module_image-picker__loading-wrapper__gBtlh {\n position: relative;\n}\n.main-module_image-picker__loading-wrapper-content__21jzx {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background-color: #ffffff;\n width: 100%;\n height: 100%;\n border: 1px dashed #abb4cd;\n border-radius: 2px;\n}\n.main-module_image-picker__loading-wrapper-content-text__2-Fup {\n color: #5c657e;\n margin-top: 0.5rem;\n}\n";
|
|
7
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_image-picker__wrapper__2RK3f {\n position: relative;\n border: 1px dashed #abb4cd;\n border-radius: 2px;\n}\n.main-module_image-picker__wrapper-error__kCZeA {\n border-color: #e60c54;\n}\n.main-module_image-picker__wrapper-error__kCZeA:hover {\n border-color: #e60c54;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc {\n position: relative;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc .main-module_image-picker__label__1i_Fq {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 46px;\n left: 0;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc .main-module_image-picker__description__1v13N {\n display: none;\n}\n.main-module_image-picker__wrapper__2RK3f:hover {\n border-color: #135cc8;\n}\n.main-module_image-picker__wrapper__2RK3f:hover .main-module_image-picker__upload-icon__3sMvN {\n fill: #3c83ec;\n}\n.main-module_image-picker__wrapper-top-buttons__241RY {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n top: 1rem;\n right: 1rem;\n z-index: 10;\n}\n.main-module_image-picker__edit-button__3O-iq {\n display: flex;\n align-items: center;\n gap: 4px;\n background-color: #ffffff;\n background-image: none;\n border: 1px solid #3c83ec;\n border-radius: 2px;\n padding: 0.5rem;\n color: #3c83ec;\n cursor: pointer;\n}\n.main-module_image-picker__edit-button__3O-iq svg {\n fill: #3c83ec;\n}\n.main-module_image-picker__edit-button__3O-iq:hover {\n border-color: #135cc8;\n color: #135cc8;\n}\n.main-module_image-picker__edit-button__3O-iq:hover svg {\n fill: #135cc8;\n}\n.main-module_image-picker__label__1i_Fq {\n cursor: pointer;\n}\n.main-module_image-picker__input__3Wu2I {\n display: none;\n}\n.main-module_image-picker__description__1v13N {\n padding: 2rem 0;\n text-align: center;\n color: #3c83ec;\n}\n.main-module_image-picker__supported-formats__1_R_X {\n font-size: 12px;\n color: #59687e;\n}\n.main-module_image-picker__upload-icon__3sMvN {\n width: 1rem;\n height: auto;\n margin-bottom: 1rem;\n fill: #abb4cd;\n}\n.main-module_image-picker__delete-button__21_kT {\n display: flex;\n align-items: center;\n font-size: 12px;\n color: #3c83ec;\n cursor: pointer;\n background: transparent;\n}\n.main-module_image-picker__delete-button__21_kT:hover .main-module_image-picker__delete-label__3v2ot {\n text-decoration: underline;\n}\n.main-module_image-picker__delete-button__21_kT .main-module_image-picker__delete-label__3v2ot {\n color: #3c83ec;\n}\n.main-module_image-picker__delete-button__21_kT svg {\n fill: #3c83ec;\n}\n.main-module_image-picker__wrong-file-format-icon__X-NL0 {\n margin: 2rem 0 0.5rem;\n fill: #ffffff;\n}\n.main-module_image-picker__delete-icon__30pkO {\n fill: #3c83ec;\n margin-right: 0.5rem;\n}\n.main-module_image-picker__selected-file__3bRqa {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 46px;\n}\n.main-module_image-picker__selected-file-name-wrapper__37MKd,\n.main-module_image-picker__selected-file-remove-wrapper__2v4W2 {\n padding: 1rem;\n}\n.main-module_image-picker__selected-file-remove-wrapper__2v4W2 {\n display: flex;\n justify-content: flex-end;\n}\n.main-module_image-picker__selected-file-name-wrapper__37MKd {\n color: #59687e;\n}\n.main-module_image-picker__image-preview-wrapper__1jPXU {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 130px;\n}\n.main-module_image-picker__image-preview-wrapper__1jPXU svg {\n fill: transparent;\n}\n.main-module_image-picker__image-preview__12pRu {\n max-width: 100%;\n max-height: 100%;\n}\n.main-module_image-picker__error-text__rXAvw {\n margin-top: 0.5rem;\n color: #e60c54;\n}\n.main-module_image-picker__loading-wrapper__gBtlh {\n position: relative;\n}\n.main-module_image-picker__loading-wrapper-content__21jzx {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background-color: #ffffff;\n width: 100%;\n height: 100%;\n border: 1px dashed #abb4cd;\n border-radius: 2px;\n}\n.main-module_image-picker__loading-wrapper-content-text__2-Fup {\n color: #5c657e;\n margin-top: 0.5rem;\n}\n";
|
|
8
8
|
var styles = {
|
|
9
9
|
"image-picker__wrapper": "main-module_image-picker__wrapper__2RK3f",
|
|
10
10
|
"image-picker__wrapper-error": "main-module_image-picker__wrapper-error__kCZeA",
|
|
@@ -45,9 +45,9 @@ var index$x = require('./components/tags_selector/index.js');
|
|
|
45
45
|
var index$y = require('./components/controls/hoc/control_tags_selector/index.js');
|
|
46
46
|
var index$g = require('./components/controls/hoc/control_textarea/index.js');
|
|
47
47
|
var index$F = require('./components/image_picker/index.js');
|
|
48
|
+
var index$L = require('./components/loader/index.js');
|
|
48
49
|
var use_modals_context = require('./components/modal_new/hooks/use_modals_context.js');
|
|
49
50
|
var modal = require('./components/modal_new/components/modal/modal.js');
|
|
50
|
-
var index$L = require('./components/loader/index.js');
|
|
51
51
|
var index$P = require('./components/xhr_image_picker/index.js');
|
|
52
52
|
var index$p = require('./components/controls/hoc/control_xhr_image_picker/index.js');
|
|
53
53
|
var index$z = require('./components/table/index.js');
|
|
@@ -143,9 +143,9 @@ exports.TagsSelector = index$x['default'];
|
|
|
143
143
|
exports.ControlTagsSelector = index$y['default'];
|
|
144
144
|
exports.ControlTextarea = index$g['default'];
|
|
145
145
|
exports.ImagePicker = index$F['default'];
|
|
146
|
+
exports.Loader = index$L['default'];
|
|
146
147
|
exports.useModalsContext = use_modals_context.useModalsContext;
|
|
147
148
|
exports.ModalNew = modal.ModalNew;
|
|
148
|
-
exports.Loader = index$L['default'];
|
|
149
149
|
exports.XhrImagePicker = index$P['default'];
|
|
150
150
|
exports.ControlXhrImagePicker = index$p['default'];
|
|
151
151
|
exports.Table = index$z['default'];
|
|
@@ -2,15 +2,16 @@ import React, { useRef, useState, useEffect } from 'react';
|
|
|
2
2
|
import { useTranslation } from '../../../../../external/react-i18next/dist/es/useTranslation.js';
|
|
3
3
|
import { slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
4
4
|
import { FILES_EXTENSIONS } from '../file_picker/constants.js';
|
|
5
|
+
import { FileUtils } from '@dreamcommerce/utilities';
|
|
5
6
|
import CSS_CLASSES from '../image_picker/css_classes.js';
|
|
6
7
|
import IconImage from '../../assets/icon_image.js';
|
|
7
8
|
import styles from '../../css/image_picker/main.module.less.js';
|
|
8
9
|
import ImagePicker from '../image_picker/index.js';
|
|
10
|
+
import Loader from '../loader/index.js';
|
|
9
11
|
import { useModalsContext } from '../modal_new/hooks/use_modals_context.js';
|
|
10
12
|
import { ModalNew } from '../modal_new/components/modal/modal.js';
|
|
11
13
|
import { REQUEST_TYPES } from '../../../../star_core/build/esm/packages/star_core/src/features/http_requester/http_requester_contants.js';
|
|
12
14
|
import { useHttpApi } from '../../hooks/use_http_api.js';
|
|
13
|
-
import Loader from '../loader/index.js';
|
|
14
15
|
|
|
15
16
|
var XhrImagePicker = function XhrImagePicker(_ref) {
|
|
16
17
|
var id = _ref.id,
|
|
@@ -65,6 +66,11 @@ var XhrImagePicker = function XhrImagePicker(_ref) {
|
|
|
65
66
|
isLoading = _useState10[0],
|
|
66
67
|
setIsLoading = _useState10[1];
|
|
67
68
|
|
|
69
|
+
var _useState11 = useState(),
|
|
70
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
71
|
+
imageExtenstion = _useState12[0],
|
|
72
|
+
setImageExtenstion = _useState12[1];
|
|
73
|
+
|
|
68
74
|
var handleControlChange = /*#__PURE__*/function () {
|
|
69
75
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
70
76
|
var fileList, fileAsDataUrl, _httpApi$fetch, response, cancelRequest, responseObject;
|
|
@@ -126,6 +132,7 @@ var XhrImagePicker = function XhrImagePicker(_ref) {
|
|
|
126
132
|
|
|
127
133
|
useEffect(function () {
|
|
128
134
|
initialImageFile.current = initialFile;
|
|
135
|
+
image && setImageExtenstion(FileUtils.getFileExtension(image === null || image === void 0 ? void 0 : image.name));
|
|
129
136
|
|
|
130
137
|
var setFileFromUrl = /*#__PURE__*/function () {
|
|
131
138
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(fileData) {
|
|
@@ -186,7 +193,7 @@ var XhrImagePicker = function XhrImagePicker(_ref) {
|
|
|
186
193
|
allowedExtensions: allowedExtensions,
|
|
187
194
|
initialFile: initialImageFile.current,
|
|
188
195
|
onImageSizeUpdated: onImageSizeUpdated,
|
|
189
|
-
topButtons: ImageEditor && /*#__PURE__*/React.createElement("button", {
|
|
196
|
+
topButtons: ImageEditor && imageExtenstion !== 'svg' && /*#__PURE__*/React.createElement("button", {
|
|
190
197
|
className: styles[CSS_CLASSES.imagePickerEditButton],
|
|
191
198
|
onClick: function onClick() {
|
|
192
199
|
return showModal(modalId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,iEAAqE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,iEAAqE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_image-picker__wrapper__2RK3f {\n position: relative;\n border: 1px dashed #abb4cd;\n border-radius: 2px;\n}\n.main-module_image-picker__wrapper-error__kCZeA {\n border-color: #e60c54;\n}\n.main-module_image-picker__wrapper-error__kCZeA:hover {\n border-color: #e60c54;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc {\n position: relative;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc .main-module_image-picker__label__1i_Fq {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 46px;\n left: 0;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc .main-module_image-picker__description__1v13N {\n display: none;\n}\n.main-module_image-picker__wrapper__2RK3f:hover {\n border-color: #135cc8;\n}\n.main-module_image-picker__wrapper__2RK3f:hover .main-module_image-picker__upload-icon__3sMvN {\n fill: #3c83ec;\n}\n.main-module_image-picker__wrapper-top-buttons__241RY {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n top: 1rem;\n right: 1rem;\n z-index: 10;\n}\n.main-module_image-picker__edit-button__3O-iq {\n display: flex;\n align-items: center;\n gap: 4px;\n background-color: #ffffff;\n background-image: none;\n border: 1px solid #3c83ec;\n border-radius: 2px;\n padding: 0.5rem;\n color: #3c83ec;\n cursor: pointer;\n}\n.main-module_image-picker__edit-button__3O-iq:hover {\n border-color: #135cc8;\n color: #135cc8;\n}\n.main-module_image-picker__edit-button__3O-iq:hover svg {\n fill: #135cc8;\n}\n.main-module_image-picker__label__1i_Fq {\n cursor: pointer;\n}\n.main-module_image-picker__input__3Wu2I {\n display: none;\n}\n.main-module_image-picker__description__1v13N {\n padding: 2rem 0;\n text-align: center;\n color: #3c83ec;\n}\n.main-module_image-picker__supported-formats__1_R_X {\n font-size: 12px;\n color: #59687e;\n}\n.main-module_image-picker__upload-icon__3sMvN {\n width: 1rem;\n height: auto;\n margin-bottom: 1rem;\n fill: #abb4cd;\n}\n.main-module_image-picker__delete-button__21_kT {\n display: flex;\n align-items: center;\n font-size: 12px;\n color: #3c83ec;\n cursor: pointer;\n background: transparent;\n}\n.main-module_image-picker__delete-button__21_kT:hover .main-module_image-picker__delete-label__3v2ot {\n text-decoration: underline;\n}\n.main-module_image-picker__delete-button__21_kT .main-module_image-picker__delete-label__3v2ot {\n color: #3c83ec;\n}\n.main-module_image-picker__delete-button__21_kT svg {\n fill: #3c83ec;\n}\n.main-module_image-picker__wrong-file-format-icon__X-NL0 {\n margin: 2rem 0 0.5rem;\n fill: #ffffff;\n}\n.main-module_image-picker__delete-icon__30pkO {\n fill: #3c83ec;\n margin-right: 0.5rem;\n}\n.main-module_image-picker__selected-file__3bRqa {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 46px;\n}\n.main-module_image-picker__selected-file-name-wrapper__37MKd,\n.main-module_image-picker__selected-file-remove-wrapper__2v4W2 {\n padding: 1rem;\n}\n.main-module_image-picker__selected-file-remove-wrapper__2v4W2 {\n display: flex;\n justify-content: flex-end;\n}\n.main-module_image-picker__selected-file-name-wrapper__37MKd {\n color: #59687e;\n}\n.main-module_image-picker__image-preview-wrapper__1jPXU {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 130px;\n}\n.main-module_image-picker__image-preview-wrapper__1jPXU svg {\n fill: transparent;\n}\n.main-module_image-picker__image-preview__12pRu {\n max-width: 100%;\n max-height: 100%;\n}\n.main-module_image-picker__error-text__rXAvw {\n margin-top: 0.5rem;\n color: #e60c54;\n}\n.main-module_image-picker__loading-wrapper__gBtlh {\n position: relative;\n}\n.main-module_image-picker__loading-wrapper-content__21jzx {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background-color: #ffffff;\n width: 100%;\n height: 100%;\n border: 1px dashed #abb4cd;\n border-radius: 2px;\n}\n.main-module_image-picker__loading-wrapper-content-text__2-Fup {\n color: #5c657e;\n margin-top: 0.5rem;\n}\n";
|
|
3
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_image-picker__wrapper__2RK3f {\n position: relative;\n border: 1px dashed #abb4cd;\n border-radius: 2px;\n}\n.main-module_image-picker__wrapper-error__kCZeA {\n border-color: #e60c54;\n}\n.main-module_image-picker__wrapper-error__kCZeA:hover {\n border-color: #e60c54;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc {\n position: relative;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc .main-module_image-picker__label__1i_Fq {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 46px;\n left: 0;\n}\n.main-module_image-picker__wrapper-has-file__2zmRc .main-module_image-picker__description__1v13N {\n display: none;\n}\n.main-module_image-picker__wrapper__2RK3f:hover {\n border-color: #135cc8;\n}\n.main-module_image-picker__wrapper__2RK3f:hover .main-module_image-picker__upload-icon__3sMvN {\n fill: #3c83ec;\n}\n.main-module_image-picker__wrapper-top-buttons__241RY {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n top: 1rem;\n right: 1rem;\n z-index: 10;\n}\n.main-module_image-picker__edit-button__3O-iq {\n display: flex;\n align-items: center;\n gap: 4px;\n background-color: #ffffff;\n background-image: none;\n border: 1px solid #3c83ec;\n border-radius: 2px;\n padding: 0.5rem;\n color: #3c83ec;\n cursor: pointer;\n}\n.main-module_image-picker__edit-button__3O-iq svg {\n fill: #3c83ec;\n}\n.main-module_image-picker__edit-button__3O-iq:hover {\n border-color: #135cc8;\n color: #135cc8;\n}\n.main-module_image-picker__edit-button__3O-iq:hover svg {\n fill: #135cc8;\n}\n.main-module_image-picker__label__1i_Fq {\n cursor: pointer;\n}\n.main-module_image-picker__input__3Wu2I {\n display: none;\n}\n.main-module_image-picker__description__1v13N {\n padding: 2rem 0;\n text-align: center;\n color: #3c83ec;\n}\n.main-module_image-picker__supported-formats__1_R_X {\n font-size: 12px;\n color: #59687e;\n}\n.main-module_image-picker__upload-icon__3sMvN {\n width: 1rem;\n height: auto;\n margin-bottom: 1rem;\n fill: #abb4cd;\n}\n.main-module_image-picker__delete-button__21_kT {\n display: flex;\n align-items: center;\n font-size: 12px;\n color: #3c83ec;\n cursor: pointer;\n background: transparent;\n}\n.main-module_image-picker__delete-button__21_kT:hover .main-module_image-picker__delete-label__3v2ot {\n text-decoration: underline;\n}\n.main-module_image-picker__delete-button__21_kT .main-module_image-picker__delete-label__3v2ot {\n color: #3c83ec;\n}\n.main-module_image-picker__delete-button__21_kT svg {\n fill: #3c83ec;\n}\n.main-module_image-picker__wrong-file-format-icon__X-NL0 {\n margin: 2rem 0 0.5rem;\n fill: #ffffff;\n}\n.main-module_image-picker__delete-icon__30pkO {\n fill: #3c83ec;\n margin-right: 0.5rem;\n}\n.main-module_image-picker__selected-file__3bRqa {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 46px;\n}\n.main-module_image-picker__selected-file-name-wrapper__37MKd,\n.main-module_image-picker__selected-file-remove-wrapper__2v4W2 {\n padding: 1rem;\n}\n.main-module_image-picker__selected-file-remove-wrapper__2v4W2 {\n display: flex;\n justify-content: flex-end;\n}\n.main-module_image-picker__selected-file-name-wrapper__37MKd {\n color: #59687e;\n}\n.main-module_image-picker__image-preview-wrapper__1jPXU {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 130px;\n}\n.main-module_image-picker__image-preview-wrapper__1jPXU svg {\n fill: transparent;\n}\n.main-module_image-picker__image-preview__12pRu {\n max-width: 100%;\n max-height: 100%;\n}\n.main-module_image-picker__error-text__rXAvw {\n margin-top: 0.5rem;\n color: #e60c54;\n}\n.main-module_image-picker__loading-wrapper__gBtlh {\n position: relative;\n}\n.main-module_image-picker__loading-wrapper-content__21jzx {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background-color: #ffffff;\n width: 100%;\n height: 100%;\n border: 1px dashed #abb4cd;\n border-radius: 2px;\n}\n.main-module_image-picker__loading-wrapper-content-text__2-Fup {\n color: #5c657e;\n margin-top: 0.5rem;\n}\n";
|
|
4
4
|
var styles = {
|
|
5
5
|
"image-picker__wrapper": "main-module_image-picker__wrapper__2RK3f",
|
|
6
6
|
"image-picker__wrapper-error": "main-module_image-picker__wrapper-error__kCZeA",
|
|
@@ -41,9 +41,9 @@ export { default as TagsSelector } from './components/tags_selector/index.js';
|
|
|
41
41
|
export { default as ControlTagsSelector } from './components/controls/hoc/control_tags_selector/index.js';
|
|
42
42
|
export { default as ControlTextarea } from './components/controls/hoc/control_textarea/index.js';
|
|
43
43
|
export { default as ImagePicker } from './components/image_picker/index.js';
|
|
44
|
+
export { default as Loader } from './components/loader/index.js';
|
|
44
45
|
export { useModalsContext } from './components/modal_new/hooks/use_modals_context.js';
|
|
45
46
|
export { ModalNew } from './components/modal_new/components/modal/modal.js';
|
|
46
|
-
export { default as Loader } from './components/loader/index.js';
|
|
47
47
|
export { default as XhrImagePicker } from './components/xhr_image_picker/index.js';
|
|
48
48
|
export { default as ControlXhrImagePicker } from './components/controls/hoc/control_xhr_image_picker/index.js';
|
|
49
49
|
export { default as Table } from './components/table/index.js';
|