File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 334
334
(concat
335
335
[:map
336
336
[:db/ident user-property-ident]
337
- [:logseq.property/type (apply vector :enum db-property-type/user-built-in-property-types)]]
337
+ [:logseq.property/type (apply vector :enum (into db-property-type/user-allowed-internal-property-types
338
+ db-property-type/user-built-in-property-types))]]
338
339
property-common-schema-attrs
339
340
property-attrs
340
341
page-attrs
Original file line number Diff line number Diff line change 20
20
" Valid property types for users in order they appear in the UI"
21
21
[:default :number :date :datetime :checkbox :url :node ])
22
22
23
+ (def user-allowed-internal-property-types
24
+ " Internal property types that users are allowed to store. These aren't available in the UI
25
+ so these would normally be created via EDN or the API."
26
+ #{:map })
27
+
28
+ (assert (set/subset? user-allowed-internal-property-types internal-built-in-property-types))
29
+
23
30
(def closed-value-property-types
24
31
" Valid property :type for closed values"
25
32
#{:default :number :url })
Original file line number Diff line number Diff line change 428
428
:user.property/node {:logseq.property/type :node
429
429
:db/cardinality :db.cardinality/many
430
430
:build/property-classes [:user.class/MyClass ]}
431
- :user.property/p1 {:logseq.property/type :default }}
431
+ :user.property/p1 {:logseq.property/type :default }
432
+ :user.property/map {:logseq.property/type :map }}
432
433
:classes {:user.class/MyClass {:build/class-properties [:user.property/p1 ]}}
433
434
:pages-and-blocks
434
435
[{:page {:block/title " page1" }
442
443
:build/properties {:user.property/node #{[:build/page {:block/title " page object"
443
444
:build/tags [:user.class/MyClass ]}]
444
445
[:block/uuid block-object-uuid]
445
- :logseq.class/Task }}}]}
446
+ :logseq.class/Task }}}
447
+ {:block/title " map block"
448
+ :build/properties {:user.property/map {:foo :bar :num 2 }}}]}
446
449
{:page {:block/title " Blocks" }
447
450
:blocks [{:block/title " myclass object"
448
451
:build/tags [:user.class/MyClass ]
You can’t perform that action at this time.
0 commit comments