kono_utils_bootstrap_view4 0.1.0.pre.rc.2 → 0.1.0.pre.rc.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/concepts/kono_utils/object/cell/base.rb +101 -97
- data/app/concepts/kono_utils/object/cell/buttons/base.rb +55 -54
- data/app/concepts/kono_utils/object/cell/buttons/collapse_search.rb +29 -23
- data/app/concepts/kono_utils/object/cell/buttons/create.rb +20 -15
- data/app/concepts/kono_utils/object/cell/buttons/delete.rb +29 -24
- data/app/concepts/kono_utils/object/cell/buttons/download.rb +22 -16
- data/app/concepts/kono_utils/object/cell/buttons/edit.rb +17 -12
- data/app/concepts/kono_utils/object/cell/buttons/list.rb +17 -11
- data/app/concepts/kono_utils/object/cell/buttons/reset_search.rb +21 -15
- data/app/concepts/kono_utils/object/cell/create/base.rb +6 -5
- data/app/concepts/kono_utils/object/cell/create/page_title.rb +11 -6
- data/app/concepts/kono_utils/object/cell/create/side_title.rb +8 -2
- data/app/concepts/kono_utils/object/cell/edits/base.rb +6 -5
- data/app/concepts/kono_utils/object/cell/edits/page_title.rb +11 -6
- data/app/concepts/kono_utils/object/cell/edits/side_title.rb +9 -3
- data/app/concepts/kono_utils/object/cell/form.rb +51 -48
- data/app/concepts/kono_utils/object/cell/forms/base.rb +12 -10
- data/app/concepts/kono_utils/object/cell/forms/container.rb +22 -18
- data/app/concepts/kono_utils/object/cell/forms/containers/layout.rb +14 -10
- data/app/concepts/kono_utils/object/cell/forms/containers/modal_layout.rb +10 -4
- data/app/concepts/kono_utils/object/cell/forms/containers/search_layout.rb +10 -4
- data/app/concepts/kono_utils/object/cell/forms/containers/table_layout.rb +11 -5
- data/app/concepts/kono_utils/object/cell/forms/field_selector.rb +68 -64
- data/app/concepts/kono_utils/object/cell/forms/field_selectors/layout.rb +9 -4
- data/app/concepts/kono_utils/object/cell/forms/field_selectors/modal_layout.rb +10 -4
- data/app/concepts/kono_utils/object/cell/forms/field_selectors/table_layout.rb +11 -5
- data/app/concepts/kono_utils/object/cell/forms/fields/association.rb +11 -4
- data/app/concepts/kono_utils/object/cell/forms/fields/base.rb +21 -16
- data/app/concepts/kono_utils/object/cell/forms/fields/bases/layout.rb +24 -17
- data/app/concepts/kono_utils/object/cell/forms/fields/bases/modal_layout.rb +14 -4
- data/app/concepts/kono_utils/object/cell/forms/fields/bases/table_layout.rb +17 -7
- data/app/concepts/kono_utils/object/cell/forms/fields/check_box.rb +14 -6
- data/app/concepts/kono_utils/object/cell/forms/fields/collection.rb +20 -12
- data/app/concepts/kono_utils/object/cell/forms/fields/date_field.rb +18 -10
- data/app/concepts/kono_utils/object/cell/forms/fields/date_time_field.rb +34 -30
- data/app/concepts/kono_utils/object/cell/forms/fields/enum.rb +23 -15
- data/app/concepts/kono_utils/object/cell/forms/fields/file_field.rb +29 -21
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_modal_wrapper.rb +10 -3
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_modal_wrappers/forms_container.rb +13 -5
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_modal_wrappers/show.rb +19 -10
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrapper.rb +54 -49
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/form.rb +41 -35
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms/layout.rb +17 -8
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms/modal_layout.rb +14 -4
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms/table_layout.rb +14 -4
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms_container.rb +44 -36
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms_containers/layout.rb +17 -10
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms_containers/modal_layout.rb +17 -6
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms_containers/table_layout.rb +20 -11
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/header.rb +31 -23
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/remove_button.rb +46 -40
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/remove_buttons/layout.rb +14 -7
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/remove_buttons/modal_layout.rb +14 -4
- data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/remove_buttons/table_layout.rb +14 -4
- data/app/concepts/kono_utils/object/cell/forms/fields/read_only.rb +16 -9
- data/app/concepts/kono_utils/object/cell/forms/fields/time_field.rb +14 -7
- data/app/concepts/kono_utils/object/cell/forms/layout.rb +8 -4
- data/app/concepts/kono_utils/object/cell/forms/submit.rb +21 -16
- data/app/concepts/kono_utils/object/cell/index/base.rb +9 -7
- data/app/concepts/kono_utils/object/cell/index/page_title.rb +11 -6
- data/app/concepts/kono_utils/object/cell/index/row.rb +38 -36
- data/app/concepts/kono_utils/object/cell/index/row_buttons.rb +8 -4
- data/app/concepts/kono_utils/object/cell/index/row_footer.rb +8 -3
- data/app/concepts/kono_utils/object/cell/index/row_header.rb +13 -7
- data/app/concepts/kono_utils/object/cell/index/side_title.rb +8 -2
- data/app/concepts/kono_utils/object/cell/index/table.rb +12 -9
- data/app/concepts/kono_utils/object/cell/inject.rb +103 -102
- data/app/concepts/kono_utils/object/cell/modals/base.rb +7 -3
- data/app/concepts/kono_utils/object/cell/modals/bodies/layout.rb +9 -4
- data/app/concepts/kono_utils/object/cell/modals/body.rb +7 -3
- data/app/concepts/kono_utils/object/cell/modals/container.rb +5 -1
- data/app/concepts/kono_utils/object/cell/modals/containers/layout.rb +12 -6
- data/app/concepts/kono_utils/object/cell/modals/footer.rb +5 -2
- data/app/concepts/kono_utils/object/cell/modals/footers/layout.rb +9 -4
- data/app/concepts/kono_utils/object/cell/modals/header.rb +6 -3
- data/app/concepts/kono_utils/object/cell/modals/headers/layout.rb +9 -4
- data/app/concepts/kono_utils/object/cell/search.rb +22 -19
- data/app/concepts/kono_utils/object/cell/searches/form.rb +12 -9
- data/app/concepts/kono_utils/object/cell/show.rb +25 -20
- data/app/concepts/kono_utils/object/cell/shows/base.rb +6 -5
- data/app/concepts/kono_utils/object/cell/shows/page_title.rb +11 -6
- data/app/concepts/kono_utils/object/cell/shows/side_title.rb +8 -2
- data/lib/kono_utils_bootstrap_view4.rb +14 -8
- data/lib/kono_utils_bootstrap_view4/engine.rb +1 -1
- data/lib/kono_utils_bootstrap_view4/version.rb +1 -1
- metadata +8 -16
@@ -1,6 +1,10 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
3
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
4
|
+
# Cella Base per i componenti della modal
|
5
|
+
class Modals::Base < Base
|
4
6
|
|
7
|
+
end
|
8
|
+
end
|
5
9
|
end
|
6
10
|
end
|
@@ -1,7 +1,12 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
4
|
+
module Modals # namespace
|
5
|
+
# Layout Standard del contenitore della modal
|
6
|
+
class Bodies::Layout < Base
|
5
7
|
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
6
11
|
end
|
7
12
|
end
|
@@ -1,6 +1,10 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
3
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
4
|
+
# Cella Base per i componenti della modal
|
5
|
+
class Modals::Body < Base
|
4
6
|
|
7
|
+
end
|
8
|
+
end
|
5
9
|
end
|
6
10
|
end
|
@@ -1,4 +1,6 @@
|
|
1
|
-
module KonoUtils
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
2
4
|
##
|
3
5
|
# Contenitore principale modal, come Model riceve un oggetto che rappresente il body da renderizzare che deve rispondere
|
4
6
|
# a to_s per restituire il contenuto del body e metodi to_footer e to_header per il contenuto degli altri componenti
|
@@ -21,4 +23,6 @@ module KonoUtils::Object::Cell # namespace
|
|
21
23
|
end
|
22
24
|
|
23
25
|
end
|
26
|
+
end
|
27
|
+
end
|
24
28
|
end
|
@@ -1,10 +1,16 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
3
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
4
|
+
module Modals # namespace
|
5
|
+
# Layout Standard del contenitore della modal
|
6
|
+
class Containers::Layout < Base
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
+
def modal_container_id
|
9
|
+
context[:modal_container_id]
|
10
|
+
end
|
8
11
|
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
9
15
|
end
|
10
16
|
end
|
@@ -1,7 +1,12 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
4
|
+
module Modals # namespace
|
5
|
+
# Layout Standard del contenitore della modal
|
6
|
+
class Footers::Layout < Base
|
5
7
|
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
6
11
|
end
|
7
12
|
end
|
@@ -1,6 +1,9 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
3
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell # Cella Base per i componenti della modal
|
4
|
+
class Modals::Header < Base
|
4
5
|
|
6
|
+
end
|
7
|
+
end
|
5
8
|
end
|
6
9
|
end
|
@@ -1,7 +1,12 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
4
|
+
module Modals # namespace
|
5
|
+
# Layout Standard del contenitore della modal
|
6
|
+
class Headers::Layout < Base
|
5
7
|
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
6
11
|
end
|
7
12
|
end
|
@@ -1,27 +1,30 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
4
|
+
class Search < Base
|
3
5
|
|
6
|
+
def collapse_container_id
|
7
|
+
dom_id(model, "search_form")
|
8
|
+
end
|
4
9
|
|
5
|
-
|
6
|
-
|
7
|
-
|
10
|
+
def data_loaded?
|
11
|
+
model.data_loaded?
|
12
|
+
end
|
8
13
|
|
9
|
-
|
10
|
-
|
11
|
-
|
14
|
+
##
|
15
|
+
# Identifica il contenitore dei bottoni, sia a livello di id DOM che per quanto riguarda la destinazione dei bottoni
|
16
|
+
# durante il renderig della form
|
17
|
+
def buttons_container
|
18
|
+
dom_id(model, 'buttons_container')
|
19
|
+
end
|
12
20
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
21
|
+
##
|
22
|
+
# Andiamo a restituire il layout da utilizzare nel form
|
23
|
+
def form_layout
|
24
|
+
layout_ns("cell/forms/containers/search_layout")
|
25
|
+
end
|
19
26
|
|
20
|
-
|
21
|
-
# Andiamo a restituire il layout da utilizzare nel form
|
22
|
-
def form_layout
|
23
|
-
layout_ns("cell/forms/containers/search_layout")
|
27
|
+
end
|
24
28
|
end
|
25
|
-
|
26
29
|
end
|
27
30
|
end
|
@@ -1,14 +1,17 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
4
|
+
##
|
5
|
+
# Classe variante della ricerca
|
6
|
+
class Searches::Form < Form
|
5
7
|
|
8
|
+
##
|
9
|
+
# Destinazione bottoni nel layout
|
10
|
+
def send_buttons_to
|
11
|
+
:search_buttons_container
|
12
|
+
end
|
6
13
|
|
7
|
-
|
8
|
-
# Destinazione bottoni nel layout
|
9
|
-
def send_buttons_to
|
10
|
-
:search_buttons_container
|
14
|
+
end
|
11
15
|
end
|
12
|
-
|
13
16
|
end
|
14
17
|
end
|
@@ -1,26 +1,31 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
3
4
|
|
4
|
-
|
5
|
-
def get_field(field)
|
6
|
-
model.send(field.name)
|
7
|
-
end
|
5
|
+
class Show < Base
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
# @param field [KonoUtilsBootstrapView4::EditableField] campo da cui estrapolare il valore
|
8
|
+
def get_field(field)
|
9
|
+
model.send(field.name)
|
10
|
+
end
|
11
|
+
|
12
|
+
# @param field [KonoUtilsBootstrapView4::EditableField] campo da cui estrapolare la descrizione
|
13
|
+
def field_description(field)
|
14
|
+
model.class.han field.name
|
15
|
+
end
|
16
|
+
|
17
|
+
##
|
18
|
+
# Elenco dei campi da visualizzare, altrimenti estrapolati dalla policy
|
19
|
+
# @return [Array<KonoUtilsBootstrapView4::EditableField>]
|
20
|
+
def displayable_attributes
|
21
|
+
if options[:displayable_attributes]
|
22
|
+
KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(options[:displayable_attributes])
|
23
|
+
else
|
24
|
+
KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(policy(model).displayable_attributes)
|
25
|
+
end
|
26
|
+
end
|
13
27
|
|
14
|
-
##
|
15
|
-
# Elenco dei campi da visualizzare, altrimenti estrapolati dalla policy
|
16
|
-
# @return [Array<KonoUtilsBootstrapView4::EditableField>]
|
17
|
-
def displayable_attributes
|
18
|
-
if options[:displayable_attributes]
|
19
|
-
KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(options[:displayable_attributes])
|
20
|
-
else
|
21
|
-
KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(policy(model).displayable_attributes)
|
22
28
|
end
|
23
29
|
end
|
24
|
-
|
25
30
|
end
|
26
|
-
end
|
31
|
+
end
|
@@ -1,10 +1,15 @@
|
|
1
|
-
module KonoUtils
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
end
|
1
|
+
module KonoUtils
|
2
|
+
module Object
|
3
|
+
module Cell
|
4
|
+
module Shows # namespace
|
5
|
+
class PageTitle < Base
|
7
6
|
|
7
|
+
def show
|
8
|
+
title_edit_g
|
9
|
+
end
|
8
10
|
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
9
14
|
end
|
10
15
|
end
|
@@ -1,12 +1,20 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
loader.ignore("#{__dir__}/generators")
|
4
|
-
loader.enable_reloading # you need to opt-in before setup
|
5
|
-
loader.setup
|
1
|
+
require 'kono_utils'
|
2
|
+
require 'active_support'
|
6
3
|
|
7
|
-
|
4
|
+
require "kono_utils_bootstrap_view4/engine"
|
8
5
|
|
9
6
|
module KonoUtilsBootstrapView4
|
7
|
+
extend ActiveSupport::Autoload
|
8
|
+
|
9
|
+
autoload :ApplicationIconHelper
|
10
|
+
autoload :BaseClassConceptNs
|
11
|
+
autoload :BaseSearch
|
12
|
+
autoload :Configuration
|
13
|
+
autoload :EditableField
|
14
|
+
autoload :Engine
|
15
|
+
autoload :PaginateProxer
|
16
|
+
autoload :SearchFormBuilder
|
17
|
+
autoload :VERSION
|
10
18
|
|
11
19
|
class << self
|
12
20
|
attr_writer :configuration
|
@@ -22,5 +30,3 @@ module KonoUtilsBootstrapView4
|
|
22
30
|
end
|
23
31
|
|
24
32
|
end
|
25
|
-
|
26
|
-
loader.eager_load
|
@@ -46,7 +46,7 @@ module KonoUtilsBootstrapView4
|
|
46
46
|
Array([
|
47
47
|
"kono_utils/object/cell/forms/fields/bases/layout"
|
48
48
|
]).each do |cell_class|
|
49
|
-
puts "@@@@@ #{cell_class.camelize.constantize.prefixes}"
|
49
|
+
puts "@@@@@ - #{cell_class.camelize.constantize.name} - #{cell_class.camelize.constantize.prefixes}"
|
50
50
|
app.config.assets.paths += cell_class.camelize.constantize.prefixes # Song::Cell.prefixes
|
51
51
|
end
|
52
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kono_utils_bootstrap_view4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.pre.rc.
|
4
|
+
version: 0.1.0.pre.rc.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marino Bonetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -37,6 +37,9 @@ dependencies:
|
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '1.1'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 1.1.1
|
40
43
|
type: :runtime
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,6 +47,9 @@ dependencies:
|
|
44
47
|
- - "~>"
|
45
48
|
- !ruby/object:Gem::Version
|
46
49
|
version: '1.1'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.1.1
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: kaminari
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,20 +92,6 @@ dependencies:
|
|
86
92
|
- - ">="
|
87
93
|
- !ruby/object:Gem::Version
|
88
94
|
version: '0'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: zeitwerk
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - ">="
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '0'
|
96
|
-
type: :runtime
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '0'
|
103
95
|
- !ruby/object:Gem::Dependency
|
104
96
|
name: trailblazer-cells
|
105
97
|
requirement: !ruby/object:Gem::Requirement
|