🐛 Better handling of components v2 in file builder

This commit is contained in:
Andrés Moya 2024-05-20 18:03:30 +02:00
parent 4b05ee35b8
commit 3bf76e8d0f
3 changed files with 24 additions and 12 deletions

View file

@ -249,9 +249,18 @@
(deleteObject [_ id]
(set! file (fb/delete-object file (uuid/uuid id))))
(getId [_]
(:id file))
(getCurrentPageId [_]
(:current-page-id file))
(asMap [_]
(clj->js file))
(newId [_]
(uuid/next))
(export [_]
(->> (export-file file)
(rx/subs!
@ -261,7 +270,8 @@
(dom/trigger-download (:name file) export-blob))))))))
(defn create-file-export [^string name]
(File. (fb/create-file name)))
(binding [cfeat/*current* cfeat/default-features]
(File. (fb/create-file name))))
(defn exports []
#js {:createFile create-file-export})