Class: HakumiComponents::Table::ColumnDefinition
- Inherits:
-
Object
- Object
- HakumiComponents::Table::ColumnDefinition
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/table/column_definition.rb
Constant Summary collapse
- ColumnKey =
T.type_alias { HakumiComponents::Table::DefinitionTypes::ColumnKey }
- WidthValue =
T.type_alias { HakumiComponents::Table::DefinitionTypes::WidthValue }
- SorterValue =
T.type_alias { HakumiComponents::Table::DefinitionTypes::SorterValue }
- FilterValues =
T.type_alias { T.nilable(HakumiComponents::Table::DefinitionTypes::ScalarList) }
- FilterSearchValue =
T.type_alias { HakumiComponents::Table::DefinitionTypes::SearchValue }
- SortValue =
T.type_alias { HakumiComponents::Table::DefinitionTypes::SortValue }
- EllipsisValue =
T.type_alias do T.nilable(T.any( HakumiComponents::Table::DefinitionTypes::DefinitionValue, HakumiComponents::Table::EllipsisConfig )) end
Instance Attribute Summary collapse
-
#align ⇒ Object
readonly
Returns the value of attribute align.
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#data_index ⇒ Object
readonly
Returns the value of attribute data_index.
-
#default_filtered_value ⇒ Object
readonly
Returns the value of attribute default_filtered_value.
-
#default_sort_order ⇒ Object
readonly
Returns the value of attribute default_sort_order.
-
#drag_handle ⇒ Object
readonly
Returns the value of attribute drag_handle.
-
#editable ⇒ Object
readonly
Returns the value of attribute editable.
-
#ellipsis ⇒ Object
readonly
Returns the value of attribute ellipsis.
-
#expand ⇒ Object
readonly
Returns the value of attribute expand.
-
#filter_mode ⇒ Object
readonly
Returns the value of attribute filter_mode.
-
#filter_multiple ⇒ Object
readonly
Returns the value of attribute filter_multiple.
-
#filter_search ⇒ Object
readonly
Returns the value of attribute filter_search.
-
#filtered_value ⇒ Object
readonly
Returns the value of attribute filtered_value.
-
#filters ⇒ Object
readonly
Returns the value of attribute filters.
-
#fixed ⇒ Object
readonly
Returns the value of attribute fixed.
-
#hidden ⇒ Object
readonly
Returns the value of attribute hidden.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#on_cell ⇒ Object
readonly
Returns the value of attribute on_cell.
-
#render ⇒ Object
readonly
Returns the value of attribute render.
-
#responsive ⇒ Object
readonly
Returns the value of attribute responsive.
-
#selection ⇒ Object
readonly
Returns the value of attribute selection.
-
#should_cell_update ⇒ Object
readonly
Returns the value of attribute should_cell_update.
-
#sort_directions ⇒ Object
readonly
Returns the value of attribute sort_directions.
-
#sort_order ⇒ Object
readonly
Returns the value of attribute sort_order.
-
#sort_value ⇒ Object
readonly
Returns the value of attribute sort_value.
-
#sorter ⇒ Object
readonly
Returns the value of attribute sorter.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
- #drag_handle? ⇒ Boolean
- #expand? ⇒ Boolean
-
#initialize(title:, key:, data_index: nil, align: nil, width: nil, ellipsis: nil, sorter: nil, sort_directions: nil, sort_order: nil, default_sort_order: nil, filters: nil, filter_multiple: true, filtered_value: nil, default_filtered_value: nil, filter_mode: nil, filter_search: nil, hidden: false, on_cell: nil, class_name: nil, responsive: nil, fixed: nil, editable: nil, should_cell_update: nil, drag_handle: false, selection: false, expand: false, render: nil, sort_value: nil, children: []) ⇒ ColumnDefinition
constructor
A new instance of ColumnDefinition.
- #selection? ⇒ Boolean
Constructor Details
#initialize(title:, key:, data_index: nil, align: nil, width: nil, ellipsis: nil, sorter: nil, sort_directions: nil, sort_order: nil, default_sort_order: nil, filters: nil, filter_multiple: true, filtered_value: nil, default_filtered_value: nil, filter_mode: nil, filter_search: nil, hidden: false, on_cell: nil, class_name: nil, responsive: nil, fixed: nil, editable: nil, should_cell_update: nil, drag_handle: false, selection: false, expand: false, render: nil, sort_value: nil, children: []) ⇒ ColumnDefinition
Returns a new instance of ColumnDefinition.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 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 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 55 def initialize( title:, key:, data_index: nil, align: nil, width: nil, ellipsis: nil, sorter: nil, sort_directions: nil, sort_order: nil, default_sort_order: nil, filters: nil, filter_multiple: true, filtered_value: nil, default_filtered_value: nil, filter_mode: nil, filter_search: nil, hidden: false, on_cell: nil, class_name: nil, responsive: nil, fixed: nil, editable: nil, should_cell_update: nil, drag_handle: false, selection: false, expand: false, render: nil, sort_value: nil, children: [] ) @title = T.let(title, HakumiComponents::Table::DefinitionTypes::DefinitionValue) @key = T.let(key, ColumnKey) @data_index = T.let(data_index, T.nilable(ColumnKey)) @align = T.let(align, T.nilable(Symbol)) @width = T.let(width, WidthValue) @ellipsis = T.let(ellipsis, EllipsisValue) @sorter = T.let(sorter, SorterValue) @sort_directions = T.let(sort_directions, T.nilable(T::Array[Symbol])) @sort_order = T.let(sort_order, T.nilable(Symbol)) @default_sort_order = T.let(default_sort_order, T.nilable(Symbol)) @filters = T.let(filters, T.nilable(T::Array[HakumiComponents::Table::DefinitionTypes::DefinitionHash])) @filter_multiple = T.let(filter_multiple, T::Boolean) @filtered_value = T.let(filtered_value, FilterValues) @default_filtered_value = T.let(default_filtered_value, FilterValues) @filter_mode = T.let(filter_mode, T.nilable(Symbol)) @filter_search = T.let(filter_search, FilterSearchValue) @hidden = T.let(hidden, T::Boolean) @on_cell = T.let(on_cell, T.nilable(Proc)) @class_name = T.let(class_name, T.nilable(String)) @responsive = T.let(responsive, T.nilable(T::Array[Symbol])) @fixed = T.let(fixed, T.nilable(Symbol)) @editable = T.let(editable, T.nilable(HakumiComponents::Table::Configs::ColumnEditable)) @should_cell_update = T.let(should_cell_update, T.nilable(String)) @drag_handle = T.let(drag_handle, T::Boolean) @selection = T.let(selection, T::Boolean) @expand = T.let(, T::Boolean) @render = T.let(render, T.nilable(Proc)) @sort_value = T.let(sort_value, SortValue) @children = T.let(children, T::Array[HakumiComponents::Table::ColumnDefinition]) end |
Instance Attribute Details
#align ⇒ Object (readonly)
Returns the value of attribute align.
133 134 135 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 133 def align @align end |
#children ⇒ Object (readonly)
Returns the value of attribute children.
163 164 165 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 163 def children @children end |
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
157 158 159 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 157 def class_name @class_name end |
#data_index ⇒ Object (readonly)
Returns the value of attribute data_index.
130 131 132 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 130 def data_index @data_index end |
#default_filtered_value ⇒ Object (readonly)
Returns the value of attribute default_filtered_value.
151 152 153 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 151 def default_filtered_value @default_filtered_value end |
#default_sort_order ⇒ Object (readonly)
Returns the value of attribute default_sort_order.
133 134 135 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 133 def default_sort_order @default_sort_order end |
#drag_handle ⇒ Object (readonly)
Returns the value of attribute drag_handle.
148 149 150 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 148 def drag_handle @drag_handle end |
#editable ⇒ Object (readonly)
Returns the value of attribute editable.
121 122 123 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 121 def editable @editable end |
#ellipsis ⇒ Object (readonly)
Returns the value of attribute ellipsis.
124 125 126 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 124 def ellipsis @ellipsis end |
#expand ⇒ Object (readonly)
Returns the value of attribute expand.
148 149 150 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 148 def @expand end |
#filter_mode ⇒ Object (readonly)
Returns the value of attribute filter_mode.
133 134 135 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 133 def filter_mode @filter_mode end |
#filter_multiple ⇒ Object (readonly)
Returns the value of attribute filter_multiple.
148 149 150 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 148 def filter_multiple @filter_multiple end |
#filter_search ⇒ Object (readonly)
Returns the value of attribute filter_search.
139 140 141 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 139 def filter_search @filter_search end |
#filtered_value ⇒ Object (readonly)
Returns the value of attribute filtered_value.
151 152 153 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 151 def filtered_value @filtered_value end |
#filters ⇒ Object (readonly)
Returns the value of attribute filters.
145 146 147 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 145 def filters @filters end |
#fixed ⇒ Object (readonly)
Returns the value of attribute fixed.
133 134 135 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 133 def fixed @fixed end |
#hidden ⇒ Object (readonly)
Returns the value of attribute hidden.
148 149 150 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 148 def hidden @hidden end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
127 128 129 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 127 def key @key end |
#on_cell ⇒ Object (readonly)
Returns the value of attribute on_cell.
154 155 156 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 154 def on_cell @on_cell end |
#render ⇒ Object (readonly)
Returns the value of attribute render.
154 155 156 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 154 def render @render end |
#responsive ⇒ Object (readonly)
Returns the value of attribute responsive.
142 143 144 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 142 def responsive @responsive end |
#selection ⇒ Object (readonly)
Returns the value of attribute selection.
148 149 150 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 148 def selection @selection end |
#should_cell_update ⇒ Object (readonly)
Returns the value of attribute should_cell_update.
157 158 159 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 157 def should_cell_update @should_cell_update end |
#sort_directions ⇒ Object (readonly)
Returns the value of attribute sort_directions.
142 143 144 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 142 def sort_directions @sort_directions end |
#sort_order ⇒ Object (readonly)
Returns the value of attribute sort_order.
133 134 135 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 133 def sort_order @sort_order end |
#sort_value ⇒ Object (readonly)
Returns the value of attribute sort_value.
160 161 162 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 160 def sort_value @sort_value end |
#sorter ⇒ Object (readonly)
Returns the value of attribute sorter.
139 140 141 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 139 def sorter @sorter end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
118 119 120 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 118 def title @title end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
136 137 138 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 136 def width @width end |
Instance Method Details
#drag_handle? ⇒ Boolean
176 177 178 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 176 def drag_handle? @drag_handle end |
#expand? ⇒ Boolean
171 172 173 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 171 def @expand end |
#selection? ⇒ Boolean
166 167 168 |
# File 'app/components/hakumi_components/table/column_definition.rb', line 166 def selection? @selection end |