|
@@ -15,7 +15,6 @@
|
|
|
[frontend.handler.property :as property-handler]
|
|
[frontend.handler.property :as property-handler]
|
|
|
[frontend.handler.page :as page-handler]
|
|
[frontend.handler.page :as page-handler]
|
|
|
[frontend.modules.shortcut.core :as shortcut]
|
|
[frontend.modules.shortcut.core :as shortcut]
|
|
|
- [frontend.search :as search]
|
|
|
|
|
[frontend.state :as state]
|
|
[frontend.state :as state]
|
|
|
[frontend.ui :as ui]
|
|
[frontend.ui :as ui]
|
|
|
[frontend.util :as util]
|
|
[frontend.util :as util]
|
|
@@ -42,7 +41,7 @@
|
|
|
(:block/uuid page))))))
|
|
(:block/uuid page))))))
|
|
|
|
|
|
|
|
(rum/defc class-select
|
|
(rum/defc class-select
|
|
|
- [*property-schema schema-classes {:keys [multiple-choices? save-property-fn]
|
|
|
|
|
|
|
+ [*property-schema schema-classes {:keys [multiple-choices? save-property-fn disabled?]
|
|
|
:or {multiple-choices? true}}]
|
|
:or {multiple-choices? true}}]
|
|
|
[:div.flex.flex-1.col-span-3
|
|
[:div.flex.flex-1.col-span-3
|
|
|
(let [content-fn
|
|
(let [content-fn
|
|
@@ -93,7 +92,9 @@
|
|
|
(select/select opts)))]
|
|
(select/select opts)))]
|
|
|
|
|
|
|
|
[:div.flex.flex-1.cursor-pointer
|
|
[:div.flex.flex-1.cursor-pointer
|
|
|
- {:on-click #(shui/popup-show! (.-target %) content-fn)}
|
|
|
|
|
|
|
+ {:on-click (if disabled?
|
|
|
|
|
+ (constantly nil)
|
|
|
|
|
+ #(shui/popup-show! (.-target %) content-fn))}
|
|
|
(if (seq schema-classes)
|
|
(if (seq schema-classes)
|
|
|
[:div.flex.flex-1.flex-row.items-center.flex-wrap.gap-2
|
|
[:div.flex.flex-1.flex-row.items-center.flex-wrap.gap-2
|
|
|
(for [class schema-classes]
|
|
(for [class schema-classes]
|
|
@@ -127,27 +128,27 @@
|
|
|
|
|
|
|
|
(rum/defc schema-type <
|
|
(rum/defc schema-type <
|
|
|
shortcut/disable-all-shortcuts
|
|
shortcut/disable-all-shortcuts
|
|
|
- [property {:keys [*property-name *property-schema built-in-property? disabled?
|
|
|
|
|
|
|
+ [property {:keys [*property-name *property-schema built-in? disabled?
|
|
|
show-type-change-hints? in-block-container? block *show-new-property-config?
|
|
show-type-change-hints? in-block-container? block *show-new-property-config?
|
|
|
default-open?]}]
|
|
default-open?]}]
|
|
|
(let [property-name (or (and *property-name @*property-name) (:block/original-name property))
|
|
(let [property-name (or (and *property-name @*property-name) (:block/original-name property))
|
|
|
property-schema (or (and *property-schema @*property-schema) (:block/schema property))
|
|
property-schema (or (and *property-schema @*property-schema) (:block/schema property))
|
|
|
schema-types (->> (concat db-property-type/user-built-in-property-types
|
|
schema-types (->> (concat db-property-type/user-built-in-property-types
|
|
|
- (when built-in-property?
|
|
|
|
|
|
|
+ (when built-in?
|
|
|
db-property-type/internal-built-in-property-types))
|
|
db-property-type/internal-built-in-property-types))
|
|
|
(map (fn [type]
|
|
(map (fn [type]
|
|
|
{:label (property-type-label type)
|
|
{:label (property-type-label type)
|
|
|
- :disabled disabled?
|
|
|
|
|
- :value type
|
|
|
|
|
- :selected (= type (:type property-schema))})))]
|
|
|
|
|
|
|
+ :value type})))]
|
|
|
[:div {:class (if in-block-container? "flex flex-1" "flex items-center col-span-2")}
|
|
[:div {:class (if in-block-container? "flex flex-1" "flex items-center col-span-2")}
|
|
|
(shui/select
|
|
(shui/select
|
|
|
- {:default-open (boolean default-open?)
|
|
|
|
|
- :on-value-change
|
|
|
|
|
- (fn [v]
|
|
|
|
|
- (let [type (keyword (string/lower-case v))
|
|
|
|
|
- update-schema-fn (apply comp
|
|
|
|
|
- #(assoc % :type type)
|
|
|
|
|
|
|
+ (cond->
|
|
|
|
|
+ {:default-open (boolean default-open?)
|
|
|
|
|
+ :disabled disabled?
|
|
|
|
|
+ :on-value-change
|
|
|
|
|
+ (fn [v]
|
|
|
|
|
+ (let [type (keyword (string/lower-case v))
|
|
|
|
|
+ update-schema-fn (apply comp
|
|
|
|
|
+ #(assoc % :type type)
|
|
|
;; always delete previous closed values as they
|
|
;; always delete previous closed values as they
|
|
|
;; are not valid for the new type
|
|
;; are not valid for the new type
|
|
|
#(dissoc % :values)
|
|
#(dissoc % :values)
|
|
@@ -164,7 +165,8 @@
|
|
|
(p/do!
|
|
(p/do!
|
|
|
(when block
|
|
(when block
|
|
|
(pv/exit-edit-property))
|
|
(pv/exit-edit-property))
|
|
|
- (reset! *show-new-property-config? false)
|
|
|
|
|
|
|
+ (when *show-new-property-config?
|
|
|
|
|
+ (reset! *show-new-property-config? false))
|
|
|
(components-pu/update-property! property property-name schema)
|
|
(components-pu/update-property! property property-name schema)
|
|
|
(when block
|
|
(when block
|
|
|
(let [id (str "ls-property-" (:db/id block) "-" (:db/id property) "-editor")]
|
|
(let [id (str "ls-property-" (:db/id block) "-" (:db/id property) "-editor")]
|
|
@@ -179,15 +181,15 @@
|
|
|
{:placeholder "Select a schema type"}))
|
|
{:placeholder "Select a schema type"}))
|
|
|
(shui/select-content
|
|
(shui/select-content
|
|
|
(shui/select-group
|
|
(shui/select-group
|
|
|
- (for [{:keys [label value disabled]} schema-types]
|
|
|
|
|
- (shui/select-item {:value value :disabled disabled} label)))))
|
|
|
|
|
|
|
+ (for [{:keys [label value]} schema-types]
|
|
|
|
|
+ (shui/select-item {:value value} label)))))
|
|
|
|
|
|
|
|
(when show-type-change-hints?
|
|
(when show-type-change-hints?
|
|
|
(ui/tippy {:html "Changing the property type clears some property configurations."
|
|
(ui/tippy {:html "Changing the property type clears some property configurations."
|
|
|
:class "tippy-hover ml-2"
|
|
:class "tippy-hover ml-2"
|
|
|
:interactive true
|
|
:interactive true
|
|
|
:disabled false}
|
|
:disabled false}
|
|
|
- (svg/info)))]))
|
|
|
|
|
|
|
+ (svg/info))))]))
|
|
|
|
|
|
|
|
(rum/defcs ^:large-vars/cleanup-todo property-config
|
|
(rum/defcs ^:large-vars/cleanup-todo property-config
|
|
|
"All changes to a property must update the db and the *property-schema. Failure to do
|
|
"All changes to a property must update the db and the *property-schema. Failure to do
|
|
@@ -215,12 +217,11 @@
|
|
|
(when-let [*show-property-config? (:*show-new-property-config? (last (:rum/args state)))]
|
|
(when-let [*show-property-config? (:*show-new-property-config? (last (:rum/args state)))]
|
|
|
(reset! *show-property-config? false))
|
|
(reset! *show-property-config? false))
|
|
|
state)}
|
|
state)}
|
|
|
- [state property {:keys [inline-text add-new-property? _*show-new-property-config?] :as opts}]
|
|
|
|
|
|
|
+ [state property {:keys [inline-text add-new-property?] :as opts}]
|
|
|
(let [values (rum/react (::values state))]
|
|
(let [values (rum/react (::values state))]
|
|
|
(when-not (= :loading values)
|
|
(when-not (= :loading values)
|
|
|
(let [*property-name (::property-name state)
|
|
(let [*property-name (::property-name state)
|
|
|
*property-schema (::property-schema state)
|
|
*property-schema (::property-schema state)
|
|
|
- built-in-property? (contains? db-property/built-in-properties-keys-str (:block/original-name property))
|
|
|
|
|
property (db/sub-block (:db/id property))
|
|
property (db/sub-block (:db/id property))
|
|
|
built-in? (ldb/built-in? property)
|
|
built-in? (ldb/built-in? property)
|
|
|
disabled? (or built-in? config/publishing?)
|
|
disabled? (or built-in? config/publishing?)
|
|
@@ -275,7 +276,7 @@
|
|
|
(svg/help-circle))]
|
|
(svg/help-circle))]
|
|
|
(schema-type property {:*property-name *property-name
|
|
(schema-type property {:*property-name *property-name
|
|
|
:*property-schema *property-schema
|
|
:*property-schema *property-schema
|
|
|
- :built-in-property? built-in-property?
|
|
|
|
|
|
|
+ :built-in? built-in?
|
|
|
:disabled? disabled?
|
|
:disabled? disabled?
|
|
|
:show-type-change-hints? true}))]
|
|
:show-type-change-hints? true}))]
|
|
|
|
|
|
|
@@ -364,18 +365,21 @@
|
|
|
(swap! *property-schema assoc :hide? (not hide?))
|
|
(swap! *property-schema assoc :hide? (not hide?))
|
|
|
(save-property-fn))})])
|
|
(save-property-fn))})])
|
|
|
|
|
|
|
|
- [:div.grid.grid-cols-4.gap-1.items-start.leading-8
|
|
|
|
|
- [:label "Description:"]
|
|
|
|
|
- [:div.col-span-3
|
|
|
|
|
- (if (and disabled? inline-text)
|
|
|
|
|
- (inline-text {} :markdown (:description @*property-schema))
|
|
|
|
|
- [:div.mt-1
|
|
|
|
|
- (shui/textarea
|
|
|
|
|
- {:on-change (fn [e]
|
|
|
|
|
- (swap! *property-schema assoc :description (util/evalue e)))
|
|
|
|
|
- :on-blur save-property-fn
|
|
|
|
|
- :disabled disabled?
|
|
|
|
|
- :default-value (:description @*property-schema)})])]]]]))))
|
|
|
|
|
|
|
+ (let [description (:description @*property-schema)]
|
|
|
|
|
+ (when (or (not disabled?)
|
|
|
|
|
+ (and disabled? (not (string/blank? description))))
|
|
|
|
|
+ [:div.grid.grid-cols-4.gap-1.items-start.leading-8
|
|
|
|
|
+ [:label "Description:"]
|
|
|
|
|
+ [:div.col-span-3
|
|
|
|
|
+ (if (and disabled? inline-text)
|
|
|
|
|
+ (inline-text {} :markdown description)
|
|
|
|
|
+ [:div.mt-1
|
|
|
|
|
+ (shui/textarea
|
|
|
|
|
+ {:on-change (fn [e]
|
|
|
|
|
+ (swap! *property-schema assoc :description (util/evalue e)))
|
|
|
|
|
+ :on-blur save-property-fn
|
|
|
|
|
+ :disabled disabled?
|
|
|
|
|
+ :default-value description})])]]))]]))))
|
|
|
|
|
|
|
|
(defn- get-property-from-db [name]
|
|
(defn- get-property-from-db [name]
|
|
|
(when-not (string/blank? name)
|
|
(when-not (string/blank? name)
|
|
@@ -388,15 +392,16 @@
|
|
|
(let [repo (state/get-current-repo)]
|
|
(let [repo (state/get-current-repo)]
|
|
|
;; existing property selected or entered
|
|
;; existing property selected or entered
|
|
|
(if-let [property (get-property-from-db property-name)]
|
|
(if-let [property (get-property-from-db property-name)]
|
|
|
- (if (contains? db-property/hidden-built-in-properties (keyword property-name))
|
|
|
|
|
- (do (notification/show! "This is a built-in property that can't be used." :error)
|
|
|
|
|
|
|
+ (if (and (not (get-in property [:block/schema :public?]))
|
|
|
|
|
+ (ldb/built-in? property))
|
|
|
|
|
+ (do (notification/show! "This is a private built-in property that can't be used." :error)
|
|
|
(pv/exit-edit-property))
|
|
(pv/exit-edit-property))
|
|
|
;; Both conditions necessary so that a class can add its own page properties
|
|
;; Both conditions necessary so that a class can add its own page properties
|
|
|
(when (and (contains? (:block/type entity) "class") class-schema?)
|
|
(when (and (contains? (:block/type entity) "class") class-schema?)
|
|
|
- (pv/<add-property! entity (:db/ident property) "" {:class-schema? class-schema?
|
|
|
|
|
- ;; Only enter property names from sub-modal as inputting
|
|
|
|
|
- ;; property values is buggy in sub-modal
|
|
|
|
|
- :exit-edit? page-configure?})))
|
|
|
|
|
|
|
+ (pv/<add-property! entity property-name "" {:class-schema? class-schema?
|
|
|
|
|
+ ;; Only enter property names from sub-modal as inputting
|
|
|
|
|
+ ;; property values is buggy in sub-modal
|
|
|
|
|
+ :exit-edit? page-configure?})))
|
|
|
;; new property entered
|
|
;; new property entered
|
|
|
(if (db-property/valid-property-name? property-name)
|
|
(if (db-property/valid-property-name? property-name)
|
|
|
(if (and (contains? (:block/type entity) "class") page-configure?)
|
|
(if (and (contains? (:block/type entity) "class") page-configure?)
|
|
@@ -409,11 +414,17 @@
|
|
|
|
|
|
|
|
(rum/defc property-select
|
|
(rum/defc property-select
|
|
|
[exclude-properties on-chosen input-opts]
|
|
[exclude-properties on-chosen input-opts]
|
|
|
- (let [[properties set-properties!] (rum/use-state nil)]
|
|
|
|
|
|
|
+ (let [[properties set-properties!] (rum/use-state nil)
|
|
|
|
|
+ [excluded-properties set-excluded-properties!] (rum/use-state nil)]
|
|
|
(rum/use-effect!
|
|
(rum/use-effect!
|
|
|
(fn []
|
|
(fn []
|
|
|
- (p/let [properties (search/get-all-properties)]
|
|
|
|
|
- (set-properties! (remove exclude-properties properties))))
|
|
|
|
|
|
|
+ (p/let [properties (db-async/<db-based-get-all-properties (state/get-current-repo))]
|
|
|
|
|
+ (set-properties! (map :block/original-name (remove exclude-properties properties)))
|
|
|
|
|
+ (set-excluded-properties! (->> properties
|
|
|
|
|
+ (filter exclude-properties)
|
|
|
|
|
+ ;; lower case b/c of case insensitive name lookups
|
|
|
|
|
+ (map (comp string/lower-case :block/original-name))
|
|
|
|
|
+ set))))
|
|
|
[])
|
|
[])
|
|
|
[:div.ls-property-add.flex.flex-row.items-center
|
|
[:div.ls-property-add.flex.flex-row.items-center
|
|
|
[:span.bullet-container.cursor [:span.bullet]]
|
|
[:span.bullet-container.cursor [:span.bullet]]
|
|
@@ -423,7 +434,7 @@
|
|
|
:dropdown? true
|
|
:dropdown? true
|
|
|
:close-modal? false
|
|
:close-modal? false
|
|
|
:show-new-when-not-exact-match? true
|
|
:show-new-when-not-exact-match? true
|
|
|
- :exact-match-exclude-items exclude-properties
|
|
|
|
|
|
|
+ :exact-match-exclude-items (fn [s] (contains? excluded-properties (string/lower-case s)))
|
|
|
:input-default-placeholder "Add property"
|
|
:input-default-placeholder "Add property"
|
|
|
:on-chosen on-chosen
|
|
:on-chosen on-chosen
|
|
|
:input-opts input-opts})]]))
|
|
:input-opts input-opts})]]))
|
|
@@ -435,23 +446,23 @@
|
|
|
(reset! *property-key nil))
|
|
(reset! *property-key nil))
|
|
|
state)}
|
|
state)}
|
|
|
shortcut/disable-all-shortcuts
|
|
shortcut/disable-all-shortcuts
|
|
|
- [state entity *property-key *property-value {:keys [class-schema? _page-configure? in-block-container?]
|
|
|
|
|
|
|
+ [state entity *property-key *property-value {:keys [class-schema? in-block-container? page?]
|
|
|
:as opts}]
|
|
:as opts}]
|
|
|
(let [*show-new-property-config? (::show-new-property-config? state)
|
|
(let [*show-new-property-config? (::show-new-property-config? state)
|
|
|
entity-properties (->> (keys (:block/properties entity))
|
|
entity-properties (->> (keys (:block/properties entity))
|
|
|
(map #(:block/original-name (db/entity %)))
|
|
(map #(:block/original-name (db/entity %)))
|
|
|
(remove nil?)
|
|
(remove nil?)
|
|
|
(set))
|
|
(set))
|
|
|
- existing-tag-alias (reduce (fn [acc prop]
|
|
|
|
|
- (if (seq (get entity (get-in db-property/built-in-properties [prop :attribute])))
|
|
|
|
|
- (if-let [name (get-in db-property/built-in-properties [prop :original-name])]
|
|
|
|
|
- (conj acc name)
|
|
|
|
|
- acc)
|
|
|
|
|
- acc))
|
|
|
|
|
- #{}
|
|
|
|
|
- [:tags :alias])
|
|
|
|
|
- exclude-properties* (set/union entity-properties existing-tag-alias)
|
|
|
|
|
- exclude-properties (set/union exclude-properties* (set (map string/lower-case exclude-properties*)))]
|
|
|
|
|
|
|
+ existing-tag-alias (->> [:block/tags :block/alias]
|
|
|
|
|
+ (map db-property/built-in-properties)
|
|
|
|
|
+ (keep #(when (get entity (:attribute %)) (:original-name %)))
|
|
|
|
|
+ set)
|
|
|
|
|
+ exclude-property-names (set/union entity-properties existing-tag-alias)
|
|
|
|
|
+ exclude-properties (fn [m]
|
|
|
|
|
+ (or (contains? exclude-property-names (:block/original-name m))
|
|
|
|
|
+ ;; Filters out properties from being in wrong :view-context
|
|
|
|
|
+ (and in-block-container? (= :page (get-in m [:block/schema :view-context])))
|
|
|
|
|
+ (and page? (= :block (get-in m [:block/schema :view-context])))))]
|
|
|
[:div.ls-property-input.flex.flex-1.flex-row.items-center.flex-wrap.gap-1
|
|
[:div.ls-property-input.flex.flex-1.flex-row.items-center.flex-wrap.gap-1
|
|
|
(if in-block-container? {:style {:padding-left 22}} {})
|
|
(if in-block-container? {:style {:padding-left 22}} {})
|
|
|
(if @*property-key
|
|
(if @*property-key
|
|
@@ -519,7 +530,7 @@
|
|
|
(reset! *new-property? true))}
|
|
(reset! *new-property? true))}
|
|
|
[:div.flex.flex-row.items-center {:style {:padding-left 1}}
|
|
[:div.flex.flex-row.items-center {:style {:padding-left 1}}
|
|
|
(ui/icon "plus" {:size 15})
|
|
(ui/icon "plus" {:size 15})
|
|
|
- [:div.ml-1.text-sm {:style {:padding-left 2}} "Add property"]]]
|
|
|
|
|
|
|
+ [:div.ml-1 {:style {:padding-left 2}} "Add property"]]]
|
|
|
|
|
|
|
|
:else
|
|
:else
|
|
|
[:div {:style {:height 28}}]))])))
|
|
[:div {:style {:height 28}}]))])))
|
|
@@ -580,6 +591,7 @@
|
|
|
(:db/ident property)
|
|
(:db/ident property)
|
|
|
{:properties {:logseq.property/icon icon}})]
|
|
{:properties {:logseq.property/icon icon}})]
|
|
|
(shui/popup-hide! id))))}))]
|
|
(shui/popup-hide! id))))}))]
|
|
|
|
|
+
|
|
|
(shui/trigger-as :button
|
|
(shui/trigger-as :button
|
|
|
(-> (when-not config/publishing?
|
|
(-> (when-not config/publishing?
|
|
|
{:on-click #(shui/popup-show! (.-target %) content-fn {:as-dropdown? true :auto-focus? true})})
|
|
{:on-click #(shui/popup-show! (.-target %) content-fn {:as-dropdown? true :auto-focus? true})})
|
|
@@ -595,29 +607,34 @@
|
|
|
(:block/original-name property)]
|
|
(:block/original-name property)]
|
|
|
|
|
|
|
|
(shui/trigger-as :a
|
|
(shui/trigger-as :a
|
|
|
- {:tabIndex 0
|
|
|
|
|
- :title (str "Configure property: " (:block/original-name property))
|
|
|
|
|
- :class "property-k flex select-none jtrigger pl-2"
|
|
|
|
|
- :on-pointer-down (fn [^js e]
|
|
|
|
|
- (when (util/meta-key? e)
|
|
|
|
|
- (route-handler/redirect-to-page! (:block/name property))
|
|
|
|
|
- (.preventDefault e)))
|
|
|
|
|
- :on-click (fn [^js e]
|
|
|
|
|
- (shui/popup-show!
|
|
|
|
|
- (.-target e)
|
|
|
|
|
- (fn [_]
|
|
|
|
|
- [:div.p-2
|
|
|
|
|
- [:h2.text-lg.font-medium.mb-2.p-1 "Configure property"]
|
|
|
|
|
- (property-config property
|
|
|
|
|
- {:inline-text inline-text
|
|
|
|
|
- :page-cp page-cp})])
|
|
|
|
|
- {:content-props {:class "property-configure-popup-content"
|
|
|
|
|
- :collisionPadding {:bottom 10 :top 10}
|
|
|
|
|
- :avoidCollisions true
|
|
|
|
|
- :align "start"}
|
|
|
|
|
- :auto-side? true
|
|
|
|
|
- :auto-focus? true}))}
|
|
|
|
|
- (:block/original-name property)))]))
|
|
|
|
|
|
|
+ {:tabIndex 0
|
|
|
|
|
+ :title (str "Configure property: " (:block/original-name property))
|
|
|
|
|
+ :class "property-k flex select-none jtrigger pl-2"
|
|
|
|
|
+ :on-pointer-down (fn [^js e]
|
|
|
|
|
+ (when (util/meta-key? e)
|
|
|
|
|
+ (route-handler/redirect-to-page! (:block/name property))
|
|
|
|
|
+ (.preventDefault e)))
|
|
|
|
|
+ :on-click (fn [^js e]
|
|
|
|
|
+ (shui/popup-show!
|
|
|
|
|
+ (.-target e)
|
|
|
|
|
+ (fn [{:keys [id]}]
|
|
|
|
|
+ [:div.p-2
|
|
|
|
|
+ [:h2.text-lg.font-medium.mb-2.p-1 "Configure property"]
|
|
|
|
|
+ [:span.close.absolute.right-2.top-2
|
|
|
|
|
+ (shui/button
|
|
|
|
|
+ {:variant :ghost :size :sm :class "!w-4 !h-6"
|
|
|
|
|
+ :on-click #(shui/popup-hide! id)}
|
|
|
|
|
+ (shui/tabler-icon "x" {:size 16}))]
|
|
|
|
|
+ (property-config property
|
|
|
|
|
+ {:inline-text inline-text
|
|
|
|
|
+ :page-cp page-cp})])
|
|
|
|
|
+ {:content-props {:class "property-configure-popup-content"
|
|
|
|
|
+ :collisionPadding {:bottom 10 :top 10}
|
|
|
|
|
+ :avoidCollisions true
|
|
|
|
|
+ :align "start"}
|
|
|
|
|
+ :auto-side? true
|
|
|
|
|
+ :auto-focus? true}))}
|
|
|
|
|
+ (:block/original-name property)))]))
|
|
|
|
|
|
|
|
(defn- resolve-linked-block-if-exists
|
|
(defn- resolve-linked-block-if-exists
|
|
|
"Properties will be updated for the linked page instead of the refed block.
|
|
"Properties will be updated for the linked page instead of the refed block.
|
|
@@ -708,8 +725,10 @@
|
|
|
alias-properties (when (seq alias)
|
|
alias-properties (when (seq alias)
|
|
|
[[:block/alias alias]])
|
|
[[:block/alias alias]])
|
|
|
remove-built-in-properties (fn [properties]
|
|
remove-built-in-properties (fn [properties]
|
|
|
- (remove (fn [property-id]
|
|
|
|
|
- (contains? db-property/hidden-built-in-properties property-id))
|
|
|
|
|
|
|
+ (remove (fn [id]
|
|
|
|
|
+ (when-let [ent (db/entity id)]
|
|
|
|
|
+ (and (not (get-in ent [:block/schema :public?]))
|
|
|
|
|
+ (ldb/built-in? ent))))
|
|
|
properties))
|
|
properties))
|
|
|
{:keys [classes all-classes classes-properties]} (db-property-handler/get-block-classes-properties (:db/id block))
|
|
{:keys [classes all-classes classes-properties]} (db-property-handler/get-block-classes-properties (:db/id block))
|
|
|
one-class? (= 1 (count classes))
|
|
one-class? (= 1 (count classes))
|