@pie-element/match 12.1.2-next.0 → 12.1.2-next.2

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 (155) hide show
  1. package/dist/author/answer-config-block.js +33 -33
  2. package/dist/author/index.js +15 -17
  3. package/dist/browser/{Typography-CbSskKxx.js → Typography-DSiRJjOv.js} +337 -330
  4. package/dist/browser/Typography-DSiRJjOv.js.map +1 -0
  5. package/dist/browser/author/index.js +6460 -6944
  6. package/dist/browser/author/index.js.map +1 -1
  7. package/dist/browser/browser-kkT1XVKw.js +13 -4
  8. package/dist/browser/controller/index.js +1 -1
  9. package/dist/browser/controller/index.js.map +1 -1
  10. package/dist/browser/delivery/index.js +27 -27
  11. package/dist/browser/dist-i687VHmY.js +100 -0
  12. package/dist/browser/dist-i687VHmY.js.map +1 -0
  13. package/dist/controller/index.js +26 -28
  14. package/dist/index.iife.js +21 -21
  15. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
  16. package/dist/runtime-support.d.ts +12 -0
  17. package/dist/runtime-support.js +12 -0
  18. package/package.json +13 -10
  19. package/dist/browser/Typography-CbSskKxx.js.map +0 -1
  20. package/dist/browser/isEqual-xtQxYITi.js +0 -856
  21. package/dist/browser/isEqual-xtQxYITi.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/_SetCache.js +0 -11
  30. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  31. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  32. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  33. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  34. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  35. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  36. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  37. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
  38. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  39. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  40. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +0 -22
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js +0 -7
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
@@ -1,5 +1,5 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js";
2
- import { getPluginProps as t } from "./utils.js";
1
+ import { getPluginProps as e } from "./utils.js";
2
+ import t from "../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
3
3
  import n from "./add-row.js";
4
4
  import r from "./row.js";
5
5
  import * as i from "react";
@@ -7,12 +7,12 @@ import a from "prop-types";
7
7
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
8
  import c from "@mui/material/Typography";
9
9
  import { styled as l } from "@mui/material/styles";
10
- import u from "debug";
11
- import d, { DEFAULT_PLUGINS as f } from "@pie-lib/editable-html-tip-tap";
12
- import p from "classnames";
10
+ import { set as u } from "@pie-element/shared-lodash";
11
+ import d from "debug";
12
+ import f, { DEFAULT_PLUGINS as p } from "@pie-lib/editable-html-tip-tap";
13
13
  import { DragProvider as m } from "@pie-lib/drag";
14
14
  //#region src/author/answer-config-block.tsx
15
- var h = u("pie-elements:match:configure"), g = l("div")(({ theme: e }) => ({
15
+ var h = d("pie-elements:match:configure"), g = l("div")(({ theme: e }) => ({
16
16
  marginBottom: e.spacing(2.5),
17
17
  display: "flex",
18
18
  flexDirection: "column"
@@ -91,9 +91,9 @@ var h = u("pie-elements:match:configure"), g = l("div")(({ theme: e }) => ({
91
91
  h("update: ", u), o.rows = u, a(o);
92
92
  }
93
93
  };
94
- onChange = (t, n) => ({ target: r }) => {
95
- let { model: i, onChange: a } = this.props, o;
96
- o = n ? r.checked : r.value, e(i, t, o), a(i, t);
94
+ onChange = (e, t) => ({ target: n }) => {
95
+ let { model: r, onChange: i } = this.props, a;
96
+ a = t ? n.checked : n.value, u(r, e, a), i(r, e);
97
97
  };
98
98
  onHeaderChange = (e) => (t) => {
99
99
  let { model: n, onChange: r } = this.props, i = { ...n };
@@ -104,7 +104,7 @@ var h = u("pie-elements:match:configure"), g = l("div")(({ theme: e }) => ({
104
104
  i.headers[e] = t, r(i);
105
105
  };
106
106
  render() {
107
- let { model: e, onAddRow: i, imageSupport: a, configuration: l, toolbarOpts: u, spellCheck: h, uploadSoundSupport: w } = this.props, { baseInputConfiguration: T = {}, headers: E = {}, rows: D = {}, maxImageWidth: O = {}, maxImageHeight: k = {}, mathMlOptions: A = {}, minQuestions: j } = l || {}, { errors: M } = e || {}, { correctResponseError: N, rowsErrors: P, columnsErrors: F, noOfRowsError: I, columnsLengthError: L } = M || {}, R = (f || []).filter((e) => e !== "table" && e !== "bulleted-list" && e !== "numbered-list"), z = O && O.prompt, B = k && k.prompt;
107
+ let { model: i, onAddRow: a, imageSupport: l, configuration: u, toolbarOpts: d, spellCheck: h, uploadSoundSupport: w } = this.props, { baseInputConfiguration: T = {}, headers: E = {}, rows: D = {}, maxImageWidth: O = {}, maxImageHeight: k = {}, mathMlOptions: A = {}, minQuestions: j } = u || {}, { errors: M } = i || {}, { correctResponseError: N, rowsErrors: P, columnsErrors: F, noOfRowsError: I, columnsLengthError: L } = M || {}, R = (p || []).filter((e) => e !== "table" && e !== "bulleted-list" && e !== "numbered-list"), z = O && O.prompt, B = k && k.prompt;
108
108
  return /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(m, {
109
109
  onDragEnd: this.moveRow,
110
110
  children: /* @__PURE__ */ s(g, { children: [/* @__PURE__ */ o(c, {
@@ -112,14 +112,14 @@ var h = u("pie-elements:match:configure"), g = l("div")(({ theme: e }) => ({
112
112
  component: "div",
113
113
  children: "Click on the labels to edit or remove. Set the correct answers by clicking each correct answer per row."
114
114
  }), /* @__PURE__ */ s(b, {
115
- style: l.width ? {
116
- width: l.width,
115
+ style: u.width ? {
116
+ width: u.width,
117
117
  overflow: "scroll"
118
118
  } : {},
119
119
  children: [
120
- /* @__PURE__ */ s(_, { children: [E.settings && (e.headers || []).map((e, n) => /* @__PURE__ */ s(v, {
121
- className: p({ questionText: n === 0 }),
122
- sx: n === 0 ? {
120
+ /* @__PURE__ */ s(_, { children: [E.settings && (i.headers || []).map((n, r) => /* @__PURE__ */ s(v, {
121
+ className: t({ questionText: r === 0 }),
122
+ sx: r === 0 ? {
123
123
  flex: 2,
124
124
  display: "flex",
125
125
  justifyContent: "flex-start",
@@ -132,41 +132,41 @@ var h = u("pie-elements:match:configure"), g = l("div")(({ theme: e }) => ({
132
132
  minWidth: "200px"
133
133
  }
134
134
  } : {},
135
- children: [/* @__PURE__ */ o(d, {
136
- onChange: this.onHeaderChange(n),
137
- markup: e,
138
- className: F && !F[n] ? "marginBottom" : "headerInput",
135
+ children: [/* @__PURE__ */ o(f, {
136
+ onChange: this.onHeaderChange(r),
137
+ markup: n,
138
+ className: F && !F[r] ? "marginBottom" : "headerInput",
139
139
  label: "column label",
140
140
  activePlugins: R,
141
- pluginProps: t(E?.inputConfiguration, T),
141
+ pluginProps: e(E?.inputConfiguration, T),
142
142
  autoWidthToolbar: !0,
143
143
  spellCheck: h,
144
144
  uploadSoundSupport: w,
145
145
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
146
- error: F && F[n]
147
- }), F && F[n] && /* @__PURE__ */ o(x, { children: F[n] })]
148
- }, n)), /* @__PURE__ */ o(y, {})] }),
149
- e.rows.map((n, i) => /* @__PURE__ */ o(r, {
150
- model: e,
151
- row: n,
152
- idx: i,
146
+ error: F && F[r]
147
+ }), F && F[r] && /* @__PURE__ */ o(x, { children: F[r] })]
148
+ }, r)), /* @__PURE__ */ o(y, {})] }),
149
+ i.rows.map((t, n) => /* @__PURE__ */ o(r, {
150
+ model: i,
151
+ row: t,
152
+ idx: n,
153
153
  onDeleteRow: this.props.onDeleteRow,
154
154
  onChange: this.props.onChange,
155
- imageSupport: a,
156
- toolbarOpts: u,
155
+ imageSupport: l,
156
+ toolbarOpts: d,
157
157
  spellCheck: h,
158
- error: P?.[n.id],
158
+ error: P?.[t.id],
159
159
  maxImageWidth: O && O.rowTitles || z,
160
160
  maxImageHeight: k && k.rowTitles || B,
161
161
  uploadSoundSupport: w,
162
162
  mathMlOptions: A,
163
163
  minQuestions: j,
164
- inputConfiguration: t(D?.inputConfiguration, T)
165
- }, i)),
164
+ inputConfiguration: e(D?.inputConfiguration, T)
165
+ }, n)),
166
166
  N && /* @__PURE__ */ o(S, { children: N }),
167
167
  I && /* @__PURE__ */ o(S, { children: I }),
168
168
  L && /* @__PURE__ */ o(S, { children: L }),
169
- /* @__PURE__ */ o(n, { onAddClick: i })
169
+ /* @__PURE__ */ o(n, { onAddClick: a })
170
170
  ]
171
171
  })] })
172
172
  }) });
@@ -1,37 +1,35 @@
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/isEmpty.js";
3
- import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js";
4
- import r from "./configure.js";
5
- import i from "./defaults.js";
6
- import a from "react";
7
- import { createRoot as o } from "react-dom/client";
1
+ import e from "./configure.js";
2
+ import t from "./defaults.js";
3
+ import n from "react";
4
+ import { createRoot as r } from "react-dom/client";
5
+ import { cloneDeep as i, isEmpty as a, set as o } from "@pie-element/shared-lodash";
8
6
  import s from "debug";
9
7
  import { DeleteImageEvent as c, DeleteSoundEvent as l, InsertImageEvent as u, InsertSoundEvent as d, ModelUpdatedEvent as f } from "@pie-element/shared-configure-events";
10
8
  //#region src/author/index.ts
11
9
  var p = s("pie-elements:match:configure"), m = class s extends HTMLElement {
12
10
  static createDefaultModel = (e = {}) => ({
13
- ...i.model,
11
+ ...t.model,
14
12
  ...e
15
13
  });
16
14
  constructor() {
17
- super(), this._root = null, this._model = s.createDefaultModel(), this._configuration = i.configuration;
15
+ super(), this._root = null, this._model = s.createDefaultModel(), this._configuration = t.configuration;
18
16
  }
19
- set model(t) {
20
- this._model = s.createDefaultModel(t), this._modelCopy = e(this._model), this._render();
17
+ set model(e) {
18
+ this._model = s.createDefaultModel(e), this._modelCopy = i(this._model), this._render();
21
19
  }
22
20
  resetModelAfterConfigurationIsSet = () => {
23
21
  let e = document.querySelectorAll("pie-author");
24
22
  this.hasPlayerAsParent = Array.from(e).some((e) => e.contains(this)), this.hasPlayerAsParent && (this._modelCopy ? this._model = this._modelCopy : delete this._modelCopy);
25
23
  };
26
24
  set configuration(e) {
27
- let r = {
28
- ...i.configuration,
25
+ let n = {
26
+ ...t.configuration,
29
27
  ...e
30
28
  };
31
- this._configuration = r, this.resetModelAfterConfigurationIsSet(), r?.language?.enabled ? r?.languageChoices?.options?.length && (this._model.language = r?.languageChoices.options[0].value) : r.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
29
+ this._configuration = n, this.resetModelAfterConfigurationIsSet(), n?.language?.enabled ? n?.languageChoices?.options?.length && (this._model.language = n?.languageChoices.options[0].value) : n.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
32
30
  value: this._model.language,
33
31
  label: this._model.language
34
- })) : delete this._model.language, t(e?.rows?.inputConfiguration) && (n(this._configuration.rows, "inputConfiguration.image.disabled", !this._model?.enableImages), n(this._configuration.rows, "inputConfiguration.video.disabled", !0), n(this._configuration.rows, "inputConfiguration.audio.disabled", !0)), this._render();
32
+ })) : delete this._model.language, a(e?.rows?.inputConfiguration) && (o(this._configuration.rows, "inputConfiguration.image.disabled", !this._model?.enableImages), o(this._configuration.rows, "inputConfiguration.video.disabled", !0), o(this._configuration.rows, "inputConfiguration.audio.disabled", !0)), this._render();
35
33
  }
36
34
  onModelChanged(e) {
37
35
  this._model = e, p("[onModelChanged]: ", this._model), this._render(), this.dispatchEvent(new f(this._model));
@@ -53,7 +51,7 @@ var p = s("pie-elements:match:configure"), m = class s extends HTMLElement {
53
51
  }
54
52
  _render() {
55
53
  if (this._model) {
56
- let e = a.createElement(r, {
54
+ let t = n.createElement(e, {
57
55
  onModelChanged: this.onModelChanged.bind(this),
58
56
  onConfigurationChanged: this.onConfigurationChanged.bind(this),
59
57
  model: this._model,
@@ -67,7 +65,7 @@ var p = s("pie-elements:match:configure"), m = class s extends HTMLElement {
67
65
  delete: this.onDeleteSound.bind(this)
68
66
  }
69
67
  });
70
- this._root ||= o(this), this._root.render(e);
68
+ this._root ||= r(this), this._root.render(t);
71
69
  }
72
70
  }
73
71
  disconnectedCallback() {