@fonixtree/magic-design 2.0.82 → 2.0.83

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.
Files changed (95) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/assets/fonts/magic-box-iconfont.css +30 -6
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  7. package/es/common/GroupList/index.js +5 -2
  8. package/es/common/ProductModal/SortableImageList/index.js +118 -0
  9. package/es/common/ProductModal/SortableImageList/index.less +3 -0
  10. package/es/common/ProductModal/index.js +40 -27
  11. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
  12. package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +88 -0
  13. package/es/composite-comp/dito/components/CommonFunctions/index.js +84 -0
  14. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +105 -0
  15. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +33 -0
  16. package/es/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
  17. package/es/composite-comp/dito/components/Orders/index.js +84 -0
  18. package/es/composite-comp/dito/components/Orders/mobile/index.js +334 -0
  19. package/es/composite-comp/dito/components/Orders/mobile/index.less +83 -0
  20. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
  21. package/es/composite-comp/dito/components/PersonalInformation/index.js +84 -0
  22. package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  23. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +451 -0
  24. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +127 -0
  25. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
  26. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
  27. package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +128 -0
  28. package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +113 -0
  29. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +128 -0
  30. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +117 -0
  31. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
  32. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
  33. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
  34. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
  35. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
  36. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
  37. package/es/constants/component-types.js +21 -3
  38. package/es/constants/index.js +37 -3
  39. package/es/core/Designer/ConfigPanel/index.js +6 -0
  40. package/es/decorator/compositeDecorator.js +1 -1
  41. package/es/locale/en/en.json +14 -0
  42. package/es/locale/es/es.json +14 -0
  43. package/es/locale/id/id.json +14 -0
  44. package/es/mobx/UserState.js +144 -0
  45. package/es/mobx/index.js +9 -3
  46. package/es/utils/androidUtil.js +13 -2
  47. package/es/utils/commonUtil.js +117 -3
  48. package/lib/assets/fonts/.DS_Store +0 -0
  49. package/lib/assets/fonts/magic-box-iconfont.css +30 -6
  50. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  51. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  52. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  53. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  54. package/lib/common/GroupList/index.js +5 -2
  55. package/lib/common/ProductModal/SortableImageList/index.js +118 -0
  56. package/lib/common/ProductModal/SortableImageList/index.less +3 -0
  57. package/lib/common/ProductModal/index.js +40 -27
  58. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
  59. package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +88 -0
  60. package/lib/composite-comp/dito/components/CommonFunctions/index.js +84 -0
  61. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +105 -0
  62. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +33 -0
  63. package/lib/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
  64. package/lib/composite-comp/dito/components/Orders/index.js +84 -0
  65. package/lib/composite-comp/dito/components/Orders/mobile/index.js +334 -0
  66. package/lib/composite-comp/dito/components/Orders/mobile/index.less +83 -0
  67. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
  68. package/lib/composite-comp/dito/components/PersonalInformation/index.js +84 -0
  69. package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  70. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +451 -0
  71. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +127 -0
  72. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
  73. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
  74. package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +128 -0
  75. package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +113 -0
  76. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +128 -0
  77. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +117 -0
  78. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
  79. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
  80. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
  81. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
  82. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
  83. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
  84. package/lib/constants/component-types.js +21 -3
  85. package/lib/constants/index.js +37 -3
  86. package/lib/core/Designer/ConfigPanel/index.js +6 -0
  87. package/lib/decorator/compositeDecorator.js +1 -1
  88. package/lib/locale/en/en.json +14 -0
  89. package/lib/locale/es/es.json +14 -0
  90. package/lib/locale/id/id.json +14 -0
  91. package/lib/mobx/UserState.js +144 -0
  92. package/lib/mobx/index.js +9 -3
  93. package/lib/utils/androidUtil.js +13 -2
  94. package/lib/utils/commonUtil.js +117 -3
  95. 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,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 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
+ source: data.groupSource
88
+ }),
89
+ metaOption: data.groupSource
90
+ }, {
91
+ key: 'Orders2',
92
+ name: (0, _locale.i18n)('SPACING'),
93
+ value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
94
+ data: data.spacing
95
+ })
96
+ }, {
97
+ key: 'Orders3',
98
+ name: (0, _locale.i18n)('BACKGROUND'),
99
+ value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
100
+ data: data.background
101
+ })
102
+ }]
103
+ }));
104
+ };
105
+
106
+ OrdersConfig.defaultProps = {
107
+ data: {}
108
+ };
109
+ return OrdersConfig;
110
+ }(_react["default"].Component);
111
+
112
+ var _default = OrdersConfig;
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/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 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
+ ConfigGroup.defaultProps = {
121
+ source: []
122
+ };
123
+ ConfigGroup = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], ConfigGroup);
124
+ return ConfigGroup;
125
+ }(_react["default"].Component);
126
+
127
+ var _default = ConfigGroup;
128
+ exports["default"] = _default;
@@ -0,0 +1,117 @@
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
+ source: data.groupSource
92
+ }),
93
+ metaOption: data.groupSource
94
+ }, {
95
+ key: 'PersonalInformation3',
96
+ name: (0, _locale.i18n)('SPACING'),
97
+ value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
98
+ data: data.spacing
99
+ })
100
+ }, {
101
+ key: 'PersonalInformation4',
102
+ name: (0, _locale.i18n)('BACKGROUND'),
103
+ value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
104
+ data: data.background
105
+ })
106
+ }]
107
+ }));
108
+ };
109
+
110
+ PersonalInformationConfig.defaultProps = {
111
+ data: {}
112
+ };
113
+ return PersonalInformationConfig;
114
+ }(_react["default"].Component);
115
+
116
+ var _default = PersonalInformationConfig;
117
+ exports["default"] = _default;