iron_admin 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/config/iron_admin_manifest.js +12 -0
- data/app/components/iron_admin/dashboards/metric_card_component.html.haml +8 -3
- data/app/components/iron_admin/dashboards/metric_card_component.rb +21 -1
- data/app/components/iron_admin/form/belongs_to_component.rb +60 -6
- data/app/components/iron_admin/form/nested_form_component.html.haml +28 -0
- data/app/components/iron_admin/form/nested_form_component.rb +81 -0
- data/app/components/iron_admin/resources/data_table_component.html.haml +1 -1
- data/app/components/iron_admin/resources/data_table_component.rb +6 -0
- data/app/components/iron_admin/resources/show_field_component.rb +2 -0
- data/app/controllers/iron_admin/application_controller.rb +32 -1
- data/app/controllers/iron_admin/concerns/action_executable.rb +44 -0
- data/app/controllers/iron_admin/concerns/filterable.rb +84 -0
- data/app/controllers/iron_admin/concerns/json_params_coercion.rb +67 -0
- data/app/controllers/iron_admin/concerns/nested_permittable.rb +36 -0
- data/app/controllers/iron_admin/concerns/scopeable.rb +84 -0
- data/app/controllers/iron_admin/concerns/searchable.rb +13 -16
- data/app/controllers/iron_admin/exports_controller.rb +15 -11
- data/app/controllers/iron_admin/imports_controller.rb +83 -0
- data/app/controllers/iron_admin/live_controller.rb +12 -0
- data/app/controllers/iron_admin/resources_controller.rb +118 -117
- data/app/controllers/iron_admin/search_controller.rb +5 -5
- data/app/controllers/iron_admin/tools_controller.rb +63 -4
- data/app/helpers/iron_admin/application_helper.rb +33 -14
- data/app/helpers/iron_admin/field_display_helper.rb +160 -1
- data/app/javascript/iron_admin/controllers/cp_nested_form_controller.js +113 -0
- data/app/javascript/iron_admin/controllers/filter_operator_controller.js +10 -0
- data/app/javascript/iron_admin/index.js +4 -0
- data/app/views/iron_admin/dashboard/index.html.haml +7 -2
- data/app/views/iron_admin/form/_nested_row.html.haml +70 -0
- data/app/views/iron_admin/imports/new.html.haml +27 -0
- data/app/views/iron_admin/imports/preview.html.haml +31 -0
- data/app/views/iron_admin/resources/_form.html.haml +81 -5
- data/app/views/iron_admin/resources/action_form.html.haml +62 -0
- data/app/views/iron_admin/resources/bulk_action_form.html.haml +62 -0
- data/app/views/iron_admin/resources/index.html.haml +60 -18
- data/app/views/iron_admin/tools/action_form.html.haml +57 -0
- data/app/views/iron_admin/tools/show.html.haml +20 -1
- data/config/importmap.rb +2 -0
- data/config/locales/en.yml +36 -0
- data/config/routes.rb +7 -0
- data/docs/components/filter-components.md +60 -0
- data/docs/getting-started/quick-start.md +17 -1
- data/docs/guides/authentication.md +7 -6
- data/docs/guides/custom-adapters.md +628 -0
- data/docs/guides/extending.md +132 -3
- data/docs/guides/fields.md +1 -1
- data/docs/guides/resources.md +78 -2
- data/docs/guides/troubleshooting.md +29 -0
- data/docs/reference/routes.md +10 -0
- data/lib/generators/iron_admin/install/install_generator.rb +28 -4
- data/lib/generators/iron_admin/install_audit/install_audit_generator.rb +26 -10
- data/lib/iron_admin/action_field.rb +56 -0
- data/lib/iron_admin/adapters/active_record.rb +237 -0
- data/lib/iron_admin/adapters/base.rb +340 -0
- data/lib/iron_admin/adapters/http/column_descriptor.rb +10 -0
- data/lib/iron_admin/adapters/http/configuration.rb +27 -0
- data/lib/iron_admin/adapters/http/connection.rb +117 -0
- data/lib/iron_admin/adapters/http/model_proxy.rb +75 -0
- data/lib/iron_admin/adapters/http/query.rb +111 -0
- data/lib/iron_admin/adapters/http/record.rb +83 -0
- data/lib/iron_admin/adapters/http/type_inferrer.rb +51 -0
- data/lib/iron_admin/adapters/http.rb +241 -0
- data/lib/iron_admin/adapters/mongoid/association_wrapper.rb +74 -0
- data/lib/iron_admin/adapters/mongoid/column_descriptor.rb +10 -0
- data/lib/iron_admin/adapters/mongoid.rb +284 -0
- data/lib/iron_admin/adapters/registry.rb +44 -0
- data/lib/iron_admin/concerns/importable.rb +81 -0
- data/lib/iron_admin/concerns/live_updatable.rb +38 -0
- data/lib/iron_admin/concerns/nestable.rb +69 -0
- data/lib/iron_admin/concerns/soft_deletable.rb +61 -0
- data/lib/iron_admin/configuration.rb +20 -0
- data/lib/iron_admin/dashboard.rb +15 -20
- data/lib/iron_admin/engine.rb +28 -1
- data/lib/iron_admin/errors.rb +29 -0
- data/lib/iron_admin/field_inferrer.rb +61 -22
- data/lib/iron_admin/filters/active_record_query_builder.rb +63 -0
- data/lib/iron_admin/filters/base_query_builder.rb +55 -0
- data/lib/iron_admin/filters/http_query_builder.rb +39 -0
- data/lib/iron_admin/filters/mongoid_query_builder.rb +58 -0
- data/lib/iron_admin/filters/query_builder.rb +12 -0
- data/lib/iron_admin/import/column_mapper.rb +42 -0
- data/lib/iron_admin/import/import_preview.rb +10 -0
- data/lib/iron_admin/import/import_result.rb +10 -0
- data/lib/iron_admin/import/importer.rb +231 -0
- data/lib/iron_admin/import/parser/csv.rb +34 -0
- data/lib/iron_admin/import/parser/json.rb +36 -0
- data/lib/iron_admin/import/type_caster.rb +47 -0
- data/lib/iron_admin/live/broadcaster.rb +43 -0
- data/lib/iron_admin/live/poll_cache.rb +28 -0
- data/lib/iron_admin/live.rb +29 -0
- data/lib/iron_admin/nested_association.rb +15 -0
- data/lib/iron_admin/nested_attributes_validator.rb +25 -0
- data/lib/iron_admin/policy.rb +72 -13
- data/lib/iron_admin/resource.rb +148 -90
- data/lib/iron_admin/resource_registry.rb +77 -4
- data/lib/iron_admin/tool.rb +50 -0
- data/lib/iron_admin/tool_action.rb +73 -0
- data/lib/iron_admin/tool_context.rb +49 -0
- data/lib/iron_admin/version.rb +1 -1
- data/lib/iron_admin.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/cache/addressable-2.9.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/crack-1.0.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/faraday-2.14.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/faraday-net_http-3.4.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/hashdiff-1.2.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/net-http-0.9.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/public_suffix-7.0.5.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/rexml-3.4.4.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/webmock-3.26.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/bigdecimal.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/mkmf.log +25 -25
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/date_core.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/mkmf.log +4 -4
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/erb/escape.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/mkmf.log +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +22 -22
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/mkmf.log +9 -9
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/mkmf.log +12 -12
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/nio4r_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/mkmf.log +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/mkmf.log +7 -7
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/redcarpet-3.6.1/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/redcarpet-3.6.1/redcarpet.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/mkmf.log +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/websocket-driver-0.8.0/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/websocket-driver-0.8.0/websocket_mask.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/CHANGELOG.md +326 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/LICENSE.txt +202 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/README.md +121 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna/native.rb +66 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna/pure.rb +4710 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna.rb +26 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/template.rb +1040 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/uri.rb +2602 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/version.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable.rb +4 -0
- data/vendor/bundle/ruby/3.2.0/gems/bigdecimal-4.0.1/ext/bigdecimal/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/bigdecimal-4.0.1/lib/bigdecimal.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/History +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/LICENSE +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/README.md +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/json.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/util.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/version.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/xml.rb +240 -0
- data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack.rb +8 -0
- data/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/lib/date_core.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/erb-6.0.1/ext/erb/escape/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/erb-6.0.1/lib/erb/escape.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/CHANGELOG.md +574 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/README.md +67 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/Rakefile +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/examples/client_spec.rb +119 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/examples/client_test.rb +144 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter/test.rb +311 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter.rb +101 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter_registry.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/connection.rb +565 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/encoders/flat_params_encoder.rb +105 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/encoders/nested_params_encoder.rb +183 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/error.rb +202 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/logging/formatter.rb +118 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/methods.rb +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/middleware.rb +72 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/middleware_registry.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/connection_options.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/env.rb +204 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/proxy_options.rb +38 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/request_options.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/ssl_options.rb +76 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options.rb +219 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/parameters.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/rack_builder.rb +248 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/authorization.rb +54 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/instrumentation.rb +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/json.rb +70 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/url_encoded.rb +60 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request.rb +139 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/json.rb +74 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/logger.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/raise_error.rb +83 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response.rb +95 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils/headers.rb +150 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils/params_hash.rb +61 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils.rb +121 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday.rb +158 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/external_adapters/faraday_specs_setup.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter/test_spec.rb +442 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter_registry_spec.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter_spec.rb +55 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/connection_spec.rb +841 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/error_spec.rb +175 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/middleware_registry_spec.rb +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/middleware_spec.rb +213 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/env_spec.rb +76 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/options_spec.rb +297 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/proxy_options_spec.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/request_options_spec.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/params_encoders/flat_spec.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/params_encoders/nested_spec.rb +151 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/rack_builder_spec.rb +317 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/authorization_spec.rb +118 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/instrumentation_spec.rb +74 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/json_spec.rb +199 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/url_encoded_spec.rb +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request_spec.rb +110 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/json_spec.rb +206 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/logger_spec.rb +299 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/raise_error_spec.rb +286 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response_spec.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/utils/headers_spec.rb +109 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/utils_spec.rb +120 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday_spec.rb +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/spec_helper.rb +133 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/disabling_stub.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/fake_safe_buffer.rb +15 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/faraday_middleware_subclasses.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/helper_methods.rb +96 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/adapter.rb +105 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/params_encoder.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/request_method.rb +263 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/streaming_response_checker.rb +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/LICENSE.md +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/README.md +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/adapter/net_http.rb +206 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/net_http/version.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/net_http.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/Gemfile +8 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/LICENSE +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/README.md +323 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/Rakefile +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/changelog.md +127 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/hashdiff.gemspec +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/compare_hashes.rb +101 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/diff.rb +185 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/lcs.rb +66 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/lcs_compare_arrays.rb +32 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/linear_compare_array.rb +159 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/patch.rb +88 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/util.rb +155 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/ext/io/console/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/ext/json/ext/generator/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/ext/json/ext/parser/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/lib/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/lib/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/BSDL +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/COPYING +56 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/README.md +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/doc/net-http/examples.rdoc +31 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/doc/net-http/included_getters.rdoc +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/exceptions.rb +35 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/generic_request.rb +429 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/header.rb +985 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/proxy_delta.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/request.rb +88 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/requests.rb +444 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/response.rb +739 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/responses.rb +1242 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/status.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http.rb +2608 -0
- data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/https.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.5/ext/nio4r/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.5/lib/nio4r_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/prism-1.9.0/ext/prism/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/prism-1.9.0/lib/prism/prism.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.3.1/ext/psych/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/psych-5.3.1/lib/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/CHANGELOG.md +649 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/Gemfile +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/README.md +231 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/SECURITY.md +24 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/data/list.txt +16298 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/domain.rb +235 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/errors.rb +41 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/list.rb +247 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/rule.rb +350 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/version.rb +14 -0
- data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix.rb +177 -0
- data/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/redcarpet-3.6.1/ext/redcarpet/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/redcarpet-3.6.1/lib/redcarpet.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/NEWS.md +843 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/README.md +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/context.rdoc +143 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/child.rdoc +87 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/document.rdoc +276 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/element.rdoc +602 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/node.rdoc +97 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/parent.rdoc +267 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/child_toc.rdoc +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/document_toc.rdoc +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/element_toc.rdoc +55 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/master_toc.rdoc +135 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/node_toc.rdoc +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/parent_toc.rdoc +25 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tutorial.rdoc +1358 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/attlistdecl.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/attribute.rb +210 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/cdata.rb +68 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/child.rb +96 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/comment.rb +80 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/doctype.rb +306 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/document.rb +471 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/attlistdecl.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/dtd.rb +47 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/elementdecl.rb +18 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/entitydecl.rb +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/notationdecl.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/element.rb +2578 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/encoding.rb +48 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/entity.rb +142 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/default.rb +116 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/pretty.rb +142 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/transitive.rb +58 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/functions.rb +446 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/instruction.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/light/node.rb +188 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/namespace.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/node.rb +80 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/output.rb +30 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parent.rb +166 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parseexception.rb +53 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/baseparser.rb +949 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/lightparser.rb +59 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/pullparser.rb +213 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/sax2parser.rb +270 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/streamparser.rb +67 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/treeparser.rb +89 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/ultralightparser.rb +57 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/xpathparser.rb +739 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/quickpath.rb +267 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/rexml.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/sax2listener.rb +98 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/security.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/source.rb +388 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/streamlistener.rb +93 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/text.rb +420 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/undefinednamespaceexception.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/relaxng.rb +540 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/validation.rb +144 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/validationexception.rb +10 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xmldecl.rb +130 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xmltokens.rb +85 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xpath.rb +70 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xpath_parser.rb +980 -0
- data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/ext/stringio/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/lib/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/CHANGELOG.md +2148 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/LICENSE +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/README.md +1229 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/api.rb +111 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/assertion_failure.rb +13 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/callback_registry.rb +37 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/config.rb +20 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/cucumber.rb +12 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/deprecation.rb +11 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/errors.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +228 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/curb_adapter.rb +354 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +239 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/excon_adapter.rb +167 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_lib_adapter.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +21 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/client.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/request.rb +28 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/response.rb +95 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/streamer.rb +44 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/webmock.rb +77 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb_adapter.rb +39 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/httpclient_adapter.rb +260 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/manticore_adapter.rb +147 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/net_http.rb +310 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/net_http_response.rb +36 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/patron_adapter.rb +132 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +190 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/any_arg_matcher.rb +15 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_argument_matcher.rb +23 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_excluding_matcher.rb +17 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_including_matcher.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/minitest.rb +43 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rack_response.rb +73 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_body_diff.rb +66 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_execution_verifier.rb +79 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_pattern.rb +428 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_registry.rb +37 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_signature.rb +56 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_signature_snippet.rb +63 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_stub.rb +134 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/response.rb +161 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/responses_sequence.rb +42 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers/request_pattern_matcher.rb +80 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers/webmock_matcher.rb +69 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers.rb +29 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec.rb +44 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/stub_registry.rb +84 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/stub_request_snippet.rb +40 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/test_unit.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_counter.rb +45 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_keys_stringifier.rb +27 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_validator.rb +19 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/headers.rb +77 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/json.rb +72 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/parse_error.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/xml.rb +16 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/query_mapper.rb +283 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/uri.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/values_stringifier.rb +22 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/version_checker.rb +113 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/version.rb +5 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/webmock.rb +175 -0
- data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock.rb +61 -0
- data/vendor/bundle/ruby/3.2.0/gems/websocket-driver-0.8.0/ext/websocket-driver/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/websocket-driver-0.8.0/lib/websocket_mask.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/addressable-2.9.0.gemspec +29 -0
- data/vendor/bundle/ruby/3.2.0/specifications/crack-1.0.1.gemspec +27 -0
- data/vendor/bundle/ruby/3.2.0/specifications/faraday-2.14.1.gemspec +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/faraday-net_http-3.4.2.gemspec +26 -0
- data/vendor/bundle/ruby/3.2.0/specifications/hashdiff-1.2.1.gemspec +30 -0
- data/vendor/bundle/ruby/3.2.0/specifications/net-http-0.9.1.gemspec +27 -0
- data/vendor/bundle/ruby/3.2.0/specifications/public_suffix-7.0.5.gemspec +24 -0
- data/vendor/bundle/ruby/3.2.0/specifications/rexml-3.4.4.gemspec +25 -0
- data/vendor/bundle/ruby/3.2.0/specifications/webmock-3.26.2.gemspec +44 -0
- metadata +377 -2
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
= form_with model: @record, url: form_url, scope: :record, html: { multipart: true } do |f|
|
|
4
4
|
.grid.grid-cols-1.md:grid-cols-2.2xl:grid-cols-3.gap-x-6.gap-y-5
|
|
5
5
|
- @fields.each do |field|
|
|
6
|
+
- if field.type == :hidden
|
|
7
|
+
= f.hidden_field field.name
|
|
8
|
+
- next
|
|
6
9
|
- next unless field.visible?(iron_admin_current_user)
|
|
7
10
|
- next if field.readonly?(iron_admin_current_user)
|
|
8
|
-
- span_full = field.type.in?(%i[textarea json file files rich_text tags markdown])
|
|
11
|
+
- span_full = field.type.in?(%i[textarea json file files rich_text tags markdown code key_value boolean_group])
|
|
9
12
|
- has_error = @record.errors[field.name].any?
|
|
10
13
|
%div{ class: span_full ? "md:col-span-2 2xl:col-span-3" : nil }
|
|
11
14
|
= f.label field.name, field.name.to_s.humanize,
|
|
@@ -15,10 +18,21 @@
|
|
|
15
18
|
- assoc_class = field.options[:association_class]
|
|
16
19
|
- fk = field.options[:foreign_key]
|
|
17
20
|
- display_method = field.options[:display]
|
|
18
|
-
=
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
- association_resource = association_resource_for(field, assoc_class)
|
|
22
|
+
- if field.options[:autocomplete]
|
|
23
|
+
- selected_record = @record.public_send(field.name) if @record.respond_to?(field.name)
|
|
24
|
+
- autocomplete_resource_name = association_resource&.resource_name || assoc_class.model_name.route_key
|
|
25
|
+
- autocomplete_component = IronAdmin::Form::BelongsToAutocompleteComponent.new(name: "record[#{fk}]", resource_name: autocomplete_resource_name, selected_id: @record.public_send(fk), selected_label: selected_record ? display_record_label(selected_record, display_method) : nil, has_error: has_error)
|
|
26
|
+
= render autocomplete_component
|
|
27
|
+
- else
|
|
28
|
+
- belongs_to_scope = assoc_class.all
|
|
29
|
+
- tenant_scope = IronAdmin.configuration.tenant_scope_block
|
|
30
|
+
- belongs_to_scope = tenant_scope.call(belongs_to_scope) if tenant_scope
|
|
31
|
+
- belongs_to_options = belongs_to_scope.map { |r| [display_record_label(r, display_method), r.id] }
|
|
32
|
+
= f.select fk,
|
|
33
|
+
options_for_select(belongs_to_options, @record.public_send(fk)),
|
|
34
|
+
{ include_blank: I18n.t("iron_admin.fields.select_placeholder") },
|
|
35
|
+
class: [cp_select_class, (error_input_class if has_error)].compact.join(" ")
|
|
22
36
|
- when :text
|
|
23
37
|
= f.text_field field.name, placeholder: field.name.to_s.humanize,
|
|
24
38
|
class: [cp_input_class, (error_input_class if has_error)].compact.join(" ")
|
|
@@ -180,6 +194,64 @@
|
|
|
180
194
|
btn.addEventListener("click", function() { btn.closest("[data-tag]").remove(); updateHidden(); });
|
|
181
195
|
});
|
|
182
196
|
})();
|
|
197
|
+
- when :key_value
|
|
198
|
+
= f.text_area field.name, rows: field.options[:rows] || 6,
|
|
199
|
+
placeholder: '{"key": "value"}',
|
|
200
|
+
class: ["font-mono text-sm", cp_textarea_class, (error_input_class if has_error)].compact.join(" ")
|
|
201
|
+
- when :json
|
|
202
|
+
- raw_json_value = @record.public_send(field.name)
|
|
203
|
+
- json_str = raw_json_value.nil? ? "" : JSON.pretty_generate(raw_json_value)
|
|
204
|
+
= text_area_tag "record[#{field.name}]", json_str,
|
|
205
|
+
id: "record_#{field.name}", rows: field.options[:rows] || 8, placeholder: "{}",
|
|
206
|
+
class: ["font-mono text-sm", cp_textarea_class, (error_input_class if has_error)].compact.join(" ")
|
|
207
|
+
- when :boolean_group
|
|
208
|
+
- choices = field.options[:choices] || []
|
|
209
|
+
- current_values = @record.public_send(field.name).to_s.split(",").map(&:strip)
|
|
210
|
+
- container_id = "boolean-group-#{field.name}"
|
|
211
|
+
%div{ id: container_id, data: { boolean_group_field: true } }
|
|
212
|
+
= f.hidden_field field.name, value: current_values.join(","), id: "boolean-group-hidden-#{field.name}"
|
|
213
|
+
.flex.flex-wrap.gap-3
|
|
214
|
+
- choices.each do |choice|
|
|
215
|
+
- label_text, choice_value = choice.is_a?(Array) ? choice : [choice.to_s.humanize, choice]
|
|
216
|
+
%label.inline-flex.items-center.gap-2.cursor-pointer
|
|
217
|
+
%input{ type: "checkbox", value: choice_value,
|
|
218
|
+
checked: current_values.include?(choice_value.to_s),
|
|
219
|
+
class: cp_checkbox_class,
|
|
220
|
+
data: { boolean_group_checkbox: true } }
|
|
221
|
+
%span.text-sm= label_text
|
|
222
|
+
:javascript
|
|
223
|
+
(function() {
|
|
224
|
+
var container = document.getElementById("#{container_id}");
|
|
225
|
+
var hidden = document.getElementById("boolean-group-hidden-#{field.name}");
|
|
226
|
+
var checkboxes = container.querySelectorAll("[data-boolean-group-checkbox]");
|
|
227
|
+
function update() {
|
|
228
|
+
var vals = [];
|
|
229
|
+
checkboxes.forEach(function(cb) { if (cb.checked) vals.push(cb.value); });
|
|
230
|
+
hidden.value = vals.join(",");
|
|
231
|
+
}
|
|
232
|
+
checkboxes.forEach(function(cb) { cb.addEventListener("change", update); });
|
|
233
|
+
})();
|
|
234
|
+
- when :external_image
|
|
235
|
+
= f.url_field field.name, placeholder: I18n.t("iron_admin.fields.url_placeholder"),
|
|
236
|
+
class: [cp_input_class, (error_input_class if has_error)].compact.join(" ")
|
|
237
|
+
- when :progress_bar
|
|
238
|
+
= f.number_field field.name, min: field.options[:min] || 0, max: field.options[:max] || 100,
|
|
239
|
+
placeholder: "0",
|
|
240
|
+
class: [cp_input_class, (error_input_class if has_error)].compact.join(" ")
|
|
241
|
+
- when :code
|
|
242
|
+
= f.text_area field.name, rows: field.options[:rows] || 10,
|
|
243
|
+
class: ["font-mono text-sm", cp_textarea_class, (error_input_class if has_error)].compact.join(" ")
|
|
244
|
+
- when :radio
|
|
245
|
+
- layout = field.options[:layout] == :vertical ? "flex-col space-y-2" : "flex flex-wrap gap-4"
|
|
246
|
+
- choices = field.options[:choices] || []
|
|
247
|
+
.flex{ class: layout }
|
|
248
|
+
- choices.each do |choice|
|
|
249
|
+
- label_text, choice_value = choice.is_a?(Array) ? choice : [choice.to_s.humanize, choice]
|
|
250
|
+
%label.inline-flex.items-center.gap-2.cursor-pointer
|
|
251
|
+
%input{ type: "radio", name: "record[#{field.name}]",
|
|
252
|
+
value: choice_value,
|
|
253
|
+
checked: @record.public_send(field.name).to_s == choice_value.to_s }
|
|
254
|
+
%span.text-sm= label_text
|
|
183
255
|
- else
|
|
184
256
|
- custom_config = IronAdmin::FieldTypeRegistry.find(field.type) if IronAdmin::FieldTypeRegistry.registered?(field.type)
|
|
185
257
|
- if custom_config&.form_component_class
|
|
@@ -206,6 +278,10 @@
|
|
|
206
278
|
= check_box_tag "record[#{assoc[:name].to_s.singularize}_ids][]", option.id, selected_ids.include?(option.id), class: cp_checkbox_class
|
|
207
279
|
%span.text-sm{ class: cp_body_text }= display_record_label(option, assoc[:display])
|
|
208
280
|
|
|
281
|
+
- @resource_class.nested_associations.each do |nested_assoc|
|
|
282
|
+
.mt-6
|
|
283
|
+
= render IronAdmin::Form::NestedFormComponent.new(form: f, nested_association: nested_assoc, record: @record, current_user: iron_admin_current_user)
|
|
284
|
+
|
|
209
285
|
.flex.items-center.gap-3.mt-8.pt-6.border-t{ class: t.card_border }
|
|
210
286
|
= f.submit class: cp_btn_primary_lg
|
|
211
287
|
= link_to I18n.t("iron_admin.form.cancel_button"), resources_path(@resource_class.resource_name),
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
= turbo_frame_tag "action-form-modal" do
|
|
2
|
+
.p-8.max-w-lg.mx-auto{ class: t.font_family }
|
|
3
|
+
%h2.text-xl.mb-6{ class: cp_heading }= @action[:name].to_s.humanize
|
|
4
|
+
|
|
5
|
+
= form_tag @form_url, method: :post, class: "space-y-4" do
|
|
6
|
+
- @form_fields.each do |field|
|
|
7
|
+
.space-y-1
|
|
8
|
+
%label.block.text-sm.font-medium{ class: cp_label_text, for: "action_form_#{field.name}" }
|
|
9
|
+
= field.label
|
|
10
|
+
- if field.required
|
|
11
|
+
%span.text-red-500 *
|
|
12
|
+
|
|
13
|
+
- case field.type
|
|
14
|
+
- when :text
|
|
15
|
+
= text_field_tag "action_form[#{field.name}]", field.default,
|
|
16
|
+
id: "action_form_#{field.name}",
|
|
17
|
+
class: cp_filter_input_class,
|
|
18
|
+
placeholder: field.placeholder,
|
|
19
|
+
required: field.required
|
|
20
|
+
- when :textarea
|
|
21
|
+
= text_area_tag "action_form[#{field.name}]", field.default,
|
|
22
|
+
id: "action_form_#{field.name}",
|
|
23
|
+
class: "#{cp_filter_input_class} h-24",
|
|
24
|
+
placeholder: field.placeholder,
|
|
25
|
+
required: field.required
|
|
26
|
+
- when :number
|
|
27
|
+
= number_field_tag "action_form[#{field.name}]", field.default,
|
|
28
|
+
id: "action_form_#{field.name}",
|
|
29
|
+
class: cp_filter_input_class,
|
|
30
|
+
placeholder: field.placeholder,
|
|
31
|
+
step: "any",
|
|
32
|
+
required: field.required
|
|
33
|
+
- when :boolean
|
|
34
|
+
.flex.items-center.gap-2
|
|
35
|
+
= check_box_tag "action_form[#{field.name}]", "1", field.default,
|
|
36
|
+
id: "action_form_#{field.name}",
|
|
37
|
+
class: "rounded border-gray-300"
|
|
38
|
+
%span.text-sm{ class: cp_body_text }= field.label
|
|
39
|
+
- when :date
|
|
40
|
+
= date_field_tag "action_form[#{field.name}]", field.default,
|
|
41
|
+
id: "action_form_#{field.name}",
|
|
42
|
+
class: cp_filter_input_class,
|
|
43
|
+
required: field.required
|
|
44
|
+
- when :datetime
|
|
45
|
+
= datetime_field_tag "action_form[#{field.name}]", field.default,
|
|
46
|
+
id: "action_form_#{field.name}",
|
|
47
|
+
class: cp_filter_input_class,
|
|
48
|
+
required: field.required
|
|
49
|
+
- when :select
|
|
50
|
+
%select{ name: "action_form[#{field.name}]", id: "action_form_#{field.name}",
|
|
51
|
+
class: cp_filter_input_class, required: field.required }
|
|
52
|
+
%option{ value: "" }= field.placeholder || "Select..."
|
|
53
|
+
- (field.options || []).each do |opt|
|
|
54
|
+
%option{ value: opt, selected: field.default == opt }= opt.to_s.humanize
|
|
55
|
+
|
|
56
|
+
- if params[:ids].present?
|
|
57
|
+
- Array(params[:ids]).each do |id|
|
|
58
|
+
= hidden_field_tag "ids[]", id
|
|
59
|
+
|
|
60
|
+
.flex.items-center.gap-3.pt-3.border-t.border-gray-100
|
|
61
|
+
%button{ type: "submit", class: cp_btn_primary }= I18n.t("iron_admin.resources.action_form.submit", default: "Execute")
|
|
62
|
+
= link_to I18n.t("iron_admin.form.cancel_button"), "javascript:history.back()", class: "text-sm #{cp_link_muted}"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
= turbo_frame_tag "action-form-modal" do
|
|
2
|
+
.p-8.max-w-lg.mx-auto{ class: t.font_family }
|
|
3
|
+
%h2.text-xl.mb-6{ class: cp_heading }= @action[:name].to_s.humanize
|
|
4
|
+
|
|
5
|
+
= form_tag @form_url, method: :post, class: "space-y-4" do
|
|
6
|
+
- @form_fields.each do |field|
|
|
7
|
+
.space-y-1
|
|
8
|
+
%label.block.text-sm.font-medium{ class: cp_label_text, for: "action_form_#{field.name}" }
|
|
9
|
+
= field.label
|
|
10
|
+
- if field.required
|
|
11
|
+
%span.text-red-500 *
|
|
12
|
+
|
|
13
|
+
- case field.type
|
|
14
|
+
- when :text
|
|
15
|
+
= text_field_tag "action_form[#{field.name}]", field.default,
|
|
16
|
+
id: "action_form_#{field.name}",
|
|
17
|
+
class: cp_filter_input_class,
|
|
18
|
+
placeholder: field.placeholder,
|
|
19
|
+
required: field.required
|
|
20
|
+
- when :textarea
|
|
21
|
+
= text_area_tag "action_form[#{field.name}]", field.default,
|
|
22
|
+
id: "action_form_#{field.name}",
|
|
23
|
+
class: "#{cp_filter_input_class} h-24",
|
|
24
|
+
placeholder: field.placeholder,
|
|
25
|
+
required: field.required
|
|
26
|
+
- when :number
|
|
27
|
+
= number_field_tag "action_form[#{field.name}]", field.default,
|
|
28
|
+
id: "action_form_#{field.name}",
|
|
29
|
+
class: cp_filter_input_class,
|
|
30
|
+
placeholder: field.placeholder,
|
|
31
|
+
step: "any",
|
|
32
|
+
required: field.required
|
|
33
|
+
- when :boolean
|
|
34
|
+
.flex.items-center.gap-2
|
|
35
|
+
= check_box_tag "action_form[#{field.name}]", "1", field.default,
|
|
36
|
+
id: "action_form_#{field.name}",
|
|
37
|
+
class: "rounded border-gray-300"
|
|
38
|
+
%span.text-sm{ class: cp_body_text }= field.label
|
|
39
|
+
- when :date
|
|
40
|
+
= date_field_tag "action_form[#{field.name}]", field.default,
|
|
41
|
+
id: "action_form_#{field.name}",
|
|
42
|
+
class: cp_filter_input_class,
|
|
43
|
+
required: field.required
|
|
44
|
+
- when :datetime
|
|
45
|
+
= datetime_field_tag "action_form[#{field.name}]", field.default,
|
|
46
|
+
id: "action_form_#{field.name}",
|
|
47
|
+
class: cp_filter_input_class,
|
|
48
|
+
required: field.required
|
|
49
|
+
- when :select
|
|
50
|
+
%select{ name: "action_form[#{field.name}]", id: "action_form_#{field.name}",
|
|
51
|
+
class: cp_filter_input_class, required: field.required }
|
|
52
|
+
%option{ value: "" }= field.placeholder || "Select..."
|
|
53
|
+
- (field.options || []).each do |opt|
|
|
54
|
+
%option{ value: opt, selected: field.default == opt }= opt.to_s.humanize
|
|
55
|
+
|
|
56
|
+
- if params[:ids].present?
|
|
57
|
+
- Array(params[:ids]).each do |id|
|
|
58
|
+
= hidden_field_tag "ids[]", id
|
|
59
|
+
|
|
60
|
+
.flex.items-center.gap-3.pt-3.border-t.border-gray-100
|
|
61
|
+
%button{ type: "submit", class: cp_btn_primary }= I18n.t("iron_admin.resources.action_form.submit", default: "Execute")
|
|
62
|
+
= link_to I18n.t("iron_admin.form.cancel_button"), "javascript:history.back()", class: "text-sm #{cp_link_muted}"
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
- filters = iron_admin_visible_filters
|
|
2
|
+
|
|
1
3
|
.p-8.max-w-7xl.mx-auto{ class: t.font_family }
|
|
2
4
|
.flex.items-center.justify-between.mb-6
|
|
3
5
|
%h1.text-2xl{ class: cp_heading }= @resource_class.label
|
|
4
|
-
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
.flex.items-center.gap-2
|
|
7
|
+
- if @resource_class.import_enabled? && @resource_class.action_allowed?(:create)
|
|
8
|
+
= link_to resource_import_path(@resource_class.resource_name),
|
|
9
|
+
class: cp_btn_secondary do
|
|
10
|
+
= heroicon "arrow-up-tray", variant: :mini, options: { class: "h-4 w-4" }
|
|
11
|
+
%span= I18n.t("iron_admin.resources.index.import_button")
|
|
12
|
+
- if @resource_class.action_allowed?(:create)
|
|
13
|
+
= link_to I18n.t("iron_admin.resources.index.new_button", model: @resource_class.model.model_name.human),
|
|
14
|
+
new_resource_path(@resource_class.resource_name),
|
|
15
|
+
class: cp_btn_primary
|
|
8
16
|
|
|
9
17
|
- if @resource_class.all_scopes.any? || @resource_class.searchable_columns.any?
|
|
10
18
|
.flex.items-center.justify-between.mb-4
|
|
@@ -19,10 +27,18 @@
|
|
|
19
27
|
- if @resource_class.searchable_columns.any?
|
|
20
28
|
= form_tag resources_path(@resource_class.resource_name), method: :get, class: "flex ml-auto" do
|
|
21
29
|
= hidden_field_tag :scope, @current_scope
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
- filters.each do |filter|
|
|
31
|
+
- if filter[:type].in?(%i[string number])
|
|
32
|
+
- sub = iron_admin_filter_param(filter[:name].to_s)
|
|
33
|
+
- if sub.is_a?(ActionController::Parameters) && sub["value"].present?
|
|
34
|
+
= hidden_field_tag "filters[#{filter[:name]}][op]", sub["op"]
|
|
35
|
+
= hidden_field_tag "filters[#{filter[:name]}][value]", sub["value"]
|
|
36
|
+
- if sub["value_2"].present?
|
|
37
|
+
= hidden_field_tag "filters[#{filter[:name]}][value_2]", sub["value_2"]
|
|
38
|
+
- else
|
|
39
|
+
- value = iron_admin_filter_param(filter[:name])
|
|
40
|
+
- if value.present?
|
|
41
|
+
= hidden_field_tag "filters[#{filter[:name]}]", value
|
|
26
42
|
.relative
|
|
27
43
|
.pointer-events-none.absolute.inset-y-0.left-0.flex.items-center{ class: "pl-3.5" }
|
|
28
44
|
= heroicon "magnifying-glass", variant: :mini, options: { class: "h-4 w-4 #{cp_muted_text}" }
|
|
@@ -30,8 +46,8 @@
|
|
|
30
46
|
placeholder: I18n.t("iron_admin.resources.index.search_placeholder"),
|
|
31
47
|
class: cp_search_class
|
|
32
48
|
|
|
33
|
-
- if
|
|
34
|
-
- has_active_filters =
|
|
49
|
+
- if filters.any?
|
|
50
|
+
- has_active_filters = filters.any? { |f| iron_admin_active_filter?(f) }
|
|
35
51
|
- select_chevron_style = "background-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem;"
|
|
36
52
|
.flex.justify-end.mb-4
|
|
37
53
|
%details.relative.group{ open: has_active_filters || nil }
|
|
@@ -39,7 +55,7 @@
|
|
|
39
55
|
= heroicon "funnel", variant: :mini, options: { class: "h-4 w-4 #{cp_muted_text}" }
|
|
40
56
|
%span= I18n.t("iron_admin.resources.index.filters_label")
|
|
41
57
|
- if has_active_filters
|
|
42
|
-
- active_count =
|
|
58
|
+
- active_count = filters.count { |f| iron_admin_active_filter?(f) }
|
|
43
59
|
%span{ class: cp_badge_count }
|
|
44
60
|
= active_count
|
|
45
61
|
= heroicon "chevron-down", variant: :mini, options: { class: "h-4 w-4 text-gray-400 transition-transform group-open:rotate-180" }
|
|
@@ -48,7 +64,7 @@
|
|
|
48
64
|
= hidden_field_tag :scope, @current_scope
|
|
49
65
|
= hidden_field_tag :q, params[:q]
|
|
50
66
|
.space-y-3
|
|
51
|
-
-
|
|
67
|
+
- filters.each do |filter|
|
|
52
68
|
.space-y-1
|
|
53
69
|
%label.block.text-xs.font-semibold.uppercase.tracking-wider{ class: cp_muted_text }
|
|
54
70
|
= filter[:name].to_s.humanize
|
|
@@ -57,20 +73,47 @@
|
|
|
57
73
|
%select.block.w-full.appearance-none.border.px-3.py-2.text-sm.shadow-sm.outline-none.transition.duration-150.ease-in-out{ name: "filters[#{filter[:name]}]", class: "#{t.border_radius} #{t.input_border} #{t.card_bg} #{cp_body_text} #{cp_focus}", style: select_chevron_style }
|
|
58
74
|
%option{ value: "" }= I18n.t("iron_admin.resources.index.all_option")
|
|
59
75
|
- filter_options_for(@resource_class, filter).each do |label, value|
|
|
60
|
-
%option{ value: value, selected:
|
|
76
|
+
%option{ value: value, selected: iron_admin_filter_param(filter[:name]) == value.to_s }= label
|
|
61
77
|
- when :boolean
|
|
62
78
|
%select.block.w-full.appearance-none.border.px-3.py-2.text-sm.shadow-sm.outline-none.transition.duration-150.ease-in-out{ name: "filters[#{filter[:name]}]", class: "#{t.border_radius} #{t.input_border} #{t.card_bg} #{cp_body_text} #{cp_focus}", style: select_chevron_style }
|
|
63
79
|
%option{ value: "" }= I18n.t("iron_admin.resources.index.all_option")
|
|
64
80
|
- filter_options_for(@resource_class, filter).each do |label, value|
|
|
65
|
-
%option{ value: value, selected:
|
|
81
|
+
%option{ value: value, selected: iron_admin_filter_param(filter[:name]) == value.to_s }= label
|
|
66
82
|
- when :date_range
|
|
67
83
|
.space-y-2
|
|
68
|
-
= date_field_tag "filters[#{filter[:name]}_from]",
|
|
84
|
+
= date_field_tag "filters[#{filter[:name]}_from]", iron_admin_filter_param("#{filter[:name]}_from"),
|
|
69
85
|
class: cp_filter_input_class,
|
|
70
86
|
placeholder: I18n.t("iron_admin.filters.from")
|
|
71
|
-
= date_field_tag "filters[#{filter[:name]}_to]",
|
|
87
|
+
= date_field_tag "filters[#{filter[:name]}_to]", iron_admin_filter_param("#{filter[:name]}_to"),
|
|
72
88
|
class: cp_filter_input_class,
|
|
73
89
|
placeholder: I18n.t("iron_admin.filters.to")
|
|
90
|
+
- when :string
|
|
91
|
+
- string_ops = %w[contains equals starts_with ends_with]
|
|
92
|
+
- current_op = iron_admin_filter_param(filter[:name].to_s, "op") || "contains"
|
|
93
|
+
- current_val = iron_admin_filter_param(filter[:name].to_s, "value") || ""
|
|
94
|
+
.space-y-2
|
|
95
|
+
%select.block.w-full.appearance-none.border.px-3.py-2.text-sm.shadow-sm.outline-none.transition.duration-150.ease-in-out{ name: "filters[#{filter[:name]}][op]", class: "#{t.border_radius} #{t.input_border} #{t.card_bg} #{cp_body_text} #{cp_focus}", style: select_chevron_style }
|
|
96
|
+
- string_ops.each do |op|
|
|
97
|
+
%option{ value: op, selected: current_op == op }= I18n.t("iron_admin.filters.operators.#{op}")
|
|
98
|
+
= text_field_tag "filters[#{filter[:name]}][value]", current_val,
|
|
99
|
+
class: cp_filter_input_class,
|
|
100
|
+
placeholder: filter[:label] || filter[:name].to_s.humanize
|
|
101
|
+
- when :number
|
|
102
|
+
- number_ops = %w[equals greater_than less_than between]
|
|
103
|
+
- current_op = iron_admin_filter_param(filter[:name].to_s, "op") || "equals"
|
|
104
|
+
- current_val = iron_admin_filter_param(filter[:name].to_s, "value") || ""
|
|
105
|
+
- current_val_upper = iron_admin_filter_param(filter[:name].to_s, "value_2") || ""
|
|
106
|
+
.space-y-2{ data: { controller: "filter-operator" } }
|
|
107
|
+
%select.block.w-full.appearance-none.border.px-3.py-2.text-sm.shadow-sm.outline-none.transition.duration-150.ease-in-out{ name: "filters[#{filter[:name]}][op]", class: "#{t.border_radius} #{t.input_border} #{t.card_bg} #{cp_body_text} #{cp_focus}", style: select_chevron_style, data: { action: "change->filter-operator#toggle", filter_operator_target: "opSelect" } }
|
|
108
|
+
- number_ops.each do |op|
|
|
109
|
+
%option{ value: op, selected: current_op == op }= I18n.t("iron_admin.filters.operators.#{op}")
|
|
110
|
+
= number_field_tag "filters[#{filter[:name]}][value]", current_val,
|
|
111
|
+
class: cp_filter_input_class, step: "any",
|
|
112
|
+
placeholder: filter[:label] || filter[:name].to_s.humanize
|
|
113
|
+
.flex.items-center.gap-2{ data: { filter_operator_target: "betweenRow" }, class: current_op == "between" ? "" : "hidden" }
|
|
114
|
+
%span.text-xs{ class: cp_muted_text }= I18n.t("iron_admin.filters.between_separator")
|
|
115
|
+
= number_field_tag "filters[#{filter[:name]}][value_2]", current_val_upper,
|
|
116
|
+
class: cp_filter_input_class, step: "any"
|
|
74
117
|
.flex.items-center.gap-3.mt-4.pt-3.border-t.border-gray-100
|
|
75
118
|
%button{ type: "submit", class: cp_btn_filter_apply }= I18n.t("iron_admin.resources.index.apply_button")
|
|
76
119
|
= link_to I18n.t("iron_admin.resources.index.clear_button"), resources_path(@resource_class.resource_name, scope: @current_scope, q: params[:q]),
|
|
@@ -122,7 +165,7 @@
|
|
|
122
165
|
%td.px-6.py-8.text-center.text-sm{ colspan: (@fields.count { |f| f.visible?(iron_admin_current_user) }) + (has_bulk_actions ? 2 : 1), class: cp_muted_text }
|
|
123
166
|
= I18n.t("iron_admin.resources.index.empty_state")
|
|
124
167
|
- @records.each do |record|
|
|
125
|
-
%tr{ class: cp_table_row_hover }
|
|
168
|
+
%tr{ id: ("iron_admin_#{@resource_class.resource_name}_row_#{record.id}" if @resource_class.live_index_enabled?), class: cp_table_row_hover }
|
|
126
169
|
- if has_bulk_actions
|
|
127
170
|
%td.px-6.py-4.w-4
|
|
128
171
|
%input{ type: "checkbox", name: "ids[]", value: record.id, class: "rounded border-gray-300",
|
|
@@ -137,4 +180,3 @@
|
|
|
137
180
|
|
|
138
181
|
.mt-4
|
|
139
182
|
= render "iron_admin/shared/pagination", pagy: @pagy
|
|
140
|
-
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.p-8.max-w-lg.mx-auto{ class: t.font_family }
|
|
2
|
+
%h2.text-xl.mb-6{ class: cp_heading }= @declared_action.label
|
|
3
|
+
|
|
4
|
+
= form_tag @form_url, method: :post, class: "space-y-4" do
|
|
5
|
+
- @form_fields.each do |field|
|
|
6
|
+
.space-y-1
|
|
7
|
+
%label.block.text-sm.font-medium{ class: cp_label_text, for: "tool_action_#{field.name}" }
|
|
8
|
+
= field.label
|
|
9
|
+
- if field.required
|
|
10
|
+
%span.text-red-500 *
|
|
11
|
+
|
|
12
|
+
- case field.type
|
|
13
|
+
- when :text
|
|
14
|
+
= text_field_tag "tool_action[#{field.name}]", field.default,
|
|
15
|
+
id: "tool_action_#{field.name}",
|
|
16
|
+
class: cp_filter_input_class,
|
|
17
|
+
placeholder: field.placeholder,
|
|
18
|
+
required: field.required
|
|
19
|
+
- when :textarea
|
|
20
|
+
= text_area_tag "tool_action[#{field.name}]", field.default,
|
|
21
|
+
id: "tool_action_#{field.name}",
|
|
22
|
+
class: "#{cp_filter_input_class} h-24",
|
|
23
|
+
placeholder: field.placeholder,
|
|
24
|
+
required: field.required
|
|
25
|
+
- when :number
|
|
26
|
+
= number_field_tag "tool_action[#{field.name}]", field.default,
|
|
27
|
+
id: "tool_action_#{field.name}",
|
|
28
|
+
class: cp_filter_input_class,
|
|
29
|
+
placeholder: field.placeholder,
|
|
30
|
+
step: "any",
|
|
31
|
+
required: field.required
|
|
32
|
+
- when :boolean
|
|
33
|
+
.flex.items-center.gap-2
|
|
34
|
+
= check_box_tag "tool_action[#{field.name}]", "1", field.default,
|
|
35
|
+
id: "tool_action_#{field.name}",
|
|
36
|
+
class: "rounded border-gray-300"
|
|
37
|
+
%span.text-sm{ class: cp_body_text }= field.label
|
|
38
|
+
- when :date
|
|
39
|
+
= date_field_tag "tool_action[#{field.name}]", field.default,
|
|
40
|
+
id: "tool_action_#{field.name}",
|
|
41
|
+
class: cp_filter_input_class,
|
|
42
|
+
required: field.required
|
|
43
|
+
- when :datetime
|
|
44
|
+
= datetime_field_tag "tool_action[#{field.name}]", field.default,
|
|
45
|
+
id: "tool_action_#{field.name}",
|
|
46
|
+
class: cp_filter_input_class,
|
|
47
|
+
required: field.required
|
|
48
|
+
- when :select
|
|
49
|
+
%select{ name: "tool_action[#{field.name}]", id: "tool_action_#{field.name}",
|
|
50
|
+
class: cp_filter_input_class, required: field.required }
|
|
51
|
+
%option{ value: "" }= field.placeholder || "Select..."
|
|
52
|
+
- (field.options || []).each do |opt|
|
|
53
|
+
%option{ value: opt, selected: field.default == opt }= opt.to_s.humanize
|
|
54
|
+
|
|
55
|
+
.flex.items-center.gap-3.pt-3.border-t.border-gray-100
|
|
56
|
+
%button{ type: "submit", class: cp_btn_primary }= I18n.t("iron_admin.tools.action_form.submit", default: "Execute")
|
|
57
|
+
= link_to I18n.t("iron_admin.form.cancel_button"), tool_path(@tool_class.tool_name), class: "text-sm #{cp_link_muted}"
|
|
@@ -3,5 +3,24 @@
|
|
|
3
3
|
%h1.text-2xl{ class: cp_heading }= @tool_class.label
|
|
4
4
|
.overflow-hidden{ class: cp_card }
|
|
5
5
|
.p-6
|
|
6
|
-
%p.text-sm{ class: cp_muted_text }
|
|
6
|
+
%p.text-sm.mb-6{ class: cp_muted_text }
|
|
7
7
|
= @tool_class.label
|
|
8
|
+
|
|
9
|
+
- if @tool_class.defined_tool_actions.any?
|
|
10
|
+
.space-y-3
|
|
11
|
+
- @tool_class.defined_tool_actions.each do |action|
|
|
12
|
+
- next unless action.allowed?(iron_admin_current_user)
|
|
13
|
+
- if action.has_form?
|
|
14
|
+
= link_to tool_action_form_path(@tool_class.tool_name, action.name),
|
|
15
|
+
class: "#{t.btn_secondary} px-4 py-2 text-sm font-medium rounded-lg inline-flex items-center gap-2" do
|
|
16
|
+
- if action.icon
|
|
17
|
+
= heroicon action.icon, variant: :mini, options: { class: "h-4 w-4" }
|
|
18
|
+
= action.label
|
|
19
|
+
- else
|
|
20
|
+
= button_to tool_action_path(@tool_class.tool_name, action.name),
|
|
21
|
+
method: :post,
|
|
22
|
+
class: "#{t.btn_secondary} px-4 py-2 text-sm font-medium rounded-lg inline-flex items-center gap-2",
|
|
23
|
+
data: action.confirm ? { turbo_confirm: action.confirm_message || I18n.t("iron_admin.tools.confirm_default", default: "Are you sure?") } : {} do
|
|
24
|
+
- if action.icon
|
|
25
|
+
= heroicon action.icon, variant: :mini, options: { class: "h-4 w-4" }
|
|
26
|
+
= action.label
|
data/config/importmap.rb
CHANGED
|
@@ -9,3 +9,5 @@ pin "@rails/actiontext", to: "actiontext.esm.js"
|
|
|
9
9
|
pin "iron_admin", to: "iron_admin/index.js"
|
|
10
10
|
pin "iron_admin/controllers/cp_bulk_select_controller", to: "iron_admin/controllers/cp_bulk_select_controller.js"
|
|
11
11
|
pin "iron_admin/controllers/cp_chart_controller", to: "iron_admin/controllers/cp_chart_controller.js"
|
|
12
|
+
pin "iron_admin/controllers/cp_nested_form_controller", to: "iron_admin/controllers/cp_nested_form_controller.js"
|
|
13
|
+
pin "iron_admin/controllers/filter_operator_controller", to: "iron_admin/controllers/filter_operator_controller.js"
|
data/config/locales/en.yml
CHANGED
|
@@ -17,6 +17,7 @@ en:
|
|
|
17
17
|
inaccessible: "Some records are not accessible"
|
|
18
18
|
index:
|
|
19
19
|
new_button: "New %{model}"
|
|
20
|
+
import_button: "Import"
|
|
20
21
|
search_placeholder: "Search..."
|
|
21
22
|
filters_label: "Filters"
|
|
22
23
|
apply_button: "Apply"
|
|
@@ -36,6 +37,25 @@ en:
|
|
|
36
37
|
view_link: "View"
|
|
37
38
|
view_all: "View all"
|
|
38
39
|
actions_label: "Actions"
|
|
40
|
+
imports:
|
|
41
|
+
new:
|
|
42
|
+
title: "Import %{model}"
|
|
43
|
+
subtitle: "Upload CSV or JSON data and preview mapped rows before importing."
|
|
44
|
+
file_label: "File"
|
|
45
|
+
format_label: "Format"
|
|
46
|
+
fields_label: "Importable fields"
|
|
47
|
+
preview_button: "Preview"
|
|
48
|
+
preview:
|
|
49
|
+
title: "Preview %{model} Import"
|
|
50
|
+
summary: "%{count} rows detected."
|
|
51
|
+
mapping_title: "Column mapping"
|
|
52
|
+
status_column: "Status"
|
|
53
|
+
valid_status: "Valid"
|
|
54
|
+
back_button: "Back"
|
|
55
|
+
create:
|
|
56
|
+
success: "Import finished: %{created} created, %{updated} updated, %{failed} failed."
|
|
57
|
+
errors:
|
|
58
|
+
missing_file: "Choose a file to import."
|
|
39
59
|
fields:
|
|
40
60
|
select_placeholder: "Select..."
|
|
41
61
|
boolean_enable: "Enable %{field}"
|
|
@@ -47,12 +67,28 @@ en:
|
|
|
47
67
|
color_placeholder: "#000000"
|
|
48
68
|
number_placeholder: "0"
|
|
49
69
|
currency_placeholder: "0.00"
|
|
70
|
+
radio_placeholder: "Select an option"
|
|
71
|
+
code_placeholder: "Enter code..."
|
|
72
|
+
key_value_placeholder: '{"key": "value"}'
|
|
73
|
+
progress_placeholder: "0"
|
|
50
74
|
form:
|
|
51
75
|
cancel_button: "Cancel"
|
|
52
76
|
navigation:
|
|
53
77
|
dashboard: "Dashboard"
|
|
78
|
+
nested_form:
|
|
79
|
+
add_button: "Add row"
|
|
80
|
+
remove_button: "Remove"
|
|
54
81
|
filters:
|
|
55
82
|
"true": "Yes"
|
|
56
83
|
"false": "No"
|
|
57
84
|
from: "From"
|
|
58
85
|
to: "To"
|
|
86
|
+
operators:
|
|
87
|
+
contains: "Contains"
|
|
88
|
+
equals: "Equals"
|
|
89
|
+
starts_with: "Starts with"
|
|
90
|
+
ends_with: "Ends with"
|
|
91
|
+
greater_than: "Greater than"
|
|
92
|
+
less_than: "Less than"
|
|
93
|
+
between: "Between"
|
|
94
|
+
between_separator: "and"
|
data/config/routes.rb
CHANGED
|
@@ -3,16 +3,23 @@ IronAdmin::Engine.routes.draw do
|
|
|
3
3
|
|
|
4
4
|
get "search", to: "search#index", as: :search
|
|
5
5
|
get "audit", to: "audit#index", as: :audit
|
|
6
|
+
get "live/:stream", to: "live#show", as: :live
|
|
6
7
|
get "autocomplete/:resource_name", to: "resources#autocomplete", as: :autocomplete
|
|
7
8
|
get ":resource_name/export", to: "exports#show", as: :export
|
|
9
|
+
get ":resource_name/import", to: "imports#new", as: :resource_import
|
|
10
|
+
post ":resource_name/import/preview", to: "imports#preview", as: :resource_import_preview
|
|
11
|
+
post ":resource_name/import", to: "imports#create"
|
|
8
12
|
|
|
9
13
|
get "tools/:tool_name", to: "tools#show", as: :tool
|
|
14
|
+
get "tools/:tool_name/:action_name/form", to: "tools#action_form", as: :tool_action_form
|
|
10
15
|
post "tools/:tool_name/:action_name", to: "tools#execute", as: :tool_action
|
|
11
16
|
|
|
17
|
+
get ":resource_name/bulk_actions/:action_name/form", to: "resources#bulk_action_form", as: :resource_bulk_action_form
|
|
12
18
|
get ":resource_name", to: "resources#index", as: :resources
|
|
13
19
|
get ":resource_name/new", to: "resources#new", as: :new_resource
|
|
14
20
|
get ":resource_name/:id", to: "resources#show", as: :resource
|
|
15
21
|
get ":resource_name/:id/edit", to: "resources#edit", as: :edit_resource
|
|
22
|
+
get ":resource_name/:id/actions/:action_name/form", to: "resources#action_form", as: :resource_action_form
|
|
16
23
|
post ":resource_name", to: "resources#create"
|
|
17
24
|
patch ":resource_name/:id", to: "resources#update"
|
|
18
25
|
delete ":resource_name/:id", to: "resources#destroy"
|
|
@@ -80,6 +80,66 @@ IronAdmin::Filters::DateRangeComponent.new(
|
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
|
|
83
|
+
## StringFilterComponent
|
|
84
|
+
|
|
85
|
+
Text input with an operator dropdown for string matching.
|
|
86
|
+
|
|
87
|
+
```ruby
|
|
88
|
+
IronAdmin::Filters::StringFilterComponent.new(
|
|
89
|
+
name: :name, # Required: filter parameter name
|
|
90
|
+
label: nil, # Optional: label text (auto-generated from name)
|
|
91
|
+
value: nil, # Optional: current filter value
|
|
92
|
+
operator: "contains" # Optional: current operator (default: "contains")
|
|
93
|
+
)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Operators:** `contains`, `equals`, `starts_with`, `ends_with`
|
|
97
|
+
|
|
98
|
+
**Example:**
|
|
99
|
+
|
|
100
|
+
```haml
|
|
101
|
+
= render IronAdmin::Filters::StringFilterComponent.new(
|
|
102
|
+
name: :name,
|
|
103
|
+
label: "Customer Name",
|
|
104
|
+
value: params.dig(:filters, :name),
|
|
105
|
+
operator: params.dig(:filters, :name_operator) || "contains"
|
|
106
|
+
)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## NumberFilterComponent
|
|
112
|
+
|
|
113
|
+
Number input with an operator dropdown for numeric comparisons.
|
|
114
|
+
|
|
115
|
+
```ruby
|
|
116
|
+
IronAdmin::Filters::NumberFilterComponent.new(
|
|
117
|
+
name: :price, # Required: filter parameter name
|
|
118
|
+
label: nil, # Optional: label text (auto-generated from name)
|
|
119
|
+
value: nil, # Optional: current filter value
|
|
120
|
+
max_value: nil, # Optional: upper bound for "between" operator
|
|
121
|
+
operator: "equals" # Optional: current operator (default: "equals")
|
|
122
|
+
)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Operators:** `equals`, `greater_than`, `less_than`, `between`
|
|
126
|
+
|
|
127
|
+
When the `between` operator is selected, a second input for the upper bound is displayed.
|
|
128
|
+
|
|
129
|
+
**Example:**
|
|
130
|
+
|
|
131
|
+
```haml
|
|
132
|
+
= render IronAdmin::Filters::NumberFilterComponent.new(
|
|
133
|
+
name: :price,
|
|
134
|
+
label: "Price",
|
|
135
|
+
value: params.dig(:filters, :price),
|
|
136
|
+
max_value: params.dig(:filters, :price_max),
|
|
137
|
+
operator: params.dig(:filters, :price_operator) || "equals"
|
|
138
|
+
)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
83
143
|
## BarComponent
|
|
84
144
|
|
|
85
145
|
Container for filter controls with dropdown behavior.
|