ecomlab-components-next 0.1.75 → 0.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Article/ArcticleWiki/ArcticleWiki.stories.js +11 -1
- package/dist/components/Article/ArticleViewV2/ArticleViewV2.stories.js +11 -1
- package/dist/components/Article/EditWrapper/EditWrapper.scss +1 -1
- package/dist/components/Article/ListOfContent/ListOfContent.js +23 -19
- package/dist/components/Article/ModalReplaceBlock/ModalReplaceBlock.js +3 -0
- package/dist/components/Article/QuestionAnswer/QuestionAnswer.js +220 -0
- package/dist/components/Article/QuestionAnswer/QuestionAnswer.scss +193 -0
- package/dist/components/Article/QuestionAnswer/img/link.svg +4 -0
- package/dist/components/Article/SelectedBlocks/SelectedBlocks.js +4 -0
- package/dist/components/ConstructorComponents/MarqueImgs/MarqueImgs.js +7 -3
- package/package.json +1 -1
|
@@ -21,7 +21,17 @@ var apiData = {
|
|
|
21
21
|
"views": 97,
|
|
22
22
|
"active": true,
|
|
23
23
|
"author": ["Елена", "rgb(224, 173, 46)"],
|
|
24
|
-
"blocks": [{
|
|
24
|
+
"blocks": [, {
|
|
25
|
+
"content": [{
|
|
26
|
+
"value": "Заголовок",
|
|
27
|
+
"properties": {
|
|
28
|
+
"answerValue": "Текст"
|
|
29
|
+
}
|
|
30
|
+
}],
|
|
31
|
+
"block_id": 2247,
|
|
32
|
+
"block_type": "question",
|
|
33
|
+
"block_before": 2323
|
|
34
|
+
}, {
|
|
25
35
|
"content": [{
|
|
26
36
|
"value": "Настоящий Закон регулирует отношения, возникающие между потребителями и изготовителями, исполнителями, импортерами, продавцами, владельцами агрегаторов информации о товарах (услугах) при продаже товаров (выполнении работ, оказании услуг), устанавливает права потребителей на приобретение товаров (работ, услуг) надлежащего качества и безопасных для жизни, здоровья, имущества потребителей и окружающей среды, получение информации о товарах (работах, услугах) и об их изготовителях (исполнителях, продавцах), о владельцах агрегаторов информации о товарах (услугах), просвещение, государственную и общественную защиту их интересов, а также определяет механизм реализации этих прав.",
|
|
27
37
|
"properties": {}
|
|
@@ -17,6 +17,16 @@ var apiData = {
|
|
|
17
17
|
"active": true,
|
|
18
18
|
"author": ["Елена", "rgb(224, 173, 46)"],
|
|
19
19
|
"blocks": [{
|
|
20
|
+
"content": [{
|
|
21
|
+
"value": "Заголовок",
|
|
22
|
+
"properties": {
|
|
23
|
+
"answerValue": "Текст"
|
|
24
|
+
}
|
|
25
|
+
}],
|
|
26
|
+
"block_id": 2247,
|
|
27
|
+
"block_type": "question",
|
|
28
|
+
"block_before": 2323
|
|
29
|
+
}, {
|
|
20
30
|
"content": [{
|
|
21
31
|
"value": "Настоящий Закон регулирует отношения, возникающие между потребителями и изготовителями, исполнителями, импортерами, продавцами, владельцами агрегаторов информации о товарах (услугах) при продаже товаров (выполнении работ, оказании услуг), устанавливает права потребителей на приобретение товаров (работ, услуг) надлежащего качества и безопасных для жизни, здоровья, имущества потребителей и окружающей среды, получение информации о товарах (работах, услугах) и об их изготовителях (исполнителях, продавцах), о владельцах агрегаторов информации о товарах (услугах), просвещение, государственную и общественную защиту их интересов, а также определяет механизм реализации этих прав.",
|
|
22
32
|
"properties": {}
|
|
@@ -138,7 +148,7 @@ var _default = exports["default"] = {
|
|
|
138
148
|
// articleTitleRef={articleTitleRef}
|
|
139
149
|
setArticleTitle: (0, _addonActions.action)('setArticleTitle'),
|
|
140
150
|
setContentChanged: (0, _addonActions.action)('setContentChanged'),
|
|
141
|
-
readonly:
|
|
151
|
+
readonly: true,
|
|
142
152
|
loading: false,
|
|
143
153
|
apiData: apiData,
|
|
144
154
|
contentData: [],
|
|
@@ -72,25 +72,29 @@ var ListOfContent = function ListOfContent(_ref) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
}, [init]);
|
|
75
|
-
var linksList = links === null || links === void 0 ? void 0 : links.map(function (
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
75
|
+
var linksList = links === null || links === void 0 ? void 0 : links.map(function () {
|
|
76
|
+
var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
77
|
+
var index = arguments.length > 1 ? arguments[1] : undefined;
|
|
78
|
+
var title = item.title,
|
|
79
|
+
id = item.id;
|
|
80
|
+
if (title) {
|
|
81
|
+
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
82
|
+
key: index,
|
|
83
|
+
href: "#".concat(id),
|
|
84
|
+
className: "list-of-content__link"
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
86
|
+
style: {
|
|
87
|
+
background: activeSection == id ? '#243AFF' : ''
|
|
88
|
+
},
|
|
89
|
+
className: "list-of-content__point"
|
|
90
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
91
|
+
className: "list-of-content__label",
|
|
92
|
+
style: {
|
|
93
|
+
color: activeSection == id ? '#243AFF !important' : ''
|
|
94
|
+
}
|
|
95
|
+
}, (0, _htmlReactParser["default"])(title)));
|
|
96
|
+
}
|
|
97
|
+
return null; // важно вернуть null, чтобы map не выдал undefined
|
|
94
98
|
});
|
|
95
99
|
var translateContent = function translateContent() {
|
|
96
100
|
if (lang == 'en') return 'Table of Contents';
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.QuestionAnswer = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _EditWrapper = require("../EditWrapper/EditWrapper");
|
|
11
|
+
var _image = _interopRequireDefault(require("next/image"));
|
|
12
|
+
var _link = _interopRequireDefault(require("./img/link.svg"));
|
|
13
|
+
var _useDebounce = require("../../../common/hooks/useDebounce");
|
|
14
|
+
require("./QuestionAnswer.scss");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
18
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
19
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
21
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
26
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
27
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
30
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
31
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
32
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } // import { ModalReplaceLink } from '../../Modal/ModalReplaceLink/ModalReplaceLink'
|
|
33
|
+
// import { TextAlignment } from '../TextAlignment/TextAlignment'
|
|
34
|
+
// import { TextSize } from '../TextSize/TextSize'
|
|
35
|
+
var QuestionAnswer = exports.QuestionAnswer = function QuestionAnswer(_ref) {
|
|
36
|
+
var _data$, _data$2;
|
|
37
|
+
var id = _ref.id,
|
|
38
|
+
data = _ref.data,
|
|
39
|
+
editMode = _ref.editMode,
|
|
40
|
+
align = _ref.align,
|
|
41
|
+
onChange = _ref.onChange,
|
|
42
|
+
fontSize = _ref.fontSize,
|
|
43
|
+
onAddNewBlockClick = _ref.onAddNewBlockClick,
|
|
44
|
+
addNewBlock = _ref.addNewBlock,
|
|
45
|
+
position = _ref.position,
|
|
46
|
+
setIsChangeTypeModal = _ref.setIsChangeTypeModal,
|
|
47
|
+
changeContent = _ref.changeContent,
|
|
48
|
+
deleteContent = _ref.deleteContent,
|
|
49
|
+
setIsModal = _ref.setIsModal,
|
|
50
|
+
ind = _ref.ind,
|
|
51
|
+
setCurrentIndex = _ref.setCurrentIndex,
|
|
52
|
+
before = _ref.before,
|
|
53
|
+
setBeforeBlock = _ref.setBeforeBlock,
|
|
54
|
+
setContentArr = _ref.setContentArr,
|
|
55
|
+
deleteBlock = _ref.deleteBlock,
|
|
56
|
+
_ref$readonly = _ref.readonly,
|
|
57
|
+
readonly = _ref$readonly === void 0 ? false : _ref$readonly,
|
|
58
|
+
draggableElement = _ref.draggableElement,
|
|
59
|
+
setDraggableElement = _ref.setDraggableElement,
|
|
60
|
+
articleId = _ref.articleId,
|
|
61
|
+
fetchDataById = _ref.fetchDataById,
|
|
62
|
+
changeBlock = _ref.changeBlock;
|
|
63
|
+
var _useState = (0, _react.useState)((_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.value),
|
|
64
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
65
|
+
content = _useState2[0],
|
|
66
|
+
setContent = _useState2[1];
|
|
67
|
+
var ref = (0, _react.useRef)();
|
|
68
|
+
var debounceChange = (0, _useDebounce.useDebounce)(changeContent, 1000);
|
|
69
|
+
var handleDeleteBlock = function handleDeleteBlock(e) {
|
|
70
|
+
// setContent(e.currentTarget.textContent)
|
|
71
|
+
setContentArr(function (prev) {
|
|
72
|
+
return prev.filter(function (el) {
|
|
73
|
+
if ((el === null || el === void 0 ? void 0 : el.block_id) != id) {
|
|
74
|
+
return el;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
deleteBlock(id);
|
|
79
|
+
};
|
|
80
|
+
var handleInput = function handleInput(e) {
|
|
81
|
+
var _ref$current, _answerRef$current;
|
|
82
|
+
debounceChange(id, [{
|
|
83
|
+
value: ref === null || ref === void 0 || (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.innerHTML,
|
|
84
|
+
properties: {
|
|
85
|
+
answerValue: answerRef === null || answerRef === void 0 || (_answerRef$current = answerRef.current) === null || _answerRef$current === void 0 ? void 0 : _answerRef$current.innerHTML
|
|
86
|
+
}
|
|
87
|
+
}]);
|
|
88
|
+
setContentArr(function (prev) {
|
|
89
|
+
return prev.map(function (el) {
|
|
90
|
+
if ((el === null || el === void 0 ? void 0 : el.block_id) == id) {
|
|
91
|
+
var _ref$current2;
|
|
92
|
+
return _objectSpread(_objectSpread({}, el), {}, {
|
|
93
|
+
content: [{
|
|
94
|
+
value: ref === null || ref === void 0 || (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.innerHTML
|
|
95
|
+
}]
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
return el;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
var handlePaste = function handlePaste(event) {
|
|
104
|
+
event.preventDefault();
|
|
105
|
+
var clipboardData = event.clipboardData || window.clipboardData;
|
|
106
|
+
var pastedHTML = clipboardData.getData('text/html') || clipboardData.getData('text/plain');
|
|
107
|
+
if (pastedHTML) {
|
|
108
|
+
var parser = new DOMParser();
|
|
109
|
+
var doc = parser.parseFromString(pastedHTML, 'text/html');
|
|
110
|
+
|
|
111
|
+
// Удаляем все теги <br>
|
|
112
|
+
doc.querySelectorAll('br').forEach(function (el) {
|
|
113
|
+
return el.remove();
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// Оставляем только безопасные теги
|
|
117
|
+
var allowedTags = ['p', 'b', 'i', 'u', 'a'];
|
|
118
|
+
doc.body.querySelectorAll('*').forEach(function (el) {
|
|
119
|
+
if (!allowedTags.includes(el.tagName.toLowerCase())) {
|
|
120
|
+
el.replaceWith.apply(el, _toConsumableArray(el.childNodes)); // Заменяем на чистый текст
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
var cleanHTML = doc.body.innerHTML;
|
|
124
|
+
|
|
125
|
+
// Вставляем очищенный HTML без форматирования
|
|
126
|
+
document.execCommand('insertHTML', false, cleanHTML);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// ответ
|
|
131
|
+
var _useState3 = (0, _react.useState)(((_data$2 = data[0]) === null || _data$2 === void 0 || (_data$2 = _data$2.properties) === null || _data$2 === void 0 ? void 0 : _data$2.answerValue) || ''),
|
|
132
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
133
|
+
answer = _useState4[0],
|
|
134
|
+
setAnswer = _useState4[1]; // предполагаем, что это второй элемент
|
|
135
|
+
|
|
136
|
+
var answerRef = (0, _react.useRef)();
|
|
137
|
+
return /*#__PURE__*/_react["default"].createElement(_EditWrapper.EditWrapper, {
|
|
138
|
+
id: id,
|
|
139
|
+
before: before,
|
|
140
|
+
articleId: articleId,
|
|
141
|
+
changeBlock: changeBlock,
|
|
142
|
+
readonly: readonly,
|
|
143
|
+
draggableElement: draggableElement,
|
|
144
|
+
setDraggableElement: setDraggableElement,
|
|
145
|
+
fetchDataById: fetchDataById,
|
|
146
|
+
deleteFunc: function deleteFunc(e) {
|
|
147
|
+
return handleDeleteBlock(id);
|
|
148
|
+
},
|
|
149
|
+
type: "question",
|
|
150
|
+
child: /*#__PURE__*/_react["default"].createElement("div", {
|
|
151
|
+
className: 'questions__item',
|
|
152
|
+
onContextMenu: function onContextMenu(e) {
|
|
153
|
+
if (!readonly) {
|
|
154
|
+
e.preventDefault();
|
|
155
|
+
setCurrentIndex(ind);
|
|
156
|
+
setIsModal(true);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
160
|
+
className: 'questions__title-box'
|
|
161
|
+
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
162
|
+
className: 'questions__link-title',
|
|
163
|
+
href: "#".concat(id)
|
|
164
|
+
}, /*#__PURE__*/_react["default"].createElement("h3", {
|
|
165
|
+
id: id,
|
|
166
|
+
className: "".concat('article__title ' + 'questions__title-questions', " ", "title__medium"),
|
|
167
|
+
maxLength: 20,
|
|
168
|
+
suppressContentEditableWarning: true,
|
|
169
|
+
ref: ref
|
|
170
|
+
// className={`article__title`}
|
|
171
|
+
,
|
|
172
|
+
contentEditable: !readonly,
|
|
173
|
+
dangerouslySetInnerHTML: {
|
|
174
|
+
__html: content
|
|
175
|
+
},
|
|
176
|
+
onInput: function onInput(e) {
|
|
177
|
+
return handleInput(e, ref, 'value');
|
|
178
|
+
},
|
|
179
|
+
onPaste: handlePaste,
|
|
180
|
+
onClick: function onClick(e) {
|
|
181
|
+
setCurrentIndex(ind);
|
|
182
|
+
setBeforeBlock(before);
|
|
183
|
+
}
|
|
184
|
+
})), /*#__PURE__*/_react["default"].createElement("button", {
|
|
185
|
+
onClick: function onClick(e) {
|
|
186
|
+
var fullUrlWithoutHash = window.location.origin + window.location.pathname + window.location.search;
|
|
187
|
+
alert(fullUrlWithoutHash + "#".concat(id));
|
|
188
|
+
navigator.clipboard.writeText(fullUrlWithoutHash + "#".concat(id));
|
|
189
|
+
},
|
|
190
|
+
className: 'questions__btn-link'
|
|
191
|
+
}, /*#__PURE__*/_react["default"].createElement(_image["default"], {
|
|
192
|
+
src: _link["default"],
|
|
193
|
+
alt: "icon"
|
|
194
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
195
|
+
itemProp: "acceptedAnswer",
|
|
196
|
+
itemScope: true,
|
|
197
|
+
itemType: "https://schema.org/Answer",
|
|
198
|
+
className: 'questions__response-box'
|
|
199
|
+
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
200
|
+
itemProp: "text",
|
|
201
|
+
className: 'questions__text-response',
|
|
202
|
+
suppressContentEditableWarning: true,
|
|
203
|
+
ref: answerRef,
|
|
204
|
+
contentEditable: !readonly,
|
|
205
|
+
dangerouslySetInnerHTML: {
|
|
206
|
+
__html: answer
|
|
207
|
+
}
|
|
208
|
+
// onInput={handleAnswerInput}
|
|
209
|
+
,
|
|
210
|
+
onInput: function onInput(e) {
|
|
211
|
+
return handleInput(e, answerRef, 'answerValue');
|
|
212
|
+
},
|
|
213
|
+
onPaste: handlePaste,
|
|
214
|
+
onClick: function onClick(e) {
|
|
215
|
+
setCurrentIndex(ind);
|
|
216
|
+
setBeforeBlock(before);
|
|
217
|
+
}
|
|
218
|
+
})))
|
|
219
|
+
});
|
|
220
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
.questions {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
|
|
5
|
+
&__btn-link {
|
|
6
|
+
width: 24px;
|
|
7
|
+
height: 24px;
|
|
8
|
+
background-color: inherit;
|
|
9
|
+
border: none;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__title-box {
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: 12px;
|
|
16
|
+
max-width: calc(300px - 12px);
|
|
17
|
+
min-width: calc(300px - 12px);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&__link-title {
|
|
21
|
+
width: 100%;
|
|
22
|
+
display: inline-block;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__content {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 50px;
|
|
29
|
+
gap: 32px;
|
|
30
|
+
width: 100%;
|
|
31
|
+
max-width: 1440px;
|
|
32
|
+
margin-left: auto;
|
|
33
|
+
margin-right: auto;
|
|
34
|
+
padding-left: 20px;
|
|
35
|
+
padding-right: 20px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__title {
|
|
39
|
+
color: #0AAE0A;
|
|
40
|
+
font-family: "Golos Text";
|
|
41
|
+
font-size: 42px;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
line-height: 51px;
|
|
45
|
+
|
|
46
|
+
&_black {
|
|
47
|
+
color: #0B110B;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&__list {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
gap: 14px;
|
|
55
|
+
width: 100%;
|
|
56
|
+
border-radius: 8px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&__item {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
width: 100%;
|
|
63
|
+
gap: 24px;
|
|
64
|
+
border-radius: 10px;
|
|
65
|
+
padding-top: 40px;
|
|
66
|
+
padding-bottom: 40px;
|
|
67
|
+
border-bottom: 1px solid #D9D9D9;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__title-questions {
|
|
71
|
+
color: #0009E8;
|
|
72
|
+
font-family: "Open Sans";
|
|
73
|
+
font-size: 20px;
|
|
74
|
+
font-style: normal;
|
|
75
|
+
font-weight: 600;
|
|
76
|
+
line-height: 27px;
|
|
77
|
+
margin: 0;
|
|
78
|
+
|
|
79
|
+
&:empty {
|
|
80
|
+
min-height: 47px;
|
|
81
|
+
min-width: 100%;
|
|
82
|
+
width: 100%;
|
|
83
|
+
|
|
84
|
+
&::after {
|
|
85
|
+
content: "Введите заголовок";
|
|
86
|
+
color: #D9D9D9;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&[contenteditable="true"] {
|
|
91
|
+
outline: none;
|
|
92
|
+
margin: 0px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&__response-box {
|
|
97
|
+
min-width: calc(300px - 12px);
|
|
98
|
+
max-width: calc(100% - 312px);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&__text-response {
|
|
102
|
+
color: #0B110B;
|
|
103
|
+
font-family: "Golos Text";
|
|
104
|
+
font-size: 16px;
|
|
105
|
+
font-style: normal;
|
|
106
|
+
font-weight: 400;
|
|
107
|
+
line-height: 26px;
|
|
108
|
+
|
|
109
|
+
&:empty {
|
|
110
|
+
min-height: 47px;
|
|
111
|
+
width: 100%;
|
|
112
|
+
|
|
113
|
+
&::after {
|
|
114
|
+
content: "Введите текст";
|
|
115
|
+
color: #D9D9D9;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&[contenteditable="true"] {
|
|
120
|
+
outline: none;
|
|
121
|
+
// margin: 10px 20px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&__btn-drop {
|
|
126
|
+
background-color: inherit;
|
|
127
|
+
border: none;
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media (max-width: 430px) {
|
|
133
|
+
|
|
134
|
+
.questions {
|
|
135
|
+
padding: 40px 16px;
|
|
136
|
+
|
|
137
|
+
&__content {
|
|
138
|
+
gap: 20px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&__title {
|
|
142
|
+
font-size: 24px;
|
|
143
|
+
line-height: 32px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&__list {
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-direction: column;
|
|
149
|
+
gap: 14px;
|
|
150
|
+
width: 100%;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&__item {
|
|
154
|
+
display: flex;
|
|
155
|
+
width: 100%;
|
|
156
|
+
padding: 15px 16px;
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
// gap: 14px;
|
|
159
|
+
border-radius: 10px;
|
|
160
|
+
background: #FFF;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&__title-questions {
|
|
164
|
+
font-size: 14px;
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
line-height: 20px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&__response-box {
|
|
170
|
+
max-height: 100px;
|
|
171
|
+
transition: 0.5s;
|
|
172
|
+
|
|
173
|
+
&_hide {
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
max-height: 0px;
|
|
176
|
+
transition: 0.5s;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&__text-response {
|
|
181
|
+
font-size: 14px;
|
|
182
|
+
line-height: 22px;
|
|
183
|
+
margin-top: 14px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&__btn-drop {
|
|
187
|
+
background-color: inherit;
|
|
188
|
+
border: none;
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M8.4649 11.2931C9.5979 10.1601 11.5739 10.1601 12.7069 11.2931L13.4139 12.0001L14.8279 10.5861L14.1209 9.87906C13.1779 8.93506 11.9219 8.41406 10.5859 8.41406C9.2499 8.41406 7.9939 8.93506 7.0509 9.87906L4.9289 12.0001C3.9932 12.9388 3.46777 14.2101 3.46777 15.5356C3.46777 16.861 3.9932 18.1323 4.9289 19.0711C5.39277 19.5356 5.94387 19.9039 6.55052 20.1548C7.15717 20.4057 7.80742 20.5342 8.4639 20.5331C9.12056 20.5344 9.77102 20.406 10.3779 20.1551C10.9847 19.9042 11.5359 19.5358 11.9999 19.0711L12.7069 18.3641L11.2929 16.9501L10.5859 17.6571C10.0224 18.2181 9.25957 18.533 8.4644 18.533C7.66923 18.533 6.90643 18.2181 6.3429 17.6571C5.7814 17.0938 5.46611 16.3309 5.46611 15.5356C5.46611 14.7402 5.7814 13.9773 6.3429 13.4141L8.4649 11.2931Z" fill="#8D8D8D"/>
|
|
3
|
+
<path d="M11.9999 4.9307L11.2929 5.6377L12.7069 7.0517L13.4139 6.3447C13.9774 5.78369 14.7402 5.46873 15.5354 5.46873C16.3305 5.46873 17.0933 5.78369 17.6569 6.3447C18.2184 6.90797 18.5337 7.67087 18.5337 8.4662C18.5337 9.26154 18.2184 10.0244 17.6569 10.5877L15.5349 12.7087C14.4019 13.8417 12.4259 13.8417 11.2929 12.7087L10.5859 12.0017L9.17188 13.4157L9.87887 14.1227C10.8219 15.0667 12.0779 15.5877 13.4139 15.5877C14.7499 15.5877 16.0059 15.0667 16.9489 14.1227L19.0709 12.0017C20.0066 11.063 20.532 9.79162 20.532 8.4662C20.532 7.14078 20.0066 5.86942 19.0709 4.9307C18.1324 3.99451 16.861 3.46875 15.5354 3.46875C14.2098 3.46875 12.9383 3.99451 11.9999 4.9307Z" fill="#8D8D8D"/>
|
|
4
|
+
</svg>
|
|
@@ -15,6 +15,7 @@ var _ModalReplaceBlock = require("../ModalReplaceBlock/ModalReplaceBlock");
|
|
|
15
15
|
var _ImgArticle = require("../ImgArticle/ImgArticle");
|
|
16
16
|
var _FormBtn = require("../FormBtn/FormBtn");
|
|
17
17
|
var _VideoArticle = require("../VideoArticle/VideoArticle");
|
|
18
|
+
var _QuestionAnswer = require("../QuestionAnswer/QuestionAnswer");
|
|
18
19
|
var _headers = _interopRequireDefault(require("../../../common/headers"));
|
|
19
20
|
require("./SelectedBlocks.scss");
|
|
20
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -282,6 +283,9 @@ var SelectedBlocks = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
282
283
|
if (block_type == 'video') return /*#__PURE__*/_react["default"].createElement(_VideoArticle.VideoArticle, _extends({}, commonProps, {
|
|
283
284
|
editMode: true
|
|
284
285
|
}));
|
|
286
|
+
if (block_type == 'question') return /*#__PURE__*/_react["default"].createElement(_QuestionAnswer.QuestionAnswer, _extends({
|
|
287
|
+
editMode: true
|
|
288
|
+
}, commonProps));
|
|
285
289
|
})));
|
|
286
290
|
});
|
|
287
291
|
var _default = exports["default"] = SelectedBlocks;
|
|
@@ -25,14 +25,18 @@ require("./MarqueImgs.scss");
|
|
|
25
25
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
26
26
|
var marquee = [_brand_["default"], _brand_2["default"], _brand_3["default"], _brand_4["default"], _brand_5["default"], _brand_6["default"], _brand_7["default"], _brand_8["default"], _brand_9["default"], _brand_10["default"], _brand_11["default"], _brand_12["default"], _brand_13["default"]];
|
|
27
27
|
var MarqueImgs = function MarqueImgs(_ref) {
|
|
28
|
-
var title = _ref.title
|
|
28
|
+
var title = _ref.title,
|
|
29
|
+
_ref$hideTitle = _ref.hideTitle,
|
|
30
|
+
hideTitle = _ref$hideTitle === void 0 ? false : _ref$hideTitle,
|
|
31
|
+
_ref$list = _ref.list,
|
|
32
|
+
list = _ref$list === void 0 ? marquee : _ref$list;
|
|
29
33
|
return /*#__PURE__*/_react["default"].createElement("section", {
|
|
30
34
|
className: 'section-marquee'
|
|
31
|
-
}, /*#__PURE__*/_react["default"].createElement("h2", {
|
|
35
|
+
}, !hideTitle && /*#__PURE__*/_react["default"].createElement("h2", {
|
|
32
36
|
className: 'section-marquee__title'
|
|
33
37
|
}, title ? title : "\u041D\u0430c \u0432\u044B\u0431\u0438\u0440\u0430\u044E\u0442"), /*#__PURE__*/_react["default"].createElement(_reactFastMarquee["default"], {
|
|
34
38
|
scrollWhen: 'always'
|
|
35
|
-
},
|
|
39
|
+
}, list === null || list === void 0 ? void 0 : list.map(function (el, ind) {
|
|
36
40
|
return /*#__PURE__*/_react["default"].createElement(_image["default"], {
|
|
37
41
|
key: JSON.stringify(el) + ind,
|
|
38
42
|
src: el
|