@lowdefy/blocks-antd 5.6.0 → 6.1.0
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/TagPillRow.js +88 -0
- package/dist/blocks/Affix/gallery.yaml +399 -0
- package/dist/blocks/Affix/tests/Affix.e2e.yaml +72 -0
- package/dist/blocks/Affix/tests.yaml +29 -0
- package/dist/blocks/Alert/gallery.yaml +701 -0
- package/dist/blocks/Alert/tests/Alert.e2e.yaml +161 -0
- package/dist/blocks/Alert/tests.yaml +261 -0
- package/dist/blocks/AutoComplete/gallery.yaml +713 -0
- package/dist/blocks/AutoComplete/tests/AutoComplete.e2e.yaml +330 -0
- package/dist/blocks/AutoComplete/tests.yaml +178 -0
- package/dist/blocks/Avatar/gallery.yaml +1037 -0
- package/dist/blocks/Avatar/tests/Avatar.e2e.yaml +125 -0
- package/dist/blocks/Avatar/tests.yaml +76 -0
- package/dist/blocks/Badge/gallery.yaml +1090 -0
- package/dist/blocks/Badge/tests/Badge.e2e.yaml +195 -0
- package/dist/blocks/Badge/tests.yaml +91 -0
- package/dist/blocks/Breadcrumb/gallery.yaml +484 -0
- package/dist/blocks/Breadcrumb/tests/Breadcrumb.e2e.yaml +165 -0
- package/dist/blocks/Breadcrumb/tests.yaml +106 -0
- package/dist/blocks/Button/Button.js +11 -2
- package/dist/blocks/Button/gallery.yaml +718 -0
- package/dist/blocks/Button/meta.js +4 -0
- package/dist/blocks/Button/tests/Button.e2e.yaml +246 -0
- package/dist/blocks/Button/tests.yaml +109 -0
- package/dist/blocks/ButtonSelector/gallery.yaml +891 -0
- package/dist/blocks/ButtonSelector/tests/ButtonSelector.e2e.yaml +188 -0
- package/dist/blocks/ButtonSelector/tests.yaml +167 -0
- package/dist/blocks/Calendar/gallery.yaml +128 -0
- package/dist/blocks/Calendar/tests/Calendar.e2e.yaml +136 -0
- package/dist/blocks/Calendar/tests.yaml +50 -0
- package/dist/blocks/Card/gallery.yaml +1035 -0
- package/dist/blocks/Card/tests/Card.e2e.yaml +209 -0
- package/dist/blocks/Card/tests.yaml +75 -0
- package/dist/blocks/Carousel/gallery.yaml +1971 -0
- package/dist/blocks/Carousel/tests/Carousel.e2e.yaml +211 -0
- package/dist/blocks/Carousel/tests.yaml +117 -0
- package/dist/blocks/CheckboxSelector/gallery.yaml +781 -0
- package/dist/blocks/CheckboxSelector/tests/CheckboxSelector.e2e.yaml +272 -0
- package/dist/blocks/CheckboxSelector/tests.yaml +325 -0
- package/dist/blocks/CheckboxSwitch/gallery.yaml +457 -0
- package/dist/blocks/CheckboxSwitch/tests/CheckboxSwitch.e2e.yaml +126 -0
- package/dist/blocks/CheckboxSwitch/tests.yaml +96 -0
- package/dist/blocks/Collapse/gallery.yaml +1079 -0
- package/dist/blocks/Collapse/tests/Collapse.e2e.yaml +206 -0
- package/dist/blocks/Collapse/tests.yaml +265 -0
- package/dist/blocks/ColorSelector/gallery.yaml +807 -0
- package/dist/blocks/ColorSelector/tests/ColorSelector.e2e.yaml +77 -0
- package/dist/blocks/ColorSelector/tests.yaml +84 -0
- package/dist/blocks/ConfigProvider/gallery.yaml +1003 -0
- package/dist/blocks/ConfigProvider/tests.yaml +62 -0
- package/dist/blocks/ConfirmModal/gallery.yaml +1043 -0
- package/dist/blocks/ConfirmModal/tests/ConfirmModal.e2e.yaml +410 -0
- package/dist/blocks/ConfirmModal/tests.yaml +95 -0
- package/dist/blocks/Content/gallery.yaml +528 -0
- package/dist/blocks/Content/tests/Content.e2e.yaml +71 -0
- package/dist/blocks/Content/tests.yaml +42 -0
- package/dist/blocks/ControlledList/ControlledList.js +1 -1
- package/dist/blocks/ControlledList/gallery.yaml +481 -0
- package/dist/blocks/ControlledList/{style.module.css → style.css} +3 -3
- package/dist/blocks/ControlledList/tests/ControlledList.e2e.yaml +161 -0
- package/dist/blocks/ControlledList/tests.yaml +57 -0
- package/dist/blocks/DateRangeSelector/DateRangeSelector.js +7 -0
- package/dist/blocks/DateRangeSelector/e2e.js +28 -2
- package/dist/blocks/DateRangeSelector/gallery.yaml +858 -0
- package/dist/blocks/DateRangeSelector/meta.js +2 -0
- package/dist/blocks/DateRangeSelector/tests/DateRangeSelector.e2e.yaml +204 -0
- package/dist/blocks/DateRangeSelector/tests.yaml +129 -0
- package/dist/blocks/DateSelector/DateSelector.js +6 -0
- package/dist/blocks/DateSelector/e2e.js +28 -2
- package/dist/blocks/DateSelector/gallery.yaml +691 -0
- package/dist/blocks/DateSelector/meta.js +6 -0
- package/dist/blocks/DateSelector/tests/DateSelector.e2e.yaml +229 -0
- package/dist/blocks/DateSelector/tests.yaml +117 -0
- package/dist/blocks/DateTimeSelector/DateTimeSelector.js +7 -0
- package/dist/blocks/DateTimeSelector/e2e.js +26 -2
- package/dist/blocks/DateTimeSelector/gallery.yaml +770 -0
- package/dist/blocks/DateTimeSelector/meta.js +2 -0
- package/dist/blocks/DateTimeSelector/tests/DateTimeSelector.e2e.yaml +163 -0
- package/dist/blocks/DateTimeSelector/tests.yaml +140 -0
- package/dist/blocks/Descriptions/gallery.yaml +839 -0
- package/dist/blocks/Descriptions/tests/Descriptions.e2e.yaml +143 -0
- package/dist/blocks/Descriptions/tests.yaml +256 -0
- package/dist/blocks/Divider/gallery.yaml +375 -0
- package/dist/blocks/Divider/tests/Divider.e2e.yaml +107 -0
- package/dist/blocks/Divider/tests.yaml +58 -0
- package/dist/blocks/Drawer/gallery.yaml +1257 -0
- package/dist/blocks/Drawer/tests/Drawer.e2e.yaml +562 -0
- package/dist/blocks/Drawer/tests.yaml +80 -0
- package/dist/blocks/DropdownButton/gallery.yaml +606 -0
- package/dist/blocks/DropdownButton/tests/DropdownButton.e2e.yaml +243 -0
- package/dist/blocks/DropdownMenu/gallery.yaml +578 -0
- package/dist/blocks/DropdownMenu/tests/DropdownMenu.e2e.yaml +267 -0
- package/dist/blocks/Flex/gallery.yaml +1416 -0
- package/dist/blocks/Flex/tests/Flex.e2e.yaml +95 -0
- package/dist/blocks/Flex/tests.yaml +92 -0
- package/dist/blocks/FloatButton/gallery.yaml +518 -0
- package/dist/blocks/FloatButton/tests/FloatButton.e2e.yaml +73 -0
- package/dist/blocks/FloatButton/tests.yaml +59 -0
- package/dist/blocks/Footer/gallery.yaml +355 -0
- package/dist/blocks/Footer/tests/Footer.e2e.yaml +70 -0
- package/dist/blocks/Footer/tests.yaml +28 -0
- package/dist/blocks/Header/gallery.yaml +249 -0
- package/dist/blocks/Header/tests/Header.e2e.yaml +77 -0
- package/dist/blocks/Header/tests.yaml +36 -0
- package/dist/blocks/Label/Label.js +1 -1
- package/dist/blocks/Label/gallery.yaml +762 -0
- package/dist/blocks/Label/{style.module.css → style.css} +28 -28
- package/dist/blocks/Label/tests/Label.e2e.yaml +247 -0
- package/dist/blocks/Label/tests.yaml +212 -0
- package/dist/blocks/Layout/gallery.yaml +548 -0
- package/dist/blocks/Layout/tests/Layout.e2e.yaml +86 -0
- package/dist/blocks/Layout/tests.yaml +28 -0
- package/dist/blocks/ListSelector/gallery.yaml +223 -0
- package/dist/blocks/Masonry/gallery.yaml +989 -0
- package/dist/blocks/Masonry/tests/Masonry.e2e.yaml +128 -0
- package/dist/blocks/Masonry/tests.yaml +42 -0
- package/dist/blocks/MasonryList/gallery.yaml +224 -0
- package/dist/blocks/MasonryList/tests/MasonryList.e2e.yaml +55 -0
- package/dist/blocks/MasonryList/tests.yaml +42 -0
- package/dist/blocks/Menu/gallery.yaml +974 -0
- package/dist/blocks/Menu/tests/Menu.e2e.yaml +484 -0
- package/dist/blocks/Menu/tests.yaml +1053 -0
- package/dist/blocks/Message/gallery.yaml +860 -0
- package/dist/blocks/Message/tests/Message.e2e.yaml +246 -0
- package/dist/blocks/Message/tests.yaml +54 -0
- package/dist/blocks/MobileMenu/gallery.yaml +1172 -0
- package/dist/blocks/MobileMenu/tests/MobileMenu.e2e.yaml +314 -0
- package/dist/blocks/MobileMenu/tests.yaml +359 -0
- package/dist/blocks/Modal/gallery.yaml +1039 -0
- package/dist/blocks/Modal/tests/Modal.e2e.yaml +493 -0
- package/dist/blocks/Modal/tests.yaml +75 -0
- package/dist/blocks/MonthSelector/MonthSelector.js +6 -0
- package/dist/blocks/MonthSelector/e2e.js +26 -2
- package/dist/blocks/MonthSelector/gallery.yaml +687 -0
- package/dist/blocks/MonthSelector/meta.js +6 -0
- package/dist/blocks/MonthSelector/tests/MonthSelector.e2e.yaml +167 -0
- package/dist/blocks/MonthSelector/tests.yaml +124 -0
- package/dist/blocks/MultipleSelector/gallery.yaml +1245 -0
- package/dist/blocks/MultipleSelector/tests/MultipleSelector.e2e.yaml +445 -0
- package/dist/blocks/MultipleSelector/tests.yaml +201 -0
- package/dist/blocks/Notification/gallery.yaml +1376 -0
- package/dist/blocks/Notification/tests/Notification.e2e.yaml +362 -0
- package/dist/blocks/Notification/tests.yaml +97 -0
- package/dist/blocks/NumberInput/gallery.yaml +753 -0
- package/dist/blocks/NumberInput/tests/NumberInput.e2e.yaml +228 -0
- package/dist/blocks/NumberInput/tests.yaml +116 -0
- package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +1 -1
- package/dist/blocks/PageHeaderMenu/gallery.yaml +480 -0
- package/dist/blocks/PageHeaderMenu/tests/PageHeaderMenu.e2e.yaml +110 -0
- package/dist/blocks/PageHeaderMenu/tests.yaml +173 -0
- package/dist/blocks/PageSidebarLayout/PageSidebarLayout.js +10 -1
- package/dist/blocks/PageSidebarLayout/gallery.yaml +302 -0
- package/dist/blocks/PageSidebarLayout/meta.js +1 -0
- package/dist/blocks/PageSidebarLayout/tests/PageSidebarLayout.e2e.yaml +216 -0
- package/dist/blocks/PageSidebarLayout/tests.yaml +174 -0
- package/dist/blocks/PageSiderMenu/PageSiderMenu.js +1 -1
- package/dist/blocks/PageSiderMenu/gallery.yaml +516 -0
- package/dist/blocks/PageSiderMenu/tests/PageSiderMenu.e2e.yaml +175 -0
- package/dist/blocks/PageSiderMenu/tests.yaml +211 -0
- package/dist/blocks/Pagination/gallery.yaml +503 -0
- package/dist/blocks/Pagination/tests/Pagination.e2e.yaml +159 -0
- package/dist/blocks/Pagination/tests.yaml +80 -0
- package/dist/blocks/Paragraph/gallery.yaml +458 -0
- package/dist/blocks/Paragraph/tests/Paragraph.e2e.yaml +153 -0
- package/dist/blocks/Paragraph/tests.yaml +176 -0
- package/dist/blocks/ParagraphInput/gallery.yaml +1483 -0
- package/dist/blocks/ParagraphInput/tests/ParagraphInput.e2e.yaml +189 -0
- package/dist/blocks/ParagraphInput/tests.yaml +163 -0
- package/dist/blocks/PasswordInput/gallery.yaml +420 -0
- package/dist/blocks/PasswordInput/tests/PasswordInput.e2e.yaml +188 -0
- package/dist/blocks/PasswordInput/tests.yaml +78 -0
- package/dist/blocks/PhoneNumberInput/gallery.yaml +677 -0
- package/dist/blocks/PhoneNumberInput/tests/PhoneNumberInput.e2e.yaml +279 -0
- package/dist/blocks/PhoneNumberInput/tests.yaml +25 -0
- package/dist/blocks/Popover/gallery.yaml +1301 -0
- package/dist/blocks/Popover/tests/Popover.e2e.yaml +249 -0
- package/dist/blocks/Popover/tests.yaml +105 -0
- package/dist/blocks/Progress/gallery.yaml +772 -0
- package/dist/blocks/Progress/tests/Progress.e2e.yaml +167 -0
- package/dist/blocks/Progress/tests.yaml +114 -0
- package/dist/blocks/QRCode/gallery.yaml +492 -0
- package/dist/blocks/QRCode/tests/QRCode.e2e.yaml +66 -0
- package/dist/blocks/QRCode/tests.yaml +113 -0
- package/dist/blocks/RadioSelector/gallery.yaml +816 -0
- package/dist/blocks/RadioSelector/tests/RadioSelector.e2e.yaml +269 -0
- package/dist/blocks/RadioSelector/tests.yaml +339 -0
- package/dist/blocks/RatingSlider/gallery.yaml +627 -0
- package/dist/blocks/RatingSlider/tests/RatingSlider.e2e.yaml +188 -0
- package/dist/blocks/RatingSlider/tests.yaml +116 -0
- package/dist/blocks/Result/gallery.yaml +925 -0
- package/dist/blocks/Result/tests/Result.e2e.yaml +126 -0
- package/dist/blocks/Result/tests.yaml +75 -0
- package/dist/blocks/Search/Search.js +1 -1
- package/dist/blocks/Search/SearchModal.js +18 -9
- package/dist/blocks/Search/gallery.yaml +170 -0
- package/dist/blocks/Search/meta.js +2 -1
- package/dist/blocks/Search/{style.module.css → style.css} +19 -12
- package/dist/blocks/Search/tests/Search.e2e.yaml +125 -0
- package/dist/blocks/Search/useSearchIndex.js +24 -2
- package/dist/blocks/SegmentedSelector/gallery.yaml +725 -0
- package/dist/blocks/SegmentedSelector/tests/SegmentedSelector.e2e.yaml +115 -0
- package/dist/blocks/SegmentedSelector/tests.yaml +141 -0
- package/dist/blocks/Selector/gallery.yaml +1055 -0
- package/dist/blocks/Selector/tests/Selector.e2e.yaml +427 -0
- package/dist/blocks/Selector/tests.yaml +196 -0
- package/dist/blocks/Sider/gallery.yaml +994 -0
- package/dist/blocks/Sider/tests/Sider.e2e.yaml +162 -0
- package/dist/blocks/Sider/tests.yaml +20 -0
- package/dist/blocks/Slider/gallery.yaml +600 -0
- package/dist/blocks/Slider/tests/Slider.e2e.yaml +190 -0
- package/dist/blocks/Slider/tests.yaml +68 -0
- package/dist/blocks/Splitter/gallery.yaml +1511 -0
- package/dist/blocks/Splitter/tests/Splitter.e2e.yaml +114 -0
- package/dist/blocks/Splitter/tests.yaml +79 -0
- package/dist/blocks/Statistic/gallery.yaml +460 -0
- package/dist/blocks/Statistic/tests/Statistic.e2e.yaml +137 -0
- package/dist/blocks/Statistic/tests.yaml +77 -0
- package/dist/blocks/Steps/gallery.yaml +550 -0
- package/dist/blocks/Switch/gallery.yaml +502 -0
- package/dist/blocks/Switch/tests/Switch.e2e.yaml +132 -0
- package/dist/blocks/Switch/tests.yaml +87 -0
- package/dist/blocks/Tabs/gallery.yaml +1353 -0
- package/dist/blocks/Tabs/tests/Tabs.e2e.yaml +370 -0
- package/dist/blocks/Tabs/tests.yaml +349 -0
- package/dist/blocks/Tag/gallery.yaml +598 -0
- package/dist/blocks/Tag/tests/Tag.e2e.yaml +173 -0
- package/dist/blocks/Tag/tests.yaml +51 -0
- package/dist/blocks/TagMultipleSelector/TagMultipleSelector.js +53 -0
- package/dist/blocks/TagMultipleSelector/e2e.js +36 -0
- package/dist/blocks/TagMultipleSelector/gallery.yaml +70 -0
- package/dist/blocks/TagMultipleSelector/meta.js +91 -0
- package/dist/blocks/TagMultipleSelector/tests/TagMultipleSelector.e2e.yaml +93 -0
- package/dist/blocks/TagSelector/TagSelector.js +49 -0
- package/dist/blocks/TagSelector/e2e.js +36 -0
- package/dist/blocks/TagSelector/gallery.yaml +70 -0
- package/dist/blocks/TagSelector/meta.js +91 -0
- package/dist/blocks/TagSelector/tests/TagSelector.e2e.yaml +93 -0
- package/dist/blocks/TextArea/gallery.yaml +618 -0
- package/dist/blocks/TextArea/tests/TextArea.e2e.yaml +218 -0
- package/dist/blocks/TextArea/tests.yaml +100 -0
- package/dist/blocks/TextInput/gallery.yaml +560 -0
- package/dist/blocks/TextInput/tests/TextInput.e2e.yaml +287 -0
- package/dist/blocks/TextInput/tests.yaml +114 -0
- package/dist/blocks/TimelineList/gallery.yaml +431 -0
- package/dist/blocks/TimelineList/tests/TimelineList.e2e.yaml +244 -0
- package/dist/blocks/TimelineList/tests.yaml +251 -0
- package/dist/blocks/Title/gallery.yaml +483 -0
- package/dist/blocks/Title/tests/Title.e2e.yaml +180 -0
- package/dist/blocks/Title/tests.yaml +175 -0
- package/dist/blocks/TitleInput/gallery.yaml +1006 -0
- package/dist/blocks/TitleInput/tests/TitleInput.e2e.yaml +195 -0
- package/dist/blocks/TitleInput/tests.yaml +181 -0
- package/dist/blocks/Tooltip/gallery.yaml +1214 -0
- package/dist/blocks/Tooltip/tests/Tooltip.e2e.yaml +195 -0
- package/dist/blocks/Tooltip/tests.yaml +92 -0
- package/dist/blocks/Tour/gallery.yaml +2305 -0
- package/dist/blocks/Tour/tests/Tour.e2e.yaml +90 -0
- package/dist/blocks/Tour/tests.yaml +151 -0
- package/dist/blocks/TreeInput/gallery.yaml +78 -0
- package/dist/blocks/TreeInput/tests/TreeInput.e2e.yaml +139 -0
- package/dist/blocks/TreeInput/tests.yaml +140 -0
- package/dist/blocks/TreeMultipleSelector/gallery.yaml +67 -0
- package/dist/blocks/TreeSelector/gallery.yaml +81 -0
- package/dist/blocks/Watermark/gallery.yaml +479 -0
- package/dist/blocks/Watermark/tests/Watermark.e2e.yaml +62 -0
- package/dist/blocks/Watermark/tests.yaml +86 -0
- package/dist/blocks/WeekSelector/WeekSelector.js +6 -0
- package/dist/blocks/WeekSelector/e2e.js +26 -2
- package/dist/blocks/WeekSelector/gallery.yaml +589 -0
- package/dist/blocks/WeekSelector/meta.js +6 -0
- package/dist/blocks/WeekSelector/tests/WeekSelector.e2e.yaml +154 -0
- package/dist/blocks/WeekSelector/tests.yaml +122 -0
- package/dist/blocks.js +2 -0
- package/dist/disabledDate.js +91 -19
- package/dist/e2e.js +2 -0
- package/dist/getPresets.js +151 -0
- package/dist/getTagColor.js +44 -0
- package/dist/getTagSelectorOptions.js +30 -0
- package/dist/metas.js +2 -0
- package/dist/pickerPresetsStyle.css +26 -0
- package/dist/schemas/disabledDates.js +6 -2
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/presets.js +111 -0
- package/dist/tagSelectorStyle.css +68 -0
- package/package.json +13 -13
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Copyright 2020-2026 Lowdefy, Inc
|
|
2
|
+
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
id: result
|
|
16
|
+
type: Box
|
|
17
|
+
|
|
18
|
+
blocks:
|
|
19
|
+
# ============================================
|
|
20
|
+
# BASIC RENDERING
|
|
21
|
+
# ============================================
|
|
22
|
+
|
|
23
|
+
- id: result_basic
|
|
24
|
+
type: Result
|
|
25
|
+
properties:
|
|
26
|
+
title: Operation Completed
|
|
27
|
+
|
|
28
|
+
- id: result_with_subtitle
|
|
29
|
+
type: Result
|
|
30
|
+
properties:
|
|
31
|
+
title: Submission Successful
|
|
32
|
+
subTitle: Your request has been processed.
|
|
33
|
+
|
|
34
|
+
# ============================================
|
|
35
|
+
# STATUS TESTS
|
|
36
|
+
# ============================================
|
|
37
|
+
|
|
38
|
+
- id: result_success
|
|
39
|
+
type: Result
|
|
40
|
+
properties:
|
|
41
|
+
status: success
|
|
42
|
+
title: Success!
|
|
43
|
+
subTitle: Operation completed successfully.
|
|
44
|
+
|
|
45
|
+
- id: result_error
|
|
46
|
+
type: Result
|
|
47
|
+
properties:
|
|
48
|
+
status: error
|
|
49
|
+
title: Error
|
|
50
|
+
subTitle: Something went wrong.
|
|
51
|
+
|
|
52
|
+
- id: result_info
|
|
53
|
+
type: Result
|
|
54
|
+
properties:
|
|
55
|
+
status: info
|
|
56
|
+
title: Information
|
|
57
|
+
subTitle: Here is some information.
|
|
58
|
+
|
|
59
|
+
- id: result_warning
|
|
60
|
+
type: Result
|
|
61
|
+
properties:
|
|
62
|
+
status: warning
|
|
63
|
+
title: Warning
|
|
64
|
+
subTitle: Please review carefully.
|
|
65
|
+
|
|
66
|
+
- id: result_404
|
|
67
|
+
type: Result
|
|
68
|
+
properties:
|
|
69
|
+
status: '404'
|
|
70
|
+
title: Page Not Found
|
|
71
|
+
subTitle: The page you are looking for does not exist.
|
|
72
|
+
|
|
73
|
+
- id: result_403
|
|
74
|
+
type: Result
|
|
75
|
+
properties:
|
|
76
|
+
status: '403'
|
|
77
|
+
title: Access Denied
|
|
78
|
+
subTitle: You do not have permission to access this page.
|
|
79
|
+
|
|
80
|
+
- id: result_500
|
|
81
|
+
type: Result
|
|
82
|
+
properties:
|
|
83
|
+
status: '500'
|
|
84
|
+
title: Server Error
|
|
85
|
+
subTitle: Internal server error occurred.
|
|
86
|
+
|
|
87
|
+
# ============================================
|
|
88
|
+
# ICON TESTS
|
|
89
|
+
# ============================================
|
|
90
|
+
|
|
91
|
+
- id: result_custom_icon
|
|
92
|
+
type: Result
|
|
93
|
+
properties:
|
|
94
|
+
title: Custom Icon Result
|
|
95
|
+
icon: AiOutlineSmile
|
|
96
|
+
|
|
97
|
+
# ============================================
|
|
98
|
+
# CONTENT AREA TESTS
|
|
99
|
+
# ============================================
|
|
100
|
+
|
|
101
|
+
- id: result_with_content
|
|
102
|
+
type: Result
|
|
103
|
+
properties:
|
|
104
|
+
status: success
|
|
105
|
+
title: Payment Successful
|
|
106
|
+
subTitle: 'Order number: 2017182818828182881'
|
|
107
|
+
slots:
|
|
108
|
+
content:
|
|
109
|
+
blocks:
|
|
110
|
+
- id: result_content_paragraph
|
|
111
|
+
type: Paragraph
|
|
112
|
+
properties:
|
|
113
|
+
content: Additional content can be placed here.
|
|
114
|
+
|
|
115
|
+
- id: result_with_extra
|
|
116
|
+
type: Result
|
|
117
|
+
properties:
|
|
118
|
+
status: success
|
|
119
|
+
title: Order Placed
|
|
120
|
+
slots:
|
|
121
|
+
extra:
|
|
122
|
+
blocks:
|
|
123
|
+
- id: result_extra_button
|
|
124
|
+
type: Button
|
|
125
|
+
properties:
|
|
126
|
+
title: Go Home
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Copyright 2020-2026 Lowdefy, Inc
|
|
2
|
+
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
- id: default
|
|
16
|
+
type: Result
|
|
17
|
+
- id: properties.title
|
|
18
|
+
type: Result
|
|
19
|
+
properties:
|
|
20
|
+
title: Result title
|
|
21
|
+
- id: 'properties.subTitle: subTitle text'
|
|
22
|
+
type: Result
|
|
23
|
+
properties:
|
|
24
|
+
subTitle: subTitle text
|
|
25
|
+
- id: 'areas.extra'
|
|
26
|
+
type: Result
|
|
27
|
+
areas:
|
|
28
|
+
content:
|
|
29
|
+
blocks:
|
|
30
|
+
- id: test
|
|
31
|
+
type: Test
|
|
32
|
+
extra:
|
|
33
|
+
blocks:
|
|
34
|
+
- id: test
|
|
35
|
+
type: Test
|
|
36
|
+
- id: 'properties. icon: AiFillApi'
|
|
37
|
+
type: Result
|
|
38
|
+
properties:
|
|
39
|
+
icon: AiFillApi
|
|
40
|
+
- id: 'properties. status: success default is info'
|
|
41
|
+
type: Result
|
|
42
|
+
properties:
|
|
43
|
+
status: success
|
|
44
|
+
- id: 'properties. status: error'
|
|
45
|
+
type: Result
|
|
46
|
+
properties:
|
|
47
|
+
status: error
|
|
48
|
+
- id: 'properties. status: info'
|
|
49
|
+
type: Result
|
|
50
|
+
properties:
|
|
51
|
+
status: info
|
|
52
|
+
- id: 'properties. status: warning'
|
|
53
|
+
type: Result
|
|
54
|
+
properties:
|
|
55
|
+
status: warning
|
|
56
|
+
- id: 'properties. status: 404'
|
|
57
|
+
type: Result
|
|
58
|
+
properties:
|
|
59
|
+
status: '404'
|
|
60
|
+
- id: 'properties. status: 403'
|
|
61
|
+
type: Result
|
|
62
|
+
properties:
|
|
63
|
+
status: '403'
|
|
64
|
+
- id: 'properties. status: 500'
|
|
65
|
+
type: Result
|
|
66
|
+
properties:
|
|
67
|
+
status: '500'
|
|
68
|
+
- id: 'with properties.title in html'
|
|
69
|
+
type: Result
|
|
70
|
+
properties:
|
|
71
|
+
title: '<div style="color:red;">Html Title</div>'
|
|
72
|
+
- id: 'with properties.subTitle in html'
|
|
73
|
+
type: Result
|
|
74
|
+
properties:
|
|
75
|
+
subTitle: '<div style="color:green;">Html Subtitle</div>'
|
|
@@ -20,7 +20,7 @@ import withTheme from '../withTheme.js';
|
|
|
20
20
|
import SearchModal from './SearchModal.js';
|
|
21
21
|
import useSearchIndex from './useSearchIndex.js';
|
|
22
22
|
import useRecentSearches from './useRecentSearches.js';
|
|
23
|
-
import './style.
|
|
23
|
+
import './style.css';
|
|
24
24
|
const isMac = typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/.test(navigator.userAgent);
|
|
25
25
|
function parseShortcut(shortcut) {
|
|
26
26
|
if (!shortcut) return null;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React, { useState, useCallback, useRef, useEffect } from 'react';
|
|
16
|
-
import { Empty, Input, Modal,
|
|
16
|
+
import { Empty, Input, Modal, Spin } from 'antd';
|
|
17
17
|
import { ClockCircleOutlined, SearchOutlined } from '@ant-design/icons';
|
|
18
18
|
import { cn } from '@lowdefy/block-utils';
|
|
19
19
|
import SearchResults, { groupResults } from './SearchResults.js';
|
|
@@ -103,6 +103,16 @@ function SearchModal({ open, onClose, properties, methods, classNames = {}, styl
|
|
|
103
103
|
}, [
|
|
104
104
|
open
|
|
105
105
|
]);
|
|
106
|
+
// When the index (re)builds while the modal is open — documents resolved
|
|
107
|
+
// after opening, or the bound request refreshed — re-run the current query
|
|
108
|
+
// so the spinner hands over to real results without a close/reopen.
|
|
109
|
+
useEffect(()=>{
|
|
110
|
+
if (!open || !query) return;
|
|
111
|
+
setResults(searchIndex.search(query));
|
|
112
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
113
|
+
}, [
|
|
114
|
+
searchIndex.version
|
|
115
|
+
]);
|
|
106
116
|
useEffect(()=>{
|
|
107
117
|
if (open && inputRef.current) {
|
|
108
118
|
setTimeout(()=>inputRef.current?.focus(), 100);
|
|
@@ -110,7 +120,7 @@ function SearchModal({ open, onClose, properties, methods, classNames = {}, styl
|
|
|
110
120
|
}, [
|
|
111
121
|
open
|
|
112
122
|
]);
|
|
113
|
-
const showRecent = !query && properties.recentSearches !== false && recentSearches.recentSearches.length > 0;
|
|
123
|
+
const showRecent = !query && !searchIndex.loading && properties.recentSearches !== false && recentSearches.recentSearches.length > 0;
|
|
114
124
|
return /*#__PURE__*/ React.createElement(Modal, {
|
|
115
125
|
open: open,
|
|
116
126
|
footer: null,
|
|
@@ -131,15 +141,14 @@ function SearchModal({ open, onClose, properties, methods, classNames = {}, styl
|
|
|
131
141
|
onChange: handleInputChange,
|
|
132
142
|
onKeyDown: onKeyDown
|
|
133
143
|
}), searchIndex.loading && /*#__PURE__*/ React.createElement("div", {
|
|
144
|
+
className: cn('lf-search-loading', classNames.loading),
|
|
134
145
|
style: {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
paragraph: {
|
|
140
|
-
rows: 3
|
|
146
|
+
display: 'flex',
|
|
147
|
+
justifyContent: 'center',
|
|
148
|
+
padding: 32,
|
|
149
|
+
...styles.loading
|
|
141
150
|
}
|
|
142
|
-
})), !searchIndex.loading && query && flatResults.length === 0 && /*#__PURE__*/ React.createElement(Empty, {
|
|
151
|
+
}, /*#__PURE__*/ React.createElement(Spin, null)), !searchIndex.loading && query && flatResults.length === 0 && /*#__PURE__*/ React.createElement(Empty, {
|
|
143
152
|
className: cn(classNames.empty),
|
|
144
153
|
style: {
|
|
145
154
|
padding: 32,
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Copyright 2020-2026 Lowdefy, Inc
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
- title: Pre-built Index
|
|
16
|
+
description: >
|
|
17
|
+
Load a pre-built search index from a static JSON file. The index is
|
|
18
|
+
generated at build time by a _ref transformer and served from the
|
|
19
|
+
public/ folder. See the guide above for the full transformer code.
|
|
20
|
+
blocks:
|
|
21
|
+
- id: example_search_prebuilt
|
|
22
|
+
type: Search
|
|
23
|
+
properties:
|
|
24
|
+
indexUrl: /search-index.json
|
|
25
|
+
placeholder: Search pages...
|
|
26
|
+
result:
|
|
27
|
+
title: title
|
|
28
|
+
description: snippet
|
|
29
|
+
category: section
|
|
30
|
+
pageId: pageId
|
|
31
|
+
groups:
|
|
32
|
+
- label: Concepts
|
|
33
|
+
match:
|
|
34
|
+
section: Concepts
|
|
35
|
+
icon: AiOutlineBulb
|
|
36
|
+
- label: Blocks
|
|
37
|
+
match:
|
|
38
|
+
section: Blocks
|
|
39
|
+
icon: AiOutlineLayout
|
|
40
|
+
events:
|
|
41
|
+
onSelect:
|
|
42
|
+
- id: navigate
|
|
43
|
+
type: Link
|
|
44
|
+
params:
|
|
45
|
+
pageId:
|
|
46
|
+
_event: pageId
|
|
47
|
+
|
|
48
|
+
- title: Runtime Documents
|
|
49
|
+
description: >
|
|
50
|
+
Pass an array of documents directly — no index file needed. The block
|
|
51
|
+
indexes them client-side using MiniSearch. Good for small datasets,
|
|
52
|
+
dynamic content from requests, or prototyping.
|
|
53
|
+
blocks:
|
|
54
|
+
- id: example_search_runtime
|
|
55
|
+
type: Search
|
|
56
|
+
properties:
|
|
57
|
+
documents:
|
|
58
|
+
- id: users
|
|
59
|
+
title: User Management
|
|
60
|
+
body: Create, edit, and deactivate user accounts. Assign roles and permissions.
|
|
61
|
+
category: Admin
|
|
62
|
+
- id: billing
|
|
63
|
+
title: Billing & Invoices
|
|
64
|
+
body: View invoices, update payment methods, and download receipts.
|
|
65
|
+
category: Finance
|
|
66
|
+
- id: reports
|
|
67
|
+
title: Analytics Reports
|
|
68
|
+
body: Dashboard with charts for revenue, signups, and engagement metrics.
|
|
69
|
+
category: Analytics
|
|
70
|
+
- id: settings
|
|
71
|
+
title: App Settings
|
|
72
|
+
body: Configure notifications, theme, language, and integration API keys.
|
|
73
|
+
category: Admin
|
|
74
|
+
- id: api-keys
|
|
75
|
+
title: API Keys
|
|
76
|
+
body: Generate and revoke API keys for third-party integrations.
|
|
77
|
+
category: Admin
|
|
78
|
+
fields: [title, body]
|
|
79
|
+
storeFields: [title, category, id]
|
|
80
|
+
searchOptions:
|
|
81
|
+
boost:
|
|
82
|
+
title: 2
|
|
83
|
+
fuzzy: 0.2
|
|
84
|
+
result:
|
|
85
|
+
title: title
|
|
86
|
+
description: body
|
|
87
|
+
category: category
|
|
88
|
+
groups:
|
|
89
|
+
- label: Admin
|
|
90
|
+
match:
|
|
91
|
+
category: Admin
|
|
92
|
+
icon: AiOutlineSetting
|
|
93
|
+
- label: Finance
|
|
94
|
+
match:
|
|
95
|
+
category: Finance
|
|
96
|
+
icon: AiOutlineDollar
|
|
97
|
+
- label: Analytics
|
|
98
|
+
match:
|
|
99
|
+
category: Analytics
|
|
100
|
+
icon: AiOutlineBarChart
|
|
101
|
+
placeholder: Search features...
|
|
102
|
+
label: Find
|
|
103
|
+
shortcut: mod+k
|
|
104
|
+
events:
|
|
105
|
+
onSelect:
|
|
106
|
+
- id: show_result
|
|
107
|
+
type: DisplayMessage
|
|
108
|
+
params:
|
|
109
|
+
content:
|
|
110
|
+
_string.concat:
|
|
111
|
+
- 'Selected: '
|
|
112
|
+
- _event: title
|
|
113
|
+
|
|
114
|
+
- title: Custom Shortcut
|
|
115
|
+
description: >
|
|
116
|
+
Change the keyboard shortcut and trigger label. The shortcut badge
|
|
117
|
+
updates automatically.
|
|
118
|
+
blocks:
|
|
119
|
+
- id: example_search_custom_shortcut
|
|
120
|
+
type: Search
|
|
121
|
+
properties:
|
|
122
|
+
indexUrl: /search-index.json
|
|
123
|
+
shortcut: mod+j
|
|
124
|
+
label: Quick Find
|
|
125
|
+
placeholder: Quick find...
|
|
126
|
+
events:
|
|
127
|
+
onSelect:
|
|
128
|
+
- id: navigate
|
|
129
|
+
type: Link
|
|
130
|
+
params:
|
|
131
|
+
pageId:
|
|
132
|
+
_event: pageId
|
|
133
|
+
|
|
134
|
+
- title: Analytics Events
|
|
135
|
+
description: >
|
|
136
|
+
Use onSearch and onSelect events to track search analytics — what users
|
|
137
|
+
search for, how many results they see, and which results they click.
|
|
138
|
+
blocks:
|
|
139
|
+
- id: example_search_analytics
|
|
140
|
+
type: Search
|
|
141
|
+
properties:
|
|
142
|
+
indexUrl: /search-index.json
|
|
143
|
+
events:
|
|
144
|
+
onSearch:
|
|
145
|
+
- id: track_search
|
|
146
|
+
type: DisplayMessage
|
|
147
|
+
params:
|
|
148
|
+
content:
|
|
149
|
+
_string.concat:
|
|
150
|
+
- 'Search: "'
|
|
151
|
+
- _event: value
|
|
152
|
+
- '" ('
|
|
153
|
+
- _event: resultCount
|
|
154
|
+
- ' results)'
|
|
155
|
+
onSelect:
|
|
156
|
+
- id: track_click
|
|
157
|
+
type: DisplayMessage
|
|
158
|
+
params:
|
|
159
|
+
content:
|
|
160
|
+
_string.concat:
|
|
161
|
+
- 'Clicked "'
|
|
162
|
+
- _event: title
|
|
163
|
+
- '" for query "'
|
|
164
|
+
- _event: query
|
|
165
|
+
- '"'
|
|
166
|
+
- id: navigate
|
|
167
|
+
type: Link
|
|
168
|
+
params:
|
|
169
|
+
pageId:
|
|
170
|
+
_event: pageId
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
itemTitle: 'The title in a result item.',
|
|
31
31
|
itemDescription: 'The description/snippet in a result item.',
|
|
32
32
|
highlight: 'Highlighted match text (<mark> elements).',
|
|
33
|
-
empty: 'The empty state message.'
|
|
33
|
+
empty: 'The empty state message.',
|
|
34
|
+
loading: 'The loading spinner container.'
|
|
34
35
|
},
|
|
35
36
|
methods: {
|
|
36
37
|
toggleOpen: 'Toggle the search modal open or closed.',
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
@layer components {
|
|
18
|
-
|
|
18
|
+
.lf-search-results {
|
|
19
19
|
max-height: 60vh;
|
|
20
20
|
overflow-y: auto;
|
|
21
21
|
padding: var(--ant-padding-xs) 0;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
.lf-search-item {
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
27
|
gap: var(--ant-margin-sm);
|
|
@@ -31,25 +31,25 @@
|
|
|
31
31
|
transition: background-color 0.2s;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
.lf-search-item:hover {
|
|
35
35
|
background-color: var(--ant-color-bg-text-hover);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
.lf-search-item-selected {
|
|
39
39
|
background-color: var(--ant-color-primary-bg);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
.lf-search-item-content {
|
|
43
43
|
flex: 1;
|
|
44
44
|
min-width: 0;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
.lf-search-item-title {
|
|
48
48
|
font-weight: 500;
|
|
49
49
|
color: var(--ant-color-text);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
.lf-search-item-description {
|
|
53
53
|
font-size: var(--ant-font-size-sm);
|
|
54
54
|
color: var(--ant-color-text-secondary);
|
|
55
55
|
white-space: nowrap;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
text-overflow: ellipsis;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
.lf-search-group-header {
|
|
61
61
|
padding: var(--ant-padding-xs) var(--ant-padding-md);
|
|
62
62
|
font-size: var(--ant-font-size-sm);
|
|
63
63
|
font-weight: 600;
|
|
@@ -66,20 +66,27 @@
|
|
|
66
66
|
letter-spacing: 0.05em;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
.lf-search-highlight mark {
|
|
70
70
|
background-color: var(--ant-color-warning-bg);
|
|
71
71
|
color: inherit;
|
|
72
72
|
padding: 0 1px;
|
|
73
73
|
border-radius: 2px;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
.lf-search-trigger {
|
|
77
77
|
display: inline-flex;
|
|
78
78
|
align-items: center;
|
|
79
79
|
gap: var(--ant-margin-xs);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
/* Grow the label so the shortcut badge sits at the end of the trigger when
|
|
83
|
+
it is wider than its content (e.g. a min-width styled trigger). */
|
|
84
|
+
.lf-search-trigger-label {
|
|
85
|
+
flex: 1 1 auto;
|
|
86
|
+
text-align: left;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.lf-search-recent-header {
|
|
83
90
|
display: flex;
|
|
84
91
|
align-items: center;
|
|
85
92
|
justify-content: space-between;
|
|
@@ -89,7 +96,7 @@
|
|
|
89
96
|
}
|
|
90
97
|
|
|
91
98
|
@media (max-width: 640px) {
|
|
92
|
-
|
|
99
|
+
.lf-search-trigger-label {
|
|
93
100
|
display: none;
|
|
94
101
|
}
|
|
95
102
|
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Copyright 2020-2026 Lowdefy, Inc
|
|
2
|
+
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
id: search_block
|
|
16
|
+
type: Box
|
|
17
|
+
|
|
18
|
+
blocks:
|
|
19
|
+
# ============================================
|
|
20
|
+
# BASIC RENDERING
|
|
21
|
+
# ============================================
|
|
22
|
+
|
|
23
|
+
- id: search_basic
|
|
24
|
+
type: Search
|
|
25
|
+
properties:
|
|
26
|
+
label: Search Docs
|
|
27
|
+
documents:
|
|
28
|
+
- id: doc1
|
|
29
|
+
title: Getting Started
|
|
30
|
+
body: A quick introduction to Lowdefy.
|
|
31
|
+
category: Guides
|
|
32
|
+
- id: doc2
|
|
33
|
+
title: Authentication
|
|
34
|
+
body: Set up login providers and user roles.
|
|
35
|
+
category: Guides
|
|
36
|
+
- id: doc3
|
|
37
|
+
title: Button Block
|
|
38
|
+
body: Display block with click events.
|
|
39
|
+
category: Blocks
|
|
40
|
+
fields:
|
|
41
|
+
- title
|
|
42
|
+
- body
|
|
43
|
+
storeFields:
|
|
44
|
+
- title
|
|
45
|
+
- category
|
|
46
|
+
|
|
47
|
+
# ============================================
|
|
48
|
+
# CUSTOM LABEL
|
|
49
|
+
# ============================================
|
|
50
|
+
|
|
51
|
+
- id: search_custom_label
|
|
52
|
+
type: Search
|
|
53
|
+
properties:
|
|
54
|
+
label: Find anything...
|
|
55
|
+
showShortcut: false
|
|
56
|
+
documents: []
|
|
57
|
+
fields:
|
|
58
|
+
- title
|
|
59
|
+
|
|
60
|
+
# ============================================
|
|
61
|
+
# EVENTS
|
|
62
|
+
# ============================================
|
|
63
|
+
|
|
64
|
+
- id: search_events
|
|
65
|
+
type: Search
|
|
66
|
+
properties:
|
|
67
|
+
label: Search with Events
|
|
68
|
+
documents:
|
|
69
|
+
- id: ev1
|
|
70
|
+
title: Test Result
|
|
71
|
+
body: A test document for event testing.
|
|
72
|
+
fields:
|
|
73
|
+
- title
|
|
74
|
+
- body
|
|
75
|
+
storeFields:
|
|
76
|
+
- title
|
|
77
|
+
events:
|
|
78
|
+
onOpen:
|
|
79
|
+
- id: search_open_set
|
|
80
|
+
type: SetState
|
|
81
|
+
params:
|
|
82
|
+
search_opened: true
|
|
83
|
+
onClose:
|
|
84
|
+
- id: search_close_set
|
|
85
|
+
type: SetState
|
|
86
|
+
params:
|
|
87
|
+
search_closed: true
|
|
88
|
+
|
|
89
|
+
- id: search_open_display
|
|
90
|
+
type: Paragraph
|
|
91
|
+
properties:
|
|
92
|
+
content:
|
|
93
|
+
_if:
|
|
94
|
+
test:
|
|
95
|
+
_eq:
|
|
96
|
+
- _state: search_opened
|
|
97
|
+
- true
|
|
98
|
+
then: Opened!
|
|
99
|
+
else: ''
|
|
100
|
+
|
|
101
|
+
- id: search_close_display
|
|
102
|
+
type: Paragraph
|
|
103
|
+
properties:
|
|
104
|
+
content:
|
|
105
|
+
_if:
|
|
106
|
+
test:
|
|
107
|
+
_eq:
|
|
108
|
+
- _state: search_closed
|
|
109
|
+
- true
|
|
110
|
+
then: Closed!
|
|
111
|
+
else: ''
|
|
112
|
+
|
|
113
|
+
# ============================================
|
|
114
|
+
# SHORTCUT TESTS
|
|
115
|
+
# ============================================
|
|
116
|
+
|
|
117
|
+
- id: search_shortcut_custom
|
|
118
|
+
type: Search
|
|
119
|
+
properties:
|
|
120
|
+
label: Custom Shortcut
|
|
121
|
+
shortcut: mod+.
|
|
122
|
+
showShortcut: true
|
|
123
|
+
documents: []
|
|
124
|
+
fields:
|
|
125
|
+
- title
|