@dev-crew-berlin/enter-js-utils 0.34.0 → 0.34.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/dist/models/instance.js
CHANGED
|
@@ -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] ??
|
|
74
|
+
return this.tagColors[tag] ?? undefined;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
}
|
package/dist/ui/guest-card.d.ts
CHANGED
|
@@ -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
|
};
|
package/dist/ui/guest-card.js
CHANGED
|
@@ -17,9 +17,12 @@ export const GuestCard = props => {
|
|
|
17
17
|
props.onClick(props.attendee.id);
|
|
18
18
|
} : undefined;
|
|
19
19
|
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
-
className: _JSXStyle.dynamic([["
|
|
20
|
+
className: _JSXStyle.dynamic([["3176345188", [theme.colors.enterGrey, theme.colors.enterBackground, theme.fonts.primary]]]) + " " + (cx({
|
|
21
|
+
'guest-card-wrapper': true,
|
|
22
|
+
plain: props.plain
|
|
23
|
+
}) || "")
|
|
21
24
|
}, /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className: _JSXStyle.dynamic([["
|
|
25
|
+
className: _JSXStyle.dynamic([["3176345188", [theme.colors.enterGrey, theme.colors.enterBackground, theme.fonts.primary]]]) + " " + 'tag-color-list'
|
|
23
26
|
}, tags.map(tag => [tag, getTagColor(tag)]).filter(([, tagColor]) => tagColor).map(([tag, tagColor]) => /*#__PURE__*/React.createElement("div", {
|
|
24
27
|
key: tag,
|
|
25
28
|
title: tag,
|
|
@@ -27,17 +30,14 @@ export const GuestCard = props => {
|
|
|
27
30
|
backgroundColor: tagColor,
|
|
28
31
|
height: '100%'
|
|
29
32
|
},
|
|
30
|
-
className: _JSXStyle.dynamic([["
|
|
33
|
+
className: _JSXStyle.dynamic([["3176345188", [theme.colors.enterGrey, theme.colors.enterBackground, theme.fonts.primary]]]) + " " + 'tag-color'
|
|
31
34
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
32
35
|
onClick: onClick,
|
|
33
|
-
className: _JSXStyle.dynamic([["
|
|
34
|
-
'guest-card': true,
|
|
35
|
-
plain: props.plain
|
|
36
|
-
}) || "")
|
|
36
|
+
className: _JSXStyle.dynamic([["3176345188", [theme.colors.enterGrey, theme.colors.enterBackground, theme.fonts.primary]]]) + " " + 'guest-card'
|
|
37
37
|
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: _JSXStyle.dynamic([["
|
|
38
|
+
className: _JSXStyle.dynamic([["3176345188", [theme.colors.enterGrey, theme.colors.enterBackground, theme.fonts.primary]]])
|
|
39
39
|
}, /*#__PURE__*/React.createElement("h2", {
|
|
40
|
-
className: _JSXStyle.dynamic([["
|
|
40
|
+
className: _JSXStyle.dynamic([["3176345188", [theme.colors.enterGrey, theme.colors.enterBackground, theme.fonts.primary]]]) + " " + 'name'
|
|
41
41
|
}, props.formatName(props.attendee)), /*#__PURE__*/React.createElement(CompanionInfo, {
|
|
42
42
|
companionStatus: props.attendee.companions,
|
|
43
43
|
findMainGuest: props.findMainGuest,
|
|
@@ -47,13 +47,13 @@ export const GuestCard = props => {
|
|
|
47
47
|
response: props.attendee.getResponseForTag(props.checkinTag),
|
|
48
48
|
rsvpCount: props.attendee.getRsvpCountForTag(props.checkinTag)
|
|
49
49
|
})), /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
className: _JSXStyle.dynamic([["
|
|
50
|
+
className: _JSXStyle.dynamic([["3176345188", [theme.colors.enterGrey, theme.colors.enterBackground, theme.fonts.primary]]]) + " " + 'tag-list'
|
|
51
51
|
}, tags.map(tag => /*#__PURE__*/React.createElement(Tag, {
|
|
52
52
|
key: tag
|
|
53
53
|
}, tag)), props.infoText && /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: _JSXStyle.dynamic([["
|
|
54
|
+
className: _JSXStyle.dynamic([["3176345188", [theme.colors.enterGrey, theme.colors.enterBackground, theme.fonts.primary]]]) + " " + 'info'
|
|
55
55
|
}, " ", props.infoText))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
56
|
-
id: "
|
|
56
|
+
id: "3176345188",
|
|
57
57
|
dynamic: [theme.colors.enterGrey, theme.colors.enterBackground, theme.fonts.primary]
|
|
58
|
-
}, `.guest-card-wrapper.__jsx-style-dynamic-selector{border-radius:2px;border:1px solid ${theme.colors.enterGrey};background-color:${theme.colors.enterBackground};font-family:${theme.fonts.primary};margin:1.5em 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.guest-card.__jsx-style-dynamic-selector{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;padding:1.1em 1em 0.9em;-webkit-flex:1;-ms-flex:1;flex:1;}.tag-color-list.__jsx-style-dynamic-selector{width:0.
|
|
58
|
+
}, `.guest-card-wrapper.__jsx-style-dynamic-selector{border-radius:2px;border:1px solid ${theme.colors.enterGrey};background-color:${theme.colors.enterBackground};font-family:${theme.fonts.primary};margin:1.5em 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.guest-card.__jsx-style-dynamic-selector{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;padding:1.1em 1em 0.9em;-webkit-flex:1;-ms-flex:1;flex:1;}.tag-color-list.__jsx-style-dynamic-selector{width:0.35em;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.tag-color.__jsx-style-dynamic-selector:first-child{border-top-left-radius:1px;}.tag-color.__jsx-style-dynamic-selector:last-child{border-bottom-left-radius:1px;}.plain.__jsx-style-dynamic-selector{border:none;background-color:transparent;}.name.__jsx-style-dynamic-selector{font-size:1.15em;margin:-0.1em 0 0.3em;}.tag-list.__jsx-style-dynamic-selector{max-width:40%;text-align:right;font-size:0.9em;}.info.__jsx-style-dynamic-selector{display:block;width:100%;text-align:right;}`));
|
|
59
59
|
};
|
|
@@ -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] ??
|
|
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] ??
|
|
133
|
+
return tagColors[tag] ?? undefined;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
};
|