@coorpacademy/components 11.16.5-alpha.5 → 11.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/image-upload/style.css +2 -0
- package/es/atom/radio-with-title/index.d.ts +1 -0
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/index.js +7 -1
- package/es/atom/radio-with-title/index.js.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +1 -0
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/title/index.d.ts +1 -0
- package/es/atom/title/index.d.ts.map +1 -1
- package/es/atom/title/index.js +24 -6
- package/es/atom/title/index.js.map +1 -1
- package/es/atom/title/style.css +31 -4
- package/es/molecule/brand-form-group/index.d.ts +567 -1
- package/es/molecule/brand-form-group/index.d.ts.map +1 -1
- package/es/molecule/brand-form-group/index.js +9 -8
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/brand-form-group/style.css +4 -0
- package/es/molecule/select-multiple/index.js +1 -1
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/es/molecule/title-radio-wrapper/index.d.ts +18 -17
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/style.css +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +18 -17
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/brand-form/index.d.ts +567 -1
- package/es/organism/brand-form/index.d.ts.map +1 -1
- package/es/organism/brand-form/index.js +4 -3
- package/es/organism/brand-form/index.js.map +1 -1
- package/es/organism/brand-form/style.css +5 -0
- package/es/organism/rewards-form/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts +70 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -0
- package/es/organism/select-opponents/index.js +27 -0
- package/es/organism/select-opponents/index.js.map +1 -0
- package/es/organism/{select-population → select-opponents}/style.css +1 -0
- package/es/organism/select-opponents/types.d.ts +70 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -0
- package/es/organism/select-opponents/types.js +7 -0
- package/es/organism/select-opponents/types.js.map +1 -0
- package/es/organism/title-and-input/index.d.ts +117 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -0
- package/es/organism/title-and-input/index.js +43 -0
- package/es/organism/title-and-input/index.js.map +1 -0
- package/es/organism/title-and-input/style.css +9 -0
- package/es/organism/title-and-input/types.d.ts +127 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -0
- package/es/organism/title-and-input/types.js +12 -0
- package/es/organism/title-and-input/types.js.map +1 -0
- package/es/organism/wizard-contents/index.d.ts +568 -1
- package/es/template/back-office/brand-update/index.d.ts +567 -1
- package/lib/atom/image-upload/style.css +2 -0
- package/lib/atom/radio-with-title/index.d.ts +1 -0
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/index.js +6 -1
- package/lib/atom/radio-with-title/index.js.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +1 -0
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/title/index.d.ts +1 -0
- package/lib/atom/title/index.d.ts.map +1 -1
- package/lib/atom/title/index.js +24 -6
- package/lib/atom/title/index.js.map +1 -1
- package/lib/atom/title/style.css +31 -4
- package/lib/molecule/brand-form-group/index.d.ts +567 -1
- package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
- package/lib/molecule/brand-form-group/index.js +10 -9
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/brand-form-group/style.css +4 -0
- package/lib/molecule/select-multiple/index.js +1 -1
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts +18 -17
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/style.css +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +18 -17
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/brand-form/index.d.ts +567 -1
- package/lib/organism/brand-form/index.d.ts.map +1 -1
- package/lib/organism/brand-form/index.js +4 -3
- package/lib/organism/brand-form/index.js.map +1 -1
- package/lib/organism/brand-form/style.css +5 -0
- package/lib/organism/rewards-form/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts +70 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -0
- package/lib/organism/{select-population → select-opponents}/index.js +15 -5
- package/lib/organism/select-opponents/index.js.map +1 -0
- package/lib/organism/{select-population → select-opponents}/style.css +1 -0
- package/lib/organism/select-opponents/types.d.ts +70 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -0
- package/lib/organism/select-opponents/types.js +18 -0
- package/lib/organism/select-opponents/types.js.map +1 -0
- package/lib/organism/title-and-input/index.d.ts +117 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -0
- package/lib/organism/title-and-input/index.js +57 -0
- package/lib/organism/title-and-input/index.js.map +1 -0
- package/lib/organism/title-and-input/style.css +9 -0
- package/lib/organism/title-and-input/types.d.ts +127 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -0
- package/lib/organism/title-and-input/types.js +25 -0
- package/lib/organism/title-and-input/types.js.map +1 -0
- package/lib/organism/wizard-contents/index.d.ts +568 -1
- package/lib/template/back-office/brand-update/index.d.ts +567 -1
- package/package.json +2 -2
- package/es/organism/select-population/index.d.ts +0 -5
- package/es/organism/select-population/index.d.ts.map +0 -1
- package/es/organism/select-population/index.js +0 -20
- package/es/organism/select-population/index.js.map +0 -1
- package/es/organism/select-population/types.d.ts +0 -5
- package/es/organism/select-population/types.d.ts.map +0 -1
- package/es/organism/select-population/types.js +0 -2
- package/es/organism/select-population/types.js.map +0 -1
- package/lib/organism/select-population/index.d.ts +0 -5
- package/lib/organism/select-population/index.d.ts.map +0 -1
- package/lib/organism/select-population/index.js.map +0 -1
- package/lib/organism/select-population/types.d.ts +0 -5
- package/lib/organism/select-population/types.d.ts.map +0 -1
- package/lib/organism/select-population/types.js +0 -2
- package/lib/organism/select-population/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","NovaCompositionNavigationArrowLeft","ArrowLeft","BrandFormGroup","Provider","Button","ButtonLink","Link","Loader","style","buildButtonSection","onSubmit","submitValue","onReset","resetValue","tooltip","disabled","isModified","isPending","darkColor","theme","disabledSubmit","submitButton","title","saveButton","cancelBackground","backgroundColor","resetButton","buttons","BrandForm","props","context","groups","back","isLoading","skin","backView","color","arrowBack","link","backDesc","desc","brandGroups","map","group","index","buttonSection","handleSubmit","e","preventDefault","handleReset","loaderContainer","loader","form","contextTypes","childContextTypes","defaultProps","place","propTypes","arrayOf","shape","isRequired","bool","func","children","href","string"],"sources":["../../../src/organism/brand-form/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowLeft as ArrowLeft} from '@coorpacademy/nova-icons';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport Provider from '../../atom/provider';\nimport Button from '../../atom/button';\nimport ButtonLink from '../../atom/button-link';\nimport Link from '../../atom/link';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildButtonSection = (\n onSubmit,\n submitValue,\n onReset,\n resetValue,\n tooltip,\n disabled,\n isModified,\n isPending,\n darkColor,\n theme\n) => {\n if (!onSubmit && !onReset) {\n return null;\n }\n\n const disabledSubmit = disabled || isPending || !isModified;\n const submitButton = onSubmit ? (\n <div
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","NovaCompositionNavigationArrowLeft","ArrowLeft","BrandFormGroup","Provider","Button","ButtonLink","Link","Loader","style","buildButtonSection","onSubmit","submitValue","onReset","resetValue","tooltip","disabled","isModified","isPending","darkColor","theme","massiveBattleForm","disabledSubmit","submitButton","title","massiveBattleButton","saveButton","cancelBackground","backgroundColor","resetButton","buttons","BrandForm","props","context","groups","back","isLoading","skin","fields","type","backView","color","arrowBack","link","backDesc","desc","brandGroups","map","group","index","buttonSection","handleSubmit","e","preventDefault","handleReset","loaderContainer","loader","form","contextTypes","childContextTypes","defaultProps","place","propTypes","arrayOf","shape","isRequired","bool","func","children","href","string"],"sources":["../../../src/organism/brand-form/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowLeft as ArrowLeft} from '@coorpacademy/nova-icons';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport Provider from '../../atom/provider';\nimport Button from '../../atom/button';\nimport ButtonLink from '../../atom/button-link';\nimport Link from '../../atom/link';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildButtonSection = (\n onSubmit,\n submitValue,\n onReset,\n resetValue,\n tooltip,\n disabled,\n isModified,\n isPending,\n darkColor,\n theme,\n massiveBattleForm\n) => {\n if (!onSubmit && !onReset) {\n return null;\n }\n\n const disabledSubmit = disabled || isPending || !isModified;\n const submitButton = onSubmit ? (\n <div\n data-tip={tooltip.title}\n data-for=\"submitButton\"\n className={massiveBattleForm ? style.massiveBattleButton : style.saveButton}\n >\n {theme === 'coorpmanager' ? (\n <ButtonLink\n type=\"primary\"\n label={submitValue}\n disabled={disabledSubmit}\n data-testid=\"submit-button\"\n buttonType=\"submit\"\n onClick={onSubmit}\n />\n ) : (\n <Button type=\"submit\" disabled={disabledSubmit} submitValue={submitValue} />\n )}\n </div>\n ) : null;\n\n const cancelBackground = {backgroundColor: darkColor};\n\n const resetButton = onReset ? (\n <div className={style.resetButton}>\n <Button type=\"reset\" submitValue={resetValue} style={cancelBackground} />\n </div>\n ) : null;\n\n return (\n <div className={style.buttons}>\n {submitButton}\n {resetButton}\n </div>\n );\n};\nconst BrandForm = (props, context) => {\n const {\n groups,\n disabled,\n isModified,\n isPending,\n onSubmit,\n submitValue,\n onReset,\n resetValue,\n back,\n tooltip,\n isLoading,\n theme\n } = props;\n const {skin} = context;\n const darkColor = get('common.dark', skin);\n const massiveBattleForm = groups[0]?.fields[0]?.type === 'titleAndInput';\n const backView = back ? (\n <p className={style.back}>\n <ArrowLeft style={{color: darkColor}} className={style.arrowBack} />\n <Link href={back.link} className={style.backDesc}>\n {back.desc}\n </Link>\n </p>\n ) : null;\n\n const brandGroups = groups.map((group, index) => {\n return (\n <div className={style.group} key={index}>\n <BrandFormGroup {...group} />\n </div>\n );\n });\n\n const buttonSection = buildButtonSection(\n onSubmit,\n submitValue,\n onReset,\n resetValue,\n tooltip,\n disabled,\n isModified,\n isPending,\n darkColor,\n theme,\n massiveBattleForm\n );\n\n const handleSubmit = useMemo(\n () => e => {\n e.preventDefault();\n return onSubmit(e);\n },\n [onSubmit]\n );\n\n const handleReset = useMemo(\n () => e => {\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n return (\n <div>\n {backView}\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <form onSubmit={handleSubmit} onReset={handleReset} className={style.form}>\n {brandGroups}\n {buttonSection}\n </form>\n )}\n </div>\n );\n};\n\nBrandForm.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nBrandForm.defaultProps = {\n tooltip: {\n title: '',\n place: 'top'\n }\n};\n\nBrandForm.propTypes = {\n groups: PropTypes.arrayOf(PropTypes.shape(BrandFormGroup.propTypes)).isRequired,\n disabled: PropTypes.bool,\n isModified: PropTypes.bool,\n isPending: PropTypes.bool,\n onSubmit: PropTypes.func,\n submitValue: Button.propTypes.submitValue,\n onReset: PropTypes.func,\n resetValue: Button.propTypes.submitValue,\n back: PropTypes.shape({\n desc: Link.propTypes.children,\n link: Link.propTypes.href\n }),\n tooltip: PropTypes.shape({\n title: PropTypes.string,\n place: PropTypes.string\n }),\n isLoading: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PS,KAAK,EAAE,EADA;IAEPqC,KAAK,EAAE;EAFA;AADc,CAAzB;AAOA9B,SAAS,CAAC+B,SAAV,2CAAsB;EACpB5B,MAAM,EAAElC,SAAS,CAAC+D,OAAV,CAAkB/D,SAAS,CAACgE,KAAV,CAAgB7D,cAAc,CAAC2D,SAA/B,CAAlB,EAA6DG,UADjD;EAEpBjD,QAAQ,EAAEhB,SAAS,CAACkE,IAFA;EAGpBjD,UAAU,EAAEjB,SAAS,CAACkE,IAHF;EAIpBhD,SAAS,EAAElB,SAAS,CAACkE,IAJD;EAKpBvD,QAAQ,EAAEX,SAAS,CAACmE,IALA;EAMpBvD,WAAW,EAAEP,MAAM,CAACyD,SAAP,CAAiBlD,WANV;EAOpBC,OAAO,EAAEb,SAAS,CAACmE,IAPC;EAQpBrD,UAAU,EAAET,MAAM,CAACyD,SAAP,CAAiBlD,WART;EASpBuB,IAAI,EAAEnC,SAAS,CAACgE,KAAV,CAAgB;IACpBnB,IAAI,EAAEtC,IAAI,CAACuD,SAAL,CAAeM,QADD;IAEpBzB,IAAI,EAAEpC,IAAI,CAACuD,SAAL,CAAeO;EAFD,CAAhB,CATc;EAapBtD,OAAO,EAAEf,SAAS,CAACgE,KAAV,CAAgB;IACvBxC,KAAK,EAAExB,SAAS,CAACsE,MADM;IAEvBT,KAAK,EAAE7D,SAAS,CAACsE;EAFM,CAAhB,CAbW;EAiBpBlC,SAAS,EAAEpC,SAAS,CAACkE,IAjBD;EAkBpB9C,KAAK,EAAEpB,SAAS,CAACsE;AAlBG,CAAtB;AAqBA,eAAevC,SAAf"}
|
|
@@ -18,6 +18,7 @@ declare namespace RewardsForm {
|
|
|
18
18
|
subtitle: PropTypes.Requireable<string>;
|
|
19
19
|
type: PropTypes.Requireable<string>;
|
|
20
20
|
'data-name': PropTypes.Requireable<string>;
|
|
21
|
+
titleSize: PropTypes.Requireable<string>;
|
|
21
22
|
subtitleSize: PropTypes.Requireable<string>;
|
|
22
23
|
}>>;
|
|
23
24
|
child: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectOpponentsProps } from './types';
|
|
3
|
+
declare const SelectOpponents: {
|
|
4
|
+
(props: SelectOpponentsProps): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
items: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
7
|
+
radioWithTitle: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
8
|
+
title: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
9
|
+
title: import("prop-types").Requireable<string>;
|
|
10
|
+
subtitle: import("prop-types").Requireable<string>;
|
|
11
|
+
type: import("prop-types").Requireable<string>;
|
|
12
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
13
|
+
titleSize: import("prop-types").Requireable<string>;
|
|
14
|
+
subtitleSize: import("prop-types").Requireable<string>;
|
|
15
|
+
}>>>;
|
|
16
|
+
name: import("prop-types").Requireable<string>;
|
|
17
|
+
checked: import("prop-types").Requireable<boolean>;
|
|
18
|
+
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
19
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
20
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
21
|
+
}>>;
|
|
22
|
+
field: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
23
|
+
name: import("prop-types").Requireable<string>;
|
|
24
|
+
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
25
|
+
onReset: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
26
|
+
imageTypes: import("prop-types").Requireable<any[]>;
|
|
27
|
+
error: import("prop-types").Requireable<string>;
|
|
28
|
+
buttonAriaLabel: import("prop-types").Requireable<string>;
|
|
29
|
+
errorButtonLabel: import("prop-types").Requireable<string>;
|
|
30
|
+
labelLink: import("prop-types").Requireable<string>;
|
|
31
|
+
hrefLink: import("prop-types").Requireable<string>;
|
|
32
|
+
title: import("prop-types").Requireable<string>;
|
|
33
|
+
description: import("prop-types").Requireable<string>;
|
|
34
|
+
uploadLabel: import("prop-types").Requireable<string>;
|
|
35
|
+
previewLabel: import("prop-types").Requireable<string>;
|
|
36
|
+
previewContent: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
37
|
+
type: import("prop-types").Requireable<string>;
|
|
38
|
+
src: import("prop-types").Requireable<string>;
|
|
39
|
+
label: import("prop-types").Requireable<string>;
|
|
40
|
+
}>>;
|
|
41
|
+
loading: import("prop-types").Requireable<boolean>;
|
|
42
|
+
modified: import("prop-types").Requireable<boolean>;
|
|
43
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
44
|
+
children: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
45
|
+
pdfButtonLabel: import("prop-types").Requireable<string>;
|
|
46
|
+
pdfButtonAriaLabel: import("prop-types").Requireable<string>;
|
|
47
|
+
}> | import("prop-types").InferProps<{
|
|
48
|
+
title: import("prop-types").Requireable<string>;
|
|
49
|
+
placeholder: import("prop-types").Requireable<string>;
|
|
50
|
+
description: import("prop-types").Requireable<string>;
|
|
51
|
+
hint: import("prop-types").Requireable<string>;
|
|
52
|
+
options: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
53
|
+
selected: import("prop-types").Validator<boolean>;
|
|
54
|
+
name: import("prop-types").Validator<string>;
|
|
55
|
+
value: import("prop-types").Requireable<string>;
|
|
56
|
+
}>>[]>;
|
|
57
|
+
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
58
|
+
onError: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
59
|
+
multiple: import("prop-types").Requireable<boolean>;
|
|
60
|
+
modified: import("prop-types").Requireable<boolean>;
|
|
61
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
62
|
+
error: import("prop-types").Requireable<string>;
|
|
63
|
+
theme: import("prop-types").Requireable<string>;
|
|
64
|
+
}> | null | undefined>>;
|
|
65
|
+
childType: import("prop-types").Requireable<string>;
|
|
66
|
+
}> | null | undefined)[]>;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export default SelectOpponents;
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/index.tsx"],"names":[],"mappings":";AAIA,OAAkB,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAC;AAMxD,QAAA,MAAM,eAAe;YAAW,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAanD,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import map from 'lodash/fp/map';
|
|
3
|
+
import TitleRadioWrapper from '../../molecule/title-radio-wrapper';
|
|
4
|
+
import propTypes from './types';
|
|
5
|
+
import style from './style.css'; // @ts-expect-error (need to get the index)
|
|
6
|
+
|
|
7
|
+
const mapWithIndex = map.convert({
|
|
8
|
+
cap: false
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const SelectOpponents = props => {
|
|
12
|
+
const {
|
|
13
|
+
items
|
|
14
|
+
} = props;
|
|
15
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
16
|
+
className: style.container
|
|
17
|
+
}, mapWithIndex((item, key) => {
|
|
18
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
19
|
+
key: `select-opponents-item-${key}`,
|
|
20
|
+
className: style.item
|
|
21
|
+
}, /*#__PURE__*/React.createElement(TitleRadioWrapper, item));
|
|
22
|
+
}, items));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
SelectOpponents.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
26
|
+
export default SelectOpponents;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","map","TitleRadioWrapper","propTypes","style","mapWithIndex","convert","cap","SelectOpponents","props","items","container","item","key"],"sources":["../../../src/organism/select-opponents/index.tsx"],"sourcesContent":["import React from 'react';\nimport map from 'lodash/fp/map';\nimport TitleRadioWrapper from '../../molecule/title-radio-wrapper';\nimport {TitleRadioWrapperProps} from '../../molecule/title-radio-wrapper/types';\nimport propTypes, {SelectOpponentsProps} from './types';\nimport style from './style.css';\n\n// @ts-expect-error (need to get the index)\nconst mapWithIndex = map.convert({cap: false});\n\nconst SelectOpponents = (props: SelectOpponentsProps) => {\n const {items} = props;\n return (\n <ul className={style.container}>\n {mapWithIndex((item: TitleRadioWrapperProps, key: number) => {\n return (\n <li key={`select-opponents-item-${key}`} className={style.item}>\n <TitleRadioWrapper {...item} />\n </li>\n );\n }, items)}\n </ul>\n );\n};\n\nSelectOpponents.propTypes = propTypes;\n\nexport default SelectOpponents;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,iBAAP,MAA8B,oCAA9B;AAEA,OAAOC,SAAP,MAA8C,SAA9C;AACA,OAAOC,KAAP,MAAkB,aAAlB,C,CAEA;;AACA,MAAMC,YAAY,GAAGJ,GAAG,CAACK,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAArB;;AAEA,MAAMC,eAAe,GAAIC,KAAD,IAAiC;EACvD,MAAM;IAACC;EAAD,IAAUD,KAAhB;EACA,oBACE;IAAI,SAAS,EAAEL,KAAK,CAACO;EAArB,GACGN,YAAY,CAAC,CAACO,IAAD,EAA+BC,GAA/B,KAA+C;IAC3D,oBACE;MAAI,GAAG,EAAG,yBAAwBA,GAAI,EAAtC;MAAyC,SAAS,EAAET,KAAK,CAACQ;IAA1D,gBACE,oBAAC,iBAAD,EAAuBA,IAAvB,CADF,CADF;EAKD,CANY,EAMVF,KANU,CADf,CADF;AAWD,CAbD;;AAeAF,eAAe,CAACL,SAAhB,2CAA4BA,SAA5B;AAEA,eAAeK,eAAf"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { TitleRadioWrapperProps } from '../../molecule/title-radio-wrapper/types';
|
|
3
|
+
export declare const propTypes: {
|
|
4
|
+
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
5
|
+
radioWithTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
title: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
7
|
+
title: PropTypes.Requireable<string>;
|
|
8
|
+
subtitle: PropTypes.Requireable<string>;
|
|
9
|
+
type: PropTypes.Requireable<string>;
|
|
10
|
+
'data-name': PropTypes.Requireable<string>;
|
|
11
|
+
titleSize: PropTypes.Requireable<string>;
|
|
12
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
13
|
+
}>>>;
|
|
14
|
+
name: PropTypes.Requireable<string>;
|
|
15
|
+
checked: PropTypes.Requireable<boolean>;
|
|
16
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
18
|
+
'data-name': PropTypes.Requireable<string>;
|
|
19
|
+
}>>;
|
|
20
|
+
field: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
21
|
+
name: PropTypes.Requireable<string>;
|
|
22
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
|
+
onReset: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
+
imageTypes: PropTypes.Requireable<any[]>;
|
|
25
|
+
error: PropTypes.Requireable<string>;
|
|
26
|
+
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
27
|
+
errorButtonLabel: PropTypes.Requireable<string>;
|
|
28
|
+
labelLink: PropTypes.Requireable<string>;
|
|
29
|
+
hrefLink: PropTypes.Requireable<string>;
|
|
30
|
+
title: PropTypes.Requireable<string>;
|
|
31
|
+
description: PropTypes.Requireable<string>;
|
|
32
|
+
uploadLabel: PropTypes.Requireable<string>;
|
|
33
|
+
previewLabel: PropTypes.Requireable<string>;
|
|
34
|
+
previewContent: PropTypes.Requireable<PropTypes.InferProps<{
|
|
35
|
+
type: PropTypes.Requireable<string>;
|
|
36
|
+
src: PropTypes.Requireable<string>;
|
|
37
|
+
label: PropTypes.Requireable<string>;
|
|
38
|
+
}>>;
|
|
39
|
+
loading: PropTypes.Requireable<boolean>;
|
|
40
|
+
modified: PropTypes.Requireable<boolean>;
|
|
41
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
42
|
+
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
44
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
45
|
+
}> | PropTypes.InferProps<{
|
|
46
|
+
title: PropTypes.Requireable<string>;
|
|
47
|
+
placeholder: PropTypes.Requireable<string>;
|
|
48
|
+
description: PropTypes.Requireable<string>;
|
|
49
|
+
hint: PropTypes.Requireable<string>;
|
|
50
|
+
options: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
51
|
+
selected: PropTypes.Validator<boolean>;
|
|
52
|
+
name: PropTypes.Validator<string>;
|
|
53
|
+
value: PropTypes.Requireable<string>;
|
|
54
|
+
}>>[]>;
|
|
55
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
56
|
+
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
57
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
58
|
+
modified: PropTypes.Requireable<boolean>;
|
|
59
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
60
|
+
error: PropTypes.Requireable<string>;
|
|
61
|
+
theme: PropTypes.Requireable<string>;
|
|
62
|
+
}> | null | undefined>>;
|
|
63
|
+
childType: PropTypes.Requireable<string>;
|
|
64
|
+
}> | null | undefined)[]>;
|
|
65
|
+
};
|
|
66
|
+
export declare type SelectOpponentsProps = {
|
|
67
|
+
items: TitleRadioWrapperProps[];
|
|
68
|
+
};
|
|
69
|
+
export default propTypes;
|
|
70
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,sBAAsB,EAAC,MAAM,0CAA0C,CAAC;AAGhF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAErB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,KAAK,EAAE,sBAAsB,EAAE,CAAC;CACjC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import TitleRadioWrapper from '../../molecule/title-radio-wrapper';
|
|
3
|
+
export const propTypes = {
|
|
4
|
+
items: PropTypes.arrayOf(PropTypes.shape(TitleRadioWrapper.propTypes))
|
|
5
|
+
};
|
|
6
|
+
export default propTypes;
|
|
7
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","TitleRadioWrapper","propTypes","items","arrayOf","shape"],"sources":["../../../src/organism/select-opponents/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {TitleRadioWrapperProps} from '../../molecule/title-radio-wrapper/types';\nimport TitleRadioWrapper from '../../molecule/title-radio-wrapper';\n\nexport const propTypes = {\n items: PropTypes.arrayOf(PropTypes.shape(TitleRadioWrapper.propTypes))\n};\n\nexport type SelectOpponentsProps = {\n items: TitleRadioWrapperProps[];\n};\n\nexport default propTypes;\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,OAAOC,iBAAP,MAA8B,oCAA9B;AAEA,OAAO,MAAMC,SAAS,GAAG;EACvBC,KAAK,EAAEH,SAAS,CAACI,OAAV,CAAkBJ,SAAS,CAACK,KAAV,CAAgBJ,iBAAiB,CAACC,SAAlC,CAAlB;AADgB,CAAlB;AAQP,eAAeA,SAAf"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TitleAndInputProps } from './types';
|
|
3
|
+
declare const TitleAndInput: {
|
|
4
|
+
(props: TitleAndInputProps): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
title: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
7
|
+
title: import("prop-types").Requireable<string>;
|
|
8
|
+
subtitle: import("prop-types").Requireable<string>;
|
|
9
|
+
type: import("prop-types").Requireable<string>;
|
|
10
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
11
|
+
titleSize: import("prop-types").Requireable<string>;
|
|
12
|
+
subtitleSize: import("prop-types").Requireable<string>;
|
|
13
|
+
}>>>;
|
|
14
|
+
field: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
15
|
+
title: import("prop-types").Requireable<string>;
|
|
16
|
+
placeholder: import("prop-types").Requireable<string>;
|
|
17
|
+
description: import("prop-types").Requireable<string>;
|
|
18
|
+
hint: import("prop-types").Requireable<string>;
|
|
19
|
+
options: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
20
|
+
selected: import("prop-types").Validator<boolean>;
|
|
21
|
+
name: import("prop-types").Validator<string>;
|
|
22
|
+
value: import("prop-types").Requireable<string>;
|
|
23
|
+
}>>[]>;
|
|
24
|
+
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
25
|
+
onError: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
26
|
+
multiple: import("prop-types").Requireable<boolean>;
|
|
27
|
+
modified: import("prop-types").Requireable<boolean>;
|
|
28
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
29
|
+
error: import("prop-types").Requireable<string>;
|
|
30
|
+
theme: import("prop-types").Requireable<string>;
|
|
31
|
+
}> | import("prop-types").InferProps<{
|
|
32
|
+
title: import("prop-types").Requireable<string>;
|
|
33
|
+
placeholder: import("prop-types").Requireable<string>;
|
|
34
|
+
value: import("prop-types").Requireable<string>;
|
|
35
|
+
description: import("prop-types").Requireable<string>;
|
|
36
|
+
required: import("prop-types").Requireable<boolean>;
|
|
37
|
+
modified: import("prop-types").Requireable<boolean>;
|
|
38
|
+
error: import("prop-types").Requireable<boolean>;
|
|
39
|
+
errorMessage: import("prop-types").Requireable<string>;
|
|
40
|
+
suggestions: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
41
|
+
name: import("prop-types").Requireable<string>;
|
|
42
|
+
value: import("prop-types").Requireable<NonNullable<string | number | null | undefined>>;
|
|
43
|
+
}> | null | undefined)[]>;
|
|
44
|
+
theme: import("prop-types").Requireable<string>;
|
|
45
|
+
onInput: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
46
|
+
onFetch: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
47
|
+
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
48
|
+
onBlur: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
49
|
+
onSuggestionSelected: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
50
|
+
}> | import("prop-types").InferProps<{
|
|
51
|
+
items: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
52
|
+
radioWithTitle: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
53
|
+
title: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
54
|
+
title: import("prop-types").Requireable<string>;
|
|
55
|
+
subtitle: import("prop-types").Requireable<string>;
|
|
56
|
+
type: import("prop-types").Requireable<string>;
|
|
57
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
58
|
+
titleSize: import("prop-types").Requireable<string>;
|
|
59
|
+
subtitleSize: import("prop-types").Requireable<string>;
|
|
60
|
+
}>>>;
|
|
61
|
+
name: import("prop-types").Requireable<string>;
|
|
62
|
+
checked: import("prop-types").Requireable<boolean>;
|
|
63
|
+
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
64
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
65
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
66
|
+
}>>;
|
|
67
|
+
field: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
68
|
+
name: import("prop-types").Requireable<string>;
|
|
69
|
+
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
70
|
+
onReset: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
71
|
+
imageTypes: import("prop-types").Requireable<any[]>;
|
|
72
|
+
error: import("prop-types").Requireable<string>;
|
|
73
|
+
buttonAriaLabel: import("prop-types").Requireable<string>;
|
|
74
|
+
errorButtonLabel: import("prop-types").Requireable<string>;
|
|
75
|
+
labelLink: import("prop-types").Requireable<string>;
|
|
76
|
+
hrefLink: import("prop-types").Requireable<string>;
|
|
77
|
+
title: import("prop-types").Requireable<string>;
|
|
78
|
+
description: import("prop-types").Requireable<string>;
|
|
79
|
+
uploadLabel: import("prop-types").Requireable<string>;
|
|
80
|
+
previewLabel: import("prop-types").Requireable<string>;
|
|
81
|
+
previewContent: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
82
|
+
type: import("prop-types").Requireable<string>;
|
|
83
|
+
src: import("prop-types").Requireable<string>;
|
|
84
|
+
label: import("prop-types").Requireable<string>;
|
|
85
|
+
}>>;
|
|
86
|
+
loading: import("prop-types").Requireable<boolean>;
|
|
87
|
+
modified: import("prop-types").Requireable<boolean>;
|
|
88
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
89
|
+
children: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
90
|
+
pdfButtonLabel: import("prop-types").Requireable<string>;
|
|
91
|
+
pdfButtonAriaLabel: import("prop-types").Requireable<string>;
|
|
92
|
+
}> | import("prop-types").InferProps<{
|
|
93
|
+
title: import("prop-types").Requireable<string>;
|
|
94
|
+
placeholder: import("prop-types").Requireable<string>;
|
|
95
|
+
description: import("prop-types").Requireable<string>;
|
|
96
|
+
hint: import("prop-types").Requireable<string>;
|
|
97
|
+
options: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
98
|
+
selected: import("prop-types").Validator<boolean>;
|
|
99
|
+
name: import("prop-types").Validator<string>;
|
|
100
|
+
value: import("prop-types").Requireable<string>;
|
|
101
|
+
}>>[]>;
|
|
102
|
+
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
103
|
+
onError: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
104
|
+
multiple: import("prop-types").Requireable<boolean>;
|
|
105
|
+
modified: import("prop-types").Requireable<boolean>;
|
|
106
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
107
|
+
error: import("prop-types").Requireable<string>;
|
|
108
|
+
theme: import("prop-types").Requireable<string>;
|
|
109
|
+
}> | null | undefined>>;
|
|
110
|
+
childType: import("prop-types").Requireable<string>;
|
|
111
|
+
}> | null | undefined)[]>;
|
|
112
|
+
}> | null | undefined>>;
|
|
113
|
+
childType: import("prop-types").Validator<string>;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
export default TitleAndInput;
|
|
117
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/title-and-input/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAiBtD,QAAA,MAAM,aAAa;YAAW,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB/C,CAAC;AAIF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Title from '../../atom/title';
|
|
5
|
+
import Autocomplete from '../../atom/autocomplete';
|
|
6
|
+
import SelectMultiple from '../../molecule/select-multiple';
|
|
7
|
+
import SelectOpponents from '../select-opponents';
|
|
8
|
+
import propTypes from './types';
|
|
9
|
+
import style from './style.css';
|
|
10
|
+
|
|
11
|
+
const buildInput = (childType, field) => {
|
|
12
|
+
switch (childType) {
|
|
13
|
+
case 'autoComplete':
|
|
14
|
+
return /*#__PURE__*/React.createElement(Autocomplete, field);
|
|
15
|
+
|
|
16
|
+
case 'selectMultiple':
|
|
17
|
+
return /*#__PURE__*/React.createElement(SelectMultiple, field);
|
|
18
|
+
|
|
19
|
+
case 'selectOpponents':
|
|
20
|
+
return /*#__PURE__*/React.createElement(SelectOpponents, field);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const TitleAndInput = props => {
|
|
25
|
+
const {
|
|
26
|
+
title,
|
|
27
|
+
field,
|
|
28
|
+
childType
|
|
29
|
+
} = props;
|
|
30
|
+
const input = buildInput(childType, field);
|
|
31
|
+
const styleInput = childType === 'selectOpponents' ? style.selectOpponentsContainer : style.inputContainer;
|
|
32
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Title, _extends({}, title, {
|
|
33
|
+
type: 'form-group',
|
|
34
|
+
titleSize: 'medium',
|
|
35
|
+
subtitleSize: 'small-without-margin'
|
|
36
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: styleInput
|
|
38
|
+
}, input));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
TitleAndInput.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
42
|
+
export default TitleAndInput;
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","Title","Autocomplete","SelectMultiple","SelectOpponents","propTypes","style","buildInput","childType","field","TitleAndInput","props","title","input","styleInput","selectOpponentsContainer","inputContainer"],"sources":["../../../src/organism/title-and-input/index.tsx"],"sourcesContent":["import React from 'react';\nimport Title from '../../atom/title';\nimport Autocomplete from '../../atom/autocomplete';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport SelectOpponents from '../select-opponents';\nimport propTypes, {TitleAndInputProps} from './types';\nimport style from './style.css';\n\nconst buildInput = (\n childType: TitleAndInputProps['childType'],\n field: TitleAndInputProps['field']\n) => {\n switch (childType) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'selectOpponents':\n return <SelectOpponents {...field} />;\n }\n};\n\nconst TitleAndInput = (props: TitleAndInputProps) => {\n const {title, field, childType} = props;\n const input = buildInput(childType, field);\n const styleInput =\n childType === 'selectOpponents' ? style.selectOpponentsContainer : style.inputContainer;\n return (\n <div>\n <Title\n {...title}\n type={'form-group'}\n titleSize={'medium'}\n subtitleSize={'small-without-margin'}\n />\n <div className={styleInput}>{input}</div>\n </div>\n );\n};\n\nTitleAndInput.propTypes = propTypes;\n\nexport default TitleAndInput;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,YAAP,MAAyB,yBAAzB;AACA,OAAOC,cAAP,MAA2B,gCAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,SAAP,MAA4C,SAA5C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CACjBC,SADiB,EAEjBC,KAFiB,KAGd;EACH,QAAQD,SAAR;IACE,KAAK,cAAL;MACE,oBAAO,oBAAC,YAAD,EAAkBC,KAAlB,CAAP;;IACF,KAAK,gBAAL;MACE,oBAAO,oBAAC,cAAD,EAAoBA,KAApB,CAAP;;IACF,KAAK,iBAAL;MACE,oBAAO,oBAAC,eAAD,EAAqBA,KAArB,CAAP;EANJ;AAQD,CAZD;;AAcA,MAAMC,aAAa,GAAIC,KAAD,IAA+B;EACnD,MAAM;IAACC,KAAD;IAAQH,KAAR;IAAeD;EAAf,IAA4BG,KAAlC;EACA,MAAME,KAAK,GAAGN,UAAU,CAACC,SAAD,EAAYC,KAAZ,CAAxB;EACA,MAAMK,UAAU,GACdN,SAAS,KAAK,iBAAd,GAAkCF,KAAK,CAACS,wBAAxC,GAAmET,KAAK,CAACU,cAD3E;EAEA,oBACE,8CACE,oBAAC,KAAD,eACMJ,KADN;IAEE,IAAI,EAAE,YAFR;IAGE,SAAS,EAAE,QAHb;IAIE,YAAY,EAAE;EAJhB,GADF,eAOE;IAAK,SAAS,EAAEE;EAAhB,GAA6BD,KAA7B,CAPF,CADF;AAWD,CAhBD;;AAkBAH,aAAa,CAACL,SAAd,2CAA0BA,SAA1B;AAEA,eAAeK,aAAf"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Autocomplete from '../../atom/autocomplete';
|
|
4
|
+
import SelectMultiple from '../../molecule/select-multiple';
|
|
5
|
+
import { SelectOpponentsProps } from '../select-opponents/types';
|
|
6
|
+
declare const propTypes: {
|
|
7
|
+
title: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
8
|
+
title: PropTypes.Requireable<string>;
|
|
9
|
+
subtitle: PropTypes.Requireable<string>;
|
|
10
|
+
type: PropTypes.Requireable<string>;
|
|
11
|
+
'data-name': PropTypes.Requireable<string>;
|
|
12
|
+
titleSize: PropTypes.Requireable<string>;
|
|
13
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
14
|
+
}>>>;
|
|
15
|
+
field: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
16
|
+
title: PropTypes.Requireable<string>;
|
|
17
|
+
placeholder: PropTypes.Requireable<string>;
|
|
18
|
+
description: PropTypes.Requireable<string>;
|
|
19
|
+
hint: PropTypes.Requireable<string>;
|
|
20
|
+
options: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
21
|
+
selected: PropTypes.Validator<boolean>;
|
|
22
|
+
name: PropTypes.Validator<string>;
|
|
23
|
+
value: PropTypes.Requireable<string>;
|
|
24
|
+
}>>[]>;
|
|
25
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
26
|
+
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
28
|
+
modified: PropTypes.Requireable<boolean>;
|
|
29
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
30
|
+
error: PropTypes.Requireable<string>;
|
|
31
|
+
theme: PropTypes.Requireable<string>;
|
|
32
|
+
}> | PropTypes.InferProps<{
|
|
33
|
+
title: PropTypes.Requireable<string>;
|
|
34
|
+
placeholder: PropTypes.Requireable<string>;
|
|
35
|
+
value: PropTypes.Requireable<string>;
|
|
36
|
+
description: PropTypes.Requireable<string>;
|
|
37
|
+
required: PropTypes.Requireable<boolean>;
|
|
38
|
+
modified: PropTypes.Requireable<boolean>;
|
|
39
|
+
error: PropTypes.Requireable<boolean>;
|
|
40
|
+
errorMessage: PropTypes.Requireable<string>;
|
|
41
|
+
suggestions: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
42
|
+
name: PropTypes.Requireable<string>;
|
|
43
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
44
|
+
}> | null | undefined)[]>;
|
|
45
|
+
theme: PropTypes.Requireable<string>;
|
|
46
|
+
onInput: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
+
onFetch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
|
+
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
49
|
+
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
|
+
onSuggestionSelected: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
+
}> | PropTypes.InferProps<{
|
|
52
|
+
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
53
|
+
radioWithTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
54
|
+
title: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
55
|
+
title: PropTypes.Requireable<string>;
|
|
56
|
+
subtitle: PropTypes.Requireable<string>;
|
|
57
|
+
type: PropTypes.Requireable<string>;
|
|
58
|
+
'data-name': PropTypes.Requireable<string>;
|
|
59
|
+
titleSize: PropTypes.Requireable<string>;
|
|
60
|
+
subtitleSize: PropTypes.Requireable<string>;
|
|
61
|
+
}>>>;
|
|
62
|
+
name: PropTypes.Requireable<string>;
|
|
63
|
+
checked: PropTypes.Requireable<boolean>;
|
|
64
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
65
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
66
|
+
'data-name': PropTypes.Requireable<string>;
|
|
67
|
+
}>>;
|
|
68
|
+
field: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
69
|
+
name: PropTypes.Requireable<string>;
|
|
70
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
71
|
+
onReset: PropTypes.Requireable<(...args: any[]) => any>;
|
|
72
|
+
imageTypes: PropTypes.Requireable<any[]>;
|
|
73
|
+
error: PropTypes.Requireable<string>;
|
|
74
|
+
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
75
|
+
errorButtonLabel: PropTypes.Requireable<string>;
|
|
76
|
+
labelLink: PropTypes.Requireable<string>;
|
|
77
|
+
hrefLink: PropTypes.Requireable<string>;
|
|
78
|
+
title: PropTypes.Requireable<string>;
|
|
79
|
+
description: PropTypes.Requireable<string>;
|
|
80
|
+
uploadLabel: PropTypes.Requireable<string>;
|
|
81
|
+
previewLabel: PropTypes.Requireable<string>;
|
|
82
|
+
previewContent: PropTypes.Requireable<PropTypes.InferProps<{
|
|
83
|
+
type: PropTypes.Requireable<string>;
|
|
84
|
+
src: PropTypes.Requireable<string>;
|
|
85
|
+
label: PropTypes.Requireable<string>;
|
|
86
|
+
}>>;
|
|
87
|
+
loading: PropTypes.Requireable<boolean>;
|
|
88
|
+
modified: PropTypes.Requireable<boolean>;
|
|
89
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
90
|
+
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
91
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
92
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
93
|
+
}> | PropTypes.InferProps<{
|
|
94
|
+
title: PropTypes.Requireable<string>;
|
|
95
|
+
placeholder: PropTypes.Requireable<string>;
|
|
96
|
+
description: PropTypes.Requireable<string>;
|
|
97
|
+
hint: PropTypes.Requireable<string>;
|
|
98
|
+
options: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
99
|
+
selected: PropTypes.Validator<boolean>;
|
|
100
|
+
name: PropTypes.Validator<string>;
|
|
101
|
+
value: PropTypes.Requireable<string>;
|
|
102
|
+
}>>[]>;
|
|
103
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
104
|
+
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
105
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
106
|
+
modified: PropTypes.Requireable<boolean>;
|
|
107
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
108
|
+
error: PropTypes.Requireable<string>;
|
|
109
|
+
theme: PropTypes.Requireable<string>;
|
|
110
|
+
}> | null | undefined>>;
|
|
111
|
+
childType: PropTypes.Requireable<string>;
|
|
112
|
+
}> | null | undefined)[]>;
|
|
113
|
+
}> | null | undefined>>;
|
|
114
|
+
childType: PropTypes.Validator<string>;
|
|
115
|
+
};
|
|
116
|
+
export declare type TitleAndInputProps = {
|
|
117
|
+
title: {
|
|
118
|
+
title: string;
|
|
119
|
+
subtitle: string;
|
|
120
|
+
type: string;
|
|
121
|
+
'data-name': string;
|
|
122
|
+
};
|
|
123
|
+
field: React.ComponentProps<typeof SelectMultiple> | React.ComponentProps<typeof Autocomplete> | SelectOpponentsProps;
|
|
124
|
+
childType: string;
|
|
125
|
+
};
|
|
126
|
+
export default propTypes;
|
|
127
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/title-and-input/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,YAAY,MAAM,yBAAyB,CAAC;AAEnD,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAE/D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQd,CAAC;AACF,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,KAAK,EACD,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,GAC3C,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,GACzC,oBAAoB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import Autocomplete from '../../atom/autocomplete';
|
|
3
|
+
import Title from '../../atom/title';
|
|
4
|
+
import SelectMultiple from '../../molecule/select-multiple';
|
|
5
|
+
import SelectOpponents from '../select-opponents';
|
|
6
|
+
const propTypes = {
|
|
7
|
+
title: PropTypes.shape(Title.propTypes).isRequired,
|
|
8
|
+
field: PropTypes.oneOfType([PropTypes.shape(Autocomplete.propTypes), PropTypes.shape(SelectMultiple.propTypes), PropTypes.shape(SelectOpponents.propTypes)]),
|
|
9
|
+
childType: PropTypes.oneOf(['autoComplete', 'selectMultiple', 'selectOpponents']).isRequired
|
|
10
|
+
};
|
|
11
|
+
export default propTypes;
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","Autocomplete","Title","SelectMultiple","SelectOpponents","propTypes","title","shape","isRequired","field","oneOfType","childType","oneOf"],"sources":["../../../src/organism/title-and-input/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport Autocomplete from '../../atom/autocomplete';\nimport Title from '../../atom/title';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport SelectOpponents from '../select-opponents';\nimport {SelectOpponentsProps} from '../select-opponents/types';\n\nconst propTypes = {\n title: PropTypes.shape(Title.propTypes).isRequired,\n field: PropTypes.oneOfType([\n PropTypes.shape(Autocomplete.propTypes),\n PropTypes.shape(SelectMultiple.propTypes),\n PropTypes.shape(SelectOpponents.propTypes)\n ]),\n childType: PropTypes.oneOf(['autoComplete', 'selectMultiple', 'selectOpponents']).isRequired\n};\nexport type TitleAndInputProps = {\n title: {\n title: string;\n subtitle: string;\n type: string;\n 'data-name': string;\n };\n field:\n | React.ComponentProps<typeof SelectMultiple>\n | React.ComponentProps<typeof Autocomplete>\n | SelectOpponentsProps;\n childType: string;\n};\n\nexport default propTypes;\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,YAAP,MAAyB,yBAAzB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,cAAP,MAA2B,gCAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AAGA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAEN,SAAS,CAACO,KAAV,CAAgBL,KAAK,CAACG,SAAtB,EAAiCG,UADxB;EAEhBC,KAAK,EAAET,SAAS,CAACU,SAAV,CAAoB,CACzBV,SAAS,CAACO,KAAV,CAAgBN,YAAY,CAACI,SAA7B,CADyB,EAEzBL,SAAS,CAACO,KAAV,CAAgBJ,cAAc,CAACE,SAA/B,CAFyB,EAGzBL,SAAS,CAACO,KAAV,CAAgBH,eAAe,CAACC,SAAhC,CAHyB,CAApB,CAFS;EAOhBM,SAAS,EAAEX,SAAS,CAACY,KAAV,CAAgB,CAAC,cAAD,EAAiB,gBAAjB,EAAmC,iBAAnC,CAAhB,EAAuEJ;AAPlE,CAAlB;AAuBA,eAAeH,SAAf"}
|