@pie-element/complex-rubric 2.1.2-next.44 → 2.1.2-next.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/configure/lib/defaults.js +4 -2
  2. package/configure/lib/defaults.js.map +1 -1
  3. package/configure/package.json +2 -2
  4. package/configure/src/defaults.js +2 -0
  5. package/controller/package.json +1 -1
  6. package/docs/config-schema.json +20 -0
  7. package/docs/config-schema.json.md +16 -0
  8. package/docs/pie-schema.json +10 -0
  9. package/docs/pie-schema.json.md +8 -0
  10. package/package.json +4 -4
  11. package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +0 -1
  12. package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +0 -1001
  13. package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +0 -5
  14. package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +0 -55
  15. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +0 -1
  16. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +0 -892
  17. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +0 -563
  18. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +0 -1
  19. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +0 -99
  20. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +0 -1
  21. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +0 -126
  22. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +0 -1
  23. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +0 -569
  24. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +0 -1
  25. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +0 -361
  26. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +0 -1
  27. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +0 -560
  28. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +0 -1
  29. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +0 -374
  30. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +0 -1
  31. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +0 -283
  32. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +0 -1
  33. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +0 -29
  34. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +0 -1
  35. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +0 -18
  36. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +0 -1
  37. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +0 -233
  38. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +0 -94
  39. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +0 -1
  40. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +0 -215
  41. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +0 -1
  42. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js +0 -13
  43. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +0 -1
  44. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +0 -15
  45. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +0 -272
  46. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +0 -206
  47. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +0 -8
  48. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +0 -180
  49. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +0 -1
  50. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +0 -6
  51. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +0 -298
  52. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +0 -201
  53. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +0 -85
  54. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +0 -1
  55. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +0 -161
  56. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +0 -1
  57. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +0 -330
  58. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +0 -1
  59. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +0 -103
  60. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +0 -1
  61. package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +0 -24
  62. package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +0 -257
  63. package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +0 -1271
  64. package/configure/node_modules/@pie-element/rubric/LICENSE.md +0 -5
  65. package/configure/node_modules/@pie-element/rubric/README.md +0 -3
  66. package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +0 -197
  67. package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +0 -1111
  68. package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +0 -34
  69. package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +0 -1
  70. package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +0 -130
  71. package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +0 -1
  72. package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +0 -108
  73. package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +0 -1
  74. package/configure/node_modules/@pie-element/rubric/configure/package.json +0 -17
  75. package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +0 -26
  76. package/configure/node_modules/@pie-element/rubric/configure/src/index.js +0 -64
  77. package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +0 -56
  78. package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +0 -17
  79. package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +0 -215
  80. package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +0 -45
  81. package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +0 -1
  82. package/configure/node_modules/@pie-element/rubric/controller/package.json +0 -13
  83. package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +0 -31
  84. package/configure/node_modules/@pie-element/rubric/controller/src/index.js +0 -38
  85. package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +0 -160
  86. package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +0 -127
  87. package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +0 -8
  88. package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +0 -8
  89. package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +0 -2
  90. package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +0 -96
  91. package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +0 -65
  92. package/configure/node_modules/@pie-element/rubric/lib/index.js +0 -88
  93. package/configure/node_modules/@pie-element/rubric/lib/index.js.map +0 -1
  94. package/configure/node_modules/@pie-element/rubric/lib/main.js +0 -188
  95. package/configure/node_modules/@pie-element/rubric/lib/main.js.map +0 -1
  96. package/configure/node_modules/@pie-element/rubric/lib/print.js +0 -114
  97. package/configure/node_modules/@pie-element/rubric/lib/print.js.map +0 -1
  98. package/configure/node_modules/@pie-element/rubric/package.json +0 -26
  99. package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +0 -23003
  100. package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +0 -46
  101. package/configure/node_modules/@pie-element/rubric/src/index.js +0 -34
  102. package/configure/node_modules/@pie-element/rubric/src/main.jsx +0 -136
  103. package/configure/node_modules/@pie-element/rubric/src/print.js +0 -63
@@ -1,99 +0,0 @@
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
@@ -1 +0,0 @@
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;AA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ET;AAqEbO,IAAAA,eAAe,EAAE;AACfN,MAAAA,QAAQ,EAAE,IADK;AAEfD,MAAAA,KAAK,EAAE;AAFQ,KArEJ;AAyEb;AACA;AACA;AACAQ,IAAAA,aAAa,EAAE;AACbP,MAAAA,QAAQ,EAAE,KADG;AAEbD,MAAAA,KAAK,EAAE;AAFM,KA5EF;AAgFbS,IAAAA,iBAAiB,EAAE;AACjBR,MAAAA,QAAQ,EAAE,KADO;AAEjBD,MAAAA,KAAK,EAAE,sBAFU;AAGjBE,MAAAA,OAAO,EAAE;AAHQ,KAhFN;AAqFbQ,IAAAA,WAAW,EAAE;AACXT,MAAAA,QAAQ,EAAE,IADC;AAEXD,MAAAA,KAAK,EAAE,sBAFI;AAGXE,MAAAA,OAAO,EAAE;AAHE,KArFA;AA0FbS,IAAAA,YAAY,EAAE;AACZV,MAAAA,QAAQ,EAAE,IADE;AAEZD,MAAAA,KAAK,EAAE;AAFK,KA1FD;AA8FbY,IAAAA,QAAQ,EAAE;AACRX,MAAAA,QAAQ,EAAE,IADF;AAERD,MAAAA,KAAK,EAAE;AAFC,KA9FG;AAkGba,IAAAA,aAAa,EAAE,CAlGF;AAmGbC,IAAAA,aAAa,EAAE,EAnGF;AAoGbC,IAAAA,aAAa,EAAE,CApGF;AAqGbC,IAAAA,aAAa,EAAE,EArGF;AAsGbC,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"}
@@ -1,126 +0,0 @@
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
@@ -1 +0,0 @@
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","uploadSoundSupport","add","insertSound","bind","onDeleteSound","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,CAAD;AAAA,yCAAaC,qBAASC,KAAtB,GAAgCF,CA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M,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"}