@fonixtree/magic-design 2.0.13 → 2.0.15
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/assets/fonts/.DS_Store +0 -0
- package/es/assets/fonts/magic-box-iconfont.css +23 -3
- package/es/assets/fonts/magic-box-iconfont.css.bak +23 -3
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/layout-icon/locationLayout.png +0 -0
- package/es/common/ColorPicker/index.js +4 -1
- package/es/common/ImagePicker/index.js +3 -1
- package/es/composite-comp/bol/components/Location/defaultJSON.js +54 -0
- package/es/composite-comp/bol/components/Location/index.js +138 -0
- package/es/composite-comp/bol/config-panels/LocationConfig/MyEditor/index.js +42 -0
- package/es/composite-comp/bol/config-panels/LocationConfig/index.js +122 -0
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +8 -0
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +66 -7
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +96 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +26 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +95 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +93 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +26 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +29 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +49 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +29 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +26 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +27 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +31 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +34 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +41 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +129 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +25 -0
- package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +1 -0
- package/es/core/Designer/TextEditModal/ToolBar/index.js +209 -0
- package/es/core/Designer/TextEditModal/ToolBar/index.less +19 -0
- package/es/core/Designer/TextEditModal/index.js +100 -0
- package/es/core/Designer/TextEditModal/index.less +4 -0
- package/es/core/Designer/TextEditModal_old/index.js +142 -0
- package/es/core/Designer/TextEditModal_old/index.less +25 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.js +96 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +95 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.js +93 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/BoldSVG.js +29 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/FontColorSVG.js +49 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/ItalicSVG.js +29 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/LinkSVG.js +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/OrderSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/StrikeSVG.js +31 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/UnderlineSVG.js +34 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/UnorderSVG.js +41 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/index.js +129 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/index.less +25 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/type.js +1 -0
- package/es/core/Designer/ToolBarModal/index.js +281 -0
- package/es/core/Designer/ToolBarModal/index.less +32 -0
- package/es/core/Designer/index.js +28 -6
- package/es/locale/en/en.json +2 -0
- package/es/locale/es/es.json +2 -0
- package/es/locale/id/id.json +2 -0
- package/es/meta-comp/components/Text/index.js +101 -386
- package/es/meta-comp/components/Text/index.less +57 -0
- package/es/meta-comp/config-panels/TextConfig/TextEditModal/index.js +100 -0
- package/es/meta-comp/config-panels/TextConfig/TextEditModal/index.less +25 -0
- package/es/meta-comp/config-panels/TextConfig/index.less +19 -0
- package/es/mobx/Frame.js +7 -1
- package/es/utils/commonUtil.js +18 -4
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +23 -3
- package/lib/assets/fonts/magic-box-iconfont.css.bak +23 -3
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/layout-icon/locationLayout.png +0 -0
- package/lib/common/ColorPicker/index.js +4 -1
- package/lib/common/ImagePicker/index.js +3 -1
- package/lib/composite-comp/bol/components/Location/defaultJSON.js +54 -0
- package/lib/composite-comp/bol/components/Location/index.js +138 -0
- package/lib/composite-comp/bol/config-panels/LocationConfig/MyEditor/index.js +42 -0
- package/lib/composite-comp/bol/config-panels/LocationConfig/index.js +122 -0
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +8 -0
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +66 -7
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +96 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +26 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +95 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +93 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +26 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +29 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +49 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +29 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +26 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +27 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +31 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +34 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +41 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +129 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +25 -0
- package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +1 -0
- package/lib/core/Designer/TextEditModal/ToolBar/index.js +209 -0
- package/lib/core/Designer/TextEditModal/ToolBar/index.less +19 -0
- package/lib/core/Designer/TextEditModal/index.js +100 -0
- package/lib/core/Designer/TextEditModal/index.less +4 -0
- package/lib/core/Designer/TextEditModal_old/index.js +142 -0
- package/lib/core/Designer/TextEditModal_old/index.less +25 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.js +96 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +95 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.js +93 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/BoldSVG.js +29 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/FontColorSVG.js +49 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/ItalicSVG.js +29 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/LinkSVG.js +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/OrderSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/StrikeSVG.js +31 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/UnderlineSVG.js +34 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/UnorderSVG.js +41 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.js +129 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.less +25 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/type.js +1 -0
- package/lib/core/Designer/ToolBarModal/index.js +281 -0
- package/lib/core/Designer/ToolBarModal/index.less +32 -0
- package/lib/core/Designer/index.js +28 -6
- package/lib/locale/en/en.json +2 -0
- package/lib/locale/es/es.json +2 -0
- package/lib/locale/id/id.json +2 -0
- package/lib/meta-comp/components/Text/index.js +101 -386
- package/lib/meta-comp/components/Text/index.less +57 -0
- package/lib/meta-comp/config-panels/TextConfig/TextEditModal/index.js +100 -0
- package/lib/meta-comp/config-panels/TextConfig/TextEditModal/index.less +25 -0
- package/lib/meta-comp/config-panels/TextConfig/index.less +19 -0
- package/lib/mobx/Frame.js +7 -1
- package/lib/utils/commonUtil.js +18 -4
- package/package.json +3 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
11
|
+
return {
|
|
12
|
+
id: (0, _uuid.v4)(),
|
|
13
|
+
type: 'LOCATION',
|
|
14
|
+
content: {
|
|
15
|
+
logo: {
|
|
16
|
+
open: true,
|
|
17
|
+
color: '#fff'
|
|
18
|
+
},
|
|
19
|
+
address: {
|
|
20
|
+
open: true
|
|
21
|
+
},
|
|
22
|
+
icon: {
|
|
23
|
+
open: true,
|
|
24
|
+
color: '#fff'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
spacing: {
|
|
28
|
+
pc: {
|
|
29
|
+
paddingTop: 10,
|
|
30
|
+
paddingBottom: 10,
|
|
31
|
+
marginBottom: 0
|
|
32
|
+
},
|
|
33
|
+
mobile: {
|
|
34
|
+
paddingTop: 10,
|
|
35
|
+
paddingBottom: 10,
|
|
36
|
+
marginBottom: 0
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
customize: {
|
|
40
|
+
layout: {
|
|
41
|
+
pcLayout: 'top',
|
|
42
|
+
h5Layout: 'top'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
background: {
|
|
46
|
+
opacity: 100,
|
|
47
|
+
color: '#fff',
|
|
48
|
+
image: '',
|
|
49
|
+
bgType: 'color'
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _defaultJSON = require("./defaultJSON");
|
|
11
|
+
|
|
12
|
+
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
13
|
+
|
|
14
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
51
|
+
var c = arguments.length,
|
|
52
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
53
|
+
d;
|
|
54
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
55
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
56
|
+
}
|
|
57
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var CustomCode =
|
|
61
|
+
/** @class */
|
|
62
|
+
function (_super) {
|
|
63
|
+
__extends(CustomCode, _super);
|
|
64
|
+
|
|
65
|
+
function CustomCode() {
|
|
66
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
|
|
68
|
+
_this.htmlTemp = ''; // createHtml = () => {
|
|
69
|
+
// const { nodeData } = this.props;
|
|
70
|
+
// const htmlCode = window.magicDesign.device === 'pc' ? nodeData.content.pcHtml : nodeData.content.h5Html;
|
|
71
|
+
// this.htmlTemp = htmlCode;
|
|
72
|
+
// if (document.getElementById('custom-wrap')) {
|
|
73
|
+
// document.getElementById('custom-wrap').innerHTML = htmlCode;
|
|
74
|
+
// }
|
|
75
|
+
// }
|
|
76
|
+
|
|
77
|
+
_this.handleClick = function (e) {
|
|
78
|
+
console.log(e.target.getAttribute('href'));
|
|
79
|
+
(0, _coreUtil.clickUrl)(e.target.getAttribute('href'));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
return _this;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
CustomCode.prototype.componentDidMount = function () {
|
|
86
|
+
var _this = this;
|
|
87
|
+
|
|
88
|
+
var aElements = document.querySelectorAll('#custom-wrap a');
|
|
89
|
+
aElements.forEach(function (element) {
|
|
90
|
+
element.addEventListener('click', _this.handleClick);
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
CustomCode.prototype.componentWillUnmount = function () {
|
|
95
|
+
var _this = this;
|
|
96
|
+
|
|
97
|
+
var aElements = document.querySelectorAll('#custom-wrap a');
|
|
98
|
+
aElements.forEach(function (element) {
|
|
99
|
+
element.removeEventListener('click', _this.handleClick);
|
|
100
|
+
});
|
|
101
|
+
}; // componentWillReceiveProps(prevProps) {
|
|
102
|
+
// console.log('111111');
|
|
103
|
+
// if (window.magicDesign.device === 'pc') {
|
|
104
|
+
// console.log('22222222');
|
|
105
|
+
// if (prevProps.nodeData.content.pcHtml != this.props.nodeData.content.pcHtml) {
|
|
106
|
+
// console.log('4444444');
|
|
107
|
+
// this.createHtml();
|
|
108
|
+
// }
|
|
109
|
+
// } else {
|
|
110
|
+
// console.log('3333333333', this.htmlTemp, this.props.nodeData.content);
|
|
111
|
+
// if (this.htmlTemp != this.props.nodeData.content.h5Html) {
|
|
112
|
+
// console.log('5555555');
|
|
113
|
+
// this.createHtml();
|
|
114
|
+
// }
|
|
115
|
+
// }
|
|
116
|
+
// }
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
CustomCode.prototype.render = function () {
|
|
120
|
+
var nodeData = this.props.nodeData;
|
|
121
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
|
+
id: "custom-wrap"
|
|
123
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
|
+
dangerouslySetInnerHTML: {
|
|
125
|
+
__html: window.magicDesign.device === 'pc' ? nodeData.content.pcHtml : nodeData.content.h5Html
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
CustomCode.defaultProps = {};
|
|
131
|
+
CustomCode.type = 'LOCATION';
|
|
132
|
+
CustomCode.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
133
|
+
CustomCode = __decorate([_compositeDecorator["default"]], CustomCode);
|
|
134
|
+
return CustomCode;
|
|
135
|
+
}(_react.Component);
|
|
136
|
+
|
|
137
|
+
var _default = CustomCode;
|
|
138
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactAce = _interopRequireDefault(require("react-ace"));
|
|
11
|
+
|
|
12
|
+
require("ace-builds/src-noconflict/mode-html");
|
|
13
|
+
|
|
14
|
+
require("ace-builds/src-noconflict/mode-javascript");
|
|
15
|
+
|
|
16
|
+
require("ace-builds/src-noconflict/theme-github");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
// 可选的主题样式
|
|
21
|
+
var MyEditor = function MyEditor(props) {
|
|
22
|
+
var value = props.value,
|
|
23
|
+
changeVal = props.changeVal,
|
|
24
|
+
blurArea = props.blurArea;
|
|
25
|
+
return /*#__PURE__*/_react["default"].createElement(_reactAce["default"], {
|
|
26
|
+
editorProps: {
|
|
27
|
+
$blockScrolling: true
|
|
28
|
+
},
|
|
29
|
+
mode: "html",
|
|
30
|
+
name: "editor",
|
|
31
|
+
onBlur: blurArea,
|
|
32
|
+
onChange: changeVal,
|
|
33
|
+
style: {
|
|
34
|
+
width: '100%'
|
|
35
|
+
},
|
|
36
|
+
theme: "github",
|
|
37
|
+
value: value
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var _default = MyEditor;
|
|
42
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _MyEditor = _interopRequireDefault(require("./MyEditor"));
|
|
11
|
+
|
|
12
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
13
|
+
|
|
14
|
+
var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
|
|
15
|
+
|
|
16
|
+
var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
|
|
17
|
+
|
|
18
|
+
var _locale = require("../../../../locale");
|
|
19
|
+
|
|
20
|
+
var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/BaseConfig"));
|
|
21
|
+
|
|
22
|
+
var _layout = require("../../../../constants/layout");
|
|
23
|
+
|
|
24
|
+
var _CustomizeConfig = _interopRequireDefault(require("../../../common/config-panels/CustomizeConfig"));
|
|
25
|
+
|
|
26
|
+
var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
|
+
|
|
30
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
31
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
32
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
33
|
+
__proto__: []
|
|
34
|
+
} instanceof Array && function (d, b) {
|
|
35
|
+
d.__proto__ = b;
|
|
36
|
+
} || function (d, b) {
|
|
37
|
+
for (var p in b) {
|
|
38
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return _extendStatics(d, b);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return function (d, b) {
|
|
46
|
+
_extendStatics(d, b);
|
|
47
|
+
|
|
48
|
+
function __() {
|
|
49
|
+
this.constructor = d;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
53
|
+
};
|
|
54
|
+
}();
|
|
55
|
+
|
|
56
|
+
var CustomCodeConfig =
|
|
57
|
+
/** @class */
|
|
58
|
+
function (_super) {
|
|
59
|
+
__extends(CustomCodeConfig, _super);
|
|
60
|
+
|
|
61
|
+
function CustomCodeConfig() {
|
|
62
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63
|
+
|
|
64
|
+
_this.changeVal = function (v) {
|
|
65
|
+
var data = _this.props.data;
|
|
66
|
+
|
|
67
|
+
if ((0, _coreUtil.isPc)()) {
|
|
68
|
+
data.content.pcHtml = v;
|
|
69
|
+
} else {
|
|
70
|
+
data.content.h5Html = v;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
_this.blurArea = function () {
|
|
75
|
+
_this.selfRender();
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
return _this;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
CustomCodeConfig.prototype.render = function () {
|
|
82
|
+
var data = this.props.data;
|
|
83
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
84
|
+
divider: "bold",
|
|
85
|
+
headerSize: "large",
|
|
86
|
+
source: [{
|
|
87
|
+
key: 'content',
|
|
88
|
+
name: (0, _locale.i18n)('CONTENT'),
|
|
89
|
+
value: /*#__PURE__*/_react["default"].createElement(_MyEditor["default"], {
|
|
90
|
+
blurArea: this.blurArea,
|
|
91
|
+
changeVal: this.changeVal,
|
|
92
|
+
value: (0, _coreUtil.isPc)() ? data.content.pcHtml : data.content.h5Html
|
|
93
|
+
})
|
|
94
|
+
}, {
|
|
95
|
+
key: 'spacing',
|
|
96
|
+
name: (0, _locale.i18n)('SPACING'),
|
|
97
|
+
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
98
|
+
data: data.spacing
|
|
99
|
+
})
|
|
100
|
+
}, {
|
|
101
|
+
key: 'customize',
|
|
102
|
+
name: (0, _locale.i18n)('CUSTOMIZE'),
|
|
103
|
+
value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
|
|
104
|
+
data: data.customize,
|
|
105
|
+
layoutSource: _layout.locationLayout
|
|
106
|
+
})
|
|
107
|
+
}, {
|
|
108
|
+
key: 'background',
|
|
109
|
+
name: (0, _locale.i18n)('BACKGROUND'),
|
|
110
|
+
value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
|
|
111
|
+
data: data.background
|
|
112
|
+
})
|
|
113
|
+
}],
|
|
114
|
+
type: "triangle"
|
|
115
|
+
}));
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return CustomCodeConfig;
|
|
119
|
+
}(_BaseConfig["default"]);
|
|
120
|
+
|
|
121
|
+
var _default = CustomCodeConfig;
|
|
122
|
+
exports["default"] = _default;
|
|
@@ -197,7 +197,47 @@ function (_super) {
|
|
|
197
197
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
198
198
|
|
|
199
199
|
_this.state = {
|
|
200
|
-
messageNum: ''
|
|
200
|
+
messageNum: '',
|
|
201
|
+
cartNum: ''
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
_this.getCartNum = function () {
|
|
205
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
206
|
+
var num;
|
|
207
|
+
return __generator(this, function (_a) {
|
|
208
|
+
switch (_a.label) {
|
|
209
|
+
case 0:
|
|
210
|
+
num = '';
|
|
211
|
+
if (!(localStorage.getItem('isLogin') === 'Y')) return [3
|
|
212
|
+
/*break*/
|
|
213
|
+
, 2];
|
|
214
|
+
return [4
|
|
215
|
+
/*yield*/
|
|
216
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/carts/num', {}, 'GET')];
|
|
217
|
+
|
|
218
|
+
case 1:
|
|
219
|
+
num = _a.sent();
|
|
220
|
+
return [3
|
|
221
|
+
/*break*/
|
|
222
|
+
, 3];
|
|
223
|
+
|
|
224
|
+
case 2:
|
|
225
|
+
num = (localStorage.getItem('TEMP_CART') || []).length;
|
|
226
|
+
_a.label = 3;
|
|
227
|
+
|
|
228
|
+
case 3:
|
|
229
|
+
if (num > 0) {
|
|
230
|
+
this.setState({
|
|
231
|
+
cartNum: num
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return [2
|
|
236
|
+
/*return*/
|
|
237
|
+
];
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
});
|
|
201
241
|
};
|
|
202
242
|
|
|
203
243
|
_this.getMessageNum = function () {
|
|
@@ -228,14 +268,19 @@ function (_super) {
|
|
|
228
268
|
}
|
|
229
269
|
|
|
230
270
|
SearchMobile.prototype.componentDidMount = function () {
|
|
271
|
+
// const { data } = this.props;
|
|
272
|
+
// console.log('---mobile ', data);
|
|
231
273
|
this.getMessageNum();
|
|
274
|
+
this.getCartNum();
|
|
232
275
|
};
|
|
233
276
|
|
|
234
277
|
SearchMobile.prototype.render = function () {
|
|
235
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
278
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
236
279
|
|
|
237
280
|
var data = this.props.data;
|
|
238
|
-
var
|
|
281
|
+
var _q = this.state,
|
|
282
|
+
messageNum = _q.messageNum,
|
|
283
|
+
cartNum = _q.cartNum; // let styleWrap = {};
|
|
239
284
|
// if (data.content.background.bgType === 'color') {
|
|
240
285
|
// styleWrap = {
|
|
241
286
|
// backgroundColor: data.content.background.color,
|
|
@@ -269,10 +314,24 @@ function (_super) {
|
|
|
269
314
|
display: 'flex'
|
|
270
315
|
},
|
|
271
316
|
type: "icon-search2"
|
|
272
|
-
})), data.content && ((_f = data.content.icon) === null || _f === void 0 ? void 0 : _f.
|
|
317
|
+
})), data.content && ((_g = (_f = data.content.icon) === null || _f === void 0 ? void 0 : _f.cartIcon) === null || _g === void 0 ? void 0 : _g.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
318
|
+
className: "message-wrap"
|
|
319
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
320
|
+
color: (_j = (_h = data.content.icon) === null || _h === void 0 ? void 0 : _h.color) === null || _j === void 0 ? void 0 : _j.mobile,
|
|
321
|
+
onClick: function onClick() {
|
|
322
|
+
return (0, _coreUtil.clickUrl)('/main/cart');
|
|
323
|
+
},
|
|
324
|
+
size: (0, _commonUtil.convertToRem)(24),
|
|
325
|
+
style: {
|
|
326
|
+
display: 'flex'
|
|
327
|
+
},
|
|
328
|
+
type: "icon-ShoppingCartSimple1"
|
|
329
|
+
}), !!cartNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
330
|
+
className: "num"
|
|
331
|
+
}, cartNum)), data.content && ((_l = (_k = data.content.icon) === null || _k === void 0 ? void 0 : _k.messageIcon) === null || _l === void 0 ? void 0 : _l.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
273
332
|
className: "message-wrap"
|
|
274
333
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
275
|
-
color: (
|
|
334
|
+
color: (_o = (_m = data.content.icon) === null || _m === void 0 ? void 0 : _m.color) === null || _o === void 0 ? void 0 : _o.mobile,
|
|
276
335
|
onClick: function onClick() {
|
|
277
336
|
return (0, _coreUtil.clickUrl)('/message-center');
|
|
278
337
|
},
|
|
@@ -280,10 +339,10 @@ function (_super) {
|
|
|
280
339
|
style: {
|
|
281
340
|
display: 'flex'
|
|
282
341
|
},
|
|
283
|
-
type: "icon-
|
|
342
|
+
type: "icon-message"
|
|
284
343
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
285
344
|
className: "num"
|
|
286
|
-
}, messageNum))), data.content && ((
|
|
345
|
+
}, messageNum))), data.content && ((_p = data.content.logo) === null || _p === void 0 ? void 0 : _p.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
287
346
|
className: "logo"
|
|
288
347
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
289
348
|
data: data.content.logo,
|
|
@@ -117,7 +117,7 @@ function (_super) {
|
|
|
117
117
|
display: 'flex'
|
|
118
118
|
},
|
|
119
119
|
type: "icon-search2"
|
|
120
|
-
}))), data.content && data.content.icon.
|
|
120
|
+
}))), data.content && data.content.icon.cartIcon.pc && /*#__PURE__*/_react["default"].createElement("div", {
|
|
121
121
|
className: "shopping-wrap",
|
|
122
122
|
onClick: function onClick() {
|
|
123
123
|
return (0, _coreUtil.clickUrl)('/main/cart');
|
|
@@ -129,7 +129,7 @@ function (_super) {
|
|
|
129
129
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
130
130
|
color: data.content.icon.color.pc,
|
|
131
131
|
size: 16,
|
|
132
|
-
type: "icon-
|
|
132
|
+
type: "icon-ShoppingCartSimple1"
|
|
133
133
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
134
134
|
className: "shopping-txt"
|
|
135
135
|
}, (0, _locale.i18n)('SHOPPING_CART')))), data.content && data.content.logo.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js
CHANGED
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
|
|
12
14
|
var _common = require("../../../../../common");
|
|
13
15
|
|
|
14
16
|
var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ImageConfig"));
|
|
@@ -102,14 +104,14 @@ function (_super) {
|
|
|
102
104
|
metaOption: panelProps.box,
|
|
103
105
|
toggleType: 'switch'
|
|
104
106
|
}, {
|
|
105
|
-
key:
|
|
107
|
+
key: panelProps.icon.id,
|
|
106
108
|
name: (0, _locale.i18n)('ICON'),
|
|
107
|
-
|
|
109
|
+
toggleType: 'triangle',
|
|
110
|
+
value: /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
111
|
style: {
|
|
109
|
-
marginTop:
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
112
|
+
marginTop: 10
|
|
113
|
+
}
|
|
114
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
113
115
|
colorType: "rgba",
|
|
114
116
|
onChange: function onChange(v) {
|
|
115
117
|
if ((0, _coreUtil.isPc)()) {
|
|
@@ -121,9 +123,37 @@ function (_super) {
|
|
|
121
123
|
_this.selfRender();
|
|
122
124
|
},
|
|
123
125
|
value: (0, _coreUtil.isPc)() ? panelProps.icon.color.pc : panelProps.icon.color.mobile
|
|
124
|
-
})),
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
127
|
+
style: {
|
|
128
|
+
background: '#F5F6F7',
|
|
129
|
+
padding: '14px 12px 1px'
|
|
130
|
+
}
|
|
131
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
132
|
+
layout: "horizontal",
|
|
133
|
+
title: (0, _locale.i18n)('CART_ICON')
|
|
134
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Checkbox, {
|
|
135
|
+
checked: (0, _coreUtil.isPc)() ? panelProps.icon.cartIcon.pc : panelProps.icon.cartIcon.mobile,
|
|
136
|
+
onChange: function onChange(e) {
|
|
137
|
+
if ((0, _coreUtil.isPc)()) {
|
|
138
|
+
panelProps.icon.cartIcon.pc = e.target.checked;
|
|
139
|
+
} else {
|
|
140
|
+
panelProps.icon.cartIcon.mobile = e.target.checked;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
_this.selfRender();
|
|
144
|
+
}
|
|
145
|
+
})), !(0, _coreUtil.isPc)() && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
146
|
+
layout: "horizontal",
|
|
147
|
+
title: (0, _locale.i18n)('MESSAGE_ICON')
|
|
148
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Checkbox, {
|
|
149
|
+
checked: panelProps.icon.messageIcon.mobile,
|
|
150
|
+
onChange: function onChange(e) {
|
|
151
|
+
panelProps.icon.messageIcon.mobile = e.target.checked;
|
|
152
|
+
|
|
153
|
+
_this.selfRender();
|
|
154
|
+
}
|
|
155
|
+
})))),
|
|
156
|
+
metaOption: panelProps.icon
|
|
127
157
|
}];
|
|
128
158
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
129
159
|
headerSize: "middle",
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _AlignLeftSVG = _interopRequireDefault(require("../images/AlignLeftSVG"));
|
|
13
|
+
|
|
14
|
+
var _AlignCenterSVG = _interopRequireDefault(require("../images/AlignCenterSVG"));
|
|
15
|
+
|
|
16
|
+
var _AlignRightSVG = _interopRequireDefault(require("../images/AlignRightSVG"));
|
|
17
|
+
|
|
18
|
+
require("./index.less");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
23
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
24
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
25
|
+
__proto__: []
|
|
26
|
+
} instanceof Array && function (d, b) {
|
|
27
|
+
d.__proto__ = b;
|
|
28
|
+
} || function (d, b) {
|
|
29
|
+
for (var p in b) {
|
|
30
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return _extendStatics(d, b);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return function (d, b) {
|
|
38
|
+
_extendStatics(d, b);
|
|
39
|
+
|
|
40
|
+
function __() {
|
|
41
|
+
this.constructor = d;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
45
|
+
};
|
|
46
|
+
}();
|
|
47
|
+
|
|
48
|
+
var AlignSelectPicker =
|
|
49
|
+
/** @class */
|
|
50
|
+
function (_super) {
|
|
51
|
+
__extends(AlignSelectPicker, _super);
|
|
52
|
+
|
|
53
|
+
function AlignSelectPicker() {
|
|
54
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
AlignSelectPicker.prototype.render = function () {
|
|
58
|
+
var _a = this.props,
|
|
59
|
+
visibility = _a.visibility,
|
|
60
|
+
value = _a.value,
|
|
61
|
+
_onChange = _a.onChange;
|
|
62
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
|
+
className: "align-select-picker-panel"
|
|
64
|
+
}, visibility && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
|
+
className: "panel-bg"
|
|
66
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
67
|
+
className: "select-modal-content"
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
69
|
+
className: (0, _classnames["default"])('select-item', {
|
|
70
|
+
active: value == 'left'
|
|
71
|
+
})
|
|
72
|
+
}, /*#__PURE__*/_react["default"].createElement(_AlignLeftSVG["default"], {
|
|
73
|
+
onChange: function onChange() {
|
|
74
|
+
return _onChange('');
|
|
75
|
+
}
|
|
76
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
77
|
+
className: (0, _classnames["default"])('select-item', {
|
|
78
|
+
active: value == 'center'
|
|
79
|
+
})
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement(_AlignCenterSVG["default"], {
|
|
81
|
+
onChange: function onChange() {
|
|
82
|
+
return _onChange('center');
|
|
83
|
+
}
|
|
84
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
|
+
className: (0, _classnames["default"])('select-item', {
|
|
86
|
+
active: value == 'right'
|
|
87
|
+
})
|
|
88
|
+
}, /*#__PURE__*/_react["default"].createElement(_AlignRightSVG["default"], {
|
|
89
|
+
onChange: function onChange() {
|
|
90
|
+
return _onChange('right');
|
|
91
|
+
}
|
|
92
|
+
})))));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
return AlignSelectPicker;
|
|
96
|
+
}(_react["default"].Component);
|
|
97
|
+
|
|
98
|
+
var _default = AlignSelectPicker;
|
|
99
|
+
exports["default"] = _default;
|