@pie-lib/controller-utils 1.1.0-next.4 → 1.1.1-next.1

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.
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.lockChoices = exports.getShuffledChoices = exports.compact = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
- var _get = _interopRequireDefault(require("lodash/get"));
10
- var _shuffle = _interopRequireDefault(require("lodash/shuffle"));
11
- var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
9
+ var _lodashEs = require("lodash-es");
12
10
  // eslint-disable-next-line no-console
13
11
  var lg = function lg(n) {
14
12
  return console[n].bind(console, 'controller-utils:');
@@ -35,7 +33,7 @@ var getShuffledChoices = exports.getShuffledChoices = function getShuffledChoice
35
33
  // eslint-disable-next-line quotes
36
34
  warn("unable to save shuffled choices because there's no session.");
37
35
  resolve(undefined);
38
- } else if (!(0, _isEmpty["default"])(currentShuffled)) {
36
+ } else if (!(0, _lodashEs.isEmpty)(currentShuffled)) {
39
37
  debug('use shuffledValues to sort the choices...', currentShuffled);
40
38
  resolve(compact(currentShuffled.map(function (v) {
41
39
  return choices.find(function (c) {
@@ -43,7 +41,7 @@ var getShuffledChoices = exports.getShuffledChoices = function getShuffledChoice
43
41
  });
44
42
  })));
45
43
  } else {
46
- var shuffledChoices = (0, _shuffle["default"])(choices);
44
+ var shuffledChoices = (0, _lodashEs.shuffle)(choices);
47
45
  if (updateSession && typeof updateSession === 'function') {
48
46
  try {
49
47
  //Note: session.id refers to the id of the element within a session
@@ -52,7 +50,7 @@ var getShuffledChoices = exports.getShuffledChoices = function getShuffledChoice
52
50
  }));
53
51
  log('try to save shuffledValues to session...', shuffledValues);
54
52
  log('call updateSession... ', session.id, session.element);
55
- if ((0, _isEmpty["default"])(shuffledValues)) {
53
+ if ((0, _lodashEs.isEmpty)(shuffledValues)) {
56
54
  error("shuffledValues is an empty array? - refusing to call updateSession: shuffledChoices: ".concat(JSON.stringify(shuffledChoices), ", key: ").concat(choiceKey));
57
55
  } else {
58
56
  updateSession(session.id, session.element, {
@@ -92,11 +90,11 @@ var lockChoices = exports.lockChoices = function lockChoices(model, session, env
92
90
  if (model.lockChoiceOrder) {
93
91
  return true;
94
92
  }
95
- log('lockChoiceOrder: ', (0, _get["default"])(env, ['@pie-element', 'lockChoiceOrder'], false));
96
- if ((0, _get["default"])(env, ['@pie-element', 'lockChoiceOrder'], false)) {
93
+ log('lockChoiceOrder: ', (0, _lodashEs.get)(env, ['@pie-element', 'lockChoiceOrder'], false));
94
+ if ((0, _lodashEs.get)(env, ['@pie-element', 'lockChoiceOrder'], false)) {
97
95
  return true;
98
96
  }
99
- var role = (0, _get["default"])(env, 'role', 'student');
97
+ var role = (0, _lodashEs.get)(env, 'role', 'student');
100
98
  if (role === 'instructor') {
101
99
  // TODO: .. in the future the instructor can toggle between ordinal and shuffled here, so keeping this code until then
102
100
  /*const alreadyShuffled = hasShuffledValues(session);
@@ -1 +1 @@
1
- {"version":3,"file":"persistence.js","names":["_get","_interopRequireDefault","require","_shuffle","_isEmpty","lg","n","console","bind","debug","log","warn","error","compact","exports","arr","Array","isArray","filter","v","undefined","getShuffledChoices","choices","session","updateSession","choiceKey","Promise","resolve","_session$data","_typeof2","currentShuffled","data","shuffledValues","isEmpty","map","find","c","shuffledChoices","shuffle","id","element","concat","JSON","stringify","e","lockChoices","model","env","lockChoiceOrder","get","role"],"sources":["../src/persistence.js"],"sourcesContent":["import get from 'lodash/get';\nimport shuffle from 'lodash/shuffle';\nimport isEmpty from 'lodash/isEmpty';\n\n// eslint-disable-next-line no-console\nconst lg = (n) => console[n].bind(console, 'controller-utils:');\nconst debug = lg('debug');\nconst log = lg('log');\nconst warn = lg('warn');\nconst error = lg('error');\n\nexport const compact = (arr) => {\n if (Array.isArray(arr)) {\n return arr.filter((v) => v !== null && v !== undefined);\n }\n\n return arr;\n};\n\nexport const getShuffledChoices = (choices, session, updateSession, choiceKey) =>\n new Promise((resolve) => {\n log('updateSession type: ', typeof updateSession);\n log('session: ', session);\n\n const currentShuffled = compact(session?.data?.shuffledValues || session?.shuffledValues || []);\n\n if (!session) {\n // eslint-disable-next-line quotes\n warn(\"unable to save shuffled choices because there's no session.\");\n resolve(undefined);\n } else if (!isEmpty(currentShuffled)) {\n debug('use shuffledValues to sort the choices...', currentShuffled);\n resolve(compact(currentShuffled.map((v) => choices.find((c) => c[choiceKey] === v))));\n } else {\n const shuffledChoices = shuffle(choices);\n\n if (updateSession && typeof updateSession === 'function') {\n try {\n //Note: session.id refers to the id of the element within a session\n const shuffledValues = compact(shuffledChoices.map((c) => c[choiceKey]));\n log('try to save shuffledValues to session...', shuffledValues);\n log('call updateSession... ', session.id, session.element);\n\n if (isEmpty(shuffledValues)) {\n error(\n `shuffledValues is an empty array? - refusing to call updateSession: shuffledChoices: ${JSON.stringify(\n shuffledChoices,\n )}, key: ${choiceKey}`,\n );\n } else {\n updateSession(session.id, session.element, { shuffledValues }).catch((e) =>\n // eslint-disable-next-line no-console\n console.error('update session failed for: ', session.id, e),\n );\n }\n } catch (e) {\n warn('unable to save shuffled order for choices');\n error(e);\n }\n } else {\n warn('unable to save shuffled choices, shuffle will happen every time.');\n }\n\n //save this shuffle to the session for later retrieval\n resolve(shuffledChoices);\n }\n });\n\n/**\n * If we return:\n * - true - that means that the order of the choices will be ordinal (as is created in the configure item)\n * - false - that means the getShuffledChoices above will be called and that in turn means that we either\n * return the shuffled values on the session (if any exists) or we shuffle the choices\n * @param model - model to check if we should lock order\n * @param session - session to check if we should lock order\n * @param env - env to check if we should lock order\n * @returns {boolean}\n */\nexport const lockChoices = (model, session, env) => {\n if (model.lockChoiceOrder) {\n return true;\n }\n\n log('lockChoiceOrder: ', get(env, ['@pie-element', 'lockChoiceOrder'], false));\n\n if (get(env, ['@pie-element', 'lockChoiceOrder'], false)) {\n return true;\n }\n\n const role = get(env, 'role', 'student');\n\n if (role === 'instructor') {\n // TODO: .. in the future the instructor can toggle between ordinal and shuffled here, so keeping this code until then\n /*const alreadyShuffled = hasShuffledValues(session);\n\n if (alreadyShuffled) {\n return false;\n }\n\n return true;*/\n return true;\n }\n\n // here it's a student, so don't lock and it will shuffle if needs be\n return false;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA;AACA,IAAMG,EAAE,GAAG,SAALA,EAAEA,CAAIC,CAAC;EAAA,OAAKC,OAAO,CAACD,CAAC,CAAC,CAACE,IAAI,CAACD,OAAO,EAAE,mBAAmB,CAAC;AAAA;AAC/D,IAAME,KAAK,GAAGJ,EAAE,CAAC,OAAO,CAAC;AACzB,IAAMK,GAAG,GAAGL,EAAE,CAAC,KAAK,CAAC;AACrB,IAAMM,IAAI,GAAGN,EAAE,CAAC,MAAM,CAAC;AACvB,IAAMO,KAAK,GAAGP,EAAE,CAAC,OAAO,CAAC;AAElB,IAAMQ,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,SAAVA,OAAOA,CAAIE,GAAG,EAAK;EAC9B,IAAIC,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,EAAE;IACtB,OAAOA,GAAG,CAACG,MAAM,CAAC,UAACC,CAAC;MAAA,OAAKA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS;IAAA,EAAC;EACzD;EAEA,OAAOL,GAAG;AACZ,CAAC;AAEM,IAAMM,kBAAkB,GAAAP,OAAA,CAAAO,kBAAA,GAAG,SAArBA,kBAAkBA,CAAIC,OAAO,EAAEC,OAAO,EAAEC,aAAa,EAAEC,SAAS;EAAA,OAC3E,IAAIC,OAAO,CAAC,UAACC,OAAO,EAAK;IAAA,IAAAC,aAAA;IACvBlB,GAAG,CAAC,sBAAsB,MAAAmB,QAAA,aAASL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AAK;AACd,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"persistence.js","names":["_lodashEs","require","lg","n","console","bind","debug","log","warn","error","compact","exports","arr","Array","isArray","filter","v","undefined","getShuffledChoices","choices","session","updateSession","choiceKey","Promise","resolve","_session$data","_typeof2","currentShuffled","data","shuffledValues","isEmpty","map","find","c","shuffledChoices","shuffle","id","element","concat","JSON","stringify","e","lockChoices","model","env","lockChoiceOrder","get","role"],"sources":["../src/persistence.js"],"sourcesContent":["import { get, isEmpty, shuffle } from 'lodash-es';\n\n// eslint-disable-next-line no-console\nconst lg = (n) => console[n].bind(console, 'controller-utils:');\nconst debug = lg('debug');\nconst log = lg('log');\nconst warn = lg('warn');\nconst error = lg('error');\n\nexport const compact = (arr) => {\n if (Array.isArray(arr)) {\n return arr.filter((v) => v !== null && v !== undefined);\n }\n\n return arr;\n};\n\nexport const getShuffledChoices = (choices, session, updateSession, choiceKey) =>\n new Promise((resolve) => {\n log('updateSession type: ', typeof updateSession);\n log('session: ', session);\n\n const currentShuffled = compact(session?.data?.shuffledValues || session?.shuffledValues || []);\n\n if (!session) {\n // eslint-disable-next-line quotes\n warn(\"unable to save shuffled choices because there's no session.\");\n resolve(undefined);\n } else if (!isEmpty(currentShuffled)) {\n debug('use shuffledValues to sort the choices...', currentShuffled);\n resolve(compact(currentShuffled.map((v) => choices.find((c) => c[choiceKey] === v))));\n } else {\n const shuffledChoices = shuffle(choices);\n\n if (updateSession && typeof updateSession === 'function') {\n try {\n //Note: session.id refers to the id of the element within a session\n const shuffledValues = compact(shuffledChoices.map((c) => c[choiceKey]));\n log('try to save shuffledValues to session...', shuffledValues);\n log('call updateSession... ', session.id, session.element);\n\n if (isEmpty(shuffledValues)) {\n error(\n `shuffledValues is an empty array? - refusing to call updateSession: shuffledChoices: ${JSON.stringify(\n shuffledChoices,\n )}, key: ${choiceKey}`,\n );\n } else {\n updateSession(session.id, session.element, { shuffledValues }).catch((e) =>\n // eslint-disable-next-line no-console\n console.error('update session failed for: ', session.id, e),\n );\n }\n } catch (e) {\n warn('unable to save shuffled order for choices');\n error(e);\n }\n } else {\n warn('unable to save shuffled choices, shuffle will happen every time.');\n }\n\n //save this shuffle to the session for later retrieval\n resolve(shuffledChoices);\n }\n });\n\n/**\n * If we return:\n * - true - that means that the order of the choices will be ordinal (as is created in the configure item)\n * - false - that means the getShuffledChoices above will be called and that in turn means that we either\n * return the shuffled values on the session (if any exists) or we shuffle the choices\n * @param model - model to check if we should lock order\n * @param session - session to check if we should lock order\n * @param env - env to check if we should lock order\n * @returns {boolean}\n */\nexport const lockChoices = (model, session, env) => {\n if (model.lockChoiceOrder) {\n return true;\n }\n\n log('lockChoiceOrder: ', get(env, ['@pie-element', 'lockChoiceOrder'], false));\n\n if (get(env, ['@pie-element', 'lockChoiceOrder'], false)) {\n return true;\n }\n\n const role = get(env, 'role', 'student');\n\n if (role === 'instructor') {\n // TODO: .. in the future the instructor can toggle between ordinal and shuffled here, so keeping this code until then\n /*const alreadyShuffled = hasShuffledValues(session);\n\n if (alreadyShuffled) {\n return false;\n }\n\n return true;*/\n return true;\n }\n\n // here it's a student, so don't lock and it will shuffle if needs be\n return false;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA;AACA,IAAMC,EAAE,GAAG,SAALA,EAAEA,CAAIC,CAAC;EAAA,OAAKC,OAAO,CAACD,CAAC,CAAC,CAACE,IAAI,CAACD,OAAO,EAAE,mBAAmB,CAAC;AAAA;AAC/D,IAAME,KAAK,GAAGJ,EAAE,CAAC,OAAO,CAAC;AACzB,IAAMK,GAAG,GAAGL,EAAE,CAAC,KAAK,CAAC;AACrB,IAAMM,IAAI,GAAGN,EAAE,CAAC,MAAM,CAAC;AACvB,IAAMO,KAAK,GAAGP,EAAE,CAAC,OAAO,CAAC;AAElB,IAAMQ,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,SAAVA,OAAOA,CAAIE,GAAG,EAAK;EAC9B,IAAIC,KAAK,CAACC,O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AG,CAAC,mBAAmB,EAAE,IAAAuC,aAAG,EAACF,GAAG,EAAE,CAAC,cAAc,EAAE,iBAAiB,CAAC,EAAE,KAAK,CAAC,CAAC;EAE9E,IAAI,IAAAE,aAAG,EAACF,GAAG,EAAE,CAAC,cAAc,EAAE,iBAAiB,CAAC,EAAE,KAAK,CAAC,EAAE;IACxD,OAAO,IAAI;EACb;EAEA,IAAMG,IAAI,GAAG,IAAAD,aAAG,EAACF,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC;EAExC,IAAIG,IAAI,KAAK,YAAY,EAAE;IACzB;IACA;AACJ;AACA;AACA;AACA;IAGI,OAAO,IAAI;EACb;;EAEA;EACA,OAAO,KAAK;AACd,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pie-lib/controller-utils",
3
- "version": "1.1.0-next.4",
3
+ "version": "1.1.1-next.1",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "src/index.js",
7
7
  "dependencies": {
8
8
  "debug": "^4.1.1",
9
- "lodash": "^4.17.11"
9
+ "lodash-es": "^4.17.23"
10
10
  },
11
11
  "publishConfig": {
12
12
  "access": "public"
@@ -14,5 +14,5 @@
14
14
  "scripts": {},
15
15
  "author": "",
16
16
  "license": "ISC",
17
- "gitHead": "d2c8178decbc97a9b3deaf6739f8093209bda80e"
17
+ "gitHead": "87d7d9ee63abeb5eff95f888cc2b80683c81ea13"
18
18
  }
@@ -1,6 +1,4 @@
1
- import get from 'lodash/get';
2
- import shuffle from 'lodash/shuffle';
3
- import isEmpty from 'lodash/isEmpty';
1
+ import { get, isEmpty, shuffle } from 'lodash-es';
4
2
 
5
3
  // eslint-disable-next-line no-console
6
4
  const lg = (n) => console[n].bind(console, 'controller-utils:');