| 1 | package Dash::Core::ComponentsFunctions; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use Module::Load; | ||
| 5 | use Exporter::Auto; | ||
| 6 | |||
| 7 | sub Checklist { | ||
| 8 | load Dash::Core::Components::Checklist; | ||
| 9 | if ( Dash::Core::Components::Checklist->can("children") ) { | ||
| 10 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 11 | unshift @_, "children"; | ||
| 12 | } | ||
| 13 | } | ||
| 14 | return Dash::Core::Components::Checklist->new(@_); | ||
| 15 | } | ||
| 16 | |||
| 17 | sub ConfirmDialog { | ||
| 18 | load Dash::Core::Components::ConfirmDialog; | ||
| 19 | if ( Dash::Core::Components::ConfirmDialog->can("children") ) { | ||
| 20 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 21 | unshift @_, "children"; | ||
| 22 | } | ||
| 23 | } | ||
| 24 | return Dash::Core::Components::ConfirmDialog->new(@_); | ||
| 25 | } | ||
| 26 | |||
| 27 | sub ConfirmDialogProvider { | ||
| 28 | load Dash::Core::Components::ConfirmDialogProvider; | ||
| 29 | if ( Dash::Core::Components::ConfirmDialogProvider->can("children") ) { | ||
| 30 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 31 | unshift @_, "children"; | ||
| 32 | } | ||
| 33 | } | ||
| 34 | return Dash::Core::Components::ConfirmDialogProvider->new(@_); | ||
| 35 | } | ||
| 36 | |||
| 37 | sub DatePickerRange { | ||
| 38 | load Dash::Core::Components::DatePickerRange; | ||
| 39 | if ( Dash::Core::Components::DatePickerRange->can("children") ) { | ||
| 40 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 41 | unshift @_, "children"; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | return Dash::Core::Components::DatePickerRange->new(@_); | ||
| 45 | } | ||
| 46 | |||
| 47 | sub DatePickerSingle { | ||
| 48 | load Dash::Core::Components::DatePickerSingle; | ||
| 49 | if ( Dash::Core::Components::DatePickerSingle->can("children") ) { | ||
| 50 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 51 | unshift @_, "children"; | ||
| 52 | } | ||
| 53 | } | ||
| 54 | return Dash::Core::Components::DatePickerSingle->new(@_); | ||
| 55 | } | ||
| 56 | |||
| 57 | sub Dropdown { | ||
| 58 | load Dash::Core::Components::Dropdown; | ||
| 59 | if ( Dash::Core::Components::Dropdown->can("children") ) { | ||
| 60 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 61 | unshift @_, "children"; | ||
| 62 | } | ||
| 63 | } | ||
| 64 | return Dash::Core::Components::Dropdown->new(@_); | ||
| 65 | } | ||
| 66 | |||
| 67 | sub Graph { | ||
| 68 | load Dash::Core::Components::Graph; | ||
| 69 | if ( Dash::Core::Components::Graph->can("children") ) { | ||
| 70 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 71 | unshift @_, "children"; | ||
| 72 | } | ||
| 73 | } | ||
| 74 | return Dash::Core::Components::Graph->new(@_); | ||
| 75 | } | ||
| 76 | |||
| 77 | sub Input { | ||
| 78 | load Dash::Core::Components::Input; | ||
| 79 | if ( Dash::Core::Components::Input->can("children") ) { | ||
| 80 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 81 | unshift @_, "children"; | ||
| 82 | } | ||
| 83 | } | ||
| 84 | return Dash::Core::Components::Input->new(@_); | ||
| 85 | } | ||
| 86 | |||
| 87 | sub Interval { | ||
| 88 | load Dash::Core::Components::Interval; | ||
| 89 | if ( Dash::Core::Components::Interval->can("children") ) { | ||
| 90 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 91 | unshift @_, "children"; | ||
| 92 | } | ||
| 93 | } | ||
| 94 | return Dash::Core::Components::Interval->new(@_); | ||
| 95 | } | ||
| 96 | |||
| 97 | sub Link { | ||
| 98 | load Dash::Core::Components::Link; | ||
| 99 | if ( Dash::Core::Components::Link->can("children") ) { | ||
| 100 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 101 | unshift @_, "children"; | ||
| 102 | } | ||
| 103 | } | ||
| 104 | return Dash::Core::Components::Link->new(@_); | ||
| 105 | } | ||
| 106 | |||
| 107 | sub Loading { | ||
| 108 | load Dash::Core::Components::Loading; | ||
| 109 | if ( Dash::Core::Components::Loading->can("children") ) { | ||
| 110 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 111 | unshift @_, "children"; | ||
| 112 | } | ||
| 113 | } | ||
| 114 | return Dash::Core::Components::Loading->new(@_); | ||
| 115 | } | ||
| 116 | |||
| 117 | sub Location { | ||
| 118 | load Dash::Core::Components::Location; | ||
| 119 | if ( Dash::Core::Components::Location->can("children") ) { | ||
| 120 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 121 | unshift @_, "children"; | ||
| 122 | } | ||
| 123 | } | ||
| 124 | return Dash::Core::Components::Location->new(@_); | ||
| 125 | } | ||
| 126 | |||
| 127 | sub LogoutButton { | ||
| 128 | load Dash::Core::Components::LogoutButton; | ||
| 129 | if ( Dash::Core::Components::LogoutButton->can("children") ) { | ||
| 130 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 131 | unshift @_, "children"; | ||
| 132 | } | ||
| 133 | } | ||
| 134 | return Dash::Core::Components::LogoutButton->new(@_); | ||
| 135 | } | ||
| 136 | |||
| 137 | sub Markdown { | ||
| 138 | load Dash::Core::Components::Markdown; | ||
| 139 | if ( Dash::Core::Components::Markdown->can("children") ) { | ||
| 140 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 141 | unshift @_, "children"; | ||
| 142 | } | ||
| 143 | } | ||
| 144 | return Dash::Core::Components::Markdown->new(@_); | ||
| 145 | } | ||
| 146 | |||
| 147 | sub RadioItems { | ||
| 148 | load Dash::Core::Components::RadioItems; | ||
| 149 | if ( Dash::Core::Components::RadioItems->can("children") ) { | ||
| 150 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 151 | unshift @_, "children"; | ||
| 152 | } | ||
| 153 | } | ||
| 154 | return Dash::Core::Components::RadioItems->new(@_); | ||
| 155 | } | ||
| 156 | |||
| 157 | sub RangeSlider { | ||
| 158 | load Dash::Core::Components::RangeSlider; | ||
| 159 | if ( Dash::Core::Components::RangeSlider->can("children") ) { | ||
| 160 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 161 | unshift @_, "children"; | ||
| 162 | } | ||
| 163 | } | ||
| 164 | return Dash::Core::Components::RangeSlider->new(@_); | ||
| 165 | } | ||
| 166 | |||
| 167 | sub Slider { | ||
| 168 | load Dash::Core::Components::Slider; | ||
| 169 | if ( Dash::Core::Components::Slider->can("children") ) { | ||
| 170 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 171 | unshift @_, "children"; | ||
| 172 | } | ||
| 173 | } | ||
| 174 | return Dash::Core::Components::Slider->new(@_); | ||
| 175 | } | ||
| 176 | |||
| 177 | sub Store { | ||
| 178 | load Dash::Core::Components::Store; | ||
| 179 | if ( Dash::Core::Components::Store->can("children") ) { | ||
| 180 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 181 | unshift @_, "children"; | ||
| 182 | } | ||
| 183 | } | ||
| 184 | return Dash::Core::Components::Store->new(@_); | ||
| 185 | } | ||
| 186 | |||
| 187 | sub Tab { | ||
| 188 | load Dash::Core::Components::Tab; | ||
| 189 | if ( Dash::Core::Components::Tab->can("children") ) { | ||
| 190 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 191 | unshift @_, "children"; | ||
| 192 | } | ||
| 193 | } | ||
| 194 | return Dash::Core::Components::Tab->new(@_); | ||
| 195 | } | ||
| 196 | |||
| 197 | sub Tabs { | ||
| 198 | load Dash::Core::Components::Tabs; | ||
| 199 | if ( Dash::Core::Components::Tabs->can("children") ) { | ||
| 200 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 201 | unshift @_, "children"; | ||
| 202 | } | ||
| 203 | } | ||
| 204 | return Dash::Core::Components::Tabs->new(@_); | ||
| 205 | } | ||
| 206 | |||
| 207 | sub Textarea { | ||
| 208 | load Dash::Core::Components::Textarea; | ||
| 209 | if ( Dash::Core::Components::Textarea->can("children") ) { | ||
| 210 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 211 | unshift @_, "children"; | ||
| 212 | } | ||
| 213 | } | ||
| 214 | return Dash::Core::Components::Textarea->new(@_); | ||
| 215 | } | ||
| 216 | |||
| 217 | sub Upload { | ||
| 218 | load Dash::Core::Components::Upload; | ||
| 219 | if ( Dash::Core::Components::Upload->can("children") ) { | ||
| 220 | if ( ( ( scalar @_ ) % 2 ) ) { | ||
| 221 | unshift @_, "children"; | ||
| 222 | } | ||
| 223 | } | ||
| 224 | return Dash::Core::Components::Upload->new(@_); | ||
| 225 | } | ||
| 226 | 1; | ||
| 227 | |||
| 228 | __END__ |