zuora_connect_ui 0.11.9 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/zuora_connect_ui/base.scss +4 -0
- data/app/assets/stylesheets/zuora_connect_ui/breadcrumb_bar.scss +89 -92
- data/app/helpers/zuora_connect_ui/application_helper.rb +0 -39
- data/app/helpers/zuora_connect_ui/asset_helper.rb +37 -0
- data/app/views/partials/_admin_menu.html.erb +5 -9
- data/app/views/partials/_table.html.erb +2 -2
- data/app/views/zuora_connect_ui/_nav.html.erb +14 -0
- data/lib/zuora_connect_ui/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 217a07e8d25bf90450ce940c088c4827773246de310224e6042cbee026dba89d
|
|
4
|
+
data.tar.gz: 67c896c71ab3678392050404f3ebf64f69a8940818d1f6504cbb8f678e48a242
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebf4d8b498b476fbaa4b6e5a57bde442cb7063cc10f7db5d9f0308e023d42148e0959afb1c69babe0405c2b3db3529567346123603b801db9b21a3cae464fcea
|
|
7
|
+
data.tar.gz: 2410ba2e9498ce47623cf33b59221eaa6d023b20a36340cf31e0bc961b67e137197605450667133f33ebcd912c3ca1e4c512c259de7ea485cfc96fddfbe2d428
|
|
@@ -1,110 +1,107 @@
|
|
|
1
|
-
#breadcrumb-bar
|
|
1
|
+
#breadcrumb-bar,
|
|
2
|
+
#breadcrumbs {
|
|
2
3
|
min-height: 2.75rem;
|
|
3
|
-
|
|
4
|
-
.breadcrumb {
|
|
5
|
-
font-size: 0.75rem;
|
|
6
|
-
padding: 1rem 1.5rem 0.5rem 1.5rem;
|
|
7
|
-
margin-bottom: 0px; // override bootstrap default
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
#peek {
|
|
12
|
-
font-size: 0.625rem;
|
|
13
|
-
text-shadow: none;
|
|
14
|
-
background-color: transparent;
|
|
15
|
-
overflow: hidden; // keeps the contents hidden when peek is collapsed
|
|
16
|
-
width: 0;
|
|
4
|
+
}
|
|
17
5
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
#breadcrumbs {
|
|
7
|
+
.breadcrumb {
|
|
8
|
+
font-size: 0.75rem;
|
|
9
|
+
padding: 1rem 1.5rem 0.5rem 1.5rem;
|
|
10
|
+
margin-bottom: 0px; // override bootstrap default
|
|
11
|
+
}
|
|
12
|
+
}
|
|
21
13
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
#peek,
|
|
15
|
+
#peek.development,
|
|
16
|
+
#peek.staging,
|
|
17
|
+
#peek.production {
|
|
18
|
+
font-size: 0.625rem;
|
|
19
|
+
text-shadow: none;
|
|
20
|
+
background-color: transparent;
|
|
21
|
+
overflow: hidden; // keeps the contents hidden when peek is collapsed
|
|
22
|
+
width: 0;
|
|
23
|
+
|
|
24
|
+
-webkit-transition: width 0.3s ease-in-out;
|
|
25
|
+
-moz-transition: width 0.3s ease-in-out;
|
|
26
|
+
transition: width 0.3s ease-in-out;
|
|
27
|
+
|
|
28
|
+
&.active {
|
|
29
|
+
width: 54rem;
|
|
30
|
+
}
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
.wrapper {
|
|
33
|
+
padding-left: 1rem;
|
|
34
|
+
width: auto;
|
|
35
|
+
}
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
.bucket {
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
.hidden {
|
|
40
|
+
display: inline !important;
|
|
32
41
|
}
|
|
42
|
+
}
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
44
|
+
strong {
|
|
45
|
+
color: $neutral-1;
|
|
46
|
+
}
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
}
|
|
48
|
+
#peek-view-connect > strong:not(:first-child) {
|
|
49
|
+
margin-left: 15px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
45
52
|
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
#admin-menu {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: flex-end;
|
|
56
|
+
align-items: center;
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 0;
|
|
59
|
+
right: 0;
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
|
|
62
|
+
background-color: $neutral-4;
|
|
63
|
+
border-left: 1px solid $neutral-2;
|
|
64
|
+
border-bottom: 1px solid $neutral-2;
|
|
65
|
+
border-radius: 0 0 0 0.5rem;
|
|
66
|
+
box-shadow: 0 1px 8px -1px $neutral-shadow;
|
|
67
|
+
|
|
68
|
+
#admin-peek-btn {
|
|
69
|
+
z-index: 1001;
|
|
70
|
+
border-radius: 0 0 0 0.5rem;
|
|
71
|
+
background: white;
|
|
72
|
+
padding: 0.5rem;
|
|
73
|
+
line-height: 1.2rem;
|
|
74
|
+
border-right: 1px solid $neutral-3;
|
|
75
|
+
|
|
76
|
+
&:before {
|
|
77
|
+
display: inline-block;
|
|
78
|
+
transform: rotate(90deg);
|
|
79
|
+
font-size: 0.75rem;
|
|
48
80
|
}
|
|
81
|
+
}
|
|
49
82
|
|
|
50
|
-
|
|
51
|
-
|
|
83
|
+
.dropdown-toggle {
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
min-width: 120px;
|
|
86
|
+
z-index: 1001;
|
|
87
|
+
background: white;
|
|
88
|
+
font-size: 0.75rem;
|
|
89
|
+
padding: 0.5rem 1rem;
|
|
90
|
+
|
|
91
|
+
> span {
|
|
92
|
+
float: right;
|
|
93
|
+
padding: 0.25rem 0rem;
|
|
52
94
|
}
|
|
53
95
|
}
|
|
54
96
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
align-items: center;
|
|
59
|
-
position: absolute;
|
|
60
|
-
top: 0;
|
|
97
|
+
.dropdown-menu {
|
|
98
|
+
min-width: 120px;
|
|
99
|
+
left: unset;
|
|
61
100
|
right: 0;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
background-color: $neutral-4;
|
|
65
|
-
border-left: 1px solid $neutral-2;
|
|
66
|
-
border-bottom: 1px solid $neutral-2;
|
|
101
|
+
margin-top: -2px;
|
|
102
|
+
font-size: 0.75rem;
|
|
67
103
|
border-radius: 0 0 0 0.5rem;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
#admin-peek-btn {
|
|
71
|
-
z-index: 1001;
|
|
72
|
-
border-radius: 0 0 0 0.5rem;
|
|
73
|
-
background: white;
|
|
74
|
-
padding: 0.5rem;
|
|
75
|
-
line-height: 1.2rem;
|
|
76
|
-
|
|
77
|
-
&:before {
|
|
78
|
-
display: inline-block;
|
|
79
|
-
transform: rotate(90deg);
|
|
80
|
-
font-size: 0.75rem;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.dropdown-toggle {
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
min-width: 120px;
|
|
87
|
-
z-index: 1001;
|
|
88
|
-
background: white;
|
|
89
|
-
border-left: 1px solid $neutral-3;
|
|
90
|
-
font-size: 0.75rem;
|
|
91
|
-
padding: 0.5rem 1rem;
|
|
92
|
-
|
|
93
|
-
> span {
|
|
94
|
-
float: right;
|
|
95
|
-
padding: 0.25rem 0rem;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.dropdown-menu {
|
|
100
|
-
min-width: 120px;
|
|
101
|
-
left: unset;
|
|
102
|
-
right: 0;
|
|
103
|
-
margin-top: -2px;
|
|
104
|
-
font-size: 0.75rem;
|
|
105
|
-
border-radius: 0 0 0 0.5rem;
|
|
106
|
-
border: 1px solid #d0d3da;
|
|
107
|
-
border-right: none;
|
|
108
|
-
}
|
|
104
|
+
border: 1px solid #d0d3da;
|
|
105
|
+
border-right: none;
|
|
109
106
|
}
|
|
110
107
|
}
|
|
@@ -6,44 +6,5 @@ module ZuoraConnectUi
|
|
|
6
6
|
def zuo_parameterize(string)
|
|
7
7
|
string.parameterize(separator: '_')
|
|
8
8
|
end
|
|
9
|
-
|
|
10
|
-
def zuo_include_tag
|
|
11
|
-
script_tag(type: 'module', src: anjuna(ANJUNA_VERSION, true)) +
|
|
12
|
-
script_tag(nomodule: '', src: anjuna(ANJUNA_VERSION, false)) +
|
|
13
|
-
script_tag(type: 'module', src: charts(ANJUNA_VERSION, true)) +
|
|
14
|
-
script_tag(nomodule: '', src: charts(ANJUNA_VERSION, false)) +
|
|
15
|
-
link_tag(href: theme(THEME_VERSION, 'application'), rel: 'stylesheet') +
|
|
16
|
-
link_tag(href: theme(THEME_VERSION, 'theme'), rel: 'stylesheet') +
|
|
17
|
-
link_tag(href: theme(THEME_VERSION, 'icons'), rel: 'stylesheet')
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def script_tag(attrs)
|
|
21
|
-
attr_map = attrs.map { |key, value| " #{key}=\"#{value}\"" }
|
|
22
|
-
|
|
23
|
-
"<script#{attr_map.join('')}></script>".html_safe
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def anjuna(version, esm)
|
|
27
|
-
"https://cdn.zuora.com/@anjuna/core@#{version}" \
|
|
28
|
-
"/anjuna-core/anjuna-core#{'.esm' if esm}.js"
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def charts(version, esm)
|
|
32
|
-
"https://cdn.zuora.com/@anjuna/charts@#{version}" \
|
|
33
|
-
"/anjuna-charts/anjuna-charts#{'.esm' if esm}.js"
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def link_tag(attrs)
|
|
37
|
-
attr_map = attrs.map { |key, value| " #{key}=\"#{value}\"" }
|
|
38
|
-
|
|
39
|
-
"<link#{attr_map.join('')}>".html_safe
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def theme(version, file)
|
|
43
|
-
"https://cdn.zuora.com/@anjuna/theme@#{version}/css/#{file}.css"
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
ANJUNA_VERSION = '1.2.14'
|
|
47
|
-
THEME_VERSION = '1.2.14'
|
|
48
9
|
end
|
|
49
10
|
end
|
|
@@ -3,5 +3,42 @@
|
|
|
3
3
|
module ZuoraConnectUi
|
|
4
4
|
# Helper methods for including CDN links in views
|
|
5
5
|
module AssetHelper
|
|
6
|
+
ANJUNA_VERSION = '1.2.14'
|
|
7
|
+
ANJUNA_CORE_URL = "https://cdn.zuora.com/@anjuna/core@#{ANJUNA_VERSION}/anjuna-core/anjuna-core.js"
|
|
8
|
+
ANJUNA_CHARTS_URL = "https://cdn.zuora.com/@anjuna/charts@#{ANJUNA_VERSION}/anjuna-charts/anjuna-charts.js"
|
|
9
|
+
|
|
10
|
+
def zuo_include_tag
|
|
11
|
+
anjuna_core + anjuna_charts + anjuna_theme
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def to_esm(url)
|
|
17
|
+
url.gsub('.js', '.esm.js')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# NOTE(hartley): nomodule was added as an explict boolean attribute in Rails
|
|
21
|
+
# 6.1, meaning 'nomodule: true' should be used once minimum version is 6.1
|
|
22
|
+
# However, for consistency with older versions we have to specify 'nomodule'
|
|
23
|
+
# as the value
|
|
24
|
+
def anjuna_core
|
|
25
|
+
tag.script(type: 'module', src: to_esm(ANJUNA_CORE_URL)) +
|
|
26
|
+
tag.script(nomodule: 'nomodule', src: ANJUNA_CORE_URL)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def anjuna_charts
|
|
30
|
+
tag.script(type: 'module', src: to_esm(ANJUNA_CHARTS_URL)) +
|
|
31
|
+
tag.script(nomodule: 'nomodule', src: ANJUNA_CHARTS_URL)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def anjuna_theme
|
|
35
|
+
tag.link(href: anjuna_theme_url('application'), rel: 'stylesheet') +
|
|
36
|
+
tag.link(href: anjuna_theme_url('theme'), rel: 'stylesheet') +
|
|
37
|
+
tag.link(href: anjuna_theme_url('icons'), rel: 'stylesheet')
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def anjuna_theme_url(file)
|
|
41
|
+
"https://cdn.zuora.com/@anjuna/theme@#{ANJUNA_VERSION}/css/#{file}.css"
|
|
42
|
+
end
|
|
6
43
|
end
|
|
7
44
|
end
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<div id='admin-menu' class="dropdown">
|
|
3
3
|
<% if defined?(peek_bar) && peek_bar %>
|
|
4
4
|
<%= render 'peek/bar' %>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
<div id="admin-peek-btn" class="z-icon-dotted zuo-btn"></div>
|
|
6
|
+
|
|
7
|
+
<% content_for :scripts do %>
|
|
8
|
+
$('#admin-peek-btn').on('click', () => $('#peek').toggleClass('active'));
|
|
9
|
+
<% end %>
|
|
9
10
|
<% end %>
|
|
10
|
-
<div id="admin-peek-btn" class="z-icon-dotted zuo-btn"></div>
|
|
11
11
|
<div class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
12
12
|
Admin
|
|
13
13
|
<span class="z-icon-desc"></span>
|
|
@@ -17,7 +17,3 @@
|
|
|
17
17
|
</ul>
|
|
18
18
|
</div>
|
|
19
19
|
<% end %>
|
|
20
|
-
|
|
21
|
-
<% content_for :scripts do %>
|
|
22
|
-
$('#admin-peek-btn').on('click', () => $('#peek').toggleClass('active'));
|
|
23
|
-
<% end %>
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
'<%= table_name %>',
|
|
76
76
|
{
|
|
77
77
|
columns: <%= raw columns.to_json %>,
|
|
78
|
-
filters: <%=
|
|
78
|
+
filters: <%= json_escape table_filters.to_json.html_safe %>,
|
|
79
79
|
view: '<%= table_views.select { |k, v| v == true }.first[0].to_s %>',
|
|
80
80
|
size: <%= initial_size %>,
|
|
81
81
|
sort: <%= raw sort %>
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
'<%= table_name %>',
|
|
259
259
|
{ view, size },
|
|
260
260
|
columns,
|
|
261
|
-
<%=
|
|
261
|
+
<%= json_escape table_filters.to_json.html_safe %>
|
|
262
262
|
);
|
|
263
263
|
|
|
264
264
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<% layout_id = "HTTP_ZUORA_LAYOUT_FETCH_TEMPLATE_ID" %>
|
|
2
|
+
<% ui_path = "HTTP_ZUORA_UI_PATH" %>
|
|
3
|
+
|
|
4
|
+
<% if request.headers[layout_id].present? || (!request.headers[ui_path].present? && !Rails.env.development?) %>
|
|
5
|
+
<%= yield %>
|
|
6
|
+
<% else %>
|
|
7
|
+
<z-unified-nav-v2>
|
|
8
|
+
<div slot="breadcrumbContent">
|
|
9
|
+
<%= yield %>
|
|
10
|
+
</div>
|
|
11
|
+
</z-unified-nav-v2>
|
|
12
|
+
<script type="text/javascript" crossorigin="anonymous" src="https://cdn.zuora.com/@platform-ui/nav-v2/main.js"></script>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zuora_connect_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.12.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Connect Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bootstrap-sass
|
|
@@ -72,14 +72,14 @@ dependencies:
|
|
|
72
72
|
requirements:
|
|
73
73
|
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '5.
|
|
75
|
+
version: '5.1'
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '5.
|
|
82
|
+
version: '5.1'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: select2-rails
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -358,6 +358,7 @@ files:
|
|
|
358
358
|
- app/views/partials/_row_actions.html.erb
|
|
359
359
|
- app/views/partials/_table.html.erb
|
|
360
360
|
- app/views/peek/views/_connect.html.erb
|
|
361
|
+
- app/views/zuora_connect_ui/_nav.html.erb
|
|
361
362
|
- config/initializers/oj.rb
|
|
362
363
|
- lib/peek/views/connect.rb
|
|
363
364
|
- lib/zuora_connect_ui.rb
|