@dev-crew-berlin/enter-js-utils 0.12.0 → 0.13.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.
@@ -60,6 +60,9 @@ export declare class Attendee {
60
60
  checkinTag: string;
61
61
  checkinId: string;
62
62
  }): Attendee;
63
+ hasRsvp(args: {
64
+ checkinTags: string[];
65
+ }): boolean;
63
66
  }
64
67
  export declare const rawAttendee: import("fefe").Validator<import("fefe").ObjectResult<{
65
68
  id: import("fefe").Validator<string, import("fefe").LeafError>;
@@ -71,6 +71,10 @@ export class Attendee {
71
71
  });
72
72
  }
73
73
 
74
+ hasRsvp(args) {
75
+ return args.checkinTags.some(checkinTag => this.getResponseForTag(checkinTag) !== 'no-response');
76
+ }
77
+
74
78
  }
75
79
  export const rawAttendee = object({
76
80
  id: string(),
@@ -4,24 +4,24 @@ import { theme } from '../lib';
4
4
  export const CheckinProgressBar = props => {
5
5
  const width = props.rsvp > 0 ? props.checkinCount / props.rsvp : 1;
6
6
  return /*#__PURE__*/React.createElement("div", {
7
- className: _JSXStyle.dynamic([["4246687363", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'checkin-progress-bar'
7
+ className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'checkin-progress-bar'
8
8
  }, /*#__PURE__*/React.createElement("div", {
9
9
  style: {
10
10
  width: `${width * 100}%`
11
11
  },
12
- className: _JSXStyle.dynamic([["4246687363", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'progress'
12
+ className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'progress'
13
13
  }), /*#__PURE__*/React.createElement("div", {
14
- className: _JSXStyle.dynamic([["4246687363", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'number checkin-count'
14
+ className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'number checkin-count'
15
15
  }, props.checkinCount, /*#__PURE__*/React.createElement("label", {
16
- className: _JSXStyle.dynamic([["4246687363", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]])
16
+ className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]])
17
17
  }, "Checkins")), /*#__PURE__*/React.createElement("div", {
18
- className: _JSXStyle.dynamic([["4246687363", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'checkin-tag-display'
18
+ className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'checkin-tag-display'
19
19
  }, props.children), /*#__PURE__*/React.createElement("div", {
20
- className: _JSXStyle.dynamic([["4246687363", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'number confirmations'
20
+ className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]]) + " " + 'number confirmations'
21
21
  }, props.rsvp, /*#__PURE__*/React.createElement("label", {
22
- className: _JSXStyle.dynamic([["4246687363", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]])
22
+ className: _JSXStyle.dynamic([["818622950", [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]]])
23
23
  }, "Confirmations")), /*#__PURE__*/React.createElement(_JSXStyle, {
24
- id: "4246687363",
24
+ id: "818622950",
25
25
  dynamic: [theme.colors.enterDarkGrey, theme.colors.enterBackground, theme.fonts.primary, theme.colors.enterGreen, theme.fonts.secondary]
26
- }, `.checkin-progress-bar.__jsx-style-dynamic-selector{position:relative;padding:0.5em 1em 0.7em;background-color:${theme.colors.enterDarkGrey};border:1px solid ${theme.colors.enterBackground};font-family:${theme.fonts.primary};color:white;display:grid;grid-template-columns:1fr auto 1fr;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;overflow:hidden;cursor:pointer;}.progress.__jsx-style-dynamic-selector{z-index:0;top:0;margin:0;padding:0;position:absolute;height:100%;background-color:${theme.colors.enterGreen};}.number.__jsx-style-dynamic-selector{z-index:1;font-weight:200;font-size:1.4em;}.confirmations.__jsx-style-dynamic-selector{text-align:right;}.number.__jsx-style-dynamic-selector label.__jsx-style-dynamic-selector{display:block;font-family:${theme.fonts.secondary};font-size:0.6rem;-webkit-letter-spacing:0.05em;-moz-letter-spacing:0.05em;-ms-letter-spacing:0.05em;letter-spacing:0.05em;text-transform:uppercase;font-weight:normal;}.checkin-tag-display.__jsx-style-dynamic-selector{z-index:1;font-size:1.3em;}`));
26
+ }, `.checkin-progress-bar.__jsx-style-dynamic-selector{position:relative;padding:0.5em 1em 0.7em;background-color:${theme.colors.enterDarkGrey};border:1px solid ${theme.colors.enterBackground};font-family:${theme.fonts.primary};color:white;display:grid;grid-template-columns:1fr auto 1fr;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;overflow:hidden;cursor:pointer;}.progress.__jsx-style-dynamic-selector{z-index:0;top:0;margin:0;padding:0;position:absolute;height:100%;background-color:${theme.colors.enterGreen};}.number.__jsx-style-dynamic-selector{z-index:1;font-weight:200;font-size:1.4em;}.checkin-count.__jsx-style-dynamic-selector{text-align:left;}.confirmations.__jsx-style-dynamic-selector{text-align:right;}.number.__jsx-style-dynamic-selector label.__jsx-style-dynamic-selector{display:block;font-family:${theme.fonts.secondary};font-size:0.6rem;-webkit-letter-spacing:0.05em;-moz-letter-spacing:0.05em;-ms-letter-spacing:0.05em;letter-spacing:0.05em;text-transform:uppercase;font-weight:normal;}.checkin-tag-display.__jsx-style-dynamic-selector{z-index:1;font-size:1.3em;}`));
27
27
  };
@@ -3,6 +3,7 @@ export { Label } from './form-elements/label';
3
3
  export { SegmentedControl } from './form-elements/segmented-control';
4
4
  export { Button } from './button';
5
5
  export { CheckinCountIndicator } from './checkin-count-indicator';
6
+ export { CheckinProgressBar } from './checkin-progress-bar';
6
7
  export { CompanionInfo } from './companion-info';
7
8
  export { EnterLogo } from './enter-logo';
8
9
  export { Fonts } from './fonts';
package/dist/ui/index.js CHANGED
@@ -3,6 +3,7 @@ export { Label } from './form-elements/label';
3
3
  export { SegmentedControl } from './form-elements/segmented-control';
4
4
  export { Button } from './button';
5
5
  export { CheckinCountIndicator } from './checkin-count-indicator';
6
+ export { CheckinProgressBar } from './checkin-progress-bar';
6
7
  export { CompanionInfo } from './companion-info';
7
8
  export { EnterLogo } from './enter-logo';
8
9
  export { Fonts } from './fonts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",