killbill-aviate 2.6.0.pre.4 → 2.6.1

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.
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aviate
4
+ # Renders the page in the Aviate sidebar layout (which wraps the host layout, Aviate.config[:layout]) when
5
+ # Aviate.sidebar_enabled?. Included into Kaui::EngineController by the Aviate engine, so every Kaui page, as well
6
+ # as the Aviate ones (which inherit from it), gets the sidebar without any copy of the Kaui controllers or routes.
7
+ module SidebarLayout
8
+ extend ActiveSupport::Concern
9
+
10
+ SIDEBAR_LAYOUT = 'aviate/layouts/aviate_sidebar'
11
+
12
+ included do
13
+ # Explicit: helper :all is only applied to direct ActionController::Base subclasses
14
+ helper Aviate::SidebarHelper
15
+ helper_method :aviate_sidebar?
16
+ end
17
+
18
+ protected
19
+
20
+ # Overrides Kaui::EngineControllerUtil#get_layout (resolved on every request by Kaui::EngineController)
21
+ # rubocop:disable-next Naming/AccessorMethodName
22
+ def get_layout
23
+ aviate_sidebar? ? SIDEBAR_LAYOUT : super
24
+ end
25
+
26
+ def aviate_sidebar?
27
+ Aviate.sidebar_enabled?(session: session, cookies: cookies)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,143 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aviate
4
+ # Navigation model of the Aviate sidebar. Mirrors MainNavigation.vue of @killbill/vue-aviate-components:
5
+ # same sections, items, icons and target paths. Billing Operations point to the Kaui pages (their sub-pages
6
+ # keep the item active); the other items link to the Aviate web apps configured through Aviate.sidebar_base_urls.
7
+ module SidebarHelper
8
+ DOCUMENTATION_URL = 'https://docs.killbill.io/latest/what_is_aviate'
9
+ SUPPORT_URL = 'https://killbillio.atlassian.net/servicedesk/customer'
10
+
11
+ # Kaui controllers (pages and sub-pages) that keep each Billing Operations item active
12
+ ACCOUNTS_CONTROLLERS = %w[
13
+ kaui/accounts kaui/account_children kaui/account_custom_fields kaui/account_emails kaui/account_tags
14
+ kaui/account_timelines kaui/audit_logs kaui/chargebacks kaui/payment_methods kaui/payments
15
+ kaui/queues kaui/refunds kaui/transactions
16
+ ].freeze
17
+ SUBSCRIPTIONS_CONTROLLERS = %w[kaui/subscriptions kaui/bundles kaui/bundle_tags].freeze
18
+ INVOICES_CONTROLLERS = %w[kaui/invoices kaui/charges kaui/credits kaui/invoice_items kaui/invoice_tags].freeze
19
+
20
+ def aviate_sidebar_primary_items
21
+ [
22
+ aviate_app_item(:onboarding, :get_started, :main, '/home'),
23
+ aviate_app_item(:catalog, :catalog, :admin, '/catalog/product/setting')
24
+ ]
25
+ end
26
+
27
+ def aviate_sidebar_sections
28
+ [
29
+ {
30
+ key: 'billingOperations',
31
+ label: t('aviate.sidebar.sections.billing_operations'),
32
+ items: [
33
+ aviate_kaui_item(:accounts, :profile_user, kaui_engine.accounts_path, ACCOUNTS_CONTROLLERS),
34
+ aviate_subscriptions_item,
35
+ aviate_kaui_item(:invoices, :invoices, kaui_engine.invoices_path, INVOICES_CONTROLLERS)
36
+ ]
37
+ },
38
+ {
39
+ key: 'revenue',
40
+ label: t('aviate.sidebar.sections.revenue'),
41
+ items: [
42
+ aviate_app_item(:quotes, :quotes, :quote, '/quotes'),
43
+ aviate_app_item(:billing_accounts, :billing, :quote, '/billing-accounts'),
44
+ aviate_app_item(:approvals, :approvals, :quote, '/approvals'),
45
+ aviate_app_item(:contracts, :contracts, :quote, '/contracts'),
46
+ aviate_app_item(:orders, :orders, :quote, '/orders'),
47
+ aviate_app_item(:price_management, :price_management, :quote, '/offerings')
48
+ ]
49
+ },
50
+ {
51
+ key: 'insights',
52
+ label: t('aviate.sidebar.sections.insights'),
53
+ items: [
54
+ aviate_app_item(:health, :health, :health, '/overview'),
55
+ # Locked for everyone in Aviate (revenue recognition is planned)
56
+ aviate_locked_item(:revenue_dashboard, :revenue_dashboard),
57
+ aviate_locked_item(:reports, :reports)
58
+ ]
59
+ },
60
+ {
61
+ key: 'configuration',
62
+ label: t('aviate.sidebar.sections.configuration'),
63
+ items: [
64
+ aviate_app_item(:plugins, :plugins, :admin, '/plugin/configuration'),
65
+ aviate_app_item(:invoice_templates, :invoices, :admin, '/invoices/template'),
66
+ aviate_app_item(:email, :email, :admin, '/email/template'),
67
+ aviate_app_item(:quote_template, :quotes, :quote, '/quote-template'),
68
+ aviate_app_item(:settings, :settings, :admin, '/tenant/configuration'),
69
+ aviate_app_item(:api, :api, :admin, '/configuration/api')
70
+ ]
71
+ },
72
+ {
73
+ key: 'help',
74
+ label: t('aviate.sidebar.sections.help'),
75
+ items: [
76
+ aviate_external_item(:documentation, :documentation, DOCUMENTATION_URL),
77
+ aviate_external_item(:support, :support, SUPPORT_URL)
78
+ ]
79
+ }
80
+ ]
81
+ end
82
+
83
+ def aviate_sidebar_home_url
84
+ aviate_sidebar_app_url(:main, '') || aviate_engine.aviate_root_path
85
+ end
86
+
87
+ def aviate_sidebar_icon(name, css_class = 'aviate-sidebar-icon')
88
+ tag.svg(class: css_class, 'aria-hidden': 'true', focusable: 'false') do
89
+ tag.use(href: "#aviate-icon-#{name.to_s.dasherize}")
90
+ end
91
+ end
92
+
93
+ def aviate_sidebar_link_class(item)
94
+ classes = ['aviate-sidebar-link']
95
+ classes << 'is-active' if item[:active]
96
+ classes << 'is-disabled' if item[:disabled]
97
+ classes << 'is-locked' if item[:locked]
98
+ classes.join(' ')
99
+ end
100
+
101
+ private
102
+
103
+ def aviate_kaui_item(key, icon, href, controllers)
104
+ { key:, label: aviate_sidebar_label(key), icon:, href:, active: controllers.include?(controller_path) }
105
+ end
106
+
107
+ # Kaui has no page listing the subscriptions of every account: they are listed per account. The link goes to
108
+ # Aviate::SubscriptionsController, which redirects to the subscriptions of the first account of the tenant
109
+ # (same choice as the managed "getting started" flow).
110
+ def aviate_subscriptions_item
111
+ { key: :subscriptions, label: aviate_sidebar_label(:subscriptions), icon: :orders,
112
+ href: aviate_engine.subscriptions_path, active: SUBSCRIPTIONS_CONTROLLERS.include?(controller_path) }
113
+ end
114
+
115
+ def aviate_app_item(key, icon, base, path)
116
+ url = aviate_sidebar_app_url(base, path)
117
+ { key:, label: aviate_sidebar_label(key), icon:, href: url, disabled: url.nil?, active: aviate_sidebar_current_url?(url) }
118
+ end
119
+
120
+ def aviate_external_item(key, icon, url)
121
+ { key:, label: aviate_sidebar_label(key), icon:, href: url, external: true }
122
+ end
123
+
124
+ def aviate_locked_item(key, icon)
125
+ { key:, label: aviate_sidebar_label(key), icon:, locked: true }
126
+ end
127
+
128
+ def aviate_sidebar_label(key)
129
+ t("aviate.sidebar.items.#{key}")
130
+ end
131
+
132
+ def aviate_sidebar_app_url(base, path)
133
+ base_url = (Aviate.sidebar_base_urls || {})[base].presence
134
+ return nil if base_url.nil?
135
+
136
+ "#{base_url.chomp('/')}#{path}"
137
+ end
138
+
139
+ def aviate_sidebar_current_url?(url)
140
+ url.present? && request.original_url.start_with?(url)
141
+ end
142
+ end
143
+ end
@@ -8,8 +8,7 @@
8
8
  <%= csrf_meta_tags %>
9
9
  </head>
10
10
  <body>
11
- <div class="container">
12
- <div class="container-fluid">
11
+ <div class="container-fluid aviate-application-container">
13
12
  <%- # :alert used by devise -%>
14
13
  <% [:error, :alert].each do |key| %>
15
14
  <% if flash[key] %>
@@ -28,7 +27,6 @@
28
27
  </div>
29
28
  <% end %>
30
29
  <%= yield %>
31
- </div>
32
30
  </div>
33
31
  </body>
34
32
  </html>
@@ -0,0 +1,8 @@
1
+ <%#
2
+ Nested layout: wraps the page in the Aviate sidebar shell, then renders the host layout
3
+ (Aviate.config[:layout], e.g. KAUI's layout when mounted in KAUI) around it, so that the
4
+ sidebar is displayed on every Aviate page whatever the host layout is.
5
+ %>
6
+ <% page_content = yield %>
7
+ <% view_flow.set(:layout, render(partial: 'aviate/layouts/sidebar/shell', locals: { page_content: page_content })) %>
8
+ <%= render template: Aviate.config[:layout] %>
@@ -0,0 +1,28 @@
1
+ <%# SVG sprite of the Aviate sidebar icons (from @killbill/vue-aviate-components icons). Icons inherit currentColor. %>
2
+ <svg xmlns="http://www.w3.org/2000/svg" class="aviate-icon-sprite" aria-hidden="true" focusable="false">
3
+ <symbol id="aviate-icon-get-started" viewBox="0 0 20 20"><g fill="none"><path d="M9.11666 5.94636L11.4887 3.75376C12.8826 2.35982 15.8529 1.64712 18.3329 1.66707C18.3329 4.58374 17.6402 7.11751 16.2463 8.51141L14.0537 10.8834C13.8449 11.1093 13.7775 11.4319 13.8785 11.7225L14.2402 12.7637C14.4498 13.3671 14.296 14.0373 13.8443 14.4891L12.9162 15.4171L4.5835 7.08374L5.51142 6.15581C5.9632 5.70403 6.6335 5.55028 7.23701 5.76001L8.27747 6.12157C8.56808 6.22257 8.89075 6.15521 9.11666 5.94636Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M14.5767 5.41179L14.5819 5.41708" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M1.6665 18.3337L6.6665 13.3333M6.6665 18.3337L9.1665 15.8333M1.6665 13.3337L4.1665 10.8333" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></g></symbol>
4
+ <symbol id="aviate-icon-catalog" viewBox="0 0 20 20"><g fill="none"><path d="M5.0013 11.6667L6.2513 9.25008C6.3872 8.9802 6.5939 8.75233 6.84931 8.59087C7.10472 8.4294 7.39922 8.34041 7.7013 8.33341H16.668M16.668 8.33341C16.9226 8.33297 17.1739 8.39086 17.4027 8.50265C17.6314 8.61444 17.8315 8.77715 17.9876 8.9783C18.1437 9.17945 18.2516 9.41369 18.3031 9.66304C18.3546 9.91239 18.3483 10.1702 18.2846 10.4167L17.0013 15.4167C16.9085 15.7764 16.6981 16.0947 16.4037 16.3212C16.1093 16.5476 15.7477 16.6693 15.3763 16.6667H3.33464C2.89261 16.6667 2.46868 16.4912 2.15612 16.1786C1.84356 15.866 1.66797 15.4421 1.66797 15.0001V4.16675C1.66797 3.72472 1.84356 3.3008 2.15612 2.98824C2.46868 2.67567 2.89261 2.50008 3.33464 2.50008H6.58464C6.86337 2.49735 7.13835 2.56457 7.38438 2.6956C7.63042 2.82662 7.83967 3.01727 7.99297 3.25008L8.66797 4.25008C8.81973 4.48052 9.02632 4.66968 9.26922 4.80058C9.51211 4.93148 9.78371 5.00003 10.0596 5.00008H15.0013C15.4433 5.00008 15.8673 5.17567 16.1798 5.48824C16.4924 5.8008 16.668 6.22472 16.668 6.66675V8.33341Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></symbol>
5
+ <symbol id="aviate-icon-profile-user" viewBox="0 0 20 20"><g fill="none"><g><path d="M16.6667 17.5C16.6667 16.337 16.6667 15.7555 16.5232 15.2824C16.2 14.217 15.3663 13.3834 14.301 13.0602C13.8278 12.9167 13.2463 12.9167 12.0834 12.9167H7.91671C6.75374 12.9167 6.17225 12.9167 5.69909 13.0602C4.63375 13.3834 3.80007 14.217 3.47691 15.2824C3.33337 15.7555 3.33337 16.337 3.33337 17.5M13.75 6.25C13.75 8.32107 12.0711 10 10 10C7.92897 10 6.25004 8.32107 6.25004 6.25C6.25004 4.17893 7.92897 2.5 10 2.5C12.0711 2.5 13.75 4.17893 13.75 6.25Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
6
+ <symbol id="aviate-icon-orders" viewBox="0 0 20 20"><g fill="none"><g><path d="M6.25 3.55827L13.75 7.84993M2.75004 5.83325L10 9.99992M10 9.99992L17.25 5.83325M10 9.99992L10 18.3333M17.5 6.6665C17.4997 6.37423 17.4225 6.08718 17.2763 5.83414C17.13 5.5811 16.9198 5.37097 16.6667 5.22484L10.8333 1.8915C10.58 1.74522 10.2926 1.66821 10 1.66821C9.70744 1.66821 9.42003 1.74522 9.16667 1.8915L3.33333 5.22484C3.08022 5.37097 2.86998 5.5811 2.72372 5.83414C2.57745 6.08718 2.5003 6.37423 2.5 6.6665V13.3332C2.5003 13.6254 2.57745 13.9125 2.72372 14.1655C2.86998 14.4186 3.08022 14.6287 3.33333 14.7748L9.16667 18.1082C9.42003 18.2545 9.70744 18.3315 10 18.3315C10.2926 18.3315 10.58 18.2545 10.8333 18.1082L16.6667 14.7748C16.9198 14.6287 17.13 14.4186 17.2763 14.1655C17.4225 13.9125 17.4997 13.6254 17.5 13.3332V6.6665Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
7
+ <symbol id="aviate-icon-invoices" viewBox="0 0 20 20"><g fill="none"><g><path d="M11.6654 6.66675H6.66536M13.332 10.0001H6.66536M10.832 13.3334H6.66536M3.33203 1.66675V18.3334L4.9987 17.5001L6.66536 18.3334L8.33203 17.5001L9.9987 18.3334L11.6654 17.5001L13.332 18.3334L14.9987 17.5001L16.6654 18.3334V1.66675L14.9987 2.50008L13.332 1.66675L11.6654 2.50008L9.9987 1.66675L8.33203 2.50008L6.66536 1.66675L4.9987 2.50008L3.33203 1.66675Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
8
+ <symbol id="aviate-icon-quotes" viewBox="0 0 17 19"><g fill="none"><path d="M4.16536 2.49992H2.4987C2.05667 2.49992 1.63275 2.67551 1.32019 2.98807C1.00763 3.30063 0.832031 3.72456 0.832031 4.16659V15.8333C0.832031 16.2753 1.00763 16.6992 1.32019 17.0118C1.63275 17.3243 2.05667 17.4999 2.4987 17.4999H12.4987C12.9407 17.4999 13.3646 17.3243 13.6772 17.0118C13.9898 16.6992 14.1654 16.2753 14.1654 15.8333V15.4166M10.832 2.49992H12.4987C12.791 2.50022 13.078 2.57737 13.3311 2.72364C13.5841 2.8699 13.7942 3.08014 13.9404 3.33325M4.16536 14.1666H4.9987M4.9987 0.833252H9.9987C10.4589 0.833252 10.832 1.20635 10.832 1.66659V3.33325C10.832 3.79349 10.4589 4.16659 9.9987 4.16659H4.9987C4.53846 4.16659 4.16536 3.79349 4.16536 3.33325V1.66659C4.16536 1.20635 4.53846 0.833252 4.9987 0.833252ZM15.3137 9.68817C15.6456 9.35621 15.8321 8.90597 15.8321 8.43651C15.8321 7.96704 15.6456 7.5168 15.3137 7.18484C14.9817 6.85288 14.5315 6.66638 14.062 6.66638C13.5925 6.66638 13.1423 6.85288 12.8103 7.18484L9.46868 10.5282C9.27055 10.7262 9.12553 10.971 9.04701 11.2398L8.34951 13.6315C8.3286 13.7032 8.32734 13.7792 8.34588 13.8516C8.36442 13.9239 8.40207 13.99 8.45488 14.0428C8.5077 14.0956 8.57374 14.1333 8.6461 14.1518C8.71846 14.1703 8.79447 14.1691 8.86618 14.1482L11.2578 13.4507C11.5267 13.3722 11.7715 13.2271 11.9695 13.029L15.3137 9.68817Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></symbol>
9
+ <symbol id="aviate-icon-billing" viewBox="0 0 20 20"><g fill="none"><path d="M9.5835 9.16669H7.0835" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.0835 5.83331H7.0835" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M16.6668 17.9167V3.33335C16.6668 2.41288 15.9207 1.66669 15.0002 1.66669H5.00016C4.07969 1.66669 3.3335 2.41288 3.3335 3.33335V17.9167L6.66683 16.25L10.0002 18.3334L13.3335 16.25L16.6668 17.9167Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></g></symbol>
10
+ <symbol id="aviate-icon-approvals" viewBox="0 0 19 19"><g fill="none"><path d="M6.67452 9.16252L8.34119 10.8292L11.6745 7.49585M2.38281 6.34593C2.26118 5.79804 2.27985 5.2283 2.43711 4.68955C2.59436 4.15079 2.8851 3.66047 3.28237 3.26403C3.67963 2.8676 4.17057 2.57788 4.70965 2.42176C5.24873 2.26563 5.8185 2.24815 6.36614 2.37093C6.66757 1.89952 7.08281 1.51156 7.5736 1.24284C8.06439 0.974108 8.61493 0.833252 9.17448 0.833252C9.73402 0.833252 10.2846 0.974108 10.7754 1.24284C11.2661 1.51156 11.6814 1.89952 11.9828 2.37093C12.5313 2.24762 13.102 2.26502 13.642 2.42153C14.1819 2.57803 14.6735 2.86855 15.071 3.26606C15.4685 3.66357 15.759 4.15516 15.9155 4.6951C16.0721 5.23504 16.0895 5.80579 15.9661 6.35426C16.4376 6.65569 16.8255 7.07093 17.0942 7.56172C17.363 8.05251 17.5038 8.60305 17.5038 9.1626C17.5038 9.72214 17.363 10.2727 17.0942 10.7635C16.8255 11.2543 16.4376 11.6695 15.9661 11.9709C16.0889 12.5186 16.0714 13.0883 15.9153 13.6274C15.7592 14.1665 15.4695 14.6574 15.073 15.0547C14.6766 15.452 14.1863 15.7427 13.6475 15.9C13.1088 16.0572 12.539 16.0759 11.9911 15.9543C11.6901 16.4275 11.2745 16.8171 10.7829 17.087C10.2913 17.357 9.7395 17.4985 9.17864 17.4985C8.61779 17.4985 8.066 17.357 7.57437 17.087C7.08274 16.8171 6.66718 16.4275 6.36614 15.9543C5.8185 16.077 5.24873 16.0596 4.70965 15.9034C4.17057 15.7473 3.67963 15.4576 3.28237 15.0612C2.8851 14.6647 2.59436 14.1744 2.43711 13.6356C2.27985 13.0969 2.26118 12.5272 2.38281 11.9793C1.90777 11.6786 1.51649 11.2627 1.24535 10.7703C0.974213 10.2778 0.832031 9.72477 0.832031 9.1626C0.832031 8.60042 0.974213 8.04738 1.24535 7.55492C1.51649 7.06245 1.90777 6.64656 2.38281 6.34593Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></symbol>
11
+ <symbol id="aviate-icon-contracts" viewBox="0 0 20 20"><g fill="none"><g><path d="M11.6654 1.66675V5.00008C11.6654 5.44211 11.841 5.86603 12.1535 6.17859C12.4661 6.49115 12.89 6.66675 13.332 6.66675H16.6654M8.33203 7.50008H6.66536M13.332 10.8334H6.66536M13.332 14.1667H6.66536M12.4987 1.66675H4.9987C4.55667 1.66675 4.13275 1.84234 3.82019 2.1549C3.50763 2.46746 3.33203 2.89139 3.33203 3.33341V16.6667C3.33203 17.1088 3.50763 17.5327 3.82019 17.8453C4.13275 18.1578 4.55667 18.3334 4.9987 18.3334H14.9987C15.4407 18.3334 15.8646 18.1578 16.1772 17.8453C16.4898 17.5327 16.6654 17.1088 16.6654 16.6667V5.83341L12.4987 1.66675Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
12
+ <symbol id="aviate-icon-price-management" viewBox="0 0 20 20"><g fill="none"><g><path d="M9.16797 15.8334H3.33464C2.89261 15.8334 2.46868 15.6578 2.15612 15.3453C1.84356 15.0327 1.66797 14.6088 1.66797 14.1667V5.83341C1.66797 5.39139 1.84356 4.96746 2.15612 4.6549C2.46868 4.34234 2.89261 4.16675 3.33464 4.16675H7.5013M5.0013 6.66675L7.5013 4.16675L5.0013 1.66675M10.8346 4.16675H16.668C17.11 4.16675 17.5339 4.34234 17.8465 4.6549C18.159 4.96746 18.3346 5.39139 18.3346 5.83341V14.1667C18.3346 14.6088 18.159 15.0327 17.8465 15.3453C17.5339 15.6578 17.11 15.8334 16.668 15.8334H12.5013M15.0013 13.3334L12.5013 15.8334L15.0013 18.3334M12.5013 10.0001C12.5013 11.3808 11.382 12.5001 10.0013 12.5001C8.62059 12.5001 7.5013 11.3808 7.5013 10.0001C7.5013 8.61937 8.62059 7.50008 10.0013 7.50008C11.382 7.50008 12.5013 8.61937 12.5013 10.0001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
13
+ <symbol id="aviate-icon-health" viewBox="0 0 20 20"><g fill="none"><g><path d="M1.66797 10.8334C2.11 10.8334 2.53392 10.6578 2.84648 10.3453C3.15904 10.0327 3.33464 9.60878 3.33464 9.16675V5.83341C3.33464 5.39139 3.51023 4.96746 3.82279 4.6549C4.13535 4.34234 4.55927 4.16675 5.0013 4.16675C5.44333 4.16675 5.86725 4.34234 6.17981 4.6549C6.49237 4.96746 6.66797 5.39139 6.66797 5.83341V16.6667C6.66797 17.1088 6.84356 17.5327 7.15612 17.8453C7.46868 18.1578 7.89261 18.3334 8.33464 18.3334C8.77666 18.3334 9.20059 18.1578 9.51315 17.8453C9.82571 17.5327 10.0013 17.1088 10.0013 16.6667V3.33341C10.0013 2.89139 10.1769 2.46746 10.4895 2.1549C10.802 1.84234 11.2259 1.66675 11.668 1.66675C12.11 1.66675 12.5339 1.84234 12.8465 2.1549C13.159 2.46746 13.3346 2.89139 13.3346 3.33341V14.1667C13.3346 14.6088 13.5102 15.0327 13.8228 15.3453C14.1354 15.6578 14.5593 15.8334 15.0013 15.8334C15.4433 15.8334 15.8673 15.6578 16.1798 15.3453C16.4924 15.0327 16.668 14.6088 16.668 14.1667V10.8334C16.668 10.3914 16.8436 9.96746 17.1561 9.6549C17.4687 9.34234 17.8926 9.16675 18.3346 9.16675" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
14
+ <symbol id="aviate-icon-revenue-dashboard" viewBox="0 0 20 20"><g fill="none"><g><path d="M2.5 2.5V17.5H17.5M6.66667 8.33333H8.33333C8.79357 8.33333 9.16667 8.70643 9.16667 9.16667V13.3333C9.16667 13.7936 8.79357 14.1667 8.33333 14.1667H6.66667C6.20643 14.1667 5.83333 13.7936 5.83333 13.3333V9.16667C5.83333 8.70643 6.20643 8.33333 6.66667 8.33333ZM13.3333 4.16667H15C15.4602 4.16667 15.8333 4.53976 15.8333 5V13.3333C15.8333 13.7936 15.4602 14.1667 15 14.1667H13.3333C12.8731 14.1667 12.5 13.7936 12.5 13.3333V5C12.5 4.53976 12.8731 4.16667 13.3333 4.16667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
15
+ <symbol id="aviate-icon-reports" viewBox="0 0 15 19"><g fill="none"><path d="M9.16536 0.833252V4.16659C9.16536 4.60861 9.34096 5.03254 9.65352 5.3451C9.96608 5.65766 10.39 5.83325 10.832 5.83325H14.1654M4.16536 14.1666V13.3333M7.4987 14.1666V9.16659M10.832 14.1666V11.6666M9.9987 0.833252H2.4987C2.05667 0.833252 1.63275 1.00885 1.32019 1.32141C1.00763 1.63397 0.832031 2.05789 0.832031 2.49992V15.8333C0.832031 16.2753 1.00763 16.6992 1.32019 17.0118C1.63275 17.3243 2.05667 17.4999 2.4987 17.4999H12.4987C12.9407 17.4999 13.3646 17.3243 13.6772 17.0118C13.9898 16.6992 14.1654 16.2753 14.1654 15.8333V4.99992L9.9987 0.833252Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></symbol>
16
+ <symbol id="aviate-icon-plugins" viewBox="0 0 19 19"><g fill="none"><path d="M15.3662 5.70992C15.3254 5.97825 15.4154 6.24992 15.607 6.44159L16.9137 7.74825C17.3054 8.13992 17.502 8.65409 17.502 9.16825C17.502 9.68242 17.3062 10.1958 16.9137 10.5883L15.5712 11.9308C15.481 12.0209 15.3709 12.0886 15.2498 12.1286C15.1286 12.1685 14.9998 12.1795 14.8737 12.1608C14.482 12.1024 14.2054 11.7608 14.067 11.3899C13.9457 11.0622 13.7438 10.7703 13.4801 10.5411C13.2164 10.3118 12.8993 10.1525 12.558 10.0778C12.2166 10.0032 11.8619 10.0155 11.5266 10.1138C11.1912 10.212 10.886 10.393 10.6389 10.6401C10.3918 10.8872 10.2108 11.1925 10.1126 11.5278C10.0143 11.8631 10.0019 12.2178 10.0766 12.5592C10.1513 12.9005 10.3106 13.2177 10.5398 13.4814C10.7691 13.7451 11.061 13.9469 11.3887 14.0683C11.7604 14.2066 12.1012 14.4824 12.1595 14.8749C12.1784 15.0011 12.1674 15.1299 12.1275 15.251C12.0875 15.3722 12.0197 15.4822 11.9295 15.5724L10.5879 16.9141C10.4015 17.1011 10.1801 17.2494 9.93625 17.3505C9.69241 17.4516 9.431 17.5035 9.16703 17.5033C8.90325 17.5036 8.642 17.4518 8.39831 17.3508C8.15462 17.2499 7.93328 17.1017 7.74703 16.9149L6.44037 15.6083C6.34592 15.5136 6.23061 15.4425 6.10368 15.4005C5.97676 15.3586 5.84176 15.3469 5.70953 15.3666C5.2987 15.4283 5.00953 15.7866 4.85953 16.1733C4.7338 16.496 4.5296 16.7822 4.2654 17.0062C4.0012 17.2301 3.68534 17.3847 3.34639 17.4558C3.00744 17.527 2.65609 17.5125 2.32413 17.4138C1.99218 17.315 1.69008 17.135 1.44518 16.8901C1.20028 16.6452 1.0203 16.3431 0.921518 16.0112C0.822737 15.6792 0.808275 15.3279 0.879439 14.9889C0.950603 14.6499 1.10515 14.3341 1.32909 14.0699C1.55304 13.8057 1.83932 13.6015 2.16203 13.4758C2.5487 13.3258 2.90703 13.0366 2.96787 12.6258C2.98763 12.4936 2.97614 12.3586 2.93431 12.2317C2.89249 12.1048 2.8215 11.9894 2.72703 11.8949L1.42037 10.5883C1.23357 10.402 1.08544 10.1807 0.984468 9.93698C0.883501 9.69328 0.831697 9.43203 0.832033 9.16825C0.832033 8.65409 1.0287 8.13992 1.42037 7.74825L2.69203 6.47659C2.89203 6.27659 3.1762 6.18242 3.4562 6.22409C3.88537 6.28825 4.18703 6.66409 4.35037 7.06575C4.48011 7.38388 4.68652 7.66497 4.95121 7.88401C5.2159 8.10305 5.53065 8.25322 5.86743 8.32117C6.20421 8.38911 6.55256 8.37271 6.88147 8.27342C7.21038 8.17414 7.50962 7.99505 7.75256 7.75212C7.9955 7.50918 8.17458 7.20993 8.27387 6.88103C8.37315 6.55212 8.38956 6.20376 8.32161 5.86698C8.25367 5.5302 8.10349 5.21545 7.88446 4.95077C7.66542 4.68608 7.38432 4.47967 7.0662 4.34992C6.66453 4.18659 6.2887 3.88492 6.22453 3.45575C6.18287 3.17575 6.2762 2.89242 6.47703 2.69159L7.74787 1.42075C7.93409 1.23421 8.15532 1.08628 8.39886 0.985464C8.64239 0.884645 8.90345 0.832918 9.16703 0.833254C9.6812 0.833254 10.1954 1.02992 10.587 1.42159L11.8937 2.72825C12.0854 2.91992 12.357 3.00992 12.6245 2.96992C13.0354 2.90825 13.3245 2.54992 13.4745 2.16325C13.6003 1.84054 13.8045 1.55426 14.0687 1.33031C14.3329 1.10637 14.6487 0.951824 14.9877 0.88066C15.3266 0.809496 15.678 0.823958 16.0099 0.922739C16.3419 1.02152 16.644 1.2015 16.8889 1.4464C17.1338 1.6913 17.3138 1.9934 17.4125 2.32535C17.5113 2.65731 17.5258 3.00866 17.4546 3.34761C17.3835 3.68656 17.2289 4.00242 17.005 4.26662C16.781 4.53082 16.4947 4.73502 16.172 4.86075C15.7854 5.01075 15.427 5.29909 15.3662 5.70992Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></symbol>
17
+ <symbol id="aviate-icon-email" viewBox="0 0 20 20"><g fill="none"><g><path d="M18.3346 5.83325L10.8596 10.5833C10.6024 10.7444 10.3049 10.8299 10.0013 10.8299C9.6977 10.8299 9.40024 10.7444 9.14297 10.5833L1.66797 5.83325M3.33464 3.33325H16.668C17.5884 3.33325 18.3346 4.07944 18.3346 4.99992V14.9999C18.3346 15.9204 17.5884 16.6666 16.668 16.6666H3.33464C2.41416 16.6666 1.66797 15.9204 1.66797 14.9999V4.99992C1.66797 4.07944 2.41416 3.33325 3.33464 3.33325Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
18
+ <symbol id="aviate-icon-settings" viewBox="0 0 19 19"><g fill="none"><path d="M9.16536 15.8333C10.9335 15.8333 12.6292 15.1309 13.8794 13.8806C15.1297 12.6304 15.832 10.9347 15.832 9.16659C15.832 7.39848 15.1297 5.70278 13.8794 4.45254C12.6292 3.2023 10.9335 2.49992 9.16536 2.49992M9.16536 15.8333C7.39725 15.8333 5.70156 15.1309 4.45132 13.8806C3.20108 12.6304 2.4987 10.9347 2.4987 9.16659M9.16536 15.8333V17.4999M9.16536 2.49992C7.39725 2.49992 5.70156 3.2023 4.45132 4.45254C3.20108 5.70278 2.4987 7.39848 2.4987 9.16659M9.16536 2.49992V0.833252M2.4987 9.16659H0.832031M10.832 9.16659C10.832 9.60861 10.6564 10.0325 10.3439 10.3451C10.0313 10.6577 9.60739 10.8333 9.16536 10.8333C8.72334 10.8333 8.29941 10.6577 7.98685 10.3451C7.67429 10.0325 7.4987 9.60861 7.4987 9.16659C7.4987 8.72456 7.67429 8.30063 7.98685 7.98807C8.29941 7.67551 8.72334 7.49992 9.16536 7.49992C9.60739 7.49992 10.0313 7.67551 10.3439 7.98807C10.6564 8.30063 10.832 8.72456 10.832 9.16659ZM10.832 9.16659H17.4987M13.332 16.3832L12.4987 14.9415M8.33203 7.72499L4.9987 1.94999M16.3822 13.3333L14.9405 12.4999M1.94857 4.99992L3.39023 5.83325M16.3822 4.99992L14.9405 5.83325M1.94857 13.3333L3.39023 12.4999M13.332 1.94999L12.4987 3.39166M8.33203 10.6082L4.9987 16.3832" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></symbol>
19
+ <symbol id="aviate-icon-api" viewBox="0 0 20 20"><g fill="none"><g><path d="M3.33203 14.1667L8.33203 9.16675L3.33203 4.16675M9.9987 15.8334H16.6654" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
20
+ <symbol id="aviate-icon-documentation" viewBox="0 0 20 20"><g fill="none"><g><path d="M7.57617 7.50015C7.77209 6.94321 8.1588 6.47357 8.6678 6.17443C9.1768 5.87528 9.77525 5.76593 10.3572 5.86574C10.9391 5.96555 11.4669 6.26809 11.8471 6.71976C12.2273 7.17143 12.4354 7.74308 12.4345 8.33348C12.4345 10.0001 9.9345 10.8335 9.9345 10.8335M10.0013 14.1667H10.0096M18.3346 10.0001C18.3346 14.6025 14.6037 18.3334 10.0013 18.3334C5.39893 18.3334 1.66797 14.6025 1.66797 10.0001C1.66797 5.39771 5.39893 1.66675 10.0013 1.66675C14.6037 1.66675 18.3346 5.39771 18.3346 10.0001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></g></g></symbol>
21
+ <symbol id="aviate-icon-support" viewBox="0 0 20 20"><g fill="none"><circle cx="10" cy="10" r="7.5" stroke="currentColor" stroke-width="1.5"/><path d="M10 7.5V10.8333" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><circle cx="10" cy="13.3333" r="0.833" fill="currentColor"/></g></symbol>
22
+ <symbol id="aviate-icon-lock" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"/></g></symbol>
23
+ <symbol id="aviate-icon-dots" viewBox="0 0 5 18"><g fill="none"><path d="M2.47266 2L2.47266 2.01M2.47266 9L2.47266 9.01M2.47266 16L2.47266 16.01M2.47266 3C1.92037 3 1.47266 2.55228 1.47266 2C1.47266 1.44772 1.92037 1 2.47266 1C3.02494 1 3.47266 1.44772 3.47266 2C3.47266 2.55228 3.02494 3 2.47266 3ZM2.47266 10C1.92037 10 1.47266 9.55228 1.47266 9C1.47266 8.44772 1.92037 8 2.47266 8C3.02494 8 3.47266 8.44772 3.47266 9C3.47266 9.55228 3.02494 10 2.47266 10ZM2.47266 17C1.92037 17 1.47266 16.5523 1.47266 16C1.47266 15.4477 1.92037 15 2.47266 15C3.02494 15 3.47266 15.4477 3.47266 16C3.47266 16.5523 3.02494 17 2.47266 17Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></g></symbol>
24
+ <symbol id="aviate-icon-chevron-down" viewBox="0 0 24 24"><path d="M19 9l-7 7-7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol>
25
+ <symbol id="aviate-icon-chevron-right" viewBox="0 0 24 24"><path d="M9 5l7 7-7 7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol>
26
+ <symbol id="aviate-icon-menu" viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></symbol>
27
+ <symbol id="aviate-icon-close" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></symbol>
28
+ </svg>
@@ -0,0 +1,21 @@
1
+ <% if item[:locked] %>
2
+ <span class="<%= aviate_sidebar_link_class(item) %>" aria-disabled="true">
3
+ <%= aviate_sidebar_icon(item[:icon]) %>
4
+ <span class="aviate-sidebar-truncate"><%= item[:label] %></span>
5
+ <%= aviate_sidebar_icon(:lock, 'aviate-sidebar-trailing-icon') %>
6
+ </span>
7
+ <% elsif item[:disabled] %>
8
+ <span class="<%= aviate_sidebar_link_class(item) %>" aria-disabled="true" title="<%= item[:hint] || t('aviate.sidebar.not_configured') %>">
9
+ <%= aviate_sidebar_icon(item[:icon]) %>
10
+ <span class="aviate-sidebar-truncate"><%= item[:label] %></span>
11
+ </span>
12
+ <% else %>
13
+ <%= link_to item[:href], class: aviate_sidebar_link_class(item),
14
+ 'aria-current': (item[:active] ? 'page' : nil),
15
+ target: (item[:external] ? '_blank' : nil),
16
+ rel: (item[:external] ? 'noopener noreferrer' : nil),
17
+ data: { testid: "aviate-sidebar-#{item[:key].to_s.dasherize}" } do %>
18
+ <%= aviate_sidebar_icon(item[:icon]) %>
19
+ <span class="aviate-sidebar-truncate"><%= item[:label] %></span>
20
+ <% end %>
21
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <%# Aviate logo (from @killbill/vue-aviate-components Logo.vue) %>
2
+ <svg class="aviate-sidebar-logo" role="img" aria-label="Aviate" width="138" height="36" viewBox="0 0 138 36" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.8567 13.6244L17.088 16.2175L19.7999 20.7L7.10984 20.2765L5.74969 17.7122C4.57456 15.4968 6.54998 12.8978 8.8567 13.6244Z" fill="url(#paint0_linear_262_139966)" /><path d="M2.7424 18.9009L23.1611 19.4403L31.1757 32.6554C32.036 34.0738 31.0843 35.9452 29.5002 35.9505L14.7027 35.9999C12.8813 36.0059 11.1368 35.2183 9.87329 33.8196L0.752848 23.7225C-0.902874 21.8895 0.356329 18.8378 2.7424 18.9009Z" fill="url(#paint1_linear_262_139966)" /><path d="M20.4538 0.919434L15.6406 7.7493L23.1359 11.3631L24.8453 4.89191L20.4538 0.919434Z" fill="#FFBD31" /><path d="M27.4792 34.8464L15.3726 13.3977C14.3482 11.583 14.4765 9.34396 15.7015 7.65597C16.4082 6.68218 17.8127 6.53679 18.7069 7.34487L34.1645 21.3138C36.1576 23.1149 36.5805 26.066 35.1725 28.3466L31.1162 34.9168C30.2749 36.2794 28.2661 36.2405 27.4792 34.8464Z" fill="url(#paint2_linear_262_139966)" /><path d="M27.4792 34.8464L15.3726 13.3977C14.3482 11.583 14.4765 9.34396 15.7015 7.65597C16.4082 6.68218 17.8127 6.53679 18.7069 7.34487L34.1645 21.3138C36.1576 23.1149 36.5805 26.066 35.1725 28.3466L31.1162 34.9168C30.2749 36.2794 28.2661 36.2405 27.4792 34.8464Z" fill="url(#paint3_linear_262_139966)" /><path d="M32.059 11.0704L21.036 3.83882C19.1276 2.58687 20.3148 -0.360481 22.5676 0.0364678L27.8491 0.967115C29.1269 1.19227 30.1754 2.09774 30.5762 3.32203L32.9037 10.4332C33.068 10.9351 32.5027 11.3615 32.059 11.0704Z" fill="url(#paint4_linear_262_139966)" /><path d="M8.8567 13.6244L17.088 16.2175L19.7999 20.7L7.10984 20.2765L5.74969 17.7122C4.57456 15.4968 6.54998 12.8978 8.8567 13.6244Z" fill="url(#paint5_linear_262_139966)" /><path d="M2.7424 18.9009L23.1611 19.4403L31.1757 32.6554C32.036 34.0738 31.0843 35.9452 29.5002 35.9505L14.7027 35.9999C12.8813 36.0059 11.1368 35.2183 9.87329 33.8196L0.752848 23.7225C-0.902874 21.8895 0.356329 18.8378 2.7424 18.9009Z" fill="url(#paint6_linear_262_139966)" /><path d="M20.4538 0.919434L15.6406 7.7493L23.1359 11.3631L24.8453 4.89191L20.4538 0.919434Z" fill="url(#paint7_linear_262_139966)" /><path d="M27.4792 34.8463L15.3726 13.3977C14.3482 11.583 14.4765 9.34396 15.7015 7.65597C16.4082 6.68218 17.8127 6.53679 18.7069 7.34487L34.1645 21.3138C36.1576 23.1149 36.5805 26.066 35.1725 28.3466L31.1162 34.9168C30.2749 36.2794 28.2661 36.2405 27.4792 34.8463Z" fill="#FD6F8E" /><path d="M27.4792 34.8463L15.3726 13.3977C14.3482 11.583 14.4765 9.34396 15.7015 7.65597C16.4082 6.68218 17.8127 6.53679 18.7069 7.34487L34.1645 21.3138C36.1576 23.1149 36.5805 26.066 35.1725 28.3466L31.1162 34.9168C30.2749 36.2794 28.2661 36.2405 27.4792 34.8463Z" fill="url(#paint8_linear_262_139966)" /><path d="M32.059 11.0704L21.036 3.83882C19.1276 2.58687 20.3148 -0.360481 22.5676 0.0364678L27.8491 0.967115C29.1269 1.19227 30.1754 2.09774 30.5762 3.32203L32.9037 10.4332C33.068 10.9351 32.5027 11.3615 32.059 11.0704Z" fill="url(#paint9_linear_262_139966)" /><path d="M69.386 24.7754C68.2645 24.7754 67.3554 23.8735 67.3554 22.7609V9.65245C67.3554 8.5399 68.2645 7.638 69.386 7.638C70.5074 7.638 71.4165 8.5399 71.4165 9.65245V22.7609C71.4165 23.8735 70.5074 24.7754 69.386 24.7754ZM69.4022 4.81386C68.6441 4.81386 68.016 4.57852 67.5178 4.10783C67.0413 3.63714 66.8031 3.07018 66.8031 2.40693C66.8031 1.72229 67.0413 1.15533 67.5178 0.706032C68.016 0.235344 68.6441 0 69.4022 0C70.1603 0 70.7776 0.224647 71.2541 0.67394C71.7523 1.10184 72.0014 1.64741 72.0014 2.31065C72.0014 3.01669 71.7631 3.61575 71.2866 4.10783C70.8101 4.57852 70.182 4.81386 69.4022 4.81386Z" fill="#101828" /><path d="M77.4778 24.7754C76.3563 24.7754 75.4472 23.8735 75.4472 22.7609V2.97723C75.4472 1.86467 76.3563 0.962772 77.4778 0.962772C78.5993 0.962772 79.5084 1.86467 79.5084 2.97723V22.7609C79.5084 23.8735 78.5993 24.7754 77.4778 24.7754Z" fill="#101828" /><path d="M85.5696 24.7754C84.4482 24.7754 83.5391 23.8735 83.5391 22.7609V2.97723C83.5391 1.86467 84.4482 0.962772 85.5696 0.962772C86.6911 0.962772 87.6002 1.86468 87.6002 2.97723V22.7609C87.6002 23.8735 86.6911 24.7754 85.5696 24.7754Z" fill="#101828" /><path d="M119.786 24.7754C118.665 24.7754 117.755 23.8735 117.755 22.7609V9.65245C117.755 8.5399 118.665 7.638 119.786 7.638C120.907 7.638 121.817 8.5399 121.817 9.65245V22.7609C121.817 23.8735 120.907 24.7754 119.786 24.7754ZM119.802 4.81386C119.044 4.81386 118.416 4.57852 117.918 4.10783C117.441 3.63714 117.203 3.07018 117.203 2.40693C117.203 1.72229 117.441 1.15533 117.918 0.706032C118.416 0.235344 119.044 0 119.802 0C120.56 0 121.178 0.224647 121.654 0.67394C122.152 1.10184 122.401 1.64741 122.401 2.31065C122.401 3.01669 122.163 3.61575 121.687 4.10783C121.21 4.57852 120.582 4.81386 119.802 4.81386Z" fill="#101828" /><path d="M127.878 24.7754C126.756 24.7754 125.847 23.8735 125.847 22.7609V2.97723C125.847 1.86467 126.756 0.962772 127.878 0.962772C128.999 0.962772 129.908 1.86468 129.908 2.97723V22.7609C129.908 23.8735 128.999 24.7754 127.878 24.7754Z" fill="#101828" /><path d="M135.97 24.7754C134.848 24.7754 133.939 23.8735 133.939 22.7609V2.97723C133.939 1.86467 134.848 0.962772 135.97 0.962772C137.091 0.962772 138 1.86468 138 2.97723V22.7609C138 23.8735 137.091 24.7754 135.97 24.7754Z" fill="#101828" /><path d="M59.9772 8.09367C60.298 7.80065 60.7181 7.638 61.1542 7.638C62.7023 7.638 63.4775 9.49488 62.3828 10.5808L58.1101 14.8191L63.5455 21.6506C64.5522 22.9158 63.6438 24.7754 62.019 24.7754C61.4334 24.7754 60.879 24.5136 60.5096 24.0627L55.0819 17.4365L52.0614 20.2583V22.7609C52.0614 23.8735 51.1523 24.7754 50.0308 24.7754C48.9094 24.7754 48.0002 23.8735 48.0002 22.7609V2.97723C48.0002 1.86467 48.9094 0.962772 50.0308 0.962772C51.1523 0.962772 52.0614 1.86467 52.0614 2.97723V15.3243L59.9772 8.09367Z" fill="#101828" /><path fill-rule="evenodd" clip-rule="evenodd" d="M106.399 25C104.926 25 103.616 24.6791 102.468 24.0372C101.774 23.6495 101.168 23.1448 100.648 22.5229V22.8576C100.648 23.9167 99.7829 24.7754 98.7153 24.7754C97.6476 24.7754 96.7822 23.9167 96.7822 22.8576V2.97723C96.7822 1.86467 97.6913 0.962772 98.8127 0.962772C99.9342 0.962772 100.843 1.86467 100.843 2.97723V9.73479C101.338 9.19205 101.901 8.74986 102.533 8.40821C103.702 7.76637 104.991 7.44544 106.399 7.44544C108.11 7.44544 109.615 7.80916 110.915 8.53658C112.236 9.26401 113.276 10.2803 114.034 11.5854C114.814 12.8905 115.204 14.4309 115.204 16.2067C115.204 17.9825 114.814 19.5229 114.034 20.828C113.276 22.1331 112.236 23.16 110.915 23.9089C109.615 24.6363 108.11 25 106.399 25ZM108.543 20.9243C107.785 21.3522 106.919 21.5661 105.944 21.5661C104.969 21.5661 104.092 21.3522 103.312 20.9243C102.533 20.4964 101.915 19.8759 101.461 19.0629C101.006 18.2499 100.778 17.2978 100.778 16.2067C100.778 15.0941 101.006 14.1421 101.461 13.3505C101.915 12.5374 102.533 11.917 103.312 11.4891C104.092 11.0612 104.969 10.8472 105.944 10.8472C106.919 10.8472 107.785 11.0612 108.543 11.4891C109.323 11.917 109.94 12.5374 110.395 13.3505C110.85 14.1421 111.077 15.0941 111.077 16.2067C111.077 17.2978 110.85 18.2499 110.395 19.0629C109.94 19.8759 109.323 20.4964 108.543 20.9243Z" fill="#101828" /><path d="M53.011 34.42H49.5728L49.0592 35.6636C48.9752 35.8669 48.7738 36 48.55 36C48.157 36 47.8911 35.6073 48.0437 35.2524L50.5035 29.5313C50.6419 29.2093 50.9636 29 51.32 29C51.6776 29 52.0001 29.2106 52.1378 29.534L54.5646 35.2339C54.7197 35.5982 54.4467 36 54.0439 36C53.814 36 53.6071 35.8633 53.5208 35.6545L53.011 34.42ZM52.5727 33.37L51.287 30.26L50.0014 33.37H52.5727Z" fill="#101828" /><path d="M59.55 35.4581C59.4214 35.7846 59.1011 36 58.7439 36C58.3853 36 58.064 35.7829 57.9365 35.4543L55.7274 29.7639C55.5843 29.3951 55.8622 29 56.2647 29C56.5067 29 56.7228 29.1485 56.8052 29.3715L58.7717 34.69L60.7616 29.3574C60.8417 29.1428 61.05 29 61.2832 29C61.6733 29 61.9418 29.3838 61.8014 29.7405L59.55 35.4581Z" fill="#101828" /><path d="M65.1457 35.4367C65.1457 35.7478 64.8884 36 64.571 36C64.2537 36 63.9964 35.7478 63.9964 35.4367V29.5633C63.9964 29.2522 64.2537 29 64.571 29C64.8884 29 65.1457 29.2522 65.1457 29.5633V35.4367Z" fill="#101828" /><path d="M72.3119 34.42H68.8737L68.3601 35.6636C68.2761 35.8669 68.0746 36 67.8508 36C67.4578 36 67.192 35.6073 67.3446 35.2524L69.8043 29.5313C69.9427 29.2093 70.2645 29 70.6209 29C70.9784 29 71.3009 29.2106 71.4386 29.534L73.8655 35.2339C74.0206 35.5982 73.7475 36 73.3447 36C73.1149 36 72.908 35.8633 72.8217 35.6545L72.3119 34.42ZM71.8736 33.37L70.5879 30.26L69.3022 33.37H71.8736Z" fill="#101828" /><path d="M80.0545 29.53C80.0545 29.8227 79.8124 30.06 79.5138 30.06H77.8923V35.4367C77.8923 35.7478 77.635 36 77.3176 36C77.0002 36 76.743 35.7478 76.743 35.4367V30.06H75.1312C74.8325 30.06 74.5905 29.8227 74.5905 29.53C74.5905 29.2373 74.8325 29 75.1312 29H79.5138C79.8124 29 80.0545 29.2373 80.0545 29.53Z" fill="#101828" /><path d="M86.8831 29.53C86.8831 29.8227 86.641 30.06 86.3424 30.06H83.1625V31.95H85.9528C86.2514 31.95 86.4935 32.1873 86.4935 32.48C86.4935 32.7727 86.2514 33.01 85.9528 33.01H83.1625V34.94H86.4593C86.7579 34.94 87 35.1773 87 35.47C87 35.7627 86.7579 36 86.4593 36H82.9059C82.4129 36 82.0132 35.6083 82.0132 35.125V29.875C82.0132 29.3918 82.4129 29 82.9059 29H86.3424C86.641 29 86.8831 29.2373 86.8831 29.53Z" fill="#101828" /><defs><linearGradient id="paint0_linear_262_139966" x1="6.08983" y1="14.5429" x2="18.6046" y2="20.9542" gradientUnits="userSpaceOnUse" ><stop stop-color="#400F82" /><stop offset="1" stop-color="#6426B7" /></linearGradient><linearGradient id="paint1_linear_262_139966" x1="4.01539e-07" y1="20.6891" x2="30.1074" y2="34.4445" gradientUnits="userSpaceOnUse" ><stop stop-color="#6122B5" /><stop offset="0.924684" stop-color="#9D66D9" /></linearGradient><linearGradient id="paint2_linear_262_139966" x1="16.9381" y1="6.82129" x2="29.4642" y2="35.9781" gradientUnits="userSpaceOnUse" ><stop offset="0.0001" stop-color="#FFA16A" /><stop offset="1" stop-color="#E86B95" /></linearGradient><linearGradient id="paint3_linear_262_139966" x1="16.3084" y1="6.82129" x2="25.2345" y2="31.1075" gradientUnits="userSpaceOnUse" ><stop offset="0.078924" stop-color="#FFBD31" /><stop offset="0.355065" stop-color="#DB8B91" stop-opacity="0.29" /><stop offset="1" stop-color="#9B63D8" /></linearGradient><linearGradient id="paint4_linear_262_139966" x1="20.6269" y1="0.874241" x2="33.209" y2="9.85507" gradientUnits="userSpaceOnUse" ><stop stop-color="#FFBD31" /><stop offset="1" stop-color="#FFDC60" /></linearGradient><linearGradient id="paint5_linear_262_139966" x1="6.08983" y1="14.5429" x2="19.3089" y2="24.7653" gradientUnits="userSpaceOnUse" ><stop stop-color="#4A1FB8" /><stop offset="1" stop-color="#BA24D5" /></linearGradient><linearGradient id="paint6_linear_262_139966" x1="1.30247e-07" y1="20.6891" x2="26.5673" y2="31.0775" gradientUnits="userSpaceOnUse" ><stop stop-color="#5925DC" /><stop offset="1" stop-color="#E478FA" /></linearGradient><linearGradient id="paint7_linear_262_139966" x1="19.8214" y1="9.66582" x2="23.8148" y2="4.91199" gradientUnits="userSpaceOnUse" ><stop stop-color="#F7B27A" /><stop offset="1" stop-color="#FAC415" /></linearGradient><linearGradient id="paint8_linear_262_139966" x1="18.8924" y1="8.15742" x2="25.8029" y2="31.977" gradientUnits="userSpaceOnUse" ><stop stop-color="#F7B27A" /><stop offset="0.515303" stop-color="#DB8B91" stop-opacity="0.29" /><stop offset="1" stop-color="#E478FA" /></linearGradient><linearGradient id="paint9_linear_262_139966" x1="20.7702" y1="1.4073" x2="32.6892" y2="9.47732" gradientUnits="userSpaceOnUse" ><stop stop-color="#FAC415" /><stop offset="1" stop-color="#FDE172" /></linearGradient></defs></svg>
@@ -0,0 +1,23 @@
1
+ <%= stylesheet_link_tag 'aviate_layout', media: 'all' %>
2
+ <%= render 'aviate/layouts/sidebar/icons' %>
3
+ <div class="aviate-shell" data-aviate-shell>
4
+ <%= render 'aviate/layouts/sidebar/sidebar' %>
5
+ <div class="aviate-sidebar-backdrop" data-aviate-sidebar-close></div>
6
+
7
+ <div class="aviate-shell-main">
8
+ <div class="aviate-shell-topbar">
9
+ <button type="button" class="aviate-sidebar-toggle" data-aviate-sidebar-open
10
+ aria-controls="aviate-sidebar" aria-expanded="false" aria-label="<%= t('aviate.sidebar.open_menu') %>">
11
+ <%= aviate_sidebar_icon(:menu, 'aviate-sidebar-toggle-icon') %>
12
+ </button>
13
+ <%= link_to aviate_sidebar_home_url, class: 'aviate-shell-topbar-logo' do %>
14
+ <%= render 'aviate/layouts/sidebar/logo' %>
15
+ <% end %>
16
+ </div>
17
+
18
+ <div class="aviate-shell-content">
19
+ <%= page_content %>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ <%= javascript_include_tag 'aviate_layout' %>
@@ -0,0 +1,33 @@
1
+ <aside id="aviate-sidebar" class="aviate-sidebar" data-aviate-sidebar aria-label="<%= t('aviate.sidebar.label') %>">
2
+ <div class="aviate-sidebar-header">
3
+ <%= link_to aviate_sidebar_home_url, class: 'aviate-sidebar-logo-link' do %>
4
+ <%= render 'aviate/layouts/sidebar/logo' %>
5
+ <% end %>
6
+ <button type="button" class="aviate-sidebar-close" data-aviate-sidebar-close aria-label="<%= t('aviate.sidebar.close_menu') %>">
7
+ <%= aviate_sidebar_icon(:close, 'aviate-sidebar-close-icon') %>
8
+ </button>
9
+ </div>
10
+
11
+ <nav class="aviate-sidebar-nav">
12
+ <ul class="aviate-sidebar-list aviate-sidebar-primary">
13
+ <% aviate_sidebar_primary_items.each do |item| %>
14
+ <li><%= render 'aviate/layouts/sidebar/item', item: item %></li>
15
+ <% end %>
16
+ </ul>
17
+
18
+ <% aviate_sidebar_sections.each do |section| %>
19
+ <div class="aviate-sidebar-section" data-aviate-sidebar-section="<%= section[:key] %>">
20
+ <button type="button" class="aviate-sidebar-section-toggle" data-aviate-sidebar-section-toggle
21
+ aria-expanded="true" aria-controls="aviate-sidebar-section-<%= section[:key] %>">
22
+ <span><%= section[:label] %></span>
23
+ <%= aviate_sidebar_icon(:chevron_down, 'aviate-sidebar-chevron') %>
24
+ </button>
25
+ <ul id="aviate-sidebar-section-<%= section[:key] %>" class="aviate-sidebar-list">
26
+ <% section[:items].each do |item| %>
27
+ <li><%= render 'aviate/layouts/sidebar/item', item: item %></li>
28
+ <% end %>
29
+ </ul>
30
+ </div>
31
+ <% end %>
32
+ </nav>
33
+ </aside>
@@ -4,6 +4,42 @@ en:
4
4
  authentication_success: "Successfully authenticated. Welcome to Aviate!"
5
5
  authentication_failed: "Authentication failed. Please check your credentials."
6
6
  logout_success: "Successfully logged out from Aviate"
7
+ subscriptions:
8
+ no_account: "Create an account first, then you can add its subscriptions."
9
+ sidebar:
10
+ label: "Aviate navigation"
11
+ open_menu: "Open navigation"
12
+ close_menu: "Close navigation"
13
+ not_configured: "Not configured for this deployment"
14
+ sections:
15
+ billing_operations: "Billing Operations"
16
+ revenue: "Revenue"
17
+ insights: "Insights"
18
+ configuration: "Configuration"
19
+ help: "Help"
20
+ items:
21
+ onboarding: "Onboarding"
22
+ catalog: "Catalog"
23
+ accounts: "Accounts"
24
+ subscriptions: "Subscriptions"
25
+ invoices: "Invoices"
26
+ quotes: "Quotes"
27
+ billing_accounts: "Billing Accounts"
28
+ approvals: "Approvals"
29
+ contracts: "Contracts"
30
+ orders: "Orders"
31
+ price_management: "Price Management"
32
+ health: "Health"
33
+ revenue_dashboard: "Revenue dashboard"
34
+ reports: "Reports"
35
+ plugins: "Plugins"
36
+ invoice_templates: "Invoices"
37
+ email: "Email"
38
+ quote_template: "Quote"
39
+ settings: "Settings"
40
+ api: "API"
41
+ documentation: "Documentation"
42
+ support: "Support"
7
43
  flashes:
8
44
  notices:
9
45
  wallet_created_successfully: "Wallet created successfully"
data/config/routes.rb CHANGED
@@ -20,5 +20,7 @@ Aviate::Engine.routes.draw do
20
20
  resources :usage, only: [:index]
21
21
  end
22
22
 
23
+ # Target of the Subscriptions item of the sidebar: only redirects to the Kaui pages
24
+ get 'subscriptions', to: 'subscriptions#index', as: :subscriptions
23
25
  get 'subscriptions/:id/usage', to: 'usage#show', as: :usage_subscription
24
26
  end
data/lib/aviate/engine.rb CHANGED
@@ -17,5 +17,22 @@ module Aviate
17
17
 
18
18
  # Configure i18n
19
19
  config.i18n.load_path += Dir[Engine.root.join('config', 'locales', '**', '*.{rb,yml}')]
20
+
21
+ # Runs before the host's config/initializers, which can still override Aviate.sidebar_base_urls
22
+ initializer 'aviate.sidebar_base_urls' do
23
+ defaults = Rails.env.development? ? Aviate::SIDEBAR_DEVELOPMENT_BASE_URLS : Aviate::SIDEBAR_HOSTED_BASE_URLS
24
+ Aviate.sidebar_base_urls = Aviate.sidebar_base_urls_from_env(ENV, defaults)
25
+ end
26
+
27
+ initializer 'aviate.sso_sidebar' do
28
+ Aviate.sso_sidebar = Aviate.sso_sidebar_env?(ENV)
29
+ end
30
+
31
+ # Lets every Kaui page (and the Aviate pages, which inherit from it) use the Aviate sidebar layout when
32
+ # Aviate.sidebar_enabled? (see Aviate::SidebarLayout). Kaui keeps its URLs, controllers and layout otherwise.
33
+ config.to_prepare do
34
+ # Including a module twice is a no-op, so this is safe on every code reload
35
+ ::Kaui::EngineController.include(Aviate::SidebarLayout) if defined?(::Kaui::Engine)
36
+ end
20
37
  end
21
38
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aviate
4
- VERSION = '2.6.0.pre.4'
4
+ VERSION = '2.6.1'
5
5
  end
data/lib/aviate.rb CHANGED
@@ -7,6 +7,95 @@ module Aviate
7
7
  mattr_accessor :current_tenant_user
8
8
  mattr_accessor :layout
9
9
  mattr_accessor :account_wallets_columns
10
+ # Base URLs of the Aviate web apps linked from the sidebar (mirrors the VITE_BASE_AVIATE_* settings of aviate-dev).
11
+ # Links whose base URL is blank are rendered disabled.
12
+ mattr_accessor :sidebar_base_urls
13
+
14
+ # JVM system properties (-Dname=value on the Tomcat command line), the way Kaui itself is configured on a WAR
15
+ # deployment (-Dkaui.url=..., see the Kaui initializer). Always empty outside JRuby.
16
+ module SystemProperties
17
+ def self.[](name)
18
+ return nil unless defined?(JRUBY_VERSION)
19
+
20
+ ::Java::JavaLang::System.getProperty(name)
21
+ end
22
+ end
23
+
24
+ # Every setting is read from the system property first, then from the environment variable (same order as Kaui).
25
+ SIDEBAR_BASE_URL_PROPERTIES = {
26
+ main: 'aviate.base.main_url',
27
+ admin: 'aviate.base.admin_url',
28
+ quote: 'aviate.base.quote_url',
29
+ health: 'aviate.base.health_url'
30
+ }.freeze
31
+
32
+ SIDEBAR_BASE_URL_ENV_VARS = {
33
+ main: 'AVIATE_BASE_MAIN_URL',
34
+ admin: 'AVIATE_BASE_ADMIN_URL',
35
+ quote: 'AVIATE_BASE_QUOTE_URL',
36
+ health: 'AVIATE_BASE_HEALTH_URL'
37
+ }.freeze
38
+
39
+ # Hosted Aviate, applied when a base URL is not configured (production default)
40
+ SIDEBAR_HOSTED_BASE_URLS = {
41
+ main: 'https://aviate.killbill.io',
42
+ admin: 'https://aviate.killbill.io/admin',
43
+ quote: 'https://aviate.killbill.io/quote',
44
+ health: 'https://aviate.killbill.io/health'
45
+ }.freeze
46
+
47
+ # Local aviate-dev ports, applied instead of the hosted ones in development when the setting is unset.
48
+ SIDEBAR_DEVELOPMENT_BASE_URLS = {
49
+ main: 'http://localhost:5173',
50
+ admin: 'http://localhost:5174/admin',
51
+ quote: 'http://localhost:5175/quote',
52
+ health: 'http://localhost:5177/health'
53
+ }.freeze
54
+
55
+ # Raw value of a setting (nil when set nowhere): the system property wins over the environment variable.
56
+ def self.setting_value(property, env_name, env = ENV, properties = SystemProperties)
57
+ value = properties[property]
58
+ value.nil? ? env.fetch(env_name, nil) : value
59
+ end
60
+
61
+ # A setting that is set, even to an empty value, always wins over the default: an empty base URL disables the link.
62
+ def self.sidebar_base_urls_from_env(env = ENV, defaults = {}, properties = SystemProperties)
63
+ SIDEBAR_BASE_URL_ENV_VARS.to_h do |key, env_name|
64
+ value = setting_value(SIDEBAR_BASE_URL_PROPERTIES.fetch(key), env_name, env, properties)
65
+ [key, (value.nil? ? defaults[key] : value).presence]
66
+ end
67
+ end
68
+
69
+ self.sidebar_base_urls = sidebar_base_urls_from_env(ENV, SIDEBAR_HOSTED_BASE_URLS)
70
+
71
+ # Whether the Aviate sidebar, displayed on the Kaui pages (and on the Aviate pages), is limited to the users signed
72
+ # into Aviate:
73
+ # true (default) only for users signed into Aviate: the host flagged the session (Aviate::SSO_SESSION_KEY, set
74
+ # after the Aviate SSO sign-in) or the Aviate plugin JWT cookie is present. Without the Aviate SSO (e.g. a
75
+ # local Kaui) the sidebar is therefore not displayed;
76
+ # false for every user, e.g. to try the sidebar locally or on a self-hosted deployment.
77
+ # Read at boot from the aviate.sso_side_bar system property, else from the SSO_SIDE_BAR environment variable
78
+ # ("false" turns the SSO condition off, anything else keeps it); a host initializer can still set Aviate.sso_sidebar.
79
+ mattr_accessor :sso_sidebar
80
+
81
+ SSO_SIDEBAR_PROPERTY = 'aviate.sso_side_bar'
82
+ SSO_SIDEBAR_ENV_VAR = 'SSO_SIDE_BAR'
83
+ # Session key the host sets once the user signed in through the Aviate SSO (see README)
84
+ SSO_SESSION_KEY = :aviate_sso
85
+ # Cookie holding the JWT of the Aviate plugin session (see Aviate::ConfigurationController#session_create)
86
+ JWT_COOKIE = :jwt_token
87
+
88
+ def self.sso_sidebar_env?(env = ENV, properties = SystemProperties)
89
+ setting_value(SSO_SIDEBAR_PROPERTY, SSO_SIDEBAR_ENV_VAR, env, properties).to_s.strip.downcase != 'false'
90
+ end
91
+
92
+ self.sso_sidebar = sso_sidebar_env?
93
+
94
+ def self.sidebar_enabled?(session:, cookies:)
95
+ return true unless sso_sidebar
96
+
97
+ session[SSO_SESSION_KEY].present? || cookies[JWT_COOKIE].present?
98
+ end
10
99
 
11
100
  self.current_tenant_user = lambda { |_session, _user|
12
101
  { username: KillBillClient.username || 'admin',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-aviate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0.pre.4
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-05 00:00:00.000000000 Z
11
+ date: 2026-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: killbill-assets-ui
@@ -85,18 +85,29 @@ files:
85
85
  - app/assets/javascripts/aviate/kiddo/renderer.js
86
86
  - app/assets/javascripts/aviate/kiddo/settings.js
87
87
  - app/assets/javascripts/aviate_application.js
88
+ - app/assets/javascripts/aviate_layout.js
88
89
  - app/assets/stylesheets/aviate/aviate.css
89
90
  - app/assets/stylesheets/aviate/usage.css
90
91
  - app/assets/stylesheets/aviate_application.css
92
+ - app/assets/stylesheets/aviate_layout.css
91
93
  - app/controllers/aviate/configuration_controller.rb
92
94
  - app/controllers/aviate/engine_controller.rb
95
+ - app/controllers/aviate/subscriptions_controller.rb
93
96
  - app/controllers/aviate/usage_controller.rb
94
97
  - app/controllers/aviate/wallets_controller.rb
98
+ - app/controllers/concerns/aviate/sidebar_layout.rb
95
99
  - app/helpers/aviate/application_helper.rb
100
+ - app/helpers/aviate/sidebar_helper.rb
96
101
  - app/services/aviate/wallet.rb
97
102
  - app/services/aviate/wallet_api.rb
98
103
  - app/views/aviate/configuration/index.html.erb
99
104
  - app/views/aviate/layouts/aviate_application.html.erb
105
+ - app/views/aviate/layouts/aviate_sidebar.html.erb
106
+ - app/views/aviate/layouts/sidebar/_icons.html.erb
107
+ - app/views/aviate/layouts/sidebar/_item.html.erb
108
+ - app/views/aviate/layouts/sidebar/_logo.html.erb
109
+ - app/views/aviate/layouts/sidebar/_shell.html.erb
110
+ - app/views/aviate/layouts/sidebar/_sidebar.html.erb
100
111
  - app/views/aviate/usage/index.html.erb
101
112
  - app/views/aviate/usage/show.html.erb
102
113
  - app/views/aviate/wallets/_form.html.erb
@@ -114,7 +125,7 @@ licenses:
114
125
  - MIT
115
126
  metadata:
116
127
  rubygems_mfa_required: 'true'
117
- post_install_message:
128
+ post_install_message:
118
129
  rdoc_options: []
119
130
  require_paths:
120
131
  - lib
@@ -125,12 +136,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
136
  version: '0'
126
137
  required_rubygems_version: !ruby/object:Gem::Requirement
127
138
  requirements:
128
- - - ">"
139
+ - - ">="
129
140
  - !ruby/object:Gem::Version
130
- version: 1.3.1
141
+ version: '0'
131
142
  requirements: []
132
143
  rubygems_version: 3.4.10
133
- signing_key:
144
+ signing_key:
134
145
  specification_version: 4
135
146
  summary: Kill Bill Aviate UI mountable engine
136
147
  test_files: []