@fibery/views 19.1.2 → 20.0.2
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 +33 -0
- package/lib/field-utils/text.js +40 -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/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 +37 -0
- package/lib/unit-utils/common.js +41 -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 +41 -0
- package/lib/units/canvas/type-badge-abbr.js +11 -0
- package/lib/units/canvas/type-badge.d.ts +41 -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 +74 -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 -39
- 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 -15
- 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 -54
- 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/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 -53
- 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 -87
- 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 -260
- package/lib/src/units/types.d.ts +0 -73
- package/lib/src/units/types.js +0 -2
package/lib/src/private/utils.js
DELETED
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.replaceNamesWithIdsInUnitGroupKey = exports.replaceIdsWithNamesInUnitGroupKey = exports.getFieldObjectsById = exports.isUnitExpressionValid = exports.resetContextExpressionIfBroken = exports.deleteExpressionWithNotFoundFieldsOrTypesInExpression = exports.replaceNamesWithIdsInQueryExpression = exports.replaceNamesWithIdsInFilter = exports.replaceIdsWithNamesInFilter = exports.replaceIdsWithNamesInQueryExpression = exports.visitContextExpression = exports.visitViewUnit = exports.replaceIdsWithNamesInExpression = exports.replaceNamesWithIdsInExpression = exports.deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression = exports.deleteExpressionWithNotFoundFieldsOrTypesInFilter = exports.skipRemove = exports.REMOVE = void 0;
|
|
7
|
-
const visitors_1 = require("@fibery/expression-utils/src/visitors");
|
|
8
|
-
const _1 = require("@fibery/helpers/src/_");
|
|
9
|
-
const pickBy_1 = __importDefault(require("lodash/pickBy"));
|
|
10
|
-
// Return this symbol from a visitor callback to remove the node from the
|
|
11
|
-
// output. Not supported in all places, add support as needed.
|
|
12
|
-
exports.REMOVE = Symbol("remove");
|
|
13
|
-
const skipRemove = (unit) => unit !== exports.REMOVE;
|
|
14
|
-
exports.skipRemove = skipRemove;
|
|
15
|
-
function visitDeleteExpressionInFilterGroup(filter, visitExpression) {
|
|
16
|
-
if (filter.kind !== "group") {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
const value = filter.value
|
|
20
|
-
.map((nestedFilter) => {
|
|
21
|
-
if (nestedFilter.kind === "group") {
|
|
22
|
-
return visitFilterGroup(nestedFilter, visitExpression);
|
|
23
|
-
}
|
|
24
|
-
const leaf = nestedFilter;
|
|
25
|
-
const expression = leaf.value.expression ? visitExpression(leaf.value.expression) : null;
|
|
26
|
-
if (!expression) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
...leaf,
|
|
31
|
-
value: {
|
|
32
|
-
...leaf.value,
|
|
33
|
-
expression: expression,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
})
|
|
37
|
-
.filter(_1.truthy);
|
|
38
|
-
if (value.length === 0) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
...filter,
|
|
43
|
-
value: value,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const deleteExpressionWithNotFoundFieldsOrTypesInFilter = (schema, fromType, filter) => {
|
|
47
|
-
return visitDeleteExpressionInFilterGroup(filter, (expression) => (0, exports.deleteExpressionWithNotFoundFieldsOrTypesInExpression)(schema, fromType, expression));
|
|
48
|
-
};
|
|
49
|
-
exports.deleteExpressionWithNotFoundFieldsOrTypesInFilter = deleteExpressionWithNotFoundFieldsOrTypesInFilter;
|
|
50
|
-
const deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression = (schema, queryExpression) => {
|
|
51
|
-
const { "q/from": fromExpression, "q/where": whereExpression, "q/order-by": orderByExpression } = queryExpression;
|
|
52
|
-
if (Object.hasOwn(schema.typeObjectsByName, fromExpression)) {
|
|
53
|
-
const typeObject = schema.typeObjectsByName[fromExpression];
|
|
54
|
-
return (0, pickBy_1.default)({
|
|
55
|
-
...queryExpression,
|
|
56
|
-
...(whereExpression
|
|
57
|
-
? {
|
|
58
|
-
"q/where": (0, visitors_1.deleteExpressionsWithNotFoundFieldsVisitor)(typeObject).visitExpression(whereExpression),
|
|
59
|
-
}
|
|
60
|
-
: null),
|
|
61
|
-
...(orderByExpression
|
|
62
|
-
? {
|
|
63
|
-
"q/order-by": (0, visitors_1.deleteExpressionsWithNotFoundFieldsVisitor)(typeObject).visitOrderByExpression(orderByExpression),
|
|
64
|
-
}
|
|
65
|
-
: null),
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
return null;
|
|
69
|
-
};
|
|
70
|
-
exports.deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression = deleteExpressionWithNotFoundFieldsOrTypesInQueryExpression;
|
|
71
|
-
const replaceNamesWithIdsInExpression = (schema, fromType, expression) => {
|
|
72
|
-
if (Object.hasOwn(schema.typeObjectsByName, fromType)) {
|
|
73
|
-
const typeObject = schema.typeObjectsByName[fromType];
|
|
74
|
-
return (0, visitors_1.replaceNamesWithIdsVisitor)(typeObject).visitExpression(expression);
|
|
75
|
-
}
|
|
76
|
-
return expression;
|
|
77
|
-
};
|
|
78
|
-
exports.replaceNamesWithIdsInExpression = replaceNamesWithIdsInExpression;
|
|
79
|
-
const replaceIdsWithNamesInExpression = (schema, fromTypeId, expression) => {
|
|
80
|
-
if (Object.hasOwn(schema.typeObjectsById, fromTypeId)) {
|
|
81
|
-
const typeObject = schema.typeObjectsById[fromTypeId];
|
|
82
|
-
return (0, visitors_1.replaceIdsWithNamesVisitor)(typeObject).visitExpression(expression);
|
|
83
|
-
}
|
|
84
|
-
return expression;
|
|
85
|
-
};
|
|
86
|
-
exports.replaceIdsWithNamesInExpression = replaceIdsWithNamesInExpression;
|
|
87
|
-
const visitViewUnit = (fromType, unit, visitor) => {
|
|
88
|
-
if (unit.kind === "user-button") {
|
|
89
|
-
return unit;
|
|
90
|
-
}
|
|
91
|
-
const { expression } = unit;
|
|
92
|
-
if (!expression) {
|
|
93
|
-
return unit;
|
|
94
|
-
}
|
|
95
|
-
// visitExpression preserves string[] shape; null results are filtered by isUnitExpressionValid downstream
|
|
96
|
-
return { ...unit, expression: visitor.visitExpression(fromType, expression) };
|
|
97
|
-
};
|
|
98
|
-
exports.visitViewUnit = visitViewUnit;
|
|
99
|
-
const visitContextExpression = (fromType, contextExpression, visitor) => {
|
|
100
|
-
const visitContextExpression = visitor.visitContextExpression
|
|
101
|
-
? visitor.visitContextExpression
|
|
102
|
-
: visitor.visitExpression;
|
|
103
|
-
return contextExpression ? visitContextExpression(fromType, contextExpression) : contextExpression;
|
|
104
|
-
};
|
|
105
|
-
exports.visitContextExpression = visitContextExpression;
|
|
106
|
-
const replaceIdsWithNamesInQueryExpression = (schema, queryExpression) => {
|
|
107
|
-
const { "q/from": fromExpression, "q/where": whereExpression, "q/order-by": orderByExpression } = queryExpression;
|
|
108
|
-
if (Object.hasOwn(schema.typeObjectsById, fromExpression)) {
|
|
109
|
-
const typeObject = schema.typeObjectsById[fromExpression];
|
|
110
|
-
return {
|
|
111
|
-
...queryExpression,
|
|
112
|
-
...{ "q/from": typeObject.name },
|
|
113
|
-
...(whereExpression
|
|
114
|
-
? {
|
|
115
|
-
"q/where": (0, visitors_1.replaceIdsWithNamesVisitor)(typeObject).visitExpression(whereExpression),
|
|
116
|
-
}
|
|
117
|
-
: null),
|
|
118
|
-
...(orderByExpression
|
|
119
|
-
? {
|
|
120
|
-
"q/order-by": (0, visitors_1.replaceIdsWithNamesVisitor)(typeObject).visitOrderByExpression(orderByExpression),
|
|
121
|
-
}
|
|
122
|
-
: null),
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
return queryExpression;
|
|
126
|
-
};
|
|
127
|
-
exports.replaceIdsWithNamesInQueryExpression = replaceIdsWithNamesInQueryExpression;
|
|
128
|
-
function visitFilterGroup(filter, visitExpression, _type) {
|
|
129
|
-
if (filter.kind !== "group") {
|
|
130
|
-
return null;
|
|
131
|
-
}
|
|
132
|
-
const group = filter;
|
|
133
|
-
return {
|
|
134
|
-
...group,
|
|
135
|
-
value: group.value.map((nestedFilter) => {
|
|
136
|
-
if (nestedFilter.kind === "group") {
|
|
137
|
-
return visitFilterGroup(nestedFilter, visitExpression);
|
|
138
|
-
}
|
|
139
|
-
const leaf = nestedFilter;
|
|
140
|
-
return {
|
|
141
|
-
...leaf,
|
|
142
|
-
value: {
|
|
143
|
-
...leaf.value,
|
|
144
|
-
expression: leaf.value.expression ? visitExpression(leaf.value.expression) : null,
|
|
145
|
-
},
|
|
146
|
-
};
|
|
147
|
-
}),
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
const replaceIdsWithNamesInFilter = (schema, fromType, filter) => {
|
|
151
|
-
if (Object.hasOwn(schema.typeObjectsById, fromType)) {
|
|
152
|
-
const typeObject = schema.typeObjectsById[fromType];
|
|
153
|
-
return filter
|
|
154
|
-
? visitFilterGroup(filter, (expression) => (0, visitors_1.replaceIdsWithNamesVisitor)(typeObject).visitExpression(expression), "ids")
|
|
155
|
-
: null;
|
|
156
|
-
}
|
|
157
|
-
return filter;
|
|
158
|
-
};
|
|
159
|
-
exports.replaceIdsWithNamesInFilter = replaceIdsWithNamesInFilter;
|
|
160
|
-
const replaceNamesWithIdsInFilter = (schema, fromType, filter) => {
|
|
161
|
-
if (Object.hasOwn(schema.typeObjectsByName, fromType)) {
|
|
162
|
-
const typeObject = schema.typeObjectsByName[fromType];
|
|
163
|
-
return filter
|
|
164
|
-
? visitFilterGroup(filter, (expression) => (0, visitors_1.replaceNamesWithIdsVisitor)(typeObject).visitExpression(expression), "names")
|
|
165
|
-
: null;
|
|
166
|
-
}
|
|
167
|
-
return filter;
|
|
168
|
-
};
|
|
169
|
-
exports.replaceNamesWithIdsInFilter = replaceNamesWithIdsInFilter;
|
|
170
|
-
const replaceNamesWithIdsInQueryExpression = (schema, queryExpression) => {
|
|
171
|
-
const { "q/from": fromExpression, "q/where": whereExpression, "q/order-by": orderByExpression } = queryExpression;
|
|
172
|
-
if (Object.hasOwn(schema.typeObjectsByName, fromExpression)) {
|
|
173
|
-
const typeObject = schema.typeObjectsByName[fromExpression];
|
|
174
|
-
return {
|
|
175
|
-
...queryExpression,
|
|
176
|
-
...{ "q/from": typeObject.id },
|
|
177
|
-
...(whereExpression
|
|
178
|
-
? {
|
|
179
|
-
"q/where": (0, visitors_1.replaceNamesWithIdsVisitor)(typeObject).visitExpression(whereExpression),
|
|
180
|
-
}
|
|
181
|
-
: null),
|
|
182
|
-
...(orderByExpression
|
|
183
|
-
? {
|
|
184
|
-
"q/order-by": (0, visitors_1.replaceNamesWithIdsVisitor)(typeObject).visitOrderByExpression(orderByExpression),
|
|
185
|
-
}
|
|
186
|
-
: null),
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
return queryExpression;
|
|
190
|
-
};
|
|
191
|
-
exports.replaceNamesWithIdsInQueryExpression = replaceNamesWithIdsInQueryExpression;
|
|
192
|
-
const deleteExpressionWithNotFoundFieldsOrTypesInExpression = (schema, fromType, expression) => {
|
|
193
|
-
if (Object.hasOwn(schema.typeObjectsByName, fromType)) {
|
|
194
|
-
const typeObject = schema.typeObjectsByName[fromType];
|
|
195
|
-
return (0, visitors_1.deleteExpressionsWithNotFoundFieldsVisitor)(typeObject).visitExpression(expression);
|
|
196
|
-
}
|
|
197
|
-
return null;
|
|
198
|
-
};
|
|
199
|
-
exports.deleteExpressionWithNotFoundFieldsOrTypesInExpression = deleteExpressionWithNotFoundFieldsOrTypesInExpression;
|
|
200
|
-
const resetContextExpressionIfBroken = (schema, fromType, expression, defaultExpression) => (0, exports.deleteExpressionWithNotFoundFieldsOrTypesInExpression)(schema, fromType, expression) || defaultExpression;
|
|
201
|
-
exports.resetContextExpressionIfBroken = resetContextExpressionIfBroken;
|
|
202
|
-
const isUnitExpressionValid = (unit) => {
|
|
203
|
-
if (Object.hasOwn(unit, "expression")) {
|
|
204
|
-
const { expression } = unit;
|
|
205
|
-
return expression !== null;
|
|
206
|
-
}
|
|
207
|
-
return true;
|
|
208
|
-
};
|
|
209
|
-
exports.isUnitExpressionValid = isUnitExpressionValid;
|
|
210
|
-
const getFieldObjectsById = (smartFolder, schema) => {
|
|
211
|
-
const meta = smartFolder["fibery/meta"];
|
|
212
|
-
const types = meta.items.map((item) => item.query["q/from"]);
|
|
213
|
-
return types.reduce((acc, type) => {
|
|
214
|
-
if (!Object.hasOwn(schema.typeObjectsById, type)) {
|
|
215
|
-
return acc;
|
|
216
|
-
}
|
|
217
|
-
const fieldObjects = schema.typeObjectsById[type].fieldObjectsById;
|
|
218
|
-
return { ...acc, ...fieldObjects };
|
|
219
|
-
}, {});
|
|
220
|
-
};
|
|
221
|
-
exports.getFieldObjectsById = getFieldObjectsById;
|
|
222
|
-
const replaceIdsWithNamesInUnitGroupKey = (unitGroupKey, fieldObjectsById) => {
|
|
223
|
-
const keyParts = unitGroupKey.split("|");
|
|
224
|
-
return keyParts
|
|
225
|
-
.map((keyPart) => {
|
|
226
|
-
const [unitType, ...rest] = keyPart.split("_");
|
|
227
|
-
if (unitType === "user-button") {
|
|
228
|
-
return keyPart;
|
|
229
|
-
}
|
|
230
|
-
const fieldId = rest.join("_");
|
|
231
|
-
if (!fieldId) {
|
|
232
|
-
return keyPart;
|
|
233
|
-
}
|
|
234
|
-
const fieldObject = fieldObjectsById[fieldId];
|
|
235
|
-
if (!fieldObject) {
|
|
236
|
-
return keyPart;
|
|
237
|
-
}
|
|
238
|
-
return `${unitType}_${fieldObject.holderType}:${fieldObject.name}`;
|
|
239
|
-
})
|
|
240
|
-
.filter(Boolean)
|
|
241
|
-
.join("|");
|
|
242
|
-
};
|
|
243
|
-
exports.replaceIdsWithNamesInUnitGroupKey = replaceIdsWithNamesInUnitGroupKey;
|
|
244
|
-
const replaceNamesWithIdsInUnitGroupKey = (unitGroupKey, schema) => {
|
|
245
|
-
const keyParts = unitGroupKey.split("|");
|
|
246
|
-
return keyParts
|
|
247
|
-
.map((keyPart) => {
|
|
248
|
-
const [unitType, ...rest] = keyPart.split("_");
|
|
249
|
-
if (unitType === "user-button") {
|
|
250
|
-
return keyPart;
|
|
251
|
-
}
|
|
252
|
-
const name = rest.join("_");
|
|
253
|
-
if (!name) {
|
|
254
|
-
return keyPart;
|
|
255
|
-
}
|
|
256
|
-
const [type, field] = name.split(":");
|
|
257
|
-
if (!field) {
|
|
258
|
-
return keyPart;
|
|
259
|
-
}
|
|
260
|
-
if (!Object.hasOwn(schema.typeObjectsByName, type)) {
|
|
261
|
-
return keyPart;
|
|
262
|
-
}
|
|
263
|
-
const typeObject = schema.typeObjectsByName[type];
|
|
264
|
-
if (!Object.hasOwn(typeObject.fieldObjectsByName, field)) {
|
|
265
|
-
return keyPart;
|
|
266
|
-
}
|
|
267
|
-
const fieldObject = typeObject.fieldObjectsByName[field];
|
|
268
|
-
return `${unitType}_${fieldObject.id}`;
|
|
269
|
-
})
|
|
270
|
-
.filter(Boolean)
|
|
271
|
-
.join("|");
|
|
272
|
-
};
|
|
273
|
-
exports.replaceNamesWithIdsInUnitGroupKey = replaceNamesWithIdsInUnitGroupKey;
|
package/lib/src/tsfixme.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type $TSFixMe = any;
|
package/lib/src/tsfixme.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AvatarCollection = void 0;
|
|
4
|
-
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
-
const _1 = require("@fibery/helpers/src/_");
|
|
6
|
-
const select_1 = require("@fibery/query-utils/src/select");
|
|
7
|
-
const avatar_1 = require("../field-utils/avatar");
|
|
8
|
-
const access_1 = require("../unit-utils/access");
|
|
9
|
-
const common_1 = require("../unit-utils/common");
|
|
10
|
-
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
11
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
12
|
-
const type = "avatar-collection";
|
|
13
|
-
exports.AvatarCollection = {
|
|
14
|
-
type,
|
|
15
|
-
name: "Avatar",
|
|
16
|
-
canEdit({ typeObject, unit: { expression } }) {
|
|
17
|
-
return (0, common_1.canEditFieldExpression)(typeObject, expression);
|
|
18
|
-
},
|
|
19
|
-
getLabel({ typeObject, unit }) {
|
|
20
|
-
return `Avatar of ${(0, get_field_label_1.getFieldLabel)({ typeObject, unit })}`;
|
|
21
|
-
},
|
|
22
|
-
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
23
|
-
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
24
|
-
const fieldObjects = (0, utils_1.getFieldObjectsByFieldExpression)({ typeObject, expression });
|
|
25
|
-
const terminalFieldObject = fieldObjects[fieldObjects.length - 1];
|
|
26
|
-
const collectionSubQuery = {
|
|
27
|
-
"q/from": expression,
|
|
28
|
-
"q/select": (0, select_1.mergeDenormalizedSelects)([
|
|
29
|
-
(0, select_1.toSelectMapClause)([terminalFieldObject.typeObject.idField, terminalFieldObject.typeObject.titleField]),
|
|
30
|
-
(0, access_1.generateAccessCheckQueryExpression)({ typeObject: terminalFieldObject.typeObject }),
|
|
31
|
-
(0, avatar_1.getAvatarSelectQuery)({ typeObject: terminalFieldObject.typeObject }),
|
|
32
|
-
].filter(_1.truthy)),
|
|
33
|
-
"q/limit": "q/no-limit",
|
|
34
|
-
};
|
|
35
|
-
return [...expression].reverse().reduce((inner, field, reversedIndex) => {
|
|
36
|
-
const originalIndex = expression.length - 1 - reversedIndex;
|
|
37
|
-
const isTerminal = originalIndex === expression.length - 1;
|
|
38
|
-
if (!isTerminal) {
|
|
39
|
-
const pathToField = expression.slice(0, originalIndex + 1);
|
|
40
|
-
const { idField } = fieldObjects[originalIndex].typeObject;
|
|
41
|
-
const innerForField = idField
|
|
42
|
-
? { [idField]: [...pathToField, idField], ...inner }
|
|
43
|
-
: { ...inner };
|
|
44
|
-
return { [field]: innerForField };
|
|
45
|
-
}
|
|
46
|
-
return { [field]: inner };
|
|
47
|
-
}, collectionSubQuery);
|
|
48
|
-
},
|
|
49
|
-
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
50
|
-
getExportValue: get_export_value_1.getReferenceCollectionExportValue,
|
|
51
|
-
canExport: () => true,
|
|
52
|
-
getExportLabel: get_field_label_1.getFieldLabel,
|
|
53
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AvatarInput = void 0;
|
|
4
|
-
const common_1 = require("../unit-utils/common");
|
|
5
|
-
const avatar_1 = require("./avatar");
|
|
6
|
-
const type = "avatar-input";
|
|
7
|
-
exports.AvatarInput = {
|
|
8
|
-
...avatar_1.Avatar,
|
|
9
|
-
type,
|
|
10
|
-
name: "Avatar",
|
|
11
|
-
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
12
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Avatar = void 0;
|
|
4
|
-
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
-
const _1 = require("@fibery/helpers/src/_");
|
|
6
|
-
const select_1 = require("@fibery/query-utils/src/select");
|
|
7
|
-
const avatar_1 = require("../field-utils/avatar");
|
|
8
|
-
const access_1 = require("../unit-utils/access");
|
|
9
|
-
const common_1 = require("../unit-utils/common");
|
|
10
|
-
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
11
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
12
|
-
const type = "avatar";
|
|
13
|
-
const getSelfAvatarSelectQuery = (typeObject) => (0, avatar_1.getAvatarSelectQuery)({ typeObject }) || {};
|
|
14
|
-
exports.Avatar = {
|
|
15
|
-
type,
|
|
16
|
-
name: "Avatar",
|
|
17
|
-
canEdit({ typeObject, unit: { expression } }) {
|
|
18
|
-
if (!expression) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
return (0, common_1.canEditFieldExpression)(typeObject, expression);
|
|
22
|
-
},
|
|
23
|
-
getLabel({ typeObject, unit }) {
|
|
24
|
-
const { expression } = unit;
|
|
25
|
-
if (expression) {
|
|
26
|
-
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
27
|
-
if ((0, avatar_1.isAvatarExtensionEnabledType)(fieldObject.typeObject)) {
|
|
28
|
-
return `Avatar of ${(0, get_field_label_1.getFieldLabel)({ typeObject, unit })}`;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return "Avatar";
|
|
32
|
-
},
|
|
33
|
-
makeUnit(args) {
|
|
34
|
-
if (!args) {
|
|
35
|
-
// @ts-expect-error this is a unique polymorphic unit
|
|
36
|
-
return { type, kind: "db" };
|
|
37
|
-
}
|
|
38
|
-
(0, utils_1.assertIsValidExpression)(args.expression);
|
|
39
|
-
return { type, kind: "field", expression: args.expression };
|
|
40
|
-
},
|
|
41
|
-
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
42
|
-
if (!expression) {
|
|
43
|
-
return getSelfAvatarSelectQuery(typeObject);
|
|
44
|
-
}
|
|
45
|
-
const fieldObjects = (0, utils_1.getFieldObjectsByFieldExpression)({ typeObject, expression });
|
|
46
|
-
const terminalFieldObject = fieldObjects[fieldObjects.length - 1];
|
|
47
|
-
if ((0, avatar_1.isAvatarExtensionField)(terminalFieldObject)) {
|
|
48
|
-
return getSelfAvatarSelectQuery(typeObject);
|
|
49
|
-
}
|
|
50
|
-
const innerSelect = (0, select_1.normalizeSelect)((0, select_1.mergeDenormalizedSelects)([
|
|
51
|
-
(0, select_1.toSelectMapClause)([terminalFieldObject.typeObject.idField, terminalFieldObject.typeObject.titleField]),
|
|
52
|
-
(0, access_1.generateAccessCheckQueryExpression)({ typeObject: terminalFieldObject.typeObject, contextPath: expression }),
|
|
53
|
-
(0, avatar_1.getAvatarSelectQuery)({ typeObject: terminalFieldObject.typeObject }),
|
|
54
|
-
].filter(_1.truthy)));
|
|
55
|
-
// Wrap in the full expression path (innermost to outermost).
|
|
56
|
-
// For intermediate reference fields, also include their entity's id so normalizr can normalize them.
|
|
57
|
-
const nested = [...expression].reverse().reduce((inner, field, reversedIndex) => {
|
|
58
|
-
const originalIndex = expression.length - 1 - reversedIndex;
|
|
59
|
-
const isTerminal = originalIndex === expression.length - 1;
|
|
60
|
-
if (!isTerminal) {
|
|
61
|
-
const { idField } = fieldObjects[originalIndex].typeObject;
|
|
62
|
-
const innerWithId = idField ? { [idField]: idField, ...inner } : inner;
|
|
63
|
-
return { [field]: innerWithId };
|
|
64
|
-
}
|
|
65
|
-
return { [field]: inner };
|
|
66
|
-
}, innerSelect);
|
|
67
|
-
return (0, select_1.denormalizeSelect)(nested);
|
|
68
|
-
},
|
|
69
|
-
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
70
|
-
getExportValue: ({ typeObject, unit, object }) => {
|
|
71
|
-
if (unit.kind === "field") {
|
|
72
|
-
return (0, get_export_value_1.getReferenceExportValue)({ typeObject, unit, object });
|
|
73
|
-
}
|
|
74
|
-
return null;
|
|
75
|
-
},
|
|
76
|
-
canExport: ({ unit }) => {
|
|
77
|
-
return unit.kind === "field";
|
|
78
|
-
},
|
|
79
|
-
getExportLabel: ({ unit, typeObject }) => {
|
|
80
|
-
const { expression } = unit;
|
|
81
|
-
if (expression) {
|
|
82
|
-
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
83
|
-
return fieldObject.title;
|
|
84
|
-
}
|
|
85
|
-
return "Avatar";
|
|
86
|
-
},
|
|
87
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BackReferencesList = void 0;
|
|
4
|
-
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
-
const query_1 = require("@fibery/query-utils/src/query");
|
|
6
|
-
const back_references_1 = require("../field-utils/back-references");
|
|
7
|
-
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
8
|
-
const common_1 = require("../unit-utils/common");
|
|
9
|
-
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
10
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
11
|
-
const type = "back-references-list";
|
|
12
|
-
const getQuerySelect = (fieldObject) => {
|
|
13
|
-
const { name, typeObject } = fieldObject;
|
|
14
|
-
const orderBy = (0, query_1.calculateDefaultOrderBy)({ typeObject });
|
|
15
|
-
return {
|
|
16
|
-
[name]: {
|
|
17
|
-
"q/from": [name],
|
|
18
|
-
"q/select": (0, back_references_1.getEntityLinksListSelect)(typeObject),
|
|
19
|
-
"q/order-by": orderBy,
|
|
20
|
-
"q/limit": "q/no-limit",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
exports.BackReferencesList = {
|
|
25
|
-
type,
|
|
26
|
-
name: "Back references list",
|
|
27
|
-
canEdit: can_edit_field_1.canEditField,
|
|
28
|
-
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
29
|
-
getLabel: get_field_label_1.getFieldLabel,
|
|
30
|
-
getQuerySelect: ({ typeObject, unit }) => {
|
|
31
|
-
const { expression } = unit;
|
|
32
|
-
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
33
|
-
return getQuerySelect(fieldObject);
|
|
34
|
-
},
|
|
35
|
-
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
36
|
-
getExportValue: get_export_value_1.getExportValue,
|
|
37
|
-
canExport: () => true,
|
|
38
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BoolCheckbox = void 0;
|
|
4
|
-
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
-
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
6
|
-
const common_1 = require("../unit-utils/common");
|
|
7
|
-
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
8
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
|
-
const type = "bool-checkbox";
|
|
10
|
-
exports.BoolCheckbox = {
|
|
11
|
-
type,
|
|
12
|
-
name: "Bool checkbox",
|
|
13
|
-
canEdit: can_edit_field_1.canEditField,
|
|
14
|
-
getLabel: get_field_label_1.getFieldLabel,
|
|
15
|
-
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
16
|
-
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
17
|
-
return (0, query_1.getQuerySelectForExpression)({
|
|
18
|
-
typeObject,
|
|
19
|
-
expression,
|
|
20
|
-
});
|
|
21
|
-
},
|
|
22
|
-
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
23
|
-
getExportValue: get_export_value_1.getExportValue,
|
|
24
|
-
canExport: () => true,
|
|
25
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Bool = void 0;
|
|
4
|
-
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
-
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
6
|
-
const common_1 = require("../unit-utils/common");
|
|
7
|
-
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
8
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
|
-
const type = "bool";
|
|
10
|
-
exports.Bool = {
|
|
11
|
-
type,
|
|
12
|
-
name: "Bool",
|
|
13
|
-
canEdit: can_edit_field_1.canEditField,
|
|
14
|
-
getLabel: get_field_label_1.getFieldLabel,
|
|
15
|
-
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
16
|
-
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
17
|
-
return (0, query_1.getQuerySelectForExpression)({ typeObject, expression });
|
|
18
|
-
},
|
|
19
|
-
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
20
|
-
getExportValue: get_export_value_1.getExportValue,
|
|
21
|
-
canExport: () => true,
|
|
22
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CollectionCount = void 0;
|
|
4
|
-
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
-
const reference_collection_1 = require("../field-utils/reference-collection");
|
|
6
|
-
const common_1 = require("../unit-utils/common");
|
|
7
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
8
|
-
const type = "collection-count";
|
|
9
|
-
exports.CollectionCount = {
|
|
10
|
-
type,
|
|
11
|
-
name: "Count",
|
|
12
|
-
canEdit: () => false,
|
|
13
|
-
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
14
|
-
getLabel({ typeObject, unit }) {
|
|
15
|
-
const { expression } = unit;
|
|
16
|
-
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
17
|
-
const label = (0, get_field_label_1.getFieldLabel)({ typeObject, unit });
|
|
18
|
-
if (fieldObject.name === "comments/comments") {
|
|
19
|
-
return label;
|
|
20
|
-
}
|
|
21
|
-
return `${label} Count`;
|
|
22
|
-
},
|
|
23
|
-
getQuerySelect({ unit: { expression } }) {
|
|
24
|
-
const countKey = (0, reference_collection_1.getCountKey)(expression.join("/"));
|
|
25
|
-
return { [countKey]: (0, reference_collection_1.makeCollectionCountExpression)(expression) };
|
|
26
|
-
},
|
|
27
|
-
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
28
|
-
getExportValue: ({ object, unit }) => {
|
|
29
|
-
return object[(0, reference_collection_1.getCountKey)(unit.expression.join("/"))];
|
|
30
|
-
},
|
|
31
|
-
canExport: () => true,
|
|
32
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColorInput = void 0;
|
|
4
|
-
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
-
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
6
|
-
const common_1 = require("../unit-utils/common");
|
|
7
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
8
|
-
const type = "color-input";
|
|
9
|
-
exports.ColorInput = {
|
|
10
|
-
type,
|
|
11
|
-
name: "Color",
|
|
12
|
-
canEdit: can_edit_field_1.canEditField,
|
|
13
|
-
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
14
|
-
getLabel: get_field_label_1.getFieldLabel,
|
|
15
|
-
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
16
|
-
return (0, query_1.getQuerySelectForExpression)({ typeObject, expression });
|
|
17
|
-
},
|
|
18
|
-
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
19
|
-
getExportValue: () => null,
|
|
20
|
-
canExport: () => false,
|
|
21
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommentsList = void 0;
|
|
4
|
-
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
-
const comments_1 = require("../field-utils/comments");
|
|
6
|
-
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
7
|
-
const common_1 = require("../unit-utils/common");
|
|
8
|
-
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
9
|
-
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
10
|
-
const type = "comments-list";
|
|
11
|
-
exports.CommentsList = {
|
|
12
|
-
type,
|
|
13
|
-
name: "Comments list",
|
|
14
|
-
canEdit: can_edit_field_1.canEditField,
|
|
15
|
-
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
16
|
-
getLabel: get_field_label_1.getFieldLabel,
|
|
17
|
-
getQuerySelect: ({ typeObject, unit }) => {
|
|
18
|
-
const { expression } = unit;
|
|
19
|
-
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
20
|
-
return (0, comments_1.getQuerySelect)(fieldObject);
|
|
21
|
-
},
|
|
22
|
-
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
23
|
-
getExportValue: get_export_value_1.getExportValue,
|
|
24
|
-
canExport: () => true,
|
|
25
|
-
};
|