matestack-ui-core 0.7.5 → 1.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.
- checksums.yaml +4 -4
- data/LICENSE +8 -0
- data/README.md +28 -216
- data/app/concepts/matestack/ui/core/abbr/abbr.haml +3 -3
- data/app/concepts/matestack/ui/core/abbr/abbr.rb +1 -8
- data/app/concepts/matestack/ui/core/action/action.haml +1 -1
- data/app/concepts/matestack/ui/core/action/action.js +120 -39
- data/app/concepts/matestack/ui/core/action/action.rb +40 -15
- data/app/concepts/matestack/ui/core/actionview/dynamic.haml +4 -4
- data/app/concepts/matestack/ui/core/address/address.haml +3 -3
- data/app/concepts/matestack/ui/core/address/address.rb +1 -1
- data/app/concepts/matestack/ui/core/app/app.haml +2 -3
- data/app/concepts/matestack/ui/core/app/app.js +6 -3
- data/app/concepts/matestack/ui/core/app/app.rb +33 -56
- data/app/concepts/matestack/ui/core/app/store.js +28 -2
- data/app/concepts/matestack/ui/core/area/area.haml +1 -1
- data/app/concepts/matestack/ui/core/area/area.rb +2 -14
- data/app/concepts/matestack/ui/core/article/article.haml +3 -3
- data/app/concepts/matestack/ui/core/article/article.rb +1 -1
- data/app/concepts/matestack/ui/core/aside/aside.haml +1 -1
- data/app/concepts/matestack/ui/core/aside/aside.rb +0 -1
- data/app/concepts/matestack/ui/core/async/async.haml +6 -2
- data/app/concepts/matestack/ui/core/async/async.js +43 -9
- data/app/concepts/matestack/ui/core/async/async.rb +29 -4
- data/app/concepts/matestack/ui/core/async/children_wrapper.haml +2 -0
- data/app/concepts/matestack/ui/core/b/b.haml +3 -3
- data/app/concepts/matestack/ui/core/b/b.rb +1 -1
- data/app/concepts/matestack/ui/core/bdi/bdi.haml +3 -3
- data/app/concepts/matestack/ui/core/bdi/bdi.rb +1 -0
- data/app/concepts/matestack/ui/core/bdo/bdo.haml +3 -3
- data/app/concepts/matestack/ui/core/bdo/bdo.rb +2 -7
- data/app/concepts/matestack/ui/core/blockquote/blockquote.haml +3 -3
- data/app/concepts/matestack/ui/core/blockquote/blockquote.rb +2 -7
- data/app/concepts/matestack/ui/core/br/br.haml +4 -4
- data/app/concepts/matestack/ui/core/br/br.rb +1 -1
- data/app/concepts/matestack/ui/core/button/button.haml +3 -3
- data/app/concepts/matestack/ui/core/button/button.rb +3 -7
- data/app/concepts/matestack/ui/core/cable/cable.haml +4 -0
- data/app/concepts/matestack/ui/core/cable/cable.js +100 -0
- data/app/concepts/matestack/ui/core/cable/cable.rb +28 -0
- data/app/concepts/matestack/ui/core/cable/children_wrapper.haml +2 -0
- data/app/concepts/matestack/ui/core/caption/caption.haml +3 -3
- data/app/concepts/matestack/ui/core/caption/caption.rb +1 -1
- data/app/concepts/matestack/ui/core/cite/cite.haml +3 -3
- data/app/concepts/matestack/ui/core/cite/cite.rb +1 -1
- data/app/concepts/matestack/ui/core/code/code.haml +3 -3
- data/app/concepts/matestack/ui/core/code/code.rb +1 -1
- data/app/concepts/matestack/ui/core/collection/content/content.js +2 -2
- data/app/concepts/matestack/ui/core/collection/content/content.rb +4 -6
- data/app/concepts/matestack/ui/core/collection/content/next/next.haml +1 -1
- data/app/concepts/matestack/ui/core/collection/content/page/link/link.haml +1 -1
- data/app/concepts/matestack/ui/core/collection/content/page/link/link.rb +5 -3
- data/app/concepts/matestack/ui/core/collection/content/previous/previous.haml +1 -1
- data/app/concepts/matestack/ui/core/collection/filter/filter.rb +4 -5
- data/app/concepts/matestack/ui/core/collection/filter/input/input.rb +11 -8
- data/app/concepts/matestack/ui/core/collection/filter/reset/reset.haml +1 -1
- data/app/concepts/matestack/ui/core/collection/filter/select/select.haml +10 -0
- data/app/concepts/matestack/ui/core/collection/filter/select/select.rb +30 -0
- data/app/concepts/matestack/ui/core/collection/filter/submit/submit.haml +1 -1
- data/app/concepts/matestack/ui/core/collection/helper.rb +14 -6
- data/app/concepts/matestack/ui/core/collection/order/order.js +1 -1
- data/app/concepts/matestack/ui/core/collection/order/order.rb +4 -5
- data/app/concepts/matestack/ui/core/collection/order/toggle/indicator/indicator.rb +9 -5
- data/app/concepts/matestack/ui/core/collection/order/toggle/toggle.haml +1 -1
- data/app/concepts/matestack/ui/core/collection/order/toggle/toggle.rb +0 -1
- data/app/concepts/matestack/ui/core/component/base.rb +430 -0
- data/app/concepts/matestack/ui/core/component/children.haml +2 -2
- data/app/concepts/matestack/ui/core/component/component.js +9 -46
- data/app/concepts/matestack/ui/core/component/dynamic.haml +1 -1
- data/app/concepts/matestack/ui/core/component/dynamic.rb +25 -247
- data/app/concepts/matestack/ui/core/component/static.rb +3 -12
- data/app/concepts/matestack/ui/core/data/data.haml +3 -3
- data/app/concepts/matestack/ui/core/data/data.rb +2 -5
- data/app/concepts/matestack/ui/core/datalist/datalist.haml +2 -2
- data/app/concepts/matestack/ui/core/datalist/datalist.rb +1 -2
- data/app/concepts/matestack/ui/core/dd/dd.haml +3 -3
- data/app/concepts/matestack/ui/core/dd/dd.rb +1 -1
- data/app/concepts/matestack/ui/core/del/del.haml +3 -3
- data/app/concepts/matestack/ui/core/del/del.rb +2 -0
- data/app/concepts/matestack/ui/core/details/details.haml +1 -1
- data/app/concepts/matestack/ui/core/details/details.rb +1 -1
- data/app/concepts/matestack/ui/core/dfn/dfn.haml +3 -3
- data/app/concepts/matestack/ui/core/dfn/dfn.rb +1 -1
- data/app/concepts/matestack/ui/core/dialog/dialog.haml +3 -3
- data/app/concepts/matestack/ui/core/dialog/dialog.rb +2 -5
- data/app/concepts/matestack/ui/core/div/div.haml +1 -1
- data/app/concepts/matestack/ui/core/div/div.rb +0 -1
- data/app/concepts/matestack/ui/core/dl/dl.haml +3 -3
- data/app/concepts/matestack/ui/core/dl/dl.rb +2 -2
- data/app/concepts/matestack/ui/core/dt/dt.haml +3 -3
- data/app/concepts/matestack/ui/core/dt/dt.rb +1 -1
- data/app/concepts/matestack/ui/core/em/em.haml +3 -3
- data/app/concepts/matestack/ui/core/em/em.rb +1 -1
- data/app/concepts/matestack/ui/core/fieldset/fieldset.haml +4 -4
- data/app/concepts/matestack/ui/core/fieldset/fieldset.rb +3 -6
- data/app/concepts/matestack/ui/core/figure/figure.haml +1 -1
- data/app/concepts/matestack/ui/core/figure/figure.rb +0 -1
- data/app/concepts/matestack/ui/core/footer/footer.haml +1 -1
- data/app/concepts/matestack/ui/core/footer/footer.rb +0 -1
- data/app/concepts/matestack/ui/core/form/checkbox/checkbox.rb +79 -0
- data/app/concepts/matestack/ui/core/form/form.haml +1 -1
- data/app/concepts/matestack/ui/core/form/form.js +257 -123
- data/app/concepts/matestack/ui/core/form/form.rb +52 -19
- data/app/concepts/matestack/ui/core/form/has_errors.rb +54 -0
- data/app/concepts/matestack/ui/core/form/has_input_html_attributes.rb +13 -0
- data/app/concepts/matestack/ui/core/form/input/input.rb +32 -52
- data/app/concepts/matestack/ui/core/form/radio/radio.rb +71 -0
- data/app/concepts/matestack/ui/core/form/select/select.haml +9 -76
- data/app/concepts/matestack/ui/core/form/select/select.rb +44 -49
- data/app/concepts/matestack/ui/core/form/submit/submit.haml +1 -1
- data/app/concepts/matestack/ui/core/form/submit/submit.rb +5 -2
- data/app/concepts/matestack/ui/core/form/textarea/textarea.rb +28 -0
- data/app/concepts/matestack/ui/core/form/utils.rb +47 -0
- data/app/concepts/matestack/ui/core/header/header.haml +1 -1
- data/app/concepts/matestack/ui/core/header/header.rb +0 -1
- data/app/concepts/matestack/ui/core/heading/heading.haml +4 -49
- data/app/concepts/matestack/ui/core/heading/heading.rb +1 -1
- data/app/concepts/matestack/ui/core/hr/hr.haml +1 -1
- data/app/concepts/matestack/ui/core/hr/hr.rb +0 -1
- data/app/concepts/matestack/ui/core/icon/icon.haml +3 -3
- data/app/concepts/matestack/ui/core/icon/icon.rb +1 -1
- data/app/concepts/matestack/ui/core/iframe/iframe.haml +3 -3
- data/app/concepts/matestack/ui/core/iframe/iframe.rb +3 -10
- data/app/concepts/matestack/ui/core/img/img.haml +1 -1
- data/app/concepts/matestack/ui/core/img/img.rb +8 -8
- data/app/concepts/matestack/ui/core/input/input.haml +1 -2
- data/app/concepts/matestack/ui/core/input/input.rb +4 -4
- data/app/concepts/matestack/ui/core/ins/ins.haml +3 -3
- data/app/concepts/matestack/ui/core/ins/ins.rb +2 -6
- data/app/concepts/matestack/ui/core/isolated/children_wrapper.haml +2 -0
- data/app/concepts/matestack/ui/core/isolated/isolated.haml +10 -0
- data/app/concepts/matestack/ui/core/isolated/isolated.js +108 -0
- data/app/concepts/matestack/ui/core/isolated/isolated.rb +59 -0
- data/app/concepts/matestack/ui/core/js/core.js +6 -4
- data/app/concepts/matestack/ui/core/kbd/kbd.haml +3 -3
- data/app/concepts/matestack/ui/core/kbd/kbd.rb +1 -0
- data/app/concepts/matestack/ui/core/label/label.haml +3 -3
- data/app/concepts/matestack/ui/core/label/label.rb +2 -6
- data/app/concepts/matestack/ui/core/legend/legend.haml +3 -3
- data/app/concepts/matestack/ui/core/legend/legend.rb +1 -1
- data/app/concepts/matestack/ui/core/li/li.haml +3 -3
- data/app/concepts/matestack/ui/core/li/li.rb +2 -1
- data/app/concepts/matestack/ui/core/link/link.haml +3 -3
- data/app/concepts/matestack/ui/core/link/link.rb +10 -14
- data/app/concepts/matestack/ui/core/main/main.haml +1 -1
- data/app/concepts/matestack/ui/core/main/main.rb +0 -1
- data/app/concepts/matestack/ui/core/map/map.haml +1 -1
- data/app/concepts/matestack/ui/core/map/map.rb +1 -7
- data/app/concepts/matestack/ui/core/mark/mark.haml +3 -3
- data/app/concepts/matestack/ui/core/mark/mark.rb +1 -0
- data/app/concepts/matestack/ui/core/meter/meter.haml +1 -1
- data/app/concepts/matestack/ui/core/meter/meter.rb +1 -10
- data/app/concepts/matestack/ui/core/nav/nav.haml +1 -1
- data/app/concepts/matestack/ui/core/nav/nav.rb +0 -1
- data/app/concepts/matestack/ui/core/noscript/noscript.haml +3 -3
- data/app/concepts/matestack/ui/core/noscript/noscript.rb +1 -1
- data/app/concepts/matestack/ui/core/object/object.haml +1 -1
- data/app/concepts/matestack/ui/core/object/object.rb +1 -11
- data/app/concepts/matestack/ui/core/ol/ol.haml +1 -1
- data/app/concepts/matestack/ui/core/ol/ol.rb +1 -1
- data/app/concepts/matestack/ui/core/onclick/onclick.haml +1 -1
- data/app/concepts/matestack/ui/core/onclick/onclick.rb +1 -0
- data/app/concepts/matestack/ui/core/optgroup/optgroup.haml +1 -1
- data/app/concepts/matestack/ui/core/optgroup/optgroup.rb +1 -6
- data/app/concepts/matestack/ui/core/option/option.haml +3 -3
- data/app/concepts/matestack/ui/core/option/option.rb +2 -8
- data/app/concepts/matestack/ui/core/output/output.haml +3 -3
- data/app/concepts/matestack/ui/core/output/output.rb +2 -7
- data/app/concepts/matestack/ui/core/page/{content.js → content/content.js} +8 -2
- data/app/concepts/matestack/ui/core/page/content/content.rb +28 -0
- data/app/concepts/matestack/ui/core/page/page.haml +3 -9
- data/app/concepts/matestack/ui/core/page/page.rb +15 -175
- data/app/concepts/matestack/ui/core/paragraph/paragraph.haml +3 -3
- data/app/concepts/matestack/ui/core/paragraph/paragraph.rb +1 -1
- data/app/concepts/matestack/ui/core/param/param.haml +1 -1
- data/app/concepts/matestack/ui/core/param/param.rb +1 -6
- data/app/concepts/matestack/ui/core/partial/partial.rb +0 -1
- data/app/concepts/matestack/ui/core/picture/picture.haml +1 -1
- data/app/concepts/matestack/ui/core/pre/pre.haml +3 -3
- data/app/concepts/matestack/ui/core/pre/pre.rb +1 -1
- data/app/concepts/matestack/ui/core/progress/progress.haml +1 -1
- data/app/concepts/matestack/ui/core/progress/progress.rb +1 -10
- data/app/concepts/matestack/ui/core/q/q.haml +3 -3
- data/app/concepts/matestack/ui/core/q/q.rb +2 -7
- data/app/concepts/matestack/ui/core/rp/rp.haml +3 -3
- data/app/concepts/matestack/ui/core/rp/rp.rb +1 -1
- data/app/concepts/matestack/ui/core/rt/rt.haml +3 -3
- data/app/concepts/matestack/ui/core/rt/rt.rb +1 -1
- data/app/concepts/matestack/ui/core/ruby/ruby.haml +3 -3
- data/app/concepts/matestack/ui/core/ruby/ruby.rb +1 -1
- data/app/concepts/matestack/ui/core/s/s.haml +3 -3
- data/app/concepts/matestack/ui/core/s/s.rb +1 -1
- data/app/concepts/matestack/ui/core/samp/samp.haml +3 -3
- data/app/concepts/matestack/ui/core/samp/samp.rb +1 -0
- data/app/concepts/matestack/ui/core/section/section.haml +1 -1
- data/app/concepts/matestack/ui/core/section/section.rb +0 -1
- data/app/concepts/matestack/ui/core/slot/slot.rb +1 -2
- data/app/concepts/matestack/ui/core/small/small.haml +3 -3
- data/app/concepts/matestack/ui/core/small/small.rb +1 -1
- data/app/concepts/matestack/ui/core/span/span.haml +3 -3
- data/app/concepts/matestack/ui/core/span/span.rb +1 -1
- data/app/concepts/matestack/ui/core/strong/strong.haml +3 -3
- data/app/concepts/matestack/ui/core/strong/strong.rb +1 -1
- data/app/concepts/matestack/ui/core/sub/sub.haml +3 -3
- data/app/concepts/matestack/ui/core/sub/sub.rb +1 -1
- data/app/concepts/matestack/ui/core/summary/summary.haml +3 -3
- data/app/concepts/matestack/ui/core/summary/summary.rb +1 -1
- data/app/concepts/matestack/ui/core/sup/sup.haml +3 -3
- data/app/concepts/matestack/ui/core/sup/sup.rb +1 -1
- data/app/concepts/matestack/ui/core/table/table.haml +1 -1
- data/app/concepts/matestack/ui/core/table/table.rb +0 -1
- data/app/concepts/matestack/ui/core/tbody/tbody.haml +1 -1
- data/app/concepts/matestack/ui/core/tbody/tbody.rb +0 -1
- data/app/concepts/matestack/ui/core/td/td.haml +3 -3
- data/app/concepts/matestack/ui/core/td/td.rb +2 -1
- data/app/concepts/matestack/ui/core/template/template.haml +1 -1
- data/app/concepts/matestack/ui/core/textarea/textarea.haml +5 -0
- data/app/concepts/matestack/ui/core/textarea/textarea.rb +10 -0
- data/app/concepts/matestack/ui/core/tfoot/tfoot.haml +1 -1
- data/app/concepts/matestack/ui/core/tfoot/tfoot.rb +0 -1
- data/app/concepts/matestack/ui/core/th/th.haml +3 -3
- data/app/concepts/matestack/ui/core/th/th.rb +2 -1
- data/app/concepts/matestack/ui/core/thead/thead.haml +1 -1
- data/app/concepts/matestack/ui/core/thead/thead.rb +0 -1
- data/app/concepts/matestack/ui/core/time/time.haml +1 -1
- data/app/concepts/matestack/ui/core/time/time.rb +1 -7
- data/app/concepts/matestack/ui/core/toggle/toggle.haml +2 -0
- data/app/concepts/matestack/ui/core/toggle/toggle.js +71 -0
- data/app/concepts/matestack/ui/core/toggle/toggle.rb +13 -0
- data/app/concepts/matestack/ui/core/tr/tr.haml +1 -1
- data/app/concepts/matestack/ui/core/tr/tr.rb +0 -1
- data/app/concepts/matestack/ui/core/transition/transition.haml +3 -3
- data/app/concepts/matestack/ui/core/transition/transition.js +17 -1
- data/app/concepts/matestack/ui/core/transition/transition.rb +15 -8
- data/app/concepts/matestack/ui/core/u/u.haml +3 -3
- data/app/concepts/matestack/ui/core/u/u.rb +1 -1
- data/app/concepts/matestack/ui/core/ul/ul.haml +1 -1
- data/app/concepts/matestack/ui/core/ul/ul.rb +0 -1
- data/app/concepts/matestack/ui/core/unescaped/unescaped.rb +3 -1
- data/app/concepts/matestack/ui/core/var/var.haml +3 -3
- data/app/concepts/matestack/ui/core/var/var.rb +1 -0
- data/app/concepts/matestack/ui/core/video/video.haml +2 -2
- data/app/concepts/matestack/ui/core/video/video.rb +4 -14
- data/app/concepts/matestack/ui/core/view/view.haml +1 -0
- data/app/concepts/matestack/ui/core/view/view.rb +30 -0
- data/app/concepts/matestack/ui/core/wbr/wbr.haml +5 -1
- data/app/concepts/matestack/ui/core/wbr/wbr.rb +1 -0
- data/app/concepts/matestack/ui/core/youtube/youtube.haml +1 -1
- data/app/concepts/matestack/ui/core/youtube/youtube.rb +18 -16
- data/app/helpers/matestack/ui/core/application_helper.rb +94 -20
- data/app/lib/matestack/ui/component.rb +1 -0
- data/app/lib/matestack/ui/core/has_view_context.rb +4 -4
- data/app/lib/matestack/ui/core/html_attributes.rb +43 -0
- data/app/lib/matestack/ui/core/properties.rb +161 -0
- data/app/lib/matestack/ui/core/rendering/default_renderer_class_determiner.rb +33 -0
- data/app/lib/matestack/ui/core/rendering/main_renderer.rb +200 -0
- data/app/lib/matestack/ui/isolated_component.rb +1 -0
- data/app/lib/matestack/ui/vue_js_component.rb +1 -0
- data/lib/matestack/ui/core.rb +4 -2
- data/lib/matestack/ui/core/cell.rb +0 -2
- data/lib/matestack/ui/core/component/registry.rb +47 -0
- data/lib/matestack/ui/core/components.rb +269 -0
- data/lib/matestack/ui/core/dsl.rb +6 -0
- data/lib/matestack/ui/core/engine.rb +16 -0
- data/lib/matestack/ui/core/version.rb +1 -1
- data/vendor/assets/javascripts/dist/manifest.json +6 -10
- data/vendor/assets/javascripts/dist/matestack-ui-core.js +834 -261
- data/vendor/assets/javascripts/dist/matestack-ui-core.js.map +1 -1
- data/vendor/assets/javascripts/dist/matestack-ui-core.min.js +1 -1
- data/vendor/assets/javascripts/dist/matestack-ui-core.min.js.br +0 -0
- data/vendor/assets/javascripts/dist/matestack-ui-core.min.js.gz +0 -0
- data/vendor/assets/javascripts/dist/matestack-ui-core.min.js.map +1 -1
- data/vendor/assets/javascripts/dist/matestack-ui-core.min.js.map.br +0 -0
- data/vendor/assets/javascripts/dist/matestack-ui-core.min.js.map.gz +0 -0
- metadata +50 -65
- data/MIT-LICENSE +0 -20
- data/app/concepts/matestack/ui/core/absolute/absolute.haml +0 -3
- data/app/concepts/matestack/ui/core/absolute/absolute.rb +0 -17
- data/app/concepts/matestack/ui/core/collection/filter/input/input.haml +0 -2
- data/app/concepts/matestack/ui/core/component/response.haml +0 -2
- data/app/concepts/matestack/ui/core/component/response_dynamic.haml +0 -7
- data/app/concepts/matestack/ui/core/component/response_dynamic_without_rerender.haml +0 -3
- data/app/concepts/matestack/ui/core/component/static.haml +0 -1
- data/app/concepts/matestack/ui/core/form/inline/inline.haml +0 -6
- data/app/concepts/matestack/ui/core/form/inline/inline.rb +0 -9
- data/app/concepts/matestack/ui/core/form/input/input.haml +0 -38
- data/app/concepts/matestack/ui/core/html/html.haml +0 -3
- data/app/concepts/matestack/ui/core/html/html.js +0 -10
- data/app/concepts/matestack/ui/core/html/html.rb +0 -17
- data/app/concepts/matestack/ui/core/isolate/isolate.haml +0 -2
- data/app/concepts/matestack/ui/core/isolate/isolate.rb +0 -11
- data/app/concepts/matestack/ui/core/page/content.haml +0 -7
- data/app/concepts/matestack/ui/core/page/content.rb +0 -5
- data/app/concepts/matestack/ui/core/pg/pg.haml +0 -5
- data/app/concepts/matestack/ui/core/pg/pg.rb +0 -5
- data/app/lib/matestack/ui/core/app_node.rb +0 -53
- data/app/lib/matestack/ui/core/component_node.rb +0 -87
- data/app/lib/matestack/ui/core/page_node.rb +0 -100
- data/app/lib/matestack/ui/core/render.rb +0 -89
- data/app/lib/matestack/ui/core/to_cell.rb +0 -129
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c8fd9950cf73a636c47c170d627b635886af1ef77cb59ded7829013ba2910fe
|
4
|
+
data.tar.gz: b4820552310262280b493560262a53cf7db44e883bbcd55ee79d6b4a691ddcbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4115ea15f05c3740e0d5673db4d86c443483fbcc20140ba8a2b8706dcbe0921ab10b8e4f393c3ffc6e4cf27ac3a79b5ad10adfceabcbb041a3bf21b69044b3ad
|
7
|
+
data.tar.gz: cb3cc79771d0ea3b4a28795a48baa43f8c94d2cfeabf25c8aec4ef7ca9be45e91bf92d89ae34cf7c31066e9f2a5a4b5c4c469c83078fc75a957d14542ff491c2
|
data/LICENSE
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
Copyright (c) Matestack GmbH
|
2
|
+
|
3
|
+
matestack-ui-core is an Open Source project licensed under the terms of
|
4
|
+
the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
|
5
|
+
for license text.
|
6
|
+
|
7
|
+
Matestack will provide a commercial-friendly license allowing private forks
|
8
|
+
and modifications of matestack-ui-core. Please request at jonas@matestack.io
|
data/README.md
CHANGED
@@ -1,240 +1,52 @@
|
|
1
|
-

|
1
|
+
[](https://github.com/matestack/matestack-ui-core/actions)
|
2
2
|
[](https://gitter.im/basemate/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
3
3
|
[](https://badge.fury.io/rb/matestack-ui-core)
|
4
|
-
[](https://
|
4
|
+
[](https://docs.matestack.io)
|
5
|
+
[](https://twitter.com/matestack)
|
5
6
|
|
6
7
|

|
7
8
|
|
8
|
-
# matestack
|
9
|
+
# matestack-ui-core
|
9
10
|
|
10
|
-
##
|
11
|
+
## Escape the frontend hustle & easily create interactive web apps in pure Ruby
|
11
12
|
|
12
|
-
|
13
|
+
`matestack-ui-core` is a Rails engine for Ruby on Rails developers.
|
14
|
+
|
15
|
+
`matestack-ui-core` enables you to craft interactive web UIs without JavaScript in pure Ruby with minimum effort.
|
16
|
+
UI code becomes a native and fun part of your Rails app.
|
17
|
+
|
18
|
+
Work with pure Ruby. If necessary, extend with pure JavaScript. No Opal involved.
|
19
|
+
|
20
|
+
The main goals are:
|
13
21
|
|
14
22
|
- Reduction of complexity of modern web development, moving front and backend closer together
|
15
23
|
- More maintainable UI code, using a component-based structure written in Ruby
|
16
|
-
- Increased development speed and happiness, offering prebuilt UI-Components for
|
24
|
+
- Increased development speed and happiness, offering prebuilt UI-Components for typical requirements
|
17
25
|
- Modern, dynamic UI feeling without the need to implement a separate JavaScript Application
|
18
26
|
|
19
|
-
matestack can progressively replace the classic Rails-View-Layer. You are able to use
|
27
|
+
`matestack-ui-core` can progressively replace the classic Rails-View-Layer. You are able to use
|
20
28
|
it alongside your classic views and incrementally turn your Rails-App into a
|
21
29
|
dynamic Web-App.
|
22
30
|
|
23
|
-
|
24
|
-
|
25
|
-
We love to see more and more people using and contributing to matestack-ui-core. Our current version is 0.7.4 and it's not perfect yet. We recommend you to start using matestack-ui-core in a side project and report issues as this helps us to push matestack-ui-core towards a production ready 1.0.0. At matestack, we already use matestack-ui-core in production as we know how to handle current issues and bypass them with deep insights of the core implementation. We plan to invest time and money (yes, we're hiring) on following improvements:
|
26
|
-
|
27
|
-
* debugging and error handling
|
28
|
-
* core refactoring, increased core maintainability and code quality
|
29
|
-
* better integration in existing rails apps
|
30
|
-
* improved documentation
|
31
|
-
* improved dynamic core components (especially form components)
|
32
|
-
|
33
|
-
|
34
|
-
### Installation:
|
35
|
-
|
36
|
-
Click here to see how you can add Matestack UI to your existing Rails application: [Installation Guide](./docs/install)
|
37
|
-
|
38
|
-
### Features:
|
39
|
-
|
40
|
-
#### Define your UI in a Ruby Class
|
41
|
-
```ruby
|
42
|
-
class Pages::MyPage < Matestack::Ui::Page
|
43
|
-
|
44
|
-
def prepare
|
45
|
-
@technologies = ["Rails", "Vue.js", "Trailblazer", "RSpec", "Capybara"]
|
46
|
-
end
|
47
|
-
|
48
|
-
def response
|
49
|
-
components{
|
50
|
-
div id: "technologies" do
|
51
|
-
@technologies.each do |technology|
|
52
|
-
plain "matestack uses #{technology}"
|
53
|
-
end
|
54
|
-
end
|
55
|
-
}
|
56
|
-
end
|
57
|
-
|
58
|
-
end
|
59
|
-
```
|
60
|
-
#### Create a Single Page Application without JavaScript
|
61
|
-
|
62
|
-
```ruby
|
63
|
-
class Apps::MyApp < Matestack::Ui::App
|
64
|
-
|
65
|
-
def response
|
66
|
-
components{
|
67
|
-
header do
|
68
|
-
heading size: 1, text: "My App"
|
69
|
-
end
|
70
|
-
nav do
|
71
|
-
transition path: :my_first_page_path do
|
72
|
-
button text: "Page 1"
|
73
|
-
end
|
74
|
-
transition path: :my_second_page_path do
|
75
|
-
button text: "Page 2"
|
76
|
-
end
|
77
|
-
end
|
78
|
-
main do
|
79
|
-
page_content #pages are dynamically yielded here, when buttons are clicked!
|
80
|
-
end
|
81
|
-
footer do
|
82
|
-
plain "That's it!"
|
83
|
-
end
|
84
|
-
}
|
85
|
-
end
|
86
|
-
|
87
|
-
end
|
88
|
-
```
|
89
|
-
|
90
|
-
```ruby
|
91
|
-
class Pages::MyApp::MyFirstPage < Matestack::Ui::Page
|
92
|
-
|
93
|
-
def response
|
94
|
-
components{
|
95
|
-
div id: "div-on-page-1" do
|
96
|
-
plain "My First Page"
|
97
|
-
end
|
98
|
-
}
|
99
|
-
end
|
100
|
-
|
101
|
-
end
|
102
|
-
```
|
103
|
-
```ruby
|
104
|
-
class Pages::MyApp::MySecondPage < Matestack::Ui::Page
|
105
|
-
|
106
|
-
def response
|
107
|
-
components{
|
108
|
-
div id: "div-on-page-2" do
|
109
|
-
plain "My Second Page"
|
110
|
-
end
|
111
|
-
}
|
112
|
-
end
|
113
|
-
|
114
|
-
end
|
115
|
-
```
|
116
|
-
#### Handle User Interaction dynamically without JavaScript
|
117
|
-
```ruby
|
118
|
-
class Pages::MyPage < Matestack::Ui::Page
|
119
|
-
|
120
|
-
def response
|
121
|
-
components {
|
122
|
-
action my_action_config do
|
123
|
-
button text: "Click me!"
|
124
|
-
end
|
125
|
-
#content gets rerendered without page reload if action succeeded
|
126
|
-
async rerender_on: "my_action_succeeded" do
|
127
|
-
div id: "my-div" do
|
128
|
-
plain DateTime.now
|
129
|
-
end
|
130
|
-
end
|
131
|
-
}
|
132
|
-
end
|
133
|
-
|
134
|
-
def my_action_config
|
135
|
-
{
|
136
|
-
method: :post,
|
137
|
-
path: :some_rails_routing_path,
|
138
|
-
success: {
|
139
|
-
emit: "my_action_succeeded"
|
140
|
-
}
|
141
|
-
}
|
142
|
-
end
|
143
|
-
|
144
|
-
end
|
145
|
-
```
|
146
|
-
#### Handle User Input dynamically without JavaScript
|
147
|
-
```ruby
|
148
|
-
class Pages::MyApp::MyFirstPage < Matestack::Ui::Page
|
149
|
-
|
150
|
-
def prepare
|
151
|
-
@my_model = MyModel.new
|
152
|
-
end
|
153
|
-
|
154
|
-
def response
|
155
|
-
components {
|
156
|
-
form my_form_config, :include do
|
157
|
-
form_input key: :some_model_attribute, type: :text
|
158
|
-
form_submit do
|
159
|
-
button text: "Submit me!"
|
160
|
-
end
|
161
|
-
end
|
162
|
-
async show_on: "form_has_errors", hide_after: 5000 do
|
163
|
-
plain "Data could not be submitted, please check form"
|
164
|
-
end
|
165
|
-
}
|
166
|
-
end
|
167
|
-
|
168
|
-
def my_form_config
|
169
|
-
{
|
170
|
-
for: @my_model,
|
171
|
-
method: :post,
|
172
|
-
path: :some_action_path,
|
173
|
-
success: {
|
174
|
-
transition: {
|
175
|
-
path: :my_second_page_path,
|
176
|
-
}
|
177
|
-
},
|
178
|
-
failure: {
|
179
|
-
emit: "form_has_errors"
|
180
|
-
}
|
181
|
-
}
|
182
|
-
end
|
183
|
-
|
184
|
-
end
|
185
|
-
```
|
186
|
-
#### Websocket Integration without JavaScript
|
187
|
-
```ruby
|
188
|
-
class Pages::MyPage < Matestack::Ui::Page
|
189
|
-
|
190
|
-
def prepare
|
191
|
-
@comments = Comment.last(5)
|
192
|
-
end
|
193
|
-
|
194
|
-
def response
|
195
|
-
components {
|
196
|
-
#content gets rerendered without page reload when
|
197
|
-
#websocket event is received
|
198
|
-
async rerender_on: "comments_changed" do
|
199
|
-
@comments.each do |comment|
|
200
|
-
div do
|
201
|
-
plain comment.content
|
202
|
-
end
|
203
|
-
end
|
204
|
-
end
|
205
|
-
}
|
206
|
-
end
|
207
|
-
|
208
|
-
end
|
209
|
-
```
|
210
|
-
somewhere else on the backend:
|
211
|
-
|
212
|
-
```ruby
|
213
|
-
ActionCable.server.broadcast("matestack_ui_core", {
|
214
|
-
message: "comments_changed"
|
215
|
-
})
|
216
|
-
```
|
217
|
-
|
218
|
-
### Documentation
|
219
|
-
|
220
|
-
Documentation can be found [here](https://www.matestack.org/docs/install)
|
221
|
-
|
222
|
-
### Changelog
|
31
|
+
## Features
|
223
32
|
|
224
|
-
|
33
|
+
Please have a look at our [landingpage](https://www.matestack.io), presenting the main features of `matestack-ui-core`
|
225
34
|
|
226
|
-
|
35
|
+
## Documentation/Installation
|
227
36
|
|
228
|
-
|
37
|
+
Documentation can be found [here](https://docs.matestack.io)
|
38
|
+
|
39
|
+
## Changelog
|
40
|
+
|
41
|
+
Changelog can be found [here](./CHANGELOG.md)
|
229
42
|
|
230
|
-
|
43
|
+
## Community
|
231
44
|
|
232
45
|
As a low-barrier feedback channel for our early users, we have set up a Gitter chat that can be found [here](https://gitter.im/basemate/community). You are very welcome to ask questions and send us feedback there!
|
233
46
|
|
234
|
-
|
47
|
+
## Contribution
|
235
48
|
|
236
|
-
We are happy to accept contributors of any kind. Please refer to the [Contribution Guide](
|
49
|
+
We are happy to accept contributors of any kind. Please refer to the [Contribution Guide](https://docs.matestack.io/docs/guides/1500-contribute/README.md)
|
237
50
|
|
238
|
-
|
239
|
-
|
240
|
-
[MIT License](https://opensource.org/licenses/MIT).
|
51
|
+
## License
|
52
|
+
matestack-ui-core is an Open Source project licensed under the terms of the [LGPLv3 license](./LICENSE)
|
@@ -17,51 +17,132 @@ const componentDef = {
|
|
17
17
|
(self.componentConfig["confirm"] == undefined) || confirm(self.componentConfig["confirm_text"])
|
18
18
|
)
|
19
19
|
{
|
20
|
-
|
20
|
+
if (self.componentConfig["emit"] != undefined) {
|
21
|
+
matestackEventHub.$emit(self.componentConfig["emit"]);
|
22
|
+
}
|
23
|
+
if (self.componentConfig["delay"] != undefined) {
|
24
|
+
setTimeout(function () {
|
25
|
+
self.sendRequest()
|
26
|
+
}, parseInt(self.componentConfig["delay"]));
|
27
|
+
} else {
|
28
|
+
this.sendRequest()
|
29
|
+
}
|
30
|
+
}
|
31
|
+
},
|
32
|
+
sendRequest: function(){
|
33
|
+
const self = this
|
34
|
+
axios({
|
21
35
|
method: self.componentConfig["method"],
|
22
36
|
url: self.componentConfig["action_path"],
|
23
37
|
data: self.componentConfig["data"],
|
24
38
|
headers: {
|
25
39
|
'X-CSRF-Token': document.getElementsByName("csrf-token")[0].getAttribute('content')
|
26
40
|
}
|
27
|
-
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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
|
-
self
|
62
|
-
|
63
|
-
|
64
|
-
|
41
|
+
}
|
42
|
+
)
|
43
|
+
.then(function(response){
|
44
|
+
if (self.componentConfig["success"] != undefined && self.componentConfig["success"]["emit"] != undefined) {
|
45
|
+
matestackEventHub.$emit(self.componentConfig["success"]["emit"], response.data);
|
46
|
+
}
|
47
|
+
|
48
|
+
// transition handling
|
49
|
+
if (self.componentConfig["success"] != undefined
|
50
|
+
&& self.componentConfig["success"]["transition"] != undefined
|
51
|
+
&& (
|
52
|
+
self.componentConfig["success"]["transition"]["follow_response"] == undefined
|
53
|
+
||
|
54
|
+
self.componentConfig["success"]["transition"]["follow_response"] === false
|
55
|
+
)
|
56
|
+
&& self.$store != undefined
|
57
|
+
) {
|
58
|
+
let path = self.componentConfig["success"]["transition"]["path"]
|
59
|
+
self.$store.dispatch('navigateTo', {url: path, backwards: false})
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
if (self.componentConfig["success"] != undefined
|
63
|
+
&& self.componentConfig["success"]["transition"] != undefined
|
64
|
+
&& self.componentConfig["success"]["transition"]["follow_response"] === true
|
65
|
+
&& self.$store != undefined
|
66
|
+
) {
|
67
|
+
let path = response.data["transition_to"] || response.request.responseURL
|
68
|
+
self.$store.dispatch('navigateTo', {url: path, backwards: false})
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
// redirect handling
|
72
|
+
if (self.componentConfig["success"] != undefined
|
73
|
+
&& self.componentConfig["success"]["redirect"] != undefined
|
74
|
+
&& (
|
75
|
+
self.componentConfig["success"]["redirect"]["follow_response"] == undefined
|
76
|
+
||
|
77
|
+
self.componentConfig["success"]["redirect"]["follow_response"] === false
|
78
|
+
)
|
79
|
+
&& self.$store != undefined
|
80
|
+
) {
|
81
|
+
let path = self.componentConfig["success"]["redirect"]["path"]
|
82
|
+
window.location.href = path
|
83
|
+
return;
|
84
|
+
}
|
85
|
+
if (self.componentConfig["success"] != undefined
|
86
|
+
&& self.componentConfig["success"]["redirect"] != undefined
|
87
|
+
&& self.componentConfig["success"]["redirect"]["follow_response"] === true
|
88
|
+
&& self.$store != undefined
|
89
|
+
) {
|
90
|
+
let path = response.data["redirect_to"] || response.request.responseURL
|
91
|
+
window.location.href = path
|
92
|
+
return;
|
93
|
+
}
|
94
|
+
})
|
95
|
+
.catch(function(error){
|
96
|
+
if (self.componentConfig["failure"] != undefined && self.componentConfig["failure"]["emit"] != undefined) {
|
97
|
+
matestackEventHub.$emit(self.componentConfig["failure"]["emit"], error.response.data);
|
98
|
+
}
|
99
|
+
// transition handling
|
100
|
+
if (self.componentConfig["failure"] != undefined
|
101
|
+
&& self.componentConfig["failure"]["transition"] != undefined
|
102
|
+
&& (
|
103
|
+
self.componentConfig["failure"]["transition"]["follow_response"] == undefined
|
104
|
+
||
|
105
|
+
self.componentConfig["failure"]["transition"]["follow_response"] === false
|
106
|
+
)
|
107
|
+
&& self.$store != undefined
|
108
|
+
) {
|
109
|
+
let path = self.componentConfig["failure"]["transition"]["path"]
|
110
|
+
self.$store.dispatch('navigateTo', {url: path, backwards: false})
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
if (self.componentConfig["failure"] != undefined
|
114
|
+
&& self.componentConfig["failure"]["transition"] != undefined
|
115
|
+
&& self.componentConfig["failure"]["transition"]["follow_response"] === true
|
116
|
+
&& self.$store != undefined
|
117
|
+
) {
|
118
|
+
let path = error.response.data["transition_to"] || response.request.responseURL
|
119
|
+
self.$store.dispatch('navigateTo', {url: path, backwards: false})
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
// redirect handling
|
123
|
+
if (self.componentConfig["failure"] != undefined
|
124
|
+
&& self.componentConfig["failure"]["redirect"] != undefined
|
125
|
+
&& (
|
126
|
+
self.componentConfig["failure"]["redirect"]["follow_response"] == undefined
|
127
|
+
||
|
128
|
+
self.componentConfig["failure"]["redirect"]["follow_response"] === false
|
129
|
+
)
|
130
|
+
&& self.$store != undefined
|
131
|
+
) {
|
132
|
+
let path = self.componentConfig["failure"]["redirect"]["path"]
|
133
|
+
window.location.href = path
|
134
|
+
return;
|
135
|
+
}
|
136
|
+
if (self.componentConfig["failure"] != undefined
|
137
|
+
&& self.componentConfig["failure"]["redirect"] != undefined
|
138
|
+
&& self.componentConfig["failure"]["redirect"]["follow_response"] === true
|
139
|
+
&& self.$store != undefined
|
140
|
+
) {
|
141
|
+
let path = error.response.data["redirect_to"] || response.request.responseURL
|
142
|
+
window.location.href = path
|
143
|
+
return;
|
144
|
+
}
|
145
|
+
})
|
65
146
|
}
|
66
147
|
}
|
67
148
|
}
|