@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 } 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.
|
|
@@ -24,12 +23,11 @@ const Option = Select.Option;
|
|
|
24
23
|
const MultipleSelector = ({ blockId , components: { Icon } , events , loading , methods , properties , required , validation , value: value1 , })=>{
|
|
25
24
|
const [fetchState, setFetch] = useState(false);
|
|
26
25
|
const uniqueValueOptions = getUniqueValues(properties.options || []);
|
|
27
|
-
return(/*#__PURE__*/
|
|
26
|
+
return(/*#__PURE__*/ React.createElement(Label, {
|
|
28
27
|
blockId: blockId,
|
|
29
28
|
components: {
|
|
30
29
|
Icon
|
|
31
30
|
},
|
|
32
|
-
loading: loading,
|
|
33
31
|
properties: {
|
|
34
32
|
title: properties.title,
|
|
35
33
|
size: properties.size,
|
|
@@ -38,106 +36,113 @@ const MultipleSelector = ({ blockId , components: { Icon } , events , loading ,
|
|
|
38
36
|
required: required,
|
|
39
37
|
validation: validation,
|
|
40
38
|
content: {
|
|
41
|
-
content: ()=>/*#__PURE__*/
|
|
39
|
+
content: ()=>/*#__PURE__*/ React.createElement("div", {
|
|
42
40
|
className: methods.makeCssClass({
|
|
43
41
|
width: '100%'
|
|
42
|
+
})
|
|
43
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
44
|
+
id: `${blockId}_popup`
|
|
45
|
+
}), /*#__PURE__*/ React.createElement(Select, {
|
|
46
|
+
id: `${blockId}_input`,
|
|
47
|
+
allowClear: properties.allowClear !== false,
|
|
48
|
+
autoFocus: properties.autoFocus,
|
|
49
|
+
bordered: properties.bordered,
|
|
50
|
+
className: methods.makeCssClass([
|
|
51
|
+
{
|
|
52
|
+
width: '100%'
|
|
53
|
+
},
|
|
54
|
+
properties.inputStyle
|
|
55
|
+
]),
|
|
56
|
+
disabled: properties.disabled || loading,
|
|
57
|
+
getPopupContainer: ()=>document.getElementById(`${blockId}_popup`)
|
|
58
|
+
,
|
|
59
|
+
mode: "multiple",
|
|
60
|
+
notFoundContent: fetchState ? 'Loading' : 'Not found',
|
|
61
|
+
placeholder: get(properties, 'placeholder', {
|
|
62
|
+
default: 'Select items'
|
|
44
63
|
}),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
html: `${opt}`,
|
|
116
|
-
methods
|
|
117
|
-
})
|
|
118
|
-
}, i) : /*#__PURE__*/ _jsx(Option, {
|
|
119
|
-
className: methods.makeCssClass([
|
|
120
|
-
properties.optionsStyle,
|
|
121
|
-
opt.style
|
|
122
|
-
]),
|
|
123
|
-
disabled: opt.disabled,
|
|
124
|
-
filterstring: opt.filterString,
|
|
125
|
-
id: `${blockId}_${i}`,
|
|
126
|
-
value: `${i}`,
|
|
127
|
-
children: type.isNone(opt.label) ? renderHtml({
|
|
128
|
-
html: `${opt.value}`,
|
|
129
|
-
methods
|
|
130
|
-
}) : renderHtml({
|
|
131
|
-
html: opt.label,
|
|
132
|
-
methods
|
|
133
|
-
})
|
|
134
|
-
}, i)
|
|
135
|
-
)
|
|
136
|
-
})
|
|
137
|
-
]
|
|
138
|
-
})
|
|
64
|
+
showArrow: get(properties, 'showArrow', {
|
|
65
|
+
default: true
|
|
66
|
+
}),
|
|
67
|
+
size: properties.size,
|
|
68
|
+
value: getValueIndex(value1, uniqueValueOptions, true),
|
|
69
|
+
suffixIcon: properties.suffixIcon && /*#__PURE__*/ React.createElement(Icon, {
|
|
70
|
+
blockId: `${blockId}_suffixIcon`,
|
|
71
|
+
events: events,
|
|
72
|
+
properties: properties.suffixIcon
|
|
73
|
+
}),
|
|
74
|
+
clearIcon: properties.clearIcon && /*#__PURE__*/ React.createElement(Icon, {
|
|
75
|
+
blockId: `${blockId}_clearIcon`,
|
|
76
|
+
events: events,
|
|
77
|
+
properties: properties.clearIcon
|
|
78
|
+
}),
|
|
79
|
+
menuItemSelectedIcon: properties.selectedIcon && /*#__PURE__*/ React.createElement(Icon, {
|
|
80
|
+
blockId: `${blockId}_selectedIcon`,
|
|
81
|
+
events: events,
|
|
82
|
+
properties: properties.selectedIcon
|
|
83
|
+
}),
|
|
84
|
+
filterOption: (input, option)=>(option.filterstring || option.children.props.html || '').toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
85
|
+
,
|
|
86
|
+
onChange: (newVal)=>{
|
|
87
|
+
const val = [];
|
|
88
|
+
newVal.forEach((nv)=>{
|
|
89
|
+
val.push(type.isPrimitive(uniqueValueOptions[nv]) ? uniqueValueOptions[nv] : uniqueValueOptions[nv].value);
|
|
90
|
+
});
|
|
91
|
+
methods.setValue(val);
|
|
92
|
+
methods.triggerEvent({
|
|
93
|
+
name: 'onChange'
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
onSearch: async (value)=>{
|
|
97
|
+
setFetch(true);
|
|
98
|
+
const result = await methods.triggerEvent({
|
|
99
|
+
name: 'onSearch',
|
|
100
|
+
event: {
|
|
101
|
+
value
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
if (!result.bounced) {
|
|
105
|
+
setFetch(false);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}, uniqueValueOptions.map((opt, i)=>type.isPrimitive(opt) ? /*#__PURE__*/ React.createElement(Option, {
|
|
109
|
+
className: methods.makeCssClass(properties.optionsStyle),
|
|
110
|
+
id: `${blockId}_${i}`,
|
|
111
|
+
key: i,
|
|
112
|
+
value: `${i}`
|
|
113
|
+
}, renderHtml({
|
|
114
|
+
html: `${opt}`,
|
|
115
|
+
methods
|
|
116
|
+
})) : /*#__PURE__*/ React.createElement(Option, {
|
|
117
|
+
className: methods.makeCssClass([
|
|
118
|
+
properties.optionsStyle,
|
|
119
|
+
opt.style
|
|
120
|
+
]),
|
|
121
|
+
disabled: opt.disabled,
|
|
122
|
+
filterstring: opt.filterString,
|
|
123
|
+
id: `${blockId}_${i}`,
|
|
124
|
+
key: i,
|
|
125
|
+
value: `${i}`
|
|
126
|
+
}, type.isNone(opt.label) ? renderHtml({
|
|
127
|
+
html: `${opt.value}`,
|
|
128
|
+
methods
|
|
129
|
+
}) : renderHtml({
|
|
130
|
+
html: opt.label,
|
|
131
|
+
methods
|
|
132
|
+
}))
|
|
133
|
+
)))
|
|
139
134
|
}
|
|
140
135
|
}));
|
|
141
136
|
};
|
|
142
137
|
MultipleSelector.defaultProps = blockDefaultProps;
|
|
138
|
+
MultipleSelector.meta = {
|
|
139
|
+
valueType: 'array',
|
|
140
|
+
category: 'input',
|
|
141
|
+
icons: [
|
|
142
|
+
...Label.meta.icons
|
|
143
|
+
],
|
|
144
|
+
styles: [
|
|
145
|
+
'blocks/MultipleSelector/style.less'
|
|
146
|
+
]
|
|
147
|
+
};
|
|
143
148
|
export default MultipleSelector;
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"clearIcon": {
|
|
23
23
|
"type": ["string", "object"],
|
|
24
|
-
"default": "
|
|
25
|
-
"description": "Name of an
|
|
24
|
+
"default": "AiOutlineCloseCircle",
|
|
25
|
+
"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 at far right position of the selector, shown when user is given option to clear input.",
|
|
26
26
|
"docs": {
|
|
27
27
|
"displayType": "icon"
|
|
28
28
|
}
|
|
@@ -191,8 +191,8 @@
|
|
|
191
191
|
},
|
|
192
192
|
"selectedIcon": {
|
|
193
193
|
"type": ["string", "object"],
|
|
194
|
-
"default": "
|
|
195
|
-
"description": "Name of an
|
|
194
|
+
"default": "AiOutlineCheck",
|
|
195
|
+
"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 showing when a selection is made in the drop-down list.",
|
|
196
196
|
"docs": {
|
|
197
197
|
"displayType": "icon"
|
|
198
198
|
}
|
|
@@ -210,8 +210,8 @@
|
|
|
210
210
|
},
|
|
211
211
|
"suffixIcon": {
|
|
212
212
|
"type": ["string", "object"],
|
|
213
|
-
"default": "
|
|
214
|
-
"description": "Name of an
|
|
213
|
+
"default": "AiOutlineDown",
|
|
214
|
+
"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 at the drop-down position of the selector.",
|
|
215
215
|
"docs": {
|
|
216
216
|
"displayType": "icon"
|
|
217
217
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } 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.
|
|
@@ -20,8 +19,7 @@ import { type } from '@lowdefy/helpers';
|
|
|
20
19
|
import Button from '../Button/Button.js';
|
|
21
20
|
const NotificationBlock = ({ blockId , components: { Icon } , events , methods , properties })=>{
|
|
22
21
|
useEffect(()=>{
|
|
23
|
-
methods.registerMethod('open', (args = {
|
|
24
|
-
})=>{
|
|
22
|
+
methods.registerMethod('open', (args = {})=>{
|
|
25
23
|
notification[args.status || properties.status || 'success']({
|
|
26
24
|
id: `${blockId}_notification`,
|
|
27
25
|
bottom: properties.bottom,
|
|
@@ -45,12 +43,12 @@ const NotificationBlock = ({ blockId , components: { Icon } , events , methods
|
|
|
45
43
|
,
|
|
46
44
|
placement: properties.placement,
|
|
47
45
|
top: properties.top,
|
|
48
|
-
icon: properties.icon && /*#__PURE__*/
|
|
46
|
+
icon: properties.icon && /*#__PURE__*/ React.createElement(Icon, {
|
|
49
47
|
blockId: `${blockId}_icon`,
|
|
50
48
|
events: events,
|
|
51
49
|
properties: properties.icon
|
|
52
50
|
}),
|
|
53
|
-
btn: properties.button && /*#__PURE__*/
|
|
51
|
+
btn: properties.button && /*#__PURE__*/ React.createElement(Button, {
|
|
54
52
|
blockId: `${blockId}_button`,
|
|
55
53
|
events: events,
|
|
56
54
|
properties: properties.button,
|
|
@@ -58,7 +56,7 @@ const NotificationBlock = ({ blockId , components: { Icon } , events , methods
|
|
|
58
56
|
name: 'onClose'
|
|
59
57
|
})
|
|
60
58
|
}),
|
|
61
|
-
closeIcon: properties.closeIcon && /*#__PURE__*/
|
|
59
|
+
closeIcon: properties.closeIcon && /*#__PURE__*/ React.createElement(Icon, {
|
|
62
60
|
blockId: `${blockId}_closeIcon`,
|
|
63
61
|
events: events,
|
|
64
62
|
properties: properties.closeIcon
|
|
@@ -66,9 +64,16 @@ const NotificationBlock = ({ blockId , components: { Icon } , events , methods
|
|
|
66
64
|
});
|
|
67
65
|
});
|
|
68
66
|
});
|
|
69
|
-
return(/*#__PURE__*/
|
|
67
|
+
return(/*#__PURE__*/ React.createElement("div", {
|
|
70
68
|
id: blockId
|
|
71
69
|
}));
|
|
72
70
|
};
|
|
73
71
|
NotificationBlock.defaultProps = blockDefaultProps;
|
|
72
|
+
NotificationBlock.meta = {
|
|
73
|
+
category: 'display',
|
|
74
|
+
icons: [],
|
|
75
|
+
styles: [
|
|
76
|
+
'blocks/Notification/style.less'
|
|
77
|
+
]
|
|
78
|
+
};
|
|
74
79
|
export default NotificationBlock;
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
},
|
|
28
28
|
"icon": {
|
|
29
29
|
"type": ["string", "object"],
|
|
30
|
-
"description": "Name of an
|
|
30
|
+
"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 notification icon.",
|
|
31
31
|
"docs": {
|
|
32
32
|
"displayType": "icon"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"closeIcon": {
|
|
36
36
|
"type": ["string", "object"],
|
|
37
|
-
"description": "Name of an
|
|
37
|
+
"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 close icon.",
|
|
38
38
|
"docs": {
|
|
39
39
|
"displayType": "icon"
|
|
40
40
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } 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.
|
|
@@ -18,11 +17,10 @@ import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
|
18
17
|
import { InputNumber } from 'antd';
|
|
19
18
|
import Label from '../Label/Label.js';
|
|
20
19
|
const NumberInput = ({ blockId , events , components , loading , methods , properties , required , validation , value , })=>{
|
|
21
|
-
return(/*#__PURE__*/
|
|
20
|
+
return(/*#__PURE__*/ React.createElement(Label, {
|
|
22
21
|
blockId: blockId,
|
|
23
22
|
components: components,
|
|
24
23
|
events: events,
|
|
25
|
-
loading: loading,
|
|
26
24
|
properties: {
|
|
27
25
|
title: properties.title,
|
|
28
26
|
size: properties.size,
|
|
@@ -31,7 +29,7 @@ const NumberInput = ({ blockId , events , components , loading , methods , prope
|
|
|
31
29
|
required: required,
|
|
32
30
|
validation: validation,
|
|
33
31
|
content: {
|
|
34
|
-
content: ()=>/*#__PURE__*/
|
|
32
|
+
content: ()=>/*#__PURE__*/ React.createElement(InputNumber, {
|
|
35
33
|
id: `${blockId}_input`,
|
|
36
34
|
autoComplete: "off",
|
|
37
35
|
autoFocus: properties.autoFocus,
|
|
@@ -44,7 +42,7 @@ const NumberInput = ({ blockId , events , components , loading , methods , prope
|
|
|
44
42
|
]),
|
|
45
43
|
controls: properties.controls,
|
|
46
44
|
decimalSeparator: properties.decimalSeparator,
|
|
47
|
-
disabled: properties.disabled,
|
|
45
|
+
disabled: properties.disabled || loading,
|
|
48
46
|
formatter: properties.formatter,
|
|
49
47
|
keyboard: properties.keyboard,
|
|
50
48
|
max: properties.max,
|
|
@@ -70,4 +68,14 @@ const NumberInput = ({ blockId , events , components , loading , methods , prope
|
|
|
70
68
|
}));
|
|
71
69
|
};
|
|
72
70
|
NumberInput.defaultProps = blockDefaultProps;
|
|
71
|
+
NumberInput.meta = {
|
|
72
|
+
valueType: 'number',
|
|
73
|
+
category: 'input',
|
|
74
|
+
icons: [
|
|
75
|
+
...Label.meta.icons
|
|
76
|
+
],
|
|
77
|
+
styles: [
|
|
78
|
+
'blocks/NumberInput/style.less'
|
|
79
|
+
]
|
|
80
|
+
};
|
|
73
81
|
export default NumberInput;
|
|
@@ -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.
|
|
@@ -20,7 +19,7 @@ import Content from '../Content/Content.js';
|
|
|
20
19
|
import Footer from '../Footer/Footer.js';
|
|
21
20
|
import Header from '../Header/Header.js';
|
|
22
21
|
import Layout from '../Layout/Layout.js';
|
|
23
|
-
const PageHCF = ({ blockId , components , content , events , properties })=>/*#__PURE__*/
|
|
22
|
+
const PageHCF = ({ blockId , components , content , events , properties })=>/*#__PURE__*/ React.createElement(Layout, {
|
|
24
23
|
blockId: blockId,
|
|
25
24
|
components: components,
|
|
26
25
|
events: events,
|
|
@@ -33,39 +32,40 @@ const PageHCF = ({ blockId , components , content , events , properties })=>/*#
|
|
|
33
32
|
])
|
|
34
33
|
},
|
|
35
34
|
content: {
|
|
36
|
-
content: ()=>/*#__PURE__*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
content: {
|
|
62
|
-
content: ()=>content.footer()
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
]
|
|
66
|
-
})
|
|
35
|
+
content: ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, content.header && /*#__PURE__*/ React.createElement(Header, {
|
|
36
|
+
blockId: `${blockId}_header`,
|
|
37
|
+
components: components,
|
|
38
|
+
events: events,
|
|
39
|
+
properties: properties.header,
|
|
40
|
+
content: {
|
|
41
|
+
content: ()=>content.header()
|
|
42
|
+
}
|
|
43
|
+
}), content.content && /*#__PURE__*/ React.createElement(Content, {
|
|
44
|
+
blockId: `${blockId}_content`,
|
|
45
|
+
components: components,
|
|
46
|
+
events: events,
|
|
47
|
+
properties: properties.content,
|
|
48
|
+
content: {
|
|
49
|
+
content: ()=>content.content()
|
|
50
|
+
}
|
|
51
|
+
}), content.footer && /*#__PURE__*/ React.createElement(Footer, {
|
|
52
|
+
blockId: `${blockId}_footer`,
|
|
53
|
+
components: components,
|
|
54
|
+
events: events,
|
|
55
|
+
properties: properties.footer,
|
|
56
|
+
content: {
|
|
57
|
+
content: ()=>content.footer()
|
|
58
|
+
}
|
|
59
|
+
}))
|
|
67
60
|
}
|
|
68
61
|
})
|
|
69
62
|
;
|
|
70
63
|
PageHCF.defaultProps = blockDefaultProps;
|
|
64
|
+
PageHCF.meta = {
|
|
65
|
+
category: 'container',
|
|
66
|
+
icons: [],
|
|
67
|
+
styles: [
|
|
68
|
+
'blocks/PageHCF/style.less'
|
|
69
|
+
]
|
|
70
|
+
};
|
|
71
71
|
export default PageHCF;
|
|
@@ -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.",
|
|
@@ -67,27 +60,5 @@
|
|
|
67
60
|
}
|
|
68
61
|
}
|
|
69
62
|
}
|
|
70
|
-
},
|
|
71
|
-
"events": {
|
|
72
|
-
"type": "object",
|
|
73
|
-
"additionalProperties": false,
|
|
74
|
-
"properties": {
|
|
75
|
-
"onEnter": {
|
|
76
|
-
"type": "array",
|
|
77
|
-
"description": "Trigger actions every time a context is mounted and keep the page in loading until all actions have finished."
|
|
78
|
-
},
|
|
79
|
-
"onEnterAsync": {
|
|
80
|
-
"type": "array",
|
|
81
|
-
"description": "Trigger actions every time a context is mounted and do not keep the page in loading."
|
|
82
|
-
},
|
|
83
|
-
"onInit": {
|
|
84
|
-
"type": "array",
|
|
85
|
-
"description": "Trigger actions the first time a context is mounted and keep the page in loading until all actions have finished."
|
|
86
|
-
},
|
|
87
|
-
"onInitAsync": {
|
|
88
|
-
"type": "array",
|
|
89
|
-
"description": "Trigger actions the first time a context is mounted and do not keep the page in loading."
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
63
|
}
|
|
93
64
|
}
|