@fonixtree/magic-design 2.0.170 → 2.0.171

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 (177) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +39 -3
  2. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  3. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  4. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  5. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  6. package/es/assets/images/base64/index.js +8 -2
  7. package/es/assets/images/common/product.png +0 -0
  8. package/es/assets/images/layout-icon/locationLayout.png +0 -0
  9. package/es/assets/images/layout-icon/storesLayout1.png +0 -0
  10. package/es/assets/images/layout-icon/storesLayout2.png +0 -0
  11. package/es/assets/less/common.less +40 -3
  12. package/es/common/Field/index.js +5 -2
  13. package/es/common/Field/index.less +5 -0
  14. package/es/common/MyModal/index.less +12 -4
  15. package/{lib/composite-comp/bol/components/Wallet → es/composite-comp/ashita/components/WalletAshita}/defaultJSON.js +1 -1
  16. package/es/composite-comp/ashita/components/WalletAshita/index.js +84 -0
  17. package/{lib/composite-comp/bol/config-panels/WalletConfig → es/composite-comp/ashita/config-panels/WalletAshitaConfig}/WalletConfigImageGroup/index.js +1 -1
  18. package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +1 -1
  19. package/es/composite-comp/public/components/Location/defaultJSON.js +104 -0
  20. package/es/composite-comp/public/components/Location/index.js +86 -0
  21. package/es/composite-comp/public/components/Location/mobile/img/img-circle.png +0 -0
  22. package/es/composite-comp/public/components/Location/mobile/index.js +353 -0
  23. package/es/composite-comp/public/components/Location/mobile/index.less +90 -0
  24. package/es/composite-comp/public/components/Stores/defaultJSON.js +348 -0
  25. package/es/composite-comp/public/components/Stores/index.js +86 -0
  26. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +275 -0
  27. package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.less +81 -0
  28. package/es/composite-comp/public/components/Stores/mobile/index.js +198 -0
  29. package/es/composite-comp/public/components/Stores/mobile/index.less +37 -0
  30. package/es/composite-comp/public/components/Wallet/defaultJSON.js +149 -0
  31. package/es/composite-comp/public/components/Wallet/mobile/index.js +350 -0
  32. package/es/composite-comp/public/components/Wallet/mobile/index.less +22 -0
  33. package/es/composite-comp/public/config-panels/LocationConfig/ConfigContent/index.js +153 -0
  34. package/{lib/composite-comp/bol → es/composite-comp/public}/config-panels/LocationConfig/index.js +10 -52
  35. package/es/composite-comp/public/config-panels/LocationConfig/index.less +17 -0
  36. package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +176 -0
  37. package/es/composite-comp/public/config-panels/StoresConfig/ConfigTitle/index.js +103 -0
  38. package/es/composite-comp/public/config-panels/StoresConfig/index.js +134 -0
  39. package/es/constants/component-types.js +23 -13
  40. package/es/constants/index.js +9 -1
  41. package/es/constants/layout.js +18 -4
  42. package/es/locale/en/en.json +15 -1
  43. package/es/locale/es/es.json +15 -1
  44. package/es/locale/index.js +5 -1
  45. package/es/locale/mn/mn.json +15 -1
  46. package/es/meta-comp/components/Text/index.less +6 -0
  47. package/es/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.js +207 -0
  48. package/es/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.less +81 -0
  49. package/es/meta-comp/config-panels/ButtonConfig/index.js +7 -8
  50. package/es/utils/commonUtil.js +21 -9
  51. package/lib/assets/fonts/magic-box-iconfont.css +39 -3
  52. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  53. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  54. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  55. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  56. package/lib/assets/images/base64/index.js +8 -2
  57. package/lib/assets/images/common/product.png +0 -0
  58. package/lib/assets/images/layout-icon/locationLayout.png +0 -0
  59. package/lib/assets/images/layout-icon/storesLayout1.png +0 -0
  60. package/lib/assets/images/layout-icon/storesLayout2.png +0 -0
  61. package/lib/assets/less/common.less +40 -3
  62. package/lib/common/Field/index.js +5 -2
  63. package/lib/common/Field/index.less +5 -0
  64. package/lib/common/MyModal/index.less +12 -4
  65. package/{es/composite-comp/bol/components/Wallet → lib/composite-comp/ashita/components/WalletAshita}/defaultJSON.js +1 -1
  66. package/lib/composite-comp/ashita/components/WalletAshita/index.js +84 -0
  67. package/{es/composite-comp/bol/config-panels/WalletConfig → lib/composite-comp/ashita/config-panels/WalletAshitaConfig}/WalletConfigImageGroup/index.js +1 -1
  68. package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.less +0 -0
  69. package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +1 -1
  70. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
  71. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
  72. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
  73. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
  74. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
  75. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
  76. package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/index.js +61 -0
  77. package/lib/composite-comp/nuri/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
  78. package/lib/composite-comp/public/components/Location/defaultJSON.js +104 -0
  79. package/lib/composite-comp/public/components/Location/index.js +86 -0
  80. package/lib/composite-comp/public/components/Location/mobile/img/img-circle.png +0 -0
  81. package/lib/composite-comp/public/components/Location/mobile/index.js +353 -0
  82. package/lib/composite-comp/public/components/Location/mobile/index.less +90 -0
  83. package/lib/composite-comp/public/components/Stores/defaultJSON.js +348 -0
  84. package/lib/composite-comp/public/components/Stores/index.js +86 -0
  85. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +275 -0
  86. package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.less +81 -0
  87. package/lib/composite-comp/public/components/Stores/mobile/index.js +198 -0
  88. package/lib/composite-comp/public/components/Stores/mobile/index.less +37 -0
  89. package/lib/composite-comp/public/components/Wallet/defaultJSON.js +149 -0
  90. package/lib/composite-comp/public/components/Wallet/mobile/index.js +350 -0
  91. package/lib/composite-comp/public/components/Wallet/mobile/index.less +22 -0
  92. package/lib/composite-comp/public/config-panels/LocationConfig/ConfigContent/index.js +153 -0
  93. package/{es/composite-comp/bol → lib/composite-comp/public}/config-panels/LocationConfig/index.js +10 -52
  94. package/lib/composite-comp/public/config-panels/LocationConfig/index.less +17 -0
  95. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +176 -0
  96. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +0 -0
  97. package/lib/composite-comp/public/config-panels/StoresConfig/ConfigTitle/index.js +103 -0
  98. package/lib/composite-comp/public/config-panels/StoresConfig/index.js +134 -0
  99. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/defaultImg.png +0 -0
  100. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.js +100 -0
  101. package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.less +72 -0
  102. package/lib/composite-comp/public/config-panels/WalletConfig/WalletNuriConfigImageGroup/index.js +123 -0
  103. package/lib/composite-comp/public/config-panels/WalletConfig/WalletNuriConfigImageGroup/index.less +0 -0
  104. package/lib/composite-comp/public/config-panels/WalletConfig/imgs/defaultImg.png +0 -0
  105. package/lib/composite-comp/public/config-panels/WalletConfig/index.js +61 -0
  106. package/lib/composite-comp/public/second-config-panels/WalletSecondConfig/index.js +152 -0
  107. package/lib/constants/component-types.js +23 -13
  108. package/lib/constants/index.js +9 -1
  109. package/lib/constants/layout.js +18 -4
  110. package/lib/locale/en/en.json +15 -1
  111. package/lib/locale/es/es.json +15 -1
  112. package/lib/locale/index.js +5 -1
  113. package/lib/locale/mn/mn.json +15 -1
  114. package/lib/meta-comp/components/Text/index.less +6 -0
  115. package/lib/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.js +207 -0
  116. package/lib/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.less +81 -0
  117. package/lib/meta-comp/config-panels/ButtonConfig/index.js +7 -8
  118. package/lib/utils/commonUtil.js +21 -9
  119. package/package.json +1 -1
  120. package/es/composite-comp/bol/components/Location/defaultJSON.js +0 -60
  121. package/es/composite-comp/bol/components/Location/index.js +0 -102
  122. package/es/composite-comp/bol/components/Location/index.less +0 -15
  123. package/lib/composite-comp/bol/components/Location/defaultJSON.js +0 -60
  124. package/lib/composite-comp/bol/components/Location/index.js +0 -102
  125. package/lib/composite-comp/bol/components/Location/index.less +0 -15
  126. /package/es/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/mobile/index.js +0 -0
  127. /package/es/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/mobile/index.less +0 -0
  128. /package/es/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/pc/index.js +0 -0
  129. /package/es/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/pc/index.less +0 -0
  130. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigContent/index.js +0 -0
  131. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigContent/index.less +0 -0
  132. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigImageGroup/index.less +0 -0
  133. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigSetting/index.js +0 -0
  134. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigSetting/index.less +0 -0
  135. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/imgs/defaultImg.png +0 -0
  136. /package/es/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/index.js +0 -0
  137. /package/es/composite-comp/{bol/second-config-panels/WalletSecondConfig → ashita/second-config-panels/WalletAshitaSecondConfig}/index.js +0 -0
  138. /package/es/composite-comp/{bol/second-config-panels/WalletSecondConfig → ashita/second-config-panels/WalletAshitaSecondConfig}/index.less +0 -0
  139. /package/es/composite-comp/{bol → nuri}/components/WalletNuri/defaultJSON.js +0 -0
  140. /package/es/composite-comp/{bol → nuri}/components/WalletNuri/index.js +0 -0
  141. /package/es/composite-comp/{bol → nuri}/components/WalletNuri/mobile/index.js +0 -0
  142. /package/es/composite-comp/{bol → nuri}/components/WalletNuri/mobile/index.less +0 -0
  143. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
  144. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/GroupList/index.js +0 -0
  145. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/GroupList/index.less +0 -0
  146. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +0 -0
  147. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
  148. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
  149. /package/es/composite-comp/{bol → nuri}/config-panels/WalletNuriConfig/index.js +0 -0
  150. /package/es/composite-comp/{bol → nuri}/second-config-panels/WalletNuriSecondConfig/index.js +0 -0
  151. /package/es/composite-comp/{bol → public}/components/Wallet/index.js +0 -0
  152. /package/{lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigContent → es/composite-comp/public/config-panels/StoresConfig/ConfigContent}/index.less +0 -0
  153. /package/{lib/composite-comp/bol/config-panels/WalletConfig/imgs → es/composite-comp/public/config-panels/WalletConfig/GroupList}/defaultImg.png +0 -0
  154. /package/{lib/composite-comp/bol/config-panels/WalletNuriConfig → es/composite-comp/public/config-panels/WalletConfig}/GroupList/index.js +0 -0
  155. /package/{lib/composite-comp/bol/config-panels/WalletNuriConfig → es/composite-comp/public/config-panels/WalletConfig}/GroupList/index.less +0 -0
  156. /package/{lib/composite-comp/bol/config-panels/WalletNuriConfig → es/composite-comp/public/config-panels/WalletConfig}/WalletNuriConfigImageGroup/index.js +0 -0
  157. /package/{lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup → es/composite-comp/public/config-panels/WalletConfig/WalletNuriConfigImageGroup}/index.less +0 -0
  158. /package/{lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList → es/composite-comp/public/config-panels/WalletConfig/imgs}/defaultImg.png +0 -0
  159. /package/{lib/composite-comp/bol/config-panels/WalletNuriConfig → es/composite-comp/public/config-panels/WalletConfig}/index.js +0 -0
  160. /package/{lib/composite-comp/bol/second-config-panels/WalletNuriSecondConfig → es/composite-comp/public/second-config-panels/WalletSecondConfig}/index.js +0 -0
  161. /package/lib/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/mobile/index.js +0 -0
  162. /package/lib/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/mobile/index.less +0 -0
  163. /package/lib/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/pc/index.js +0 -0
  164. /package/lib/composite-comp/{bol/components/Wallet → ashita/components/WalletAshita}/pc/index.less +0 -0
  165. /package/lib/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigContent/index.js +0 -0
  166. /package/lib/composite-comp/{bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup → ashita/config-panels/WalletAshitaConfig/WalletConfigContent}/index.less +0 -0
  167. /package/lib/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigSetting/index.js +0 -0
  168. /package/lib/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/WalletConfigSetting/index.less +0 -0
  169. /package/lib/composite-comp/{bol/config-panels/WalletNuriConfig → ashita/config-panels/WalletAshitaConfig}/imgs/defaultImg.png +0 -0
  170. /package/lib/composite-comp/{bol/config-panels/WalletConfig → ashita/config-panels/WalletAshitaConfig}/index.js +0 -0
  171. /package/lib/composite-comp/{bol/second-config-panels/WalletSecondConfig → ashita/second-config-panels/WalletAshitaSecondConfig}/index.js +0 -0
  172. /package/lib/composite-comp/{bol/second-config-panels/WalletSecondConfig → ashita/second-config-panels/WalletAshitaSecondConfig}/index.less +0 -0
  173. /package/lib/composite-comp/{bol → nuri}/components/WalletNuri/defaultJSON.js +0 -0
  174. /package/lib/composite-comp/{bol → nuri}/components/WalletNuri/index.js +0 -0
  175. /package/lib/composite-comp/{bol → nuri}/components/WalletNuri/mobile/index.js +0 -0
  176. /package/lib/composite-comp/{bol → nuri}/components/WalletNuri/mobile/index.less +0 -0
  177. /package/lib/composite-comp/{bol → public}/components/Wallet/index.js +0 -0
@@ -100,4 +100,10 @@
100
100
  // }
101
101
  // }
102
102
  }
103
+ }
104
+
105
+ .one_row .m-meta-text {
106
+ overflow: hidden;
107
+ white-space: nowrap;
108
+ text-overflow: ellipsis;
103
109
  }
@@ -0,0 +1,207 @@
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
+ require("./index.less");
13
+
14
+ var _antd = require("antd4");
15
+
16
+ var _common = require("src/components/common");
17
+
18
+ var _locale = require("../../../../locale");
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 BorderRadiusInput =
49
+ /** @class */
50
+ function (_super) {
51
+ __extends(BorderRadiusInput, _super);
52
+
53
+ function BorderRadiusInput() {
54
+ var _this = _super !== null && _super.apply(this, arguments) || this;
55
+
56
+ _this.state = {
57
+ open: false,
58
+ value1: 0,
59
+ value2: 0,
60
+ value3: 0,
61
+ value4: 0,
62
+ showValue: ''
63
+ };
64
+
65
+ _this.updateValue = function (v, e) {
66
+ var _a;
67
+
68
+ var onChange = _this.props.onChange;
69
+
70
+ _this.setState((_a = {}, _a[v] = e.target.value, _a), function () {
71
+ var _a = _this.state,
72
+ value1 = _a.value1,
73
+ value2 = _a.value2,
74
+ value3 = _a.value3,
75
+ value4 = _a.value4;
76
+ onChange((value1 || 0) + "px " + (value2 || 0) + "px " + (value4 || 0) + "px " + (value3 || 0) + "px");
77
+
78
+ _this.setState({
79
+ showValue: value1 == value2 && value1 == value3 && value1 == value4 ? value1 : (0, _locale.i18n)('MIXED')
80
+ });
81
+ });
82
+ };
83
+
84
+ return _this;
85
+ }
86
+
87
+ BorderRadiusInput.prototype.componentDidMount = function () {
88
+ var value = this.props.value;
89
+ var arr = typeof value === 'number' ? [value] : value.split(' ');
90
+ var first = arr[0],
91
+ second = arr[1],
92
+ three = arr[2],
93
+ four = arr[3];
94
+ this.setState({
95
+ value1: parseInt(first),
96
+ value2: parseInt(second || first),
97
+ value3: parseInt(three || first),
98
+ value4: parseInt(four || first),
99
+ showValue: typeof value === 'number' || first == second && first == three && first == four ? parseInt(first) : (0, _locale.i18n)('MIXED')
100
+ });
101
+ };
102
+
103
+ BorderRadiusInput.prototype.render = function () {
104
+ var _this = this;
105
+
106
+ var _a = this.state,
107
+ open = _a.open,
108
+ showValue = _a.showValue,
109
+ value1 = _a.value1,
110
+ value2 = _a.value2,
111
+ value3 = _a.value3,
112
+ value4 = _a.value4;
113
+
114
+ var menu = /*#__PURE__*/_react["default"].createElement(_antd.Menu, {
115
+ onClick: function onClick() {}
116
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, null, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
117
+ color: "#848484",
118
+ size: 24,
119
+ type: "icon-border-radius"
120
+ }), /*#__PURE__*/_react["default"].createElement("input", {
121
+ onChange: function onChange(e) {
122
+ return _this.updateValue('value1', e);
123
+ },
124
+ type: "text",
125
+ value: value1
126
+ })), /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, null, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
127
+ className: "border-radius-rotate2",
128
+ color: "#848484",
129
+ size: 24,
130
+ type: "icon-border-radius"
131
+ }), /*#__PURE__*/_react["default"].createElement("input", {
132
+ onChange: function onChange(e) {
133
+ return _this.updateValue('value2', e);
134
+ },
135
+ type: "text",
136
+ value: value2
137
+ })), /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, null, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
138
+ className: "border-radius-rotate3",
139
+ color: "#848484",
140
+ size: 24,
141
+ type: "icon-border-radius"
142
+ }), /*#__PURE__*/_react["default"].createElement("input", {
143
+ onChange: function onChange(e) {
144
+ return _this.updateValue('value3', e);
145
+ },
146
+ type: "text",
147
+ value: value3
148
+ })), /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, null, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
149
+ className: "border-radius-rotate4",
150
+ color: "#848484",
151
+ size: 24,
152
+ type: "icon-border-radius"
153
+ }), /*#__PURE__*/_react["default"].createElement("input", {
154
+ onChange: function onChange(e) {
155
+ return _this.updateValue('value4', e);
156
+ },
157
+ type: "text",
158
+ value: value4
159
+ })));
160
+
161
+ return /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
162
+ open: open,
163
+ overlay: menu,
164
+ overlayClassName: "m-border-radius-dropdown",
165
+ placement: "bottomLeft"
166
+ }, /*#__PURE__*/_react["default"].createElement("div", {
167
+ className: (0, _classnames["default"])('m-border-radius-input')
168
+ }, open && /*#__PURE__*/_react["default"].createElement("div", {
169
+ className: "common_mask",
170
+ onClick: function onClick() {
171
+ return _this.setState({
172
+ open: false
173
+ });
174
+ }
175
+ }), /*#__PURE__*/_react["default"].createElement("div", {
176
+ className: "input"
177
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
178
+ color: "#848484",
179
+ size: 24,
180
+ type: "icon-border-radius"
181
+ }), /*#__PURE__*/_react["default"].createElement("span", {
182
+ className: "value"
183
+ }, showValue)), /*#__PURE__*/_react["default"].createElement("span", {
184
+ className: (0, _classnames["default"])('m-icon-corner', {
185
+ active: open
186
+ }),
187
+ onClick: function onClick() {
188
+ _this.setState({
189
+ open: !open
190
+ });
191
+ }
192
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
193
+ color: "#000",
194
+ size: 32,
195
+ type: "icon-corner"
196
+ }))));
197
+ };
198
+
199
+ BorderRadiusInput.defaultProps = {
200
+ value: '',
201
+ onChange: function onChange() {}
202
+ };
203
+ return BorderRadiusInput;
204
+ }(_react["default"].Component);
205
+
206
+ var _default = BorderRadiusInput;
207
+ exports["default"] = _default;
@@ -0,0 +1,81 @@
1
+ .m-border-radius-input {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: space-between;
5
+
6
+ .input {
7
+ height: 48px;
8
+ width: 83%;
9
+ background: #FFFFFF;
10
+ border: 1px solid #D2D9E5;
11
+ border-radius: 8px;
12
+ padding: 8px 16px;
13
+ align-items: center;
14
+
15
+ .value {
16
+ font-family: 'Open Sans';
17
+ font-style: normal;
18
+ font-weight: 400;
19
+ font-size: 16px;
20
+ color: #232F46;
21
+ margin-left: 10px;
22
+ }
23
+ }
24
+
25
+ .m-icon-corner {
26
+ cursor: pointer;
27
+ display: inline-block;
28
+ width: 36px;
29
+ height: 36px;
30
+ border-radius: 8px;
31
+ padding: 2px;
32
+ background-color: transparent;
33
+
34
+ &.active {
35
+ background-color: #ddd;
36
+ }
37
+ }
38
+ }
39
+
40
+ .m-border-radius-dropdown {
41
+
42
+ .cylon-dropdown-menu {
43
+ display: flex;
44
+ flex-wrap: wrap;
45
+
46
+ .cylon-dropdown-menu-item-active {
47
+ background-color: transparent;
48
+ color: #232F46 !important;
49
+ }
50
+
51
+ li {
52
+ width: 50%;
53
+
54
+ .cylon-dropdown-menu-title-content {
55
+ display: flex;
56
+
57
+ .border-radius-rotate2 {
58
+ transform: rotate(90deg);
59
+ }
60
+
61
+ .border-radius-rotate3 {
62
+ transform: rotate(270deg);
63
+ }
64
+
65
+ .border-radius-rotate4 {
66
+ transform: rotate(180deg);
67
+ }
68
+
69
+ input {
70
+ width: 80%;
71
+ outline: none;
72
+ border: 1px solid #D2D9E5;
73
+ padding: 4px 8px;
74
+ border-radius: 8px;
75
+ margin-left: 10px;
76
+ }
77
+ }
78
+ }
79
+ }
80
+
81
+ }
@@ -13,6 +13,8 @@ require("./index.less");
13
13
 
14
14
  var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
15
15
 
16
+ var _BorderRadiusInput = _interopRequireDefault(require("./BorderRadiusInput"));
17
+
16
18
  var _locale = require("../../../locale");
17
19
 
18
20
  var _SpacingConfig = _interopRequireDefault(require("../../../composite-comp/common/config-panels/SpacingConfig"));
@@ -251,16 +253,13 @@ function (_super) {
251
253
  value: _data.borderColor
252
254
  })), /*#__PURE__*/_react["default"].createElement(_common.Field, {
253
255
  title: (0, _locale.i18n)('BORDER_RADIUS')
254
- }, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
255
- maxVal: 20,
256
- onChange: function onChange(_a) {
257
- var count = _a.count;
256
+ }, /*#__PURE__*/_react["default"].createElement(_BorderRadiusInput["default"], {
257
+ onChange: function onChange(v) {
258
+ console.log(v);
258
259
 
259
- _this.updateAttr(_data, 'borderRadius', count);
260
+ _this.updateAttr(_data, 'borderRadius', v);
260
261
  },
261
- value: {
262
- count: _data.borderRadius
263
- }
262
+ value: _data.borderRadius
264
263
  })));
265
264
  };
266
265
 
@@ -23,7 +23,7 @@ exports.isLogin = isLogin;
23
23
  exports.navigateBack = navigateBack;
24
24
  exports.onListenTouch = exports.nextTick = exports.navigateTo = void 0;
25
25
  exports.pushGA = pushGA;
26
- exports.setDefaultAddressFromIP = exports.pxToRem = void 0;
26
+ exports.setDefaultAddressFromIP = exports.reverseStrArr = exports.pxToRem = void 0;
27
27
  exports.shareFacebook = shareFacebook;
28
28
  exports.shareLinkedin = shareLinkedin;
29
29
  exports.shareTwitter = shareTwitter;
@@ -505,13 +505,25 @@ var getUrlParams = function getUrlParams(name) {
505
505
  if (r != null) return unescape(r[2]);
506
506
  return null;
507
507
  };
508
+
509
+ exports.getUrlParams = getUrlParams;
510
+
511
+ var reverseStrArr = function reverseStrArr(arr) {
512
+ var locale = (0, _storeUtil.getStore)(_constants.STORAGE_KEY.FISHX_LOCALE) || (0, _storeUtil.getStore)(_constants.STORAGE_KEY.LOCALE);
513
+
514
+ if (locale === 'ba') {
515
+ return arr.reverse().join(' ').replace('+ ', '+').replace(': ', ':');
516
+ }
517
+
518
+ return arr.join(' ').replace(' +', '+').replace(' :', ':');
519
+ };
508
520
  /**
509
521
  * 补0 函数
510
522
  * @param {*} num 数字
511
523
  */
512
524
 
513
525
 
514
- exports.getUrlParams = getUrlParams;
526
+ exports.reverseStrArr = reverseStrArr;
515
527
 
516
528
  var addZero = function addZero(num) {
517
529
  return String(num).length === 1 ? "0" + String(num) : String(num);
@@ -938,16 +950,16 @@ var pxToRem = function pxToRem(styleObj) {
938
950
  if (styleObj.hasOwnProperty(key)) {
939
951
  var value = styleObj[key];
940
952
 
941
- if (typeof value === 'string' && value.endsWith('px')) {
953
+ if ((key === 'padding' || key === 'margin' || key === 'borderRadius') && typeof value === 'string') {
954
+ var values = value.split(' ');
955
+ var remValues = values.map(function (value) {
956
+ return value.endsWith('px') ? convertToRem(value) : value;
957
+ });
958
+ remObj[key] = remValues.join(' ');
959
+ } else if (typeof value === 'string' && value.endsWith('px')) {
942
960
  remObj[key] = convertToRem(value.split('px')[0]);
943
961
  } else if (typeof value === 'number') {
944
962
  remObj[key] = ['opacity', 'lineHeight', 'zIndex', 'fontWeight'].includes(key) ? value : convertToRem(value);
945
- } else if ((key === 'padding' || key === 'margin') && typeof value === 'string') {
946
- var paddingValues = value.split(' ');
947
- var remPaddingValues = paddingValues.map(function (paddingValue) {
948
- return paddingValue.endsWith('px') ? convertToRem(paddingValue) : paddingValue;
949
- });
950
- remObj[key] = remPaddingValues.join(' ');
951
963
  } else {
952
964
  remObj[key] = value;
953
965
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.170",
4
+ "version": "2.0.171",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
@@ -1,60 +0,0 @@
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
- var groupId = (0, _uuid.v4)();
12
- return {
13
- id: groupId,
14
- type: 'LOCATION',
15
- logo: {
16
- parentId: groupId,
17
- id: (0, _uuid.v4)(),
18
- open: true,
19
- color: '#fff'
20
- },
21
- address: {
22
- parentId: groupId,
23
- id: (0, _uuid.v4)(),
24
- open: true
25
- },
26
- icon: {
27
- parentId: groupId,
28
- id: (0, _uuid.v4)(),
29
- open: true,
30
- color: '#fff'
31
- },
32
- spacing: {
33
- pc: {
34
- paddingTop: 10,
35
- paddingBottom: 10,
36
- marginBottom: 0
37
- },
38
- mobile: {
39
- paddingTop: 12,
40
- paddingBottom: 12,
41
- paddingLeft: 12,
42
- marginBottom: 0
43
- }
44
- },
45
- customize: {
46
- layout: {
47
- pcLayout: 'top',
48
- h5Layout: 'top'
49
- }
50
- },
51
- background: {
52
- opacity: 100,
53
- color: '#597EF7',
54
- image: '',
55
- bgType: 'color'
56
- }
57
- };
58
- };
59
-
60
- exports.getDefaultJSON = getDefaultJSON;
@@ -1,102 +0,0 @@
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 _common = require("../../../../common");
13
-
14
- var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
15
-
16
- var _locale = require("../../../../locale");
17
-
18
- require("./index.less");
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
-
22
- 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); }
23
-
24
- 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; }
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 CustomCode =
65
- /** @class */
66
- function (_super) {
67
- __extends(CustomCode, _super);
68
-
69
- function CustomCode() {
70
- return _super !== null && _super.apply(this, arguments) || this;
71
- }
72
-
73
- CustomCode.prototype.componentDidMount = function () {};
74
-
75
- CustomCode.prototype.render = function () {
76
- var nodeData = this.props.nodeData;
77
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null) : /*#__PURE__*/_react["default"].createElement("div", {
78
- className: "location-mobile"
79
- }, nodeData.logo.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
80
- className: "logo",
81
- color: nodeData.logo.color,
82
- size: 20,
83
- type: "icon-MapPin"
84
- }), nodeData.address.open && /*#__PURE__*/_react["default"].createElement("div", {
85
- className: "address"
86
- }, (0, _locale.i18n)('DISPLAY_LOCATION_ADDRESS')), nodeData.icon.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
87
- className: "logo",
88
- color: nodeData.icon.color,
89
- size: 16,
90
- type: "icon-outlined-right"
91
- })));
92
- };
93
-
94
- CustomCode.defaultProps = {};
95
- CustomCode.type = 'LOCATION';
96
- CustomCode.getDefaultJSON = _defaultJSON.getDefaultJSON;
97
- CustomCode = __decorate([_compositeDecorator["default"]], CustomCode);
98
- return CustomCode;
99
- }(_react.Component);
100
-
101
- var _default = CustomCode;
102
- exports["default"] = _default;
@@ -1,15 +0,0 @@
1
- .location-mobile {
2
- display: flex;
3
- align-items: center;
4
- .logo {
5
- margin-right: 6px;
6
- }
7
- .address {
8
- font-family: Open Sans;
9
- font-size: 14px;
10
- font-weight: 400;
11
- line-height: 18px;
12
- color: #fff;
13
- }
14
-
15
- }
@@ -1,60 +0,0 @@
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
- var groupId = (0, _uuid.v4)();
12
- return {
13
- id: groupId,
14
- type: 'LOCATION',
15
- logo: {
16
- parentId: groupId,
17
- id: (0, _uuid.v4)(),
18
- open: true,
19
- color: '#fff'
20
- },
21
- address: {
22
- parentId: groupId,
23
- id: (0, _uuid.v4)(),
24
- open: true
25
- },
26
- icon: {
27
- parentId: groupId,
28
- id: (0, _uuid.v4)(),
29
- open: true,
30
- color: '#fff'
31
- },
32
- spacing: {
33
- pc: {
34
- paddingTop: 10,
35
- paddingBottom: 10,
36
- marginBottom: 0
37
- },
38
- mobile: {
39
- paddingTop: 12,
40
- paddingBottom: 12,
41
- paddingLeft: 12,
42
- marginBottom: 0
43
- }
44
- },
45
- customize: {
46
- layout: {
47
- pcLayout: 'top',
48
- h5Layout: 'top'
49
- }
50
- },
51
- background: {
52
- opacity: 100,
53
- color: '#597EF7',
54
- image: '',
55
- bgType: 'color'
56
- }
57
- };
58
- };
59
-
60
- exports.getDefaultJSON = getDefaultJSON;