ecomlab-components-next 0.1.32 → 0.1.34
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/common/fetchUrls.js +7 -2
- package/dist/common/headers.js +2 -1
- package/dist/common/hooks/useDebounce.js +37 -0
- package/dist/common/hooks/useTextSelectionInModal.js +41 -0
- package/dist/components/Article/ArcticleWiki/ArcticleWiki.stories.js +152 -0
- package/dist/components/Article/ArcticleWiki/ArticleWiki.js +775 -0
- package/dist/components/Article/ArcticleWiki/ArticleWiki.scss +278 -0
- package/dist/components/Article/ArticleViewV2/ArticleViewV2.js +791 -0
- package/dist/components/Article/ArticleViewV2/ArticleViewV2.scss +245 -0
- package/dist/components/Article/ArticleViewV2/ArticleViewV2.stories.js +166 -0
- package/dist/components/Article/ArticleViewV2/img/bell.svg +9 -0
- package/dist/components/Article/ArticleViewV2/img/btn-add-round.svg +4 -0
- package/dist/components/Article/ArticleViewV2/img/calendar_icon.svg +6 -0
- package/dist/components/Article/ArticleViewV2/img/close-round.svg +3 -0
- package/dist/components/Article/ArticleViewV2/img/close.svg +9 -0
- package/dist/components/Article/ArticleViewV2/img/copy_icon.svg +5 -0
- package/dist/components/Article/ArticleViewV2/img/dndMenu.svg +1 -0
- package/dist/components/Article/ArticleViewV2/img/info.svg +9 -0
- package/dist/components/Article/ArticleViewV2/img/ok_icon.svg +5 -0
- package/dist/components/Article/ArticleViewV2/img/plus_circle.svg +6 -0
- package/dist/components/Article/ArticleViewV2/img/share_icon.svg +5 -0
- package/dist/components/Article/ArticleViewV2/img/tg.svg +3 -0
- package/dist/components/Article/ArticleViewV2/img/tg_icon.svg +5 -0
- package/dist/components/Article/ArticleViewV2/img/time_icon.svg +6 -0
- package/dist/components/Article/ArticleViewV2/img/view_icon.svg +6 -0
- package/dist/components/Article/ArticleViewV2/img/vk_icon.svg +5 -0
- package/dist/components/Article/ArticleViewV2/img/whatsapp_icon.svg +5 -0
- package/dist/components/Article/Breadcrumb/Breadcrumb.js +69 -0
- package/dist/components/Article/Breadcrumb/Breadcrumb.scss +96 -0
- package/dist/components/Article/Breadcrumb/img/drop-right.svg +3 -0
- package/dist/components/Article/Breadcrumb/img/home_icon.svg +5 -0
- package/dist/components/Article/EditWrapper/EditWrapper.js +108 -0
- package/dist/components/Article/EditWrapper/EditWrapper.scss +93 -0
- package/dist/components/Article/EditWrapper/img/bx-grid-vertical.svg +5 -0
- package/dist/components/Article/Editor/Editor.js +92 -0
- package/dist/components/Article/Editor/Editor.scss +35 -0
- package/dist/components/Article/Editor/img/copy.svg +6 -0
- package/dist/components/Article/FormBtn/FormBtn.js +229 -0
- package/dist/components/Article/FormBtn/FormBtn.scss +458 -0
- package/dist/components/Article/FormBtn/ModalBitrixForm/ModalBitrixForm.js +282 -0
- package/dist/components/Article/FormBtn/ModalBitrixForm/ModalBitrixForm.scss +140 -0
- package/dist/components/Article/FormBtn/ModalBitrixForm/img/close_icon.svg +3 -0
- package/dist/components/Article/FormBtn/ModalBitrixForm/img/done_icon.svg +3 -0
- package/dist/components/Article/FormBtn/ModalBitrixForm/img/ozon.svg +9 -0
- package/dist/components/Article/FormBtn/ModalBitrixForm/img/ozon_bkg.svg +9 -0
- package/dist/components/Article/FormBtn/ModalBitrixForm/validationFunc.js +14 -0
- package/dist/components/Article/FormBtn/img/clos_icon.svg +6 -0
- package/dist/components/Article/FormBtn/img/close-icon.svg +3 -0
- package/dist/components/Article/ImgArticle/ImgArticle.js +297 -0
- package/dist/components/Article/ImgArticle/ImgArticle.scss +169 -0
- package/dist/components/Article/ImgArticle/img/noPhoto.png +0 -0
- package/dist/components/Article/InformationBlock/InformationBlock.js +200 -0
- package/dist/components/Article/InformationBlock/InformationBlock.scss +89 -0
- package/dist/components/Article/InformationBlock/img/bell.svg +9 -0
- package/dist/components/Article/ListOfContent/ListOfContent.js +110 -0
- package/dist/components/Article/ListOfContent/ListOfContent.scss +115 -0
- package/dist/components/Article/ListOfContent/img/time_icon.svg +3 -0
- package/dist/components/Article/ListOfContent/img/view_icon.svg +3 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/ModalMiltilevelSidebarSettings.js +973 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/ModalMiltilevelSidebarSettings.scss +254 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/ModalMiltilevelSidebarSettings.stories.js +76 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/img/bx-cog.png +0 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/img/bx-cog.svg +4 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/img/bx-trash.png +0 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/img/bx-trash.svg +4 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/img/drop_icon.svg +5 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/img/edit_icon.svg +6 -0
- package/dist/components/Article/ModalMiltilevelSidebarSettings/img/trash_icon.svg +8 -0
- package/dist/components/Article/ModalReplaceBlock/ModalReplaceBlock.js +85 -0
- package/dist/components/Article/ModalReplaceBlock/ModalReplaceBlock.scss +72 -0
- package/dist/components/Article/SelectedBlocks/SelectedBlocks.js +281 -0
- package/dist/components/Article/SelectedBlocks/SelectedBlocks.scss +0 -0
- package/dist/components/Article/SocialMedia/ModalSelectionSocialMedia/ModalSelectionSocialMedia.js +130 -0
- package/dist/components/Article/SocialMedia/ModalSelectionSocialMedia/ModalSelectionSocialMedia.scss +65 -0
- package/dist/components/Article/SocialMedia/ModalSelectionSocialMedia/img/Facebook.svg +4 -0
- package/dist/components/Article/SocialMedia/ModalSelectionSocialMedia/img/OK.svg +4 -0
- package/dist/components/Article/SocialMedia/ModalSelectionSocialMedia/img/Xcom.svg +9 -0
- package/dist/components/Article/SocialMedia/ModalSelectionSocialMedia/img/linkedin.svg +5 -0
- package/dist/components/Article/SocialMedia/ModalSelectionSocialMedia/img/tg.svg +4 -0
- package/dist/components/Article/SocialMedia/ModalSelectionSocialMedia/img/vk.svg +4 -0
- package/dist/components/Article/SocialMedia/ModalSelectionSocialMedia/img/wtsp.svg +4 -0
- package/dist/components/Article/SocialMedia/SocialMedia.js +242 -0
- package/dist/components/Article/SocialMedia/SocialMedia.scss +57 -0
- package/dist/components/Article/SocialMedia/img/dzen.svg +4 -0
- package/dist/components/Article/SocialMedia/img/facebook.svg +4 -0
- package/dist/components/Article/SocialMedia/img/insta.svg +9 -0
- package/dist/components/Article/SocialMedia/img/linkendIn.svg +5 -0
- package/dist/components/Article/SocialMedia/img/ok.svg +4 -0
- package/dist/components/Article/SocialMedia/img/pikabu.svg +9 -0
- package/dist/components/Article/SocialMedia/img/telegram.svg +4 -0
- package/dist/components/Article/SocialMedia/img/vcru.svg +0 -0
- package/dist/components/Article/SocialMedia/img/vk.svg +4 -0
- package/dist/components/Article/SocialMedia/img/wp.svg +4 -0
- package/dist/components/Article/SocialMedia/img/x.svg +9 -0
- package/dist/components/Article/TextArticle/TextArticle.js +257 -0
- package/dist/components/Article/TextArticle/TextArticle.scss +156 -0
- package/dist/components/Article/TextArticle/img/dndMenu.svg +1 -0
- package/dist/components/Article/TitleText/TitleText.js +157 -0
- package/dist/components/Article/TitleText/TitleText.scss +74 -0
- package/dist/components/Article/VideoArticle/VideoArticle.js +248 -0
- package/dist/components/Article/VideoArticle/VideoArticle.scss +147 -0
- package/dist/components/Buttons/ButtonActionDrop/ButtonActionDrop.js +109 -0
- package/dist/components/Buttons/ButtonActionDrop/ButtonActionDrop.scss +97 -0
- package/dist/components/Buttons/ButtonActionDrop/img/bx-dots-horizontal-rounded.svg +3 -0
- package/package.json +3 -2
package/dist/components/Article/ModalMiltilevelSidebarSettings/ModalMiltilevelSidebarSettings.scss
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
.menu {
|
|
2
|
+
width: 250px;
|
|
3
|
+
background-color: #fff;
|
|
4
|
+
font-family: 'Arial', sans-serif;
|
|
5
|
+
font-size: 13px;
|
|
6
|
+
color: #333;
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
min-width: 230px;
|
|
9
|
+
width: 230px;
|
|
10
|
+
border: 1px solid #edeffb;
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
height: auto;
|
|
13
|
+
overflow-y: auto;
|
|
14
|
+
max-height: 600px;
|
|
15
|
+
position: sticky;
|
|
16
|
+
top: 20px;
|
|
17
|
+
|
|
18
|
+
.hover-block {
|
|
19
|
+
// background-color: #0056b3;
|
|
20
|
+
position: absolute;
|
|
21
|
+
left: 0;
|
|
22
|
+
right: 0;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.menu-item {
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
user-select: none;
|
|
29
|
+
transition: background-color 0.2s;
|
|
30
|
+
border-radius: 3px;
|
|
31
|
+
position: relative;
|
|
32
|
+
background-color: #fff;
|
|
33
|
+
|
|
34
|
+
// &:hover {
|
|
35
|
+
// background-color: #0000000d;
|
|
36
|
+
|
|
37
|
+
// .add-child-btn {
|
|
38
|
+
// display: inline-block;
|
|
39
|
+
// }
|
|
40
|
+
// }
|
|
41
|
+
|
|
42
|
+
&__group-btn {
|
|
43
|
+
display: flex;
|
|
44
|
+
gap: 8px;
|
|
45
|
+
margin-left: auto;
|
|
46
|
+
margin-left: auto;
|
|
47
|
+
|
|
48
|
+
.delete-btn {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
border: none;
|
|
53
|
+
background-color: inherit;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__arrow-box {
|
|
58
|
+
display: flex;
|
|
59
|
+
width: 16px;
|
|
60
|
+
height: 16px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.item-label {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
padding: 10px 14px;
|
|
67
|
+
border-bottom: 1px solid #edeffb;
|
|
68
|
+
color: #676767;
|
|
69
|
+
font-family: Golos Text;
|
|
70
|
+
font-size: 12px;
|
|
71
|
+
font-style: normal;
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
line-height: 16px;
|
|
74
|
+
gap: 8px;
|
|
75
|
+
|
|
76
|
+
&__box {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 8px;
|
|
80
|
+
width: 100%;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.arrow {
|
|
85
|
+
display: inline-block;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
transform: rotate(180deg);
|
|
88
|
+
// transition: transform 0.2s ease;
|
|
89
|
+
|
|
90
|
+
&.open {
|
|
91
|
+
transform: rotate(0deg);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.add-child-btn {
|
|
96
|
+
display: none;
|
|
97
|
+
margin-left: 8px;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
border: none;
|
|
100
|
+
background: none;
|
|
101
|
+
font-size: 15px;
|
|
102
|
+
color: #333;
|
|
103
|
+
|
|
104
|
+
&:hover {
|
|
105
|
+
color: #007bff;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:hover {
|
|
110
|
+
color: #00b45e;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.children {
|
|
115
|
+
// padding-left: 20px;
|
|
116
|
+
// margin-left: 8px;
|
|
117
|
+
|
|
118
|
+
.item-label {
|
|
119
|
+
padding-left: 24px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.children {
|
|
123
|
+
.item-label {
|
|
124
|
+
padding-left: 34px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.children {
|
|
128
|
+
.item-label {
|
|
129
|
+
padding-left: 44px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.children {
|
|
133
|
+
.item-label {
|
|
134
|
+
padding-left: 54px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.children {
|
|
138
|
+
.item-label {
|
|
139
|
+
padding-left: 64px;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// .drop-zone {
|
|
149
|
+
// height: 10px;
|
|
150
|
+
// margin: 4px 0;
|
|
151
|
+
// background-color: transparent;
|
|
152
|
+
|
|
153
|
+
// &:hover {
|
|
154
|
+
// background-color: #a3d4ff;
|
|
155
|
+
// }
|
|
156
|
+
// }
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.add-root-item-btn {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
justify-content: center;
|
|
163
|
+
min-width: 40px;
|
|
164
|
+
padding: 4px;
|
|
165
|
+
cursor: pointer;
|
|
166
|
+
border: 1px solid #007bff;
|
|
167
|
+
background-color: #007bff;
|
|
168
|
+
color: white;
|
|
169
|
+
border-radius: 4px;
|
|
170
|
+
max-width: 100%;
|
|
171
|
+
width: 100%;
|
|
172
|
+
|
|
173
|
+
&:hover {
|
|
174
|
+
background-color: #0056b3;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.modal-overlay {
|
|
179
|
+
z-index: 100;
|
|
180
|
+
position: fixed;
|
|
181
|
+
top: 0;
|
|
182
|
+
left: 0;
|
|
183
|
+
width: 100%;
|
|
184
|
+
height: 100%;
|
|
185
|
+
background: rgba(0, 0, 0, 0.5);
|
|
186
|
+
display: flex;
|
|
187
|
+
justify-content: center;
|
|
188
|
+
align-items: center;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.modal {
|
|
192
|
+
z-index: 100;
|
|
193
|
+
background: #fff;
|
|
194
|
+
padding: 20px;
|
|
195
|
+
border-radius: 4px;
|
|
196
|
+
width: 300px;
|
|
197
|
+
max-width: 100%;
|
|
198
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
199
|
+
|
|
200
|
+
h3 {
|
|
201
|
+
margin-bottom: 10px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
input {
|
|
205
|
+
width: 100%;
|
|
206
|
+
padding: 8px;
|
|
207
|
+
margin-bottom: 10px;
|
|
208
|
+
border: 1px solid #ddd;
|
|
209
|
+
border-radius: 3px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
button {
|
|
213
|
+
padding: 6px 12px;
|
|
214
|
+
margin-right: 10px;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
border: 1px solid #007bff;
|
|
217
|
+
background-color: #007bff;
|
|
218
|
+
color: white;
|
|
219
|
+
border-radius: 3px;
|
|
220
|
+
|
|
221
|
+
&:hover {
|
|
222
|
+
background-color: #0056b3;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
button:last-child {
|
|
227
|
+
border-color: #ccc;
|
|
228
|
+
background-color: #ccc;
|
|
229
|
+
|
|
230
|
+
&:hover {
|
|
231
|
+
background-color: #aaa;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.hovered-for-drop {
|
|
237
|
+
background-color: #e6f7ff;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// .mainHover {
|
|
241
|
+
// background-color: #0000000d;
|
|
242
|
+
// }
|
|
243
|
+
|
|
244
|
+
.modal-miltilevel-sidebar-settings {
|
|
245
|
+
display: flex;
|
|
246
|
+
flex-direction: column;
|
|
247
|
+
gap: 12px;
|
|
248
|
+
width: fit-content;
|
|
249
|
+
|
|
250
|
+
&__select-container {
|
|
251
|
+
display: flex;
|
|
252
|
+
gap: 12px;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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["default"] = exports.ModalMiltilevelSidebarSettingsTest = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _ModalMiltilevelSidebarSettings = _interopRequireDefault(require("./ModalMiltilevelSidebarSettings"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
15
|
+
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."); }
|
|
16
|
+
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; } }
|
|
17
|
+
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; }
|
|
18
|
+
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; } }
|
|
19
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
20
|
+
var _default = exports["default"] = {
|
|
21
|
+
title: 'ModalMiltilevelSidebarSettings',
|
|
22
|
+
component: _ModalMiltilevelSidebarSettings["default"]
|
|
23
|
+
};
|
|
24
|
+
var ModalMiltilevelSidebarSettingsTest = exports.ModalMiltilevelSidebarSettingsTest = function ModalMiltilevelSidebarSettingsTest() {
|
|
25
|
+
var _useState = (0, _react.useState)([]),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
breadcrumbs = _useState2[0],
|
|
28
|
+
setBreadcrumbs = _useState2[1];
|
|
29
|
+
var _useState3 = (0, _react.useState)(''),
|
|
30
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
+
title = _useState4[0],
|
|
32
|
+
_setTitle = _useState4[1];
|
|
33
|
+
var _useState5 = (0, _react.useState)(''),
|
|
34
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
+
pathsWebName = _useState6[0],
|
|
36
|
+
_setPathsWebName = _useState6[1];
|
|
37
|
+
var _useState7 = (0, _react.useState)(0),
|
|
38
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
39
|
+
selectedTopLevelValue = _useState8[0],
|
|
40
|
+
setSelectedTopLevelValue = _useState8[1];
|
|
41
|
+
var _useState9 = (0, _react.useState)(0),
|
|
42
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
43
|
+
selectedEndLevelValue = _useState10[0],
|
|
44
|
+
setSelectedEndLevelValue = _useState10[1];
|
|
45
|
+
var _useState11 = (0, _react.useState)(''),
|
|
46
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
47
|
+
paths = _useState12[0],
|
|
48
|
+
_setPaths = _useState12[1];
|
|
49
|
+
var _useState13 = (0, _react.useState)(),
|
|
50
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
51
|
+
selectedItemId = _useState14[0],
|
|
52
|
+
setSelectedItemId = _useState14[1];
|
|
53
|
+
return /*#__PURE__*/_react["default"].createElement(_ModalMiltilevelSidebarSettings["default"], {
|
|
54
|
+
breadcrumbs: breadcrumbs,
|
|
55
|
+
fetchGetBreadcrumbs: function fetchGetBreadcrumbs() {},
|
|
56
|
+
setTitle: function setTitle(e) {
|
|
57
|
+
_setTitle(e);
|
|
58
|
+
},
|
|
59
|
+
setPathsWebName: function setPathsWebName(e) {
|
|
60
|
+
return _setPathsWebName(e);
|
|
61
|
+
},
|
|
62
|
+
onPortalClick: function onPortalClick(id) {
|
|
63
|
+
setSelectedTopLevelValue(id);
|
|
64
|
+
setSelectedEndLevelValue(null);
|
|
65
|
+
},
|
|
66
|
+
onLevelClick: function onLevelClick(id) {
|
|
67
|
+
setSelectedEndLevelValue(id);
|
|
68
|
+
setSelectedTopLevelValue(null);
|
|
69
|
+
},
|
|
70
|
+
setPaths: function setPaths(e) {
|
|
71
|
+
return _setPaths(e);
|
|
72
|
+
},
|
|
73
|
+
selectedItemId: selectedItemId,
|
|
74
|
+
setSelectedItemId: setSelectedItemId
|
|
75
|
+
});
|
|
76
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M7.99967 11.1668C9.47034 11.1668 10.6663 9.97083 10.6663 8.50016C10.6663 7.0295 9.47034 5.8335 7.99967 5.8335C6.52901 5.8335 5.33301 7.0295 5.33301 8.50016C5.33301 9.97083 6.52901 11.1668 7.99967 11.1668ZM7.99967 7.16683C8.72234 7.16683 9.33301 7.7775 9.33301 8.50016C9.33301 9.22283 8.72234 9.8335 7.99967 9.8335C7.27701 9.8335 6.66634 9.22283 6.66634 8.50016C6.66634 7.7775 7.27701 7.16683 7.99967 7.16683Z" fill="#333333"/>
|
|
3
|
+
<path d="M1.89633 11.2575L2.56299 12.4108C2.91699 13.0222 3.76899 13.2515 4.38299 12.8975L4.73566 12.6935C5.12135 12.9969 5.5466 13.2463 5.99966 13.4348V13.8335C5.99966 14.5688 6.59766 15.1668 7.33299 15.1668H8.66633C9.40166 15.1668 9.99966 14.5688 9.99966 13.8335V13.4348C10.4526 13.2463 10.8778 12.9971 11.2637 12.6942L11.6163 12.8982C12.2317 13.2515 13.0817 13.0235 13.437 12.4108L14.103 11.2582C14.2797 10.952 14.3276 10.5882 14.2362 10.2467C14.1448 9.90515 13.9216 9.61388 13.6157 9.43683L13.279 9.24216C13.3506 8.75053 13.3506 8.25113 13.279 7.7595L13.6157 7.56483C13.9215 7.38765 14.1446 7.09638 14.2359 6.75493C14.3273 6.41348 14.2795 6.04974 14.103 5.7435L13.437 4.59083C13.083 3.9775 12.2317 3.7475 11.6163 4.10283L11.2637 4.30683C10.878 4.00343 10.4527 3.75403 9.99966 3.5655V3.16683C9.99966 2.4315 9.40166 1.8335 8.66633 1.8335H7.33299C6.59766 1.8335 5.99966 2.4315 5.99966 3.16683V3.5655C5.54676 3.75406 5.12154 4.00322 4.73566 4.30616L4.38299 4.10216C3.76699 3.74816 2.91633 3.9775 2.56233 4.59016L1.89633 5.74283C1.71965 6.04903 1.67173 6.41284 1.76311 6.75434C1.85449 7.09584 2.07768 7.38711 2.38366 7.56416L2.72033 7.75883C2.64848 8.25022 2.64848 8.74944 2.72033 9.24083L2.38366 9.4355C2.07777 9.6128 1.85468 9.90419 1.76332 10.2457C1.67196 10.5873 1.7198 10.9512 1.89633 11.2575ZM4.11366 9.41883C4.03838 9.11839 4.0001 8.80988 3.99966 8.50016C3.99966 8.19216 4.03833 7.88283 4.11299 7.5815C4.14815 7.44105 4.13659 7.29297 4.08005 7.15968C4.02351 7.02639 3.92508 6.91516 3.79966 6.84283L3.05099 6.4095L3.71633 5.25683L4.47966 5.69816C4.60414 5.77019 4.74863 5.79991 4.89144 5.78284C5.03424 5.76577 5.16766 5.70284 5.27166 5.6035C5.72267 5.17453 6.26655 4.85537 6.86099 4.67083C6.99754 4.62914 7.1171 4.54472 7.20207 4.42998C7.28704 4.31525 7.33293 4.17627 7.33299 4.0335V3.16683H8.66633V4.0335C8.66639 4.17627 8.71228 4.31525 8.79725 4.42998C8.88222 4.54472 9.00178 4.62914 9.13833 4.67083C9.73266 4.85564 10.2765 5.17476 10.7277 5.6035C10.8318 5.70265 10.9652 5.76544 11.1079 5.78251C11.2507 5.79957 11.3951 5.76998 11.5197 5.69816L12.2823 5.2575L12.949 6.41016L12.1997 6.84283C12.0743 6.91524 11.976 7.02648 11.9194 7.15975C11.8629 7.29301 11.8513 7.44105 11.8863 7.5815C11.961 7.88283 11.9997 8.19216 11.9997 8.50016C11.9997 8.8075 11.961 9.11683 11.8857 9.41883C11.8507 9.55935 11.8624 9.70744 11.919 9.84071C11.9757 9.97398 12.0742 10.0852 12.1997 10.1575L12.9483 10.5902L12.283 11.7428L11.5197 11.3022C11.3952 11.23 11.2507 11.2002 11.1079 11.2173C10.965 11.2344 10.8316 11.2974 10.7277 11.3968C10.2766 11.8258 9.73277 12.145 9.13833 12.3295C9.00178 12.3712 8.88222 12.4556 8.79725 12.5703C8.71228 12.6851 8.66639 12.8241 8.66633 12.9668L8.66766 13.8335H7.33299V12.9668C7.33293 12.8241 7.28704 12.6851 7.20207 12.5703C7.1171 12.4556 6.99754 12.3712 6.86099 12.3295C6.26666 12.1447 5.72285 11.8256 5.27166 11.3968C5.16786 11.2971 5.03436 11.234 4.89142 11.217C4.74849 11.2 4.60392 11.2302 4.47966 11.3028L3.71699 11.7442L3.05033 10.5915L3.79966 10.1575C3.92512 10.0852 4.02363 9.97398 4.08028 9.84071C4.13693 9.70744 4.14865 9.55935 4.11366 9.41883Z" fill="#333333"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M3.33333 13.8335C3.33333 14.1871 3.47381 14.5263 3.72386 14.7763C3.97391 15.0264 4.31304 15.1668 4.66667 15.1668H11.3333C11.687 15.1668 12.0261 15.0264 12.2761 14.7763C12.5262 14.5263 12.6667 14.1871 12.6667 13.8335V5.8335H14V4.50016H11.3333V3.16683C11.3333 2.81321 11.1929 2.47407 10.9428 2.22402C10.6928 1.97397 10.3536 1.8335 10 1.8335H6C5.64638 1.8335 5.30724 1.97397 5.05719 2.22402C4.80714 2.47407 4.66667 2.81321 4.66667 3.16683V4.50016H2V5.8335H3.33333V13.8335ZM6 3.16683H10V4.50016H6V3.16683ZM5.33333 5.8335H11.3333V13.8335H4.66667V5.8335H5.33333Z" fill="#333333"/>
|
|
3
|
+
<path d="M6 7.1665H7.33333V12.4998H6V7.1665ZM8.66667 7.1665H10V12.4998H8.66667V7.1665Z" fill="#333333"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bx-chevron-down.svg">
|
|
3
|
+
<path id="Vector" d="M5.13802 9.80469L8.00002 6.94269L10.862 9.80469L11.8047 8.86202L8.00002 5.05735L4.19535 8.86202L5.13802 9.80469Z" fill="#333333"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="edit">
|
|
3
|
+
<path id="Vector" d="M9 15H15.75" stroke="#51CA64" strokeLinecap="round" strokeLinejoin="round"/>
|
|
4
|
+
<path id="Vector_2" d="M12.375 3.46599C12.6734 3.16762 13.078 3 13.5 3C13.7089 3 13.9158 3.04115 14.1088 3.12111C14.3019 3.20106 14.4773 3.31825 14.625 3.46599C14.7727 3.61373 14.8899 3.78912 14.9699 3.98214C15.0498 4.17517 15.091 4.38206 15.091 4.59099C15.091 4.79992 15.0498 5.00681 14.9699 5.19984C14.8899 5.39286 14.7727 5.56825 14.625 5.71599L5.25 15.091L2.25 15.841L3 12.841L12.375 3.46599Z" stroke="#51CA64" strokeLinecap="round" strokeLinejoin="round"/>
|
|
5
|
+
</g>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="trash">
|
|
3
|
+
<path id="Vector" d="M3 6H5H21" stroke="#F88181" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
4
|
+
<path id="Vector_2" d="M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z" stroke="#F88181" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
5
|
+
<path id="Vector_3" d="M10 11V17" stroke="#F88181" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
6
|
+
<path id="Vector_4" d="M14 11V17" stroke="#F88181" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,85 @@
|
|
|
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.ModalReplaceBlock = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
require("./ModalReplaceBlock.scss");
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
var btns = [{
|
|
14
|
+
label: 'Текст',
|
|
15
|
+
type: 'text'
|
|
16
|
+
}, {
|
|
17
|
+
label: 'Заголовок',
|
|
18
|
+
type: 'title'
|
|
19
|
+
}, {
|
|
20
|
+
label: 'Ссылки на социальные сети',
|
|
21
|
+
type: 'social'
|
|
22
|
+
}, {
|
|
23
|
+
label: 'Информационный блок',
|
|
24
|
+
type: 'info'
|
|
25
|
+
}, {
|
|
26
|
+
label: 'Изображение',
|
|
27
|
+
type: 'image'
|
|
28
|
+
}, {
|
|
29
|
+
label: 'Форма',
|
|
30
|
+
type: 'form'
|
|
31
|
+
}, {
|
|
32
|
+
label: 'Видео',
|
|
33
|
+
type: 'video'
|
|
34
|
+
}];
|
|
35
|
+
var ModalReplaceBlock = exports.ModalReplaceBlock = function ModalReplaceBlock(_ref) {
|
|
36
|
+
var setIsModal = _ref.setIsModal,
|
|
37
|
+
currentIndex = _ref.currentIndex,
|
|
38
|
+
setContent = _ref.setContent,
|
|
39
|
+
changeBlock = _ref.changeBlock,
|
|
40
|
+
articleId = _ref.articleId;
|
|
41
|
+
// Замена блока
|
|
42
|
+
var replaceBlock = function replaceBlock(type, content) {
|
|
43
|
+
setContent(function (prev) {
|
|
44
|
+
var new_blocks_list = prev === null || prev === void 0 ? void 0 : prev.map(function (block, ind) {
|
|
45
|
+
if (currentIndex == ind) {
|
|
46
|
+
changeBlock(type, articleId, block === null || block === void 0 ? void 0 : block.block_id, block === null || block === void 0 ? void 0 : block.block_before);
|
|
47
|
+
return {
|
|
48
|
+
block_type: type,
|
|
49
|
+
block_id: block === null || block === void 0 ? void 0 : block.block_id,
|
|
50
|
+
block_before: block === null || block === void 0 ? void 0 : block.block_before,
|
|
51
|
+
content: content ? content : [{
|
|
52
|
+
value: '',
|
|
53
|
+
properties: {}
|
|
54
|
+
}]
|
|
55
|
+
};
|
|
56
|
+
} else {
|
|
57
|
+
return block;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return new_blocks_list;
|
|
61
|
+
});
|
|
62
|
+
setIsModal(false);
|
|
63
|
+
};
|
|
64
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
|
+
className: "blackout",
|
|
66
|
+
onClick: function onClick(e) {
|
|
67
|
+
var el = e.target;
|
|
68
|
+
if (el.classList.contains('blackout')) {
|
|
69
|
+
setIsModal(false);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
73
|
+
className: "modal-replace-block"
|
|
74
|
+
}, btns.map(function (_ref2) {
|
|
75
|
+
var label = _ref2.label,
|
|
76
|
+
type = _ref2.type;
|
|
77
|
+
return /*#__PURE__*/_react["default"].createElement("button", {
|
|
78
|
+
key: label + type,
|
|
79
|
+
className: "modal-replace-block__btn",
|
|
80
|
+
onClick: function onClick(e) {
|
|
81
|
+
return replaceBlock(type);
|
|
82
|
+
}
|
|
83
|
+
}, label);
|
|
84
|
+
})));
|
|
85
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.modal-replace-block {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 24px;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
min-width: 360px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
max-width: 360px;
|
|
9
|
+
height: fit-content;
|
|
10
|
+
border-radius: 16px;
|
|
11
|
+
background-color: rgb(255, 255, 255);
|
|
12
|
+
padding: 32px;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
margin-left: auto;
|
|
16
|
+
margin-right: auto;
|
|
17
|
+
z-index: 5000;
|
|
18
|
+
|
|
19
|
+
&__btn {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
color: #0E86D7;
|
|
22
|
+
border: none;
|
|
23
|
+
background-color: inherit;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
img {
|
|
27
|
+
width: 110px;
|
|
28
|
+
height: 110px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.title {
|
|
32
|
+
margin-top: 24px;
|
|
33
|
+
color: var(--text-primary-blue, #020617);
|
|
34
|
+
text-align: center;
|
|
35
|
+
font-family: Inter;
|
|
36
|
+
font-size: 15px;
|
|
37
|
+
line-height: 24px;
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
line-height: 24px;
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.text_grey-blue {
|
|
45
|
+
margin-top: 12px;
|
|
46
|
+
text-align: center;
|
|
47
|
+
color: var(--main-menu-teritary-text, #94A3B8);
|
|
48
|
+
text-align: center;
|
|
49
|
+
/* Button link/Medium */
|
|
50
|
+
font-family: Inter;
|
|
51
|
+
font-size: 13px;
|
|
52
|
+
font-style: normal;
|
|
53
|
+
font-weight: 400;
|
|
54
|
+
line-height: 16px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.loading-dynamics {
|
|
58
|
+
margin-top: 36px;
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 8px;
|
|
61
|
+
border-radius: 4px;
|
|
62
|
+
background: var(--notification-tips-verification-bg, #EDEDFE);
|
|
63
|
+
|
|
64
|
+
.dynamics {
|
|
65
|
+
width: 0%;
|
|
66
|
+
height: 100%;
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
background: var(--primary-elements-hover, #0E86D7);
|
|
69
|
+
transition: 2s;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|