kaui 3.0.9 → 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.
Files changed (259) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/kaui/account/authorize.svg +4 -0
  3. data/app/assets/images/kaui/account/credit.svg +4 -0
  4. data/app/assets/images/kaui/account/down-arrow.svg +3 -0
  5. data/app/assets/images/kaui/account/edit.svg +4 -0
  6. data/app/assets/images/kaui/account/pay-all.svg +5 -0
  7. data/app/assets/images/kaui/account/plus.svg +3 -0
  8. data/app/assets/images/kaui/account/purchase.svg +5 -0
  9. data/app/assets/images/kaui/account/refresh.svg +5 -0
  10. data/app/assets/images/kaui/arrow.svg +3 -0
  11. data/app/assets/images/kaui/card.svg +5 -0
  12. data/app/assets/images/kaui/copy.svg +12 -0
  13. data/app/assets/images/kaui/dashboard/aviate.svg +6 -0
  14. data/app/assets/images/kaui/dashboard/custom-field.svg +5 -0
  15. data/app/assets/images/kaui/dashboard/kaui-doc-img.png +0 -0
  16. data/app/assets/images/kaui/dashboard/plugins.svg +7 -0
  17. data/app/assets/images/kaui/dashboard/tags.svg +4 -0
  18. data/app/assets/images/kaui/dashboard/users.svg +6 -0
  19. data/app/assets/images/kaui/delete.svg +6 -0
  20. data/app/assets/images/kaui/dots.svg +5 -0
  21. data/app/assets/images/kaui/download-csv.svg +5 -0
  22. data/app/assets/images/kaui/download.svg +4 -0
  23. data/app/assets/images/kaui/eye-off.svg +9 -0
  24. data/app/assets/images/kaui/eye.svg +7 -0
  25. data/app/assets/images/kaui/file-upload.svg +34 -0
  26. data/app/assets/images/kaui/generate.svg +5 -0
  27. data/app/assets/images/kaui/header/account.svg +4 -0
  28. data/app/assets/images/kaui/header/cog_icon.svg +4 -0
  29. data/app/assets/images/kaui/header/invoice.svg +5 -0
  30. data/app/assets/images/kaui/header/payment.svg +5 -0
  31. data/app/assets/images/kaui/header/search_icon.svg +4 -0
  32. data/app/assets/images/kaui/header/subscription.svg +6 -0
  33. data/app/assets/images/kaui/logout.svg +4 -0
  34. data/app/assets/images/kaui/modal/close.svg +3 -0
  35. data/app/assets/images/kaui/modal/plus.svg +3 -0
  36. data/app/assets/images/kaui/modal/red-close.svg +10 -0
  37. data/app/assets/images/kaui/modal/search.svg +4 -0
  38. data/app/assets/images/kaui/payment/payment.svg +4 -0
  39. data/app/assets/images/kaui/payment/refund.svg +4 -0
  40. data/app/assets/images/kaui/plus.svg +3 -0
  41. data/app/assets/images/kaui/search.svg +4 -0
  42. data/app/assets/images/kaui/setting/account.svg +10 -0
  43. data/app/assets/images/kaui/setting/analytics.svg +7 -0
  44. data/app/assets/images/kaui/setting/custom-field.svg +5 -0
  45. data/app/assets/images/kaui/setting/e-notifications.svg +6 -0
  46. data/app/assets/images/kaui/setting/plugins.svg +7 -0
  47. data/app/assets/images/kaui/setting/plus.svg +3 -0
  48. data/app/assets/images/kaui/setting/reset.svg +4 -0
  49. data/app/assets/images/kaui/setting/tag-definitions.svg +5 -0
  50. data/app/assets/images/kaui/setting/tags.svg +4 -0
  51. data/app/assets/images/kaui/setting/tenants.svg +6 -0
  52. data/app/assets/images/kaui/setting/users.svg +6 -0
  53. data/app/assets/images/kaui/setting.svg +4 -0
  54. data/app/assets/images/kaui/sidebar/account.svg +4 -0
  55. data/app/assets/images/kaui/sidebar/audit.svg +5 -0
  56. data/app/assets/images/kaui/sidebar/custom-fields.svg +5 -0
  57. data/app/assets/images/kaui/sidebar/invoices.svg +5 -0
  58. data/app/assets/images/kaui/sidebar/payments.svg +5 -0
  59. data/app/assets/images/kaui/sidebar/queues.svg +5 -0
  60. data/app/assets/images/kaui/sidebar/subscriptions.svg +6 -0
  61. data/app/assets/images/kaui/sidebar/tags.svg +5 -0
  62. data/app/assets/images/kaui/sidebar/timeline.svg +5 -0
  63. data/app/assets/images/kaui/sign_in_background.svg +57 -0
  64. data/app/assets/images/kaui/sort-down.svg +3 -0
  65. data/app/assets/images/kaui/sort-up.svg +3 -0
  66. data/app/assets/images/kaui/subscription/add-on.svg +7 -0
  67. data/app/assets/images/kaui/subscription/cancel.svg +6 -0
  68. data/app/assets/images/kaui/subscription/change.svg +6 -0
  69. data/app/assets/images/kaui/subscription/date.svg +6 -0
  70. data/app/assets/images/kaui/subscription/pause.svg +4 -0
  71. data/app/assets/images/kaui/timeline/authorize.svg +5 -0
  72. data/app/assets/images/kaui/timeline/capture.svg +5 -0
  73. data/app/assets/images/kaui/timeline/chargeback.svg +3 -0
  74. data/app/assets/images/kaui/timeline/credit.svg +6 -0
  75. data/app/assets/images/kaui/timeline/invoice.svg +5 -0
  76. data/app/assets/images/kaui/timeline/purchase.svg +5 -0
  77. data/app/assets/images/kaui/timeline/refund.svg +4 -0
  78. data/app/assets/images/kaui/timeline/void.svg +4 -0
  79. data/app/assets/images/kaui/view-doc.svg +6 -0
  80. data/app/assets/images/kaui/warning.png +0 -0
  81. data/app/assets/javascripts/application.js +2 -2
  82. data/app/assets/javascripts/kaui/kaui_override.js +232 -0
  83. data/app/assets/javascripts/kaui/multi_functions_bar_utils.js +125 -24
  84. data/app/assets/stylesheets/application.css +13 -1
  85. data/app/assets/stylesheets/kaui/account.css +2028 -14
  86. data/app/assets/stylesheets/kaui/account_timeline.css +183 -0
  87. data/app/assets/stylesheets/kaui/admin_allowed_users.css +260 -0
  88. data/app/assets/stylesheets/kaui/audit.css +26 -16
  89. data/app/assets/stylesheets/kaui/audit_logs.css +443 -0
  90. data/app/assets/stylesheets/kaui/auth_pages.css +72 -0
  91. data/app/assets/stylesheets/kaui/breadcrumb.css +38 -0
  92. data/app/assets/stylesheets/kaui/chargebacks.css +118 -0
  93. data/app/assets/stylesheets/kaui/clock.css +103 -0
  94. data/app/assets/stylesheets/kaui/common.css +1744 -401
  95. data/app/assets/stylesheets/kaui/custom_fields.css +546 -0
  96. data/app/assets/stylesheets/kaui/dashboard.css +26 -0
  97. data/app/assets/stylesheets/kaui/datatable.css +114 -56
  98. data/app/assets/stylesheets/kaui/header.css +221 -114
  99. data/app/assets/stylesheets/kaui/home.css +89 -62
  100. data/app/assets/stylesheets/kaui/invoice.css +1061 -27
  101. data/app/assets/stylesheets/kaui/kaui.css +217 -145
  102. data/app/assets/stylesheets/kaui/overdue.css +5 -3
  103. data/app/assets/stylesheets/kaui/payment.css +1102 -13
  104. data/app/assets/stylesheets/kaui/queues.css +269 -0
  105. data/app/assets/stylesheets/kaui/refunds.css +185 -0
  106. data/app/assets/stylesheets/kaui/role_definitions.css +111 -0
  107. data/app/assets/stylesheets/kaui/sidebar.css +122 -0
  108. data/app/assets/stylesheets/kaui/subscription.css +677 -0
  109. data/app/assets/stylesheets/kaui/tag_definitions.css +524 -0
  110. data/app/assets/stylesheets/kaui/tags.css +592 -121
  111. data/app/assets/stylesheets/kaui/tenants.css +1478 -0
  112. data/app/assets/stylesheets/kaui/tooltip.css +9 -5
  113. data/app/assets/stylesheets/kaui/wallets.css +121 -0
  114. data/app/controllers/kaui/accounts_controller.rb +3 -2
  115. data/app/controllers/kaui/admin_tenants_controller.rb +33 -0
  116. data/app/controllers/kaui/custom_fields_controller.rb +1 -1
  117. data/app/controllers/kaui/engine_controller.rb +1 -2
  118. data/app/controllers/kaui/engine_controller_util.rb +5 -7
  119. data/app/controllers/kaui/home_controller.rb +24 -17
  120. data/app/controllers/kaui/invoices_controller.rb +4 -15
  121. data/app/controllers/kaui/payments_controller.rb +1 -1
  122. data/app/controllers/kaui/sessions_controller.rb +1 -0
  123. data/app/controllers/kaui/tag_definitions_controller.rb +1 -0
  124. data/app/helpers/kaui/account_helper.rb +13 -0
  125. data/app/helpers/kaui/plugin_helper.rb +27 -0
  126. data/app/views/kaui/account_custom_fields/index.html.erb +95 -29
  127. data/app/views/kaui/account_emails/_account_emails_table.html.erb +13 -3
  128. data/app/views/kaui/account_emails/_form.html.erb +23 -6
  129. data/app/views/kaui/account_emails/new.html.erb +12 -6
  130. data/app/views/kaui/account_tags/_form_bar.html.erb +10 -1
  131. data/app/views/kaui/account_tags/index.html.erb +103 -24
  132. data/app/views/kaui/account_timelines/_multi_functions_bar.html.erb +302 -69
  133. data/app/views/kaui/account_timelines/show.html.erb +360 -254
  134. data/app/views/kaui/accounts/_account_details.html.erb +165 -0
  135. data/app/views/kaui/accounts/_account_filterbar.html.erb +70 -80
  136. data/app/views/kaui/accounts/_add_parent.html.erb +26 -0
  137. data/app/views/kaui/accounts/_billing_details.html.erb +196 -0
  138. data/app/views/kaui/accounts/_close_account_modal.html.erb +62 -40
  139. data/app/views/kaui/accounts/_form_account.html.erb +157 -0
  140. data/app/views/kaui/accounts/_functions_bar.html.erb +606 -0
  141. data/app/views/kaui/accounts/_link_parent_modal.html.erb +1 -1
  142. data/app/views/kaui/accounts/_link_parent_to_modal.html.erb +62 -0
  143. data/app/views/kaui/accounts/_multi_functions_bar.html.erb +67 -28
  144. data/app/views/kaui/accounts/_payment_gateways.html.erb +43 -0
  145. data/app/views/kaui/accounts/_personal_details.html.erb +67 -0
  146. data/app/views/kaui/accounts/edit.html.erb +15 -9
  147. data/app/views/kaui/accounts/index.html.erb +77 -27
  148. data/app/views/kaui/accounts/new.html.erb +14 -8
  149. data/app/views/kaui/accounts/show.html.erb +17 -11
  150. data/app/views/kaui/admin/index.html.erb +44 -19
  151. data/app/views/kaui/admin_allowed_users/_form.html.erb +123 -31
  152. data/app/views/kaui/admin_allowed_users/edit.html.erb +15 -9
  153. data/app/views/kaui/admin_allowed_users/index.html.erb +150 -30
  154. data/app/views/kaui/admin_allowed_users/new.html.erb +14 -8
  155. data/app/views/kaui/admin_allowed_users/show.html.erb +137 -32
  156. data/app/views/kaui/admin_tenants/_add_allowed_user_modal.html.erb +42 -15
  157. data/app/views/kaui/admin_tenants/_clock.html.erb +72 -0
  158. data/app/views/kaui/admin_tenants/_form.html.erb +32 -20
  159. data/app/views/kaui/admin_tenants/_form_catalog_translation.erb +21 -8
  160. data/app/views/kaui/admin_tenants/_form_invoice_template.erb +25 -9
  161. data/app/views/kaui/admin_tenants/_form_invoice_translation.erb +36 -20
  162. data/app/views/kaui/admin_tenants/_form_plugin_config.erb +16 -20
  163. data/app/views/kaui/admin_tenants/_show_catalog.erb +13 -6
  164. data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +95 -46
  165. data/app/views/kaui/admin_tenants/_show_catalog_xml.erb +62 -37
  166. data/app/views/kaui/admin_tenants/_show_overdue.erb +91 -75
  167. data/app/views/kaui/admin_tenants/_tenant_details.html.erb +106 -17
  168. data/app/views/kaui/admin_tenants/_tenants_table.html.erb +67 -6
  169. data/app/views/kaui/admin_tenants/_useful_links.html.erb +21 -16
  170. data/app/views/kaui/admin_tenants/index.html.erb +35 -11
  171. data/app/views/kaui/admin_tenants/index.js.erb +3 -0
  172. data/app/views/kaui/admin_tenants/new.html.erb +19 -13
  173. data/app/views/kaui/admin_tenants/new_catalog.html.erb +230 -98
  174. data/app/views/kaui/admin_tenants/new_overdue_config.html.erb +152 -80
  175. data/app/views/kaui/admin_tenants/new_plan_currency.html.erb +44 -30
  176. data/app/views/kaui/admin_tenants/show.html.erb +211 -78
  177. data/app/views/kaui/admin_tenants/show.js.erb +3 -0
  178. data/app/views/kaui/audit_logs/_multi_functions_bar.html.erb +298 -101
  179. data/app/views/kaui/audit_logs/index.html.erb +137 -38
  180. data/app/views/kaui/bundle_tags/_form_bar.html.erb +11 -4
  181. data/app/views/kaui/bundles/_bundle_details.html.erb +24 -12
  182. data/app/views/kaui/bundles/index.html.erb +79 -104
  183. data/app/views/kaui/bundles/pause_resume.html.erb +73 -38
  184. data/app/views/kaui/chargebacks/_form.html.erb +35 -18
  185. data/app/views/kaui/chargebacks/new.html.erb +16 -9
  186. data/app/views/kaui/charges/_form.html.erb +54 -42
  187. data/app/views/kaui/charges/new.html.erb +15 -8
  188. data/app/views/kaui/components/breadcrumb/_breadcrumb.html.erb +146 -0
  189. data/app/views/kaui/components/button/_button.html.erb +16 -0
  190. data/app/views/kaui/components/dashboard/_card.html.erb +15 -0
  191. data/app/views/kaui/components/dashboard/_setting.html.erb +15 -0
  192. data/app/views/kaui/components/form_input/_form_input.html.erb +4 -0
  193. data/app/views/kaui/components/form_password/_form_password.html.erb +6 -0
  194. data/app/views/kaui/components/logo/_logo.html.erb +1 -0
  195. data/app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb +59 -0
  196. data/app/views/kaui/components/search_input/_search_input.html.erb +81 -0
  197. data/app/views/kaui/credits/_form.html.erb +42 -25
  198. data/app/views/kaui/credits/new.html.erb +15 -8
  199. data/app/views/kaui/custom_fields/_form.html.erb +37 -25
  200. data/app/views/kaui/custom_fields/_list_bar.html.erb +11 -10
  201. data/app/views/kaui/custom_fields/index.html.erb +121 -27
  202. data/app/views/kaui/custom_fields/new.html.erb +19 -8
  203. data/app/views/kaui/errors/500.html.erb +1 -1
  204. data/app/views/kaui/home/index.html.erb +77 -30
  205. data/app/views/kaui/invoice_items/_edit_form.html.erb +30 -14
  206. data/app/views/kaui/invoice_items/edit.html.erb +15 -7
  207. data/app/views/kaui/invoice_tags/_form_bar.html.erb +13 -3
  208. data/app/views/kaui/invoices/_invoice_filterbar.html.erb +53 -69
  209. data/app/views/kaui/invoices/_invoice_table.html.erb +77 -92
  210. data/app/views/kaui/invoices/_multi_functions_bar.html.erb +351 -140
  211. data/app/views/kaui/invoices/index.html.erb +89 -27
  212. data/app/views/kaui/invoices/show.html.erb +392 -80
  213. data/app/views/kaui/layouts/kaui_account_sidebar.html.erb +42 -0
  214. data/app/views/kaui/layouts/kaui_application.html.erb +29 -15
  215. data/app/views/kaui/layouts/kaui_flash.html.erb +82 -31
  216. data/app/views/kaui/layouts/kaui_navbar.html.erb +109 -82
  217. data/app/views/kaui/layouts/kaui_setting_sidebar.html.erb +36 -0
  218. data/app/views/kaui/payment_methods/_form.html.erb +32 -11
  219. data/app/views/kaui/payment_methods/_new_creditcard_payment_method.html.erb +35 -34
  220. data/app/views/kaui/payment_methods/_payment_methods_details_table.html.erb +27 -29
  221. data/app/views/kaui/payment_methods/_payment_methods_table.html.erb +116 -38
  222. data/app/views/kaui/payment_methods/_plugin_properties.html.erb +19 -9
  223. data/app/views/kaui/payment_methods/new.html.erb +14 -8
  224. data/app/views/kaui/payments/_form.html.erb +30 -13
  225. data/app/views/kaui/payments/_multi_functions_bar.html.erb +351 -141
  226. data/app/views/kaui/payments/_payment_filterbar.html.erb +63 -79
  227. data/app/views/kaui/payments/_payment_invoice_table.html.erb +105 -0
  228. data/app/views/kaui/payments/_payment_table.html.erb +4 -67
  229. data/app/views/kaui/payments/index.html.erb +90 -26
  230. data/app/views/kaui/payments/new.html.erb +15 -8
  231. data/app/views/kaui/payments/show.html.erb +222 -28
  232. data/app/views/kaui/queues/index.html.erb +329 -111
  233. data/app/views/kaui/refunds/_form.html.erb +68 -45
  234. data/app/views/kaui/refunds/new.html.erb +15 -8
  235. data/app/views/kaui/role_definitions/_form.html.erb +104 -17
  236. data/app/views/kaui/role_definitions/new.html.erb +15 -8
  237. data/app/views/kaui/sessions/_form.html.erb +9 -19
  238. data/app/views/kaui/sessions/new.html.erb +10 -9
  239. data/app/views/kaui/subscriptions/_cancel_by_date_modal.html.erb +65 -35
  240. data/app/views/kaui/subscriptions/_edit_form.html.erb +66 -35
  241. data/app/views/kaui/subscriptions/_form.html.erb +63 -32
  242. data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +215 -57
  243. data/app/views/kaui/subscriptions/edit.html.erb +19 -8
  244. data/app/views/kaui/subscriptions/edit_bcd.erb +46 -16
  245. data/app/views/kaui/subscriptions/new.html.erb +22 -15
  246. data/app/views/kaui/tag_definitions/_form.html.erb +51 -30
  247. data/app/views/kaui/tag_definitions/index.html.erb +151 -40
  248. data/app/views/kaui/tag_definitions/new.html.erb +15 -8
  249. data/app/views/kaui/tags/index.html.erb +136 -47
  250. data/app/views/kaui/tenants/_form.html.erb +8 -5
  251. data/app/views/kaui/tenants/index.html.erb +15 -9
  252. data/app/views/kaui/transactions/_control_plugin_names.html.erb +18 -10
  253. data/app/views/kaui/transactions/_form.html.erb +86 -25
  254. data/app/views/kaui/transactions/new.html.erb +15 -9
  255. data/config/routes.rb +1 -0
  256. data/lib/kaui/engine.rb +11 -0
  257. data/lib/kaui/version.rb +1 -1
  258. data/lib/kaui.rb +0 -1
  259. metadata +120 -2
@@ -0,0 +1,57 @@
1
+ <svg width="768" height="504" viewBox="0 0 768 504" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <mask id="mask0_158_13675" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="-264" width="768" height="768">
3
+ <rect width="768" height="768" transform="translate(0 -264)" fill="url(#paint0_radial_158_13675)"/>
4
+ </mask>
5
+ <g mask="url(#mask0_158_13675)">
6
+ <g clip-path="url(#clip0_158_13675)">
7
+ <g clip-path="url(#clip1_158_13675)">
8
+ <line x1="0.5" y1="-264" x2="0.5" y2="504" stroke="#E9EAEB"/>
9
+ <line x1="48.5" y1="-264" x2="48.5" y2="504" stroke="#E9EAEB"/>
10
+ <line x1="96.5" y1="-264" x2="96.5" y2="504" stroke="#E9EAEB"/>
11
+ <line x1="144.5" y1="-264" x2="144.5" y2="504" stroke="#E9EAEB"/>
12
+ <line x1="192.5" y1="-264" x2="192.5" y2="504" stroke="#E9EAEB"/>
13
+ <line x1="240.5" y1="-264" x2="240.5" y2="504" stroke="#E9EAEB"/>
14
+ <line x1="288.5" y1="-264" x2="288.5" y2="504" stroke="#E9EAEB"/>
15
+ <line x1="336.5" y1="-264" x2="336.5" y2="504" stroke="#E9EAEB"/>
16
+ <line x1="384.5" y1="-264" x2="384.5" y2="504" stroke="#E9EAEB"/>
17
+ <line x1="432.5" y1="-264" x2="432.5" y2="504" stroke="#E9EAEB"/>
18
+ <line x1="480.5" y1="-264" x2="480.5" y2="504" stroke="#E9EAEB"/>
19
+ <line x1="528.5" y1="-264" x2="528.5" y2="504" stroke="#E9EAEB"/>
20
+ <line x1="576.5" y1="-264" x2="576.5" y2="504" stroke="#E9EAEB"/>
21
+ <line x1="624.5" y1="-264" x2="624.5" y2="504" stroke="#E9EAEB"/>
22
+ <line x1="672.5" y1="-264" x2="672.5" y2="504" stroke="#E9EAEB"/>
23
+ <line x1="720.5" y1="-264" x2="720.5" y2="504" stroke="#E9EAEB"/>
24
+ </g>
25
+ <rect x="0.5" y="-263.5" width="767" height="767" stroke="#E9EAEB"/>
26
+ <g clip-path="url(#clip2_158_13675)">
27
+ <line y1="23.5" x2="768" y2="23.5" stroke="#E9EAEB"/>
28
+ <line y1="71.5" x2="768" y2="71.5" stroke="#E9EAEB"/>
29
+ <line y1="119.5" x2="768" y2="119.5" stroke="#E9EAEB"/>
30
+ <line y1="167.5" x2="768" y2="167.5" stroke="#E9EAEB"/>
31
+ <line y1="215.5" x2="768" y2="215.5" stroke="#E9EAEB"/>
32
+ <line y1="263.5" x2="768" y2="263.5" stroke="#E9EAEB"/>
33
+ <line y1="311.5" x2="768" y2="311.5" stroke="#E9EAEB"/>
34
+ <line y1="359.5" x2="768" y2="359.5" stroke="#E9EAEB"/>
35
+ <line y1="407.5" x2="768" y2="407.5" stroke="#E9EAEB"/>
36
+ <line y1="455.5" x2="768" y2="455.5" stroke="#E9EAEB"/>
37
+ <line y1="503.5" x2="768" y2="503.5" stroke="#E9EAEB"/>
38
+ </g>
39
+ <rect x="0.5" y="-263.5" width="767" height="767" stroke="#E9EAEB"/>
40
+ </g>
41
+ </g>
42
+ <defs>
43
+ <radialGradient id="paint0_radial_158_13675" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(384 384) rotate(90) scale(384 384)">
44
+ <stop/>
45
+ <stop offset="1" stop-opacity="0"/>
46
+ </radialGradient>
47
+ <clipPath id="clip0_158_13675">
48
+ <rect width="768" height="768" fill="white" transform="translate(0 -264)"/>
49
+ </clipPath>
50
+ <clipPath id="clip1_158_13675">
51
+ <rect y="-264" width="768" height="768" fill="white"/>
52
+ </clipPath>
53
+ <clipPath id="clip2_158_13675">
54
+ <rect y="-264" width="768" height="768" fill="white"/>
55
+ </clipPath>
56
+ </defs>
57
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="sort-icon sort-desc" xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img" aria-label="sort descending">
2
+ <path d="M3 6.5L6 9.5L9 6.5" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="sort-icon sort-asc" xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img" aria-label="sort ascending">
2
+ <path d="M3 5.5L6 2.5L9 5.5" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,7 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M13 2.99984L14.3333 1.6665" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M1.6665 14.3333L2.99984 13" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M7.8621 10.8618L4.8049 7.80462C4.54455 7.54429 4.12244 7.54429 3.86209 7.80462L2.3335 9.33322V11.4476C2.3335 11.8012 2.47397 12.1404 2.72402 12.3904L3.2763 12.9427C3.52636 13.1928 3.86549 13.3332 4.21912 13.3332H6.3335L7.8621 11.8046C8.12243 11.5443 8.12243 11.1222 7.8621 10.8618Z" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M8.13812 4.1951C7.87779 4.45545 7.87779 4.87756 8.13812 5.13791L11.1953 8.1951C11.4557 8.45544 11.8778 8.45544 12.1381 8.1951L13.6667 6.6665V4.55212C13.6667 4.1985 13.5263 3.85936 13.2762 3.60931L12.7239 3.05703C12.4739 2.80698 12.1347 2.6665 11.7811 2.6665H9.66672L8.13812 4.1951Z" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M5.6665 8.33333L6.99984 7M7.6665 10.3333L8.99984 9" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.1665 11.6665H13.3332M6.6665 11.6665H6.67399M10.8332 14.9998H6.6665M13.3332 14.9998H13.3257" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M13.75 1.6665V4.99984M6.25 1.6665V4.99984" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M15.8333 3.3335H4.16667C3.24619 3.3335 2.5 4.07969 2.5 5.00016V16.6668C2.5 17.5873 3.24619 18.3335 4.16667 18.3335H15.8333C16.7538 18.3335 17.5 17.5873 17.5 16.6668V5.00016C17.5 4.07969 16.7538 3.3335 15.8333 3.3335Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M2.5 8.3335H17.5" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7.3335 9.3335H10.6668M5.3335 9.3335H5.33948M8.66683 12.0002H5.3335M10.6668 12.0002H10.6608" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M11 1.3335V4.00016M5 1.3335V4.00016" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M12.6667 2.6665H3.33333C2.59695 2.6665 2 3.26346 2 3.99984V13.3332C2 14.0696 2.59695 14.6665 3.33333 14.6665H12.6667C13.4031 14.6665 14 14.0696 14 13.3332V3.99984C14 3.26346 13.4031 2.6665 12.6667 2.6665Z" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M2 6.6665H14" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M11.6668 10V14.6667M14.0002 12.3333H9.3335" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M11 1.3335V4.00016M5 1.3335V4.00016" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M14 8.6665V3.99984C14 3.26346 13.4031 2.6665 12.6667 2.6665H3.33333C2.59695 2.6665 2 3.26346 2 3.99984V13.3332C2 14.0696 2.59695 14.6665 3.33333 14.6665H8" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M2 6.6665H14" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M3.33317 13.3332H5.99984C6.36802 13.3332 6.6665 13.0347 6.6665 12.6665V3.33317C6.6665 2.96498 6.36802 2.6665 5.99984 2.6665H3.33317C2.96498 2.6665 2.6665 2.96498 2.6665 3.33317V12.6665C2.6665 13.0347 2.96498 13.3332 3.33317 13.3332Z" stroke="#A4A7AE" stroke-width="1.25" stroke-linejoin="round"/>
3
+ <path d="M10.0002 13.3332H12.6668C13.035 13.3332 13.3335 13.0347 13.3335 12.6665V3.33317C13.3335 2.96498 13.035 2.6665 12.6668 2.6665H10.0002C9.63196 2.6665 9.3335 2.96498 9.3335 3.33317V12.6665C9.3335 13.0347 9.63196 13.3332 10.0002 13.3332Z" stroke="#A4A7AE" stroke-width="1.25" stroke-linejoin="round"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.99707 12.9167H10.0046" stroke="#414651" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M6.25 7.50008V5.41675C6.25 3.34568 7.92893 1.66675 10 1.66675C11.6327 1.66675 12.8185 2.71026 13.3333 4.16675" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M14.9995 7.5H4.99968C4.07914 7.5 3.33292 8.24628 3.33301 9.16683L3.33371 16.6668C3.33379 17.5873 4.07996 18.3333 5.00037 18.3333H14.9995C15.92 18.3333 16.6662 17.5872 16.6662 16.6667V9.16667C16.6662 8.24619 15.92 7.5 14.9995 7.5Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+
2
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <rect x="1.5" y="1.5" width="17" height="17" rx="3" stroke="#414651" stroke-width="1.5"/>
4
+ <circle cx="10" cy="10" r="3.5" stroke="#414651" stroke-width="1.5"/>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M15.0003 2.5L11.667 8.33333H15.8337L6.66699 17.5L8.33366 10.8333H4.16699L7.91699 2.5H15.0003Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14.5837 12.9168C14.8137 12.9168 15.0003 12.7302 15.0003 12.5002C15.0003 12.2701 14.8137 12.0835 14.5837 12.0835M14.5837 12.9168C14.3536 12.9168 14.167 12.7302 14.167 12.5002C14.167 12.2701 14.3536 12.0835 14.5837 12.0835M14.5837 12.9168V12.0835" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M8.33333 14.9999H5.41667M5.41667 14.9999H2.5M5.41667 14.9999V12.0833M5.41667 14.9999V17.9166" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M9.16667 17.9166H15.8333C16.7538 17.9166 17.5 17.1704 17.5 16.2499V8.74992C17.5 7.82944 16.7538 7.08325 15.8333 7.08325H2.5V11.2499" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M12.5 7.08325V3.10288C12.5 2.53975 12.0435 2.08325 11.4804 2.08325C11.3287 2.08325 11.1789 2.11709 11.042 2.1823L3.25238 5.89164C2.79277 6.1105 2.5 6.57419 2.5 7.08325" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.58325 9.16699H7.08325" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M12.0833 5.83301H7.08325" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M16.6666 17.917V3.33366C16.6666 2.41318 15.9204 1.66699 14.9999 1.66699H4.99992C4.07944 1.66699 3.33325 2.41318 3.33325 3.33366V17.917L6.66659 16.2503L9.99992 18.3337L13.3333 16.2503L16.6666 17.917Z" stroke="#414651" stroke-width="1.5" stroke-linejoin="round"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.58366 6.66675H17.5003C17.9606 6.66675 18.3337 7.03985 18.3337 7.50008V9.16675L17.0837 9.58341L16.9082 10.4167M6.25033 6.66675H2.50033C2.04009 6.66675 1.66699 7.03985 1.66699 7.50008V9.16675L2.91699 9.58341L4.44436 16.8384C4.52554 17.2241 4.86575 17.5001 5.25982 17.5001H10.417" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M5.83301 8.33333L7.49967 2.5M12.9163 2.5L14.1663 6.25" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M18.3333 12.5L14.1667 17.5L12.5 15.8333" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M3.33301 12.5L2.89106 12.0581C2.64699 12.3021 2.64699 12.6978 2.89106 12.9419L3.33301 12.5ZM6.27495 10.4419C6.51902 10.1978 6.51902 9.80215 6.27495 9.55806C6.03087 9.31398 5.63514 9.31398 5.39106 9.55806L6.27495 10.4419ZM5.39106 15.4419C5.63514 15.686 6.03087 15.686 6.27495 15.4419C6.51902 15.1978 6.51902 14.8021 6.27495 14.5581L5.39106 15.4419ZM5.39106 9.55806L2.89106 12.0581L3.77495 12.9419L6.27495 10.4419L5.39106 9.55806ZM2.89106 12.9419L5.39106 15.4419L6.27495 14.5581L3.77495 12.0581L2.89106 12.9419Z" fill="#414651"/>
3
+ <path d="M9.16633 4.375C8.82117 4.375 8.54133 4.65483 8.54133 5C8.54133 5.34517 8.82117 5.625 9.16633 5.625V4.375ZM3.33301 11.875C2.98783 11.875 2.70801 12.1548 2.70801 12.5C2.70801 12.8452 2.98783 13.125 3.33301 13.125V11.875ZM9.16633 5.625H13.333V4.375H9.16633V5.625ZM13.333 13.125C14.4782 13.125 15.4736 12.5323 16.1656 11.7209C16.8567 10.9105 17.2913 9.83192 17.2913 8.75H16.0413C16.0413 9.50908 15.7298 10.3054 15.2144 10.9098C14.7 11.5131 14.0288 11.875 13.333 11.875V13.125ZM13.333 5.625C14.0287 5.625 14.7 5.98689 15.2144 6.59018C15.7298 7.19457 16.0413 7.99094 16.0413 8.75H17.2913C17.2913 7.66811 16.8567 6.58948 16.1656 5.7791C15.4736 4.96763 14.4781 4.375 13.333 4.375V5.625ZM13.333 11.875H3.33301V13.125H13.333V11.875Z" fill="#414651"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12.9163 7.08398L7.08301 12.9169M12.9163 12.9174L7.08301 7.08437" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M2.08301 16.2497C2.08301 17.1702 2.8292 17.9163 3.74967 17.9163H16.2497C17.1702 17.9163 17.9163 17.1702 17.9163 16.2497V3.74967C17.9163 2.8292 17.1702 2.08301 16.2497 2.08301L3.74967 2.08302C2.8292 2.08302 2.08301 2.82921 2.08301 3.74968V16.2497Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12.6667 8.66634V5.99967L8 1.33301H3.33333C2.59695 1.33301 2 1.92996 2 2.66634V13.333C2 14.0694 2.59695 14.6663 3.33333 14.6663H6" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M8 1.33301V4.66634C8 5.40272 8.59693 5.99967 9.33333 5.99967H12.6667" stroke="#A4A7AE" stroke-width="1.25" stroke-linejoin="round"/>
4
+ <path d="M10.6666 14.667C12.5075 14.667 13.9999 12.667 13.9999 12.667C13.9999 12.667 12.5075 10.667 10.6666 10.667C8.82565 10.667 7.33325 12.667 7.33325 12.667C7.33325 12.667 8.82565 14.667 10.6666 14.667Z" stroke="#A4A7AE" stroke-width="1.25" stroke-linejoin="round"/>
5
+ <path d="M10.6614 12.667H10.6674" stroke="#A4A7AE" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
Binary file
@@ -4,9 +4,9 @@
4
4
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
5
  // the compiled file.
6
6
  //
7
+ //= require popper
7
8
  //= require assets/common
8
9
  //= require js-routes
9
10
  //= require jquery-ui/widgets/autocomplete
10
11
  //= require mustache
11
- //= require popper
12
- //= require kaui/kaui
12
+ //= require kaui/kaui
@@ -301,6 +301,7 @@ jQuery(document).ready(function ($) {
301
301
  });
302
302
 
303
303
  setObjectIdPopover();
304
+ setObjectIdTooltip();
304
305
  });
305
306
 
306
307
 
@@ -434,3 +435,234 @@ function setObjectIdPopover(){
434
435
  setObjectIdPopover();
435
436
  });
436
437
  }
438
+
439
+ // Custom tooltip function for object IDs
440
+ // attributes:
441
+ // data-id = content of the tooltip, object id; required
442
+ // title = title of the tooltip; not required
443
+ function setObjectIdTooltip() {
444
+ // Remove any existing tooltips
445
+ $(".custom-tooltip").remove();
446
+
447
+ $(".object-id-popover").each(function (idx, e) {
448
+ var $element = $(this);
449
+ var objectId = $element.data("id");
450
+
451
+ if (!objectId) return;
452
+
453
+ // Remove any existing event handlers
454
+ $element.off(".customTooltip");
455
+
456
+ // Add hover event handler
457
+ $element.on("mouseenter.customTooltip", function (e) {
458
+ // Hide any existing tooltips immediately when opening a new one
459
+ hideCustomTooltip();
460
+ showCustomTooltip(this, objectId);
461
+ });
462
+ });
463
+
464
+ // Close tooltips when modals open
465
+ $(".modal").on("show.bs.modal.customTooltip", function (e) {
466
+ hideCustomTooltip();
467
+ });
468
+ }
469
+
470
+ // Show custom tooltip
471
+ function showCustomTooltip(element, objectId) {
472
+ // Hide any existing tooltip
473
+ hideCustomTooltip();
474
+
475
+ var $element = $(element);
476
+ var position = $element.offset();
477
+ var elementHeight = $element.outerHeight();
478
+ var elementWidth = $element.outerWidth();
479
+
480
+ // Create tooltip content with header and custom SVG icon
481
+ var svgIcon =
482
+ '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">' +
483
+ '<path d="M11.3332 5.94864V2.66659C11.3332 1.93021 10.7363 1.33325 9.99989 1.33325H2.66659C1.93021 1.33325 1.33325 1.93021 1.33325 2.66659V9.99992C1.33325 10.7363 1.93021 11.3333 2.66659 11.3333H5.94864" stroke="#717680" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>' +
484
+ '<path d="M13.3333 6C14.0697 6 14.6666 6.59695 14.6666 7.33333M7.33331 6C6.59695 6 6 6.59695 6 7.33333M13.3333 14.6667C14.0697 14.6667 14.6666 14.0697 14.6666 13.3333M7.33331 14.6667C6.59695 14.6667 6 14.0697 6 13.3333M9.33331 6H11.3333M9.33331 14.6667H11.3333M14.6666 9.33333V11.3333M6 9.33333V11.3333" stroke="#717680" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>' +
485
+ "</svg>";
486
+
487
+ var tooltipContent =
488
+ '<div class="tooltip-header">Subscription ID</div>' +
489
+ '<div class="tooltip-content">' +
490
+ '<span class="tooltip-id">' +
491
+ objectId +
492
+ "</span>" +
493
+ '<div class="copy-icon-wrapper" data-copy-id="' +
494
+ objectId +
495
+ '" title="Copy to clipboard">' +
496
+ svgIcon +
497
+ "</div>" +
498
+ "</div>" +
499
+ '<div class="tooltip-timer"></div>';
500
+
501
+ // Create tooltip element
502
+ var $tooltip = $('<div class="custom-tooltip">' + tooltipContent + "</div>");
503
+
504
+ // Add tooltip to body
505
+ $("body").append($tooltip);
506
+
507
+ // Store tooltip reference globally for management
508
+ window.currentTooltip = $tooltip;
509
+
510
+ // Position tooltip
511
+ var tooltipWidth = $tooltip.outerWidth();
512
+ var tooltipHeight = $tooltip.outerHeight();
513
+ var windowWidth = $(window).width();
514
+ var windowHeight = $(window).height();
515
+ var scrollTop = $(window).scrollTop();
516
+ var scrollLeft = $(window).scrollLeft();
517
+
518
+ // Calculate position (try right first, then left, then top, then bottom)
519
+ var top = position.top + elementHeight / 2 - tooltipHeight / 2;
520
+ var left = position.left + elementWidth + 12;
521
+ var placement = "right";
522
+
523
+ // Check if tooltip goes off screen horizontally
524
+ if (left + tooltipWidth > windowWidth + scrollLeft) {
525
+ left = position.left - tooltipWidth - 12;
526
+ placement = "left";
527
+ $tooltip.addClass("left");
528
+ }
529
+
530
+ // Check if tooltip goes off screen vertically
531
+ if (top + tooltipHeight > windowHeight + scrollTop) {
532
+ top = windowHeight + scrollTop - tooltipHeight - 10;
533
+ }
534
+ if (top < scrollTop) {
535
+ top = scrollTop + 10;
536
+ }
537
+
538
+ $tooltip.css({
539
+ top: top + "px",
540
+ left: left + "px",
541
+ });
542
+
543
+ // Add click handler for copy icon
544
+ $tooltip.find(".copy-icon-wrapper").on("click", function (e) {
545
+ e.preventDefault();
546
+ e.stopPropagation();
547
+ var copyId = $(this).data("copy-id");
548
+ navigator.clipboard.writeText(copyId);
549
+ ajaxInfoAlert("Id [" + copyId + "] was copied to clipboard!", 3000);
550
+ hideCustomTooltip();
551
+ });
552
+
553
+ // Show tooltip with animation
554
+ $tooltip.fadeIn(150);
555
+
556
+ // Set 5-second auto-hide timer
557
+ window.tooltipAutoHideTimeout = setTimeout(function () {
558
+ hideCustomTooltip();
559
+ }, 5000); // 5 seconds
560
+ }
561
+
562
+ function showObjectIdTooltip(element, objectId) {
563
+ // Hide any existing tooltip
564
+ hideCustomTooltip();
565
+
566
+ var $element = $(element);
567
+ var position = $element.offset();
568
+ var elementHeight = $element.outerHeight();
569
+ var elementWidth = $element.outerWidth();
570
+
571
+ // Create tooltip content with header and custom SVG icon
572
+ var svgIcon =
573
+ '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">' +
574
+ '<path d="M11.3332 5.94864V2.66659C11.3332 1.93021 10.7363 1.33325 9.99989 1.33325H2.66659C1.93021 1.33325 1.33325 1.93021 1.33325 2.66659V9.99992C1.33325 10.7363 1.93021 11.3333 2.66659 11.3333H5.94864" stroke="#717680" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>' +
575
+ '<path d="M13.3333 6C14.0697 6 14.6666 6.59695 14.6666 7.33333M7.33331 6C6.59695 6 6 6.59695 6 7.33333M13.3333 14.6667C14.0697 14.6667 14.6666 14.0697 14.6666 13.3333M7.33331 14.6667C6.59695 14.6667 6 14.0697 6 13.3333M9.33331 6H11.3333M9.33331 14.6667H11.3333M14.6666 9.33333V11.3333M6 9.33333V11.3333" stroke="#717680" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>' +
576
+ "</svg>";
577
+
578
+ var tooltipContent =
579
+ '' +
580
+ '<div class="tooltip-content">' +
581
+ '<span class="tooltip-id">' +
582
+ objectId +
583
+ "</span>" +
584
+ '<div class="copy-icon-wrapper" data-copy-id="' +
585
+ objectId +
586
+ '" title="Copy to clipboard">' +
587
+ svgIcon +
588
+ "</div>" +
589
+ "</div>" +
590
+ '<div class="tooltip-timer"></div>';
591
+
592
+ // Create tooltip element
593
+ var $tooltip = $('<div class="custom-tooltip">' + tooltipContent + "</div>");
594
+
595
+ // Add tooltip to body
596
+ $("body").append($tooltip);
597
+
598
+ // Store tooltip reference globally for management
599
+ window.currentTooltip = $tooltip;
600
+
601
+ // Position tooltip
602
+ var tooltipWidth = $tooltip.outerWidth();
603
+ var tooltipHeight = $tooltip.outerHeight();
604
+ var windowWidth = $(window).width();
605
+ var windowHeight = $(window).height();
606
+ var scrollTop = $(window).scrollTop();
607
+ var scrollLeft = $(window).scrollLeft();
608
+
609
+ // Calculate position (try right first, then left, then top, then bottom)
610
+ var top = position.top + elementHeight / 2 - tooltipHeight / 2;
611
+ var left = position.left + elementWidth + 12;
612
+ var placement = "right";
613
+
614
+ // Check if tooltip goes off screen horizontally
615
+ if (left + tooltipWidth > windowWidth + scrollLeft) {
616
+ left = position.left - tooltipWidth - 12;
617
+ placement = "left";
618
+ $tooltip.addClass("left");
619
+ }
620
+
621
+ // Check if tooltip goes off screen vertically
622
+ if (top + tooltipHeight > windowHeight + scrollTop) {
623
+ top = windowHeight + scrollTop - tooltipHeight - 10;
624
+ }
625
+ if (top < scrollTop) {
626
+ top = scrollTop + 10;
627
+ }
628
+
629
+ $tooltip.css({
630
+ top: top + "px",
631
+ left: left + "px",
632
+ });
633
+
634
+ // Add click handler for copy icon
635
+ $tooltip.find(".copy-icon-wrapper").on("click", function (e) {
636
+ e.preventDefault();
637
+ e.stopPropagation();
638
+ var copyId = $(this).data("copy-id");
639
+ navigator.clipboard.writeText(copyId);
640
+ ajaxInfoAlert("Id [" + copyId + "] was copied to clipboard!", 3000);
641
+ hideCustomTooltip();
642
+ });
643
+
644
+ // Show tooltip with animation
645
+ $tooltip.fadeIn(150);
646
+
647
+ // Set 5-second auto-hide timer
648
+ window.tooltipAutoHideTimeout = setTimeout(function () {
649
+ hideCustomTooltip();
650
+ }, 5000); // 5 seconds
651
+ }
652
+
653
+ // Hide custom tooltip
654
+ function hideCustomTooltip() {
655
+ // Clear any existing auto-hide timer
656
+ if (window.tooltipAutoHideTimeout) {
657
+ clearTimeout(window.tooltipAutoHideTimeout);
658
+ window.tooltipAutoHideTimeout = null;
659
+ }
660
+
661
+ // Clear tooltip reference
662
+ window.currentTooltip = null;
663
+
664
+ // Hide and remove tooltip
665
+ $(".custom-tooltip").fadeOut(100, function () {
666
+ $(this).remove();
667
+ });
668
+ }
@@ -12,6 +12,20 @@ function searchFormatOperator(operator) {
12
12
  return operatorMapping[operator] || operator;
13
13
  }
14
14
 
15
+ // Reverse map user-friendly operator text back to operator key
16
+ function searchParseOperatorText(text) {
17
+ var reverseMapping = {
18
+ 'equals': 'eq',
19
+ 'not equals': 'neq',
20
+ 'greater than': 'gt',
21
+ 'greater than or equal': 'gte',
22
+ 'less than': 'lt',
23
+ 'less than or equal': 'lte',
24
+ 'like': 'like'
25
+ };
26
+ return reverseMapping[(text || '').toString().toLowerCase()] || text;
27
+ }
28
+
15
29
  // Function to parse URL parameters
16
30
  function getUrlParams() {
17
31
  var params = {};
@@ -36,20 +50,32 @@ function populateSearchLabelsFromUrl() {
36
50
  for (var key in params) {
37
51
  if (params.hasOwnProperty(key)) {
38
52
  var value = params[key];
39
- value = value.replace(/%/g, '');
53
+ value = value.replace(/%/g, '').trim();
40
54
  var match = key.match(/(.*)\[(.*)\]/);
41
55
  if (match) {
42
56
  var columnName = match[1].replace(/_/g, ' ').replace(/^\w/, function(l) { return l.toUpperCase(); });
43
- var filter = searchFormatOperator(match[2]);
57
+ var filter = searchFormatOperator(match[2].trim());
44
58
  var label = $('<span>', {
45
- class: 'label label-info',
46
- text: columnName + ' [' + filter + '] ' + value
59
+ class: 'label label-info d-inline-flex align-items-center gap-2',
60
+ 'data-field': columnName.trim(),
61
+ 'data-filter': filter.trim(),
62
+ 'data-value': value.trim()
47
63
  });
48
64
 
49
- if (hasBalanceFilter && columnName.toLowerCase() !== 'balance') {
50
- label.attr('class', 'label label-default');
65
+ if (hasBalanceFilter && columnName.toLowerCase().trim() !== 'balance') {
66
+ label.attr('class', 'label label-default d-inline-flex align-items-center gap-2');
51
67
  }
52
68
 
69
+ var labelText = $('<span>', {
70
+ text: columnName.trim() + ' [' + filter.trim() + '] ' + value.trim()
71
+ });
72
+
73
+ var closeIcon = $('<span>', {
74
+ class: 'filter-close-icon',
75
+ style: 'cursor: pointer; margin-left: 5px; display: inline-flex; align-items: center;'
76
+ }).html('<svg width="12" height="12" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.8337 4.1665L4.16699 15.8332M4.16699 4.1665L15.8337 15.8332" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
77
+
78
+ label.append(labelText).append(closeIcon);
53
79
  searchLabelsContainer.append(label);
54
80
  }
55
81
  }
@@ -59,24 +85,46 @@ function populateSearchLabelsFromUrl() {
59
85
  function searchQuery(account_id){
60
86
  var searchFields = $('.search-field');
61
87
  var searchLabelsContainer = $('#search-labels-container');
62
- searchLabelsContainer.empty();
63
-
64
- var searchLabels = searchFields.map(function() {
65
- var filter = $(this).find('.search-field-filter').val();
66
- var value = $(this).find('.search-field-value').val();
67
- var columnName = $(this).find('.search-field-filter').attr('name').replace('Filter', '').toLowerCase().replace(/\s+/g, '_');
68
-
69
- if (value !== '') {
70
- if (filter === 'like') {
71
- return columnName + encodeURIComponent('[' + filter + ']') + '=' + encodeURIComponent('%' + value + '%');
72
- } else {
73
- return columnName + encodeURIComponent('[' + filter + ']') + '=' + encodeURIComponent(value);
88
+
89
+ if (searchFields.length > 0) {
90
+ searchLabelsContainer.empty();
91
+ }
92
+ var searchLabels = '';
93
+ if (searchFields.length > 0) {
94
+ searchLabels = searchFields.map(function() {
95
+ var filter = $(this).find('.search-field-filter').val();
96
+ var value = $(this).find('.search-field-value').val().trim(); // Trim whitespace from value
97
+ var columnName = $(this).find('.search-field-filter').attr('name').replace('Filter', '').toLowerCase().replace(/\s+/g, '_');
98
+
99
+ if (value !== '') {
100
+ if (filter === 'like') {
101
+ return columnName + encodeURIComponent('[' + filter + ']') + '=' + encodeURIComponent('%' + value + '%');
102
+ } else {
103
+ return columnName + encodeURIComponent('[' + filter + ']') + '=' + encodeURIComponent(value);
104
+ }
74
105
  }
75
- }
76
- }).get().join('&');
106
+ }).get().join('&');
107
+ } else {
108
+ // Fall back to existing labels on the page (used when closing a single filter from the pills)
109
+ var builtParams = [];
110
+ $('#search-labels-container .label').each(function() {
111
+ var fieldName = ($(this).data('field') || '').toString().toLowerCase().replace(/\s+/g, '_');
112
+ var filterText = ($(this).data('filter') || '').toString().trim(); // Trim whitespace from filter text
113
+ var operator = searchParseOperatorText(filterText);
114
+ var value = ($(this).data('value') || '').toString().trim();
115
+ if (fieldName && operator && value) { // Also check that value is not empty
116
+ if (operator === 'like') {
117
+ builtParams.push(fieldName + encodeURIComponent('[' + operator + ']') + '=' + encodeURIComponent('%' + value + '%'));
118
+ } else {
119
+ builtParams.push(fieldName + encodeURIComponent('[' + operator + ']') + '=' + encodeURIComponent(value));
120
+ }
121
+ }
122
+ });
123
+ searchLabels = builtParams.join('&');
124
+ }
77
125
 
78
- if (account_id !== undefined && account_id !== '') {
79
- searchLabels += '&' + encodeURIComponent('account_id[eq]') + '=' + encodeURIComponent(account_id);
126
+ if (account_id !== undefined && account_id !== '' && account_id.trim() !== '') {
127
+ searchLabels += '&' + encodeURIComponent('account_id[eq]') + '=' + encodeURIComponent(account_id.trim());
80
128
  }
81
129
 
82
130
  var searchLabelString = searchLabels.length > 0 ? ('_q=1&' + searchLabels) : '';
@@ -107,7 +155,7 @@ function showAdvanceSearchModal() {
107
155
 
108
156
  // Populate the search fields with the current filters
109
157
  searchLabelsContainer.find('.label').each(function() {
110
- var labelText = $(this).text();
158
+ var labelText = $(this).text().trim();
111
159
  var parts = labelText.split(' [');
112
160
  var columnName = parts[0].trim();
113
161
  var filterAndValue = parts[1].split('] ');
@@ -129,4 +177,57 @@ function showAdvanceSearchModal() {
129
177
  }
130
178
  });
131
179
  });
132
- }
180
+ }
181
+
182
+ // Handle the close icon click event to remove applied filters
183
+ $(document).on('click', '.filter-close-icon', function() {
184
+ var filterLabel = $(this).closest('.label');
185
+ var fieldName = filterLabel.data('field');
186
+ var filterType = filterLabel.data('filter');
187
+ var filterValue = filterLabel.data('value');
188
+
189
+ // Remove the filter label
190
+ filterLabel.remove();
191
+
192
+ // Remove corresponding search field from modal if it exists
193
+ $('#search-fields-container .search-field').each(function() {
194
+ var searchField = $(this);
195
+ var fieldInput = searchField.find('.search-field-value');
196
+ var fieldFilter = searchField.find('.search-field-filter');
197
+
198
+ if (fieldInput.attr('name') === fieldName &&
199
+ fieldFilter.find('option:selected').text().trim() === filterType.trim() &&
200
+ fieldInput.val().trim() === filterValue.trim()) {
201
+ searchField.remove();
202
+ }
203
+ });
204
+ var searchParams = searchQuery();
205
+ // Reapply search without the removed filter
206
+ var tableSelectors = ['#invoices-table', '#accounts-table', '#payments-table', '#subscriptions-table'];
207
+ var table = null;
208
+
209
+ for (var i = 0; i < tableSelectors.length; i++) {
210
+ var $tableElement = $(tableSelectors[i]);
211
+ if ($tableElement.length && $.fn.DataTable.isDataTable(tableSelectors[i])) {
212
+ table = $tableElement.DataTable();
213
+ break;
214
+ }
215
+ }
216
+
217
+ if (table && table.ajax) {
218
+ table.on('preXhr.dt', function(e, settings, data) {
219
+ data.search.value = searchParams;
220
+ });
221
+ table.ajax.reload(null, false);
222
+ }
223
+
224
+ // Update URL
225
+ if (searchParams) {
226
+ var pushParams = (searchParams || '').replace(/account_id/g, 'ac_id');
227
+ var newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?' + pushParams;
228
+ window.history.pushState({ path: newUrl }, '', newUrl);
229
+ } else {
230
+ var newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
231
+ window.history.pushState({ path: newUrl }, '', newUrl);
232
+ }
233
+ });