@pie-element/complex-rubric 2.10.1-next.11 → 2.10.1-next.12

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 (115) hide show
  1. package/configure/package.json +2 -2
  2. package/controller/package.json +1 -1
  3. package/module/configure.js +233613 -0
  4. package/module/controller.js +379 -0
  5. package/module/demo.js +221 -0
  6. package/module/element.js +231245 -0
  7. package/module/index.html +21 -0
  8. package/module/manifest.json +14 -0
  9. package/module/print-demo.js +259 -0
  10. package/module/print.html +18 -0
  11. package/module/print.js +231217 -0
  12. package/package.json +4 -4
  13. package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +0 -1
  14. package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +0 -1383
  15. package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +0 -5
  16. package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +0 -55
  17. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +0 -1
  18. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +0 -1270
  19. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +0 -584
  20. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +0 -1
  21. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +0 -143
  22. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +0 -1
  23. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +0 -204
  24. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +0 -1
  25. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +0 -602
  26. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +0 -1
  27. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +0 -361
  28. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +0 -1
  29. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +0 -556
  30. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +0 -1
  31. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +0 -380
  32. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +0 -1
  33. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +0 -296
  34. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +0 -1
  35. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +0 -14
  36. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +0 -1
  37. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +0 -18
  38. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +0 -1
  39. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +0 -544
  40. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +0 -94
  41. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +0 -1
  42. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +0 -215
  43. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +0 -1
  44. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js +0 -13
  45. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +0 -1
  46. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +0 -15
  47. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +0 -803
  48. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +0 -602
  49. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +0 -8
  50. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +0 -180
  51. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +0 -1
  52. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +0 -6
  53. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +0 -531
  54. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +0 -374
  55. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +0 -85
  56. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +0 -1
  57. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +0 -161
  58. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +0 -1
  59. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +0 -330
  60. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +0 -1
  61. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +0 -103
  62. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +0 -1
  63. package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +0 -24
  64. package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +0 -257
  65. package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +0 -1640
  66. package/configure/node_modules/@pie-element/rubric/LICENSE.md +0 -5
  67. package/configure/node_modules/@pie-element/rubric/README.md +0 -3
  68. package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +0 -197
  69. package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +0 -1471
  70. package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +0 -59
  71. package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +0 -1
  72. package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +0 -194
  73. package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +0 -1
  74. package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +0 -160
  75. package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +0 -1
  76. package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/authoring.js +0 -555
  77. package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/authoring.js.map +0 -1
  78. package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/index.js +0 -24
  79. package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/index.js.map +0 -1
  80. package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/point-menu.js +0 -172
  81. package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/point-menu.js.map +0 -1
  82. package/configure/node_modules/@pie-element/rubric/configure/package.json +0 -17
  83. package/configure/node_modules/@pie-element/rubric/configure/src/__tests__/index.test.jsx +0 -173
  84. package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +0 -39
  85. package/configure/node_modules/@pie-element/rubric/configure/src/index.js +0 -127
  86. package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +0 -87
  87. package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/authoring.jsx +0 -427
  88. package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/index.js +0 -9
  89. package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/point-menu.jsx +0 -94
  90. package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +0 -17
  91. package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +0 -536
  92. package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +0 -51
  93. package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +0 -1
  94. package/configure/node_modules/@pie-element/rubric/controller/package.json +0 -13
  95. package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +0 -31
  96. package/configure/node_modules/@pie-element/rubric/controller/src/index.js +0 -42
  97. package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +0 -382
  98. package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +0 -292
  99. package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +0 -8
  100. package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +0 -8
  101. package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +0 -2
  102. package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +0 -226
  103. package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +0 -161
  104. package/configure/node_modules/@pie-element/rubric/lib/index.js +0 -88
  105. package/configure/node_modules/@pie-element/rubric/lib/index.js.map +0 -1
  106. package/configure/node_modules/@pie-element/rubric/lib/main.js +0 -187
  107. package/configure/node_modules/@pie-element/rubric/lib/main.js.map +0 -1
  108. package/configure/node_modules/@pie-element/rubric/lib/print.js +0 -114
  109. package/configure/node_modules/@pie-element/rubric/lib/print.js.map +0 -1
  110. package/configure/node_modules/@pie-element/rubric/package.json +0 -26
  111. package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +0 -23003
  112. package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +0 -50
  113. package/configure/node_modules/@pie-element/rubric/src/index.js +0 -34
  114. package/configure/node_modules/@pie-element/rubric/src/main.jsx +0 -136
  115. package/configure/node_modules/@pie-element/rubric/src/print.js +0 -63
@@ -1,143 +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
- baseInputConfiguration: {
21
- audio: {
22
- disabled: false
23
- },
24
- video: {
25
- disabled: false
26
- },
27
- image: {
28
- disabled: false
29
- }
30
- },
31
- expandedInput: {
32
- inputConfiguration: {
33
- math: {
34
- disabled: true
35
- },
36
- audio: {
37
- disabled: false
38
- },
39
- video: {
40
- disabled: false
41
- },
42
- image: {
43
- disabled: false
44
- }
45
- }
46
- },
47
- labelInput: {
48
- inputConfiguration: {
49
- math: {
50
- disabled: true
51
- },
52
- audio: {
53
- disabled: true
54
- },
55
- video: {
56
- disabled: true
57
- },
58
- image: {
59
- disabled: true
60
- }
61
- }
62
- },
63
- excludeZeroDialogBoxContent: {
64
- title: 'Exclude 0 (Zero) from Score Point Values.',
65
- 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>"
66
- },
67
- includeZeroDialogBoxContent: {
68
- title: 'Include 0 (Zero) in Score Point Values.',
69
- 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>"
70
- },
71
- deleteScaleDialogBoxContent: {
72
- title: 'Delete Scale',
73
- text: 'Are you sure you want to delete this scale?'
74
- },
75
- maxPointsDialogBoxContent: {
76
- title: 'Decreasing Max Points.',
77
- 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."
78
- },
79
- settingsPanelDisabled: false,
80
- spellCheck: {
81
- label: 'Spellcheck',
82
- settings: false,
83
- enabled: true
84
- },
85
- showExcludeZero: {
86
- settings: true,
87
- label: 'Exclude Zero'
88
- },
89
- showScorePointLabels: {
90
- settings: true,
91
- label: 'Show Score Point Labels'
92
- },
93
- showDescription: {
94
- settings: true,
95
- label: 'Show Description'
96
- },
97
- showVisibleToStudent: {
98
- settings: true,
99
- label: 'Visible to Student'
100
- },
101
- showHalfScoring: {
102
- settings: true,
103
- label: 'Half Scoring'
104
- },
105
- // commenting this in order to use the dynamic width if the width was not set by the client (PD-3203)
106
- // width: '900px',
107
- // these should not be set to true (should not be used) for now
108
- showStandards: {
109
- settings: false,
110
- label: 'Show Standards'
111
- },
112
- showLevelTagInput: {
113
- settings: false,
114
- label: 'Show Level Tag Input',
115
- enabled: false
116
- },
117
- dragAndDrop: {
118
- settings: true,
119
- label: 'Enable Drag and Drop',
120
- enabled: false
121
- },
122
- showMaxPoint: {
123
- settings: true,
124
- label: 'Show Max Points Dropdown'
125
- },
126
- addScale: {
127
- settings: true,
128
- label: 'Add Scale Available'
129
- },
130
- minNoOfTraits: 1,
131
- maxNoOfTraits: 10,
132
- minNoOfScales: 1,
133
- maxNoOfScales: 10,
134
- defaultTraitLabel: 'Trait',
135
- mathMlOptions: {
136
- mmlOutput: false,
137
- mmlEditing: false
138
- },
139
- maxMaxPoints: 10
140
- }
141
- };
142
- exports["default"] = _default;
143
- //# 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","baseInputConfiguration","audio","disabled","video","image","expandedInput","inputConfiguration","math","labelInput","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","maxMaxPoints"],"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,W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AA,OAAO,EAAE;AAHE,KA1GA;AA+GbS,IAAAA,YAAY,EAAE;AACZV,MAAAA,QAAQ,EAAE,IADE;AAEZD,MAAAA,KAAK,EAAE;AAFK,KA/GD;AAmHbY,IAAAA,QAAQ,EAAE;AACRX,MAAAA,QAAQ,EAAE,IADF;AAERD,MAAAA,KAAK,EAAE;AAFC,KAnHG;AAuHba,IAAAA,aAAa,EAAE,CAvHF;AAwHbC,IAAAA,aAAa,EAAE,EAxHF;AAyHbC,IAAAA,aAAa,EAAE,CAzHF;AA0HbC,IAAAA,aAAa,EAAE,EA1HF;AA2HbC,IAAAA,iBAAiB,EAAE,OA3HN;AA4HbC,IAAAA,aAAa,EAAE;AACbC,MAAAA,SAAS,EAAE,KADE;AAEbC,MAAAA,UAAU,EAAE;AAFC,KA5HF;AAgIbC,IAAAA,YAAY,EAAE;AAhID;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 baseInputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n expandedInput: {\n inputConfiguration: {\n math: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n labelInput: {\n inputConfiguration: {\n math: { disabled: true },\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: true },\n },\n },\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 maxMaxPoints: 10,\n },\n};\n"],"file":"defaults.js"}
@@ -1,204 +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 _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
-
12
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
-
14
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
-
16
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
17
-
18
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
-
20
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
21
-
22
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
23
-
24
- var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
25
-
26
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
27
-
28
- var _pieConfigureEvents = require("@pie-framework/pie-configure-events");
29
-
30
- var _react = _interopRequireDefault(require("react"));
31
-
32
- var _reactDom = _interopRequireDefault(require("react-dom"));
33
-
34
- var _main = _interopRequireDefault(require("./main"));
35
-
36
- var _defaults = _interopRequireDefault(require("./defaults"));
37
-
38
- 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); }; }
39
-
40
- 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; } }
41
-
42
- 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; }
43
-
44
- 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; }
45
-
46
- var modelWithDefaults = function modelWithDefaults(m) {
47
- return _objectSpread(_objectSpread({}, _defaults["default"].model), m);
48
- };
49
-
50
- var configurationWithDefaults = function configurationWithDefaults(c) {
51
- return _objectSpread(_objectSpread({}, _defaults["default"].configuration), c);
52
- };
53
-
54
- var MultiTraitRubricElement = /*#__PURE__*/function (_HTMLElement) {
55
- (0, _inherits2["default"])(MultiTraitRubricElement, _HTMLElement);
56
-
57
- var _super = _createSuper(MultiTraitRubricElement);
58
-
59
- function MultiTraitRubricElement() {
60
- var _this;
61
-
62
- (0, _classCallCheck2["default"])(this, MultiTraitRubricElement);
63
- _this = _super.call(this);
64
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "updateModelAccordingToReceivedProps", function (m) {
65
- var currentModel = _objectSpread({}, _this._model);
66
-
67
- if (!m) {
68
- return currentModel;
69
- }
70
-
71
- var validatedModel = _objectSpread({}, m);
72
-
73
- var _ref = validatedModel || {},
74
- scales = _ref.scales,
75
- excludeZero = _ref.excludeZero;
76
-
77
- (scales || []).forEach(function (scale) {
78
- if (!scale) {
79
- scale = {
80
- scorePointsLabels: [],
81
- traits: []
82
- };
83
- }
84
-
85
- var _ref2 = scale || {},
86
- maxPoints = _ref2.maxPoints;
87
-
88
- scale.scorePointsLabels = (0, _toConsumableArray2["default"])(scale.scorePointsLabels || []);
89
- scale.traits = (0, _toConsumableArray2["default"])(scale.traits || []);
90
- var howManyScorePointLabelsShouldHave = excludeZero ? maxPoints : maxPoints + 1;
91
- var howManyScorePointLabelsItHas = scale.scorePointsLabels.length;
92
-
93
- if (howManyScorePointLabelsItHas !== howManyScorePointLabelsShouldHave) {
94
- if (howManyScorePointLabelsItHas < howManyScorePointLabelsShouldHave) {
95
- for (var i = 0; i < howManyScorePointLabelsShouldHave - howManyScorePointLabelsItHas; i++) {
96
- scale.scorePointsLabels.push('');
97
- }
98
- } else {
99
- scale.scorePointsLabels = scale.scorePointsLabels.slice(0, howManyScorePointLabelsShouldHave);
100
- }
101
- }
102
-
103
- (scale.traits || []).forEach(function (trait) {
104
- if (!trait) {
105
- trait = {
106
- scorePointsDescriptors: []
107
- };
108
- }
109
-
110
- trait.scorePointsDescriptors = (0, _toConsumableArray2["default"])(trait.scorePointsDescriptors || []);
111
- var howManyScorePointDescriptorsItHas = trait.scorePointsDescriptors.length;
112
-
113
- if (howManyScorePointDescriptorsItHas !== howManyScorePointLabelsShouldHave) {
114
- if (howManyScorePointDescriptorsItHas < howManyScorePointLabelsShouldHave) {
115
- for (var _i = 0; _i < howManyScorePointLabelsShouldHave - howManyScorePointDescriptorsItHas; _i++) {
116
- trait.scorePointsDescriptors.push('');
117
- }
118
- } else {
119
- trait.scorePointsDescriptors = trait.scorePointsDescriptors.slice(0, howManyScorePointLabelsShouldHave);
120
- }
121
- }
122
- });
123
- });
124
- return validatedModel;
125
- });
126
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onModelChanged", function (m) {
127
- _this._model = _this.updateModelAccordingToReceivedProps(modelWithDefaults(m));
128
-
129
- _this._render();
130
-
131
- _this.dispatchEvent(new _pieConfigureEvents.ModelUpdatedEvent(_this._model, false));
132
- });
133
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onConfigurationChanged", function (c) {
134
- _this._configuration = configurationWithDefaults(c);
135
-
136
- _this._render();
137
- });
138
- _this._model = modelWithDefaults();
139
- _this._configuration = configurationWithDefaults();
140
- return _this;
141
- }
142
-
143
- (0, _createClass2["default"])(MultiTraitRubricElement, [{
144
- key: "model",
145
- set: function set(m) {
146
- this._model = this.updateModelAccordingToReceivedProps(modelWithDefaults(m));
147
-
148
- this._render();
149
- }
150
- }, {
151
- key: "configuration",
152
- set: function set(c) {
153
- this._configuration = configurationWithDefaults(c);
154
-
155
- this._render();
156
- }
157
- }, {
158
- key: "insertSound",
159
- value: function insertSound(handler) {
160
- this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
161
- }
162
- }, {
163
- key: "onDeleteSound",
164
- value: function onDeleteSound(src, done) {
165
- this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
166
- }
167
- }, {
168
- key: "insertImage",
169
- value: function insertImage(handler) {
170
- this.dispatchEvent(new _pieConfigureEvents.InsertImageEvent(handler));
171
- }
172
- }, {
173
- key: "onDeleteImage",
174
- value: function onDeleteImage(src, done) {
175
- this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
176
- }
177
- }, {
178
- key: "_render",
179
- value: function _render() {
180
- if (this._model) {
181
- var element = /*#__PURE__*/_react["default"].createElement(_main["default"], {
182
- model: this._model,
183
- configuration: this._configuration,
184
- onModelChanged: this.onModelChanged,
185
- onConfigurationChanged: this.onConfigurationChanged,
186
- uploadSoundSupport: {
187
- add: this.insertSound.bind(this),
188
- "delete": this.onDeleteSound.bind(this)
189
- },
190
- imageSupport: {
191
- add: this.insertImage.bind(this),
192
- "delete": this.onDeleteImage.bind(this)
193
- }
194
- });
195
-
196
- _reactDom["default"].render(element, this);
197
- }
198
- }
199
- }]);
200
- return MultiTraitRubricElement;
201
- }( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLElement));
202
-
203
- exports["default"] = MultiTraitRubricElement;
204
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["modelWithDefaults","m","defaults","model","configurationWithDefaults","c","configuration","MultiTraitRubricElement","currentModel","_model","validatedModel","scales","excludeZero","forEach","scale","scorePointsLabels","traits","maxPoints","howManyScorePointLabelsShouldHave","howManyScorePointLabelsItHas","length","i","push","slice","trait","scorePointsDescriptors","howManyScorePointDescriptorsItHas","updateModelAccordingToReceivedProps","_render","dispatchEvent","ModelUpdatedEvent","_configuration","handler","InsertSoundEvent","src","done","DeleteSoundEvent","InsertImageEvent","DeleteImageEvent","element","React","createElement","Main","onModelChanged","onConfigurationChanged","uploadSoundSupport","add","insertSound","bind","onDeleteSound","imageSupport","insertImage","onDeleteImage","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAQA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,CAAD;AAAA,yCAAaC,qBAASC,KAAtB,GAAgCF,CAAhC;AAAA,CAA1B;;AACA,IAAMG,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,CAAD;AAAA,yCAAaH,qBAASI,aAAtB,GAAwCD,CAAxC;AAAA,CAAlC;;IAEqBE,uB;;;;;AACnB,qCAAc;AAAA;;AAAA;AACZ;AADY,4HAMwB,UAACN,CAAD,EAAO;AAC3C,UAAMO,YAAY,qBAAO,MAAKC,MAAZ,CAAlB;;AACA,UAAI,CAACR,CAAL,EAAQ;AACN,eAAOO,YAAP;AACD;;AAED,UAAME,cAAc,qBAAQT,CAAR,CAApB;;AACA,iBAAgCS,cAAc,IAAI,EAAlD;AAAA,UAAQC,MAAR,QAAQA,MAAR;AAAA,UAAgBC,WAAhB,QAAgBA,WAAhB;;AAEA,OAACD,MAAM,IAAI,EAAX,EAAeE,OAAf,CAAuB,UAAAC,KAAK,EAAI;AAC9B,YAAI,CAACA,KAAL,EAAY;AACVA,UAAAA,KAAK,GAAG;AAAEC,YAAAA,iBAAiB,EAAE,EAArB;AAAyBC,YAAAA,MAAM,EAAE;AAAjC,WAAR;AACD;;AAED,oBAAsBF,KAAK,IAAI,E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AA0BC,IAA1B,CAAnB;AACD;;;WAED,qBAAYH,OAAZ,EAAqB;AACnB,WAAKH,aAAL,CAAmB,IAAIQ,oCAAJ,CAAqBL,OAArB,CAAnB;AACD;;;WAED,uBAAcE,GAAd,EAAmBC,IAAnB,EAAyB;AACvB,WAAKN,aAAL,CAAmB,IAAIS,oCAAJ,CAAqBJ,GAArB,EAA0BC,IAA1B,CAAnB;AACD;;;WAED,mBAAU;AACR,UAAI,KAAK1B,MAAT,EAAiB;AACf,YAAI8B,OAAO,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACtCvC,UAAAA,KAAK,EAAE,KAAKM,MAD0B;AAEtCH,UAAAA,aAAa,EAAE,KAAKyB,cAFkB;AAGtCY,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,WALkB;AAStCE,UAAAA,YAAY,EAAE;AACZJ,YAAAA,GAAG,EAAE,KAAKK,WAAL,CAAiBH,IAAjB,CAAsB,IAAtB,CADO;AAEZ,sBAAQ,KAAKI,aAAL,CAAmBJ,IAAnB,CAAwB,IAAxB;AAFI;AATwB,SAA1B,CAAd;;AAeAK,6BAASC,MAAT,CAAgBf,OAAhB,EAAyB,IAAzB;AACD;AACF;;;kDAxHkDgB,W","sourcesContent":["import {\n ModelUpdatedEvent,\n InsertSoundEvent,\n DeleteSoundEvent,\n InsertImageEvent,\n DeleteImageEvent\n} 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 updateModelAccordingToReceivedProps = (m) => {\n const currentModel = {...this._model};\n if (!m) {\n return currentModel;\n }\n\n const validatedModel = { ...m };\n const { scales, excludeZero } = validatedModel || {};\n\n (scales || []).forEach(scale => {\n if (!scale) {\n scale = { scorePointsLabels: [], traits: [] };\n }\n\n const { maxPoints } = scale || {};\n\n scale.scorePointsLabels = [ ...(scale.scorePointsLabels || []) ];\n scale.traits = [ ...(scale.traits || []) ];\n\n const howManyScorePointLabelsShouldHave = excludeZero ? maxPoints : maxPoints + 1;\n const howManyScorePointLabelsItHas = scale.scorePointsLabels.length;\n\n if (howManyScorePointLabelsItHas !== howManyScorePointLabelsShouldHave) {\n if (howManyScorePointLabelsItHas < howManyScorePointLabelsShouldHave) {\n for (let i = 0; i < howManyScorePointLabelsShouldHave - howManyScorePointLabelsItHas; i++) {\n scale.scorePointsLabels.push('');\n }\n } else {\n scale.scorePointsLabels = scale.scorePointsLabels.slice(0, howManyScorePointLabelsShouldHave);\n }\n }\n\n (scale.traits || []).forEach(trait => {\n if (!trait) {\n trait = { scorePointsDescriptors: [] };\n }\n\n trait.scorePointsDescriptors = [ ...(trait.scorePointsDescriptors || []) ];\n\n const howManyScorePointDescriptorsItHas = trait.scorePointsDescriptors.length;\n\n if (howManyScorePointDescriptorsItHas !== howManyScorePointLabelsShouldHave) {\n if (howManyScorePointDescriptorsItHas < howManyScorePointLabelsShouldHave) {\n for (let i = 0; i < howManyScorePointLabelsShouldHave - howManyScorePointDescriptorsItHas; i++) {\n trait.scorePointsDescriptors.push('');\n }\n } else {\n trait.scorePointsDescriptors = trait.scorePointsDescriptors.slice(0, howManyScorePointLabelsShouldHave);\n }\n }\n });\n });\n\n return validatedModel;\n };\n\n set model(m) {\n this._model = this.updateModelAccordingToReceivedProps(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 = this.updateModelAccordingToReceivedProps(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 insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(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 imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this),\n },\n });\n\n ReactDOM.render(element, this);\n }\n }\n}\n"],"file":"index.js"}