@dev-crew-berlin/enter-js-utils 0.2.1 → 0.3.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.
- package/README.md +10 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +3 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/{result → lib}/result.d.ts +0 -0
- package/dist/{result → lib}/result.js +0 -0
- package/dist/lib/result.js.map +1 -0
- package/dist/lib/theme.d.ts +18 -0
- package/dist/lib/theme.js +19 -0
- package/dist/lib/theme.js.map +1 -0
- package/dist/ui/checkin-count-indicator.d.ts +12 -0
- package/dist/ui/checkin-count-indicator.js +53 -0
- package/dist/ui/checkin-count-indicator.js.map +1 -0
- package/dist/ui/checkin-count-indicator.stories.d.ts +44 -0
- package/dist/ui/checkin-count-indicator.stories.js +45 -0
- package/dist/ui/checkin-count-indicator.stories.js.map +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +2 -0
- package/dist/ui/index.js.map +1 -0
- package/package.json +45 -8
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/result/result.js.map +0 -1
package/README.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA"}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../src/lib/result.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,OAAO,CAAU,IAAa;IAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;AACtC,CAAC;AAED,MAAM,UAAU,OAAO,CAAS,MAAc;IAC5C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;AAC1C,CAAC;AAED,MAAM,UAAU,SAAS,CACvB,MAAgC;IAEhC,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,OAAO,SAAS,CAAA;IACrC,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM,UAAU,SAAS,CACvB,MAA+B;IAE/B,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,SAAS,CAAA;IACpC,OAAO,MAAM,CAAA;AACf,CAAC;AASD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAI5B,OAAU;IACV,IAAI,OAAO,CAAC,KAAK,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,OAAO,EAAd,CAAc,CAAC,EAAE;QAC7C,OAAO;YACL,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,OAAO,CAAC,GAAG;YACf,mFAAmF;YACnF,UAAC,OAAO,IAAK,OAAA,SAAS,CAAC,OAAO,CAAE,CAAC,IAAI,EAAxB,CAAwB,CAAC,+DAA+D;aACrE,EAAE,uGAAuG;SAC5I,CAAA;KACF;IAED,OAAO;QACL,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;aACX,GAAG,CAAC,UAAC,MAAM,YAAK,OAAA,MAAA,SAAS,CAAC,MAAM,CAAC,0CAAE,KAAK,CAAA,EAAA,CAAC;aACzC,MAAM,CACL,UAAC,OAAO,IAAK,OAAA,OAAO,KAAK,SAAS,EAArB,CAAqB,CACH,EAAE,kGAAkG;KACxI,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
enterDarkGrey: string;
|
|
3
|
+
enterLightGrey: string;
|
|
4
|
+
enterMediumGrey: string;
|
|
5
|
+
enterGrey: string;
|
|
6
|
+
enterBackground: string;
|
|
7
|
+
enterModalBackground: string;
|
|
8
|
+
enterError: string;
|
|
9
|
+
enterRed: string;
|
|
10
|
+
enterCyan: string;
|
|
11
|
+
enterGreen: string;
|
|
12
|
+
enterYellow: string;
|
|
13
|
+
enterPink: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const fonts: {
|
|
16
|
+
primary: string;
|
|
17
|
+
secondary: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var colors = {
|
|
2
|
+
enterDarkGrey: '#483E47',
|
|
3
|
+
enterLightGrey: '#EEE',
|
|
4
|
+
enterMediumGrey: '#A09999',
|
|
5
|
+
enterGrey: '#D8D8D8',
|
|
6
|
+
enterBackground: '#F8FAFB',
|
|
7
|
+
enterModalBackground: '#FFFEFC',
|
|
8
|
+
enterError: '#CE1E3D',
|
|
9
|
+
enterRed: '#FF5555',
|
|
10
|
+
enterCyan: '#74ACBC',
|
|
11
|
+
enterGreen: '#89B859',
|
|
12
|
+
enterYellow: '#E7C700',
|
|
13
|
+
enterPink: '#E66084',
|
|
14
|
+
};
|
|
15
|
+
export var fonts = {
|
|
16
|
+
primary: 'PTSans, sans-serif',
|
|
17
|
+
secondary: 'Iosevka monospaced',
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/lib/theme.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,MAAM,GAAG;IACpB,aAAa,EAAE,SAAS;IACxB,cAAc,EAAE,MAAM;IACtB,eAAe,EAAE,SAAS;IAC1B,SAAS,EAAE,SAAS;IACpB,eAAe,EAAE,SAAS;IAC1B,oBAAoB,EAAE,SAAS;IAC/B,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;CACrB,CAAA;AAED,MAAM,CAAC,IAAM,KAAK,GAAG;IACnB,OAAO,EAAE,oBAAoB;IAC7B,SAAS,EAAE,oBAAoB;CAChC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import 'styled-jsx';
|
|
3
|
+
export declare type Checkin = {
|
|
4
|
+
id: string;
|
|
5
|
+
time: Date;
|
|
6
|
+
};
|
|
7
|
+
declare type Props = {
|
|
8
|
+
checkins: Checkin[];
|
|
9
|
+
rsvp: number | null;
|
|
10
|
+
};
|
|
11
|
+
export declare const CheckinCountIndicator: FunctionComponent<Props>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { colors, fonts } from '../lib/theme';
|
|
12
|
+
import 'styled-jsx';
|
|
13
|
+
var CHUNK_SIZE = 5;
|
|
14
|
+
export var CheckinCountIndicator = function (props) {
|
|
15
|
+
var _a;
|
|
16
|
+
var checkinCount = props.checkins.length;
|
|
17
|
+
var hasCheckins = checkinCount > 0;
|
|
18
|
+
var didRsvp = props.rsvp !== null;
|
|
19
|
+
var rsvpCount = (_a = props.rsvp) !== null && _a !== void 0 ? _a : 0;
|
|
20
|
+
var rsvpsWithoutCheckin = rsvpCount > checkinCount ? rsvpCount - checkinCount : 0;
|
|
21
|
+
var checkinsAndRsvp = __spreadArray(__spreadArray([], props.checkins, true), Array.from({ length: rsvpsWithoutCheckin }, function () { return 'rsvp'; }), true);
|
|
22
|
+
var chunked = [];
|
|
23
|
+
for (var i = 0; i < checkinsAndRsvp.length; i += CHUNK_SIZE) {
|
|
24
|
+
var chunk = checkinsAndRsvp.slice(i, i + CHUNK_SIZE);
|
|
25
|
+
chunked.push(chunk);
|
|
26
|
+
}
|
|
27
|
+
var text = getText({ checkinCount: checkinCount, rsvpCount: rsvpCount, didRsvp: didRsvp });
|
|
28
|
+
return (React.createElement("div", { className: 'checkin-count-indicator' },
|
|
29
|
+
didRsvp && rsvpCount == 0 && !hasCheckins ? (React.createElement("div", { className: 'box-wrapper' },
|
|
30
|
+
React.createElement("span", { className: 'decline-box' }, "\u00D7"),
|
|
31
|
+
React.createElement("span", { className: 'text' }, "Declined"))) : (React.createElement("div", { className: "box-wrapper ".concat(chunked.length > 1 ? 'multiple-chunks' : '', " ") },
|
|
32
|
+
chunked.map(function (chunk, idx) { return (React.createElement("div", { key: idx, className: 'chunk' }, chunk.map(function (checkinOrRsvp, idx) {
|
|
33
|
+
return typeof checkinOrRsvp === 'string' ? (React.createElement("span", { key: idx, className: 'rsvp' })) : (React.createElement("span", { key: idx, className: 'checkin', "data-toggle": 'tooltip', title: checkinOrRsvp.time.toLocaleString() }));
|
|
34
|
+
}))); }),
|
|
35
|
+
text && React.createElement("span", { className: 'text' }, text))),
|
|
36
|
+
React.createElement("style", { jsx: true }, "\n .checkin-count-indicator {\n font-family: ".concat(fonts.primary, ";\n }\n\n .text {\n color: ").concat(colors.enterDarkGrey, ";\n text-transform: uppercase;\n font-size: 10px;\n line-height: 15px;\n font-weight: bold;\n white-space: nowrap;\n width: 100%;\n margin-top: 0.2em;\n }\n\n .text:nth-child(2) {\n width: auto;\n margin-top: 0;\n }\n\n .box-wrapper {\n display: flex;\n min-width: 100px;\n }\n .box-wrapper.multiple-chunks {\n flex-flow: wrap;\n }\n\n .chunk {\n display: flex;\n margin-right: 5px;\n margin-bottom: 4px;\n width: 95px;\n white-space: nowrap;\n }\n\n .chunk:first-of-type.chunk:last-of-type {\n width: auto;\n margin-right: 2px;\n }\n\n .checkin,\n .rsvp,\n .decline-box {\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 120%;\n width: 15px;\n height: 15px;\n border-radius: 2px;\n border: 3px solid ").concat(colors.enterGreen, ";\n margin: 0 4px 0 0;\n vertical-align: middle;\n color: white;\n }\n\n .checkin {\n background-color: ").concat(colors.enterGreen, ";\n }\n\n .decline-box {\n background-color: ").concat(colors.enterError, ";\n border-color: ").concat(colors.enterError, ";\n }\n "))));
|
|
37
|
+
};
|
|
38
|
+
function getText(args) {
|
|
39
|
+
if (args.checkinCount === 1 && args.rsvpCount === 1) {
|
|
40
|
+
return 'checked in';
|
|
41
|
+
}
|
|
42
|
+
if (args.checkinCount > 0) {
|
|
43
|
+
return "".concat(args.checkinCount, " / ").concat(args.rsvpCount, " Checkins");
|
|
44
|
+
}
|
|
45
|
+
if (args.rsvpCount == 1) {
|
|
46
|
+
return 'Confirmed';
|
|
47
|
+
}
|
|
48
|
+
if (args.rsvpCount > 0) {
|
|
49
|
+
return "".concat(args.rsvpCount, " Confirmations");
|
|
50
|
+
}
|
|
51
|
+
return 'no response';
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=checkin-count-indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkin-count-indicator.js","sourceRoot":"","sources":["../../src/ui/checkin-count-indicator.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,YAAY,CAAA;AAGnB,IAAM,UAAU,GAAG,CAAC,CAAA;AAMpB,MAAM,CAAC,IAAM,qBAAqB,GAA6B,UAAC,KAAK;;IACnE,IAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAA;IAC1C,IAAM,WAAW,GAAG,YAAY,GAAG,CAAC,CAAA;IACpC,IAAM,OAAO,GAAG,KAAK,CAAC,IAAI,KAAK,IAAI,CAAA;IACnC,IAAM,SAAS,GAAG,MA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import { Checkin } from './checkin-count-indicator';
|
|
4
|
+
declare const _default: ComponentMeta<React.FunctionComponent<{
|
|
5
|
+
checkins: Checkin[];
|
|
6
|
+
rsvp: number | null;
|
|
7
|
+
}>>;
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const SingleResponse: ComponentStory<React.FunctionComponent<{
|
|
10
|
+
checkins: Checkin[];
|
|
11
|
+
rsvp: number | null;
|
|
12
|
+
}>>;
|
|
13
|
+
export declare const Decline: ComponentStory<React.FunctionComponent<{
|
|
14
|
+
checkins: Checkin[];
|
|
15
|
+
rsvp: number | null;
|
|
16
|
+
}>>;
|
|
17
|
+
export declare const NoResponse: ComponentStory<React.FunctionComponent<{
|
|
18
|
+
checkins: Checkin[];
|
|
19
|
+
rsvp: number | null;
|
|
20
|
+
}>>;
|
|
21
|
+
export declare const MultipleResponses: ComponentStory<React.FunctionComponent<{
|
|
22
|
+
checkins: Checkin[];
|
|
23
|
+
rsvp: number | null;
|
|
24
|
+
}>>;
|
|
25
|
+
export declare const CheckinAndResponse: ComponentStory<React.FunctionComponent<{
|
|
26
|
+
checkins: Checkin[];
|
|
27
|
+
rsvp: number | null;
|
|
28
|
+
}>>;
|
|
29
|
+
export declare const MultipleCheckinsAndResponse: ComponentStory<React.FunctionComponent<{
|
|
30
|
+
checkins: Checkin[];
|
|
31
|
+
rsvp: number | null;
|
|
32
|
+
}>>;
|
|
33
|
+
export declare const CheckinsWithDecline: ComponentStory<React.FunctionComponent<{
|
|
34
|
+
checkins: Checkin[];
|
|
35
|
+
rsvp: number | null;
|
|
36
|
+
}>>;
|
|
37
|
+
export declare const CheckinWithoutResponse: ComponentStory<React.FunctionComponent<{
|
|
38
|
+
checkins: Checkin[];
|
|
39
|
+
rsvp: number | null;
|
|
40
|
+
}>>;
|
|
41
|
+
export declare const MultipleCheckins: ComponentStory<React.FunctionComponent<{
|
|
42
|
+
checkins: Checkin[];
|
|
43
|
+
rsvp: number | null;
|
|
44
|
+
}>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { CheckinCountIndicator } from './checkin-count-indicator';
|
|
14
|
+
export default {
|
|
15
|
+
title: 'Checkin-Count Indicator',
|
|
16
|
+
component: CheckinCountIndicator,
|
|
17
|
+
argTypes: { rsvp: { type: { name: 'number' } } },
|
|
18
|
+
};
|
|
19
|
+
var exampleCheckin = { id: 'dummy-id', time: new Date('2022-01-01') };
|
|
20
|
+
var Template = function (args) { return (React.createElement(CheckinCountIndicator, __assign({}, args))); };
|
|
21
|
+
export var SingleResponse = Template.bind({});
|
|
22
|
+
SingleResponse.args = { checkins: [], rsvp: 1 };
|
|
23
|
+
export var Decline = Template.bind({});
|
|
24
|
+
Decline.args = { checkins: [], rsvp: 0 };
|
|
25
|
+
export var NoResponse = Template.bind({});
|
|
26
|
+
NoResponse.args = { checkins: [], rsvp: null };
|
|
27
|
+
export var MultipleResponses = Template.bind({});
|
|
28
|
+
MultipleResponses.args = { checkins: [], rsvp: 16 };
|
|
29
|
+
export var CheckinAndResponse = Template.bind({});
|
|
30
|
+
CheckinAndResponse.args = { checkins: [exampleCheckin], rsvp: 1 };
|
|
31
|
+
export var MultipleCheckinsAndResponse = Template.bind({});
|
|
32
|
+
MultipleCheckinsAndResponse.args = {
|
|
33
|
+
checkins: [exampleCheckin, exampleCheckin],
|
|
34
|
+
rsvp: 1,
|
|
35
|
+
};
|
|
36
|
+
export var CheckinsWithDecline = Template.bind({});
|
|
37
|
+
CheckinsWithDecline.args = { checkins: [exampleCheckin], rsvp: 0 };
|
|
38
|
+
export var CheckinWithoutResponse = Template.bind({});
|
|
39
|
+
CheckinWithoutResponse.args = { checkins: [exampleCheckin], rsvp: null };
|
|
40
|
+
export var MultipleCheckins = Template.bind({});
|
|
41
|
+
MultipleCheckins.args = {
|
|
42
|
+
checkins: [exampleCheckin, exampleCheckin, exampleCheckin, exampleCheckin],
|
|
43
|
+
rsvp: 2,
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=checkin-count-indicator.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkin-count-indicator.stories.js","sourceRoot":"","sources":["../../src/ui/checkin-count-indicator.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAW,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAE1E,eAAe;IACb,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,qBAAqB;IAChC,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;CACF,CAAA;AAEhD,IAAM,cAAc,GAAY,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,EAAE,CAAA;AAEhF,IAAM,QAAQ,GAAiD,UAAC,IAAI,IAAK,OAAA,CACvE,oBAAC,qBAAqB,eAAK,IAAI,EAAI,CACpC,EAFwE,CAExE,CAAA;AAED,MAAM,CAAC,IAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC/C,cAAc,CAAC,IAAI,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAA;AAE/C,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAA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AC,EAAE,CAAC,CAAA;AACjD,gBAAgB,CAAC,IAAI,GAAG;IACtB,QAAQ,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC;IAC1E,IAAI,EAAE,CAAC;CACR,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CheckinCountIndicator } from './checkin-count-indicator';
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-crew-berlin/enter-js-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "utils such as vaildation and other helpers to work with data from the enter app",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
5
|
"files": [
|
|
8
6
|
"dist",
|
|
9
7
|
"README.md"
|
|
10
8
|
],
|
|
9
|
+
"targets": {
|
|
10
|
+
"lib": {
|
|
11
|
+
"source": "src/lib/index.ts",
|
|
12
|
+
"outputFormat": "esmodule",
|
|
13
|
+
"isLibrary": true,
|
|
14
|
+
"includeNodeModules": false
|
|
15
|
+
},
|
|
16
|
+
"ui": {
|
|
17
|
+
"source": "src/ui/index.ts",
|
|
18
|
+
"outputFormat": "esmodule",
|
|
19
|
+
"isLibrary": true,
|
|
20
|
+
"includeNodeModules": false
|
|
21
|
+
}
|
|
22
|
+
},
|
|
11
23
|
"scripts": {
|
|
12
24
|
"prepare": "husky install && npm run build",
|
|
13
|
-
"build": "rm -
|
|
14
|
-
"dev": "tsc -w",
|
|
25
|
+
"build": "rm -r dist & parcel build && tsc -d",
|
|
15
26
|
"lint": "eslint src/ --ext .ts",
|
|
16
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
27
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
28
|
+
"storybook": "start-storybook -p 6006",
|
|
29
|
+
"build-storybook": "build-storybook"
|
|
17
30
|
},
|
|
18
31
|
"lint-staged": {
|
|
19
32
|
"**/*": "prettier --write --ignore-unknown"
|
|
@@ -29,14 +42,38 @@
|
|
|
29
42
|
},
|
|
30
43
|
"homepage": "https://gitlab.com/dcb-enter/js-utils#readme",
|
|
31
44
|
"devDependencies": {
|
|
45
|
+
"@babel/core": "^7.18.2",
|
|
46
|
+
"@parcel/packager-ts": "^2.6.0",
|
|
47
|
+
"@parcel/transformer-typescript-tsc": "^2.6.0",
|
|
48
|
+
"@parcel/transformer-typescript-types": "^2.6.0",
|
|
49
|
+
"@storybook/addon-actions": "^6.5.8",
|
|
50
|
+
"@storybook/addon-essentials": "^6.5.8",
|
|
51
|
+
"@storybook/addon-interactions": "^6.5.8",
|
|
52
|
+
"@storybook/addon-links": "^6.5.8",
|
|
53
|
+
"@storybook/builder-webpack4": "^6.5.8",
|
|
54
|
+
"@storybook/manager-webpack4": "^6.5.8",
|
|
55
|
+
"@storybook/react": "^6.5.8",
|
|
56
|
+
"@storybook/testing-library": "^0.0.11",
|
|
32
57
|
"@types/node": "^17.0.38",
|
|
58
|
+
"@types/react": "^18.0.10",
|
|
59
|
+
"@types/react-dom": "^18.0.5",
|
|
60
|
+
"babel-loader": "^8.2.5",
|
|
33
61
|
"eslint": "^8.16.0",
|
|
34
62
|
"eslint-config-prettier": "^8.5.0",
|
|
35
63
|
"husky": "^7.0.1",
|
|
64
|
+
"parcel": "^2.6.0",
|
|
36
65
|
"prettier": "^2.6.2",
|
|
37
|
-
"
|
|
66
|
+
"react": "^18.1.0",
|
|
67
|
+
"react-dom": "^18.1.0",
|
|
68
|
+
"typescript": "^4.7.3"
|
|
69
|
+
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"react": "^17.0.0 || ^18.1.0",
|
|
72
|
+
"react-dom": "^17.0.0 || ^18.1.0"
|
|
38
73
|
},
|
|
39
74
|
"dependencies": {
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^5.27.0"
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
76
|
+
"@typescript-eslint/parser": "^5.27.0",
|
|
77
|
+
"styled-jsx": "^5.0.2"
|
|
41
78
|
}
|
|
42
79
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * as result from './result/result.js';
|
package/dist/index.js
DELETED
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../src/result/result.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,OAAO,CAAU,IAAa;IAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;AACtC,CAAC;AAED,MAAM,UAAU,OAAO,CAAS,MAAc;IAC5C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;AAC1C,CAAC;AAED,MAAM,UAAU,SAAS,CACvB,MAAgC;IAEhC,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,OAAO,SAAS,CAAA;IACrC,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM,UAAU,SAAS,CACvB,MAA+B;IAE/B,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,SAAS,CAAA;IACpC,OAAO,MAAM,CAAA;AACf,CAAC;AASD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAI5B,OAAU;IACV,IAAI,OAAO,CAAC,KAAK,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,OAA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