mario-education 2.4.472-question → 2.4.473-prod

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.
@@ -0,0 +1,2 @@
1
+ declare const SurveyPortal: () => JSX.Element;
2
+ export default SurveyPortal;
package/dist/index.js CHANGED
@@ -16342,7 +16342,7 @@ var useQuestionDetail$1 = function useQuestionDetail(id, type) {
16342
16342
  lang: lang
16343
16343
  };
16344
16344
  return Promise.resolve(getById$2(id, objLang)).then(function (res) {
16345
- var _res$data$category, _res$data, _res$data2, _res$data3;
16345
+ var _res$data$category, _res$data, _res$data2, _res$data3, _res$data4;
16346
16346
 
16347
16347
  var objNew = _extends({}, res.data, {
16348
16348
  categoryId: (_res$data$category = res.data.category) === null || _res$data$category === void 0 ? void 0 : _res$data$category.id,
@@ -16350,12 +16350,10 @@ var useQuestionDetail$1 = function useQuestionDetail(id, type) {
16350
16350
  });
16351
16351
 
16352
16352
  setQuestionDetail(objNew);
16353
- console.log({
16354
- objNew: objNew
16355
- });
16353
+ setActiveType((_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.type);
16356
16354
  editorRef && editorRef.editor.execCommand("mceSetContent", false, objNew.text);
16357
16355
 
16358
- if ((_res$data3 = res.data) !== null && _res$data3 !== void 0 && _res$data3.type) {
16356
+ if ((_res$data4 = res.data) !== null && _res$data4 !== void 0 && _res$data4.type) {
16359
16357
  handleGetLabelQuestions(res.data.type);
16360
16358
  }
16361
16359
  });
@@ -16689,13 +16687,6 @@ var QuestionDetail = function QuestionDetail() {
16689
16687
  };
16690
16688
 
16691
16689
  React.useEffect(function () {
16692
- console.log({
16693
- values: values
16694
- });
16695
- console.log({
16696
- activeModelLanguage: activeModelLanguage
16697
- });
16698
-
16699
16690
  if (!id && !!activeModelLanguage && activeModelLanguage.lang == values.lang && JSON.stringify(activeModelLanguage) !== JSON.stringify(values)) {
16700
16691
  var categoryId = values.categoryId != 0 ? values.categoryId : questionDetail.categoryId;
16701
16692
  var updatedModelQuestionLang = modelQuestionLang.map(function (item) {
@@ -16761,7 +16752,7 @@ var QuestionDetail = function QuestionDetail() {
16761
16752
  className: styles["form-question-text"] + " mb-2"
16762
16753
  }, React__default.createElement(marioCore.RequiredLabel, {
16763
16754
  text: t("question_text")
16764
- }), (values.text || !id) && !!tinyMCEKey && React__default.createElement(tinymceReact.Editor, {
16755
+ }), !!tinyMCEKey && React__default.createElement(tinymceReact.Editor, {
16765
16756
  apiKey: tinyMCEKey || TINY_MCE_API_KEY,
16766
16757
  value: values.text,
16767
16758
  init: _extends({}, marioCore.editorConfig.question, {
@@ -19944,7 +19935,8 @@ var QuestionCateList = function QuestionCateList(_ref) {
19944
19935
  }), React__default.createElement("div", {
19945
19936
  className: styles$1['list-survey-category'],
19946
19937
  style: {
19947
- maxHeight: maxHeight
19938
+ maxHeight: maxHeight,
19939
+ minHeight: '400px'
19948
19940
  }
19949
19941
  }, categories && categories.length > 0 ? categories.map(function (cate) {
19950
19942
  var _cate$numberOfQuestio;
@@ -34660,7 +34652,9 @@ var useDashboard = function useDashboard() {
34660
34652
  getData();
34661
34653
  }, [filter]);
34662
34654
  React.useEffect(function () {
34663
- getSummarizeQuestion();
34655
+ if (!!academicYear && academicYear.length > 0 && filter.academicYearId != 0) {
34656
+ getSummarizeQuestion();
34657
+ }
34664
34658
  }, [filter, questionFilters]);
34665
34659
  React.useEffect(function () {
34666
34660
  getChartDataLanguage();
@@ -41506,8 +41500,8 @@ var compat = function compat(element) {
41506
41500
  return;
41507
41501
  }
41508
41502
 
41509
- var value = element.value,
41510
- parent = element.parent;
41503
+ var value = element.value;
41504
+ var parent = element.parent;
41511
41505
  var isImplicitRule = element.column === parent.column && element.line === parent.line;
41512
41506
 
41513
41507
  while (parent.type !== 'rule') {
@@ -41765,35 +41759,14 @@ var prefixer = function prefixer(element, index, children, callback) {
41765
41759
  }
41766
41760
  };
41767
41761
 
41768
- /* import type { StylisPlugin } from './types' */
41769
-
41770
- /*
41771
- export type Options = {
41772
- nonce?: string,
41773
- stylisPlugins?: StylisPlugin[],
41774
- key: string,
41775
- container?: HTMLElement,
41776
- speedy?: boolean,
41777
- prepend?: boolean,
41778
- insertionPoint?: HTMLElement
41779
- }
41780
- */
41781
-
41782
41762
  var getServerStylisCache = isBrowser ? undefined : weakMemoize(function () {
41783
41763
  return memoize(function () {
41784
- var cache = {};
41785
- return function (name) {
41786
- return cache[name];
41787
- };
41764
+ return {};
41788
41765
  });
41789
41766
  });
41790
41767
  var defaultStylisPlugins = [prefixer];
41791
41768
 
41792
- var createCache = function
41793
- /*: EmotionCache */
41794
- createCache(options
41795
- /*: Options */
41796
- ) {
41769
+ var createCache = function createCache(options) {
41797
41770
  var key = options.key;
41798
41771
 
41799
41772
  if (isBrowser && key === 'css') {
@@ -41802,9 +41775,7 @@ createCache(options
41802
41775
  // note this very very intentionally targets all style elements regardless of the key to ensure
41803
41776
  // that creating a cache works inside of render of a React component
41804
41777
 
41805
- Array.prototype.forEach.call(ssrStyles, function (node
41806
- /*: HTMLStyleElement */
41807
- ) {
41778
+ Array.prototype.forEach.call(ssrStyles, function (node) {
41808
41779
  // we want to only move elements which have a space in the data-emotion attribute value
41809
41780
  // because that indicates that it is an Emotion 11 server-side rendered style elements
41810
41781
  // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
@@ -41826,17 +41797,13 @@ createCache(options
41826
41797
 
41827
41798
  var inserted = {};
41828
41799
  var container;
41829
- /* : Node */
41830
-
41831
41800
  var nodesToHydrate = [];
41832
41801
 
41833
41802
  if (isBrowser) {
41834
41803
  container = options.container || document.head;
41835
41804
  Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
41836
41805
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
41837
- document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node
41838
- /*: HTMLStyleElement */
41839
- ) {
41806
+ document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
41840
41807
  var attrib = node.getAttribute("data-emotion").split(' ');
41841
41808
 
41842
41809
  for (var i = 1; i < attrib.length; i++) {
@@ -41848,17 +41815,10 @@ createCache(options
41848
41815
  }
41849
41816
 
41850
41817
  var _insert;
41851
- /*: (
41852
- selector: string,
41853
- serialized: SerializedStyles,
41854
- sheet: StyleSheet,
41855
- shouldCache: boolean
41856
- ) => string | void */
41857
-
41858
41818
 
41859
41819
  var omnipresentPlugins = [compat, removeLabel];
41860
41820
 
41861
- if (isBrowser) {
41821
+ if (!getServerStylisCache) {
41862
41822
  var currentSheet;
41863
41823
  var finalizingPlugins = [le, pe(function (rule) {
41864
41824
  currentSheet.insert(rule);
@@ -41869,17 +41829,7 @@ createCache(options
41869
41829
  return oe(ce(styles), serializer);
41870
41830
  };
41871
41831
 
41872
- _insert = function
41873
- /*: void */
41874
- insert(selector
41875
- /*: string */
41876
- , serialized
41877
- /*: SerializedStyles */
41878
- , sheet
41879
- /*: StyleSheet */
41880
- , shouldCache
41881
- /*: boolean */
41882
- ) {
41832
+ _insert = function insert(selector, serialized, sheet, shouldCache) {
41883
41833
  currentSheet = sheet;
41884
41834
 
41885
41835
  stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
@@ -41899,13 +41849,7 @@ createCache(options
41899
41849
 
41900
41850
  var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
41901
41851
 
41902
- var getRules = function
41903
- /*: string */
41904
- getRules(selector
41905
- /*: string */
41906
- , serialized
41907
- /*: SerializedStyles */
41908
- ) {
41852
+ var getRules = function getRules(selector, serialized) {
41909
41853
  var name = serialized.name;
41910
41854
 
41911
41855
  if (serverStylisCache[name] === undefined) {
@@ -41915,17 +41859,7 @@ createCache(options
41915
41859
  return serverStylisCache[name];
41916
41860
  };
41917
41861
 
41918
- _insert = function
41919
- /*: string | void */
41920
- _insert(selector
41921
- /*: string */
41922
- , serialized
41923
- /*: SerializedStyles */
41924
- , sheet
41925
- /*: StyleSheet */
41926
- , shouldCache
41927
- /*: boolean */
41928
- ) {
41862
+ _insert = function _insert(selector, serialized, sheet, shouldCache) {
41929
41863
  var name = serialized.name;
41930
41864
  var rules = getRules(selector, serialized);
41931
41865
 
@@ -41955,9 +41889,7 @@ createCache(options
41955
41889
  };
41956
41890
  }
41957
41891
 
41958
- var cache
41959
- /*: EmotionCache */
41960
- = {
41892
+ var cache = {
41961
41893
  key: key,
41962
41894
  sheet: new StyleSheet({
41963
41895
  key: key,
@@ -42614,10 +42546,7 @@ var isDevelopment$2 = false;
42614
42546
 
42615
42547
  var isBrowser$3 = typeof document !== 'undefined';
42616
42548
 
42617
- /* import { type EmotionCache } from '@emotion/utils' */
42618
- var EmotionCacheContext
42619
- /*: React.Context<EmotionCache | null> */
42620
- = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
42549
+ var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
42621
42550
  // because this module is primarily intended for the browser and node
42622
42551
  // but it's also required in react native and similar environments sometimes
42623
42552
  // and we could have a special build just for that
@@ -42627,18 +42556,8 @@ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
42627
42556
  key: 'css'
42628
42557
  }) : null);
42629
42558
 
42630
- var withEmotionCache = function withEmotionCache
42631
- /* <Props, Ref: React.Ref<*>> */
42632
- (func
42633
- /*: (props: Props, cache: EmotionCache, ref: Ref) => React.Node */
42634
- )
42635
- /*: React.AbstractComponent<Props> */
42636
- {
42637
- return /*#__PURE__*/React.forwardRef(function (props
42638
- /*: Props */
42639
- , ref
42640
- /*: Ref */
42641
- ) {
42559
+ var withEmotionCache = function withEmotionCache(func) {
42560
+ return /*#__PURE__*/React.forwardRef(function (props, ref) {
42642
42561
  // the cache will never be null in the browser
42643
42562
  var cache = React.useContext(EmotionCacheContext);
42644
42563
  return func(props, cache, ref);
@@ -42646,16 +42565,8 @@ var withEmotionCache = function withEmotionCache
42646
42565
  };
42647
42566
 
42648
42567
  if (!isBrowser$3) {
42649
- withEmotionCache = function withEmotionCache
42650
- /* <Props> */
42651
- (func
42652
- /*: (props: Props, cache: EmotionCache) => React.Node */
42653
- )
42654
- /*: React.StatelessFunctionalComponent<Props> */
42655
- {
42656
- return function (props
42657
- /*: Props */
42658
- ) {
42568
+ withEmotionCache = function withEmotionCache(func) {
42569
+ return function (props) {
42659
42570
  var cache = React.useContext(EmotionCacheContext);
42660
42571
 
42661
42572
  if (cache === null) {
@@ -42682,19 +42593,13 @@ var ThemeContext = /* #__PURE__ */React.createContext({});
42682
42593
  var hasOwn = {}.hasOwnProperty;
42683
42594
 
42684
42595
  var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
42685
- var createEmotionProps = function createEmotionProps(type
42686
- /*: React.ElementType */
42687
- , props
42688
- /*: Object */
42689
- ) {
42596
+ var createEmotionProps = function createEmotionProps(type, props) {
42690
42597
 
42691
- var newProps
42692
- /*: any */
42693
- = {};
42598
+ var newProps = {};
42694
42599
 
42695
- for (var key in props) {
42696
- if (hasOwn.call(props, key)) {
42697
- newProps[key] = props[key];
42600
+ for (var _key in props) {
42601
+ if (hasOwn.call(props, _key)) {
42602
+ newProps[_key] = props[_key];
42698
42603
  }
42699
42604
  }
42700
42605
 
@@ -42731,9 +42636,7 @@ var Insertion = function Insertion(_ref) {
42731
42636
  return null;
42732
42637
  };
42733
42638
 
42734
- var Emotion = /* #__PURE__ */withEmotionCache(
42735
- /* <any, any> */
42736
- function (props, cache, ref) {
42639
+ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
42737
42640
  var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
42738
42641
  // not passing the registered cache to serializeStyles because it would
42739
42642
  // make certain babel optimisations not possible
@@ -42757,9 +42660,9 @@ function (props, cache, ref) {
42757
42660
  className += cache.key + "-" + serialized.name;
42758
42661
  var newProps = {};
42759
42662
 
42760
- for (var key in props) {
42761
- if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && (!isDevelopment$2 )) {
42762
- newProps[key] = props[key];
42663
+ for (var _key2 in props) {
42664
+ if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (!isDevelopment$2 )) {
42665
+ newProps[_key2] = props[_key2];
42763
42666
  }
42764
42667
  }
42765
42668
 
@@ -42793,15 +42696,8 @@ module.exports = _extends, module.exports.__esModule = true, module.exports["def
42793
42696
 
42794
42697
  unwrapExports(_extends_1);
42795
42698
 
42796
- var jsx
42797
- /*: typeof React.createElement */
42798
- = function jsx
42799
- /*: typeof React.createElement */
42800
- (type
42801
- /*: React.ElementType */
42802
- , props
42803
- /*: Object */
42804
- ) {
42699
+ var jsx = function jsx(type, props) {
42700
+ // eslint-disable-next-line prefer-rest-params
42805
42701
  var args = arguments;
42806
42702
 
42807
42703
  if (props == null || !hasOwn.call(props, 'css')) {
@@ -42820,11 +42716,13 @@ var jsx
42820
42716
  return React.createElement.apply(null, createElementArgArray);
42821
42717
  };
42822
42718
 
42823
- /* import type { Interpolation, SerializedStyles } from '@emotion/utils' */
42719
+ (function (_jsx) {
42720
+ var JSX;
42824
42721
 
42825
- function css()
42826
- /*: SerializedStyles */
42827
- {
42722
+ (function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
42723
+ })(jsx || (jsx = {}));
42724
+
42725
+ function css() {
42828
42726
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
42829
42727
  args[_key] = arguments[_key];
42830
42728
  }
@@ -42832,18 +42730,7 @@ function css()
42832
42730
  return serializeStyles(args);
42833
42731
  }
42834
42732
 
42835
- /*
42836
- type Keyframes = {|
42837
- name: string,
42838
- styles: string,
42839
- anim: 1,
42840
- toString: () => string
42841
- |} & string
42842
- */
42843
-
42844
- var keyframes = function
42845
- /*: Keyframes */
42846
- keyframes() {
42733
+ function keyframes() {
42847
42734
  var insertable = css.apply(void 0, arguments);
42848
42735
  var name = "animation-" + insertable.name;
42849
42736
  return {
@@ -42854,23 +42741,9 @@ keyframes() {
42854
42741
  return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
42855
42742
  }
42856
42743
  };
42857
- };
42858
-
42859
- /*
42860
- type ClassNameArg =
42861
- | string
42862
- | boolean
42863
- | { [key: string]: boolean }
42864
- | Array<ClassNameArg>
42865
- | null
42866
- | void
42867
- */
42744
+ }
42868
42745
 
42869
- var classnames = function
42870
- /*: string */
42871
- classnames(args
42872
- /*: Array<ClassNameArg> */
42873
- ) {
42746
+ var classnames = function classnames(args) {
42874
42747
  var len = args.length;
42875
42748
  var i = 0;
42876
42749
  var cls = '';
@@ -42918,13 +42791,7 @@ classnames(args
42918
42791
  return cls;
42919
42792
  };
42920
42793
 
42921
- function merge(registered
42922
- /*: Object */
42923
- , css
42924
- /*: (...args: Array<any>) => string */
42925
- , className
42926
- /*: string */
42927
- ) {
42794
+ function merge(registered, css, className) {
42928
42795
  var registeredStyles = [];
42929
42796
  var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
42930
42797
 
@@ -42966,19 +42833,8 @@ var Insertion$1 = function Insertion(_ref) {
42966
42833
 
42967
42834
  return null;
42968
42835
  };
42969
- /*
42970
- type Props = {
42971
- children: ({
42972
- css: (...args: any) => string,
42973
- cx: (...args: Array<ClassNameArg>) => string,
42974
- theme: Object
42975
- }) => React.Node
42976
- } */
42977
-
42978
-
42979
- var ClassNames
42980
- /*: React.AbstractComponent<Props>*/
42981
- = /* #__PURE__ */withEmotionCache(function (props, cache) {
42836
+
42837
+ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
42982
42838
  var hasRendered = false;
42983
42839
  var serializedArr = [];
42984
42840
 
@@ -75337,7 +75193,7 @@ var Footer = function Footer(_ref) {
75337
75193
  className: "" + styles$c["privacy-policy-left"]
75338
75194
  }, React__default.createElement(core$1.Typography, {
75339
75195
  className: "" + styles$c["all-rights-reserved"]
75340
- }, "\xA9 2019-2023 MARIO Framework, LLC, All Rights Reserved"), React__default.createElement(core$1.Typography, {
75196
+ }, "\xA9 2019-2023 MARIO Education, LLC, All Rights Reserved"), React__default.createElement(core$1.Typography, {
75341
75197
  className: "" + styles$c["policy-link"]
75342
75198
  }, "Privacy Policy")), !isStudent && React__default.createElement(core$1.Grid, {
75343
75199
  className: "" + styles$c["privacy-policy-right"]
@@ -76704,7 +76560,7 @@ var SurveyQuestion = function SurveyQuestion() {
76704
76560
  className: stylesDetail['survey-question-detail-tiny-editor']
76705
76561
  }, React__default.createElement(marioCore.RequiredLabel, {
76706
76562
  text: t("question_text")
76707
- }), (values.text || !id) && !!tinyMCEKey && React__default.createElement(tinymceReact.Editor, {
76563
+ }), !!tinyMCEKey && React__default.createElement(tinymceReact.Editor, {
76708
76564
  apiKey: tinyMCEKey || TINY_MCE_API_KEY,
76709
76565
  value: values.text,
76710
76566
  init: _extends({}, marioCore.editorConfig.question, {