@fonixtree/magic-design 2.0.82 → 2.0.84
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 +30 -6
- package/es/assets/fonts/magic-box-iconfont.js +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/common/GroupList/index.js +5 -2
- package/es/common/ProductModal/SortableImageList/index.js +118 -0
- package/es/common/ProductModal/SortableImageList/index.less +3 -0
- package/es/common/ProductModal/index.js +40 -27
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
- package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +88 -0
- package/es/composite-comp/dito/components/CommonFunctions/index.js +84 -0
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +105 -0
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
- package/es/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
- package/es/composite-comp/dito/components/Orders/index.js +84 -0
- package/es/composite-comp/dito/components/Orders/mobile/index.js +336 -0
- package/es/composite-comp/dito/components/Orders/mobile/index.less +86 -0
- package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
- package/es/composite-comp/dito/components/PersonalInformation/index.js +84 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +451 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +127 -0
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
- package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +128 -0
- package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
- package/es/constants/component-types.js +21 -3
- package/es/constants/index.js +37 -3
- package/es/core/Designer/ConfigPanel/index.js +6 -0
- package/es/decorator/compositeDecorator.js +1 -1
- package/es/locale/en/en.json +14 -0
- package/es/locale/es/es.json +14 -0
- package/es/locale/id/id.json +14 -0
- package/es/mobx/UserState.js +144 -0
- package/es/mobx/index.js +9 -3
- package/es/utils/androidUtil.js +13 -2
- package/es/utils/commonUtil.js +117 -3
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +30 -6
- package/lib/assets/fonts/magic-box-iconfont.js +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/common/GroupList/index.js +5 -2
- package/lib/common/ProductModal/SortableImageList/index.js +118 -0
- package/lib/common/ProductModal/SortableImageList/index.less +3 -0
- package/lib/common/ProductModal/index.js +40 -27
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
- package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +88 -0
- package/lib/composite-comp/dito/components/CommonFunctions/index.js +84 -0
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +105 -0
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
- package/lib/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
- package/lib/composite-comp/dito/components/Orders/index.js +84 -0
- package/lib/composite-comp/dito/components/Orders/mobile/index.js +336 -0
- package/lib/composite-comp/dito/components/Orders/mobile/index.less +86 -0
- package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
- package/lib/composite-comp/dito/components/PersonalInformation/index.js +84 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +451 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +127 -0
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
- package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +128 -0
- package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
- package/lib/constants/component-types.js +21 -3
- package/lib/constants/index.js +37 -3
- package/lib/core/Designer/ConfigPanel/index.js +6 -0
- package/lib/decorator/compositeDecorator.js +1 -1
- package/lib/locale/en/en.json +14 -0
- package/lib/locale/es/es.json +14 -0
- package/lib/locale/id/id.json +14 -0
- package/lib/mobx/UserState.js +144 -0
- package/lib/mobx/index.js +9 -3
- package/lib/utils/androidUtil.js +13 -2
- package/lib/utils/commonUtil.js +117 -3
- package/package.json +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
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 _ConfigGroup = _interopRequireDefault(require("./ConfigGroup"));
|
|
11
|
+
|
|
12
|
+
var _locale = require("../../../../locale");
|
|
13
|
+
|
|
14
|
+
var _common = require("../../../../common");
|
|
15
|
+
|
|
16
|
+
var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
|
|
17
|
+
|
|
18
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
19
|
+
|
|
20
|
+
var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": 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 CommonFunctionsConfig =
|
|
51
|
+
/** @class */
|
|
52
|
+
function (_super) {
|
|
53
|
+
__extends(CommonFunctionsConfig, _super);
|
|
54
|
+
|
|
55
|
+
function CommonFunctionsConfig() {
|
|
56
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
57
|
+
|
|
58
|
+
_this.getContentPanel = function () {
|
|
59
|
+
var data = _this.props.data;
|
|
60
|
+
var source = [{
|
|
61
|
+
key: 1,
|
|
62
|
+
name: (0, _locale.i18n)('LOGIN_OR_REGISTER'),
|
|
63
|
+
metaOption: data.login
|
|
64
|
+
}];
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
66
|
+
headerSize: "middle",
|
|
67
|
+
onRefresh: function onRefresh() {
|
|
68
|
+
return (0, _coreUtil.renderPreview)();
|
|
69
|
+
},
|
|
70
|
+
source: source,
|
|
71
|
+
type: "switch"
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
CommonFunctionsConfig.prototype.render = function () {
|
|
79
|
+
var data = this.props.data;
|
|
80
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
81
|
+
divider: "bold",
|
|
82
|
+
headerSize: "large",
|
|
83
|
+
source: [{
|
|
84
|
+
key: 'CommonFunctions1',
|
|
85
|
+
name: (0, _locale.i18n)('Content'),
|
|
86
|
+
value: /*#__PURE__*/_react["default"].createElement(_ConfigGroup["default"], {
|
|
87
|
+
source: data.groupSource
|
|
88
|
+
}),
|
|
89
|
+
metaOption: data.groupSource
|
|
90
|
+
}, {
|
|
91
|
+
key: 'CommonFunctions2',
|
|
92
|
+
name: (0, _locale.i18n)('SPACING'),
|
|
93
|
+
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
94
|
+
data: data.spacing
|
|
95
|
+
})
|
|
96
|
+
}, {
|
|
97
|
+
key: 'CommonFunctions3',
|
|
98
|
+
name: (0, _locale.i18n)('BACKGROUND'),
|
|
99
|
+
value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
|
|
100
|
+
data: data.background
|
|
101
|
+
})
|
|
102
|
+
}]
|
|
103
|
+
}));
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
CommonFunctionsConfig.defaultProps = {
|
|
107
|
+
data: {}
|
|
108
|
+
};
|
|
109
|
+
return CommonFunctionsConfig;
|
|
110
|
+
}(_react["default"].Component);
|
|
111
|
+
|
|
112
|
+
var _default = CommonFunctionsConfig;
|
|
113
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,128 @@
|
|
|
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 _mobxReact = require("mobx-react");
|
|
11
|
+
|
|
12
|
+
var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
|
|
13
|
+
|
|
14
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
15
|
+
|
|
16
|
+
var _Button = _interopRequireDefault(require("../../../../../common/Button"));
|
|
17
|
+
|
|
18
|
+
var _defaultJSON = require("../../../components/Orders/defaultJSON");
|
|
19
|
+
|
|
20
|
+
var _locale = require("../../../../../locale");
|
|
21
|
+
|
|
22
|
+
var _decorator = require("../../../../../decorator");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
30
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
31
|
+
__proto__: []
|
|
32
|
+
} instanceof Array && function (d, b) {
|
|
33
|
+
d.__proto__ = b;
|
|
34
|
+
} || function (d, b) {
|
|
35
|
+
for (var p in b) {
|
|
36
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return _extendStatics(d, b);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return function (d, b) {
|
|
44
|
+
_extendStatics(d, b);
|
|
45
|
+
|
|
46
|
+
function __() {
|
|
47
|
+
this.constructor = d;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51
|
+
};
|
|
52
|
+
}();
|
|
53
|
+
|
|
54
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
55
|
+
var c = arguments.length,
|
|
56
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
57
|
+
d;
|
|
58
|
+
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--) {
|
|
59
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
60
|
+
}
|
|
61
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var notice = 'Please add some Item';
|
|
65
|
+
|
|
66
|
+
var ImageTextConfigGroup =
|
|
67
|
+
/** @class */
|
|
68
|
+
function (_super) {
|
|
69
|
+
__extends(ImageTextConfigGroup, _super);
|
|
70
|
+
|
|
71
|
+
function ImageTextConfigGroup() {
|
|
72
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
|
+
|
|
74
|
+
_this.state = {};
|
|
75
|
+
|
|
76
|
+
_this.onClickItem = function (node) {
|
|
77
|
+
_this.props.store.setState({
|
|
78
|
+
clickedGroup: node.id
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.onAddClick = function () {
|
|
83
|
+
var json = (0, _defaultJSON.OrdersGroupSourceJSON)();
|
|
84
|
+
|
|
85
|
+
_this.props.source.push(json);
|
|
86
|
+
|
|
87
|
+
_this.setState({});
|
|
88
|
+
|
|
89
|
+
(0, _coreUtil.renderPreview)();
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
_this.reRender = function () {
|
|
93
|
+
_this.setState({});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return _this;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
ImageTextConfigGroup.prototype.render = function () {
|
|
100
|
+
var source = this.props.source;
|
|
101
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
|
+
className: "banner_group"
|
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
|
+
className: "node_list"
|
|
105
|
+
}, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
106
|
+
className: "notice"
|
|
107
|
+
}, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
|
|
108
|
+
onClickItem: this.onClickItem,
|
|
109
|
+
reRender: this.reRender,
|
|
110
|
+
source: source
|
|
111
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: "btn_wrap"
|
|
113
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
114
|
+
icon: "icon-add",
|
|
115
|
+
onClick: this.onAddClick,
|
|
116
|
+
type: "primary"
|
|
117
|
+
}, (0, _locale.i18n)('ADD'))));
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
ImageTextConfigGroup.defaultProps = {
|
|
121
|
+
source: []
|
|
122
|
+
};
|
|
123
|
+
ImageTextConfigGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], ImageTextConfigGroup);
|
|
124
|
+
return ImageTextConfigGroup;
|
|
125
|
+
}(_react["default"].Component);
|
|
126
|
+
|
|
127
|
+
var _default = ImageTextConfigGroup;
|
|
128
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,114 @@
|
|
|
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 _ConfigGroup = _interopRequireDefault(require("./ConfigGroup"));
|
|
11
|
+
|
|
12
|
+
var _locale = require("../../../../locale");
|
|
13
|
+
|
|
14
|
+
var _common = require("../../../../common");
|
|
15
|
+
|
|
16
|
+
var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
|
|
17
|
+
|
|
18
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
19
|
+
|
|
20
|
+
var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": 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 OrdersConfig =
|
|
51
|
+
/** @class */
|
|
52
|
+
function (_super) {
|
|
53
|
+
__extends(OrdersConfig, _super);
|
|
54
|
+
|
|
55
|
+
function OrdersConfig() {
|
|
56
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
57
|
+
|
|
58
|
+
_this.getContentPanel = function () {
|
|
59
|
+
var data = _this.props.data;
|
|
60
|
+
var source = [{
|
|
61
|
+
key: 1,
|
|
62
|
+
name: (0, _locale.i18n)('LOGIN_OR_REGISTER'),
|
|
63
|
+
metaOption: data.login
|
|
64
|
+
}];
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
66
|
+
headerSize: "middle",
|
|
67
|
+
onRefresh: function onRefresh() {
|
|
68
|
+
return (0, _coreUtil.renderPreview)();
|
|
69
|
+
},
|
|
70
|
+
source: source,
|
|
71
|
+
type: "switch"
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
OrdersConfig.prototype.render = function () {
|
|
79
|
+
var data = this.props.data;
|
|
80
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
81
|
+
divider: "bold",
|
|
82
|
+
headerSize: "large",
|
|
83
|
+
source: [{
|
|
84
|
+
key: 'Orders1',
|
|
85
|
+
name: (0, _locale.i18n)('Content'),
|
|
86
|
+
value: /*#__PURE__*/_react["default"].createElement(_ConfigGroup["default"], {
|
|
87
|
+
maxNum: 5,
|
|
88
|
+
source: data.groupSource
|
|
89
|
+
}),
|
|
90
|
+
metaOption: data.groupSource
|
|
91
|
+
}, {
|
|
92
|
+
key: 'Orders2',
|
|
93
|
+
name: (0, _locale.i18n)('SPACING'),
|
|
94
|
+
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
95
|
+
data: data.spacing
|
|
96
|
+
})
|
|
97
|
+
}, {
|
|
98
|
+
key: 'Orders3',
|
|
99
|
+
name: (0, _locale.i18n)('BACKGROUND'),
|
|
100
|
+
value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
|
|
101
|
+
data: data.background
|
|
102
|
+
})
|
|
103
|
+
}]
|
|
104
|
+
}));
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
OrdersConfig.defaultProps = {
|
|
108
|
+
data: {}
|
|
109
|
+
};
|
|
110
|
+
return OrdersConfig;
|
|
111
|
+
}(_react["default"].Component);
|
|
112
|
+
|
|
113
|
+
var _default = OrdersConfig;
|
|
114
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,131 @@
|
|
|
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 _mobxReact = require("mobx-react");
|
|
11
|
+
|
|
12
|
+
var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
|
|
13
|
+
|
|
14
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
15
|
+
|
|
16
|
+
var _Button = _interopRequireDefault(require("../../../../../common/Button"));
|
|
17
|
+
|
|
18
|
+
var _defaultJSON = require("../../../components/PersonalInformation/defaultJSON");
|
|
19
|
+
|
|
20
|
+
var _locale = require("../../../../../locale");
|
|
21
|
+
|
|
22
|
+
var _decorator = require("../../../../../decorator");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
30
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
31
|
+
__proto__: []
|
|
32
|
+
} instanceof Array && function (d, b) {
|
|
33
|
+
d.__proto__ = b;
|
|
34
|
+
} || function (d, b) {
|
|
35
|
+
for (var p in b) {
|
|
36
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return _extendStatics(d, b);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return function (d, b) {
|
|
44
|
+
_extendStatics(d, b);
|
|
45
|
+
|
|
46
|
+
function __() {
|
|
47
|
+
this.constructor = d;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51
|
+
};
|
|
52
|
+
}();
|
|
53
|
+
|
|
54
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
55
|
+
var c = arguments.length,
|
|
56
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
57
|
+
d;
|
|
58
|
+
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--) {
|
|
59
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
60
|
+
}
|
|
61
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var notice = 'Please add some Item';
|
|
65
|
+
|
|
66
|
+
var ConfigGroup =
|
|
67
|
+
/** @class */
|
|
68
|
+
function (_super) {
|
|
69
|
+
__extends(ConfigGroup, _super);
|
|
70
|
+
|
|
71
|
+
function ConfigGroup() {
|
|
72
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
|
+
|
|
74
|
+
_this.state = {};
|
|
75
|
+
|
|
76
|
+
_this.onClickItem = function (node) {
|
|
77
|
+
_this.props.store.setState({
|
|
78
|
+
clickedGroup: node.id
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.onAddClick = function () {
|
|
83
|
+
var json = (0, _defaultJSON.PersonalInfoGroupSourceJSON)();
|
|
84
|
+
|
|
85
|
+
_this.props.source.push(json);
|
|
86
|
+
|
|
87
|
+
_this.setState({});
|
|
88
|
+
|
|
89
|
+
(0, _coreUtil.renderPreview)();
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
_this.reRender = function () {
|
|
93
|
+
_this.setState({});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return _this;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
ConfigGroup.prototype.render = function () {
|
|
100
|
+
var _a = this.props,
|
|
101
|
+
source = _a.source,
|
|
102
|
+
maxNum = _a.maxNum;
|
|
103
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
|
+
className: "banner_group"
|
|
105
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
|
+
className: "node_list"
|
|
107
|
+
}, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
108
|
+
className: "notice"
|
|
109
|
+
}, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
|
|
110
|
+
onClickItem: this.onClickItem,
|
|
111
|
+
reRender: this.reRender,
|
|
112
|
+
source: source
|
|
113
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
+
className: "btn_wrap"
|
|
115
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
116
|
+
disabled: source.length >= maxNum,
|
|
117
|
+
icon: "icon-add",
|
|
118
|
+
onClick: this.onAddClick,
|
|
119
|
+
type: "primary"
|
|
120
|
+
}, (0, _locale.i18n)('ADD'))));
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
ConfigGroup.defaultProps = {
|
|
124
|
+
source: []
|
|
125
|
+
};
|
|
126
|
+
ConfigGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], ConfigGroup);
|
|
127
|
+
return ConfigGroup;
|
|
128
|
+
}(_react["default"].Component);
|
|
129
|
+
|
|
130
|
+
var _default = ConfigGroup;
|
|
131
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,118 @@
|
|
|
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 _ConfigGroup = _interopRequireDefault(require("./ConfigGroup"));
|
|
11
|
+
|
|
12
|
+
var _locale = require("../../../../locale");
|
|
13
|
+
|
|
14
|
+
var _common = require("../../../../common");
|
|
15
|
+
|
|
16
|
+
var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
|
|
17
|
+
|
|
18
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
19
|
+
|
|
20
|
+
var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": 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 PersonalInformationConfig =
|
|
51
|
+
/** @class */
|
|
52
|
+
function (_super) {
|
|
53
|
+
__extends(PersonalInformationConfig, _super);
|
|
54
|
+
|
|
55
|
+
function PersonalInformationConfig() {
|
|
56
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
57
|
+
|
|
58
|
+
_this.getContentPanel = function () {
|
|
59
|
+
var data = _this.props.data;
|
|
60
|
+
var source = [{
|
|
61
|
+
key: 1,
|
|
62
|
+
name: (0, _locale.i18n)('LOGIN_OR_REGISTER'),
|
|
63
|
+
metaOption: data.login
|
|
64
|
+
}];
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
66
|
+
headerSize: "middle",
|
|
67
|
+
onRefresh: function onRefresh() {
|
|
68
|
+
return (0, _coreUtil.renderPreview)();
|
|
69
|
+
},
|
|
70
|
+
source: source,
|
|
71
|
+
type: "switch"
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
PersonalInformationConfig.prototype.render = function () {
|
|
79
|
+
var data = this.props.data;
|
|
80
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
81
|
+
divider: "bold",
|
|
82
|
+
headerSize: "large",
|
|
83
|
+
source: [{
|
|
84
|
+
key: 'PersonalInformation1',
|
|
85
|
+
name: (0, _locale.i18n)('LOGIN_OR_REGISTER'),
|
|
86
|
+
value: this.getContentPanel()
|
|
87
|
+
}, {
|
|
88
|
+
key: 'PersonalInformation2',
|
|
89
|
+
name: (0, _locale.i18n)('Content'),
|
|
90
|
+
value: /*#__PURE__*/_react["default"].createElement(_ConfigGroup["default"], {
|
|
91
|
+
maxNum: 4,
|
|
92
|
+
source: data.groupSource
|
|
93
|
+
}),
|
|
94
|
+
metaOption: data.groupSource
|
|
95
|
+
}, {
|
|
96
|
+
key: 'PersonalInformation3',
|
|
97
|
+
name: (0, _locale.i18n)('SPACING'),
|
|
98
|
+
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
99
|
+
data: data.spacing
|
|
100
|
+
})
|
|
101
|
+
}, {
|
|
102
|
+
key: 'PersonalInformation4',
|
|
103
|
+
name: (0, _locale.i18n)('BACKGROUND'),
|
|
104
|
+
value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
|
|
105
|
+
data: data.background
|
|
106
|
+
})
|
|
107
|
+
}]
|
|
108
|
+
}));
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
PersonalInformationConfig.defaultProps = {
|
|
112
|
+
data: {}
|
|
113
|
+
};
|
|
114
|
+
return PersonalInformationConfig;
|
|
115
|
+
}(_react["default"].Component);
|
|
116
|
+
|
|
117
|
+
var _default = PersonalInformationConfig;
|
|
118
|
+
exports["default"] = _default;
|