@fibery/views 17.0.4 → 18.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +17 -0
- package/lib/jest.config.d.ts +2 -0
- package/lib/jest.config.js +33 -0
- package/lib/src/field-utils/avatar.d.ts +20 -0
- package/lib/src/field-utils/avatar.js +42 -0
- package/lib/src/field-utils/back-references.d.ts +15 -0
- package/lib/src/field-utils/back-references.js +21 -0
- package/lib/src/field-utils/comments.d.ts +60 -0
- package/lib/src/field-utils/comments.js +46 -0
- package/lib/src/field-utils/date-time.d.ts +14 -0
- package/lib/src/field-utils/date-time.js +56 -0
- package/lib/src/field-utils/enum-value.d.ts +13 -0
- package/lib/src/field-utils/enum-value.js +29 -0
- package/lib/src/field-utils/file.d.ts +4 -0
- package/lib/src/field-utils/file.js +18 -0
- package/lib/src/field-utils/icon.d.ts +10 -0
- package/lib/src/field-utils/icon.js +26 -0
- package/lib/src/field-utils/number.d.ts +31 -0
- package/lib/src/field-utils/number.js +91 -0
- package/lib/src/field-utils/reference-collection.d.ts +18 -0
- package/lib/src/field-utils/reference-collection.js +45 -0
- package/lib/src/field-utils/reference.d.ts +7 -0
- package/lib/src/field-utils/reference.js +57 -0
- package/lib/src/field-utils/relation-view.d.ts +2 -0
- package/lib/src/field-utils/relation-view.js +12 -0
- package/lib/src/field-utils/rich-text.d.ts +12 -0
- package/lib/src/field-utils/rich-text.js +27 -0
- package/lib/src/field-utils/text.d.ts +35 -0
- package/lib/src/field-utils/text.js +40 -0
- package/lib/src/field-utils/user-active.d.ts +8 -0
- package/lib/src/field-utils/user-active.js +28 -0
- package/lib/src/field-utils/user-role.d.ts +6 -0
- package/lib/src/field-utils/user-role.js +25 -0
- package/lib/src/field-utils/workflow.d.ts +15 -0
- package/lib/src/field-utils/workflow.js +56 -0
- package/lib/src/index.d.ts +16 -0
- package/lib/src/index.js +258 -0
- package/lib/src/private/board.d.ts +11 -0
- package/lib/src/private/board.js +326 -0
- package/lib/src/private/calendar.d.ts +10 -0
- package/lib/src/private/calendar.js +122 -0
- package/lib/src/private/feed.d.ts +10 -0
- package/lib/src/private/feed.js +119 -0
- package/lib/src/private/form.d.ts +3 -0
- package/lib/src/private/form.js +61 -0
- package/lib/src/private/map.d.ts +10 -0
- package/lib/src/private/map.js +119 -0
- package/lib/src/private/smart-folder.d.ts +23 -0
- package/lib/src/private/smart-folder.js +274 -0
- package/lib/src/private/test-data/garbage-test.d.ts +649 -0
- package/lib/src/private/test-data/garbage-test.js +520 -0
- package/lib/src/private/test-data/kanban.d.ts +1123 -0
- package/lib/src/private/test-data/kanban.js +1203 -0
- package/lib/src/private/test-data/tasks.d.ts +3216 -0
- package/lib/src/private/test-data/tasks.js +2731 -0
- package/lib/src/private/timeline.d.ts +10 -0
- package/lib/src/private/timeline.js +323 -0
- package/lib/src/private/units.d.ts +6 -0
- package/lib/src/private/units.js +144 -0
- package/lib/src/private/utils.d.ts +17 -0
- package/lib/src/private/utils.js +267 -0
- package/lib/src/tsfixme.d.ts +1 -0
- package/lib/src/tsfixme.js +2 -0
- package/lib/src/unit-definitions/avatar-collection.d.ts +2 -0
- package/lib/src/unit-definitions/avatar-collection.js +53 -0
- package/lib/src/unit-definitions/avatar-input.d.ts +2 -0
- package/lib/src/unit-definitions/avatar-input.js +12 -0
- package/lib/src/unit-definitions/avatar.d.ts +2 -0
- package/lib/src/unit-definitions/avatar.js +80 -0
- package/lib/src/unit-definitions/back-references-list.d.ts +2 -0
- package/lib/src/unit-definitions/back-references-list.js +38 -0
- package/lib/src/unit-definitions/bool-checkbox.d.ts +2 -0
- package/lib/src/unit-definitions/bool-checkbox.js +25 -0
- package/lib/src/unit-definitions/bool.d.ts +2 -0
- package/lib/src/unit-definitions/bool.js +22 -0
- package/lib/src/unit-definitions/collection-count.d.ts +2 -0
- package/lib/src/unit-definitions/collection-count.js +32 -0
- package/lib/src/unit-definitions/color-input.d.ts +2 -0
- package/lib/src/unit-definitions/color-input.js +21 -0
- package/lib/src/unit-definitions/comments-list.d.ts +2 -0
- package/lib/src/unit-definitions/comments-list.js +25 -0
- package/lib/src/unit-definitions/date-range-combobox.d.ts +2 -0
- package/lib/src/unit-definitions/date-range-combobox.js +22 -0
- package/lib/src/unit-definitions/date-range.d.ts +2 -0
- package/lib/src/unit-definitions/date-range.js +22 -0
- package/lib/src/unit-definitions/date-time-combobox.d.ts +2 -0
- package/lib/src/unit-definitions/date-time-combobox.js +22 -0
- package/lib/src/unit-definitions/date.d.ts +2 -0
- package/lib/src/unit-definitions/date.js +22 -0
- package/lib/src/unit-definitions/email-input.d.ts +2 -0
- package/lib/src/unit-definitions/email-input.js +12 -0
- package/lib/src/unit-definitions/email.d.ts +2 -0
- package/lib/src/unit-definitions/email.js +17 -0
- package/lib/src/unit-definitions/emoji.d.ts +2 -0
- package/lib/src/unit-definitions/emoji.js +17 -0
- package/lib/src/unit-definitions/file-collection-count.d.ts +2 -0
- package/lib/src/unit-definitions/file-collection-count.js +30 -0
- package/lib/src/unit-definitions/file-compact-collection.d.ts +2 -0
- package/lib/src/unit-definitions/file-compact-collection.js +30 -0
- package/lib/src/unit-definitions/file-compact-reference.d.ts +2 -0
- package/lib/src/unit-definitions/file-compact-reference.js +36 -0
- package/lib/src/unit-definitions/file-reference.d.ts +2 -0
- package/lib/src/unit-definitions/file-reference.js +26 -0
- package/lib/src/unit-definitions/files-gallery.d.ts +2 -0
- package/lib/src/unit-definitions/files-gallery.js +30 -0
- package/lib/src/unit-definitions/files-l-list-item.d.ts +2 -0
- package/lib/src/unit-definitions/files-l-list-item.js +26 -0
- package/lib/src/unit-definitions/files-l-list.d.ts +2 -0
- package/lib/src/unit-definitions/files-l-list.js +30 -0
- package/lib/src/unit-definitions/files-list-item.d.ts +2 -0
- package/lib/src/unit-definitions/files-list-item.js +26 -0
- package/lib/src/unit-definitions/files-list.d.ts +2 -0
- package/lib/src/unit-definitions/files-list.js +30 -0
- package/lib/src/unit-definitions/geometry-preview.d.ts +2 -0
- package/lib/src/unit-definitions/geometry-preview.js +17 -0
- package/lib/src/unit-definitions/icon-button.d.ts +2 -0
- package/lib/src/unit-definitions/icon-button.js +29 -0
- package/lib/src/unit-definitions/icon-input.d.ts +2 -0
- package/lib/src/unit-definitions/icon-input.js +12 -0
- package/lib/src/unit-definitions/id.d.ts +2 -0
- package/lib/src/unit-definitions/id.js +29 -0
- package/lib/src/unit-definitions/index.d.ts +27 -0
- package/lib/src/unit-definitions/index.js +57 -0
- package/lib/src/unit-definitions/json-input.d.ts +2 -0
- package/lib/src/unit-definitions/json-input.js +21 -0
- package/lib/src/unit-definitions/location-input.d.ts +2 -0
- package/lib/src/unit-definitions/location-input.js +18 -0
- package/lib/src/unit-definitions/location.d.ts +2 -0
- package/lib/src/unit-definitions/location.js +17 -0
- package/lib/src/unit-definitions/not-found.d.ts +2 -0
- package/lib/src/unit-definitions/not-found.js +24 -0
- package/lib/src/unit-definitions/number-input.d.ts +2 -0
- package/lib/src/unit-definitions/number-input.js +22 -0
- package/lib/src/unit-definitions/number.d.ts +2 -0
- package/lib/src/unit-definitions/number.js +27 -0
- package/lib/src/unit-definitions/phone-input.d.ts +2 -0
- package/lib/src/unit-definitions/phone-input.js +12 -0
- package/lib/src/unit-definitions/phone.d.ts +2 -0
- package/lib/src/unit-definitions/phone.js +12 -0
- package/lib/src/unit-definitions/progress-bar.d.ts +2 -0
- package/lib/src/unit-definitions/progress-bar.js +32 -0
- package/lib/src/unit-definitions/reference-collection-combobox.d.ts +2 -0
- package/lib/src/unit-definitions/reference-collection-combobox.js +21 -0
- package/lib/src/unit-definitions/reference-collection-list.d.ts +2 -0
- package/lib/src/unit-definitions/reference-collection-list.js +22 -0
- package/lib/src/unit-definitions/reference-collection-view.d.ts +2 -0
- package/lib/src/unit-definitions/reference-collection-view.js +19 -0
- package/lib/src/unit-definitions/reference-collection.d.ts +2 -0
- package/lib/src/unit-definitions/reference-collection.js +27 -0
- package/lib/src/unit-definitions/reference-combobox.d.ts +2 -0
- package/lib/src/unit-definitions/reference-combobox.js +21 -0
- package/lib/src/unit-definitions/reference-icon.d.ts +2 -0
- package/lib/src/unit-definitions/reference-icon.js +12 -0
- package/lib/src/unit-definitions/reference.d.ts +2 -0
- package/lib/src/unit-definitions/reference.js +49 -0
- package/lib/src/unit-definitions/rich-text-document.d.ts +2 -0
- package/lib/src/unit-definitions/rich-text-document.js +22 -0
- package/lib/src/unit-definitions/rich-text-snippet.d.ts +2 -0
- package/lib/src/unit-definitions/rich-text-snippet.js +39 -0
- package/lib/src/unit-definitions/single-location-preview.d.ts +2 -0
- package/lib/src/unit-definitions/single-location-preview.js +17 -0
- package/lib/src/unit-definitions/text-input.d.ts +2 -0
- package/lib/src/unit-definitions/text-input.js +22 -0
- package/lib/src/unit-definitions/text.d.ts +2 -0
- package/lib/src/unit-definitions/text.js +22 -0
- package/lib/src/unit-definitions/title-input.d.ts +2 -0
- package/lib/src/unit-definitions/title-input.js +16 -0
- package/lib/src/unit-definitions/title.d.ts +2 -0
- package/lib/src/unit-definitions/title.js +34 -0
- package/lib/src/unit-definitions/type-badge-abbr.d.ts +2 -0
- package/lib/src/unit-definitions/type-badge-abbr.js +25 -0
- package/lib/src/unit-definitions/type-badge.d.ts +2 -0
- package/lib/src/unit-definitions/type-badge.js +25 -0
- package/lib/src/unit-definitions/type-icon.d.ts +2 -0
- package/lib/src/unit-definitions/type-icon.js +25 -0
- package/lib/src/unit-definitions/url-input.d.ts +2 -0
- package/lib/src/unit-definitions/url-input.js +12 -0
- package/lib/src/unit-definitions/url.d.ts +2 -0
- package/lib/src/unit-definitions/url.js +17 -0
- package/lib/src/unit-definitions/user-button.d.ts +2 -0
- package/lib/src/unit-definitions/user-button.js +23 -0
- package/lib/src/unit-definitions/user-role-input.d.ts +2 -0
- package/lib/src/unit-definitions/user-role-input.js +12 -0
- package/lib/src/unit-definitions/user-role.d.ts +2 -0
- package/lib/src/unit-definitions/user-role.js +29 -0
- package/lib/src/unit-utils/access.d.ts +9 -0
- package/lib/src/unit-utils/access.js +14 -0
- package/lib/src/unit-utils/can-edit-field.d.ts +6 -0
- package/lib/src/unit-utils/can-edit-field.js +8 -0
- package/lib/src/unit-utils/common.d.ts +14 -0
- package/lib/src/unit-utils/common.js +43 -0
- package/lib/src/unit-utils/decimal.d.ts +42 -0
- package/lib/src/unit-utils/decimal.js +414 -0
- package/lib/src/unit-utils/dynamic-keys.d.ts +7 -0
- package/lib/src/unit-utils/dynamic-keys.js +13 -0
- package/lib/src/unit-utils/enums.d.ts +27 -0
- package/lib/src/unit-utils/enums.js +69 -0
- package/lib/src/unit-utils/formatters.d.ts +50 -0
- package/lib/src/unit-utils/formatters.js +163 -0
- package/lib/src/unit-utils/get-export-value.d.ts +45 -0
- package/lib/src/unit-utils/get-export-value.js +83 -0
- package/lib/src/unit-utils/get-field-label.d.ts +6 -0
- package/lib/src/unit-utils/get-field-label.js +10 -0
- package/lib/src/unit-utils/get-unmatched-unit-label.d.ts +2 -0
- package/lib/src/unit-utils/get-unmatched-unit-label.js +9 -0
- package/lib/src/unit-utils/schema.d.ts +4 -0
- package/lib/src/unit-utils/schema.js +12 -0
- package/lib/src/units/board.d.ts +43 -0
- package/lib/src/units/board.js +51 -0
- package/lib/src/units/canvas/all-units-data-definitions.d.ts +18 -0
- package/lib/src/units/canvas/all-units-data-definitions.js +40 -0
- package/lib/src/units/canvas/index.d.ts +42 -0
- package/lib/src/units/canvas/index.js +48 -0
- package/lib/src/units/canvas/type-badge-abbr.d.ts +36 -0
- package/lib/src/units/canvas/type-badge-abbr.js +11 -0
- package/lib/src/units/canvas/type-badge.d.ts +36 -0
- package/lib/src/units/canvas/type-badge.js +11 -0
- package/lib/src/units/default.d.ts +43 -0
- package/lib/src/units/default.js +51 -0
- package/lib/src/units/gallery.d.ts +3 -0
- package/lib/src/units/gallery.js +18 -0
- package/lib/src/units/gantt.d.ts +44 -0
- package/lib/src/units/gantt.js +59 -0
- package/lib/src/units/get-unit-definitions-for-view-type.d.ts +2 -0
- package/lib/src/units/get-unit-definitions-for-view-type.js +64 -0
- package/lib/src/units/grid.d.ts +42 -0
- package/lib/src/units/grid.js +67 -0
- package/lib/src/units/list.d.ts +43 -0
- package/lib/src/units/list.js +49 -0
- package/lib/src/units/make-factory.d.ts +50 -0
- package/lib/src/units/make-factory.js +245 -0
- package/lib/src/units/types.d.ts +73 -0
- package/lib/src/units/types.js +2 -0
- package/package.json +42 -52
- package/lib/views.js +0 -1813
- /package/{index.js → lib/index.d.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateRange = void 0;
|
|
4
|
+
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
+
const common_1 = require("../unit-utils/common");
|
|
6
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
7
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
8
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
|
+
const type = "date-range";
|
|
10
|
+
exports.DateRange = {
|
|
11
|
+
type,
|
|
12
|
+
name: "Date range",
|
|
13
|
+
canEdit: can_edit_field_1.canEditField,
|
|
14
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
17
|
+
return (0, query_1.getQuerySelectForExpression)({ typeObject, expression });
|
|
18
|
+
},
|
|
19
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
20
|
+
getExportValue: get_export_value_1.getDateRangeExportValue,
|
|
21
|
+
canExport: () => true,
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateTimeCombobox = void 0;
|
|
4
|
+
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
+
const common_1 = require("../unit-utils/common");
|
|
6
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
7
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
8
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
9
|
+
const type = "date-time-combobox";
|
|
10
|
+
exports.DateTimeCombobox = {
|
|
11
|
+
type,
|
|
12
|
+
name: "Date",
|
|
13
|
+
canEdit: can_edit_field_1.canEditField,
|
|
14
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
getQuerySelect: ({ typeObject, unit: { expression } }) => {
|
|
17
|
+
return (0, query_1.getQuerySelectForExpression)({ typeObject, expression });
|
|
18
|
+
},
|
|
19
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
20
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
21
|
+
canExport: () => true,
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Date = void 0;
|
|
4
|
+
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
+
const common_1 = require("../unit-utils/common");
|
|
6
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
7
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
8
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
9
|
+
const type = "date";
|
|
10
|
+
exports.Date = {
|
|
11
|
+
type,
|
|
12
|
+
name: "Date",
|
|
13
|
+
canEdit: can_edit_field_1.canEditField,
|
|
14
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
15
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
16
|
+
getQuerySelect: ({ typeObject, unit: { expression } }) => {
|
|
17
|
+
return (0, query_1.getQuerySelectForExpression)({ typeObject, expression });
|
|
18
|
+
},
|
|
19
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
20
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
21
|
+
canExport: () => true,
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailInput = void 0;
|
|
4
|
+
const text_input_1 = require("./text-input");
|
|
5
|
+
const common_1 = require("../unit-utils/common");
|
|
6
|
+
const type = "email-input";
|
|
7
|
+
exports.EmailInput = {
|
|
8
|
+
...text_input_1.TextInput,
|
|
9
|
+
type,
|
|
10
|
+
name: "Email input",
|
|
11
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Email = void 0;
|
|
4
|
+
const text_1 = require("./text");
|
|
5
|
+
const common_1 = require("../unit-utils/common");
|
|
6
|
+
const type = "email";
|
|
7
|
+
exports.Email = {
|
|
8
|
+
type,
|
|
9
|
+
name: "Input",
|
|
10
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
11
|
+
getLabel: text_1.Text.getLabel,
|
|
12
|
+
getQuerySelect: text_1.Text.getQuerySelect,
|
|
13
|
+
calculateErrors: text_1.Text.calculateErrors,
|
|
14
|
+
canEdit: text_1.Text.canEdit,
|
|
15
|
+
getExportValue: text_1.Text.getExportValue,
|
|
16
|
+
canExport: () => true,
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Emoji = void 0;
|
|
4
|
+
const text_1 = require("./text");
|
|
5
|
+
const common_1 = require("../unit-utils/common");
|
|
6
|
+
const type = "emoji";
|
|
7
|
+
exports.Emoji = {
|
|
8
|
+
type,
|
|
9
|
+
name: "Icon",
|
|
10
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
11
|
+
getLabel: text_1.Text.getLabel,
|
|
12
|
+
getQuerySelect: text_1.Text.getQuerySelect,
|
|
13
|
+
calculateErrors: text_1.Text.calculateErrors,
|
|
14
|
+
canEdit: text_1.Text.canEdit,
|
|
15
|
+
getExportValue: text_1.Text.getExportValue,
|
|
16
|
+
canExport: () => true,
|
|
17
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileCollectionCount = void 0;
|
|
4
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
+
const file_1 = require("../field-utils/file");
|
|
6
|
+
const common_1 = require("../unit-utils/common");
|
|
7
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
8
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
10
|
+
const type = "file-collection-count";
|
|
11
|
+
exports.FileCollectionCount = {
|
|
12
|
+
type,
|
|
13
|
+
name: "Count",
|
|
14
|
+
canEdit: can_edit_field_1.canEditField,
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
17
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
18
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
19
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
20
|
+
return {
|
|
21
|
+
[fieldObject.name]: {
|
|
22
|
+
"q/from": [fieldObject.name],
|
|
23
|
+
"q/limit": "q/no-limit",
|
|
24
|
+
"q/select": (0, file_1.getFilesSelect)(fieldObject),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
29
|
+
canExport: () => true,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileCompactCollection = void 0;
|
|
4
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
+
const file_1 = require("../field-utils/file");
|
|
6
|
+
const common_1 = require("../unit-utils/common");
|
|
7
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
8
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
9
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
10
|
+
const type = "file-compact-collection";
|
|
11
|
+
exports.FileCompactCollection = {
|
|
12
|
+
type,
|
|
13
|
+
name: "List",
|
|
14
|
+
canEdit: can_edit_field_1.canEditField,
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
17
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
18
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
19
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
20
|
+
return {
|
|
21
|
+
[fieldObject.name]: {
|
|
22
|
+
"q/from": [fieldObject.name],
|
|
23
|
+
"q/limit": "q/no-limit",
|
|
24
|
+
"q/select": (0, file_1.getFilesSelect)(fieldObject),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
29
|
+
canExport: () => true,
|
|
30
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileCompactReference = void 0;
|
|
4
|
+
const array_1 = require("@fibery/helpers/utils/array");
|
|
5
|
+
const select_1 = require("@fibery/query-utils/src/select");
|
|
6
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
7
|
+
const reference_1 = require("../field-utils/reference");
|
|
8
|
+
const common_1 = require("../unit-utils/common");
|
|
9
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
10
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
11
|
+
const type = "file-compact-reference";
|
|
12
|
+
exports.FileCompactReference = {
|
|
13
|
+
type,
|
|
14
|
+
name: "List",
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
makeUnit: (args) => {
|
|
17
|
+
if (!args) {
|
|
18
|
+
return { type, kind: "field" };
|
|
19
|
+
}
|
|
20
|
+
(0, utils_1.assertIsValidExpression)(args.expression);
|
|
21
|
+
return { type, kind: "field", expression: args.expression };
|
|
22
|
+
},
|
|
23
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
24
|
+
const field = (0, array_1.single)(expression);
|
|
25
|
+
const fieldObject = typeObject.fieldObjectsByName[field];
|
|
26
|
+
return (0, select_1.denormalizeSelect)({ [field]: (0, reference_1.getReferenceFieldNormalizedSelectClause)(fieldObject, [field]) });
|
|
27
|
+
},
|
|
28
|
+
calculateErrors({ typeObject, unit }) {
|
|
29
|
+
return (0, common_1.calculateUnitExpressionErrors)({ typeObject, unit });
|
|
30
|
+
},
|
|
31
|
+
canEdit({ typeObject, unit: { expression } }) {
|
|
32
|
+
return (0, common_1.canEditFieldExpression)(typeObject, expression);
|
|
33
|
+
},
|
|
34
|
+
getExportValue: get_export_value_1.getReferenceExportValue,
|
|
35
|
+
canExport: () => true,
|
|
36
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileReference = void 0;
|
|
4
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
+
const file_1 = require("../field-utils/file");
|
|
6
|
+
const common_1 = require("../unit-utils/common");
|
|
7
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
8
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
9
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
10
|
+
const type = "file-reference";
|
|
11
|
+
exports.FileReference = {
|
|
12
|
+
type,
|
|
13
|
+
name: "Gallery",
|
|
14
|
+
canEdit: can_edit_field_1.canEditField,
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
17
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
18
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
19
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
20
|
+
return {
|
|
21
|
+
[fieldObject.name]: (0, file_1.getFilesSelect)(fieldObject),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
25
|
+
canExport: () => true,
|
|
26
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FilesGallery = void 0;
|
|
4
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
+
const file_1 = require("../field-utils/file");
|
|
6
|
+
const common_1 = require("../unit-utils/common");
|
|
7
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
8
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
10
|
+
const type = "files-gallery";
|
|
11
|
+
exports.FilesGallery = {
|
|
12
|
+
type,
|
|
13
|
+
name: "Gallery",
|
|
14
|
+
canEdit: can_edit_field_1.canEditField,
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
17
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
18
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
19
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
20
|
+
return {
|
|
21
|
+
[fieldObject.name]: {
|
|
22
|
+
"q/from": [fieldObject.name],
|
|
23
|
+
"q/limit": "q/no-limit",
|
|
24
|
+
"q/select": (0, file_1.getFilesSelect)(fieldObject),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
29
|
+
canExport: () => true,
|
|
30
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileLListItem = void 0;
|
|
4
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
+
const file_1 = require("../field-utils/file");
|
|
6
|
+
const common_1 = require("../unit-utils/common");
|
|
7
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
8
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
10
|
+
const type = "files-l-list-item";
|
|
11
|
+
exports.FileLListItem = {
|
|
12
|
+
type,
|
|
13
|
+
name: "List",
|
|
14
|
+
canEdit: can_edit_field_1.canEditField,
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
17
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
18
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
19
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
20
|
+
return {
|
|
21
|
+
[fieldObject.name]: (0, file_1.getFilesSelect)(fieldObject),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
25
|
+
canExport: () => true,
|
|
26
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileLList = void 0;
|
|
4
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
+
const file_1 = require("../field-utils/file");
|
|
6
|
+
const common_1 = require("../unit-utils/common");
|
|
7
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
8
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
10
|
+
const type = "files-l-list";
|
|
11
|
+
exports.FileLList = {
|
|
12
|
+
type,
|
|
13
|
+
name: "List",
|
|
14
|
+
canEdit: can_edit_field_1.canEditField,
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
17
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
18
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
19
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
20
|
+
return {
|
|
21
|
+
[fieldObject.name]: {
|
|
22
|
+
"q/from": [fieldObject.name],
|
|
23
|
+
"q/limit": "q/no-limit",
|
|
24
|
+
"q/select": (0, file_1.getFilesSelect)(fieldObject),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
29
|
+
canExport: () => true,
|
|
30
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileListItem = void 0;
|
|
4
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
+
const file_1 = require("../field-utils/file");
|
|
6
|
+
const common_1 = require("../unit-utils/common");
|
|
7
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
8
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
10
|
+
const type = "files-list-item";
|
|
11
|
+
exports.FileListItem = {
|
|
12
|
+
type,
|
|
13
|
+
name: "List",
|
|
14
|
+
canEdit: can_edit_field_1.canEditField,
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
17
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
18
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
19
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
20
|
+
return {
|
|
21
|
+
[fieldObject.name]: (0, file_1.getFilesSelect)(fieldObject),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
25
|
+
canExport: () => true,
|
|
26
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileList = void 0;
|
|
4
|
+
const utils_1 = require("@fibery/expression-utils/src/utils");
|
|
5
|
+
const file_1 = require("../field-utils/file");
|
|
6
|
+
const common_1 = require("../unit-utils/common");
|
|
7
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
8
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
9
|
+
const get_export_value_1 = require("../unit-utils/get-export-value");
|
|
10
|
+
const type = "files-list";
|
|
11
|
+
exports.FileList = {
|
|
12
|
+
type,
|
|
13
|
+
name: "List",
|
|
14
|
+
canEdit: can_edit_field_1.canEditField,
|
|
15
|
+
getLabel: get_field_label_1.getFieldLabel,
|
|
16
|
+
calculateErrors: common_1.calculateUnitExpressionErrors,
|
|
17
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
18
|
+
getQuerySelect({ typeObject, unit: { expression } }) {
|
|
19
|
+
const fieldObject = (0, utils_1.getFieldObjectByFieldExpression)({ typeObject, expression });
|
|
20
|
+
return {
|
|
21
|
+
[fieldObject.name]: {
|
|
22
|
+
"q/from": [fieldObject.name],
|
|
23
|
+
"q/limit": "q/no-limit",
|
|
24
|
+
"q/select": (0, file_1.getFilesSelect)(fieldObject),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
getExportValue: get_export_value_1.getExportValue,
|
|
29
|
+
canExport: () => true,
|
|
30
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GeometryPreview = void 0;
|
|
4
|
+
const text_1 = require("./text");
|
|
5
|
+
const common_1 = require("../unit-utils/common");
|
|
6
|
+
const type = "geometry-preview";
|
|
7
|
+
exports.GeometryPreview = {
|
|
8
|
+
type,
|
|
9
|
+
name: "GeoJSON Preview",
|
|
10
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
11
|
+
getLabel: text_1.Text.getLabel,
|
|
12
|
+
getQuerySelect: text_1.Text.getQuerySelect,
|
|
13
|
+
calculateErrors: text_1.Text.calculateErrors,
|
|
14
|
+
canEdit: text_1.Text.canEdit,
|
|
15
|
+
getExportValue: text_1.Text.getExportValue,
|
|
16
|
+
canExport: () => true,
|
|
17
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IconButton = void 0;
|
|
4
|
+
const query_1 = require("@fibery/query-utils/src/query");
|
|
5
|
+
const common_1 = require("../unit-utils/common");
|
|
6
|
+
const can_edit_field_1 = require("../unit-utils/can-edit-field");
|
|
7
|
+
const get_field_label_1 = require("../unit-utils/get-field-label");
|
|
8
|
+
const type = "icon-button";
|
|
9
|
+
exports.IconButton = {
|
|
10
|
+
type: type,
|
|
11
|
+
name: "Icon Button",
|
|
12
|
+
makeUnit(params) {
|
|
13
|
+
return (0, common_1.makeUnitMethod)(type)(params);
|
|
14
|
+
},
|
|
15
|
+
canEdit({ typeObject, unit }) {
|
|
16
|
+
return unit.kind === "user-button" ? true : (0, can_edit_field_1.canEditField)({ typeObject, unit });
|
|
17
|
+
},
|
|
18
|
+
getLabel({ typeObject, unit }) {
|
|
19
|
+
return unit.kind === "user-button" ? "" : (0, get_field_label_1.getFieldLabel)({ typeObject, unit });
|
|
20
|
+
},
|
|
21
|
+
getQuerySelect({ typeObject, unit }) {
|
|
22
|
+
return unit.kind === "user-button" ? {} : (0, query_1.getQuerySelectForExpression)({ typeObject, expression: unit.expression });
|
|
23
|
+
},
|
|
24
|
+
calculateErrors({ typeObject, unit }) {
|
|
25
|
+
return unit.kind === "user-button" ? [] : (0, common_1.calculateUnitExpressionErrors)({ typeObject, unit });
|
|
26
|
+
},
|
|
27
|
+
getExportValue: () => null,
|
|
28
|
+
canExport: () => false,
|
|
29
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IconInput = void 0;
|
|
4
|
+
const emoji_1 = require("./emoji");
|
|
5
|
+
const common_1 = require("../unit-utils/common");
|
|
6
|
+
const type = "icon-input";
|
|
7
|
+
exports.IconInput = {
|
|
8
|
+
...emoji_1.Emoji,
|
|
9
|
+
type,
|
|
10
|
+
name: "Input",
|
|
11
|
+
makeUnit: (0, common_1.makeUnitMethod)(type),
|
|
12
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Id = void 0;
|
|
4
|
+
const select_1 = require("@fibery/query-utils/src/select");
|
|
5
|
+
const type = "id";
|
|
6
|
+
exports.Id = {
|
|
7
|
+
type,
|
|
8
|
+
name: "Id",
|
|
9
|
+
canEdit: () => false,
|
|
10
|
+
makeUnit() {
|
|
11
|
+
return { type, kind: "field" };
|
|
12
|
+
},
|
|
13
|
+
getLabel({ typeObject }) {
|
|
14
|
+
return typeObject.publicIdFieldObject.title;
|
|
15
|
+
},
|
|
16
|
+
getQuerySelect({ typeObject }) {
|
|
17
|
+
return (0, select_1.toSelectMapClause)([typeObject.publicIdField]);
|
|
18
|
+
},
|
|
19
|
+
calculateErrors({ typeObject, unit }) {
|
|
20
|
+
if (typeObject.publicIdFieldObject === null) {
|
|
21
|
+
return [`${typeObject.name} does not have public id field for ${unit.type} unit`];
|
|
22
|
+
}
|
|
23
|
+
return [];
|
|
24
|
+
},
|
|
25
|
+
getExportValue: ({ object, typeObject }) => {
|
|
26
|
+
return object?.[typeObject.publicIdField];
|
|
27
|
+
},
|
|
28
|
+
canExport: () => true,
|
|
29
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { AvatarCollection } from "./avatar-collection";
|
|
2
|
+
export { Avatar } from "./avatar";
|
|
3
|
+
export { Bool } from "./bool";
|
|
4
|
+
export { CollectionCount } from "./collection-count";
|
|
5
|
+
export { Date } from "./date";
|
|
6
|
+
export { DateRange } from "./date-range";
|
|
7
|
+
export { Email } from "./email";
|
|
8
|
+
export { Emoji } from "./emoji";
|
|
9
|
+
export { IconButton } from "./icon-button";
|
|
10
|
+
export { Id } from "./id";
|
|
11
|
+
export { Location } from "./location";
|
|
12
|
+
export { Number } from "./number";
|
|
13
|
+
export { Phone } from "./phone";
|
|
14
|
+
export { ProgressBar } from "./progress-bar";
|
|
15
|
+
export { ReferenceCollection } from "./reference-collection";
|
|
16
|
+
export { ReferenceIcon } from "./reference-icon";
|
|
17
|
+
export { Reference } from "./reference";
|
|
18
|
+
export { RichTextSnippet } from "./rich-text-snippet";
|
|
19
|
+
export { Text } from "./text";
|
|
20
|
+
export { Title } from "./title";
|
|
21
|
+
export { TypeBadgeAbbr } from "./type-badge-abbr";
|
|
22
|
+
export { TypeBadge } from "./type-badge";
|
|
23
|
+
export { TypeIcon } from "./type-icon";
|
|
24
|
+
export { Url } from "./url";
|
|
25
|
+
export { UserButton } from "./user-button";
|
|
26
|
+
export { UserRole } from "./user-role";
|
|
27
|
+
export { FileCollectionCount } from "./file-collection-count";
|