@federball/components 0.0.33 → 0.0.35
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/chips/OrganizationChip.d.ts +6 -0
- package/dist/chips/OrganizationChip.d.ts.map +1 -0
- package/dist/chips/OrganizationChip.js +7 -0
- package/dist/chips/OrganizationChip.js.map +1 -0
- package/dist/chips/index.d.ts +2 -1
- package/dist/chips/index.d.ts.map +1 -1
- package/dist/chips/index.js +2 -1
- package/dist/chips/index.js.map +1 -1
- package/dist/fields/AccountNameField.d.ts +3 -5
- package/dist/fields/AccountNameField.d.ts.map +1 -1
- package/dist/fields/AccountNameField.js +8 -3
- package/dist/fields/AccountNameField.js.map +1 -1
- package/dist/fields/CourtNumberField.d.ts +3 -5
- package/dist/fields/CourtNumberField.d.ts.map +1 -1
- package/dist/fields/CourtNumberField.js +8 -3
- package/dist/fields/CourtNumberField.js.map +1 -1
- package/dist/fields/DomainField.d.ts +3 -5
- package/dist/fields/DomainField.d.ts.map +1 -1
- package/dist/fields/DomainField.js +8 -3
- package/dist/fields/DomainField.js.map +1 -1
- package/dist/fields/DrawNameField.d.ts +3 -5
- package/dist/fields/DrawNameField.d.ts.map +1 -1
- package/dist/fields/DrawNameField.js +8 -3
- package/dist/fields/DrawNameField.js.map +1 -1
- package/dist/fields/DrawTypeField.d.ts +3 -5
- package/dist/fields/DrawTypeField.d.ts.map +1 -1
- package/dist/fields/DrawTypeField.js +26 -2
- package/dist/fields/DrawTypeField.js.map +1 -1
- package/dist/fields/EventNameField.d.ts +3 -5
- package/dist/fields/EventNameField.d.ts.map +1 -1
- package/dist/fields/EventNameField.js +8 -3
- package/dist/fields/EventNameField.js.map +1 -1
- package/dist/fields/EventTypeField.d.ts +3 -5
- package/dist/fields/EventTypeField.d.ts.map +1 -1
- package/dist/fields/EventTypeField.js +26 -3
- package/dist/fields/EventTypeField.js.map +1 -1
- package/dist/fields/FieldProps.d.ts +18 -0
- package/dist/fields/FieldProps.d.ts.map +1 -0
- package/dist/fields/FieldProps.js +2 -0
- package/dist/fields/FieldProps.js.map +1 -0
- package/dist/fields/IdentifierField.d.ts +3 -5
- package/dist/fields/IdentifierField.d.ts.map +1 -1
- package/dist/fields/IdentifierField.js +8 -3
- package/dist/fields/IdentifierField.js.map +1 -1
- package/dist/fields/MailField.d.ts +3 -5
- package/dist/fields/MailField.d.ts.map +1 -1
- package/dist/fields/MailField.js +8 -3
- package/dist/fields/MailField.js.map +1 -1
- package/dist/fields/OrganizationNameField.d.ts +3 -5
- package/dist/fields/OrganizationNameField.d.ts.map +1 -1
- package/dist/fields/OrganizationNameField.js +8 -3
- package/dist/fields/OrganizationNameField.js.map +1 -1
- package/dist/fields/ScoringSystemField.d.ts +3 -5
- package/dist/fields/ScoringSystemField.d.ts.map +1 -1
- package/dist/fields/ScoringSystemField.js +26 -2
- package/dist/fields/ScoringSystemField.js.map +1 -1
- package/dist/fields/TournamentNameField.d.ts +3 -5
- package/dist/fields/TournamentNameField.d.ts.map +1 -1
- package/dist/fields/TournamentNameField.js +8 -3
- package/dist/fields/TournamentNameField.js.map +1 -1
- package/dist/fields/index.d.ts +1 -0
- package/dist/fields/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationChip.d.ts","sourceRoot":"","sources":["../../src/chips/OrganizationChip.tsx"],"names":[],"mappings":"AAGA,KAAK,qBAAqB,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,kBAAkB,qBAAqB,4CAOvE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Chip } from "@heroui/react";
|
|
3
|
+
import { OrganizationIcon } from "../icons/OrganizationIcon";
|
|
4
|
+
export const OrganizationChip = ({ organization }) => {
|
|
5
|
+
return (_jsxs(Chip, { variant: "secondary", size: "lg", children: [_jsx(OrganizationIcon, { size: "sm" }), _jsx(Chip.Label, { children: organization })] }));
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=OrganizationChip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationChip.js","sourceRoot":"","sources":["../../src/chips/OrganizationChip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAM7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,YAAY,EAAyB,EAAE,EAAE;IAC3E,OAAO,CACN,MAAC,IAAI,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,IAAI,aAClC,KAAC,gBAAgB,IAAC,IAAI,EAAC,IAAI,GAAG,EAC9B,KAAC,IAAI,CAAC,KAAK,cAAE,YAAY,GAAc,IACjC,CACP,CAAC;AACH,CAAC,CAAC"}
|
package/dist/chips/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { InvitationStatusChip } from "./InvitationStatusChip";
|
|
|
14
14
|
import { LocationChip } from "./LocationChip";
|
|
15
15
|
import { LoginProviderChip } from "./LoginProviderChip";
|
|
16
16
|
import { MailChip } from "./MailChip";
|
|
17
|
+
import { OrganizationChip } from "./OrganizationChip";
|
|
17
18
|
import { PlayerChip } from "./PlayerChip";
|
|
18
19
|
import { PlayerIdentifierChip } from "./PlayerIdentifierChip";
|
|
19
20
|
import { RankingPositionChip } from "./RankingPositionChip";
|
|
@@ -21,5 +22,5 @@ import { ScoringSystemChip } from "./ScoringSystemChip";
|
|
|
21
22
|
import { TournamentChip } from "./TournamentChip";
|
|
22
23
|
import { TournamentCodeChip } from "./TournamentCodeChip";
|
|
23
24
|
import { UserTypeChip } from "./UserTypeChip";
|
|
24
|
-
export { AvailableChip, BadmintonChip, ClubChip, CourtChip, DateChip, DrawChip, DrawTypeChip, EntryStatusChip, EventChip, EventTypeChip, GameStageChip, GameStatusChip, InvitationStatusChip, LocationChip, LoginProviderChip, MailChip, PlayerChip, PlayerIdentifierChip, RankingPositionChip, ScoringSystemChip, TournamentChip, TournamentCodeChip, UserTypeChip, };
|
|
25
|
+
export { AvailableChip, BadmintonChip, ClubChip, CourtChip, DateChip, DrawChip, DrawTypeChip, EntryStatusChip, EventChip, EventTypeChip, GameStageChip, GameStatusChip, InvitationStatusChip, LocationChip, LoginProviderChip, MailChip, OrganizationChip, PlayerChip, PlayerIdentifierChip, RankingPositionChip, ScoringSystemChip, TournamentChip, TournamentCodeChip, UserTypeChip, };
|
|
25
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chips/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAg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ip } from "./InvitationStatusChip";
|
|
|
14
14
|
import { LocationChip } from "./LocationChip";
|
|
15
15
|
import { LoginProviderChip } from "./LoginProviderChip";
|
|
16
16
|
import { MailChip } from "./MailChip";
|
|
17
|
+
import { OrganizationChip } from "./OrganizationChip";
|
|
17
18
|
import { PlayerChip } from "./PlayerChip";
|
|
18
19
|
import { PlayerIdentifierChip } from "./PlayerIdentifierChip";
|
|
19
20
|
import { RankingPositionChip } from "./RankingPositionChip";
|
|
@@ -21,5 +22,5 @@ import { ScoringSystemChip } from "./ScoringSystemChip";
|
|
|
21
22
|
import { TournamentChip } from "./TournamentChip";
|
|
22
23
|
import { TournamentCodeChip } from "./TournamentCodeChip";
|
|
23
24
|
import { UserTypeChip } from "./UserTypeChip";
|
|
24
|
-
export { AvailableChip, BadmintonChip, ClubChip, CourtChip, DateChip, DrawChip, DrawTypeChip, EntryStatusChip, EventChip, EventTypeChip, GameStageChip, GameStatusChip, InvitationStatusChip, LocationChip, LoginProviderChip, MailChip, PlayerChip, PlayerIdentifierChip, RankingPositionChip, ScoringSystemChip, TournamentChip, TournamentCodeChip, UserTypeChip, };
|
|
25
|
+
export { AvailableChip, BadmintonChip, ClubChip, CourtChip, DateChip, DrawChip, DrawTypeChip, EntryStatusChip, EventChip, EventTypeChip, GameStageChip, GameStatusChip, InvitationStatusChip, LocationChip, LoginProviderChip, MailChip, OrganizationChip, PlayerChip, PlayerIdentifierChip, RankingPositionChip, ScoringSystemChip, TournamentChip, TournamentCodeChip, UserTypeChip, };
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
package/dist/chips/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/chips/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,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qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EACN,aAAa,EACb,aAAa,EACb,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,SAAS,EACT,aAAa,EACb,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,YAAY,GACZ,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const AccountNameField: ({ name, isReadonly, }: AccountNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { FieldProps } from "./FieldProps";
|
|
2
|
+
type AccountNameFieldProps = FieldProps<string>;
|
|
3
|
+
export declare const AccountNameField: (props: AccountNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=AccountNameField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountNameField.d.ts","sourceRoot":"","sources":["../../src/fields/AccountNameField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AccountNameField.d.ts","sourceRoot":"","sources":["../../src/fields/AccountNameField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,qBAAqB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEhD,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,4CAqC5D,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { Labels } from "../labels";
|
|
4
4
|
import { AccountIcon } from "../icons/AccountIcon";
|
|
5
|
-
export const AccountNameField = (
|
|
6
|
-
|
|
5
|
+
export const AccountNameField = (props) => {
|
|
6
|
+
const { description, isReadonly, value } = props;
|
|
7
|
+
if (isReadonly) {
|
|
8
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(AccountIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value })] }), description && _jsx(Description, { children: description })] }));
|
|
9
|
+
}
|
|
10
|
+
const { placeholder, setValue } = props;
|
|
11
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(AccountIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value, placeholder: placeholder, onChange: (event) => setValue(event.target.value) })] }), _jsx(Description, { children: description })] }));
|
|
7
12
|
};
|
|
8
13
|
//# sourceMappingURL=AccountNameField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountNameField.js","sourceRoot":"","sources":["../../src/fields/AccountNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"AccountNameField.js","sourceRoot":"","sources":["../../src/fields/AccountNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,M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7 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const CourtNumberField: ({ courts, isReadonly, }: CourtNumberFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { FieldProps } from "./FieldProps";
|
|
2
|
+
type CourtNumberFieldProps = FieldProps<string>;
|
|
3
|
+
export declare const CourtNumberField: (props: CourtNumberFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=CourtNumberField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CourtNumberField.d.ts","sourceRoot":"","sources":["../../src/fields/CourtNumberField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CourtNumberField.d.ts","sourceRoot":"","sources":["../../src/fields/CourtNumberField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,qBAAqB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEhD,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,4CAqC5D,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { Labels } from "../labels";
|
|
4
4
|
import { CourtIcon } from "../icons/CourtIcon";
|
|
5
|
-
export const CourtNumberField = (
|
|
6
|
-
|
|
5
|
+
export const CourtNumberField = (props) => {
|
|
6
|
+
const { description, isReadonly, value } = props;
|
|
7
|
+
if (isReadonly) {
|
|
8
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.COURTS }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(CourtIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.COURTS, value: value })] }), description && _jsx(Description, { children: description })] }));
|
|
9
|
+
}
|
|
10
|
+
const { placeholder, setValue } = props;
|
|
11
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.COURTS }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(CourtIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.COURTS, value: value, placeholder: placeholder, onChange: (event) => setValue(event.target.value) })] }), _jsx(Description, { children: description })] }));
|
|
7
12
|
};
|
|
8
13
|
//# sourceMappingURL=CourtNumberField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CourtNumberField.js","sourceRoot":"","sources":["../../src/fields/CourtNumberField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"CourtNumberField.js","sourceRoot":"","sources":["../../src/fields/CourtNumberField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IAChE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEjD,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,UAAU,mBACpD,KAAC,KAAK,cAAE,MAAM,CAAC,MAAM,GAAS,EAC9B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,SAAS,KAAG,GACM,EACpB,KAAC,UAAU,CAAC,KAAK,kBAAa,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,GAAI,IACjD,EACZ,WAAW,IAAI,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7C,CACZ,CAAC;IACH,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACzC,KAAC,KAAK,cAAE,MAAM,CAAC,MAAM,GAAS,EAC9B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,SAAS,KAAG,GACM,EACpB,KAAC,UAAU,CAAC,KAAK,kBACJ,MAAM,CAAC,MAAM,EACzB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAChD,IACU,EACb,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7B,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const DomainField: ({ domain, isReadonly, }: DomainFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { FieldProps } from "./FieldProps";
|
|
2
|
+
type DomainFieldProps = FieldProps<string>;
|
|
3
|
+
export declare const DomainField: (props: DomainFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=DomainField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainField.d.ts","sourceRoot":"","sources":["../../src/fields/DomainField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DomainField.d.ts","sourceRoot":"","sources":["../../src/fields/DomainField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAE3C,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CAqClD,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { Labels } from "../labels";
|
|
4
4
|
import { DomainIcon } from "../icons/DomainIcon";
|
|
5
|
-
export const DomainField = (
|
|
6
|
-
|
|
5
|
+
export const DomainField = (props) => {
|
|
6
|
+
const { description, isReadonly, value } = props;
|
|
7
|
+
if (isReadonly) {
|
|
8
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.DOMAIN }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(DomainIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.DOMAIN, value: value })] }), description && _jsx(Description, { children: description })] }));
|
|
9
|
+
}
|
|
10
|
+
const { placeholder, setValue } = props;
|
|
11
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.DOMAIN }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(DomainIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.DOMAIN, value: value, placeholder: placeholder, onChange: (event) => setValue(event.target.value) })] }), _jsx(Description, { children: description })] }));
|
|
7
12
|
};
|
|
8
13
|
//# sourceMappingURL=DomainField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainField.js","sourceRoot":"","sources":["../../src/fields/DomainField.tsx"],"names":[],"mappings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K,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAChD,IACU,EACb,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7B,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const DrawNameField: ({ name, isReadonly, }: DrawNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { FieldProps } from "./FieldProps";
|
|
2
|
+
type DrawNameFieldProps = FieldProps<string>;
|
|
3
|
+
export declare const DrawNameField: (props: DrawNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=DrawNameField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawNameField.d.ts","sourceRoot":"","sources":["../../src/fields/DrawNameField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawNameField.d.ts","sourceRoot":"","sources":["../../src/fields/DrawNameField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,kBAAkB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAE7C,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,4CAqCtD,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { Labels } from "../labels";
|
|
4
4
|
import { DrawIcon } from "../icons/DrawIcon";
|
|
5
|
-
export const DrawNameField = (
|
|
6
|
-
|
|
5
|
+
export const DrawNameField = (props) => {
|
|
6
|
+
const { description, isReadonly, value } = props;
|
|
7
|
+
if (isReadonly) {
|
|
8
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(DrawIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value })] }), description && _jsx(Description, { children: description })] }));
|
|
9
|
+
}
|
|
10
|
+
const { placeholder, setValue } = props;
|
|
11
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(DrawIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value, placeholder: placeholder, onChange: (event) => setValue(event.target.value) })] }), _jsx(Description, { children: description })] }));
|
|
7
12
|
};
|
|
8
13
|
//# sourceMappingURL=DrawNameField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawNameField.js","sourceRoot":"","sources":["../../src/fields/DrawNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"DrawNameField.js","sourceRoot":"","sources":["../../src/fields/DrawNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IAC1D,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEjD,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,UAAU,mBACpD,KAAC,KAAK,cAAE,MAAM,CAAC,IAAI,GAAS,EAC5B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,QAAQ,KAAG,GACO,EACpB,KAAC,UAAU,CAAC,KAAK,kBAAa,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,IAC/C,EACZ,WAAW,IAAI,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7C,CACZ,CAAC;IACH,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACzC,KAAC,KAAK,cAAE,MAAM,CAAC,IAAI,GAAS,EAC5B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,QAAQ,KAAG,GACO,EACpB,KAAC,UAAU,CAAC,KAAK,kBACJ,MAAM,CAAC,IAAI,EACvB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAChD,IACU,EACb,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7B,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { DrawType } from "@federball/types";
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export declare const DrawTypeField: ({ type, isReadonly, }: DrawTypeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
import type { FieldProps } from "./FieldProps";
|
|
3
|
+
type DrawTypeFieldProps = FieldProps<DrawType>;
|
|
4
|
+
export declare const DrawTypeField: (props: DrawTypeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export {};
|
|
8
6
|
//# sourceMappingURL=DrawTypeField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawTypeField.d.ts","sourceRoot":"","sources":["../../src/fields/DrawTypeField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"DrawTypeField.d.ts","sourceRoot":"","sources":["../../src/fields/DrawTypeField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,kBAAkB,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;AAqB/C,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,4CAiDtD,CAAC"}
|
|
@@ -3,7 +3,31 @@ import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
|
3
3
|
import { getLabelForDrawType, Labels } from "../labels";
|
|
4
4
|
import { DrawTypeIcon } from "../icons/DrawTypeIcon";
|
|
5
5
|
import { getDescriptionForDrawType } from "../descriptions";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const isDrawType = (value) => value === "GROUP" || value === "KNOCKOUT";
|
|
7
|
+
const parseDrawType = (value) => {
|
|
8
|
+
if (isDrawType(value)) {
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
if (value === getLabelForDrawType("GROUP")) {
|
|
12
|
+
return "GROUP";
|
|
13
|
+
}
|
|
14
|
+
if (value === getLabelForDrawType("KNOCKOUT")) {
|
|
15
|
+
return "KNOCKOUT";
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
};
|
|
19
|
+
export const DrawTypeField = (props) => {
|
|
20
|
+
const { description, isReadonly, value } = props;
|
|
21
|
+
if (isReadonly) {
|
|
22
|
+
const resolvedDescription = description ?? getDescriptionForDrawType(value);
|
|
23
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.DRAW_TYPE }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(DrawTypeIcon, { type: value }) }), _jsx(InputGroup.Input, { "aria-label": Labels.DRAW_TYPE, value: getLabelForDrawType(value) })] }), resolvedDescription && (_jsx(Description, { children: resolvedDescription }))] }));
|
|
24
|
+
}
|
|
25
|
+
const { placeholder, setValue } = props;
|
|
26
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.DRAW_TYPE }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(DrawTypeIcon, { type: value }) }), _jsx(InputGroup.Input, { "aria-label": Labels.DRAW_TYPE, value: getLabelForDrawType(value), placeholder: placeholder, onChange: (event) => {
|
|
27
|
+
const nextValue = parseDrawType(event.target.value);
|
|
28
|
+
if (nextValue) {
|
|
29
|
+
setValue(nextValue);
|
|
30
|
+
}
|
|
31
|
+
} })] }), _jsx(Description, { children: description })] }));
|
|
8
32
|
};
|
|
9
33
|
//# sourceMappingURL=DrawTypeField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawTypeField.js","sourceRoot":"","sources":["../../src/fields/DrawTypeField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DrawTypeField.js","sourceRoot":"","sources":["../../src/fields/DrawTypeField.tsx"],"names":[],"mapp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,KAAK,kBACJ,MAAM,CAAC,SAAS,EAC5B,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAChC,IACU,EACZ,mBAAmB,IAAI,CACvB,KAAC,WAAW,cAAE,mBAAmB,GAAe,CAChD,IACU,CACZ,CAAC;IACH,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACzC,KAAC,KAAK,cAAE,MAAM,CAAC,SAAS,GAAS,EACjC,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,YAAY,IAAC,IAAI,EAAE,KAAK,GAAI,GACV,EACpB,KAAC,UAAU,CAAC,KAAK,kBACJ,MAAM,CAAC,SAAS,EAC5B,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,EACjC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;4BACnB,MAAM,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;4BACpD,IAAI,SAAS,EAAE,CAAC;gCACf,QAAQ,CAAC,SAAS,CAAC,CAAC;4BACrB,CAAC;wBACF,CAAC,GACA,IACU,EACb,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7B,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const EventNameField: ({ name, isReadonly, }: EventNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { FieldProps } from "./FieldProps";
|
|
2
|
+
type EventNameFieldProps = FieldProps<string>;
|
|
3
|
+
export declare const EventNameField: (props: EventNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=EventNameField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventNameField.d.ts","sourceRoot":"","sources":["../../src/fields/EventNameField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EventNameField.d.ts","sourceRoot":"","sources":["../../src/fields/EventNameField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,mBAAmB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAE9C,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,4CAqCxD,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { Labels } from "../labels";
|
|
4
4
|
import { EventIcon } from "../icons/EventIcon";
|
|
5
|
-
export const EventNameField = (
|
|
6
|
-
|
|
5
|
+
export const EventNameField = (props) => {
|
|
6
|
+
const { description, isReadonly, value } = props;
|
|
7
|
+
if (isReadonly) {
|
|
8
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(EventIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value })] }), description && _jsx(Description, { children: description })] }));
|
|
9
|
+
}
|
|
10
|
+
const { placeholder, setValue } = props;
|
|
11
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(EventIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value, placeholder: placeholder, onChange: (event) => setValue(event.target.value) })] }), _jsx(Description, { children: description })] }));
|
|
7
12
|
};
|
|
8
13
|
//# sourceMappingURL=EventNameField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventNameField.js","sourceRoot":"","sources":["../../src/fields/EventNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"EventNameField.js","sourceRoot":"","sources":["../../src/fields/EventNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK/C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;IAC5D,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEjD,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,UAAU,mBACpD,KAAC,KAAK,cAAE,MAAM,CAAC,IAAI,GAAS,EAC5B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,SAAS,KAAG,GACM,EACpB,KAAC,UAAU,CAAC,KAAK,kBAAa,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,IAC/C,EACZ,WAAW,IAAI,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7C,CACZ,CAAC;IACH,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACzC,KAAC,KAAK,cAAE,MAAM,CAAC,IAAI,GAAS,EAC5B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,SAAS,KAAG,GACM,EACpB,KAAC,UAAU,CAAC,KAAK,kBACJ,MAAM,CAAC,IAAI,EACvB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAChD,IACU,EACb,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7B,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { EventType } from "@federball/types";
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export declare const EventTypeField: ({ type, isReadonly, }: EventTypeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
import type { FieldProps } from "./FieldProps";
|
|
3
|
+
type EventTypeFieldProps = FieldProps<EventType>;
|
|
4
|
+
export declare const EventTypeField: (props: EventTypeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export {};
|
|
8
6
|
//# sourceMappingURL=EventTypeField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventTypeField.d.ts","sourceRoot":"","sources":["../../src/fields/EventTypeField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"EventTypeField.d.ts","sourceRoot":"","sources":["../../src/fields/EventTypeField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,mBAAmB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAqBjD,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,4CA6CxD,CAAC"}
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { getLabelForEventType, Labels } from "../labels";
|
|
4
4
|
import { EventTypeIcon } from "../icons/EventTypeIcon";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const isEventType = (value) => value === "SINGLES" || value === "DOUBLES";
|
|
6
|
+
const parseEventType = (value) => {
|
|
7
|
+
if (isEventType(value)) {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
if (value === getLabelForEventType("SINGLES")) {
|
|
11
|
+
return "SINGLES";
|
|
12
|
+
}
|
|
13
|
+
if (value === getLabelForEventType("DOUBLES")) {
|
|
14
|
+
return "DOUBLES";
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
};
|
|
18
|
+
export const EventTypeField = (props) => {
|
|
19
|
+
const { description, isReadonly, value } = props;
|
|
20
|
+
if (isReadonly) {
|
|
21
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.EVENT_TYPE }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(EventTypeIcon, { type: value }) }), _jsx(InputGroup.Input, { "aria-label": Labels.EVENT_TYPE, value: getLabelForEventType(value) })] }), description && _jsx(Description, { children: description })] }));
|
|
22
|
+
}
|
|
23
|
+
const { placeholder, setValue } = props;
|
|
24
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.EVENT_TYPE }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(EventTypeIcon, { type: value }) }), _jsx(InputGroup.Input, { "aria-label": Labels.EVENT_TYPE, value: getLabelForEventType(value), placeholder: placeholder, onChange: (event) => {
|
|
25
|
+
const nextValue = parseEventType(event.target.value);
|
|
26
|
+
if (nextValue) {
|
|
27
|
+
setValue(nextValue);
|
|
28
|
+
}
|
|
29
|
+
} })] }), _jsx(Description, { children: description })] }));
|
|
7
30
|
};
|
|
8
31
|
//# sourceMappingURL=EventTypeField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventTypeField.js","sourceRoot":"","sources":["../../src/fields/EventTypeField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"EventTypeField.js","sourceRoot":"","sources":["../../src/fields/EventTypeField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAKvD,MAAM,WAAW,GAAG,CAAC,KAAa,EAAsB,EAAE,CACzD,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,CAAC;AAE5C,MAAM,cAAc,GAAG,CAAC,KAAa,EAAyB,EAAE;IAC/D,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAI,KAAK,KAAK,oBAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,IAAI,KAAK,KAAK,oBAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;IAC5D,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,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ispatch, SetStateAction } from "react";
|
|
2
|
+
type SharedFieldProps<T> = {
|
|
3
|
+
value: T;
|
|
4
|
+
};
|
|
5
|
+
type EditableFieldProps<T> = SharedFieldProps<T> & {
|
|
6
|
+
isReadonly?: false;
|
|
7
|
+
setValue: Dispatch<SetStateAction<T>>;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
type ReadonlyFieldProps<T> = SharedFieldProps<T> & {
|
|
12
|
+
isReadonly: true;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
};
|
|
16
|
+
export type FieldProps<T> = EditableFieldProps<T> | ReadonlyFieldProps<T>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=FieldProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldProps.d.ts","sourceRoot":"","sources":["../../src/fields/FieldProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtD,KAAK,gBAAgB,CAAC,CAAC,IAAI;IAC1B,KAAK,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,KAAK,kBAAkB,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAClD,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,kBAAkB,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAClD,UAAU,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldProps.js","sourceRoot":"","sources":["../../src/fields/FieldProps.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const IdentifierField: ({ identifier, isReadonly, }: IdentifierFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { FieldProps } from "./FieldProps";
|
|
2
|
+
type IdentifierFieldProps = FieldProps<string>;
|
|
3
|
+
export declare const IdentifierField: (props: IdentifierFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=IdentifierField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentifierField.d.ts","sourceRoot":"","sources":["../../src/fields/IdentifierField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentifierField.d.ts","sourceRoot":"","sources":["../../src/fields/IdentifierField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,oBAAoB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAE/C,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,4CAqC1D,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { Labels } from "../labels";
|
|
4
4
|
import { IdentifierIcon } from "../icons/IdentifierIcon";
|
|
5
|
-
export const IdentifierField = (
|
|
6
|
-
|
|
5
|
+
export const IdentifierField = (props) => {
|
|
6
|
+
const { description, isReadonly, value } = props;
|
|
7
|
+
if (isReadonly) {
|
|
8
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.IDENTIFIER }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(IdentifierIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.IDENTIFIER, value: value })] }), description && _jsx(Description, { children: description })] }));
|
|
9
|
+
}
|
|
10
|
+
const { placeholder, setValue } = props;
|
|
11
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.IDENTIFIER }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(IdentifierIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.IDENTIFIER, value: value, placeholder: placeholder, onChange: (event) => setValue(event.target.value) })] }), _jsx(Description, { children: description })] }));
|
|
7
12
|
};
|
|
8
13
|
//# sourceMappingURL=IdentifierField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentifierField.js","sourceRoot":"","sources":["../../src/fields/IdentifierField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"IdentifierField.js","sourceRoot":"","sources":["../../src/fields/IdentifierField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAKzD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAE,EAAE;IAC9D,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEjD,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,UAAU,mBACpD,KAAC,KAAK,cAAE,MAAM,CAAC,UAAU,GAAS,EAClC,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,cAAc,KAAG,GACC,EACpB,KAAC,UAAU,CAAC,KAAK,kBAAa,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,GAAI,IACrD,EACZ,WAAW,IAAI,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7C,CACZ,CAAC;IACH,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACzC,KAAC,KAAK,cAAE,MAAM,CAAC,UAAU,GAAS,EAClC,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,cAAc,KAAG,GACC,EACpB,KAAC,UAAU,CAAC,KAAK,kBACJ,MAAM,CAAC,UAAU,EAC7B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAChD,IACU,EACb,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7B,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const MailField: ({ email, isReadonly }: MailFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { FieldProps } from "./FieldProps";
|
|
2
|
+
type MailFieldProps = FieldProps<string>;
|
|
3
|
+
export declare const MailField: (props: MailFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=MailField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MailField.d.ts","sourceRoot":"","sources":["../../src/fields/MailField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MailField.d.ts","sourceRoot":"","sources":["../../src/fields/MailField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEzC,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,4CAqC9C,CAAC"}
|
package/dist/fields/MailField.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { Labels } from "../labels";
|
|
4
4
|
import { MailIcon } from "../icons/MailIcon";
|
|
5
|
-
export const MailField = (
|
|
6
|
-
|
|
5
|
+
export const MailField = (props) => {
|
|
6
|
+
const { description, isReadonly, value } = props;
|
|
7
|
+
if (isReadonly) {
|
|
8
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.MAIL }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(MailIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.MAIL, value: value })] }), description && _jsx(Description, { children: description })] }));
|
|
9
|
+
}
|
|
10
|
+
const { placeholder, setValue } = props;
|
|
11
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.MAIL }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(MailIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.MAIL, value: value, placeholder: placeholder, onChange: (event) => setValue(event.target.value) })] }), _jsx(Description, { children: description })] }));
|
|
7
12
|
};
|
|
8
13
|
//# sourceMappingURL=MailField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MailField.js","sourceRoot":"","sources":["../../src/fields/MailField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"MailField.js","sourceRoot":"","sources":["../../src/fields/MailField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAClD,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEjD,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,UAAU,mBACpD,KAAC,KAAK,cAAE,MAAM,CAAC,IAAI,GAAS,EAC5B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,QAAQ,KAAG,GACO,EACpB,KAAC,UAAU,CAAC,KAAK,kBAAa,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,IAC/C,EACZ,WAAW,IAAI,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7C,CACZ,CAAC;IACH,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACzC,KAAC,KAAK,cAAE,MAAM,CAAC,IAAI,GAAS,EAC5B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,QAAQ,KAAG,GACO,EACpB,KAAC,UAAU,CAAC,KAAK,kBACJ,MAAM,CAAC,IAAI,EACvB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAChD,IACU,EACb,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7B,CACZ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const OrganizationNameField: ({ name, isReadonly, }: OrganizationNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { FieldProps } from "./FieldProps";
|
|
2
|
+
type OrganizationNameFieldProps = FieldProps<string>;
|
|
3
|
+
export declare const OrganizationNameField: (props: OrganizationNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=OrganizationNameField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationNameField.d.ts","sourceRoot":"","sources":["../../src/fields/OrganizationNameField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OrganizationNameField.d.ts","sourceRoot":"","sources":["../../src/fields/OrganizationNameField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,0BAA0B,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAErD,eAAO,MAAM,qBAAqB,GAAI,OAAO,0BAA0B,4CAqCtE,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { Labels } from "../labels";
|
|
4
4
|
import { OrganizationIcon } from "../icons/OrganizationIcon";
|
|
5
|
-
export const OrganizationNameField = (
|
|
6
|
-
|
|
5
|
+
export const OrganizationNameField = (props) => {
|
|
6
|
+
const { description, isReadonly, value } = props;
|
|
7
|
+
if (isReadonly) {
|
|
8
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(OrganizationIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value })] }), description && _jsx(Description, { children: description })] }));
|
|
9
|
+
}
|
|
10
|
+
const { placeholder, setValue } = props;
|
|
11
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(OrganizationIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value, placeholder: placeholder, onChange: (event) => setValue(event.target.value) })] }), _jsx(Description, { children: description })] }));
|
|
7
12
|
};
|
|
8
13
|
//# sourceMappingURL=OrganizationNameField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationNameField.js","sourceRoot":"","sources":["../../src/fields/OrganizationNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"OrganizationNameField.js","sourceRoot":"","sources":["../../src/fields/OrganizationNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW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|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export declare const ScoringSystemField: ({ scoringSystem, isReadonly, }: ScoringSystemFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
import type { FieldProps } from "./FieldProps";
|
|
3
|
+
type ScoringSystemFieldProps = FieldProps<ScoringSystem>;
|
|
4
|
+
export declare const ScoringSystemField: (props: ScoringSystemFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export {};
|
|
8
6
|
//# sourceMappingURL=ScoringSystemField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScoringSystemField.d.ts","sourceRoot":"","sources":["../../src/fields/ScoringSystemField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ScoringSystemField.d.ts","sourceRoot":"","sources":["../../src/fields/ScoringSystemField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,uBAAuB,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;AAqBzD,eAAO,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,4CAkDhE,CAAC"}
|
|
@@ -3,7 +3,31 @@ import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
|
3
3
|
import { getLabelForScoringSystem, Labels } from "../labels";
|
|
4
4
|
import { getDescriptionForScoringSystem } from "../descriptions";
|
|
5
5
|
import { ScoringSystemIcon } from "../icons/ScoringSystemIcon";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const isScoringSystem = (value) => value === "FIRST_TO_11" || value === "FIRST_TO_21";
|
|
7
|
+
const parseScoringSystem = (value) => {
|
|
8
|
+
if (isScoringSystem(value)) {
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
if (value === getLabelForScoringSystem("FIRST_TO_11")) {
|
|
12
|
+
return "FIRST_TO_11";
|
|
13
|
+
}
|
|
14
|
+
if (value === getLabelForScoringSystem("FIRST_TO_21")) {
|
|
15
|
+
return "FIRST_TO_21";
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
};
|
|
19
|
+
export const ScoringSystemField = (props) => {
|
|
20
|
+
const { description, isReadonly, value } = props;
|
|
21
|
+
if (isReadonly) {
|
|
22
|
+
const resolvedDescription = description ?? getDescriptionForScoringSystem(value);
|
|
23
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.SCORING_SYSTEM }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(ScoringSystemIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.SCORING_SYSTEM, value: getLabelForScoringSystem(value) })] }), resolvedDescription && (_jsx(Description, { children: resolvedDescription }))] }));
|
|
24
|
+
}
|
|
25
|
+
const { placeholder, setValue } = props;
|
|
26
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.SCORING_SYSTEM }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(ScoringSystemIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.SCORING_SYSTEM, value: getLabelForScoringSystem(value), placeholder: placeholder, onChange: (event) => {
|
|
27
|
+
const nextValue = parseScoringSystem(event.target.value);
|
|
28
|
+
if (nextValue) {
|
|
29
|
+
setValue(nextValue);
|
|
30
|
+
}
|
|
31
|
+
} })] }), _jsx(Description, { children: description })] }));
|
|
8
32
|
};
|
|
9
33
|
//# sourceMappingURL=ScoringSystemField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScoringSystemField.js","sourceRoot":"","sources":["../../src/fields/ScoringSystemField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,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
|
-
|
|
4
|
-
};
|
|
5
|
-
export declare const TournamentNameField: ({ name, isReadonly, }: TournamentNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { FieldProps } from "./FieldProps";
|
|
2
|
+
type TournamentNameFieldProps = FieldProps<string>;
|
|
3
|
+
export declare const TournamentNameField: (props: TournamentNameFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
4
|
export {};
|
|
7
5
|
//# sourceMappingURL=TournamentNameField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TournamentNameField.d.ts","sourceRoot":"","sources":["../../src/fields/TournamentNameField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TournamentNameField.d.ts","sourceRoot":"","sources":["../../src/fields/TournamentNameField.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,wBAAwB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,mBAAmB,GAAI,OAAO,wBAAwB,4CAqClE,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputGroup, Label, TextField } from "@heroui/react";
|
|
2
|
+
import { Description, InputGroup, Label, TextField } from "@heroui/react";
|
|
3
3
|
import { Labels } from "../labels";
|
|
4
4
|
import { TournamentIcon } from "../icons/TournamentIcon";
|
|
5
|
-
export const TournamentNameField = (
|
|
6
|
-
|
|
5
|
+
export const TournamentNameField = (props) => {
|
|
6
|
+
const { description, isReadonly, value } = props;
|
|
7
|
+
if (isReadonly) {
|
|
8
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: true, children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(TournamentIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value })] }), description && _jsx(Description, { children: description })] }));
|
|
9
|
+
}
|
|
10
|
+
const { placeholder, setValue } = props;
|
|
11
|
+
return (_jsxs(TextField, { type: "text", variant: "secondary", children: [_jsx(Label, { children: Labels.NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(TournamentIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.NAME, value: value, placeholder: placeholder, onChange: (event) => setValue(event.target.value) })] }), _jsx(Description, { children: description })] }));
|
|
7
12
|
};
|
|
8
13
|
//# sourceMappingURL=TournamentNameField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TournamentNameField.js","sourceRoot":"","sources":["../../src/fields/TournamentNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"TournamentNameField.js","sourceRoot":"","sources":["../../src/fields/TournamentNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAKzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACtE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEjD,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,UAAU,mBACpD,KAAC,KAAK,cAAE,MAAM,CAAC,IAAI,GAAS,EAC5B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,cAAc,KAAG,GACC,EACpB,KAAC,UAAU,CAAC,KAAK,kBAAa,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,IAC/C,EACZ,WAAW,IAAI,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7C,CACZ,CAAC;IACH,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACzC,KAAC,KAAK,cAAE,MAAM,CAAC,IAAI,GAAS,EAC5B,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,cAAc,KAAG,GACC,EACpB,KAAC,UAAU,CAAC,KAAK,kBACJ,MAAM,CAAC,IAAI,EACvB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAChD,IACU,EACb,KAAC,WAAW,cAAE,WAAW,GAAe,IAC7B,CACZ,CAAC;AACH,CAAC,CAAC"}
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ import { ScoringSystemField } from "./ScoringSystemField";
|
|
|
12
12
|
import { SearchNameField } from "./SearchNameField";
|
|
13
13
|
import { TournamentNameField } from "./TournamentNameField";
|
|
14
14
|
export { AccountNameField, CourtNumberField, DomainField, DrawNameField, DrawTypeField, EventNameField, EventTypeField, IdentifierField, MailField, OrganizationNameField, ScoringSystemField, SearchNameField, TournamentNameField, };
|
|
15
|
+
export type { FieldProps } from "./FieldProps";
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE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