|
|
@@ -12,6 +12,14 @@
|
|
|
;; Main property vars
|
|
|
;; ==================
|
|
|
|
|
|
+;; Ignore this property when rtc,
|
|
|
+;; since users frequently click the sort button to view table content temporarily,
|
|
|
+;; but this action does not need to be synchronized with other clients.
|
|
|
+(def property-ignore-rtc
|
|
|
+ {:rtc/ignore-attr-when-init-upload true
|
|
|
+ :rtc/ignore-attr-when-init-download true
|
|
|
+ :rtc/ignore-attr-when-syncing true})
|
|
|
+
|
|
|
(def ^:large-vars/data-var built-in-properties
|
|
|
"Map of built in properties for db graphs with their :db/ident as keys.
|
|
|
Each property has a config map with the following keys:
|
|
|
@@ -122,6 +130,12 @@
|
|
|
:schema {:type :entity
|
|
|
:public? false
|
|
|
:hide? true}}
|
|
|
+ :block/journal-day {:title "Journal date"
|
|
|
+ :attribute :block/journal-day
|
|
|
+ :schema {:type :raw-number
|
|
|
+ :public? false
|
|
|
+ :hide? true}
|
|
|
+ :queryable? true}
|
|
|
:block/created-at {:title "Node created at"
|
|
|
:attribute :block/created-at
|
|
|
:schema {:type :datetime
|
|
|
@@ -420,17 +434,26 @@
|
|
|
:hide? true}
|
|
|
:queryable? true}
|
|
|
|
|
|
+ :logseq.property.view/sort-groups-by-property {:title "View sort groups by"
|
|
|
+ :schema
|
|
|
+ {:type :property
|
|
|
+ :hide? true
|
|
|
+ :public? false}
|
|
|
+ :rtc property-ignore-rtc}
|
|
|
+ :logseq.property.view/sort-groups-desc? {:title "View sort groups DESC"
|
|
|
+ :schema
|
|
|
+ {:type :checkbox
|
|
|
+ :hide? true
|
|
|
+ :public? false}
|
|
|
+ :properties {:logseq.property/scalar-default-value true}
|
|
|
+ :rtc property-ignore-rtc}
|
|
|
+
|
|
|
:logseq.property.table/sorting {:title "View sorting"
|
|
|
:schema
|
|
|
{:type :coll
|
|
|
:hide? true
|
|
|
:public? false}
|
|
|
- ;; ignore this property when rtc,
|
|
|
- ;; since users frequently click the sort button to view table content temporarily,
|
|
|
- ;; but this action does not need to be synchronized with other clients.
|
|
|
- :rtc {:rtc/ignore-attr-when-init-upload true
|
|
|
- :rtc/ignore-attr-when-init-download true
|
|
|
- :rtc/ignore-attr-when-syncing true}}
|
|
|
+ :rtc property-ignore-rtc}
|
|
|
|
|
|
:logseq.property.table/filters {:title "View filters"
|
|
|
:schema
|
|
|
@@ -485,17 +508,13 @@
|
|
|
:schema {:type :raw-number
|
|
|
:hide? true
|
|
|
:public? false}
|
|
|
- :rtc {:rtc/ignore-attr-when-init-upload true
|
|
|
- :rtc/ignore-attr-when-init-download true
|
|
|
- :rtc/ignore-attr-when-syncing true}}
|
|
|
+ :rtc property-ignore-rtc}
|
|
|
:logseq.property.asset/remote-metadata {:title "File remote metadata"
|
|
|
:schema
|
|
|
{:type :map
|
|
|
:hide? true
|
|
|
:public? false}
|
|
|
- :rtc {:rtc/ignore-attr-when-init-upload true
|
|
|
- :rtc/ignore-attr-when-init-download true
|
|
|
- :rtc/ignore-attr-when-syncing true}}
|
|
|
+ :rtc property-ignore-rtc}
|
|
|
:logseq.property.asset/resize-metadata {:title "Asset resize metadata"
|
|
|
:schema {:type :map
|
|
|
:hide? true
|
|
|
@@ -561,16 +580,14 @@
|
|
|
:schema {:type :datetime
|
|
|
:public? false
|
|
|
:hide? true}
|
|
|
- :rtc {:rtc/ignore-attr-when-init-upload true
|
|
|
- :rtc/ignore-attr-when-init-download true
|
|
|
- :rtc/ignore-attr-when-syncing true}})))
|
|
|
+ :rtc property-ignore-rtc})))
|
|
|
|
|
|
(def db-attribute-properties
|
|
|
"Internal properties that are also db schema attributes"
|
|
|
#{:block/alias :block/tags :block/parent
|
|
|
:block/order :block/collapsed? :block/page
|
|
|
:block/refs :block/path-refs :block/link
|
|
|
- :block/title :block/closed-value-property
|
|
|
+ :block/title :block/closed-value-property :block/journal-day
|
|
|
:block/created-at :block/updated-at})
|
|
|
|
|
|
(assert (= db-attribute-properties
|