@dev-crew-berlin/enter-js-utils 0.18.0 → 0.20.0
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/attendee.d.ts +4 -1
- package/dist/models/attendee.js +3 -1
- package/dist/models/event.d.ts +3 -3
- package/dist/ui/companion-info.stories.js +2 -1
- package/dist/ui/guest-card.stories.js +4 -2
- package/dist/ui/icons/add-guest-icon.d.ts +6 -0
- package/dist/ui/icons/add-guest-icon.js +16 -0
- package/dist/ui/icons/add-guest-icon.stories.d.ts +12 -0
- package/dist/ui/icons/add-guest-icon.stories.js +20 -0
- package/dist/ui/icons/filter-icon.d.ts +6 -0
- package/dist/ui/icons/filter-icon.js +16 -0
- package/dist/ui/icons/filter-icon.stories.d.ts +12 -0
- package/dist/ui/icons/filter-icon.stories.js +20 -0
- package/dist/ui/icons/search-icon.d.ts +6 -0
- package/dist/ui/icons/search-icon.js +17 -0
- package/dist/ui/icons/search-icon.stories.d.ts +12 -0
- package/dist/ui/icons/search-icon.stories.js +20 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { FieldValue } from './field-value';
|
|
|
5
5
|
export declare type AttendeeJSON = {
|
|
6
6
|
id: string;
|
|
7
7
|
auth: string | null;
|
|
8
|
-
userdata: Record<string,
|
|
8
|
+
userdata: Record<string, FieldValue>;
|
|
9
9
|
tags: string[] | null;
|
|
10
10
|
language: string | null;
|
|
11
11
|
time: Date;
|
|
@@ -23,6 +23,7 @@ export declare type AttendeeJSON = {
|
|
|
23
23
|
amount: number;
|
|
24
24
|
testmode: boolean;
|
|
25
25
|
} | null;
|
|
26
|
+
deleted: boolean;
|
|
26
27
|
};
|
|
27
28
|
export declare class Attendee {
|
|
28
29
|
id: string;
|
|
@@ -45,6 +46,7 @@ export declare class Attendee {
|
|
|
45
46
|
amount: number;
|
|
46
47
|
testmode: boolean;
|
|
47
48
|
} | null;
|
|
49
|
+
deleted: boolean;
|
|
48
50
|
constructor(rawAttendee: RawAttendee);
|
|
49
51
|
getRsvpCountForTag(checkinTag: string): number;
|
|
50
52
|
getResponseForTag(checkinTag: string): 'no-response' | 'negative-repsone' | 'positive-response';
|
|
@@ -83,6 +85,7 @@ export declare const rawAttendee: import("fefe").Validator<import("fefe").Object
|
|
|
83
85
|
amount: import("fefe").Validator<number, import("fefe").LeafError>;
|
|
84
86
|
testmode: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
85
87
|
}> | null, import("fefe").FefeError>;
|
|
88
|
+
deleted: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
86
89
|
}>, import("fefe").FefeError>;
|
|
87
90
|
declare type RawAttendee = ValidatorReturnType<typeof rawAttendee>;
|
|
88
91
|
export declare const parseAttendee: (value: unknown) => APIResult<Attendee>;
|
package/dist/models/attendee.js
CHANGED
|
@@ -15,6 +15,7 @@ export class Attendee {
|
|
|
15
15
|
this.checkin = rawAttendee.checkin;
|
|
16
16
|
this.companions = rawAttendee.companions;
|
|
17
17
|
this.payment = rawAttendee.payment;
|
|
18
|
+
this.deleted = rawAttendee.deleted;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
getRsvpCountForTag(checkinTag) {
|
|
@@ -99,7 +100,8 @@ export const rawAttendee = object({
|
|
|
99
100
|
integer: true
|
|
100
101
|
}),
|
|
101
102
|
testmode: boolean()
|
|
102
|
-
})), null)
|
|
103
|
+
})), null),
|
|
104
|
+
deleted: defaultTo(boolean(), false)
|
|
103
105
|
}, {
|
|
104
106
|
allowExcessProperties: true
|
|
105
107
|
});
|
package/dist/models/event.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AttendeeJSON } from './attendee';
|
|
2
2
|
import { Checkin } from './checkins';
|
|
3
3
|
export declare type Event = {
|
|
4
4
|
id: string;
|
|
@@ -18,13 +18,13 @@ export declare type Event = {
|
|
|
18
18
|
id: string;
|
|
19
19
|
event: 'attendee-created';
|
|
20
20
|
instanceName: string;
|
|
21
|
-
attendee:
|
|
21
|
+
attendee: AttendeeJSON;
|
|
22
22
|
} | {
|
|
23
23
|
id: string;
|
|
24
24
|
event: 'attendee-updated';
|
|
25
25
|
instanceName: string;
|
|
26
26
|
attendeeId: string;
|
|
27
|
-
updates: Partial<Omit<
|
|
27
|
+
updates: Partial<Omit<AttendeeJSON, 'id' | 'checkin'>>;
|
|
28
28
|
} | {
|
|
29
29
|
id: string;
|
|
30
30
|
event: 'attendee-responded';
|
|
@@ -27,7 +27,8 @@ const attendee = new Attendee({
|
|
|
27
27
|
},
|
|
28
28
|
userdata: {
|
|
29
29
|
name: 'Max Mustermann'
|
|
30
|
-
}
|
|
30
|
+
},
|
|
31
|
+
deleted: false
|
|
31
32
|
});
|
|
32
33
|
const companion = new Attendee({
|
|
33
34
|
id: 'my-companion',
|
|
@@ -46,7 +47,8 @@ const companion = new Attendee({
|
|
|
46
47
|
},
|
|
47
48
|
userdata: {
|
|
48
49
|
name: 'Jhon Doe'
|
|
49
|
-
}
|
|
50
|
+
},
|
|
51
|
+
deleted: false
|
|
50
52
|
});
|
|
51
53
|
|
|
52
54
|
const Template = args => /*#__PURE__*/React.createElement(GuestCard, args);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { colors } from '../../lib/theme';
|
|
3
|
+
export const AddGuestIcon = ({
|
|
4
|
+
color = colors.enterDarkGrey
|
|
5
|
+
}) => {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: "100%",
|
|
9
|
+
height: "auto",
|
|
10
|
+
viewBox: "0 0 16.571 13.68"
|
|
11
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
12
|
+
fill: color,
|
|
13
|
+
fillRule: "evenodd",
|
|
14
|
+
d: "M0,13.68V10.617a10.264,10.264,0,0,1,1.359-.387A6.408,6.408,0,0,0,3.5,9.159a1.845,1.845,0,0,0,.582-1.427,1.114,1.114,0,0,0-.388-.743,2.12,2.12,0,0,1-.518-1.129c0-.12-.13-.239-.355-.387-.259-.119-.389-.417-.421-.922a1.219,1.219,0,0,1,.065-.387c.065-.119.13-.178.162-.178l.065-.059a12.936,12.936,0,0,1-.194-1.338A2.322,2.322,0,0,1,3.139.862,3.464,3.464,0,0,1,5.793,0,3.461,3.461,0,0,1,8.447.862a2.41,2.41,0,0,1,.712,1.725L8.9,3.926c.227.059.324.3.324.625a2.225,2.225,0,0,1-.162.654.528.528,0,0,1-.227.267.843.843,0,0,0-.226.119.393.393,0,0,0-.162.268A2.4,2.4,0,0,1,7.9,6.989a1.112,1.112,0,0,0-.389.743,1.87,1.87,0,0,0,.615,1.427A6.408,6.408,0,0,0,10.26,10.23c2.006.654,3.01,1.249,3.01,1.844V13.68ZM12.428,9.873V7.613H9.936V6.067h2.492V3.807h1.651v2.26h2.492V7.613H14.079v2.26Z"
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.FunctionComponent<{
|
|
4
|
+
color?: string | undefined;
|
|
5
|
+
}>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Basic: ComponentStory<React.FunctionComponent<{
|
|
8
|
+
color?: string | undefined;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare const White: ComponentStory<React.FunctionComponent<{
|
|
11
|
+
color?: string | undefined;
|
|
12
|
+
}>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AddGuestIcon } from './add-guest-icon';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Icons/Add Guest',
|
|
5
|
+
component: AddGuestIcon
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = args => /*#__PURE__*/React.createElement(AddGuestIcon, args);
|
|
9
|
+
|
|
10
|
+
export const Basic = Template.bind({});
|
|
11
|
+
Basic.args = {};
|
|
12
|
+
export const White = Template.bind({});
|
|
13
|
+
White.parameters = {
|
|
14
|
+
backgrounds: {
|
|
15
|
+
default: 'dark'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
White.args = {
|
|
19
|
+
color: '#fff'
|
|
20
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { colors } from '../../lib/theme';
|
|
3
|
+
export const FilterIcon = ({
|
|
4
|
+
color = colors.enterDarkGrey
|
|
5
|
+
}) => {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: "100%",
|
|
9
|
+
height: "auto",
|
|
10
|
+
viewBox: "0 0 10.252 11.956"
|
|
11
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
12
|
+
fill: color,
|
|
13
|
+
fillRule: "evenodd",
|
|
14
|
+
d: "M9.765,0H.487L.411.006A.516.516,0,0,0,.085.8L3.712,6.412V10.23a.517.517,0,0,0,.229.433L5.8,11.878l.066.036a.489.489,0,0,0,.677-.469V6.412L10.167.8A.512.512,0,0,0,9.765,0Z"
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.FunctionComponent<{
|
|
4
|
+
color?: string | undefined;
|
|
5
|
+
}>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Basic: ComponentStory<React.FunctionComponent<{
|
|
8
|
+
color?: string | undefined;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare const White: ComponentStory<React.FunctionComponent<{
|
|
11
|
+
color?: string | undefined;
|
|
12
|
+
}>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FilterIcon } from './filter-icon';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Icons/Filter',
|
|
5
|
+
component: FilterIcon
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = args => /*#__PURE__*/React.createElement(FilterIcon, args);
|
|
9
|
+
|
|
10
|
+
export const Basic = Template.bind({});
|
|
11
|
+
Basic.args = {};
|
|
12
|
+
export const White = Template.bind({});
|
|
13
|
+
White.parameters = {
|
|
14
|
+
backgrounds: {
|
|
15
|
+
default: 'dark'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
White.args = {
|
|
19
|
+
color: '#fff'
|
|
20
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { colors } from '../../lib/theme';
|
|
3
|
+
export const SearchIcon = ({
|
|
4
|
+
color = colors.enterDarkGrey
|
|
5
|
+
}) => {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: "100%",
|
|
9
|
+
height: "auto",
|
|
10
|
+
viewBox: "0 0 18.9 19.688"
|
|
11
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
12
|
+
fill: color,
|
|
13
|
+
"data-name": "Combined Shape",
|
|
14
|
+
d: "M10.4,13.354a7.1,7.1,0,1,1,2.343-2l6.16,6.16-2.169,2.169ZM2.025,7.088A5.063,5.063,0,1,0,7.088,2.025,5.068,5.068,0,0,0,2.025,7.088Z",
|
|
15
|
+
transform: "translate(0 0)"
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.FunctionComponent<{
|
|
4
|
+
color?: string | undefined;
|
|
5
|
+
}>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Basic: ComponentStory<React.FunctionComponent<{
|
|
8
|
+
color?: string | undefined;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare const White: ComponentStory<React.FunctionComponent<{
|
|
11
|
+
color?: string | undefined;
|
|
12
|
+
}>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchIcon } from './search-icon';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Icons/Search',
|
|
5
|
+
component: SearchIcon
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = args => /*#__PURE__*/React.createElement(SearchIcon, args);
|
|
9
|
+
|
|
10
|
+
export const Basic = Template.bind({});
|
|
11
|
+
Basic.args = {};
|
|
12
|
+
export const White = Template.bind({});
|
|
13
|
+
White.parameters = {
|
|
14
|
+
backgrounds: {
|
|
15
|
+
default: 'dark'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
White.args = {
|
|
19
|
+
color: '#fff'
|
|
20
|
+
};
|