Liking cljdoc? Tell your friends :D

wagoe.audience.core.ui

Pure Hiccup UI components for audience segments. No I/O, no side effects.

Pure Hiccup UI components for audience segments.
No I/O, no side effects.
raw docstring

builder-layoutclj

(builder-layout {:keys [segment edit? error csrf-token]})

Page layout for the audience builder.

Renders a form with:

  • Id (new segments only), name and description fields
  • Placeholder divs for the Replicant filter panel and composition builder
  • Placeholder for live preview
  • Hidden inputs for the serialized filters and composition

Args: opts - map with optional keys :segment - AudienceDefinition whose values fill the form :edit? - post to the segment's update route rather than create :error - message shown above the form :csrf-token - the request's anti-forgery token

Returns: Hiccup [:div ...] element

Page layout for the audience builder.

Renders a form with:
  - Id (new segments only), name and description fields
  - Placeholder divs for the Replicant filter panel and composition builder
  - Placeholder for live preview
  - Hidden inputs for the serialized filters and composition

Args:
  opts - map with optional keys
         :segment    - AudienceDefinition whose values fill the form
         :edit?      - post to the segment's update route rather than create
         :error      - message shown above the form
         :csrf-token - the request's anti-forgery token

Returns:
  Hiccup [:div ...] element
sourceraw docstring

filter-badgeclj

(filter-badge {:keys [type field op value]})

Renders a single filter as a compact badge.

Args: filter-map - map with :type :field :op :value

Returns: Hiccup [:span ...] element

Renders a single filter as a compact badge.

Args:
  filter-map - map with :type :field :op :value

Returns:
  Hiccup [:span ...] element
sourceraw docstring

segment-cardclj

(segment-card {:keys [label description filters member-count cached-at]})

Renders a segment as a card.

Args: segment - AudienceDefinition map with :id :label :description :filters :member-count :cached-at

Returns: Hiccup [:div.rounded-lg ...] element

Renders a segment as a card.

Args:
  segment - AudienceDefinition map with :id :label :description :filters
            :member-count :cached-at

Returns:
  Hiccup [:div.rounded-lg ...] element
sourceraw docstring

segment-listclj

(segment-list segments)

Renders a list of segment cards.

Args: segments - seq of AudienceDefinition maps

Returns: Hiccup [:div.space-y-4 ...] element

Renders a list of segment cards.

Args:
  segments - seq of AudienceDefinition maps

Returns:
  Hiccup [:div.space-y-4 ...] element
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close