Liking cljdoc? Tell your friends :D

com.fulcrologic.rad.report

Support for generated reports. Report rendering is pluggable, so reports can be quite varied. The general definition of a report is a component that loads data and displays it, possibly paginates, sorts and filters it, but for which interactions are done via custom mutations (disable, delete, sort) or reloads.

Reports can customize their layout via plugins, and the layout can then allow futher nested customization of element render. For example, it is trivial to create a layout renderer that is some kind of graph, and then use loaded data as the input for that display.

Customizing the report's state machine and possibly wrapping it with more complex layout controls makes it possible to create UI dashboards and much more complex application features.

Support for generated reports. Report rendering is pluggable, so reports can be quite varied. The general
definition of a report is a component that loads data and displays it, possibly paginates, sorts and
filters it, but for which interactions are done via custom mutations (disable, delete, sort) or reloads.

Reports can customize their layout via plugins, and the layout can then allow futher nested customization of element
render. For example, it is trivial to create a layout renderer that is some kind of graph, and then use loaded data
as the input for that display.

Customizing the report's state machine and possibly wrapping it with more complex layout controls makes it possible
to create UI dashboards and much more complex application features.
raw docstring

built-in-formatterclj/s

(built-in-formatter type style)
source

column-classesclj/s

(column-classes report-instance
                {:com.fulcrologic.rad.report/keys [column-class]
                 :com.fulcrologic.rad.attributes/keys [qualified-key]
                 :as attr})

Returns a string of column classes that can be defined on the attribute at ::report/column-class or on the report in the ::report/column-classes map. The report map overrides the attribute

Returns a string of column classes that can be defined on the attribute at ::report/column-class or on the
report in the ::report/column-classes map. The report map overrides the attribute
sourceraw docstring

control-rendererclj/s

(control-renderer report-instance)

Get the report controls renderer for the given report instance.

Get the report controls renderer for the given report instance.
sourceraw docstring

current-pageclj/s

(current-page report-instance)

Returns the current page number displayed on the report

Returns the current page number displayed on the report
sourceraw docstring

current-rowsclj/s

(current-rows report-instance)

Get a vector of the current rows that should be shown by the renderer (sorted/paginated/filtered). report-instance is available in the rendering env.

Get a vector of the current rows that should be shown by the renderer (sorted/paginated/filtered). `report-instance`
is available in the rendering `env`.
sourceraw docstring

currently-selected-rowclj/s

(currently-selected-row report-instance)

Returns the currently-selected row index, if any.

Returns the currently-selected row index, if any.
sourceraw docstring

default-compare-rowsclj/s

(default-compare-rows {:keys [sort-by ascending?]} a b)
source

defsc-reportclj/smacro

(defsc-report sym arglist & args)

Define a report. Just like defsc, but you do not specify query/ident/etc.

Instead, use report-options (aliased as ro below):

ro/columns ro/route ro/row-pk ro/source-attribute

If you elide the body, one will be generated for you.

Define a report. Just like defsc, but you do not specify query/ident/etc.

Instead, use report-options (aliased as ro below):

ro/columns
ro/route
ro/row-pk
ro/source-attribute

If you elide the body, one will be generated for you.
sourceraw docstring

filter-rows!clj/s

(filter-rows! this)

Update the filtered rows based on current report parameters.

Update the filtered rows based on current report parameters.
sourceraw docstring

(form-link report-instance row-props column-key)

Get the form link info for a given (column) key.

Returns nil if there is no link info, otherwise returns:

{:edit-form FormClass
 :entity-id id-of-entity-to-edit}
Get the form link info for a given (column) key.

Returns nil if there is no link info, otherwise returns:

```
{:edit-form FormClass
 :entity-id id-of-entity-to-edit}
```
sourceraw docstring

formatted-column-valueclj/s

(formatted-column-value report-instance
                        row-props
                        {:com.fulcrologic.rad.report/keys
                           [field-formatter column-formatter column-styles]
                         :com.fulcrologic.rad.attributes/keys [qualified-key
                                                               type style]
                         :as column-attribute})

Given a report instance, a row of props, and a column attribute for that report: returns the formatted value of that column using the field formatter(s) defined on the column attribute or report. If no formatter is provided a default formatter will be used.

Given a report instance, a row of props, and a column attribute for that report:
returns the formatted value of that column using the field formatter(s) defined
on the column attribute or report. If no formatter is provided a default formatter
will be used.
sourceraw docstring

global-eventsclj/s

source

goto-page!clj/s

(goto-page! this page-number)

Move to the next page (if there is one)

Move to the next page (if there is one)
sourceraw docstring

initial-sort-paramsclj/s

(initial-sort-params env)
source

initialize-parametersclj/s

(initialize-parameters
  {:com.fulcrologic.fulcro.ui-state-machines/keys [app event-data] :as env})
source

install-formatter!clj/s

(install-formatter! app type style formatter)

Install a formatter for the given data type and style. The data type must match a supported data type of attributes, and the style can either be :default or a user-defined keyword the represents the style you want to support. Some common styles have predefined support, such as :USD for US Dollars.

This should be called before mounting your app.

Ex.:

(install-formatter! app :boolean :default (fn [report-instance value] (if value "yes" "no")))
Install a formatter for the given data type and style. The data type must match a supported data type
of attributes, and the style can either be `:default` or a user-defined keyword the represents the
style you want to support. Some common styles have predefined support, such as `:USD` for US Dollars.

This should be called before mounting your app.

Ex.:

```clojure
(install-formatter! app :boolean :default (fn [report-instance value] (if value "yes" "no")))
```
sourceraw docstring

(link report-instance row-props column-key)

Get a regular lambda link for a given (column) key.

Returns nil if there is no link info, otherwise returns:

{:edit-form FormClass
 :entity-id id-of-entity-to-edit}
Get a regular lambda link for a given (column) key.

Returns nil if there is no link info, otherwise returns:

```
{:edit-form FormClass
 :entity-id id-of-entity-to-edit}
```
sourceraw docstring

load-report!clj/s

(load-report! env)
source

loading?clj/s

(loading? report-instance)

Returns true if the given report instance has an active network load in progress.

Returns true if the given report instance has an active network load in progress.
sourceraw docstring

next-page!clj/s

(next-page! this)

Move to the next page (if there is one)

Move to the next page (if there is one)
sourceraw docstring

page-countclj/s

(page-count report-instance)

Returns how many pages the current report has.

Returns how many pages the current report has.
sourceraw docstring

prior-page!clj/s

(prior-page! this)

Move to the next page (if there is one)

Move to the next page (if there is one)
sourceraw docstring

reload!clj/sdeprecated

Alias to control/run!. Runs the report.

Alias to `control/run!`. Runs the report.
sourceraw docstring

render-layoutclj/s

(render-layout report-instance)
source

render-rowclj/s

(render-row report-instance row-class row-props)
source

report-machineclj/s

source

report-optionsclj/s

(report-options uism-env & k-or-ks)

Returns the report options from the current report actor.

Returns the report options from the current report actor.
sourceraw docstring

report-will-enterclj/s

(report-will-enter app route-params report-class)
source

req!clj

(req! env sym options k)
(req! env sym options k pred?)
source

rotate-resultclj/s

(rotate-result report-class grouped-result)

Given a report class that has columns, and a raw result grouped by those columns: returns a vector of rows that rotate the grouped result into a normal report shape.

Given a report class that has columns, and a raw result grouped by those columns: returns a vector of rows that
rotate the grouped result into a normal report shape.
sourceraw docstring

run-report!clj/s

(run-report! this)

Run a report with the current parameters

Run a report with the current parameters
sourceraw docstring

select-row!clj/s

(select-row! report-instance idx)
source

set-parameter!clj/sdeprecated

Alias to control/set-parameter!. Set the given parameter value on the report. Usually used internally by controls.

Alias to `control/set-parameter!`. Set the given parameter value on the report. Usually used internally by controls.
sourceraw docstring

sort-rows!clj/s

(sort-rows! this by-attribute)

Sort the report by the given attribute. Changes direction if the report is already sorted by that attribute. The implementation of sorting is built-in and uses compare, but you can override how sorting works by defining ::report/sort-rows on your report.

Sort the report by the given attribute. Changes direction if the report is already sorted by that attribute. The implementation
of sorting is built-in and uses compare, but you can override how sorting works by defining `::report/sort-rows` on your report.
sourceraw docstring

start-report!clj/s

(start-report! app report-class)
(start-report! app report-class options)

Start a report. Not normally needed, since a report is started when it is routed to; however, if you put a report on-screen initially (or don't use dynamic router), then you must call this to start your report.

options can contain ::id, which will cause an instance of the report to be started. Used by containers so that multiple instances of the same report can co-exist with different views on the same screen.

Start a report. Not normally needed, since a report is started when it is routed to; however, if you put
a report on-screen initially (or don't use dynamic router), then you must call this to start your report.

`options` can contain `::id`, which will cause an instance of the report to be started. Used by containers so that
multiple instances of the same report can co-exist with different views on the same screen.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close