beyond_canvas 0.22.0.pre → 0.23.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/icons/adblocker.svg +5 -0
- data/app/assets/images/icons/checkbox_checked.svg +1 -1
- data/app/assets/images/icons/checkbox_unchecked.svg +1 -1
- data/app/assets/images/icons/external_link.svg +1 -0
- data/app/assets/images/icons/toggle.svg +1 -0
- data/app/assets/images/icons/toggle_checked.svg +3 -0
- data/app/assets/images/icons/toggle_unchecked.svg +3 -0
- data/app/assets/javascripts/beyond_canvas/base.js +77 -31
- data/app/assets/stylesheets/beyond_canvas/base.scss +19 -18
- data/app/assets/stylesheets/beyond_canvas/components/_action_bar.scss +11 -6
- data/app/assets/stylesheets/beyond_canvas/components/_breadcrumbs.scss +5 -5
- data/app/assets/stylesheets/beyond_canvas/components/_buttons.scss +45 -95
- data/app/assets/stylesheets/beyond_canvas/components/_cards.scss +20 -12
- data/app/assets/stylesheets/beyond_canvas/components/_collapse.scss +6 -3
- data/app/assets/stylesheets/beyond_canvas/components/_flash.scss +11 -11
- data/app/assets/stylesheets/beyond_canvas/components/_forms.scss +2 -2
- data/app/assets/stylesheets/beyond_canvas/components/_inputs.scss +182 -40
- data/app/assets/stylesheets/beyond_canvas/components/_links.scss +51 -3
- data/app/assets/stylesheets/beyond_canvas/components/_main.scss +3 -3
- data/app/assets/stylesheets/beyond_canvas/components/_menu.scss +13 -0
- data/app/assets/stylesheets/beyond_canvas/components/_modals.scss +48 -18
- data/app/assets/stylesheets/beyond_canvas/components/_notices.scss +11 -11
- data/app/assets/stylesheets/beyond_canvas/components/_scrollbox.scss +5 -4
- data/app/assets/stylesheets/beyond_canvas/components/_select2.scss +13 -13
- data/app/assets/stylesheets/beyond_canvas/components/_statuses.scss +9 -8
- data/app/assets/stylesheets/beyond_canvas/components/_step_list.scss +67 -0
- data/app/assets/stylesheets/beyond_canvas/components/_tables.scss +10 -5
- data/app/assets/stylesheets/beyond_canvas/components/_titles.scss +1 -1
- data/app/assets/stylesheets/beyond_canvas/mailer.scss +2 -1
- data/app/assets/stylesheets/beyond_canvas/settings/_base_variables.scss +241 -0
- data/app/assets/stylesheets/beyond_canvas/settings/{_variables.scss → _constant_variables.scss} +30 -64
- data/app/assets/stylesheets/beyond_canvas/settings/_custom_variables.scss +233 -0
- data/app/assets/stylesheets/beyond_canvas/settings/_typography.scss +7 -3
- data/app/assets/stylesheets/beyond_canvas/utilities/_mixins.scss +30 -3
- data/app/controllers/beyond_canvas/authentications_controller.rb +18 -2
- data/app/controllers/beyond_canvas/system_controller.rb +3 -1
- data/app/controllers/beyond_canvas/webhooks_controller.rb +49 -0
- data/app/controllers/concerns/beyond_canvas/add_blocker_check.rb +17 -0
- data/app/controllers/concerns/beyond_canvas/custom_styles.rb +54 -0
- data/app/controllers/concerns/beyond_canvas/locale_management.rb +31 -8
- data/app/controllers/concerns/beyond_canvas/request_validation.rb +6 -0
- data/app/form_builders/beyond_canvas/form_builder.rb +62 -49
- data/app/helpers/beyond_canvas/application_helper.rb +27 -4
- data/app/helpers/beyond_canvas/form_tag_helper.rb +130 -0
- data/app/javascript/beyond_canvas/base.js +0 -1
- data/app/javascript/beyond_canvas/initializers/buttons.js +10 -2
- data/app/javascript/beyond_canvas/initializers/flash.js +32 -10
- data/app/javascript/beyond_canvas/initializers/inputs.js +9 -4
- data/app/javascript/beyond_canvas/initializers/modals.js +46 -10
- data/app/views/beyond_canvas/mailer/_header.html.erb +2 -2
- data/app/views/beyond_canvas/shared/_flash.html.erb +14 -10
- data/app/views/beyond_canvas/shared/_head.html.erb +4 -0
- data/app/views/beyond_canvas/shared/_locales.html.erb +1 -1
- data/app/views/layouts/beyond_canvas/application.html.erb +0 -1
- data/app/views/layouts/beyond_canvas/public.html.erb +1 -1
- data/config/initializers/beyond_canvas/constants.rb +13 -0
- data/config/initializers/beyond_canvas/session_store.rb +8 -0
- data/lib/beyond_canvas/configuration.rb +9 -1
- data/lib/beyond_canvas/engine.rb +7 -0
- data/lib/beyond_canvas/rails/routes.rb +27 -7
- data/lib/beyond_canvas/version.rb +1 -1
- data/lib/beyond_canvas/webhook_event_registration.rb +19 -0
- data/lib/beyond_canvas.rb +6 -4
- data/lib/generators/beyond_canvas/install/install_generator.rb +6 -0
- data/lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb +38 -1
- data/lib/generators/beyond_canvas/model/model_generator.rb +3 -0
- data/lib/generators/beyond_canvas/webhook/templates/webhooks_controller.rb +22 -0
- data/lib/generators/beyond_canvas/webhook/webhook_generator.rb +15 -0
- data/lib/models/concerns/authentication.rb +10 -3
- data/lib/models/concerns/utils.rb +1 -1
- data/lib/models/concerns/webhook.rb +123 -0
- data/lib/models/shop.rb +1 -0
- metadata +68 -39
- data/app/assets/stylesheets/beyond_canvas/components/_comments.scss +0 -6
- data/app/views/beyond_canvas/shared/_modal.html.erb +0 -6
- data/config/routes.rb +0 -12
@@ -1,10 +1,20 @@
|
|
1
|
+
%card {
|
2
|
+
background: var(--card-background);
|
3
|
+
border-radius: var(--card-borderRadius);
|
4
|
+
box-shadow: var(--card-shadow);
|
5
|
+
}
|
6
|
+
|
7
|
+
%card_padding {
|
8
|
+
@include padding(var(--card-padding));
|
9
|
+
|
10
|
+
box-sizing: border-box;
|
11
|
+
}
|
12
|
+
|
1
13
|
.card {
|
2
|
-
|
3
|
-
border-radius: $card-border-radius;
|
4
|
-
box-shadow: $card-box-shadow;
|
14
|
+
@extend %card;
|
5
15
|
|
6
16
|
&:not(:last-child) {
|
7
|
-
margin-bottom:
|
17
|
+
margin-bottom: 30px;
|
8
18
|
}
|
9
19
|
|
10
20
|
&--relative {
|
@@ -12,22 +22,20 @@
|
|
12
22
|
}
|
13
23
|
|
14
24
|
&--padding {
|
15
|
-
@
|
16
|
-
|
17
|
-
box-sizing: border-box;
|
25
|
+
@extend %card_padding;
|
18
26
|
}
|
19
27
|
|
20
28
|
&__separator {
|
21
|
-
@include margin(
|
29
|
+
@include margin(35px null);
|
22
30
|
|
23
|
-
border-bottom:
|
24
|
-
left:
|
31
|
+
border-bottom: var(--card-divider-border);
|
32
|
+
left: calc(-1 * var(--card-padding));
|
25
33
|
position: relative;
|
26
|
-
width: calc(100% + 2 * #{
|
34
|
+
width: calc(100% + 2 * #{var(--card-padding)});
|
27
35
|
}
|
28
36
|
|
29
37
|
&__headline {
|
30
|
-
color:
|
38
|
+
color: var(--card-headline);
|
31
39
|
font-size: 20px;
|
32
40
|
margin-bottom: 20px;
|
33
41
|
}
|
@@ -9,18 +9,21 @@
|
|
9
9
|
}
|
10
10
|
|
11
11
|
&__button {
|
12
|
-
color:
|
12
|
+
color: var(--primary-color);
|
13
13
|
font-weight: 700;
|
14
14
|
cursor: pointer;
|
15
|
-
display:
|
15
|
+
display: block;
|
16
16
|
line-height: 1;
|
17
17
|
margin-bottom: 4px;
|
18
|
+
overflow: hidden;
|
19
|
+
text-overflow: ellipsis;
|
20
|
+
white-space: nowrap;
|
18
21
|
}
|
19
22
|
|
20
23
|
&__icon {
|
21
24
|
@include size(10px);
|
22
25
|
|
23
|
-
fill:
|
26
|
+
fill: var(--primary-color);
|
24
27
|
margin-right: 2px;
|
25
28
|
|
26
29
|
&--open {
|
@@ -1,13 +1,13 @@
|
|
1
1
|
.flash {
|
2
2
|
@include position(fixed, 70px null null null);
|
3
3
|
|
4
|
-
background-color:
|
5
|
-
border-radius:
|
6
|
-
box-shadow:
|
4
|
+
background-color: var(--notification-background);
|
5
|
+
border-radius: var(--notification-borderRadius);
|
6
|
+
box-shadow: var(--notification-boxShadow);
|
7
7
|
display: flex;
|
8
8
|
overflow: hidden;
|
9
9
|
transition: 0.7s linear;
|
10
|
-
z-index:
|
10
|
+
z-index: 999999;
|
11
11
|
|
12
12
|
&--shown {
|
13
13
|
// sass-lint:disable no-important
|
@@ -24,25 +24,25 @@
|
|
24
24
|
> svg {
|
25
25
|
@include size(18px);
|
26
26
|
|
27
|
-
fill:
|
27
|
+
fill: var(--notification-background);
|
28
28
|
}
|
29
29
|
|
30
30
|
&--success,
|
31
31
|
&--notice {
|
32
|
-
background-color:
|
32
|
+
background-color: var(--notification-success);
|
33
33
|
}
|
34
34
|
|
35
35
|
&--info {
|
36
|
-
background-color:
|
36
|
+
background-color: var(--notification-info);
|
37
37
|
}
|
38
38
|
|
39
39
|
&--warning {
|
40
|
-
background-color:
|
40
|
+
background-color: var(--notification-warning);
|
41
41
|
}
|
42
42
|
|
43
43
|
&--error,
|
44
44
|
&--alert {
|
45
|
-
background-color:
|
45
|
+
background-color: var(--notification-danger);
|
46
46
|
}
|
47
47
|
}
|
48
48
|
|
@@ -50,7 +50,7 @@
|
|
50
50
|
@include padding(10px 15px);
|
51
51
|
|
52
52
|
box-sizing: border-box;
|
53
|
-
color:
|
53
|
+
color: var(--notification-text);
|
54
54
|
}
|
55
55
|
|
56
56
|
&__close {
|
@@ -61,7 +61,7 @@
|
|
61
61
|
> svg {
|
62
62
|
@include size(8px);
|
63
63
|
|
64
|
-
fill:
|
64
|
+
fill: var(--notification-text);
|
65
65
|
}
|
66
66
|
}
|
67
67
|
}
|
@@ -2,17 +2,18 @@ $controls: checkbox, radio;
|
|
2
2
|
|
3
3
|
#{$all-text-inputs},
|
4
4
|
select {
|
5
|
-
background-color:
|
6
|
-
border: 1px solid
|
7
|
-
border-radius:
|
5
|
+
background-color: var(--inputField-background);
|
6
|
+
border: 1px solid var(--inputField-border);
|
7
|
+
border-radius: var(--inputField-borderRadius);
|
8
8
|
box-sizing: border-box;
|
9
|
+
order: 2;
|
9
10
|
outline: none;
|
10
11
|
padding: 6px 8px;
|
11
12
|
width: 100%;
|
12
13
|
|
13
14
|
&:disabled {
|
14
|
-
background-color:
|
15
|
-
color:
|
15
|
+
background-color: var(--inputField-background-disabled) !important;
|
16
|
+
color: var(--inputField-text-disabled);
|
16
17
|
opacity: 1;
|
17
18
|
}
|
18
19
|
}
|
@@ -23,7 +24,7 @@ select {
|
|
23
24
|
|
24
25
|
#{$all-text-inputs-focus},
|
25
26
|
select:focus {
|
26
|
-
border-color:
|
27
|
+
border-color: var(--inputField-border-focus);
|
27
28
|
}
|
28
29
|
|
29
30
|
select {
|
@@ -43,70 +44,208 @@ textarea {
|
|
43
44
|
#{$all-text-inputs},
|
44
45
|
select {
|
45
46
|
&.input__error {
|
46
|
-
border-left: 2px solid
|
47
|
+
border-left: 2px solid var(--formGroup-validation-error);
|
47
48
|
|
48
49
|
&:focus {
|
49
|
-
border: 1px solid
|
50
|
+
border: 1px solid var(--inputField-border-focus);
|
50
51
|
}
|
51
52
|
}
|
52
53
|
}
|
53
54
|
|
54
55
|
.input {
|
55
56
|
&__label {
|
56
|
-
color:
|
57
|
+
color: var(--formGroup-label);
|
57
58
|
display: block;
|
58
59
|
font-size: 13px;
|
59
60
|
font-weight: bold;
|
61
|
+
|
62
|
+
&--disabled {
|
63
|
+
color: var(--check-disabled-text);
|
64
|
+
}
|
60
65
|
}
|
61
66
|
|
62
67
|
&__hint {
|
63
|
-
color:
|
68
|
+
color: var(--inputField-hint-text);
|
64
69
|
font-size: 13px;
|
65
70
|
margin-top: 1px;
|
66
71
|
}
|
67
72
|
|
73
|
+
&__pre,
|
74
|
+
&__post {
|
75
|
+
background-color: var(--inputField-background-disabled);
|
76
|
+
border: 1px solid var(--inputField-border);
|
77
|
+
box-sizing: border-box;
|
78
|
+
color: var(--inputField-text-disabled);
|
79
|
+
line-height: 1;
|
80
|
+
outline: none;
|
81
|
+
padding: 6px 8px;
|
82
|
+
}
|
83
|
+
|
84
|
+
&__pre {
|
85
|
+
border-bottom-left-radius: var(--inputField-borderRadius);
|
86
|
+
border-top-left-radius: var(--inputField-borderRadius);
|
87
|
+
border-right: 0;
|
88
|
+
order: 1;
|
89
|
+
|
90
|
+
~ input,
|
91
|
+
~ select {
|
92
|
+
@include border-left-radius(0);
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
&__post {
|
97
|
+
border-bottom-right-radius: var(--inputField-borderRadius);
|
98
|
+
border-top-right-radius: var(--inputField-borderRadius);
|
99
|
+
border-left: 0;
|
100
|
+
order: 10;
|
101
|
+
|
102
|
+
~ input,
|
103
|
+
~ select {
|
104
|
+
@include border-right-radius(0);
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
68
108
|
@each $control in $controls {
|
69
109
|
|
70
110
|
&__#{$control} {
|
71
|
-
display: flex;
|
72
|
-
align-items: center;
|
73
|
-
|
74
|
-
.input__#{$control}__control {
|
75
|
-
@if $control == checkbox {
|
76
|
-
@include size(16px);
|
77
|
-
} @else if $control == radio {
|
78
|
-
@include size(18px);
|
79
|
-
}
|
80
111
|
|
112
|
+
&__control {
|
81
113
|
cursor: pointer;
|
82
|
-
margin-right: 7px;
|
83
114
|
}
|
84
115
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
116
|
+
&--unchecked {
|
117
|
+
background: #fff;
|
118
|
+
|
119
|
+
path {
|
120
|
+
fill: var(--uncheck-color);
|
90
121
|
}
|
91
122
|
}
|
92
123
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
124
|
+
&--checked {
|
125
|
+
background: #fff;
|
126
|
+
|
127
|
+
path {
|
128
|
+
fill: var(--check-color);
|
98
129
|
}
|
99
130
|
}
|
100
131
|
|
101
|
-
+
|
102
|
-
|
132
|
+
&:not(:checked) + .input__#{$control}__control .input__#{$control}--unchecked,
|
133
|
+
&:checked + .input__#{$control}__control .input__#{$control}--checked {
|
134
|
+
display: block !important;
|
135
|
+
}
|
136
|
+
|
137
|
+
&:disabled {
|
138
|
+
~ div .input__label,
|
139
|
+
~ div .input__hint {
|
140
|
+
cursor: default;
|
141
|
+
color: var(--check-disabled-text);
|
142
|
+
}
|
143
|
+
|
144
|
+
+ .input__#{$control}__control .input__#{$control}--unchecked,
|
145
|
+
+ .input__#{$control}__control .input__#{$control}--checked {
|
146
|
+
cursor: default;
|
147
|
+
|
148
|
+
path {
|
149
|
+
fill: var(--check-disabled-icon);
|
150
|
+
}
|
151
|
+
}
|
103
152
|
}
|
104
153
|
|
105
|
-
|
154
|
+
~ div .input__label {
|
155
|
+
padding-left: 7px;
|
156
|
+
}
|
157
|
+
|
158
|
+
~ div .input__hint {
|
159
|
+
padding-left: 7px;
|
160
|
+
padding-top: 4px;
|
161
|
+
}
|
162
|
+
|
163
|
+
~ div .input__label,
|
164
|
+
~ div .input__hint {
|
106
165
|
line-height: 1;
|
107
|
-
|
166
|
+
cursor: pointer;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
&__toggle {
|
172
|
+
|
173
|
+
&:checked + .input__toggle__control svg path:nth-of-type(1),
|
174
|
+
&:not(:checked) + .input__toggle__control svg path:nth-of-type(2) {
|
175
|
+
opacity: 1;
|
176
|
+
}
|
177
|
+
|
178
|
+
&:checked + .input__toggle__control svg path {
|
179
|
+
transform: translateX(19.6px);
|
180
|
+
}
|
181
|
+
|
182
|
+
&:disabled {
|
183
|
+
+ .input__toggle__control {
|
184
|
+
cursor: default;
|
185
|
+
|
186
|
+
svg {
|
187
|
+
|
188
|
+
rect {
|
189
|
+
fill: var(--inputField-background-disabled);
|
190
|
+
}
|
191
|
+
|
192
|
+
path {
|
193
|
+
fill: var(--check-disabled-icon);
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
~ div .input__label,
|
199
|
+
~ div .input__hint {
|
200
|
+
cursor: default;
|
201
|
+
color: var(--check-disabled-text);
|
108
202
|
}
|
109
203
|
}
|
204
|
+
|
205
|
+
&__control {
|
206
|
+
cursor: pointer;
|
207
|
+
width: 47px;
|
208
|
+
height: 26px;
|
209
|
+
|
210
|
+
svg {
|
211
|
+
width: 47px;
|
212
|
+
height: 26px;
|
213
|
+
|
214
|
+
rect {
|
215
|
+
stroke: var(--flipSwitch-border);
|
216
|
+
fill: transparent;
|
217
|
+
}
|
218
|
+
|
219
|
+
path {
|
220
|
+
transition: 0.3s;
|
221
|
+
opacity: 0;
|
222
|
+
|
223
|
+
&:nth-of-type(1) {
|
224
|
+
fill: var(--flipSwitch-checked-background);
|
225
|
+
}
|
226
|
+
|
227
|
+
&:nth-of-type(2) {
|
228
|
+
fill: var(--flipSwitch-unchecked-background);
|
229
|
+
}
|
230
|
+
}
|
231
|
+
}
|
232
|
+
}
|
233
|
+
|
234
|
+
~ div .input__label {
|
235
|
+
color: var(--flipSwitch-label);
|
236
|
+
}
|
237
|
+
|
238
|
+
~ div .input__hint {
|
239
|
+
color: var(--flipSwitch-text);
|
240
|
+
padding-top: 4px;
|
241
|
+
}
|
242
|
+
|
243
|
+
~ div .input__label,
|
244
|
+
~ div .input__hint {
|
245
|
+
padding-left: 10px;
|
246
|
+
line-height: 1;
|
247
|
+
cursor: pointer;
|
248
|
+
}
|
110
249
|
}
|
111
250
|
|
112
251
|
&__file {
|
@@ -139,16 +278,19 @@ label.input__error {
|
|
139
278
|
@include padding(5px 7px);
|
140
279
|
@include position(absolute, calc(100% + 8px) null null 0);
|
141
280
|
|
142
|
-
background-color:
|
143
|
-
border-radius:
|
144
|
-
color:
|
281
|
+
background-color: var(--formGroup-validation-error);
|
282
|
+
border-radius: var(--formGroup-validation-borderRadius);
|
283
|
+
color: var(--formGroup-validation-text);
|
145
284
|
font-size: 13px;
|
146
285
|
z-index: 1;
|
147
286
|
|
148
287
|
&::before {
|
149
288
|
@include position(absolute, null null 100% 8px);
|
150
|
-
|
151
|
-
|
152
|
-
|
289
|
+
border-style: solid;
|
290
|
+
height: 0;
|
291
|
+
width: 0;
|
292
|
+
border-color: transparent transparent var(--formGroup-validation-error);
|
293
|
+
border-width: 0 6px 6px;
|
294
|
+
content: '';
|
153
295
|
}
|
154
296
|
}
|