@dev-crew-berlin/enter-js-utils 0.34.0 → 0.34.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.
@@ -33,5 +33,5 @@ export declare class Instance {
33
33
  isRegistrationClosed(): boolean;
34
34
  canEditRegistration(): boolean;
35
35
  formatName(guest: Attendee): string;
36
- getTagColor(tag: string): string;
36
+ getTagColor(tag: string): string | undefined;
37
37
  }
@@ -1,4 +1,3 @@
1
- import { theme } from '../lib';
2
1
  export class Instance {
3
2
  constructor(json) {
4
3
  this.name = json.name;
@@ -72,7 +71,7 @@ export class Instance {
72
71
  }
73
72
 
74
73
  getTagColor(tag) {
75
- return this.tagColors[tag] ?? theme.colors.enterMediumGrey;
74
+ return this.tagColors[tag] ?? undefined;
76
75
  }
77
76
 
78
77
  }
@@ -8,7 +8,7 @@ declare type Props = {
8
8
  infoText?: string;
9
9
  formatName: (attendee: Attendee) => string;
10
10
  filterTags?: (tag: string) => boolean;
11
- getTagColor?: (tag: string) => string;
11
+ getTagColor?: (tag: string) => string | undefined;
12
12
  findMainGuest?: (attendeeId: string) => Attendee | undefined;
13
13
  onClick?: (attendeeId: string) => void;
14
14
  };
@@ -8,7 +8,7 @@ declare const _default: ComponentMeta<React.FunctionComponent<{
8
8
  infoText?: string | undefined;
9
9
  formatName: (attendee: Attendee) => string;
10
10
  filterTags?: ((tag: string) => boolean) | undefined;
11
- getTagColor?: ((tag: string) => string) | undefined;
11
+ getTagColor?: ((tag: string) => string | undefined) | undefined;
12
12
  findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
13
13
  onClick?: ((attendeeId: string) => void) | undefined;
14
14
  }>>;
@@ -20,7 +20,7 @@ export declare const WithBackground: ComponentStory<React.FunctionComponent<{
20
20
  infoText?: string | undefined;
21
21
  formatName: (attendee: Attendee) => string;
22
22
  filterTags?: ((tag: string) => boolean) | undefined;
23
- getTagColor?: ((tag: string) => string) | undefined;
23
+ getTagColor?: ((tag: string) => string | undefined) | undefined;
24
24
  findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
25
25
  onClick?: ((attendeeId: string) => void) | undefined;
26
26
  }>>;
@@ -31,7 +31,7 @@ export declare const Plain: ComponentStory<React.FunctionComponent<{
31
31
  infoText?: string | undefined;
32
32
  formatName: (attendee: Attendee) => string;
33
33
  filterTags?: ((tag: string) => boolean) | undefined;
34
- getTagColor?: ((tag: string) => string) | undefined;
34
+ getTagColor?: ((tag: string) => string | undefined) | undefined;
35
35
  findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
36
36
  onClick?: ((attendeeId: string) => void) | undefined;
37
37
  }>>;
@@ -42,7 +42,7 @@ export declare const FilteredTags: ComponentStory<React.FunctionComponent<{
42
42
  infoText?: string | undefined;
43
43
  formatName: (attendee: Attendee) => string;
44
44
  filterTags?: ((tag: string) => boolean) | undefined;
45
- getTagColor?: ((tag: string) => string) | undefined;
45
+ getTagColor?: ((tag: string) => string | undefined) | undefined;
46
46
  findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
47
47
  onClick?: ((attendeeId: string) => void) | undefined;
48
48
  }>>;
@@ -53,7 +53,7 @@ export declare const WithColorLabel: ComponentStory<React.FunctionComponent<{
53
53
  infoText?: string | undefined;
54
54
  formatName: (attendee: Attendee) => string;
55
55
  filterTags?: ((tag: string) => boolean) | undefined;
56
- getTagColor?: ((tag: string) => string) | undefined;
56
+ getTagColor?: ((tag: string) => string | undefined) | undefined;
57
57
  findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
58
58
  onClick?: ((attendeeId: string) => void) | undefined;
59
59
  }>>;
@@ -64,7 +64,7 @@ export declare const WithMultipleColorLabels: ComponentStory<React.FunctionCompo
64
64
  infoText?: string | undefined;
65
65
  formatName: (attendee: Attendee) => string;
66
66
  filterTags?: ((tag: string) => boolean) | undefined;
67
- getTagColor?: ((tag: string) => string) | undefined;
67
+ getTagColor?: ((tag: string) => string | undefined) | undefined;
68
68
  findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
69
69
  onClick?: ((attendeeId: string) => void) | undefined;
70
70
  }>>;
@@ -75,7 +75,7 @@ export declare const WithInfoText: ComponentStory<React.FunctionComponent<{
75
75
  infoText?: string | undefined;
76
76
  formatName: (attendee: Attendee) => string;
77
77
  filterTags?: ((tag: string) => boolean) | undefined;
78
- getTagColor?: ((tag: string) => string) | undefined;
78
+ getTagColor?: ((tag: string) => string | undefined) | undefined;
79
79
  findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
80
80
  onClick?: ((attendeeId: string) => void) | undefined;
81
81
  }>>;
@@ -86,7 +86,7 @@ export declare const WithCompanion: ComponentStory<React.FunctionComponent<{
86
86
  infoText?: string | undefined;
87
87
  formatName: (attendee: Attendee) => string;
88
88
  filterTags?: ((tag: string) => boolean) | undefined;
89
- getTagColor?: ((tag: string) => string) | undefined;
89
+ getTagColor?: ((tag: string) => string | undefined) | undefined;
90
90
  findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
91
91
  onClick?: ((attendeeId: string) => void) | undefined;
92
92
  }>>;
@@ -97,7 +97,7 @@ export declare const WithCompanionButNoMainGuestInfo: ComponentStory<React.Funct
97
97
  infoText?: string | undefined;
98
98
  formatName: (attendee: Attendee) => string;
99
99
  filterTags?: ((tag: string) => boolean) | undefined;
100
- getTagColor?: ((tag: string) => string) | undefined;
100
+ getTagColor?: ((tag: string) => string | undefined) | undefined;
101
101
  findMainGuest?: ((attendeeId: string) => Attendee | undefined) | undefined;
102
102
  onClick?: ((attendeeId: string) => void) | undefined;
103
103
  }>>;
@@ -116,7 +116,7 @@ WithColorLabel.args = {
116
116
  },
117
117
 
118
118
  getTagColor(tag) {
119
- return tagColors[tag] ?? null;
119
+ return tagColors[tag] ?? undefined;
120
120
  }
121
121
 
122
122
  };
@@ -130,7 +130,7 @@ WithMultipleColorLabels.args = {
130
130
  },
131
131
 
132
132
  getTagColor(tag) {
133
- return tagColors[tag] ?? null;
133
+ return tagColors[tag] ?? undefined;
134
134
  }
135
135
 
136
136
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",