@fibery/views 19.1.1 → 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_virtual/_rolldown/runtime.js +13 -0
- package/lib/errors.d.ts +4 -0
- package/lib/errors.js +4 -0
- package/lib/field-utils/avatar.d.ts +23 -0
- package/lib/field-utils/avatar.js +35 -0
- package/lib/field-utils/back-references.d.ts +18 -0
- package/lib/field-utils/back-references.js +15 -0
- package/lib/field-utils/comments.d.ts +63 -0
- package/lib/field-utils/comments.js +41 -0
- package/lib/field-utils/date-time.d.ts +17 -0
- package/lib/field-utils/date-time.js +31 -0
- package/lib/field-utils/enum-value.d.ts +16 -0
- package/lib/field-utils/enum-value.js +26 -0
- package/lib/field-utils/file.d.ts +7 -0
- package/lib/field-utils/file.js +14 -0
- package/lib/field-utils/icon.d.ts +13 -0
- package/lib/field-utils/icon.js +17 -0
- package/lib/field-utils/number.d.ts +34 -0
- package/lib/field-utils/number.js +64 -0
- package/lib/field-utils/reference-collection.d.ts +16 -0
- package/lib/field-utils/reference-collection.js +49 -0
- package/lib/field-utils/reference.d.ts +10 -0
- package/lib/field-utils/reference.js +55 -0
- package/lib/field-utils/relation-view.d.ts +5 -0
- package/lib/field-utils/relation-view.js +7 -0
- package/lib/field-utils/rich-text.d.ts +16 -0
- package/lib/field-utils/rich-text.js +33 -0
- package/lib/field-utils/text.d.ts +38 -0
- package/lib/field-utils/text.js +37 -0
- package/lib/field-utils/user-active.d.ts +11 -0
- package/lib/field-utils/user-active.js +24 -0
- package/lib/field-utils/user-role.d.ts +9 -0
- package/lib/field-utils/user-role.js +23 -0
- package/lib/field-utils/workflow.d.ts +18 -0
- package/lib/field-utils/workflow.js +48 -0
- package/lib/index.d.ts +34 -1
- package/lib/index.js +169 -16
- package/lib/meta-validation.d.ts +13 -0
- package/lib/meta-validation.js +53 -0
- package/lib/private/board.d.ts +18 -0
- package/lib/private/board.js +234 -0
- package/lib/private/calendar.d.ts +17 -0
- package/lib/private/calendar.js +82 -0
- package/lib/private/feed.d.ts +17 -0
- package/lib/private/feed.js +81 -0
- package/lib/private/form.d.ts +27 -0
- package/lib/private/form.js +57 -0
- package/lib/private/map.d.ts +17 -0
- package/lib/private/map.js +81 -0
- package/lib/private/smart-folder.d.ts +33 -0
- package/lib/private/smart-folder.js +165 -0
- package/lib/private/timeline.d.ts +41 -0
- package/lib/private/timeline.js +223 -0
- package/lib/private/units.d.ts +12 -0
- package/lib/private/units.js +131 -0
- package/lib/private/utils.d.ts +66 -0
- package/lib/private/utils.js +179 -0
- package/lib/tsfixme.d.ts +4 -0
- package/lib/tsfixme.js +0 -0
- package/lib/unit-definitions/avatar-collection.d.ts +5 -0
- package/lib/unit-definitions/avatar-collection.js +59 -0
- package/lib/unit-definitions/avatar-input.d.ts +5 -0
- package/lib/unit-definitions/avatar-input.js +12 -0
- package/lib/unit-definitions/avatar.d.ts +5 -0
- package/lib/unit-definitions/avatar.js +95 -0
- package/lib/unit-definitions/back-references-list.d.ts +5 -0
- package/lib/unit-definitions/back-references-list.js +39 -0
- package/lib/unit-definitions/bool-checkbox.d.ts +5 -0
- package/lib/unit-definitions/bool-checkbox.js +25 -0
- package/lib/unit-definitions/bool.d.ts +5 -0
- package/lib/unit-definitions/bool.js +25 -0
- package/lib/unit-definitions/collection-count.d.ts +5 -0
- package/lib/unit-definitions/collection-count.js +35 -0
- package/lib/unit-definitions/color-input.d.ts +5 -0
- package/lib/unit-definitions/color-input.js +24 -0
- package/lib/unit-definitions/comments-list.d.ts +5 -0
- package/lib/unit-definitions/comments-list.js +27 -0
- package/lib/unit-definitions/date-range-combobox.d.ts +5 -0
- package/lib/unit-definitions/date-range-combobox.js +25 -0
- package/lib/unit-definitions/date-range.d.ts +5 -0
- package/lib/unit-definitions/date-range.js +25 -0
- package/lib/unit-definitions/date-time-combobox.d.ts +5 -0
- package/lib/unit-definitions/date-time-combobox.js +25 -0
- package/lib/unit-definitions/date.d.ts +5 -0
- package/lib/unit-definitions/date.js +25 -0
- package/lib/unit-definitions/email-input.d.ts +5 -0
- package/lib/unit-definitions/email-input.js +12 -0
- package/lib/unit-definitions/email.d.ts +5 -0
- package/lib/unit-definitions/email.js +17 -0
- package/lib/unit-definitions/emoji.d.ts +5 -0
- package/lib/unit-definitions/emoji.js +17 -0
- package/lib/unit-definitions/file-collection-count.d.ts +5 -0
- package/lib/unit-definitions/file-collection-count.js +34 -0
- package/lib/unit-definitions/file-compact-collection.d.ts +5 -0
- package/lib/unit-definitions/file-compact-collection.js +34 -0
- package/lib/unit-definitions/file-compact-reference.d.ts +5 -0
- package/lib/unit-definitions/file-compact-reference.js +47 -0
- package/lib/unit-definitions/file-reference.d.ts +5 -0
- package/lib/unit-definitions/file-reference.js +30 -0
- package/lib/unit-definitions/files-gallery.d.ts +5 -0
- package/lib/unit-definitions/files-gallery.js +34 -0
- package/lib/unit-definitions/files-l-list-item.d.ts +5 -0
- package/lib/unit-definitions/files-l-list-item.js +30 -0
- package/lib/unit-definitions/files-l-list.d.ts +5 -0
- package/lib/unit-definitions/files-l-list.js +34 -0
- package/lib/unit-definitions/files-list-item.d.ts +5 -0
- package/lib/unit-definitions/files-list-item.js +30 -0
- package/lib/unit-definitions/files-list.d.ts +5 -0
- package/lib/unit-definitions/files-list.js +34 -0
- package/lib/unit-definitions/geometry-preview.d.ts +5 -0
- package/lib/unit-definitions/geometry-preview.js +17 -0
- package/lib/unit-definitions/icon-button.d.ts +5 -0
- package/lib/unit-definitions/icon-button.js +41 -0
- package/lib/unit-definitions/icon-input.d.ts +5 -0
- package/lib/unit-definitions/icon-input.js +12 -0
- package/lib/unit-definitions/id.d.ts +5 -0
- package/lib/unit-definitions/id.js +30 -0
- package/lib/unit-definitions/index.d.ts +28 -0
- package/lib/unit-definitions/index.js +60 -0
- package/lib/unit-definitions/json-input.d.ts +5 -0
- package/lib/unit-definitions/json-input.js +24 -0
- package/lib/unit-definitions/location-input.d.ts +5 -0
- package/lib/unit-definitions/location-input.js +18 -0
- package/lib/unit-definitions/location.d.ts +5 -0
- package/lib/unit-definitions/location.js +17 -0
- package/lib/unit-definitions/not-found.d.ts +5 -0
- package/lib/unit-definitions/not-found.js +22 -0
- package/lib/unit-definitions/number-input.d.ts +5 -0
- package/lib/unit-definitions/number-input.js +25 -0
- package/lib/unit-definitions/number.d.ts +5 -0
- package/lib/unit-definitions/number.js +31 -0
- package/lib/unit-definitions/phone-input.d.ts +5 -0
- package/lib/unit-definitions/phone-input.js +12 -0
- package/lib/unit-definitions/phone.d.ts +5 -0
- package/lib/unit-definitions/phone.js +12 -0
- package/lib/unit-definitions/progress-bar.d.ts +5 -0
- package/lib/unit-definitions/progress-bar.js +32 -0
- package/lib/unit-definitions/reference-collection-combobox.d.ts +5 -0
- package/lib/unit-definitions/reference-collection-combobox.js +21 -0
- package/lib/unit-definitions/reference-collection-list.d.ts +5 -0
- package/lib/unit-definitions/reference-collection-list.js +21 -0
- package/lib/unit-definitions/reference-collection-view.d.ts +5 -0
- package/lib/unit-definitions/reference-collection-view.js +19 -0
- package/lib/unit-definitions/reference-collection.d.ts +5 -0
- package/lib/unit-definitions/reference-collection.js +30 -0
- package/lib/unit-definitions/reference-combobox.d.ts +5 -0
- package/lib/unit-definitions/reference-combobox.js +21 -0
- package/lib/unit-definitions/reference-icon.d.ts +5 -0
- package/lib/unit-definitions/reference-icon.js +12 -0
- package/lib/unit-definitions/reference.d.ts +5 -0
- package/lib/unit-definitions/reference.js +63 -0
- package/lib/unit-definitions/rich-text-document.d.ts +5 -0
- package/lib/unit-definitions/rich-text-document.js +26 -0
- package/lib/unit-definitions/rich-text-snippet.d.ts +6 -0
- package/lib/unit-definitions/rich-text-snippet.js +35 -0
- package/lib/unit-definitions/single-location-preview.d.ts +5 -0
- package/lib/unit-definitions/single-location-preview.js +17 -0
- package/lib/unit-definitions/text-input.d.ts +5 -0
- package/lib/unit-definitions/text-input.js +25 -0
- package/lib/unit-definitions/text.d.ts +5 -0
- package/lib/unit-definitions/text.js +25 -0
- package/lib/unit-definitions/title-input.d.ts +5 -0
- package/lib/unit-definitions/title-input.js +19 -0
- package/lib/unit-definitions/title.d.ts +5 -0
- package/lib/unit-definitions/title.js +33 -0
- package/lib/unit-definitions/type-badge-abbr.d.ts +5 -0
- package/lib/unit-definitions/type-badge-abbr.js +28 -0
- package/lib/unit-definitions/type-badge.d.ts +5 -0
- package/lib/unit-definitions/type-badge.js +28 -0
- package/lib/unit-definitions/type-icon.d.ts +5 -0
- package/lib/unit-definitions/type-icon.js +28 -0
- package/lib/unit-definitions/url-input.d.ts +5 -0
- package/lib/unit-definitions/url-input.js +12 -0
- package/lib/unit-definitions/url.d.ts +5 -0
- package/lib/unit-definitions/url.js +17 -0
- package/lib/unit-definitions/user-button.d.ts +5 -0
- package/lib/unit-definitions/user-button.js +26 -0
- package/lib/unit-definitions/user-role-input.d.ts +5 -0
- package/lib/unit-definitions/user-role-input.js +12 -0
- package/lib/unit-definitions/user-role.d.ts +5 -0
- package/lib/unit-definitions/user-role.js +35 -0
- package/lib/unit-utils/access.d.ts +12 -0
- package/lib/unit-utils/access.js +9 -0
- package/lib/unit-utils/can-edit-field.d.ts +9 -0
- package/lib/unit-utils/can-edit-field.js +7 -0
- package/lib/unit-utils/common.d.ts +17 -0
- package/lib/unit-utils/common.js +39 -0
- package/lib/unit-utils/decimal.d.ts +44 -0
- package/lib/unit-utils/decimal.js +248 -0
- package/lib/unit-utils/dynamic-keys.d.ts +10 -0
- package/lib/unit-utils/dynamic-keys.js +12 -0
- package/lib/unit-utils/enums.d.ts +30 -0
- package/lib/unit-utils/enums.js +48 -0
- package/lib/unit-utils/formatters.d.ts +53 -0
- package/lib/unit-utils/formatters.js +128 -0
- package/lib/unit-utils/get-export-value.d.ts +48 -0
- package/lib/unit-utils/get-export-value.js +83 -0
- package/lib/unit-utils/get-field-label.d.ts +9 -0
- package/lib/unit-utils/get-field-label.js +11 -0
- package/lib/unit-utils/get-unmatched-unit-label.d.ts +5 -0
- package/lib/unit-utils/get-unmatched-unit-label.js +5 -0
- package/lib/unit-utils/schema.d.ts +7 -0
- package/lib/unit-utils/schema.js +9 -0
- package/lib/unit-utils/wrap-normalized-in-expression.d.ts +6 -0
- package/lib/unit-utils/wrap-normalized-in-expression.js +15 -0
- package/lib/units/board.d.ts +50 -0
- package/lib/units/board.js +24 -0
- package/lib/units/canvas/all-units-data-definitions.d.ts +19 -0
- package/lib/units/canvas/all-units-data-definitions.js +42 -0
- package/lib/units/canvas/index.d.ts +49 -0
- package/lib/units/canvas/index.js +27 -0
- package/lib/units/canvas/type-badge-abbr.d.ts +42 -0
- package/lib/units/canvas/type-badge-abbr.js +11 -0
- package/lib/units/canvas/type-badge.d.ts +42 -0
- package/lib/units/canvas/type-badge.js +11 -0
- package/lib/units/default.d.ts +50 -0
- package/lib/units/default.js +23 -0
- package/lib/units/gallery.d.ts +7 -0
- package/lib/units/gallery.js +21 -0
- package/lib/units/gantt.d.ts +51 -0
- package/lib/units/gantt.js +28 -0
- package/lib/units/get-unit-definitions-for-view-type.d.ts +5 -0
- package/lib/units/get-unit-definitions-for-view-type.js +22 -0
- package/lib/units/grid.d.ts +49 -0
- package/lib/units/grid.js +81 -0
- package/lib/units/list.d.ts +52 -0
- package/lib/units/list.js +23 -0
- package/lib/units/make-factory.d.ts +53 -0
- package/lib/units/make-factory.js +272 -0
- package/lib/units/types.d.ts +75 -0
- package/lib/units/types.js +0 -0
- package/package.json +18 -40
- package/lib/src/errors.d.ts +0 -2
- package/lib/src/errors.js +0 -6
- package/lib/src/field-utils/avatar.d.ts +0 -20
- package/lib/src/field-utils/avatar.js +0 -42
- package/lib/src/field-utils/back-references.d.ts +0 -15
- package/lib/src/field-utils/back-references.js +0 -21
- package/lib/src/field-utils/comments.d.ts +0 -60
- package/lib/src/field-utils/comments.js +0 -46
- package/lib/src/field-utils/date-time.d.ts +0 -14
- package/lib/src/field-utils/date-time.js +0 -56
- package/lib/src/field-utils/enum-value.d.ts +0 -13
- package/lib/src/field-utils/enum-value.js +0 -29
- package/lib/src/field-utils/file.d.ts +0 -4
- package/lib/src/field-utils/file.js +0 -18
- package/lib/src/field-utils/icon.d.ts +0 -10
- package/lib/src/field-utils/icon.js +0 -26
- package/lib/src/field-utils/number.d.ts +0 -31
- package/lib/src/field-utils/number.js +0 -91
- package/lib/src/field-utils/reference-collection.d.ts +0 -13
- package/lib/src/field-utils/reference-collection.js +0 -67
- package/lib/src/field-utils/reference.d.ts +0 -7
- package/lib/src/field-utils/reference.js +0 -57
- package/lib/src/field-utils/relation-view.d.ts +0 -2
- package/lib/src/field-utils/relation-view.js +0 -12
- package/lib/src/field-utils/rich-text.d.ts +0 -13
- package/lib/src/field-utils/rich-text.js +0 -38
- package/lib/src/field-utils/text.d.ts +0 -35
- package/lib/src/field-utils/text.js +0 -40
- package/lib/src/field-utils/user-active.d.ts +0 -8
- package/lib/src/field-utils/user-active.js +0 -23
- package/lib/src/field-utils/user-role.d.ts +0 -6
- package/lib/src/field-utils/user-role.js +0 -25
- package/lib/src/field-utils/workflow.d.ts +0 -15
- package/lib/src/field-utils/workflow.js +0 -53
- package/lib/src/index.d.ts +0 -30
- package/lib/src/index.js +0 -263
- package/lib/src/meta-validation.d.ts +0 -10
- package/lib/src/meta-validation.js +0 -78
- package/lib/src/private/board.d.ts +0 -15
- package/lib/src/private/board.js +0 -327
- package/lib/src/private/calendar.d.ts +0 -14
- package/lib/src/private/calendar.js +0 -123
- package/lib/src/private/feed.d.ts +0 -14
- package/lib/src/private/feed.js +0 -120
- package/lib/src/private/form.d.ts +0 -25
- package/lib/src/private/form.js +0 -61
- package/lib/src/private/map.d.ts +0 -14
- package/lib/src/private/map.js +0 -120
- package/lib/src/private/smart-folder.d.ts +0 -31
- package/lib/src/private/smart-folder.js +0 -277
- package/lib/src/private/test-data/garbage-test.d.ts +0 -649
- package/lib/src/private/test-data/garbage-test.js +0 -520
- package/lib/src/private/test-data/kanban.d.ts +0 -1123
- package/lib/src/private/test-data/kanban.js +0 -1203
- package/lib/src/private/test-data/tasks.d.ts +0 -3216
- package/lib/src/private/test-data/tasks.js +0 -2731
- package/lib/src/private/timeline.d.ts +0 -39
- package/lib/src/private/timeline.js +0 -325
- package/lib/src/private/units.d.ts +0 -10
- package/lib/src/private/units.js +0 -165
- package/lib/src/private/utils.d.ts +0 -64
- package/lib/src/private/utils.js +0 -273
- package/lib/src/truthy.d.ts +0 -1
- package/lib/src/truthy.js +0 -7
- package/lib/src/tsfixme.d.ts +0 -1
- package/lib/src/tsfixme.js +0 -2
- package/lib/src/unit-definitions/avatar-collection.d.ts +0 -2
- package/lib/src/unit-definitions/avatar-collection.js +0 -54
- package/lib/src/unit-definitions/avatar-input.d.ts +0 -2
- package/lib/src/unit-definitions/avatar-input.js +0 -12
- package/lib/src/unit-definitions/avatar.d.ts +0 -2
- package/lib/src/unit-definitions/avatar.js +0 -88
- package/lib/src/unit-definitions/back-references-list.d.ts +0 -2
- package/lib/src/unit-definitions/back-references-list.js +0 -38
- package/lib/src/unit-definitions/bool-checkbox.d.ts +0 -2
- package/lib/src/unit-definitions/bool-checkbox.js +0 -25
- package/lib/src/unit-definitions/bool.d.ts +0 -2
- package/lib/src/unit-definitions/bool.js +0 -22
- package/lib/src/unit-definitions/collection-count.d.ts +0 -2
- package/lib/src/unit-definitions/collection-count.js +0 -32
- package/lib/src/unit-definitions/color-input.d.ts +0 -2
- package/lib/src/unit-definitions/color-input.js +0 -21
- package/lib/src/unit-definitions/comments-list.d.ts +0 -2
- package/lib/src/unit-definitions/comments-list.js +0 -25
- package/lib/src/unit-definitions/date-range-combobox.d.ts +0 -2
- package/lib/src/unit-definitions/date-range-combobox.js +0 -22
- package/lib/src/unit-definitions/date-range.d.ts +0 -2
- package/lib/src/unit-definitions/date-range.js +0 -22
- package/lib/src/unit-definitions/date-time-combobox.d.ts +0 -2
- package/lib/src/unit-definitions/date-time-combobox.js +0 -22
- package/lib/src/unit-definitions/date.d.ts +0 -2
- package/lib/src/unit-definitions/date.js +0 -22
- package/lib/src/unit-definitions/email-input.d.ts +0 -2
- package/lib/src/unit-definitions/email-input.js +0 -12
- package/lib/src/unit-definitions/email.d.ts +0 -2
- package/lib/src/unit-definitions/email.js +0 -17
- package/lib/src/unit-definitions/emoji.d.ts +0 -2
- package/lib/src/unit-definitions/emoji.js +0 -17
- package/lib/src/unit-definitions/file-collection-count.d.ts +0 -2
- package/lib/src/unit-definitions/file-collection-count.js +0 -32
- package/lib/src/unit-definitions/file-compact-collection.d.ts +0 -2
- package/lib/src/unit-definitions/file-compact-collection.js +0 -32
- package/lib/src/unit-definitions/file-compact-reference.d.ts +0 -2
- package/lib/src/unit-definitions/file-compact-reference.js +0 -37
- package/lib/src/unit-definitions/file-reference.d.ts +0 -2
- package/lib/src/unit-definitions/file-reference.js +0 -28
- package/lib/src/unit-definitions/files-gallery.d.ts +0 -2
- package/lib/src/unit-definitions/files-gallery.js +0 -32
- package/lib/src/unit-definitions/files-l-list-item.d.ts +0 -2
- package/lib/src/unit-definitions/files-l-list-item.js +0 -28
- package/lib/src/unit-definitions/files-l-list.d.ts +0 -2
- package/lib/src/unit-definitions/files-l-list.js +0 -32
- package/lib/src/unit-definitions/files-list-item.d.ts +0 -2
- package/lib/src/unit-definitions/files-list-item.js +0 -28
- package/lib/src/unit-definitions/files-list.d.ts +0 -2
- package/lib/src/unit-definitions/files-list.js +0 -32
- package/lib/src/unit-definitions/geometry-preview.d.ts +0 -2
- package/lib/src/unit-definitions/geometry-preview.js +0 -17
- package/lib/src/unit-definitions/icon-button.d.ts +0 -2
- package/lib/src/unit-definitions/icon-button.js +0 -29
- package/lib/src/unit-definitions/icon-input.d.ts +0 -2
- package/lib/src/unit-definitions/icon-input.js +0 -12
- package/lib/src/unit-definitions/id.d.ts +0 -2
- package/lib/src/unit-definitions/id.js +0 -29
- package/lib/src/unit-definitions/index.d.ts +0 -27
- package/lib/src/unit-definitions/index.js +0 -57
- package/lib/src/unit-definitions/json-input.d.ts +0 -2
- package/lib/src/unit-definitions/json-input.js +0 -21
- package/lib/src/unit-definitions/location-input.d.ts +0 -2
- package/lib/src/unit-definitions/location-input.js +0 -18
- package/lib/src/unit-definitions/location.d.ts +0 -2
- package/lib/src/unit-definitions/location.js +0 -17
- package/lib/src/unit-definitions/not-found.d.ts +0 -2
- package/lib/src/unit-definitions/not-found.js +0 -24
- package/lib/src/unit-definitions/number-input.d.ts +0 -2
- package/lib/src/unit-definitions/number-input.js +0 -22
- package/lib/src/unit-definitions/number.d.ts +0 -2
- package/lib/src/unit-definitions/number.js +0 -25
- package/lib/src/unit-definitions/phone-input.d.ts +0 -2
- package/lib/src/unit-definitions/phone-input.js +0 -12
- package/lib/src/unit-definitions/phone.d.ts +0 -2
- package/lib/src/unit-definitions/phone.js +0 -12
- package/lib/src/unit-definitions/progress-bar.d.ts +0 -2
- package/lib/src/unit-definitions/progress-bar.js +0 -29
- package/lib/src/unit-definitions/reference-collection-combobox.d.ts +0 -2
- package/lib/src/unit-definitions/reference-collection-combobox.js +0 -21
- package/lib/src/unit-definitions/reference-collection-list.d.ts +0 -2
- package/lib/src/unit-definitions/reference-collection-list.js +0 -22
- package/lib/src/unit-definitions/reference-collection-view.d.ts +0 -2
- package/lib/src/unit-definitions/reference-collection-view.js +0 -19
- package/lib/src/unit-definitions/reference-collection.d.ts +0 -2
- package/lib/src/unit-definitions/reference-collection.js +0 -28
- package/lib/src/unit-definitions/reference-combobox.d.ts +0 -2
- package/lib/src/unit-definitions/reference-combobox.js +0 -21
- package/lib/src/unit-definitions/reference-icon.d.ts +0 -2
- package/lib/src/unit-definitions/reference-icon.js +0 -12
- package/lib/src/unit-definitions/reference.d.ts +0 -2
- package/lib/src/unit-definitions/reference.js +0 -61
- package/lib/src/unit-definitions/rich-text-document.d.ts +0 -2
- package/lib/src/unit-definitions/rich-text-document.js +0 -22
- package/lib/src/unit-definitions/rich-text-snippet.d.ts +0 -3
- package/lib/src/unit-definitions/rich-text-snippet.js +0 -34
- package/lib/src/unit-definitions/single-location-preview.d.ts +0 -2
- package/lib/src/unit-definitions/single-location-preview.js +0 -17
- package/lib/src/unit-definitions/text-input.d.ts +0 -2
- package/lib/src/unit-definitions/text-input.js +0 -22
- package/lib/src/unit-definitions/text.d.ts +0 -2
- package/lib/src/unit-definitions/text.js +0 -22
- package/lib/src/unit-definitions/title-input.d.ts +0 -2
- package/lib/src/unit-definitions/title-input.js +0 -16
- package/lib/src/unit-definitions/title.d.ts +0 -2
- package/lib/src/unit-definitions/title.js +0 -34
- package/lib/src/unit-definitions/type-badge-abbr.d.ts +0 -2
- package/lib/src/unit-definitions/type-badge-abbr.js +0 -25
- package/lib/src/unit-definitions/type-badge.d.ts +0 -2
- package/lib/src/unit-definitions/type-badge.js +0 -25
- package/lib/src/unit-definitions/type-icon.d.ts +0 -2
- package/lib/src/unit-definitions/type-icon.js +0 -25
- package/lib/src/unit-definitions/url-input.d.ts +0 -2
- package/lib/src/unit-definitions/url-input.js +0 -12
- package/lib/src/unit-definitions/url.d.ts +0 -2
- package/lib/src/unit-definitions/url.js +0 -17
- package/lib/src/unit-definitions/user-button.d.ts +0 -2
- package/lib/src/unit-definitions/user-button.js +0 -23
- package/lib/src/unit-definitions/user-role-input.d.ts +0 -2
- package/lib/src/unit-definitions/user-role-input.js +0 -12
- package/lib/src/unit-definitions/user-role.d.ts +0 -2
- package/lib/src/unit-definitions/user-role.js +0 -29
- package/lib/src/unit-utils/access.d.ts +0 -9
- package/lib/src/unit-utils/access.js +0 -14
- package/lib/src/unit-utils/can-edit-field.d.ts +0 -6
- package/lib/src/unit-utils/can-edit-field.js +0 -8
- package/lib/src/unit-utils/common.d.ts +0 -14
- package/lib/src/unit-utils/common.js +0 -43
- package/lib/src/unit-utils/decimal.d.ts +0 -42
- package/lib/src/unit-utils/decimal.js +0 -418
- package/lib/src/unit-utils/dynamic-keys.d.ts +0 -7
- package/lib/src/unit-utils/dynamic-keys.js +0 -13
- package/lib/src/unit-utils/enums.d.ts +0 -27
- package/lib/src/unit-utils/enums.js +0 -69
- package/lib/src/unit-utils/formatters.d.ts +0 -50
- package/lib/src/unit-utils/formatters.js +0 -163
- package/lib/src/unit-utils/get-export-value.d.ts +0 -45
- package/lib/src/unit-utils/get-export-value.js +0 -83
- package/lib/src/unit-utils/get-field-label.d.ts +0 -6
- package/lib/src/unit-utils/get-field-label.js +0 -10
- package/lib/src/unit-utils/get-unmatched-unit-label.d.ts +0 -2
- package/lib/src/unit-utils/get-unmatched-unit-label.js +0 -9
- package/lib/src/unit-utils/schema.d.ts +0 -4
- package/lib/src/unit-utils/schema.js +0 -12
- package/lib/src/unit-utils/wrap-normalized-in-expression.d.ts +0 -3
- package/lib/src/unit-utils/wrap-normalized-in-expression.js +0 -14
- package/lib/src/units/board.d.ts +0 -46
- package/lib/src/units/board.js +0 -51
- package/lib/src/units/canvas/all-units-data-definitions.d.ts +0 -18
- package/lib/src/units/canvas/all-units-data-definitions.js +0 -40
- package/lib/src/units/canvas/index.d.ts +0 -45
- package/lib/src/units/canvas/index.js +0 -48
- package/lib/src/units/canvas/type-badge-abbr.d.ts +0 -36
- package/lib/src/units/canvas/type-badge-abbr.js +0 -11
- package/lib/src/units/canvas/type-badge.d.ts +0 -36
- package/lib/src/units/canvas/type-badge.js +0 -11
- package/lib/src/units/default.d.ts +0 -46
- package/lib/src/units/default.js +0 -51
- package/lib/src/units/gallery.d.ts +0 -3
- package/lib/src/units/gallery.js +0 -18
- package/lib/src/units/gantt.d.ts +0 -47
- package/lib/src/units/gantt.js +0 -59
- package/lib/src/units/get-unit-definitions-for-view-type.d.ts +0 -2
- package/lib/src/units/get-unit-definitions-for-view-type.js +0 -64
- package/lib/src/units/grid.d.ts +0 -45
- package/lib/src/units/grid.js +0 -71
- package/lib/src/units/list.d.ts +0 -46
- package/lib/src/units/list.js +0 -49
- package/lib/src/units/make-factory.d.ts +0 -51
- package/lib/src/units/make-factory.js +0 -261
- package/lib/src/units/types.d.ts +0 -73
- package/lib/src/units/types.js +0 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AvatarCollection } from "./avatar-collection.js";
|
|
2
|
+
import { Avatar } from "./avatar.js";
|
|
3
|
+
import { Bool } from "./bool.js";
|
|
4
|
+
import { CollectionCount } from "./collection-count.js";
|
|
5
|
+
import { DateRange } from "./date-range.js";
|
|
6
|
+
import { Date } from "./date.js";
|
|
7
|
+
import { Email } from "./email.js";
|
|
8
|
+
import { Emoji } from "./emoji.js";
|
|
9
|
+
import { FileCollectionCount } from "./file-collection-count.js";
|
|
10
|
+
import { IconButton } from "./icon-button.js";
|
|
11
|
+
import { Id } from "./id.js";
|
|
12
|
+
import { Location } from "./location.js";
|
|
13
|
+
import { Number } from "./number.js";
|
|
14
|
+
import { Phone } from "./phone.js";
|
|
15
|
+
import { ProgressBar } from "./progress-bar.js";
|
|
16
|
+
import { ReferenceCollection } from "./reference-collection.js";
|
|
17
|
+
import { ReferenceIcon } from "./reference-icon.js";
|
|
18
|
+
import { Reference } from "./reference.js";
|
|
19
|
+
import { RichTextSnippet } from "./rich-text-snippet.js";
|
|
20
|
+
import { Text } from "./text.js";
|
|
21
|
+
import { Title } from "./title.js";
|
|
22
|
+
import { TypeBadgeAbbr } from "./type-badge-abbr.js";
|
|
23
|
+
import { TypeBadge } from "./type-badge.js";
|
|
24
|
+
import { TypeIcon } from "./type-icon.js";
|
|
25
|
+
import { Url } from "./url.js";
|
|
26
|
+
import { UserButton } from "./user-button.js";
|
|
27
|
+
import { UserRole } from "./user-role.js";
|
|
28
|
+
export { Avatar, AvatarCollection, Bool, CollectionCount, Date, DateRange, Email, Emoji, FileCollectionCount, IconButton, Id, Location, Number, Phone, ProgressBar, Reference, ReferenceCollection, ReferenceIcon, RichTextSnippet, Text, Title, TypeBadge, TypeBadgeAbbr, TypeIcon, Url, UserButton, UserRole };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { AvatarCollection } from "./avatar-collection.js";
|
|
3
|
+
import { Avatar } from "./avatar.js";
|
|
4
|
+
import { Bool } from "./bool.js";
|
|
5
|
+
import { CollectionCount } from "./collection-count.js";
|
|
6
|
+
import { DateRange } from "./date-range.js";
|
|
7
|
+
import { Date } from "./date.js";
|
|
8
|
+
import { Text } from "./text.js";
|
|
9
|
+
import { Email } from "./email.js";
|
|
10
|
+
import { Emoji } from "./emoji.js";
|
|
11
|
+
import { FileCollectionCount } from "./file-collection-count.js";
|
|
12
|
+
import { IconButton } from "./icon-button.js";
|
|
13
|
+
import { Id } from "./id.js";
|
|
14
|
+
import { Location } from "./location.js";
|
|
15
|
+
import { Number } from "./number.js";
|
|
16
|
+
import { Phone } from "./phone.js";
|
|
17
|
+
import { ProgressBar } from "./progress-bar.js";
|
|
18
|
+
import { ReferenceCollection } from "./reference-collection.js";
|
|
19
|
+
import { Reference } from "./reference.js";
|
|
20
|
+
import { ReferenceIcon } from "./reference-icon.js";
|
|
21
|
+
import { RichTextSnippet } from "./rich-text-snippet.js";
|
|
22
|
+
import { Title } from "./title.js";
|
|
23
|
+
import { TypeBadgeAbbr } from "./type-badge-abbr.js";
|
|
24
|
+
import { TypeBadge } from "./type-badge.js";
|
|
25
|
+
import { TypeIcon } from "./type-icon.js";
|
|
26
|
+
import { Url } from "./url.js";
|
|
27
|
+
import { UserButton } from "./user-button.js";
|
|
28
|
+
import { UserRole } from "./user-role.js";
|
|
29
|
+
//#region src/unit-definitions/index.ts
|
|
30
|
+
var unit_definitions_exports = /* @__PURE__ */ __exportAll({
|
|
31
|
+
Avatar: () => Avatar,
|
|
32
|
+
AvatarCollection: () => AvatarCollection,
|
|
33
|
+
Bool: () => Bool,
|
|
34
|
+
CollectionCount: () => CollectionCount,
|
|
35
|
+
Date: () => Date,
|
|
36
|
+
DateRange: () => DateRange,
|
|
37
|
+
Email: () => Email,
|
|
38
|
+
Emoji: () => Emoji,
|
|
39
|
+
FileCollectionCount: () => FileCollectionCount,
|
|
40
|
+
IconButton: () => IconButton,
|
|
41
|
+
Id: () => Id,
|
|
42
|
+
Location: () => Location,
|
|
43
|
+
Number: () => Number,
|
|
44
|
+
Phone: () => Phone,
|
|
45
|
+
ProgressBar: () => ProgressBar,
|
|
46
|
+
Reference: () => Reference,
|
|
47
|
+
ReferenceCollection: () => ReferenceCollection,
|
|
48
|
+
ReferenceIcon: () => ReferenceIcon,
|
|
49
|
+
RichTextSnippet: () => RichTextSnippet,
|
|
50
|
+
Text: () => Text,
|
|
51
|
+
Title: () => Title,
|
|
52
|
+
TypeBadge: () => TypeBadge,
|
|
53
|
+
TypeBadgeAbbr: () => TypeBadgeAbbr,
|
|
54
|
+
TypeIcon: () => TypeIcon,
|
|
55
|
+
Url: () => Url,
|
|
56
|
+
UserButton: () => UserButton,
|
|
57
|
+
UserRole: () => UserRole
|
|
58
|
+
});
|
|
59
|
+
//#endregion
|
|
60
|
+
export { Avatar, AvatarCollection, Bool, CollectionCount, Date, DateRange, Email, Emoji, FileCollectionCount, IconButton, Id, Location, Number, Phone, ProgressBar, Reference, ReferenceCollection, ReferenceIcon, RichTextSnippet, Text, Title, TypeBadge, TypeBadgeAbbr, TypeIcon, Url, UserButton, UserRole, unit_definitions_exports };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
3
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
4
|
+
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
5
|
+
//#region src/unit-definitions/json-input.ts
|
|
6
|
+
const type = "json-input";
|
|
7
|
+
const JsonInput = {
|
|
8
|
+
type,
|
|
9
|
+
name: "Input",
|
|
10
|
+
canEdit: canEditField,
|
|
11
|
+
makeUnit: makeUnitMethod(type),
|
|
12
|
+
getLabel: getFieldLabel,
|
|
13
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
14
|
+
return getQuerySelectForExpression({
|
|
15
|
+
typeObject,
|
|
16
|
+
expression
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
20
|
+
getExportValue: () => null,
|
|
21
|
+
canExport: () => false
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { JsonInput };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getLocationExportValue } from "../unit-utils/get-export-value.js";
|
|
3
|
+
import { Text } from "./text.js";
|
|
4
|
+
//#region src/unit-definitions/location-input.ts
|
|
5
|
+
const type = "location-input";
|
|
6
|
+
const LocationInput = {
|
|
7
|
+
type,
|
|
8
|
+
name: "Address",
|
|
9
|
+
makeUnit: makeUnitMethod(type),
|
|
10
|
+
getLabel: Text.getLabel,
|
|
11
|
+
getQuerySelect: Text.getQuerySelect,
|
|
12
|
+
calculateErrors: Text.calculateErrors,
|
|
13
|
+
canEdit: Text.canEdit,
|
|
14
|
+
getExportValue: getLocationExportValue,
|
|
15
|
+
canExport: () => true
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { LocationInput };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getLocationExportValue } from "../unit-utils/get-export-value.js";
|
|
3
|
+
import { Text } from "./text.js";
|
|
4
|
+
//#region src/unit-definitions/location.ts
|
|
5
|
+
const Location = {
|
|
6
|
+
type: "location",
|
|
7
|
+
name: "Address",
|
|
8
|
+
makeUnit: makeUnitMethod("location"),
|
|
9
|
+
getLabel: Text.getLabel,
|
|
10
|
+
getQuerySelect: Text.getQuerySelect,
|
|
11
|
+
calculateErrors: Text.calculateErrors,
|
|
12
|
+
canEdit: Text.canEdit,
|
|
13
|
+
getExportValue: getLocationExportValue,
|
|
14
|
+
canExport: () => true
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Location };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getUnmatchedUnitLabel } from "../unit-utils/get-unmatched-unit-label.js";
|
|
2
|
+
const NotFound = {
|
|
3
|
+
type: "not-found",
|
|
4
|
+
name: "Not found",
|
|
5
|
+
canEdit: () => false,
|
|
6
|
+
makeUnit() {
|
|
7
|
+
throw new Error("Not implemented");
|
|
8
|
+
},
|
|
9
|
+
getLabel({ unit }) {
|
|
10
|
+
return getUnmatchedUnitLabel(unit);
|
|
11
|
+
},
|
|
12
|
+
getQuerySelect() {
|
|
13
|
+
return {};
|
|
14
|
+
},
|
|
15
|
+
calculateErrors() {
|
|
16
|
+
return [];
|
|
17
|
+
},
|
|
18
|
+
getExportValue: () => null,
|
|
19
|
+
canExport: () => false
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { NotFound };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getNumberExportValue } from "../unit-utils/get-export-value.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
|
+
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
6
|
+
//#region src/unit-definitions/number-input.tsx
|
|
7
|
+
const type = "number-input";
|
|
8
|
+
const NumberInput = {
|
|
9
|
+
type,
|
|
10
|
+
name: "Input",
|
|
11
|
+
makeUnit: makeUnitMethod(type),
|
|
12
|
+
getLabel: getFieldLabel,
|
|
13
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
14
|
+
return getQuerySelectForExpression({
|
|
15
|
+
typeObject,
|
|
16
|
+
expression
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
20
|
+
canEdit: canEditField,
|
|
21
|
+
getExportValue: getNumberExportValue,
|
|
22
|
+
canExport: () => true
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { NumberInput };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { calculateUnitExpressionErrors, canEditFieldExpression, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getNumberExportValue } from "../unit-utils/get-export-value.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
5
|
+
//#region src/unit-definitions/number.ts
|
|
6
|
+
const type = "number";
|
|
7
|
+
const Number = {
|
|
8
|
+
type,
|
|
9
|
+
name: "Input",
|
|
10
|
+
makeUnit: makeUnitMethod(type),
|
|
11
|
+
getLabel({ typeObject, unit }) {
|
|
12
|
+
return getFieldLabel({
|
|
13
|
+
typeObject,
|
|
14
|
+
unit
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
18
|
+
return getQuerySelectForExpression({
|
|
19
|
+
typeObject,
|
|
20
|
+
expression
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
24
|
+
canEdit({ typeObject, unit: { expression } }) {
|
|
25
|
+
return canEditFieldExpression(typeObject, expression);
|
|
26
|
+
},
|
|
27
|
+
getExportValue: getNumberExportValue,
|
|
28
|
+
canExport: () => true
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Number };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { TextInput } from "./text-input.js";
|
|
3
|
+
//#region src/unit-definitions/phone-input.tsx
|
|
4
|
+
const type = "phone-input";
|
|
5
|
+
const PhoneInput = {
|
|
6
|
+
...TextInput,
|
|
7
|
+
type,
|
|
8
|
+
name: "Phone input",
|
|
9
|
+
makeUnit: makeUnitMethod(type)
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { PhoneInput };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { Text } from "./text.js";
|
|
3
|
+
//#region src/unit-definitions/phone.ts
|
|
4
|
+
const type = "phone";
|
|
5
|
+
const Phone = {
|
|
6
|
+
...Text,
|
|
7
|
+
type,
|
|
8
|
+
name: "Input",
|
|
9
|
+
makeUnit: makeUnitMethod(type)
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Phone };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getNumberExportValue } from "../unit-utils/get-export-value.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { getQuerySelectForExpression } from "@fibery/query-utils/src/query";
|
|
5
|
+
//#region src/unit-definitions/progress-bar.ts
|
|
6
|
+
const type = "progress-bar";
|
|
7
|
+
const ProgressBar = {
|
|
8
|
+
type,
|
|
9
|
+
name: "Progress bar",
|
|
10
|
+
makeUnit: makeUnitMethod(type),
|
|
11
|
+
getLabel({ typeObject, unit }) {
|
|
12
|
+
return `${getFieldLabel({
|
|
13
|
+
typeObject,
|
|
14
|
+
unit
|
|
15
|
+
})} (progress bar)`;
|
|
16
|
+
},
|
|
17
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
18
|
+
return getQuerySelectForExpression({
|
|
19
|
+
typeObject,
|
|
20
|
+
expression
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
24
|
+
canEdit() {
|
|
25
|
+
return false;
|
|
26
|
+
},
|
|
27
|
+
getExportValue: getNumberExportValue,
|
|
28
|
+
canExport: () => true,
|
|
29
|
+
getExportLabel: getFieldLabel
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { ProgressBar };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getExportValue } from "../unit-utils/get-export-value.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
|
+
//#region src/unit-definitions/reference-collection-combobox.ts
|
|
6
|
+
const type = "reference-collection-combobox";
|
|
7
|
+
const ReferenceCollectionCombobox = {
|
|
8
|
+
type,
|
|
9
|
+
name: "Compact List",
|
|
10
|
+
canEdit: canEditField,
|
|
11
|
+
makeUnit: makeUnitMethod(type),
|
|
12
|
+
getLabel: getFieldLabel,
|
|
13
|
+
getQuerySelect: () => {
|
|
14
|
+
throw new Error(`getQuerySelect for ${type} should be implemented in view's local unit registry`);
|
|
15
|
+
},
|
|
16
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
17
|
+
getExportValue,
|
|
18
|
+
canExport: () => true
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ReferenceCollectionCombobox };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
|
+
//#region src/unit-definitions/reference-collection-list.tsx
|
|
6
|
+
const type = "reference-collection-list";
|
|
7
|
+
const ReferenceCollectionList = {
|
|
8
|
+
type,
|
|
9
|
+
name: "Relation List",
|
|
10
|
+
canEdit: canEditField,
|
|
11
|
+
makeUnit: makeUnitMethod(type),
|
|
12
|
+
getLabel: getFieldLabel,
|
|
13
|
+
getQuerySelect: () => {
|
|
14
|
+
return {};
|
|
15
|
+
},
|
|
16
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
17
|
+
getExportValue: getReferenceCollectionExportValue,
|
|
18
|
+
canExport: () => true
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ReferenceCollectionList };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
|
+
//#region src/unit-definitions/reference-collection-view.tsx
|
|
6
|
+
const type = "reference-collection-view";
|
|
7
|
+
const ReferenceCollectionView = {
|
|
8
|
+
type,
|
|
9
|
+
name: "Relation Views",
|
|
10
|
+
canEdit: canEditField,
|
|
11
|
+
makeUnit: makeUnitMethod(type),
|
|
12
|
+
getLabel: getFieldLabel,
|
|
13
|
+
getQuerySelect: () => ({}),
|
|
14
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
15
|
+
getExportValue: getReferenceCollectionExportValue,
|
|
16
|
+
canExport: () => true
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ReferenceCollectionView };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { REFERENCE_COLLECTION_LIMIT, calculateReferenceCollectionQuery } from "../field-utils/reference-collection.js";
|
|
2
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
+
import { getReferenceCollectionExportValue } from "../unit-utils/get-export-value.js";
|
|
4
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
|
+
import { getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
7
|
+
//#region src/unit-definitions/reference-collection.ts
|
|
8
|
+
const type = "reference-collection";
|
|
9
|
+
const ReferenceCollection = {
|
|
10
|
+
type,
|
|
11
|
+
name: "Compact List",
|
|
12
|
+
getLabel: getFieldLabel,
|
|
13
|
+
makeUnit: makeUnitMethod(type),
|
|
14
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
15
|
+
return calculateReferenceCollectionQuery({
|
|
16
|
+
fieldObjects: getFieldObjectsByFieldExpression({
|
|
17
|
+
typeObject,
|
|
18
|
+
expression
|
|
19
|
+
}),
|
|
20
|
+
expression,
|
|
21
|
+
limit: REFERENCE_COLLECTION_LIMIT
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
25
|
+
canEdit: canEditField,
|
|
26
|
+
getExportValue: getReferenceCollectionExportValue,
|
|
27
|
+
canExport: () => true
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { ReferenceCollection };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { getReferenceExportValue } from "../unit-utils/get-export-value.js";
|
|
3
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
4
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
5
|
+
//#region src/unit-definitions/reference-combobox.ts
|
|
6
|
+
const type = "reference-combobox";
|
|
7
|
+
const ReferenceCombobox = {
|
|
8
|
+
type,
|
|
9
|
+
name: "Compact List",
|
|
10
|
+
canEdit: canEditField,
|
|
11
|
+
makeUnit: makeUnitMethod(type),
|
|
12
|
+
getLabel: getFieldLabel,
|
|
13
|
+
getQuerySelect: () => {
|
|
14
|
+
throw new Error(`getQuerySelect for ${type} should be implemented in view's local unit registry`);
|
|
15
|
+
},
|
|
16
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
17
|
+
getExportValue: getReferenceExportValue,
|
|
18
|
+
canExport: () => true
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ReferenceCombobox };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { makeUnitMethod } from "../unit-utils/common.js";
|
|
2
|
+
import { Reference } from "./reference.js";
|
|
3
|
+
//#region src/unit-definitions/reference-icon.ts
|
|
4
|
+
const type = "reference-icon";
|
|
5
|
+
const ReferenceIcon = {
|
|
6
|
+
...Reference,
|
|
7
|
+
type,
|
|
8
|
+
name: "Icon",
|
|
9
|
+
makeUnit: makeUnitMethod(type)
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ReferenceIcon };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { getReferenceFieldNormalizedSelectClause } from "../field-utils/reference.js";
|
|
2
|
+
import { calculateUnitExpressionErrors, canEditFieldExpression } from "../unit-utils/common.js";
|
|
3
|
+
import { getReferenceExportValue } from "../unit-utils/get-export-value.js";
|
|
4
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { assertIsValidExpression, getFieldObjectsByFieldExpression } from "@fibery/expression-utils/src/utils";
|
|
6
|
+
import { denormalizeSelect } from "@fibery/query-utils/src/select";
|
|
7
|
+
//#region src/unit-definitions/reference.ts
|
|
8
|
+
const type = "reference";
|
|
9
|
+
const Reference = {
|
|
10
|
+
type,
|
|
11
|
+
name: "Name",
|
|
12
|
+
getLabel: getFieldLabel,
|
|
13
|
+
makeUnit: (args) => {
|
|
14
|
+
if (!args) return {
|
|
15
|
+
type,
|
|
16
|
+
kind: "field"
|
|
17
|
+
};
|
|
18
|
+
assertIsValidExpression(args.expression);
|
|
19
|
+
return {
|
|
20
|
+
type,
|
|
21
|
+
kind: "field",
|
|
22
|
+
expression: args.expression
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
26
|
+
const fieldObjects = getFieldObjectsByFieldExpression({
|
|
27
|
+
typeObject,
|
|
28
|
+
expression
|
|
29
|
+
});
|
|
30
|
+
const terminalFieldObject = fieldObjects[fieldObjects.length - 1];
|
|
31
|
+
const innerNormalized = getReferenceFieldNormalizedSelectClause(terminalFieldObject, expression);
|
|
32
|
+
return denormalizeSelect([...expression].reverse().reduce((inner, field, reversedIndex) => {
|
|
33
|
+
const originalIndex = expression.length - 1 - reversedIndex;
|
|
34
|
+
if (!(originalIndex === expression.length - 1)) {
|
|
35
|
+
const { idField } = fieldObjects[originalIndex].typeObject;
|
|
36
|
+
const innerWithId = idField ? {
|
|
37
|
+
[idField]: idField,
|
|
38
|
+
...inner
|
|
39
|
+
} : inner;
|
|
40
|
+
return { [field]: innerWithId };
|
|
41
|
+
}
|
|
42
|
+
return { [field]: inner };
|
|
43
|
+
}, innerNormalized));
|
|
44
|
+
},
|
|
45
|
+
calculateErrors({ typeObject, unit }) {
|
|
46
|
+
const errors = calculateUnitExpressionErrors({
|
|
47
|
+
typeObject,
|
|
48
|
+
unit
|
|
49
|
+
});
|
|
50
|
+
if (errors.length > 0) return errors;
|
|
51
|
+
if (typeObject.idFieldObject === null) errors.push(`${typeObject.name} does not have id field for ${unit.type} unit`);
|
|
52
|
+
if (typeObject.publicIdFieldObject === null) errors.push(`${typeObject.name} does not have public id field for ${unit.type} unit`);
|
|
53
|
+
if (typeObject.titleFieldObject === null) errors.push(`${typeObject.name} does not have title field for ${unit.type} unit`);
|
|
54
|
+
return errors;
|
|
55
|
+
},
|
|
56
|
+
canEdit({ typeObject, unit: { expression } }) {
|
|
57
|
+
return canEditFieldExpression(typeObject, expression);
|
|
58
|
+
},
|
|
59
|
+
getExportValue: getReferenceExportValue,
|
|
60
|
+
canExport: () => true
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { Reference };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getRichTextQuerySelect } from "../field-utils/rich-text.js";
|
|
2
|
+
import { calculateUnitExpressionErrors, makeUnitMethod } from "../unit-utils/common.js";
|
|
3
|
+
import { getSnippetExportValue } from "../unit-utils/get-export-value.js";
|
|
4
|
+
import { getFieldLabel } from "../unit-utils/get-field-label.js";
|
|
5
|
+
import { canEditField } from "../unit-utils/can-edit-field.js";
|
|
6
|
+
//#region src/unit-definitions/rich-text-document.ts
|
|
7
|
+
const type = "rich-text-document";
|
|
8
|
+
const RichTextDocument = {
|
|
9
|
+
type,
|
|
10
|
+
name: "Document",
|
|
11
|
+
canEdit: canEditField,
|
|
12
|
+
getLabel: getFieldLabel,
|
|
13
|
+
calculateErrors: calculateUnitExpressionErrors,
|
|
14
|
+
makeUnit: makeUnitMethod(type),
|
|
15
|
+
getQuerySelect({ typeObject, unit }) {
|
|
16
|
+
return getRichTextQuerySelect({
|
|
17
|
+
typeObject,
|
|
18
|
+
unit,
|
|
19
|
+
includeSnippet: false
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
getExportValue: getSnippetExportValue,
|
|
23
|
+
canExport: () => true
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { RichTextDocument };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldUnit, UnitDataDefinition } from "../units/types.js";
|
|
2
|
+
//#region src/unit-definitions/rich-text-snippet.d.ts
|
|
3
|
+
declare const type = "rich-text-snippet";
|
|
4
|
+
declare const RichTextSnippet: UnitDataDefinition<FieldUnit>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { RichTextSnippet, type };
|