@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.
|
|
@@ -23,7 +22,7 @@ import Header from '../Header/Header.js';
|
|
|
23
22
|
import Layout from '../Layout/Layout.js';
|
|
24
23
|
import Menu from '../Menu/Menu.js';
|
|
25
24
|
import MobileMenu from '../MobileMenu/MobileMenu.js';
|
|
26
|
-
const PageHeaderMenu = ({ basePath , blockId , components: { Icon , Link } , content , events ,
|
|
25
|
+
const PageHeaderMenu = ({ basePath , blockId , components: { Icon , Link } , content , events , menus , methods , pageId , properties , })=>{
|
|
27
26
|
const styles = {
|
|
28
27
|
layout: {
|
|
29
28
|
minHeight: '100vh'
|
|
@@ -117,7 +116,7 @@ const PageHeaderMenu = ({ basePath , blockId , components: { Icon , Link } , co
|
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
};
|
|
120
|
-
return(/*#__PURE__*/
|
|
119
|
+
return(/*#__PURE__*/ React.createElement(Layout, {
|
|
121
120
|
blockId: blockId,
|
|
122
121
|
events: events,
|
|
123
122
|
properties: {
|
|
@@ -133,174 +132,159 @@ const PageHeaderMenu = ({ basePath , blockId , components: { Icon , Link } , co
|
|
|
133
132
|
Link
|
|
134
133
|
},
|
|
135
134
|
content: {
|
|
136
|
-
content: ()=>/*#__PURE__*/
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
135
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Header, {
|
|
136
|
+
blockId: `${blockId}_header`,
|
|
137
|
+
events: events,
|
|
138
|
+
components: {
|
|
139
|
+
Icon,
|
|
140
|
+
Link
|
|
141
|
+
},
|
|
142
|
+
properties: mergeObjects([
|
|
143
|
+
{
|
|
144
|
+
style: styles.header
|
|
145
|
+
},
|
|
146
|
+
properties.header,
|
|
147
|
+
]),
|
|
148
|
+
content: {
|
|
149
|
+
// TODO: use next/image
|
|
150
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Link, {
|
|
151
|
+
home: true
|
|
152
|
+
}, /*#__PURE__*/ React.createElement("img", {
|
|
153
|
+
src: properties.logo && properties.logo.src || (get(properties, 'header.theme') === 'light' ? `${basePath}/logo-light-theme.png` : `${basePath}/logo-dark-theme.png`),
|
|
154
|
+
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`),
|
|
155
|
+
sizes: properties.logo && properties.logo.sizes || '(max-width: 576px) 40px, 577px',
|
|
156
|
+
alt: properties.logo && properties.logo.alt || 'Lowdefy',
|
|
157
|
+
className: methods.makeCssClass([
|
|
158
|
+
{
|
|
159
|
+
width: 130,
|
|
160
|
+
sm: {
|
|
161
|
+
width: properties.logo && properties.logo.src && !properties.logo.srcSet ? 130 : 40
|
|
162
|
+
},
|
|
163
|
+
md: {
|
|
164
|
+
width: 130
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
styles.logo,
|
|
168
|
+
properties.logo && properties.logo.style,
|
|
169
|
+
])
|
|
170
|
+
})), /*#__PURE__*/ React.createElement("div", {
|
|
171
|
+
className: methods.makeCssClass(styles.headerContent)
|
|
172
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
173
|
+
className: methods.makeCssClass([
|
|
174
|
+
styles.desktop,
|
|
175
|
+
styles.lgMenu
|
|
176
|
+
])
|
|
177
|
+
}, /*#__PURE__*/ React.createElement(Menu, {
|
|
178
|
+
blockId: `${blockId}_menu`,
|
|
179
|
+
basePath: basePath,
|
|
180
|
+
components: {
|
|
181
|
+
Icon,
|
|
182
|
+
Link
|
|
148
183
|
},
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
width: 130,
|
|
164
|
-
sm: {
|
|
165
|
-
width: properties.logo && properties.logo.src && !properties.logo.srcSet ? 130 : 40
|
|
166
|
-
},
|
|
167
|
-
md: {
|
|
168
|
-
width: 130
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
styles.logo,
|
|
172
|
-
properties.logo && properties.logo.style,
|
|
173
|
-
])
|
|
174
|
-
})
|
|
175
|
-
}),
|
|
176
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
177
|
-
className: methods.makeCssClass(styles.headerContent),
|
|
178
|
-
children: [
|
|
179
|
-
/*#__PURE__*/ _jsx("div", {
|
|
180
|
-
className: methods.makeCssClass([
|
|
181
|
-
styles.desktop,
|
|
182
|
-
styles.lgMenu
|
|
183
|
-
]),
|
|
184
|
-
children: /*#__PURE__*/ _jsx(Menu, {
|
|
185
|
-
blockId: `${blockId}_menu`,
|
|
186
|
-
basePath: basePath,
|
|
187
|
-
components: {
|
|
188
|
-
Icon,
|
|
189
|
-
Link
|
|
190
|
-
},
|
|
191
|
-
events: events,
|
|
192
|
-
methods: methods,
|
|
193
|
-
menus: menus,
|
|
194
|
-
pageId: pageId,
|
|
195
|
-
properties: mergeObjects([
|
|
196
|
-
{
|
|
197
|
-
mode: 'horizontal',
|
|
198
|
-
collapsed: false,
|
|
199
|
-
theme: get(properties, 'header.theme') || 'dark',
|
|
200
|
-
backgroundColor: get(properties, 'header.color')
|
|
201
|
-
},
|
|
202
|
-
properties.menu,
|
|
203
|
-
properties.menuLg,
|
|
204
|
-
])
|
|
205
|
-
})
|
|
206
|
-
}),
|
|
207
|
-
content.header && content.header(mergeObjects([
|
|
208
|
-
{
|
|
209
|
-
width: 'auto',
|
|
210
|
-
flex: '0 1 auto'
|
|
211
|
-
},
|
|
212
|
-
properties.header && properties.header.contentStyle,
|
|
213
|
-
])),
|
|
214
|
-
/*#__PURE__*/ _jsx("div", {
|
|
215
|
-
className: methods.makeCssClass([
|
|
216
|
-
styles.mobile,
|
|
217
|
-
styles.mdMenu
|
|
218
|
-
]),
|
|
219
|
-
children: /*#__PURE__*/ _jsx(MobileMenu, {
|
|
220
|
-
blockId: `${blockId}_mobile_menu`,
|
|
221
|
-
basePath: basePath,
|
|
222
|
-
components: {
|
|
223
|
-
Icon,
|
|
224
|
-
Link
|
|
225
|
-
},
|
|
226
|
-
events: events,
|
|
227
|
-
methods: methods,
|
|
228
|
-
menus: menus,
|
|
229
|
-
pageId: pageId,
|
|
230
|
-
properties: mergeObjects([
|
|
231
|
-
properties.menu,
|
|
232
|
-
properties.menuMd
|
|
233
|
-
])
|
|
234
|
-
})
|
|
235
|
-
})
|
|
236
|
-
]
|
|
237
|
-
})
|
|
238
|
-
]
|
|
239
|
-
})
|
|
240
|
-
}
|
|
241
|
-
}),
|
|
242
|
-
/*#__PURE__*/ _jsx(Content, {
|
|
243
|
-
blockId: `${blockId}_content`,
|
|
244
|
-
components: {
|
|
245
|
-
Icon,
|
|
246
|
-
Link
|
|
247
|
-
},
|
|
248
|
-
events: events,
|
|
249
|
-
properties: mergeObjects([
|
|
250
|
-
properties.content,
|
|
184
|
+
events: events,
|
|
185
|
+
methods: methods,
|
|
186
|
+
menus: menus,
|
|
187
|
+
pageId: pageId,
|
|
188
|
+
properties: mergeObjects([
|
|
189
|
+
{
|
|
190
|
+
mode: 'horizontal',
|
|
191
|
+
collapsed: false,
|
|
192
|
+
theme: get(properties, 'header.theme') || 'dark'
|
|
193
|
+
},
|
|
194
|
+
properties.menu,
|
|
195
|
+
properties.menuLg,
|
|
196
|
+
])
|
|
197
|
+
})), content.header && content.header(mergeObjects([
|
|
251
198
|
{
|
|
252
|
-
|
|
199
|
+
width: 'auto',
|
|
200
|
+
flex: '0 1 auto'
|
|
201
|
+
},
|
|
202
|
+
properties.header && properties.header.contentStyle,
|
|
203
|
+
])), /*#__PURE__*/ React.createElement("div", {
|
|
204
|
+
className: methods.makeCssClass([
|
|
205
|
+
styles.mobile,
|
|
206
|
+
styles.mdMenu
|
|
207
|
+
])
|
|
208
|
+
}, /*#__PURE__*/ React.createElement(MobileMenu, {
|
|
209
|
+
blockId: `${blockId}_mobile_menu`,
|
|
210
|
+
basePath: basePath,
|
|
211
|
+
components: {
|
|
212
|
+
Icon,
|
|
213
|
+
Link
|
|
214
|
+
},
|
|
215
|
+
events: events,
|
|
216
|
+
methods: methods,
|
|
217
|
+
menus: menus,
|
|
218
|
+
pageId: pageId,
|
|
219
|
+
properties: mergeObjects([
|
|
220
|
+
properties.menu,
|
|
221
|
+
properties.menuMd
|
|
222
|
+
])
|
|
223
|
+
}))))
|
|
224
|
+
}
|
|
225
|
+
}), /*#__PURE__*/ React.createElement(Content, {
|
|
226
|
+
blockId: `${blockId}_content`,
|
|
227
|
+
components: {
|
|
228
|
+
Icon,
|
|
229
|
+
Link
|
|
230
|
+
},
|
|
231
|
+
events: events,
|
|
232
|
+
properties: mergeObjects([
|
|
233
|
+
properties.content,
|
|
234
|
+
{
|
|
235
|
+
style: styles.body
|
|
236
|
+
}
|
|
237
|
+
]),
|
|
238
|
+
content: {
|
|
239
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, !type.isNone(properties.breadcrumb) ? /*#__PURE__*/ React.createElement(Breadcrumb, {
|
|
240
|
+
blockId: `${blockId}_breadcrumb`,
|
|
241
|
+
basePath: basePath,
|
|
242
|
+
components: {
|
|
243
|
+
Icon,
|
|
244
|
+
Link
|
|
245
|
+
},
|
|
246
|
+
events: events,
|
|
247
|
+
methods: methods,
|
|
248
|
+
properties: mergeObjects([
|
|
249
|
+
properties.breadcrumb,
|
|
250
|
+
{
|
|
251
|
+
style: {
|
|
252
|
+
padding: '16px 0'
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
]),
|
|
256
|
+
rename: {
|
|
257
|
+
events: {
|
|
258
|
+
onClick: 'onBreadcrumbClick'
|
|
259
|
+
}
|
|
253
260
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
style: {
|
|
271
|
-
padding: '16px 0'
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
]),
|
|
275
|
-
rename: {
|
|
276
|
-
events: {
|
|
277
|
-
onClick: 'onBreadcrumbClick'
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}) : /*#__PURE__*/ _jsx("div", {
|
|
281
|
-
className: methods.makeCssClass(styles.noBreadcrumb)
|
|
282
|
-
}),
|
|
283
|
-
content.content && content.content()
|
|
284
|
-
]
|
|
285
|
-
})
|
|
286
|
-
}
|
|
287
|
-
}),
|
|
288
|
-
content.footer && /*#__PURE__*/ _jsx(Footer, {
|
|
289
|
-
blockId: `${blockId}_footer`,
|
|
290
|
-
components: {
|
|
291
|
-
Icon,
|
|
292
|
-
Link
|
|
293
|
-
},
|
|
294
|
-
events: events,
|
|
295
|
-
properties: properties.footer,
|
|
296
|
-
content: {
|
|
297
|
-
content: ()=>content.footer()
|
|
298
|
-
}
|
|
299
|
-
})
|
|
300
|
-
]
|
|
301
|
-
})
|
|
261
|
+
}) : /*#__PURE__*/ React.createElement("div", {
|
|
262
|
+
className: methods.makeCssClass(styles.noBreadcrumb)
|
|
263
|
+
}), content.content && content.content())
|
|
264
|
+
}
|
|
265
|
+
}), content.footer && /*#__PURE__*/ React.createElement(Footer, {
|
|
266
|
+
blockId: `${blockId}_footer`,
|
|
267
|
+
components: {
|
|
268
|
+
Icon,
|
|
269
|
+
Link
|
|
270
|
+
},
|
|
271
|
+
events: events,
|
|
272
|
+
properties: properties.footer,
|
|
273
|
+
content: {
|
|
274
|
+
content: ()=>content.footer()
|
|
275
|
+
}
|
|
276
|
+
}))
|
|
302
277
|
}
|
|
303
278
|
}));
|
|
304
279
|
};
|
|
305
280
|
PageHeaderMenu.defaultProps = blockDefaultProps;
|
|
281
|
+
PageHeaderMenu.meta = {
|
|
282
|
+
category: 'container',
|
|
283
|
+
icons: [
|
|
284
|
+
...MobileMenu.meta.icons
|
|
285
|
+
],
|
|
286
|
+
styles: [
|
|
287
|
+
'blocks/PageHeaderMenu/style.less'
|
|
288
|
+
]
|
|
289
|
+
};
|
|
306
290
|
export default PageHeaderMenu;
|
|
@@ -53,13 +53,6 @@
|
|
|
53
53
|
"displayType": "yaml"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"color": {
|
|
57
|
-
"type": "string",
|
|
58
|
-
"description": "Header color.",
|
|
59
|
-
"docs": {
|
|
60
|
-
"displayType": "color"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
56
|
"style": {
|
|
64
57
|
"type": "object",
|
|
65
58
|
"description": "Header css style object.",
|
|
@@ -150,7 +143,7 @@
|
|
|
150
143
|
},
|
|
151
144
|
"icon": {
|
|
152
145
|
"type": ["string", "object"],
|
|
153
|
-
"description": "Name of an
|
|
146
|
+
"description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon on menu item.",
|
|
154
147
|
"docs": {
|
|
155
148
|
"displayType": "icon"
|
|
156
149
|
}
|
|
@@ -197,22 +190,6 @@
|
|
|
197
190
|
"type": "array",
|
|
198
191
|
"description": "Trigger action when mobile menu is closed."
|
|
199
192
|
},
|
|
200
|
-
"onEnter": {
|
|
201
|
-
"type": "array",
|
|
202
|
-
"description": "Trigger actions every time a context is mounted and keep the page in loading until all actions have finished."
|
|
203
|
-
},
|
|
204
|
-
"onEnterAsync": {
|
|
205
|
-
"type": "array",
|
|
206
|
-
"description": "Trigger actions every time a context is mounted and do not keep the page in loading."
|
|
207
|
-
},
|
|
208
|
-
"onInit": {
|
|
209
|
-
"type": "array",
|
|
210
|
-
"description": "Trigger actions the first time a context is mounted and keep the page in loading until all actions have finished."
|
|
211
|
-
},
|
|
212
|
-
"onInitAsync": {
|
|
213
|
-
"type": "array",
|
|
214
|
-
"description": "Trigger actions the first time a context is mounted and do not keep the page in loading."
|
|
215
|
-
},
|
|
216
193
|
"onMenuItemClick": {
|
|
217
194
|
"type": "array",
|
|
218
195
|
"description": "Trigger action when menu item is clicked."
|
|
@@ -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.
|
|
@@ -21,7 +20,7 @@ import Footer from '../Footer/Footer.js';
|
|
|
21
20
|
import Header from '../Header/Header.js';
|
|
22
21
|
import Layout from '../Layout/Layout.js';
|
|
23
22
|
import Sider from '../Sider/Sider.js';
|
|
24
|
-
const PageSHCF = ({ blockId , components , events , content , properties , methods })=>/*#__PURE__*/
|
|
23
|
+
const PageSHCF = ({ blockId , components , events , content , properties , methods })=>/*#__PURE__*/ React.createElement(Layout, {
|
|
25
24
|
blockId: blockId,
|
|
26
25
|
components: components,
|
|
27
26
|
events: events,
|
|
@@ -34,71 +33,67 @@ const PageSHCF = ({ blockId , components , events , content , properties , metho
|
|
|
34
33
|
])
|
|
35
34
|
},
|
|
36
35
|
content: {
|
|
37
|
-
content: ()=>/*#__PURE__*/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
36
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, content.sider && /*#__PURE__*/ React.createElement(Sider, {
|
|
37
|
+
blockId: `${blockId}_sider`,
|
|
38
|
+
components: components,
|
|
39
|
+
events: events,
|
|
40
|
+
properties: properties.sider,
|
|
41
|
+
methods: methods,
|
|
42
|
+
content: {
|
|
43
|
+
content: ()=>content.sider()
|
|
44
|
+
},
|
|
45
|
+
rename: {
|
|
46
|
+
events: {
|
|
47
|
+
onClose: 'onSiderClose',
|
|
48
|
+
onOpen: 'onSiderOpen'
|
|
49
|
+
},
|
|
50
|
+
methods: {
|
|
51
|
+
toggleOpen: 'toggleSiderOpen',
|
|
52
|
+
setOpen: 'setSiderOpen'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}), /*#__PURE__*/ React.createElement(Layout, {
|
|
56
|
+
blockId: `${blockId}_layout`,
|
|
57
|
+
components: components,
|
|
58
|
+
events: events,
|
|
59
|
+
properties: properties.main,
|
|
60
|
+
content: {
|
|
61
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, content.header && /*#__PURE__*/ React.createElement(Header, {
|
|
62
|
+
blockId: `${blockId}_header`,
|
|
63
|
+
components: components,
|
|
64
|
+
events: events,
|
|
65
|
+
properties: properties.header,
|
|
66
|
+
content: {
|
|
67
|
+
content: ()=>content.header()
|
|
56
68
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
content.content && /*#__PURE__*/ _jsx(Content, {
|
|
77
|
-
blockId: `${blockId}_content`,
|
|
78
|
-
components: components,
|
|
79
|
-
events: events,
|
|
80
|
-
properties: properties.content,
|
|
81
|
-
content: {
|
|
82
|
-
content: ()=>content.content()
|
|
83
|
-
}
|
|
84
|
-
}),
|
|
85
|
-
content.footer && /*#__PURE__*/ _jsx(Footer, {
|
|
86
|
-
blockId: `${blockId}_footer`,
|
|
87
|
-
components: components,
|
|
88
|
-
events: events,
|
|
89
|
-
properties: properties.footer,
|
|
90
|
-
content: {
|
|
91
|
-
content: ()=>content.footer()
|
|
92
|
-
}
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
})
|
|
96
|
-
}
|
|
97
|
-
})
|
|
98
|
-
]
|
|
99
|
-
})
|
|
69
|
+
}), content.content && /*#__PURE__*/ React.createElement(Content, {
|
|
70
|
+
blockId: `${blockId}_content`,
|
|
71
|
+
components: components,
|
|
72
|
+
events: events,
|
|
73
|
+
properties: properties.content,
|
|
74
|
+
content: {
|
|
75
|
+
content: ()=>content.content()
|
|
76
|
+
}
|
|
77
|
+
}), content.footer && /*#__PURE__*/ React.createElement(Footer, {
|
|
78
|
+
blockId: `${blockId}_footer`,
|
|
79
|
+
components: components,
|
|
80
|
+
events: events,
|
|
81
|
+
properties: properties.footer,
|
|
82
|
+
content: {
|
|
83
|
+
content: ()=>content.footer()
|
|
84
|
+
}
|
|
85
|
+
}))
|
|
86
|
+
}
|
|
87
|
+
}))
|
|
100
88
|
}
|
|
101
89
|
})
|
|
102
90
|
;
|
|
103
91
|
PageSHCF.defaultProps = blockDefaultProps;
|
|
92
|
+
PageSHCF.meta = {
|
|
93
|
+
category: 'container',
|
|
94
|
+
icons: [],
|
|
95
|
+
styles: [
|
|
96
|
+
'blocks/PageSHCF/style.less'
|
|
97
|
+
]
|
|
98
|
+
};
|
|
104
99
|
export default PageSHCF;
|
|
@@ -15,13 +15,6 @@
|
|
|
15
15
|
"default": "dark",
|
|
16
16
|
"description": "Header theme color."
|
|
17
17
|
},
|
|
18
|
-
"color": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"description": "Header color.",
|
|
21
|
-
"docs": {
|
|
22
|
-
"displayType": "color"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
18
|
"style": {
|
|
26
19
|
"type": "object",
|
|
27
20
|
"description": "Header css style object.",
|
|
@@ -79,13 +72,6 @@
|
|
|
79
72
|
"default": true,
|
|
80
73
|
"description": "Whether can be collapsed"
|
|
81
74
|
},
|
|
82
|
-
"color": {
|
|
83
|
-
"type": "string",
|
|
84
|
-
"description": "Sider color",
|
|
85
|
-
"docs": {
|
|
86
|
-
"displayType": "color"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
75
|
"initialCollapsed": {
|
|
90
76
|
"type": "boolean",
|
|
91
77
|
"default": true,
|
|
@@ -149,22 +135,6 @@
|
|
|
149
135
|
"type": "array",
|
|
150
136
|
"description": "Trigger actions when sider breakpoint id crossed."
|
|
151
137
|
},
|
|
152
|
-
"onEnter": {
|
|
153
|
-
"type": "array",
|
|
154
|
-
"description": "Trigger actions every time a context is mounted and keep the page in loading until all actions have finished."
|
|
155
|
-
},
|
|
156
|
-
"onEnterAsync": {
|
|
157
|
-
"type": "array",
|
|
158
|
-
"description": "Trigger actions every time a context is mounted and do not keep the page in loading."
|
|
159
|
-
},
|
|
160
|
-
"onInit": {
|
|
161
|
-
"type": "array",
|
|
162
|
-
"description": "Trigger actions the first time a context is mounted and keep the page in loading until all actions have finished."
|
|
163
|
-
},
|
|
164
|
-
"onInitAsync": {
|
|
165
|
-
"type": "array",
|
|
166
|
-
"description": "Trigger actions the first time a context is mounted and do not keep the page in loading."
|
|
167
|
-
},
|
|
168
138
|
"onSiderClose": {
|
|
169
139
|
"type": "array",
|
|
170
140
|
"description": "Trigger actions when sider is closed."
|