class
Components::Examples::DataTableComponent
- Components::Examples::DataTableComponent
- Components::StatelessComponent
- Components::Component
- Reference
- Object
Defined in:
components/examples/data_table_component.crConstructors
Class Method Summary
Instance Method Summary
-
#render_content : String
Legacy abstract-contract satisfier (docs/SAFE_HTML_V1.md): the real implementation lives in
#render_safe_contentabove. -
#render_safe_content : SafeHTML
SafeHTML v1 exemplar migration (docs/SAFE_HTML_V1.md) — this used to be a
String.build+ nine hand-placedescape_html(...)calls (one per interpolated sink: id, caption, each row's id/title/owner/status/ amount, and the aria-label).
Instance methods inherited from class Components::StatelessComponent
==(other : self) : Bool
==,
cache_key : String
cache_key,
cacheable? : Bool
cacheable?
Instance methods inherited from module Components::Cache::Cacheable
cache(expires_in : Time::Span | Nil = nil, &block : -> String) : String
cache,
cache_with_dependencies(dependencies : Array(Cacheable), expires_in : Time::Span | Nil = nil, &block : -> String) : String
cache_with_dependencies,
invalidate_cache : Nil
invalidate_cache,
touch_cache : Nil
touch_cache,
warm_cache(expires_in : Time::Span | Nil = nil) : String
warm_cache
Class methods inherited from module Components::Cache::Cacheable
cache_enabled
cache_enabled,
cache_enabled=(value : Bool)
cache_enabled=,
cache_store
cache_store,
cache_store=(value : CacheStore | Nil)
cache_store=,
default_expires_in
default_expires_in,
default_expires_in=(value : Time::Span | Nil)
default_expires_in=
Macros inherited from module Components::Cache::Cacheable
cache_fragment(key, expires_in = nil)
cache_fragment
Instance methods inherited from class Components::Component
<<(child : Component | Elements::HTMLElement | String | Elements::RawHTML) : self
<<,
[](name : String) : String | Nil
[],
[]=(name : String, value : String) : String
[]=,
add_children(*children : Component | Elements::HTMLElement | String | Elements::RawHTML) : self
add_children,
attributes : Hash(String, String)
attributes,
build(&block : self -> Nil) : self
build,
children : Array(Component | Elements::HTMLElement | String | Elements::RawHTML)
children,
component_id : String
component_id,
render : SafeHTML
render,
render_content : String
render_content,
render_safe_content : SafeHTML
render_safe_content,
to_raw_html : Elements::RawHTML
to_raw_html,
to_s(io : IO) : Nil
to_s
Constructor methods inherited from class Components::Component
new(**attrs)
new
Macros inherited from class Components::Component
component_css(css_string)
component_css
Constructor Detail
Class Method Detail
Instance Method Detail
Legacy abstract-contract satisfier (docs/SAFE_HTML_V1.md): the real
implementation lives in #render_safe_content above. Kept as a thin
delegation so Component#render_content : String (still required by
the base class for un-migrated components) stays satisfied.
SafeHTML v1 exemplar migration (docs/SAFE_HTML_V1.md) — this used to
be a String.build + nine hand-placed escape_html(...) calls (one
per interpolated sink: id, caption, each row's id/title/owner/status/
amount, and the aria-label). Every one of those was a place a future
edit could add a tenth field and forget the wrap — the exact failure
class the hardening proposal documents (Stage-5 stored XSS: a single
missed sink). Built via the Elements DSL instead: every text child
and attribute value below is escaped by construction
(ContainerElement#render_children / HTMLElement#render_attributes),
not by author discipline — there is no sink left to miss.