ruflet_core 0.0.12 → 0.0.13
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.
- checksums.yaml +4 -4
- data/lib/ruflet/version.rb +1 -1
- data/lib/ruflet_protocol/ruflet/protocol.rb +50 -4
- data/lib/ruflet_ui/ruflet/control.rb +11 -4
- data/lib/ruflet_ui/ruflet/dsl.rb +229 -37
- data/lib/ruflet_ui/ruflet/events/gesture_events.rb +113 -9
- data/lib/ruflet_ui/ruflet/page.rb +820 -145
- data/lib/ruflet_ui/ruflet/types/animation.rb +110 -0
- data/lib/ruflet_ui/ruflet/ui/control_registry.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheet_control.rb +13 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheetaction_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactivityindicator_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoalertdialog_control.rb +17 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoappbar_control.rb +3 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobottomsheet_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobutton_control.rb +9 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocheckbox_control.rb +6 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenu_control.rb +11 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenuaction_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodatepicker_control.rb +14 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodialogaction_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinofilledbutton_control.rb +9 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinolisttile_control.rb +12 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinonavigationbar_control.rb +11 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinopicker_control.rb +18 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoradio_control.rb +6 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinosegmentedbutton_control.rb +2 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslider_control.rb +7 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslidingsegmentedbutton_control.rb +3 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoswitch_control.rb +7 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotextfield_control.rb +7 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotimerpicker_control.rb +18 -0
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotintedbutton_control.rb +9 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/alertdialog_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/appbar_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/audio_control.rb +35 -1
- data/lib/ruflet_ui/ruflet/ui/controls/materials/autocomplete_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/autocompletesuggestion_control.rb +26 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/badge_control.rb +7 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/banner_control.rb +11 -1
- data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomappbar_control.rb +2 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomsheet_control.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/button_control.rb +2 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/card_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/chip_control.rb +11 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/circleavatar_control.rb +12 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/contextmenu_control.rb +19 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datacell_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datacolumn_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datatable_control.rb +34 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datepicker_control.rb +18 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/daterangepicker_control.rb +20 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/divider_control.rb +9 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdown_control.rb +11 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdownoption_control.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanel_control.rb +8 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanellist_control.rb +6 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansiontile_control.rb +6 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledbutton_control.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/fillediconbutton_control.rb +8 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonalbutton_control.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonaliconbutton_control.rb +8 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/floatingactionbutton_control.rb +20 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/iconbutton_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/listtile_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb +240 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/menubar_control.rb +2 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/menuitembutton_control.rb +6 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationbar_control.rb +11 -1
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationbardestination_control.rb +2 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationdrawer_control.rb +12 -1
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationdrawerdestination_control.rb +2 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationrail_control.rb +21 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationraildestination_control.rb +2 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinedbutton_control.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinediconbutton_control.rb +8 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenubutton_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenuitem_control.rb +6 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/progressbar_control.rb +9 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/progressring_control.rb +8 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/rangeslider_control.rb +13 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/ruflet_controls.rb +24 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/searchbar_control.rb +28 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/segment_control.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/segmentedbutton_control.rb +19 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/selectionarea_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/snackbar_control.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/submenubutton_control.rb +8 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tab_control.rb +7 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbar_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbarview_control.rb +7 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabs_control.rb +6 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/textbutton_control.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/verticaldivider_control.rb +9 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/video_control.rb +86 -1
- data/lib/ruflet_ui/ruflet/ui/controls/ruflet_controls.rb +24 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/animatedswitcher_control.rb +10 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/browsercontextmenu_control.rb +12 -1
- data/lib/ruflet_ui/ruflet/ui/controls/shared/canvas_control.rb +14 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/dismissible_control.rb +19 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/draggable_control.rb +9 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/dragtarget_control.rb +6 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/gridview_control.rb +20 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/image_control.rb +19 -1
- data/lib/ruflet_ui/ruflet/ui/controls/shared/interactiveviewer_control.rb +37 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/listview_control.rb +17 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/pageview_control.rb +13 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/placeholder_control.rb +12 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/reorderabledraghandle_control.rb +4 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/responsiverow_control.rb +22 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/safearea_control.rb +11 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/semantics_control.rb +2 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/stack_control.rb +3 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/text_control.rb +20 -1
- data/lib/ruflet_ui/ruflet/ui/controls/shared/view_control.rb +8 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/window_control.rb +16 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/windowdragarea_control.rb +6 -0
- data/lib/ruflet_ui/ruflet/ui/cupertino_control_methods.rb +83 -6
- data/lib/ruflet_ui/ruflet/ui/material_control_methods.rb +513 -33
- data/lib/ruflet_ui/ruflet/ui/material_control_registry.rb +2 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/audio_recorder_control.rb +87 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/geolocator_control.rb +85 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/permissionhandler_control.rb +53 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/securestorage_control.rb +89 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/semanticsservice_control.rb +28 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/tester_control.rb +126 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet_services.rb +16 -0
- data/lib/ruflet_ui/ruflet/ui/shared_control_forwarders.rb +230 -38
- data/lib/ruflet_ui.rb +4 -0
- metadata +9 -1
|
@@ -3,8 +3,16 @@
|
|
|
3
3
|
module Ruflet
|
|
4
4
|
module UI
|
|
5
5
|
module MaterialControlMethods
|
|
6
|
-
def view(
|
|
7
|
-
|
|
6
|
+
def view(children = nil, **props, &block)
|
|
7
|
+
mapped = props.dup
|
|
8
|
+
mapped[:children] = children unless children.nil?
|
|
9
|
+
build_widget(:view, **mapped, &block)
|
|
10
|
+
end
|
|
11
|
+
def column(children = nil, **props, &block)
|
|
12
|
+
mapped = props.dup
|
|
13
|
+
mapped[:children] = children unless children.nil?
|
|
14
|
+
build_widget(:column, **mapped, &block)
|
|
15
|
+
end
|
|
8
16
|
|
|
9
17
|
def center(**props, &block)
|
|
10
18
|
mapped = props.dup
|
|
@@ -25,16 +33,352 @@ module Ruflet
|
|
|
25
33
|
build_widget(:container, **normalize_container_props(defaults.merge(mapped)))
|
|
26
34
|
end
|
|
27
35
|
|
|
28
|
-
def row(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
def row(children = nil, **props, &block)
|
|
37
|
+
mapped = props.dup
|
|
38
|
+
mapped[:children] = children unless children.nil?
|
|
39
|
+
build_widget(:row, **mapped, &block)
|
|
40
|
+
end
|
|
41
|
+
def stack(children = nil, **props, &block)
|
|
42
|
+
mapped = props.dup
|
|
43
|
+
mapped[:children] = children unless children.nil?
|
|
44
|
+
build_widget(:stack, **mapped, &block)
|
|
45
|
+
end
|
|
46
|
+
def grid_view(children = nil, **props, &block)
|
|
47
|
+
mapped = props.dup
|
|
48
|
+
mapped[:children] = children unless children.nil?
|
|
49
|
+
build_widget(:gridview, **mapped, &block)
|
|
50
|
+
end
|
|
51
|
+
def gridview(children = nil, **props, &block) = grid_view(children, **props, &block)
|
|
32
52
|
def container(**props, &block) = build_widget(:container, **normalize_container_props(props), &block)
|
|
53
|
+
def animated_switcher(content = nil, **props)
|
|
54
|
+
mapped = props.dup
|
|
55
|
+
mapped[:content] = content unless content.nil?
|
|
56
|
+
build_widget(:animatedswitcher, **mapped)
|
|
57
|
+
end
|
|
58
|
+
def animatedswitcher(content = nil, **props) = animated_switcher(content, **props)
|
|
59
|
+
def animation(duration = nil, **props)
|
|
60
|
+
duration = props.delete(:duration) if duration.nil? && props.key?(:duration)
|
|
61
|
+
Ruflet::Animation.new(duration: duration, **props)
|
|
62
|
+
end
|
|
63
|
+
def animation_style(**props) = Ruflet::AnimationStyle.new(**props)
|
|
64
|
+
def audio(**props) = build_widget(:audio, **props)
|
|
65
|
+
def auto_complete(suggestions = nil, **props)
|
|
66
|
+
mapped = props.dup
|
|
67
|
+
mapped[:suggestions] = suggestions unless suggestions.nil?
|
|
68
|
+
build_widget(:autocomplete, **mapped)
|
|
69
|
+
end
|
|
70
|
+
def autocomplete(suggestions = nil, **props) = auto_complete(suggestions, **props)
|
|
71
|
+
def auto_complete_suggestion(key = nil, **props)
|
|
72
|
+
mapped = props.dup
|
|
73
|
+
mapped[:key] = key unless key.nil?
|
|
74
|
+
build_widget(:autocompletesuggestion, **mapped)
|
|
75
|
+
end
|
|
76
|
+
def autocomplete_suggestion(key = nil, **props) = auto_complete_suggestion(key, **props)
|
|
77
|
+
def autocompletesuggestion(key = nil, **props) = auto_complete_suggestion(key, **props)
|
|
78
|
+
def context_menu(content = nil, **props)
|
|
79
|
+
mapped = props.dup
|
|
80
|
+
mapped[:content] = content unless content.nil?
|
|
81
|
+
build_widget(:contextmenu, **mapped)
|
|
82
|
+
end
|
|
83
|
+
def contextmenu(content = nil, **props) = context_menu(content, **props)
|
|
84
|
+
def keyboard_listener(content = nil, **props)
|
|
85
|
+
mapped = props.dup
|
|
86
|
+
mapped[:content] = content unless content.nil?
|
|
87
|
+
build_widget(:keyboardlistener, **mapped)
|
|
88
|
+
end
|
|
89
|
+
def keyboardlistener(content = nil, **props) = keyboard_listener(content, **props)
|
|
33
90
|
def gesture_detector(**props, &block) = build_widget(:gesturedetector, **props, &block)
|
|
34
91
|
def gesturedetector(**props, &block) = gesture_detector(**props, &block)
|
|
35
|
-
def
|
|
36
|
-
|
|
37
|
-
|
|
92
|
+
def canvas(shapes = nil, **props)
|
|
93
|
+
mapped = props.dup
|
|
94
|
+
mapped[:shapes] = shapes unless shapes.nil?
|
|
95
|
+
build_widget(:canvas, **mapped)
|
|
96
|
+
end
|
|
97
|
+
def line(**props) = build_widget(:line, **props)
|
|
98
|
+
def circle(**props) = build_widget(:circle, **props)
|
|
99
|
+
def arc(**props) = build_widget(:arc, **props)
|
|
100
|
+
def color(**props) = build_widget(:color, **props)
|
|
101
|
+
def canvas_color(**props) = color(**props)
|
|
102
|
+
def fill(**props) = build_widget(:fill, **props)
|
|
103
|
+
def oval(**props) = build_widget(:oval, **props)
|
|
104
|
+
def points(**props) = build_widget(:points, **props)
|
|
105
|
+
def rect(**props) = build_widget(:rect, **props)
|
|
106
|
+
def path(**props) = build_widget(:path, **props)
|
|
107
|
+
def shadow(**props) = build_widget(:shadow, **props)
|
|
108
|
+
def paint(**props) = drawing_payload(props)
|
|
109
|
+
def path_move_to(x = nil, y = nil, **props) = path_point_payload("MoveTo", x, y, props)
|
|
110
|
+
def path_line_to(x = nil, y = nil, **props) = path_point_payload("LineTo", x, y, props)
|
|
111
|
+
def path_arc(**props) = drawing_payload(props.merge(_type: "Arc"))
|
|
112
|
+
def path_arc_to(**props) = drawing_payload(props.merge(_type: "ArcTo"))
|
|
113
|
+
def path_oval(**props) = drawing_payload(props.merge(_type: "Oval"))
|
|
114
|
+
def path_rect(**props) = drawing_payload(props.merge(_type: "Rect"))
|
|
115
|
+
def path_quadratic_to(**props) = drawing_payload(props.merge(_type: "QuadraticTo"))
|
|
116
|
+
def path_cubic_to(**props) = drawing_payload(props.merge(_type: "CubicTo"))
|
|
117
|
+
def path_sub_path(**props) = drawing_payload(props.merge(_type: "SubPath"))
|
|
118
|
+
def path_close(**props) = drawing_payload(props.merge(_type: "Close"))
|
|
119
|
+
def draggable(content = nil, **props, &block)
|
|
120
|
+
mapped = props.dup
|
|
121
|
+
mapped[:content] = content unless content.nil?
|
|
122
|
+
build_widget(:draggable, **mapped, &block)
|
|
123
|
+
end
|
|
124
|
+
def dismissible(content = nil, **props)
|
|
125
|
+
mapped = props.dup
|
|
126
|
+
mapped[:content] = content unless content.nil?
|
|
127
|
+
build_widget(:dismissible, **mapped)
|
|
128
|
+
end
|
|
129
|
+
def drag_target(content = nil, **props, &block)
|
|
130
|
+
mapped = props.dup
|
|
131
|
+
mapped[:content] = content unless content.nil?
|
|
132
|
+
build_widget(:dragtarget, **mapped, &block)
|
|
133
|
+
end
|
|
134
|
+
def dragtarget(content = nil, **props, &block) = drag_target(content, **props, &block)
|
|
135
|
+
def card(content = nil, **props)
|
|
136
|
+
mapped = props.dup
|
|
137
|
+
mapped[:content] = content unless content.nil?
|
|
138
|
+
build_widget(:card, **mapped)
|
|
139
|
+
end
|
|
140
|
+
def list_tile(**props) = build_widget(:listtile, **props)
|
|
141
|
+
def listtile(**props) = list_tile(**props)
|
|
142
|
+
def map(layers = nil, **props)
|
|
143
|
+
mapped = props.dup
|
|
144
|
+
mapped[:layers] = layers unless layers.nil?
|
|
145
|
+
build_widget(:map, **mapped)
|
|
146
|
+
end
|
|
147
|
+
def tile_layer(**props) = build_widget(:tilelayer, **props)
|
|
148
|
+
def tilelayer(**props) = tile_layer(**props)
|
|
149
|
+
def marker_layer(markers = nil, **props)
|
|
150
|
+
mapped = props.dup
|
|
151
|
+
mapped[:markers] = markers unless markers.nil?
|
|
152
|
+
build_widget(:markerlayer, **mapped)
|
|
153
|
+
end
|
|
154
|
+
def markerlayer(markers = nil, **props) = marker_layer(markers, **props)
|
|
155
|
+
def marker(content = nil, **props)
|
|
156
|
+
mapped = props.dup
|
|
157
|
+
mapped[:content] = content unless content.nil?
|
|
158
|
+
build_widget(:marker, **mapped)
|
|
159
|
+
end
|
|
160
|
+
def circle_layer(circles = nil, **props)
|
|
161
|
+
mapped = props.dup
|
|
162
|
+
mapped[:circles] = circles unless circles.nil?
|
|
163
|
+
build_widget(:circlelayer, **mapped)
|
|
164
|
+
end
|
|
165
|
+
def circlelayer(circles = nil, **props) = circle_layer(circles, **props)
|
|
166
|
+
def circle_marker(**props) = build_widget(:circlemarker, **props)
|
|
167
|
+
def circlemarker(**props) = circle_marker(**props)
|
|
168
|
+
def polyline_layer(polylines = nil, **props)
|
|
169
|
+
mapped = props.dup
|
|
170
|
+
mapped[:polylines] = polylines unless polylines.nil?
|
|
171
|
+
build_widget(:polylinelayer, **mapped)
|
|
172
|
+
end
|
|
173
|
+
def polylinelayer(polylines = nil, **props) = polyline_layer(polylines, **props)
|
|
174
|
+
def polyline_marker(**props) = build_widget(:polylinemarker, **props)
|
|
175
|
+
def polylinemarker(**props) = polyline_marker(**props)
|
|
176
|
+
def polygon_layer(polygons = nil, **props)
|
|
177
|
+
mapped = props.dup
|
|
178
|
+
mapped[:polygons] = polygons unless polygons.nil?
|
|
179
|
+
build_widget(:polygonlayer, **mapped)
|
|
180
|
+
end
|
|
181
|
+
def polygonlayer(polygons = nil, **props) = polygon_layer(polygons, **props)
|
|
182
|
+
def polygon_marker(**props) = build_widget(:polygonmarker, **props)
|
|
183
|
+
def polygonmarker(**props) = polygon_marker(**props)
|
|
184
|
+
def simple_attribution(**props) = build_widget(:simpleattribution, **props)
|
|
185
|
+
def simpleattribution(**props) = simple_attribution(**props)
|
|
186
|
+
def list_view(children = nil, **props)
|
|
187
|
+
mapped = props.dup
|
|
188
|
+
mapped[:children] = children unless children.nil?
|
|
189
|
+
build_widget(:listview, **mapped)
|
|
190
|
+
end
|
|
191
|
+
def listview(children = nil, **props) = list_view(children, **props)
|
|
192
|
+
def menu_bar(children = nil, **props)
|
|
193
|
+
mapped = props.dup
|
|
194
|
+
mapped[:children] = children unless children.nil?
|
|
195
|
+
build_widget(:menubar, **mapped)
|
|
196
|
+
end
|
|
197
|
+
def menubar(children = nil, **props) = menu_bar(children, **props)
|
|
198
|
+
def menu_item_button(content = nil, **props)
|
|
199
|
+
mapped = props.dup
|
|
200
|
+
mapped[:content] = content unless content.nil?
|
|
201
|
+
build_widget(:menuitembutton, **mapped)
|
|
202
|
+
end
|
|
203
|
+
def menuitembutton(content = nil, **props) = menu_item_button(content, **props)
|
|
204
|
+
def merge_semantics(content = nil, **props)
|
|
205
|
+
mapped = props.dup
|
|
206
|
+
mapped[:content] = content unless content.nil?
|
|
207
|
+
build_widget(:mergesemantics, **mapped)
|
|
208
|
+
end
|
|
209
|
+
def mergesemantics(content = nil, **props) = merge_semantics(content, **props)
|
|
210
|
+
def submenu_button(children = nil, **props)
|
|
211
|
+
mapped = props.dup
|
|
212
|
+
mapped[:children] = children unless children.nil?
|
|
213
|
+
build_widget(:submenubutton, **mapped)
|
|
214
|
+
end
|
|
215
|
+
def submenubutton(children = nil, **props) = submenu_button(children, **props)
|
|
216
|
+
def divider(**props) = build_widget(:divider, **props)
|
|
217
|
+
def vertical_divider(**props) = build_widget(:verticaldivider, **props)
|
|
218
|
+
def verticaldivider(**props) = vertical_divider(**props)
|
|
219
|
+
def window_drag_area(content = nil, **props)
|
|
220
|
+
mapped = props.dup
|
|
221
|
+
mapped[:content] = content unless content.nil?
|
|
222
|
+
build_widget(:windowdragarea, **mapped)
|
|
223
|
+
end
|
|
224
|
+
def windowdragarea(content = nil, **props) = window_drag_area(content, **props)
|
|
225
|
+
def date_picker(**props) = build_widget(:datepicker, **props)
|
|
226
|
+
def datepicker(**props) = date_picker(**props)
|
|
227
|
+
def date_range_picker(**props) = build_widget(:daterangepicker, **props)
|
|
228
|
+
def daterangepicker(**props) = date_range_picker(**props)
|
|
229
|
+
def data_table(columns = nil, **props)
|
|
230
|
+
mapped = props.dup
|
|
231
|
+
mapped[:columns] = columns unless columns.nil?
|
|
232
|
+
build_widget(:datatable, **mapped)
|
|
233
|
+
end
|
|
234
|
+
def datatable(columns = nil, **props) = data_table(columns, **props)
|
|
235
|
+
def data_column(label = nil, **props)
|
|
236
|
+
mapped = props.dup
|
|
237
|
+
mapped[:label] = label unless label.nil?
|
|
238
|
+
build_widget(:datacolumn, **mapped)
|
|
239
|
+
end
|
|
240
|
+
def datacolumn(label = nil, **props) = data_column(label, **props)
|
|
241
|
+
def data_row(cells = nil, **props)
|
|
242
|
+
mapped = props.dup
|
|
243
|
+
mapped[:cells] = cells unless cells.nil?
|
|
244
|
+
build_widget(:datarow, **mapped)
|
|
245
|
+
end
|
|
246
|
+
def datarow(cells = nil, **props) = data_row(cells, **props)
|
|
247
|
+
def data_cell(content = nil, **props)
|
|
248
|
+
mapped = props.dup
|
|
249
|
+
mapped[:content] = content unless content.nil?
|
|
250
|
+
build_widget(:datacell, **mapped)
|
|
251
|
+
end
|
|
252
|
+
def datacell(content = nil, **props) = data_cell(content, **props)
|
|
253
|
+
def expansion_tile(children = nil, **props)
|
|
254
|
+
mapped = props.dup
|
|
255
|
+
mapped[:children] = children unless children.nil?
|
|
256
|
+
build_widget(:expansiontile, **mapped)
|
|
257
|
+
end
|
|
258
|
+
def expansiontile(children = nil, **props) = expansion_tile(children, **props)
|
|
259
|
+
def expansion_panel(**props) = build_widget(:expansionpanel, **props)
|
|
260
|
+
def expansionpanel(**props) = expansion_panel(**props)
|
|
261
|
+
def expansion_panel_list(children = nil, **props)
|
|
262
|
+
mapped = props.dup
|
|
263
|
+
mapped[:children] = children unless children.nil?
|
|
264
|
+
build_widget(:expansionpanellist, **mapped)
|
|
265
|
+
end
|
|
266
|
+
def expansionpanellist(children = nil, **props) = expansion_panel_list(children, **props)
|
|
267
|
+
def dropdown(options = nil, **props)
|
|
268
|
+
mapped = props.dup
|
|
269
|
+
mapped[:options] = options unless options.nil?
|
|
270
|
+
build_widget(:dropdown, **mapped)
|
|
271
|
+
end
|
|
272
|
+
def dropdown_option(key = nil, **props)
|
|
273
|
+
mapped = props.dup
|
|
274
|
+
mapped[:key] = key unless key.nil?
|
|
275
|
+
build_widget(:dropdownoption, **mapped)
|
|
276
|
+
end
|
|
277
|
+
def dropdownoption(key = nil, **props) = dropdown_option(key, **props)
|
|
278
|
+
def dropdown_m2(options = nil, **props)
|
|
279
|
+
mapped = props.dup
|
|
280
|
+
mapped[:options] = options unless options.nil?
|
|
281
|
+
build_widget(:dropdownm2, **mapped)
|
|
282
|
+
end
|
|
283
|
+
def dropdownm2(options = nil, **props) = dropdown_m2(options, **props)
|
|
284
|
+
def progress_bar(**props) = build_widget(:progressbar, **props)
|
|
285
|
+
def progressbar(**props) = progress_bar(**props)
|
|
286
|
+
def placeholder(content = nil, **props)
|
|
287
|
+
mapped = props.dup
|
|
288
|
+
mapped[:content] = content unless content.nil?
|
|
289
|
+
build_widget(:placeholder, **mapped)
|
|
290
|
+
end
|
|
291
|
+
def page_view(children = nil, **props)
|
|
292
|
+
mapped = props.dup
|
|
293
|
+
mapped[:children] = children unless children.nil?
|
|
294
|
+
build_widget(:pageview, **mapped)
|
|
295
|
+
end
|
|
296
|
+
def pageview(children = nil, **props) = page_view(children, **props)
|
|
297
|
+
def progress_ring(**props) = build_widget(:progressring, **props)
|
|
298
|
+
def progressring(**props) = progress_ring(**props)
|
|
299
|
+
def range_slider(**props) = build_widget(:rangeslider, **props)
|
|
300
|
+
def rangeslider(**props) = range_slider(**props)
|
|
301
|
+
def responsive_row(children = nil, **props, &block)
|
|
302
|
+
mapped = props.dup
|
|
303
|
+
mapped[:children] = children unless children.nil?
|
|
304
|
+
build_widget(:responsiverow, **mapped, &block)
|
|
305
|
+
end
|
|
306
|
+
def responsiverow(children = nil, **props, &block) = responsive_row(children, **props, &block)
|
|
307
|
+
def reorderable_drag_handle(content = nil, **props)
|
|
308
|
+
mapped = props.dup
|
|
309
|
+
mapped[:content] = content unless content.nil?
|
|
310
|
+
build_widget(:reorderabledraghandle, **mapped)
|
|
311
|
+
end
|
|
312
|
+
def reorderabledraghandle(content = nil, **props) = reorderable_drag_handle(content, **props)
|
|
313
|
+
def reorderable_list_view(children = nil, **props)
|
|
314
|
+
mapped = props.dup
|
|
315
|
+
mapped[:children] = children unless children.nil?
|
|
316
|
+
build_widget(:reorderablelistview, **mapped)
|
|
317
|
+
end
|
|
318
|
+
def reorderablelistview(children = nil, **props) = reorderable_list_view(children, **props)
|
|
319
|
+
def safe_area(content = nil, **props)
|
|
320
|
+
mapped = props.dup
|
|
321
|
+
mapped[:content] = content unless content.nil?
|
|
322
|
+
build_widget(:safearea, **mapped)
|
|
323
|
+
end
|
|
324
|
+
def safearea(content = nil, **props) = safe_area(content, **props)
|
|
325
|
+
def segment(value = nil, **props)
|
|
326
|
+
mapped = props.dup
|
|
327
|
+
mapped[:value] = value unless value.nil?
|
|
328
|
+
build_widget(:segment, **mapped)
|
|
329
|
+
end
|
|
330
|
+
def segmented_button(segments = nil, **props)
|
|
331
|
+
mapped = props.dup
|
|
332
|
+
mapped[:segments] = segments unless segments.nil?
|
|
333
|
+
build_widget(:segmentedbutton, **mapped)
|
|
334
|
+
end
|
|
335
|
+
def segmentedbutton(segments = nil, **props) = segmented_button(segments, **props)
|
|
336
|
+
def selection_area(content = nil, **props)
|
|
337
|
+
mapped = props.dup
|
|
338
|
+
mapped[:content] = content unless content.nil?
|
|
339
|
+
build_widget(:selectionarea, **mapped)
|
|
340
|
+
end
|
|
341
|
+
def selectionarea(content = nil, **props) = selection_area(content, **props)
|
|
342
|
+
def search_bar(children = nil, **props)
|
|
343
|
+
mapped = props.dup
|
|
344
|
+
mapped[:children] = children unless children.nil?
|
|
345
|
+
build_widget(:searchbar, **mapped)
|
|
346
|
+
end
|
|
347
|
+
def searchbar(children = nil, **props) = search_bar(children, **props)
|
|
348
|
+
def semantics(content = nil, **props)
|
|
349
|
+
mapped = props.dup
|
|
350
|
+
mapped[:content] = content unless content.nil?
|
|
351
|
+
build_widget(:semantics, **mapped)
|
|
352
|
+
end
|
|
353
|
+
def time_picker(**props) = build_widget(:timepicker, **props)
|
|
354
|
+
def timepicker(**props) = time_picker(**props)
|
|
355
|
+
def badge(label = nil, **props)
|
|
356
|
+
mapped = props.dup
|
|
357
|
+
mapped[:label] = label unless label.nil?
|
|
358
|
+
build_widget(:badge, **mapped)
|
|
359
|
+
end
|
|
360
|
+
def chip(label = nil, **props)
|
|
361
|
+
mapped = props.dup
|
|
362
|
+
mapped[:label] = label unless label.nil?
|
|
363
|
+
build_widget(:chip, **mapped)
|
|
364
|
+
end
|
|
365
|
+
def circle_avatar(content = nil, **props)
|
|
366
|
+
mapped = props.dup
|
|
367
|
+
mapped[:content] = content unless content.nil?
|
|
368
|
+
build_widget(:circleavatar, **mapped)
|
|
369
|
+
end
|
|
370
|
+
def circleavatar(content = nil, **props) = circle_avatar(content, **props)
|
|
371
|
+
def banner(content = nil, **props)
|
|
372
|
+
mapped = props.dup
|
|
373
|
+
mapped[:content] = content unless content.nil?
|
|
374
|
+
build_widget(:banner, **mapped)
|
|
375
|
+
end
|
|
376
|
+
def bottom_app_bar(content = nil, **props)
|
|
377
|
+
mapped = props.dup
|
|
378
|
+
mapped[:content] = content unless content.nil?
|
|
379
|
+
build_widget(:bottomappbar, **mapped)
|
|
380
|
+
end
|
|
381
|
+
def bottomappbar(content = nil, **props) = bottom_app_bar(content, **props)
|
|
38
382
|
|
|
39
383
|
def text(value = nil, **props)
|
|
40
384
|
mapped = props.dup
|
|
@@ -42,29 +386,117 @@ module Ruflet
|
|
|
42
386
|
build_widget(:text, **mapped)
|
|
43
387
|
end
|
|
44
388
|
|
|
45
|
-
def button(
|
|
389
|
+
def button(content = nil, **props)
|
|
390
|
+
mapped = props.dup
|
|
391
|
+
mapped[:content] = content unless content.nil?
|
|
392
|
+
build_widget(:button, **mapped)
|
|
393
|
+
end
|
|
46
394
|
# Ruflet currently uses a single Material button control schema.
|
|
47
395
|
# Keep elevated_button DSL available by routing to :button.
|
|
48
|
-
def elevated_button(**props) =
|
|
49
|
-
def text_button(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def
|
|
55
|
-
def
|
|
56
|
-
|
|
396
|
+
def elevated_button(content = nil, **props) = button(content, **props)
|
|
397
|
+
def text_button(content = nil, **props)
|
|
398
|
+
mapped = props.dup
|
|
399
|
+
mapped[:content] = content unless content.nil?
|
|
400
|
+
build_widget(:textbutton, **mapped)
|
|
401
|
+
end
|
|
402
|
+
def textbutton(content = nil, **props) = text_button(content, **props)
|
|
403
|
+
def filled_button(content = nil, **props)
|
|
404
|
+
mapped = props.dup
|
|
405
|
+
mapped[:content] = content unless content.nil?
|
|
406
|
+
build_widget(:filledbutton, **mapped)
|
|
407
|
+
end
|
|
408
|
+
def filledbutton(content = nil, **props) = filled_button(content, **props)
|
|
409
|
+
def filled_icon_button(icon = nil, **props)
|
|
410
|
+
mapped = props.dup
|
|
411
|
+
mapped[:icon] = icon unless icon.nil?
|
|
412
|
+
build_widget(:fillediconbutton, **mapped)
|
|
413
|
+
end
|
|
414
|
+
def fillediconbutton(icon = nil, **props) = filled_icon_button(icon, **props)
|
|
415
|
+
def filled_tonal_button(content = nil, **props)
|
|
416
|
+
mapped = props.dup
|
|
417
|
+
mapped[:content] = content unless content.nil?
|
|
418
|
+
build_widget(:filledtonalbutton, **mapped)
|
|
419
|
+
end
|
|
420
|
+
def filledtonalbutton(content = nil, **props) = filled_tonal_button(content, **props)
|
|
421
|
+
def filled_tonal_icon_button(icon = nil, **props)
|
|
422
|
+
mapped = props.dup
|
|
423
|
+
mapped[:icon] = icon unless icon.nil?
|
|
424
|
+
build_widget(:filledtonaliconbutton, **mapped)
|
|
425
|
+
end
|
|
426
|
+
def filledtonaliconbutton(icon = nil, **props) = filled_tonal_icon_button(icon, **props)
|
|
427
|
+
def outlined_button(content = nil, **props)
|
|
428
|
+
mapped = props.dup
|
|
429
|
+
mapped[:content] = content unless content.nil?
|
|
430
|
+
build_widget(:outlinedbutton, **mapped)
|
|
431
|
+
end
|
|
432
|
+
def outlinedbutton(content = nil, **props) = outlined_button(content, **props)
|
|
433
|
+
def outlined_icon_button(icon = nil, **props)
|
|
434
|
+
mapped = props.dup
|
|
435
|
+
mapped[:icon] = icon unless icon.nil?
|
|
436
|
+
build_widget(:outlinediconbutton, **mapped)
|
|
437
|
+
end
|
|
438
|
+
def outlinediconbutton(icon = nil, **props) = outlined_icon_button(icon, **props)
|
|
439
|
+
|
|
440
|
+
def icon_button(icon = nil, **props)
|
|
441
|
+
mapped = props.dup
|
|
442
|
+
mapped[:icon] = icon unless icon.nil?
|
|
443
|
+
build_widget(:iconbutton, **mapped)
|
|
444
|
+
end
|
|
445
|
+
def iconbutton(icon = nil, **props) = icon_button(icon, **props)
|
|
446
|
+
def interactive_viewer(content = nil, **props)
|
|
447
|
+
mapped = props.dup
|
|
448
|
+
mapped[:content] = content unless content.nil?
|
|
449
|
+
build_widget(:interactiveviewer, **mapped)
|
|
450
|
+
end
|
|
451
|
+
def interactiveviewer(content = nil, **props) = interactive_viewer(content, **props)
|
|
452
|
+
def popup_menu_button(items = nil, **props)
|
|
453
|
+
mapped = props.dup
|
|
454
|
+
mapped[:items] = items unless items.nil?
|
|
455
|
+
build_widget(:popupmenubutton, **mapped)
|
|
456
|
+
end
|
|
457
|
+
def popupmenubutton(items = nil, **props) = popup_menu_button(items, **props)
|
|
458
|
+
def popup_menu_item(content = nil, **props)
|
|
459
|
+
mapped = props.dup
|
|
460
|
+
mapped[:content] = content unless content.nil?
|
|
461
|
+
build_widget(:popupmenuitem, **mapped)
|
|
462
|
+
end
|
|
463
|
+
def popupmenuitem(content = nil, **props) = popup_menu_item(content, **props)
|
|
464
|
+
def text_field(value = nil, **props)
|
|
465
|
+
mapped = props.dup
|
|
466
|
+
mapped[:value] = value unless value.nil?
|
|
467
|
+
build_widget(:textfield, **mapped)
|
|
468
|
+
end
|
|
57
469
|
def textfield(**props) = text_field(**props)
|
|
58
470
|
def checkbox(**props) = build_widget(:checkbox, **props)
|
|
471
|
+
def switch(**props) = build_widget(:switch, **props)
|
|
472
|
+
def slider(**props) = build_widget(:slider, **props)
|
|
473
|
+
def transparent_pointer(content = nil, **props)
|
|
474
|
+
mapped = props.dup
|
|
475
|
+
mapped[:content] = content unless content.nil?
|
|
476
|
+
build_widget(:transparentpointer, **mapped)
|
|
477
|
+
end
|
|
478
|
+
def transparentpointer(content = nil, **props) = transparent_pointer(content, **props)
|
|
59
479
|
def radio(**props) = build_widget(:radio, **props)
|
|
60
|
-
def radio_group(
|
|
61
|
-
|
|
480
|
+
def radio_group(content = nil, **props)
|
|
481
|
+
mapped = props.dup
|
|
482
|
+
mapped[:content] = content unless content.nil?
|
|
483
|
+
build_widget(:radiogroup, **mapped)
|
|
484
|
+
end
|
|
485
|
+
def radiogroup(content = nil, **props) = radio_group(content, **props)
|
|
62
486
|
def alert_dialog(**props) = build_widget(:alertdialog, **props)
|
|
63
487
|
def alertdialog(**props) = alert_dialog(**props)
|
|
64
|
-
def snack_bar(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
488
|
+
def snack_bar(content = nil, **props)
|
|
489
|
+
mapped = props.dup
|
|
490
|
+
mapped[:content] = content unless content.nil?
|
|
491
|
+
build_widget(:snackbar, **mapped)
|
|
492
|
+
end
|
|
493
|
+
def snackbar(content = nil, **props) = snack_bar(content, **props)
|
|
494
|
+
def bottom_sheet(content = nil, **props)
|
|
495
|
+
mapped = props.dup
|
|
496
|
+
mapped[:content] = content unless content.nil?
|
|
497
|
+
build_widget(:bottomsheet, **mapped)
|
|
498
|
+
end
|
|
499
|
+
def bottomsheet(content = nil, **props) = bottom_sheet(content, **props)
|
|
68
500
|
|
|
69
501
|
def markdown(value = nil, **props)
|
|
70
502
|
mapped = props.dup
|
|
@@ -72,12 +504,16 @@ module Ruflet
|
|
|
72
504
|
build_widget(:markdown, **mapped)
|
|
73
505
|
end
|
|
74
506
|
|
|
75
|
-
def icon(
|
|
507
|
+
def icon(icon = nil, **props)
|
|
508
|
+
mapped = props.dup
|
|
509
|
+
mapped[:icon] = icon unless icon.nil?
|
|
510
|
+
build_widget(:icon, **mapped)
|
|
511
|
+
end
|
|
76
512
|
|
|
77
513
|
def image(src = nil, src_base64: nil, placeholder_src: nil, **props)
|
|
78
514
|
mapped = props.dup
|
|
79
515
|
mapped[:src] = normalize_image_source(src) unless src.nil?
|
|
80
|
-
mapped[:
|
|
516
|
+
mapped[:src_base64] = normalize_image_source(src_base64) unless src_base64.nil?
|
|
81
517
|
mapped[:placeholder_src] = normalize_image_source(placeholder_src) unless placeholder_src.nil?
|
|
82
518
|
build_widget(:image, **mapped)
|
|
83
519
|
end
|
|
@@ -88,16 +524,46 @@ module Ruflet
|
|
|
88
524
|
def clipboard(**props) = build_widget(:clipboard, **props)
|
|
89
525
|
def floating_action_button(**props) = build_widget(:floatingactionbutton, **props)
|
|
90
526
|
def floatingactionbutton(**props) = floating_action_button(**props)
|
|
91
|
-
def tabs(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
527
|
+
def tabs(content = nil, **props, &block)
|
|
528
|
+
mapped = props.dup
|
|
529
|
+
mapped[:content] = content unless content.nil?
|
|
530
|
+
build_widget(:tabs, **mapped, &block)
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
def tab(label = nil, **props, &block)
|
|
534
|
+
mapped = props.dup
|
|
535
|
+
mapped[:label] = label unless label.nil?
|
|
536
|
+
build_widget(:tab, **mapped, &block)
|
|
537
|
+
end
|
|
538
|
+
|
|
539
|
+
def tab_bar(tabs = nil, **props, &block)
|
|
540
|
+
mapped = props.dup
|
|
541
|
+
mapped[:tabs] = tabs unless tabs.nil?
|
|
542
|
+
build_widget(:tabbar, **mapped, &block)
|
|
543
|
+
end
|
|
544
|
+
def tabbar(tabs = nil, **props, &block) = tab_bar(tabs, **props, &block)
|
|
545
|
+
def tab_bar_view(children = nil, **props, &block)
|
|
546
|
+
mapped = props.dup
|
|
547
|
+
mapped[:children] = children unless children.nil?
|
|
548
|
+
build_widget(:tabbarview, **mapped, &block)
|
|
549
|
+
end
|
|
550
|
+
def tabbarview(children = nil, **props, &block) = tab_bar_view(children, **props, &block)
|
|
97
551
|
def navigation_bar(**props, &block) = build_widget(:navigationbar, **props, &block)
|
|
98
552
|
def navigationbar(**props, &block) = navigation_bar(**props, &block)
|
|
99
553
|
def navigation_bar_destination(**props, &block) = build_widget(:navigationbardestination, **props, &block)
|
|
100
554
|
def navigationbardestination(**props, &block) = navigation_bar_destination(**props, &block)
|
|
555
|
+
def navigation_rail(**props, &block) = build_widget(:navigationrail, **props, &block)
|
|
556
|
+
def navigationrail(**props, &block) = navigation_rail(**props, &block)
|
|
557
|
+
def navigation_rail_destination(**props, &block) = build_widget(:navigationraildestination, **props, &block)
|
|
558
|
+
def navigationraildestination(**props, &block) = navigation_rail_destination(**props, &block)
|
|
559
|
+
def navigation_drawer(children = nil, **props)
|
|
560
|
+
mapped = props.dup
|
|
561
|
+
mapped[:children] = children unless children.nil?
|
|
562
|
+
build_widget(:navigationdrawer, **mapped)
|
|
563
|
+
end
|
|
564
|
+
def navigationdrawer(children = nil, **props) = navigation_drawer(children, **props)
|
|
565
|
+
def navigation_drawer_destination(**props) = build_widget(:navigationdrawerdestination, **props)
|
|
566
|
+
def navigationdrawerdestination(**props) = navigation_drawer_destination(**props)
|
|
101
567
|
def bar_chart(**props) = build_widget(:barchart, **props)
|
|
102
568
|
def barchart(**props) = bar_chart(**props)
|
|
103
569
|
def bar_chart_group(**props) = build_widget(:barchartgroup, **props)
|
|
@@ -138,6 +604,7 @@ module Ruflet
|
|
|
138
604
|
def chartaxislabel(**props) = chart_axis_label(**props)
|
|
139
605
|
def web_view(**props) = build_widget(:webview, **props)
|
|
140
606
|
def webview(**props) = web_view(**props)
|
|
607
|
+
def video(**props) = build_widget(:video, **props)
|
|
141
608
|
|
|
142
609
|
def fab(content = nil, **props)
|
|
143
610
|
mapped = normalize_fab_props(props.dup, content)
|
|
@@ -146,6 +613,19 @@ module Ruflet
|
|
|
146
613
|
|
|
147
614
|
private
|
|
148
615
|
|
|
616
|
+
def drawing_payload(props)
|
|
617
|
+
props.each_with_object({}) do |(key, value), output|
|
|
618
|
+
output[key] = value unless value.nil?
|
|
619
|
+
end
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
def path_point_payload(type, x, y, props)
|
|
623
|
+
mapped = props.dup
|
|
624
|
+
mapped[:x] = x unless x.nil?
|
|
625
|
+
mapped[:y] = y unless y.nil?
|
|
626
|
+
drawing_payload(mapped.merge(_type: type))
|
|
627
|
+
end
|
|
628
|
+
|
|
149
629
|
def normalize_fab_props(props, content)
|
|
150
630
|
mapped = props.dup
|
|
151
631
|
|
|
@@ -31,6 +31,8 @@ module Ruflet
|
|
|
31
31
|
"gesture_detector" => "GestureDetector",
|
|
32
32
|
"autocomplete" => "AutoComplete",
|
|
33
33
|
"auto_complete" => "AutoComplete",
|
|
34
|
+
"autocompletesuggestion" => "AutoCompleteSuggestion",
|
|
35
|
+
"auto_complete_suggestion" => "AutoCompleteSuggestion",
|
|
34
36
|
"draggable" => "Draggable",
|
|
35
37
|
"dragtarget" => "DragTarget",
|
|
36
38
|
"drag_target" => "DragTarget",
|