@fibery/views 19.1.2 → 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 -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
|
@@ -1,67 +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.calculateReferenceCollectionQuery = exports.getCollectionCountSelect = exports.getCountKey = exports.makeCollectionCountExpression = exports.REFERENCE_COLLECTION_LIMIT = void 0;
|
|
7
|
-
const _1 = require("@fibery/helpers/src/_");
|
|
8
|
-
const select_1 = require("@fibery/query-utils/src/select");
|
|
9
|
-
const last_1 = __importDefault(require("lodash/last"));
|
|
10
|
-
const access_1 = require("../unit-utils/access");
|
|
11
|
-
const dynamic_keys_1 = require("../unit-utils/dynamic-keys");
|
|
12
|
-
const enums_1 = require("../unit-utils/enums");
|
|
13
|
-
const avatar_1 = require("./avatar");
|
|
14
|
-
const file_1 = require("./file");
|
|
15
|
-
const icon_1 = require("./icon");
|
|
16
|
-
exports.REFERENCE_COLLECTION_LIMIT = 1000;
|
|
17
|
-
const makeCollectionCountExpression = (field) => [
|
|
18
|
-
"q/count",
|
|
19
|
-
[...(Array.isArray(field) ? field : [field]), "fibery/id"],
|
|
20
|
-
];
|
|
21
|
-
exports.makeCollectionCountExpression = makeCollectionCountExpression;
|
|
22
|
-
const getCountKey = (field) => (0, dynamic_keys_1.makeDynamicKey)(dynamic_keys_1.collectionCountKeyPrefix, field);
|
|
23
|
-
exports.getCountKey = getCountKey;
|
|
24
|
-
const getCollectionCountSelect = (field) => ({
|
|
25
|
-
[(0, exports.getCountKey)(field)]: (0, exports.makeCollectionCountExpression)(field),
|
|
26
|
-
});
|
|
27
|
-
exports.getCollectionCountSelect = getCollectionCountSelect;
|
|
28
|
-
const calculateReferenceCollectionQuery = ({ fieldObjects, expression, limit, }) => {
|
|
29
|
-
const fieldObject = (0, last_1.default)(fieldObjects);
|
|
30
|
-
if (!fieldObject) {
|
|
31
|
-
return {};
|
|
32
|
-
}
|
|
33
|
-
const collectionSubQuery = {
|
|
34
|
-
"q/from": expression,
|
|
35
|
-
"q/select": (0, select_1.mergeDenormalizedSelects)([
|
|
36
|
-
(0, select_1.toSelectMapClause)([
|
|
37
|
-
fieldObject.typeObject.idField,
|
|
38
|
-
fieldObject.typeObject.titleField,
|
|
39
|
-
// keep public id - required to build Links
|
|
40
|
-
fieldObject.typeObject.publicIdField,
|
|
41
|
-
].filter(_1.truthy)),
|
|
42
|
-
(0, access_1.generateAccessCheckQueryExpression)({ typeObject: fieldObject.typeObject }),
|
|
43
|
-
(0, avatar_1.getAvatarSelectQuery)({ typeObject: fieldObject.typeObject }),
|
|
44
|
-
(0, icon_1.getEntityIconSelect)({ typeObject: fieldObject.typeObject }),
|
|
45
|
-
fieldObject.type === "fibery/file" && (0, file_1.getFilesSelect)(fieldObject),
|
|
46
|
-
(0, enums_1.getEnumIconColorQuery)({ typeObject: fieldObject.typeObject }),
|
|
47
|
-
].filter(_1.truthy)),
|
|
48
|
-
"q/limit": limit,
|
|
49
|
-
};
|
|
50
|
-
// Wrap the collection query in intermediate reference fields (innermost to outermost).
|
|
51
|
-
// For each intermediate field, include its entity's id so normalizr can normalize it.
|
|
52
|
-
return [...expression].reverse().reduce((inner, field, reversedIndex) => {
|
|
53
|
-
const originalIndex = expression.length - 1 - reversedIndex;
|
|
54
|
-
const isTerminal = originalIndex === expression.length - 1;
|
|
55
|
-
if (!isTerminal) {
|
|
56
|
-
const pathToField = expression.slice(0, originalIndex + 1);
|
|
57
|
-
const { idField } = fieldObjects[originalIndex].typeObject;
|
|
58
|
-
// `inner` already has the next field keyed, so spread it rather than re-keying it.
|
|
59
|
-
const innerForField = idField
|
|
60
|
-
? { [idField]: [...pathToField, idField], ...inner }
|
|
61
|
-
: { ...inner };
|
|
62
|
-
return { [field]: innerForField };
|
|
63
|
-
}
|
|
64
|
-
return { [field]: inner };
|
|
65
|
-
}, collectionSubQuery);
|
|
66
|
-
};
|
|
67
|
-
exports.calculateReferenceCollectionQuery = calculateReferenceCollectionQuery;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { FieldExpression } from "@fibery/expression-utils";
|
|
2
|
-
import type { Select } from "@fibery/expression-utils/src/types";
|
|
3
|
-
import type { FieldObject, TypeObject } from "@fibery/schema";
|
|
4
|
-
export declare const getReferenceTypeSelectClause: ({ typeObject }: {
|
|
5
|
-
typeObject: TypeObject;
|
|
6
|
-
}, contextPath: FieldExpression) => Select;
|
|
7
|
-
export declare const getReferenceFieldNormalizedSelectClause: (fieldObject: FieldObject, contextPath: FieldExpression) => any;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getReferenceFieldNormalizedSelectClause = exports.getReferenceTypeSelectClause = void 0;
|
|
4
|
-
const _1 = require("@fibery/helpers/src/_");
|
|
5
|
-
const select_1 = require("@fibery/query-utils/src/select");
|
|
6
|
-
const access_1 = require("../unit-utils/access");
|
|
7
|
-
const enums_1 = require("../unit-utils/enums");
|
|
8
|
-
const avatar_1 = require("./avatar");
|
|
9
|
-
const file_1 = require("./file");
|
|
10
|
-
const icon_1 = require("./icon");
|
|
11
|
-
const user_active_1 = require("./user-active");
|
|
12
|
-
const workflow_1 = require("./workflow");
|
|
13
|
-
const getReferenceTypeSelectClause = ({ typeObject }, contextPath) => {
|
|
14
|
-
return {
|
|
15
|
-
...(0, select_1.toSelectMapClause)([
|
|
16
|
-
typeObject.idField,
|
|
17
|
-
typeObject.publicIdField,
|
|
18
|
-
typeObject.titleField,
|
|
19
|
-
typeObject.rankField,
|
|
20
|
-
typeObject.name === "fibery/user" ? "user/email" : null,
|
|
21
|
-
].filter(_1.truthy)),
|
|
22
|
-
...(0, access_1.generateAccessCheckQueryExpression)({ typeObject, contextPath }),
|
|
23
|
-
...(0, workflow_1.getIsFinalStateSelect)({ typeObject, contextPath }),
|
|
24
|
-
...(0, user_active_1.getIsUserActiveSelect)({
|
|
25
|
-
typeObject,
|
|
26
|
-
contextPath,
|
|
27
|
-
}),
|
|
28
|
-
...(0, enums_1.getEnumIconColorQuery)({
|
|
29
|
-
typeObject,
|
|
30
|
-
contextPath,
|
|
31
|
-
}),
|
|
32
|
-
...(0, avatar_1.getAvatarSelectQuery)({ typeObject }),
|
|
33
|
-
...(0, icon_1.getEntityIconSelect)({ typeObject }),
|
|
34
|
-
...(typeObject.name === "fibery/file" ? (0, file_1.getFilesSelect)({ typeObject }) : null),
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
exports.getReferenceTypeSelectClause = getReferenceTypeSelectClause;
|
|
38
|
-
const getReferenceFieldNormalizedSelectClause = (fieldObject, contextPath) => {
|
|
39
|
-
const { typeObject } = fieldObject;
|
|
40
|
-
if (typeObject.isEntityRef) {
|
|
41
|
-
const pairs = fieldObject.multiRelatedFieldObjects.map((f) => {
|
|
42
|
-
const select = (0, exports.getReferenceTypeSelectClause)({ typeObject: f.holderTypeObject }, [
|
|
43
|
-
contextPath.concat(f.holderType),
|
|
44
|
-
]);
|
|
45
|
-
const normalizedSelect = (0, select_1.normalizeSelect)(select);
|
|
46
|
-
return [f.holderType, { ...normalizedSelect, [select_1.isSelectForMultiFieldKey]: true }];
|
|
47
|
-
});
|
|
48
|
-
return Object.fromEntries(pairs);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return (0, select_1.normalizeSelect)((0, exports.getReferenceTypeSelectClause)({ typeObject }, contextPath));
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
exports.getReferenceFieldNormalizedSelectClause = getReferenceFieldNormalizedSelectClause;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isRelationViewField = void 0;
|
|
4
|
-
const isRelationViewField = (fieldObject) => {
|
|
5
|
-
if (fieldObject.typeObject.isPrimitive ||
|
|
6
|
-
(!fieldObject.relation && !fieldObject.multiRelation) ||
|
|
7
|
-
fieldObject.typeObject.isEnum) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
return [":cardinality/one-to-many", ":cardinality/many-to-many"].includes(fieldObject.cardinality);
|
|
11
|
-
};
|
|
12
|
-
exports.isRelationViewField = isRelationViewField;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { FieldExpression } from "@fibery/expression-utils/src/types";
|
|
2
|
-
import type { TypeObject } from "@fibery/schema";
|
|
3
|
-
import type { FieldUnit } from "../units/types";
|
|
4
|
-
export declare const hasAccessToSecretKey: string;
|
|
5
|
-
export declare const getHasAccessToSecretExpr: (expression: FieldExpression) => (string | (string | import("@fibery/expression-utils/src/types").MultiFieldAccess)[])[];
|
|
6
|
-
export declare const getHasAccessToSecret: (expression: FieldExpression) => {
|
|
7
|
-
[hasAccessToSecretKey]: (string | (string | import("@fibery/expression-utils/src/types").MultiFieldAccess)[])[];
|
|
8
|
-
};
|
|
9
|
-
export declare function getRichTextQuerySelect({ typeObject, unit: { expression }, includeSnippet, }: {
|
|
10
|
-
typeObject: TypeObject;
|
|
11
|
-
unit: FieldUnit;
|
|
12
|
-
includeSnippet?: boolean;
|
|
13
|
-
}): any;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHasAccessToSecret = exports.getHasAccessToSecretExpr = exports.hasAccessToSecretKey = void 0;
|
|
4
|
-
exports.getRichTextQuerySelect = getRichTextQuerySelect;
|
|
5
|
-
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
6
|
-
const select_1 = require("@fibery/query-utils/src/select");
|
|
7
|
-
const dynamic_keys_1 = require("../unit-utils/dynamic-keys");
|
|
8
|
-
exports.hasAccessToSecretKey = (0, dynamic_keys_1.makeDynamicKey)(dynamic_keys_1.hasAccessToSecretKeyPrefix);
|
|
9
|
-
const getHasAccessToSecretExpr = (expression) => [
|
|
10
|
-
"q/access?",
|
|
11
|
-
[...expression, "Collaboration~Documents/secret"],
|
|
12
|
-
];
|
|
13
|
-
exports.getHasAccessToSecretExpr = getHasAccessToSecretExpr;
|
|
14
|
-
const getHasAccessToSecret = (expression) => ({
|
|
15
|
-
[exports.hasAccessToSecretKey]: (0, exports.getHasAccessToSecretExpr)(expression),
|
|
16
|
-
});
|
|
17
|
-
exports.getHasAccessToSecret = getHasAccessToSecret;
|
|
18
|
-
function getRichTextQuerySelect({ typeObject, unit: { expression }, includeSnippet, }) {
|
|
19
|
-
const fieldObjects = (0, utils_1.getFieldObjectsByFieldExpression)({ typeObject, expression });
|
|
20
|
-
const terminalFieldObject = fieldObjects[fieldObjects.length - 1];
|
|
21
|
-
const { typeObject: terminalTypeObject } = terminalFieldObject;
|
|
22
|
-
const innerNormalized = (0, select_1.normalizeSelect)({
|
|
23
|
-
...(0, exports.getHasAccessToSecret)(expression),
|
|
24
|
-
...(0, select_1.toSelectMapClause)([terminalTypeObject.idField, "Collaboration~Documents/secret"]),
|
|
25
|
-
...(includeSnippet ? (0, select_1.toSelectMapClause)([terminalTypeObject.idField, "Collaboration~Documents/Snippet"]) : {}),
|
|
26
|
-
});
|
|
27
|
-
const nested = [...expression].reverse().reduce((inner, field, reversedIndex) => {
|
|
28
|
-
const originalIndex = expression.length - 1 - reversedIndex;
|
|
29
|
-
const isTerminal = originalIndex === expression.length - 1;
|
|
30
|
-
if (!isTerminal) {
|
|
31
|
-
const { idField } = fieldObjects[originalIndex].typeObject;
|
|
32
|
-
const innerWithId = idField ? { [idField]: idField, ...inner } : inner;
|
|
33
|
-
return { [field]: innerWithId };
|
|
34
|
-
}
|
|
35
|
-
return { [field]: inner };
|
|
36
|
-
}, innerNormalized);
|
|
37
|
-
return (0, select_1.denormalizeSelect)(nested);
|
|
38
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { $TSFixMe } from "../tsfixme";
|
|
2
|
-
export declare const TextUIMetaKey = "ui/type";
|
|
3
|
-
export declare const TextUIMeta: {
|
|
4
|
-
Phone: string;
|
|
5
|
-
Email: string;
|
|
6
|
-
URL: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const TextTypes: {
|
|
9
|
-
CustomPhone: string;
|
|
10
|
-
CustomEmail: string;
|
|
11
|
-
CustomURL: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const TextTypeToFiberyType: {
|
|
14
|
-
[TextTypes.CustomPhone]: string;
|
|
15
|
-
[TextTypes.CustomEmail]: string;
|
|
16
|
-
[TextTypes.CustomURL]: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const TextTypeToUiMeta: {
|
|
19
|
-
[TextTypes.CustomPhone]: {
|
|
20
|
-
"ui/type": string;
|
|
21
|
-
};
|
|
22
|
-
[TextTypes.CustomEmail]: {
|
|
23
|
-
"ui/type": string;
|
|
24
|
-
};
|
|
25
|
-
[TextTypes.CustomURL]: {
|
|
26
|
-
"ui/type": string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export declare const TextUiMetaToTextType: {
|
|
30
|
-
[TextUIMeta.Phone]: string;
|
|
31
|
-
[TextUIMeta.Email]: string;
|
|
32
|
-
[TextUIMeta.URL]: string;
|
|
33
|
-
};
|
|
34
|
-
export declare const getTextType: (fieldMeta: $TSFixMe) => string;
|
|
35
|
-
export declare const getTextTypeLabel: (textType: string) => string;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTextTypeLabel = exports.getTextType = exports.TextUiMetaToTextType = exports.TextTypeToUiMeta = exports.TextTypeToFiberyType = exports.TextTypes = exports.TextUIMeta = exports.TextUIMetaKey = void 0;
|
|
4
|
-
exports.TextUIMetaKey = "ui/type";
|
|
5
|
-
exports.TextUIMeta = {
|
|
6
|
-
Phone: "phone",
|
|
7
|
-
Email: "email",
|
|
8
|
-
URL: "url",
|
|
9
|
-
};
|
|
10
|
-
exports.TextTypes = {
|
|
11
|
-
CustomPhone: "custom/phone",
|
|
12
|
-
CustomEmail: "custom/email",
|
|
13
|
-
CustomURL: "custom/url",
|
|
14
|
-
};
|
|
15
|
-
exports.TextTypeToFiberyType = {
|
|
16
|
-
[exports.TextTypes.CustomPhone]: "fibery/text",
|
|
17
|
-
[exports.TextTypes.CustomEmail]: "fibery/text",
|
|
18
|
-
[exports.TextTypes.CustomURL]: "fibery/text",
|
|
19
|
-
};
|
|
20
|
-
exports.TextTypeToUiMeta = {
|
|
21
|
-
[exports.TextTypes.CustomPhone]: { [exports.TextUIMetaKey]: exports.TextUIMeta.Phone },
|
|
22
|
-
[exports.TextTypes.CustomEmail]: { [exports.TextUIMetaKey]: exports.TextUIMeta.Email },
|
|
23
|
-
[exports.TextTypes.CustomURL]: { [exports.TextUIMetaKey]: exports.TextUIMeta.URL },
|
|
24
|
-
};
|
|
25
|
-
exports.TextUiMetaToTextType = {
|
|
26
|
-
[exports.TextUIMeta.Phone]: exports.TextTypes.CustomPhone,
|
|
27
|
-
[exports.TextUIMeta.Email]: exports.TextTypes.CustomEmail,
|
|
28
|
-
[exports.TextUIMeta.URL]: exports.TextTypes.CustomURL,
|
|
29
|
-
};
|
|
30
|
-
const getTextType = (fieldMeta) => exports.TextUiMetaToTextType[fieldMeta[exports.TextUIMetaKey]] || "fibery/text";
|
|
31
|
-
exports.getTextType = getTextType;
|
|
32
|
-
const getTextTypeLabel = (textType) => {
|
|
33
|
-
const labels = {
|
|
34
|
-
[exports.TextTypes.CustomPhone]: "Phone",
|
|
35
|
-
[exports.TextTypes.CustomEmail]: "Email",
|
|
36
|
-
[exports.TextTypes.CustomURL]: "URL",
|
|
37
|
-
};
|
|
38
|
-
return labels[textType] || "Text";
|
|
39
|
-
};
|
|
40
|
-
exports.getTextTypeLabel = getTextTypeLabel;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { FieldExpression } from "@fibery/expression-utils";
|
|
2
|
-
import type { TypeObject } from "@fibery/schema";
|
|
3
|
-
export declare const getIsUserActiveSelect: ({ typeObject, contextPath, }: {
|
|
4
|
-
typeObject: TypeObject;
|
|
5
|
-
contextPath?: FieldExpression;
|
|
6
|
-
}) => {
|
|
7
|
-
[x: string]: (string | (string | import("@fibery/expression-utils").MultiFieldAccess)[])[];
|
|
8
|
-
} | null;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIsUserActiveSelect = void 0;
|
|
4
|
-
const _1 = require("@fibery/helpers/src/_");
|
|
5
|
-
const dynamic_keys_1 = require("../unit-utils/dynamic-keys");
|
|
6
|
-
const getIsUserActiveQueryPredicate = (0, _1.memoize)(({ typeObject, contextPath }) => {
|
|
7
|
-
if (typeObject.name !== "fibery/user") {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
const pathToPrimitiveField = [...contextPath, "fibery/active?"];
|
|
11
|
-
const expression = ["=", pathToPrimitiveField, "$true"];
|
|
12
|
-
return {
|
|
13
|
-
// No sense in adding additional key to "makeDynamicKey" here.
|
|
14
|
-
// User active state is the same, regardless of contextPath we retrieve it with.
|
|
15
|
-
key: (0, dynamic_keys_1.makeDynamicKey)(dynamic_keys_1.isUserActiveDynamicKeyPrefix),
|
|
16
|
-
expression,
|
|
17
|
-
};
|
|
18
|
-
}, ({ typeObject, contextPath }) => `${typeObject.name}_${typeObject.version}_${contextPath.join(",")}`);
|
|
19
|
-
const getIsUserActiveSelect = ({ typeObject, contextPath = [], }) => {
|
|
20
|
-
const isUserActiveQueryPredicate = getIsUserActiveQueryPredicate({ typeObject, contextPath });
|
|
21
|
-
return isUserActiveQueryPredicate ? { [isUserActiveQueryPredicate.key]: isUserActiveQueryPredicate.expression } : null;
|
|
22
|
-
};
|
|
23
|
-
exports.getIsUserActiveSelect = getIsUserActiveSelect;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getUserRoleByKey = exports.isUserRoleField = void 0;
|
|
4
|
-
const roles = [
|
|
5
|
-
{
|
|
6
|
-
key: "role/admin",
|
|
7
|
-
label: "Admin",
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
key: "role/member",
|
|
11
|
-
label: "Member",
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
key: "role/observer",
|
|
15
|
-
label: "Observer",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
key: "role/guest",
|
|
19
|
-
label: "Guest",
|
|
20
|
-
},
|
|
21
|
-
];
|
|
22
|
-
const isUserRoleField = (fieldObject) => fieldObject.holderType === "fibery/user" && fieldObject.name === "fibery/role";
|
|
23
|
-
exports.isUserRoleField = isUserRoleField;
|
|
24
|
-
const getUserRoleByKey = (roleKey) => roles.find(({ key }) => key === roleKey);
|
|
25
|
-
exports.getUserRoleByKey = getUserRoleByKey;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { FieldExpression } from "@fibery/expression-utils";
|
|
2
|
-
import type { TypeObject } from "@fibery/schema";
|
|
3
|
-
export declare function isWorkflowType(typeObject: TypeObject): boolean;
|
|
4
|
-
export declare const getWorkflowFieldObject: (typeObject: TypeObject) => import("@fibery/schema").FieldObject | undefined;
|
|
5
|
-
export declare const getIsFinalStateSelect: ({ typeObject, contextPath, }: {
|
|
6
|
-
typeObject: TypeObject;
|
|
7
|
-
contextPath?: FieldExpression;
|
|
8
|
-
}) => {
|
|
9
|
-
[x: string]: (string | (string | import("@fibery/expression-utils").MultiFieldAccess)[])[];
|
|
10
|
-
} | null;
|
|
11
|
-
export declare function getWorkflowTypeSelect(typeObject: TypeObject): {
|
|
12
|
-
"workflow/Type": string[];
|
|
13
|
-
} | {
|
|
14
|
-
"workflow/Type"?: undefined;
|
|
15
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIsFinalStateSelect = exports.getWorkflowFieldObject = void 0;
|
|
4
|
-
exports.isWorkflowType = isWorkflowType;
|
|
5
|
-
exports.getWorkflowTypeSelect = getWorkflowTypeSelect;
|
|
6
|
-
const _1 = require("@fibery/helpers/src/_");
|
|
7
|
-
const dynamic_keys_1 = require("../unit-utils/dynamic-keys");
|
|
8
|
-
function isWorkflowType(typeObject) {
|
|
9
|
-
return typeObject.isEnum && typeObject.nameParts.namespace === "workflow";
|
|
10
|
-
}
|
|
11
|
-
const getWorkflowFieldObject = (typeObject) => {
|
|
12
|
-
const isWorkflowEnabledForType = typeObject.installedMixins.has("workflow/workflow");
|
|
13
|
-
let workflowFieldObject;
|
|
14
|
-
if (isWorkflowEnabledForType) {
|
|
15
|
-
workflowFieldObject = typeObject.fieldObjects.find((fieldObject) => {
|
|
16
|
-
if (fieldObject.nameParts.namespace === "workflow") {
|
|
17
|
-
return fieldObject.typeObject.fieldObjects.find((x) => x.name === "workflow/Final");
|
|
18
|
-
}
|
|
19
|
-
return false;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return workflowFieldObject;
|
|
23
|
-
};
|
|
24
|
-
exports.getWorkflowFieldObject = getWorkflowFieldObject;
|
|
25
|
-
const getIsFinalStateQueryPredicate = (0, _1.memoize)(({ typeObject, contextPath }) => {
|
|
26
|
-
const workflowFieldObject = (0, exports.getWorkflowFieldObject)(typeObject);
|
|
27
|
-
if (workflowFieldObject) {
|
|
28
|
-
const pathToFinal = [...contextPath, workflowFieldObject.name, "workflow/Final"];
|
|
29
|
-
const expression = ["=", pathToFinal, "$true"];
|
|
30
|
-
return {
|
|
31
|
-
key: (0, dynamic_keys_1.makeDynamicKey)(dynamic_keys_1.isFinalStateDynamicKeyPrefix),
|
|
32
|
-
expression,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
}, ({ typeObject, contextPath }) => {
|
|
39
|
-
return `${typeObject.name}_${typeObject.version}_${contextPath.join(",")}`;
|
|
40
|
-
});
|
|
41
|
-
const getIsFinalStateSelect = ({ typeObject, contextPath = [], }) => {
|
|
42
|
-
const isFinalStateQueryPredicate = getIsFinalStateQueryPredicate({ typeObject, contextPath });
|
|
43
|
-
return isFinalStateQueryPredicate ? { [isFinalStateQueryPredicate.key]: isFinalStateQueryPredicate.expression } : null;
|
|
44
|
-
};
|
|
45
|
-
exports.getIsFinalStateSelect = getIsFinalStateSelect;
|
|
46
|
-
function getWorkflowTypeSelect(typeObject) {
|
|
47
|
-
if (isWorkflowType(typeObject)) {
|
|
48
|
-
return {
|
|
49
|
-
"workflow/Type": ["workflow/Type"],
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
return {};
|
|
53
|
-
}
|
package/lib/src/index.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Expression } from "@fibery/expression-utils/src/types";
|
|
2
|
-
import type { FieldObject, Schema } from "@fibery/schema";
|
|
3
|
-
import type { UnitDefinitions, ViewRecord } from "./private/utils";
|
|
4
|
-
import type { Unit } from "./units/types";
|
|
5
|
-
export { deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder, replaceIdsWithNamesInSmartFolder, replaceNamesWithIdsInSmartFolder, } from "./private/smart-folder";
|
|
6
|
-
export { InvalidMetaError } from "./errors";
|
|
7
|
-
export { assertMetaValid, isMetaValid } from "./meta-validation";
|
|
8
|
-
export declare const deleteExpressionWithNotFoundFieldsOrTypesInView: (schema: Schema, view: ViewRecord, ensureAxisInvariant?: boolean) => any;
|
|
9
|
-
export declare const fixUserSelectedUnits: (schema: Schema, view: ViewRecord, { unitDefinitions, getDefaultUnitTypeForField, }: {
|
|
10
|
-
unitDefinitions: UnitDefinitions;
|
|
11
|
-
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
12
|
-
}) => any;
|
|
13
|
-
export declare const fixContextExpressionWithBrokenPath: (schema: Schema, view: ViewRecord, defaultContextExpression: Expression) => any;
|
|
14
|
-
/**
|
|
15
|
-
* Removes garbage from view's meta to reduce the size.
|
|
16
|
-
*/
|
|
17
|
-
export declare const collectGarbage: (schema: Schema, view: ViewRecord) => unknown;
|
|
18
|
-
export declare const replaceNamesWithIdsInView: (schema: Schema, view: ViewRecord) => any;
|
|
19
|
-
export declare const replaceIdsWithNamesInView: (schema: Schema, view: ViewRecord) => any;
|
|
20
|
-
type ViewMeta = {
|
|
21
|
-
items: {
|
|
22
|
-
query: {
|
|
23
|
-
"q/from": string;
|
|
24
|
-
};
|
|
25
|
-
}[];
|
|
26
|
-
};
|
|
27
|
-
export declare const getViewCardTypes: ({ "fibery/meta": { items } }: {
|
|
28
|
-
"fibery/meta": ViewMeta;
|
|
29
|
-
}) => string[];
|
|
30
|
-
export declare const migrateHideWhenEmptyToUnitsLevel: (view: ViewRecord) => any;
|