@coorpacademy/components 11.13.7-alpha.3 → 11.13.7-alpha.8

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.
Files changed (35) hide show
  1. package/es/atom/form-text-input/index.d.ts +26 -0
  2. package/es/atom/form-text-input/index.d.ts.map +1 -0
  3. package/es/atom/form-text-input/index.js +103 -0
  4. package/es/atom/form-text-input/index.js.map +1 -0
  5. package/es/atom/form-text-input/prop-types.d.ts +54 -0
  6. package/es/atom/form-text-input/prop-types.d.ts.map +1 -0
  7. package/es/atom/form-text-input/prop-types.js +34 -0
  8. package/es/atom/form-text-input/prop-types.js.map +1 -0
  9. package/es/atom/form-text-input/style.css +53 -0
  10. package/es/molecule/discipline-header/index.d.ts +0 -2
  11. package/es/molecule/discipline-header/index.d.ts.map +1 -1
  12. package/es/molecule/discipline-header/index.js +9 -28
  13. package/es/molecule/discipline-header/index.js.map +1 -1
  14. package/es/molecule/discipline-header/style.css +7 -40
  15. package/es/template/common/discipline/index.d.ts.map +1 -1
  16. package/es/template/common/discipline/index.js +2 -6
  17. package/es/template/common/discipline/index.js.map +1 -1
  18. package/lib/atom/form-text-input/index.d.ts +26 -0
  19. package/lib/atom/form-text-input/index.d.ts.map +1 -0
  20. package/lib/atom/form-text-input/index.js +121 -0
  21. package/lib/atom/form-text-input/index.js.map +1 -0
  22. package/lib/atom/form-text-input/prop-types.d.ts +54 -0
  23. package/lib/atom/form-text-input/prop-types.d.ts.map +1 -0
  24. package/lib/atom/form-text-input/prop-types.js +45 -0
  25. package/lib/atom/form-text-input/prop-types.js.map +1 -0
  26. package/lib/atom/form-text-input/style.css +53 -0
  27. package/lib/molecule/discipline-header/index.d.ts +0 -2
  28. package/lib/molecule/discipline-header/index.d.ts.map +1 -1
  29. package/lib/molecule/discipline-header/index.js +9 -29
  30. package/lib/molecule/discipline-header/index.js.map +1 -1
  31. package/lib/molecule/discipline-header/style.css +7 -40
  32. package/lib/template/common/discipline/index.d.ts.map +1 -1
  33. package/lib/template/common/discipline/index.js +2 -6
  34. package/lib/template/common/discipline/index.js.map +1 -1
  35. package/package.json +3 -3
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import { FormTextInputProps } from './prop-types';
3
+ declare const FormTextInput: {
4
+ ({ "aria-label": ariaLabel, autocomplete, "data-testid": dataTestid, disabled, hint, inputClassName, isRequired, label, maxlength, name, onChange, passwordValidator, placeholder, type, value, equals, wrapperClassName }: FormTextInputProps): JSX.Element;
5
+ propTypes: {
6
+ 'aria-label': import("prop-types").Requireable<string>;
7
+ autocomplete: import("prop-types").Requireable<string>;
8
+ 'data-testid': import("prop-types").Requireable<string>;
9
+ disabled: import("prop-types").Requireable<boolean>;
10
+ equals: import("prop-types").Requireable<NonNullable<string | number | null | undefined>>;
11
+ hint: import("prop-types").Requireable<string>;
12
+ inputClassName: import("prop-types").Requireable<string>;
13
+ isRequired: import("prop-types").Requireable<boolean>;
14
+ label: import("prop-types").Requireable<string>;
15
+ maxlength: import("prop-types").Requireable<number>;
16
+ name: import("prop-types").Requireable<string>;
17
+ onChange: import("prop-types").Requireable<(...args: any[]) => any>;
18
+ passwordValidator: import("prop-types").Requireable<(...args: any[]) => any>;
19
+ placeholder: import("prop-types").Requireable<string>;
20
+ type: import("prop-types").Requireable<string>;
21
+ value: import("prop-types").Requireable<NonNullable<string | number | null | undefined>>;
22
+ wrapperClassName: import("prop-types").Requireable<string>;
23
+ };
24
+ };
25
+ export default FormTextInput;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/form-text-input/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAa,kBAAkB,EAAY,MAAM,cAAc,CAAC;AAkBlF,QAAA,MAAM,aAAa;gOAkBhB,kBAAkB;;;;;;;;;;;;;;;;;;;;CAuEpB,CAAC;AAIF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,103 @@
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, { useCallback, useMemo, useState, useEffect } from 'react';
4
+ import classnames from 'classnames';
5
+ import isEmpty from 'lodash/fp/isEmpty';
6
+ import isEqual from 'lodash/fp/isEqual';
7
+ import noop from 'lodash/fp/noop';
8
+ import propTypes, { TextInput } from './prop-types';
9
+ import style from './style.css';
10
+
11
+ const validate = (fieldValue, fieldEqualsValue) => {
12
+ return isEqual(fieldValue, fieldEqualsValue);
13
+ };
14
+
15
+ const VALID_EMAIL_PATTERN = /[a-z0-9!#$%&'*+=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;
16
+
17
+ const validatePattern = (fieldValue, pattern) => {
18
+ return pattern.test(fieldValue);
19
+ };
20
+
21
+ const DEFAULT_MAX_LENGTH = 150;
22
+
23
+ const isEqualsDefined = equals => !isEmpty(equals);
24
+
25
+ const FormTextInput = ({
26
+ 'aria-label': ariaLabel,
27
+ autocomplete,
28
+ 'data-testid': dataTestid = 'form-text-input',
29
+ disabled,
30
+ hint,
31
+ inputClassName,
32
+ isRequired,
33
+ label,
34
+ maxlength = DEFAULT_MAX_LENGTH,
35
+ name,
36
+ onChange = noop,
37
+ passwordValidator = () => false,
38
+ placeholder,
39
+ type = 'default',
40
+ value,
41
+ equals,
42
+ wrapperClassName
43
+ }) => {
44
+ const [newValue, setNewValue] = useState(value);
45
+ const [isValid, setIsValid] = useState(true);
46
+ const isDefaultType = useMemo(() => !type || type === TextInput.default, [type]);
47
+ const isPasswordInput = useMemo(() => type === TextInput.password || type === TextInput.passwordConfirmation, [type]);
48
+ const isEmailInput = useMemo(() => type === TextInput.email, [type]);
49
+ const handleInputChange = useCallback(event => {
50
+ const newInput = event.target.value;
51
+ setNewValue(() => {
52
+ const isNewValueValid = !isEqualsDefined(equals) || validate(newInput, equals);
53
+ const validPattern = !isEmailInput || validatePattern(newInput, VALID_EMAIL_PATTERN);
54
+ const isPasswordCompliant = !isPasswordInput || passwordValidator(newInput);
55
+ setIsValid(isPasswordCompliant && isNewValueValid && validPattern);
56
+ return newInput;
57
+ });
58
+ }, [equals, isEmailInput, isPasswordInput, passwordValidator]);
59
+ useEffect(() => {
60
+ onChange(newValue, isValid);
61
+ return;
62
+ }, [isValid, newValue, onChange]);
63
+ const fieldLabel = useMemo(() => `${label} ${isRequired ? '*' : ''}`, [isRequired, label]);
64
+ const errorStyle = useMemo(() => isValid ? undefined : {
65
+ border: '2px solid rgb(247, 63, 82)'
66
+ }, [isValid]);
67
+ return /*#__PURE__*/React.createElement("div", {
68
+ className: classnames(style.wrapper, wrapperClassName)
69
+ }, /*#__PURE__*/React.createElement("label", {
70
+ className: style.formLabel,
71
+ htmlFor: name
72
+ }, fieldLabel), /*#__PURE__*/React.createElement("input", _extends({}, !isPasswordInput && !isEmailInput && {
73
+ maxLength: maxlength
74
+ }, isEmailInput && {
75
+ autoCapitalize: 'none'
76
+ }, isRequired && {
77
+ required: true
78
+ }, !isValid && {
79
+ 'aria-invalid': true
80
+ }, {
81
+ type: isDefaultType ? 'text' : type,
82
+ "aria-label": ariaLabel,
83
+ autoComplete: isDefaultType ? 'on' : autocomplete,
84
+ autoCorrect: 'off',
85
+ className: classnames(style.textInput, inputClassName),
86
+ "data-testid": dataTestid,
87
+ disabled: disabled,
88
+ id: name,
89
+ name: name,
90
+ onInput: handleInputChange,
91
+ placeholder: placeholder,
92
+ value: value,
93
+ style: errorStyle
94
+ })), /*#__PURE__*/React.createElement("div", {
95
+ className: style.hintWrapper
96
+ }, /*#__PURE__*/React.createElement("span", {
97
+ className: style.hint
98
+ }, hint)));
99
+ };
100
+
101
+ FormTextInput.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
102
+ export default FormTextInput;
103
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","useEffect","classnames","isEmpty","isEqual","noop","propTypes","TextInput","style","validate","fieldValue","fieldEqualsValue","VALID_EMAIL_PATTERN","validatePattern","pattern","test","DEFAULT_MAX_LENGTH","isEqualsDefined","equals","FormTextInput","ariaLabel","autocomplete","dataTestid","disabled","hint","inputClassName","isRequired","label","maxlength","name","onChange","passwordValidator","placeholder","type","value","wrapperClassName","newValue","setNewValue","isValid","setIsValid","isDefaultType","default","isPasswordInput","password","passwordConfirmation","isEmailInput","email","handleInputChange","event","newInput","target","isNewValueValid","validPattern","isPasswordCompliant","fieldLabel","errorStyle","undefined","border","wrapper","formLabel","maxLength","autoCapitalize","required","textInput","hintWrapper"],"sources":["../../../src/atom/form-text-input/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useEffect, FormEvent} from 'react';\nimport classnames from 'classnames';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport isEqual from 'lodash/fp/isEqual';\nimport noop from 'lodash/fp/noop';\nimport propTypes, {FieldValue, FormTextInputProps, TextInput} from './prop-types';\nimport style from './style.css';\n\nconst validate = (fieldValue: FieldValue, fieldEqualsValue: FieldValue) => {\n return isEqual(fieldValue, fieldEqualsValue);\n};\n\nconst VALID_EMAIL_PATTERN =\n /[a-z0-9!#$%&'*+=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;\n\nconst validatePattern = (fieldValue: string, pattern: RegExp) => {\n return pattern.test(fieldValue);\n};\n\nconst DEFAULT_MAX_LENGTH = 150;\n\nconst isEqualsDefined = (equals: FieldValue | undefined): equals is FieldValue => !isEmpty(equals);\n\nconst FormTextInput = ({\n 'aria-label': ariaLabel,\n autocomplete,\n 'data-testid': dataTestid = 'form-text-input',\n disabled,\n hint,\n inputClassName,\n isRequired,\n label,\n maxlength = DEFAULT_MAX_LENGTH,\n name,\n onChange = noop,\n passwordValidator = () => false,\n placeholder,\n type = 'default',\n value,\n equals,\n wrapperClassName\n}: FormTextInputProps) => {\n const [newValue, setNewValue] = useState<FieldValue>(value);\n\n const [isValid, setIsValid] = useState<boolean>(true);\n\n const isDefaultType = useMemo(() => !type || type === TextInput.default, [type]);\n\n const isPasswordInput = useMemo(\n () => type === TextInput.password || type === TextInput.passwordConfirmation,\n [type]\n );\n\n const isEmailInput = useMemo(() => type === TextInput.email, [type]);\n\n const handleInputChange = useCallback(\n (event: FormEvent<HTMLInputElement>) => {\n const newInput: FieldValue = (event.target as HTMLInputElement).value;\n setNewValue(() => {\n const isNewValueValid = !isEqualsDefined(equals) || validate(newInput, equals);\n const validPattern = !isEmailInput || validatePattern(newInput, VALID_EMAIL_PATTERN);\n const isPasswordCompliant = !isPasswordInput || passwordValidator(newInput);\n\n setIsValid(isPasswordCompliant && isNewValueValid && validPattern);\n\n return newInput;\n });\n },\n [equals, isEmailInput, isPasswordInput, passwordValidator]\n );\n\n useEffect(() => {\n onChange(newValue, isValid);\n return;\n }, [isValid, newValue, onChange]);\n\n const fieldLabel = useMemo(() => `${label} ${isRequired ? '*' : ''}`, [isRequired, label]);\n\n const errorStyle = useMemo(\n () => (isValid ? undefined : {border: '2px solid rgb(247, 63, 82)'}),\n [isValid]\n );\n\n return (\n <div className={classnames(style.wrapper, wrapperClassName)}>\n <label className={style.formLabel} htmlFor={name}>\n {fieldLabel}\n </label>\n <input\n {...(!isPasswordInput && !isEmailInput && {maxLength: maxlength})}\n {...(isEmailInput && {autoCapitalize: 'none'})}\n {...(isRequired && {required: true})}\n {...(!isValid && {'aria-invalid': true})}\n type={isDefaultType ? 'text' : type}\n aria-label={ariaLabel}\n autoComplete={isDefaultType ? 'on' : autocomplete}\n autoCorrect={'off'}\n className={classnames(style.textInput, inputClassName)}\n data-testid={dataTestid}\n disabled={disabled}\n id={name}\n name={name}\n onInput={handleInputChange}\n placeholder={placeholder}\n value={value}\n style={errorStyle}\n />\n <div className={style.hintWrapper}>\n <span className={style.hint}>{hint}</span>\n </div>\n </div>\n );\n};\n\nFormTextInput.propTypes = propTypes;\n\nexport default FormTextInput;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,EAA+CC,SAA/C,QAA0E,OAA1E;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,SAAP,IAAmDC,SAAnD,QAAmE,cAAnE;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAACC,UAAD,EAAyBC,gBAAzB,KAA0D;EACzE,OAAOP,OAAO,CAACM,UAAD,EAAaC,gBAAb,CAAd;AACD,CAFD;;AAIA,MAAMC,mBAAmB,GACvB,mIADF;;AAGA,MAAMC,eAAe,GAAG,CAACH,UAAD,EAAqBI,OAArB,KAAyC;EAC/D,OAAOA,OAAO,CAACC,IAAR,CAAaL,UAAb,CAAP;AACD,CAFD;;AAIA,MAAMM,kBAAkB,GAAG,GAA3B;;AAEA,MAAMC,eAAe,GAAIC,MAAD,IAA0D,CAACf,OAAO,CAACe,MAAD,CAA1F;;AAEA,MAAMC,aAAa,GAAG,CAAC;EACrB,cAAcC,SADO;EAErBC,YAFqB;EAGrB,eAAeC,UAAU,GAAG,iBAHP;EAIrBC,QAJqB;EAKrBC,IALqB;EAMrBC,cANqB;EAOrBC,UAPqB;EAQrBC,KARqB;EASrBC,SAAS,GAAGZ,kBATS;EAUrBa,IAVqB;EAWrBC,QAAQ,GAAGzB,IAXU;EAYrB0B,iBAAiB,GAAG,MAAM,KAZL;EAarBC,WAbqB;EAcrBC,IAAI,GAAG,S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EAAEf,WAff;IAgBE,KAAK,EAAEE,KAhBT;IAiBE,KAAK,EAAEqB;EAjBT,GAJF,eAuBE;IAAK,SAAS,EAAE/C,KAAK,CAACwD;EAAtB,gBACE;IAAM,SAAS,EAAExD,KAAK,CAACgB;EAAvB,GAA8BA,IAA9B,CADF,CAvBF,CADF;AA6BD,CAzFD;;AA2FAL,aAAa,CAACb,SAAd,2CAA0BA,SAA1B;AAEA,eAAea,aAAf"}
@@ -0,0 +1,54 @@
1
+ import PropTypes from 'prop-types';
2
+ export declare const TextInput: {
3
+ readonly country: "country";
4
+ readonly email: "email";
5
+ readonly firstName: "firstName";
6
+ readonly lastName: "lastName";
7
+ readonly language: "language";
8
+ readonly login: "login";
9
+ readonly password: "password";
10
+ readonly passwordConfirmation: "passwordConfirmation";
11
+ readonly default: "default";
12
+ };
13
+ declare const propTypes: {
14
+ 'aria-label': PropTypes.Requireable<string>;
15
+ autocomplete: PropTypes.Requireable<string>;
16
+ 'data-testid': PropTypes.Requireable<string>;
17
+ disabled: PropTypes.Requireable<boolean>;
18
+ equals: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
19
+ hint: PropTypes.Requireable<string>;
20
+ inputClassName: PropTypes.Requireable<string>;
21
+ isRequired: PropTypes.Requireable<boolean>;
22
+ label: PropTypes.Requireable<string>;
23
+ maxlength: PropTypes.Requireable<number>;
24
+ name: PropTypes.Requireable<string>;
25
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
26
+ passwordValidator: PropTypes.Requireable<(...args: any[]) => any>;
27
+ placeholder: PropTypes.Requireable<string>;
28
+ type: PropTypes.Requireable<string>;
29
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
30
+ wrapperClassName: PropTypes.Requireable<string>;
31
+ };
32
+ declare type TextInputType = keyof typeof TextInput;
33
+ export declare type FieldValue = string | number;
34
+ export declare type FormTextInputProps = {
35
+ 'aria-label'?: string;
36
+ autocomplete?: string;
37
+ 'data-testid'?: string;
38
+ disabled?: boolean;
39
+ equals?: FieldValue;
40
+ hint?: string;
41
+ inputClassName?: string | null;
42
+ isRequired?: boolean;
43
+ label: string;
44
+ maxlength?: number;
45
+ name: string;
46
+ onChange?: (value: FieldValue, isValid?: boolean) => void;
47
+ passwordValidator?: (password: string) => boolean;
48
+ placeholder?: string;
49
+ type?: TextInputType;
50
+ value: FieldValue;
51
+ wrapperClassName?: string | null;
52
+ };
53
+ export default propTypes;
54
+ //# sourceMappingURL=prop-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/form-text-input/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;CAUZ,CAAC;AAEX,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;CAkBd,CAAC;AAEF,aAAK,aAAa,GAAG,MAAM,OAAO,SAAS,CAAC;AAE5C,oBAAY,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,oBAAY,kBAAkB,GAAG;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,34 @@
1
+ import PropTypes from 'prop-types';
2
+ import keys from 'lodash/fp/keys';
3
+ export const TextInput = {
4
+ country: 'country',
5
+ email: 'email',
6
+ firstName: 'firstName',
7
+ lastName: 'lastName',
8
+ language: 'language',
9
+ login: 'login',
10
+ password: 'password',
11
+ passwordConfirmation: 'passwordConfirmation',
12
+ default: 'default'
13
+ };
14
+ const propTypes = {
15
+ 'aria-label': PropTypes.string,
16
+ autocomplete: PropTypes.string,
17
+ 'data-testid': PropTypes.string,
18
+ disabled: PropTypes.bool,
19
+ equals: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
20
+ hint: PropTypes.string,
21
+ inputClassName: PropTypes.string,
22
+ isRequired: PropTypes.bool,
23
+ label: PropTypes.string,
24
+ maxlength: PropTypes.number,
25
+ name: PropTypes.string,
26
+ onChange: PropTypes.func,
27
+ passwordValidator: PropTypes.func,
28
+ placeholder: PropTypes.string,
29
+ type: PropTypes.oneOf(keys(TextInput)),
30
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
31
+ wrapperClassName: PropTypes.string
32
+ };
33
+ export default propTypes;
34
+ //# sourceMappingURL=prop-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-types.js","names":["PropTypes","keys","TextInput","country","email","firstName","lastName","language","login","password","passwordConfirmation","default","propTypes","string","autocomplete","disabled","bool","equals","oneOfType","number","hint","inputClassName","isRequired","label","maxlength","name","onChange","func","passwordValidator","placeholder","type","oneOf","value","wrapperClassName"],"sources":["../../../src/atom/form-text-input/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport keys from 'lodash/fp/keys';\n\nexport const TextInput = {\n country: 'country',\n email: 'email',\n firstName: 'firstName',\n lastName: 'lastName',\n language: 'language',\n login: 'login',\n password: 'password',\n passwordConfirmation: 'passwordConfirmation',\n default: 'default'\n} as const;\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n autocomplete: PropTypes.string,\n 'data-testid': PropTypes.string,\n disabled: PropTypes.bool,\n equals: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n hint: PropTypes.string,\n inputClassName: PropTypes.string,\n isRequired: PropTypes.bool,\n label: PropTypes.string,\n maxlength: PropTypes.number,\n name: PropTypes.string,\n onChange: PropTypes.func,\n passwordValidator: PropTypes.func,\n placeholder: PropTypes.string,\n type: PropTypes.oneOf(keys(TextInput)),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n wrapperClassName: PropTypes.string\n};\n\ntype TextInputType = keyof typeof TextInput;\n\nexport type FieldValue = string | number;\n\nexport type FormTextInputProps = {\n 'aria-label'?: string;\n autocomplete?: string;\n 'data-testid'?: string;\n disabled?: boolean;\n equals?: FieldValue;\n hint?: string;\n inputClassName?: string | null;\n isRequired?: boolean;\n label: string;\n maxlength?: number;\n name: string;\n onChange?: (value: FieldValue, isValid?: boolean) => void;\n passwordValidator?: (password: string) => boolean;\n placeholder?: string;\n type?: TextInputType;\n value: FieldValue;\n wrapperClassName?: string | null;\n};\n\nexport default propTypes;\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AAEA,OAAO,MAAMC,SAAS,GAAG;EACvBC,OAAO,EAAE,SADc;EAEvBC,KAAK,EAAE,OAFgB;EAGvBC,SAAS,EAAE,WAHY;EAIvBC,QAAQ,EAAE,UAJa;EAKvBC,QAAQ,EAAE,UALa;EAMvBC,KAAK,EAAE,OANgB;EAOvBC,QAAQ,EAAE,UAPa;EAQvBC,oBAAoB,EAAE,sBARC;EASvBC,OAAO,EAAE;AATc,CAAlB;AAYP,MAAMC,SAAS,GAAG;EAChB,cAAcZ,SAAS,CAACa,MADR;EAEhBC,YAAY,EAAEd,SAAS,CAACa,MAFR;EAGhB,eAAeb,SAAS,CAACa,MAHT;EAIhBE,QAAQ,EAAEf,SAAS,CAACgB,IAJJ;EAKhBC,MAAM,EAAEjB,SAAS,CAACkB,SAAV,CAAoB,CAAClB,SAAS,CAACa,MAAX,EAAmBb,SAAS,CAACmB,MAA7B,CAApB,CALQ;EAMhBC,IAAI,EAAEpB,SAAS,CAACa,MANA;EAOhBQ,cAAc,EAAErB,SAAS,CAACa,MAPV;EAQhBS,UAAU,EAAEtB,SAAS,CAACgB,IARN;EAShBO,KAAK,EAAEvB,SAAS,CAACa,MATD;EAUhBW,SAAS,EAAExB,SAAS,CAACmB,MAVL;EAWhBM,IAAI,EAAEzB,SAAS,CAACa,MAXA;EAYhBa,QAAQ,EAAE1B,SAAS,CAAC2B,IAZJ;EAahBC,iBAAiB,EAAE5B,SAAS,CAAC2B,IAbb;EAchBE,WAAW,EAAE7B,SAAS,CAACa,MAdP;EAehBiB,IAAI,EAAE9B,SAAS,CAAC+B,KAAV,CAAgB9B,IAAI,CAACC,SAAD,CAApB,CAfU;EAgBhB8B,KAAK,EAAEhC,SAAS,CAACkB,SAAV,CAAoB,CAAClB,SAAS,CAACa,MAAX,EAAmBb,SAAS,CAACmB,MAA7B,CAApB,CAhBS;EAiBhBc,gBAAgB,EAAEjC,SAAS,CAACa;AAjBZ,CAAlB;AA4CA,eAAeD,SAAf"}
@@ -0,0 +1,53 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value dark from colors;
3
+ @value cm_grey_400 from colors;
4
+ @value cm_grey_450 from colors;
5
+ @value white from colors;
6
+
7
+ .wrapper {
8
+ margin: 10px 0;
9
+ position: relative;
10
+ font-family: 'Gilroy';
11
+ }
12
+
13
+ .formLabel {
14
+ font-size: 13px;
15
+ text-align: left;
16
+ /* temporal */
17
+ color: dark;
18
+ display: block;
19
+ margin-bottom: 7px;
20
+ width: 100%;
21
+ }
22
+
23
+ .textInput {
24
+ width: 100%;
25
+ height: 59px;
26
+ background-color: white;
27
+ border: solid 1px cm_grey_450;
28
+ text-align: left;
29
+ margin-bottom: 26px;
30
+
31
+ appearance: none;
32
+ padding: 0 8px 0 15px;
33
+ border-radius: 0;
34
+
35
+ box-sizing: border-box;
36
+ cursor: text;
37
+
38
+ color: inherit;
39
+ font: inherit;
40
+ overflow: visible;
41
+ }
42
+
43
+ .hintWrapper {
44
+ font-size: 12px;
45
+ margin-top: -20px;
46
+ margin-bottom: 20px;
47
+ }
48
+
49
+ .hint {
50
+ color: cm_grey_400;
51
+ text-align: left;
52
+ font-style: italic;
53
+ }
@@ -39,8 +39,6 @@ declare class DisciplineHeader extends React.Component<any, any, any> {
39
39
  }>>;
40
40
  mimeType: PropTypes.Validator<string>;
41
41
  }>>;
42
- lastUpdated: PropTypes.Requireable<string>;
43
- invertedLanguage: PropTypes.Requireable<boolean>;
44
42
  };
45
43
  static contextTypes: {
46
44
  translate: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA4BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOE;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,yBAEC;IAED,sBAuDC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA2BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKE;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,yBAEC;IAED,sBAsCC;CACF"}
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
3
3
  import get from 'lodash/fp/get';
4
4
  import getOr from 'lodash/fp/getOr';
5
5
  import classnames from 'classnames';
6
- import { NovaSolidSynchronizeSynchronize3 as SyncIcon } from '@coorpacademy/nova-icons';
7
6
  import VideoPlayer from '../video-player';
8
7
  import Picture from '../../atom/picture';
9
8
  import style from './style.css';
@@ -66,9 +65,7 @@ class DisciplineHeader extends React.Component {
66
65
  image,
67
66
  title,
68
67
  description,
69
- video,
70
- lastUpdated,
71
- invertedLanguage
68
+ video
72
69
  } = this.props;
73
70
  const {
74
71
  fullDisplay,
@@ -77,23 +74,19 @@ class DisciplineHeader extends React.Component {
77
74
  const {
78
75
  translate
79
76
  } = this.context;
80
- const maxHeightCourseInfos = 209;
81
- const hasMediaContent = image || video;
77
+ const maxHeightDescription = 219;
82
78
  const toggleLabel = fullDisplay ? translate('See less') : translate('Show more');
83
- const shortCourseText = offsetHeightShowMore <= maxHeightCourseInfos;
84
- const courseSeeMoreButtonStyle = shortCourseText ? style.showMoreHidden : style.showMore;
79
+ const descritpionViewStyle = offsetHeightShowMore <= maxHeightDescription ? style.showMoreHidden : style.showMore;
85
80
  return /*#__PURE__*/React.createElement("div", {
86
81
  "data-name": "disciplineHeader",
87
82
  className: style.wrapper
88
- }, hasMediaContent ? /*#__PURE__*/React.createElement("div", {
83
+ }, image || video ? /*#__PURE__*/React.createElement("div", {
89
84
  className: style.imgWrapper
90
85
  }, /*#__PURE__*/React.createElement(Preview, {
91
86
  image: image,
92
87
  video: video
93
88
  })) : null, /*#__PURE__*/React.createElement("div", {
94
89
  className: style.courseWrapper
95
- }, /*#__PURE__*/React.createElement("div", {
96
- className: fullDisplay ? style.courseTextWrapperFull : style.courseTextWrapperShort
97
90
  }, /*#__PURE__*/React.createElement("div", {
98
91
  "data-name": "title",
99
92
  className: classnames(style.title, style.innerHTML) // eslint-disable-next-line react/no-danger
@@ -102,6 +95,8 @@ class DisciplineHeader extends React.Component {
102
95
  __html: title
103
96
  }
104
97
  }), /*#__PURE__*/React.createElement("div", {
98
+ className: fullDisplay ? style.desc : style.shortDesc
99
+ }, /*#__PURE__*/React.createElement("div", {
105
100
  className: style.innerHTML // eslint-disable-next-line react/no-danger
106
101
  ,
107
102
  dangerouslySetInnerHTML: {
@@ -109,21 +104,9 @@ class DisciplineHeader extends React.Component {
109
104
  },
110
105
  ref: this.setHandle
111
106
  })), /*#__PURE__*/React.createElement("div", {
112
- className: invertedLanguage ? style.invertedLanguage : null
113
- }, /*#__PURE__*/React.createElement("div", {
114
- className: courseSeeMoreButtonStyle,
107
+ className: descritpionViewStyle,
115
108
  onClick: this.handleToggleDisplay
116
- }, toggleLabel), lastUpdated ? /*#__PURE__*/React.createElement("div", {
117
- className: classnames(style.lastUpdatedWrapper, shortCourseText ? style.lastUpdatedWrapperShort : null)
118
- }, /*#__PURE__*/React.createElement(SyncIcon, {
119
- className: style.syncIcon
120
- }), /*#__PURE__*/React.createElement("div", {
121
- className: classnames(style.lastUpdatedText, style.innerHTML) // eslint-disable-next-line react/no-danger
122
- ,
123
- dangerouslySetInnerHTML: {
124
- __html: lastUpdated
125
- }
126
- })) : null)));
109
+ }, toggleLabel)));
127
110
  }
128
111
 
129
112
  }
@@ -135,9 +118,7 @@ DisciplineHeader.propTypes = process.env.NODE_ENV !== "production" ? {
135
118
  title: PropTypes.string,
136
119
  description: PropTypes.string,
137
120
  image: Preview.propTypes.image,
138
- video: Preview.propTypes.video,
139
- lastUpdated: PropTypes.string,
140
- invertedLanguage: PropTypes.bool
121
+ video: Preview.propTypes.video
141
122
  } : {};
142
123
  export default DisciplineHeader;
143
124
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","get","getOr","classnames","NovaSolidSynchronizeSynchronize3","SyncIcon","VideoPlayer","Picture","style","Preview","image","video","mimeType","id","jwpOptions","propTypes","src","shape","DisciplineHeader","Component","constructor","props","state","fullDisplay","offsetHeightShowMore","handleToggleDisplay","bind","setHandle","setState","prevState","el","render","title","description","lastUpdated","invertedLanguage","translate","context","maxHeightCourseInfos","hasMediaContent","toggleLabel","shortCourseText","courseSeeMoreButtonStyle","showMoreHidden","showMore","wrapper","imgWrapper","courseWrapper","courseTextWrapperFull","courseTextWrapperShort","innerHTML","__html","lastUpdatedWrapper","lastUpdatedWrapperShort","syncIcon","lastUpdatedText","contextTypes","func","string","bool"],"sources":["../../../src/molecule/discipline-header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport classnames from 'classnames';\nimport {NovaSolidSynchronizeSynchronize3 as SyncIcon} from '@coorpacademy/nova-icons';\nimport VideoPlayer from '../video-player';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst Preview = ({image, video}) => {\n const mimeType = get('mimeType', video);\n const id = get('id', video);\n const jwpOptions = get('jwpOptions', video);\n if (id) {\n return <VideoPlayer mimeType={mimeType} id={id} width=\"380px\" height=\"250px\" />;\n } else if (jwpOptions) {\n return <VideoPlayer {...video} />;\n } else {\n return <Picture className={style.image} src={image} />;\n }\n};\n\nPreview.propTypes = {\n image: Picture.propTypes.src,\n video: PropTypes.shape(VideoPlayer.propTypes)\n};\n\nclass DisciplineHeader extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n image: Preview.propTypes.image,\n video: Preview.propTypes.video,\n lastUpdated: PropTypes.string,\n invertedLanguage: PropTypes.bool\n };\n\n static contextTypes = {\n translate: PropTypes.func\n };\n\n constructor(props) {\n super(props);\n this.state = {\n fullDisplay: false,\n offsetHeightShowMore: 0\n };\n this.handleToggleDisplay = this.handleToggleDisplay.bind(this);\n this.setHandle = this.setHandle.bind(this);\n }\n\n handleToggleDisplay() {\n this.setState(prevState => ({\n fullDisplay: !prevState.fullDisplay\n }));\n }\n\n setHandle(el) {\n this.setState({offsetHeightShowMore: getOr(0, 'offsetHeight', el)});\n }\n\n render() {\n const {image, title, description, video, lastUpdated, invertedLanguage} = this.props;\n const {fullDisplay, offsetHeightShowMore} = this.state;\n const {translate} = this.context;\n const maxHeightCourseInfos = 209;\n const hasMediaContent = image || video;\n const toggleLabel = fullDisplay ? translate('See less') : translate('Show more');\n const shortCourseText = offsetHeightShowMore <= maxHeightCourseInfos;\n const courseSeeMoreButtonStyle = shortCourseText ? style.showMoreHidden : style.showMore;\n\n return (\n <div data-name=\"disciplineHeader\" className={style.wrapper}>\n {hasMediaContent ? (\n <div className={style.imgWrapper}>\n <Preview image={image} video={video} />\n </div>\n ) : null}\n <div className={style.courseWrapper}>\n <div className={fullDisplay ? style.courseTextWrapperFull : style.courseTextWrapperShort}>\n <div\n data-name=\"title\"\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: description}}\n ref={this.setHandle}\n />\n </div>\n <div className={invertedLanguage ? style.invertedLanguage : null}>\n <div className={courseSeeMoreButtonStyle} onClick={this.handleToggleDisplay}>\n {toggleLabel}\n </div>\n {lastUpdated ? (\n <div\n className={classnames(\n style.lastUpdatedWrapper,\n shortCourseText ? style.lastUpdatedWrapperShort : null\n )}\n >\n <SyncIcon className={style.syncIcon} />\n <div\n className={classnames(style.lastUpdatedText, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: lastUpdated}}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default DisciplineHeader;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,gCAAgC,IAAIC,QAA5C,QAA2D,0BAA3D;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,OAAO,GAAG,CAAC;EAACC,KAAD;EA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oPlayer","Picture","style","Preview","image","video","mimeType","id","jwpOptions","propTypes","src","shape","DisciplineHeader","Component","constructor","props","state","fullDisplay","offsetHeightShowMore","handleToggleDisplay","bind","setHandle","setState","prevState","el","render","title","description","translate","context","maxHeightDescription","toggleLabel","descritpionViewStyle","showMoreHidden","showMore","wrapper","imgWrapper","courseWrapper","innerHTML","__html","desc","shortDesc","contextTypes","func","string"],"sources":["../../../src/molecule/discipline-header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport classnames from 'classnames';\nimport VideoPlayer from '../video-player';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst Preview = ({image, video}) => {\n const mimeType = get('mimeType', video);\n const id = get('id', video);\n const jwpOptions = get('jwpOptions', video);\n if (id) {\n return <VideoPlayer mimeType={mimeType} id={id} width=\"380px\" height=\"250px\" />;\n } else if (jwpOptions) {\n return <VideoPlayer {...video} />;\n } else {\n return <Picture className={style.image} src={image} />;\n }\n};\n\nPreview.propTypes = {\n image: Picture.propTypes.src,\n video: PropTypes.shape(VideoPlayer.propTypes)\n};\n\nclass DisciplineHeader extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n image: Preview.propTypes.image,\n video: Preview.propTypes.video\n };\n\n static contextTypes = {\n translate: PropTypes.func\n };\n\n constructor(props) {\n super(props);\n this.state = {\n fullDisplay: false,\n offsetHeightShowMore: 0\n };\n this.handleToggleDisplay = this.handleToggleDisplay.bind(this);\n this.setHandle = this.setHandle.bind(this);\n }\n\n handleToggleDisplay() {\n this.setState(prevState => ({\n fullDisplay: !prevState.fullDisplay\n }));\n }\n\n setHandle(el) {\n this.setState({offsetHeightShowMore: getOr(0, 'offsetHeight', el)});\n }\n\n render() {\n const {image, title, description, video} = this.props;\n const {fullDisplay, offsetHeightShowMore} = this.state;\n const {translate} = this.context;\n const maxHeightDescription = 219;\n\n const toggleLabel = fullDisplay ? translate('See less') : translate('Show more');\n const descritpionViewStyle =\n offsetHeightShowMore <= maxHeightDescription ? style.showMoreHidden : style.showMore;\n\n return (\n <div data-name=\"disciplineHeader\" className={style.wrapper}>\n {image || video ? (\n <div className={style.imgWrapper}>\n <Preview image={image} video={video} />\n </div>\n ) : null}\n <div className={style.courseWrapper}>\n <div\n data-name=\"title\"\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div className={fullDisplay ? style.desc : style.shortDesc}>\n <div\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: description}}\n ref={this.setHandle}\n />\n </div>\n <div className={descritpionViewStyle} onClick={this.handleToggleDisplay}>\n {toggleLabel}\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default DisciplineHeader;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,OAAO,GAAG,CAAC;EAACC,KAAD;EAAQC;AAAR,CAAD,KAAoB;EAClC,MAAMC,QAAQ,GAAGT,GAAG,CAAC,UAAD,EAAaQ,KAAb,CAApB;EACA,MAAME,EAAE,GAAGV,GAAG,CAAC,IAAD,EAAOQ,KAAP,CAAd;EACA,MAAMG,UAAU,GAAGX,GAAG,CAAC,YAAD,EAAeQ,KAAf,CAAtB;;EACA,IAAIE,EAAJ,EAAQ;IACN,oBAAO,oBAAC,WAAD;MAAa,QAAQ,EAAED,QAAvB;MAAiC,EAAE,EAAEC,EAArC;MAAyC,KAAK,EAAC,OAA/C;MAAuD,MAAM,EAAC;IAA9D,EAA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GjBxC,KAAK,EAAED,OAAO,CAACM,SAAR,CAAkBL,KAHR;EAIjBC,KAAK,EAAEF,OAAO,CAACM,SAAR,CAAkBJ;AAJR,C;AAwErB,eAAeO,gBAAf"}
@@ -45,7 +45,7 @@
45
45
  color: dark;
46
46
  }
47
47
 
48
- .courseTextWrapperFull {
48
+ .desc {
49
49
  font-family: "Gilroy";
50
50
  font-size: 15px;
51
51
  color: black;
@@ -53,14 +53,14 @@
53
53
  line-height: 22px;
54
54
  }
55
55
 
56
- .courseTextWrapperFull a {
56
+ .desc a {
57
57
  font-family: Gilroy;
58
58
  font-weight: 600;
59
59
  color: brand;
60
60
  text-decoration: none;
61
61
  }
62
62
 
63
- .courseTextWrapperFull a:hover {
63
+ .desc a:hover {
64
64
  text-decoration: underline;
65
65
  }
66
66
 
@@ -68,42 +68,10 @@
68
68
  display: none;
69
69
  }
70
70
 
71
- .lastUpdatedWrapperShort {
72
- /* This is required in case that the text is short to make sure that it
73
- is stuck to the bottom at the same level to the media */
74
- height: 28px;
75
- align-items: flex-end;
76
- }
77
-
78
- .lastUpdatedWrapper {
79
- display: flex;
80
- margin-top: 8px;
81
- }
82
-
83
- .lastUpdatedText {
84
- font-family: 'Gilroy';
85
- font-style: normal;
86
- font-weight: 600;
87
- font-size: 12px;
88
- line-height: 14px;
89
- color: #536E7A;
90
- }
91
-
92
- .invertedLanguage {
93
- float: right;
94
- text-align: right;
95
- align-items: right;
96
- }
97
-
98
- .syncIcon {
99
- height: 13px;
100
- color: #536E7A;
101
- margin-right: 3px;
102
- }
103
-
104
71
  .showMore {
105
72
  display: block;
106
73
  font-size: 14px;
74
+ margin: 0 14px 0 0;
107
75
  transition: all time ease-in-out;
108
76
  cursor: pointer;
109
77
  order: 1;
@@ -117,9 +85,9 @@
117
85
  opacity: 0.8;
118
86
  }
119
87
 
120
- .courseTextWrapperShort {
121
- composes: courseTextWrapperFull;
122
- height: 213px;
88
+ .shortDesc {
89
+ composes: desc;
90
+ height: 200px;
123
91
  overflow: hidden;
124
92
  }
125
93
 
@@ -138,7 +106,6 @@
138
106
  margin-top: 20px;
139
107
  padding-left: 0;
140
108
  }
141
-
142
109
  }
143
110
 
144
111
  .innerHTML {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/discipline/index.js"],"names":[],"mappings":";AAcA,mEAiKC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/discipline/index.js"],"names":[],"mappings":";AAcA,mEAwJC"}
@@ -34,9 +34,7 @@ const Discipline = (props, context) => {
34
34
  addToMyListText,
35
35
  removeFromMyListText,
36
36
  disableShare = false,
37
- disableAddToMyList = false,
38
- lastUpdated,
39
- invertedLanguage = false
37
+ disableAddToMyList = false
40
38
  } = props;
41
39
  const authorSection = isEmpty(authors) ? null : /*#__PURE__*/React.createElement("div", {
42
40
  className: style.partners
@@ -64,9 +62,7 @@ const Discipline = (props, context) => {
64
62
  image: image,
65
63
  video: video,
66
64
  title: title,
67
- description: description,
68
- lastUpdated: lastUpdated,
69
- invertedLanguage: invertedLanguage
65
+ description: description
70
66
  }));
71
67
  const discipline = /*#__PURE__*/React.createElement("div", {
72
68
  "data-name": "discipline",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","isEmpty","PropTypes","DisciplineCTA","DisciplineHeader","DisciplinePartners","DisciplineScope","Share","ShareFeedback","ShareStatusProvider","AddToMyList","AddToMyListFeedback","AddToMyListStatusProvider","style","Discipline","props","context","selected","level","levels","changeLevel","image","title","video","authors","description","start","buy","startLabel","buyLabel","shareWording","shareText","shareSuccessWording","shareErrorWording","addToMyListButton","favorite","onFavoriteClick","addToMyListText","removeFromMyListText","disableShare","disableAddToMyList","lastUpdated","invertedLanguage","authorSection","partners","disciplineCTA","disciplineContent","content","disciplineHeader","header","discipline","container","leftSection","mobileAuthorCtaSection","columnReverse","cta","addToMyListBtn","shareBtn","rightSection","stickySection","buttons","shareFeedBack","addToMyListFeedback","addToMyListProviderWrap","shareProviderWrap","propTypes","onClick","wording","text","successWording","errorWording","bool","contextTypes","translate","func"],"sources":["../../../../src/template/common/discipline/index.js"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport PropTypes from 'prop-types';\nimport DisciplineCTA from '../../../molecule/discipline-cta';\nimport DisciplineHeader from '../../../molecule/discipline-header';\nimport DisciplinePartners from '../../../molecule/discipline-partners';\nimport DisciplineScope from '../../../molecule/discipline-scope';\nimport Share, {ShareFeedback, ShareStatusProvider} from '../../../molecule/share';\nimport AddToMyList, {\n AddToMyListFeedback,\n AddToMyListStatusProvider\n} from '../../../molecule/add-to-my-list';\nimport style from './style.css';\n\nconst Discipline = (props, context) => {\n const {\n selected = 0,\n level,\n levels,\n changeLevel,\n image,\n title = '',\n video,\n authors = [],\n description = '',\n start,\n buy,\n startLabel,\n buyLabel,\n shareWording,\n shareText,\n shareSuccessWording,\n shareErrorWording,\n addToMyListButton,\n favorite,\n onFavoriteClick,\n addToMyListText,\n removeFromMyListText,\n disableShare = false,\n disableAddToMyList = false,\n lastUpdated,\n invertedLanguage = false\n } = props;\n\n const authorSection = isEmpty(authors) ? null : (\n <div className={style.partners}>\n <DisciplinePartners authors={authors} />\n </div>\n );\n\n const disciplineCTA = (\n <DisciplineCTA\n type={'discipline'}\n start={start}\n buy={buy}\n startLabel={startLabel}\n buyLabel={buyLabel}\n />\n );\n\n const disciplineContent = (\n <div className={style.content}>\n <DisciplineScope content={level} levels={levels} selected={selected} onClick={changeLevel} />\n </div>\n );\n\n const disciplineHeader = (\n <div className={style.header}>\n <DisciplineHeader\n image={image}\n video={video}\n title={title}\n description={description}\n lastUpdated={lastUpdated}\n invertedLanguage={invertedLanguage}\n />\n </div>\n );\n\n const discipline = (\n <div data-name=\"discipline\" className={style.container} key=\"discipline\">\n <div className={style.leftSection}>\n {disciplineHeader}\n <div className={style.mobileAuthorCtaSection}>\n <div className={style.columnReverse}>\n <div className={style.cta}>{disciplineCTA}</div>\n {disableAddToMyList ? null : (\n <AddToMyList\n style={style.addToMyListBtn}\n addToMyListButton={addToMyListButton}\n favorite={favorite}\n onFavoriteClick={onFavoriteClick}\n key={'addToMyListTablet'}\n />\n )}\n {disableShare ? null : (\n <Share\n style={style.shareBtn}\n wording={shareWording}\n text={shareText}\n key={'shareTablet'}\n />\n )}\n </div>\n {authorSection}\n </div>\n {disciplineContent}\n </div>\n <div className={style.rightSection}>\n <div className={style.stickySection}>\n <div className={style.cta}>\n {disciplineCTA}\n {disableShare && disableAddToMyList ? null : (\n <div className={style.buttons}>\n {disableShare ? null : (\n <Share\n style={style.shareBtn}\n wording={shareWording}\n text={shareText}\n key={'shareDesktop'}\n />\n )}\n {disableAddToMyList ? null : (\n <AddToMyList\n style={style.addToMyListBtn}\n addToMyListButton={addToMyListButton}\n favorite={favorite}\n onFavoriteClick={onFavoriteClick}\n key={'addToMyListDesktop'}\n />\n )}\n </div>\n )}\n </div>\n {authorSection}\n </div>\n </div>\n </div>\n );\n\n const shareFeedBack = disableShare ? null : (\n <ShareFeedback\n errorWording={shareErrorWording}\n successWording={shareSuccessWording}\n key=\"shareFeedBack\"\n />\n );\n\n const addToMyListFeedback = disableAddToMyList ? null : (\n <AddToMyListFeedback\n addToMyListText={addToMyListText}\n removeFromMyListText={removeFromMyListText}\n favorite={favorite}\n />\n );\n\n const addToMyListProviderWrap = disableAddToMyList ? (\n <>\n {shareFeedBack}\n {discipline}\n </>\n ) : (\n <AddToMyListStatusProvider>\n {shareFeedBack}\n {addToMyListFeedback}\n {discipline}\n </AddToMyListStatusProvider>\n );\n const shareProviderWrap = disableShare ? (\n addToMyListProviderWrap\n ) : (\n <ShareStatusProvider>{addToMyListProviderWrap}</ShareStatusProvider>\n );\n\n return shareProviderWrap;\n};\n\nDiscipline.propTypes = {\n image: DisciplineHeader.propTypes.image,\n video: DisciplineHeader.propTypes.video,\n title: DisciplineHeader.propTypes.title,\n description: DisciplineHeader.propTypes.description,\n start: DisciplineCTA.propTypes.start,\n buy: DisciplineCTA.propTypes.buy,\n startLabel: DisciplineCTA.propTypes.startLabel,\n buyLabel: DisciplineCTA.propTypes.buyLabel,\n authors: DisciplinePartners.propTypes.authors,\n level: DisciplineScope.propTypes.content,\n levels: DisciplineScope.propTypes.levels,\n selected: DisciplineScope.propTypes.selected,\n changeLevel: DisciplineScope.propTypes.onClick,\n shareWording: Share.propTypes.wording,\n shareText: Share.propTypes.text,\n shareSuccessWording: ShareFeedback.propTypes.successWording,\n shareErrorWording: ShareFeedback.propTypes.errorWording,\n addToMyListText: AddToMyListFeedback.propTypes.addToMyListText,\n removeFromMyListText: AddToMyListFeedback.propTypes.removeFromMyListText,\n addToMyListButton: AddToMyList.propTypes.addToMyListButton,\n onFavoriteClick: AddToMyList.propTypes.onFavoriteClick,\n favorite: AddToMyList.propTypes.favorite,\n disableShare: PropTypes.bool,\n disableAddToMyList: PropTypes.bool\n};\n\nDiscipline.contextTypes = {\n translate: PropTypes.func\n};\n\nexport default Discipline;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,aAAP,MAA0B,kCAA1B;AACA,OAAOC,gBAAP,MAA6B,qCAA7B;AACA,OAAOC,kBAAP,MAA+B,uCAA/B;AACA,OAAOC,eAAP,MAA4B,oCAA5B;AACA,OAAOC,KAAP,IAAeC,aAAf,EAA8BC,mBAA9B,QAAwD,yBAAxD;AACA,OAAOC,WAAP,IACEC,mBADF,EAEEC,yBAFF,QAGO,kCAHP;AAIA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,QAAQ,GAAG,CADP;IAEJC,KAFI;IAGJC,MAHI;IAIJC,WAJI;IAKJC,KALI;IAMJC,KAAK,GAAG,EANJ;IAOJC,KAPI;IAQJC,OAAO,GAAG,EARN;IASJC,W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nB,CAA6BzC,OATjB;EAUrBN,KAAK,EAAEZ,eAAe,CAAC2D,SAAhB,CAA0BlB,OAVZ;EAWrB5B,MAAM,EAAEb,eAAe,CAAC2D,SAAhB,CAA0B9C,MAXb;EAYrBF,QAAQ,EAAEX,eAAe,CAAC2D,SAAhB,CAA0BhD,QAZf;EAarBG,WAAW,EAAEd,eAAe,CAAC2D,SAAhB,CAA0BC,OAblB;EAcrBpC,YAAY,EAAEvB,KAAK,CAAC0D,SAAN,CAAgBE,OAdT;EAerBpC,SAAS,EAAExB,KAAK,CAAC0D,SAAN,CAAgBG,IAfN;EAgBrBpC,mBAAmB,EAAExB,aAAa,CAACyD,SAAd,CAAwBI,cAhBxB;EAiBrBpC,iBAAiB,EAAEzB,aAAa,CAACyD,SAAd,CAAwBK,YAjBtB;EAkBrBjC,eAAe,EAAE1B,mBAAmB,CAACsD,SAApB,CAA8B5B,eAlB1B;EAmBrBC,oBAAoB,EAAE3B,mBAAmB,CAACsD,SAApB,CAA8B3B,oBAnB/B;EAoBrBJ,iBAAiB,EAAExB,WAAW,CAACuD,SAAZ,CAAsB/B,iBApBpB;EAqBrBE,eAAe,EAAE1B,WAAW,CAACuD,SAAZ,CAAsB7B,eArBlB;EAsBrBD,QAAQ,EAAEzB,WAAW,CAACuD,SAAZ,CAAsB9B,QAtBX;EAuBrBI,YAAY,EAAErC,SAAS,CAACqE,IAvBH;EAwBrB/B,kBAAkB,EAAEtC,SAAS,CAACqE;AAxBT,CAAvB;AA2BAzD,UAAU,CAAC0D,YAAX,GAA0B;EACxBC,SAAS,EAAEvE,SAAS,CAACwE;AADG,CAA1B;AAIA,eAAe5D,UAAf"}
1
+ {"version":3,"file":"index.js","names":["React","isEmpty","PropTypes","DisciplineCTA","DisciplineHeader","DisciplinePartners","DisciplineScope","Share","ShareFeedback","ShareStatusProvider","AddToMyList","AddToMyListFeedback","AddToMyListStatusProvider","style","Discipline","props","context","selected","level","levels","changeLevel","image","title","video","authors","description","start","buy","startLabel","buyLabel","shareWording","shareText","shareSuccessWording","shareErrorWording","addToMyListButton","favorite","onFavoriteClick","addToMyListText","removeFromMyListText","disableShare","disableAddToMyList","authorSection","partners","disciplineCTA","disciplineContent","content","disciplineHeader","header","discipline","container","leftSection","mobileAuthorCtaSection","columnReverse","cta","addToMyListBtn","shareBtn","rightSection","stickySection","buttons","shareFeedBack","addToMyListFeedback","addToMyListProviderWrap","shareProviderWrap","propTypes","onClick","wording","text","successWording","errorWording","bool","contextTypes","translate","func"],"sources":["../../../../src/template/common/discipline/index.js"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport PropTypes from 'prop-types';\nimport DisciplineCTA from '../../../molecule/discipline-cta';\nimport DisciplineHeader from '../../../molecule/discipline-header';\nimport DisciplinePartners from '../../../molecule/discipline-partners';\nimport DisciplineScope from '../../../molecule/discipline-scope';\nimport Share, {ShareFeedback, ShareStatusProvider} from '../../../molecule/share';\nimport AddToMyList, {\n AddToMyListFeedback,\n AddToMyListStatusProvider\n} from '../../../molecule/add-to-my-list';\nimport style from './style.css';\n\nconst Discipline = (props, context) => {\n const {\n selected = 0,\n level,\n levels,\n changeLevel,\n image,\n title = '',\n video,\n authors = [],\n description = '',\n start,\n buy,\n startLabel,\n buyLabel,\n shareWording,\n shareText,\n shareSuccessWording,\n shareErrorWording,\n addToMyListButton,\n favorite,\n onFavoriteClick,\n addToMyListText,\n removeFromMyListText,\n disableShare = false,\n disableAddToMyList = false\n } = props;\n\n const authorSection = isEmpty(authors) ? null : (\n <div className={style.partners}>\n <DisciplinePartners authors={authors} />\n </div>\n );\n\n const disciplineCTA = (\n <DisciplineCTA\n type={'discipline'}\n start={start}\n buy={buy}\n startLabel={startLabel}\n buyLabel={buyLabel}\n />\n );\n\n const disciplineContent = (\n <div className={style.content}>\n <DisciplineScope content={level} levels={levels} selected={selected} onClick={changeLevel} />\n </div>\n );\n\n const disciplineHeader = (\n <div className={style.header}>\n <DisciplineHeader image={image} video={video} title={title} description={description} />\n </div>\n );\n\n const discipline = (\n <div data-name=\"discipline\" className={style.container} key=\"discipline\">\n <div className={style.leftSection}>\n {disciplineHeader}\n <div className={style.mobileAuthorCtaSection}>\n <div className={style.columnReverse}>\n <div className={style.cta}>{disciplineCTA}</div>\n {disableAddToMyList ? null : (\n <AddToMyList\n style={style.addToMyListBtn}\n addToMyListButton={addToMyListButton}\n favorite={favorite}\n onFavoriteClick={onFavoriteClick}\n key={'addToMyListTablet'}\n />\n )}\n {disableShare ? null : (\n <Share\n style={style.shareBtn}\n wording={shareWording}\n text={shareText}\n key={'shareTablet'}\n />\n )}\n </div>\n {authorSection}\n </div>\n {disciplineContent}\n </div>\n <div className={style.rightSection}>\n <div className={style.stickySection}>\n <div className={style.cta}>\n {disciplineCTA}\n {disableShare && disableAddToMyList ? null : (\n <div className={style.buttons}>\n {disableShare ? null : (\n <Share\n style={style.shareBtn}\n wording={shareWording}\n text={shareText}\n key={'shareDesktop'}\n />\n )}\n {disableAddToMyList ? null : (\n <AddToMyList\n style={style.addToMyListBtn}\n addToMyListButton={addToMyListButton}\n favorite={favorite}\n onFavoriteClick={onFavoriteClick}\n key={'addToMyListDesktop'}\n />\n )}\n </div>\n )}\n </div>\n {authorSection}\n </div>\n </div>\n </div>\n );\n\n const shareFeedBack = disableShare ? null : (\n <ShareFeedback\n errorWording={shareErrorWording}\n successWording={shareSuccessWording}\n key=\"shareFeedBack\"\n />\n );\n\n const addToMyListFeedback = disableAddToMyList ? null : (\n <AddToMyListFeedback\n addToMyListText={addToMyListText}\n removeFromMyListText={removeFromMyListText}\n favorite={favorite}\n />\n );\n\n const addToMyListProviderWrap = disableAddToMyList ? (\n <>\n {shareFeedBack}\n {discipline}\n </>\n ) : (\n <AddToMyListStatusProvider>\n {shareFeedBack}\n {addToMyListFeedback}\n {discipline}\n </AddToMyListStatusProvider>\n );\n const shareProviderWrap = disableShare ? (\n addToMyListProviderWrap\n ) : (\n <ShareStatusProvider>{addToMyListProviderWrap}</ShareStatusProvider>\n );\n\n return shareProviderWrap;\n};\n\nDiscipline.propTypes = {\n image: DisciplineHeader.propTypes.image,\n video: DisciplineHeader.propTypes.video,\n title: DisciplineHeader.propTypes.title,\n description: DisciplineHeader.propTypes.description,\n start: DisciplineCTA.propTypes.start,\n buy: DisciplineCTA.propTypes.buy,\n startLabel: DisciplineCTA.propTypes.startLabel,\n buyLabel: DisciplineCTA.propTypes.buyLabel,\n authors: DisciplinePartners.propTypes.authors,\n level: DisciplineScope.propTypes.content,\n levels: DisciplineScope.propTypes.levels,\n selected: DisciplineScope.propTypes.selected,\n changeLevel: DisciplineScope.propTypes.onClick,\n shareWording: Share.propTypes.wording,\n shareText: Share.propTypes.text,\n shareSuccessWording: ShareFeedback.propTypes.successWording,\n shareErrorWording: ShareFeedback.propTypes.errorWording,\n addToMyListText: AddToMyListFeedback.propTypes.addToMyListText,\n removeFromMyListText: AddToMyListFeedback.propTypes.removeFromMyListText,\n addToMyListButton: AddToMyList.propTypes.addToMyListButton,\n onFavoriteClick: AddToMyList.propTypes.onFavoriteClick,\n favorite: AddToMyList.propTypes.favorite,\n disableShare: PropTypes.bool,\n disableAddToMyList: PropTypes.bool\n};\n\nDiscipline.contextTypes = {\n translate: PropTypes.func\n};\n\nexport default Discipline;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,aAAP,MAA0B,kCAA1B;AACA,OAAOC,gBAAP,MAA6B,qCAA7B;AACA,OAAOC,kBAAP,MAA+B,uCAA/B;AACA,OAAOC,eAAP,MAA4B,oCAA5B;AACA,OAAOC,KAAP,IAAeC,aAAf,EAA8BC,mBAA9B,QAAwD,yBAAxD;AACA,OAAOC,WAAP,IACEC,mBADF,EAEEC,yBAFF,QAGO,kCAHP;AAIA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAA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