voom-presenters 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +4 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +8 -0
- data/README.md +12 -0
- data/app/demo/components/date_fields.pom +96 -0
- data/app/demo/components/datetime_fields.pom +106 -0
- data/app/demo/components/nav/drawer.pom +1 -1
- data/app/demo/components/nav/menu.pom +1 -1
- data/app/demo/components/time_fields.pom +59 -0
- data/app/demo/components/toggles.pom +28 -1
- data/app/demo/events/actions/autocomplete.pom +32 -0
- data/app/demo/events/actions/deletes.pom +24 -0
- data/app/demo/events/actions/dialog.pom +19 -0
- data/app/demo/{event/actions/dialog → events/actions/dialogs}/show_dialog.pom +0 -0
- data/app/demo/{event/actions/dialog → events/actions/dialogs}/trigger.pom +0 -0
- data/app/demo/events/actions/loads.pom +19 -0
- data/app/demo/events/actions/posts.pom +23 -0
- data/app/demo/{event/new_text.pom → events/actions/replace_text.pom} +0 -0
- data/app/demo/events/actions/replaces.pom +21 -0
- data/app/demo/events/actions/snackbar.pom +19 -0
- data/app/demo/events/actions/toggle_visiblity.pom +21 -0
- data/app/demo/events/actions/updates.pom +24 -0
- data/app/demo/events/field_level.pom +20 -0
- data/app/demo/events/form_level.pom +24 -0
- data/app/demo/events/nav/drawer.pom +21 -0
- data/app/demo/events.pom +8 -77
- data/app/demo/formatting_tokens.pom +125 -0
- data/app/demo/index.pom +12 -5
- data/app/demo/markdown.pom +33 -40
- data/app/demo/shared/context_list.pom +2 -2
- data/app/demo/styles.pom +1 -0
- data/config.ru +9 -0
- data/lib/voom/presenters/dsl/components/base.rb +5 -0
- data/lib/voom/presenters/dsl/components/card.rb +2 -0
- data/lib/voom/presenters/dsl/components/content.rb +2 -0
- data/lib/voom/presenters/dsl/components/date_field.rb +21 -0
- data/lib/voom/presenters/dsl/components/datetime_base.rb +48 -0
- data/lib/voom/presenters/dsl/components/datetime_field.rb +23 -0
- data/lib/voom/presenters/dsl/components/expansion_panel.rb +1 -0
- data/lib/voom/presenters/dsl/components/form.rb +2 -0
- data/lib/voom/presenters/dsl/components/grid.rb +2 -0
- data/lib/voom/presenters/dsl/components/mixins/date_time_fields.rb +29 -0
- data/lib/voom/presenters/dsl/components/mixins/text_fields.rb +0 -6
- data/lib/voom/presenters/dsl/components/table.rb +1 -1
- data/lib/voom/presenters/dsl/components/time_field.rb +21 -0
- data/lib/voom/presenters/dsl/user_interface.rb +3 -0
- data/lib/voom/presenters/helpers/rails/currency.rb +16 -0
- data/lib/voom/presenters/helpers/rails/model_table.rb +52 -0
- data/lib/voom/presenters/helpers/rails.rb +4 -34
- data/lib/voom/presenters/settings.rb +14 -0
- data/lib/voom/presenters/version.rb +1 -1
- data/lib/voom/presenters/web_client/app.rb +8 -0
- data/public/bundle.css +676 -0
- data/public/bundle.js +3314 -1151
- data/views/mdc/assets/js/components/datetime.js +36 -0
- data/views/mdc/assets/js/components/events/base.js +5 -5
- data/views/mdc/assets/js/components/forms.js +2 -2
- data/views/mdc/assets/js/components/initialize.js +2 -2
- data/views/mdc/assets/js/components/switches.js +1 -1
- data/views/mdc/assets/js/components/text-fields.js +2 -4
- data/views/mdc/assets/scss/components/datetime.scss +19 -0
- data/views/mdc/assets/scss/components/textfield.scss +7 -0
- data/views/mdc/assets/scss/components/vendor/flatpickr.min.css +13 -0
- data/views/mdc/components/date.erb +1 -0
- data/views/mdc/components/{date_time.erb → datetime.erb} +13 -8
- data/views/mdc/components/icon.erb +2 -0
- data/views/mdc/components/text_field.erb +3 -2
- data/views/mdc/components/time.erb +1 -0
- data/views/mdc/layout.erb +1 -0
- data/views/mdc/package-lock.json +5 -0
- data/views/mdc/package.json +1 -1
- metadata +33 -18
- data/LICENSE.txt +0 -21
- data/app/demo/event/actions/nav/drawer.pom +0 -5
- data/app/demo/event/actions/nav/menu.pom +0 -19
- data/app/demo/event/actions.rb +0 -86
- data/app/demo/event/autocomplete.pom +0 -27
- data/app/demo/event/field_level.pom +0 -22
- data/app/demo/event/form_level.pom +0 -26
- data/app/demo/event/nav/drawer.pom +0 -5
- data/app/demo/event/nav/menu.pom +0 -14
- data/lib/voom/presenters/dsl/components/date_time.rb +0 -17
- data/lib/voom/presenters/helpers/currency.rb +0 -14
- data/views/mdc/assets/js/components/date-time.js +0 -6
@@ -1,22 +0,0 @@
|
|
1
|
-
Voom::Presenters.define(:field_level_events) do
|
2
|
-
attach :top_nav
|
3
|
-
|
4
|
-
grid do
|
5
|
-
column 1
|
6
|
-
column 4 do
|
7
|
-
card do
|
8
|
-
display 'Field Level Events'
|
9
|
-
heading 'Text Fields'
|
10
|
-
body 'This demonstrates that a change event will submit the field value to the event action. '\
|
11
|
-
'This works with posts and replace actions'
|
12
|
-
text_field name: :myfield do
|
13
|
-
label 'Data to post'
|
14
|
-
event :change do
|
15
|
-
replaces :context_list, :context_list
|
16
|
-
end
|
17
|
-
end
|
18
|
-
attach :context_list
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
Voom::Presenters.define(:form_level_events) do
|
2
|
-
attach :top_nav
|
3
|
-
|
4
|
-
grid do
|
5
|
-
column 1
|
6
|
-
column 4 do
|
7
|
-
card do
|
8
|
-
display 'Posts in Form'
|
9
|
-
body 'This demonstrates that a change event on **ANY** form input will send all the form inputs to the event action. '\
|
10
|
-
'This works with posts and replace actions'
|
11
|
-
form do
|
12
|
-
text_field name: :myfield do
|
13
|
-
label 'Data to post'
|
14
|
-
end
|
15
|
-
text_field name: :myfield2 do
|
16
|
-
label 'More Data to post'
|
17
|
-
end
|
18
|
-
event :change do
|
19
|
-
replaces :context_list, :context_list
|
20
|
-
end
|
21
|
-
end
|
22
|
-
attach :context_list
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
data/app/demo/event/nav/menu.pom
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Voom::Presenters.define(:events_menu) do
|
2
|
-
helpers Voom::Presenters::Helpers::Inflector
|
3
|
-
menu side: :left do
|
4
|
-
%i(event_actions field_level form_level).sort.each do |comp|
|
5
|
-
item titleize(comp) do
|
6
|
-
event :click do
|
7
|
-
loads comp
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require_relative 'text_field'
|
2
|
-
|
3
|
-
module Voom
|
4
|
-
module Presenters
|
5
|
-
module DSL
|
6
|
-
module Components
|
7
|
-
class DateTime < TextField
|
8
|
-
def initialize(**attribs_, &block)
|
9
|
-
super(type: :date_time, **attribs_, &block)
|
10
|
-
expand!
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|