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-or-class
                {: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-control-parametersclj/s

(current-control-parameters
  {:com.fulcrologic.fulcro.ui-state-machines/keys [state-map] :as env})

Internal state machine helper. May be used by extensions to the stock state machine.

Internal state machine helper. May be used by extensions to the stock state machine.
sourceraw docstring

current-pageclj/s

(current-page report-instance)
(current-page state-map report-class-or-registry-key)

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)
(currently-selected-row state-map report-class-or-registry-key)

Returns the currently-selected row index, if any (-1 if nothing is selected).

Returns the currently-selected row index, if any (-1 if nothing is selected).
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-rowsclj/s

(filter-rows {:com.fulcrologic.fulcro.ui-state-machines/keys [state-map]
              :as uism-env})

Generates filtered rows, which is an intermediate cached value (not displayed). This function is used in the internal state machine, and may be useful when extending the pre-defined machine.

Generates filtered rows, which is an intermediate cached value (not displayed). This function is used in the
internal state machine, and may be useful when extending the pre-defined machine.
sourceraw docstring

filter-rows!clj/s

(filter-rows! this)
(filter-rows! app class-or-reg-key)

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)
(goto-page! app class-or-reg-key page-number)

Move to the next page (if there is one)

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

goto-page*clj/s

(goto-page* env page)

Internal state machine implementation. May be used by extensions to the stock state machine.

Internal state machine implementation. May be used by extensions to the stock state machine.
sourceraw docstring

handle-filter-eventclj/s

(handle-filter-event {:com.fulcrologic.fulcro.ui-state-machines/keys [app]
                      :as env})

Internal state machien implementation of handling :event/filter.

Internal state machien implementation of handling :event/filter.
sourceraw docstring

handle-resume-reportclj/s

(handle-resume-report
  {:com.fulcrologic.fulcro.ui-state-machines/keys [state-map] :as env})

Internal state machine implementation. Called on :event/resumt to do the steps to resume an already running report that has just been re-mounted.

Internal state machine implementation. Called on :event/resumt to do the steps to resume an already running report
that has just been re-mounted.
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)
(next-page! app class-or-reg-key)

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)
(page-count state-map report-class-or-registry-key)

Returns how many pages the current report has.

Returns how many pages the current report has.
sourceraw docstring

page-number-changedclj/s

(page-number-changed env)

Internal state machine helper. May be used by extensions. Sends a message to routing system that the page number changed.

Internal state machine helper. May be used by extensions.
Sends a message to routing system that the page number changed. 
sourceraw docstring

populate-current-pageclj/s

(populate-current-page uism-env)

Internal state machine implementation. May be used by extensions to the stock state machine.

Internal state machine implementation. May be used by extensions to the stock state machine.
sourceraw docstring

postprocess-pageclj/s

(postprocess-page uism-env)

Internal state machine helper.

Apply the user-defined UISM operation to the report state machine just after the current page has been populated. The :current-rows alias will have the result of filter/sort/paginate, and the report actor is :actor/report. See the definition of the report state machine for more information.

Internal state machine helper.

Apply the user-defined UISM operation to the report state machine just after the current page has
been populated. The :current-rows alias will have the result of filter/sort/paginate, and the
report actor is :actor/report. See the definition of the report state machine for more information.
sourceraw docstring

preprocess-raw-resultclj/s

(preprocess-raw-result uism-env)

Internal state machine implementation. May be used by extensions to the stock state machine. Apply the raw result transform, if it is defined.

Internal state machine implementation. May be used by extensions to the stock state machine.
Apply the raw result transform, if it is defined.
sourceraw docstring

prior-page!clj/s

(prior-page! this)
(prior-page! app class-or-reg-key)

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-identclj/s

(report-ident report-class-or-registry-key)

Returns the ident of a RAD report. The parameter can be a react instance, a class, or the registry key(word) of the report.

Returns the ident of a RAD report. The parameter can be a react instance, a class, or the registry key(word)
of the report.
sourceraw docstring

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

route-params-pathclj/s

(route-params-path env control-key)

Internal state machine helper. May be used by extensions to the stock state machine.

Internal state machine helper. May be used by extensions to the stock state machine.
sourceraw docstring

run-report!clj/s

(run-report! this)
(run-report! app-ish class-or-registry-key)

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)
(select-row! app class-or-reg-key idx)
source

set-parameter!clj/sdeprecated

[instance k v]

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

[instance k v]

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

sort-rowsclj/s

(sort-rows {:com.fulcrologic.fulcro.ui-state-machines/keys [state-map]
            :as uism-env})

Sorts the filtered rows. Input is the cached intermediate filtered rows, output is cached sorted rows (not visible). This function is used in the internal state machine, and may be useful when extending the pre-defined machine.

Sorts the filtered rows. Input is the cached intermediate filtered rows, output is cached sorted rows (not visible). This function is used in the
internal state machine, and may be useful when extending the pre-defined machine.
sourceraw docstring

sort-rows!clj/s

(sort-rows! this by-attribute)
(sort-rows! app class-or-reg-key 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