plutonium 0.15.11 → 0.15.13
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/plutonium.js +3 -9
- data/app/assets/plutonium.js.map +2 -2
- data/app/assets/plutonium.min.js +5 -5
- data/app/assets/plutonium.min.js.map +3 -3
- data/app/views/plutonium/_flash_alerts.html.erb +1 -2
- data/app/views/plutonium/_flash_toasts.html.erb +1 -2
- data/lib/generators/pu/rodauth/concerns/configuration.rb +1 -0
- data/lib/plutonium/ui/dyna_frame/host.rb +1 -1
- data/lib/plutonium/version.rb +1 -1
- data/lib/plutonium.rb +2 -0
- data/lib/rodauth/features/case_insensitive_login.rb +15 -0
- data/lib/rodauth/loader.rb +1 -0
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/src/js/controllers/resource_dismiss_controller.js +3 -13
- metadata +3 -1
@@ -20,7 +20,6 @@
|
|
20
20
|
%>
|
21
21
|
|
22
22
|
<div data-controller="resource-dismiss"
|
23
|
-
data-resource-dismiss-target="target"
|
24
23
|
data-resource-dismiss-after-value="6000"
|
25
24
|
class="flex items-center p-4 mb-4 text-<%= color %>-800 rounded-lg bg-<%= color %>-50 dark:bg-stone-300 dark:text-<%= color %>-400"
|
26
25
|
role="alert">
|
@@ -45,7 +44,7 @@
|
|
45
44
|
<div class="ms-3 text-sm font-normal"><%= msg %></div>
|
46
45
|
<button type="button"
|
47
46
|
class="ms-auto -mx-1.5 -my-1.5 bg-<%= color %>-50 text-<%= color %>-500 rounded-lg focus:ring-2 focus:ring-<%= color %>-400 p-1.5 hover:bg-<%= color %>-200 inline-flex items-center justify-center h-8 w-8 dark:bg-stone-300 dark:text-<%= color %>-400 dark:hover:bg-gray-700"
|
48
|
-
data-resource-dismiss
|
47
|
+
data-action="click->resource-dismiss#dismiss"
|
49
48
|
aria-label="Close">
|
50
49
|
<span class="sr-only">Close</span>
|
51
50
|
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
@@ -19,7 +19,6 @@
|
|
19
19
|
%>
|
20
20
|
|
21
21
|
<div data-controller="resource-dismiss"
|
22
|
-
data-resource-dismiss-target="target"
|
23
22
|
data-resource-dismiss-after-value="6000"
|
24
23
|
class="fixed z-50 top-16 inset-x-0 mx-auto flex items-center w-full max-w-md p-4 text-gray-500 bg-<%= color %>-50 rounded-lg shadow dark:text-<%= color %>-400 dark:bg-gray-800 dark:border dark:border-gray-700 dark:shadow-none"
|
25
24
|
role="alert">
|
@@ -47,7 +46,7 @@
|
|
47
46
|
<div class="ms-3 text-sm font-normal"><%= msg %></div>
|
48
47
|
<button type="button"
|
49
48
|
class="ms-auto -mx-1.5 -my-1.5 bg-<%= color %>-50 text-<%= color %>-400 rounded-lg focus:ring-2 focus:ring-<%= color %>-400 p-1.5 hover:bg-<%= color %>-200 inline-flex items-center justify-center h-8 w-8 dark:text-<%= color %>-400 dark:bg-gray-800 dark:hover:bg-gray-700"
|
50
|
-
data-resource-dismiss
|
49
|
+
data-action="click->resource-dismiss#dismiss"
|
51
50
|
aria-label="Close">
|
52
51
|
<span class="sr-only">Close</span>
|
53
52
|
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
@@ -12,7 +12,7 @@ module Plutonium
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def view_template(&)
|
15
|
-
turbo_frame_tag(@id, src: @src, loading: @loading, **@attributes, class:
|
15
|
+
turbo_frame_tag(@id, src: @src, loading: @loading, **@attributes, class: "dyna", refresh: "morph", &)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
data/lib/plutonium/version.rb
CHANGED
data/lib/plutonium.rb
CHANGED
@@ -10,6 +10,7 @@ require "phlexi-form"
|
|
10
10
|
require "phlexi-table"
|
11
11
|
|
12
12
|
require_relative "plutonium/configuration"
|
13
|
+
require_relative "rodauth/loader"
|
13
14
|
|
14
15
|
# Plutonium module
|
15
16
|
#
|
@@ -25,6 +26,7 @@ module Plutonium
|
|
25
26
|
Loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false).tap do |loader|
|
26
27
|
loader.ignore("#{__dir__}/generators")
|
27
28
|
loader.ignore("#{__dir__}/plutonium/railtie.rb")
|
29
|
+
loader.ignore("#{__dir__}/rodauth")
|
28
30
|
loader.inflector.inflect("ui" => "UI")
|
29
31
|
loader.inflector.inflect("workflow_dsl" => "WorkflowDSL")
|
30
32
|
loader.enable_reloading if defined?(Rails.env) && Rails.env.development?
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "rodauth"
|
2
|
+
|
3
|
+
module Rodauth
|
4
|
+
Feature.define(:case_insensitive_login, :CaseInsensitiveLogin) do
|
5
|
+
def param(key)
|
6
|
+
value = super
|
7
|
+
value&.downcase! if [login_param, login_confirm_param].include?(key)
|
8
|
+
value
|
9
|
+
end
|
10
|
+
|
11
|
+
def account_from_login(login)
|
12
|
+
super(login&.downcase)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative "features/case_insensitive_login"
|
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@radioactive-labs/plutonium",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.7",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "@radioactive-labs/plutonium",
|
9
|
-
"version": "0.1.
|
9
|
+
"version": "0.1.7",
|
10
10
|
"license": "MIT",
|
11
11
|
"dependencies": {
|
12
12
|
"@hotwired/stimulus": "^3.2.2",
|
data/package.json
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
-
import { Dismiss } from 'flowbite';
|
3
|
-
|
4
2
|
|
5
3
|
// Connects to data-controller="resource-dismiss"
|
6
4
|
export default class extends Controller {
|
7
|
-
static targets = ["trigger", "target"]
|
8
|
-
|
9
5
|
static values = {
|
10
6
|
after: Number,
|
11
7
|
}
|
@@ -13,14 +9,9 @@ export default class extends Controller {
|
|
13
9
|
connect() {
|
14
10
|
console.log(`resource-dismiss connected: ${this.element}`)
|
15
11
|
|
16
|
-
// https://flowbite.com/docs/components/alerts/#javascript-behaviour
|
17
|
-
this.dismiss = new Dismiss(this.targetTarget, this.triggerTarget);
|
18
|
-
|
19
|
-
console.log(this.hasAfterValue)
|
20
|
-
console.log(this.afterValue)
|
21
12
|
if (this.hasAfterValue && this.afterValue > 0) {
|
22
13
|
this.autoDismissTimeout = setTimeout(() => {
|
23
|
-
this.
|
14
|
+
this.dismiss()
|
24
15
|
this.autoDismissTimeout = null
|
25
16
|
}, this.afterValue);
|
26
17
|
}
|
@@ -29,11 +20,10 @@ export default class extends Controller {
|
|
29
20
|
disconnect() {
|
30
21
|
if (this.autoDismissTimeout) clearTimeout(this.autoDismissTimeout)
|
31
22
|
|
32
|
-
this.dismiss = null
|
33
23
|
this.autoDismissTimeout = null
|
34
24
|
}
|
35
25
|
|
36
|
-
|
37
|
-
this.
|
26
|
+
dismiss() {
|
27
|
+
this.element.remove()
|
38
28
|
}
|
39
29
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plutonium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Froelich
|
@@ -1401,6 +1401,8 @@ files:
|
|
1401
1401
|
- lib/plutonium/ui/table/resource.rb
|
1402
1402
|
- lib/plutonium/ui/table/theme.rb
|
1403
1403
|
- lib/plutonium/version.rb
|
1404
|
+
- lib/rodauth/features/case_insensitive_login.rb
|
1405
|
+
- lib/rodauth/loader.rb
|
1404
1406
|
- lib/tasks/create_rodauth_admin.rake
|
1405
1407
|
- package-lock.json
|
1406
1408
|
- package.json
|