@fonixtree/magic-design 2.0.31 → 2.0.32

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 (131) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/assets/less/modal.less +1 -1
  3. package/es/common/LinkModal/FilteredProductModal/index.js +7 -3
  4. package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
  5. package/es/common/LinkModal/index.js +1 -1
  6. package/es/common/ProductModal/index.js +23 -30
  7. package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  8. package/es/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  9. package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  10. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
  11. package/es/composite-comp/common/components/ProductItem/index.js +4 -2
  12. package/es/composite-comp/common/components/ProductItem/index.less +9 -0
  13. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  14. package/es/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
  15. package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  16. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +32 -27
  17. package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  18. package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  19. package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  20. package/es/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  21. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
  22. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  23. package/es/core/Designer/ToolBarModal/index.js +16 -4
  24. package/es/core/Designer/index.js +3 -0
  25. package/es/decorator/index.js +24 -1
  26. package/es/locale/en/en.json +1 -1
  27. package/es/locale/es/es.json +1 -1
  28. package/es/locale/id/id.json +1 -1
  29. package/es/meta-comp/components/Button/index.js +7 -0
  30. package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
  31. package/es/meta-comp/components/Text/index.js +9 -0
  32. package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  33. package/es/utils/commonUtil.js +17 -3
  34. package/es/utils/currencyUtil.js +29 -10
  35. package/lib/assets/fonts/.DS_Store +0 -0
  36. package/lib/assets/less/modal.less +1 -1
  37. package/lib/common/LinkModal/FilteredProductModal/index.js +7 -3
  38. package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
  39. package/lib/common/LinkModal/index.js +1 -1
  40. package/lib/common/ProductModal/index.js +23 -30
  41. package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  42. package/lib/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  43. package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  44. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
  45. package/lib/composite-comp/common/components/ProductItem/index.js +4 -2
  46. package/lib/composite-comp/common/components/ProductItem/index.less +9 -0
  47. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  48. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
  49. package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  50. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +32 -27
  51. package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  52. package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  53. package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  54. package/lib/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  55. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
  56. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  57. package/lib/core/Designer/ToolBarModal/index.js +16 -4
  58. package/lib/core/Designer/index.js +3 -0
  59. package/lib/decorator/index.js +24 -1
  60. package/lib/locale/en/en.json +1 -1
  61. package/lib/locale/es/es.json +1 -1
  62. package/lib/locale/id/id.json +1 -1
  63. package/lib/meta-comp/components/Button/index.js +7 -0
  64. package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
  65. package/lib/meta-comp/components/Text/index.js +9 -0
  66. package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  67. package/lib/utils/commonUtil.js +17 -3
  68. package/lib/utils/currencyUtil.js +29 -10
  69. package/package.json +1 -1
  70. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
  71. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
  72. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
  73. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
  74. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
  75. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
  76. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
  77. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
  78. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
  79. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
  80. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
  81. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
  82. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
  83. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
  84. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
  85. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
  86. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
  87. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
  88. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
  89. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
  90. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
  91. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
  92. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
  93. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
  94. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
  95. package/es/core/Designer/TextEditModal/ToolBar/index.js +0 -219
  96. package/es/core/Designer/TextEditModal/ToolBar/index.less +0 -19
  97. package/es/core/Designer/TextEditModal/index.js +0 -100
  98. package/es/core/Designer/TextEditModal/index.less +0 -4
  99. package/es/core/Designer/TextEditModal_old/index.js +0 -142
  100. package/es/core/Designer/TextEditModal_old/index.less +0 -25
  101. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
  102. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
  103. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
  104. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
  105. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
  106. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
  107. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
  108. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
  109. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
  110. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
  111. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
  112. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
  113. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
  114. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
  115. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
  116. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
  117. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
  118. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
  119. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
  120. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
  121. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
  122. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
  123. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
  124. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
  125. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
  126. package/lib/core/Designer/TextEditModal/ToolBar/index.js +0 -219
  127. package/lib/core/Designer/TextEditModal/ToolBar/index.less +0 -19
  128. package/lib/core/Designer/TextEditModal/index.js +0 -100
  129. package/lib/core/Designer/TextEditModal/index.less +0 -4
  130. package/lib/core/Designer/TextEditModal_old/index.js +0 -142
  131. package/lib/core/Designer/TextEditModal_old/index.less +0 -25
@@ -1,29 +0,0 @@
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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var _default = function _default(_a) {
13
- var onChange = _a.onChange;
14
- return /*#__PURE__*/_react["default"].createElement("svg", {
15
- id: "ne-t-italic",
16
- onClick: onChange,
17
- viewBox: "0 0 256 256",
18
- xmlns: "http://www.w3.org/2000/svg"
19
- }, /*#__PURE__*/_react["default"].createElement("g", {
20
- fill: "currentColor",
21
- fillRule: "nonzero"
22
- }, /*#__PURE__*/_react["default"].createElement("path", {
23
- d: "M135.012 43.64c1.121-5.408 6.414-8.883 11.822-7.762 5.316 1.102 8.765 6.235 7.815 11.546l-.053.275-33.998 164.017c-1.121 5.408-6.414 8.883-11.822 7.762-5.316-1.102-8.765-6.235-7.815-11.547l.053-.275L135.012 43.64Z"
24
- }), /*#__PURE__*/_react["default"].createElement("path", {
25
- d: "M186 29.25c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996l-.28.004h-80c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996l.28-.004h80ZM150 226.75c5.523 0 10-4.477 10-10 0-5.43-4.327-9.848-9.72-9.996l-.28-.004H70c-5.523 0-10 4.477-10 10 0 5.43 4.327 9.848 9.72 9.996l.28.004h80Z"
26
- })));
27
- };
28
-
29
- exports["default"] = _default;
@@ -1,26 +0,0 @@
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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var _default = function _default(_a) {
13
- var onChange = _a.onChange;
14
- return /*#__PURE__*/_react["default"].createElement("svg", {
15
- id: "ne-t-link",
16
- onClick: onChange,
17
- viewBox: "0 0 256 256",
18
- xmlns: "http://www.w3.org/2000/svg"
19
- }, /*#__PURE__*/_react["default"].createElement("path", {
20
- d: "M155.639 173.9c3.839 3.84 3.904 10.023.195 13.942l-.195.2-30.783 30.783c-24.052 24.052-63.167 23.884-87.366-.315-23.957-23.957-24.362-62.533-1.03-86.64l.715-.726 30.783-30.783c3.905-3.905 10.237-3.905 14.142 0 3.839 3.84 3.904 10.023.195 13.942l-.195.2-30.783 30.783c-16.214 16.214-16.1 42.666.315 59.082 16.252 16.251 42.34 16.525 58.592.797l.49-.482 30.783-30.783c3.905-3.905 10.237-3.905 14.142 0Zm17.366-90.905c3.839 3.84 3.904 10.023.195 13.942l-.195.2-76.368 76.368c-3.905 3.905-10.237 3.905-14.142 0-3.839-3.84-3.904-10.023-.195-13.942l.195-.2 76.368-76.368c3.905-3.905 10.237-3.905 14.142 0ZM218.51 37.49c23.957 23.957 24.362 62.533 1.03 86.64l-.715.726-30.783 30.783c-3.905 3.905-10.237 3.905-14.142 0-3.839-3.84-3.904-10.023-.195-13.942l.195-.2 30.783-30.783c16.214-16.214 16.1-42.666-.315-59.082-16.252-16.251-42.34-16.525-58.592-.797l-.49.482L114.503 82.1c-3.905 3.905-10.237 3.905-14.142 0-3.839-3.84-3.904-10.023-.195-13.942l.195-.2 30.783-30.783c24.052-24.052 63.167-23.884 87.366.315Z",
21
- fill: "currentColor",
22
- fillRule: "nonzero"
23
- }));
24
- };
25
-
26
- exports["default"] = _default;
@@ -1,27 +0,0 @@
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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var _default = function _default(_a) {
13
- var onChange = _a.onChange;
14
- return /*#__PURE__*/_react["default"].createElement("svg", {
15
- id: "ne-t-order-list",
16
- onClick: onChange,
17
- viewBox: "0 0 256 256",
18
- xmlns: "http://www.w3.org/2000/svg"
19
- }, /*#__PURE__*/_react["default"].createElement("g", {
20
- fill: "currentColor",
21
- fillRule: "nonzero"
22
- }, /*#__PURE__*/_react["default"].createElement("path", {
23
- d: "M215 118c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L215 138H101c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L101 118h114ZM215 35c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L215 55H101c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L101 35h114ZM215 201c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L215 221H101c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L101 201h114ZM65.988 190.061l-.739.79-1.88 2.061-4.394 4.885-6.435 7.205h13.852a9 9 0 0 1 8.996 8.736l.004.265a9 9 0 0 1-8.735 8.996l-.265.004H32.5c-7.762 0-11.883-9.167-6.732-14.973l15.666-17.621 6.446-7.197 3.323-3.665 1.424-1.54.623-.653.408-.407.042-.039c1.203-1.106 1.855-2.536 1.855-4.05 0-3.128-2.87-5.855-6.637-5.855-3.681 0-6.508 2.607-6.632 5.647l-.004.208a9 9 0 1 1-18 0c0-13.281 11.13-23.855 24.636-23.855 13.507 0 24.637 10.574 24.637 23.855 0 6.497-2.703 12.572-7.355 17.003l-.212.2ZM43.206 25.413c5.694-5.302 14.934-1.363 15.13 6.337l.003.25v73a9 9 0 0 1-17.996.265L40.34 105V52.583c-3.556 2.568-8.513 2.208-11.653-.96l-.198-.207a9 9 0 0 1 .247-12.522l.206-.198 14.265-13.283Z"
24
- })));
25
- };
26
-
27
- exports["default"] = _default;
@@ -1,31 +0,0 @@
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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var _default = function _default(_a) {
13
- var onChange = _a.onChange;
14
- return /*#__PURE__*/_react["default"].createElement("svg", {
15
- id: "ne-t-strikethrough",
16
- onClick: onChange,
17
- viewBox: "0 0 256 256",
18
- xmlns: "http://www.w3.org/2000/svg"
19
- }, /*#__PURE__*/_react["default"].createElement("g", {
20
- fill: "currentColor",
21
- fillRule: "nonzero"
22
- }, /*#__PURE__*/_react["default"].createElement("path", {
23
- d: "M130.439 23.2c26.526 0 50.232 14.436 59.932 36.315 2.238 5.049-.04 10.956-5.089 13.195-5.049 2.238-10.956-.04-13.195-5.089-6.395-14.425-22.81-24.421-41.648-24.421C105.616 43.2 86 60.316 86 80.7c0 4.675 1.014 9.22 2.977 13.492 6.467 14.074 22.493 23.812 40.903 24.005l.559.003c5.523 0 10 4.477 10 10s-4.477 10-10 10c-26.244 0-49.743-14.13-59.635-35.657C67.649 95.677 66 88.286 66 80.7c0-32.083 29.13-57.5 64.439-57.5Z"
24
- }), /*#__PURE__*/_react["default"].createElement("path", {
25
- d: "M125.281 118C163.348 118 195 143.176 195 175.5S163.348 233 125.281 233c-29.214 0-55.305-14.9-65.41-37.497-2.254-5.042.005-10.957 5.047-13.211 4.955-2.216 10.753-.072 13.091 4.788l.12.259C84.819 202.3 103.556 213 125.28 213 153.178 213 175 195.643 175 175.5S153.178 138 125.281 138c-5.522 0-10-4.477-10-10s4.478-10 10-10Z"
26
- }), /*#__PURE__*/_react["default"].createElement("path", {
27
- d: "M220 118c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L220 138H36c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L36 118h184Z"
28
- })));
29
- };
30
-
31
- exports["default"] = _default;
@@ -1,34 +0,0 @@
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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var _default = function _default(_a) {
13
- var onChange = _a.onChange;
14
- return /*#__PURE__*/_react["default"].createElement("svg", {
15
- id: "ne-t-underline",
16
- onClick: onChange,
17
- viewBox: "0 0 256 256",
18
- xmlns: "http://www.w3.org/2000/svg"
19
- }, /*#__PURE__*/_react["default"].createElement("g", {
20
- fill: "currentColor",
21
- fillRule: "evenodd"
22
- }, /*#__PURE__*/_react["default"].createElement("path", {
23
- d: "M184 24c5.43 0 9.848 4.327 9.996 9.72L194 34v94.393C194 161.1 164.16 187 128 187c-35.8 0-65.403-25.385-65.991-57.628l-.009-.98V34c0-5.523 4.477-10 10-10 5.43 0 9.848 4.327 9.996 9.72L82 34v94.393C82 149.375 102.305 167 128 167c25.438 0 45.593-17.274 45.994-37.979l.006-.628V34c0-5.523 4.477-10 10-10Z",
24
- fillRule: "nonzero"
25
- }), /*#__PURE__*/_react["default"].createElement("rect", {
26
- height: "22",
27
- rx: "11",
28
- width: "176",
29
- x: "40",
30
- y: "210"
31
- })));
32
- };
33
-
34
- exports["default"] = _default;
@@ -1,41 +0,0 @@
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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var _default = function _default(_a) {
13
- var onChange = _a.onChange;
14
- return /*#__PURE__*/_react["default"].createElement("svg", {
15
- id: "ne-t-unorder-list",
16
- onClick: onChange,
17
- viewBox: "0 0 256 256",
18
- xmlns: "http://www.w3.org/2000/svg"
19
- }, /*#__PURE__*/_react["default"].createElement("g", {
20
- fill: "currentColor",
21
- fillRule: "evenodd"
22
- }, /*#__PURE__*/_react["default"].createElement("g", {
23
- fillRule: "nonzero"
24
- }, /*#__PURE__*/_react["default"].createElement("path", {
25
- d: "M215 118c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L215 138H96c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L96 118h119ZM215 35c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L215 55H96c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L96 35h119ZM215 201c5.523 0 10 4.477 10 10 0 5.43-4.327 9.848-9.72 9.996L215 221H96c-5.523 0-10-4.477-10-10 0-5.43 4.327-9.848 9.72-9.996L96 201h119Z"
26
- })), /*#__PURE__*/_react["default"].createElement("circle", {
27
- cx: "44",
28
- cy: "45",
29
- r: "16"
30
- }), /*#__PURE__*/_react["default"].createElement("circle", {
31
- cx: "44",
32
- cy: "128",
33
- r: "16"
34
- }), /*#__PURE__*/_react["default"].createElement("circle", {
35
- cx: "44",
36
- cy: "211",
37
- r: "16"
38
- })));
39
- };
40
-
41
- exports["default"] = _default;
@@ -1,136 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _classnames = _interopRequireDefault(require("classnames"));
11
-
12
- var _BoldSVG = _interopRequireDefault(require("./images/BoldSVG"));
13
-
14
- var _ItalicSVG = _interopRequireDefault(require("./images/ItalicSVG"));
15
-
16
- var _StrikeSVG = _interopRequireDefault(require("./images/StrikeSVG"));
17
-
18
- var _UnderlineSVG = _interopRequireDefault(require("./images/UnderlineSVG"));
19
-
20
- var _ColorPickerBtn = _interopRequireDefault(require("./components/ColorPickerBtn"));
21
-
22
- var _LinkBtn = _interopRequireDefault(require("./components/LinkBtn"));
23
-
24
- var _AlignPicker = _interopRequireDefault(require("./components/AlignPicker"));
25
-
26
- var _OrderSVG = _interopRequireDefault(require("./images/OrderSVG"));
27
-
28
- var _UnorderSVG = _interopRequireDefault(require("./images/UnorderSVG"));
29
-
30
- require("./index.less");
31
-
32
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
33
-
34
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
35
-
36
- var __extends = void 0 && (void 0).__extends || function () {
37
- var _extendStatics = function extendStatics(d, b) {
38
- _extendStatics = Object.setPrototypeOf || {
39
- __proto__: []
40
- } instanceof Array && function (d, b) {
41
- d.__proto__ = b;
42
- } || function (d, b) {
43
- for (var p in b) {
44
- if (b.hasOwnProperty(p)) d[p] = b[p];
45
- }
46
- };
47
-
48
- return _extendStatics(d, b);
49
- };
50
-
51
- return function (d, b) {
52
- _extendStatics(d, b);
53
-
54
- function __() {
55
- this.constructor = d;
56
- }
57
-
58
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
59
- };
60
- }();
61
-
62
- var iconTypeMap = {
63
- bold: _BoldSVG["default"],
64
- italic: _ItalicSVG["default"],
65
- strike: _StrikeSVG["default"],
66
- underline: _UnderlineSVG["default"],
67
- listOrder: _OrderSVG["default"],
68
- background: function background(props) {
69
- return /*#__PURE__*/_react["default"].createElement(_ColorPickerBtn["default"], _extends({
70
- type: "background"
71
- }, props));
72
- },
73
- listUnOrder: _UnorderSVG["default"],
74
- link: function link(props) {
75
- return /*#__PURE__*/_react["default"].createElement(_LinkBtn["default"], props);
76
- },
77
- color: function color(props) {
78
- return /*#__PURE__*/_react["default"].createElement(_ColorPickerBtn["default"], props);
79
- },
80
- align: function align(props) {
81
- return /*#__PURE__*/_react["default"].createElement(_AlignPicker["default"], props);
82
- }
83
- };
84
-
85
- var ToolBtn =
86
- /** @class */
87
- function (_super) {
88
- __extends(ToolBtn, _super);
89
-
90
- function ToolBtn() {
91
- var _this = _super !== null && _super.apply(this, arguments) || this;
92
-
93
- _this.state = {};
94
- _this.compareData = null;
95
- return _this;
96
- }
97
-
98
- ToolBtn.prototype.shouldComponentUpdate = function (nextProps) {
99
- var active = nextProps.active,
100
- value = nextProps.value;
101
- var compareTarget = JSON.stringify({
102
- active: active,
103
- value: value
104
- });
105
-
106
- if (this.compareData != compareTarget) {
107
- this.compareData = compareTarget;
108
- return true;
109
- }
110
-
111
- return false;
112
- };
113
-
114
- ToolBtn.prototype.render = function () {
115
- var _a = this.props,
116
- active = _a.active,
117
- _b = _a.type,
118
- type = _b === void 0 ? 'bold' : _b,
119
- onChange = _a.onChange,
120
- value = _a.value;
121
- return /*#__PURE__*/_react["default"].createElement("div", {
122
- className: (0, _classnames["default"])('tool-btn-wrap', {
123
- active: active
124
- })
125
- }, iconTypeMap[type]({
126
- value: value,
127
- onChange: onChange
128
- }));
129
- };
130
-
131
- ToolBtn.defaultProps = {};
132
- return ToolBtn;
133
- }(_react["default"].Component);
134
-
135
- var _default = ToolBtn;
136
- exports["default"] = _default;
@@ -1,25 +0,0 @@
1
- .tool-btn-wrap {
2
- width: 26px;
3
- height: 26px;
4
- display: flex;
5
- align-items: center;
6
- justify-content: center;
7
- cursor: pointer;
8
- border-radius: 6px;
9
- padding: 0;
10
- border: none;
11
- transition: .2s all linear;
12
-
13
- &:hover {
14
- background: #f8f8f8;
15
- }
16
-
17
- &.active {
18
- background: #E7E9E8;
19
- }
20
-
21
- svg {
22
- height: 18px;
23
- height: 18px;
24
- }
25
- }
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,219 +0,0 @@
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
- require("./index.less");
11
-
12
- var _coreUtil = require("src/components/utils/coreUtil");
13
-
14
- var _ToolBtn = _interopRequireDefault(require("./ToolBtn"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
-
18
- var __extends = void 0 && (void 0).__extends || function () {
19
- var _extendStatics = function extendStatics(d, b) {
20
- _extendStatics = Object.setPrototypeOf || {
21
- __proto__: []
22
- } instanceof Array && function (d, b) {
23
- d.__proto__ = b;
24
- } || function (d, b) {
25
- for (var p in b) {
26
- if (b.hasOwnProperty(p)) d[p] = b[p];
27
- }
28
- };
29
-
30
- return _extendStatics(d, b);
31
- };
32
-
33
- return function (d, b) {
34
- _extendStatics(d, b);
35
-
36
- function __() {
37
- this.constructor = d;
38
- }
39
-
40
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41
- };
42
- }();
43
-
44
- var ToolBar =
45
- /** @class */
46
- function (_super) {
47
- __extends(ToolBar, _super);
48
-
49
- function ToolBar() {
50
- var _this = _super !== null && _super.apply(this, arguments) || this;
51
-
52
- _this.state = {
53
- quillFormat: {}
54
- };
55
-
56
- _this.onSelectionChange = function () {
57
- var range = _this.props.quillRef.getSelection();
58
-
59
- if (range) {
60
- var quillFormat = _this.props.quillRef.getFormat();
61
-
62
- console.log('quillFormat: ', quillFormat);
63
-
64
- _this.setState({
65
- quillFormat: quillFormat
66
- });
67
- }
68
- };
69
-
70
- _this.onToolBtnClick = function (type, value) {
71
- window._maginc_clickUrl = _coreUtil.clickUrl;
72
- console.log('value: ', value);
73
- var quillFormat = _this.state.quillFormat;
74
-
75
- if (type == 'bold') {
76
- _this.props.quillRef.format('bold', !quillFormat['bold']);
77
- } else if (type == 'italic') {
78
- _this.props.quillRef.format('italic', !quillFormat['italic']);
79
- } else if (type == 'strike') {
80
- _this.props.quillRef.format('strike', !quillFormat['strike']);
81
- } else if (type == 'underline') {
82
- _this.props.quillRef.format('underline', !quillFormat['underline']);
83
- } else if (type == 'color') {
84
- _this.props.quillRef.format('color', value);
85
- } else if (type == 'align') {
86
- _this.props.quillRef.format('align', value);
87
- } else if (type == 'listOrder') {
88
- var currentListType = quillFormat['list'];
89
-
90
- _this.props.quillRef.format('list', currentListType == 'ordered' ? '' : 'ordered');
91
- } else if (type == 'listUnOrder') {
92
- var currentListType = quillFormat['list'];
93
-
94
- _this.props.quillRef.format('list', currentListType == 'bullet' ? '' : 'bullet');
95
- } else if (type == 'link') {
96
- _this.props.quillRef.format('link', {
97
- link: value.name,
98
- onclick: '_maginc_clickUrl()'
99
- });
100
- }
101
-
102
- _this.onSelectionChange();
103
- };
104
-
105
- return _this;
106
- }
107
-
108
- ToolBar.prototype.componentDidMount = function () {
109
- this.props.quillRef.on('selection-change', this.onSelectionChange);
110
- };
111
-
112
- ToolBar.prototype.componentWillUnmount = function () {
113
- this.props.quillRef.off('selection-change', this.onSelectionChange);
114
- };
115
-
116
- ToolBar.prototype.render = function () {
117
- var _this = this;
118
-
119
- var quillFormat = this.state.quillFormat;
120
- return /*#__PURE__*/_react["default"].createElement("div", {
121
- className: "toolbar-wrap"
122
- }, /*#__PURE__*/_react["default"].createElement("div", {
123
- className: "tool-item"
124
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
125
- active: quillFormat['bold'],
126
- onChange: function onChange() {
127
- _this.onToolBtnClick('bold');
128
- },
129
- type: "bold"
130
- })), /*#__PURE__*/_react["default"].createElement("div", {
131
- className: "tool-item"
132
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
133
- active: quillFormat['italic'],
134
- onChange: function onChange() {
135
- _this.onToolBtnClick('italic');
136
- },
137
- type: "italic"
138
- })), /*#__PURE__*/_react["default"].createElement("div", {
139
- className: "tool-item"
140
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
141
- active: quillFormat['strike'],
142
- onChange: function onChange() {
143
- _this.onToolBtnClick('strike');
144
- },
145
- type: "strike"
146
- })), /*#__PURE__*/_react["default"].createElement("div", {
147
- className: "tool-item"
148
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
149
- active: quillFormat['underline'],
150
- onChange: function onChange() {
151
- _this.onToolBtnClick('underline');
152
- },
153
- type: "underline"
154
- })), /*#__PURE__*/_react["default"].createElement("div", {
155
- className: "tooll-line"
156
- }), /*#__PURE__*/_react["default"].createElement("div", {
157
- className: "tool-item"
158
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
159
- onChange: function onChange(value) {
160
- _this.onToolBtnClick('color', value);
161
- },
162
- type: "color",
163
- value: {
164
- color: quillFormat['color']
165
- }
166
- })), /*#__PURE__*/_react["default"].createElement("div", {
167
- className: "tool-item"
168
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
169
- onChange: function onChange(value) {
170
- _this.onToolBtnClick('background', value);
171
- },
172
- type: "background",
173
- value: {
174
- color: quillFormat['background']
175
- }
176
- })), /*#__PURE__*/_react["default"].createElement("div", {
177
- className: "tool-item"
178
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
179
- onChange: function onChange(value) {
180
- _this.onToolBtnClick('align', value);
181
- },
182
- type: "align",
183
- value: {
184
- align: quillFormat['align']
185
- }
186
- })), /*#__PURE__*/_react["default"].createElement("div", {
187
- className: "tool-item"
188
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
189
- active: quillFormat['list'] == 'bullet',
190
- onChange: function onChange() {
191
- _this.onToolBtnClick('listUnOrder');
192
- },
193
- type: "listUnOrder"
194
- })), /*#__PURE__*/_react["default"].createElement("div", {
195
- className: "tool-item"
196
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
197
- active: quillFormat['list'] == 'ordered',
198
- onChange: function onChange() {
199
- _this.onToolBtnClick('listOrder');
200
- },
201
- type: "listOrder"
202
- })), /*#__PURE__*/_react["default"].createElement("div", {
203
- className: "tooll-line"
204
- }), /*#__PURE__*/_react["default"].createElement("div", {
205
- className: "tool-item"
206
- }, /*#__PURE__*/_react["default"].createElement(_ToolBtn["default"], {
207
- onChange: function onChange(value) {
208
- _this.onToolBtnClick('link', value);
209
- },
210
- type: "link"
211
- })));
212
- };
213
-
214
- ToolBar.defaultProps = {};
215
- return ToolBar;
216
- }(_react["default"].Component);
217
-
218
- var _default = ToolBar;
219
- exports["default"] = _default;
@@ -1,19 +0,0 @@
1
- .toolbar-wrap {
2
- display: flex;
3
- align-items: center;
4
- height: 42px;
5
- border-bottom: 1px solid rgba(0, 0, 0, .04);
6
- border-top: 1px solid rgba(0, 0, 0, .04);
7
-
8
- .tool-item {
9
- margin: 0 5px;
10
- }
11
-
12
- .tooll-line {
13
- display: inline-flex;
14
- width: 1px;
15
- height: 24px;
16
- background-color: rgba(0, 0, 0, .04);
17
- margin: 0 5px;
18
- }
19
- }