thecore_ui_commons 3.1.1 → 3.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 545612cd446162c6a80cd02327f34c4a650fbe5f7d41cc405dacabbfb4db4a40
4
- data.tar.gz: e25436da88fcb59d3edb3f0aa586852d0ced82492910eb27dee8676157b0ac6d
3
+ metadata.gz: 7da4382f1fbef8b379395ee9c27d8843f2bbaa149a07a905f1ba121b5bafd80a
4
+ data.tar.gz: 006b5b93a931cd1873f3949af9df641ca8e0ea05da2bba477a0aa8c1aad889c2
5
5
  SHA512:
6
- metadata.gz: ccabf057f8d745c8c07bbe2402200531f543f854ed3e3f24e1b2eb95153088266a22eea0ba9d9ce5ae9578178fe6da5c058f25f4030352249ba88c11c4c18a06
7
- data.tar.gz: 96937557fa17085fff797fe5eb989d656a81e2610cb935a19c2bffb58d5ceacc1bfc49bccde5f3bd00a3183d985eb3c5a67c05cbb7a8a06e0683f447ec455f5e
6
+ metadata.gz: 56dddb379b11fb587eb1d4e062d92322e0cc698ad58c552366077b49c2c83220bac482f0b245b6bdbc19dc8d70194834ead9503ed3a7b8ed9e5d5b55878e0ca5
7
+ data.tar.gz: 67dd7cedf24b18cc969974b762a3001c13215b6086f1f7028a9ce37a9d235f595cb57ba2c1998509c7bcc2731befb2563cda88d1fb7b9367d567d857403dafc9
data/README.md CHANGED
@@ -1,28 +1 @@
1
- # ThecoreUiCommons
2
- Short description and motivation.
3
-
4
- ## Usage
5
- How to use my plugin.
6
-
7
- ## Installation
8
- Add this line to your application's Gemfile:
9
-
10
- ```ruby
11
- gem "thecore_ui_commons"
12
- ```
13
-
14
- And then execute:
15
- ```bash
16
- $ bundle
17
- ```
18
-
19
- Or install it yourself as:
20
- ```bash
21
- $ gem install thecore_ui_commons
22
- ```
23
-
24
- ## Contributing
25
- Contribution directions go here.
26
-
27
- ## License
28
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
1
+ This is part of Thecore framework: https://github.com/gabrieletassoni/thecore/tree/release/3
@@ -0,0 +1,10 @@
1
+ class ApplicationController < ActionController::Base
2
+ before_action :setup_white_label
3
+
4
+ private
5
+
6
+ def setup_white_label
7
+ # Somewhat white label support
8
+ prepend_view_path(["vendor/custombuilds/#{ENV['COMPOSE_PROJECT_NAME']}.#{ENV['BASE_DOMAIN']}/deltas/app/views"]) if ENV['COMPOSE_PROJECT_NAME'].present? && ENV['BASE_DOMAIN'].present?
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ class InfoController < ApplicationController
2
+ # This is a model-less controller just to render che swagger page using a custom layout
3
+ layout 'swagger'
4
+ def swagger
5
+ uri = URI(request.url)
6
+ @swagger_json_url = "#{uri.scheme}://#{uri.host}#{":#{uri.port}" if uri.port.present?}/api/v2/info/swagger.json"
7
+ end
8
+ end
@@ -0,0 +1,28 @@
1
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.19.5/swagger-ui-bundle.js"> </script>
2
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.19.5/swagger-ui-standalone-preset.js"> </script>
3
+ <script>
4
+ function get(yourUrl){
5
+ var Httpreq = new XMLHttpRequest(); // a new request
6
+ Httpreq.open("GET",yourUrl,false);
7
+ Httpreq.send(null);
8
+ var json_obj = JSON.parse(Httpreq.responseText);
9
+ return json_obj;
10
+ }
11
+ window.onload = function() {
12
+ const ui = SwaggerUIBundle({
13
+ spec: get('<%= @swagger_json_url %>'),
14
+ dom_id: '#swagger-ui',
15
+ deepLinking: true,
16
+ presets: [
17
+ SwaggerUIBundle.presets.apis,
18
+ SwaggerUIStandalonePreset
19
+ ],
20
+ plugins: [
21
+ SwaggerUIBundle.plugins.DownloadUrl
22
+ ],
23
+ layout: "StandaloneLayout"
24
+ })
25
+
26
+ window.ui = ui
27
+ }
28
+ </script>
@@ -0,0 +1,16 @@
1
+ <html>
2
+ <head>
3
+ <meta charset="UTF-8">
4
+ <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.19.5/swagger-ui.css" >
5
+ <style>
6
+ .swagger-ui .topbar {
7
+ display: none;
8
+ }
9
+ </style>
10
+ </head>
11
+
12
+ <body>
13
+ <div id="swagger-ui"></div>
14
+ <%=yield%>
15
+ </body>
16
+ </html>
@@ -1,26 +1,42 @@
1
1
  en:
2
- file_upload: Upload description, please add a translation for the element called file_upload in your translation file.
3
- file_upload_subtitle: Descrizione aggiuntiva, prego aggiungere una traduzione per file_upload_subtitle al tuo file delle traduzioni.
4
- dont_leve_or_drag_here: Uploading, please don't leave this page or Drag & Drop other files.
5
- loading: Caricamento
6
- please_drag_and_drop_here: Drag and Drop here the files to import
7
- import_success: Import Successful!
2
+ admin:
3
+ actions:
4
+ charts:
5
+ menu: Analisys
6
+ title: Charts
7
+ breadcrumb: Charts
8
+ links:
9
+ label: Links
10
+ settings:
11
+ label: Settings
12
+ advanced: Advanced
13
+ registries: Registries
14
+ operations: Operations
15
+ tools:
16
+ label: Tools
17
+ advanced: Advanced
18
+ contact: Help us
8
19
  current_user: Current User
20
+ dashboard: Dashboard
9
21
  devise:
10
22
  sessions:
11
23
  new:
12
24
  login: Login
13
- password: Password
14
- hello: Hello World
15
- dashboard: Dashboard
16
- contact: Help us
17
- manage: Manage
18
- sign_out: Sign Out
19
- advanced: Advanced
20
- main_records: Registries
25
+ password: Password
26
+ dont_leve_or_drag_here: Uploading, please don't leave this page or Drag & Drop other files.
21
27
  errors:
22
28
  messages:
23
29
  invalid: Invalid characters
30
+ file_upload: Upload description, please add a translation for the element called file_upload in your translation file.
31
+ file_upload_subtitle: Additional description, please add a translation for file_upload_subtitle to your translation file.
32
+ hello: Hello World
33
+ import_success: Import Successful!
34
+ loading: Loading
35
+ main_records: Registries
36
+ manage: Manage
37
+ please_drag_and_drop_here: Drag and Drop here the files to import
38
+ run_import: Force import
39
+ sign_out: Sign Out
24
40
  tiered_times:
25
41
  dd:
26
42
  zero: "0 Days"
@@ -37,19 +53,4 @@ en:
37
53
  ss:
38
54
  zero: "0 Seconds"
39
55
  one: "%{count} Second"
40
- other: "%{count} Seconds"
41
- admin:
42
- links:
43
- label: Links
44
- tools:
45
- label: Tools
46
- settings:
47
- label: Settings
48
- advanced: Advanced
49
- registries: Registries
50
- operations: Operations
51
- actions:
52
- charts:
53
- menu: Analisys
54
- title: Charts
55
- breadcrumb: Charts
56
+ other: "%{count} Seconds"
@@ -1,4 +1,4 @@
1
1
  it:
2
2
  activerecord:
3
3
  models:
4
- thecore_settings/setting: Configurations
4
+ thecore_settings/setting: Configurazioni
@@ -1,27 +1,42 @@
1
1
  it:
2
- file_upload: Descrizione della procedura, prego aggiungere una traduzione per file_upload al tuo file delle traduzioni.
3
- file_upload_subtitle: Descrizione aggiuntiva, prego aggiungere una traduzione per file_upload_subtitle al tuo file delle traduzioni.
4
- dont_leve_or_drag_here: Upload in corso, si prega di non lasciare la pagina o trascinare qui altri file.
5
- loading: Caricamento
6
- run_import: Forza l'importazione
7
- please_drag_and_drop_here: Trascinare qui i file da importare
8
- import_success: Importazione completata con successo
9
- current_user: Utente corrente
10
- hello: "Ciao Mondo"
11
- dashboard: "Pagina Iniziale"
12
- contact: "Aiutaci a Migliorare"
13
- manage: "Gestione"
14
- sign_out: "Uscita"
15
- advanced: Impostazioni
16
- main_records: Anagrafiche
2
+ admin:
3
+ actions:
4
+ charts:
5
+ menu: Analisi
6
+ title: Grafici
7
+ breadcrumb: Grafici
8
+ links:
9
+ label: Collegamenti
10
+ settings:
11
+ label: Impostazioni
12
+ advanced: Avanzate
13
+ registries: Anagrafiche
14
+ operations: Operatività
15
+ tools:
16
+ label: "Strumenti"
17
+ advanced: Impostazioni
18
+ contact: "Aiutaci a Migliorare"
19
+ current_user: Utente corrente
20
+ dashboard: "Pagina Iniziale"
17
21
  devise:
18
22
  sessions:
19
23
  new:
20
24
  login: Login
21
- password: Password
25
+ password: Password
26
+ dont_leve_or_drag_here: Upload in corso, si prega di non lasciare la pagina o trascinare qui altri file.
22
27
  errors:
23
28
  messages:
24
- invalid: contiene caratteri invalidi
29
+ invalid: contiene caratteri invalidi
30
+ file_upload: Descrizione della procedura, prego aggiungere una traduzione per file_upload al tuo file delle traduzioni.
31
+ file_upload_subtitle: Descrizione aggiuntiva, prego aggiungere una traduzione per file_upload_subtitle al tuo file delle traduzioni.
32
+ hello: "Ciao Mondo"
33
+ import_success: Importazione completata con successo
34
+ loading: Caricamento
35
+ main_records: Anagrafiche
36
+ manage: "Gestione"
37
+ please_drag_and_drop_here: Trascinare qui i file da importare
38
+ run_import: Forza l'importazione
39
+ sign_out: "Uscita"
25
40
  tiered_times:
26
41
  dd:
27
42
  zero: "0 Giorni"
@@ -38,19 +53,4 @@ it:
38
53
  ss:
39
54
  zero: "0 Secondi"
40
55
  one: "%{count} Secondo"
41
- other: "%{count} Secondi"
42
- admin:
43
- links:
44
- label: Collegamenti
45
- tools:
46
- label: "Strumenti"
47
- settings:
48
- label: Impostazioni
49
- advanced: Avanzate
50
- registries: Anagrafiche
51
- operations: Operatività
52
- actions:
53
- charts:
54
- menu: Analisi
55
- title: Grafici
56
- breadcrumb: Grafici
56
+ other: "%{count} Secondi"
data/config/routes.rb CHANGED
@@ -3,4 +3,6 @@ Rails.application.routes.draw do
3
3
  devise_scope :user do
4
4
  root to: "devise/sessions#new"
5
5
  end
6
+
7
+ get '/info/swagger', to: 'info#swagger'
6
8
  end
@@ -1,3 +1,3 @@
1
1
  module ThecoreUiCommons
2
- VERSION = "3.1.1".freeze
2
+ VERSION = "3.1.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-13 00:00:00.000000000 Z
11
+ date: 2024-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_backend_commons
@@ -119,8 +119,11 @@ files:
119
119
  - app/assets/stylesheets/thecore_ui_commons.scss
120
120
  - app/assets/stylesheets/thecore_ui_commons/alerts.scss
121
121
  - app/assets/stylesheets/thecore_ui_commons/variables.scss
122
+ - app/controllers/application_controller.rb
123
+ - app/controllers/info_controller.rb
122
124
  - app/helpers/thecore_helper.rb
123
125
  - app/views/contact_mailer/contact_message.html.erb
126
+ - app/views/info/swagger.html.erb
124
127
  - app/views/kaminari/_first_page.html.erb
125
128
  - app/views/kaminari/_gap.html.erb
126
129
  - app/views/kaminari/_last_page.html.erb
@@ -134,6 +137,7 @@ files:
134
137
  - app/views/layouts/devise/sessions.html.erb
135
138
  - app/views/layouts/mailer.html.erb
136
139
  - app/views/layouts/mailer.text.erb
140
+ - app/views/layouts/swagger.html.erb
137
141
  - app/views/shared/_flash.html.erb
138
142
  - app/views/thecore_utils/_drag_drop_uploader.html.erb
139
143
  - config/initializers/abilities.rb
@@ -178,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
182
  - !ruby/object:Gem::Version
179
183
  version: '0'
180
184
  requirements: []
181
- rubygems_version: 3.4.10
185
+ rubygems_version: 3.5.3
182
186
  signing_key:
183
187
  specification_version: 4
184
188
  summary: Common artifacts for the UIs.