@coorpacademy/components 11.38.3-alpha.13 → 11.38.3-alpha.18
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/input-search/index.d.ts +1 -0
- package/es/atom/input-search/index.d.ts.map +1 -1
- package/es/atom/input-search/index.js +16 -2
- package/es/atom/input-search/index.js.map +1 -1
- package/es/atom/input-search/style.css +7 -1
- package/es/molecule/cm-popin/types.d.ts +1 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/index.d.ts +1 -0
- package/es/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/prop-types.d.ts +1 -0
- package/es/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/es/molecule/search-form/index.d.ts +2 -0
- package/es/molecule/search-form/index.d.ts.map +1 -1
- package/es/molecule/search-form/index.js +9 -1
- package/es/molecule/search-form/index.js.map +1 -1
- package/es/organism/brand-table/index.d.ts +1 -0
- package/es/organism/content-skill-modal/index.d.ts +2 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +2 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/index.d.ts +1 -0
- package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/props-types.d.ts +1 -0
- package/es/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/es/organism/list-items/index.d.ts +1 -0
- package/es/organism/mooc-header/index.d.ts +2 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +29 -7
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/template/app-player/loading/index.d.ts +1 -0
- package/es/template/app-player/player/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts +1 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +1 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +1 -0
- package/es/template/app-review/index.d.ts +1 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +1 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +1 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +6 -0
- package/es/template/common/dashboard/index.d.ts +2 -0
- package/es/template/common/search-page/index.d.ts +1 -0
- package/es/template/external-course/index.d.ts +1 -0
- package/es/util/check-is-mobile.js +3 -2
- package/es/util/check-is-mobile.js.map +1 -1
- package/lib/atom/input-search/index.d.ts +1 -0
- package/lib/atom/input-search/index.d.ts.map +1 -1
- package/lib/atom/input-search/index.js +16 -2
- package/lib/atom/input-search/index.js.map +1 -1
- package/lib/atom/input-search/style.css +7 -1
- package/lib/molecule/cm-popin/types.d.ts +1 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/index.d.ts +1 -0
- package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/prop-types.d.ts +1 -0
- package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/lib/molecule/search-form/index.d.ts +2 -0
- package/lib/molecule/search-form/index.d.ts.map +1 -1
- package/lib/molecule/search-form/index.js +9 -1
- package/lib/molecule/search-form/index.js.map +1 -1
- package/lib/organism/brand-table/index.d.ts +1 -0
- package/lib/organism/content-skill-modal/index.d.ts +2 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +2 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/index.d.ts +1 -0
- package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts +1 -0
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/lib/organism/list-items/index.d.ts +1 -0
- package/lib/organism/mooc-header/index.d.ts +2 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +29 -7
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/template/app-player/loading/index.d.ts +1 -0
- package/lib/template/app-player/player/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts +1 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +1 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +1 -0
- package/lib/template/app-review/index.d.ts +1 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +1 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +1 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +6 -0
- package/lib/template/common/dashboard/index.d.ts +2 -0
- package/lib/template/common/search-page/index.d.ts +1 -0
- package/lib/template/external-course/index.d.ts +1 -0
- package/lib/util/check-is-mobile.js +3 -2
- package/lib/util/check-is-mobile.js.map +1 -1
- package/package.json +2 -2
|
@@ -31,6 +31,7 @@ declare namespace Search {
|
|
|
31
31
|
const onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
32
|
const onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
const onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
|
+
const onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
35
|
const theme: PropTypes.Requireable<string>;
|
|
35
36
|
const dataTestId: PropTypes.Requireable<string>;
|
|
36
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";AAiBA,iDA+EC"}
|
|
@@ -6,6 +6,10 @@ import classnames from 'classnames';
|
|
|
6
6
|
import { NovaCompositionCoorpacademySearchThin as CMSearchIcon, NovaCompositionCoorpacademySearch as SearchIcon, NovaSolidStatusClose as CloseIcon } from '@coorpacademy/nova-icons';
|
|
7
7
|
import Provider from '../provider';
|
|
8
8
|
import style from './style.css';
|
|
9
|
+
const handleMouseDown = e => {
|
|
10
|
+
e.preventDefault();
|
|
11
|
+
e.stopPropagation();
|
|
12
|
+
};
|
|
9
13
|
const Search = props => {
|
|
10
14
|
const {
|
|
11
15
|
value,
|
|
@@ -14,10 +18,16 @@ const Search = props => {
|
|
|
14
18
|
onClear = _noop,
|
|
15
19
|
onFocus,
|
|
16
20
|
onBlur,
|
|
21
|
+
onKeyDown,
|
|
17
22
|
theme = 'default',
|
|
18
23
|
dataTestId
|
|
19
24
|
} = props;
|
|
20
25
|
const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);
|
|
26
|
+
const handleKeyDown = useMemo(() => e => {
|
|
27
|
+
if (onKeyDown) {
|
|
28
|
+
onKeyDown(e);
|
|
29
|
+
}
|
|
30
|
+
}, [onKeyDown]);
|
|
21
31
|
const isCoorpManager = theme === 'coorpmanager';
|
|
22
32
|
const isMooc = theme === 'mooc';
|
|
23
33
|
const isDefault = theme === 'default';
|
|
@@ -44,7 +54,9 @@ const Search = props => {
|
|
|
44
54
|
htmlFor: "search",
|
|
45
55
|
title: placeholder
|
|
46
56
|
}, /*#__PURE__*/React.createElement(SearchIconComponent, {
|
|
47
|
-
className: style.searchIcon
|
|
57
|
+
className: style.searchIcon,
|
|
58
|
+
"data-name": "search-icon",
|
|
59
|
+
onMouseDown: handleMouseDown
|
|
48
60
|
}), showTitle ? /*#__PURE__*/React.createElement("span", {
|
|
49
61
|
className: classnames(style.title, _isEmpty(value) && style.noValue)
|
|
50
62
|
}, placeholder) : null), /*#__PURE__*/React.createElement("input", {
|
|
@@ -61,7 +73,8 @@ const Search = props => {
|
|
|
61
73
|
onInput: handleChange,
|
|
62
74
|
onFocus: onFocus,
|
|
63
75
|
onChange: _noop,
|
|
64
|
-
onBlur: onBlur
|
|
76
|
+
onBlur: onBlur,
|
|
77
|
+
onKeyDown: handleKeyDown
|
|
65
78
|
}), showClearIcon ? /*#__PURE__*/React.createElement(CloseIcon, {
|
|
66
79
|
onClick: onClear,
|
|
67
80
|
className: style.clearIcon
|
|
@@ -77,6 +90,7 @@ Search.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
77
90
|
onClear: PropTypes.func,
|
|
78
91
|
onFocus: PropTypes.func,
|
|
79
92
|
onBlur: PropTypes.func,
|
|
93
|
+
onKeyDown: PropTypes.func,
|
|
80
94
|
theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),
|
|
81
95
|
dataTestId: PropTypes.string
|
|
82
96
|
} : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionCoorpacademySearchThin","CMSearchIcon","NovaCompositionCoorpacademySearch","SearchIcon","NovaSolidStatusClose","CloseIcon","Provider","style","Search","props","value","placeholder","onChange","_noop","onClear","onFocus","onBlur","theme","dataTestId","handleChange","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionCoorpacademySearchThin","CMSearchIcon","NovaCompositionCoorpacademySearch","SearchIcon","NovaSolidStatusClose","CloseIcon","Provider","style","handleMouseDown","e","preventDefault","stopPropagation","Search","props","value","placeholder","onChange","_noop","onClear","onFocus","onBlur","onKeyDown","theme","dataTestId","handleChange","target","handleKeyDown","isCoorpManager","isMooc","isDefault","wrapperClass","wrapperSearch","coorpmanager","wrapperMooc","wrapperParentClass","wrapperMoocParent","searchClass","search","moocSearch","SearchIconComponent","showTitle","showClearIcon","createElement","className","htmlFor","title","searchIcon","onMouseDown","_isEmpty","noValue","type","name","id","onInput","onClick","clearIcon","contextTypes","skin","childContextTypes","propTypes","process","env","NODE_ENV","string","isRequired","func","oneOf"],"sources":["../../../src/atom/input-search/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademySearchThin as CMSearchIcon,\n NovaCompositionCoorpacademySearch as SearchIcon,\n NovaSolidStatusClose as CloseIcon\n} from '@coorpacademy/nova-icons';\nimport {noop, isEmpty} from 'lodash/fp';\nimport Provider from '../provider';\nimport style from './style.css';\n\nconst handleMouseDown = e => {\n e.preventDefault();\n e.stopPropagation();\n};\n\nconst Search = props => {\n const {\n value,\n placeholder,\n onChange = noop,\n onClear = noop,\n onFocus,\n onBlur,\n onKeyDown,\n theme = 'default',\n dataTestId\n } = props;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n \n const handleKeyDown = useMemo(() => e => {\n if (onKeyDown) {\n onKeyDown(e);\n }\n }, [onKeyDown]);\n\n const isCoorpManager = theme === 'coorpmanager';\n const isMooc = theme === 'mooc';\n const isDefault = theme === 'default';\n\n const wrapperClass = classnames({\n [style.wrapperSearch]: isDefault,\n [style.coorpmanager]: isCoorpManager,\n [style.wrapperMooc]: isMooc\n });\n\n const wrapperParentClass = classnames({\n [style.wrapperMoocParent]: isMooc\n });\n\n const searchClass = classnames({\n [style.search]: true,\n [style.moocSearch]: isMooc\n });\n\n const SearchIconComponent = isCoorpManager ? CMSearchIcon : SearchIcon;\n const showTitle = isCoorpManager;\n const showClearIcon = value && isCoorpManager;\n\n return (\n <div className={wrapperParentClass}>\n <div className={wrapperClass}>\n <label htmlFor=\"search\" title={placeholder}>\n <SearchIconComponent\n className={style.searchIcon}\n data-name=\"search-icon\"\n onMouseDown={handleMouseDown}\n />\n {showTitle ? (\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {placeholder}\n </span>\n ) : null}\n </label>\n <input\n data-name=\"search-input\"\n data-testid={dataTestId}\n className={searchClass}\n aria-label={placeholder}\n type=\"text\"\n name=\"search\"\n id=\"search\"\n placeholder={placeholder}\n title={placeholder}\n value={value}\n onInput={handleChange}\n onFocus={onFocus}\n onChange={noop}\n onBlur={onBlur}\n onKeyDown={handleKeyDown}\n />\n {showClearIcon ? <CloseIcon onClick={onClear} className={style.clearIcon} /> : null}\n </div>\n </div>\n );\n};\n\nSearch.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n placeholder: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n onClear: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n onKeyDown: PropTypes.func,\n theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),\n dataTestId: PropTypes.string\n};\n\nexport default Search;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,qCAAqC,IAAIC,YAAY,EACrDC,iCAAiC,IAAIC,UAAU,EAC/CC,oBAAoB,IAAIC,SAAS,QAC5B,0BAA0B;AAEjC,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,eAAe,GAAGC,CAAC,IAAI;EAC3BA,CAAC,CAACC,cAAc,CAAC,CAAC;EAClBD,CAAC,CAACE,eAAe,CAAC,CAAC;AACrB,CAAC;AAED,MAAMC,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IACJC,KAAK;IACLC,WAAW;IACXC,QAAQ,GAAAC,KAAO;IACfC,OAAO,GAAAD,KAAO;IACdE,OAAO;IACPC,MAAM;IACNC,SAAS;IACTC,KAAK,GAAG,SAAS;IACjBC;EACF,CAAC,GAAGV,KAAK;EACT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,IAAI;EACxB/C,OAAO,EAAEpB,SAAS,CAACmE,IAAI;EACvB9C,OAAO,EAAErB,SAAS,CAACmE,IAAI;EACvB7C,MAAM,EAAEtB,SAAS,CAACmE,IAAI;EACtB5C,SAAS,EAAEvB,SAAS,CAACmE,IAAI;EACzB3C,KAAK,EAAExB,SAAS,CAACoE,KAAK,CAAC,CAAC,SAAS,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;EAC3D3C,UAAU,EAAEzB,SAAS,CAACiE;AACxB,CAAC;AAED,eAAenD,MAAM","ignoreList":[]}
|
|
@@ -648,6 +648,7 @@ declare const propTypes: {
|
|
|
648
648
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
649
649
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
650
650
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
651
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
651
652
|
theme: PropTypes.Requireable<string>;
|
|
652
653
|
dataTestId: PropTypes.Requireable<string>;
|
|
653
654
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAC,SAAS,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE3D,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC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E,UAAU,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IAC1D,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;QACzB,IAAI,EACA,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,GAChD,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -39,6 +39,7 @@ declare const MultiFilterPanel: {
|
|
|
39
39
|
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
40
40
|
onFocus: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
41
41
|
onBlur: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
42
|
+
onKeyDown: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
42
43
|
theme: import("prop-types").Requireable<string>;
|
|
43
44
|
dataTestId: import("prop-types").Requireable<string>;
|
|
44
45
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE,OAAkB,EAAC,qBAAqB,EAAqB,MAAM,cAAc,CAAC;AAqBlF,QAAA,MAAM,gBAAgB;YAAW,qBAAqB,WAAW,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE,OAAkB,EAAC,qBAAqB,EAAqB,MAAM,cAAc,CAAC;AAqBlF,QAAA,MAAM,gBAAgB;YAAW,qBAAqB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDhF,CAAC;AAQF,eAAe,gBAAgB,CAAC"}
|
|
@@ -37,6 +37,7 @@ declare const propTypes: {
|
|
|
37
37
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
38
38
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
39
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
41
|
theme: PropTypes.Requireable<string>;
|
|
41
42
|
dataTestId: PropTypes.Requireable<string>;
|
|
42
43
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAAC,eAAe,EAAC,MAAM,uCAAuC,CAAC;AAC3F,OAAyC,EACvC,4BAA4B,EAC7B,MAAM,uDAAuD,CAAC;AAE/D,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAAC,eAAe,EAAC,MAAM,uCAAuC,CAAC;AAC3F,OAAyC,EACvC,4BAA4B,EAC7B,MAAM,uDAAuD,CAAC;AAE/D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAed,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,4BAA4B,CAAC;CACvC,CAAC;AAEF,oBAAY,kBAAkB,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAEzE,oBAAY,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -8,6 +8,7 @@ declare namespace SearchForm {
|
|
|
8
8
|
onReset: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
9
|
onSearchFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
10
|
onSearchBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
+
onSearchKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
12
|
search: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
13
|
value: PropTypes.Requireable<string>;
|
|
13
14
|
placeholder: PropTypes.Validator<string>;
|
|
@@ -15,6 +16,7 @@ declare namespace SearchForm {
|
|
|
15
16
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
17
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
18
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
20
|
theme: PropTypes.Requireable<string>;
|
|
19
21
|
dataTestId: PropTypes.Requireable<string>;
|
|
20
22
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/search-form/index.js"],"names":[],"mappings":";AAOA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/search-form/index.js"],"names":[],"mappings":";AAOA,mEAgEC"}
|
|
@@ -14,6 +14,7 @@ const SearchForm = (props, context) => {
|
|
|
14
14
|
search,
|
|
15
15
|
onSearchFocus,
|
|
16
16
|
onSearchBlur,
|
|
17
|
+
onSearchKeyDown,
|
|
17
18
|
'search-reset-aria-label': searchResetAriaLabel,
|
|
18
19
|
dataTestId,
|
|
19
20
|
theme
|
|
@@ -22,6 +23,11 @@ const SearchForm = (props, context) => {
|
|
|
22
23
|
evt.preventDefault();
|
|
23
24
|
return onSubmit && onSubmit(evt);
|
|
24
25
|
}, [onSubmit]);
|
|
26
|
+
const handleReset = useMemo(() => evt => {
|
|
27
|
+
evt.preventDefault();
|
|
28
|
+
evt.stopPropagation();
|
|
29
|
+
return onReset && onReset(evt);
|
|
30
|
+
}, [onReset]);
|
|
25
31
|
const isMooc = theme === 'mooc';
|
|
26
32
|
const clearClassName = search.value ? classnames(style.wrapperClear, isMooc && style.wrapperClearMooc) : style.wrapperNoClear;
|
|
27
33
|
return /*#__PURE__*/React.createElement("form", {
|
|
@@ -34,12 +40,13 @@ const SearchForm = (props, context) => {
|
|
|
34
40
|
}, /*#__PURE__*/React.createElement(Search, _extends({}, search, {
|
|
35
41
|
onFocus: onSearchFocus,
|
|
36
42
|
onBlur: onSearchBlur,
|
|
43
|
+
onKeyDown: onSearchKeyDown,
|
|
37
44
|
dataTestId: dataTestId,
|
|
38
45
|
theme: theme
|
|
39
46
|
})), /*#__PURE__*/React.createElement("div", {
|
|
40
47
|
"data-name": "search-form-reset",
|
|
41
48
|
"aria-label": searchResetAriaLabel,
|
|
42
|
-
|
|
49
|
+
onMouseDown: handleReset,
|
|
43
50
|
className: clearClassName
|
|
44
51
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
45
52
|
icon: "xmark",
|
|
@@ -53,6 +60,7 @@ SearchForm.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
53
60
|
onReset: PropTypes.func,
|
|
54
61
|
onSearchFocus: PropTypes.func,
|
|
55
62
|
onSearchBlur: PropTypes.func,
|
|
63
|
+
onSearchKeyDown: PropTypes.func,
|
|
56
64
|
search: PropTypes.shape(Search.propTypes),
|
|
57
65
|
'search-reset-aria-label': PropTypes.string,
|
|
58
66
|
dataTestId: PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","FontAwesomeIcon","classnames","Search","style","SearchForm","props","context","action","method","onSubmit","onReset","search","onSearchFocus","onSearchBlur","searchResetAriaLabel","dataTestId","theme","handleSubmit","evt","preventDefault","isMooc","clearClassName","value","wrapperClear","wrapperClearMooc","wrapperNoClear","createElement","className","form","placeholder","_extends","onFocus","onBlur","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","FontAwesomeIcon","classnames","Search","style","SearchForm","props","context","action","method","onSubmit","onReset","search","onSearchFocus","onSearchBlur","onSearchKeyDown","searchResetAriaLabel","dataTestId","theme","handleSubmit","evt","preventDefault","handleReset","stopPropagation","isMooc","clearClassName","value","wrapperClear","wrapperClearMooc","wrapperNoClear","createElement","className","form","placeholder","_extends","onFocus","onBlur","onKeyDown","onMouseDown","icon","clearIcon","propTypes","process","env","NODE_ENV","string","func","shape"],"sources":["../../../src/molecule/search-form/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport classnames from 'classnames';\nimport Search from '../../atom/input-search';\nimport style from './style.css';\n\nconst SearchForm = (props, context) => {\n const {\n action,\n method,\n onSubmit,\n onReset,\n search,\n onSearchFocus,\n onSearchBlur,\n onSearchKeyDown,\n 'search-reset-aria-label': searchResetAriaLabel,\n dataTestId,\n theme\n } = props;\n const handleSubmit = useMemo(\n () => evt => {\n evt.preventDefault();\n return onSubmit && onSubmit(evt);\n },\n [onSubmit]\n );\n\n const handleReset = useMemo(\n () => evt => {\n evt.preventDefault();\n evt.stopPropagation();\n return onReset && onReset(evt);\n },\n [onReset]\n );\n\n const isMooc = theme === 'mooc';\n\n const clearClassName = search.value\n ? classnames(style.wrapperClear, isMooc && style.wrapperClearMooc)\n : style.wrapperNoClear;\n\n return (\n <form\n className={style.form}\n action={action}\n method={method}\n onSubmit={handleSubmit}\n data-name=\"searchForm\"\n aria-label={search.placeholder}\n >\n <Search\n {...search}\n onFocus={onSearchFocus}\n onBlur={onSearchBlur}\n onKeyDown={onSearchKeyDown}\n dataTestId={dataTestId}\n theme={theme}\n />\n <div\n data-name=\"search-form-reset\"\n aria-label={searchResetAriaLabel}\n onMouseDown={handleReset}\n className={clearClassName}\n >\n <FontAwesomeIcon icon=\"xmark\" className={style.clearIcon} />\n </div>\n </form>\n );\n};\n\nSearchForm.propTypes = {\n action: PropTypes.string,\n method: PropTypes.string,\n onSubmit: PropTypes.func,\n onReset: PropTypes.func,\n onSearchFocus: PropTypes.func,\n onSearchBlur: PropTypes.func,\n onSearchKeyDown: PropTypes.func,\n search: PropTypes.shape(Search.propTypes),\n 'search-reset-aria-label': PropTypes.string,\n dataTestId: PropTypes.string,\n theme: PropTypes.string\n};\n\nexport default SearchForm;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAAQC,eAAe,QAAO,gCAAgC;AAC9D,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,UAAU,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EACrC,MAAM;IACJC,MAAM;IACNC,MAAM;IACNC,QAAQ;IACRC,OAAO;IACPC,MAAM;IACNC,aAAa;IACbC,YAAY;IACZC,eAAe;IACf,yBAAyB,EAAEC,oBAAoB;IAC/CC,UAAU;IACVC;EACF,CAAC,GAAGZ,KAAK;EACT,MAAMa,YAAY,GAAGpB,OAAO,CAC1B,MAAMqB,GAAG,IAAI;IACXA,GAAG,CAACC,cAAc,CAAC,CAAC;IACpB,OAAOX,QAAQ,IAAIA,QAAQ,CAACU,GAAG,CAAC;EAClC,CAAC,EACD,CAACV,QAAQ,CACX,CAAC;EAED,MAAMY,WAAW,GAAGvB,OAAO,CACzB,MAAMqB,GAAG,IAAI;IACXA,GAAG,CAACC,cAAc,CAAC,CAAC;IACpBD,GAAG,CAACG,eAAe,CAAC,CAAC;IACrB,OAAOZ,OAAO,IAAIA,OAAO,CAACS,GAAG,CAAC;EAChC,CAAC,EACD,CAACT,OAAO,CACV,CAAC;EAED,MAAMa,MAAM,GAAGN,KAAK,KAAK,MAAM;EAE/B,MAAMO,cAAc,GAAGb,MAAM,CAACc,KAAK,GAC/BxB,UAAU,CAACE,KAAK,CAACuB,YAAY,EAAEH,MAAM,IAAIpB,KAAK,CAACwB,gBAAgB,CAAC,GAChExB,KAAK,CAACyB,cAAc;EAExB,oBACE/B,KAAA,CAAAgC,aAAA;IACEC,SAAS,EAAE3B,KAAK,CAAC4B,IAAK;IACtBxB,MAAM,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@ -9,6 +9,7 @@ declare namespace BrandTable {
|
|
|
9
9
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
10
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
11
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
13
|
theme: PropTypes.Requireable<string>;
|
|
13
14
|
dataTestId: PropTypes.Requireable<string>;
|
|
14
15
|
}>>;
|
|
@@ -493,6 +493,7 @@ declare const ContentSkillModal: {
|
|
|
493
493
|
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
494
494
|
onFocus: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
495
495
|
onBlur: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
496
|
+
onKeyDown: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
496
497
|
theme: import("prop-types").Requireable<string>;
|
|
497
498
|
dataTestId: import("prop-types").Requireable<string>;
|
|
498
499
|
}>>;
|
|
@@ -670,6 +671,7 @@ declare const ContentSkillModal: {
|
|
|
670
671
|
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
671
672
|
onFocus: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
672
673
|
onBlur: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
674
|
+
onKeyDown: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
673
675
|
theme: import("prop-types").Requireable<string>;
|
|
674
676
|
dataTestId: import("prop-types").Requireable<string>;
|
|
675
677
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAOlD,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAOlD,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DvD,CAAC;AAQF,eAAe,iBAAiB,CAAC"}
|
|
@@ -490,6 +490,7 @@ declare const ContentSkillModalPropTypes: {
|
|
|
490
490
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
491
491
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
492
492
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
493
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
493
494
|
theme: PropTypes.Requireable<string>;
|
|
494
495
|
dataTestId: PropTypes.Requireable<string>;
|
|
495
496
|
}>>;
|
|
@@ -667,6 +668,7 @@ declare const ContentSkillModalPropTypes: {
|
|
|
667
668
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
668
669
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
669
670
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
671
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
670
672
|
theme: PropTypes.Requireable<string>;
|
|
671
673
|
dataTestId: PropTypes.Requireable<string>;
|
|
672
674
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAkC,EAChC,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;AAStD,QAAA,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAkC,EAChC,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;AAStD,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI/B,CAAC;AAEF,eAAe,0BAA0B,CAAC;AAE1C,aAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;IACpD,OAAO,EAAE,qBAAqB,CAAC;IAC/B,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC"}
|
|
@@ -21,6 +21,7 @@ declare const FilterCheckboxAndSearch: {
|
|
|
21
21
|
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
22
22
|
onFocus: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
23
23
|
onBlur: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
24
|
+
onKeyDown: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
24
25
|
theme: import("prop-types").Requireable<string>;
|
|
25
26
|
dataTestId: import("prop-types").Requireable<string>;
|
|
26
27
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-checkbox-and-search/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAKjE,OAAkB,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAiBtE,QAAA,MAAM,uBAAuB;YACpB,4BAA4B,WAC1B,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-checkbox-and-search/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAKjE,OAAkB,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAiBtE,QAAA,MAAM,uBAAuB;YACpB,4BAA4B,WAC1B,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiG1B,CAAC;AAQF,eAAe,uBAAuB,CAAC"}
|
|
@@ -17,6 +17,7 @@ declare const propTypes: {
|
|
|
17
17
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
18
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
19
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
21
|
theme: PropTypes.Requireable<string>;
|
|
21
22
|
dataTestId: PropTypes.Requireable<string>;
|
|
22
23
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props-types.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-checkbox-and-search/props-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"props-types.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-checkbox-and-search/props-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;CAcd,CAAC;AAEF,oBAAY,8BAA8B,GAAG;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,aAAK,UAAU,GAAG;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,UAAU,CAAC;IAC1B,OAAO,EAAE,8BAA8B,EAAE,CAAC;CAC3C,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -499,6 +499,7 @@ declare namespace ListItems {
|
|
|
499
499
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
500
500
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
501
501
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
502
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
502
503
|
theme: PropTypes.Requireable<string>;
|
|
503
504
|
dataTestId: PropTypes.Requireable<string>;
|
|
504
505
|
}>>;
|
|
@@ -17,6 +17,7 @@ declare class MoocHeader extends React.Component<any, any, any> {
|
|
|
17
17
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
18
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
19
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
21
|
theme: PropTypes.Requireable<string>;
|
|
21
22
|
dataTestId: PropTypes.Requireable<string>;
|
|
22
23
|
}>>;
|
|
@@ -169,6 +170,7 @@ declare class MoocHeader extends React.Component<any, any, any> {
|
|
|
169
170
|
handleOnMouseOver(): void;
|
|
170
171
|
handleOnMouseLeave(): void;
|
|
171
172
|
handleKeyPress(event: any): void;
|
|
173
|
+
handleSearchKeyDown(event: any): void;
|
|
172
174
|
searchBarRef: any;
|
|
173
175
|
setSearchBarRef(ref: any): void;
|
|
174
176
|
handleClickOutside(event: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAuBA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAuBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsGE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBA+BC;IA7BC,kBAAiD;IACjD;;;;;;;MAOC;IAwFH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAgBC;IAED,0BAKC;IAED,sBAIC;IAED,qBAiBC;IAaD,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IAED,sCAKC;IAhMC,kBAAwB;IAyB1B,gCAEC;IAED,qCAqBC;IAkFD,sCASC;IAvID,0BAEC;IAED,2EASC;IAED,6BAEC;IA8BC,kBAAsB;IA6IxB,0DAaE;IAEF,6BA4iBC;CACF"}
|
|
@@ -49,6 +49,7 @@ class MoocHeader extends React.Component {
|
|
|
49
49
|
this.handleOnMouseOver = this.handleOnMouseOver.bind(this);
|
|
50
50
|
this.handleOnMouseLeave = this.handleOnMouseLeave.bind(this);
|
|
51
51
|
this.handleKeyPress = this.handleKeyPress.bind(this);
|
|
52
|
+
this.handleSearchKeyDown = this.handleSearchKeyDown.bind(this);
|
|
52
53
|
this.searchBarRef = null;
|
|
53
54
|
this.setSearchBarRef = this.setSearchBarRef.bind(this);
|
|
54
55
|
this.handleClickOutside = this.handleClickOutside.bind(this);
|
|
@@ -80,9 +81,17 @@ class MoocHeader extends React.Component {
|
|
|
80
81
|
isFocus
|
|
81
82
|
} = this.state;
|
|
82
83
|
if (isFocus) {
|
|
83
|
-
if (
|
|
84
|
-
|
|
84
|
+
if (event.target.getAttribute('data-name') === 'mobile-overlay') {
|
|
85
|
+
return;
|
|
85
86
|
}
|
|
87
|
+
const resetButton = event.target.getAttribute('data-name') === 'search-form-reset' || event.target.closest('[data-name="search-form-reset"]');
|
|
88
|
+
if (resetButton) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (this.searchBarRef && this.searchBarRef.contains(event.target)) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
this.handleOnBlur();
|
|
86
95
|
}
|
|
87
96
|
}
|
|
88
97
|
setMenuSettings(el) {
|
|
@@ -120,8 +129,14 @@ class MoocHeader extends React.Component {
|
|
|
120
129
|
const {
|
|
121
130
|
onSubmitSearch
|
|
122
131
|
} = this.props;
|
|
132
|
+
const searchInput = document.querySelector('input[name="search"]');
|
|
133
|
+
if (searchInput) {
|
|
134
|
+
searchInput.blur();
|
|
135
|
+
}
|
|
123
136
|
this.setState({
|
|
124
|
-
isFocus: false
|
|
137
|
+
isFocus: false,
|
|
138
|
+
isClosing: false,
|
|
139
|
+
isClosingStep2: false
|
|
125
140
|
});
|
|
126
141
|
if (onSubmitSearch) {
|
|
127
142
|
onSubmitSearch();
|
|
@@ -161,9 +176,7 @@ class MoocHeader extends React.Component {
|
|
|
161
176
|
const {
|
|
162
177
|
isClosingStep2
|
|
163
178
|
} = this.state;
|
|
164
|
-
// Vérifie que c'est bien la bonne propriété qui finit sa transition (max-width desktop, width mobile)
|
|
165
179
|
if ((event.propertyName === 'max-width' || event.propertyName === 'width') && isClosingStep2) {
|
|
166
|
-
// Animation complète terminée, on ferme tout
|
|
167
180
|
this.setState({
|
|
168
181
|
isFocus: false,
|
|
169
182
|
isClosing: false,
|
|
@@ -214,6 +227,12 @@ class MoocHeader extends React.Component {
|
|
|
214
227
|
}));
|
|
215
228
|
}
|
|
216
229
|
}
|
|
230
|
+
handleSearchKeyDown(event) {
|
|
231
|
+
if (event.key === 'Enter') {
|
|
232
|
+
event.preventDefault();
|
|
233
|
+
this.handleSubmitSearch();
|
|
234
|
+
}
|
|
235
|
+
}
|
|
217
236
|
createMenuButtons = (items, primaryColor) => {
|
|
218
237
|
return items.map(item => ({
|
|
219
238
|
label: item.title,
|
|
@@ -590,6 +609,7 @@ class MoocHeader extends React.Component {
|
|
|
590
609
|
onReset: this.handleResetSearch,
|
|
591
610
|
onSearchFocus: this.handleOnFocus,
|
|
592
611
|
onSearchBlur: this.handleOnBlur,
|
|
612
|
+
onSearchKeyDown: this.handleSearchKeyDown,
|
|
593
613
|
"search-reset-aria-label": searchResetAriaLabel,
|
|
594
614
|
theme: "mooc"
|
|
595
615
|
}));
|
|
@@ -670,10 +690,12 @@ class MoocHeader extends React.Component {
|
|
|
670
690
|
/*#__PURE__*/
|
|
671
691
|
// Version mobile simplifiée
|
|
672
692
|
React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
673
|
-
className: isFocus ? style.mobileSearchContainerFocus : style.mobileSearchContainer
|
|
693
|
+
className: isFocus ? style.mobileSearchContainerFocus : style.mobileSearchContainer,
|
|
694
|
+
ref: this.setSearchBarRef
|
|
674
695
|
}, searchFormView), isFocus ? /*#__PURE__*/React.createElement("div", {
|
|
675
696
|
className: style.mobileSearchOverlay,
|
|
676
|
-
onClick: this.handleOnBlur
|
|
697
|
+
onClick: this.handleOnBlur,
|
|
698
|
+
"data-name": "mobile-overlay"
|
|
677
699
|
}) : null, /*#__PURE__*/React.createElement("nav", {
|
|
678
700
|
className: isMenuOpen ? style.menuWrapper : style.hiddenMenuWrapper,
|
|
679
701
|
"data-name": "menu-wrapper"
|