Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sig/tiny_admin/actions/basic_action.rbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module TinyAdmin
module Actions
class BasicAction
include Utils

def attribute_options: (Array[untyped]?) -> Hash[untyped, untyped]?
end
end
Expand Down
4 changes: 2 additions & 2 deletions sig/tiny_admin/actions/index.rbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module TinyAdmin
module Actions
class Index
class Index < BasicAction
attr_reader context: untyped
attr_reader current_page: Integer
attr_reader fields_options: untyped
Expand All @@ -12,7 +12,7 @@ module TinyAdmin
attr_reader query_string: String
attr_reader repository: untyped

def call: (app: BasicApp, context: Context, options: Hash[Symbol, untyped]) -> void
def call: (app: BasicApp, context: Context, options: Hash[Symbol, untyped]) -> untyped

private

Expand Down
4 changes: 2 additions & 2 deletions sig/tiny_admin/actions/show.rbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module TinyAdmin
module Actions
class Show
def call: (app: BasicApp, context: Context, options: Hash[Symbol, untyped]) -> void
class Show < BasicAction
def call: (app: BasicApp, context: Context, options: Hash[Symbol, untyped]) -> untyped
end
end
end
4 changes: 2 additions & 2 deletions sig/tiny_admin/field.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module TinyAdmin
attr_reader title: String
attr_reader type: Symbol

def initialize: (name: String, title: String, type: Symbol, ?options: Hash[Symbol, String]) -> void
def initialize: (name: String, title: String, type: Symbol, ?options: Hash[Symbol, untyped]) -> void

def apply_call_option: (untyped) -> void
def apply_call_option: (untyped) -> untyped

def translate_value: (untyped) -> untyped

Expand Down
2 changes: 1 addition & 1 deletion sig/tiny_admin/plugins/active_record_repository.rbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module TinyAdmin
module Plugins
class ActiveRecordRepository
class ActiveRecordRepository < BaseRepository
def apply_filters: (untyped, Enumerable[untyped]) -> untyped

def collection: () -> untyped
Expand Down
3 changes: 2 additions & 1 deletion sig/tiny_admin/plugins/base_repository.rbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module TinyAdmin
module Plugins
class BaseRepository
RecordNotFound: untyped
class RecordNotFound < StandardError
end

attr_reader model: untyped

Expand Down
32 changes: 32 additions & 0 deletions sig/tiny_admin/settings.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,38 @@ module TinyAdmin

attr_reader store: Store

# Dynamically defined accessors for OPTIONS
def authentication: () -> untyped
def authentication=: (untyped) -> untyped
def authorization_class: () -> untyped
def authorization_class=: (untyped) -> untyped
def components: () -> untyped
def components=: (untyped) -> untyped
def content_page: () -> untyped
def content_page=: (untyped) -> untyped
def extra_styles: () -> untyped
def extra_styles=: (untyped) -> untyped
def helper_class: () -> untyped
def helper_class=: (untyped) -> untyped
def page_not_allowed: () -> untyped
def page_not_allowed=: (untyped) -> untyped
def page_not_found: () -> untyped
def page_not_found=: (untyped) -> untyped
def record_not_found: () -> untyped
def record_not_found=: (untyped) -> untyped
def repository: () -> untyped
def repository=: (untyped) -> untyped
def root: () -> untyped
def root=: (untyped) -> untyped
def root_path: () -> untyped
def root_path=: (untyped) -> untyped
def sections: () -> untyped
def sections=: (untyped) -> untyped
def scripts: () -> untyped
def scripts=: (untyped) -> untyped
def style_links: () -> untyped
def style_links=: (untyped) -> untyped

def []: (*String | Symbol) -> untyped

def []=: (*String | Symbol, untyped) -> untyped
Expand Down
2 changes: 2 additions & 0 deletions sig/tiny_admin/store.rbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module TinyAdmin
class Store
include Utils

attr_reader navbar: Array[Section?]
attr_reader pages: Hash[String, Hash[Symbol, untyped]]
attr_reader resources: Hash[String, Hash[Symbol, untyped]]
Expand Down
2 changes: 2 additions & 0 deletions sig/tiny_admin/views/basic_layout.rbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module TinyAdmin
module Views
class BasicLayout
include Utils

attr_accessor content: untyped
attr_accessor params: untyped
attr_accessor widgets: untyped
Expand Down
2 changes: 1 addition & 1 deletion sig/tiny_admin/views/default_layout.rbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module TinyAdmin
module Views
class DefaultLayout
class DefaultLayout < BasicLayout
attr_accessor flash_component: untyped?
attr_accessor head_component: untyped?
attr_accessor messages: Hash[Symbol, Array[String]?]?
Expand Down
9 changes: 9 additions & 0 deletions sig/tiny_admin/views/pages/content.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module TinyAdmin
module Views
module Pages
class Content < DefaultLayout
def view_template: () ?{ () -> void } -> void
end
end
end
end
11 changes: 11 additions & 0 deletions sig/tiny_admin/views/pages/page_not_allowed.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module TinyAdmin
module Views
module Pages
class PageNotAllowed < DefaultLayout
def view_template: () ?{ () -> void } -> void

def title: () -> String
end
end
end
end
11 changes: 11 additions & 0 deletions sig/tiny_admin/views/pages/page_not_found.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module TinyAdmin
module Views
module Pages
class PageNotFound < DefaultLayout
def view_template: () ?{ () -> void } -> void

def title: () -> String
end
end
end
end
11 changes: 11 additions & 0 deletions sig/tiny_admin/views/pages/record_not_found.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module TinyAdmin
module Views
module Pages
class RecordNotFound < DefaultLayout
def view_template: () ?{ () -> void } -> void

def title: () -> String
end
end
end
end
9 changes: 9 additions & 0 deletions sig/tiny_admin/views/pages/root.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module TinyAdmin
module Views
module Pages
class Root < DefaultLayout
def view_template: () ?{ () -> void } -> void
end
end
end
end
11 changes: 11 additions & 0 deletions sig/tiny_admin/views/pages/simple_auth_login.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module TinyAdmin
module Views
module Pages
class SimpleAuthLogin < DefaultLayout
def view_template: () ?{ () -> void } -> void

def title: () -> String
end
end
end
end
Loading