signum 0.4.13 → 0.5.0

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: ed7099f07650630cdafb4863f0abcdbf1bcc3e2e77edbf4c130204fd5a148f60
4
- data.tar.gz: 59757f06d37a7a0e73911c69b1f8111ebc019905a9e585c21b9b8f8ddcce9776
3
+ metadata.gz: 24b0e2cdc6b8936ceb9c1cb718ec2e78c53ef50fbb7cbad8b174b92f9b500a64
4
+ data.tar.gz: aac0042cb09a5df30ecc681a6b51da1427fd3120a20a11a8d8fce4ed39ccaeb7
5
5
  SHA512:
6
- metadata.gz: 374e02bc0f6b76caeecfc49869c830ca025b98fef9eb7154c02fddffc899eb6bd9f3093017f336131f053dd5bfb45a8cc4b1ab13b95150639a550f19722dc60c
7
- data.tar.gz: 24ef26d963b3d1db38f09621cefae2994c054359f76ef7614de84c3db6dbe88765966a8ca53dba250a96196fc6368764dcbc0d96ed573b2e5945dc600acabd0c
6
+ metadata.gz: 42b34828f5bea2a46a40c52be15f5fa9bebd6904110820e301dded3fe3f8fcc065941e505c441ea60d43babe3e894655c504d6a4060eb130d373769cd3c7042b
7
+ data.tar.gz: 738bed62ed28d5ca6ae5f6013354374462f898f1a925dec27695a955bc5945e5e89fb2e90822f04d2fdecafb6c0a210bda71c43ce34615e5b99e17a3267cb7c0
@@ -13,7 +13,7 @@ export default class extends ApplicationController {
13
13
  close(event) {
14
14
  setTimeout(() => {
15
15
  this.element?.parentElement?.remove()
16
- if (event) {
16
+ if (event && this.typeValue != "balloon") {
17
17
  this.markClose()
18
18
  }
19
19
  }, 300)
@@ -0,0 +1,5 @@
1
+ = helpers.turbo_stream_from :signals
2
+
3
+ .pointer-events-none.fixed.inset-0.flex.items-end.px-2.py-6.sm:items-start.sm:p-6.z-10 data-turbo-permanent="true" id="signum_notifications"
4
+ #notifications_all.flex.w-full.flex-col.items-center.space-y-2.sm:items-end
5
+ div.flex.w-full.flex-col.items-center.space-y-2.sm:items-end[id="#{Signum.config.balloon_notifications_container_id.call}"]
@@ -0,0 +1,9 @@
1
+ module Signum
2
+ module Notifications
3
+ class Component < ViewComponent::Base
4
+
5
+ def initialize()
6
+ end
7
+ end
8
+ end
9
+ end
@@ -11,10 +11,10 @@ module Signum
11
11
  def broadcast_create
12
12
  broadcast! if can_broadcast?
13
13
 
14
- broadcast_prepend_to(:signals, target: Signum.config.balloon_notifications_container_id.call,
14
+ broadcast_prepend_to(:signals, target: Signum.config.balloon_notifications_container_id.call(signalable, id),
15
15
  html: ApplicationController.render(Signum::Notification::Component.new(self)))
16
16
 
17
- broadcast_prepend_to(:signals, target: Signum.config.drawer_notifications_container_id.call,
17
+ broadcast_prepend_to(:signals, target: Signum.config.drawer_notifications_container_id.call(signalable, id),
18
18
  html: ApplicationController.render(Signum::NotificationDrawerItem::Component.new(signal: self)))
19
19
  end
20
20
 
@@ -35,8 +35,8 @@ module Signum
35
35
  option :base_service, default: '::ApplicationService'
36
36
  option :base_service_context, default: '::ApplicationContext'
37
37
  option :current_user, default: -> {}
38
- option :drawer_notifications_container_id, default: -> {}
39
- option :balloon_notifications_container_id, default: -> {}
38
+ option :drawer_notifications_container_id, default: ->(signalable = nil, id = nil) {}
39
+ option :balloon_notifications_container_id, default: ->(signalable = nil, id = nil) {}
40
40
  option :icons,
41
41
  default: { info: 'fa-solid fa-circle-info fa-lg',
42
42
  error: 'fa-solid fa-square-xmark fa-lg',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Signum
4
- VERSION = "0.4.13"
4
+ VERSION = "0.5.0"
5
5
  end
data/signum.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency 'pg'
22
22
  spec.add_dependency 'rails', '> 6.0'
23
- spec.add_dependency 'state_machines-activemodel'
23
+ spec.add_dependency 'state_machines-activerecord'
24
24
 
25
25
  spec.add_development_dependency 'auxilium', '~> 3'
26
26
  spec.add_development_dependency 'sqlite3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-24 00:00:00.000000000 Z
11
+ date: 2024-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '6.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: state_machines-activemodel
42
+ name: state_machines-activerecord
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -183,6 +183,8 @@ files:
183
183
  - app/components/signum/notification_drawer_item/component.html.slim
184
184
  - app/components/signum/notification_drawer_item/component.rb
185
185
  - app/components/signum/notification_drawer_item/component_controller.js
186
+ - app/components/signum/notifications/component.html.slim
187
+ - app/components/signum/notifications/component.rb
186
188
  - app/controllers/signum/api_controller.rb
187
189
  - app/controllers/signum/application_controller.rb
188
190
  - app/controllers/signum/signal_controller.rb