@pie-element/multi-trait-rubric 8.1.2-next.0 → 8.1.2-next.10

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 (136) hide show
  1. package/dist/author/index.d.ts +1 -0
  2. package/dist/author/index.js +5 -2
  3. package/dist/author/main.d.ts +1 -1
  4. package/dist/author/main.js +63 -65
  5. package/dist/author/scale.js +2 -2
  6. package/dist/author/trait.js +81 -81
  7. package/dist/author/traitsHeader.js +1 -1
  8. package/dist/browser/{Typography-CdgSBeUZ.js → Typography-smriu_fg.js} +1819 -1792
  9. package/dist/browser/Typography-smriu_fg.js.map +1 -0
  10. package/dist/browser/author/index.js +29388 -27739
  11. package/dist/browser/author/index.js.map +1 -1
  12. package/dist/browser/controller/index.js.map +1 -1
  13. package/dist/browser/delivery/index.js +25 -7
  14. package/dist/browser/delivery/index.js.map +1 -1
  15. package/dist/delivery/index.d.ts +3 -0
  16. package/dist/delivery/index.js +24 -6
  17. package/dist/index.iife.js +31 -31
  18. package/dist/runtime-support.d.ts +12 -0
  19. package/dist/runtime-support.js +12 -0
  20. package/package.json +19 -16
  21. package/dist/browser/Typography-CdgSBeUZ.js.map +0 -1
  22. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  23. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  24. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  25. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  26. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  27. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  28. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  29. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  30. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  31. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  32. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  33. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  34. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  35. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  36. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  37. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  38. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  39. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  40. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +0 -8
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +0 -50
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +0 -7
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +0 -19
@@ -18,5 +18,6 @@ export default class MultiTraitRubricElement extends HTMLElement {
18
18
  insertImage(handler: any): void;
19
19
  onDeleteImage(src: any, done: any): void;
20
20
  _render(): void;
21
+ connectedCallback(): void;
21
22
  disconnectedCallback(): void;
22
23
  }
@@ -1,7 +1,7 @@
1
1
  import e from "./defaults.js";
2
2
  import { excludeZeroTypes as t } from "./modals.js";
3
3
  import { addOrRemoveScaleColumn as n } from "./utils.js";
4
- import r from "./main.js";
4
+ import { Main as r } from "./main.js";
5
5
  import i from "react";
6
6
  import { createRoot as a } from "react-dom/client";
7
7
  import { DeleteImageEvent as o, DeleteSoundEvent as s, InsertImageEvent as c, InsertSoundEvent as l, ModelUpdatedEvent as u } from "@pie-element/shared-configure-events";
@@ -81,8 +81,11 @@ var d = (t) => ({
81
81
  this._root ||= a(this), this._root.render(e);
82
82
  }
83
83
  }
84
+ connectedCallback() {
85
+ this._render();
86
+ }
84
87
  disconnectedCallback() {
85
- this._root && this._root.unmount();
88
+ this._root &&= (this._root.unmount(), null);
86
89
  }
87
90
  };
88
91
  //#endregion
@@ -23,7 +23,7 @@ export declare class Main extends React.Component {
23
23
  componentWillUnmount(): void;
24
24
  componentDidUpdate(): void;
25
25
  updateDivWidth(): void;
26
- updateDivWidthDebounced: any;
26
+ updateDivWidthDebounced: import("@pie-element/shared-lodash").CancelableFunction<() => void>;
27
27
  onScaleAdded: any;
28
28
  onScaleChanged: any;
29
29
  onScaleRemoved: any;
@@ -1,38 +1,36 @@
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";
1
+ import { ExcludeZeroDialog as e, IncludeZeroDialog as t, InfoDialog as n, excludeZeroTypes as r } from "./modals.js";
2
+ import { addOrRemoveScaleColumn as i } from "./utils.js";
3
+ import { MultiTraitButton as a } from "./common.js";
4
+ import { Scale as o } from "./scale.js";
5
+ import s from "react";
6
+ import c from "prop-types";
7
+ import { styled as l } from "@mui/material/styles";
8
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
+ import { cloneDeep as f, debounce as p, isEmpty as m } from "@pie-element/shared-lodash";
12
10
  import { layout as h, settings as g } from "@pie-lib/config-ui";
13
11
  //#region src/author/main.tsx
14
- var { Panel: _, toggle: v } = g, y = "650px", b = f("div")(({ theme: e }) => ({
12
+ var { Panel: _, toggle: v } = g, y = "650px", b = l("div")(({ theme: e }) => ({
15
13
  fontFamily: "Cerebri Sans",
16
14
  fontSize: e.typography.fontSize + 2,
17
15
  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,
16
+ })), x = ({ showExcludeZeroDialog: n, excludeZero: r, changeExcludeZero: i, cancel: a }) => n && !r ? /* @__PURE__ */ u(e, {
17
+ open: n && !r,
18
+ changeExcludeZero: i,
21
19
  cancel: a
22
- }) : e && t ? /* @__PURE__ */ p(i, {
23
- open: e && t,
24
- changeExcludeZero: n,
20
+ }) : n && r ? /* @__PURE__ */ u(t, {
21
+ open: n && r,
22
+ changeExcludeZero: i,
25
23
  cancel: a
26
24
  }) : null;
27
25
  x.propTypes = {
28
- showExcludeZeroDialog: d.bool,
29
- excludeZero: d.bool,
30
- changeExcludeZero: d.func,
31
- cancel: d.func
26
+ showExcludeZeroDialog: c.bool,
27
+ excludeZero: c.bool,
28
+ changeExcludeZero: c.func,
29
+ cancel: c.func
32
30
  };
33
- var S = class extends u.Component {
31
+ var S = class extends s.Component {
34
32
  constructor(e) {
35
- super(e), this.divRef = u.createRef(), this.updateDivWidth = this.updateDivWidth.bind(this);
33
+ super(e), this.divRef = s.createRef(), this.updateDivWidth = this.updateDivWidth.bind(this);
36
34
  }
37
35
  state = {
38
36
  showDecreaseMaxPointsDialog: !1,
@@ -59,7 +57,7 @@ var S = class extends u.Component {
59
57
  e !== this.state.adjustedWidth && this.set({ adjustedWidth: e });
60
58
  }
61
59
  }
62
- updateDivWidthDebounced = t(() => this.updateDivWidth(), 50);
60
+ updateDivWidthDebounced = p(() => this.updateDivWidth(), 50);
63
61
  onScaleAdded = () => {
64
62
  let { model: e, onModelChanged: t, configuration: n } = this.props, { scales: r, excludeZero: i } = e || {}, { maxNoOfScales: a } = n || {}, { defaultTraitLabel: o } = n || "";
65
63
  if (r.length || (r = []), o = typeof o == "string" ? o : r[0]?.traitLabel || "", r.length === a) return this.set({
@@ -76,14 +74,14 @@ var S = class extends u.Component {
76
74
  scales: r
77
75
  });
78
76
  };
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
77
+ onScaleChanged = (e, t) => {
78
+ let { model: n, onModelChanged: a } = this.props, o = f((n || {}).scales);
79
+ if (e < 0 || e >= o.length || m(t)) return !1;
80
+ Object.keys(t).forEach((n) => {
81
+ o[e][n] = t[n];
82
+ }), n.excludeZero && t.maxPoints === 1 && (n.excludeZero = !1, o = i(o, r.add0)), a({
83
+ ...n,
84
+ scales: o
87
85
  });
88
86
  };
89
87
  onScaleRemoved = (e) => {
@@ -140,14 +138,14 @@ var S = class extends u.Component {
140
138
  };
141
139
  onCloseInfoDialog = () => this.set({ showInfoDialog: !1 });
142
140
  changeExcludeZero = (e) => {
143
- let { model: t, onModelChanged: n } = this.props || {}, { scales: r } = t || {}, { excludeZero: i } = t || {};
141
+ let { model: t, onModelChanged: n } = this.props || {}, { scales: r } = t || {}, { excludeZero: a } = t || {};
144
142
  if (!r || !r.length) return;
145
- i = !i;
146
- let a = s(r, e);
143
+ a = !a;
144
+ let o = i(r, e);
147
145
  n({
148
146
  ...t,
149
- scales: a,
150
- excludeZero: i
147
+ scales: o,
148
+ excludeZero: a
151
149
  }), this.hideToggleExcludeZeroModal();
152
150
  };
153
151
  onModelChanged = (e, t) => {
@@ -155,34 +153,34 @@ var S = class extends u.Component {
155
153
  t === "excludeZero" ? this.showToggleExcludeZeroModal() : n(e);
156
154
  };
157
155
  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 = {
156
+ let { model: e, configuration: t, onConfigurationChanged: r, uploadSoundSupport: i, imageSupport: s } = this.props || {}, { addScale: c, baseInputConfiguration: l = {}, dragAndDrop: f, contentDimensions: p = {}, showDescription: m, 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
157
  standards: S.settings && v(S.label),
160
158
  "showLevelTagInput.enabled": y.settings && v(y.label, !0),
161
159
  visibleToStudent: E.settings && v(E.label),
162
160
  excludeZero: g.settings && v(g.label, !1, X),
163
161
  halfScoring: C.settings && v(C.label),
164
- "dragAndDrop.enabled": u.settings && v(u.label, !0)
162
+ "dragAndDrop.enabled": f.settings && v(f.label, !0)
165
163
  }, Q = {
166
- description: f.settings && v(f.label),
164
+ description: m.settings && v(m.label),
167
165
  pointLabels: T.settings && v(T.label),
168
166
  spellCheckEnabled: D.settings && v(D.label),
169
167
  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, {
168
+ addScaleEnabled: c.settings && v(c.label)
169
+ }, $ = (e) => Object.assign({ ...l }, e || {});
170
+ return /* @__PURE__ */ d(h.ConfigLayout, {
173
171
  extraCSSRules: L,
174
- dimensions: d,
172
+ dimensions: p,
175
173
  hideSettings: O,
176
- settings: /* @__PURE__ */ p(_, {
174
+ settings: /* @__PURE__ */ u(_, {
177
175
  model: e,
178
176
  onChangeModel: this.onModelChanged,
179
177
  configuration: t,
180
- onChangeConfiguration: n,
178
+ onChangeConfiguration: r,
181
179
  groups: {
182
180
  Settings: Z,
183
181
  Properties: Q
184
182
  },
185
- modal: /* @__PURE__ */ p(x, {
183
+ modal: /* @__PURE__ */ u(x, {
186
184
  showExcludeZeroDialog: K,
187
185
  excludeZero: z,
188
186
  changeExcludeZero: this.changeExcludeZero,
@@ -190,13 +188,13 @@ var S = class extends u.Component {
190
188
  })
191
189
  }),
192
190
  children: [
193
- /* @__PURE__ */ p("div", {
191
+ /* @__PURE__ */ u("div", {
194
192
  style: { width: "100%" },
195
193
  ref: this.divRef
196
194
  }),
197
- /* @__PURE__ */ m(b, {
195
+ /* @__PURE__ */ d(b, {
198
196
  style: { width: j || Y },
199
- children: [(R || []).map((e, t) => /* @__PURE__ */ p(l, {
197
+ children: [(R || []).map((e, t) => /* @__PURE__ */ u(o, {
200
198
  scale: e,
201
199
  scaleIndex: t,
202
200
  errors: I,
@@ -207,25 +205,25 @@ var S = class extends u.Component {
207
205
  showDescription: B,
208
206
  showLevelTagInput: y.enabled,
209
207
  excludeZero: z,
210
- enableDragAndDrop: u.enabled,
208
+ enableDragAndDrop: f.enabled,
211
209
  spellCheck: U,
212
210
  width: Y,
213
- uploadSoundSupport: r,
211
+ uploadSoundSupport: i,
214
212
  maxPointsEnabled: W,
215
213
  maxNoOfTraits: k,
216
214
  minNoOfTraits: A,
217
- imageSupport: i,
215
+ imageSupport: s,
218
216
  ...this.props,
219
217
  mathMlOptions: M,
220
218
  maxMaxPoints: N,
221
219
  expandedPluginProps: $(P?.inputConfiguration),
222
220
  labelPluginProps: $(F?.inputConfiguration)
223
- }, `scale-${t}`)), G && /* @__PURE__ */ p(c, {
221
+ }, `scale-${t}`)), G && /* @__PURE__ */ u(a, {
224
222
  onClick: this.onScaleAdded,
225
223
  children: "Add Scale"
226
224
  })]
227
225
  }),
228
- /* @__PURE__ */ p(a, {
226
+ /* @__PURE__ */ u(n, {
229
227
  open: q,
230
228
  text: J,
231
229
  onClose: () => this.set({ showInfoDialog: !1 })
@@ -235,15 +233,15 @@ var S = class extends u.Component {
235
233
  }
236
234
  };
237
235
  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
236
+ model: c.object,
237
+ uploadSoundSupport: c.object,
238
+ configuration: c.object,
239
+ onModelChanged: c.func,
240
+ onConfigurationChanged: c.func,
241
+ imageSupport: c.shape({
242
+ add: c.func.isRequired,
243
+ delete: c.func.isRequired
246
244
  })
247
245
  };
248
246
  //#endregion
249
- export { S as default };
247
+ export { S as Main, S as default };
@@ -1,6 +1,6 @@
1
1
  import { DecreaseMaxPoints as e, DeleteScale as t, DeleteTrait as n, InfoDialog as r } from "./modals.js";
2
2
  import { Arrow as i, MultiTraitButton as a } from "./common.js";
3
- import o from "./traitsHeader.js";
3
+ import { TraitsHeaderTile as o } from "./traitsHeader.js";
4
4
  import s from "./trait.js";
5
5
  import c from "react";
6
6
  import l from "prop-types";
@@ -277,4 +277,4 @@ v.propTypes = {
277
277
  labelPluginProps: l.object
278
278
  };
279
279
  //#endregion
280
- export { v as default };
280
+ export { v as Scale, v as default };
@@ -1,10 +1,10 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
2
- import { Block as t, ExpandedInput as n, PrimaryBlock as r, Row as i, SecondaryBlock as a, UnderlinedInput as o } from "./common.js";
3
- import s from "react";
4
- import c from "prop-types";
5
- import { styled as l } from "@mui/material/styles";
6
- import { InlineMenu as u, color as d } from "@pie-lib/render-ui";
7
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
1
+ import { Block as e, ExpandedInput as t, PrimaryBlock as n, Row as r, SecondaryBlock as i, UnderlinedInput as a } from "./common.js";
2
+ import o from "react";
3
+ import s from "prop-types";
4
+ import { styled as c } from "@mui/material/styles";
5
+ import { InlineMenu as l, color as u } from "@pie-lib/render-ui";
6
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
+ import { isEmpty as p } from "@pie-element/shared-lodash";
8
8
  import m from "@mui/material/IconButton";
9
9
  import h from "@mui/material/MenuItem";
10
10
  import g from "@mui/icons-material/MoreVert";
@@ -13,32 +13,32 @@ import { useDraggable as v, useDroppable as y } from "@dnd-kit/core";
13
13
  import b from "@mui/icons-material/DragIndicator";
14
14
  //#region src/author/trait.tsx
15
15
  _("@pie-element:placement-ordering:configure:trait-tile");
16
- var x = l(b)({ color: d.text() }), S = l(r)(({ theme: e }) => ({
16
+ var x = c(b)({ color: u.text() }), S = c(n)(({ theme: e }) => ({
17
17
  display: "flex",
18
18
  flexDirection: "column",
19
19
  justifyContent: "space-between",
20
20
  marginBottom: e.spacing(5),
21
21
  touchAction: "none"
22
- })), C = l("div")({
22
+ })), C = c("div")({
23
23
  display: "flex",
24
24
  alignItems: "center",
25
25
  width: "100%",
26
26
  cursor: "pointer"
27
- }), w = l(m)({ marginLeft: "auto" }), T = l("div")({
27
+ }), w = c(m)({ marginLeft: "auto" }), ee = c("div")({
28
28
  display: "flex",
29
29
  whiteSpace: "break-spaces"
30
- }), E = l("div")(({ theme: e }) => ({
30
+ }), T = c("div")(({ theme: e }) => ({
31
31
  fontSize: e.typography.fontSize - 2,
32
32
  color: e.palette.error.main,
33
33
  paddingBottom: e.spacing(1)
34
34
  }));
35
- function D({ error: r, trait: { name: c, standards: l, description: d, scorePointsDescriptors: m }, traitLabel: _, scorePointsValues: b, showStandards: D, showDescription: O, enableDragAndDrop: k, currentPosition: A, secondaryBlockWidth: j, spellCheck: M, maxPoints: ee, uploadSoundSupport: N, mathMlOptions: P = {}, expandedPluginProps: F = {}, labelPluginProps: I = {}, imageSupport: L = {}, index: R, onTraitChanged: z, onTraitRemoved: B, onTraitDropped: te }) {
36
- let [V, H] = s.useState(null), U = s.useRef(null), { attributes: W, listeners: G, setNodeRef: K, transform: q, isDragging: J } = v({
35
+ function E({ error: n, trait: { name: s, standards: c, description: u, scorePointsDescriptors: m }, traitLabel: _, scorePointsValues: b, showStandards: E, showDescription: D, enableDragAndDrop: O, currentPosition: k, secondaryBlockWidth: A, spellCheck: j, maxPoints: M, uploadSoundSupport: N, mathMlOptions: P = {}, expandedPluginProps: F = {}, labelPluginProps: I = {}, imageSupport: L = {}, index: R, onTraitChanged: z, onTraitRemoved: B, onTraitDropped: te }) {
36
+ let [V, H] = o.useState(null), U = o.useRef(null), { attributes: W, listeners: G, setNodeRef: K, transform: q, isDragging: J } = v({
37
37
  id: `trait-${R}`,
38
38
  data: {
39
39
  type: "trait",
40
40
  index: R,
41
- name: c
41
+ name: s
42
42
  }
43
43
  }), { setNodeRef: Y } = y({
44
44
  id: `trait-drop-${R}`,
@@ -47,16 +47,16 @@ function D({ error: r, trait: { name: c, standards: l, description: d, scorePoin
47
47
  index: R
48
48
  }
49
49
  });
50
- s.useLayoutEffect(() => {
51
- A !== void 0 && U.current && U.current.scrollTo({ left: A });
52
- }, [A]);
53
- let X = (t) => {
54
- e(t) || z({
55
- name: c,
56
- standards: l,
57
- description: d,
50
+ o.useLayoutEffect(() => {
51
+ k !== void 0 && U.current && U.current.scrollTo({ left: k });
52
+ }, [k]);
53
+ let X = (e) => {
54
+ p(e) || z({
55
+ name: s,
56
+ standards: c,
57
+ description: u,
58
58
  scorePointsDescriptors: m,
59
- ...t
59
+ ...e
60
60
  });
61
61
  }, Z = ({ descriptor: e, value: t }) => {
62
62
  if (t < 0 || t >= m.length) return;
@@ -65,29 +65,29 @@ function D({ error: r, trait: { name: c, standards: l, description: d, scorePoin
65
65
  }, Q = (e) => H(e.currentTarget), $ = () => H(null), ne = () => {
66
66
  B(), $();
67
67
  };
68
- return /* @__PURE__ */ f("div", {
68
+ return /* @__PURE__ */ d("div", {
69
69
  ref: Y,
70
70
  style: q ? {
71
71
  transform: `translate3d(${q.x}px, ${q.y}px, 0)`,
72
72
  opacity: J ? .5 : 1
73
73
  } : {},
74
- children: /* @__PURE__ */ p(i, { children: [/* @__PURE__ */ p(S, { children: [
75
- /* @__PURE__ */ p(C, { children: [
76
- k && /* @__PURE__ */ f("span", {
74
+ children: /* @__PURE__ */ f(r, { children: [/* @__PURE__ */ f(S, { children: [
75
+ /* @__PURE__ */ f(C, { children: [
76
+ O && /* @__PURE__ */ d("span", {
77
77
  ref: K,
78
78
  ...W,
79
79
  ...G,
80
- children: /* @__PURE__ */ f(x, {})
80
+ children: /* @__PURE__ */ d(x, {})
81
81
  }),
82
- /* @__PURE__ */ f(w, {
82
+ /* @__PURE__ */ d(w, {
83
83
  "aria-label": "more",
84
84
  "aria-controls": "long-menu",
85
85
  "aria-haspopup": "true",
86
86
  onClick: Q,
87
87
  size: "large",
88
- children: /* @__PURE__ */ f(g, {})
88
+ children: /* @__PURE__ */ d(g, {})
89
89
  }),
90
- /* @__PURE__ */ f(u, {
90
+ /* @__PURE__ */ d(l, {
91
91
  id: "long-menu",
92
92
  anchorEl: V,
93
93
  keepMounted: !0,
@@ -97,59 +97,59 @@ function D({ error: r, trait: { name: c, standards: l, description: d, scorePoin
97
97
  enter: 225,
98
98
  exit: 195
99
99
  },
100
- children: /* @__PURE__ */ f(h, {
100
+ children: /* @__PURE__ */ d(h, {
101
101
  onClick: ne,
102
- children: /* @__PURE__ */ f(T, { dangerouslySetInnerHTML: { __html: `Remove ${c || _}` } })
102
+ children: /* @__PURE__ */ d(ee, { dangerouslySetInnerHTML: { __html: `Remove ${s || _}` } })
103
103
  })
104
104
  })
105
105
  ] }),
106
- /* @__PURE__ */ f(o, {
107
- markup: c,
108
- error: r?.name || "",
106
+ /* @__PURE__ */ d(a, {
107
+ markup: s,
108
+ error: n?.name || "",
109
109
  onChange: (e) => X({ name: e }),
110
110
  pluginProps: I,
111
111
  placeholder: `Enter ${_}`,
112
- spellCheck: M,
112
+ spellCheck: j,
113
113
  uploadSoundSupport: N,
114
114
  mathMlOptions: P,
115
115
  imageSupport: L
116
116
  }),
117
- r && /* @__PURE__ */ f(E, { children: r.name || "" })
118
- ] }), /* @__PURE__ */ p(a, {
117
+ n && /* @__PURE__ */ d(T, { children: n.name || "" })
118
+ ] }), /* @__PURE__ */ f(i, {
119
119
  setRef: (e) => {
120
120
  U.current = e;
121
121
  },
122
- width: `${j}px`,
122
+ width: `${A}px`,
123
123
  children: [
124
- D && l && /* @__PURE__ */ f(t, { children: /* @__PURE__ */ f(n, {
124
+ E && c && /* @__PURE__ */ d(e, { children: /* @__PURE__ */ d(t, {
125
125
  placeholder: "Standards",
126
- markup: l.join(","),
126
+ markup: c.join(","),
127
127
  onChange: (e) => X({ standards: e.split(",") }),
128
128
  pluginProps: F,
129
- spellCheck: M,
129
+ spellCheck: j,
130
130
  uploadSoundSupport: N,
131
131
  mathMlOptions: P,
132
132
  imageSupport: L
133
133
  }) }),
134
- O && /* @__PURE__ */ p(t, { children: [/* @__PURE__ */ f(n, {
134
+ D && /* @__PURE__ */ f(e, { children: [/* @__PURE__ */ d(t, {
135
135
  placeholder: "Enter Description",
136
- markup: d,
137
- error: r?.description || "",
136
+ markup: u,
137
+ error: n?.description || "",
138
138
  onChange: (e) => X({ description: e }),
139
139
  pluginProps: F,
140
- spellCheck: M,
140
+ spellCheck: j,
141
141
  uploadSoundSupport: N,
142
142
  mathMlOptions: P,
143
143
  imageSupport: L
144
- }), r && /* @__PURE__ */ f(E, { children: r.description || "" })] }),
145
- (b || []).map((e, r) => {
146
- let i = j - 216 * r + A - 98, a = b.length - r - 1, o;
144
+ }), n && /* @__PURE__ */ d(T, { children: n.description || "" })] }),
145
+ (b || []).map((n, r) => {
146
+ let i = A - 216 * r + k - 98, a = b.length - r - 1, o;
147
147
  try {
148
148
  o = m[a] || "";
149
149
  } catch {
150
150
  o = "";
151
151
  }
152
- return /* @__PURE__ */ f(t, { children: /* @__PURE__ */ f(n, {
152
+ return /* @__PURE__ */ d(e, { children: /* @__PURE__ */ d(t, {
153
153
  placeholder: "Enter Descriptor",
154
154
  markup: o,
155
155
  onChange: (e) => Z({
@@ -157,8 +157,8 @@ function D({ error: r, trait: { name: c, standards: l, description: d, scorePoin
157
157
  value: a
158
158
  }),
159
159
  pluginProps: F,
160
- alignToRight: i < 296 && e < ee,
161
- spellCheck: M,
160
+ alignToRight: i < 296 && n < M,
161
+ spellCheck: j,
162
162
  uploadSoundSupport: N,
163
163
  mathMlOptions: P,
164
164
  imageSupport: L
@@ -168,35 +168,35 @@ function D({ error: r, trait: { name: c, standards: l, description: d, scorePoin
168
168
  })] })
169
169
  });
170
170
  }
171
- D.propTypes = {
172
- error: c.object,
173
- index: c.number.isRequired,
174
- onTraitChanged: c.func.isRequired,
175
- onTraitRemoved: c.func.isRequired,
176
- onTraitDropped: c.func,
177
- trait: c.shape({
178
- name: c.string,
179
- standards: c.arrayOf(c.string),
180
- scorePointsDescriptors: c.arrayOf(c.string),
181
- description: c.string
171
+ E.propTypes = {
172
+ error: s.object,
173
+ index: s.number.isRequired,
174
+ onTraitChanged: s.func.isRequired,
175
+ onTraitRemoved: s.func.isRequired,
176
+ onTraitDropped: s.func,
177
+ trait: s.shape({
178
+ name: s.string,
179
+ standards: s.arrayOf(s.string),
180
+ scorePointsDescriptors: s.arrayOf(s.string),
181
+ description: s.string
182
182
  }),
183
- traitLabel: c.string,
184
- scorePointsValues: c.arrayOf(c.number),
185
- showStandards: c.bool,
186
- showDescription: c.bool,
187
- maxPoints: c.number,
188
- enableDragAndDrop: c.bool,
189
- currentPosition: c.number,
190
- secondaryBlockWidth: c.number,
191
- spellCheck: c.bool,
192
- uploadSoundSupport: c.object,
193
- mathMlOptions: c.object,
194
- expandedPluginProps: c.object,
195
- labelPluginProps: c.object,
196
- imageSupport: c.shape({
197
- add: c.func.isRequired,
198
- delete: c.func.isRequired
183
+ traitLabel: s.string,
184
+ scorePointsValues: s.arrayOf(s.number),
185
+ showStandards: s.bool,
186
+ showDescription: s.bool,
187
+ maxPoints: s.number,
188
+ enableDragAndDrop: s.bool,
189
+ currentPosition: s.number,
190
+ secondaryBlockWidth: s.number,
191
+ spellCheck: s.bool,
192
+ uploadSoundSupport: s.object,
193
+ mathMlOptions: s.object,
194
+ expandedPluginProps: s.object,
195
+ labelPluginProps: s.object,
196
+ imageSupport: s.shape({
197
+ add: s.func.isRequired,
198
+ delete: s.func.isRequired
199
199
  })
200
200
  };
201
201
  //#endregion
202
- export { D as default };
202
+ export { E as default };
@@ -169,4 +169,4 @@ k.propTypes = {
169
169
  })
170
170
  };
171
171
  //#endregion
172
- export { k as default };
172
+ export { k as TraitsHeaderTile, k as default };