@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
package/package.json
CHANGED
|
@@ -1,69 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/views",
|
|
3
|
-
"version": "
|
|
4
|
-
"private": false,
|
|
3
|
+
"version": "20.0.1",
|
|
5
4
|
"description": "Operations on view objects",
|
|
6
5
|
"license": "UNLICENSED",
|
|
7
6
|
"author": "Fibery",
|
|
8
7
|
"files": [
|
|
9
|
-
"
|
|
8
|
+
"lib"
|
|
10
9
|
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
11
12
|
"main": "./lib/index.js",
|
|
13
|
+
"types": "./lib/index.d.ts",
|
|
12
14
|
"exports": {
|
|
13
15
|
".": {
|
|
14
|
-
"@fibery/source": "./index.ts",
|
|
15
16
|
"types": "./lib/index.d.ts",
|
|
16
17
|
"default": "./lib/index.js"
|
|
17
18
|
},
|
|
18
19
|
"./src/*": {
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"default": "./src/*"
|
|
22
|
-
},
|
|
23
|
-
"types": "./lib/src/*.d.ts",
|
|
24
|
-
"default": "./lib/src/*.js"
|
|
20
|
+
"types": "./lib/*.d.ts",
|
|
21
|
+
"default": "./lib/*.js"
|
|
25
22
|
},
|
|
26
23
|
"./src/unit-definitions": {
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"default": "./lib/src/unit-definitions/index.js"
|
|
24
|
+
"types": "./lib/unit-definitions/index.d.ts",
|
|
25
|
+
"default": "./lib/unit-definitions/index.js"
|
|
30
26
|
},
|
|
31
27
|
"./src/units/canvas": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"default": "./lib/src/units/canvas/index.js"
|
|
28
|
+
"types": "./lib/units/canvas/index.d.ts",
|
|
29
|
+
"default": "./lib/units/canvas/index.js"
|
|
35
30
|
}
|
|
36
31
|
},
|
|
37
32
|
"dependencies": {
|
|
38
33
|
"date-fns": "2.29.2",
|
|
39
34
|
"lodash": "4.17.21",
|
|
40
35
|
"moment": "2.29.4",
|
|
41
|
-
"@fibery/
|
|
42
|
-
"@fibery/
|
|
43
|
-
"@fibery/query-utils": "
|
|
44
|
-
"@fibery/
|
|
45
|
-
"@fibery/schema": "10.2.18"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@babel/core": "7.28.5",
|
|
49
|
-
"@types/lodash": "4.14.172",
|
|
50
|
-
"immutability-helper": "2.4.0",
|
|
51
|
-
"typescript": "6.0.1-rc",
|
|
52
|
-
"@fibery/babel-preset": "7.4.2"
|
|
36
|
+
"@fibery/expression-utils": "10.0.1",
|
|
37
|
+
"@fibery/helpers": "3.2.1",
|
|
38
|
+
"@fibery/query-utils": "2.0.1",
|
|
39
|
+
"@fibery/schema": "10.3.1"
|
|
53
40
|
},
|
|
54
41
|
"peerDependencies": {
|
|
55
|
-
"@fibery/expression-utils": "^
|
|
56
|
-
"@fibery/schema": "^10.
|
|
42
|
+
"@fibery/expression-utils": "^10.0.1",
|
|
43
|
+
"@fibery/schema": "^10.3.1",
|
|
57
44
|
"immutability-helper": "^2.4.0",
|
|
58
45
|
"lodash": "4.17.21"
|
|
59
|
-
}
|
|
60
|
-
"scripts": {
|
|
61
|
-
"build": "rm -rf lib && tsc --project tsconfig.build.json",
|
|
62
|
-
"test": "../../scripts/test.sh",
|
|
63
|
-
"test:ci": "../../scripts/test.sh --ci",
|
|
64
|
-
"test:coverage": "../../scripts/test.sh --ci --coverage",
|
|
65
|
-
"check": "../../scripts/check.sh",
|
|
66
|
-
"lint": "pnpm -w lint ."
|
|
67
|
-
},
|
|
68
|
-
"types": "./lib/index.d.ts"
|
|
46
|
+
}
|
|
69
47
|
}
|
package/lib/src/errors.d.ts
DELETED
package/lib/src/errors.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { FieldObject, TypeObject } from "@fibery/schema";
|
|
2
|
-
export declare const AVATAR_MIXIN_NAME = "avatar/avatar-mixin";
|
|
3
|
-
export declare const AVATAR_EXTENSION_FIELD = "avatar/avatars";
|
|
4
|
-
export declare const isAvatarExtensionEnabledType: (typeObject: TypeObject) => boolean;
|
|
5
|
-
export declare const isAvatarExtensionField: (fieldObject: FieldObject) => boolean;
|
|
6
|
-
export declare const getAvatarSelect: (fieldObject: FieldObject) => import("@fibery/expression-utils").Select;
|
|
7
|
-
export declare const getAvatarSelectQuery: ({ typeObject }: {
|
|
8
|
-
typeObject: TypeObject;
|
|
9
|
-
}) => {
|
|
10
|
-
[x: string]: "fibery/id" | "__NOTHING_INTERESTING__TitleField__" | {
|
|
11
|
-
"q/from": string[];
|
|
12
|
-
"q/limit": string;
|
|
13
|
-
"q/select": import("@fibery/expression-utils").Select;
|
|
14
|
-
};
|
|
15
|
-
"fibery/id": "fibery/id";
|
|
16
|
-
__NOTHING_INTERESTING__TitleField__: "__NOTHING_INTERESTING__TitleField__";
|
|
17
|
-
} | {
|
|
18
|
-
"fibery/id"?: undefined;
|
|
19
|
-
__NOTHING_INTERESTING__TitleField__?: undefined;
|
|
20
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAvatarSelectQuery = exports.getAvatarSelect = exports.isAvatarExtensionField = exports.isAvatarExtensionEnabledType = exports.AVATAR_EXTENSION_FIELD = exports.AVATAR_MIXIN_NAME = void 0;
|
|
4
|
-
const _1 = require("@fibery/helpers/src/_");
|
|
5
|
-
const select_1 = require("@fibery/query-utils/src/select");
|
|
6
|
-
exports.AVATAR_MIXIN_NAME = "avatar/avatar-mixin";
|
|
7
|
-
exports.AVATAR_EXTENSION_FIELD = "avatar/avatars";
|
|
8
|
-
const isAvatarExtensionEnabledType = (typeObject) => {
|
|
9
|
-
return (typeObject &&
|
|
10
|
-
typeObject.installedMixins.has(exports.AVATAR_MIXIN_NAME) &&
|
|
11
|
-
(0, exports.isAvatarExtensionField)(typeObject.fieldObjectsByName[exports.AVATAR_EXTENSION_FIELD]));
|
|
12
|
-
};
|
|
13
|
-
exports.isAvatarExtensionEnabledType = isAvatarExtensionEnabledType;
|
|
14
|
-
const isAvatarExtensionField = (fieldObject) => {
|
|
15
|
-
return fieldObject.name === exports.AVATAR_EXTENSION_FIELD && fieldObject.type === "fibery/file";
|
|
16
|
-
};
|
|
17
|
-
exports.isAvatarExtensionField = isAvatarExtensionField;
|
|
18
|
-
const getAvatarSelect = (fieldObject) => (0, select_1.toSelectMapClause)([fieldObject.typeObject.idField, fieldObject.typeObject.titleField, "fibery/content-type", "fibery/secret"].filter(_1.truthy));
|
|
19
|
-
exports.getAvatarSelect = getAvatarSelect;
|
|
20
|
-
const getAvatarSelectQuery = ({ typeObject }) => {
|
|
21
|
-
if ((0, exports.isAvatarExtensionEnabledType)(typeObject)) {
|
|
22
|
-
const fieldObject = typeObject.fieldObjectsByName[exports.AVATAR_EXTENSION_FIELD];
|
|
23
|
-
const idField = fieldObject.typeObject.idField;
|
|
24
|
-
const typeTitleField = typeObject.titleField;
|
|
25
|
-
return {
|
|
26
|
-
[idField]: idField,
|
|
27
|
-
[typeTitleField]: typeTitleField,
|
|
28
|
-
[fieldObject.name]: {
|
|
29
|
-
"q/from": [fieldObject.name],
|
|
30
|
-
"q/limit": "q/no-limit",
|
|
31
|
-
"q/select": (0, exports.getAvatarSelect)(fieldObject),
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return {};
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
exports.getAvatarSelectQuery = getAvatarSelectQuery;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { FieldObject, TypeObject } from "@fibery/schema";
|
|
2
|
-
export declare const isReferenceExtensionField: (fieldObject: FieldObject) => boolean;
|
|
3
|
-
export declare const getEntityLinksListSelect: (typeObject: TypeObject) => {
|
|
4
|
-
"fibery/id": "fibery/id";
|
|
5
|
-
"fibery/creation-date": string;
|
|
6
|
-
"Collaboration~Documents/ParagraphSecret": string;
|
|
7
|
-
"Collaboration~Documents/FromTypeId": string;
|
|
8
|
-
"Collaboration~Documents/FromEntityId": string;
|
|
9
|
-
"Collaboration~Documents/FromEntityField": {
|
|
10
|
-
"fibery/id": string[];
|
|
11
|
-
};
|
|
12
|
-
"fibery/created-by": {
|
|
13
|
-
"fibery/id": string[];
|
|
14
|
-
};
|
|
15
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEntityLinksListSelect = exports.isReferenceExtensionField = void 0;
|
|
4
|
-
const isReferenceExtensionField = (fieldObject) => fieldObject.type === "Collaboration~Documents/Reference";
|
|
5
|
-
exports.isReferenceExtensionField = isReferenceExtensionField;
|
|
6
|
-
const getEntityLinksListSelect = (typeObject) => {
|
|
7
|
-
return {
|
|
8
|
-
[typeObject.idField]: typeObject.idField,
|
|
9
|
-
"fibery/creation-date": "fibery/creation-date",
|
|
10
|
-
"Collaboration~Documents/ParagraphSecret": "Collaboration~Documents/ParagraphSecret",
|
|
11
|
-
"Collaboration~Documents/FromTypeId": "Collaboration~Documents/FromTypeId",
|
|
12
|
-
"Collaboration~Documents/FromEntityId": "Collaboration~Documents/FromEntityId",
|
|
13
|
-
"Collaboration~Documents/FromEntityField": {
|
|
14
|
-
"fibery/id": ["Collaboration~Documents/FromEntityField", "fibery/id"],
|
|
15
|
-
},
|
|
16
|
-
"fibery/created-by": {
|
|
17
|
-
"fibery/id": ["fibery/created-by", "fibery/id"],
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
exports.getEntityLinksListSelect = getEntityLinksListSelect;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { FieldObject, TypeObject } from "@fibery/schema";
|
|
2
|
-
import { accessCheckKey } from "../unit-utils/access";
|
|
3
|
-
export declare const isCommentExtensionField: (fieldObject: FieldObject) => boolean;
|
|
4
|
-
export declare const getCommentsListSelect: (typeObject: TypeObject) => {
|
|
5
|
-
"fibery/id": "fibery/id";
|
|
6
|
-
"fibery/public-id": "fibery/public-id";
|
|
7
|
-
"fibery/creation-date": string;
|
|
8
|
-
"comment/document-secret": string;
|
|
9
|
-
"comments/parent": {
|
|
10
|
-
"fibery/id": string[];
|
|
11
|
-
};
|
|
12
|
-
"fibery/created-by": {
|
|
13
|
-
[accessCheckKey]: (string | string[])[];
|
|
14
|
-
"fibery/id": string[];
|
|
15
|
-
"user/email": string[];
|
|
16
|
-
"user/name": string[];
|
|
17
|
-
"avatar/avatars": {
|
|
18
|
-
"q/from": string[];
|
|
19
|
-
"q/limit": string;
|
|
20
|
-
"q/select": {
|
|
21
|
-
"fibery/id": string[];
|
|
22
|
-
"fibery/name": string[];
|
|
23
|
-
"fibery/content-type": string[];
|
|
24
|
-
"fibery/secret": string[];
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export declare const getQuerySelect: (fieldObject: FieldObject) => {
|
|
30
|
-
[name]: {
|
|
31
|
-
"q/from": string[];
|
|
32
|
-
"q/select": {
|
|
33
|
-
"fibery/id": "fibery/id";
|
|
34
|
-
"fibery/public-id": "fibery/public-id";
|
|
35
|
-
"fibery/creation-date": string;
|
|
36
|
-
"comment/document-secret": string;
|
|
37
|
-
"comments/parent": {
|
|
38
|
-
"fibery/id": string[];
|
|
39
|
-
};
|
|
40
|
-
"fibery/created-by": {
|
|
41
|
-
[accessCheckKey]: (string | string[])[];
|
|
42
|
-
"fibery/id": string[];
|
|
43
|
-
"user/email": string[];
|
|
44
|
-
"user/name": string[];
|
|
45
|
-
"avatar/avatars": {
|
|
46
|
-
"q/from": string[];
|
|
47
|
-
"q/limit": string;
|
|
48
|
-
"q/select": {
|
|
49
|
-
"fibery/id": string[];
|
|
50
|
-
"fibery/name": string[];
|
|
51
|
-
"fibery/content-type": string[];
|
|
52
|
-
"fibery/secret": string[];
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
"q/order-by": import("@fibery/expression-utils").OrderBy | undefined;
|
|
58
|
-
"q/limit": string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getQuerySelect = exports.getCommentsListSelect = exports.isCommentExtensionField = void 0;
|
|
4
|
-
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
-
const access_1 = require("../unit-utils/access");
|
|
6
|
-
const isCommentExtensionField = (fieldObject) => fieldObject.name === "comments/comments";
|
|
7
|
-
exports.isCommentExtensionField = isCommentExtensionField;
|
|
8
|
-
const getCommentsListSelect = (typeObject) => {
|
|
9
|
-
return {
|
|
10
|
-
[typeObject.idField]: typeObject.idField,
|
|
11
|
-
[typeObject.publicIdField]: typeObject.publicIdField,
|
|
12
|
-
"fibery/creation-date": "fibery/creation-date",
|
|
13
|
-
"comment/document-secret": "comment/document-secret",
|
|
14
|
-
"comments/parent": { "fibery/id": ["comments/parent", "fibery/id"] },
|
|
15
|
-
"fibery/created-by": {
|
|
16
|
-
[access_1.accessCheckKey]: ["q/access?", ["fibery/created-by", "user/name"]],
|
|
17
|
-
"fibery/id": ["fibery/created-by", "fibery/id"],
|
|
18
|
-
"user/email": ["fibery/created-by", "user/email"],
|
|
19
|
-
"user/name": ["fibery/created-by", "user/name"],
|
|
20
|
-
"avatar/avatars": {
|
|
21
|
-
"q/from": ["fibery/created-by", "avatar/avatars"],
|
|
22
|
-
"q/limit": "q/no-limit",
|
|
23
|
-
"q/select": {
|
|
24
|
-
"fibery/id": ["fibery/id"],
|
|
25
|
-
"fibery/name": ["fibery/name"],
|
|
26
|
-
"fibery/content-type": ["fibery/content-type"],
|
|
27
|
-
"fibery/secret": ["fibery/secret"],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
exports.getCommentsListSelect = getCommentsListSelect;
|
|
34
|
-
const getQuerySelect = (fieldObject) => {
|
|
35
|
-
const { name, typeObject } = fieldObject;
|
|
36
|
-
const orderBy = (0, query_1.calculateDefaultOrderBy)({ typeObject });
|
|
37
|
-
return {
|
|
38
|
-
[name]: {
|
|
39
|
-
"q/from": [name],
|
|
40
|
-
"q/select": (0, exports.getCommentsListSelect)(typeObject),
|
|
41
|
-
"q/order-by": orderBy,
|
|
42
|
-
"q/limit": "q/no-limit",
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
exports.getQuerySelect = getQuerySelect;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Moment, MomentInput, unitOfTime } from "moment/moment";
|
|
2
|
-
export declare const parseDate: (isoDate: MomentInput) => Moment;
|
|
3
|
-
export declare const serializeDate: (momentDate: Moment) => string;
|
|
4
|
-
export declare const parseDateTime: (isoDateTime: MomentInput) => Moment;
|
|
5
|
-
export declare const serializeDateTime: (momentDate: Moment) => string;
|
|
6
|
-
export declare const parseStart: ({ value, type }: {
|
|
7
|
-
value: MomentInput;
|
|
8
|
-
type: string;
|
|
9
|
-
}) => Moment;
|
|
10
|
-
export declare const parseEnd: ({ value, type, minimumDelta, }: {
|
|
11
|
-
value: MomentInput;
|
|
12
|
-
type: string;
|
|
13
|
-
minimumDelta?: [number, unitOfTime.DurationConstructor] | null;
|
|
14
|
-
}) => Moment;
|
|
@@ -1,56 +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.parseEnd = exports.parseStart = exports.serializeDateTime = exports.parseDateTime = exports.serializeDate = exports.parseDate = void 0;
|
|
7
|
-
const errors_1 = require("@fibery/expression-utils/src/errors");
|
|
8
|
-
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
9
|
-
const moment_1 = __importDefault(require("moment/moment"));
|
|
10
|
-
const defaultDateDelta = [1, "day"];
|
|
11
|
-
const defaultDateTimeDelta = [1, "second"];
|
|
12
|
-
const parseDate = (isoDate) => {
|
|
13
|
-
return (0, moment_1.default)(isoDate).set({ hour: 12 });
|
|
14
|
-
};
|
|
15
|
-
exports.parseDate = parseDate;
|
|
16
|
-
const serializeDate = (momentDate) => {
|
|
17
|
-
return momentDate.format("YYYY-MM-DD");
|
|
18
|
-
};
|
|
19
|
-
exports.serializeDate = serializeDate;
|
|
20
|
-
const parseDateTime = (isoDateTime) => {
|
|
21
|
-
return moment_1.default.utc(isoDateTime).local();
|
|
22
|
-
};
|
|
23
|
-
exports.parseDateTime = parseDateTime;
|
|
24
|
-
const serializeDateTime = (momentDate) => {
|
|
25
|
-
return momentDate.toISOString();
|
|
26
|
-
};
|
|
27
|
-
exports.serializeDateTime = serializeDateTime;
|
|
28
|
-
const parseStart = ({ value, type }) => {
|
|
29
|
-
if ((0, utils_1.isDateType)(type)) {
|
|
30
|
-
return (0, exports.parseDate)(value).startOf("day");
|
|
31
|
-
}
|
|
32
|
-
if ((0, utils_1.isDateTimeType)(type)) {
|
|
33
|
-
return (0, exports.parseDateTime)(value).startOf("second");
|
|
34
|
-
}
|
|
35
|
-
throw new errors_1.NotImplementedError(type);
|
|
36
|
-
};
|
|
37
|
-
exports.parseStart = parseStart;
|
|
38
|
-
const parseEnd = ({ value, type, minimumDelta = null, }) => {
|
|
39
|
-
if ((0, utils_1.isDateType)(type)) {
|
|
40
|
-
if ((0, utils_1.isRangeType)(type)) {
|
|
41
|
-
return (0, exports.parseDate)(value)
|
|
42
|
-
.subtract(...(minimumDelta || defaultDateDelta))
|
|
43
|
-
.endOf("day");
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
return (0, exports.parseDate)(value).endOf("day");
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if ((0, utils_1.isDateTimeType)(type)) {
|
|
50
|
-
return (0, exports.parseDateTime)(value)
|
|
51
|
-
.subtract(...(minimumDelta || defaultDateTimeDelta))
|
|
52
|
-
.startOf("second");
|
|
53
|
-
}
|
|
54
|
-
throw new errors_1.NotImplementedError(type);
|
|
55
|
-
};
|
|
56
|
-
exports.parseEnd = parseEnd;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { FieldObject, TypeObject } from "@fibery/schema";
|
|
2
|
-
import { NumberFormat } from "./number";
|
|
3
|
-
export declare const enumNumberFieldName = "Value";
|
|
4
|
-
export declare const getEnumNumberFieldName: (namespace: string) => string;
|
|
5
|
-
export declare const defaultEnumNumberFieldMeta: {
|
|
6
|
-
numberFormat: NumberFormat;
|
|
7
|
-
numberPrecision: number;
|
|
8
|
-
numberUnit: null;
|
|
9
|
-
numberCurrencyCode: null;
|
|
10
|
-
numberUseThousandSeparator: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare const getIsNumberFieldObjectTaken: (typeObject: TypeObject) => boolean;
|
|
13
|
-
export declare const getNumberFieldObject: (typeObject: TypeObject) => FieldObject | undefined;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNumberFieldObject = exports.getIsNumberFieldObjectTaken = exports.defaultEnumNumberFieldMeta = exports.getEnumNumberFieldName = exports.enumNumberFieldName = void 0;
|
|
4
|
-
const number_1 = require("./number");
|
|
5
|
-
exports.enumNumberFieldName = "Value";
|
|
6
|
-
const getEnumNumberFieldName = (namespace) => `${namespace}/${exports.enumNumberFieldName}`;
|
|
7
|
-
exports.getEnumNumberFieldName = getEnumNumberFieldName;
|
|
8
|
-
exports.defaultEnumNumberFieldMeta = {
|
|
9
|
-
numberFormat: number_1.NumberFormat.NUMBER,
|
|
10
|
-
numberPrecision: 0,
|
|
11
|
-
numberUnit: null,
|
|
12
|
-
numberCurrencyCode: null,
|
|
13
|
-
numberUseThousandSeparator: true,
|
|
14
|
-
};
|
|
15
|
-
const isNumeric = (fieldObject) => {
|
|
16
|
-
return fieldObject.type === "fibery/int" || fieldObject.type === "fibery/decimal";
|
|
17
|
-
};
|
|
18
|
-
const getIsNumberFieldObjectTaken = (typeObject) => {
|
|
19
|
-
return Boolean(typeObject.fieldObjects.find((fieldObject) => {
|
|
20
|
-
return fieldObject.nameParts.name === exports.enumNumberFieldName && !isNumeric(fieldObject);
|
|
21
|
-
}));
|
|
22
|
-
};
|
|
23
|
-
exports.getIsNumberFieldObjectTaken = getIsNumberFieldObjectTaken;
|
|
24
|
-
const getNumberFieldObject = (typeObject) => {
|
|
25
|
-
return typeObject.fieldObjects.find((fieldObject) => {
|
|
26
|
-
return fieldObject.nameParts.name === exports.enumNumberFieldName && isNumeric(fieldObject);
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
exports.getNumberFieldObject = getNumberFieldObject;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFilesSelect = void 0;
|
|
4
|
-
const _1 = require("@fibery/helpers/src/_");
|
|
5
|
-
const select_1 = require("@fibery/query-utils/src/select");
|
|
6
|
-
const getFilesSelect = ({ typeObject }) => (0, select_1.toSelectMapClause)([
|
|
7
|
-
typeObject.idField,
|
|
8
|
-
typeObject.titleField,
|
|
9
|
-
"fibery/creation-date",
|
|
10
|
-
"fibery/content-type",
|
|
11
|
-
"fibery/content-length",
|
|
12
|
-
"fibery/secret",
|
|
13
|
-
"fibery/rank",
|
|
14
|
-
].filter(_1.truthy));
|
|
15
|
-
exports.getFilesSelect = getFilesSelect;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { FieldObject, TypeObject } from "@fibery/schema";
|
|
2
|
-
export declare const ICON_MIXIN_NAME = "icon/icon-mixin";
|
|
3
|
-
export declare const ICON_EXTENSION_FIELD = "icon/icon";
|
|
4
|
-
export declare const isIconExtensionEnabledType: (typeObject: TypeObject) => boolean;
|
|
5
|
-
export declare const isIconExtensionField: (fieldObject: FieldObject) => boolean;
|
|
6
|
-
export declare const getEntityIconSelect: ({ typeObject }: {
|
|
7
|
-
typeObject: TypeObject;
|
|
8
|
-
}) => {
|
|
9
|
-
[x: string]: string;
|
|
10
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEntityIconSelect = exports.isIconExtensionField = exports.isIconExtensionEnabledType = exports.ICON_EXTENSION_FIELD = exports.ICON_MIXIN_NAME = void 0;
|
|
4
|
-
exports.ICON_MIXIN_NAME = "icon/icon-mixin";
|
|
5
|
-
exports.ICON_EXTENSION_FIELD = "icon/icon";
|
|
6
|
-
const isIconExtensionEnabledType = (typeObject) => {
|
|
7
|
-
return (typeObject.installedMixins.has(exports.ICON_MIXIN_NAME) &&
|
|
8
|
-
(0, exports.isIconExtensionField)(typeObject.fieldObjectsByName[exports.ICON_EXTENSION_FIELD]));
|
|
9
|
-
};
|
|
10
|
-
exports.isIconExtensionEnabledType = isIconExtensionEnabledType;
|
|
11
|
-
const isIconExtensionField = (fieldObject) => {
|
|
12
|
-
return fieldObject.name === exports.ICON_EXTENSION_FIELD && fieldObject.type === "fibery/emoji";
|
|
13
|
-
};
|
|
14
|
-
exports.isIconExtensionField = isIconExtensionField;
|
|
15
|
-
const getEntityIconSelect = ({ typeObject }) => {
|
|
16
|
-
if ((0, exports.isIconExtensionEnabledType)(typeObject)) {
|
|
17
|
-
const fieldObject = typeObject.fieldObjectsByName[exports.ICON_EXTENSION_FIELD];
|
|
18
|
-
return {
|
|
19
|
-
[fieldObject.name]: fieldObject.name,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
return {};
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.getEntityIconSelect = getEntityIconSelect;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { FieldObject } from "@fibery/schema";
|
|
2
|
-
export declare enum NumberFormat {
|
|
3
|
-
NUMBER = "Number",
|
|
4
|
-
MONEY = "Money",
|
|
5
|
-
PERCENT = "Percent"
|
|
6
|
-
}
|
|
7
|
-
export type NumberDisplaySettings = {
|
|
8
|
-
thousandSeparator: string;
|
|
9
|
-
decimalSeparator: string;
|
|
10
|
-
};
|
|
11
|
-
export type NumberFieldMeta = {
|
|
12
|
-
numberFormat: NumberFormat;
|
|
13
|
-
numberPrecision: number;
|
|
14
|
-
numberUnit: string | null;
|
|
15
|
-
numberCurrencyCode: string | null;
|
|
16
|
-
numberUseThousandSeparator: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare const getDefaultCurrencyCode: (numberFormat: NumberFormat) => "USD" | null;
|
|
19
|
-
export declare const getDefaultPrecision: (numberFormat: NumberFormat) => 0 | 2;
|
|
20
|
-
export declare const getInitialNumberFieldMeta: () => NumberFieldMeta;
|
|
21
|
-
export declare const externalizePrecision: (numberFormat: NumberFormat, numberPrecision: number) => number;
|
|
22
|
-
export declare function getNumberFormatOrDefault(numberFormat: NumberFormat | undefined): NumberFormat;
|
|
23
|
-
export declare const parseNumberMeta: ({ rawNumberPrecision, rawNumberUnit, rawNumberCurrencyCode, rawNumberUseThousandSeparator, rawNumberFormat, fieldType, }: {
|
|
24
|
-
rawNumberPrecision: unknown;
|
|
25
|
-
rawNumberUnit: unknown;
|
|
26
|
-
rawNumberCurrencyCode: unknown;
|
|
27
|
-
rawNumberUseThousandSeparator: unknown;
|
|
28
|
-
rawNumberFormat: unknown;
|
|
29
|
-
fieldType: string;
|
|
30
|
-
}) => NumberFieldMeta;
|
|
31
|
-
export declare const parseNumberFieldMeta: (fieldObject: FieldObject) => NumberFieldMeta;
|
|
@@ -1,91 +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.parseNumberFieldMeta = exports.parseNumberMeta = exports.externalizePrecision = exports.getInitialNumberFieldMeta = exports.getDefaultPrecision = exports.getDefaultCurrencyCode = exports.NumberFormat = void 0;
|
|
7
|
-
exports.getNumberFormatOrDefault = getNumberFormatOrDefault;
|
|
8
|
-
const curry_1 = __importDefault(require("lodash/curry"));
|
|
9
|
-
const flow_1 = __importDefault(require("lodash/flow"));
|
|
10
|
-
var NumberFormat;
|
|
11
|
-
(function (NumberFormat) {
|
|
12
|
-
NumberFormat["NUMBER"] = "Number";
|
|
13
|
-
NumberFormat["MONEY"] = "Money";
|
|
14
|
-
NumberFormat["PERCENT"] = "Percent";
|
|
15
|
-
})(NumberFormat || (exports.NumberFormat = NumberFormat = {}));
|
|
16
|
-
const DEFAULT_NUMBER_FORMAT = NumberFormat.NUMBER;
|
|
17
|
-
const getDefaultCurrencyCode = (numberFormat) => {
|
|
18
|
-
if (numberFormat === NumberFormat.MONEY) {
|
|
19
|
-
return "USD";
|
|
20
|
-
}
|
|
21
|
-
return null;
|
|
22
|
-
};
|
|
23
|
-
exports.getDefaultCurrencyCode = getDefaultCurrencyCode;
|
|
24
|
-
const getDefaultPrecision = (numberFormat) => {
|
|
25
|
-
if (numberFormat === NumberFormat.MONEY) {
|
|
26
|
-
return 2;
|
|
27
|
-
}
|
|
28
|
-
return 0;
|
|
29
|
-
};
|
|
30
|
-
exports.getDefaultPrecision = getDefaultPrecision;
|
|
31
|
-
const getInitialNumberFieldMeta = () => {
|
|
32
|
-
return {
|
|
33
|
-
numberFormat: DEFAULT_NUMBER_FORMAT,
|
|
34
|
-
numberPrecision: (0, exports.getDefaultPrecision)(DEFAULT_NUMBER_FORMAT),
|
|
35
|
-
numberUnit: null,
|
|
36
|
-
numberCurrencyCode: (0, exports.getDefaultCurrencyCode)(DEFAULT_NUMBER_FORMAT),
|
|
37
|
-
numberUseThousandSeparator: true,
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
exports.getInitialNumberFieldMeta = getInitialNumberFieldMeta;
|
|
41
|
-
const parsePrecisionWithBackwardCompatibility = (fieldType) => (rawNumberPrecision) => {
|
|
42
|
-
// For some reason there exist fields of type fibery/int with precision > 0
|
|
43
|
-
const isInteger = fieldType === "fibery/int";
|
|
44
|
-
return isInteger ? 0 : Number(rawNumberPrecision) || 1;
|
|
45
|
-
};
|
|
46
|
-
const internalizePrecision = (0, curry_1.default)((numberFormat, numberPrecision) => {
|
|
47
|
-
if (numberFormat === NumberFormat.PERCENT) {
|
|
48
|
-
return numberPrecision - 2;
|
|
49
|
-
}
|
|
50
|
-
return numberPrecision;
|
|
51
|
-
});
|
|
52
|
-
const externalizePrecision = (numberFormat, numberPrecision) => {
|
|
53
|
-
if (numberFormat === NumberFormat.PERCENT) {
|
|
54
|
-
return numberPrecision + 2;
|
|
55
|
-
}
|
|
56
|
-
return numberPrecision;
|
|
57
|
-
};
|
|
58
|
-
exports.externalizePrecision = externalizePrecision;
|
|
59
|
-
function getNumberFormatOrDefault(numberFormat) {
|
|
60
|
-
return numberFormat || DEFAULT_NUMBER_FORMAT;
|
|
61
|
-
}
|
|
62
|
-
const parseNumberMeta = ({ rawNumberPrecision, rawNumberUnit, rawNumberCurrencyCode, rawNumberUseThousandSeparator, rawNumberFormat, fieldType, }) => {
|
|
63
|
-
const numberFormat = getNumberFormatOrDefault(rawNumberFormat);
|
|
64
|
-
const numberPrecision = (0, flow_1.default)([
|
|
65
|
-
parsePrecisionWithBackwardCompatibility(fieldType),
|
|
66
|
-
internalizePrecision(numberFormat),
|
|
67
|
-
])(rawNumberPrecision);
|
|
68
|
-
const numberUnit = rawNumberUnit || null;
|
|
69
|
-
const numberCurrencyCode = numberFormat === NumberFormat.MONEY ? rawNumberCurrencyCode : null;
|
|
70
|
-
const numberUseThousandSeparator = Boolean(rawNumberUseThousandSeparator);
|
|
71
|
-
return {
|
|
72
|
-
numberFormat,
|
|
73
|
-
numberPrecision,
|
|
74
|
-
numberUnit,
|
|
75
|
-
numberCurrencyCode,
|
|
76
|
-
numberUseThousandSeparator,
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
exports.parseNumberMeta = parseNumberMeta;
|
|
80
|
-
const parseNumberFieldMeta = (fieldObject) => {
|
|
81
|
-
const { "ui/number-precision": rawNumberPrecision, "ui/number-unit": rawNumberUnit, "ui/number-currency-code": rawNumberCurrencyCode, "ui/number-thousand-separator?": rawNumberUseThousandSeparator, "ui/number-format": rawNumberFormat, } = fieldObject.rawMeta;
|
|
82
|
-
return (0, exports.parseNumberMeta)({
|
|
83
|
-
rawNumberPrecision,
|
|
84
|
-
rawNumberUnit,
|
|
85
|
-
rawNumberCurrencyCode,
|
|
86
|
-
rawNumberUseThousandSeparator,
|
|
87
|
-
rawNumberFormat,
|
|
88
|
-
fieldType: fieldObject.type,
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
exports.parseNumberFieldMeta = parseNumberFieldMeta;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { QueryLimit } from "@fibery/expression-utils/src/types";
|
|
2
|
-
import type { FieldObject } from "@fibery/schema";
|
|
3
|
-
export declare const REFERENCE_COLLECTION_LIMIT = 1000;
|
|
4
|
-
export declare const makeCollectionCountExpression: (field: string | string[]) => (string | string[])[];
|
|
5
|
-
export declare const getCountKey: (field: string) => string;
|
|
6
|
-
export declare const getCollectionCountSelect: (field: string) => {
|
|
7
|
-
[x: string]: (string | string[])[];
|
|
8
|
-
};
|
|
9
|
-
export declare const calculateReferenceCollectionQuery: ({ fieldObjects, expression, limit, }: {
|
|
10
|
-
fieldObjects: FieldObject[];
|
|
11
|
-
expression: string[];
|
|
12
|
-
limit: QueryLimit;
|
|
13
|
-
}) => Record<string, unknown>;
|