@pie-element/select-text 13.1.1 → 13.1.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/defaultConfiguration.d.ts +179 -0
- package/dist/author/defaultConfiguration.js +141 -0
- package/dist/author/design.d.ts +38 -0
- package/dist/author/design.js +264 -0
- package/dist/author/index.d.ts +27 -0
- package/dist/author/index.js +74 -0
- package/dist/author/utils.d.ts +10 -0
- package/dist/author/utils.js +50 -0
- package/dist/browser/Check-CXevxzJJ.js +9941 -0
- package/dist/browser/Check-CXevxzJJ.js.map +1 -0
- package/dist/browser/_getTag-x1UozeM0.js +381 -0
- package/dist/browser/_getTag-x1UozeM0.js.map +1 -0
- package/dist/browser/author/index.js +41566 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/controller/index.js +195 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/debounce-CUpLfqAu.js +86 -0
- package/dist/browser/debounce-CUpLfqAu.js.map +1 -0
- package/dist/browser/delivery/index.js +89 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/isEmpty-Bsms1e2W.js +16 -0
- package/dist/browser/isEmpty-Bsms1e2W.js.map +1 -0
- package/dist/browser/main-4aycOoI5.js +4804 -0
- package/dist/browser/main-4aycOoI5.js.map +1 -0
- package/dist/browser/print/index.js +42 -0
- package/dist/browser/print/index.js.map +1 -0
- package/dist/browser/select-text.css +2 -0
- package/dist/controller/defaults.d.ts +27 -0
- package/dist/controller/defaults.js +21 -0
- package/dist/controller/index.d.ts +25 -0
- package/dist/controller/index.js +121 -0
- package/dist/delivery/index.d.ts +19 -0
- package/dist/delivery/index.js +60 -0
- package/dist/delivery/main.d.ts +34 -0
- package/dist/delivery/main.js +136 -0
- package/dist/delivery/utils.d.ts +10 -0
- package/dist/delivery/utils.js +47 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +167 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/print/index.d.ts +15 -0
- package/dist/print/index.js +41 -0
- package/package.json +84 -18
- package/CHANGELOG.json +0 -1422
- package/CHANGELOG.md +0 -2282
- package/LICENSE.md +0 -5
- package/README.md +0 -5
- package/configure/CHANGELOG.json +0 -1032
- package/configure/CHANGELOG.md +0 -2017
- package/configure/lib/defaultConfiguration.js +0 -177
- package/configure/lib/defaultConfiguration.js.map +0 -1
- package/configure/lib/design.js +0 -406
- package/configure/lib/design.js.map +0 -1
- package/configure/lib/index.js +0 -128
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/utils.js +0 -92
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -25
- package/controller/CHANGELOG.json +0 -442
- package/controller/CHANGELOG.md +0 -1468
- package/controller/lib/defaults.js +0 -25
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -258
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -16
- package/docs/config-schema.json +0 -2135
- package/docs/config-schema.json.md +0 -1579
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -823
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -24
- package/docs/pie-schema.json +0 -1248
- package/docs/pie-schema.json.md +0 -711
- package/lib/index.js +0 -103
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -191
- package/lib/main.js.map +0 -1
- package/lib/print.js +0 -87
- package/lib/print.js.map +0 -1
- package/lib/utils.js +0 -80
- package/lib/utils.js.map +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = exports.default = {
|
|
8
|
-
feedbackEnabled: false,
|
|
9
|
-
highlightChoices: false,
|
|
10
|
-
maxSelections: 0,
|
|
11
|
-
mode: 'sentence',
|
|
12
|
-
partialScoring: false,
|
|
13
|
-
prompt: '',
|
|
14
|
-
promptEnabled: true,
|
|
15
|
-
rationale: '',
|
|
16
|
-
rationaleEnabled: true,
|
|
17
|
-
scoringType: 'auto',
|
|
18
|
-
studentInstructionsEnabled: true,
|
|
19
|
-
teacherInstructions: '',
|
|
20
|
-
teacherInstructionsEnabled: true,
|
|
21
|
-
text: '',
|
|
22
|
-
tokens: [],
|
|
23
|
-
toolbarEditorPosition: 'bottom'
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["feedbackEnabled","highlightChoices","maxSelections","mode","partialScoring","prompt","promptEnabled","rationale","rationaleEnabled","scoringType","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","text","tokens","toolbarEditorPosition"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n feedbackEnabled: false,\n highlightChoices: false,\n maxSelections: 0,\n mode: 'sentence',\n partialScoring: false,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n scoringType: 'auto',\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n text: '',\n tokens: [],\n toolbarEditorPosition: 'bottom',\n};\n"],"mappings":";;;;;;iCAAe;EACbA,eAAe,EAAE,KAAK;EACtBC,gBAAgB,EAAE,KAAK;EACvBC,aAAa,EAAE,CAAC;EAChBC,IAAI,EAAE,UAAU;EAChBC,cAAc,EAAE,KAAK;EACrBC,MAAM,EAAE,EAAE;EACVC,aAAa,EAAE,IAAI;EACnBC,SAAS,EAAE,EAAE;EACbC,gBAAgB,EAAE,IAAI;EACtBC,WAAW,EAAE,MAAM;EACnBC,0BAA0B,EAAE,IAAI;EAChCC,mBAAmB,EAAE,EAAE;EACvBC,0BAA0B,EAAE,IAAI;EAChCC,IAAI,EAAE,EAAE;EACRC,MAAM,EAAE,EAAE;EACVC,qBAAqB,EAAE;AACzB,CAAC","ignoreList":[]}
|
package/controller/lib/index.js
DELETED
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createCorrectResponseSession = void 0;
|
|
8
|
-
exports.createDefaultModel = createDefaultModel;
|
|
9
|
-
exports.validate = exports.outcome = exports.normalizeSession = exports.normalize = exports.model = exports.getPartialScore = exports.getLogTrace = exports.getCorrectness = void 0;
|
|
10
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
11
|
-
var _lodashEs = require("lodash-es");
|
|
12
|
-
var _feedback = require("@pie-lib/feedback");
|
|
13
|
-
var _controllerUtils = require("@pie-lib/controller-utils");
|
|
14
|
-
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
15
|
-
const log = (0, _debug.default)('@pie-element:select-text:controller');
|
|
16
|
-
const equalTokens = (token1 = {}, token2 = {}) => token1?.start === token2?.start && token1?.end === token2?.end ||
|
|
17
|
-
// this case is used for the cases when the token's start & end were recalculated
|
|
18
|
-
token1?.start === token2?.oldStart && token1?.end === token2?.oldEnd;
|
|
19
|
-
const normalizeTokens = (tokens = [], selectedTokens = [], evaluateMode = false) => (tokens || []).map(token => {
|
|
20
|
-
const isCorrect = !!token.correct;
|
|
21
|
-
// search if correct token is missing from session
|
|
22
|
-
const isMissing = isCorrect && !(selectedTokens || []).find(selectedToken => equalTokens(token, selectedToken));
|
|
23
|
-
return {
|
|
24
|
-
...token,
|
|
25
|
-
correct: evaluateMode ? isCorrect : undefined,
|
|
26
|
-
isMissing: evaluateMode ? isMissing : undefined
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
const getCorrectness = (tokens, selected) => {
|
|
30
|
-
const correct = tokens.filter(t => t.correct === true);
|
|
31
|
-
if (correct.length === 0) {
|
|
32
|
-
return 'unknown';
|
|
33
|
-
}
|
|
34
|
-
const correctSelected = getCorrectSelected(tokens, selected);
|
|
35
|
-
if (correctSelected.length === selected.length) {
|
|
36
|
-
if (correctSelected.length === correct.length) {
|
|
37
|
-
return 'correct';
|
|
38
|
-
} else if (correctSelected.length > 0) {
|
|
39
|
-
return 'partially-correct';
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (correctSelected.length > 0) {
|
|
43
|
-
return 'partially-correct';
|
|
44
|
-
}
|
|
45
|
-
return 'incorrect';
|
|
46
|
-
};
|
|
47
|
-
exports.getCorrectness = getCorrectness;
|
|
48
|
-
const getCorrectSelected = (tokens, selected) => (selected || []).filter(s => tokens.findIndex(token => token.correct && equalTokens(token, s)) !== -1);
|
|
49
|
-
const getPartialScore = (question, session, totalCorrect) => {
|
|
50
|
-
if (!session || (0, _lodashEs.isEmpty)(session)) {
|
|
51
|
-
return 0;
|
|
52
|
-
}
|
|
53
|
-
const correctCount = getCorrectSelected(question.tokens, session.selectedTokens).length;
|
|
54
|
-
const correctTokens = (question.tokens || []).filter(t => t.correct === true);
|
|
55
|
-
const extraSelected = session.selectedTokens ? session.selectedTokens.length > correctTokens.length : 0;
|
|
56
|
-
const incorrectCount = extraSelected ? session.selectedTokens && session.selectedTokens.length - correctCount : 0;
|
|
57
|
-
const count = correctCount - incorrectCount;
|
|
58
|
-
const positiveCount = count < 0 ? 0 : count;
|
|
59
|
-
return totalCorrect.length ? parseFloat((positiveCount / totalCorrect.length).toFixed(2)) : 0;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Generates detailed trace log for select-text scoring evaluation
|
|
64
|
-
* @param {Object} question - the question model
|
|
65
|
-
* @param {Object} session - the student session
|
|
66
|
-
* @param {Object} env - the environment
|
|
67
|
-
* @returns {Array<string>} traceLog
|
|
68
|
-
*/
|
|
69
|
-
exports.getPartialScore = getPartialScore;
|
|
70
|
-
const getLogTrace = (question, session, env) => {
|
|
71
|
-
const traceLog = [];
|
|
72
|
-
const selectedTokens = session?.selectedTokens || [];
|
|
73
|
-
const tokens = question?.tokens || [];
|
|
74
|
-
if (selectedTokens.length === 0) {
|
|
75
|
-
traceLog.push('Student did not select any token.');
|
|
76
|
-
return traceLog;
|
|
77
|
-
}
|
|
78
|
-
traceLog.push(`Student selected ${selectedTokens.length} token(s).`);
|
|
79
|
-
let totalCorrectTokens = 0;
|
|
80
|
-
let correctSelected = 0;
|
|
81
|
-
let missingCount = 0;
|
|
82
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
83
|
-
const token = tokens[i];
|
|
84
|
-
if (token.correct) {
|
|
85
|
-
totalCorrectTokens++;
|
|
86
|
-
const matched = selectedTokens.some(s => equalTokens(token, s));
|
|
87
|
-
if (matched) {
|
|
88
|
-
correctSelected++;
|
|
89
|
-
} else {
|
|
90
|
-
missingCount++;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
const incorrectSelected = selectedTokens.length - correctSelected;
|
|
95
|
-
if (correctSelected > 0) {
|
|
96
|
-
traceLog.push(`${correctSelected} correct token(s) selected.`);
|
|
97
|
-
}
|
|
98
|
-
if (incorrectSelected > 0) {
|
|
99
|
-
traceLog.push(`${incorrectSelected} incorrect token(s) selected.`);
|
|
100
|
-
}
|
|
101
|
-
if (missingCount > 0) {
|
|
102
|
-
traceLog.push(`${missingCount} required correct token(s) were not selected.`);
|
|
103
|
-
}
|
|
104
|
-
const partialScoringEnabled = _controllerUtils.partialScoring.enabled(question, env, true);
|
|
105
|
-
if (partialScoringEnabled) {
|
|
106
|
-
traceLog.push('Score calculated using partial scoring.');
|
|
107
|
-
traceLog.push('Score is based on the number of correct minus incorrect selections, divided by the total number of correct tokens.');
|
|
108
|
-
if (incorrectSelected > 0 && selectedTokens.length > totalCorrectTokens) {
|
|
109
|
-
traceLog.push('Extra selected tokens beyond the correct set reduce the score.');
|
|
110
|
-
}
|
|
111
|
-
} else {
|
|
112
|
-
traceLog.push('Score calculated using all-or-nothing scoring.');
|
|
113
|
-
traceLog.push('Student must select all correct tokens and no incorrect tokens to receive full credit.');
|
|
114
|
-
}
|
|
115
|
-
const rawScore = getPartialScore(question, session, tokens.filter(t => t.correct));
|
|
116
|
-
const finalScore = partialScoringEnabled ? rawScore : rawScore === 1 ? 1 : 0;
|
|
117
|
-
traceLog.push(`Final score: ${finalScore}.`);
|
|
118
|
-
return traceLog;
|
|
119
|
-
};
|
|
120
|
-
exports.getLogTrace = getLogTrace;
|
|
121
|
-
const outcome = (question, session, env) => new Promise(resolve => {
|
|
122
|
-
if (!session || (0, _lodashEs.isEmpty)(session)) {
|
|
123
|
-
resolve({
|
|
124
|
-
score: 0,
|
|
125
|
-
empty: true,
|
|
126
|
-
logTrace: ['Student did not select any token.']
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
session = normalizeSession(session);
|
|
130
|
-
if (env.mode !== 'evaluate') {
|
|
131
|
-
resolve({
|
|
132
|
-
score: undefined,
|
|
133
|
-
completed: undefined,
|
|
134
|
-
logTrace: []
|
|
135
|
-
});
|
|
136
|
-
} else {
|
|
137
|
-
const enabled = _controllerUtils.partialScoring.enabled(question, env, true);
|
|
138
|
-
const totalCorrect = question.tokens.filter(t => t.correct);
|
|
139
|
-
const score = getPartialScore(question, session, totalCorrect);
|
|
140
|
-
resolve({
|
|
141
|
-
score: enabled ? score : score === 1 ? 1 : 0,
|
|
142
|
-
logTrace: getLogTrace(question, session, env)
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
exports.outcome = outcome;
|
|
147
|
-
function createDefaultModel(model = {}) {
|
|
148
|
-
return new Promise(resolve => {
|
|
149
|
-
resolve({
|
|
150
|
-
..._defaults.default,
|
|
151
|
-
...model
|
|
152
|
-
});
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
const normalizeSession = session => ({
|
|
156
|
-
selectedTokens: [],
|
|
157
|
-
...session
|
|
158
|
-
});
|
|
159
|
-
exports.normalizeSession = normalizeSession;
|
|
160
|
-
const normalize = question => ({
|
|
161
|
-
..._defaults.default,
|
|
162
|
-
...question
|
|
163
|
-
});
|
|
164
|
-
exports.normalize = normalize;
|
|
165
|
-
const model = (question, session, env) => {
|
|
166
|
-
session = session || {
|
|
167
|
-
selectedToken: []
|
|
168
|
-
};
|
|
169
|
-
session.selectedTokens = session.selectedTokens || [];
|
|
170
|
-
const normalizedQuestion = normalize(question);
|
|
171
|
-
return new Promise(resolve => {
|
|
172
|
-
log('[model]', 'normalizedQuestion: ', normalizedQuestion);
|
|
173
|
-
log('[model]', 'session: ', session);
|
|
174
|
-
const tokens = normalizeTokens(normalizedQuestion.tokens, session.selectedTokens, env.mode === 'evaluate');
|
|
175
|
-
log('[model] tokens:', tokens);
|
|
176
|
-
const correctness = env.mode === 'evaluate' ? getCorrectness(normalizedQuestion.tokens, session.selectedTokens) : undefined;
|
|
177
|
-
const fb = env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled ? (0, _feedback.getFeedbackForCorrectness)(correctness, normalizedQuestion.feedback) : Promise.resolve(undefined);
|
|
178
|
-
fb.then(feedback => {
|
|
179
|
-
const out = {
|
|
180
|
-
tokens,
|
|
181
|
-
highlightChoices: normalizedQuestion.highlightChoices,
|
|
182
|
-
prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,
|
|
183
|
-
text: normalizedQuestion.text,
|
|
184
|
-
disabled: env.mode !== 'gather',
|
|
185
|
-
maxSelections: normalizedQuestion.maxSelections,
|
|
186
|
-
correctness,
|
|
187
|
-
env,
|
|
188
|
-
feedback,
|
|
189
|
-
incorrect: env.mode === 'evaluate' ? correctness !== 'correct' : undefined,
|
|
190
|
-
language: normalizedQuestion.language,
|
|
191
|
-
extraCSSRules: normalizedQuestion.extraCSSRules
|
|
192
|
-
};
|
|
193
|
-
if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {
|
|
194
|
-
out.rationale = normalizedQuestion.rationaleEnabled ? normalizedQuestion.rationale : null;
|
|
195
|
-
out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;
|
|
196
|
-
} else {
|
|
197
|
-
out.rationale = null;
|
|
198
|
-
out.teacherInstructions = null;
|
|
199
|
-
}
|
|
200
|
-
resolve(out);
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
exports.model = model;
|
|
205
|
-
const createCorrectResponseSession = (question, env) => {
|
|
206
|
-
return new Promise(resolve => {
|
|
207
|
-
if (env.mode !== 'evaluate' && env.role === 'instructor') {
|
|
208
|
-
const {
|
|
209
|
-
tokens
|
|
210
|
-
} = question;
|
|
211
|
-
const selectedTokens = tokens.filter(t => t.correct);
|
|
212
|
-
resolve({
|
|
213
|
-
id: '1',
|
|
214
|
-
selectedTokens
|
|
215
|
-
});
|
|
216
|
-
} else {
|
|
217
|
-
resolve(null);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
// remove all html tags
|
|
223
|
-
exports.createCorrectResponseSession = createCorrectResponseSession;
|
|
224
|
-
const getInnerText = html => (html || '').replaceAll(/<[^>]*>/g, '');
|
|
225
|
-
|
|
226
|
-
// remove all html tags except img, iframe and source tag for audio
|
|
227
|
-
const getContent = html => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
|
|
228
|
-
const validate = (model = {}, config = {}) => {
|
|
229
|
-
const {
|
|
230
|
-
tokens
|
|
231
|
-
} = model;
|
|
232
|
-
const {
|
|
233
|
-
minTokens = 2,
|
|
234
|
-
maxTokens,
|
|
235
|
-
maxSelections
|
|
236
|
-
} = config;
|
|
237
|
-
const errors = {};
|
|
238
|
-
const nbOfTokens = (tokens || []).length;
|
|
239
|
-
['teacherInstructions', 'prompt', 'rationale'].forEach(field => {
|
|
240
|
-
if (config[field]?.required && !getContent(model[field])) {
|
|
241
|
-
errors[field] = 'This field is required.';
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
const nbOfSelections = (tokens || []).reduce((acc, token) => token.correct ? acc + 1 : acc, 0);
|
|
245
|
-
if (nbOfTokens < minTokens) {
|
|
246
|
-
errors.tokensError = `There should be at least ${minTokens} tokens defined.`;
|
|
247
|
-
} else if (nbOfTokens > maxTokens) {
|
|
248
|
-
errors.tokensError = `No more than ${maxTokens} tokens should be defined.`;
|
|
249
|
-
}
|
|
250
|
-
if (nbOfSelections < 1) {
|
|
251
|
-
errors.selectionsError = 'There should be at least 1 token selected.';
|
|
252
|
-
} else if (nbOfSelections > maxSelections) {
|
|
253
|
-
errors.selectionsError = `No more than ${maxSelections} tokens should be selected.`;
|
|
254
|
-
}
|
|
255
|
-
return errors;
|
|
256
|
-
};
|
|
257
|
-
exports.validate = validate;
|
|
258
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_debug","_interopRequireDefault","require","_lodashEs","_feedback","_controllerUtils","_defaults","log","debug","equalTokens","token1","token2","start","end","oldStart","oldEnd","normalizeTokens","tokens","selectedTokens","evaluateMode","map","token","isCorrect","correct","isMissing","find","selectedToken","undefined","getCorrectness","selected","filter","t","length","correctSelected","getCorrectSelected","exports","s","findIndex","getPartialScore","question","session","totalCorrect","isEmpty","correctCount","correctTokens","extraSelected","incorrectCount","count","positiveCount","parseFloat","toFixed","getLogTrace","env","traceLog","push","totalCorrectTokens","missingCount","i","matched","some","incorrectSelected","partialScoringEnabled","partialScoring","enabled","rawScore","finalScore","outcome","Promise","resolve","score","empty","logTrace","normalizeSession","mode","completed","createDefaultModel","model","defaults","normalize","normalizedQuestion","correctness","fb","feedbackEnabled","getFeedbackForCorrectness","feedback","then","out","highlightChoices","prompt","promptEnabled","text","disabled","maxSelections","incorrect","language","extraCSSRules","role","rationale","rationaleEnabled","teacherInstructions","teacherInstructionsEnabled","createCorrectResponseSession","id","getInnerText","html","replaceAll","getContent","replace","validate","config","minTokens","maxTokens","errors","nbOfTokens","forEach","field","required","nbOfSelections","reduce","acc","tokensError","selectionsError"],"sources":["../src/index.js"],"sourcesContent":["import debug from 'debug';\nimport { isEmpty } from 'lodash-es';\nimport { getFeedbackForCorrectness } from '@pie-lib/feedback';\nimport { partialScoring } from '@pie-lib/controller-utils';\nimport defaults from './defaults';\n\nconst log = debug('@pie-element:select-text:controller');\n\nconst equalTokens = (token1 = {}, token2 = {}) =>\n (token1?.start === token2?.start && token1?.end === token2?.end) ||\n // this case is used for the cases when the token's start & end were recalculated\n (token1?.start === token2?.oldStart && token1?.end === token2?.oldEnd);\n\nconst normalizeTokens = (tokens = [], selectedTokens = [], evaluateMode = false) =>\n (tokens || []).map((token) => {\n const isCorrect = !!token.correct;\n // search if correct token is missing from session\n const isMissing = isCorrect && !(selectedTokens || []).find((selectedToken) => equalTokens(token, selectedToken));\n\n return {\n ...token,\n correct: evaluateMode ? isCorrect : undefined,\n isMissing: evaluateMode ? isMissing : undefined,\n };\n });\n\nexport const getCorrectness = (tokens, selected) => {\n const correct = tokens.filter((t) => t.correct === true);\n\n if (correct.length === 0) {\n return 'unknown';\n }\n\n const correctSelected = getCorrectSelected(tokens, selected);\n\n if (correctSelected.length === selected.length) {\n if (correctSelected.length === correct.length) {\n return 'correct';\n } else if (correctSelected.length > 0) {\n return 'partially-correct';\n }\n }\n\n if (correctSelected.length > 0) {\n return 'partially-correct';\n }\n\n return 'incorrect';\n};\n\nconst getCorrectSelected = (tokens, selected) =>\n (selected || []).filter((s) => tokens.findIndex((token) => token.correct && equalTokens(token, s)) !== -1);\n\nexport const getPartialScore = (question, session, totalCorrect) => {\n if (!session || isEmpty(session)) {\n return 0;\n }\n\n const correctCount = getCorrectSelected(question.tokens, session.selectedTokens).length;\n const correctTokens = (question.tokens || []).filter((t) => t.correct === true);\n const extraSelected = session.selectedTokens ? session.selectedTokens.length > correctTokens.length : 0;\n const incorrectCount = extraSelected ? session.selectedTokens && session.selectedTokens.length - correctCount : 0;\n const count = correctCount - incorrectCount;\n const positiveCount = count < 0 ? 0 : count;\n\n return totalCorrect.length ? parseFloat((positiveCount / totalCorrect.length).toFixed(2)) : 0;\n};\n\n/**\n * Generates detailed trace log for select-text scoring evaluation\n * @param {Object} question - the question model\n * @param {Object} session - the student session\n * @param {Object} env - the environment\n * @returns {Array<string>} traceLog\n */\nexport const getLogTrace = (question, session, env) => {\n const traceLog = [];\n\n const selectedTokens = session?.selectedTokens || [];\n const tokens = question?.tokens || [];\n\n if (selectedTokens.length === 0) {\n traceLog.push('Student did not select any token.');\n return traceLog;\n }\n\n traceLog.push(`Student selected ${selectedTokens.length} token(s).`);\n\n let totalCorrectTokens = 0;\n let correctSelected = 0;\n let missingCount = 0;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n if (token.correct) {\n totalCorrectTokens++;\n const matched = selectedTokens.some((s) => equalTokens(token, s));\n if (matched) {\n correctSelected++;\n } else {\n missingCount++;\n }\n }\n }\n\n const incorrectSelected = selectedTokens.length - correctSelected;\n\n if (correctSelected > 0) {\n traceLog.push(`${correctSelected} correct token(s) selected.`);\n }\n\n if (incorrectSelected > 0) {\n traceLog.push(`${incorrectSelected} incorrect token(s) selected.`);\n }\n\n if (missingCount > 0) {\n traceLog.push(`${missingCount} required correct token(s) were not selected.`);\n }\n\n const partialScoringEnabled = partialScoring.enabled(question, env, true);\n\n if (partialScoringEnabled) {\n traceLog.push('Score calculated using partial scoring.');\n traceLog.push(\n 'Score is based on the number of correct minus incorrect selections, divided by the total number of correct tokens.',\n );\n\n if (incorrectSelected > 0 && selectedTokens.length > totalCorrectTokens) {\n traceLog.push(\n 'Extra selected tokens beyond the correct set reduce the score.',\n );\n }\n } else {\n traceLog.push('Score calculated using all-or-nothing scoring.');\n traceLog.push(\n 'Student must select all correct tokens and no incorrect tokens to receive full credit.',\n );\n }\n\n const rawScore = getPartialScore(question, session, tokens.filter((t) => t.correct));\n const finalScore = partialScoringEnabled ? rawScore : rawScore === 1 ? 1 : 0;\n\n traceLog.push(`Final score: ${finalScore}.`);\n\n return traceLog;\n};\n\nexport const outcome = (question, session, env) =>\n new Promise((resolve) => {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true, logTrace: ['Student did not select any token.'] });\n }\n\n session = normalizeSession(session);\n\n if (env.mode !== 'evaluate') {\n resolve({ score: undefined, completed: undefined, logTrace: [] });\n } else {\n const enabled = partialScoring.enabled(question, env, true);\n const totalCorrect = question.tokens.filter((t) => t.correct);\n const score = getPartialScore(question, session, totalCorrect);\n resolve({\n score: enabled ? score : score === 1 ? 1 : 0,\n logTrace: getLogTrace(question, session, env),\n });\n }\n });\n\nexport function createDefaultModel(model = {}) {\n return new Promise((resolve) => {\n resolve({ ...defaults, ...model });\n });\n}\n\nexport const normalizeSession = (session) => ({ selectedTokens: [], ...session });\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport const model = (question, session, env) => {\n session = session || { selectedToken: [] };\n session.selectedTokens = session.selectedTokens || [];\n const normalizedQuestion = normalize(question);\n\n return new Promise((resolve) => {\n log('[model]', 'normalizedQuestion: ', normalizedQuestion);\n log('[model]', 'session: ', session);\n\n const tokens = normalizeTokens(normalizedQuestion.tokens, session.selectedTokens, env.mode === 'evaluate');\n log('[model] tokens:', tokens);\n\n const correctness =\n env.mode === 'evaluate' ? getCorrectness(normalizedQuestion.tokens, session.selectedTokens) : undefined;\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedbackForCorrectness(correctness, normalizedQuestion.feedback)\n : Promise.resolve(undefined);\n\n fb.then((feedback) => {\n const out = {\n tokens,\n highlightChoices: normalizedQuestion.highlightChoices,\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n text: normalizedQuestion.text,\n disabled: env.mode !== 'gather',\n maxSelections: normalizedQuestion.maxSelections,\n correctness,\n env,\n feedback,\n incorrect: env.mode === 'evaluate' ? correctness !== 'correct' : undefined,\n language: normalizedQuestion.language,\n extraCSSRules: normalizedQuestion.extraCSSRules,\n };\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n out.rationale = normalizedQuestion.rationaleEnabled ? normalizedQuestion.rationale : null;\n out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled\n ? normalizedQuestion.teacherInstructions\n : null;\n } else {\n out.rationale = null;\n out.teacherInstructions = null;\n }\n\n resolve(out);\n });\n });\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { tokens } = question;\n const selectedTokens = tokens.filter((t) => t.correct);\n\n resolve({\n id: '1',\n selectedTokens,\n });\n } else {\n resolve(null);\n }\n });\n};\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const { tokens } = model;\n const { minTokens = 2, maxTokens, maxSelections } = config;\n const errors = {};\n const nbOfTokens = (tokens || []).length;\n\n ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n const nbOfSelections = (tokens || []).reduce((acc, token) => (token.correct ? acc + 1 : acc), 0);\n\n if (nbOfTokens < minTokens) {\n errors.tokensError = `There should be at least ${minTokens} tokens defined.`;\n } else if (nbOfTokens > maxTokens) {\n errors.tokensError = `No more than ${maxTokens} tokens should be defined.`;\n }\n\n if (nbOfSelections < 1) {\n errors.selectionsError = 'There should be at least 1 token selected.';\n } else if (nbOfSelections > maxSelections) {\n errors.selectionsError = `No more than ${maxSelections} tokens should be selected.`;\n }\n\n return errors;\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,MAAMK,GAAG,GAAG,IAAAC,cAAK,EAAC,qCAAqC,CAAC;AAExD,MAAMC,WAAW,GAAGA,CAACC,MAAM,GAAG,CAAC,CAAC,EAAEC,MAAM,GAAG,CAAC,CAAC,KAC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AAC,EAAE;MACxDH,MAAM,CAACG,KAAK,CAAC,GAAG,yBAAyB;IAC3C;EACF,CAAC,CAAC;EAEF,MAAME,cAAc,GAAG,CAACpG,MAAM,IAAI,EAAE,EAAEqG,MAAM,CAAC,CAACC,GAAG,EAAElG,KAAK,KAAMA,KAAK,CAACE,OAAO,GAAGgG,GAAG,GAAG,CAAC,GAAGA,GAAI,EAAE,CAAC,CAAC;EAEhG,IAAIN,UAAU,GAAGH,SAAS,EAAE;IAC1BE,MAAM,CAACQ,WAAW,GAAG,4BAA4BV,SAAS,kBAAkB;EAC9E,CAAC,MAAM,IAAIG,UAAU,GAAGF,SAAS,EAAE;IACjCC,MAAM,CAACQ,WAAW,GAAG,gBAAgBT,SAAS,4BAA4B;EAC5E;EAEA,IAAIM,cAAc,GAAG,CAAC,EAAE;IACtBL,MAAM,CAACS,eAAe,GAAG,4CAA4C;EACvE,CAAC,MAAM,IAAIJ,cAAc,GAAGzB,aAAa,EAAE;IACzCoB,MAAM,CAACS,eAAe,GAAG,gBAAgB7B,aAAa,6BAA6B;EACrF;EAEA,OAAOoB,MAAM;AACf,CAAC;AAAC7E,OAAA,CAAAyE,QAAA,GAAAA,QAAA","ignoreList":[]}
|
package/controller/package.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pie-element/select-text-controller",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "9.1.1",
|
|
5
|
-
"description": "",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"module": "src/index.js",
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"@pie-lib/controller-utils": "2.0.2",
|
|
10
|
-
"@pie-lib/feedback": "2.0.2",
|
|
11
|
-
"debug": "^4.1.1",
|
|
12
|
-
"lodash-es": "^4.17.23"
|
|
13
|
-
},
|
|
14
|
-
"author": "",
|
|
15
|
-
"license": "ISC"
|
|
16
|
-
}
|