katalyst-koi 4.3.3 → 4.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb4a5faf54e624597ed2117002d316131fe49be35399ecfe71202bb17b98dcc7
4
- data.tar.gz: d64c7ad778547ba7cd071138fddda0b88042ec65ed644790aab0454801fdf5f1
3
+ metadata.gz: 76c0ea23005f7bbb28ed94324c2489b6d9c25791b05ca60cb33d2926b10d7f5c
4
+ data.tar.gz: 5289e50975bf3af5e0fff2e33f486d6df7275669a5080db873b29d28121b619b
5
5
  SHA512:
6
- metadata.gz: 814f5cf79db5b3cb1d2929e7b195d4930df179fc353faea0485a1cc8314a30f6b24207150dd399779506ac207ebaa5e95b8ee11b80911e4d06cbf9d1e26f2d9f
7
- data.tar.gz: 11fef10ab56022030829dfa05fb9257797bd7ff32bca80dac0cf3771d30cb0cfa572d789a2cebb722e0f6ec0fd0af2871d3313266b6f4f360a2536a2a6f4d40d
6
+ metadata.gz: d4f625e41a130539246416ab05e8763c9956d6f0f85ec9c9e1f39c5ca1995fda91b6dbc1811daaf04354392b28a94b5e54c6d2ce576c5935cbeac35d60960816
7
+ data.tar.gz: 2978e76e954493a589c3337cf9f5fbe1bd127e3ea0f4e2a2837228145ea45b6b3163dcab33692fd468e7794a1c0deb7f16633860b4f10e9f6706636c5e9f63f9
@@ -0,0 +1,3 @@
1
+ <%= turbo_frame_tag dom_id(menu, :errors) do %>
2
+ <%= form_builder.govuk_error_summary(**html_attributes) %>
3
+ <% end %>
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Koi
4
+ module Navigation
5
+ module Editor
6
+ class ErrorsComponent < ViewComponent::Base
7
+ include Katalyst::HtmlAttributes
8
+ include Katalyst::Tables::TurboReplaceable
9
+ include Turbo::FramesHelper
10
+
11
+ attr_reader :menu
12
+
13
+ def initialize(menu:)
14
+ super()
15
+
16
+ @menu = menu
17
+ end
18
+
19
+ def id
20
+ dom_id(menu, :errors)
21
+ end
22
+
23
+ def form_builder
24
+ Koi::FormBuilder.new(menu.model_name.param_key, menu, self, {})
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Katalyst::Navigation.config.base_controller = "Admin::ApplicationController"
4
+ Katalyst::Navigation.config.errors_component = "Koi::Navigation::Editor::ErrorsComponent"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-koi
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.3
4
+ version: 4.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-15 00:00:00.000000000 Z
11
+ date: 2023-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -299,6 +299,8 @@ files:
299
299
  - app/components/koi/header_component.html.erb
300
300
  - app/components/koi/header_component.rb
301
301
  - app/components/koi/index_table_component.rb
302
+ - app/components/koi/navigation/editor/errors_component.html.erb
303
+ - app/components/koi/navigation/editor/errors_component.rb
302
304
  - app/components/koi/ordinal_table_component.rb
303
305
  - app/controllers/admin/admin_users_controller.rb
304
306
  - app/controllers/admin/application_controller.rb
@@ -310,7 +312,6 @@ files:
310
312
  - app/controllers/concerns/koi/controller/has_admin_users.rb
311
313
  - app/controllers/concerns/koi/controller/has_webauthn.rb
312
314
  - app/controllers/concerns/koi/controller/is_admin_controller.rb
313
- - app/helpers/katalyst/navigation/editor/errors.rb
314
315
  - app/helpers/koi/application_helper.rb
315
316
  - app/helpers/koi/date_helper.rb
316
317
  - app/helpers/koi/definition_list_helper.rb
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Katalyst
4
- module Navigation
5
- module Editor
6
- class Errors < Base
7
- def build(**options)
8
- turbo_frame_tag dom_id(menu, :errors) do
9
- form_builder.govuk_error_summary(**options)
10
- end
11
- end
12
-
13
- private
14
-
15
- def form_builder
16
- Koi::FormBuilder.new(menu.model_name.param_key, menu, self, {})
17
- end
18
- end
19
- end
20
- end
21
- end