@cuemath/leap 3.2.24-j1 → 3.2.24
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/features/auth/account-selector/account-selector.js +52 -54
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item-styled.js +3 -9
- package/dist/features/auth/comps/user-list/user-item/user-item-styled.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +15 -14
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js +68 -53
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js.map +1 -1
- package/dist/features/ui/theme/layout.js +3 -3
- package/dist/features/ui/theme/layout.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/package.json +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as s } from "react";
|
|
3
3
|
import { useTheme as $ } from "styled-components";
|
|
4
|
-
import { ILLUSTRATIONS as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { EDeviceType as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { ImageWrapper as
|
|
13
|
-
const
|
|
14
|
-
userAccounts:
|
|
15
|
-
onSelect:
|
|
16
|
-
onAddNew:
|
|
17
|
-
isLoading:
|
|
4
|
+
import { ILLUSTRATIONS as a } from "../../../assets/illustrations/illustrations.js";
|
|
5
|
+
import d from "../../ui/image/image.js";
|
|
6
|
+
import r from "../../ui/layout/flex-view.js";
|
|
7
|
+
import t from "../../ui/separator/separator.js";
|
|
8
|
+
import c from "../../ui/text/text.js";
|
|
9
|
+
import { EDeviceType as f } from "../../ui/theme/constants.js";
|
|
10
|
+
import g from "../comps/overlay-loader/overlay-loader.js";
|
|
11
|
+
import T from "../comps/user-list/user-list.js";
|
|
12
|
+
import { ImageWrapper as u } from "./account-selector-styled.js";
|
|
13
|
+
const w = ({
|
|
14
|
+
userAccounts: m,
|
|
15
|
+
onSelect: n,
|
|
16
|
+
onAddNew: p,
|
|
17
|
+
isLoading: h
|
|
18
18
|
}) => {
|
|
19
|
-
const { device:
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
19
|
+
const { device: l } = $(), o = l <= f.TABLET;
|
|
20
|
+
return /* @__PURE__ */ i(
|
|
21
|
+
r,
|
|
22
22
|
{
|
|
23
23
|
$flex: 1,
|
|
24
24
|
$alignItems: "center",
|
|
@@ -27,44 +27,42 @@ const L = ({
|
|
|
27
27
|
$height: "100%",
|
|
28
28
|
$gapX: 2,
|
|
29
29
|
children: [
|
|
30
|
-
/* @__PURE__ */ e(
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
/* @__PURE__ */ e(
|
|
34
|
-
/* @__PURE__ */ e(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
)
|
|
62
|
-
] })
|
|
30
|
+
/* @__PURE__ */ e(g, { isLoading: h }),
|
|
31
|
+
/* @__PURE__ */ e(d, { src: a.CIRCLE_CUEMATH_LOGO_WHITE, alt: "Parent Signup", withLoader: !1 }),
|
|
32
|
+
/* @__PURE__ */ e(t, { heightX: 1 }),
|
|
33
|
+
/* @__PURE__ */ e(c, { $renderAs: "ab1", $color: "WHITE_T_60", $align: "center", children: "Switch between accounts" }),
|
|
34
|
+
/* @__PURE__ */ e(t, { heightX: o ? 1.5 : 5 }),
|
|
35
|
+
/* @__PURE__ */ e(T, { users: m, onSelect: n, onAddNew: p }),
|
|
36
|
+
/* @__PURE__ */ e(t, { heightX: o ? 1.5 : 5 }),
|
|
37
|
+
/* @__PURE__ */ i(
|
|
38
|
+
r,
|
|
39
|
+
{
|
|
40
|
+
$gutterX: 0.5,
|
|
41
|
+
$gapX: 1,
|
|
42
|
+
$flexGapX: 0.5,
|
|
43
|
+
$width: 280,
|
|
44
|
+
$borderColor: "BLACK_5",
|
|
45
|
+
$background: "BLACK_3",
|
|
46
|
+
$flexDirection: "row",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
u,
|
|
50
|
+
{
|
|
51
|
+
src: a.CUEMATH_APP_QR_CODE,
|
|
52
|
+
width: 80,
|
|
53
|
+
height: 80,
|
|
54
|
+
withLoader: !1
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ e(r, { $gapX: 0.5, $flex: 1, children: /* @__PURE__ */ e(c, { $color: "WHITE", $renderOnTabletAs: "ab3", $renderAs: "ab2", children: "Download the cuemath app to view your children’s report" }) })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
)
|
|
63
61
|
]
|
|
64
62
|
}
|
|
65
63
|
);
|
|
66
|
-
},
|
|
64
|
+
}, v = s(w);
|
|
67
65
|
export {
|
|
68
|
-
|
|
66
|
+
v as default
|
|
69
67
|
};
|
|
70
68
|
//# sourceMappingURL=account-selector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-selector.js","sources":["../../../../src/features/auth/account-selector/account-selector.tsx"],"sourcesContent":["import type { IAccountSelectorViewProps } from './account-selector-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { EDeviceType } from '../../ui/theme/constants';\nimport OverlayLoader from '../comps/overlay-loader/overlay-loader';\nimport UserList from '../comps/user-list/user-list';\nimport * as Styled from './account-selector-styled';\n\nconst AccountSelector = ({\n userAccounts,\n onSelect,\n onAddNew,\n isLoading,\n}: IAccountSelectorViewProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n return (\n <FlexView\n $flex={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n $gapX={2}\n >\n <OverlayLoader isLoading={isLoading} />\n <Image src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE} alt=\"Parent Signup\" withLoader={false} />\n <Separator heightX={1} />\n <Text $renderAs=\"ab1\" $color=\"WHITE_T_60\" $align=\"center\">\n Switch between accounts\n </Text>\n <Separator heightX={isCompact ? 1.5 : 5} />\n
|
|
1
|
+
{"version":3,"file":"account-selector.js","sources":["../../../../src/features/auth/account-selector/account-selector.tsx"],"sourcesContent":["import type { IAccountSelectorViewProps } from './account-selector-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { EDeviceType } from '../../ui/theme/constants';\nimport OverlayLoader from '../comps/overlay-loader/overlay-loader';\nimport UserList from '../comps/user-list/user-list';\nimport * as Styled from './account-selector-styled';\n\nconst AccountSelector = ({\n userAccounts,\n onSelect,\n onAddNew,\n isLoading,\n}: IAccountSelectorViewProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n return (\n <FlexView\n $flex={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n $gapX={2}\n >\n <OverlayLoader isLoading={isLoading} />\n <Image src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE} alt=\"Parent Signup\" withLoader={false} />\n <Separator heightX={1} />\n <Text $renderAs=\"ab1\" $color=\"WHITE_T_60\" $align=\"center\">\n Switch between accounts\n </Text>\n <Separator heightX={isCompact ? 1.5 : 5} />\n <UserList users={userAccounts} onSelect={onSelect} onAddNew={onAddNew} />\n <Separator heightX={isCompact ? 1.5 : 5} />\n <FlexView\n $gutterX={0.5}\n $gapX={1}\n $flexGapX={0.5}\n $width={280}\n $borderColor=\"BLACK_5\"\n $background=\"BLACK_3\"\n $flexDirection=\"row\"\n >\n <Styled.ImageWrapper\n src={ILLUSTRATIONS.CUEMATH_APP_QR_CODE}\n width={80}\n height={80}\n withLoader={false}\n />\n <FlexView $gapX={0.5} $flex={1}>\n <Text $color=\"WHITE\" $renderOnTabletAs=\"ab3\" $renderAs=\"ab2\">\n Download the cuemath app to view your children’s report\n </Text>\n </FlexView>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(AccountSelector);\n"],"names":["AccountSelector","userAccounts","onSelect","onAddNew","isLoading","device","useTheme","isCompact","EDeviceType","jsxs","FlexView","jsx","OverlayLoader","Image","ILLUSTRATIONS","Separator","Text","UserList","Styled.ImageWrapper","accountSelector","memo"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,IAAkB,CAAC;AAAA,EACvB,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAiC;AACzB,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY;AAGtC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,OAAO;AAAA,MAEP,UAAA;AAAA,QAAA,gBAAAC,EAACC,KAAc,WAAAR,GAAsB;AAAA,QACrC,gBAAAO,EAACE,KAAM,KAAKC,EAAc,2BAA2B,KAAI,iBAAgB,YAAY,IAAO;AAAA,QAC5F,gBAAAH,EAACI,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,QACvB,gBAAAJ,EAACK,KAAK,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,UAE1D,0BAAA,CAAA;AAAA,QACC,gBAAAL,EAAAI,GAAA,EAAU,SAASR,IAAY,MAAM,GAAG;AAAA,QACxC,gBAAAI,EAAAM,GAAA,EAAS,OAAOhB,GAAc,UAAAC,GAAoB,UAAAC,GAAoB;AAAA,QACtE,gBAAAQ,EAAAI,GAAA,EAAU,SAASR,IAAY,MAAM,GAAG;AAAA,QACzC,gBAAAE;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YACV,OAAO;AAAA,YACP,WAAW;AAAA,YACX,QAAQ;AAAA,YACR,cAAa;AAAA,YACb,aAAY;AAAA,YACZ,gBAAe;AAAA,YAEf,UAAA;AAAA,cAAA,gBAAAC;AAAA,gBAACO;AAAAA,gBAAA;AAAA,kBACC,KAAKJ,EAAc;AAAA,kBACnB,OAAO;AAAA,kBACP,QAAQ;AAAA,kBACR,YAAY;AAAA,gBAAA;AAAA,cACd;AAAA,cACC,gBAAAH,EAAAD,GAAA,EAAS,OAAO,KAAK,OAAO,GAC3B,UAAA,gBAAAC,EAACK,GAAK,EAAA,QAAO,SAAQ,mBAAkB,OAAM,WAAU,OAAM,oEAE7D,CAAA,GACF;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeG,IAAAC,EAAKpB,CAAe;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import t from "styled-components";
|
|
2
2
|
import l from "../../../../ui/layout/flex-view.js";
|
|
3
|
-
|
|
4
|
-
const x = t(l)`
|
|
3
|
+
const c = t(l)`
|
|
5
4
|
cursor: pointer;
|
|
6
5
|
transition: background-color 0.3s ease;
|
|
7
6
|
position: relative;
|
|
@@ -14,14 +13,9 @@ const x = t(l)`
|
|
|
14
13
|
|
|
15
14
|
${({ index: o, theme: r, maxColumns: e }) => o < e && `border-top: 1px solid ${r.colors.BLACK_5};`}
|
|
16
15
|
|
|
17
|
-
${({ index: o, isLastItem: r, theme: e, maxColumns:
|
|
18
|
-
`, m = t(s)`
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
text-overflow: ellipsis;
|
|
21
|
-
max-width: 100%;
|
|
16
|
+
${({ index: o, isLastItem: r, theme: e, maxColumns: s }) => ((o + 1) % s === 0 || r) && `border-right: 1px solid ${e.colors.BLACK_5};`}
|
|
22
17
|
`;
|
|
23
18
|
export {
|
|
24
|
-
|
|
25
|
-
x as UserItemCard
|
|
19
|
+
c as UserItemCard
|
|
26
20
|
};
|
|
27
21
|
//# sourceMappingURL=user-item-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-item-styled.js","sources":["../../../../../../src/features/auth/comps/user-list/user-item/user-item-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\
|
|
1
|
+
{"version":3,"file":"user-item-styled.js","sources":["../../../../../../src/features/auth/comps/user-list/user-item/user-item-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const UserItemCard = styled(FlexView)<{\n index: number;\n isLastItem?: boolean;\n maxColumns: number;\n}>`\n cursor: pointer;\n transition: background-color 0.3s ease;\n position: relative;\n border-left: 1px solid ${({ theme }) => theme.colors.BLACK_5};\n border-bottom: 1px solid ${({ theme }) => theme.colors.BLACK_5};\n\n &:hover {\n background-color: ${({ theme }) => theme.colors.BLACK_2};\n }\n\n ${({ index, theme, maxColumns }) =>\n index < maxColumns && `border-top: 1px solid ${theme.colors.BLACK_5};`}\n\n ${({ index, isLastItem, theme, maxColumns }) =>\n ((index + 1) % maxColumns === 0 || isLastItem) &&\n `border-right: 1px solid ${theme.colors.BLACK_5};`}\n`;\n"],"names":["UserItemCard","styled","FlexView","theme","index","maxColumns","isLastItem"],"mappings":";;AAIa,MAAAA,IAAeC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,2BAQhB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,6BACjC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,wBAGxC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,IAGvD,CAAC,EAAE,OAAAC,GAAO,OAAAD,GAAO,YAAAE,EAAW,MAC5BD,IAAQC,KAAc,yBAAyBF,EAAM,OAAO,OAAO,GAAG;AAAA;AAAA,IAEtE,CAAC,EAAE,OAAAC,GAAO,YAAAE,GAAY,OAAAH,GAAO,YAAAE,EAC3B,QAAAD,IAAQ,KAAKC,MAAe,KAAKC,MACnC,2BAA2BH,EAAM,OAAO,OAAO,GAAG;AAAA;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as g, useCallback as A } from "react";
|
|
3
3
|
import u from "../../../../ui/avatar/avatar.js";
|
|
4
4
|
import C from "../../../../ui/separator/separator.js";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import I from "../../../../ui/text/text.js";
|
|
6
|
+
import { AVATAR_CONFIGURATIONS as m } from "../user-list-constants.js";
|
|
7
|
+
import { UserItemCard as b } from "./user-item-styled.js";
|
|
8
|
+
const d = ({
|
|
8
9
|
id: r,
|
|
9
|
-
phone:
|
|
10
|
+
phone: n,
|
|
10
11
|
username: s,
|
|
11
12
|
avatar: i,
|
|
12
13
|
index: e,
|
|
@@ -16,13 +17,13 @@ const b = ({
|
|
|
16
17
|
maxColumns: $,
|
|
17
18
|
cardSize: a
|
|
18
19
|
}) => {
|
|
19
|
-
const
|
|
20
|
+
const p = A(() => {
|
|
20
21
|
o(r);
|
|
21
|
-
}, [r, o]),
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
22
|
+
}, [r, o]), f = i ?? m[e % m.length];
|
|
23
|
+
return /* @__PURE__ */ h(
|
|
24
|
+
b,
|
|
24
25
|
{
|
|
25
|
-
onClick:
|
|
26
|
+
onClick: p,
|
|
26
27
|
maxColumns: $,
|
|
27
28
|
$gutterX: 1.5,
|
|
28
29
|
$gapX: 1.5,
|
|
@@ -34,15 +35,15 @@ const b = ({
|
|
|
34
35
|
isLastItem: c,
|
|
35
36
|
$background: "BLACK_1",
|
|
36
37
|
children: [
|
|
37
|
-
/* @__PURE__ */ t(u, { size: l, avatar:
|
|
38
|
+
/* @__PURE__ */ t(u, { size: l, avatar: f }),
|
|
38
39
|
/* @__PURE__ */ t(C, { heightX: 0.5 }),
|
|
39
|
-
/* @__PURE__ */ t(
|
|
40
|
+
/* @__PURE__ */ t(I, { $color: "WHITE", $renderOnTabletAs: "ab3", $renderAs: "ab2", $align: "center", children: s || n })
|
|
40
41
|
]
|
|
41
42
|
},
|
|
42
43
|
r
|
|
43
44
|
);
|
|
44
|
-
},
|
|
45
|
+
}, X = g(d);
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
X as default
|
|
47
48
|
};
|
|
48
49
|
//# sourceMappingURL=user-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-item.js","sources":["../../../../../../src/features/auth/comps/user-list/user-item/user-item.tsx"],"sourcesContent":["import type { IUserItemProps } from './user-item-types';\n\nimport { useCallback, type FC, memo } from 'react';\n\nimport Avatar from '../../../../ui/avatar/avatar';\nimport Separator from '../../../../ui/separator/separator';\nimport { AVATAR_CONFIGURATIONS } from '../user-list-constants';\nimport * as Styled from './user-item-styled';\n\nconst UserItem: FC<IUserItemProps> = ({\n id,\n phone,\n username,\n avatar,\n index,\n isLastItem,\n onSelect,\n avatarSize,\n maxColumns,\n cardSize,\n}) => {\n const handleClick = useCallback(() => {\n onSelect(id);\n }, [id, onSelect]);\n\n const avatarSource = avatar ?? AVATAR_CONFIGURATIONS[index % AVATAR_CONFIGURATIONS.length];\n\n return (\n <Styled.UserItemCard\n key={id}\n onClick={handleClick}\n maxColumns={maxColumns}\n $gutterX={1.5}\n $gapX={1.5}\n $width={cardSize}\n $height={cardSize}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n index={index}\n isLastItem={isLastItem}\n $background=\"BLACK_1\"\n >\n <Avatar size={avatarSize} avatar={avatarSource} />\n <Separator heightX={0.5} />\n <
|
|
1
|
+
{"version":3,"file":"user-item.js","sources":["../../../../../../src/features/auth/comps/user-list/user-item/user-item.tsx"],"sourcesContent":["import type { IUserItemProps } from './user-item-types';\n\nimport { useCallback, type FC, memo } from 'react';\n\nimport Avatar from '../../../../ui/avatar/avatar';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport { AVATAR_CONFIGURATIONS } from '../user-list-constants';\nimport * as Styled from './user-item-styled';\n\nconst UserItem: FC<IUserItemProps> = ({\n id,\n phone,\n username,\n avatar,\n index,\n isLastItem,\n onSelect,\n avatarSize,\n maxColumns,\n cardSize,\n}) => {\n const handleClick = useCallback(() => {\n onSelect(id);\n }, [id, onSelect]);\n\n const avatarSource = avatar ?? AVATAR_CONFIGURATIONS[index % AVATAR_CONFIGURATIONS.length];\n\n return (\n <Styled.UserItemCard\n key={id}\n onClick={handleClick}\n maxColumns={maxColumns}\n $gutterX={1.5}\n $gapX={1.5}\n $width={cardSize}\n $height={cardSize}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n index={index}\n isLastItem={isLastItem}\n $background=\"BLACK_1\"\n >\n <Avatar size={avatarSize} avatar={avatarSource} />\n <Separator heightX={0.5} />\n <Text $color=\"WHITE\" $renderOnTabletAs=\"ab3\" $renderAs=\"ab2\" $align=\"center\">\n {username || phone}\n </Text>\n </Styled.UserItemCard>\n );\n};\n\nexport default memo(UserItem);\n"],"names":["UserItem","id","phone","username","avatar","index","isLastItem","onSelect","avatarSize","maxColumns","cardSize","handleClick","useCallback","avatarSource","AVATAR_CONFIGURATIONS","jsxs","Styled.UserItemCard","jsx","Avatar","Separator","Text","UserItem$1","memo"],"mappings":";;;;;;;AAUA,MAAMA,IAA+B,CAAC;AAAA,EACpC,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AACF,MAAM;AACE,QAAAC,IAAcC,EAAY,MAAM;AACpC,IAAAL,EAASN,CAAE;AAAA,EAAA,GACV,CAACA,GAAIM,CAAQ,CAAC,GAEXM,IAAeT,KAAUU,EAAsBT,IAAQS,EAAsB,MAAM;AAGvF,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MAEC,SAASL;AAAA,MACT,YAAAF;AAAA,MACA,UAAU;AAAA,MACV,OAAO;AAAA,MACP,QAAQC;AAAA,MACR,SAASA;AAAA,MACT,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,OAAAL;AAAA,MACA,YAAAC;AAAA,MACA,aAAY;AAAA,MAEZ,UAAA;AAAA,QAAA,gBAAAW,EAACC,GAAO,EAAA,MAAMV,GAAY,QAAQK,GAAc;AAAA,QAChD,gBAAAI,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,QACzB,gBAAAF,EAACG,GAAK,EAAA,QAAO,SAAQ,mBAAkB,OAAM,WAAU,OAAM,QAAO,UACjE,UAAAjB,KAAYD,EACf,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAjBKD;AAAA,EAAA;AAoBX,GAEeoB,IAAAC,EAAKtB,CAAQ;"}
|
|
@@ -1,73 +1,88 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as r, jsxs as f, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import { memo as _, useContext as b, useCallback as k } from "react";
|
|
3
|
+
import C from "../../../../../ui/layout/flex-view.js";
|
|
4
|
+
import w from "../../../../../ui/loader/app-loader/app-loader.js";
|
|
5
|
+
import F from "../../../../../ui/separator/separator.js";
|
|
6
|
+
import m from "../../../../../ui/text/text.js";
|
|
7
|
+
import N from "../../../milestone-create-context.js";
|
|
8
|
+
import $ from "../../chapter-item/chapter-item.js";
|
|
9
|
+
import { computeRecommendedNCustomChapters as R } from "../utils.js";
|
|
10
|
+
import { ChaptersListWrapper as T } from "./chapter-selection-step-styled.js";
|
|
11
|
+
const x = (p, u, d, i) => !p || u ? !0 : (d === "EDIT" || d === "DRAFT_EDIT") && i.recommended === !0, v = _((p) => {
|
|
12
|
+
const { formData: u, isProcessing: d, onFormDataChange: i, isGoalCreation: n } = p, { testType: A, primaryChaptersList: o, chapterGoalCategory: D } = u, { primaryGoalCategory: G } = D || {}, a = A === "no-test", { flow: c } = b(N), { recommendedChaptersList: h, customChaptersList: s } = R(
|
|
12
13
|
o,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
),
|
|
16
|
-
(
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
G,
|
|
15
|
+
n
|
|
16
|
+
), g = k(
|
|
17
|
+
(t) => {
|
|
18
|
+
if (n && !a) {
|
|
19
|
+
const e = o == null ? void 0 : o.find((I) => I.id === t);
|
|
20
|
+
if (!((c === "EDIT" || c === "DRAFT_EDIT") && (e == null ? void 0 : e.recommended) === !0)) return null;
|
|
21
|
+
}
|
|
22
|
+
const l = o == null ? void 0 : o.map((e) => e.id === t ? {
|
|
23
|
+
...e,
|
|
24
|
+
added: !e.added
|
|
25
|
+
} : e);
|
|
26
|
+
i({
|
|
27
|
+
primaryChaptersList: l
|
|
24
28
|
});
|
|
25
29
|
},
|
|
26
|
-
[o, a,
|
|
30
|
+
[o, a, n, i, c]
|
|
27
31
|
);
|
|
28
|
-
return
|
|
29
|
-
|
|
32
|
+
return d ? /* @__PURE__ */ r(
|
|
33
|
+
T,
|
|
30
34
|
{
|
|
31
35
|
$gapX: 1.5,
|
|
32
36
|
$gutterX: 1.5,
|
|
33
37
|
$flexGapX: 1.25,
|
|
34
38
|
$justifyContent: "center",
|
|
35
39
|
$alignItems: "center",
|
|
36
|
-
children: /* @__PURE__ */
|
|
40
|
+
children: /* @__PURE__ */ r(w, {})
|
|
37
41
|
}
|
|
38
|
-
) : /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
a && /* @__PURE__ */
|
|
42
|
+
) : /* @__PURE__ */ f(T, { $gapX: 1.5, $gutterX: 1.5, $flexGapX: 1.25, children: [
|
|
43
|
+
/* @__PURE__ */ f(C, { $flexDirection: "row", $flexGap: 4, $alignItems: "center", children: [
|
|
44
|
+
/* @__PURE__ */ r(m, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: "Recommended Chapters" }),
|
|
45
|
+
a && /* @__PURE__ */ r(m, { $renderAs: "ub2", $color: "BLACK_T_60", children: "(Click on any chapter to exclude it)" })
|
|
42
46
|
] }),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
chapterNo: n + 1,
|
|
48
|
-
canAddChapter: !t || a,
|
|
49
|
-
onChapterItemClick: h
|
|
50
|
-
},
|
|
51
|
-
r.id
|
|
52
|
-
)) : /* @__PURE__ */ e(l, { $renderAs: "ub1", children: "No recommended chapters available" }) }),
|
|
53
|
-
!!(c != null && c.length) && /* @__PURE__ */ p(G, { children: [
|
|
54
|
-
/* @__PURE__ */ e(D, { height: 8, background: "TRANSPARENT" }),
|
|
55
|
-
/* @__PURE__ */ e(l, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: "Custom chapters" }),
|
|
56
|
-
/* @__PURE__ */ e(d, { $flexDirection: "row", $flexWrap: !0, $flexGapX: 1.25, children: c.map((r, n) => /* @__PURE__ */ e(
|
|
57
|
-
C,
|
|
47
|
+
/* @__PURE__ */ r(C, { $flexDirection: "row", $flexWrap: !0, $flexGapX: 1.25, children: h.length > 0 ? h.map((t, l) => {
|
|
48
|
+
const e = x(n, a, c, t);
|
|
49
|
+
return /* @__PURE__ */ r(
|
|
50
|
+
$,
|
|
58
51
|
{
|
|
59
|
-
chapterData:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
onChapterItemClick:
|
|
63
|
-
showChapterTags: !0
|
|
52
|
+
chapterData: t,
|
|
53
|
+
chapterNo: l + 1,
|
|
54
|
+
canAddChapter: e,
|
|
55
|
+
onChapterItemClick: g
|
|
64
56
|
},
|
|
65
|
-
|
|
66
|
-
)
|
|
57
|
+
t.id
|
|
58
|
+
);
|
|
59
|
+
}) : /* @__PURE__ */ r(m, { $renderAs: "ub1", children: "No recommended chapters available" }) }),
|
|
60
|
+
!!(s != null && s.length) && /* @__PURE__ */ f(X, { children: [
|
|
61
|
+
/* @__PURE__ */ r(F, { height: 8, background: "TRANSPARENT" }),
|
|
62
|
+
/* @__PURE__ */ r(m, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: "Custom chapters" }),
|
|
63
|
+
/* @__PURE__ */ r(C, { $flexDirection: "row", $flexWrap: !0, $flexGapX: 1.25, children: s.map((t, l) => {
|
|
64
|
+
const e = x(
|
|
65
|
+
n,
|
|
66
|
+
a,
|
|
67
|
+
c,
|
|
68
|
+
t
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ r(
|
|
71
|
+
$,
|
|
72
|
+
{
|
|
73
|
+
chapterData: t,
|
|
74
|
+
canAddChapter: e,
|
|
75
|
+
chapterNo: l + 1,
|
|
76
|
+
onChapterItemClick: g,
|
|
77
|
+
showChapterTags: !0
|
|
78
|
+
},
|
|
79
|
+
t.id
|
|
80
|
+
);
|
|
81
|
+
}) })
|
|
67
82
|
] })
|
|
68
83
|
] });
|
|
69
84
|
});
|
|
70
85
|
export {
|
|
71
|
-
|
|
86
|
+
v as default
|
|
72
87
|
};
|
|
73
88
|
//# sourceMappingURL=chapters-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chapters-list.js","sources":["../../../../../../../src/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.tsx"],"sourcesContent":["import type { IChaptersListProps } from './chapter-selection-step-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback } from 'react';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport AppLoader from '../../../../../ui/loader/app-loader/app-loader';\nimport Seperator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport ChapterItemV2 from '../../chapter-item/chapter-item';\nimport { computeRecommendedNCustomChapters } from '../utils';\nimport * as Styled from './chapter-selection-step-styled';\n\nconst ChaptersList: FC<IChaptersListProps> = memo(props => {\n const { formData, isProcessing, onFormDataChange, isGoalCreation } = props;\n const { testType, primaryChaptersList, chapterGoalCategory } = formData;\n const { primaryGoalCategory } = chapterGoalCategory || {};\n const isSchoolSuccess = testType === 'no-test';\n\n const { recommendedChaptersList, customChaptersList } = computeRecommendedNCustomChapters(\n primaryChaptersList,\n primaryGoalCategory,\n isGoalCreation,\n );\n\n const handleChapterToggled = useCallback(\n (chapterId: string) => {\n //* If category is Test prep or Enrichment, Then one can not deselect the chapters.\n if (isGoalCreation && !isSchoolSuccess) return null;\n\n const updatedChaptersList = primaryChaptersList?.map(chapter => {\n if (chapter.id === chapterId) {\n return {\n ...chapter,\n added: !chapter.added,\n };\n }\n\n return chapter;\n });\n\n onFormDataChange({\n primaryChaptersList: updatedChaptersList,\n });\n },\n [primaryChaptersList, isSchoolSuccess, isGoalCreation, onFormDataChange],\n );\n\n if (isProcessing) {\n return (\n <Styled.ChaptersListWrapper\n $gapX={1.5}\n $gutterX={1.5}\n $flexGapX={1.25}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <AppLoader />\n </Styled.ChaptersListWrapper>\n );\n }\n\n return (\n <Styled.ChaptersListWrapper $gapX={1.5} $gutterX={1.5} $flexGapX={1.25}>\n <FlexView $flexDirection=\"row\" $flexGap={4} $alignItems=\"center\">\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recommended Chapters\n </Text>\n\n {isSchoolSuccess && (\n <Text $renderAs=\"ub2\" $color=\"BLACK_T_60\">\n (Click on any chapter to exclude it)\n </Text>\n )}\n </FlexView>\n\n <FlexView $flexDirection=\"row\" $flexWrap $flexGapX={1.25}>\n {recommendedChaptersList.length > 0 ? (\n recommendedChaptersList.map((chapter, idx) => {\n return (\n <ChapterItemV2\n key={chapter.id}\n chapterData={chapter}\n chapterNo={idx + 1}\n canAddChapter={
|
|
1
|
+
{"version":3,"file":"chapters-list.js","sources":["../../../../../../../src/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.tsx"],"sourcesContent":["import type { TMilestoneFormFlow } from '../../../milestone-create-types';\nimport type { IChapter } from '../../chapter-item/chapter-item-types';\nimport type { IChaptersListProps } from './chapter-selection-step-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useContext } from 'react';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport AppLoader from '../../../../../ui/loader/app-loader/app-loader';\nimport Seperator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport MilestoneCreateContext from '../../../milestone-create-context';\nimport ChapterItemV2 from '../../chapter-item/chapter-item';\nimport { computeRecommendedNCustomChapters } from '../utils';\nimport * as Styled from './chapter-selection-step-styled';\n\nconst getCanAddChapter = (\n isGoalCreation: boolean | undefined,\n isSchoolSuccess: boolean,\n flow: TMilestoneFormFlow | null,\n chapter: IChapter,\n): boolean => {\n // For school success, chapters can always be toggled\n if (!isGoalCreation || isSchoolSuccess) {\n return true;\n }\n\n // For non-school success test types\n const canToggleBasedOnFlow =\n (flow === 'EDIT' || flow === 'DRAFT_EDIT') && chapter.recommended === true;\n\n return canToggleBasedOnFlow;\n};\n\nconst ChaptersList: FC<IChaptersListProps> = memo(props => {\n const { formData, isProcessing, onFormDataChange, isGoalCreation } = props;\n const { testType, primaryChaptersList, chapterGoalCategory } = formData;\n const { primaryGoalCategory } = chapterGoalCategory || {};\n const isSchoolSuccess = testType === 'no-test';\n\n const { flow } = useContext(MilestoneCreateContext);\n\n const { recommendedChaptersList, customChaptersList } = computeRecommendedNCustomChapters(\n primaryChaptersList,\n primaryGoalCategory,\n isGoalCreation,\n );\n\n const handleChapterToggled = useCallback(\n (chapterId: string) => {\n //* If category is Test prep or Enrichment, Then one can not deselect the chapters.\n //* Unless the flow is EDIT or DRAFT_EDIT and chapter has recommended info true.\n if (isGoalCreation && !isSchoolSuccess) {\n const chapter = primaryChaptersList?.find(ch => ch.id === chapterId);\n const canToggle =\n (flow === 'EDIT' || flow === 'DRAFT_EDIT') && chapter?.recommended === true;\n\n if (!canToggle) return null;\n }\n\n const updatedChaptersList = primaryChaptersList?.map(chapter => {\n if (chapter.id === chapterId) {\n return {\n ...chapter,\n added: !chapter.added,\n };\n }\n\n return chapter;\n });\n\n onFormDataChange({\n primaryChaptersList: updatedChaptersList,\n });\n },\n [primaryChaptersList, isSchoolSuccess, isGoalCreation, onFormDataChange, flow],\n );\n\n if (isProcessing) {\n return (\n <Styled.ChaptersListWrapper\n $gapX={1.5}\n $gutterX={1.5}\n $flexGapX={1.25}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <AppLoader />\n </Styled.ChaptersListWrapper>\n );\n }\n\n return (\n <Styled.ChaptersListWrapper $gapX={1.5} $gutterX={1.5} $flexGapX={1.25}>\n <FlexView $flexDirection=\"row\" $flexGap={4} $alignItems=\"center\">\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recommended Chapters\n </Text>\n\n {isSchoolSuccess && (\n <Text $renderAs=\"ub2\" $color=\"BLACK_T_60\">\n (Click on any chapter to exclude it)\n </Text>\n )}\n </FlexView>\n\n <FlexView $flexDirection=\"row\" $flexWrap $flexGapX={1.25}>\n {recommendedChaptersList.length > 0 ? (\n recommendedChaptersList.map((chapter, idx) => {\n const canAddChapter = getCanAddChapter(isGoalCreation, isSchoolSuccess, flow, chapter);\n\n return (\n <ChapterItemV2\n key={chapter.id}\n chapterData={chapter}\n chapterNo={idx + 1}\n canAddChapter={canAddChapter}\n onChapterItemClick={handleChapterToggled}\n />\n );\n })\n ) : (\n <Text $renderAs=\"ub1\">No recommended chapters available</Text>\n )}\n </FlexView>\n\n {!!customChaptersList?.length && (\n <>\n <Seperator height={8} background=\"TRANSPARENT\" />\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Custom chapters\n </Text>\n\n <FlexView $flexDirection=\"row\" $flexWrap $flexGapX={1.25}>\n {customChaptersList.map((chapter, idx) => {\n const canAddChapter = getCanAddChapter(\n isGoalCreation,\n isSchoolSuccess,\n flow,\n chapter,\n );\n\n return (\n <ChapterItemV2\n key={chapter.id}\n chapterData={chapter}\n canAddChapter={canAddChapter}\n chapterNo={idx + 1}\n onChapterItemClick={handleChapterToggled}\n showChapterTags\n />\n );\n })}\n </FlexView>\n </>\n )}\n </Styled.ChaptersListWrapper>\n );\n});\n\nexport default ChaptersList;\n"],"names":["getCanAddChapter","isGoalCreation","isSchoolSuccess","flow","chapter","ChaptersList","memo","props","formData","isProcessing","onFormDataChange","testType","primaryChaptersList","chapterGoalCategory","primaryGoalCategory","useContext","MilestoneCreateContext","recommendedChaptersList","customChaptersList","computeRecommendedNCustomChapters","handleChapterToggled","useCallback","chapterId","ch","updatedChaptersList","jsx","Styled.ChaptersListWrapper","AppLoader","jsxs","FlexView","Text","idx","canAddChapter","ChapterItemV2","Fragment","Seperator"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function
|
|
2
|
-
const e =
|
|
1
|
+
function d(t = 1) {
|
|
2
|
+
const e = document.body.clientWidth, i = document.body.clientHeight;
|
|
3
3
|
return {
|
|
4
4
|
gutter: 16 * t,
|
|
5
5
|
deviceWidth: e,
|
|
@@ -7,6 +7,6 @@ function n(t = 1) {
|
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
d as default
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sources":["../../../../src/features/ui/theme/layout.ts"],"sourcesContent":["import type { ILayout } from '../types';\n\nfunction getLayout(multiplier: number = 1): ILayout {\n const width =
|
|
1
|
+
{"version":3,"file":"layout.js","sources":["../../../../src/features/ui/theme/layout.ts"],"sourcesContent":["import type { ILayout } from '../types';\n\nfunction getLayout(multiplier: number = 1): ILayout {\n const width = document.body.clientWidth;\n const height = document.body.clientHeight;\n\n return {\n gutter: 16 * multiplier,\n deviceWidth: width,\n deviceHeight: height,\n };\n}\n\nexport default getLayout;\n"],"names":["getLayout","multiplier","width","height"],"mappings":"AAEA,SAASA,EAAUC,IAAqB,GAAY;AAC5C,QAAAC,IAAQ,SAAS,KAAK,aACtBC,IAAS,SAAS,KAAK;AAEtB,SAAA;AAAA,IACL,QAAQ,KAAKF;AAAA,IACb,aAAaC;AAAA,IACb,cAAcC;AAAA,EAAA;AAElB;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/regex.js"],"sourcesContent":["export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;"],"names":["REGEX"],"mappings":"AAAA,MAAAA,IAAe;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const e = new Uint8Array(16);
|
|
1
|
+
var t, e = new Uint8Array(16);
|
|
3
2
|
function o() {
|
|
4
|
-
if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !t))
|
|
3
|
+
if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !t))
|
|
5
4
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
6
5
|
return t(e);
|
|
7
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rng.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\
|
|
1
|
+
{"version":3,"file":"rng.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}"],"names":["getRandomValues","rnds8","rng"],"mappings":"AAGA,IAAIA,GACAC,IAAQ,IAAI,WAAW,EAAE;AACd,SAASC,IAAM;AAE5B,MAAI,CAACF,MAGHA,IAAkB,OAAO,SAAW,OAAe,OAAO,mBAAmB,OAAO,gBAAgB,KAAK,MAAM,KAAK,OAAO,WAAa,OAAe,OAAO,SAAS,mBAAoB,cAAc,SAAS,gBAAgB,KAAK,QAAQ,GAE3O,CAACA;AACH,UAAM,IAAI,MAAM,0GAA0G;AAI9H,SAAOA,EAAgBC,CAAK;AAC9B;","x_google_ignoreList":[0]}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import s from "./validate.js";
|
|
2
|
+
var t = [];
|
|
3
|
+
for (var n = 0; n < 256; ++n)
|
|
4
|
+
t.push((n + 256).toString(16).substr(1));
|
|
5
|
+
function f(e) {
|
|
6
|
+
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, o = (t[e[i + 0]] + t[e[i + 1]] + t[e[i + 2]] + t[e[i + 3]] + "-" + t[e[i + 4]] + t[e[i + 5]] + "-" + t[e[i + 6]] + t[e[i + 7]] + "-" + t[e[i + 8]] + t[e[i + 9]] + "-" + t[e[i + 10]] + t[e[i + 11]] + t[e[i + 12]] + t[e[i + 13]] + t[e[i + 14]] + t[e[i + 15]]).toLowerCase();
|
|
7
|
+
if (!s(o))
|
|
8
|
+
throw TypeError("Stringified UUID is invalid");
|
|
9
|
+
return o;
|
|
6
10
|
}
|
|
7
11
|
export {
|
|
8
|
-
|
|
12
|
+
f as default
|
|
9
13
|
};
|
|
10
14
|
//# sourceMappingURL=stringify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringify.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/stringify.js"],"sourcesContent":["import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\
|
|
1
|
+
{"version":3,"file":"stringify.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/stringify.js"],"sourcesContent":["import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;"],"names":["byteToHex","i","stringify","arr","offset","uuid","validate"],"mappings":";AAMA,IAAIA,IAAY,CAAA;AAEhB,SAASC,IAAI,GAAGA,IAAI,KAAK,EAAEA;AACzB,EAAAD,EAAU,MAAMC,IAAI,KAAO,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;AAGnD,SAASC,EAAUC,GAAK;AACtB,MAAIC,IAAS,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAY,UAAU,CAAC,IAAI,GAG7EC,KAAQL,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,GAAG;AAMzf,MAAI,CAACE,EAASD,CAAI;AAChB,UAAM,UAAU,6BAA6B;AAG/C,SAAOA;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
function g(n, m, t) {
|
|
5
|
-
if (e.randomUUID && !m && !n)
|
|
6
|
-
return e.randomUUID();
|
|
1
|
+
import d from "./rng.js";
|
|
2
|
+
import f from "./stringify.js";
|
|
3
|
+
function v(n, m, x) {
|
|
7
4
|
n = n || {};
|
|
8
|
-
|
|
5
|
+
var r = n.random || (n.rng || d)();
|
|
9
6
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, m) {
|
|
10
|
-
|
|
11
|
-
for (
|
|
12
|
-
m[
|
|
7
|
+
x = x || 0;
|
|
8
|
+
for (var a = 0; a < 16; ++a)
|
|
9
|
+
m[x + a] = r[a];
|
|
13
10
|
return m;
|
|
14
11
|
}
|
|
15
|
-
return
|
|
12
|
+
return f(r);
|
|
16
13
|
}
|
|
17
14
|
export {
|
|
18
|
-
|
|
15
|
+
v as default
|
|
19
16
|
};
|
|
20
17
|
//# sourceMappingURL=v4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v4.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"v4.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;"],"names":["v4","options","buf","offset","rnds","rng","i","stringify"],"mappings":";;AAGA,SAASA,EAAGC,GAASC,GAAKC,GAAQ;AAChC,EAAAF,IAAUA,KAAW;AACrB,MAAIG,IAAOH,EAAQ,WAAWA,EAAQ,OAAOI;AAK7C,MAHAD,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,IAC3BA,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,KAEvBF,GAAK;AACP,IAAAC,IAASA,KAAU;AAEnB,aAASG,IAAI,GAAGA,IAAI,IAAI,EAAEA;AACxB,MAAAJ,EAAIC,IAASG,CAAC,IAAIF,EAAKE,CAAC;AAG1B,WAAOJ;AAAA,EACR;AAED,SAAOK,EAAUH,CAAI;AACvB;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/validate.js"],"sourcesContent":["import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;"],"names":["validate","uuid","REGEX"],"mappings":";AAEA,SAASA,EAASC,GAAM;AACtB,SAAO,OAAOA,KAAS,YAAYC,EAAM,KAAKD,CAAI;AACpD;","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"native.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/native.js"],"sourcesContent":["const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};"],"names":["randomUUID","native"],"mappings":"AAAA,MAAMA,IAAa,OAAO,SAAW,OAAe,OAAO,cAAc,OAAO,WAAW,KAAK,MAAM,GACvFC,IAAA;AAAA,EACb,YAAAD;AACF;","x_google_ignoreList":[0]}
|