@coorpacademy/components 10.22.16-alpha.13 → 10.22.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/es/atom/input-switch/index.js +4 -2
  2. package/es/atom/input-switch/index.js.map +1 -1
  3. package/es/atom/provider/index.js +0 -15
  4. package/es/atom/provider/index.js.map +1 -1
  5. package/es/atom/range/handle.js +59 -59
  6. package/es/atom/range/handle.js.map +1 -1
  7. package/es/atom/range/index.js +43 -55
  8. package/es/atom/range/index.js.map +1 -1
  9. package/es/atom/select/index.js +5 -3
  10. package/es/atom/select/index.js.map +1 -1
  11. package/es/molecule/cm-popin/index.js +4 -2
  12. package/es/molecule/cm-popin/index.js.map +1 -1
  13. package/es/molecule/cm-popin/style.css +1 -1
  14. package/es/molecule/questions/free-text/index.js +3 -4
  15. package/es/molecule/questions/free-text/index.js.map +1 -1
  16. package/es/molecule/questions/qcm/index.js +5 -3
  17. package/es/molecule/questions/qcm/index.js.map +1 -1
  18. package/es/molecule/questions/qcm-drag/index.js +8 -3
  19. package/es/molecule/questions/qcm-drag/index.js.map +1 -1
  20. package/es/molecule/questions/qcm-graphic/index.js +5 -3
  21. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  22. package/es/molecule/questions/question-range/index.js +5 -3
  23. package/es/molecule/questions/question-range/index.js.map +1 -1
  24. package/es/organism/review-slide/index.js +10 -5
  25. package/es/organism/review-slide/index.js.map +1 -1
  26. package/es/template/app-review/template-context.js +7 -3
  27. package/es/template/app-review/template-context.js.map +1 -1
  28. package/lib/atom/input-switch/index.js +4 -2
  29. package/lib/atom/input-switch/index.js.map +1 -1
  30. package/lib/atom/provider/index.js +1 -23
  31. package/lib/atom/provider/index.js.map +1 -1
  32. package/lib/atom/range/handle.js +57 -61
  33. package/lib/atom/range/handle.js.map +1 -1
  34. package/lib/atom/range/index.js +43 -55
  35. package/lib/atom/range/index.js.map +1 -1
  36. package/lib/atom/select/index.js +5 -3
  37. package/lib/atom/select/index.js.map +1 -1
  38. package/lib/molecule/cm-popin/index.js +4 -2
  39. package/lib/molecule/cm-popin/index.js.map +1 -1
  40. package/lib/molecule/cm-popin/style.css +1 -1
  41. package/lib/molecule/questions/free-text/index.js +3 -4
  42. package/lib/molecule/questions/free-text/index.js.map +1 -1
  43. package/lib/molecule/questions/qcm/index.js +5 -3
  44. package/lib/molecule/questions/qcm/index.js.map +1 -1
  45. package/lib/molecule/questions/qcm-drag/index.js +8 -7
  46. package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
  47. package/lib/molecule/questions/qcm-graphic/index.js +5 -7
  48. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  49. package/lib/molecule/questions/question-range/index.js +5 -7
  50. package/lib/molecule/questions/question-range/index.js.map +1 -1
  51. package/lib/organism/review-slide/index.js +11 -6
  52. package/lib/organism/review-slide/index.js.map +1 -1
  53. package/lib/template/app-review/template-context.js +6 -3
  54. package/lib/template/app-review/template-context.js.map +1 -1
  55. package/package.json +2 -2
  56. package/es/atom/provider/web-context.js +0 -27
  57. package/es/atom/provider/web-context.js.map +0 -1
  58. package/lib/atom/provider/web-context.js +0 -40
  59. package/lib/atom/provider/web-context.js.map +0 -1
@@ -1,27 +0,0 @@
1
- function _extends() { _extends = Object.assign || 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, { createContext, useContext } from 'react';
4
- const Context = createContext({
5
- translate: key => key
6
- });
7
-
8
- const WebContext = ({
9
- values,
10
- children
11
- }) => {
12
- return /*#__PURE__*/React.createElement(Context.Provider, {
13
- value: _extends({}, values)
14
- }, children);
15
- };
16
-
17
- export const useWebContext = () => {
18
- const context = useContext(Context);
19
-
20
- if (!context) {
21
- throw new Error('❌ [WebContext] useWebContext must be used within a provider <WebContext>');
22
- }
23
-
24
- return context;
25
- };
26
- export default WebContext;
27
- //# sourceMappingURL=web-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/atom/provider/web-context.tsx"],"names":["React","createContext","useContext","Context","translate","key","WebContext","values","children","useWebContext","context","Error"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,aAAf,EAA8BC,UAA9B,QAA+C,OAA/C;AAaA,MAAMC,OAAO,GAAGF,aAAa,CAAC;AAC5BG,EAAAA,SAAS,EAAGC,GAAD,IAAiBA;AADA,CAAD,CAA7B;;AAMA,MAAMC,UAAU,GAAG,CAAC;AAACC,EAAAA,MAAD;AAASC,EAAAA;AAAT,CAAD,KAA+B;AAChD,sBAAO,oBAAC,OAAD,CAAS,QAAT;AAAkB,IAAA,KAAK,eAAMD,MAAN;AAAvB,KAAuCC,QAAvC,CAAP;AACD,CAFD;;AAIA,OAAO,MAAMC,aAAa,GAAG,MAAwB;AACnD,QAAMC,OAAO,GAAGR,UAAU,CAACC,OAAD,CAA1B;;AAEA,MAAI,CAACO,OAAL,EAAc;AACZ,UAAM,IAAIC,KAAJ,CAAU,0EAAV,CAAN;AACD;;AAED,SAAOD,OAAP;AACD,CARM;AAUP,eAAeJ,UAAf","sourcesContent":["import React, {createContext, useContext} from 'react';\n\ntype Skin = {\n common: {\n primary: string;\n };\n};\n\ntype WebContextValues = {\n skin?: Skin;\n translate: (key: string) => string;\n};\n\nconst Context = createContext({\n translate: (key: string) => key\n});\n\ntype Props = {values: WebContextValues; children: any};\n\nconst WebContext = ({values, children}: Props) => {\n return <Context.Provider value={{...values}}>{children}</Context.Provider>;\n};\n\nexport const useWebContext = (): WebContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error('❌ [WebContext] useWebContext must be used within a provider <WebContext>');\n }\n\n return context;\n};\n\nexport default WebContext;\n"],"file":"web-context.js"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = exports.useWebContext = void 0;
5
-
6
- var _react = _interopRequireWildcard(require("react"));
7
-
8
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
9
-
10
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
-
12
- function _extends() { _extends = Object.assign || 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); }
13
-
14
- const Context = (0, _react.createContext)({
15
- translate: key => key
16
- });
17
-
18
- const WebContext = ({
19
- values,
20
- children
21
- }) => {
22
- return /*#__PURE__*/_react.default.createElement(Context.Provider, {
23
- value: _extends({}, values)
24
- }, children);
25
- };
26
-
27
- const useWebContext = () => {
28
- const context = (0, _react.useContext)(Context);
29
-
30
- if (!context) {
31
- throw new Error('❌ [WebContext] useWebContext must be used within a provider <WebContext>');
32
- }
33
-
34
- return context;
35
- };
36
-
37
- exports.useWebContext = useWebContext;
38
- var _default = WebContext;
39
- exports.default = _default;
40
- //# sourceMappingURL=web-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/atom/provider/web-context.tsx"],"names":["Context","translate","key","WebContext","values","children","useWebContext","context","Error"],"mappings":";;;;;AAAA;;;;;;;;AAaA,MAAMA,OAAO,GAAG,0BAAc;AAC5BC,EAAAA,SAAS,EAAGC,GAAD,IAAiBA;AADA,CAAd,CAAhB;;AAMA,MAAMC,UAAU,GAAG,CAAC;AAACC,EAAAA,MAAD;AAASC,EAAAA;AAAT,CAAD,KAA+B;AAChD,sBAAO,6BAAC,OAAD,CAAS,QAAT;AAAkB,IAAA,KAAK,eAAMD,MAAN;AAAvB,KAAuCC,QAAvC,CAAP;AACD,CAFD;;AAIO,MAAMC,aAAa,GAAG,MAAwB;AACnD,QAAMC,OAAO,GAAG,uBAAWP,OAAX,CAAhB;;AAEA,MAAI,CAACO,OAAL,EAAc;AACZ,UAAM,IAAIC,KAAJ,CAAU,0EAAV,CAAN;AACD;;AAED,SAAOD,OAAP;AACD,CARM;;;eAUQJ,U","sourcesContent":["import React, {createContext, useContext} from 'react';\n\ntype Skin = {\n common: {\n primary: string;\n };\n};\n\ntype WebContextValues = {\n skin?: Skin;\n translate: (key: string) => string;\n};\n\nconst Context = createContext({\n translate: (key: string) => key\n});\n\ntype Props = {values: WebContextValues; children: any};\n\nconst WebContext = ({values, children}: Props) => {\n return <Context.Provider value={{...values}}>{children}</Context.Provider>;\n};\n\nexport const useWebContext = (): WebContextValues => {\n const context = useContext(Context);\n\n if (!context) {\n throw new Error('❌ [WebContext] useWebContext must be used within a provider <WebContext>');\n }\n\n return context;\n};\n\nexport default WebContext;\n"],"file":"web-context.js"}