@pie-element/complex-rubric 2.1.2-next.41 → 2.1.2-next.44
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/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +1001 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +55 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +892 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +563 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +99 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +126 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +569 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +361 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +560 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +374 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +283 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +29 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +18 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +233 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +94 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +215 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js +13 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +15 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +272 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +206 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +180 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +6 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +298 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +201 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +85 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +161 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +330 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +103 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +24 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +257 -0
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +1271 -0
- package/configure/node_modules/@pie-element/rubric/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/rubric/README.md +3 -0
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +197 -0
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +1111 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +34 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +130 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +108 -0
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/configure/package.json +17 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +26 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +64 -0
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +56 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +17 -0
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +215 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +45 -0
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/controller/package.json +13 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +31 -0
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +38 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +160 -0
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +127 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +8 -0
- package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +2 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +96 -0
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +65 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js +88 -0
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js +188 -0
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js +114 -0
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +1 -0
- package/configure/node_modules/@pie-element/rubric/package.json +26 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +23003 -0
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +46 -0
- package/configure/node_modules/@pie-element/rubric/src/index.js +34 -0
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +136 -0
- package/configure/node_modules/@pie-element/rubric/src/print.js +63 -0
- package/configure/package.json +2 -2
- package/package.json +4 -4
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _default = {
|
|
8
|
+
model: {
|
|
9
|
+
visibleToStudent: true,
|
|
10
|
+
halfScoring: false,
|
|
11
|
+
pointLabels: true,
|
|
12
|
+
description: false,
|
|
13
|
+
standards: false,
|
|
14
|
+
scales: [],
|
|
15
|
+
excludeZero: false,
|
|
16
|
+
maxPointsEnabled: true,
|
|
17
|
+
addScaleEnabled: true
|
|
18
|
+
},
|
|
19
|
+
configuration: {
|
|
20
|
+
excludeZeroDialogBoxContent: {
|
|
21
|
+
title: 'Exclude 0 (Zero) from Score Point Values.',
|
|
22
|
+
text: "<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>"
|
|
23
|
+
},
|
|
24
|
+
includeZeroDialogBoxContent: {
|
|
25
|
+
title: 'Include 0 (Zero) in Score Point Values.',
|
|
26
|
+
text: "<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>"
|
|
27
|
+
},
|
|
28
|
+
deleteScaleDialogBoxContent: {
|
|
29
|
+
title: 'Delete Scale',
|
|
30
|
+
text: 'Are you sure you want to delete this scale?'
|
|
31
|
+
},
|
|
32
|
+
maxPointsDialogBoxContent: {
|
|
33
|
+
title: 'Decreasing Max Points.',
|
|
34
|
+
text: " You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted."
|
|
35
|
+
},
|
|
36
|
+
settingsPanelDisabled: false,
|
|
37
|
+
spellCheck: {
|
|
38
|
+
label: 'Spellcheck',
|
|
39
|
+
settings: false,
|
|
40
|
+
enabled: true
|
|
41
|
+
},
|
|
42
|
+
showExcludeZero: {
|
|
43
|
+
settings: true,
|
|
44
|
+
label: 'Exclude Zero'
|
|
45
|
+
},
|
|
46
|
+
showScorePointLabels: {
|
|
47
|
+
settings: true,
|
|
48
|
+
label: 'Show Score Point Labels'
|
|
49
|
+
},
|
|
50
|
+
showDescription: {
|
|
51
|
+
settings: true,
|
|
52
|
+
label: 'Show Description'
|
|
53
|
+
},
|
|
54
|
+
showVisibleToStudent: {
|
|
55
|
+
settings: true,
|
|
56
|
+
label: 'Visible to Student'
|
|
57
|
+
},
|
|
58
|
+
showHalfScoring: {
|
|
59
|
+
settings: true,
|
|
60
|
+
label: 'Half Scoring'
|
|
61
|
+
},
|
|
62
|
+
// commenting this in order to use the dynamic width if the width was not set by the client (PD-3203)
|
|
63
|
+
// width: '900px',
|
|
64
|
+
// these should not be set to true (should not be used) for now
|
|
65
|
+
showStandards: {
|
|
66
|
+
settings: false,
|
|
67
|
+
label: 'Show Standards'
|
|
68
|
+
},
|
|
69
|
+
showLevelTagInput: {
|
|
70
|
+
settings: false,
|
|
71
|
+
label: 'Show Level Tag Input',
|
|
72
|
+
enabled: false
|
|
73
|
+
},
|
|
74
|
+
dragAndDrop: {
|
|
75
|
+
settings: true,
|
|
76
|
+
label: 'Enable Drag and Drop',
|
|
77
|
+
enabled: false
|
|
78
|
+
},
|
|
79
|
+
showMaxPoint: {
|
|
80
|
+
settings: true,
|
|
81
|
+
label: 'Show Max Points Dropdown'
|
|
82
|
+
},
|
|
83
|
+
addScale: {
|
|
84
|
+
settings: true,
|
|
85
|
+
label: 'Add Scale Available'
|
|
86
|
+
},
|
|
87
|
+
minNoOfTraits: 1,
|
|
88
|
+
maxNoOfTraits: 10,
|
|
89
|
+
minNoOfScales: 1,
|
|
90
|
+
maxNoOfScales: 10,
|
|
91
|
+
defaultTraitLabel: 'Trait',
|
|
92
|
+
mathMlOptions: {
|
|
93
|
+
mmlOutput: false,
|
|
94
|
+
mmlEditing: false
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
exports["default"] = _default;
|
|
99
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","visibleToStudent","halfScoring","pointLabels","description","standards","scales","excludeZero","maxPointsEnabled","addScaleEnabled","configuration","excludeZeroDialogBoxContent","title","text","includeZeroDialogBoxContent","deleteScaleDialogBoxContent","maxPointsDialogBoxContent","settingsPanelDisabled","spellCheck","label","settings","enabled","showExcludeZero","showScorePointLabels","showDescription","showVisibleToStudent","showHalfScoring","showStandards","showLevelTagInput","dragAndDrop","showMaxPoint","addScale","minNoOfTraits","maxNoOfTraits","minNoOfScales","maxNoOfScales","defaultTraitLabel","mathMlOptions","mmlOutput","mmlEditing"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,gBAAgB,EAAE,IADb;AAELC,IAAAA,WAAW,EAAE,KAFR;AAGLC,IAAAA,WAAW,EAAE,IAHR;AAILC,IAAAA,WAAW,EAAE,KAJR;AAKLC,IAAAA,SAAS,EAAE,KALN;AAMLC,IAAAA,MAAM,EAAE,EANH;AAOLC,IAAAA,WAAW,EAAE,KAPR;AAQLC,IAAAA,gBAAgB,EAAE,IARb;AASLC,IAAAA,eAAe,EAAE;AATZ,GADM;AAYbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,2BAA2B,EAAE;AAC3BC,MAAAA,KAAK,EAAE,2CADoB;AAE3BC,MAAAA,IAAI;AAFuB,KADhB;AAmBbC,IAAAA,2BAA2B,EAAE;AAC3BF,MAAAA,KAAK,EAAE,yCADoB;AAE3BC,MAAAA,IAAI;AAFuB,KAnBhB;AAqCbE,IAAAA,2BAA2B,EAAE;AAC3BH,MAAAA,KAAK,EAAE,cADoB;AAE3BC,MAAAA,IAAI,EAAE;AAFqB,KArChB;AAyCbG,IAAAA,yBAAyB,EAAE;AACzBJ,MAAAA,KAAK,EAAE,wBADkB;AAEzBC,MAAAA,IAAI;AAFqB,KAzCd;AA+CbI,IAAAA,qBAAqB,EAAE,KA/CV;AAgDbC,IAAAA,UAAU,EAAE;AACVC,MAAAA,KAAK,EAAE,YADG;AAEVC,MAAAA,QAAQ,EAAE,KAFA;AAGVC,MAAAA,OAAO,EAAE;AAHC,KAhDC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GbC,IAAAA,iBAAiB,EAAE,OAtGN;AAuGbC,IAAAA,aAAa,EAAE;AACbC,MAAAA,SAAS,EAAE,KADE;AAEbC,MAAAA,UAAU,EAAE;AAFC;AAvGF;AAZF,C","sourcesContent":["export default {\n model: {\n visibleToStudent: true,\n halfScoring: false,\n pointLabels: true,\n description: false,\n standards: false,\n scales: [],\n excludeZero: false,\n maxPointsEnabled: true,\n addScaleEnabled: true,\n },\n configuration: {\n excludeZeroDialogBoxContent: {\n title: 'Exclude 0 (Zero) from Score Point Values.',\n text: `<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>`,\n },\n includeZeroDialogBoxContent: {\n title: 'Include 0 (Zero) in Score Point Values.',\n text: `<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>`,\n },\n deleteScaleDialogBoxContent: {\n title: 'Delete Scale',\n text: 'Are you sure you want to delete this scale?',\n },\n maxPointsDialogBoxContent: {\n title: 'Decreasing Max Points.',\n text: ` You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted.`,\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n showExcludeZero: {\n settings: true,\n label: 'Exclude Zero',\n },\n showScorePointLabels: {\n settings: true,\n label: 'Show Score Point Labels',\n },\n showDescription: {\n settings: true,\n label: 'Show Description',\n },\n showVisibleToStudent: {\n settings: true,\n label: 'Visible to Student',\n },\n showHalfScoring: {\n settings: true,\n label: 'Half Scoring',\n },\n // commenting this in order to use the dynamic width if the width was not set by the client (PD-3203)\n // width: '900px',\n // these should not be set to true (should not be used) for now\n showStandards: {\n settings: false,\n label: 'Show Standards',\n },\n showLevelTagInput: {\n settings: false,\n label: 'Show Level Tag Input',\n enabled: false,\n },\n dragAndDrop: {\n settings: true,\n label: 'Enable Drag and Drop',\n enabled: false,\n },\n showMaxPoint: {\n settings: true,\n label: 'Show Max Points Dropdown',\n },\n addScale: {\n settings: true,\n label: 'Add Scale Available',\n },\n minNoOfTraits: 1,\n maxNoOfTraits: 10,\n minNoOfScales: 1,\n maxNoOfScales: 10,\n defaultTraitLabel: 'Trait',\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n },\n};\n"],"file":"defaults.js"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
14
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
+
|
|
16
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
+
|
|
18
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
+
|
|
20
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
+
|
|
22
|
+
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
23
|
+
|
|
24
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
+
|
|
26
|
+
var _pieConfigureEvents = require("@pie-framework/pie-configure-events");
|
|
27
|
+
|
|
28
|
+
var _react = _interopRequireDefault(require("react"));
|
|
29
|
+
|
|
30
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
31
|
+
|
|
32
|
+
var _main = _interopRequireDefault(require("./main"));
|
|
33
|
+
|
|
34
|
+
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
35
|
+
|
|
36
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
37
|
+
|
|
38
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
+
|
|
40
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
41
|
+
|
|
42
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
43
|
+
|
|
44
|
+
var modelWithDefaults = function modelWithDefaults(m) {
|
|
45
|
+
return _objectSpread(_objectSpread({}, _defaults["default"].model), m);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var configurationWithDefaults = function configurationWithDefaults(c) {
|
|
49
|
+
return _objectSpread(_objectSpread({}, _defaults["default"].configuration), c);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var MultiTraitRubricElement = /*#__PURE__*/function (_HTMLElement) {
|
|
53
|
+
(0, _inherits2["default"])(MultiTraitRubricElement, _HTMLElement);
|
|
54
|
+
|
|
55
|
+
var _super = _createSuper(MultiTraitRubricElement);
|
|
56
|
+
|
|
57
|
+
function MultiTraitRubricElement() {
|
|
58
|
+
var _this;
|
|
59
|
+
|
|
60
|
+
(0, _classCallCheck2["default"])(this, MultiTraitRubricElement);
|
|
61
|
+
_this = _super.call(this);
|
|
62
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onModelChanged", function (m) {
|
|
63
|
+
_this._model = modelWithDefaults(m);
|
|
64
|
+
|
|
65
|
+
_this._render();
|
|
66
|
+
|
|
67
|
+
_this.dispatchEvent(new _pieConfigureEvents.ModelUpdatedEvent(_this._model, false));
|
|
68
|
+
});
|
|
69
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onConfigurationChanged", function (c) {
|
|
70
|
+
_this._configuration = configurationWithDefaults(c);
|
|
71
|
+
|
|
72
|
+
_this._render();
|
|
73
|
+
});
|
|
74
|
+
_this._model = modelWithDefaults();
|
|
75
|
+
_this._configuration = configurationWithDefaults();
|
|
76
|
+
return _this;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
(0, _createClass2["default"])(MultiTraitRubricElement, [{
|
|
80
|
+
key: "model",
|
|
81
|
+
set: function set(m) {
|
|
82
|
+
this._model = modelWithDefaults(m);
|
|
83
|
+
|
|
84
|
+
this._render();
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
87
|
+
key: "configuration",
|
|
88
|
+
set: function set(c) {
|
|
89
|
+
this._configuration = configurationWithDefaults(c);
|
|
90
|
+
|
|
91
|
+
this._render();
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
key: "insertSound",
|
|
95
|
+
value: function insertSound(handler) {
|
|
96
|
+
this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
|
|
97
|
+
}
|
|
98
|
+
}, {
|
|
99
|
+
key: "onDeleteSound",
|
|
100
|
+
value: function onDeleteSound(src, done) {
|
|
101
|
+
this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
key: "_render",
|
|
105
|
+
value: function _render() {
|
|
106
|
+
if (this._model) {
|
|
107
|
+
var element = /*#__PURE__*/_react["default"].createElement(_main["default"], {
|
|
108
|
+
model: this._model,
|
|
109
|
+
configuration: this._configuration,
|
|
110
|
+
onModelChanged: this.onModelChanged,
|
|
111
|
+
onConfigurationChanged: this.onConfigurationChanged,
|
|
112
|
+
uploadSoundSupport: {
|
|
113
|
+
add: this.insertSound.bind(this),
|
|
114
|
+
"delete": this.onDeleteSound.bind(this)
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
_reactDom["default"].render(element, this);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}]);
|
|
122
|
+
return MultiTraitRubricElement;
|
|
123
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLElement));
|
|
124
|
+
|
|
125
|
+
exports["default"] = MultiTraitRubricElement;
|
|
126
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["modelWithDefaults","m","defaults","model","configurationWithDefaults","c","configuration","MultiTraitRubricElement","_model","_render","dispatchEvent","ModelUpdatedEvent","_configuration","handler","InsertSoundEvent","src","done","DeleteSoundEvent","element","React","createElement","Main","onModelChanged","onConfigurationChanged","uploadSoundSup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F,GAArB,EAA0BC,IAA1B,CAAnB;AACD;;;WAED,mBAAU;AACR,UAAI,KAAKR,MAAT,EAAiB;AACf,YAAIU,OAAO,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACtClB,UAAAA,KAAK,EAAE,KAAKK,MAD0B;AAEtCF,UAAAA,aAAa,EAAE,KAAKM,cAFkB;AAGtCU,UAAAA,cAAc,EAAE,KAAKA,cAHiB;AAItCC,UAAAA,sBAAsB,EAAE,KAAKA,sBAJS;AAKtCC,UAAAA,kBAAkB,EAAE;AAClBC,YAAAA,GAAG,EAAE,KAAKC,WAAL,CAAiBC,IAAjB,CAAsB,IAAtB,CADa;AAElB,sBAAQ,KAAKC,aAAL,CAAmBD,IAAnB,CAAwB,IAAxB;AAFU;AALkB,SAA1B,CAAd;;AAWAE,6BAASC,MAAT,CAAgBZ,OAAhB,EAAyB,IAAzB;AACD;AACF;;;kDApDkDa,W","sourcesContent":["import { ModelUpdatedEvent, InsertSoundEvent, DeleteSoundEvent } from '@pie-framework/pie-configure-events';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport Main from './main';\nimport defaults from './defaults';\n\nconst modelWithDefaults = (m) => ({ ...defaults.model, ...m });\nconst configurationWithDefaults = (c) => ({ ...defaults.configuration, ...c });\n\nexport default class MultiTraitRubricElement extends HTMLElement {\n constructor() {\n super();\n this._model = modelWithDefaults();\n this._configuration = configurationWithDefaults();\n }\n\n set model(m) {\n this._model = modelWithDefaults(m);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = configurationWithDefaults(c);\n this._render();\n }\n\n onModelChanged = (m) => {\n this._model = modelWithDefaults(m);\n this._render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n };\n\n onConfigurationChanged = (c) => {\n this._configuration = configurationWithDefaults(c);\n\n this._render();\n };\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n _render() {\n if (this._model) {\n let element = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n\n ReactDOM.render(element, this);\n }\n }\n}\n"],"file":"index.js"}
|