@pie-element/multi-trait-rubric 8.1.1 → 8.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.
Files changed (213) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/common.d.ts +90 -0
  4. package/dist/author/common.js +275 -0
  5. package/dist/author/defaults.d.ts +153 -0
  6. package/dist/author/defaults.js +113 -0
  7. package/dist/author/index.d.ts +22 -0
  8. package/dist/author/index.js +89 -0
  9. package/dist/author/main.d.ts +43 -0
  10. package/dist/author/main.js +249 -0
  11. package/dist/author/modals.d.ts +94 -0
  12. package/dist/author/modals.js +171 -0
  13. package/dist/author/scale.d.ts +46 -0
  14. package/dist/author/scale.js +280 -0
  15. package/dist/author/trait.d.ts +70 -0
  16. package/dist/author/trait.js +202 -0
  17. package/dist/author/traitsHeader.d.ts +28 -0
  18. package/dist/author/traitsHeader.js +172 -0
  19. package/dist/author/utils.d.ts +10 -0
  20. package/dist/author/utils.js +41 -0
  21. package/dist/browser/Typography-CdgSBeUZ.js +8984 -0
  22. package/dist/browser/Typography-CdgSBeUZ.js.map +1 -0
  23. package/dist/browser/author/index.js +42899 -0
  24. package/dist/browser/author/index.js.map +1 -0
  25. package/dist/browser/controller/index.js +70 -0
  26. package/dist/browser/controller/index.js.map +1 -0
  27. package/dist/browser/delivery/index.js +523 -0
  28. package/dist/browser/delivery/index.js.map +1 -0
  29. package/dist/browser/multi-trait-rubric.css +2 -0
  30. package/dist/controller/defaults.d.ts +20 -0
  31. package/dist/controller/defaults.js +14 -0
  32. package/dist/controller/index.d.ts +26 -0
  33. package/dist/controller/index.js +57 -0
  34. package/dist/controller/utils.d.ts +9 -0
  35. package/dist/controller/utils.js +4 -0
  36. package/dist/delivery/index.d.ts +17 -0
  37. package/dist/delivery/index.js +37 -0
  38. package/dist/delivery/main.d.ts +15 -0
  39. package/dist/delivery/main.js +95 -0
  40. package/dist/delivery/scale.d.ts +17 -0
  41. package/dist/delivery/scale.js +175 -0
  42. package/dist/delivery/trait.d.ts +27 -0
  43. package/dist/delivery/trait.js +44 -0
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.iife.d.ts +8 -0
  46. package/dist/index.iife.js +145 -0
  47. package/dist/index.js +2 -0
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
  163. package/package.json +80 -14
  164. package/CHANGELOG.json +0 -1
  165. package/CHANGELOG.md +0 -1584
  166. package/LICENSE.md +0 -5
  167. package/README.md +0 -55
  168. package/configure/CHANGELOG.json +0 -1
  169. package/configure/CHANGELOG.md +0 -1479
  170. package/configure/lib/common.js +0 -424
  171. package/configure/lib/common.js.map +0 -1
  172. package/configure/lib/defaults.js +0 -184
  173. package/configure/lib/defaults.js.map +0 -1
  174. package/configure/lib/index.js +0 -157
  175. package/configure/lib/index.js.map +0 -1
  176. package/configure/lib/main.js +0 -454
  177. package/configure/lib/main.js.map +0 -1
  178. package/configure/lib/modals.js +0 -206
  179. package/configure/lib/modals.js.map +0 -1
  180. package/configure/lib/scale.js +0 -478
  181. package/configure/lib/scale.js.map +0 -1
  182. package/configure/lib/trait.js +0 -275
  183. package/configure/lib/trait.js.map +0 -1
  184. package/configure/lib/traitsHeader.js +0 -235
  185. package/configure/lib/traitsHeader.js.map +0 -1
  186. package/configure/lib/utils.js +0 -87
  187. package/configure/lib/utils.js.map +0 -1
  188. package/configure/package.json +0 -24
  189. package/controller/CHANGELOG.json +0 -1
  190. package/controller/CHANGELOG.md +0 -911
  191. package/controller/lib/defaults.js +0 -18
  192. package/controller/lib/defaults.js.map +0 -1
  193. package/controller/lib/index.js +0 -158
  194. package/controller/lib/index.js.map +0 -1
  195. package/controller/lib/utils.js +0 -11
  196. package/controller/lib/utils.js.map +0 -1
  197. package/controller/package.json +0 -14
  198. package/docs/config-schema.json +0 -1628
  199. package/docs/config-schema.json.md +0 -1202
  200. package/docs/demo/config.js +0 -8
  201. package/docs/demo/generate.js +0 -117
  202. package/docs/demo/index.html +0 -1
  203. package/docs/demo/session.js +0 -6
  204. package/docs/pie-schema.json +0 -861
  205. package/docs/pie-schema.json.md +0 -614
  206. package/lib/index.js +0 -54
  207. package/lib/index.js.map +0 -1
  208. package/lib/main.js +0 -123
  209. package/lib/main.js.map +0 -1
  210. package/lib/scale.js +0 -248
  211. package/lib/scale.js.map +0 -1
  212. package/lib/trait.js +0 -83
  213. package/lib/trait.js.map +0 -1
@@ -0,0 +1,89 @@
1
+ import e from "./defaults.js";
2
+ import { excludeZeroTypes as t } from "./modals.js";
3
+ import { addOrRemoveScaleColumn as n } from "./utils.js";
4
+ import r from "./main.js";
5
+ import i from "react";
6
+ import { createRoot as a } from "react-dom/client";
7
+ import { DeleteImageEvent as o, DeleteSoundEvent as s, InsertImageEvent as c, InsertSoundEvent as l, ModelUpdatedEvent as u } from "@pie-element/shared-configure-events";
8
+ //#region src/author/index.ts
9
+ var d = (t) => ({
10
+ ...e.model,
11
+ ...t
12
+ }), f = (t) => ({
13
+ ...e.configuration,
14
+ ...t
15
+ }), p = class extends HTMLElement {
16
+ constructor() {
17
+ super(), this._root = null, this._model = d(), this._configuration = f();
18
+ }
19
+ updateModelAccordingToReceivedProps = (e) => {
20
+ let r = { ...this._model };
21
+ if (!e) return r;
22
+ let i = { ...e }, { scales: a, excludeZero: o } = i || {};
23
+ return (a || []).forEach((e) => {
24
+ e ||= {
25
+ scorePointsLabels: [],
26
+ traits: []
27
+ };
28
+ let { maxPoints: t } = e || {};
29
+ e.scorePointsLabels = [...e.scorePointsLabels || []], e.traits = [...e.traits || []];
30
+ let n = o ? t : t + 1, r = e.scorePointsLabels.length;
31
+ if (r !== n) if (r < n) for (let t = 0; t < n - r; t++) e.scorePointsLabels.push("");
32
+ else e.scorePointsLabels = e.scorePointsLabels.slice(0, n);
33
+ (e.traits || []).forEach((e) => {
34
+ e ||= { scorePointsDescriptors: [] }, e.scorePointsDescriptors = [...e.scorePointsDescriptors || []];
35
+ let t = e.scorePointsDescriptors.length;
36
+ if (t !== n) if (t < n) for (let r = 0; r < n - t; r++) e.scorePointsDescriptors.push("");
37
+ else e.scorePointsDescriptors = e.scorePointsDescriptors.slice(0, n);
38
+ });
39
+ }), i.excludeZero && i.scales.some((e) => e.maxPoints === 1) && (i.excludeZero = !1, i.scales = n(a, t.add0)), i;
40
+ };
41
+ set model(e) {
42
+ this._model = this.updateModelAccordingToReceivedProps(d(e)), this._render();
43
+ }
44
+ set configuration(e) {
45
+ this._configuration = f(e), this._render();
46
+ }
47
+ onModelChanged = (e) => {
48
+ this._model = this.updateModelAccordingToReceivedProps(d(e)), this._render(), this.dispatchEvent(new u(this._model, !1));
49
+ };
50
+ onConfigurationChanged = (e) => {
51
+ this._configuration = f(e), this._render();
52
+ };
53
+ insertSound(e) {
54
+ this.dispatchEvent(new l(e));
55
+ }
56
+ onDeleteSound(e, t) {
57
+ this.dispatchEvent(new s(e, t));
58
+ }
59
+ insertImage(e) {
60
+ this.dispatchEvent(new c(e));
61
+ }
62
+ onDeleteImage(e, t) {
63
+ this.dispatchEvent(new o(e, t));
64
+ }
65
+ _render() {
66
+ if (this._model) {
67
+ let e = i.createElement(r, {
68
+ model: this._model,
69
+ configuration: this._configuration,
70
+ onModelChanged: this.onModelChanged,
71
+ onConfigurationChanged: this.onConfigurationChanged,
72
+ uploadSoundSupport: {
73
+ add: this.insertSound.bind(this),
74
+ delete: this.onDeleteSound.bind(this)
75
+ },
76
+ imageSupport: {
77
+ add: this.insertImage.bind(this),
78
+ delete: this.onDeleteImage.bind(this)
79
+ }
80
+ });
81
+ this._root ||= a(this), this._root.render(e);
82
+ }
83
+ }
84
+ disconnectedCallback() {
85
+ this._root && this._root.unmount();
86
+ }
87
+ };
88
+ //#endregion
89
+ export { p as default };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/multi-trait-rubric/configure/src/main.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ export declare class Main extends React.Component {
11
+ constructor(props: any);
12
+ state: {
13
+ showDecreaseMaxPointsDialog: boolean;
14
+ showDeleteScaleDialog: boolean;
15
+ showDeleteTraitDialog: boolean;
16
+ showExcludeZeroDialog: boolean;
17
+ showInfoDialog: boolean;
18
+ infoDialogText: string;
19
+ adjustedWidth: string;
20
+ initialUpdateCompleted: boolean;
21
+ };
22
+ componentDidMount(): void;
23
+ componentWillUnmount(): void;
24
+ componentDidUpdate(): void;
25
+ updateDivWidth(): void;
26
+ updateDivWidthDebounced: any;
27
+ onScaleAdded: any;
28
+ onScaleChanged: any;
29
+ onScaleRemoved: any;
30
+ onHalfScoringChanged: any;
31
+ onVisibleToStudentChanged: any;
32
+ set: (newState: any) => void;
33
+ changeShowScorePointLabels: any;
34
+ changeShowDescription: any;
35
+ changeShowStandards: any;
36
+ showToggleExcludeZeroModal: () => void;
37
+ hideToggleExcludeZeroModal: any;
38
+ onCloseInfoDialog: () => void;
39
+ changeExcludeZero: any;
40
+ onModelChanged: any;
41
+ render(): React.JSX.Element;
42
+ }
43
+ export default Main;
@@ -0,0 +1,249 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js";
3
+ import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
4
+ import { ExcludeZeroDialog as r, IncludeZeroDialog as i, InfoDialog as a, excludeZeroTypes as o } from "./modals.js";
5
+ import { addOrRemoveScaleColumn as s } from "./utils.js";
6
+ import { MultiTraitButton as c } from "./common.js";
7
+ import l from "./scale.js";
8
+ import u from "react";
9
+ import d from "prop-types";
10
+ import { styled as f } from "@mui/material/styles";
11
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
+ import { layout as h, settings as g } from "@pie-lib/config-ui";
13
+ //#region src/author/main.tsx
14
+ var { Panel: _, toggle: v } = g, y = "650px", b = f("div")(({ theme: e }) => ({
15
+ fontFamily: "Cerebri Sans",
16
+ fontSize: e.typography.fontSize + 2,
17
+ padding: "16px 0"
18
+ })), x = ({ showExcludeZeroDialog: e, excludeZero: t, changeExcludeZero: n, cancel: a }) => e && !t ? /* @__PURE__ */ p(r, {
19
+ open: e && !t,
20
+ changeExcludeZero: n,
21
+ cancel: a
22
+ }) : e && t ? /* @__PURE__ */ p(i, {
23
+ open: e && t,
24
+ changeExcludeZero: n,
25
+ cancel: a
26
+ }) : null;
27
+ x.propTypes = {
28
+ showExcludeZeroDialog: d.bool,
29
+ excludeZero: d.bool,
30
+ changeExcludeZero: d.func,
31
+ cancel: d.func
32
+ };
33
+ var S = class extends u.Component {
34
+ constructor(e) {
35
+ super(e), this.divRef = u.createRef(), this.updateDivWidth = this.updateDivWidth.bind(this);
36
+ }
37
+ state = {
38
+ showDecreaseMaxPointsDialog: !1,
39
+ showDeleteScaleDialog: !1,
40
+ showDeleteTraitDialog: !1,
41
+ showExcludeZeroDialog: !1,
42
+ showInfoDialog: !1,
43
+ infoDialogText: "",
44
+ adjustedWidth: y,
45
+ initialUpdateCompleted: !1
46
+ };
47
+ componentDidMount() {
48
+ window.addEventListener("resize", this.updateDivWidthDebounced), window.addEventListener("load", this.updateDivWidth), setTimeout(this.updateDivWidth, 0);
49
+ }
50
+ componentWillUnmount() {
51
+ window.removeEventListener("resize", this.updateDivWidthDebounced), window.removeEventListener("load", this.updateDivWidth);
52
+ }
53
+ componentDidUpdate() {
54
+ this.state.initialUpdateCompleted || (this.updateDivWidth(), this.setState({ initialUpdateCompleted: !0 }));
55
+ }
56
+ updateDivWidth() {
57
+ if (this.divRef && this.divRef.current) {
58
+ let e = this.divRef.current.offsetWidth;
59
+ e !== this.state.adjustedWidth && this.set({ adjustedWidth: e });
60
+ }
61
+ }
62
+ updateDivWidthDebounced = t(() => this.updateDivWidth(), 50);
63
+ onScaleAdded = () => {
64
+ let { model: e, onModelChanged: t, configuration: n } = this.props, { scales: r, excludeZero: i } = e || {}, { maxNoOfScales: a } = n || {}, { defaultTraitLabel: o } = n || "";
65
+ if (r.length || (r = []), o = typeof o == "string" ? o : r[0]?.traitLabel || "", r.length === a) return this.set({
66
+ infoDialogText: `There can't be more than ${a} scales.`,
67
+ showInfoDialog: !0
68
+ }), !1;
69
+ r.push({
70
+ maxPoints: 1,
71
+ scorePointsLabels: i ? [""] : ["", ""],
72
+ traitLabel: o,
73
+ traits: []
74
+ }), t({
75
+ ...e,
76
+ scales: r
77
+ });
78
+ };
79
+ onScaleChanged = (t, r) => {
80
+ let { model: i, onModelChanged: a } = this.props, c = e((i || {}).scales);
81
+ if (t < 0 || t >= c.length || n(r)) return !1;
82
+ Object.keys(r).forEach((e) => {
83
+ c[t][e] = r[e];
84
+ }), i.excludeZero && r.maxPoints === 1 && (i.excludeZero = !1, c = s(c, o.add0)), a({
85
+ ...i,
86
+ scales: c
87
+ });
88
+ };
89
+ onScaleRemoved = (e) => {
90
+ let { model: t, onModelChanged: n, configuration: r } = this.props, { scales: i } = t || {}, { minNoOfScales: a } = r || {};
91
+ if (e < 0 || e >= i.length) return !1;
92
+ if (i.length === a) return this.set({
93
+ infoDialogText: `There can't be less than ${a} scales.`,
94
+ showInfoDialog: !0
95
+ }), !1;
96
+ i = [...i.slice(0, e), ...i.slice(e + 1)], n({
97
+ ...t,
98
+ scales: i
99
+ });
100
+ };
101
+ onHalfScoringChanged = () => {
102
+ let { model: e, onModelChanged: t } = this.props, { halfScoring: n } = e || {};
103
+ t({
104
+ ...e,
105
+ halfScoring: !n
106
+ });
107
+ };
108
+ onVisibleToStudentChanged = () => {
109
+ let { model: e, onModelChanged: t } = this.props, { visibleToStudent: n } = e || {};
110
+ t({
111
+ ...e,
112
+ visibleToStudent: !n
113
+ });
114
+ };
115
+ set = (e) => this.setState(e);
116
+ changeShowScorePointLabels = () => {
117
+ let { model: e, onModelChanged: t } = this.props || {}, { pointLabels: n } = e || {};
118
+ n = !n, t({
119
+ ...e,
120
+ pointLabels: n
121
+ });
122
+ };
123
+ changeShowDescription = () => {
124
+ let { model: e, onModelChanged: t } = this.props || {}, { description: n } = e || {};
125
+ n = !n, t({
126
+ ...e,
127
+ description: n
128
+ });
129
+ };
130
+ changeShowStandards = () => {
131
+ let { model: e, onModelChanged: t } = this.props || {}, { standards: n } = e || {};
132
+ n = !n, t({
133
+ ...e,
134
+ standards: n
135
+ });
136
+ };
137
+ showToggleExcludeZeroModal = () => this.set({ showExcludeZeroDialog: !0 });
138
+ hideToggleExcludeZeroModal = () => {
139
+ this.set({ showExcludeZeroDialog: !1 });
140
+ };
141
+ onCloseInfoDialog = () => this.set({ showInfoDialog: !1 });
142
+ changeExcludeZero = (e) => {
143
+ let { model: t, onModelChanged: n } = this.props || {}, { scales: r } = t || {}, { excludeZero: i } = t || {};
144
+ if (!r || !r.length) return;
145
+ i = !i;
146
+ let a = s(r, e);
147
+ n({
148
+ ...t,
149
+ scales: a,
150
+ excludeZero: i
151
+ }), this.hideToggleExcludeZeroModal();
152
+ };
153
+ onModelChanged = (e, t) => {
154
+ let { onModelChanged: n } = this.props || {};
155
+ t === "excludeZero" ? this.showToggleExcludeZeroModal() : n(e);
156
+ };
157
+ render() {
158
+ let { model: e, configuration: t, onConfigurationChanged: n, uploadSoundSupport: r, imageSupport: i } = this.props || {}, { addScale: o, baseInputConfiguration: s = {}, dragAndDrop: u, contentDimensions: d = {}, showDescription: f, showExcludeZero: g, showLevelTagInput: y, showStandards: S, showHalfScoring: C, showMaxPoint: w, showScorePointLabels: T, showVisibleToStudent: E, spellCheck: D = {}, settingsPanelDisabled: O, maxNoOfTraits: k, minNoOfTraits: A, width: j, mathMlOptions: M = {}, maxMaxPoints: N, expandedInput: P = {}, labelInput: F = {} } = t || {}, { errors: I, extraCSSRules: L, scales: R, excludeZero: z, description: B, pointLabels: V, standards: H, spellCheckEnabled: U, maxPointsEnabled: W, addScaleEnabled: G } = e || {}, { showExcludeZeroDialog: K, showInfoDialog: q, infoDialogText: J, adjustedWidth: Y } = this.state || {}, X = R?.some((e) => e.maxPoints === 1), Z = {
159
+ standards: S.settings && v(S.label),
160
+ "showLevelTagInput.enabled": y.settings && v(y.label, !0),
161
+ visibleToStudent: E.settings && v(E.label),
162
+ excludeZero: g.settings && v(g.label, !1, X),
163
+ halfScoring: C.settings && v(C.label),
164
+ "dragAndDrop.enabled": u.settings && v(u.label, !0)
165
+ }, Q = {
166
+ description: f.settings && v(f.label),
167
+ pointLabels: T.settings && v(T.label),
168
+ spellCheckEnabled: D.settings && v(D.label),
169
+ maxPointsEnabled: w.settings && v(w.label),
170
+ addScaleEnabled: o.settings && v(o.label)
171
+ }, $ = (e) => Object.assign({ ...s }, e || {});
172
+ return /* @__PURE__ */ m(h.ConfigLayout, {
173
+ extraCSSRules: L,
174
+ dimensions: d,
175
+ hideSettings: O,
176
+ settings: /* @__PURE__ */ p(_, {
177
+ model: e,
178
+ onChangeModel: this.onModelChanged,
179
+ configuration: t,
180
+ onChangeConfiguration: n,
181
+ groups: {
182
+ Settings: Z,
183
+ Properties: Q
184
+ },
185
+ modal: /* @__PURE__ */ p(x, {
186
+ showExcludeZeroDialog: K,
187
+ excludeZero: z,
188
+ changeExcludeZero: this.changeExcludeZero,
189
+ cancel: this.hideToggleExcludeZeroModal
190
+ })
191
+ }),
192
+ children: [
193
+ /* @__PURE__ */ p("div", {
194
+ style: { width: "100%" },
195
+ ref: this.divRef
196
+ }),
197
+ /* @__PURE__ */ m(b, {
198
+ style: { width: j || Y },
199
+ children: [(R || []).map((e, t) => /* @__PURE__ */ p(l, {
200
+ scale: e,
201
+ scaleIndex: t,
202
+ errors: I,
203
+ onScaleRemoved: this.onScaleRemoved,
204
+ onScaleChanged: this.onScaleChanged,
205
+ showStandards: H,
206
+ showScorePointLabels: V,
207
+ showDescription: B,
208
+ showLevelTagInput: y.enabled,
209
+ excludeZero: z,
210
+ enableDragAndDrop: u.enabled,
211
+ spellCheck: U,
212
+ width: Y,
213
+ uploadSoundSupport: r,
214
+ maxPointsEnabled: W,
215
+ maxNoOfTraits: k,
216
+ minNoOfTraits: A,
217
+ imageSupport: i,
218
+ ...this.props,
219
+ mathMlOptions: M,
220
+ maxMaxPoints: N,
221
+ expandedPluginProps: $(P?.inputConfiguration),
222
+ labelPluginProps: $(F?.inputConfiguration)
223
+ }, `scale-${t}`)), G && /* @__PURE__ */ p(c, {
224
+ onClick: this.onScaleAdded,
225
+ children: "Add Scale"
226
+ })]
227
+ }),
228
+ /* @__PURE__ */ p(a, {
229
+ open: q,
230
+ text: J,
231
+ onClose: () => this.set({ showInfoDialog: !1 })
232
+ })
233
+ ]
234
+ });
235
+ }
236
+ };
237
+ S.propTypes = {
238
+ model: d.object,
239
+ uploadSoundSupport: d.object,
240
+ configuration: d.object,
241
+ onModelChanged: d.func,
242
+ onConfigurationChanged: d.func,
243
+ imageSupport: d.shape({
244
+ add: d.func.isRequired,
245
+ delete: d.func.isRequired
246
+ })
247
+ };
248
+ //#endregion
249
+ export { S as default };
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/multi-trait-rubric/configure/src/modals.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare const excludeZeroTypes: {
12
+ remove0: string;
13
+ add0: string;
14
+ shiftLeft: string;
15
+ shiftRight: string;
16
+ };
17
+ declare const ExcludeZeroDialog: {
18
+ ({ open, changeExcludeZero, cancel }: {
19
+ open: any;
20
+ changeExcludeZero: any;
21
+ cancel: any;
22
+ }): React.JSX.Element;
23
+ propTypes: {
24
+ open: PropTypes.Requireable<boolean>;
25
+ changeExcludeZero: PropTypes.Requireable<(...args: any[]) => any>;
26
+ cancel: PropTypes.Requireable<(...args: any[]) => any>;
27
+ };
28
+ };
29
+ declare const IncludeZeroDialog: {
30
+ ({ open, changeExcludeZero, cancel }: {
31
+ open: any;
32
+ changeExcludeZero: any;
33
+ cancel: any;
34
+ }): React.JSX.Element;
35
+ propTypes: {
36
+ open: PropTypes.Requireable<boolean>;
37
+ changeExcludeZero: PropTypes.Requireable<(...args: any[]) => any>;
38
+ cancel: PropTypes.Requireable<(...args: any[]) => any>;
39
+ };
40
+ };
41
+ declare const DecreaseMaxPoints: {
42
+ ({ open, deleteScorePoints, cancel }: {
43
+ open: any;
44
+ deleteScorePoints: any;
45
+ cancel: any;
46
+ }): React.JSX.Element;
47
+ propTypes: {
48
+ open: PropTypes.Requireable<boolean>;
49
+ deleteScorePoints: PropTypes.Requireable<(...args: any[]) => any>;
50
+ cancel: PropTypes.Requireable<(...args: any[]) => any>;
51
+ };
52
+ };
53
+ declare const DeleteScale: {
54
+ ({ open, scaleIndex, deleteScale, cancel }: {
55
+ open: any;
56
+ scaleIndex: any;
57
+ deleteScale: any;
58
+ cancel: any;
59
+ }): React.JSX.Element;
60
+ propTypes: {
61
+ open: PropTypes.Requireable<boolean>;
62
+ scaleIndex: PropTypes.Requireable<number>;
63
+ deleteScale: PropTypes.Requireable<(...args: any[]) => any>;
64
+ cancel: PropTypes.Requireable<(...args: any[]) => any>;
65
+ };
66
+ };
67
+ declare const DeleteTrait: {
68
+ ({ open, deleteTrait, cancel, traitLabel }: {
69
+ open: any;
70
+ deleteTrait: any;
71
+ cancel: any;
72
+ traitLabel: any;
73
+ }): React.JSX.Element;
74
+ propTypes: {
75
+ open: PropTypes.Requireable<boolean>;
76
+ deleteTrait: PropTypes.Requireable<(...args: any[]) => any>;
77
+ cancel: PropTypes.Requireable<(...args: any[]) => any>;
78
+ traitLabel: PropTypes.Requireable<string>;
79
+ };
80
+ };
81
+ declare const InfoDialog: {
82
+ ({ open, text, onClose }: {
83
+ open: any;
84
+ text: any;
85
+ onClose: any;
86
+ }): React.JSX.Element;
87
+ propTypes: {
88
+ open: PropTypes.Requireable<boolean>;
89
+ text: PropTypes.Requireable<string>;
90
+ cancel: PropTypes.Requireable<(...args: any[]) => any>;
91
+ onClose: PropTypes.Requireable<(...args: any[]) => any>;
92
+ };
93
+ };
94
+ export { ExcludeZeroDialog, IncludeZeroDialog, DecreaseMaxPoints, DeleteScale, DeleteTrait, InfoDialog };
@@ -0,0 +1,171 @@
1
+ import e from "./defaults.js";
2
+ import "react";
3
+ import t from "prop-types";
4
+ import { styled as n } from "@mui/material/styles";
5
+ import { color as r } from "@pie-lib/render-ui";
6
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
+ import o from "@mui/material/Dialog";
8
+ import s from "@mui/material/DialogTitle";
9
+ import c from "@mui/material/DialogActions";
10
+ import l from "@mui/material/DialogContent";
11
+ import u from "@mui/material/DialogContentText";
12
+ import d from "@mui/material/Button";
13
+ //#region src/author/modals.tsx
14
+ var { configuration: { excludeZeroDialogBoxContent: f, includeZeroDialogBoxContent: p, deleteScaleDialogBoxContent: m, maxPointsDialogBoxContent: h } } = e, g = {
15
+ remove0: "remove0",
16
+ add0: "add0",
17
+ shiftLeft: "shiftLeft",
18
+ shiftRight: "shiftRight"
19
+ }, _ = n(o)(({ theme: e }) => ({ "& .MuiPaper-root": { padding: e.spacing(2.5) } })), v = n(s)(({ theme: e }) => ({
20
+ padding: `0 0 ${e.spacing(2)} 0`,
21
+ "& h2": {
22
+ fontSize: "20px",
23
+ lineHeight: "23px",
24
+ fontFamily: "Cerebri Sans",
25
+ color: r.text()
26
+ }
27
+ })), y = n(l)(({ theme: e }) => ({
28
+ paddingLeft: "0",
29
+ "& p": {
30
+ fontSize: e.typography.fontSize + 2,
31
+ fontFamily: "Cerebri Sans",
32
+ color: r.text()
33
+ }
34
+ })), b = n(d)(({ theme: e }) => ({
35
+ padding: `${e.spacing(1.5)} ${e.spacing(2)}`,
36
+ borderRadius: "4px",
37
+ fontSize: e.typography.fontSize,
38
+ fontFamily: "Cerebri Sans",
39
+ lineHeight: "14px",
40
+ textTransform: "none",
41
+ background: r.primary(),
42
+ color: e.palette.common.white
43
+ })), x = n(b)({
44
+ background: r.secondaryBackground(),
45
+ color: r.text()
46
+ }), S = ({ open: e, changeExcludeZero: t, cancel: n }) => /* @__PURE__ */ a(_, {
47
+ open: e,
48
+ children: [
49
+ /* @__PURE__ */ i(v, { children: f.title }),
50
+ /* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: f.text } }) }) }),
51
+ /* @__PURE__ */ a(c, { children: [
52
+ /* @__PURE__ */ i(x, {
53
+ onClick: () => n(),
54
+ children: "Cancel"
55
+ }),
56
+ /* @__PURE__ */ i(b, {
57
+ onClick: () => t(g.shiftLeft),
58
+ children: "Shift to Left"
59
+ }),
60
+ /* @__PURE__ */ i(b, {
61
+ onClick: () => t(g.remove0),
62
+ children: "Remove 0 column"
63
+ })
64
+ ] })
65
+ ]
66
+ });
67
+ S.propTypes = {
68
+ open: t.bool,
69
+ changeExcludeZero: t.func,
70
+ cancel: t.func
71
+ };
72
+ var C = ({ open: e, changeExcludeZero: t, cancel: n }) => /* @__PURE__ */ a(_, {
73
+ open: e,
74
+ children: [
75
+ /* @__PURE__ */ i(v, { children: p.title }),
76
+ /* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: p.text } }) }) }),
77
+ /* @__PURE__ */ a(c, { children: [
78
+ /* @__PURE__ */ i(x, {
79
+ onClick: () => n(),
80
+ children: "Cancel"
81
+ }),
82
+ /* @__PURE__ */ i(b, {
83
+ onClick: () => t(g.shiftRight),
84
+ children: "Shift to Right"
85
+ }),
86
+ /* @__PURE__ */ i(b, {
87
+ onClick: () => t(g.add0),
88
+ children: "Add 0 column"
89
+ })
90
+ ] })
91
+ ]
92
+ });
93
+ C.propTypes = {
94
+ open: t.bool,
95
+ changeExcludeZero: t.func,
96
+ cancel: t.func
97
+ };
98
+ var w = ({ open: e, deleteScorePoints: t, cancel: n }) => /* @__PURE__ */ a(_, {
99
+ open: e,
100
+ children: [
101
+ /* @__PURE__ */ i(v, { children: h.title }),
102
+ /* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: h.text } }) }) }),
103
+ /* @__PURE__ */ a(c, { children: [/* @__PURE__ */ i(x, {
104
+ onClick: n,
105
+ children: "Cancel"
106
+ }), /* @__PURE__ */ i(b, {
107
+ onClick: t,
108
+ children: "Confirm"
109
+ })] })
110
+ ]
111
+ });
112
+ w.propTypes = {
113
+ open: t.bool,
114
+ deleteScorePoints: t.func,
115
+ cancel: t.func
116
+ };
117
+ var T = ({ open: e, scaleIndex: t, deleteScale: n, cancel: r }) => /* @__PURE__ */ a(_, {
118
+ open: e,
119
+ children: [
120
+ /* @__PURE__ */ i(v, { children: `${m.title} #${t + 1}` }),
121
+ /* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: m.text } }) }) }),
122
+ /* @__PURE__ */ a(c, { children: [/* @__PURE__ */ i(x, {
123
+ onClick: r,
124
+ children: "Cancel"
125
+ }), /* @__PURE__ */ i(b, {
126
+ onClick: n,
127
+ children: "Delete"
128
+ })] })
129
+ ]
130
+ });
131
+ T.propTypes = {
132
+ open: t.bool,
133
+ scaleIndex: t.number,
134
+ deleteScale: t.func,
135
+ cancel: t.func
136
+ };
137
+ var E = ({ open: e, deleteTrait: t, cancel: n, traitLabel: r }) => /* @__PURE__ */ a(_, {
138
+ open: e,
139
+ children: [
140
+ /* @__PURE__ */ a(v, { children: ["Delete ", r] }),
141
+ /* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: `Are you sure you want to delete this ${r}?` } }) }) }),
142
+ /* @__PURE__ */ a(c, { children: [/* @__PURE__ */ i(x, {
143
+ onClick: n,
144
+ children: "Cancel"
145
+ }), /* @__PURE__ */ i(b, {
146
+ onClick: t,
147
+ children: "Delete"
148
+ })] })
149
+ ]
150
+ });
151
+ E.propTypes = {
152
+ open: t.bool,
153
+ deleteTrait: t.func,
154
+ cancel: t.func,
155
+ traitLabel: t.string
156
+ };
157
+ var D = ({ open: e, text: t, onClose: n }) => /* @__PURE__ */ a(_, {
158
+ open: e,
159
+ children: [/* @__PURE__ */ i(v, { children: t }), /* @__PURE__ */ i(c, { children: /* @__PURE__ */ i(b, {
160
+ onClick: n,
161
+ children: "OK"
162
+ }) })]
163
+ });
164
+ D.propTypes = {
165
+ open: t.bool,
166
+ text: t.string,
167
+ cancel: t.func,
168
+ onClose: t.func
169
+ };
170
+ //#endregion
171
+ export { w as DecreaseMaxPoints, T as DeleteScale, E as DeleteTrait, S as ExcludeZeroDialog, C as IncludeZeroDialog, D as InfoDialog, g as excludeZeroTypes };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/multi-trait-rubric/configure/src/scale.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ export declare class Scale extends React.Component {
11
+ state: {
12
+ showDecreaseMaxPointsDialog: boolean;
13
+ showDeleteScaleDialog: boolean;
14
+ showDeleteTraitDialog: boolean;
15
+ currentPosition: number;
16
+ showRight: null;
17
+ showLeft: null;
18
+ showInfoDialog: boolean;
19
+ infoDialogText: string;
20
+ };
21
+ set: (newState: any) => void;
22
+ componentDidMount(): void;
23
+ componentDidUpdate(prevProps: any): void;
24
+ UNSAFE_componentWillReceiveProps(nextProps: any): void;
25
+ updateMaxPointsFieldValue: any;
26
+ showDecreaseMaxPointsModal: ({ newMaxPoints }: {
27
+ newMaxPoints: any;
28
+ }) => void;
29
+ hideDecreaseMaxPointsModal: () => void;
30
+ changeMaxPoints: any;
31
+ showDeleteScaleModal: () => void;
32
+ hideDeleteScaleModal: () => void;
33
+ deleteScale: any;
34
+ showDeleteTraitModal: (traitToDeleteIndex: any) => void;
35
+ hideDeleteTraitModal: () => void;
36
+ onTraitRemoved: any;
37
+ onTraitAdded: any;
38
+ onTraitChanged: any;
39
+ onTraitDropped: any;
40
+ decreasePosition: any;
41
+ getMaxScroll: any;
42
+ getNumberOfBlocks: any;
43
+ increasePosition: any;
44
+ render(): React.JSX.Element;
45
+ }
46
+ export default Scale;