glib-web 4.44.3 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/glib/json_ui/abstract_builder.rb +1 -1
- data/app/helpers/glib/json_ui/action_builder/browsers.rb +1 -3
- data/app/helpers/glib/json_ui/list_builders.rb +1 -1
- data/app/helpers/glib/json_ui/view_builder/fields.rb +0 -53
- data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +0 -65
- data/app/views/json_ui/garage/test_page/_header.json.jbuilder +9 -2
- data/app/views/json_ui/garage/test_page/auth.json.jbuilder +37 -0
- data/app/views/json_ui/garage/test_page/browsers.json.jbuilder +1 -0
- data/app/views/json_ui/garage/test_page/dialog.json.jbuilder +123 -26
- data/app/views/json_ui/garage/test_page/dirty_state.json.jbuilder +0 -5
- data/app/views/json_ui/garage/test_page/fields_creditCard.json.jbuilder +118 -0
- data/app/views/json_ui/garage/test_page/fields_date_time.json.jbuilder +213 -0
- data/app/views/json_ui/garage/test_page/fields_location.json.jbuilder +151 -0
- data/app/views/json_ui/garage/test_page/fields_otp.json.jbuilder +168 -0
- data/app/views/json_ui/garage/test_page/fields_phone.json.jbuilder +176 -0
- data/app/views/json_ui/garage/test_page/fields_rating.json.jbuilder +191 -0
- data/app/views/json_ui/garage/test_page/fields_richText.json.jbuilder +213 -0
- data/app/views/json_ui/garage/test_page/fields_stripeExternalAccount.json.jbuilder +146 -0
- data/app/views/json_ui/garage/test_page/fields_stripeToken.json.jbuilder +118 -0
- data/app/views/json_ui/garage/test_page/fields_upload.json.jbuilder +15 -1
- data/app/views/json_ui/garage/test_page/window.json.jbuilder +23 -14
- data/app/views/json_ui/garage/test_page/windows.json.jbuilder +74 -16
- data/lib/glib/rubocop/cops/multiline_method_call_style.rb +0 -8
- data/lib/tasks/db.rake +0 -1
- metadata +15 -8
- data/app/views/json_ui/garage/test_page/multiupload.json.jbuilder +0 -65
- data/lib/glib/doc_generator.rb +0 -386
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
json.title 'Test Page (Fields Stripe External Account)'
|
|
2
|
+
|
|
3
|
+
page = json_ui_page json
|
|
4
|
+
|
|
5
|
+
page.body(
|
|
6
|
+
childViews: ->(body) do
|
|
7
|
+
render 'json_ui/garage/test_page/header', view: body
|
|
8
|
+
|
|
9
|
+
body.panels_responsive(
|
|
10
|
+
padding: glib_json_padding_body,
|
|
11
|
+
childViews: ->(res) do
|
|
12
|
+
res.h2 text: 'Fields Stripe External Account'
|
|
13
|
+
res.spacer height: 8
|
|
14
|
+
res.label text: 'Collect bank account details for Stripe Connect payouts.'
|
|
15
|
+
res.spacer height: 12
|
|
16
|
+
|
|
17
|
+
res.panels_form(
|
|
18
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
19
|
+
method: 'post',
|
|
20
|
+
childViews: ->(form) do
|
|
21
|
+
form.h2 text: 'Overview'
|
|
22
|
+
form.spacer height: 8
|
|
23
|
+
form.label text: 'Use fields_stripeExternalAccount to connect payout destinations securely.'
|
|
24
|
+
form.spacer height: 12
|
|
25
|
+
form.hr width: 'matchParent'
|
|
26
|
+
form.spacer height: 12
|
|
27
|
+
|
|
28
|
+
form.h2 text: 'Basic example'
|
|
29
|
+
form.spacer height: 8
|
|
30
|
+
form.fields_stripeExternalAccount(
|
|
31
|
+
id: 'stripe_external_basic',
|
|
32
|
+
name: 'user[stripe_external_account]',
|
|
33
|
+
width: 'matchParent',
|
|
34
|
+
label: 'Bank account',
|
|
35
|
+
publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx',
|
|
36
|
+
accountHolderName: 'John Doe',
|
|
37
|
+
accountHolderType: 'individual',
|
|
38
|
+
country: 'AU',
|
|
39
|
+
currency: 'AUD',
|
|
40
|
+
onChange: ->(action) do
|
|
41
|
+
action.logics_set targetId: 'stripe_external_status', data: { text: 'Status: account updated' }
|
|
42
|
+
end
|
|
43
|
+
)
|
|
44
|
+
# form.spacer height: 8
|
|
45
|
+
# form.label id: 'stripe_external_status', text: 'Status: idle'
|
|
46
|
+
|
|
47
|
+
# form.spacer height: 12
|
|
48
|
+
# form.hr width: 'matchParent'
|
|
49
|
+
# form.spacer height: 12
|
|
50
|
+
|
|
51
|
+
# form.h2 text: 'Variants/props'
|
|
52
|
+
# form.spacer height: 8
|
|
53
|
+
# form.label text: 'Switch between individual and company settings.'
|
|
54
|
+
# form.spacer height: 8
|
|
55
|
+
# form.panels_flow(
|
|
56
|
+
# innerPadding: { bottom: 0 },
|
|
57
|
+
# width: 'matchParent',
|
|
58
|
+
# childViews: ->(flow) do
|
|
59
|
+
# flow.button(
|
|
60
|
+
# text: 'Individual (AU/AUD)',
|
|
61
|
+
# onClick: ->(action) do
|
|
62
|
+
# action.components_set(
|
|
63
|
+
# targetId: 'stripe_external_basic',
|
|
64
|
+
# data: {
|
|
65
|
+
# accountHolderName: 'John Doe',
|
|
66
|
+
# accountHolderType: 'individual',
|
|
67
|
+
# country: 'AU',
|
|
68
|
+
# currency: 'AUD'
|
|
69
|
+
# }
|
|
70
|
+
# )
|
|
71
|
+
# end
|
|
72
|
+
# )
|
|
73
|
+
# flow.spacer width: 8
|
|
74
|
+
# flow.button(
|
|
75
|
+
# text: 'Company (US/USD)',
|
|
76
|
+
# onClick: ->(action) do
|
|
77
|
+
# action.components_set(
|
|
78
|
+
# targetId: 'stripe_external_basic',
|
|
79
|
+
# data: {
|
|
80
|
+
# accountHolderName: 'Acme Corp',
|
|
81
|
+
# accountHolderType: 'company',
|
|
82
|
+
# country: 'US',
|
|
83
|
+
# currency: 'USD'
|
|
84
|
+
# }
|
|
85
|
+
# )
|
|
86
|
+
# end
|
|
87
|
+
# )
|
|
88
|
+
# flow.spacer width: 8
|
|
89
|
+
# flow.button(
|
|
90
|
+
# text: 'Company (GB/GBP)',
|
|
91
|
+
# onClick: ->(action) do
|
|
92
|
+
# action.components_set(
|
|
93
|
+
# targetId: 'stripe_external_basic',
|
|
94
|
+
# data: {
|
|
95
|
+
# accountHolderName: 'London Ltd',
|
|
96
|
+
# accountHolderType: 'company',
|
|
97
|
+
# country: 'GB',
|
|
98
|
+
# currency: 'GBP'
|
|
99
|
+
# }
|
|
100
|
+
# )
|
|
101
|
+
# end
|
|
102
|
+
# )
|
|
103
|
+
# end
|
|
104
|
+
# )
|
|
105
|
+
|
|
106
|
+
# form.spacer height: 12
|
|
107
|
+
# form.hr width: 'matchParent'
|
|
108
|
+
# form.spacer height: 12
|
|
109
|
+
|
|
110
|
+
# form.h2 text: 'Edge/advanced'
|
|
111
|
+
# form.spacer height: 8
|
|
112
|
+
# form.panels_flow(
|
|
113
|
+
# innerPadding: { bottom: 0 },
|
|
114
|
+
# width: 'matchParent',
|
|
115
|
+
# childViews: ->(flow) do
|
|
116
|
+
# flow.button(
|
|
117
|
+
# text: 'Disable field',
|
|
118
|
+
# onClick: ->(action) do
|
|
119
|
+
# action.components_set targetId: 'stripe_external_basic', data: { disabled: true }
|
|
120
|
+
# end
|
|
121
|
+
# )
|
|
122
|
+
# flow.spacer width: 8
|
|
123
|
+
# flow.button(
|
|
124
|
+
# text: 'Enable field',
|
|
125
|
+
# onClick: ->(action) do
|
|
126
|
+
# action.components_set targetId: 'stripe_external_basic', data: { disabled: nil }
|
|
127
|
+
# end
|
|
128
|
+
# )
|
|
129
|
+
# flow.spacer width: 8
|
|
130
|
+
# flow.button(
|
|
131
|
+
# text: 'Reset label',
|
|
132
|
+
# onClick: ->(action) do
|
|
133
|
+
# action.components_set targetId: 'stripe_external_basic', data: { label: 'Bank account' }
|
|
134
|
+
# end
|
|
135
|
+
# )
|
|
136
|
+
# end
|
|
137
|
+
# )
|
|
138
|
+
|
|
139
|
+
form.spacer height: 12
|
|
140
|
+
form.fields_submit text: 'Submit'
|
|
141
|
+
end
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
)
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
json.title 'Test Page (Fields Stripe Token)'
|
|
2
|
+
|
|
3
|
+
page = json_ui_page json
|
|
4
|
+
|
|
5
|
+
page.body(
|
|
6
|
+
childViews: ->(body) do
|
|
7
|
+
render 'json_ui/garage/test_page/header', view: body
|
|
8
|
+
|
|
9
|
+
body.panels_responsive(
|
|
10
|
+
padding: glib_json_padding_body,
|
|
11
|
+
childViews: ->(res) do
|
|
12
|
+
res.h2 text: 'Fields Stripe Token'
|
|
13
|
+
res.spacer height: 8
|
|
14
|
+
res.label text: 'Secure card tokenization with Stripe publishable keys.'
|
|
15
|
+
res.spacer height: 12
|
|
16
|
+
|
|
17
|
+
res.panels_form(
|
|
18
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
19
|
+
method: 'post',
|
|
20
|
+
childViews: ->(form) do
|
|
21
|
+
form.h2 text: 'Overview'
|
|
22
|
+
form.spacer height: 8
|
|
23
|
+
form.label text: 'Use fields_stripeToken to collect card details without exposing raw data to your server.'
|
|
24
|
+
form.spacer height: 12
|
|
25
|
+
form.hr width: 'matchParent'
|
|
26
|
+
form.spacer height: 12
|
|
27
|
+
|
|
28
|
+
form.h2 text: 'Basic example'
|
|
29
|
+
form.spacer height: 8
|
|
30
|
+
form.fields_stripeToken(
|
|
31
|
+
id: 'stripe_token_basic',
|
|
32
|
+
name: 'user[stripe_token]',
|
|
33
|
+
width: 'matchParent',
|
|
34
|
+
label: 'Card details',
|
|
35
|
+
publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx',
|
|
36
|
+
onChange: ->(action) do
|
|
37
|
+
action.logics_set targetId: 'stripe_token_status', data: { text: 'Status: token updated' }
|
|
38
|
+
end
|
|
39
|
+
)
|
|
40
|
+
form.spacer height: 8
|
|
41
|
+
form.label id: 'stripe_token_status', text: 'Status: idle'
|
|
42
|
+
|
|
43
|
+
form.spacer height: 12
|
|
44
|
+
form.hr width: 'matchParent'
|
|
45
|
+
form.spacer height: 12
|
|
46
|
+
|
|
47
|
+
form.h2 text: 'Variants/props'
|
|
48
|
+
form.spacer height: 8
|
|
49
|
+
form.label text: 'Swap visual styles and labels for the same component instance.'
|
|
50
|
+
form.spacer height: 8
|
|
51
|
+
form.panels_flow(
|
|
52
|
+
innerPadding: { bottom: 0 },
|
|
53
|
+
width: 'matchParent',
|
|
54
|
+
childViews: ->(flow) do
|
|
55
|
+
flow.button(
|
|
56
|
+
text: 'Default style',
|
|
57
|
+
onClick: ->(action) do
|
|
58
|
+
action.components_set targetId: 'stripe_token_basic', data: { styleClass: nil, label: 'Card details', hint: nil }
|
|
59
|
+
end
|
|
60
|
+
)
|
|
61
|
+
flow.spacer width: 8
|
|
62
|
+
flow.button(
|
|
63
|
+
text: 'Outlined',
|
|
64
|
+
onClick: ->(action) do
|
|
65
|
+
action.components_set targetId: 'stripe_token_basic', data: { styleClass: 'outlined', label: 'Card details', hint: nil }
|
|
66
|
+
end
|
|
67
|
+
)
|
|
68
|
+
flow.spacer width: 8
|
|
69
|
+
flow.button(
|
|
70
|
+
text: 'Individual',
|
|
71
|
+
onClick: ->(action) do
|
|
72
|
+
action.components_set targetId: 'stripe_token_basic', data: { styleClass: 'individual', label: 'Card details', hint: 'Personal card' }
|
|
73
|
+
end
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# form.spacer height: 12
|
|
79
|
+
# form.hr width: 'matchParent'
|
|
80
|
+
# form.spacer height: 12
|
|
81
|
+
|
|
82
|
+
# form.h2 text: 'Edge/advanced'
|
|
83
|
+
# form.spacer height: 8
|
|
84
|
+
# form.panels_flow(
|
|
85
|
+
# innerPadding: { bottom: 0 },
|
|
86
|
+
# width: 'matchParent',
|
|
87
|
+
# childViews: ->(flow) do
|
|
88
|
+
# flow.button(
|
|
89
|
+
# text: 'Disable field',
|
|
90
|
+
# onClick: ->(action) do
|
|
91
|
+
# action.components_set targetId: 'stripe_token_basic', data: { disabled: true }
|
|
92
|
+
# end
|
|
93
|
+
# )
|
|
94
|
+
# flow.spacer width: 8
|
|
95
|
+
# flow.button(
|
|
96
|
+
# text: 'Enable field',
|
|
97
|
+
# onClick: ->(action) do
|
|
98
|
+
# action.components_set targetId: 'stripe_token_basic', data: { disabled: nil }
|
|
99
|
+
# end
|
|
100
|
+
# )
|
|
101
|
+
# flow.spacer width: 8
|
|
102
|
+
# flow.button(
|
|
103
|
+
# text: 'Clear hint',
|
|
104
|
+
# onClick: ->(action) do
|
|
105
|
+
# action.components_set targetId: 'stripe_token_basic', data: { hint: nil }
|
|
106
|
+
# end
|
|
107
|
+
# )
|
|
108
|
+
# end
|
|
109
|
+
# )
|
|
110
|
+
|
|
111
|
+
form.spacer height: 12
|
|
112
|
+
form.fields_submit text: 'Submit'
|
|
113
|
+
end
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
)
|
|
117
|
+
end
|
|
118
|
+
)
|
|
@@ -25,7 +25,7 @@ page.body(
|
|
|
25
25
|
value: image&.signed_id
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
base_props[:onFinishUpload] = ->(action) do
|
|
28
|
+
base_props[:onFinishUpload] = ->(action) do # rubocop:disable Glib/MultilineMethodCallStyle
|
|
29
29
|
action.snackbars_alert message: 'Get the signed ids!'
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -105,6 +105,20 @@ page.body(
|
|
|
105
105
|
)
|
|
106
106
|
)
|
|
107
107
|
|
|
108
|
+
form.spacer height: 12
|
|
109
|
+
form.label text: 'Multi progress view'
|
|
110
|
+
form.spacer height: 4
|
|
111
|
+
form.fields_upload(
|
|
112
|
+
base_props.merge(
|
|
113
|
+
name: 'user[file_input_multiprogress][]',
|
|
114
|
+
id: 'fields_upload_multiprogress',
|
|
115
|
+
label: 'Upload files',
|
|
116
|
+
width: 320,
|
|
117
|
+
multiProgressView: { files: [] },
|
|
118
|
+
multiple: true
|
|
119
|
+
)
|
|
120
|
+
)
|
|
121
|
+
|
|
108
122
|
form.spacer height: 12
|
|
109
123
|
form.label text: 'Multiple selection input'
|
|
110
124
|
form.spacer height: 4
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
2
|
json.title 'Test Page (Form)'
|
|
4
3
|
|
|
5
4
|
page = json_ui_page json
|
|
6
5
|
|
|
7
|
-
page.body
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
page.body(
|
|
7
|
+
childViews: ->(body) do
|
|
8
|
+
render 'json_ui/garage/test_page/header', view: body
|
|
9
|
+
body.panels_responsive(
|
|
10
|
+
padding: glib_json_padding_body,
|
|
11
|
+
childViews: ->(res) do
|
|
12
|
+
res.h2 text: 'Window'
|
|
13
|
+
res.spacer height: 8
|
|
14
|
+
res.button(
|
|
15
|
+
text: 'windows/open updateExisting: true',
|
|
16
|
+
onClick: ->(action) do
|
|
17
|
+
action.windows_open updateExisting: true, url: json_ui_garage_url(path: 'test_page/fields_upload')
|
|
18
|
+
end
|
|
19
|
+
)
|
|
20
|
+
res.button(
|
|
21
|
+
text: 'windows/close',
|
|
22
|
+
onClick: ->(action) do
|
|
23
|
+
action.windows_close
|
|
24
|
+
end
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
)
|
|
19
28
|
end
|
|
20
|
-
|
|
29
|
+
)
|
|
@@ -42,12 +42,19 @@ page.body(
|
|
|
42
42
|
flow.button(
|
|
43
43
|
text: 'windows/open (updateExisting: true)',
|
|
44
44
|
onClick: ->(action) do
|
|
45
|
-
action.windows_open
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
action.windows_open(
|
|
46
|
+
updateExisting: true,
|
|
47
|
+
url: json_ui_garage_url(path: 'home/blank', sleep: true),
|
|
48
|
+
loaderViews: ->(view) do
|
|
49
|
+
view.panels_responsive(
|
|
50
|
+
padding: { all: 16 },
|
|
51
|
+
childViews: ->(subres) do
|
|
52
|
+
subres.skeleton template: 'textArea'
|
|
53
|
+
subres.skeleton template: 'commentList'
|
|
54
|
+
end
|
|
55
|
+
)
|
|
49
56
|
end
|
|
50
|
-
|
|
57
|
+
)
|
|
51
58
|
end
|
|
52
59
|
)
|
|
53
60
|
flow.spacer width: 8
|
|
@@ -80,9 +87,11 @@ page.body(
|
|
|
80
87
|
flow.button(
|
|
81
88
|
text: 'windows/close',
|
|
82
89
|
onClick: ->(action) do
|
|
83
|
-
action.windows_close
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
action.windows_close(
|
|
91
|
+
onClose: ->(subaction) do
|
|
92
|
+
subaction.dialogs_alert message: 'Previous window closed'
|
|
93
|
+
end
|
|
94
|
+
)
|
|
86
95
|
end
|
|
87
96
|
)
|
|
88
97
|
flow.spacer width: 8
|
|
@@ -96,11 +105,54 @@ page.body(
|
|
|
96
105
|
flow.button(
|
|
97
106
|
text: 'windows/closeAllWithOpen',
|
|
98
107
|
onClick: ->(action) do
|
|
99
|
-
action.windows_closeAllWithOpen
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
action.windows_closeAllWithOpen(
|
|
109
|
+
url: json_ui_garage_url(path: 'home/index', sleep: true),
|
|
110
|
+
loaderViews: ->(view) do
|
|
111
|
+
view.panels_responsive(
|
|
112
|
+
padding: { all: 16 },
|
|
113
|
+
childViews: ->(subres) do
|
|
114
|
+
subres.skeleton template: 'textArea'
|
|
115
|
+
subres.skeleton template: 'commentList'
|
|
116
|
+
end
|
|
117
|
+
)
|
|
103
118
|
end
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
res.spacer height: 12
|
|
126
|
+
res.panels_flow(
|
|
127
|
+
innerPadding: { bottom: 0 },
|
|
128
|
+
width: 'matchParent',
|
|
129
|
+
childViews: ->(flow) do
|
|
130
|
+
flow.button(
|
|
131
|
+
text: 'windows/reload',
|
|
132
|
+
onClick: ->(action) do
|
|
133
|
+
action.windows_reload
|
|
134
|
+
end
|
|
135
|
+
)
|
|
136
|
+
flow.spacer width: 8
|
|
137
|
+
flow.button(
|
|
138
|
+
text: 'windows/print',
|
|
139
|
+
onClick: ->(action) do
|
|
140
|
+
action.windows_print
|
|
141
|
+
end
|
|
142
|
+
)
|
|
143
|
+
flow.spacer width: 8
|
|
144
|
+
flow.button(
|
|
145
|
+
text: 'windows/closeWithReload',
|
|
146
|
+
onClick: ->(action) do
|
|
147
|
+
action.windows_closeWithReload fallbackUrl: json_ui_garage_url(path: 'home/index')
|
|
148
|
+
end
|
|
149
|
+
)
|
|
150
|
+
flow.spacer width: 8
|
|
151
|
+
flow.button(
|
|
152
|
+
text: 'windows/closeAll',
|
|
153
|
+
onClick: ->(action) do
|
|
154
|
+
action.windows_closeAll onClose: ->(subaction) do
|
|
155
|
+
subaction.windows_open url: json_ui_garage_url(path: 'home/index')
|
|
104
156
|
end
|
|
105
157
|
end
|
|
106
158
|
)
|
|
@@ -116,11 +168,17 @@ page.body(
|
|
|
116
168
|
res.button(
|
|
117
169
|
text: 'windows/open (with loader)',
|
|
118
170
|
onClick: ->(action) do
|
|
119
|
-
action.windows_open
|
|
120
|
-
|
|
121
|
-
|
|
171
|
+
action.windows_open(
|
|
172
|
+
url: json_ui_garage_url(path: 'home/blank', sleep: true),
|
|
173
|
+
loaderViews: ->(view) do
|
|
174
|
+
view.panels_responsive(
|
|
175
|
+
padding: { all: 16 },
|
|
176
|
+
childViews: ->(subres) do
|
|
177
|
+
subres.skeleton template: 'bigProgressCircle'
|
|
178
|
+
end
|
|
179
|
+
)
|
|
122
180
|
end
|
|
123
|
-
|
|
181
|
+
)
|
|
124
182
|
end
|
|
125
183
|
)
|
|
126
184
|
end
|
|
@@ -38,7 +38,6 @@ module RuboCop
|
|
|
38
38
|
return if proper_parentheses_style?(node)
|
|
39
39
|
return if proper_backslash_style?(node) && allow_backslash?
|
|
40
40
|
return if inside_correctable_parent?(node)
|
|
41
|
-
return if assignment_method?(node)
|
|
42
41
|
|
|
43
42
|
add_offense(node) do |corrector|
|
|
44
43
|
autocorrect(corrector, node)
|
|
@@ -53,13 +52,6 @@ module RuboCop
|
|
|
53
52
|
node.multiline? && node.arguments.any?
|
|
54
53
|
end
|
|
55
54
|
|
|
56
|
-
def assignment_method?(node)
|
|
57
|
-
# Skip setter methods (e.g., response.body=, foo.bar=)
|
|
58
|
-
# These are written as assignments (response.body = ...) and shouldn't
|
|
59
|
-
# be converted to method call style (response.body(...))
|
|
60
|
-
node.method_name.to_s.end_with?('=')
|
|
61
|
-
end
|
|
62
|
-
|
|
63
55
|
def allow_backslash?
|
|
64
56
|
# Allow backslash style without warnings when configured
|
|
65
57
|
# Set to true to allow both styles (but auto-correct will still convert to parentheses)
|
data/lib/tasks/db.rake
CHANGED
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: glib-web
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 5.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2019-10-04 00:00:00.000000000 Z
|
|
@@ -136,7 +136,7 @@ dependencies:
|
|
|
136
136
|
- - ">="
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
|
-
description:
|
|
139
|
+
description:
|
|
140
140
|
email: ''
|
|
141
141
|
executables: []
|
|
142
142
|
extensions: []
|
|
@@ -389,9 +389,18 @@ files:
|
|
|
389
389
|
- app/views/json_ui/garage/test_page/dirty_state.json.jbuilder
|
|
390
390
|
- app/views/json_ui/garage/test_page/fields.json.jbuilder
|
|
391
391
|
- app/views/json_ui/garage/test_page/fields_captcha.json.jbuilder
|
|
392
|
+
- app/views/json_ui/garage/test_page/fields_creditCard.json.jbuilder
|
|
393
|
+
- app/views/json_ui/garage/test_page/fields_date_time.json.jbuilder
|
|
392
394
|
- app/views/json_ui/garage/test_page/fields_dynamicSelect.json.jbuilder
|
|
395
|
+
- app/views/json_ui/garage/test_page/fields_location.json.jbuilder
|
|
396
|
+
- app/views/json_ui/garage/test_page/fields_otp.json.jbuilder
|
|
397
|
+
- app/views/json_ui/garage/test_page/fields_phone.json.jbuilder
|
|
398
|
+
- app/views/json_ui/garage/test_page/fields_rating.json.jbuilder
|
|
399
|
+
- app/views/json_ui/garage/test_page/fields_richText.json.jbuilder
|
|
393
400
|
- app/views/json_ui/garage/test_page/fields_select.json.jbuilder
|
|
394
401
|
- app/views/json_ui/garage/test_page/fields_sign.json.jbuilder
|
|
402
|
+
- app/views/json_ui/garage/test_page/fields_stripeExternalAccount.json.jbuilder
|
|
403
|
+
- app/views/json_ui/garage/test_page/fields_stripeToken.json.jbuilder
|
|
395
404
|
- app/views/json_ui/garage/test_page/fields_timer.json.jbuilder
|
|
396
405
|
- app/views/json_ui/garage/test_page/fields_upload.json.jbuilder
|
|
397
406
|
- app/views/json_ui/garage/test_page/fields_url_fragment.json.jbuilder
|
|
@@ -409,7 +418,6 @@ files:
|
|
|
409
418
|
- app/views/json_ui/garage/test_page/lists_append.json.jbuilder
|
|
410
419
|
- app/views/json_ui/garage/test_page/logics_set.json.jbuilder
|
|
411
420
|
- app/views/json_ui/garage/test_page/multimedia_video.json.jbuilder
|
|
412
|
-
- app/views/json_ui/garage/test_page/multiupload.json.jbuilder
|
|
413
421
|
- app/views/json_ui/garage/test_page/pagination.json.jbuilder
|
|
414
422
|
- app/views/json_ui/garage/test_page/panels.json.jbuilder
|
|
415
423
|
- app/views/json_ui/garage/test_page/panels_bulkEdit2.json.jbuilder
|
|
@@ -473,7 +481,6 @@ files:
|
|
|
473
481
|
- lib/glib-web.rb
|
|
474
482
|
- lib/glib/all_helpers.rb
|
|
475
483
|
- lib/glib/crypt/utils.rb
|
|
476
|
-
- lib/glib/doc_generator.rb
|
|
477
484
|
- lib/glib/dynamic_text.rb
|
|
478
485
|
- lib/glib/dynamic_text/config.rb
|
|
479
486
|
- lib/glib/engine.rb
|
|
@@ -509,10 +516,10 @@ files:
|
|
|
509
516
|
- lib/glib/version.rb
|
|
510
517
|
- lib/tasks/db.rake
|
|
511
518
|
- lib/tasks/docs.rake
|
|
512
|
-
homepage:
|
|
519
|
+
homepage:
|
|
513
520
|
licenses: []
|
|
514
521
|
metadata: {}
|
|
515
|
-
post_install_message:
|
|
522
|
+
post_install_message:
|
|
516
523
|
rdoc_options: []
|
|
517
524
|
require_paths:
|
|
518
525
|
- lib
|
|
@@ -528,7 +535,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
528
535
|
version: '0'
|
|
529
536
|
requirements: []
|
|
530
537
|
rubygems_version: 3.4.6
|
|
531
|
-
signing_key:
|
|
538
|
+
signing_key:
|
|
532
539
|
specification_version: 4
|
|
533
540
|
summary: ''
|
|
534
541
|
test_files: []
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
json.title 'Test Page (Form)'
|
|
2
|
-
|
|
3
|
-
page = json_ui_page json
|
|
4
|
-
|
|
5
|
-
page.body childViews: ->(body) do
|
|
6
|
-
render 'json_ui/garage/test_page/header', view: body
|
|
7
|
-
|
|
8
|
-
body.panels_responsive padding: glib_json_padding_body, childViews: ->(res) do
|
|
9
|
-
res.h2 text: 'MultiUpload'
|
|
10
|
-
res.spacer height: 8
|
|
11
|
-
res.panels_form \
|
|
12
|
-
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
13
|
-
method: 'post',
|
|
14
|
-
childViews: ->(form) do
|
|
15
|
-
|
|
16
|
-
form.spacer height: 16
|
|
17
|
-
form.label text: 'Simple file upload'
|
|
18
|
-
form.spacer height: 8
|
|
19
|
-
form.fields_multiUpload \
|
|
20
|
-
name: 'user[multi][]',
|
|
21
|
-
id: 'upload_1',
|
|
22
|
-
width: 360,
|
|
23
|
-
accepts: { fileType: 'image', maxFileSize: 10 },
|
|
24
|
-
directUploadUrl: glib_direct_uploads_url,
|
|
25
|
-
uploadTitle: 'Files uploaded:',
|
|
26
|
-
storagePrefix: 'glib',
|
|
27
|
-
metadata: {
|
|
28
|
-
foo: 'bar',
|
|
29
|
-
zoo: 'baz'
|
|
30
|
-
},
|
|
31
|
-
# tagging: 'key=value&key1=value1',
|
|
32
|
-
tags: { key: 'value', key1: 'value1' },
|
|
33
|
-
files: [
|
|
34
|
-
{ name: 'File (Example)', signed_id: ActiveStorage::Attachment.first&.signed_id }
|
|
35
|
-
]
|
|
36
|
-
form.button text: 'clear files', onClick: ->(action) do
|
|
37
|
-
action.components_set targetId: 'upload_1', data: { files: [], value: nil }
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
form.spacer height: 16
|
|
41
|
-
form.label text: 'File upload with onFinishUpload'
|
|
42
|
-
form.spacer height: 8
|
|
43
|
-
form.fields_multiUpload \
|
|
44
|
-
name: 'user[multi2][]',
|
|
45
|
-
id: 'upload_2',
|
|
46
|
-
width: 360,
|
|
47
|
-
accepts: { fileType: 'image', maxFileSize: 5000 },
|
|
48
|
-
directUploadUrl: glib_direct_uploads_url,
|
|
49
|
-
uploadTitle: 'Files uploaded:',
|
|
50
|
-
onFinishUpload: ->(action) { action.forms_submit }
|
|
51
|
-
form.button text: 'populate files', onClick: ->(action) do
|
|
52
|
-
action.components_set targetId: 'upload_2', data: {
|
|
53
|
-
files: [
|
|
54
|
-
{ name: 'File (Example)', signed_id: ActiveStorage::Attachment.last&.signed_id }
|
|
55
|
-
],
|
|
56
|
-
value: [1]
|
|
57
|
-
}
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
form.fields_submit text: 'submit'
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
res.spacer height: 16
|
|
64
|
-
end
|
|
65
|
-
end
|