killbill-payment-test-ui 3.0.5 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ba5d78567ab54b194ca4b1b050f8562ae3abfb28aa14e18f51d7cee1bd61dd5
4
- data.tar.gz: 9646a9f04e755caefd2f65605c60e472d4c6b16674c51c378b3325d0d38eae1a
3
+ metadata.gz: aad272eab8ce7b017fa7904b5dab9df8e64962208fb8ff32e60e8ba9f2ee14eb
4
+ data.tar.gz: 914ed366b308504f92607a48adfab8ae51b95b5cfebdb9f86b9e041b45fece8b
5
5
  SHA512:
6
- metadata.gz: 325fbadebe0604f71622fe59791bf32db8c48d23d330362decf4384af3c5a9158b46c04a38d4cb1d74df0f1e31f5e46adefb4dbfafdc3eb7f8854f2960f0a2c4
7
- data.tar.gz: f48da58aefd594f90f558fb702a6c05378029704f6a761b6fe3982442fc8521a390cb62e17e253ad4cca3ac0da2fe9df88bb1cbc6dab219a30184263eea151e2
6
+ metadata.gz: d3b51790bd45dd45b1e2cf21e605c33c1063da3c23d951d84d88495c8bd7ddb5bc64b097aa6d366e0684b8ef934c83df862173de3e4a2413660d99fb9716cd87
7
+ data.tar.gz: 4e9f8cca5f403b94dacc0154eee452b72091afd4f48dd4d07abee8dcb746778a02dadefb3b59b02b9d67008b09ac3314c824209ef1635d0590874555072da824
@@ -4,3 +4,185 @@
4
4
  * the top of the compiled file, but it's generally better to create a new file per style scope.
5
5
  *= require_tree .
6
6
  */
7
+
8
+ #payment-status-table {
9
+ border: none;
10
+ border-spacing: 0;
11
+ }
12
+
13
+ #payment-status-table thead th {
14
+ padding: 0.375rem 1.625rem 0.375rem 0.75rem !important;
15
+ font-weight: 500 !important;
16
+ font-size: 0.875rem !important;
17
+ line-height: 1.125rem !important;
18
+ letter-spacing: 0 !important;
19
+ color: #717680 !important;
20
+ text-transform: capitalize !important;
21
+ background-color: #fafafa !important;
22
+ }
23
+
24
+ #payment-status-table thead th:first-child {
25
+ border-top-left-radius: 0.5rem;
26
+ }
27
+
28
+ #payment-status-table thead th:last-child {
29
+ border-top-right-radius: 0.5rem;
30
+ }
31
+
32
+ #payment-status-table tbody tr {
33
+ border-bottom: 0.0625rem solid #e8eaed;
34
+ transition: background-color 0.2s ease;
35
+ }
36
+
37
+ #payment-status-table tbody tr:hover {
38
+ background-color: #f8f9fa;
39
+ }
40
+
41
+ #payment-status-table tbody td {
42
+ font-weight: 500 !important;
43
+ font-size: 0.875rem !important;
44
+ padding: 1rem 0.75rem !important;
45
+ line-height: 1.125rem !important;
46
+ text-align: start !important;
47
+ color: #535862 !important;
48
+ }
49
+
50
+ #payment-status-table tbody tr:last-child td:first-child {
51
+ border-bottom-left-radius: 0.5rem;
52
+ }
53
+
54
+ #payment-status-table tbody tr:last-child td:last-child {
55
+ border-bottom-right-radius: 0.5rem;
56
+ }
57
+
58
+ .select-status {
59
+ position: relative !important;
60
+ font-weight: 500 !important;
61
+ font-size: 0.875rem !important;
62
+ line-height: 1.125rem !important;
63
+ color: #495057 !important;
64
+ background-color: #fff !important;
65
+ background-clip: padding-box !important;
66
+ border: 0.0625rem solid #ced4da !important;
67
+ background-color: #fff !important;
68
+ border-radius: 0.375rem !important;
69
+ -webkit-appearance: none !important;
70
+ -moz-appearance: none !important;
71
+ background-image: url("data:image/svg+xml;utf8,<svg width='1rem' height='1rem' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M4 6L8 10L12 6' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
72
+ background-repeat: no-repeat !important;
73
+ background-position: right 0.3125rem center !important;
74
+ background-size: 1rem 1rem !important;
75
+ padding: 0.375rem 1.25rem 0.375rem 0.5rem !important;
76
+ margin-left: 0.5rem !important;
77
+ }
78
+
79
+ .select-status:hover {
80
+ background-image: none !important;
81
+ }
82
+
83
+ .select-status:hover::after {
84
+ content: "";
85
+ position: absolute;
86
+ right: 0.3125rem !important;
87
+ top: 50%;
88
+ transform: translateY(-50%);
89
+ width: 1rem;
90
+ height: 1rem;
91
+ background-image: url("data:image/svg+xml;utf8,<svg width='1rem' height='1rem' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M4 6L8 10L12 6' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
92
+ background-repeat: no-repeat;
93
+ background-position: center;
94
+ background-size: 1rem 1rem;
95
+ }
96
+
97
+ .label {
98
+ display: inline-flex !important;
99
+ align-items: center !important;
100
+ padding: 0rem 0.75rem !important;
101
+ border-radius: 1rem !important;
102
+ font-size: 0.75rem !important;
103
+ font-weight: 500 !important;
104
+ text-transform: uppercase !important;
105
+ letter-spacing: 0.03125rem !important;
106
+ }
107
+
108
+ .label-success {
109
+ background-color: #e8f5e8 !important;
110
+ color: #137333 !important;
111
+ }
112
+
113
+ .label-warning {
114
+ background-color: #fef7e0 !important;
115
+ color: #b06000 !important;
116
+ }
117
+
118
+ .label-danger {
119
+ background-color: #fce8e6 !important;
120
+ color: #d93025 !important;
121
+ }
122
+
123
+ #payment-status-table thead th span {
124
+ display: inline-flex;
125
+ align-items: center;
126
+ gap: 0.5rem !important;
127
+ }
128
+
129
+ .sort-icon {
130
+ display: inline-flex;
131
+ flex-direction: column;
132
+ margin-left: 0.25rem;
133
+ }
134
+
135
+ .sort-icon::before,
136
+ .sort-icon::after {
137
+ content: "";
138
+ width: 0;
139
+ height: 0;
140
+ border-left: 0.25rem solid transparent;
141
+ border-right: 0.25rem solid transparent;
142
+ line-height: 1;
143
+ }
144
+
145
+ .sort-icon::before {
146
+ border-bottom: 0.25rem solid #9aa0a6;
147
+ margin-bottom: 0.0625rem;
148
+ }
149
+
150
+ .sort-icon::after {
151
+ border-top: 0.25rem solid #9aa0a6;
152
+ }
153
+
154
+ #payment-status-table tbody td:first-child {
155
+ font-weight: 500;
156
+ color: #1a73e8;
157
+ }
158
+
159
+ .status-menu {
160
+ margin-left: 0.5rem;
161
+ }
162
+
163
+ .status-menu .btn {
164
+ padding: 0.25rem 0.5rem;
165
+ font-size: 0.75rem;
166
+ border: 0.0625rem solid #dadce0;
167
+ background-color: white;
168
+ color: #5f6368;
169
+ border-radius: 0.25rem;
170
+ transition: all 0.2s ease;
171
+ }
172
+
173
+ .status-menu .btn:hover {
174
+ background-color: #f8f9fa;
175
+ border-color: #5f6368;
176
+ }
177
+
178
+ @media (max-width: 48rem) {
179
+ #payment-status-table-wrapper {
180
+ padding: 0.625rem;
181
+ }
182
+
183
+ #payment-status-table thead th,
184
+ #payment-status-table tbody td {
185
+ padding: 0.75rem 1rem;
186
+ font-size: 0.8125rem;
187
+ }
188
+ }
@@ -0,0 +1,8 @@
1
+ <%#
2
+ This is a placeholder menu dropdown component for standalone gem usage.
3
+
4
+ This placeholder prevents "missing template" errors when running
5
+ the gem independently during development or testing.
6
+ %>
7
+
8
+ <!-- Menu dropdown placeholder for standalone gem -->
@@ -1,45 +1,53 @@
1
- <div class="search">
2
-
3
- <div class="column-block">
4
-
5
- <h1>Payment Test Status</h1>
6
-
7
- <div id="payment-status-table-wrapper">
8
- <table id="payment-status-table" class="table table-condensed table-striped mobile-data">
1
+ <div class="register add-new-custom-field-details">
2
+ <div>
3
+ <div class="mx-auto" style="max-width: 80rem;">
4
+ <h5 class="add-new-custom-field-title border-bottom pb-3 mb-3">
5
+ <span class="icon-container">
6
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
7
+ <path d="M16.6667 3.33325H3.33341C2.41294 3.33325 1.66675 4.07944 1.66675 4.99992V14.9999C1.66675 15.9204 2.41294 16.6666 3.33341 16.6666H16.6667C17.5872 16.6666 18.3334 15.9204 18.3334 14.9999V4.99992C18.3334 4.07944 17.5872 3.33325 16.6667 3.33325Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
8
+ <path d="M8.33325 13.3333H9.58325M12.0833 13.3333H14.9999" stroke="#414651" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
9
+ <path d="M1.66675 7.5H18.3334" stroke="#414651" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="round"/>
10
+ </svg>
11
+ </span>
12
+ Payment Test Status
13
+ </h5>
14
+ <div id="payment-status-table-wrapper">
15
+ <table id="payment-status-table">
9
16
  <thead>
10
- <tr>
11
- <th>Method</th>
12
- <th>
13
- <span>Status</span>
17
+ <tr>
18
+ <th>Method</th>
19
+ <th class="d-flex align-items-center">
20
+ <span>Status </span>
21
+ <% menu_items = [
22
+ { label: 'Clear all status', url: reset_path, method: :post },
23
+ { label: 'Configure ERROR', url: set_failed_state_path(:state => :ERROR), method: :post },
24
+ { label: 'Configure PENDING', url: set_failed_state_path(:state => :PENDING), method: :post },
25
+ { label: 'Configure CANCELED', url: set_failed_state_path(:state => :CANCELED), method: :post },
26
+ { label: 'Configure THROW', url: set_failed_state_path(:state => :THROW), method: :post }
27
+ ] %>
14
28
 
15
- <div class="btn-group">
16
- <a class="btn btn-xs dropdown-toggle" data-toggle="dropdown" href="#">
17
- Set status
18
- <span class="caret"></span>
19
- </a>
20
- <ul class="dropdown-menu">
21
- <li><%= link_to 'Clear all status', reset_path, :method => :post %></li>
22
- <li><%= link_to 'Configure ERROR', set_failed_state_path(:state => :ERROR), :method => :post %></li>
23
- <li><%= link_to 'Configure PENDING', set_failed_state_path(:state => :PENDING), :method => :post %></li>
24
- <li><%= link_to 'Configure CANCELED', set_failed_state_path(:state => :CANCELED), :method => :post %></li>
25
- <li><%= link_to 'Configure THROW', set_failed_state_path(:state => :THROW), :method => :post %></li>
26
- </ul>
27
- </div>
28
- </th>
29
- </tr>
29
+ <%= render partial: "kaui/components/menu_dropdown/menu_dropdown", locals: {
30
+ variant: "btn-light",
31
+ label: raw("Set status&nbsp;"),
32
+ dropdown_id: "statusDropdown",
33
+ html_class: "select-status",
34
+ menu_items: menu_items
35
+ } %>
36
+ </th>
37
+ </tr>
30
38
  </thead>
31
39
  <tbody>
32
- <% @methods.each do |m| %>
33
- <tr>
34
- <td><%= m %></td>
35
- <td>
36
- <span class="label label-<%= @status == 'CLEAR' ? 'success' : (@status.starts_with?('SLEEP') ? 'warning' : 'danger') %>"><%= @status %></span>
37
- </td>
38
- </tr>
39
- <% end %>
40
+ <% @methods.each do |m| %>
41
+ <tr>
42
+ <td><%= m %></td>
43
+ <td>
44
+ <span class="label label-<%= @status == 'CLEAR' ? 'success' : (@status.starts_with?('SLEEP') ? 'warning' : 'danger') %>"><%= @status %></span>
45
+ </td>
46
+ </tr>
47
+ <% end %>
40
48
  </tbody>
41
49
  </table>
42
50
  </div>
43
-
44
51
  </div>
52
+ </div>
45
53
  </div>
@@ -51,7 +51,7 @@ module Killbill
51
51
 
52
52
  body['SLEEP_TIME_SEC'] = arg if action == 'ACTION_CLEAR'
53
53
 
54
- body['METHODS'] = methods.nil? ? nil : methods.join(',')
54
+ body['METHODS'] = methods&.join(',')
55
55
 
56
56
  KillBillClient::API.post "#{KILLBILL_PAYMENT_TEST_PREFIX}/configure",
57
57
  body.to_json,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PaymentTest
4
- VERSION = '3.0.5'
4
+ VERSION = '4.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-payment-test-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-10 00:00:00.000000000 Z
11
+ date: 2025-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: killbill-assets-ui
@@ -69,6 +69,7 @@ files:
69
69
  - app/controllers/payment_test/engine_controller.rb
70
70
  - app/controllers/payment_test/payments_controller.rb
71
71
  - app/helpers/payment_test/application_helper.rb
72
+ - app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb
72
73
  - app/views/payment_test/layouts/payment_test_application.html.erb
73
74
  - app/views/payment_test/payments/index.html.erb
74
75
  - config/routes.rb