|
@@ -509,6 +509,7 @@
|
|
|
|
|
|
|
|
(if (or (not manual?) open?)
|
|
(if (or (not manual?) open?)
|
|
|
(ui/tippy {:ref *tippy-ref
|
|
(ui/tippy {:ref *tippy-ref
|
|
|
|
|
+ :in-editor? true
|
|
|
:html html-template
|
|
:html html-template
|
|
|
:interactive true
|
|
:interactive true
|
|
|
:delay [1000, 100]
|
|
:delay [1000, 100]
|
|
@@ -761,6 +762,7 @@
|
|
|
(db/get-block-and-children repo block-id)
|
|
(db/get-block-and-children repo block-id)
|
|
|
(assoc config :id (str id) :preview? true))]])
|
|
(assoc config :id (str id) :preview? true))]])
|
|
|
:interactive true
|
|
:interactive true
|
|
|
|
|
+ :in-editor? true
|
|
|
:delay [1000, 100]} inner)
|
|
:delay [1000, 100]} inner)
|
|
|
inner)])
|
|
inner)])
|
|
|
[:span.warning.mr-1 {:title "Block ref invalid"}
|
|
[:span.warning.mr-1 {:title "Block ref invalid"}
|
|
@@ -1056,7 +1058,8 @@
|
|
|
(when-not (string/blank? query)
|
|
(when-not (string/blank? query)
|
|
|
(custom-query (assoc config :dsl-query? true)
|
|
(custom-query (assoc config :dsl-query? true)
|
|
|
{:title (ui/tippy {:html commands/query-doc
|
|
{:title (ui/tippy {:html commands/query-doc
|
|
|
- :interactive true}
|
|
|
|
|
|
|
+ :interactive true
|
|
|
|
|
+ :in-editor? true}
|
|
|
[:span.font-medium.px-2.py-1.query-title.text-sm.rounded-md.shadow-xs
|
|
[:span.font-medium.px-2.py-1.query-title.text-sm.rounded-md.shadow-xs
|
|
|
(str "Query: " query)])
|
|
(str "Query: " query)])
|
|
|
:query query})))])
|
|
:query query})))])
|
|
@@ -1615,8 +1618,6 @@
|
|
|
[(str class " checked") true])]
|
|
[(str class " checked") true])]
|
|
|
(when class
|
|
(when class
|
|
|
(ui/checkbox {:class class
|
|
(ui/checkbox {:class class
|
|
|
- :style {:margin-top -2
|
|
|
|
|
- :margin-right 5}
|
|
|
|
|
:checked checked?
|
|
:checked checked?
|
|
|
:on-mouse-down (fn [e]
|
|
:on-mouse-down (fn [e]
|
|
|
(util/stop-propagation e))
|
|
(util/stop-propagation e))
|
|
@@ -1717,7 +1718,7 @@
|
|
|
html-export? (:html-export? config)
|
|
html-export? (:html-export? config)
|
|
|
checkbox (when (and (not pre-block?)
|
|
checkbox (when (and (not pre-block?)
|
|
|
(not html-export?))
|
|
(not html-export?))
|
|
|
- (block-checkbox t (str "mr-1 cursor")))
|
|
|
|
|
|
|
+ (block-checkbox t "mr-1 cursor"))
|
|
|
marker-switch (when (and (not pre-block?)
|
|
marker-switch (when (and (not pre-block?)
|
|
|
(not html-export?))
|
|
(not html-export?))
|
|
|
(marker-switch t))
|
|
(marker-switch t))
|
|
@@ -1734,7 +1735,7 @@
|
|
|
elem (if heading-level
|
|
elem (if heading-level
|
|
|
(keyword (str "h" heading-level
|
|
(keyword (str "h" heading-level
|
|
|
(when block-ref? ".inline")))
|
|
(when block-ref? ".inline")))
|
|
|
- :span.inline)]
|
|
|
|
|
|
|
+ :span.inline-flex.items-center)]
|
|
|
(->elem
|
|
(->elem
|
|
|
elem
|
|
elem
|
|
|
(merge
|
|
(merge
|
|
@@ -1981,6 +1982,7 @@
|
|
|
(for [clock (take 10 (reverse clocks))]
|
|
(for [clock (take 10 (reverse clocks))]
|
|
|
[:li clock])]])))
|
|
[:li clock])]])))
|
|
|
:interactive true
|
|
:interactive true
|
|
|
|
|
+ :in-editor? true
|
|
|
:delay [1000, 100]}
|
|
:delay [1000, 100]}
|
|
|
[:div.text-sm.time-spent.ml-1 {:style {:padding-top 3}}
|
|
[:div.text-sm.time-spent.ml-1 {:style {:padding-top 3}}
|
|
|
[:a.fade-link
|
|
[:a.fade-link
|
|
@@ -2715,7 +2717,7 @@
|
|
|
(state/remove-custom-query-component! query)
|
|
(state/remove-custom-query-component! query)
|
|
|
(db/remove-custom-query! (state/get-current-repo) query))
|
|
(db/remove-custom-query! (state/get-current-repo) query))
|
|
|
state)}
|
|
state)}
|
|
|
- [state config {:keys [title query view collapsed? children? breadcrumb-show?] :as q}]
|
|
|
|
|
|
|
+ [state config {:keys [title query view collapsed? children? breadcrumb-show? table-view?] :as q}]
|
|
|
(let [dsl-query? (:dsl-query? config)
|
|
(let [dsl-query? (:dsl-query? config)
|
|
|
query-atom (:query-atom state)
|
|
query-atom (:query-atom state)
|
|
|
current-block-uuid (or (:block/uuid (:block config))
|
|
current-block-uuid (or (:block/uuid (:block config))
|
|
@@ -2724,7 +2726,8 @@
|
|
|
;; exclude the current one, otherwise it'll loop forever
|
|
;; exclude the current one, otherwise it'll loop forever
|
|
|
remove-blocks (if current-block-uuid [current-block-uuid] nil)
|
|
remove-blocks (if current-block-uuid [current-block-uuid] nil)
|
|
|
query-result (and query-atom (rum/react query-atom))
|
|
query-result (and query-atom (rum/react query-atom))
|
|
|
- table? (or (get-in current-block [:block/properties :query-table])
|
|
|
|
|
|
|
+ table? (or table-view?
|
|
|
|
|
+ (get-in current-block [:block/properties :query-table])
|
|
|
(and (string? query) (string/ends-with? (string/trim query) "table")))
|
|
(and (string? query) (string/ends-with? (string/trim query) "table")))
|
|
|
transformed-query-result (when query-result
|
|
transformed-query-result (when query-result
|
|
|
(db/custom-query-result-transform query-result remove-blocks q))
|
|
(db/custom-query-result-transform query-result remove-blocks q))
|
|
@@ -2767,7 +2770,7 @@
|
|
|
(str (count transformed-query-result) " results")]]
|
|
(str (count transformed-query-result) " results")]]
|
|
|
(fn []
|
|
(fn []
|
|
|
[:div
|
|
[:div
|
|
|
- (when current-block
|
|
|
|
|
|
|
+ (when (and current-block (not view-f) (nil? table-view?))
|
|
|
[:div.flex.flex-row.align-items.mt-2 {:on-mouse-down (fn [e] (util/stop e))}
|
|
[:div.flex.flex-row.align-items.mt-2 {:on-mouse-down (fn [e] (util/stop e))}
|
|
|
(when-not page-list?
|
|
(when-not page-list?
|
|
|
[:div.flex.flex-row
|
|
[:div.flex.flex-row
|
|
@@ -3182,7 +3185,6 @@
|
|
|
*navigating-block (::navigating-block state)
|
|
*navigating-block (::navigating-block state)
|
|
|
navigating-block (rum/react *navigating-block)
|
|
navigating-block (rum/react *navigating-block)
|
|
|
navigating-block-entity (db/entity [:block/uuid navigating-block])
|
|
navigating-block-entity (db/entity [:block/uuid navigating-block])
|
|
|
- block (first blocks)
|
|
|
|
|
navigated? (and
|
|
navigated? (and
|
|
|
navigating-block
|
|
navigating-block
|
|
|
(not= (:db/id (:block/parent (::initial-block state)))
|
|
(not= (:db/id (:block/parent (::initial-block state)))
|