wallaby 6.0.2 → 6.1.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.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/wallaby/resources/_active_storage.html.erb +5 -0
  3. data/app/views/wallaby/resources/_resource_actions.html.erb +3 -0
  4. data/app/views/wallaby/resources/index/_belongs_to.html.erb +5 -0
  5. data/app/views/wallaby/resources/index/_bigint.html.erb +5 -0
  6. data/app/views/wallaby/resources/index/_bigserial.html.erb +5 -0
  7. data/app/views/wallaby/resources/index/_binary.html.erb +5 -0
  8. data/app/views/wallaby/resources/index/_bit.html.erb +9 -0
  9. data/app/views/wallaby/resources/index/_bit_varying.html.erb +9 -0
  10. data/app/views/wallaby/resources/index/_blob.html.erb +5 -0
  11. data/app/views/wallaby/resources/index/_boolean.html.erb +9 -0
  12. data/app/views/wallaby/resources/index/_box.html.erb +16 -0
  13. data/app/views/wallaby/resources/index/_cidr.html.erb +13 -0
  14. data/app/views/wallaby/resources/index/_circle.html.erb +16 -0
  15. data/app/views/wallaby/resources/index/_citext.html.erb +16 -0
  16. data/app/views/wallaby/resources/index/_color.html.erb +10 -0
  17. data/app/views/wallaby/resources/index/_date.html.erb +11 -0
  18. data/app/views/wallaby/resources/index/_daterange.html.erb +12 -0
  19. data/app/views/wallaby/resources/index/_datetime.html.erb +11 -0
  20. data/app/views/wallaby/resources/index/_decimal.html.erb +5 -0
  21. data/app/views/wallaby/resources/index/_email.html.erb +5 -0
  22. data/app/views/wallaby/resources/index/_float.html.erb +5 -0
  23. data/app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb +15 -0
  24. data/app/views/wallaby/resources/index/_has_many.html.erb +15 -0
  25. data/app/views/wallaby/resources/index/_has_one.html.erb +5 -0
  26. data/app/views/wallaby/resources/index/_hstore.html.erb +16 -0
  27. data/app/views/wallaby/resources/index/_inet.html.erb +13 -0
  28. data/app/views/wallaby/resources/index/_int4range.html.erb +11 -0
  29. data/app/views/wallaby/resources/index/_int8range.html.erb +11 -0
  30. data/app/views/wallaby/resources/index/_integer.html.erb +5 -0
  31. data/app/views/wallaby/resources/index/_json.html.erb +16 -0
  32. data/app/views/wallaby/resources/index/_jsonb.html.erb +16 -0
  33. data/app/views/wallaby/resources/index/_line.html.erb +16 -0
  34. data/app/views/wallaby/resources/index/_link.html.erb +5 -0
  35. data/app/views/wallaby/resources/index/_longblob.html.erb +5 -0
  36. data/app/views/wallaby/resources/index/_longtext.html.erb +16 -0
  37. data/app/views/wallaby/resources/index/_lseg.html.erb +16 -0
  38. data/app/views/wallaby/resources/index/_ltree.html.erb +16 -0
  39. data/app/views/wallaby/resources/index/_macaddr.html.erb +9 -0
  40. data/app/views/wallaby/resources/index/_mediumblob.html.erb +5 -0
  41. data/app/views/wallaby/resources/index/_mediumtext.html.erb +16 -0
  42. data/app/views/wallaby/resources/index/_money.html.erb +5 -0
  43. data/app/views/wallaby/resources/index/_numrange.html.erb +11 -0
  44. data/app/views/wallaby/resources/index/_password.html.erb +9 -0
  45. data/app/views/wallaby/resources/index/_path.html.erb +16 -0
  46. data/app/views/wallaby/resources/index/_point.html.erb +13 -0
  47. data/app/views/wallaby/resources/index/_polygon.html.erb +16 -0
  48. data/app/views/wallaby/resources/index/_raw.html.erb +9 -0
  49. data/app/views/wallaby/resources/index/_serial.html.erb +5 -0
  50. data/app/views/wallaby/resources/index/_sti.html.erb +16 -0
  51. data/app/views/wallaby/resources/index/_string.html.erb +16 -0
  52. data/app/views/wallaby/resources/index/_text.html.erb +16 -0
  53. data/app/views/wallaby/resources/index/_time.html.erb +10 -0
  54. data/app/views/wallaby/resources/index/_tinyblob.html.erb +5 -0
  55. data/app/views/wallaby/resources/index/_tinytext.html.erb +16 -0
  56. data/app/views/wallaby/resources/index/_tsrange.html.erb +12 -0
  57. data/app/views/wallaby/resources/index/_tstzrange.html.erb +12 -0
  58. data/app/views/wallaby/resources/index/_tsvector.html.erb +16 -0
  59. data/app/views/wallaby/resources/index/_unsigned_bigint.html.erb +5 -0
  60. data/app/views/wallaby/resources/index/_unsigned_decimal.html.erb +5 -0
  61. data/app/views/wallaby/resources/index/_unsigned_float.html.erb +5 -0
  62. data/app/views/wallaby/resources/index/_unsigned_integer.html.erb +5 -0
  63. data/app/views/wallaby/resources/index/_uuid.html.erb +16 -0
  64. data/app/views/wallaby/resources/index/_xml.html.erb +16 -0
  65. data/lib/wallaby/version.rb +1 -2
  66. metadata +74 -74
  67. data/app/views/wallaby/resources/active_storage_html.rb +0 -13
  68. data/app/views/wallaby/resources/index/belongs_to_html.rb +0 -15
  69. data/app/views/wallaby/resources/index/bigint_html.rb +0 -15
  70. data/app/views/wallaby/resources/index/bigserial_html.rb +0 -15
  71. data/app/views/wallaby/resources/index/binary_html.rb +0 -15
  72. data/app/views/wallaby/resources/index/bit_html.rb +0 -19
  73. data/app/views/wallaby/resources/index/bit_varying_html.rb +0 -19
  74. data/app/views/wallaby/resources/index/blob_html.rb +0 -15
  75. data/app/views/wallaby/resources/index/boolean_html.rb +0 -19
  76. data/app/views/wallaby/resources/index/box_html.rb +0 -11
  77. data/app/views/wallaby/resources/index/cidr_html.rb +0 -11
  78. data/app/views/wallaby/resources/index/circle_html.rb +0 -11
  79. data/app/views/wallaby/resources/index/citext_html.rb +0 -11
  80. data/app/views/wallaby/resources/index/color_html.rb +0 -20
  81. data/app/views/wallaby/resources/index/date_html.rb +0 -21
  82. data/app/views/wallaby/resources/index/daterange_html.rb +0 -22
  83. data/app/views/wallaby/resources/index/datetime_html.rb +0 -21
  84. data/app/views/wallaby/resources/index/decimal_html.rb +0 -15
  85. data/app/views/wallaby/resources/index/email_html.rb +0 -15
  86. data/app/views/wallaby/resources/index/float_html.rb +0 -15
  87. data/app/views/wallaby/resources/index/has_and_belongs_to_many_html.rb +0 -11
  88. data/app/views/wallaby/resources/index/has_many_html.rb +0 -25
  89. data/app/views/wallaby/resources/index/has_one_html.rb +0 -15
  90. data/app/views/wallaby/resources/index/hstore_html.rb +0 -11
  91. data/app/views/wallaby/resources/index/inet_html.rb +0 -23
  92. data/app/views/wallaby/resources/index/int4range_html.rb +0 -11
  93. data/app/views/wallaby/resources/index/int8range_html.rb +0 -11
  94. data/app/views/wallaby/resources/index/integer_html.rb +0 -15
  95. data/app/views/wallaby/resources/index/json_html.rb +0 -26
  96. data/app/views/wallaby/resources/index/jsonb_html.rb +0 -11
  97. data/app/views/wallaby/resources/index/line_html.rb +0 -26
  98. data/app/views/wallaby/resources/index/link_html.rb +0 -15
  99. data/app/views/wallaby/resources/index/longblob_html.rb +0 -15
  100. data/app/views/wallaby/resources/index/longtext_html.rb +0 -11
  101. data/app/views/wallaby/resources/index/lseg_html.rb +0 -11
  102. data/app/views/wallaby/resources/index/ltree_html.rb +0 -11
  103. data/app/views/wallaby/resources/index/macaddr_html.rb +0 -19
  104. data/app/views/wallaby/resources/index/mediumblob_html.rb +0 -15
  105. data/app/views/wallaby/resources/index/mediumtext_html.rb +0 -11
  106. data/app/views/wallaby/resources/index/money_html.rb +0 -15
  107. data/app/views/wallaby/resources/index/numrange_html.rb +0 -21
  108. data/app/views/wallaby/resources/index/password_html.rb +0 -19
  109. data/app/views/wallaby/resources/index/path_html.rb +0 -26
  110. data/app/views/wallaby/resources/index/point_html.rb +0 -23
  111. data/app/views/wallaby/resources/index/polygon_html.rb +0 -11
  112. data/app/views/wallaby/resources/index/raw_html.rb +0 -19
  113. data/app/views/wallaby/resources/index/serial_html.rb +0 -15
  114. data/app/views/wallaby/resources/index/sti_html.rb +0 -11
  115. data/app/views/wallaby/resources/index/string_html.rb +0 -26
  116. data/app/views/wallaby/resources/index/text_html.rb +0 -26
  117. data/app/views/wallaby/resources/index/time_html.rb +0 -20
  118. data/app/views/wallaby/resources/index/tinyblob_html.rb +0 -15
  119. data/app/views/wallaby/resources/index/tinytext_html.rb +0 -11
  120. data/app/views/wallaby/resources/index/tsrange_html.rb +0 -11
  121. data/app/views/wallaby/resources/index/tstzrange_html.rb +0 -11
  122. data/app/views/wallaby/resources/index/tsvector_html.rb +0 -11
  123. data/app/views/wallaby/resources/index/unsigned_bigint_html.rb +0 -15
  124. data/app/views/wallaby/resources/index/unsigned_decimal_html.rb +0 -15
  125. data/app/views/wallaby/resources/index/unsigned_float_html.rb +0 -15
  126. data/app/views/wallaby/resources/index/unsigned_integer_html.rb +0 -15
  127. data/app/views/wallaby/resources/index/uuid_html.rb +0 -11
  128. data/app/views/wallaby/resources/index/xml_html.rb +0 -11
  129. data/app/views/wallaby/resources/resource_actions_html.rb +0 -15
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- # Html cell
6
- class ActiveStorageHtml < Cell
7
- # @return [String]
8
- def render
9
- value.try(:attachment) ? link_to(value.attachment.blob.filename, rails_blob_path(value)) : null
10
- end
11
- end
12
- end
13
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class BelongsToHtml < Cell
8
- # @return [String]
9
- def render
10
- value.present? ? show_link(value, options: { readonly: true }) : null
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class BigintHtml < Cell
8
- # @return [String]
9
- def render
10
- value || null
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class BigserialHtml < Cell
8
- # @return [String]
9
- def render
10
- value || null
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class BinaryHtml < Cell
8
- # @return [String]
9
- def render
10
- value ? muted('binary') : null
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class BitHtml < Cell
8
- # @return [String]
9
- def render
10
- if value.nil?
11
- null
12
- else
13
- content_tag :code, value
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class BitVaryingHtml < Cell
8
- # @return [String]
9
- def render
10
- if value.nil?
11
- null
12
- else
13
- content_tag :code, value
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class BlobHtml < Cell
8
- # @return [String]
9
- def render
10
- value ? muted('blob') : null
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class BooleanHtml < Cell
8
- # @return [String]
9
- def render
10
- if value.nil?
11
- null
12
- else
13
- value ? fa_icon('check-square') : fa_icon('square')
14
- end
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class BoxHtml < LineHtml
8
- end
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class CidrHtml < InetHtml
8
- end
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class CircleHtml < LineHtml
8
- end
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class CitextHtml < TextHtml
8
- end
9
- end
10
- end
11
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class ColorHtml < Cell
8
- # @return [String]
9
- def render
10
- if value.nil?
11
- null
12
- else
13
- concat content_tag(:span, nil, style: "background-color: #{value};", class: 'color-square')
14
- content_tag(:span, value, class: 'text-uppercase')
15
- end
16
- end
17
- end
18
- end
19
- end
20
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class DateHtml < Cell
8
- # @return [String]
9
- def render
10
- if value.nil?
11
- null
12
- else
13
- self.value = Time.zone.parse value if value.is_a? String
14
- self.value = value.to_date if value.is_a? Time
15
- I18n.l value
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class DaterangeHtml < Cell
8
- # @return [String]
9
- def render
10
- if value.nil?
11
- null
12
- else
13
- concat content_tag(:span, I18n.l(value.first, format: :short), class: 'from')
14
- concat '...'
15
- concat content_tag(:span, I18n.l(value.last, format: :short), class: 'to')
16
- itooltip "#{I18n.l value.first} ... #{I18n.l value.last}", 'time'
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class DatetimeHtml < Cell
8
- # @return [String]
9
- def render
10
- if value.nil?
11
- null
12
- else
13
- self.value = Time.zone.parse value if value.is_a? String
14
- concat content_tag(:span, I18n.l(value, format: :short))
15
- itooltip I18n.l(value), 'time'
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class DecimalHtml < Cell
8
- # @return [String]
9
- def render
10
- value || null
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class EmailHtml < Cell
8
- # @return [String]
9
- def render
10
- value.nil? ? null : mail_to(value)
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class FloatHtml < Cell
8
- # @return [String]
9
- def render
10
- value.try(:to_f) || null
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class HasAndBelongsToManyHtml < HasManyHtml
8
- end
9
- end
10
- end
11
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class HasManyHtml < Cell
8
- # @return [String]
9
- def render
10
- unique_collection = value.uniq
11
- concat raw unique_collection.first(2).map { |item| show_link item, options: { readonly: true } }.join(', ')
12
- if unique_collection.length > 2
13
- title = metadata[:label]
14
- body = unique_collection.map { |item| show_link item, options: { readonly: true } }.to_sentence.html_safe
15
- label = "#{unique_collection.length - 2} more"
16
- concat 'and'
17
- imodal title, body, label: label
18
- elsif unique_collection.blank?
19
- null
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class HasOneHtml < Cell
8
- # @return [String]
9
- def render
10
- value.present? ? show_link(value, options: { readonly: true }) : null
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class HstoreHtml < JsonHtml
8
- end
9
- end
10
- end
11
- end
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Wallaby
4
- module Resources
5
- module Index
6
- # Html cell
7
- class InetHtml < Cell
8
- # @return [String]
9
- def render
10
- if value.nil?
11
- null
12
- else
13
- concat content_tag(:code, value)
14
- link_to(
15
- fa_icon('link'), "http://ip-api.com/##{value}",
16
- target: :_blank, class: 'text-info'
17
- )
18
- end
19
- end
20
- end
21
- end
22
- end
23
- end