@lowdefy/blocks-antd 4.0.0-alpha.1 → 4.0.0-alpha.12
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/blocks/Affix/Affix.js +11 -6
- package/dist/blocks/Affix/style.less +1 -1
- package/dist/blocks/Alert/Alert.js +28 -10
- package/dist/blocks/Alert/style.less +1 -1
- package/dist/blocks/AutoComplete/AutoComplete.js +41 -34
- package/dist/blocks/AutoComplete/style.less +1 -1
- package/dist/blocks/Avatar/Avatar.js +12 -7
- package/dist/blocks/Avatar/schema.json +1 -1
- package/dist/blocks/Avatar/style.less +1 -1
- package/dist/blocks/Badge/Badge.js +12 -7
- package/dist/blocks/Badge/schema.json +1 -1
- package/dist/blocks/Badge/style.less +1 -1
- package/dist/blocks/Breadcrumb/Breadcrumb.js +56 -64
- package/dist/blocks/Breadcrumb/schema.json +1 -1
- package/dist/blocks/Breadcrumb/style.less +1 -1
- package/dist/blocks/Button/Button.js +22 -13
- package/dist/blocks/Button/schema.json +1 -1
- package/dist/blocks/Button/style.less +1 -1
- package/dist/blocks/ButtonSelector/ButtonSelector.js +36 -29
- package/dist/blocks/ButtonSelector/style.less +1 -1
- package/dist/blocks/Card/Card.js +11 -6
- package/dist/blocks/Card/style.less +1 -1
- package/dist/blocks/CheckboxSelector/CheckboxSelector.js +40 -34
- package/dist/blocks/CheckboxSelector/style.less +1 -1
- package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +21 -15
- package/dist/blocks/CheckboxSwitch/style.less +1 -1
- package/dist/blocks/Collapse/Collapse.js +38 -21
- package/dist/blocks/Collapse/schema.json +1 -1
- package/dist/blocks/Collapse/style.less +1 -1
- package/dist/blocks/Comment/Comment.js +13 -9
- package/dist/blocks/Comment/style.less +1 -1
- package/dist/blocks/ConfirmModal/ConfirmModal.js +28 -10
- package/dist/blocks/ConfirmModal/schema.json +1 -1
- package/dist/blocks/ConfirmModal/style.less +1 -1
- package/dist/blocks/Content/Content.js +11 -6
- package/dist/blocks/Content/style.less +1 -1
- package/dist/blocks/ControlledList/ControlledList.js +61 -63
- package/dist/blocks/ControlledList/style.less +1 -1
- package/dist/blocks/DateRangeSelector/DateRangeSelector.js +55 -50
- package/dist/blocks/DateRangeSelector/schema.json +2 -2
- package/dist/blocks/DateRangeSelector/style.less +1 -1
- package/dist/blocks/DateSelector/DateSelector.js +49 -44
- package/dist/blocks/DateSelector/schema.json +2 -2
- package/dist/blocks/DateSelector/style.less +1 -1
- package/dist/blocks/DateTimeSelector/DateTimeSelector.js +56 -51
- package/dist/blocks/DateTimeSelector/schema.json +2 -2
- package/dist/blocks/DateTimeSelector/style.less +1 -1
- package/dist/blocks/Descriptions/Descriptions.js +42 -38
- package/dist/blocks/Descriptions/style.less +1 -1
- package/dist/blocks/Divider/Divider.js +14 -9
- package/dist/blocks/Divider/style.less +1 -1
- package/dist/blocks/Drawer/Drawer.js +11 -6
- package/dist/blocks/Drawer/style.less +1 -1
- package/dist/blocks/Footer/Footer.js +11 -6
- package/dist/blocks/Footer/style.less +1 -1
- package/dist/blocks/Header/Header.js +11 -9
- package/dist/blocks/Header/schema.json +0 -4
- package/dist/blocks/Header/style.less +1 -1
- package/dist/blocks/Label/Label.js +70 -67
- package/dist/blocks/Label/getLabelCol.js +1 -1
- package/dist/blocks/Label/getWrapperCol.js +1 -1
- package/dist/blocks/Label/labelLogic.js +2 -3
- package/dist/blocks/Label/style.less +1 -1
- package/dist/blocks/Layout/Layout.js +11 -6
- package/dist/blocks/Layout/style.less +1 -1
- package/dist/blocks/Menu/Menu.js +123 -218
- package/dist/blocks/Menu/schema.json +1 -15
- package/dist/blocks/Menu/style.less +1 -1
- package/dist/blocks/Message/Message.js +11 -6
- package/dist/blocks/Message/schema.json +1 -1
- package/dist/blocks/Message/style.less +1 -1
- package/dist/blocks/MobileMenu/MobileMenu.js +85 -85
- package/dist/blocks/MobileMenu/schema.json +1 -15
- package/dist/blocks/MobileMenu/style.less +1 -1
- package/dist/blocks/Modal/Modal.js +76 -60
- package/dist/blocks/Modal/style.less +1 -1
- package/dist/blocks/MonthSelector/MonthSelector.js +47 -42
- package/dist/blocks/MonthSelector/schema.json +2 -2
- package/dist/blocks/MonthSelector/style.less +1 -1
- package/dist/blocks/MultipleSelector/MultipleSelector.js +104 -99
- package/dist/blocks/MultipleSelector/schema.json +6 -6
- package/dist/blocks/MultipleSelector/style.less +1 -1
- package/dist/blocks/Notification/Notification.js +13 -8
- package/dist/blocks/Notification/schema.json +2 -2
- package/dist/blocks/Notification/style.less +1 -1
- package/dist/blocks/NumberInput/NumberInput.js +14 -6
- package/dist/blocks/NumberInput/style.less +1 -1
- package/dist/blocks/PageHCF/PageHCF.js +34 -34
- package/dist/blocks/PageHCF/schema.json +0 -29
- package/dist/blocks/PageHCF/style.less +1 -1
- package/dist/blocks/PageHCSF/PageHCSF.js +61 -66
- package/dist/blocks/PageHCSF/schema.json +0 -30
- package/dist/blocks/PageHCSF/style.less +1 -1
- package/dist/blocks/PageHSCF/PageHSCF.js +61 -66
- package/dist/blocks/PageHSCF/schema.json +0 -30
- package/dist/blocks/PageHSCF/style.less +1 -1
- package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +151 -167
- package/dist/blocks/PageHeaderMenu/schema.json +1 -24
- package/dist/blocks/PageHeaderMenu/style.less +1 -1
- package/dist/blocks/PageSHCF/PageSHCF.js +60 -65
- package/dist/blocks/PageSHCF/schema.json +0 -30
- package/dist/blocks/PageSHCF/style.less +1 -1
- package/dist/blocks/PageSiderMenu/PageSiderMenu.js +258 -285
- package/dist/blocks/PageSiderMenu/schema.json +1 -31
- package/dist/blocks/PageSiderMenu/style.less +1 -1
- package/dist/blocks/Pagination/Pagination.js +17 -5
- package/dist/blocks/Pagination/style.less +1 -1
- package/dist/blocks/Paragraph/Paragraph.js +21 -14
- package/dist/blocks/Paragraph/style.less +1 -1
- package/dist/blocks/ParagraphInput/ParagraphInput.js +22 -14
- package/dist/blocks/ParagraphInput/style.less +1 -1
- package/dist/blocks/PasswordInput/PasswordInput.js +14 -6
- package/dist/blocks/PasswordInput/style.less +1 -1
- package/dist/blocks/Progress/Progress.js +9 -3
- package/dist/blocks/Progress/style.less +1 -1
- package/dist/blocks/RadioSelector/RadioSelector.js +40 -34
- package/dist/blocks/RadioSelector/style.less +1 -1
- package/dist/blocks/RatingSlider/RatingSlider.js +127 -126
- package/dist/blocks/RatingSlider/schema.json +4 -4
- package/dist/blocks/RatingSlider/style.less +1 -1
- package/dist/blocks/Result/Result.js +13 -8
- package/dist/blocks/Result/schema.json +1 -1
- package/dist/blocks/Result/style.less +1 -1
- package/dist/blocks/Selector/Selector.js +96 -91
- package/dist/blocks/Selector/schema.json +4 -4
- package/dist/blocks/Selector/style.less +1 -1
- package/dist/blocks/Sider/Sider.js +12 -9
- package/dist/blocks/Sider/schema.json +0 -7
- package/dist/blocks/Sider/style.less +1 -1
- package/dist/blocks/Statistic/Statistic.js +11 -5
- package/dist/blocks/Statistic/schema.json +2 -2
- package/dist/blocks/Statistic/style.less +1 -1
- package/dist/blocks/Switch/Switch.js +22 -19
- package/dist/blocks/Switch/schema.json +4 -4
- package/dist/blocks/Switch/style.less +1 -1
- package/dist/blocks/Tabs/Tabs.js +36 -24
- package/dist/blocks/Tabs/schema.json +1 -1
- package/dist/blocks/Tabs/style.less +1 -1
- package/dist/blocks/TextArea/TextArea.js +14 -6
- package/dist/blocks/TextArea/style.less +1 -1
- package/dist/blocks/TextInput/TextInput.js +16 -8
- package/dist/blocks/TextInput/schema.json +2 -2
- package/dist/blocks/TextInput/style.less +1 -1
- package/dist/blocks/TimelineList/TimelineList.js +56 -40
- package/dist/blocks/TimelineList/schema.json +4 -1
- package/dist/blocks/TimelineList/style.less +1 -1
- package/dist/blocks/Title/Title.js +21 -14
- package/dist/blocks/Title/style.less +1 -1
- package/dist/blocks/TitleInput/TitleInput.js +22 -14
- package/dist/blocks/TitleInput/style.less +1 -1
- package/dist/blocks/Tooltip/Tooltip.js +11 -9
- package/dist/blocks/Tooltip/style.less +1 -1
- package/dist/blocks/WeekSelector/WeekSelector.js +47 -42
- package/dist/blocks/WeekSelector/schema.json +2 -2
- package/dist/blocks/WeekSelector/style.less +1 -1
- package/dist/blocks.js +74 -0
- package/dist/color.js +1 -1
- package/dist/disabledDate.js +2 -3
- package/dist/getUniqueValues.js +1 -1
- package/dist/getValueIndex.js +1 -1
- package/dist/style.less +1 -1
- package/dist/{blocks/Alert/index.js → types.js} +16 -19
- package/dist/useRunAfterUpdate.js +1 -1
- package/dist/validationExamples.js +1 -1
- package/package.json +27 -23
- package/dist/blocks/Affix/index.js +0 -26
- package/dist/blocks/AutoComplete/index.js +0 -33
- package/dist/blocks/Avatar/index.js +0 -28
- package/dist/blocks/Badge/index.js +0 -26
- package/dist/blocks/Breadcrumb/index.js +0 -31
- package/dist/blocks/Button/index.js +0 -28
- package/dist/blocks/ButtonSelector/index.js +0 -33
- package/dist/blocks/Card/index.js +0 -31
- package/dist/blocks/CheckboxSelector/index.js +0 -33
- package/dist/blocks/CheckboxSwitch/index.js +0 -36
- package/dist/blocks/Collapse/index.js +0 -31
- package/dist/blocks/Comment/index.js +0 -28
- package/dist/blocks/ConfirmModal/index.js +0 -59
- package/dist/blocks/Content/index.js +0 -26
- package/dist/blocks/ControlledList/index.js +0 -36
- package/dist/blocks/DateRangeSelector/index.js +0 -33
- package/dist/blocks/DateSelector/index.js +0 -33
- package/dist/blocks/DateTimeSelector/index.js +0 -33
- package/dist/blocks/Descriptions/index.js +0 -31
- package/dist/blocks/Divider/index.js +0 -31
- package/dist/blocks/Drawer/index.js +0 -41
- package/dist/blocks/Footer/index.js +0 -26
- package/dist/blocks/Header/index.js +0 -26
- package/dist/blocks/Label/index.js +0 -32
- package/dist/blocks/Layout/index.js +0 -31
- package/dist/blocks/Menu/index.js +0 -26
- package/dist/blocks/Message/index.js +0 -53
- package/dist/blocks/MobileMenu/index.js +0 -41
- package/dist/blocks/Modal/index.js +0 -41
- package/dist/blocks/MonthSelector/index.js +0 -33
- package/dist/blocks/MultipleSelector/index.js +0 -33
- package/dist/blocks/Notification/index.js +0 -59
- package/dist/blocks/NumberInput/index.js +0 -33
- package/dist/blocks/PageHCF/index.js +0 -31
- package/dist/blocks/PageHCSF/index.js +0 -46
- package/dist/blocks/PageHSCF/index.js +0 -46
- package/dist/blocks/PageHeaderMenu/index.js +0 -46
- package/dist/blocks/PageSHCF/index.js +0 -46
- package/dist/blocks/PageSiderMenu/index.js +0 -57
- package/dist/blocks/Pagination/index.js +0 -37
- package/dist/blocks/Paragraph/index.js +0 -28
- package/dist/blocks/ParagraphInput/index.js +0 -36
- package/dist/blocks/PasswordInput/index.js +0 -33
- package/dist/blocks/Progress/index.js +0 -31
- package/dist/blocks/RadioSelector/index.js +0 -33
- package/dist/blocks/RatingSlider/index.js +0 -33
- package/dist/blocks/Result/index.js +0 -31
- package/dist/blocks/S3UploadButton/S3UploadButton.js +0 -171
- package/dist/blocks/S3UploadButton/index.js +0 -29
- package/dist/blocks/S3UploadButton/schema.json +0 -83
- package/dist/blocks/S3UploadButton/style.less +0 -18
- package/dist/blocks/Selector/index.js +0 -33
- package/dist/blocks/Sider/index.js +0 -41
- package/dist/blocks/Statistic/index.js +0 -31
- package/dist/blocks/Switch/index.js +0 -33
- package/dist/blocks/Tabs/index.js +0 -31
- package/dist/blocks/TextArea/index.js +0 -33
- package/dist/blocks/TextInput/index.js +0 -33
- package/dist/blocks/TimelineList/index.js +0 -31
- package/dist/blocks/Title/index.js +0 -31
- package/dist/blocks/TitleInput/index.js +0 -39
- package/dist/blocks/Tooltip/index.js +0 -31
- package/dist/blocks/WeekSelector/index.js +0 -33
- package/dist/index.js +0 -152
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -26,7 +25,7 @@ import Layout from '../Layout/Layout.js';
|
|
|
26
25
|
import Menu from '../Menu/Menu.js';
|
|
27
26
|
import MobileMenu from '../MobileMenu/MobileMenu.js';
|
|
28
27
|
import Sider from '../Sider/Sider.js';
|
|
29
|
-
const PageSiderMenu = ({ basePath , blockId , components: { Icon , Link } , events , content ,
|
|
28
|
+
const PageSiderMenu = ({ basePath , blockId , components: { Icon , Link } , events , content , menus , methods , pageId , properties , })=>{
|
|
30
29
|
const [openSiderState, setSiderOpen] = useState(!(properties.sider && properties.sider.initialCollapsed));
|
|
31
30
|
useEffect(()=>{
|
|
32
31
|
methods.registerMethod('toggleSiderOpen', ()=>{
|
|
@@ -109,8 +108,7 @@ const PageSiderMenu = ({ basePath , blockId , components: { Icon , Link } , eve
|
|
|
109
108
|
height: '100%',
|
|
110
109
|
flexDirection: 'column'
|
|
111
110
|
},
|
|
112
|
-
content: {
|
|
113
|
-
},
|
|
111
|
+
content: {},
|
|
114
112
|
breadcrumb: {
|
|
115
113
|
margin: '16px 0'
|
|
116
114
|
},
|
|
@@ -124,7 +122,7 @@ const PageSiderMenu = ({ basePath , blockId , components: { Icon , Link } , eve
|
|
|
124
122
|
}
|
|
125
123
|
}
|
|
126
124
|
};
|
|
127
|
-
return(/*#__PURE__*/
|
|
125
|
+
return(/*#__PURE__*/ React.createElement(Layout, {
|
|
128
126
|
blockId: blockId,
|
|
129
127
|
components: {
|
|
130
128
|
Icon,
|
|
@@ -140,295 +138,270 @@ const PageSiderMenu = ({ basePath , blockId , components: { Icon , Link } , eve
|
|
|
140
138
|
])
|
|
141
139
|
},
|
|
142
140
|
content: {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
141
|
+
// TODO: use next/image
|
|
142
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Header, {
|
|
143
|
+
blockId: `${blockId}_header`,
|
|
144
|
+
components: {
|
|
145
|
+
Icon,
|
|
146
|
+
Link
|
|
147
|
+
},
|
|
148
|
+
events: events,
|
|
149
|
+
properties: mergeObjects([
|
|
150
|
+
{
|
|
151
|
+
style: styles.header
|
|
152
|
+
},
|
|
153
|
+
properties.header
|
|
154
|
+
]),
|
|
155
|
+
content: {
|
|
156
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("div", {
|
|
157
|
+
className: methods.makeCssClass(styles.headerContent)
|
|
158
|
+
}, content.header && content.header(mergeObjects([
|
|
153
159
|
{
|
|
154
|
-
|
|
160
|
+
width: 'auto'
|
|
161
|
+
},
|
|
162
|
+
properties.header && properties.header.contentStyle,
|
|
163
|
+
])), /*#__PURE__*/ React.createElement("div", {
|
|
164
|
+
className: methods.makeCssClass([
|
|
165
|
+
styles.mobile,
|
|
166
|
+
styles.mdMenu
|
|
167
|
+
])
|
|
168
|
+
}, /*#__PURE__*/ React.createElement(MobileMenu, {
|
|
169
|
+
blockId: `${blockId}_mobile_menu`,
|
|
170
|
+
components: {
|
|
171
|
+
Icon,
|
|
172
|
+
Link
|
|
173
|
+
},
|
|
174
|
+
basePath: basePath,
|
|
175
|
+
events: events,
|
|
176
|
+
methods: methods,
|
|
177
|
+
menus: menus,
|
|
178
|
+
pageId: pageId,
|
|
179
|
+
properties: mergeObjects([
|
|
180
|
+
{
|
|
181
|
+
mode: 'inline',
|
|
182
|
+
theme: get(properties, 'sider.theme') || 'light'
|
|
183
|
+
},
|
|
184
|
+
properties.menu,
|
|
185
|
+
properties.menuMd,
|
|
186
|
+
]),
|
|
187
|
+
rename: {
|
|
188
|
+
methods: {
|
|
189
|
+
toggleOpen: 'toggleMobileMenuOpen',
|
|
190
|
+
setOpen: 'setMobileMenuOpen'
|
|
191
|
+
},
|
|
192
|
+
events: {
|
|
193
|
+
onClose: 'onMobileMenuClose',
|
|
194
|
+
onOpen: 'onMobileMenuOpen'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}))), /*#__PURE__*/ React.createElement(Link, {
|
|
198
|
+
home: true
|
|
199
|
+
}, /*#__PURE__*/ React.createElement("img", {
|
|
200
|
+
src: properties.logo && properties.logo.src || (get(properties, 'header.theme') === 'light' ? `${basePath}/logo-light-theme.png` : `${basePath}/logo-dark-theme.png`),
|
|
201
|
+
srcSet: properties.logo && (properties.logo.srcSet || properties.logo.src) || (get(properties, 'header.theme') === 'light' ? `${basePath}/logo-square-light-theme.png 40w, ${basePath}/logo-light-theme.png 577w` : `${basePath}/logo-square-dark-theme.png 40w, ${basePath}/logo-dark-theme.png 577w`),
|
|
202
|
+
sizes: properties.logo && properties.logo.sizes || '(max-width: 576px) 40px, 577px',
|
|
203
|
+
alt: properties.logo && properties.logo.alt || 'Lowdefy',
|
|
204
|
+
className: methods.makeCssClass([
|
|
205
|
+
{
|
|
206
|
+
width: 130,
|
|
207
|
+
sm: {
|
|
208
|
+
width: properties.logo && properties.logo.src && !properties.logo.srcSet ? 130 : 40
|
|
209
|
+
},
|
|
210
|
+
md: {
|
|
211
|
+
width: 130
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
styles.logo,
|
|
215
|
+
properties.logo && properties.logo.style,
|
|
216
|
+
])
|
|
217
|
+
})))
|
|
218
|
+
}
|
|
219
|
+
}), /*#__PURE__*/ React.createElement(Layout, {
|
|
220
|
+
blockId: `${blockId}_layout`,
|
|
221
|
+
components: {
|
|
222
|
+
Icon,
|
|
223
|
+
Link
|
|
224
|
+
},
|
|
225
|
+
events: events,
|
|
226
|
+
properties: properties.layout,
|
|
227
|
+
content: {
|
|
228
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Sider, {
|
|
229
|
+
blockId: `${blockId}_sider`,
|
|
230
|
+
components: {
|
|
231
|
+
Icon,
|
|
232
|
+
Link
|
|
233
|
+
},
|
|
234
|
+
events: events,
|
|
235
|
+
methods: methods,
|
|
236
|
+
properties: mergeObjects([
|
|
237
|
+
{
|
|
238
|
+
theme: get(properties, 'sider.theme') || 'light',
|
|
239
|
+
style: styles.desktop
|
|
240
|
+
},
|
|
241
|
+
properties.sider,
|
|
242
|
+
]),
|
|
243
|
+
rename: {
|
|
244
|
+
methods: {
|
|
245
|
+
toggleOpen: '_toggleSiderOpen',
|
|
246
|
+
setOpen: '_setSiderOpen'
|
|
247
|
+
}
|
|
155
248
|
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
249
|
+
content: {
|
|
250
|
+
content: ()=>/*#__PURE__*/ React.createElement("div", {
|
|
251
|
+
style: styles.sider
|
|
252
|
+
}, /*#__PURE__*/ React.createElement(Menu, {
|
|
253
|
+
blockId: `${blockId}_menu`,
|
|
254
|
+
components: {
|
|
255
|
+
Icon,
|
|
256
|
+
Link
|
|
257
|
+
},
|
|
258
|
+
basePath: basePath,
|
|
259
|
+
events: events,
|
|
260
|
+
methods: methods,
|
|
261
|
+
menus: menus,
|
|
262
|
+
pageId: pageId,
|
|
263
|
+
properties: mergeObjects([
|
|
264
|
+
{
|
|
265
|
+
mode: 'inline',
|
|
266
|
+
theme: get(properties, 'sider.theme') || 'light'
|
|
267
|
+
},
|
|
268
|
+
properties.menu,
|
|
269
|
+
properties.menuLg,
|
|
270
|
+
{
|
|
271
|
+
style: styles.desktop
|
|
272
|
+
},
|
|
273
|
+
]),
|
|
274
|
+
rename: {
|
|
275
|
+
methods: {
|
|
276
|
+
toggleOpen: 'toggleMobileMenuOpen',
|
|
277
|
+
setOpen: 'setMobileMenuOpen'
|
|
278
|
+
},
|
|
279
|
+
events: {
|
|
280
|
+
onClick: 'onMenuItemClick',
|
|
281
|
+
onSelect: 'onMenuItemCSelect',
|
|
282
|
+
onToggleMenuGroup: 'onToggleMenuGroup'
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}), /*#__PURE__*/ React.createElement("div", {
|
|
286
|
+
style: {
|
|
287
|
+
flex: '1 0 auto'
|
|
288
|
+
}
|
|
289
|
+
}, content.sider && content.sider()), !get(properties, 'sider.hideToggleButton') && /*#__PURE__*/ React.createElement(Affix, {
|
|
290
|
+
blockId: `${blockId}_toggle_sider_affix`,
|
|
291
|
+
components: {
|
|
292
|
+
Icon,
|
|
293
|
+
Link
|
|
294
|
+
},
|
|
295
|
+
events: events,
|
|
296
|
+
properties: {
|
|
297
|
+
offsetBottom: 0
|
|
298
|
+
},
|
|
299
|
+
methods: methods,
|
|
300
|
+
rename: {
|
|
301
|
+
events: {
|
|
302
|
+
onChange: 'onChangeToggleSiderAffix'
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
content: {
|
|
306
|
+
content: ()=>/*#__PURE__*/ React.createElement("div", {
|
|
307
|
+
style: {
|
|
308
|
+
background: get(properties, 'sider.theme') === 'dark' ? '#30393e' : 'white'
|
|
309
|
+
}
|
|
310
|
+
}, /*#__PURE__*/ React.createElement(Button, {
|
|
311
|
+
blockId: `${blockId}_toggle_sider`,
|
|
312
|
+
components: {
|
|
313
|
+
Icon,
|
|
314
|
+
Link
|
|
167
315
|
},
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
children: /*#__PURE__*/ _jsx(MobileMenu, {
|
|
176
|
-
blockId: `${blockId}_mobile_menu`,
|
|
177
|
-
components: {
|
|
178
|
-
Icon,
|
|
179
|
-
Link
|
|
316
|
+
events: events,
|
|
317
|
+
properties: {
|
|
318
|
+
hideTitle: true,
|
|
319
|
+
type: 'link',
|
|
320
|
+
block: true,
|
|
321
|
+
icon: {
|
|
322
|
+
name: openSiderState ? 'AiOutlineMenuFold' : 'AiOutlineMenuUnfold'
|
|
180
323
|
},
|
|
181
|
-
|
|
182
|
-
events: events,
|
|
183
|
-
methods: methods,
|
|
184
|
-
menus: menus,
|
|
185
|
-
pageId: pageId,
|
|
186
|
-
properties: mergeObjects([
|
|
187
|
-
{
|
|
188
|
-
mode: 'inline',
|
|
189
|
-
theme: get(properties, 'sider.theme') || 'light',
|
|
190
|
-
backgroundColor: get(properties, 'sider.color')
|
|
191
|
-
},
|
|
192
|
-
properties.menu,
|
|
193
|
-
properties.menuMd,
|
|
194
|
-
]),
|
|
195
|
-
rename: {
|
|
196
|
-
methods: {
|
|
197
|
-
toggleOpen: 'toggleMobileMenuOpen',
|
|
198
|
-
setOpen: 'setMobileMenuOpen'
|
|
199
|
-
},
|
|
200
|
-
events: {
|
|
201
|
-
onClose: 'onMobileMenuClose',
|
|
202
|
-
onOpen: 'onMobileMenuOpen'
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
})
|
|
206
|
-
})
|
|
207
|
-
]
|
|
208
|
-
}),
|
|
209
|
-
/*#__PURE__*/ _jsx(Link, {
|
|
210
|
-
href: `${basePath}/${homePageId}`,
|
|
211
|
-
children: /*#__PURE__*/ _jsx("img", {
|
|
212
|
-
src: properties.logo && properties.logo.src || (get(properties, 'header.theme') === 'light' ? `${basePath}/public/logo-light-theme.png` : `${basePath}/public/logo-dark-theme.png`),
|
|
213
|
-
srcSet: properties.logo && (properties.logo.srcSet || properties.logo.src) || (get(properties, 'header.theme') === 'light' ? `${basePath}/public/logo-square-light-theme.png 40w, ${basePath}/public/logo-light-theme.png 577w` : `${basePath}/public/logo-square-dark-theme.png 40w, ${basePath}/public/logo-dark-theme.png 577w`),
|
|
214
|
-
sizes: properties.logo && properties.logo.sizes || '(max-width: 576px) 40px, 577px',
|
|
215
|
-
alt: properties.logo && properties.logo.alt || 'Lowdefy',
|
|
216
|
-
className: methods.makeCssClass([
|
|
217
|
-
{
|
|
218
|
-
width: 130,
|
|
219
|
-
sm: {
|
|
220
|
-
width: properties.logo && properties.logo.src && !properties.logo.srcSet ? 130 : 40
|
|
221
|
-
},
|
|
222
|
-
md: {
|
|
223
|
-
width: 130
|
|
224
|
-
}
|
|
324
|
+
...properties.toggleSiderButton || {}
|
|
225
325
|
},
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
326
|
+
methods: methods,
|
|
327
|
+
onClick: ()=>methods.toggleSiderOpen()
|
|
328
|
+
,
|
|
329
|
+
rename: {
|
|
330
|
+
events: {
|
|
331
|
+
onClick: 'onToggleSider'
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}))
|
|
335
|
+
}
|
|
336
|
+
}))
|
|
337
|
+
}
|
|
338
|
+
}), /*#__PURE__*/ React.createElement(Content, {
|
|
339
|
+
blockId: `${blockId}_content`,
|
|
340
|
+
components: {
|
|
341
|
+
Icon,
|
|
342
|
+
Link
|
|
343
|
+
},
|
|
344
|
+
events: events,
|
|
345
|
+
properties: mergeObjects([
|
|
346
|
+
{
|
|
347
|
+
style: styles.body
|
|
348
|
+
},
|
|
349
|
+
properties.content
|
|
350
|
+
]),
|
|
351
|
+
content: {
|
|
352
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, !type.isNone(properties.breadcrumb) ? /*#__PURE__*/ React.createElement(Breadcrumb, {
|
|
353
|
+
blockId: `${blockId}_breadcrumb`,
|
|
354
|
+
basePath: basePath,
|
|
355
|
+
components: {
|
|
356
|
+
Icon,
|
|
357
|
+
Link
|
|
358
|
+
},
|
|
359
|
+
events: events,
|
|
360
|
+
methods: methods,
|
|
361
|
+
properties: mergeObjects([
|
|
362
|
+
{
|
|
363
|
+
style: {
|
|
364
|
+
padding: '16px 0'
|
|
265
365
|
}
|
|
266
366
|
},
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
blockId: `${blockId}_menu`,
|
|
273
|
-
components: {
|
|
274
|
-
Icon,
|
|
275
|
-
Link
|
|
276
|
-
},
|
|
277
|
-
basePath: basePath,
|
|
278
|
-
events: events,
|
|
279
|
-
methods: methods,
|
|
280
|
-
menus: menus,
|
|
281
|
-
pageId: pageId,
|
|
282
|
-
properties: mergeObjects([
|
|
283
|
-
{
|
|
284
|
-
mode: 'inline',
|
|
285
|
-
theme: get(properties, 'sider.theme') || 'light',
|
|
286
|
-
backgroundColor: get(properties, 'sider.color')
|
|
287
|
-
},
|
|
288
|
-
properties.menu,
|
|
289
|
-
properties.menuLg,
|
|
290
|
-
{
|
|
291
|
-
style: styles.desktop
|
|
292
|
-
},
|
|
293
|
-
]),
|
|
294
|
-
rename: {
|
|
295
|
-
methods: {
|
|
296
|
-
toggleOpen: 'toggleMobileMenuOpen',
|
|
297
|
-
setOpen: 'setMobileMenuOpen'
|
|
298
|
-
},
|
|
299
|
-
events: {
|
|
300
|
-
onClick: 'onMenuItemClick',
|
|
301
|
-
onSelect: 'onMenuItemCSelect',
|
|
302
|
-
onToggleMenuGroup: 'onToggleMenuGroup'
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}),
|
|
306
|
-
/*#__PURE__*/ _jsx("div", {
|
|
307
|
-
style: {
|
|
308
|
-
flex: '1 0 auto'
|
|
309
|
-
},
|
|
310
|
-
children: content.sider && content.sider()
|
|
311
|
-
}),
|
|
312
|
-
!get(properties, 'sider.hideToggleButton') && /*#__PURE__*/ _jsx(Affix, {
|
|
313
|
-
blockId: `${blockId}_toggle_sider_affix`,
|
|
314
|
-
components: {
|
|
315
|
-
Icon,
|
|
316
|
-
Link
|
|
317
|
-
},
|
|
318
|
-
events: events,
|
|
319
|
-
properties: {
|
|
320
|
-
offsetBottom: 0
|
|
321
|
-
},
|
|
322
|
-
methods: methods,
|
|
323
|
-
rename: {
|
|
324
|
-
events: {
|
|
325
|
-
onChange: 'onChangeToggleSiderAffix'
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
content: {
|
|
329
|
-
content: ()=>/*#__PURE__*/ _jsx("div", {
|
|
330
|
-
style: {
|
|
331
|
-
background: get(properties, 'sider.color') || (get(properties, 'sider.theme') === 'dark' ? '#30393e' : 'white')
|
|
332
|
-
},
|
|
333
|
-
children: /*#__PURE__*/ _jsx(Button, {
|
|
334
|
-
blockId: `${blockId}_toggle_sider`,
|
|
335
|
-
components: {
|
|
336
|
-
Icon,
|
|
337
|
-
Link
|
|
338
|
-
},
|
|
339
|
-
events: events,
|
|
340
|
-
properties: {
|
|
341
|
-
hideTitle: true,
|
|
342
|
-
type: 'link',
|
|
343
|
-
block: true,
|
|
344
|
-
icon: {
|
|
345
|
-
name: openSiderState ? 'MenuFoldOutlined' : 'MenuUnfoldOutlined'
|
|
346
|
-
},
|
|
347
|
-
...properties.toggleSiderButton || {
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
|
-
methods: methods,
|
|
351
|
-
onClick: ()=>methods.toggleSiderOpen()
|
|
352
|
-
,
|
|
353
|
-
rename: {
|
|
354
|
-
events: {
|
|
355
|
-
onClick: 'onToggleSider'
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
})
|
|
359
|
-
})
|
|
360
|
-
}
|
|
361
|
-
})
|
|
362
|
-
]
|
|
363
|
-
})
|
|
364
|
-
}
|
|
365
|
-
}),
|
|
366
|
-
/*#__PURE__*/ _jsx(Content, {
|
|
367
|
-
blockId: `${blockId}_content`,
|
|
368
|
-
components: {
|
|
369
|
-
Icon,
|
|
370
|
-
Link
|
|
371
|
-
},
|
|
372
|
-
events: events,
|
|
373
|
-
properties: mergeObjects([
|
|
374
|
-
{
|
|
375
|
-
style: styles.body
|
|
376
|
-
},
|
|
377
|
-
properties.content
|
|
378
|
-
]),
|
|
379
|
-
content: {
|
|
380
|
-
content: ()=>/*#__PURE__*/ _jsxs(_Fragment, {
|
|
381
|
-
children: [
|
|
382
|
-
!type.isNone(properties.breadcrumb) ? /*#__PURE__*/ _jsx(Breadcrumb, {
|
|
383
|
-
blockId: `${blockId}_breadcrumb`,
|
|
384
|
-
basePath: basePath,
|
|
385
|
-
components: {
|
|
386
|
-
Icon,
|
|
387
|
-
Link
|
|
388
|
-
},
|
|
389
|
-
events: events,
|
|
390
|
-
methods: methods,
|
|
391
|
-
properties: mergeObjects([
|
|
392
|
-
{
|
|
393
|
-
style: {
|
|
394
|
-
padding: '16px 0'
|
|
395
|
-
}
|
|
396
|
-
},
|
|
397
|
-
properties.breadcrumb,
|
|
398
|
-
]),
|
|
399
|
-
rename: {
|
|
400
|
-
events: {
|
|
401
|
-
onClick: 'onBreadcrumbClick'
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}) : /*#__PURE__*/ _jsx("div", {
|
|
405
|
-
className: methods.makeCssClass(styles.noBreadcrumb)
|
|
406
|
-
}),
|
|
407
|
-
content.content && content.content(),
|
|
408
|
-
content.footer && /*#__PURE__*/ _jsx(Footer, {
|
|
409
|
-
blockId: `${blockId}_footer`,
|
|
410
|
-
components: {
|
|
411
|
-
Icon,
|
|
412
|
-
Link
|
|
413
|
-
},
|
|
414
|
-
events: events,
|
|
415
|
-
properties: properties.footer,
|
|
416
|
-
content: {
|
|
417
|
-
content: ()=>content.footer()
|
|
418
|
-
}
|
|
419
|
-
})
|
|
420
|
-
]
|
|
421
|
-
})
|
|
367
|
+
properties.breadcrumb,
|
|
368
|
+
]),
|
|
369
|
+
rename: {
|
|
370
|
+
events: {
|
|
371
|
+
onClick: 'onBreadcrumbClick'
|
|
422
372
|
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
373
|
+
}
|
|
374
|
+
}) : /*#__PURE__*/ React.createElement("div", {
|
|
375
|
+
className: methods.makeCssClass(styles.noBreadcrumb)
|
|
376
|
+
}), content.content && content.content(), content.footer && /*#__PURE__*/ React.createElement(Footer, {
|
|
377
|
+
blockId: `${blockId}_footer`,
|
|
378
|
+
components: {
|
|
379
|
+
Icon,
|
|
380
|
+
Link
|
|
381
|
+
},
|
|
382
|
+
events: events,
|
|
383
|
+
properties: properties.footer,
|
|
384
|
+
content: {
|
|
385
|
+
content: ()=>content.footer()
|
|
386
|
+
}
|
|
387
|
+
}))
|
|
388
|
+
}
|
|
389
|
+
}))
|
|
390
|
+
}
|
|
391
|
+
}))
|
|
430
392
|
}
|
|
431
393
|
}));
|
|
432
394
|
};
|
|
433
395
|
PageSiderMenu.defaultProps = blockDefaultProps;
|
|
396
|
+
PageSiderMenu.meta = {
|
|
397
|
+
category: 'container',
|
|
398
|
+
icons: [
|
|
399
|
+
'AiOutlineMenuFold',
|
|
400
|
+
'AiOutlineMenuUnfold',
|
|
401
|
+
...MobileMenu.meta.icons
|
|
402
|
+
],
|
|
403
|
+
styles: [
|
|
404
|
+
'blocks/PageSiderMenu/style.less'
|
|
405
|
+
]
|
|
406
|
+
};
|
|
434
407
|
export default PageSiderMenu;
|