WIP: add pages list sidebar to workspace.

This commit is contained in:
Andrey Antukh 2015-12-15 15:41:11 +02:00
parent 3a387d8820
commit 7ceca619e0
2 changed files with 69 additions and 9 deletions

View file

@ -42,16 +42,16 @@
(str ":rum/cursored-" (:rum/id state)))
(def ^:private
deref-map-xform
(map (fn [[k v]] [k (if (satisfies? IDeref v) @v v)])))
deref-xform
(map (fn [x] (if (satisfies? IDeref x) @x x))))
(defn- deref-props
[data]
(into {} deref-map-xform data))
(into [] deref-xform data))
(defn- cursored-did-mount
[state]
(doseq [[k v] (:rum/props state)
(doseq [v (:rum/props state)
:when (satisfies? IWatchable v)]
(add-watch v (cursored-key state)
(fn [_ _ _ _]
@ -126,6 +126,10 @@
(fn [s f]
(throw (ex-info "Not implemented" {})))))
(defn getter
[f]
(l/lens f #(throw (ex-info "Not implemented" {}))))
(defn derive
[a path]
(l/focus-atom (l/in path) a))