@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,100 +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 _quill = _interopRequireDefault(require("quill"));
11
-
12
- var _antd = require("antd");
13
-
14
- var _ToolBar = _interopRequireDefault(require("./ToolBar"));
15
-
16
- require("./index.less");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- var __extends = void 0 && (void 0).__extends || function () {
21
- var _extendStatics = function extendStatics(d, b) {
22
- _extendStatics = Object.setPrototypeOf || {
23
- __proto__: []
24
- } instanceof Array && function (d, b) {
25
- d.__proto__ = b;
26
- } || function (d, b) {
27
- for (var p in b) {
28
- if (b.hasOwnProperty(p)) d[p] = b[p];
29
- }
30
- };
31
-
32
- return _extendStatics(d, b);
33
- };
34
-
35
- return function (d, b) {
36
- _extendStatics(d, b);
37
-
38
- function __() {
39
- this.constructor = d;
40
- }
41
-
42
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43
- };
44
- }();
45
- /* eslint-disable react/no-danger */
46
-
47
-
48
- var TextEditModal =
49
- /** @class */
50
- function (_super) {
51
- __extends(TextEditModal, _super);
52
-
53
- function TextEditModal() {
54
- var _this = _super !== null && _super.apply(this, arguments) || this;
55
-
56
- _this.state = {};
57
- _this.quillRef = null;
58
-
59
- _this.onCommit = function () {
60
- _this.props.onOk(_this.quillRef.root.innerHTML);
61
- };
62
-
63
- return _this;
64
- }
65
-
66
- TextEditModal.prototype.componentDidMount = function () {
67
- this.quillRef = new _quill["default"]('#editor', {
68
- placeholder: 'input text...'
69
- });
70
- this.setState({});
71
- };
72
-
73
- TextEditModal.prototype.render = function () {
74
- var _a = this.props,
75
- onCancel = _a.onCancel,
76
- value = _a.value;
77
- return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
78
- closable: false,
79
- onCancel: onCancel,
80
- onOk: this.onCommit,
81
- open: true,
82
- width: 1000
83
- }, /*#__PURE__*/_react["default"].createElement("div", {
84
- className: "text-editor-content"
85
- }, this.quillRef && /*#__PURE__*/_react["default"].createElement(_ToolBar["default"], {
86
- quillRef: this.quillRef
87
- }), /*#__PURE__*/_react["default"].createElement("div", {
88
- dangerouslySetInnerHTML: {
89
- __html: value
90
- },
91
- id: "editor"
92
- })));
93
- };
94
-
95
- TextEditModal.defaultProps = {};
96
- return TextEditModal;
97
- }(_react["default"].Component);
98
-
99
- var _default = TextEditModal;
100
- exports["default"] = _default;
@@ -1,4 +0,0 @@
1
- .text-editor-content {
2
- height: 400px;
3
-
4
- }
@@ -1,142 +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 _reactQuill = _interopRequireDefault(require("react-quill"));
11
-
12
- require("react-quill/dist/quill.snow.css");
13
-
14
- var _antd = require("antd");
15
-
16
- require("./index.less");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- var __extends = void 0 && (void 0).__extends || function () {
21
- var _extendStatics = function extendStatics(d, b) {
22
- _extendStatics = Object.setPrototypeOf || {
23
- __proto__: []
24
- } instanceof Array && function (d, b) {
25
- d.__proto__ = b;
26
- } || function (d, b) {
27
- for (var p in b) {
28
- if (b.hasOwnProperty(p)) d[p] = b[p];
29
- }
30
- };
31
-
32
- return _extendStatics(d, b);
33
- };
34
-
35
- return function (d, b) {
36
- _extendStatics(d, b);
37
-
38
- function __() {
39
- this.constructor = d;
40
- }
41
-
42
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
43
- };
44
- }();
45
-
46
- var themes = [{
47
- label: 'Theme 1',
48
- style: {
49
- fontSize: '42px',
50
- fontWeight: 'bold'
51
- }
52
- }, {
53
- label: 'Theme 2',
54
- style: {
55
- fontSize: '24px',
56
- fontWeight: 'normal'
57
- }
58
- }];
59
-
60
- var CustomToolbar = function CustomToolbar(_a) {
61
- var quillRefEdit = _a.quillRefEdit,
62
- reactQuillRef = _a.reactQuillRef;
63
- return /*#__PURE__*/_react["default"].createElement("select", {
64
- onChange: function onChange(e) {
65
- var theme = themes.find(function (item) {
66
- return item.label === e.target.value;
67
- });
68
- console.log('theme: ', theme);
69
- var range = reactQuillRef.getEditor().getSelection();
70
-
71
- if (range) {
72
- // reactQuillRef.getEditor().removeFormat(range.index, range.length);
73
- reactQuillRef.getEditor().format('strike', 1);
74
- reactQuillRef.getEditor().format('bold', theme.style.fontWeight === 'bold');
75
- }
76
- }
77
- }, /*#__PURE__*/_react["default"].createElement("option", null, "Choose a theme"), themes.map(function (theme, index) {
78
- return /*#__PURE__*/_react["default"].createElement("option", {
79
- key: index
80
- }, theme.label);
81
- }));
82
- };
83
-
84
- var TextEditModal =
85
- /** @class */
86
- function (_super) {
87
- __extends(TextEditModal, _super);
88
-
89
- function TextEditModal() {
90
- var _this = _super !== null && _super.apply(this, arguments) || this;
91
-
92
- _this.state = {
93
- value: ''
94
- };
95
- _this.reactQuillRef = null;
96
- _this.quillRefEdit = null;
97
-
98
- _this.onCommit = function () {
99
- _this.props.onOk(_this.quillRefEdit.root.innerHTML);
100
- };
101
-
102
- return _this;
103
- }
104
-
105
- TextEditModal.prototype.componentDidMount = function () {
106
- this.quillRefEdit = this.reactQuillRef.getEditor();
107
- this.setState({
108
- value: this.props.value
109
- });
110
- };
111
-
112
- TextEditModal.prototype.render = function () {
113
- var _this = this;
114
-
115
- var onCancel = this.props.onCancel;
116
- var value = this.state.value;
117
- return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
118
- closable: false,
119
- onCancel: onCancel,
120
- onOk: this.onCommit,
121
- open: true,
122
- width: 1000
123
- }, /*#__PURE__*/_react["default"].createElement(CustomToolbar, {
124
- quillRefEdit: this.quillRefEdit,
125
- reactQuillRef: this.reactQuillRef
126
- }), /*#__PURE__*/_react["default"].createElement(_reactQuill["default"], {
127
- ref: function ref(el) {
128
- _this.reactQuillRef = el;
129
- },
130
- style: {
131
- height: 600
132
- },
133
- value: value
134
- }));
135
- };
136
-
137
- TextEditModal.defaultProps = {};
138
- return TextEditModal;
139
- }(_react["default"].Component);
140
-
141
- var _default = TextEditModal;
142
- exports["default"] = _default;
@@ -1,25 +0,0 @@
1
- .text-label-content {
2
- background-color: #f5f6f7;
3
-
4
- .label-wrap {
5
- display: flex;
6
- align-items: center;
7
- flex-wrap: wrap;
8
-
9
- .label-item {
10
- padding: 5px 11px;
11
- font-size: 14px;
12
- display: flex;
13
- align-items: center;
14
- justify-content: center;
15
- border-radius: 5px;
16
- background-color: #fff;
17
- margin: 8px;
18
- cursor: pointer;
19
-
20
- &:hover {
21
- background-color: #f6f6f7;
22
- }
23
- }
24
- }
25
- }