diff --git a/apps/client/src/services/promoted_attribute_definition_parser.ts b/apps/client/src/services/promoted_attribute_definition_parser.ts
index 6cdb8edc6..fe3a9cf2e 100644
--- a/apps/client/src/services/promoted_attribute_definition_parser.ts
+++ b/apps/client/src/services/promoted_attribute_definition_parser.ts
@@ -1,4 +1,4 @@
-export type LabelType = "text" | "number" | "boolean" | "date" | "datetime" | "time" | "url";
+export type LabelType = "text" | "number" | "boolean" | "date" | "datetime" | "time" | "url" | "color";
type Multiplicity = "single" | "multi";
export interface DefinitionObject {
@@ -17,7 +17,7 @@ function parse(value: string) {
for (const token of tokens) {
if (token === "promoted") {
defObj.isPromoted = true;
- } else if (["text", "number", "boolean", "date", "datetime", "time", "url"].includes(token)) {
+ } else if (["text", "number", "boolean", "date", "datetime", "time", "url", "color"].includes(token)) {
defObj.labelType = token as LabelType;
} else if (["single", "multi"].includes(token)) {
defObj.multiplicity = token as Multiplicity;
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index a61220ddc..13f9258e0 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -443,7 +443,8 @@
"other_notes_with_name": "Other notes with {{attributeType}} name \"{{attributeName}}\"",
"and_more": "... and {{count}} more.",
"print_landscape": "When exporting to PDF, changes the orientation of the page to landscape instead of portrait.",
- "print_page_size": "When exporting to PDF, changes the size of the page. Supported values: A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Tabloid, Ledger."
+ "print_page_size": "When exporting to PDF, changes the size of the page. Supported values: A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Tabloid, Ledger.",
+ "color_type": "Color"
},
"attribute_editor": {
"help_text_body1": "To add label, just type e.g. #rock or if you want to add also value then e.g. #year = 2020",
diff --git a/apps/client/src/widgets/attribute_widgets/attribute_detail.ts b/apps/client/src/widgets/attribute_widgets/attribute_detail.ts
index f4134745d..cdb7c7b43 100644
--- a/apps/client/src/widgets/attribute_widgets/attribute_detail.ts
+++ b/apps/client/src/widgets/attribute_widgets/attribute_detail.ts
@@ -142,6 +142,7 @@ const TPL = /*html*/`
+
diff --git a/apps/client/src/widgets/ribbon_widgets/promoted_attributes.ts b/apps/client/src/widgets/ribbon_widgets/promoted_attributes.ts
index 8895d5e42..5f21cb6e5 100644
--- a/apps/client/src/widgets/ribbon_widgets/promoted_attributes.ts
+++ b/apps/client/src/widgets/ribbon_widgets/promoted_attributes.ts
@@ -66,6 +66,12 @@ const TPL = /*html*/`
appearance: auto;
}
+ .promoted-attribute-cell input[type="color"] {
+ width: 50px;
+ padding: 0;
+ border: 0;
+ }
+