proscenium 0.19.0.beta4-x86_64-darwin → 0.19.0.beta5-x86_64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/proscenium/builder.rb +9 -13
- data/lib/proscenium/ext/proscenium +0 -0
- data/lib/proscenium/importer.rb +13 -13
- data/lib/proscenium/middleware/base.rb +0 -2
- data/lib/proscenium/middleware/engines.rb +5 -9
- data/lib/proscenium/middleware/esbuild.rb +13 -8
- data/lib/proscenium/middleware.rb +2 -4
- data/lib/proscenium/railtie.rb +6 -3
- data/lib/proscenium/react_componentable.rb +1 -1
- data/lib/proscenium/resolver.rb +3 -8
- data/lib/proscenium/side_load.rb +1 -1
- data/lib/proscenium/ui/flash/index.css +1 -0
- data/lib/proscenium/ui/flash/index.js +73 -0
- data/lib/proscenium/ui/flash.rb +15 -0
- data/lib/proscenium/ui/form/field_methods.rb +88 -0
- data/lib/proscenium/ui/form/fields/base.rb +188 -0
- data/lib/proscenium/ui/form/fields/checkbox/index.jsx +48 -0
- data/lib/proscenium/ui/form/fields/checkbox/index.module.css +9 -0
- data/lib/proscenium/ui/form/fields/checkbox/previews/basic.jsx +8 -0
- data/lib/proscenium/ui/form/fields/checkbox.rb +32 -0
- data/lib/proscenium/ui/form/fields/date.module.css +27 -0
- data/lib/proscenium/ui/form/fields/datetime.rb +15 -0
- data/lib/proscenium/ui/form/fields/hidden.rb +9 -0
- data/lib/proscenium/ui/form/fields/input/index.jsx +71 -0
- data/lib/proscenium/ui/form/fields/input/index.module.css +13 -0
- data/lib/proscenium/ui/form/fields/input/previews/basic.jsx +8 -0
- data/lib/proscenium/ui/form/fields/input.rb +14 -0
- data/lib/proscenium/ui/form/fields/radio_group.rb +173 -0
- data/lib/proscenium/ui/form/fields/radio_input/index.jsx +44 -0
- data/lib/proscenium/ui/form/fields/radio_input/index.module.css +13 -0
- data/lib/proscenium/ui/form/fields/radio_input/previews/basic.jsx +8 -0
- data/lib/proscenium/ui/form/fields/radio_input.rb +17 -0
- data/lib/proscenium/ui/form/fields/rich_textarea.css +23 -0
- data/lib/proscenium/ui/form/fields/rich_textarea.js +6 -0
- data/lib/proscenium/ui/form/fields/rich_textarea.rb +18 -0
- data/lib/proscenium/ui/form/fields/select.jsx +47 -0
- data/lib/proscenium/ui/form/fields/select.module.css +46 -0
- data/lib/proscenium/ui/form/fields/select.rb +300 -0
- data/lib/proscenium/ui/form/fields/tel.css +297 -0
- data/lib/proscenium/ui/form/fields/tel.js +83 -0
- data/lib/proscenium/ui/form/fields/tel.rb +54 -0
- data/lib/proscenium/ui/form/fields/textarea/index.jsx +50 -0
- data/lib/proscenium/ui/form/fields/textarea/index.module.css +13 -0
- data/lib/proscenium/ui/form/fields/textarea/previews/basic.jsx +8 -0
- data/lib/proscenium/ui/form/fields/textarea.rb +18 -0
- data/lib/proscenium/ui/form/translation.rb +71 -0
- data/lib/proscenium/ui/form.css +52 -0
- data/lib/proscenium/ui/form.rb +213 -0
- data/lib/proscenium/ui/props.css +7 -0
- data/lib/proscenium/ui/react-manager/index.jsx +1 -1
- data/lib/proscenium/ui/test.js +1 -1
- data/lib/proscenium/ui/ujs/index.js +1 -1
- data/lib/proscenium/ui.rb +3 -0
- data/lib/proscenium/utils.rb +33 -0
- data/lib/proscenium/version.rb +1 -1
- data/lib/proscenium/view_component.rb +0 -2
- data/lib/proscenium.rb +12 -2
- metadata +61 -10
- data/lib/proscenium/middleware/runtime.rb +0 -18
@@ -0,0 +1,213 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'literal'
|
4
|
+
|
5
|
+
module Proscenium::UI
|
6
|
+
# Helpers to aid in building forms and associated inputs with built-in styling, and inspired by
|
7
|
+
# Rails form helpers and SimpleForm.
|
8
|
+
#
|
9
|
+
# Start by creating the form with `Proscenium::UI::Form`, which expects a model
|
10
|
+
# instance, and a block in which you define one or more fields. It automatically includes a hidden
|
11
|
+
# authenticity token field for you.
|
12
|
+
#
|
13
|
+
# Example:
|
14
|
+
#
|
15
|
+
# render Proscenium::UI::Form.new(User.new) do |f|
|
16
|
+
# f.text_field :name
|
17
|
+
# f.radio_group :role, %i[admin manager]
|
18
|
+
# f.submit 'Save'
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
# The following fields (inputs) are available:
|
22
|
+
#
|
23
|
+
# - `url_field` - <input> with 'url' type.
|
24
|
+
# - `text_field` - <input> with 'text' type.
|
25
|
+
# - `textarea_field` - <textarea>.
|
26
|
+
# - `rich_textarea_field` - A rich <textarea> using ActionText and Trix.
|
27
|
+
# - `email_field` - <input> with 'email' type.
|
28
|
+
# - `number_field` - <input> with 'number' type.
|
29
|
+
# - `color_field` - <input> with 'color' type.
|
30
|
+
# - `hidden_field` - <input> with 'hidden' type.
|
31
|
+
# - `search_field` - <input> with 'search' type.
|
32
|
+
# - `password_field` - <input> with 'password' type.
|
33
|
+
# - `tel_field` - <input> with 'tel' type.
|
34
|
+
# - `range_field` - <input> with 'range' type.
|
35
|
+
# - `time_field` - <input> with 'time' type.
|
36
|
+
# - `date_field` - <input> with 'date' type.
|
37
|
+
# - `week_field` - <input> with 'week' type.
|
38
|
+
# - `month_field` - <input> with 'month' type.
|
39
|
+
# - `datetime_local_field` - <input> with 'datetime-local' type.
|
40
|
+
# - `checkbox_field` - <input> with 'checkbox' type.
|
41
|
+
# - `radio_field` - <input> with 'radio' type.
|
42
|
+
# - `radio_group` - group of <input>'s with 'radio' type.
|
43
|
+
# - `select_field` - <select> input.
|
44
|
+
#
|
45
|
+
class Form < Proscenium::UI::Component
|
46
|
+
extend ActiveSupport::Autoload
|
47
|
+
extend Literal::Properties
|
48
|
+
|
49
|
+
autoload :FieldMethods
|
50
|
+
autoload :Translation
|
51
|
+
|
52
|
+
module Fields
|
53
|
+
extend ActiveSupport::Autoload
|
54
|
+
|
55
|
+
autoload :Base
|
56
|
+
autoload :Input
|
57
|
+
autoload :Hidden
|
58
|
+
autoload :RadioInput
|
59
|
+
autoload :Checkbox
|
60
|
+
autoload :Textarea
|
61
|
+
autoload :RichTextarea
|
62
|
+
autoload :RadioGroup
|
63
|
+
autoload :Select
|
64
|
+
autoload :Tel
|
65
|
+
end
|
66
|
+
|
67
|
+
include FieldMethods
|
68
|
+
include Translation
|
69
|
+
|
70
|
+
STANDARD_METHOD_VERBS = %w[get post].freeze
|
71
|
+
|
72
|
+
def self.input_field(method_name, type:)
|
73
|
+
define_method method_name do |*args, **attributes|
|
74
|
+
merge_bang_attributes! args, attributes
|
75
|
+
render Fields::Input.new(args, @model, self, type:, **attributes)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
prop :model, _Interface(:to_model), :positional, reader: :public
|
80
|
+
|
81
|
+
prop :method, _Union?(:get, :post, :put, :patch, :delete,
|
82
|
+
'get', 'post', 'put', 'patch', 'delete') do |value|
|
83
|
+
value ||= 'patch' if @model.respond_to?(:persisted?) && @model.persisted?
|
84
|
+
value&.to_s&.downcase || 'post'
|
85
|
+
end
|
86
|
+
|
87
|
+
# The form action, which can be any value that can be passed to Rails `url_for` helper.
|
88
|
+
prop :action, _Union?(String, Symbol, Array, Hash)
|
89
|
+
|
90
|
+
prop :attributes, Hash, :**
|
91
|
+
|
92
|
+
# Use the given `field_class` to render a custom field. This allows you to create a custom
|
93
|
+
# form field on an as-needed basis. The `field_class` must be a subclass of
|
94
|
+
# `Proscenium::UI::Form::Fields::Base`.
|
95
|
+
#
|
96
|
+
# Example:
|
97
|
+
#
|
98
|
+
# render Proscenium::UI::Form.new @resource do |f|
|
99
|
+
# f.use_field Administrator::EmailField, :email, :required!
|
100
|
+
# end
|
101
|
+
#
|
102
|
+
# @param field_class [Class<Proscenium::UI::Form::Fields::Base>]
|
103
|
+
# @param args [Array<Symbol>] name or nested names of model attribute
|
104
|
+
# @param attributes [Hash] passed through to each input
|
105
|
+
def use_field(field_class, *args, **attributes)
|
106
|
+
merge_bang_attributes! args, attributes
|
107
|
+
render field_class.new(args, model, self, **attributes)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Returns a button with type of 'submit', using the `value` given.
|
111
|
+
#
|
112
|
+
# @param value [String] Value of the `value` attribute.
|
113
|
+
def submit(value = 'Save', **)
|
114
|
+
input(name: 'commit', type: :submit, value:, **)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Returns a <div> with the given `message` as its content. If `message` is not given, and
|
118
|
+
# `attribute` is, then first error message for the given model `attribute`.
|
119
|
+
#
|
120
|
+
# @param message [String] error message to display.
|
121
|
+
# @param attribute [Symbol] name of the model attribute.
|
122
|
+
def error(message: nil, attribute: nil, &content)
|
123
|
+
if message.nil? && attribute.nil? && !content
|
124
|
+
raise ArgumentError, 'One of `message:`, `attribute:` or a block is required'
|
125
|
+
end
|
126
|
+
|
127
|
+
if content
|
128
|
+
div class: :@error, &content
|
129
|
+
else
|
130
|
+
div class: :@error do
|
131
|
+
message || @model.errors[attribute]&.first
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def view_template(&block)
|
137
|
+
form action:, method:, **@attributes do
|
138
|
+
method_field
|
139
|
+
authenticity_token_field
|
140
|
+
error_for_base
|
141
|
+
yield_content(&block)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
def error_for_base
|
146
|
+
return unless @model.errors.key?(:base)
|
147
|
+
|
148
|
+
callout :danger do |x|
|
149
|
+
x.title { 'Unable to save...' }
|
150
|
+
div { @model.errors.full_messages_for(:base).first }
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def field_name(*names, multiple: false)
|
155
|
+
# Delete the `?` suffix if present.
|
156
|
+
lname = names.pop.to_s
|
157
|
+
names.append lname.delete_suffix('?').to_sym
|
158
|
+
|
159
|
+
@_view_context.field_name(ActiveModel::Naming.param_key(@model.class), *names,
|
160
|
+
multiple:)
|
161
|
+
end
|
162
|
+
|
163
|
+
def field_id(*)
|
164
|
+
@_view_context.field_id(ActiveModel::Naming.param_key(@model.class), *)
|
165
|
+
end
|
166
|
+
|
167
|
+
def authenticity_token_field
|
168
|
+
return if method == 'get'
|
169
|
+
|
170
|
+
input(
|
171
|
+
name: 'authenticity_token',
|
172
|
+
type: 'hidden',
|
173
|
+
value: @_view_context.form_authenticity_token(form_options: { action:,
|
174
|
+
method: @method })
|
175
|
+
)
|
176
|
+
end
|
177
|
+
|
178
|
+
def action
|
179
|
+
@_view_context.url_for(@action || @model)
|
180
|
+
end
|
181
|
+
|
182
|
+
def method_field
|
183
|
+
return if STANDARD_METHOD_VERBS.include?(@method)
|
184
|
+
|
185
|
+
input type: 'hidden', name: '_method', value: @method, autocomplete: 'off'
|
186
|
+
end
|
187
|
+
|
188
|
+
def method
|
189
|
+
STANDARD_METHOD_VERBS.include?(@method) ? @method : 'post'
|
190
|
+
end
|
191
|
+
|
192
|
+
input_field :file_field, type: 'file'
|
193
|
+
input_field :url_field, type: 'url'
|
194
|
+
input_field :text_field, type: 'text'
|
195
|
+
input_field :time_field, type: 'time'
|
196
|
+
input_field :date_field, type: 'date'
|
197
|
+
input_field :number_field, type: 'number'
|
198
|
+
input_field :week_field, type: 'week'
|
199
|
+
input_field :month_field, type: 'month'
|
200
|
+
input_field :email_field, type: 'email'
|
201
|
+
input_field :color_field, type: 'color'
|
202
|
+
input_field :search_field, type: 'search'
|
203
|
+
input_field :password_field, type: 'password'
|
204
|
+
input_field :range_field, type: 'range'
|
205
|
+
|
206
|
+
private
|
207
|
+
|
208
|
+
def merge_bang_attributes!(attrs, kw_attributes, additional_bang_attrs: [])
|
209
|
+
Proscenium::Utils.merge_bang_attributes! attrs, kw_attributes,
|
210
|
+
%i[required disabled].concat(additional_bang_attrs)
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
@@ -85,7 +85,7 @@ function init(elements) {
|
|
85
85
|
throw `[proscenium/react/manager] Cannot load component ${path} (not found in Proscenium.lazyScripts)`;
|
86
86
|
}
|
87
87
|
|
88
|
-
const react = import("
|
88
|
+
const react = import("proscenium/react-manager/react");
|
89
89
|
const Component = import(window.Proscenium.lazyScripts[path].outpath);
|
90
90
|
|
91
91
|
const forwardChildren =
|
data/lib/proscenium/ui/test.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
console.log("
|
1
|
+
console.log("proscenium/test.js");
|
@@ -2,7 +2,7 @@ export default async () => {
|
|
2
2
|
window.Proscenium = window.Proscenium || {};
|
3
3
|
|
4
4
|
if (!window.Proscenium.UJS) {
|
5
|
-
const classPath = "/proscenium/
|
5
|
+
const classPath = "/proscenium/ujs/class.js";
|
6
6
|
const module = await import(classPath);
|
7
7
|
window.Proscenium.UJS = new module.default();
|
8
8
|
}
|
data/lib/proscenium/ui.rb
CHANGED
data/lib/proscenium/utils.rb
CHANGED
@@ -9,5 +9,38 @@ module Proscenium
|
|
9
9
|
def digest(value)
|
10
10
|
Digest::SHA1.hexdigest(value.to_s)[..7]
|
11
11
|
end
|
12
|
+
|
13
|
+
# Merges the given array of attribute `name`'s into the `kw_arguments`. A bang attribute is one
|
14
|
+
# that ends with an exclamation mark or - in Ruby parlance - a "bang", and has a boolean value.
|
15
|
+
# Modifies the given `kw_attributes`, and only attribute names in `allowed` will be merged.
|
16
|
+
#
|
17
|
+
# @param names [Array(Symbol)] of argument names
|
18
|
+
# @param kw_attributes [Hash] attributes to be merged with
|
19
|
+
# @param allowed [Array(Symbol)] attribute names allowed to be merged as bang attributes
|
20
|
+
#
|
21
|
+
# Example:
|
22
|
+
#
|
23
|
+
# def tab(name, *args, href:, **attributes)
|
24
|
+
# Hue::Utils.merge_bang_attributes!(args, attributes, [:current])
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# Allowing you to use either of the following API's:
|
28
|
+
#
|
29
|
+
# tab 'Tab 1', required: true
|
30
|
+
# tab 'Tab 1', :required!
|
31
|
+
#
|
32
|
+
def merge_bang_attributes!(names, kw_attributes, allowed)
|
33
|
+
allowed.each do |name|
|
34
|
+
sym_name = name.to_sym
|
35
|
+
bang_name = :"#{sym_name}!"
|
36
|
+
|
37
|
+
next unless names.include?(bang_name)
|
38
|
+
|
39
|
+
names.delete(bang_name)
|
40
|
+
|
41
|
+
# Keyword arguments should override the bang.
|
42
|
+
kw_attributes[sym_name] = true unless kw_attributes.key?(sym_name)
|
43
|
+
end
|
44
|
+
end
|
12
45
|
end
|
13
46
|
end
|
data/lib/proscenium/version.rb
CHANGED
data/lib/proscenium.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
# require 'zeitwerk'
|
4
|
+
|
5
|
+
# loader = Zeitwerk::Loader.for_gem
|
6
|
+
# loader.inflector.inflect 'ui' => 'UI'
|
7
|
+
# loader.ignore "#{__dir__}/proscenium/ext"
|
8
|
+
# loader.ignore "#{__dir__}/proscenium/libs"
|
9
|
+
# loader.setup
|
4
10
|
|
5
11
|
module Proscenium
|
6
12
|
extend ActiveSupport::Autoload
|
@@ -65,7 +71,11 @@ module Proscenium
|
|
65
71
|
end
|
66
72
|
|
67
73
|
def ui_path
|
68
|
-
Railtie.root.join('lib', 'proscenium', 'ui')
|
74
|
+
@ui_path ||= Railtie.root.join('lib', 'proscenium', 'ui')
|
75
|
+
end
|
76
|
+
|
77
|
+
def ui_path_regex
|
78
|
+
@ui_path_regex ||= Regexp.new("^#{Proscenium.ui_path}/")
|
69
79
|
end
|
70
80
|
|
71
81
|
def root
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proscenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.0.
|
4
|
+
version: 0.19.0.beta5
|
5
5
|
platform: x86_64-darwin
|
6
6
|
authors:
|
7
7
|
- Joel Moss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 7.1.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '9.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,21 @@ dependencies:
|
|
29
29
|
version: 7.1.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '9.0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: countries
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 7.1.0
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 7.1.0
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: ffi
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,19 +73,19 @@ dependencies:
|
|
59
73
|
- !ruby/object:Gem::Version
|
60
74
|
version: '1.0'
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
76
|
+
name: phonelib
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
64
78
|
requirements:
|
65
79
|
- - "~>"
|
66
80
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
81
|
+
version: 0.10.3
|
68
82
|
type: :runtime
|
69
83
|
prerelease: false
|
70
84
|
version_requirements: !ruby/object:Gem::Requirement
|
71
85
|
requirements:
|
72
86
|
- - "~>"
|
73
87
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
88
|
+
version: 0.10.3
|
75
89
|
- !ruby/object:Gem::Dependency
|
76
90
|
name: railties
|
77
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +95,7 @@ dependencies:
|
|
81
95
|
version: 7.1.0
|
82
96
|
- - "<"
|
83
97
|
- !ruby/object:Gem::Version
|
84
|
-
version: '
|
98
|
+
version: '9.0'
|
85
99
|
type: :runtime
|
86
100
|
prerelease: false
|
87
101
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -91,7 +105,7 @@ dependencies:
|
|
91
105
|
version: 7.1.0
|
92
106
|
- - "<"
|
93
107
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
108
|
+
version: '9.0'
|
95
109
|
- !ruby/object:Gem::Dependency
|
96
110
|
name: ruby-next
|
97
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,7 +147,6 @@ files:
|
|
133
147
|
- lib/proscenium/middleware/base.rb
|
134
148
|
- lib/proscenium/middleware/engines.rb
|
135
149
|
- lib/proscenium/middleware/esbuild.rb
|
136
|
-
- lib/proscenium/middleware/runtime.rb
|
137
150
|
- lib/proscenium/monkey.rb
|
138
151
|
- lib/proscenium/phlex.rb
|
139
152
|
- lib/proscenium/phlex/asset_inclusions.rb
|
@@ -154,6 +167,44 @@ files:
|
|
154
167
|
- lib/proscenium/ui/breadcrumbs/mixins.css
|
155
168
|
- lib/proscenium/ui/component.rb
|
156
169
|
- lib/proscenium/ui/custom_element.js
|
170
|
+
- lib/proscenium/ui/flash.rb
|
171
|
+
- lib/proscenium/ui/flash/index.css
|
172
|
+
- lib/proscenium/ui/flash/index.js
|
173
|
+
- lib/proscenium/ui/form.css
|
174
|
+
- lib/proscenium/ui/form.rb
|
175
|
+
- lib/proscenium/ui/form/field_methods.rb
|
176
|
+
- lib/proscenium/ui/form/fields/base.rb
|
177
|
+
- lib/proscenium/ui/form/fields/checkbox.rb
|
178
|
+
- lib/proscenium/ui/form/fields/checkbox/index.jsx
|
179
|
+
- lib/proscenium/ui/form/fields/checkbox/index.module.css
|
180
|
+
- lib/proscenium/ui/form/fields/checkbox/previews/basic.jsx
|
181
|
+
- lib/proscenium/ui/form/fields/date.module.css
|
182
|
+
- lib/proscenium/ui/form/fields/datetime.rb
|
183
|
+
- lib/proscenium/ui/form/fields/hidden.rb
|
184
|
+
- lib/proscenium/ui/form/fields/input.rb
|
185
|
+
- lib/proscenium/ui/form/fields/input/index.jsx
|
186
|
+
- lib/proscenium/ui/form/fields/input/index.module.css
|
187
|
+
- lib/proscenium/ui/form/fields/input/previews/basic.jsx
|
188
|
+
- lib/proscenium/ui/form/fields/radio_group.rb
|
189
|
+
- lib/proscenium/ui/form/fields/radio_input.rb
|
190
|
+
- lib/proscenium/ui/form/fields/radio_input/index.jsx
|
191
|
+
- lib/proscenium/ui/form/fields/radio_input/index.module.css
|
192
|
+
- lib/proscenium/ui/form/fields/radio_input/previews/basic.jsx
|
193
|
+
- lib/proscenium/ui/form/fields/rich_textarea.css
|
194
|
+
- lib/proscenium/ui/form/fields/rich_textarea.js
|
195
|
+
- lib/proscenium/ui/form/fields/rich_textarea.rb
|
196
|
+
- lib/proscenium/ui/form/fields/select.jsx
|
197
|
+
- lib/proscenium/ui/form/fields/select.module.css
|
198
|
+
- lib/proscenium/ui/form/fields/select.rb
|
199
|
+
- lib/proscenium/ui/form/fields/tel.css
|
200
|
+
- lib/proscenium/ui/form/fields/tel.js
|
201
|
+
- lib/proscenium/ui/form/fields/tel.rb
|
202
|
+
- lib/proscenium/ui/form/fields/textarea.rb
|
203
|
+
- lib/proscenium/ui/form/fields/textarea/index.jsx
|
204
|
+
- lib/proscenium/ui/form/fields/textarea/index.module.css
|
205
|
+
- lib/proscenium/ui/form/fields/textarea/previews/basic.jsx
|
206
|
+
- lib/proscenium/ui/form/translation.rb
|
207
|
+
- lib/proscenium/ui/props.css
|
157
208
|
- lib/proscenium/ui/react-manager/index.jsx
|
158
209
|
- lib/proscenium/ui/react-manager/react.js
|
159
210
|
- lib/proscenium/ui/stimulus-loading.js
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Proscenium
|
4
|
-
class Middleware
|
5
|
-
class Runtime < Esbuild
|
6
|
-
private
|
7
|
-
|
8
|
-
def real_path
|
9
|
-
@real_path ||= Pathname.new(@request.path.sub(%r{^/@proscenium},
|
10
|
-
'/lib/proscenium/libs')).to_s
|
11
|
-
end
|
12
|
-
|
13
|
-
def root_for_readable
|
14
|
-
Proscenium::Railtie.root
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|