@fibery/views 19.1.1 → 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_virtual/_rolldown/runtime.js +13 -0
- package/lib/errors.d.ts +4 -0
- package/lib/errors.js +4 -0
- package/lib/field-utils/avatar.d.ts +23 -0
- package/lib/field-utils/avatar.js +35 -0
- package/lib/field-utils/back-references.d.ts +18 -0
- package/lib/field-utils/back-references.js +15 -0
- package/lib/field-utils/comments.d.ts +63 -0
- package/lib/field-utils/comments.js +41 -0
- package/lib/field-utils/date-time.d.ts +17 -0
- package/lib/field-utils/date-time.js +31 -0
- package/lib/field-utils/enum-value.d.ts +16 -0
- package/lib/field-utils/enum-value.js +26 -0
- package/lib/field-utils/file.d.ts +7 -0
- package/lib/field-utils/file.js +14 -0
- package/lib/field-utils/icon.d.ts +13 -0
- package/lib/field-utils/icon.js +17 -0
- package/lib/field-utils/number.d.ts +34 -0
- package/lib/field-utils/number.js +64 -0
- package/lib/field-utils/reference-collection.d.ts +16 -0
- package/lib/field-utils/reference-collection.js +49 -0
- package/lib/field-utils/reference.d.ts +10 -0
- package/lib/field-utils/reference.js +55 -0
- package/lib/field-utils/relation-view.d.ts +5 -0
- package/lib/field-utils/relation-view.js +7 -0
- package/lib/field-utils/rich-text.d.ts +16 -0
- package/lib/field-utils/rich-text.js +33 -0
- package/lib/field-utils/text.d.ts +38 -0
- package/lib/field-utils/text.js +37 -0
- package/lib/field-utils/user-active.d.ts +11 -0
- package/lib/field-utils/user-active.js +24 -0
- package/lib/field-utils/user-role.d.ts +9 -0
- package/lib/field-utils/user-role.js +23 -0
- package/lib/field-utils/workflow.d.ts +18 -0
- package/lib/field-utils/workflow.js +48 -0
- package/lib/index.d.ts +34 -1
- package/lib/index.js +169 -16
- package/lib/meta-validation.d.ts +13 -0
- package/lib/meta-validation.js +53 -0
- package/lib/private/board.d.ts +18 -0
- package/lib/private/board.js +234 -0
- package/lib/private/calendar.d.ts +17 -0
- package/lib/private/calendar.js +82 -0
- package/lib/private/feed.d.ts +17 -0
- package/lib/private/feed.js +81 -0
- package/lib/private/form.d.ts +27 -0
- package/lib/private/form.js +57 -0
- package/lib/private/map.d.ts +17 -0
- package/lib/private/map.js +81 -0
- package/lib/private/smart-folder.d.ts +33 -0
- package/lib/private/smart-folder.js +165 -0
- package/lib/private/timeline.d.ts +41 -0
- package/lib/private/timeline.js +223 -0
- package/lib/private/units.d.ts +12 -0
- package/lib/private/units.js +131 -0
- package/lib/private/utils.d.ts +66 -0
- package/lib/private/utils.js +179 -0
- package/lib/tsfixme.d.ts +4 -0
- package/lib/tsfixme.js +0 -0
- package/lib/unit-definitions/avatar-collection.d.ts +5 -0
- package/lib/unit-definitions/avatar-collection.js +59 -0
- package/lib/unit-definitions/avatar-input.d.ts +5 -0
- package/lib/unit-definitions/avatar-input.js +12 -0
- package/lib/unit-definitions/avatar.d.ts +5 -0
- package/lib/unit-definitions/avatar.js +95 -0
- package/lib/unit-definitions/back-references-list.d.ts +5 -0
- package/lib/unit-definitions/back-references-list.js +39 -0
- package/lib/unit-definitions/bool-checkbox.d.ts +5 -0
- package/lib/unit-definitions/bool-checkbox.js +25 -0
- package/lib/unit-definitions/bool.d.ts +5 -0
- package/lib/unit-definitions/bool.js +25 -0
- package/lib/unit-definitions/collection-count.d.ts +5 -0
- package/lib/unit-definitions/collection-count.js +35 -0
- package/lib/unit-definitions/color-input.d.ts +5 -0
- package/lib/unit-definitions/color-input.js +24 -0
- package/lib/unit-definitions/comments-list.d.ts +5 -0
- package/lib/unit-definitions/comments-list.js +27 -0
- package/lib/unit-definitions/date-range-combobox.d.ts +5 -0
- package/lib/unit-definitions/date-range-combobox.js +25 -0
- package/lib/unit-definitions/date-range.d.ts +5 -0
- package/lib/unit-definitions/date-range.js +25 -0
- package/lib/unit-definitions/date-time-combobox.d.ts +5 -0
- package/lib/unit-definitions/date-time-combobox.js +25 -0
- package/lib/unit-definitions/date.d.ts +5 -0
- package/lib/unit-definitions/date.js +25 -0
- package/lib/unit-definitions/email-input.d.ts +5 -0
- package/lib/unit-definitions/email-input.js +12 -0
- package/lib/unit-definitions/email.d.ts +5 -0
- package/lib/unit-definitions/email.js +17 -0
- package/lib/unit-definitions/emoji.d.ts +5 -0
- package/lib/unit-definitions/emoji.js +17 -0
- package/lib/unit-definitions/file-collection-count.d.ts +5 -0
- package/lib/unit-definitions/file-collection-count.js +34 -0
- package/lib/unit-definitions/file-compact-collection.d.ts +5 -0
- package/lib/unit-definitions/file-compact-collection.js +34 -0
- package/lib/unit-definitions/file-compact-reference.d.ts +5 -0
- package/lib/unit-definitions/file-compact-reference.js +47 -0
- package/lib/unit-definitions/file-reference.d.ts +5 -0
- package/lib/unit-definitions/file-reference.js +30 -0
- package/lib/unit-definitions/files-gallery.d.ts +5 -0
- package/lib/unit-definitions/files-gallery.js +34 -0
- package/lib/unit-definitions/files-l-list-item.d.ts +5 -0
- package/lib/unit-definitions/files-l-list-item.js +30 -0
- package/lib/unit-definitions/files-l-list.d.ts +5 -0
- package/lib/unit-definitions/files-l-list.js +34 -0
- package/lib/unit-definitions/files-list-item.d.ts +5 -0
- package/lib/unit-definitions/files-list-item.js +30 -0
- package/lib/unit-definitions/files-list.d.ts +5 -0
- package/lib/unit-definitions/files-list.js +34 -0
- package/lib/unit-definitions/geometry-preview.d.ts +5 -0
- package/lib/unit-definitions/geometry-preview.js +17 -0
- package/lib/unit-definitions/icon-button.d.ts +5 -0
- package/lib/unit-definitions/icon-button.js +41 -0
- package/lib/unit-definitions/icon-input.d.ts +5 -0
- package/lib/unit-definitions/icon-input.js +12 -0
- package/lib/unit-definitions/id.d.ts +5 -0
- package/lib/unit-definitions/id.js +30 -0
- package/lib/unit-definitions/index.d.ts +28 -0
- package/lib/unit-definitions/index.js +60 -0
- package/lib/unit-definitions/json-input.d.ts +5 -0
- package/lib/unit-definitions/json-input.js +24 -0
- package/lib/unit-definitions/location-input.d.ts +5 -0
- package/lib/unit-definitions/location-input.js +18 -0
- package/lib/unit-definitions/location.d.ts +5 -0
- package/lib/unit-definitions/location.js +17 -0
- package/lib/unit-definitions/not-found.d.ts +5 -0
- package/lib/unit-definitions/not-found.js +22 -0
- package/lib/unit-definitions/number-input.d.ts +5 -0
- package/lib/unit-definitions/number-input.js +25 -0
- package/lib/unit-definitions/number.d.ts +5 -0
- package/lib/unit-definitions/number.js +31 -0
- package/lib/unit-definitions/phone-input.d.ts +5 -0
- package/lib/unit-definitions/phone-input.js +12 -0
- package/lib/unit-definitions/phone.d.ts +5 -0
- package/lib/unit-definitions/phone.js +12 -0
- package/lib/unit-definitions/progress-bar.d.ts +5 -0
- package/lib/unit-definitions/progress-bar.js +32 -0
- package/lib/unit-definitions/reference-collection-combobox.d.ts +5 -0
- package/lib/unit-definitions/reference-collection-combobox.js +21 -0
- package/lib/unit-definitions/reference-collection-list.d.ts +5 -0
- package/lib/unit-definitions/reference-collection-list.js +21 -0
- package/lib/unit-definitions/reference-collection-view.d.ts +5 -0
- package/lib/unit-definitions/reference-collection-view.js +19 -0
- package/lib/unit-definitions/reference-collection.d.ts +5 -0
- package/lib/unit-definitions/reference-collection.js +30 -0
- package/lib/unit-definitions/reference-combobox.d.ts +5 -0
- package/lib/unit-definitions/reference-combobox.js +21 -0
- package/lib/unit-definitions/reference-icon.d.ts +5 -0
- package/lib/unit-definitions/reference-icon.js +12 -0
- package/lib/unit-definitions/reference.d.ts +5 -0
- package/lib/unit-definitions/reference.js +63 -0
- package/lib/unit-definitions/rich-text-document.d.ts +5 -0
- package/lib/unit-definitions/rich-text-document.js +26 -0
- package/lib/unit-definitions/rich-text-snippet.d.ts +6 -0
- package/lib/unit-definitions/rich-text-snippet.js +35 -0
- package/lib/unit-definitions/single-location-preview.d.ts +5 -0
- package/lib/unit-definitions/single-location-preview.js +17 -0
- package/lib/unit-definitions/text-input.d.ts +5 -0
- package/lib/unit-definitions/text-input.js +25 -0
- package/lib/unit-definitions/text.d.ts +5 -0
- package/lib/unit-definitions/text.js +25 -0
- package/lib/unit-definitions/title-input.d.ts +5 -0
- package/lib/unit-definitions/title-input.js +19 -0
- package/lib/unit-definitions/title.d.ts +5 -0
- package/lib/unit-definitions/title.js +33 -0
- package/lib/unit-definitions/type-badge-abbr.d.ts +5 -0
- package/lib/unit-definitions/type-badge-abbr.js +28 -0
- package/lib/unit-definitions/type-badge.d.ts +5 -0
- package/lib/unit-definitions/type-badge.js +28 -0
- package/lib/unit-definitions/type-icon.d.ts +5 -0
- package/lib/unit-definitions/type-icon.js +28 -0
- package/lib/unit-definitions/url-input.d.ts +5 -0
- package/lib/unit-definitions/url-input.js +12 -0
- package/lib/unit-definitions/url.d.ts +5 -0
- package/lib/unit-definitions/url.js +17 -0
- package/lib/unit-definitions/user-button.d.ts +5 -0
- package/lib/unit-definitions/user-button.js +26 -0
- package/lib/unit-definitions/user-role-input.d.ts +5 -0
- package/lib/unit-definitions/user-role-input.js +12 -0
- package/lib/unit-definitions/user-role.d.ts +5 -0
- package/lib/unit-definitions/user-role.js +35 -0
- package/lib/unit-utils/access.d.ts +12 -0
- package/lib/unit-utils/access.js +9 -0
- package/lib/unit-utils/can-edit-field.d.ts +9 -0
- package/lib/unit-utils/can-edit-field.js +7 -0
- package/lib/unit-utils/common.d.ts +17 -0
- package/lib/unit-utils/common.js +39 -0
- package/lib/unit-utils/decimal.d.ts +44 -0
- package/lib/unit-utils/decimal.js +248 -0
- package/lib/unit-utils/dynamic-keys.d.ts +10 -0
- package/lib/unit-utils/dynamic-keys.js +12 -0
- package/lib/unit-utils/enums.d.ts +30 -0
- package/lib/unit-utils/enums.js +48 -0
- package/lib/unit-utils/formatters.d.ts +53 -0
- package/lib/unit-utils/formatters.js +128 -0
- package/lib/unit-utils/get-export-value.d.ts +48 -0
- package/lib/unit-utils/get-export-value.js +83 -0
- package/lib/unit-utils/get-field-label.d.ts +9 -0
- package/lib/unit-utils/get-field-label.js +11 -0
- package/lib/unit-utils/get-unmatched-unit-label.d.ts +5 -0
- package/lib/unit-utils/get-unmatched-unit-label.js +5 -0
- package/lib/unit-utils/schema.d.ts +7 -0
- package/lib/unit-utils/schema.js +9 -0
- package/lib/unit-utils/wrap-normalized-in-expression.d.ts +6 -0
- package/lib/unit-utils/wrap-normalized-in-expression.js +15 -0
- package/lib/units/board.d.ts +50 -0
- package/lib/units/board.js +24 -0
- package/lib/units/canvas/all-units-data-definitions.d.ts +19 -0
- package/lib/units/canvas/all-units-data-definitions.js +42 -0
- package/lib/units/canvas/index.d.ts +49 -0
- package/lib/units/canvas/index.js +27 -0
- package/lib/units/canvas/type-badge-abbr.d.ts +42 -0
- package/lib/units/canvas/type-badge-abbr.js +11 -0
- package/lib/units/canvas/type-badge.d.ts +42 -0
- package/lib/units/canvas/type-badge.js +11 -0
- package/lib/units/default.d.ts +50 -0
- package/lib/units/default.js +23 -0
- package/lib/units/gallery.d.ts +7 -0
- package/lib/units/gallery.js +21 -0
- package/lib/units/gantt.d.ts +51 -0
- package/lib/units/gantt.js +28 -0
- package/lib/units/get-unit-definitions-for-view-type.d.ts +5 -0
- package/lib/units/get-unit-definitions-for-view-type.js +22 -0
- package/lib/units/grid.d.ts +49 -0
- package/lib/units/grid.js +81 -0
- package/lib/units/list.d.ts +52 -0
- package/lib/units/list.js +23 -0
- package/lib/units/make-factory.d.ts +53 -0
- package/lib/units/make-factory.js +272 -0
- package/lib/units/types.d.ts +75 -0
- package/lib/units/types.js +0 -0
- package/package.json +18 -40
- package/lib/src/errors.d.ts +0 -2
- package/lib/src/errors.js +0 -6
- package/lib/src/field-utils/avatar.d.ts +0 -20
- package/lib/src/field-utils/avatar.js +0 -42
- package/lib/src/field-utils/back-references.d.ts +0 -15
- package/lib/src/field-utils/back-references.js +0 -21
- package/lib/src/field-utils/comments.d.ts +0 -60
- package/lib/src/field-utils/comments.js +0 -46
- package/lib/src/field-utils/date-time.d.ts +0 -14
- package/lib/src/field-utils/date-time.js +0 -56
- package/lib/src/field-utils/enum-value.d.ts +0 -13
- package/lib/src/field-utils/enum-value.js +0 -29
- package/lib/src/field-utils/file.d.ts +0 -4
- package/lib/src/field-utils/file.js +0 -18
- package/lib/src/field-utils/icon.d.ts +0 -10
- package/lib/src/field-utils/icon.js +0 -26
- package/lib/src/field-utils/number.d.ts +0 -31
- package/lib/src/field-utils/number.js +0 -91
- package/lib/src/field-utils/reference-collection.d.ts +0 -13
- package/lib/src/field-utils/reference-collection.js +0 -67
- package/lib/src/field-utils/reference.d.ts +0 -7
- package/lib/src/field-utils/reference.js +0 -57
- package/lib/src/field-utils/relation-view.d.ts +0 -2
- package/lib/src/field-utils/relation-view.js +0 -12
- package/lib/src/field-utils/rich-text.d.ts +0 -13
- package/lib/src/field-utils/rich-text.js +0 -38
- package/lib/src/field-utils/text.d.ts +0 -35
- package/lib/src/field-utils/text.js +0 -40
- package/lib/src/field-utils/user-active.d.ts +0 -8
- package/lib/src/field-utils/user-active.js +0 -23
- package/lib/src/field-utils/user-role.d.ts +0 -6
- package/lib/src/field-utils/user-role.js +0 -25
- package/lib/src/field-utils/workflow.d.ts +0 -15
- package/lib/src/field-utils/workflow.js +0 -53
- package/lib/src/index.d.ts +0 -30
- package/lib/src/index.js +0 -263
- package/lib/src/meta-validation.d.ts +0 -10
- package/lib/src/meta-validation.js +0 -78
- package/lib/src/private/board.d.ts +0 -15
- package/lib/src/private/board.js +0 -327
- package/lib/src/private/calendar.d.ts +0 -14
- package/lib/src/private/calendar.js +0 -123
- package/lib/src/private/feed.d.ts +0 -14
- package/lib/src/private/feed.js +0 -120
- package/lib/src/private/form.d.ts +0 -25
- package/lib/src/private/form.js +0 -61
- package/lib/src/private/map.d.ts +0 -14
- package/lib/src/private/map.js +0 -120
- package/lib/src/private/smart-folder.d.ts +0 -31
- package/lib/src/private/smart-folder.js +0 -277
- package/lib/src/private/test-data/garbage-test.d.ts +0 -649
- package/lib/src/private/test-data/garbage-test.js +0 -520
- package/lib/src/private/test-data/kanban.d.ts +0 -1123
- package/lib/src/private/test-data/kanban.js +0 -1203
- package/lib/src/private/test-data/tasks.d.ts +0 -3216
- package/lib/src/private/test-data/tasks.js +0 -2731
- package/lib/src/private/timeline.d.ts +0 -39
- package/lib/src/private/timeline.js +0 -325
- package/lib/src/private/units.d.ts +0 -10
- package/lib/src/private/units.js +0 -165
- package/lib/src/private/utils.d.ts +0 -64
- package/lib/src/private/utils.js +0 -273
- package/lib/src/truthy.d.ts +0 -1
- package/lib/src/truthy.js +0 -7
- package/lib/src/tsfixme.d.ts +0 -1
- package/lib/src/tsfixme.js +0 -2
- package/lib/src/unit-definitions/avatar-collection.d.ts +0 -2
- package/lib/src/unit-definitions/avatar-collection.js +0 -54
- package/lib/src/unit-definitions/avatar-input.d.ts +0 -2
- package/lib/src/unit-definitions/avatar-input.js +0 -12
- package/lib/src/unit-definitions/avatar.d.ts +0 -2
- package/lib/src/unit-definitions/avatar.js +0 -88
- package/lib/src/unit-definitions/back-references-list.d.ts +0 -2
- package/lib/src/unit-definitions/back-references-list.js +0 -38
- package/lib/src/unit-definitions/bool-checkbox.d.ts +0 -2
- package/lib/src/unit-definitions/bool-checkbox.js +0 -25
- package/lib/src/unit-definitions/bool.d.ts +0 -2
- package/lib/src/unit-definitions/bool.js +0 -22
- package/lib/src/unit-definitions/collection-count.d.ts +0 -2
- package/lib/src/unit-definitions/collection-count.js +0 -32
- package/lib/src/unit-definitions/color-input.d.ts +0 -2
- package/lib/src/unit-definitions/color-input.js +0 -21
- package/lib/src/unit-definitions/comments-list.d.ts +0 -2
- package/lib/src/unit-definitions/comments-list.js +0 -25
- package/lib/src/unit-definitions/date-range-combobox.d.ts +0 -2
- package/lib/src/unit-definitions/date-range-combobox.js +0 -22
- package/lib/src/unit-definitions/date-range.d.ts +0 -2
- package/lib/src/unit-definitions/date-range.js +0 -22
- package/lib/src/unit-definitions/date-time-combobox.d.ts +0 -2
- package/lib/src/unit-definitions/date-time-combobox.js +0 -22
- package/lib/src/unit-definitions/date.d.ts +0 -2
- package/lib/src/unit-definitions/date.js +0 -22
- package/lib/src/unit-definitions/email-input.d.ts +0 -2
- package/lib/src/unit-definitions/email-input.js +0 -12
- package/lib/src/unit-definitions/email.d.ts +0 -2
- package/lib/src/unit-definitions/email.js +0 -17
- package/lib/src/unit-definitions/emoji.d.ts +0 -2
- package/lib/src/unit-definitions/emoji.js +0 -17
- package/lib/src/unit-definitions/file-collection-count.d.ts +0 -2
- package/lib/src/unit-definitions/file-collection-count.js +0 -32
- package/lib/src/unit-definitions/file-compact-collection.d.ts +0 -2
- package/lib/src/unit-definitions/file-compact-collection.js +0 -32
- package/lib/src/unit-definitions/file-compact-reference.d.ts +0 -2
- package/lib/src/unit-definitions/file-compact-reference.js +0 -37
- package/lib/src/unit-definitions/file-reference.d.ts +0 -2
- package/lib/src/unit-definitions/file-reference.js +0 -28
- package/lib/src/unit-definitions/files-gallery.d.ts +0 -2
- package/lib/src/unit-definitions/files-gallery.js +0 -32
- package/lib/src/unit-definitions/files-l-list-item.d.ts +0 -2
- package/lib/src/unit-definitions/files-l-list-item.js +0 -28
- package/lib/src/unit-definitions/files-l-list.d.ts +0 -2
- package/lib/src/unit-definitions/files-l-list.js +0 -32
- package/lib/src/unit-definitions/files-list-item.d.ts +0 -2
- package/lib/src/unit-definitions/files-list-item.js +0 -28
- package/lib/src/unit-definitions/files-list.d.ts +0 -2
- package/lib/src/unit-definitions/files-list.js +0 -32
- package/lib/src/unit-definitions/geometry-preview.d.ts +0 -2
- package/lib/src/unit-definitions/geometry-preview.js +0 -17
- package/lib/src/unit-definitions/icon-button.d.ts +0 -2
- package/lib/src/unit-definitions/icon-button.js +0 -29
- package/lib/src/unit-definitions/icon-input.d.ts +0 -2
- package/lib/src/unit-definitions/icon-input.js +0 -12
- package/lib/src/unit-definitions/id.d.ts +0 -2
- package/lib/src/unit-definitions/id.js +0 -29
- package/lib/src/unit-definitions/index.d.ts +0 -27
- package/lib/src/unit-definitions/index.js +0 -57
- package/lib/src/unit-definitions/json-input.d.ts +0 -2
- package/lib/src/unit-definitions/json-input.js +0 -21
- package/lib/src/unit-definitions/location-input.d.ts +0 -2
- package/lib/src/unit-definitions/location-input.js +0 -18
- package/lib/src/unit-definitions/location.d.ts +0 -2
- package/lib/src/unit-definitions/location.js +0 -17
- package/lib/src/unit-definitions/not-found.d.ts +0 -2
- package/lib/src/unit-definitions/not-found.js +0 -24
- package/lib/src/unit-definitions/number-input.d.ts +0 -2
- package/lib/src/unit-definitions/number-input.js +0 -22
- package/lib/src/unit-definitions/number.d.ts +0 -2
- package/lib/src/unit-definitions/number.js +0 -25
- package/lib/src/unit-definitions/phone-input.d.ts +0 -2
- package/lib/src/unit-definitions/phone-input.js +0 -12
- package/lib/src/unit-definitions/phone.d.ts +0 -2
- package/lib/src/unit-definitions/phone.js +0 -12
- package/lib/src/unit-definitions/progress-bar.d.ts +0 -2
- package/lib/src/unit-definitions/progress-bar.js +0 -29
- package/lib/src/unit-definitions/reference-collection-combobox.d.ts +0 -2
- package/lib/src/unit-definitions/reference-collection-combobox.js +0 -21
- package/lib/src/unit-definitions/reference-collection-list.d.ts +0 -2
- package/lib/src/unit-definitions/reference-collection-list.js +0 -22
- package/lib/src/unit-definitions/reference-collection-view.d.ts +0 -2
- package/lib/src/unit-definitions/reference-collection-view.js +0 -19
- package/lib/src/unit-definitions/reference-collection.d.ts +0 -2
- package/lib/src/unit-definitions/reference-collection.js +0 -28
- package/lib/src/unit-definitions/reference-combobox.d.ts +0 -2
- package/lib/src/unit-definitions/reference-combobox.js +0 -21
- package/lib/src/unit-definitions/reference-icon.d.ts +0 -2
- package/lib/src/unit-definitions/reference-icon.js +0 -12
- package/lib/src/unit-definitions/reference.d.ts +0 -2
- package/lib/src/unit-definitions/reference.js +0 -61
- package/lib/src/unit-definitions/rich-text-document.d.ts +0 -2
- package/lib/src/unit-definitions/rich-text-document.js +0 -22
- package/lib/src/unit-definitions/rich-text-snippet.d.ts +0 -3
- package/lib/src/unit-definitions/rich-text-snippet.js +0 -34
- package/lib/src/unit-definitions/single-location-preview.d.ts +0 -2
- package/lib/src/unit-definitions/single-location-preview.js +0 -17
- package/lib/src/unit-definitions/text-input.d.ts +0 -2
- package/lib/src/unit-definitions/text-input.js +0 -22
- package/lib/src/unit-definitions/text.d.ts +0 -2
- package/lib/src/unit-definitions/text.js +0 -22
- package/lib/src/unit-definitions/title-input.d.ts +0 -2
- package/lib/src/unit-definitions/title-input.js +0 -16
- package/lib/src/unit-definitions/title.d.ts +0 -2
- package/lib/src/unit-definitions/title.js +0 -34
- package/lib/src/unit-definitions/type-badge-abbr.d.ts +0 -2
- package/lib/src/unit-definitions/type-badge-abbr.js +0 -25
- package/lib/src/unit-definitions/type-badge.d.ts +0 -2
- package/lib/src/unit-definitions/type-badge.js +0 -25
- package/lib/src/unit-definitions/type-icon.d.ts +0 -2
- package/lib/src/unit-definitions/type-icon.js +0 -25
- package/lib/src/unit-definitions/url-input.d.ts +0 -2
- package/lib/src/unit-definitions/url-input.js +0 -12
- package/lib/src/unit-definitions/url.d.ts +0 -2
- package/lib/src/unit-definitions/url.js +0 -17
- package/lib/src/unit-definitions/user-button.d.ts +0 -2
- package/lib/src/unit-definitions/user-button.js +0 -23
- package/lib/src/unit-definitions/user-role-input.d.ts +0 -2
- package/lib/src/unit-definitions/user-role-input.js +0 -12
- package/lib/src/unit-definitions/user-role.d.ts +0 -2
- package/lib/src/unit-definitions/user-role.js +0 -29
- package/lib/src/unit-utils/access.d.ts +0 -9
- package/lib/src/unit-utils/access.js +0 -14
- package/lib/src/unit-utils/can-edit-field.d.ts +0 -6
- package/lib/src/unit-utils/can-edit-field.js +0 -8
- package/lib/src/unit-utils/common.d.ts +0 -14
- package/lib/src/unit-utils/common.js +0 -43
- package/lib/src/unit-utils/decimal.d.ts +0 -42
- package/lib/src/unit-utils/decimal.js +0 -418
- package/lib/src/unit-utils/dynamic-keys.d.ts +0 -7
- package/lib/src/unit-utils/dynamic-keys.js +0 -13
- package/lib/src/unit-utils/enums.d.ts +0 -27
- package/lib/src/unit-utils/enums.js +0 -69
- package/lib/src/unit-utils/formatters.d.ts +0 -50
- package/lib/src/unit-utils/formatters.js +0 -163
- package/lib/src/unit-utils/get-export-value.d.ts +0 -45
- package/lib/src/unit-utils/get-export-value.js +0 -83
- package/lib/src/unit-utils/get-field-label.d.ts +0 -6
- package/lib/src/unit-utils/get-field-label.js +0 -10
- package/lib/src/unit-utils/get-unmatched-unit-label.d.ts +0 -2
- package/lib/src/unit-utils/get-unmatched-unit-label.js +0 -9
- package/lib/src/unit-utils/schema.d.ts +0 -4
- package/lib/src/unit-utils/schema.js +0 -12
- package/lib/src/unit-utils/wrap-normalized-in-expression.d.ts +0 -3
- package/lib/src/unit-utils/wrap-normalized-in-expression.js +0 -14
- package/lib/src/units/board.d.ts +0 -46
- package/lib/src/units/board.js +0 -51
- package/lib/src/units/canvas/all-units-data-definitions.d.ts +0 -18
- package/lib/src/units/canvas/all-units-data-definitions.js +0 -40
- package/lib/src/units/canvas/index.d.ts +0 -45
- package/lib/src/units/canvas/index.js +0 -48
- package/lib/src/units/canvas/type-badge-abbr.d.ts +0 -36
- package/lib/src/units/canvas/type-badge-abbr.js +0 -11
- package/lib/src/units/canvas/type-badge.d.ts +0 -36
- package/lib/src/units/canvas/type-badge.js +0 -11
- package/lib/src/units/default.d.ts +0 -46
- package/lib/src/units/default.js +0 -51
- package/lib/src/units/gallery.d.ts +0 -3
- package/lib/src/units/gallery.js +0 -18
- package/lib/src/units/gantt.d.ts +0 -47
- package/lib/src/units/gantt.js +0 -59
- package/lib/src/units/get-unit-definitions-for-view-type.d.ts +0 -2
- package/lib/src/units/get-unit-definitions-for-view-type.js +0 -64
- package/lib/src/units/grid.d.ts +0 -45
- package/lib/src/units/grid.js +0 -71
- package/lib/src/units/list.d.ts +0 -46
- package/lib/src/units/list.js +0 -49
- package/lib/src/units/make-factory.d.ts +0 -51
- package/lib/src/units/make-factory.js +0 -261
- package/lib/src/units/types.d.ts +0 -73
- package/lib/src/units/types.js +0 -2
package/lib/src/index.js
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.migrateHideWhenEmptyToUnitsLevel = exports.getViewCardTypes = exports.replaceIdsWithNamesInView = exports.replaceNamesWithIdsInView = exports.collectGarbage = exports.fixContextExpressionWithBrokenPath = exports.fixUserSelectedUnits = exports.deleteExpressionWithNotFoundFieldsOrTypesInView = exports.isMetaValid = exports.assertMetaValid = exports.InvalidMetaError = exports.replaceNamesWithIdsInSmartFolder = exports.replaceIdsWithNamesInSmartFolder = exports.deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder = void 0;
|
|
40
|
-
const immutability_helper_1 = __importDefault(require("immutability-helper"));
|
|
41
|
-
const get_1 = __importDefault(require("lodash/get"));
|
|
42
|
-
const omit_1 = __importDefault(require("lodash/omit"));
|
|
43
|
-
const board = __importStar(require("./private/board"));
|
|
44
|
-
const calendar = __importStar(require("./private/calendar"));
|
|
45
|
-
const feed = __importStar(require("./private/feed"));
|
|
46
|
-
const form = __importStar(require("./private/form"));
|
|
47
|
-
const map = __importStar(require("./private/map"));
|
|
48
|
-
const smartfolder = __importStar(require("./private/smart-folder"));
|
|
49
|
-
const timeline = __importStar(require("./private/timeline"));
|
|
50
|
-
const utils_1 = require("./private/utils");
|
|
51
|
-
var smart_folder_1 = require("./private/smart-folder");
|
|
52
|
-
Object.defineProperty(exports, "deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder", { enumerable: true, get: function () { return smart_folder_1.deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder; } });
|
|
53
|
-
Object.defineProperty(exports, "replaceIdsWithNamesInSmartFolder", { enumerable: true, get: function () { return smart_folder_1.replaceIdsWithNamesInSmartFolder; } });
|
|
54
|
-
Object.defineProperty(exports, "replaceNamesWithIdsInSmartFolder", { enumerable: true, get: function () { return smart_folder_1.replaceNamesWithIdsInSmartFolder; } });
|
|
55
|
-
var errors_1 = require("./errors");
|
|
56
|
-
Object.defineProperty(exports, "InvalidMetaError", { enumerable: true, get: function () { return errors_1.InvalidMetaError; } });
|
|
57
|
-
var meta_validation_1 = require("./meta-validation");
|
|
58
|
-
Object.defineProperty(exports, "assertMetaValid", { enumerable: true, get: function () { return meta_validation_1.assertMetaValid; } });
|
|
59
|
-
Object.defineProperty(exports, "isMetaValid", { enumerable: true, get: function () { return meta_validation_1.isMetaValid; } });
|
|
60
|
-
const deleteExpressionWithNotFoundFieldsOrTypesInView = (schema, view, ensureAxisInvariant = true) => {
|
|
61
|
-
switch (view["fibery/type"]) {
|
|
62
|
-
case "board":
|
|
63
|
-
case "gallery":
|
|
64
|
-
return board.deleteExpressionWithNotFoundOrInvalidFieldsOrTypesInBoardView(schema, view, ensureAxisInvariant);
|
|
65
|
-
case "list":
|
|
66
|
-
case "grid":
|
|
67
|
-
case "table":
|
|
68
|
-
return smartfolder.deleteExpressionWithNotFoundFieldsOrTypesInSmartFolder(schema, view);
|
|
69
|
-
case "timeline":
|
|
70
|
-
return timeline.deleteExpressionWithNotFoundFieldsOrTypesInTimelineView(schema, view, ensureAxisInvariant, () => true);
|
|
71
|
-
case "gantt":
|
|
72
|
-
return timeline.deleteExpressionWithNotFoundFieldsOrTypesInTimelineView(schema, view, ensureAxisInvariant,
|
|
73
|
-
// Only hierarchy top level meta items can be grouped
|
|
74
|
-
(metaItem) => !metaItem.groupBy);
|
|
75
|
-
case "calendar":
|
|
76
|
-
return calendar.deleteExpressionWithNotFoundFieldsOrTypesInCalendarView(schema, view);
|
|
77
|
-
case "feed":
|
|
78
|
-
return feed.deleteExpressionWithNotFoundFieldsOrTypesInFeedView(schema, view);
|
|
79
|
-
case "form":
|
|
80
|
-
return form.deleteExpressionWithNotFoundFieldsOrTypesInFormView(schema, view);
|
|
81
|
-
case "map":
|
|
82
|
-
return map.deleteExpressionWithNotFoundFieldsOrTypesInMapView(schema, view);
|
|
83
|
-
default:
|
|
84
|
-
return view;
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
exports.deleteExpressionWithNotFoundFieldsOrTypesInView = deleteExpressionWithNotFoundFieldsOrTypesInView;
|
|
88
|
-
const fixUserSelectedUnits = (schema, view, { unitDefinitions, getDefaultUnitTypeForField, }) => {
|
|
89
|
-
switch (view["fibery/type"]) {
|
|
90
|
-
case "board":
|
|
91
|
-
case "gallery":
|
|
92
|
-
return board.fixUserSelectedUnitsInBoardView(schema, view, { unitDefinitions, getDefaultUnitTypeForField });
|
|
93
|
-
case "list":
|
|
94
|
-
case "grid":
|
|
95
|
-
case "table":
|
|
96
|
-
return smartfolder.fixUserSelectedUnitsInSmartFolder(schema, view, { unitDefinitions, getDefaultUnitTypeForField });
|
|
97
|
-
case "timeline":
|
|
98
|
-
case "gantt":
|
|
99
|
-
return timeline.fixUserSelectedUnitsInTimelineView(schema, view, { unitDefinitions, getDefaultUnitTypeForField });
|
|
100
|
-
case "calendar":
|
|
101
|
-
return calendar.fixUserSelectedUnitsInCalendarView(schema, view, { unitDefinitions, getDefaultUnitTypeForField });
|
|
102
|
-
case "feed":
|
|
103
|
-
return feed.fixUserSelectedUnitsInFeedView(schema, view, { unitDefinitions, getDefaultUnitTypeForField });
|
|
104
|
-
case "map":
|
|
105
|
-
return map.fixUserSelectedUnitsInMapView(schema, view, { unitDefinitions, getDefaultUnitTypeForField });
|
|
106
|
-
default:
|
|
107
|
-
return view;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
exports.fixUserSelectedUnits = fixUserSelectedUnits;
|
|
111
|
-
const fixContextExpressionWithBrokenPath = (schema, view, defaultContextExpression) => {
|
|
112
|
-
switch (view["fibery/type"]) {
|
|
113
|
-
case "board":
|
|
114
|
-
case "gallery":
|
|
115
|
-
return board.fixContextExpressionWithBrokenPath(schema, view, defaultContextExpression);
|
|
116
|
-
case "list":
|
|
117
|
-
case "grid":
|
|
118
|
-
case "table":
|
|
119
|
-
return smartfolder.fixContextExpressionWithBrokenPath(schema, view, defaultContextExpression);
|
|
120
|
-
case "timeline":
|
|
121
|
-
case "gantt":
|
|
122
|
-
return timeline.fixContextExpressionWithBrokenPath(schema, view, defaultContextExpression);
|
|
123
|
-
case "calendar":
|
|
124
|
-
return calendar.fixContextExpressionWithBrokenPath(schema, view, defaultContextExpression);
|
|
125
|
-
case "feed":
|
|
126
|
-
return feed.fixContextExpressionWithBrokenPath(schema, view, defaultContextExpression);
|
|
127
|
-
case "map":
|
|
128
|
-
return map.fixContextExpressionWithBrokenPath(schema, view, defaultContextExpression);
|
|
129
|
-
default:
|
|
130
|
-
return view;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
exports.fixContextExpressionWithBrokenPath = fixContextExpressionWithBrokenPath;
|
|
134
|
-
/**
|
|
135
|
-
* Removes garbage from view's meta to reduce the size.
|
|
136
|
-
*/
|
|
137
|
-
const collectGarbage = (schema, view) => {
|
|
138
|
-
const deleteRemoved = (x) => {
|
|
139
|
-
if (Array.isArray(x)) {
|
|
140
|
-
return x.map(deleteRemoved).filter((y) => y !== utils_1.REMOVE);
|
|
141
|
-
}
|
|
142
|
-
if (typeof x === "object" && x !== null) {
|
|
143
|
-
let tmp = Object.entries(x);
|
|
144
|
-
tmp = tmp.map((e) => [e[0], deleteRemoved(e[1])]);
|
|
145
|
-
tmp = tmp.filter((e) => e[1] !== utils_1.REMOVE);
|
|
146
|
-
return Object.fromEntries(tmp);
|
|
147
|
-
}
|
|
148
|
-
return x;
|
|
149
|
-
};
|
|
150
|
-
switch (view["fibery/type"]) {
|
|
151
|
-
case "board":
|
|
152
|
-
case "gallery":
|
|
153
|
-
return deleteRemoved(board.collectGarbage(view));
|
|
154
|
-
case "list":
|
|
155
|
-
case "grid":
|
|
156
|
-
case "table":
|
|
157
|
-
return deleteRemoved(smartfolder.collectGarbage(view));
|
|
158
|
-
case "timeline":
|
|
159
|
-
case "gantt":
|
|
160
|
-
return deleteRemoved(timeline.collectGarbage(view));
|
|
161
|
-
case "calendar":
|
|
162
|
-
return deleteRemoved(calendar.collectGarbage(view));
|
|
163
|
-
case "feed":
|
|
164
|
-
return deleteRemoved(feed.collectGarbage(view));
|
|
165
|
-
case "map":
|
|
166
|
-
return deleteRemoved(map.collectGarbage(view));
|
|
167
|
-
default:
|
|
168
|
-
return view;
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
exports.collectGarbage = collectGarbage;
|
|
172
|
-
const replaceNamesWithIdsInView = (schema, view) => {
|
|
173
|
-
switch (view["fibery/type"]) {
|
|
174
|
-
case "board":
|
|
175
|
-
case "gallery":
|
|
176
|
-
return board.replaceNamesWithIdsInBoardView(schema, view);
|
|
177
|
-
case "list":
|
|
178
|
-
case "grid":
|
|
179
|
-
case "table":
|
|
180
|
-
return smartfolder.replaceNamesWithIdsInSmartFolder(schema, view);
|
|
181
|
-
case "timeline":
|
|
182
|
-
case "gantt":
|
|
183
|
-
return timeline.replaceNamesWithIdsInTimelineView(schema, view);
|
|
184
|
-
case "calendar":
|
|
185
|
-
return calendar.replaceNamesWithIdsInCalendarView(schema, view);
|
|
186
|
-
case "feed":
|
|
187
|
-
return feed.replaceNamesWithIdsInFeedView(schema, view);
|
|
188
|
-
case "form":
|
|
189
|
-
return form.replaceNamesWithIdsInFormView(schema, view);
|
|
190
|
-
case "map":
|
|
191
|
-
return map.replaceNamesWithIdsInMapView(schema, view);
|
|
192
|
-
default:
|
|
193
|
-
return view;
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
exports.replaceNamesWithIdsInView = replaceNamesWithIdsInView;
|
|
197
|
-
const replaceIdsWithNamesInView = (schema, view) => {
|
|
198
|
-
switch (view["fibery/type"]) {
|
|
199
|
-
case "board":
|
|
200
|
-
case "gallery":
|
|
201
|
-
return board.replaceIdsWithNamesInBoardView(schema, view);
|
|
202
|
-
case "list":
|
|
203
|
-
case "grid":
|
|
204
|
-
case "table":
|
|
205
|
-
return smartfolder.replaceIdsWithNamesInSmartFolder(schema, view);
|
|
206
|
-
case "timeline":
|
|
207
|
-
case "gantt":
|
|
208
|
-
return timeline.replaceIdsWithNamesInTimelineView(schema, view);
|
|
209
|
-
case "calendar":
|
|
210
|
-
return calendar.replaceIdsWithNamesInCalendarView(schema, view);
|
|
211
|
-
case "feed":
|
|
212
|
-
return feed.replaceIdsWithNamesInFeedView(schema, view);
|
|
213
|
-
case "form":
|
|
214
|
-
return form.replaceIdsWithNamesInFormView(schema, view);
|
|
215
|
-
case "map":
|
|
216
|
-
return map.replaceIdsWithNamesInMapView(schema, view);
|
|
217
|
-
default:
|
|
218
|
-
return view;
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
exports.replaceIdsWithNamesInView = replaceIdsWithNamesInView;
|
|
222
|
-
const getViewCardTypes = ({ "fibery/meta": { items } }) => items.map(({ query: { "q/from": type } }) => type);
|
|
223
|
-
exports.getViewCardTypes = getViewCardTypes;
|
|
224
|
-
const migrateHideWhenEmptyToUnitsLevel = (view) => {
|
|
225
|
-
const viewTypesToTransform = ["board", "list", "timeline", "gantt", "calendar", "feed", "map"];
|
|
226
|
-
const viewType = view["fibery/type"];
|
|
227
|
-
if (!viewTypesToTransform.includes(viewType)) {
|
|
228
|
-
return view;
|
|
229
|
-
}
|
|
230
|
-
const showEmptyUnitValues = (0, get_1.default)(view, ["fibery/meta", "showEmptyUnitValues"]);
|
|
231
|
-
if (showEmptyUnitValues === undefined) {
|
|
232
|
-
return view;
|
|
233
|
-
}
|
|
234
|
-
let result = (0, immutability_helper_1.default)(view, {
|
|
235
|
-
"fibery/meta": {
|
|
236
|
-
$apply: (x) => (0, omit_1.default)(x, "showEmptyUnitValues"),
|
|
237
|
-
},
|
|
238
|
-
});
|
|
239
|
-
if (showEmptyUnitValues === true) {
|
|
240
|
-
return result;
|
|
241
|
-
}
|
|
242
|
-
switch (result["fibery/type"]) {
|
|
243
|
-
case "board":
|
|
244
|
-
case "gallery":
|
|
245
|
-
result = board.enableHideWhenEmptyForCovers(result);
|
|
246
|
-
result = board.enableHideWhenEmptyForCheckedEditableUnits(result);
|
|
247
|
-
return result;
|
|
248
|
-
case "list":
|
|
249
|
-
return smartfolder.enableHideWhenEmptyForCheckedUnits(result);
|
|
250
|
-
case "timeline":
|
|
251
|
-
case "gantt":
|
|
252
|
-
return timeline.enableHideWhenEmptyForCheckedEditableUnits(result);
|
|
253
|
-
case "calendar":
|
|
254
|
-
return calendar.enableHideWhenEmptyForCheckedUnits(result);
|
|
255
|
-
case "feed":
|
|
256
|
-
return feed.enableHideWhenEmptyForCheckedUnits(result);
|
|
257
|
-
case "map":
|
|
258
|
-
return map.enableHideWhenEmptyForCheckedUnits(result);
|
|
259
|
-
default:
|
|
260
|
-
return result;
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
exports.migrateHideWhenEmptyToUnitsLevel = migrateHideWhenEmptyToUnitsLevel;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validates meta payload for the view of given type.
|
|
3
|
-
* Throws `InvalidMeta` if meta is not valid.
|
|
4
|
-
* Re-throws errors that are not InvalidMeta.
|
|
5
|
-
*/
|
|
6
|
-
export declare const assertMetaValid: (type: string, meta: unknown) => void;
|
|
7
|
-
/**
|
|
8
|
-
* Returns true if meta is valid for given view type.
|
|
9
|
-
*/
|
|
10
|
-
export declare const isMetaValid: (type: string, meta: unknown) => boolean;
|
|
@@ -1,78 +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.isMetaValid = exports.assertMetaValid = void 0;
|
|
7
|
-
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
-
const errors_1 = require("./errors");
|
|
9
|
-
/**
|
|
10
|
-
* Validates meta payload for the view of given type.
|
|
11
|
-
* Throws `InvalidMeta` if meta is not valid.
|
|
12
|
-
* Re-throws errors that are not InvalidMeta.
|
|
13
|
-
*/
|
|
14
|
-
const assertMetaValid = (type, meta) => {
|
|
15
|
-
(validators.get(type) ?? genericValidator)(meta);
|
|
16
|
-
};
|
|
17
|
-
exports.assertMetaValid = assertMetaValid;
|
|
18
|
-
/**
|
|
19
|
-
* Returns true if meta is valid for given view type.
|
|
20
|
-
*/
|
|
21
|
-
const isMetaValid = (type, meta) => {
|
|
22
|
-
try {
|
|
23
|
-
(0, exports.assertMetaValid)(type, meta);
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
catch (err) {
|
|
27
|
-
if (err instanceof errors_1.InvalidMetaError) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
throw err;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.isMetaValid = isMetaValid;
|
|
34
|
-
const isEmptyObject = (m) => typeof m === "object" && m !== null && Object.keys(m).length === 0;
|
|
35
|
-
const genericValidator = (m) => {
|
|
36
|
-
if (m === null) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const items = (0, get_1.default)(m, "items");
|
|
40
|
-
if (!Array.isArray(items)) {
|
|
41
|
-
throw new errors_1.InvalidMetaError("expected fibery/meta.items to be an array");
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const validators = new Map([
|
|
45
|
-
[
|
|
46
|
-
"document",
|
|
47
|
-
(m) => {
|
|
48
|
-
if (m === null || m === undefined || isEmptyObject(m)) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const s = (0, get_1.default)(m, "documentSecret");
|
|
52
|
-
if (typeof s !== "string") {
|
|
53
|
-
throw new errors_1.InvalidMetaError("expected fibery/meta.documentSecret to be a string");
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
["vizydrop/chart", () => { }],
|
|
58
|
-
["form", () => { }],
|
|
59
|
-
["canvas", () => { }],
|
|
60
|
-
["tlcanvas", () => { }],
|
|
61
|
-
["spreadsheet", () => { }],
|
|
62
|
-
[
|
|
63
|
-
"thread",
|
|
64
|
-
(m) => {
|
|
65
|
-
if (isEmptyObject(m)) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const id = (0, get_1.default)(m, "id");
|
|
69
|
-
const typeId = (0, get_1.default)(m, "typeId");
|
|
70
|
-
if (typeof id !== "string" || typeof typeId !== "string") {
|
|
71
|
-
throw new errors_1.InvalidMetaError("expected fibery/meta.id and fibery/meta.typeId to be strings");
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
["dashboard", () => { }],
|
|
76
|
-
["embed", () => { }],
|
|
77
|
-
["page", () => { }],
|
|
78
|
-
]);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Expression } from "@fibery/expression-utils/src/types";
|
|
2
|
-
import type { FieldObject, Schema } from "@fibery/schema";
|
|
3
|
-
import type { Unit } from "@fibery/views/src/units/types";
|
|
4
|
-
import type { UnitDefinitions, ViewRecord } from "./utils";
|
|
5
|
-
export declare const replaceIdsWithNamesInBoardView: (schema: Schema, view: ViewRecord) => any;
|
|
6
|
-
export declare const replaceNamesWithIdsInBoardView: (schema: Schema, view: ViewRecord) => any;
|
|
7
|
-
export declare const deleteExpressionWithNotFoundOrInvalidFieldsOrTypesInBoardView: (schema: Schema, view: ViewRecord, ensureAxisInvariant?: boolean) => any;
|
|
8
|
-
export declare const fixUserSelectedUnitsInBoardView: (schema: Schema, view: ViewRecord, { unitDefinitions, getDefaultUnitTypeForField, }: {
|
|
9
|
-
unitDefinitions: UnitDefinitions;
|
|
10
|
-
getDefaultUnitTypeForField: (fieldObject: FieldObject, allowedUnits: Unit[]) => string | undefined;
|
|
11
|
-
}) => any;
|
|
12
|
-
export declare const fixContextExpressionWithBrokenPath: (schema: Schema, view: ViewRecord, defaultContextExpression: Expression) => any;
|
|
13
|
-
export declare const collectGarbage: (view: ViewRecord) => any;
|
|
14
|
-
export declare const enableHideWhenEmptyForCovers: (view: ViewRecord) => any;
|
|
15
|
-
export declare const enableHideWhenEmptyForCheckedEditableUnits: (view: ViewRecord) => any;
|