katalyst-content 2.2.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/builds/katalyst/content.esm.js +72 -1
- data/app/assets/builds/katalyst/content.js +72 -1
- data/app/assets/builds/katalyst/content.min.js +1 -1
- data/app/assets/builds/katalyst/content.min.js.map +1 -1
- data/app/assets/stylesheets/katalyst/content/editor/_index.scss +3 -27
- data/app/assets/stylesheets/katalyst/content/editor/_item-actions.scss +4 -0
- data/app/assets/stylesheets/katalyst/content/editor/_new-items.scss +4 -0
- data/app/assets/stylesheets/katalyst/content/editor/_table.scss +42 -0
- data/app/assets/stylesheets/katalyst/content/editor/_variables.scss +26 -0
- data/app/components/katalyst/content/editor/item_editor_component.rb +4 -0
- data/app/controllers/katalyst/content/items_controller.rb +5 -0
- data/app/controllers/katalyst/content/tables_controller.rb +24 -0
- data/app/helpers/katalyst/content/editor_helper.rb +2 -0
- data/app/helpers/katalyst/content/frontend_helper.rb +2 -0
- data/app/helpers/katalyst/content/table_helper.rb +143 -0
- data/app/javascript/content/application.js +5 -0
- data/app/javascript/content/editor/list_controller.js +2 -1
- data/app/javascript/content/editor/table_controller.js +67 -0
- data/app/models/katalyst/content/content.rb +2 -0
- data/app/models/katalyst/content/table.rb +55 -0
- data/app/models/katalyst/content/tables/importer.rb +151 -0
- data/app/views/katalyst/content/items/edit.html.erb +5 -0
- data/app/views/katalyst/content/tables/_table.html+form.erb +48 -0
- data/app/views/katalyst/content/tables/_table.html.erb +3 -0
- data/app/views/katalyst/content/tables/update.turbo_stream.erb +3 -0
- data/config/locales/en.yml +2 -0
- data/config/routes.rb +1 -0
- data/lib/katalyst/content/config.rb +9 -0
- data/spec/factories/katalyst/content/items.rb +22 -0
- metadata +12 -2
@@ -13,6 +13,7 @@ module Katalyst
|
|
13
13
|
%w[
|
14
14
|
Katalyst::Content::Content
|
15
15
|
Katalyst::Content::Figure
|
16
|
+
Katalyst::Content::Table
|
16
17
|
Katalyst::Content::Section
|
17
18
|
Katalyst::Content::Group
|
18
19
|
Katalyst::Content::Column
|
@@ -26,6 +27,14 @@ module Katalyst
|
|
26
27
|
config_accessor(:errors_component) { "Katalyst::Content::Editor::ErrorsComponent" }
|
27
28
|
|
28
29
|
config_accessor(:base_controller) { "ApplicationController" }
|
30
|
+
|
31
|
+
# Sanitizer
|
32
|
+
config_accessor(:table_sanitizer_allowed_tags) do
|
33
|
+
%w[table thead tbody tr th td caption a strong em span br p text].freeze
|
34
|
+
end
|
35
|
+
config_accessor(:table_sanitizer_allowed_attributes) do
|
36
|
+
%w[colspan rowspan href].freeze
|
37
|
+
end
|
29
38
|
end
|
30
39
|
end
|
31
40
|
end
|
@@ -39,4 +39,26 @@ FactoryBot.define do
|
|
39
39
|
factory :katalyst_content_column, class: "Katalyst::Content::Column" do
|
40
40
|
content_item_defaults
|
41
41
|
end
|
42
|
+
|
43
|
+
factory :katalyst_content_table, class: "Katalyst::Content::Table" do
|
44
|
+
content_item_defaults
|
45
|
+
heading { "Contacts" }
|
46
|
+
heading_style { "none" }
|
47
|
+
content { <<~HTML }
|
48
|
+
<table>
|
49
|
+
<thead>
|
50
|
+
<tr>
|
51
|
+
<th>Name</th>
|
52
|
+
<th>Email</th>
|
53
|
+
</tr>
|
54
|
+
</thead>
|
55
|
+
<tbody>
|
56
|
+
<tr>
|
57
|
+
<td>John Doe</td>
|
58
|
+
<td>john.doe@example.com</td>
|
59
|
+
</tr>
|
60
|
+
</tbody>
|
61
|
+
</table>
|
62
|
+
HTML
|
63
|
+
end
|
42
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katalyst-content
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katalyst Interactive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_storage_validations
|
@@ -88,7 +88,9 @@ files:
|
|
88
88
|
- app/assets/stylesheets/katalyst/content/editor/_item-rules.scss
|
89
89
|
- app/assets/stylesheets/katalyst/content/editor/_new-items.scss
|
90
90
|
- app/assets/stylesheets/katalyst/content/editor/_status-bar.scss
|
91
|
+
- app/assets/stylesheets/katalyst/content/editor/_table.scss
|
91
92
|
- app/assets/stylesheets/katalyst/content/editor/_trix-rails.scss
|
93
|
+
- app/assets/stylesheets/katalyst/content/editor/_variables.scss
|
92
94
|
- app/components/katalyst/content/editor/base_component.rb
|
93
95
|
- app/components/katalyst/content/editor/errors_component.html.erb
|
94
96
|
- app/components/katalyst/content/editor/errors_component.rb
|
@@ -109,8 +111,10 @@ files:
|
|
109
111
|
- app/controllers/katalyst/content/application_controller.rb
|
110
112
|
- app/controllers/katalyst/content/direct_uploads_controller.rb
|
111
113
|
- app/controllers/katalyst/content/items_controller.rb
|
114
|
+
- app/controllers/katalyst/content/tables_controller.rb
|
112
115
|
- app/helpers/katalyst/content/editor_helper.rb
|
113
116
|
- app/helpers/katalyst/content/frontend_helper.rb
|
117
|
+
- app/helpers/katalyst/content/table_helper.rb
|
114
118
|
- app/javascript/content/application.js
|
115
119
|
- app/javascript/content/editor/container.js
|
116
120
|
- app/javascript/content/editor/container_controller.js
|
@@ -120,6 +124,7 @@ files:
|
|
120
124
|
- app/javascript/content/editor/new_item_controller.js
|
121
125
|
- app/javascript/content/editor/rules_engine.js
|
122
126
|
- app/javascript/content/editor/status_bar_controller.js
|
127
|
+
- app/javascript/content/editor/table_controller.js
|
123
128
|
- app/javascript/content/editor/trix_controller.js
|
124
129
|
- app/models/concerns/katalyst/content/container.rb
|
125
130
|
- app/models/concerns/katalyst/content/garbage_collection.rb
|
@@ -134,6 +139,8 @@ files:
|
|
134
139
|
- app/models/katalyst/content/layout.rb
|
135
140
|
- app/models/katalyst/content/node.rb
|
136
141
|
- app/models/katalyst/content/section.rb
|
142
|
+
- app/models/katalyst/content/table.rb
|
143
|
+
- app/models/katalyst/content/tables/importer.rb
|
137
144
|
- app/models/katalyst/content/types/nodes_type.rb
|
138
145
|
- app/views/active_storage/blobs/_blob.html.erb
|
139
146
|
- app/views/katalyst/content/asides/_aside.html+form.erb
|
@@ -155,6 +162,9 @@ files:
|
|
155
162
|
- app/views/katalyst/content/items/update.turbo_stream.erb
|
156
163
|
- app/views/katalyst/content/sections/_section.html+form.erb
|
157
164
|
- app/views/katalyst/content/sections/_section.html.erb
|
165
|
+
- app/views/katalyst/content/tables/_table.html+form.erb
|
166
|
+
- app/views/katalyst/content/tables/_table.html.erb
|
167
|
+
- app/views/katalyst/content/tables/update.turbo_stream.erb
|
158
168
|
- app/views/layouts/action_text/contents/_content.html.erb
|
159
169
|
- config/importmap.rb
|
160
170
|
- config/locales/en.yml
|