super 0.0.8 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +0 -7
  3. data/README.md +53 -79
  4. data/app/assets/javascripts/super/application.js +2728 -96
  5. data/app/assets/stylesheets/super/application.css +6405 -0
  6. data/app/controllers/super/application_controller.rb +19 -13
  7. data/app/helpers/super/form_builder_helper.rb +25 -0
  8. data/app/views/layouts/super/application.html.erb +11 -5
  9. data/app/views/super/application/{_super_schema_display_actions.html.erb → _display_actions.html.erb} +0 -0
  10. data/app/views/super/application/{_super_schema_display_index.html.erb → _display_index.html.erb} +5 -5
  11. data/app/views/super/application/_display_rich_text.html.erb +1 -0
  12. data/app/views/super/application/_display_show.html.erb +8 -0
  13. data/app/views/super/application/_filter.html.erb +5 -13
  14. data/app/views/super/application/_filter_type_select.html.erb +9 -19
  15. data/app/views/super/application/_filter_type_text.html.erb +7 -11
  16. data/app/views/super/application/_filter_type_timestamp.html.erb +6 -17
  17. data/app/views/super/application/_form.html.erb +15 -0
  18. data/app/views/super/application/_form_field__destroy.html.erb +1 -9
  19. data/app/views/super/application/_form_field_checkbox.html.erb +1 -0
  20. data/app/views/super/application/_form_field_flatpickr_date.html.erb +8 -0
  21. data/app/views/super/application/_form_field_flatpickr_datetime.html.erb +8 -0
  22. data/app/views/super/application/_form_field_flatpickr_time.html.erb +8 -0
  23. data/app/views/super/application/_form_field_rich_text_area.html.erb +1 -0
  24. data/app/views/super/application/_form_field_select.html.erb +1 -23
  25. data/app/views/super/application/_form_field_text.html.erb +1 -13
  26. data/app/views/super/application/{_super_layout.html.erb → _layout.html.erb} +7 -7
  27. data/app/views/super/application/{_super_pagination.html.erb → _pagination.html.erb} +1 -1
  28. data/app/views/super/application/{_super_panel.html.erb → _panel.html.erb} +2 -2
  29. data/app/views/super/application/_query.html.erb +18 -0
  30. data/app/views/super/application/_sort.html.erb +18 -0
  31. data/app/views/super/application/_sort_expression.html.erb +25 -0
  32. data/app/views/super/application/edit.html.erb +1 -0
  33. data/app/views/super/application/index.html.erb +1 -0
  34. data/app/views/super/application/new.html.erb +1 -0
  35. data/app/views/super/application/show.html.erb +1 -0
  36. data/app/views/super/feather/README.md +1 -0
  37. data/app/views/super/feather/_x.html +15 -0
  38. data/config/routes.rb +2 -0
  39. data/docs/cheat.md +8 -8
  40. data/frontend/super-frontend/dist/application.css +6405 -0
  41. data/frontend/super-frontend/dist/application.js +2728 -96
  42. data/lib/generators/super/action_text/USAGE +23 -0
  43. data/lib/generators/super/action_text/action_text_generator.rb +32 -0
  44. data/lib/generators/super/action_text/templates/pack_super_action_text.css +23 -0
  45. data/lib/generators/super/action_text/templates/pack_super_action_text.js +4 -0
  46. data/lib/generators/super/install/install_generator.rb +18 -7
  47. data/lib/generators/super/install/templates/base_controller.rb.tt +9 -1
  48. data/lib/generators/super/install/templates/initializer.rb.tt +9 -2
  49. data/lib/generators/super/resource/resource_generator.rb +107 -30
  50. data/lib/generators/super/resource/templates/resources_controller.rb.tt +3 -9
  51. data/lib/generators/super/webpacker/USAGE +5 -4
  52. data/lib/generators/super/webpacker/webpacker_generator.rb +2 -0
  53. data/lib/super.rb +7 -1
  54. data/lib/super/action_inquirer.rb +2 -0
  55. data/lib/super/assets.rb +6 -0
  56. data/lib/super/client_error.rb +2 -0
  57. data/lib/super/compatibility.rb +2 -0
  58. data/lib/super/configuration.rb +16 -24
  59. data/lib/super/controls.rb +11 -2
  60. data/lib/super/controls/optional.rb +35 -1
  61. data/lib/super/controls/steps.rb +27 -35
  62. data/lib/super/controls/view.rb +55 -0
  63. data/lib/super/display.rb +29 -13
  64. data/lib/super/display/guesser.rb +4 -0
  65. data/lib/super/display/schema_types.rb +74 -28
  66. data/lib/super/engine.rb +4 -0
  67. data/lib/super/error.rb +21 -0
  68. data/lib/super/filter.rb +2 -0
  69. data/lib/super/filter/form_object.rb +5 -8
  70. data/lib/super/filter/guesser.rb +2 -0
  71. data/lib/super/filter/operator.rb +2 -0
  72. data/lib/super/filter/schema_types.rb +2 -0
  73. data/lib/super/form.rb +3 -1
  74. data/lib/super/form/builder.rb +289 -39
  75. data/lib/super/form/guesser.rb +12 -1
  76. data/lib/super/form/inline_errors.rb +28 -0
  77. data/lib/super/form/schema_types.rb +25 -0
  78. data/lib/super/form/strong_params.rb +2 -0
  79. data/lib/super/layout.rb +3 -1
  80. data/lib/super/link.rb +7 -0
  81. data/lib/super/navigation/automatic.rb +4 -2
  82. data/lib/super/pagination.rb +3 -1
  83. data/lib/super/panel.rb +3 -1
  84. data/lib/super/partial.rb +2 -0
  85. data/lib/super/partial/resolving.rb +2 -0
  86. data/lib/super/plugin.rb +2 -0
  87. data/lib/super/query/form_object.rb +48 -0
  88. data/lib/super/schema.rb +2 -0
  89. data/lib/super/schema/common.rb +2 -0
  90. data/lib/super/schema/guesser.rb +2 -0
  91. data/lib/super/sort.rb +110 -0
  92. data/lib/super/useful/builder.rb +25 -0
  93. data/lib/super/useful/enum.rb +63 -0
  94. data/lib/super/version.rb +3 -1
  95. data/lib/super/view_helper.rb +2 -19
  96. metadata +56 -38
  97. data/CONTRIBUTING.md +0 -56
  98. data/Rakefile +0 -34
  99. data/STABILITY.md +0 -50
  100. data/app/views/super/application/_form_inline_errors.html.erb +0 -10
  101. data/app/views/super/application/_super_schema_display_show.html.erb +0 -8
  102. data/app/views/super/application/_super_schema_form.html.erb +0 -15
  103. data/docs/README.md +0 -6
  104. data/docs/faq.md +0 -44
  105. data/docs/quick_start.md +0 -45
  106. data/docs/webpacker.md +0 -17
  107. data/docs/yard_customizations.rb +0 -41
  108. data/frontend/super-frontend/build.js +0 -36
  109. data/frontend/super-frontend/package.json +0 -21
  110. data/frontend/super-frontend/postcss.config.js +0 -6
  111. data/frontend/super-frontend/src/javascripts/super/application.ts +0 -15
  112. data/frontend/super-frontend/src/javascripts/super/apply_template_controller.ts +0 -19
  113. data/frontend/super-frontend/src/javascripts/super/rails__ujs.d.ts +0 -1
  114. data/frontend/super-frontend/src/javascripts/super/toggle_pending_destruction_controller.ts +0 -15
  115. data/frontend/super-frontend/src/stylesheets/super/application.css +0 -77
  116. data/frontend/super-frontend/tailwind.config.js +0 -15
  117. data/frontend/super-frontend/tsconfig.json +0 -13
  118. data/frontend/super-frontend/yarn.lock +0 -5448
  119. data/lib/super/controls/required.rb +0 -13
  120. data/lib/super/filter/plugin.rb +0 -47
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Super
2
4
  # Provides a default implementation for each of the resourceful actions
3
5
  class ApplicationController < ActionController::Base
@@ -9,22 +11,26 @@ module Super
9
11
  # Displays a list of records to the user
10
12
  def index
11
13
  @records = controls.load_records(action: action_inquirer, params: params)
12
- @display = controls.display_schema(action: action_inquirer)
13
- @view = controls.build_index_view
14
+ @display = controls.display_schema(action: action_inquirer).apply(action: action_inquirer)
15
+ @view = controls.index_view
16
+ @query_form = controls.initialize_query_form(params: params, current_path: request.path)
17
+ controls.initialize_filter_form(query_form: @query_form)
18
+ controls.initialize_sort_form(query_form: @query_form)
19
+ @records = controls.apply_queries(query_form: @query_form, records: @records)
14
20
  end
15
21
 
16
22
  # Displays a specific record to the user
17
23
  def show
18
24
  @record = controls.load_record(action: action_inquirer, params: params)
19
- @display = controls.display_schema(action: action_inquirer)
20
- @view = controls.build_show_view
25
+ @display = controls.display_schema(action: action_inquirer).apply(action: action_inquirer)
26
+ @view = controls.show_view
21
27
  end
22
28
 
23
29
  # Displays a form to allow the user to create a new record
24
30
  def new
25
31
  @record = controls.build_record(action: action_inquirer)
26
32
  @form = controls.form_schema(action: action_inquirer)
27
- @view = controls.build_new_view
33
+ @view = controls.new_view
28
34
  end
29
35
 
30
36
  # Creates a record, or shows the validation errors
@@ -32,10 +38,10 @@ module Super
32
38
  @record = controls.build_record_with_params(action: action_inquirer, params: params)
33
39
 
34
40
  if controls.save_record(action: action_inquirer, record: @record, params: params)
35
- redirect_to polymorphic_path(Super.configuration.path_parts(@record))
41
+ redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
36
42
  else
37
43
  @form = controls.form_schema(action: action_inquirer_for("new"))
38
- @view = controls.build_new_view
44
+ @view = controls.new_view
39
45
  render :new, status: :bad_request
40
46
  end
41
47
  end
@@ -44,7 +50,7 @@ module Super
44
50
  def edit
45
51
  @record = controls.load_record(action: action_inquirer, params: params)
46
52
  @form = controls.form_schema(action: action_inquirer)
47
- @view = controls.build_edit_view
53
+ @view = controls.edit_view
48
54
  end
49
55
 
50
56
  # Updates a record, or shows validation errors
@@ -52,10 +58,10 @@ module Super
52
58
  @record = controls.load_record(action: action_inquirer, params: params)
53
59
 
54
60
  if controls.update_record(action: action_inquirer, record: @record, params: params)
55
- redirect_to polymorphic_path(Super.configuration.path_parts(@record))
61
+ redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
56
62
  else
57
63
  @form = controls.form_schema(action: action_inquirer_for("edit"))
58
- @view = controls.build_edit_view
64
+ @view = controls.edit_view
59
65
  render :edit, status: :bad_request
60
66
  end
61
67
  end
@@ -65,14 +71,14 @@ module Super
65
71
  @record = controls.load_record(action: action_inquirer, params: params)
66
72
 
67
73
  if controls.destroy_record(action: action_inquirer, record: @record, params: params)
68
- redirect_to polymorphic_path(Super.configuration.path_parts(controls.model))
74
+ redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
69
75
  else
70
76
  flash.alert = "Couldn't delete record"
71
- redirect_to polymorphic_path(Super.configuration.path_parts(@record))
77
+ redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
72
78
  end
73
79
  rescue ActiveRecord::InvalidForeignKey => e
74
80
  flash.alert = "Couldn't delete record: #{e.class}"
75
- redirect_to polymorphic_path(Super.configuration.path_parts(@record))
81
+ redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
76
82
  end
77
83
 
78
84
  private
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Super
4
+ module FormBuilderHelper
5
+ def super_form_for(record, options = {}, &block)
6
+ original = ActionView::Base.field_error_proc
7
+ ActionView::Base.field_error_proc = Form::Builder::FIELD_ERROR_PROC
8
+
9
+ options[:builder] ||= Form::Builder
10
+ return form_for(record, options, &block)
11
+ ensure
12
+ ActionView::Base.field_error_proc = original
13
+ end
14
+
15
+ def super_form_with(**options, &block)
16
+ original = ActionView::Base.field_error_proc
17
+ ActionView::Base.field_error_proc = Form::Builder::FIELD_ERROR_PROC
18
+
19
+ options[:builder] ||= Form::Builder
20
+ return form_with(**options, &block)
21
+ ensure
22
+ ActionView::Base.field_error_proc = original
23
+ end
24
+ end
25
+ end
@@ -13,7 +13,11 @@
13
13
  <% if stylesheet.handler.sprockets? %>
14
14
  <%= stylesheet_link_tag(stylesheet.path, **stylesheet.arguments) %>
15
15
  <% elsif stylesheet.handler.webpacker? %>
16
- <%= stylesheet_pack_tag(stylesheet.path, **stylesheet.arguments) %>
16
+ <% if Gem::Dependency.new("webpacker", "> 5.99", "< 7").matching_specs.any? %>
17
+ <%= stylesheet_packs_with_chunks_tag(stylesheet.path) %>
18
+ <% else %>
19
+ <%= stylesheet_pack_tag(stylesheet.path, **stylesheet.arguments) %>
20
+ <% end %>
17
21
  <% end %>
18
22
  <% end %>
19
23
 
@@ -21,7 +25,11 @@
21
25
  <% if javascript.handler.sprockets? %>
22
26
  <%= javascript_include_tag(javascript.path) %>
23
27
  <% elsif javascript.handler.webpacker? %>
24
- <%= javascript_pack_tag(javascript.path) %>
28
+ <% if Gem::Dependency.new("webpacker", "> 5.99", "< 7").matching_specs.any? %>
29
+ <%= javascript_packs_with_chunks_tag(javascript.path) %>
30
+ <% else %>
31
+ <%= javascript_pack_tag(javascript.path) %>
32
+ <% end %>
25
33
  <% end %>
26
34
  <% end %>
27
35
  </head>
@@ -30,9 +38,7 @@
30
38
  <div class="px-4">
31
39
  <header class="pt-4">
32
40
  <h1 class="text-lg font-bold mr-6 mb-1"><%= Super.configuration.title %></h1>
33
- <%
34
- route_namespace = Super.configuration.route_namespace.map(&:to_s).join("/")
35
- Super::Navigation::Automatic.new(route_namespace: route_namespace).each do |text, href| %>
41
+ <% Super::Navigation::Automatic.new.each do |text, href| %>
36
42
  <%= link_to(text, href, class: "inline-block mr-6") %>
37
43
  <% end %>
38
44
  </header>
@@ -1,9 +1,9 @@
1
- <div class="mt-4 overflow-x-auto lg:overflow-x-visible">
1
+ <div class="mt-4 overflow-x-auto">
2
2
  <table class="w-full border-separate relative" cellspacing="0" cellpadding="0">
3
3
  <thead class="">
4
4
  <tr class="">
5
- <% super_schema_display_index.each_attribute_name do |attribute_name| %>
6
- <th class="p-2 first:pl-6 border-b border-b-2 border-gray-400 text-gray-600 text-left text-sm font-normal bg-white sticky top-0 z-10">
5
+ <% display_index.each_attribute_name do |attribute_name| %>
6
+ <th class="p-2 first:pl-6 border-b border-b-2 border-gray-400 text-gray-600 text-left text-sm font-normal bg-white top-0 z-10">
7
7
  <%= controls.model.human_attribute_name(attribute_name) %>
8
8
  </th>
9
9
  <% end %>
@@ -12,9 +12,9 @@
12
12
  <tbody class="">
13
13
  <% @records.each.with_index do |record, row_index| %>
14
14
  <tr id="record-pk-<%= record.id %>" class="group">
15
- <% super_schema_display_index.each_attribute_name do |attribute_name| %>
15
+ <% display_index.each_attribute_name do |attribute_name| %>
16
16
  <td class="py-1 px-2 first:pl-5 border-transparent border-t border-b group-hover:bg-blue-200 first:border-l first:rounded-l-lg last:border-r last:rounded-r-lg bg-white <%= Super::ViewHelper.classes(["bg-gray-100", row_index.odd?]) %>">
17
- <%= super_schema_display_index.render_field(template: self, record: record, column: attribute_name) %>
17
+ <%= display_index.render_attribute(template: self, record: record, column: attribute_name) %>
18
18
  </td>
19
19
  <% end %>
20
20
  </tr>
@@ -0,0 +1 @@
1
+ <%= rich_text %>
@@ -0,0 +1,8 @@
1
+ <table class="max-w-full mt-4">
2
+ <% display_show.each_attribute_name do |attribute_name| %>
3
+ <tr>
4
+ <th class="py-1 align-baseline text-right px-4"><%= controls.model.human_attribute_name(attribute_name) %></th>
5
+ <td class="py-1 align-baseline"><%= display_show.render_attribute(template: self, record: @record, column: attribute_name) %></td>
6
+ </tr>
7
+ <% end %>
8
+ </table>
@@ -1,14 +1,6 @@
1
- <%= render(Super::Panel.new) do %>
2
- <h1 class="text-xl">Filters</h1>
3
- <%= form_for(filter, url: filter.url, method: :get, as: :q, html: { class: "mt-4" }) do |form| %>
4
- <% filter.each_field do |filter_field| %>
5
- <div class="mt-4">
6
- <%= render(filter_field, form: form) %>
7
- </div>
8
- <% end %>
9
-
10
- <div>
11
- <%= form.submit "Filter", class: "super-button super-button--border-gray mt-6" %>
12
- </div>
13
- <% end %>
1
+ <h1 class="text-lg">Filter</h1>
2
+ <% filter.each_field do |filter_field| %>
3
+ <div class="mt-4">
4
+ <%= render(filter_field, form: form) %>
5
+ </div>
14
6
  <% end %>
@@ -1,31 +1,21 @@
1
- <div class="super-field-group">
1
+ <div class="super-field-group" data-controller="clean-filter-param">
2
2
  <%= form.fields_for(filter_type_select.field_name, filter_type_select) do |form_field| %>
3
3
  <%= form_field.label(:q, filter_type_select.humanized_field_name) %>
4
- <div class="super-input-select inline-block">
5
- <%= form_field.select(
4
+ <div class="relative inline-block">
5
+ <%= form_field.super.select(
6
6
  :op,
7
7
  filter_type_select.operators,
8
- {},
9
- { class: "super-input super-input-select-field" }
8
+ { include_blank: false },
9
+ data: { clean_filter_param_target: "candidate" }
10
10
  ) %>
11
- <div class="super-input-select-icon text-gray-700">
12
- <span class="h-4 w-4">
13
- <%= render "super/feather/chevron_down" %>
14
- </span>
15
- </div>
16
11
  </div>
17
- <div class="super-input-select mt-3">
18
- <%= form_field.select(
12
+ <div class="mt-3">
13
+ <%= form_field.super.select(
19
14
  :q,
20
15
  filter_type_select.field_type.collection,
21
- { include_blank: true },
22
- { class: "super-input super-input-select-field" }
16
+ {},
17
+ data: { clean_filter_param_target: "control candidate" }
23
18
  ) %>
24
- <div class="super-input-select-icon text-gray-700">
25
- <span class="h-4 w-4">
26
- <%= render "super/feather/chevron_down" %>
27
- </span>
28
- </div>
29
19
  </div>
30
20
  <% end %>
31
21
  </div>
@@ -1,22 +1,18 @@
1
- <div class="super-field-group">
1
+ <div class="super-field-group" data-controller="clean-filter-param">
2
2
  <%= form.fields_for(filter_type_text.field_name, filter_type_text) do |form_field| %>
3
3
  <%= form_field.label(:q, filter_type_text.humanized_field_name) %>
4
4
  <div class="relative inline-block">
5
- <%= form_field.select(
5
+ <%= form_field.super.select(
6
6
  :op,
7
7
  filter_type_text.operators,
8
- {},
9
- { class: "super-input super-input-select-field" }
8
+ { include_blank: false },
9
+ data: { clean_filter_param_target: "candidate" }
10
10
  ) %>
11
- <div class="super-input-select-icon text-gray-700">
12
- <span class="h-4 w-4">
13
- <%= render "super/feather/chevron_down" %>
14
- </span>
15
- </div>
16
11
  </div>
17
- <%= form_field.text_field(
12
+ <%= form_field.super.text_field(
18
13
  :q,
19
- class: "super-input w-full mt-3"
14
+ class: "mt-3",
15
+ data: { clean_filter_param_target: "control candidate" }
20
16
  ) %>
21
17
  <% end %>
22
18
  </div>
@@ -1,34 +1,23 @@
1
- <div class="super-field-group">
1
+ <div class="super-field-group" data-controller="clean-filter-param">
2
2
  <%= form.fields_for(filter_type_timestamp.field_name, filter_type_timestamp) do |form_field| %>
3
3
  <%= form_field.label(:q0, filter_type_timestamp.humanized_field_name) %>
4
4
  <div class="relative inline-block mt-2">
5
- <%= form_field.select(
5
+ <%= form_field.super.select(
6
6
  :op,
7
7
  filter_type_timestamp.operators,
8
- {},
9
- { class: "super-input super-input-select-field" }
8
+ { include_blank: false },
9
+ data: { clean_filter_param_target: "candidate" }
10
10
  ) %>
11
- <div class="super-input-select-icon text-gray-700">
12
- <span class="h-4 w-4">
13
- <%= render "super/feather/chevron_down" %>
14
- </span>
15
- </div>
16
11
  </div>
17
12
  <div class="flex items-center mt-3">
18
13
  <div class="flex-initial">
19
- <%= form_field.text_field(
20
- :q0,
21
- class: "super-input w-full"
22
- ) %>
14
+ <%= form_field.super.flatpickr_datetime(:q0, data: { clean_filter_param_target: "control candidate" }) %>
23
15
  </div>
24
16
  <div class="flex-initial px-2">
25
17
  &ndash;
26
18
  </div>
27
19
  <div class="flex-initial">
28
- <%= form_field.text_field(
29
- :q1,
30
- class: "super-input w-full"
31
- ) %>
20
+ <%= form_field.super.flatpickr_datetime(:q1, data: { clean_filter_param_target: "control candidate" }) %>
32
21
  </div>
33
22
  </div>
34
23
  <% end %>
@@ -0,0 +1,15 @@
1
+ <%= super_form_for(Super::Link.polymorphic_parts(@record), builder: Super::Form::Builder) do |f| %>
2
+ <div class="max-w-3xl">
3
+ <% form.each_attribute do |field, type| %>
4
+ <%= render(
5
+ type,
6
+ form: f,
7
+ column: field
8
+ ) %>
9
+ <% end %>
10
+
11
+ <div>
12
+ <%= f.super.submit class: "super-button--fill-blue mt-2" %>
13
+ </div>
14
+ </div>
15
+ <% end %>
@@ -1,9 +1 @@
1
- <% if !local_assigns[:ungrouped] %>
2
- <div class="super-field-group">
3
- <% end %>
4
- <%= form.check_box(column, data: { action: "toggle-pending-destruction#call" }) %>
5
- <%= form.label(column) %>
6
- <%= render "form_inline_errors", form: form, column: column %>
7
- <% if !local_assigns[:ungrouped] %>
8
- </div>
9
- <% end %>
1
+ <%= form.super.check_box!(column, field: { data: { action: "toggle-pending-destruction#call" } }) %>
@@ -0,0 +1 @@
1
+ <%= form.super.check_box!(column) %>
@@ -0,0 +1,8 @@
1
+ <%= form.super.flatpickr_date!(
2
+ column,
3
+ **form_field_flatpickr_date.extras.deep_merge(
4
+ field: {
5
+ value: form.object.public_send(column)&.iso8601,
6
+ }
7
+ )
8
+ ) %>
@@ -0,0 +1,8 @@
1
+ <%= form.super.flatpickr_datetime!(
2
+ column,
3
+ **form_field_flatpickr_datetime.extras.deep_merge(
4
+ field: {
5
+ value: form.object.public_send(column)&.iso8601,
6
+ }
7
+ )
8
+ ) %>
@@ -0,0 +1,8 @@
1
+ <%= form.super.flatpickr_time!(
2
+ column,
3
+ **form_field_flatpickr_time.extras.deep_merge(
4
+ field: {
5
+ value: form.object.public_send(column)&.strftime("%H:%M:%S"),
6
+ }
7
+ )
8
+ ) %>
@@ -0,0 +1 @@
1
+ <%= form.super.rich_text_area!(column) %>
@@ -1,23 +1 @@
1
- <% if !local_assigns[:ungrouped] %>
2
- <div class="super-field-group">
3
- <% end %>
4
- <% if !local_assigns[:hide_label] %>
5
- <%= form.label(column, class: "block") %>
6
- <% end %>
7
- <div class="<%= Super::ViewHelper.classes("super-input-select", ["mt-1", !local_assigns[:hide_label]]) %>">
8
- <%= form.select(
9
- column,
10
- form_field_select[:collection],
11
- { include_blank: true }.merge(form_field_select[:options] || {}),
12
- { class: "super-input super-input-select-field" }
13
- ) %>
14
- <div class="super-input-select-icon text-gray-700">
15
- <span class="h-4 w-4">
16
- <%= render "super/feather/chevron_down" %>
17
- </span>
18
- </div>
19
- </div>
20
- <%= render "form_inline_errors", form: form, column: column %>
21
- <% if !local_assigns[:ungrouped] %>
22
- </div>
23
- <% end %>
1
+ <%= form.super.select!(column, form_field_select[:collection]) %>
@@ -1,13 +1 @@
1
- <% if !local_assigns[:ungrouped] %>
2
- <div class="super-field-group">
3
- <% end %>
4
- <% if !local_assigns[:hide_label] %>
5
- <%= form.label(column, class: "block") %>
6
- <% end %>
7
- <div class="<%= Super::ViewHelper.classes(["mt-1", !local_assigns[:hide_label]]) %>">
8
- <%= form.text_field(column, class: "super-input w-full") %>
9
- <%= render "form_inline_errors", form: form, column: column %>
10
- </div>
11
- <% if !local_assigns[:ungrouped] %>
12
- </div>
13
- <% end %>
1
+ <%= form.super.text_field!(column) %>
@@ -1,29 +1,29 @@
1
- <% super_layout.resolve(self) %>
1
+ <% layout.resolve(self) %>
2
2
 
3
- <% super_layout.resolved_headers.each do |partial| %>
3
+ <% layout.resolved_headers.each do |partial| %>
4
4
  <%= Super::Partial.render(partial, template: self) %>
5
5
  <% end %>
6
6
 
7
- <% if super_layout.resolved_asides.empty? %>
8
- <% super_layout.resolved_mains.each do |partial| %>
7
+ <% if layout.resolved_asides.empty? %>
8
+ <% layout.resolved_mains.each do |partial| %>
9
9
  <%= Super::Partial.render(partial, template: self) %>
10
10
  <% end %>
11
11
  <% else %>
12
12
  <div class="clearfix -mx-2">
13
13
  <div class="md:float-left md:w-9/12 px-2">
14
- <% super_layout.resolved_mains.each do |partial| %>
14
+ <% layout.resolved_mains.each do |partial| %>
15
15
  <%= Super::Partial.render(partial, template: self) %>
16
16
  <% end %>
17
17
  </div>
18
18
 
19
19
  <div class="md:float-right md:w-3/12 px-2">
20
- <% super_layout.resolved_asides.each do |partial| %>
20
+ <% layout.resolved_asides.each do |partial| %>
21
21
  <%= Super::Partial.render(partial, template: self) %>
22
22
  <% end %>
23
23
  </div>
24
24
  </div>
25
25
  <% end %>
26
26
 
27
- <% super_layout.resolved_footers.each do |partial| %>
27
+ <% layout.resolved_footers.each do |partial| %>
28
28
  <%= Super::Partial.render(partial, template: self) %>
29
29
  <% end %>