@coorpacademy/components 11.11.1-alpha.0 → 11.11.2
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.map +1 -1
- package/es/atom/input-search/index.js +1 -0
- package/es/atom/input-search/index.js.map +1 -1
- package/es/atom/input-switch/index.d.ts +2 -0
- package/es/atom/input-switch/index.d.ts.map +1 -1
- package/es/atom/input-switch/index.js +23 -11
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/select/index.d.ts +1 -0
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +13 -8
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/tooltip/index.d.ts +1 -3
- package/es/atom/tooltip/index.d.ts.map +1 -1
- package/es/atom/tooltip/index.js +7 -17
- package/es/atom/tooltip/index.js.map +1 -1
- package/es/atom/tooltip/style.css +2 -10
- package/es/globals.d.js.map +1 -1
- package/es/molecule/brand-form-group/index.d.ts +8 -0
- package/es/molecule/cm-popin/types.d.ts +2 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +2 -0
- package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/es/molecule/filters/filters-wrapper.js +4 -1
- package/es/molecule/filters/filters-wrapper.js.map +1 -1
- package/es/molecule/filters/index.d.ts +2 -0
- package/es/molecule/filters/index.d.ts.map +1 -1
- package/es/molecule/filters/index.js +10 -3
- package/es/molecule/filters/index.js.map +1 -1
- package/es/molecule/setup-section/index.d.ts +2 -0
- package/es/molecule/setup-section/index.d.ts.map +1 -1
- package/es/molecule/setup-sections/index.d.ts +2 -0
- package/es/molecule/setup-slide/index.d.ts +3 -0
- package/es/molecule/setup-slider/index.d.ts +3 -0
- package/es/molecule/video-player-mobile/index.native.d.ts +1 -1
- package/es/molecule/video-player-mobile/index.native.d.ts.map +1 -1
- package/es/molecule/video-player-mobile/index.native.js +26 -9
- package/es/molecule/video-player-mobile/index.native.js.map +1 -1
- package/es/organism/brand-form/index.d.ts +8 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +4 -1
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/review-slide/index.native.d.ts.map +1 -1
- package/es/organism/review-slide/index.native.js +32 -15
- package/es/organism/review-slide/index.native.js.map +1 -1
- package/es/organism/user-preferences/index.d.ts +2 -0
- package/es/organism/wizard-contents/index.d.ts +8 -0
- package/es/template/activity/index.d.ts +12 -11
- package/es/template/activity/index.d.ts.map +1 -1
- package/es/template/activity/index.js +6 -3
- package/es/template/activity/index.js.map +1 -1
- package/es/template/app-player/loading/index.d.ts +2 -0
- package/es/template/app-player/player/index.d.ts +4 -0
- package/es/template/app-player/player/slides/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +2 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +2 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +2 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +18 -0
- package/es/template/common/dashboard/index.d.ts +2 -0
- package/es/template/common/search-page/index.d.ts +3 -0
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +6 -3
- package/es/template/common/search-page/index.js.map +1 -1
- package/lib/atom/input-search/index.d.ts.map +1 -1
- package/lib/atom/input-search/index.js +1 -0
- package/lib/atom/input-search/index.js.map +1 -1
- package/lib/atom/input-switch/index.d.ts +2 -0
- package/lib/atom/input-switch/index.d.ts.map +1 -1
- package/lib/atom/input-switch/index.js +22 -11
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/select/index.d.ts +1 -0
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +13 -8
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/tooltip/index.d.ts +1 -3
- package/lib/atom/tooltip/index.d.ts.map +1 -1
- package/lib/atom/tooltip/index.js +7 -18
- package/lib/atom/tooltip/index.js.map +1 -1
- package/lib/atom/tooltip/style.css +2 -10
- package/lib/globals.d.js.map +1 -1
- package/lib/molecule/brand-form-group/index.d.ts +8 -0
- package/lib/molecule/cm-popin/types.d.ts +2 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +2 -0
- package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
- package/lib/molecule/filters/filters-wrapper.js +4 -1
- package/lib/molecule/filters/filters-wrapper.js.map +1 -1
- package/lib/molecule/filters/index.d.ts +2 -0
- package/lib/molecule/filters/index.d.ts.map +1 -1
- package/lib/molecule/filters/index.js +9 -3
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/molecule/setup-section/index.d.ts +2 -0
- package/lib/molecule/setup-section/index.d.ts.map +1 -1
- package/lib/molecule/setup-sections/index.d.ts +2 -0
- package/lib/molecule/setup-slide/index.d.ts +3 -0
- package/lib/molecule/setup-slider/index.d.ts +3 -0
- package/lib/molecule/video-player-mobile/index.native.d.ts +1 -1
- package/lib/molecule/video-player-mobile/index.native.d.ts.map +1 -1
- package/lib/molecule/video-player-mobile/index.native.js +29 -9
- package/lib/molecule/video-player-mobile/index.native.js.map +1 -1
- package/lib/organism/brand-form/index.d.ts +8 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +4 -1
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/review-slide/index.native.d.ts.map +1 -1
- package/lib/organism/review-slide/index.native.js +31 -13
- package/lib/organism/review-slide/index.native.js.map +1 -1
- package/lib/organism/user-preferences/index.d.ts +2 -0
- package/lib/organism/wizard-contents/index.d.ts +8 -0
- package/lib/template/activity/index.d.ts +12 -11
- package/lib/template/activity/index.d.ts.map +1 -1
- package/lib/template/activity/index.js +6 -3
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/app-player/loading/index.d.ts +2 -0
- package/lib/template/app-player/player/index.d.ts +4 -0
- package/lib/template/app-player/player/slides/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +2 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +2 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +2 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +18 -0
- package/lib/template/common/dashboard/index.d.ts +2 -0
- package/lib/template/common/search-page/index.d.ts +3 -0
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +6 -3
- package/lib/template/common/search-page/index.js.map +1 -1
- package/locales/.mtslconfig.json +1 -0
- package/package.json +4 -2
- package/es/atom/battle-opponent/index.d.ts +0 -19
- package/es/atom/battle-opponent/index.d.ts.map +0 -1
- package/es/atom/battle-opponent/index.js +0 -52
- package/es/atom/battle-opponent/index.js.map +0 -1
- package/es/atom/battle-opponent/prop-types.d.ts +0 -19
- package/es/atom/battle-opponent/prop-types.d.ts.map +0 -1
- package/es/atom/battle-opponent/prop-types.js +0 -11
- package/es/atom/battle-opponent/prop-types.js.map +0 -1
- package/es/atom/battle-opponent/style.css +0 -126
- package/lib/atom/battle-opponent/index.d.ts +0 -19
- package/lib/atom/battle-opponent/index.d.ts.map +0 -1
- package/lib/atom/battle-opponent/index.js +0 -70
- package/lib/atom/battle-opponent/index.js.map +0 -1
- package/lib/atom/battle-opponent/prop-types.d.ts +0 -19
- package/lib/atom/battle-opponent/prop-types.d.ts.map +0 -1
- package/lib/atom/battle-opponent/prop-types.js +0 -20
- package/lib/atom/battle-opponent/prop-types.js.map +0 -1
- package/lib/atom/battle-opponent/style.css +0 -126
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"filters-wrapper.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/filters-wrapper.js"],"names":[],"mappings":";AAUA,sEA+DC"}
|
|
@@ -65,10 +65,13 @@ const FiltersWapper = (props, context) => {
|
|
|
65
65
|
className: style.choice,
|
|
66
66
|
key: idx
|
|
67
67
|
}, /*#__PURE__*/React.createElement("p", {
|
|
68
|
+
id: `title-id-${idx}`,
|
|
68
69
|
className: style.title
|
|
69
70
|
}, filter.title), /*#__PURE__*/React.createElement("div", {
|
|
70
71
|
className: style.toggle
|
|
71
|
-
}, /*#__PURE__*/React.createElement(InputSwitch, filter.display
|
|
72
|
+
}, /*#__PURE__*/React.createElement(InputSwitch, _extends({}, filter.display, {
|
|
73
|
+
"aria-labelledby": `title-id-${idx}`
|
|
74
|
+
}))));
|
|
72
75
|
|
|
73
76
|
default:
|
|
74
77
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-wrapper.js","names":["React","PropTypes","classnames","Select","InputSwitch","RadioGroup","RangeSlider","style","FiltersWapper","props","context","filters","className","filterGroupAriaLabel","buildFilter","filter","idx","type","fieldName","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","wrapperNone","wrapper","propTypes","string","arrayOf","shape","oneOf","isRequired"],"sources":["../../../src/molecule/filters/filters-wrapper.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport RangeSlider from '../../atom/range';\nimport style from './filters-wapper.css';\n\nconst FiltersWapper = (props, context) => {\n const {filters, className, filterGroupAriaLabel} = props;\n\n const buildFilter = (filter, idx) => {\n const {type, fieldName} = filter;\n switch (type) {\n case 'select':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <Select {...filter} />\n </div>\n );\n case 'radio':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <RadioGroup {...filter} className={style.radioGroup} />\n </div>\n );\n case 'range':\n return (\n <div\n data-name=\"choice\"\n data-filter-type={fieldName}\n className={style.timerWrapper}\n key={idx}\n >\n <label>\n <span className={style.title}>{filter.title}</span>\n <p className={style.timerSubtitle}>{filter.subtitle}</p>\n <RangeSlider {...filter} />\n </label>\n </div>\n );\n case 'switch':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}
|
|
1
|
+
{"version":3,"file":"filters-wrapper.js","names":["React","PropTypes","classnames","Select","InputSwitch","RadioGroup","RangeSlider","style","FiltersWapper","props","context","filters","className","filterGroupAriaLabel","buildFilter","filter","idx","type","fieldName","choice","title","radioGroup","timerWrapper","timerSubtitle","subtitle","toggle","display","filtersList","convert","cap","emptyFilters","wrapperNone","wrapper","propTypes","string","arrayOf","shape","oneOf","isRequired"],"sources":["../../../src/molecule/filters/filters-wrapper.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport RangeSlider from '../../atom/range';\nimport style from './filters-wapper.css';\n\nconst FiltersWapper = (props, context) => {\n const {filters, className, filterGroupAriaLabel} = props;\n\n const buildFilter = (filter, idx) => {\n const {type, fieldName} = filter;\n switch (type) {\n case 'select':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <Select {...filter} />\n </div>\n );\n case 'radio':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p className={style.title}>{filter.title}</p>\n <RadioGroup {...filter} className={style.radioGroup} />\n </div>\n );\n case 'range':\n return (\n <div\n data-name=\"choice\"\n data-filter-type={fieldName}\n className={style.timerWrapper}\n key={idx}\n >\n <label>\n <span className={style.title}>{filter.title}</span>\n <p className={style.timerSubtitle}>{filter.subtitle}</p>\n <RangeSlider {...filter} />\n </label>\n </div>\n );\n case 'switch':\n return (\n <div data-name=\"choice\" data-filter-type={fieldName} className={style.choice} key={idx}>\n <p id={`title-id-${idx}`} className={style.title}>\n {filter.title}\n </p>\n <div className={style.toggle}>\n <InputSwitch {...filter.display} aria-labelledby={`title-id-${idx}`} />\n </div>\n </div>\n );\n default:\n return null;\n }\n };\n\n const filtersList = map.convert({cap: false})(buildFilter, filters);\n const emptyFilters = isEmpty(filters);\n return (\n <form>\n <div\n className={classnames(className, emptyFilters ? style.wrapperNone : style.wrapper)}\n role=\"group\"\n aria-label={filterGroupAriaLabel}\n >\n {filtersList}\n </div>\n </form>\n );\n};\n\nFiltersWapper.propTypes = {\n className: PropTypes.string,\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf(['select', 'range', 'radio', 'switch']).isRequired,\n fieldName: PropTypes.string.isRequired\n })\n ),\n filterGroupAriaLabel: PropTypes.string\n};\nexport default FiltersWapper;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,UAAP,MAAuB,wB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ypes.Requireable<boolean>;
|
|
41
41
|
error: PropTypes.Requireable<boolean>;
|
|
42
42
|
'aria-label': PropTypes.Requireable<string>;
|
|
43
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
43
44
|
}>>;
|
|
44
45
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
45
46
|
onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -47,6 +48,7 @@ declare class Filters extends React.Component<any, any, any> {
|
|
|
47
48
|
moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
48
49
|
moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
49
50
|
filterGroupAriaLabel: PropTypes.Requireable<string>;
|
|
51
|
+
sortAriaLabel: PropTypes.Requireable<string>;
|
|
50
52
|
};
|
|
51
53
|
static contextTypes: {
|
|
52
54
|
skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBA4FC;CACF"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import _get from "lodash/fp/get";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
2
5
|
import React from 'react';
|
|
3
6
|
import PropTypes from 'prop-types';
|
|
4
7
|
import { NovaCompositionNavigationArrowDown as ArrowDown } from '@coorpacademy/nova-icons';
|
|
@@ -73,7 +76,8 @@ class Filters extends React.Component {
|
|
|
73
76
|
filters,
|
|
74
77
|
moreFilterAriaLabel,
|
|
75
78
|
moreSortAriaLabel,
|
|
76
|
-
filterGroupAriaLabel
|
|
79
|
+
filterGroupAriaLabel,
|
|
80
|
+
sortAriaLabel
|
|
77
81
|
} = this.props;
|
|
78
82
|
const {
|
|
79
83
|
filter,
|
|
@@ -92,7 +96,9 @@ class Filters extends React.Component {
|
|
|
92
96
|
const sortView = sorting !== undefined ? /*#__PURE__*/React.createElement("div", {
|
|
93
97
|
"data-name": "choice",
|
|
94
98
|
className: style.select
|
|
95
|
-
}, /*#__PURE__*/React.createElement(Select, sorting
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Select, _extends({}, sorting, {
|
|
100
|
+
"aria-label": sortAriaLabel
|
|
101
|
+
}))) : null;
|
|
96
102
|
return /*#__PURE__*/React.createElement("div", {
|
|
97
103
|
"data-name": "search",
|
|
98
104
|
className: style.search
|
|
@@ -174,7 +180,8 @@ Filters.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
174
180
|
onToggleSorts: PropTypes.func,
|
|
175
181
|
moreSortAriaLabel: PropTypes.string,
|
|
176
182
|
moreFilterAriaLabel: PropTypes.string,
|
|
177
|
-
filterGroupAriaLabel: PropTypes.string
|
|
183
|
+
filterGroupAriaLabel: PropTypes.string,
|
|
184
|
+
sortAriaLabel: PropTypes.string
|
|
178
185
|
} : {};
|
|
179
186
|
export default Filters;
|
|
180
187
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionNavigationArrowDown","ArrowDown","Select","Provider","style","FiltersWrapper","Filters","Component","constructor","props","state","filter","openFilters","sorted","openSorts","handleOpenFilter","bind","handleOpenSort","handleSearch","onToggleFilters","newValue","setState","onToggleSorts","onSearch","render","sorting","filterCTALabel","filterTabLabel","sortCTALabel","sortTabLabel","filters","moreFilterAriaLabel","moreSortAriaLabel","filterGroupAriaLabel","skin","context","defaultColor","darkColor","filtersActive","sortingActive","sortView","undefined","select","search","activeDefault","default","title","arrow","color","activeWrapperSortBy","wrapperSortBy","activeWrapperFilters","wrapperFilters","wrapper","CTAfilter","backgroundColor","activeSorting","contextTypes","childContextTypes","propTypes","string","bool","shape","func"],"sources":["../../../src/molecule/filters/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Select from '../../atom/select';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\nimport FiltersWrapper from './filters-wrapper';\n\nclass Filters extends React.Component {\n static propTypes = {\n filterCTALabel: PropTypes.string,\n filterTabLabel: PropTypes.string,\n sortCTALabel: PropTypes.string,\n sortTabLabel: PropTypes.string,\n openFilters: PropTypes.bool,\n openSorts: PropTypes.bool,\n filters: FiltersWrapper.propTypes.filters,\n sorting: PropTypes.shape(Select.propTypes),\n onSearch: PropTypes.func,\n onToggleFilters: PropTypes.func,\n onToggleSorts: PropTypes.func,\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n this.state = {\n filter: !!props.openFilters,\n sorted: !!props.openSorts\n };\n this.handleOpenFilter = this.handleOpenFilter.bind(this);\n this.handleOpenSort = this.handleOpenSort.bind(this);\n this.handleSearch = this.handleSearch.bind(this);\n }\n\n handleOpenFilter() {\n const {filter} = this.state;\n const {onToggleFilters} = this.props;\n\n const newValue = !filter;\n\n this.setState({\n filter: newValue,\n sorted: false\n });\n\n if (onToggleFilters) {\n onToggleFilters(newValue);\n }\n }\n\n handleOpenSort() {\n const {sorted} = this.state;\n const {onToggleSorts} = this.props;\n\n const newValue = !sorted;\n\n this.setState({\n sorted: newValue,\n filter: false\n });\n\n if (onToggleSorts) onToggleSorts(newValue);\n }\n\n handleSearch() {\n const {onSearch} = this.props;\n this.setState({\n sorted: false,\n filter: false\n });\n if (onSearch) onSearch();\n }\n\n render() {\n const {\n sorting,\n filterCTALabel,\n filterTabLabel,\n sortCTALabel,\n sortTabLabel,\n filters,\n moreFilterAriaLabel,\n moreSortAriaLabel,\n filterGroupAriaLabel\n } = this.props;\n const {filter, sorted} = this.state;\n const {skin} = this.context;\n\n const defaultColor = get('common.primary', skin);\n const darkColor = get('common.dark', skin);\n const filtersActive = filter === true;\n const sortingActive = sorted === true;\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\" className={style.select}>\n <Select {...sorting} />\n </div>\n ) : null;\n\n return (\n <div data-name=\"search\" className={style.search}>\n <div\n data-name=\"filter\"\n data-open={filtersActive}\n className={filtersActive ? style.activeDefault : style.default}\n >\n <div className={style.title} data-name=\"filterButton\" onClick={this.handleOpenFilter}>\n {filterTabLabel}\n <div className={style.arrow}>\n <ArrowDown style={{color: darkColor}} height={14} aria-label={moreFilterAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"sortBy\"\n data-open={sortingActive}\n className={sortingActive ? style.activeWrapperSortBy : style.wrapperSortBy}\n >\n <div className={style.title} data-name=\"sortButton\" onClick={this.handleOpenSort}>\n {sortTabLabel}\n <div className={style.arrow}>\n <ArrowDown style={{color: darkColor}} height={14} aria-label={moreSortAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"filterWrapper\"\n className={filtersActive ? style.activeWrapperFilters : style.wrapperFilters}\n >\n <FiltersWrapper\n className={style.wrapper}\n filters={filters}\n filterGroupAriaLabel={filterGroupAriaLabel}\n />\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {filterCTALabel}\n </div>\n </div>\n <div\n data-name=\"sortWrapper\"\n className={sortingActive ? style.activeSorting : style.sorting}\n >\n {sortView}\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {sortCTALabel}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default Filters;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,cAAP,MAA2B,mBAA3B;;AAEA,MAAMC,OAAN,SAAsBR,KAAK,CAACS,SAA5B,CAAsC;EAsBpCC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IACA,KAAKC,KAAL,GAAa;MACXC,MAAM,EAAE,CAAC,CAACF,KAAK,CAACG,WADL;MAEXC,MAAM,EAAE,CAAC,CAACJ,KAAK,CAACK;IAFL,CAAb;IAIA,KAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBC,IAAtB,CAA2B,IAA3B,CAAxB;IACA,KAAKC,cAAL,GAAsB,KAAKA,cAAL,CAAoBD,IAApB,CAAyB,IAAzB,CAAtB;IACA,KAAKE,YAAL,GAAoB,KAAKA,YAAL,CAAkBF,IAAlB,CAAuB,IAAvB,CAApB;EACD;;EAEDD,gBAAgB,GAAG;IACjB,MAAM;MAACJ;IAAD,IAAW,KAAKD,KAAtB;IACA,MAAM;MAACS;IAAD,IAAoB,KAAKV,KAA/B;IAEA,MAAMW,QAAQ,GAAG,CAACT,MAAlB;IAEA,KAAKU,QAAL,CAAc;MACZV,MAAM,EAAES,QADI;MAEZP,MAAM,EAAE;IAFI,CAAd;;IAKA,IAAIM,eAAJ,EAAqB;MACnBA,eAAe,CAACC,QAAD,CAAf;IACD;EACF;;EAED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U,aADZ;MAEE,SAAS,EAAEa,aAAa,GAAGnC,KAAK,CAACoD,aAAT,GAAyBpD,KAAK,CAACqB;IAFzD,GAIGe,QAJH,eAKE;MACE,aAAU,KADZ;MAEE,SAAS,EAAEpC,KAAK,CAACkD,SAFnB;MAGE,KAAK,EAAE;QACLC,eAAe,EAAEnB;MADZ,CAHT;MAME,OAAO,EAAE,KAAKlB;IANhB,GAQGU,YARH,CALF,CA7CF,CADF;EAgED;;AAnKmC;;AAAhCtB,O,CAkBGmD,Y,GAAe;EACpBvB,IAAI,EAAE/B,QAAQ,CAACuD,iBAAT,CAA2BxB;AADb,C;AAlBlB5B,O,CACGqD,S,2CAAY;EACjBjC,cAAc,EAAE3B,SAAS,CAAC6D,MADT;EAEjBjC,cAAc,EAAE5B,SAAS,CAAC6D,MAFT;EAGjBhC,YAAY,EAAE7B,SAAS,CAAC6D,MAHP;EAIjB/B,YAAY,EAAE9B,SAAS,CAAC6D,MAJP;EAKjBhD,WAAW,EAAEb,SAAS,CAAC8D,IALN;EAMjB/C,SAAS,EAAEf,SAAS,CAAC8D,IANJ;EAOjB/B,OAAO,EAAEzB,cAAc,CAACsD,SAAf,CAAyB7B,OAPjB;EAQjBL,OAAO,EAAE1B,SAAS,CAAC+D,KAAV,CAAgB5D,MAAM,CAACyD,SAAvB,CARQ;EASjBpC,QAAQ,EAAExB,SAAS,CAACgE,IATH;EAUjB5C,eAAe,EAAEpB,SAAS,CAACgE,IAVV;EAWjBzC,aAAa,EAAEvB,SAAS,CAACgE,IAXR;EAYjB/B,iBAAiB,EAAEjC,SAAS,CAAC6D,MAZZ;EAajB7B,mBAAmB,EAAEhC,SAAS,CAAC6D,MAbd;EAcjB3B,oBAAoB,EAAElC,SAAS,CAAC6D;AAdf,C;AAqKrB,eAAetD,OAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","NovaCompositionNavigationArrowDown","ArrowDown","Select","Provider","style","FiltersWrapper","Filters","Component","constructor","props","state","filter","openFilters","sorted","openSorts","handleOpenFilter","bind","handleOpenSort","handleSearch","onToggleFilters","newValue","setState","onToggleSorts","onSearch","render","sorting","filterCTALabel","filterTabLabel","sortCTALabel","sortTabLabel","filters","moreFilterAriaLabel","moreSortAriaLabel","filterGroupAriaLabel","sortAriaLabel","skin","context","defaultColor","darkColor","filtersActive","sortingActive","sortView","undefined","select","search","activeDefault","default","title","arrow","color","activeWrapperSortBy","wrapperSortBy","activeWrapperFilters","wrapperFilters","wrapper","CTAfilter","backgroundColor","activeSorting","contextTypes","childContextTypes","propTypes","string","bool","shape","func"],"sources":["../../../src/molecule/filters/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Select from '../../atom/select';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\nimport FiltersWrapper from './filters-wrapper';\n\nclass Filters extends React.Component {\n static propTypes = {\n filterCTALabel: PropTypes.string,\n filterTabLabel: PropTypes.string,\n sortCTALabel: PropTypes.string,\n sortTabLabel: PropTypes.string,\n openFilters: PropTypes.bool,\n openSorts: PropTypes.bool,\n filters: FiltersWrapper.propTypes.filters,\n sorting: PropTypes.shape(Select.propTypes),\n onSearch: PropTypes.func,\n onToggleFilters: PropTypes.func,\n onToggleSorts: PropTypes.func,\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string,\n filterGroupAriaLabel: PropTypes.string,\n sortAriaLabel: PropTypes.string\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n this.state = {\n filter: !!props.openFilters,\n sorted: !!props.openSorts\n };\n this.handleOpenFilter = this.handleOpenFilter.bind(this);\n this.handleOpenSort = this.handleOpenSort.bind(this);\n this.handleSearch = this.handleSearch.bind(this);\n }\n\n handleOpenFilter() {\n const {filter} = this.state;\n const {onToggleFilters} = this.props;\n\n const newValue = !filter;\n\n this.setState({\n filter: newValue,\n sorted: false\n });\n\n if (onToggleFilters) {\n onToggleFilters(newValue);\n }\n }\n\n handleOpenSort() {\n const {sorted} = this.state;\n const {onToggleSorts} = this.props;\n\n const newValue = !sorted;\n\n this.setState({\n sorted: newValue,\n filter: false\n });\n\n if (onToggleSorts) onToggleSorts(newValue);\n }\n\n handleSearch() {\n const {onSearch} = this.props;\n this.setState({\n sorted: false,\n filter: false\n });\n if (onSearch) onSearch();\n }\n\n render() {\n const {\n sorting,\n filterCTALabel,\n filterTabLabel,\n sortCTALabel,\n sortTabLabel,\n filters,\n moreFilterAriaLabel,\n moreSortAriaLabel,\n filterGroupAriaLabel,\n sortAriaLabel\n } = this.props;\n const {filter, sorted} = this.state;\n const {skin} = this.context;\n\n const defaultColor = get('common.primary', skin);\n const darkColor = get('common.dark', skin);\n const filtersActive = filter === true;\n const sortingActive = sorted === true;\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\" className={style.select}>\n <Select {...sorting} aria-label={sortAriaLabel} />\n </div>\n ) : null;\n\n return (\n <div data-name=\"search\" className={style.search}>\n <div\n data-name=\"filter\"\n data-open={filtersActive}\n className={filtersActive ? style.activeDefault : style.default}\n >\n <div className={style.title} data-name=\"filterButton\" onClick={this.handleOpenFilter}>\n {filterTabLabel}\n <div className={style.arrow}>\n <ArrowDown style={{color: darkColor}} height={14} aria-label={moreFilterAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"sortBy\"\n data-open={sortingActive}\n className={sortingActive ? style.activeWrapperSortBy : style.wrapperSortBy}\n >\n <div className={style.title} data-name=\"sortButton\" onClick={this.handleOpenSort}>\n {sortTabLabel}\n <div className={style.arrow}>\n <ArrowDown style={{color: darkColor}} height={14} aria-label={moreSortAriaLabel} />\n </div>\n </div>\n </div>\n <div\n data-name=\"filterWrapper\"\n className={filtersActive ? style.activeWrapperFilters : style.wrapperFilters}\n >\n <FiltersWrapper\n className={style.wrapper}\n filters={filters}\n filterGroupAriaLabel={filterGroupAriaLabel}\n />\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {filterCTALabel}\n </div>\n </div>\n <div\n data-name=\"sortWrapper\"\n className={sortingActive ? style.activeSorting : style.sorting}\n >\n {sortView}\n <div\n data-name=\"cta\"\n className={style.CTAfilter}\n style={{\n backgroundColor: defaultColor\n }}\n onClick={this.handleSearch}\n >\n {sortCTALabel}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default Filters;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,cAAP,MAA2B,mBAA3B;;AAEA,MAAMC,OAAN,SAAsBR,KAAK,CAACS,SAA5B,CAAsC;EAuBpCC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IACA,KAAKC,KAAL,GAAa;MACXC,MAAM,EAAE,CAAC,CAACF,KAAK,CAACG,WADL;MAEXC,MAAM,EAAE,CAAC,CAACJ,KAAK,CAACK;IAFL,CAAb;IAIA,KAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBC,IAAtB,CAA2B,IAA3B,CAAxB;IACA,KAAKC,cAAL,GAAsB,KAAKA,cAAL,CAAoBD,IAApB,CAAyB,IAAzB,CAAtB;IACA,KAAKE,YAAL,GAAoB,KAAKA,YAAL,CAAkBF,IAAlB,CAAuB,IAAvB,CAApB;EACD;;EAEDD,gBAAgB,GAAG;IACjB,MAAM;MAACJ;IAAD,IAAW,KAAKD,KAAtB;IACA,MAAM;MAACS;IAAD,IAAoB,KAAKV,KAA/B;IAEA,MAAMW,QAAQ,GAAG,CAACT,MAAlB;IAEA,KAAKU,QAAL,C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ElC,SAAS,CAAC8D,MAdf;EAejB3B,aAAa,EAAEnC,SAAS,CAAC8D;AAfR,C;AAuKrB,eAAevD,OAAf"}
|
|
@@ -37,6 +37,8 @@ declare namespace SetupSection {
|
|
|
37
37
|
disabled: PropTypes.Requireable<boolean>;
|
|
38
38
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
39
|
description: PropTypes.Requireable<string>;
|
|
40
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
41
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
40
42
|
modified: PropTypes.Requireable<boolean>;
|
|
41
43
|
titlePosition: PropTypes.Requireable<string>;
|
|
42
44
|
theme: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/setup-section/index.js"],"names":[],"mappings":";AAsCA,qEAeC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/setup-section/index.js"],"names":[],"mappings":";AAsCA,qEAeC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7CD,mFAiBC"}
|
|
@@ -18,6 +18,8 @@ declare namespace SetupSections {
|
|
|
18
18
|
disabled: PropTypes.Requireable<boolean>;
|
|
19
19
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
20
|
description: PropTypes.Requireable<string>;
|
|
21
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
22
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
21
23
|
modified: PropTypes.Requireable<boolean>;
|
|
22
24
|
titlePosition: PropTypes.Requireable<string>;
|
|
23
25
|
theme: PropTypes.Requireable<string>;
|
|
@@ -30,6 +30,8 @@ declare namespace SetupSlide {
|
|
|
30
30
|
disabled: PropTypes.Requireable<boolean>;
|
|
31
31
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
32
|
description: PropTypes.Requireable<string>;
|
|
33
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
34
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
33
35
|
modified: PropTypes.Requireable<boolean>;
|
|
34
36
|
titlePosition: PropTypes.Requireable<string>;
|
|
35
37
|
theme: PropTypes.Requireable<string>;
|
|
@@ -66,6 +68,7 @@ declare namespace SetupSlide {
|
|
|
66
68
|
modified: PropTypes.Requireable<boolean>;
|
|
67
69
|
error: PropTypes.Requireable<boolean>;
|
|
68
70
|
'aria-label': PropTypes.Requireable<string>;
|
|
71
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
69
72
|
}> | PropTypes.InferProps<{
|
|
70
73
|
type: PropTypes.Requireable<string>;
|
|
71
74
|
title: PropTypes.Validator<string>;
|
|
@@ -43,6 +43,8 @@ declare namespace SetupSlider {
|
|
|
43
43
|
disabled: PropTypes.Requireable<boolean>;
|
|
44
44
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
45
45
|
description: PropTypes.Requireable<string>;
|
|
46
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
47
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
46
48
|
modified: PropTypes.Requireable<boolean>;
|
|
47
49
|
titlePosition: PropTypes.Requireable<string>;
|
|
48
50
|
theme: PropTypes.Requireable<string>;
|
|
@@ -79,6 +81,7 @@ declare namespace SetupSlider {
|
|
|
79
81
|
modified: PropTypes.Requireable<boolean>;
|
|
80
82
|
error: PropTypes.Requireable<boolean>;
|
|
81
83
|
'aria-label': PropTypes.Requireable<string>;
|
|
84
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
82
85
|
}> | PropTypes.InferProps<{
|
|
83
86
|
type: PropTypes.Requireable<string>;
|
|
84
87
|
title: PropTypes.Validator<string>;
|
|
@@ -3,6 +3,6 @@ import { Media } from '../questions/types';
|
|
|
3
3
|
export declare type Props = {
|
|
4
4
|
media: Media;
|
|
5
5
|
};
|
|
6
|
-
declare const Video: ({ media }: Props) => JSX.Element;
|
|
6
|
+
declare const Video: ({ media }: Props) => JSX.Element | null;
|
|
7
7
|
export default Video;
|
|
8
8
|
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/video-player-mobile/index.native.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/molecule/video-player-mobile/index.native.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAEzC,oBAAY,KAAK,GAAG;IAAC,KAAK,EAAE,KAAK,CAAA;CAAC,CAAC;AAwCnC,QAAA,MAAM,KAAK,cAAa,KAAK,uBAE5B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,31 +1,50 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
import JWPlayer from 'react-native-jw-media-player';
|
|
4
|
+
import Youtube from 'react-native-youtube';
|
|
5
|
+
import { Vimeo } from 'react-native-vimeo-iframe';
|
|
6
|
+
import { useTemplateContext } from '../../template/app-review/template-context';
|
|
4
7
|
const styleSheet = StyleSheet.create({
|
|
5
8
|
container: {
|
|
6
9
|
flex: 1,
|
|
7
10
|
width: '100%'
|
|
8
|
-
},
|
|
9
|
-
video: {
|
|
10
|
-
flex: 1,
|
|
11
|
-
width: '100%'
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
13
|
|
|
15
14
|
const VideoSwitch = ({
|
|
16
15
|
media
|
|
17
16
|
}) => {
|
|
17
|
+
const {
|
|
18
|
+
brandTheme
|
|
19
|
+
} = useTemplateContext();
|
|
20
|
+
|
|
18
21
|
switch (media.mimeType) {
|
|
22
|
+
case 'application/kontiki':
|
|
19
23
|
case 'application/jwplayer':
|
|
24
|
+
case 'video/mp4':
|
|
20
25
|
if (!media.jwpOptions?.config) {
|
|
21
26
|
return null;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
return /*#__PURE__*/React.createElement(JWPlayer, {
|
|
25
|
-
style: styleSheet.
|
|
30
|
+
style: styleSheet.container,
|
|
26
31
|
config: media.jwpOptions.config
|
|
27
32
|
});
|
|
28
33
|
|
|
34
|
+
case 'application/vimeo':
|
|
35
|
+
return media.videoId ? /*#__PURE__*/React.createElement(View, {
|
|
36
|
+
style: styleSheet.container
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Vimeo, {
|
|
38
|
+
videoId: media.videoId
|
|
39
|
+
})) : null;
|
|
40
|
+
|
|
41
|
+
case 'application/youtube':
|
|
42
|
+
return /*#__PURE__*/React.createElement(Youtube, {
|
|
43
|
+
apiKey: brandTheme.youtube?.apiKey || '',
|
|
44
|
+
style: styleSheet.container,
|
|
45
|
+
videoId: media.videoId
|
|
46
|
+
});
|
|
47
|
+
|
|
29
48
|
default:
|
|
30
49
|
return /*#__PURE__*/React.createElement(Text, null, `video mimeType ${media.mimeType} is not handled`);
|
|
31
50
|
}
|
|
@@ -34,11 +53,9 @@ const VideoSwitch = ({
|
|
|
34
53
|
const Video = ({
|
|
35
54
|
media
|
|
36
55
|
}) => {
|
|
37
|
-
return /*#__PURE__*/React.createElement(
|
|
38
|
-
style: styleSheet.container
|
|
39
|
-
}, media ? /*#__PURE__*/React.createElement(VideoSwitch, {
|
|
56
|
+
return media ? /*#__PURE__*/React.createElement(VideoSwitch, {
|
|
40
57
|
media: media
|
|
41
|
-
}) : null
|
|
58
|
+
}) : null;
|
|
42
59
|
};
|
|
43
60
|
|
|
44
61
|
export default Video;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","StyleSheet","Text","View","JWPlayer","styleSheet","create","container","flex","width","
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","StyleSheet","Text","View","JWPlayer","Youtube","Vimeo","useTemplateContext","styleSheet","create","container","flex","width","VideoSwitch","media","brandTheme","mimeType","jwpOptions","config","videoId","youtube","apiKey","Video"],"sources":["../../../src/molecule/video-player-mobile/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {StyleSheet, Text, View} from 'react-native';\nimport JWPlayer from 'react-native-jw-media-player';\nimport Youtube from 'react-native-youtube';\nimport {Vimeo} from 'react-native-vimeo-iframe';\nimport {useTemplateContext} from '../../template/app-review/template-context';\n\nimport {Media} from '../questions/types';\n\nexport type Props = {media: Media};\n\nconst styleSheet = StyleSheet.create({\n container: {\n flex: 1,\n width: '100%'\n }\n});\n\nconst VideoSwitch = ({media}: Props) => {\n const {brandTheme} = useTemplateContext();\n\n switch (media.mimeType) {\n case 'application/kontiki':\n case 'application/jwplayer':\n case 'video/mp4':\n if (!media.jwpOptions?.config) {\n return null;\n }\n\n return <JWPlayer style={styleSheet.container} config={media.jwpOptions.config} />;\n case 'application/vimeo':\n return media.videoId ? (\n <View style={styleSheet.container}>\n <Vimeo videoId={media.videoId} />\n </View>\n ) : null;\n case 'application/youtube':\n return (\n <Youtube\n apiKey={brandTheme.youtube?.apiKey || ''}\n style={styleSheet.container}\n videoId={media.videoId}\n />\n );\n default:\n return <Text>{`video mimeType ${media.mimeType} is not handled`}</Text>;\n }\n};\n\nconst Video = ({media}: Props) => {\n return media ? <VideoSwitch media={media} /> : null;\n};\n\nexport default Video;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,UAAR,EAAoBC,IAApB,EAA0BC,IAA1B,QAAqC,cAArC;AACA,OAAOC,QAAP,MAAqB,8BAArB;AACA,OAAOC,OAAP,MAAoB,sBAApB;AACA,SAAQC,KAAR,QAAoB,2BAApB;AACA,SAAQC,kBAAR,QAAiC,4CAAjC;AAMA,MAAMC,UAAU,GAAGP,UAAU,CAACQ,MAAX,CAAkB;EACnCC,SAAS,EAAE;IACTC,IAAI,EAAE,CADG;IAETC,KAAK,EAAE;EAFE;AADwB,CAAlB,CAAnB;;AAOA,MAAMC,WAAW,GAAG,CAAC;EAACC;AAAD,CAAD,KAAoB;EACtC,MAAM;IAACC;EAAD,IAAeR,kBAAkB,EAAvC;;EAEA,QAAQO,KAAK,CAACE,QAAd;IACE,KAAK,qBAAL;IACA,KAAK,sBAAL;IACA,KAAK,WAAL;MACE,IAAI,CAACF,KAAK,CAACG,UAAN,EAAkBC,MAAvB,EAA+B;QAC7B,OAAO,IAAP;MACD;;MAED,oBAAO,oBAAC,QAAD;QAAU,KAAK,EAAEV,UAAU,CAACE,SAA5B;QAAuC,MAAM,EAAEI,KAAK,CAACG,UAAN,CAAiBC;MAAhE,EAAP;;IACF,KAAK,mBAAL;MACE,OAAOJ,KAAK,CAACK,OAAN,gBACL,oBAAC,IAAD;QAAM,KAAK,EAAEX,UAAU,CAACE;MAAxB,gBACE,oBAAC,KAAD;QAAO,OAAO,EAAEI,KAAK,CAACK;MAAtB,EADF,CADK,GAIH,IAJJ;;IAKF,KAAK,qBAAL;MACE,oBACE,oBAAC,OAAD;QACE,MAAM,EAAEJ,UAAU,CAACK,OAAX,EAAoBC,MAApB,IAA8B,EADxC;QAEE,KAAK,EAAEb,UAAU,CAACE,SAFpB;QAGE,OAAO,EAAEI,KAAK,CAACK;MAHjB,EADF;;IAOF;MACE,oBAAO,oBAAC,IAAD,QAAQ,kBAAiBL,KAAK,CAACE,QAAS,iBAAxC,CAAP;EAxBJ;AA0BD,CA7BD;;AA+BA,MAAMM,KAAK,GAAG,CAAC;EAACR;AAAD,CAAD,KAAoB;EAChC,OAAOA,KAAK,gBAAG,oBAAC,WAAD;IAAa,KAAK,EAAEA;EAApB,EAAH,GAAmC,IAA/C;AACD,CAFD;;AAIA,eAAeQ,KAAf"}
|
|
@@ -86,6 +86,8 @@ declare namespace BrandForm {
|
|
|
86
86
|
disabled: PropTypes.Requireable<boolean>;
|
|
87
87
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
88
88
|
description: PropTypes.Requireable<string>;
|
|
89
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
90
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
89
91
|
modified: PropTypes.Requireable<boolean>;
|
|
90
92
|
titlePosition: PropTypes.Requireable<string>;
|
|
91
93
|
theme: PropTypes.Requireable<string>;
|
|
@@ -139,6 +141,7 @@ declare namespace BrandForm {
|
|
|
139
141
|
modified: PropTypes.Requireable<boolean>;
|
|
140
142
|
error: PropTypes.Requireable<boolean>;
|
|
141
143
|
'aria-label': PropTypes.Requireable<string>;
|
|
144
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
142
145
|
}> | PropTypes.InferProps<{
|
|
143
146
|
type: PropTypes.Requireable<string>;
|
|
144
147
|
title: PropTypes.Validator<string>;
|
|
@@ -218,6 +221,8 @@ declare namespace BrandForm {
|
|
|
218
221
|
disabled: PropTypes.Requireable<boolean>;
|
|
219
222
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
220
223
|
description: PropTypes.Requireable<string>;
|
|
224
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
225
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
221
226
|
modified: PropTypes.Requireable<boolean>;
|
|
222
227
|
titlePosition: PropTypes.Requireable<string>;
|
|
223
228
|
theme: PropTypes.Requireable<string>;
|
|
@@ -254,6 +259,7 @@ declare namespace BrandForm {
|
|
|
254
259
|
modified: PropTypes.Requireable<boolean>;
|
|
255
260
|
error: PropTypes.Requireable<boolean>;
|
|
256
261
|
'aria-label': PropTypes.Requireable<string>;
|
|
262
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
257
263
|
}> | PropTypes.InferProps<{
|
|
258
264
|
type: PropTypes.Requireable<string>;
|
|
259
265
|
title: PropTypes.Validator<string>;
|
|
@@ -358,6 +364,8 @@ declare namespace BrandForm {
|
|
|
358
364
|
disabled: PropTypes.Requireable<boolean>;
|
|
359
365
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
360
366
|
description: PropTypes.Requireable<string>;
|
|
367
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
368
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
361
369
|
modified: PropTypes.Requireable<boolean>;
|
|
362
370
|
titlePosition: PropTypes.Requireable<string>;
|
|
363
371
|
theme: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAuBC;IArBC;;;;;MAKC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAuBC;IArBC;;;;;MAKC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,6BA4aC;CACF"}
|
|
@@ -477,8 +477,11 @@ class MoocHeader extends React.Component {
|
|
|
477
477
|
key: settingName,
|
|
478
478
|
"aria-label": ariaLabel || title
|
|
479
479
|
}, /*#__PURE__*/React.createElement("span", {
|
|
480
|
+
id: `title-id-${settingName}`,
|
|
480
481
|
className: style.label
|
|
481
|
-
}, title), /*#__PURE__*/React.createElement(InputSwitch, switchProps
|
|
482
|
+
}, title), /*#__PURE__*/React.createElement(InputSwitch, _extends({}, switchProps, {
|
|
483
|
+
"aria-labelledby": `title-id-${settingName}`
|
|
484
|
+
})));
|
|
482
485
|
break;
|
|
483
486
|
}
|
|
484
487
|
}
|