tybo 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -0
- data/README.md +23 -0
- data/Rakefile +8 -0
- data/app/assets/config/tybo_manifest.js +1 -0
- data/app/assets/stylesheets/tybo/application.css +15 -0
- data/{lib/app → app}/components/attachment_card_component.html.erb +0 -0
- data/{lib/app → app}/components/attachment_card_component.rb +0 -0
- data/{lib/app → app}/components/attachments_list_component.html.erb +0 -0
- data/{lib/app → app}/components/attachments_list_component.rb +0 -0
- data/{lib/app → app}/components/current_user_mini_card_component.html.erb +2 -2
- data/{lib/app → app}/components/current_user_mini_card_component.rb +0 -0
- data/{lib/app → app}/components/form_component.html.erb +0 -0
- data/{lib/app → app}/components/form_component.rb +0 -0
- data/{lib/app → app}/components/forms/breadcrumb_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/breadcrumb_component.rb +0 -0
- data/{lib/app → app}/components/forms/delete_button_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/delete_button_component.rb +0 -0
- data/{lib/app → app}/components/forms/divider_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/divider_component.rb +0 -0
- data/{lib/app → app}/components/forms/submit_button_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/submit_button_component.rb +0 -0
- data/{lib/app → app}/components/forms/subtitle_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/subtitle_component.rb +0 -0
- data/{lib/app → app}/components/forms/title_component.html.erb +0 -0
- data/{lib/app → app}/components/forms/title_component.rb +0 -0
- data/{lib/app → app}/components/icons/collection_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/collection_component.rb +0 -0
- data/{lib/app → app}/components/icons/home_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/home_component.rb +0 -0
- data/{lib/app → app}/components/icons/mic_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/mic_component.rb +0 -0
- data/{lib/app → app}/components/icons/news_paper_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/news_paper_component.rb +0 -0
- data/{lib/app → app}/components/icons/office_building_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/office_building_component.rb +0 -0
- data/{lib/app → app}/components/icons/question_mark_circle_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/question_mark_circle_component.rb +0 -0
- data/{lib/app → app}/components/icons/trash_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/trash_component.rb +0 -0
- data/{lib/app → app}/components/icons/users_component.html.erb +0 -0
- data/{lib/app → app}/components/icons/users_component.rb +0 -0
- data/{lib/app → app}/components/index_component.html.erb +0 -0
- data/{lib/app → app}/components/index_component.rb +0 -0
- data/{lib/app → app}/components/index_header_add_component.html.erb +0 -0
- data/{lib/app → app}/components/index_header_add_component.rb +0 -0
- data/{lib/app → app}/components/index_header_component.html.erb +0 -0
- data/{lib/app → app}/components/index_header_component.rb +0 -0
- data/{lib/app → app}/components/input/file_component.html.erb +0 -0
- data/{lib/app → app}/components/input/file_component.rb +0 -0
- data/{lib/app → app}/components/sidebar_component.html.erb +0 -0
- data/{lib/app → app}/components/sidebar_component.rb +0 -0
- data/{lib/app → app}/components/sidebar_item_component.html.erb +0 -0
- data/{lib/app → app}/components/sidebar_item_component.rb +0 -0
- data/{lib/app → app}/components/sign_out_button_component.html.erb +1 -1
- data/{lib/app → app}/components/sign_out_button_component.rb +3 -0
- data/{lib/app → app}/components/tables/active_record_th_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/active_record_th_component.rb +1 -0
- data/{lib/app → app}/components/tables/table_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/table_component.rb +0 -0
- data/{lib/app → app}/components/tables/tbody_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/tbody_component.rb +0 -0
- data/{lib/app → app}/components/tables/td_component.html.erb +1 -1
- data/{lib/app → app}/components/tables/td_component.rb +0 -0
- data/{lib/app → app}/components/tables/th_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/th_component.rb +0 -0
- data/{lib/app → app}/components/tables/thead_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/thead_component.rb +0 -0
- data/{lib/app → app}/components/tables/tr_component.html.erb +0 -0
- data/{lib/app → app}/components/tables/tr_component.rb +0 -0
- data/app/controllers/tybo/application_controller.rb +4 -0
- data/app/controllers/tybo/login_controller.rb +8 -0
- data/app/helpers/tybo/application_helper.rb +5 -0
- data/app/helpers/tybo/flash_helper.rb +12 -0
- data/app/jobs/tybo/application_job.rb +4 -0
- data/app/mailers/tybo/application_mailer.rb +6 -0
- data/app/models/tybo/application_record.rb +5 -0
- data/app/views/devise/confirmations/new.html.erb +20 -0
- data/app/views/devise/login/home.html.erb +20 -0
- data/app/views/devise/mailer/_reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/email_changed.html.erb +7 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +36 -0
- data/app/views/devise/passwords/new.html.erb +34 -0
- data/app/views/devise/registrations/edit.html.erb +35 -0
- data/app/views/devise/registrations/new.html.erb +25 -0
- data/app/views/devise/sessions/new.html.erb +50 -0
- data/app/views/devise/shared/_devise_errors.html.erb +26 -0
- data/app/views/devise/shared/_error_messages.html.erb +15 -0
- data/app/views/devise/shared/_links.html.erb +65 -0
- data/app/views/devise/unlocks/new.html.erb +19 -0
- data/app/views/layouts/_errors.html.erb +22 -0
- data/app/views/layouts/_flash.html.erb +24 -0
- data/app/views/layouts/devise_admin.html.erb +16 -0
- data/app/views/layouts/tybo/application.html.erb +14 -0
- data/app/views/login/home.html.erb +19 -0
- data/app/views/shared/_pagination.html.erb +36 -0
- data/config/initializers/devise.rb +311 -0
- data/config/initializers/pagy.rb +246 -0
- data/config/initializers/ransack.rb +13 -0
- data/config/locales/devise.en.yml +65 -0
- data/config/routes.rb +3 -0
- data/lib/generators/bo/USAGE +12 -0
- data/lib/generators/bo/bo_generator.rb +88 -0
- data/lib/generators/bo/templates/_form.html.erb +32 -0
- data/lib/generators/bo/templates/_search_bar.html.erb +96 -0
- data/lib/generators/bo/templates/_table.html.erb +29 -0
- data/lib/generators/bo/templates/controller.rb +66 -0
- data/lib/generators/bo/templates/index.html.erb +19 -0
- data/lib/generators/bo/templates/item.html.erb +17 -0
- data/lib/generators/bo/templates/new.html.erb +1 -0
- data/lib/generators/bo/templates/show.html.erb +1 -0
- data/lib/generators/bo/utils/files/fr.json +19 -0
- data/lib/generators/bo/utils/translations.rb +47 -0
- data/lib/generators/bo_namespace/USAGE +11 -0
- data/lib/generators/bo_namespace/bo_namespace_generator.rb +50 -0
- data/lib/generators/bo_namespace/templates/admin.html.erb +27 -0
- data/lib/generators/bo_namespace/templates/admin_controller.rb +7 -0
- data/lib/generators/bo_namespace/templates/seeds.rb +9 -0
- data/lib/generators/bo_namespace/templates/side_bar.html.erb +4 -0
- data/lib/generators/tybo_install/templates/application.tailwind.css +112 -0
- data/lib/generators/tybo_install/templates/simple_form_tailwind.rb +147 -0
- data/lib/generators/tybo_install/templates/tailwind.config.js +40 -0
- data/lib/generators/tybo_install/templates/tom-select.css +458 -0
- data/lib/generators/tybo_install/tybo_install_generator.rb +44 -0
- data/lib/tybo/engine.rb +19 -0
- data/lib/tybo/version.rb +3 -0
- data/lib/tybo.rb +4 -43
- metadata +186 -98
- data/lib/app/helpers/application_helper.rb +0 -5
- data/lib/app/helpers/flash_helper.rb +0 -16
- data/lib/app/javascript/controllers/attachments_controller.js +0 -14
- data/lib/app/javascript/controllers/dropdown_controller.js +0 -15
- data/lib/app/javascript/controllers/flash_controller.js +0 -7
- data/lib/app/javascript/controllers/index.js +0 -6
- data/lib/app/javascript/controllers/questions_controller.js +0 -61
- data/lib/app/javascript/controllers/search_form_controller.js +0 -20
- data/lib/app/javascript/controllers/ts/search_controller.js +0 -35
- data/lib/app/javascript/controllers/ts/select_controller.js +0 -9
metadata
CHANGED
@@ -1,171 +1,259 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tybo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Julien Camblan
|
8
7
|
- Michel Delpierre
|
8
|
+
- Julien Camblan
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 7.0.4.1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 7.0.4.1
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: puma
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
35
|
-
type: :
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: view_component
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.82'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '2.82'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: ransack
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3.2'
|
46
63
|
- - ">="
|
47
64
|
- !ruby/object:Gem::Version
|
48
|
-
version: 2.
|
65
|
+
version: 3.2.1
|
49
66
|
type: :runtime
|
50
67
|
prerelease: false
|
51
68
|
version_requirements: !ruby/object:Gem::Requirement
|
52
69
|
requirements:
|
70
|
+
- - "~>"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '3.2'
|
53
73
|
- - ">="
|
54
74
|
- !ruby/object:Gem::Version
|
55
|
-
version: 2.
|
75
|
+
version: 3.2.1
|
56
76
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
77
|
+
name: pagy
|
58
78
|
requirement: !ruby/object:Gem::Requirement
|
59
79
|
requirements:
|
60
80
|
- - "~>"
|
61
81
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
82
|
+
version: '6.0'
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 6.0.1
|
63
86
|
type: :runtime
|
64
87
|
prerelease: false
|
65
88
|
version_requirements: !ruby/object:Gem::Requirement
|
66
89
|
requirements:
|
67
90
|
- - "~>"
|
68
91
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
92
|
+
version: '6.0'
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 6.0.1
|
70
96
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
97
|
+
name: devise
|
72
98
|
requirement: !ruby/object:Gem::Requirement
|
73
99
|
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '4.8'
|
74
103
|
- - ">="
|
75
104
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
105
|
+
version: 4.8.1
|
77
106
|
type: :runtime
|
78
107
|
prerelease: false
|
79
108
|
version_requirements: !ruby/object:Gem::Requirement
|
80
109
|
requirements:
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '4.8'
|
81
113
|
- - ">="
|
82
114
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
84
|
-
description:
|
85
|
-
email:
|
115
|
+
version: 4.8.1
|
116
|
+
description: Custom admin engine for Ruby on Rails working with generators
|
117
|
+
email:
|
118
|
+
- tech@tymate.com
|
86
119
|
executables: []
|
87
120
|
extensions: []
|
88
121
|
extra_rdoc_files: []
|
89
122
|
files:
|
90
|
-
-
|
91
|
-
-
|
92
|
-
-
|
93
|
-
-
|
94
|
-
-
|
95
|
-
-
|
96
|
-
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
102
|
-
-
|
103
|
-
-
|
104
|
-
-
|
105
|
-
-
|
106
|
-
-
|
107
|
-
-
|
108
|
-
-
|
109
|
-
-
|
110
|
-
-
|
111
|
-
-
|
112
|
-
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
121
|
-
-
|
122
|
-
-
|
123
|
-
-
|
124
|
-
-
|
125
|
-
-
|
126
|
-
-
|
127
|
-
-
|
128
|
-
-
|
129
|
-
-
|
130
|
-
-
|
131
|
-
-
|
132
|
-
-
|
133
|
-
-
|
134
|
-
-
|
135
|
-
-
|
136
|
-
-
|
137
|
-
-
|
138
|
-
-
|
139
|
-
-
|
140
|
-
-
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
144
|
-
-
|
145
|
-
-
|
146
|
-
-
|
147
|
-
-
|
148
|
-
-
|
149
|
-
-
|
150
|
-
-
|
151
|
-
-
|
152
|
-
-
|
153
|
-
-
|
154
|
-
-
|
155
|
-
-
|
156
|
-
-
|
157
|
-
-
|
158
|
-
-
|
159
|
-
-
|
160
|
-
-
|
161
|
-
-
|
162
|
-
-
|
163
|
-
-
|
123
|
+
- MIT-LICENSE
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- app/assets/config/tybo_manifest.js
|
127
|
+
- app/assets/stylesheets/tybo/application.css
|
128
|
+
- app/components/attachment_card_component.html.erb
|
129
|
+
- app/components/attachment_card_component.rb
|
130
|
+
- app/components/attachments_list_component.html.erb
|
131
|
+
- app/components/attachments_list_component.rb
|
132
|
+
- app/components/current_user_mini_card_component.html.erb
|
133
|
+
- app/components/current_user_mini_card_component.rb
|
134
|
+
- app/components/form_component.html.erb
|
135
|
+
- app/components/form_component.rb
|
136
|
+
- app/components/forms/breadcrumb_component.html.erb
|
137
|
+
- app/components/forms/breadcrumb_component.rb
|
138
|
+
- app/components/forms/delete_button_component.html.erb
|
139
|
+
- app/components/forms/delete_button_component.rb
|
140
|
+
- app/components/forms/divider_component.html.erb
|
141
|
+
- app/components/forms/divider_component.rb
|
142
|
+
- app/components/forms/submit_button_component.html.erb
|
143
|
+
- app/components/forms/submit_button_component.rb
|
144
|
+
- app/components/forms/subtitle_component.html.erb
|
145
|
+
- app/components/forms/subtitle_component.rb
|
146
|
+
- app/components/forms/title_component.html.erb
|
147
|
+
- app/components/forms/title_component.rb
|
148
|
+
- app/components/icons/collection_component.html.erb
|
149
|
+
- app/components/icons/collection_component.rb
|
150
|
+
- app/components/icons/home_component.html.erb
|
151
|
+
- app/components/icons/home_component.rb
|
152
|
+
- app/components/icons/mic_component.html.erb
|
153
|
+
- app/components/icons/mic_component.rb
|
154
|
+
- app/components/icons/news_paper_component.html.erb
|
155
|
+
- app/components/icons/news_paper_component.rb
|
156
|
+
- app/components/icons/office_building_component.html.erb
|
157
|
+
- app/components/icons/office_building_component.rb
|
158
|
+
- app/components/icons/question_mark_circle_component.html.erb
|
159
|
+
- app/components/icons/question_mark_circle_component.rb
|
160
|
+
- app/components/icons/trash_component.html.erb
|
161
|
+
- app/components/icons/trash_component.rb
|
162
|
+
- app/components/icons/users_component.html.erb
|
163
|
+
- app/components/icons/users_component.rb
|
164
|
+
- app/components/index_component.html.erb
|
165
|
+
- app/components/index_component.rb
|
166
|
+
- app/components/index_header_add_component.html.erb
|
167
|
+
- app/components/index_header_add_component.rb
|
168
|
+
- app/components/index_header_component.html.erb
|
169
|
+
- app/components/index_header_component.rb
|
170
|
+
- app/components/input/file_component.html.erb
|
171
|
+
- app/components/input/file_component.rb
|
172
|
+
- app/components/sidebar_component.html.erb
|
173
|
+
- app/components/sidebar_component.rb
|
174
|
+
- app/components/sidebar_item_component.html.erb
|
175
|
+
- app/components/sidebar_item_component.rb
|
176
|
+
- app/components/sign_out_button_component.html.erb
|
177
|
+
- app/components/sign_out_button_component.rb
|
178
|
+
- app/components/tables/active_record_th_component.html.erb
|
179
|
+
- app/components/tables/active_record_th_component.rb
|
180
|
+
- app/components/tables/table_component.html.erb
|
181
|
+
- app/components/tables/table_component.rb
|
182
|
+
- app/components/tables/tbody_component.html.erb
|
183
|
+
- app/components/tables/tbody_component.rb
|
184
|
+
- app/components/tables/td_component.html.erb
|
185
|
+
- app/components/tables/td_component.rb
|
186
|
+
- app/components/tables/th_component.html.erb
|
187
|
+
- app/components/tables/th_component.rb
|
188
|
+
- app/components/tables/thead_component.html.erb
|
189
|
+
- app/components/tables/thead_component.rb
|
190
|
+
- app/components/tables/tr_component.html.erb
|
191
|
+
- app/components/tables/tr_component.rb
|
192
|
+
- app/controllers/tybo/application_controller.rb
|
193
|
+
- app/controllers/tybo/login_controller.rb
|
194
|
+
- app/helpers/tybo/application_helper.rb
|
195
|
+
- app/helpers/tybo/flash_helper.rb
|
196
|
+
- app/jobs/tybo/application_job.rb
|
197
|
+
- app/mailers/tybo/application_mailer.rb
|
198
|
+
- app/models/tybo/application_record.rb
|
199
|
+
- app/views/devise/confirmations/new.html.erb
|
200
|
+
- app/views/devise/login/home.html.erb
|
201
|
+
- app/views/devise/mailer/_reset_password_instructions.html.erb
|
202
|
+
- app/views/devise/mailer/confirmation_instructions.html.erb
|
203
|
+
- app/views/devise/mailer/email_changed.html.erb
|
204
|
+
- app/views/devise/mailer/password_change.html.erb
|
205
|
+
- app/views/devise/mailer/unlock_instructions.html.erb
|
206
|
+
- app/views/devise/passwords/edit.html.erb
|
207
|
+
- app/views/devise/passwords/new.html.erb
|
208
|
+
- app/views/devise/registrations/edit.html.erb
|
209
|
+
- app/views/devise/registrations/new.html.erb
|
210
|
+
- app/views/devise/sessions/new.html.erb
|
211
|
+
- app/views/devise/shared/_devise_errors.html.erb
|
212
|
+
- app/views/devise/shared/_error_messages.html.erb
|
213
|
+
- app/views/devise/shared/_links.html.erb
|
214
|
+
- app/views/devise/unlocks/new.html.erb
|
215
|
+
- app/views/layouts/_errors.html.erb
|
216
|
+
- app/views/layouts/_flash.html.erb
|
217
|
+
- app/views/layouts/devise_admin.html.erb
|
218
|
+
- app/views/layouts/tybo/application.html.erb
|
219
|
+
- app/views/login/home.html.erb
|
220
|
+
- app/views/shared/_pagination.html.erb
|
221
|
+
- config/initializers/devise.rb
|
222
|
+
- config/initializers/pagy.rb
|
223
|
+
- config/initializers/ransack.rb
|
224
|
+
- config/locales/devise.en.yml
|
225
|
+
- config/routes.rb
|
226
|
+
- lib/generators/bo/USAGE
|
227
|
+
- lib/generators/bo/bo_generator.rb
|
228
|
+
- lib/generators/bo/templates/_form.html.erb
|
229
|
+
- lib/generators/bo/templates/_search_bar.html.erb
|
230
|
+
- lib/generators/bo/templates/_table.html.erb
|
231
|
+
- lib/generators/bo/templates/controller.rb
|
232
|
+
- lib/generators/bo/templates/index.html.erb
|
233
|
+
- lib/generators/bo/templates/item.html.erb
|
234
|
+
- lib/generators/bo/templates/new.html.erb
|
235
|
+
- lib/generators/bo/templates/show.html.erb
|
236
|
+
- lib/generators/bo/utils/files/fr.json
|
237
|
+
- lib/generators/bo/utils/translations.rb
|
238
|
+
- lib/generators/bo_namespace/USAGE
|
239
|
+
- lib/generators/bo_namespace/bo_namespace_generator.rb
|
240
|
+
- lib/generators/bo_namespace/templates/admin.html.erb
|
241
|
+
- lib/generators/bo_namespace/templates/admin_controller.rb
|
242
|
+
- lib/generators/bo_namespace/templates/seeds.rb
|
243
|
+
- lib/generators/bo_namespace/templates/side_bar.html.erb
|
244
|
+
- lib/generators/tybo_install/templates/application.tailwind.css
|
245
|
+
- lib/generators/tybo_install/templates/simple_form_tailwind.rb
|
246
|
+
- lib/generators/tybo_install/templates/tailwind.config.js
|
247
|
+
- lib/generators/tybo_install/templates/tom-select.css
|
248
|
+
- lib/generators/tybo_install/tybo_install_generator.rb
|
164
249
|
- lib/tybo.rb
|
165
|
-
|
250
|
+
- lib/tybo/engine.rb
|
251
|
+
- lib/tybo/version.rb
|
252
|
+
homepage: https://rubygems.org/gems/tybo
|
166
253
|
licenses:
|
167
254
|
- MIT
|
168
|
-
metadata:
|
255
|
+
metadata:
|
256
|
+
homepage_uri: https://rubygems.org/gems/tybo
|
169
257
|
post_install_message:
|
170
258
|
rdoc_options: []
|
171
259
|
require_paths:
|
@@ -181,8 +269,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
269
|
- !ruby/object:Gem::Version
|
182
270
|
version: '0'
|
183
271
|
requirements: []
|
184
|
-
rubygems_version: 3.
|
272
|
+
rubygems_version: 3.3.7
|
185
273
|
signing_key:
|
186
274
|
specification_version: 4
|
187
|
-
summary:
|
275
|
+
summary: A tailwind custom admin engine for Ruby on Rails
|
188
276
|
test_files: []
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FlashHelper
|
4
|
-
# todo remove me and create a custom administrator authentification
|
5
|
-
def current_user
|
6
|
-
OpenStruct.new(email: "michel@tymate.com")
|
7
|
-
end
|
8
|
-
|
9
|
-
def classes_for_flash(key)
|
10
|
-
if %w[error alert].include?(key)
|
11
|
-
'red'
|
12
|
-
else
|
13
|
-
'green'
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { Controller } from "@hotwired/stimulus"
|
2
|
-
import { FetchRequest, patch } from '@rails/request.js'
|
3
|
-
|
4
|
-
export default class extends Controller {
|
5
|
-
static values = { url: String, method: String, attachmentId: Number }
|
6
|
-
|
7
|
-
async toggle(event) {
|
8
|
-
event.preventDefault()
|
9
|
-
|
10
|
-
const request = new FetchRequest(this.methodValue, this.urlValue, {responseKind: "turbo-stream", body: { attachment_id: this.attachmentIdValue}})
|
11
|
-
const response = await request.perform()
|
12
|
-
if (response.ok) {}
|
13
|
-
}
|
14
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { Controller } from "@hotwired/stimulus"
|
2
|
-
|
3
|
-
export default class extends Controller {
|
4
|
-
static targets = ["menu"]
|
5
|
-
|
6
|
-
toggle() {
|
7
|
-
this.menuTarget.classList.toggle("hidden")
|
8
|
-
}
|
9
|
-
|
10
|
-
hide(event) {
|
11
|
-
if (!this.element.contains(event.target) && !this.menuTarget.classList.contains('hidden')) {
|
12
|
-
this.menuTarget.classList.add("hidden")
|
13
|
-
}
|
14
|
-
}
|
15
|
-
}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
export { default as Attachments } from "./attachments_controller";
|
2
|
-
export { default as Dropdown } from "./dropdown_controller";
|
3
|
-
export { default as Flash } from "./flash_controller";
|
4
|
-
export { default as SearchForm } from "./search_form_controller";
|
5
|
-
export { default as TsSearch } from "./ts/search_controller";
|
6
|
-
export { default as TsSelect } from "./ts/select_controller";
|
@@ -1,61 +0,0 @@
|
|
1
|
-
import { Controller } from "@hotwired/stimulus"
|
2
|
-
|
3
|
-
export default class extends Controller {
|
4
|
-
static targets = ['questionKind', 'questionType', 'newQuestion', 'choices', 'documentType']
|
5
|
-
|
6
|
-
changeType(e) {
|
7
|
-
let questionType = e.target.selectedOptions[0].value
|
8
|
-
let kindInput = this.questionKindTarget
|
9
|
-
this.getKindInput(questionType, kindInput)
|
10
|
-
}
|
11
|
-
|
12
|
-
|
13
|
-
getKindInput(questionType, kindInput) {
|
14
|
-
fetch(`/admin/questions/kinds?type=${questionType}`, {
|
15
|
-
method: 'GET',
|
16
|
-
}).then(response => response.json())
|
17
|
-
.then(data => {
|
18
|
-
kindInput.options.length = 0 // reset options in select
|
19
|
-
data.unshift('')
|
20
|
-
for (let i in data) { // feed options in select with data array
|
21
|
-
kindInput.options[kindInput.options.length] = new Option(data[i][0], data[i][1]);
|
22
|
-
}
|
23
|
-
this.displayChoiceBtn()
|
24
|
-
})
|
25
|
-
}
|
26
|
-
changeKind() {
|
27
|
-
this.displayChoiceBtn()
|
28
|
-
this.removeChoices()
|
29
|
-
}
|
30
|
-
|
31
|
-
removeChoices() {
|
32
|
-
document.getElementById('choices').innerHTML = ''
|
33
|
-
}
|
34
|
-
|
35
|
-
updateChoicePartial() {
|
36
|
-
let questionKind = this.questionKindTarget.selectedOptions[0].value
|
37
|
-
let questionType = this.questionTypeTarget.selectedOptions[0].value
|
38
|
-
let choices = this.choicesTarget
|
39
|
-
fetch(`/admin/questions/update_nested_form?type=${questionType}&kind=${questionKind}`, {
|
40
|
-
method: 'GET',
|
41
|
-
}).then(response => response.json())
|
42
|
-
.then(data => {
|
43
|
-
choices.innerHTML = data
|
44
|
-
})
|
45
|
-
}
|
46
|
-
displayChoiceBtn() {
|
47
|
-
let questionKind = this.questionKindTarget.selectedOptions[0].value
|
48
|
-
let questionType = this.questionTypeTarget.selectedOptions[0].value
|
49
|
-
let btn = document.getElementById('add-choice')
|
50
|
-
if (Boolean(questionKind) && Boolean(questionType) && questionType != "Questions::Input") {
|
51
|
-
btn.classList.remove('hidden')
|
52
|
-
} else {
|
53
|
-
btn.classList.add('hidden')
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
addQuestion() {
|
58
|
-
this.newQuestionTargets[0].classList.remove('hidden')
|
59
|
-
location.hash = "#" + 'newQuestion';
|
60
|
-
}
|
61
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { Controller } from "@hotwired/stimulus"
|
2
|
-
|
3
|
-
export default class extends Controller {
|
4
|
-
static targets = ["form"]
|
5
|
-
|
6
|
-
search() {
|
7
|
-
clearTimeout(this.timeout)
|
8
|
-
this.timeout = setTimeout(() => {
|
9
|
-
this.formTarget.requestSubmit()
|
10
|
-
}, 200)
|
11
|
-
}
|
12
|
-
|
13
|
-
setBooleanField(e) {
|
14
|
-
let value = e.target.getAttribute('data-value')
|
15
|
-
let targetId = e.target.getAttribute('data-target-id')
|
16
|
-
let target = document.getElementById(targetId)
|
17
|
-
target.value = value
|
18
|
-
this.formTarget.requestSubmit()
|
19
|
-
}
|
20
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
// app/javascript/controllers/ts/search_controller.js
|
2
|
-
|
3
|
-
import { Controller } from "@hotwired/stimulus"
|
4
|
-
import { get } from '@rails/request.js'
|
5
|
-
import TomSelect from "tom-select"
|
6
|
-
|
7
|
-
// Connects to data-controller="ts--search"
|
8
|
-
export default class extends Controller {
|
9
|
-
static values = { url: String }
|
10
|
-
|
11
|
-
connect() {
|
12
|
-
|
13
|
-
var config = {
|
14
|
-
plugins: ['clear_button'],
|
15
|
-
valueField: 'value',
|
16
|
-
load: (q, callback) => this.search(q, callback)
|
17
|
-
}
|
18
|
-
new TomSelect(this.element, config)
|
19
|
-
}
|
20
|
-
|
21
|
-
async search(q, callback) {
|
22
|
-
const response = await get(this.urlValue, {
|
23
|
-
query: { q: q },
|
24
|
-
responseKind: 'json'
|
25
|
-
})
|
26
|
-
|
27
|
-
if (response.ok) {
|
28
|
-
const list = await response.json
|
29
|
-
callback(list)
|
30
|
-
} else {
|
31
|
-
callback()
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { Controller } from "@hotwired/stimulus"
|
2
|
-
import TomSelect from "tom-select"
|
3
|
-
|
4
|
-
// Connects to data-controller="ts--select"
|
5
|
-
export default class extends Controller {
|
6
|
-
connect() {
|
7
|
-
new TomSelect(this.element, { create: false, plugins: ['remove_button'] })
|
8
|
-
}
|
9
|
-
}
|