@budibase/frontend-core 2.22.15 → 2.22.17
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/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.17",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
7
7
|
"svelte": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@budibase/bbui": "2.22.
|
|
10
|
-
"@budibase/shared-core": "2.22.
|
|
9
|
+
"@budibase/bbui": "2.22.17",
|
|
10
|
+
"@budibase/shared-core": "2.22.17",
|
|
11
|
+
"@budibase/types": "2.22.17",
|
|
11
12
|
"dayjs": "^1.10.8",
|
|
12
13
|
"lodash": "4.17.21",
|
|
13
14
|
"socket.io-client": "^4.6.1"
|
|
14
15
|
},
|
|
15
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "49af7cfeb796003e470adf1126aefcfec3f3135f"
|
|
16
17
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { FieldType } from "@budibase/types"
|
|
2
|
+
|
|
1
3
|
import OptionsCell from "../cells/OptionsCell.svelte"
|
|
2
4
|
import DateCell from "../cells/DateCell.svelte"
|
|
3
5
|
import MultiSelectCell from "../cells/MultiSelectCell.svelte"
|
|
@@ -12,19 +14,19 @@ import AttachmentCell from "../cells/AttachmentCell.svelte"
|
|
|
12
14
|
import BBReferenceCell from "../cells/BBReferenceCell.svelte"
|
|
13
15
|
|
|
14
16
|
const TypeComponentMap = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
[FieldType.STRING]: TextCell,
|
|
18
|
+
[FieldType.OPTIONS]: OptionsCell,
|
|
19
|
+
[FieldType.DATETIME]: DateCell,
|
|
20
|
+
[FieldType.BARCODEQR]: TextCell,
|
|
21
|
+
[FieldType.LONGFORM]: LongFormCell,
|
|
22
|
+
[FieldType.ARRAY]: MultiSelectCell,
|
|
23
|
+
[FieldType.NUMBER]: NumberCell,
|
|
24
|
+
[FieldType.BOOLEAN]: BooleanCell,
|
|
25
|
+
[FieldType.ATTACHMENT]: AttachmentCell,
|
|
26
|
+
[FieldType.LINK]: RelationshipCell,
|
|
27
|
+
[FieldType.FORMULA]: FormulaCell,
|
|
28
|
+
[FieldType.JSON]: JSONCell,
|
|
29
|
+
[FieldType.BB_REFERENCE]: BBReferenceCell,
|
|
28
30
|
}
|
|
29
31
|
export const getCellRenderer = column => {
|
|
30
32
|
return TypeComponentMap[column?.schema?.type] || TextCell
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { FieldType, FieldTypeSubtypes } from "@budibase/types"
|
|
2
|
+
|
|
1
3
|
export const getColor = (idx, opacity = 0.3) => {
|
|
2
4
|
if (idx == null || idx === -1) {
|
|
3
5
|
idx = 0
|
|
@@ -6,22 +8,22 @@ export const getColor = (idx, opacity = 0.3) => {
|
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
const TypeIconMap = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
[FieldType.STRING]: "Text",
|
|
12
|
+
[FieldType.OPTIONS]: "Dropdown",
|
|
13
|
+
[FieldType.DATETIME]: "Date",
|
|
14
|
+
[FieldType.BARCODEQR]: "Camera",
|
|
15
|
+
[FieldType.LONGFORM]: "TextAlignLeft",
|
|
16
|
+
[FieldType.ARRAY]: "Dropdown",
|
|
17
|
+
[FieldType.NUMBER]: "123",
|
|
18
|
+
[FieldType.BOOLEAN]: "Boolean",
|
|
19
|
+
[FieldType.ATTACHMENT]: "AppleFiles",
|
|
20
|
+
[FieldType.LINK]: "DataCorrelated",
|
|
21
|
+
[FieldType.FORMULA]: "Calculator",
|
|
22
|
+
[FieldType.JSON]: "Brackets",
|
|
23
|
+
[FieldType.BIGINT]: "TagBold",
|
|
24
|
+
[FieldType.BB_REFERENCE]: {
|
|
25
|
+
[FieldTypeSubtypes.BB_REFERENCE.USER]: "User",
|
|
26
|
+
[FieldTypeSubtypes.BB_REFERENCE.USERS]: "UserGroup",
|
|
25
27
|
},
|
|
26
28
|
}
|
|
27
29
|
|