@pie-element/explicit-constructed-response 11.1.0-next.19 → 11.1.1-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 (280) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +4 -0
  2. package/dist/author/alternateResponses.d.ts +34 -0
  3. package/dist/author/alternateResponses.js +116 -0
  4. package/dist/author/alternateSection.d.ts +58 -0
  5. package/dist/author/alternateSection.js +215 -0
  6. package/dist/author/defaults.d.ts +186 -0
  7. package/dist/author/defaults.js +128 -0
  8. package/dist/author/ecr-toolbar.d.ts +41 -0
  9. package/dist/author/ecr-toolbar.js +100 -0
  10. package/dist/author/index.d.ts +42 -0
  11. package/dist/author/index.js +97 -0
  12. package/dist/author/main.d.ts +38 -0
  13. package/dist/author/main.js +294 -0
  14. package/dist/author/markupUtils.d.ts +14 -0
  15. package/dist/author/markupUtils.js +13 -0
  16. package/dist/author/utils.d.ts +9 -0
  17. package/dist/author/utils.js +7 -0
  18. package/dist/controller/defaults.d.ts +25 -0
  19. package/dist/controller/defaults.js +19 -0
  20. package/dist/controller/index.d.ts +64 -0
  21. package/dist/controller/index.js +142 -0
  22. package/dist/delivery/index.d.ts +20 -0
  23. package/dist/delivery/index.js +66 -0
  24. package/dist/delivery/main.d.ts +48 -0
  25. package/dist/delivery/main.js +117 -0
  26. package/dist/explicit-constructed-response.css +2 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.iife.d.ts +8 -0
  29. package/dist/index.iife.js +394 -0
  30. package/dist/index.js +2 -0
  31. package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +3993 -0
  32. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  33. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  34. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  35. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  36. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  37. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  38. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  39. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
  40. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +8 -0
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +6 -0
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +11 -0
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +13 -0
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +8 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGt.js +6 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -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/_baseIsMatch.js +26 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +11 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePick.js +10 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +13 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +8 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +8 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +12 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +19 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_escapeHtmlChar.js +11 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.js +9 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +16 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +10 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +9 -0
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +6 -0
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +13 -0
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatten.js +7 -0
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +10 -0
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js +9 -0
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js +8 -0
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +12 -0
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  220. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/throttle.js +15 -0
  221. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +8 -0
  222. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +8 -0
  223. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
  224. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
  225. package/dist/print/index.d.ts +15 -0
  226. package/dist/print/index.js +40 -0
  227. package/package.json +62 -25
  228. package/CHANGELOG.json +0 -1102
  229. package/CHANGELOG.md +0 -2175
  230. package/LICENSE.md +0 -5
  231. package/README.md +0 -1
  232. package/configure/CHANGELOG.json +0 -652
  233. package/configure/CHANGELOG.md +0 -1917
  234. package/configure/lib/alternateResponses.js +0 -199
  235. package/configure/lib/alternateResponses.js.map +0 -1
  236. package/configure/lib/alternateSection.js +0 -329
  237. package/configure/lib/alternateSection.js.map +0 -1
  238. package/configure/lib/defaults.js +0 -184
  239. package/configure/lib/defaults.js.map +0 -1
  240. package/configure/lib/ecr-toolbar.js +0 -181
  241. package/configure/lib/ecr-toolbar.js.map +0 -1
  242. package/configure/lib/index.js +0 -161
  243. package/configure/lib/index.js.map +0 -1
  244. package/configure/lib/main.js +0 -514
  245. package/configure/lib/main.js.map +0 -1
  246. package/configure/lib/markupUtils.js +0 -70
  247. package/configure/lib/markupUtils.js.map +0 -1
  248. package/configure/lib/utils.js +0 -15
  249. package/configure/lib/utils.js.map +0 -1
  250. package/configure/package.json +0 -22
  251. package/controller/CHANGELOG.json +0 -517
  252. package/controller/CHANGELOG.md +0 -1333
  253. package/controller/lib/defaults.js +0 -23
  254. package/controller/lib/defaults.js.map +0 -1
  255. package/controller/lib/index.js +0 -368
  256. package/controller/lib/index.js.map +0 -1
  257. package/controller/package.json +0 -18
  258. package/docs/config-schema.json +0 -2629
  259. package/docs/config-schema.json.md +0 -1941
  260. package/docs/demo/config.js +0 -8
  261. package/docs/demo/generate.js +0 -20
  262. package/docs/demo/index.html +0 -1
  263. package/docs/demo/session.js +0 -10
  264. package/docs/pie-schema.json +0 -1130
  265. package/docs/pie-schema.json.md +0 -814
  266. package/lib/index.js +0 -91
  267. package/lib/index.js.map +0 -1
  268. package/lib/main.js +0 -205
  269. package/lib/main.js.map +0 -1
  270. package/lib/print.js +0 -71
  271. package/lib/print.js.map +0 -1
  272. package/module/configure.js +0 -1
  273. package/module/controller.js +0 -6534
  274. package/module/demo.js +0 -45
  275. package/module/element.js +0 -1
  276. package/module/index.html +0 -21
  277. package/module/manifest.json +0 -18
  278. package/module/print-demo.js +0 -83
  279. package/module/print.html +0 -18
  280. package/module/print.js +0 -1
@@ -1,199 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.AlternateResponses = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
- var _lodashEs = require("lodash-es");
12
- var _alternateSection = _interopRequireDefault(require("./alternateSection"));
13
- class AlternateResponses extends _react.default.Component {
14
- constructor(...args) {
15
- super(...args);
16
- (0, _defineProperty2.default)(this, "state", {
17
- maxLengthPerChoice: (0, _lodashEs.cloneDeep)(this.props.model.maxLengthPerChoice)
18
- });
19
- (0, _defineProperty2.default)(this, "updateChoicesIfNeeded", props => {
20
- if (!this.state.choices || !(0, _lodashEs.isEqual)(this.state.choices, props.model.choices) || !(0, _lodashEs.isEqual)(props.model.choices, this.props.model.choices) || this.state.values && Object.keys(this.state.values).length !== Object.keys(this.props.model.choices).length || props.maxLengthPerChoiceEnabled !== this.props.maxLengthPerChoiceEnabled) {
21
- const {
22
- choices,
23
- maxLengthPerChoice
24
- } = props.model;
25
- const selectedValues = (0, _lodashEs.reduce)(choices, (obj, c, key) => {
26
- // if maxLengthPerChoiceEnabled is true, we display all the choices
27
- if (c && (props.maxLengthPerChoiceEnabled || c.length > 1)) {
28
- obj[key] = c[0];
29
- }
30
- return obj;
31
- }, {});
32
- this.setState({
33
- choices: props.model.choices,
34
- values: selectedValues,
35
- maxLengthPerChoice: (0, _lodashEs.cloneDeep)(maxLengthPerChoice)
36
- });
37
- }
38
- });
39
- (0, _defineProperty2.default)(this, "getRemainingChoices", valueKey => {
40
- const {
41
- choices
42
- } = this.state;
43
- return (0, _lodashEs.reduce)(choices, (arr, c, key) => {
44
- if (c && c.length === 1 && !valueKey) {
45
- arr.push({
46
- label: c[0].label,
47
- value: key
48
- });
49
- }
50
- return arr;
51
- }, []);
52
- });
53
- (0, _defineProperty2.default)(this, "onChoiceChanged", (choice, key) => {
54
- const {
55
- onChange
56
- } = this.props;
57
- const {
58
- choices
59
- } = this.state;
60
- const sectionChoices = choices[key] || [];
61
- const isNew = !sectionChoices.find(c => c.value === choice.value);
62
- const newChoices = sectionChoices.reduce((arr, c) => {
63
- const newVal = c.value === choice.value ? choice : c;
64
- arr.push(newVal);
65
- return arr;
66
- }, []);
67
- if (isNew) {
68
- newChoices.push(choice);
69
- }
70
- onChange({
71
- ...choices,
72
- [key]: newChoices
73
- });
74
- });
75
- (0, _defineProperty2.default)(this, "onChoiceRemoved", (value, section) => {
76
- const {
77
- onChange
78
- } = this.props;
79
- const {
80
- choices
81
- } = this.state;
82
- const sectionChoices = choices[section] || [];
83
- const newChoices = sectionChoices.reduce((arr, c) => {
84
- if (c.value === value) {
85
- return arr;
86
- }
87
- arr.push(c);
88
- return arr;
89
- }, []);
90
- onChange({
91
- ...choices,
92
- [section]: newChoices
93
- });
94
- });
95
- (0, _defineProperty2.default)(this, "onSectionSelect", (choice, key) => {
96
- const {
97
- onChange
98
- } = this.props;
99
- const {
100
- choices,
101
- values
102
- } = this.state;
103
- if (choices[key] && choices[key].length > 1) {
104
- if (!choice) {
105
- onChange({
106
- ...choices,
107
- [key]: [choices[key][0]]
108
- });
109
- }
110
- } else {
111
- this.setState({
112
- choices: {
113
- ...choices,
114
- [key]: [...choices[key], {
115
- label: '',
116
- value: '1'
117
- }]
118
- },
119
- values: {
120
- ...values,
121
- [key]: choices[key][0]
122
- }
123
- });
124
- }
125
- });
126
- (0, _defineProperty2.default)(this, "onLengthChanged", (value, key) => {
127
- const {
128
- model,
129
- onLengthChange
130
- } = this.props;
131
- const {
132
- maxLengthPerChoice
133
- } = model;
134
- maxLengthPerChoice[key] = value;
135
- onLengthChange(maxLengthPerChoice);
136
- });
137
- }
138
- UNSAFE_componentWillReceiveProps(nextProps) {
139
- this.updateChoicesIfNeeded(nextProps);
140
- }
141
- componentDidMount() {
142
- this.updateChoicesIfNeeded(this.props);
143
- }
144
- render() {
145
- const {
146
- choices
147
- } = this.state;
148
- const {
149
- model: {
150
- maxLengthPerChoice,
151
- maxLengthPerChoiceEnabled
152
- },
153
- spellCheck,
154
- choicesErrors,
155
- pluginProps
156
- } = this.props;
157
- return /*#__PURE__*/_react.default.createElement("div", null, (0, _lodashEs.map)(choices, (c, key) => {
158
- // if maxLengthPerChoiceEnabled is true, we display all the choices
159
- if (c && (maxLengthPerChoiceEnabled || c.length > 1)) {
160
- const selected = this.state.values[key];
161
- return /*#__PURE__*/_react.default.createElement(_alternateSection.default, {
162
- key: key,
163
- value: selected && selected.value,
164
- errors: choicesErrors && choicesErrors[key],
165
- onSelect: choice => this.onSectionSelect(choice, key),
166
- choiceChanged: choice => this.onChoiceChanged(choice, key),
167
- choiceRemoved: value => this.onChoiceRemoved(value, key),
168
- lengthChanged: value => this.onLengthChanged(value, key),
169
- selectChoices: [selected],
170
- choices: c,
171
- maxLength: maxLengthPerChoice[key],
172
- showMaxLength: maxLengthPerChoiceEnabled,
173
- spellCheck: spellCheck,
174
- pluginProps: pluginProps
175
- });
176
- }
177
- }), choices && Object.keys(this.state.values).length !== Object.keys(choices).length && /*#__PURE__*/_react.default.createElement(_alternateSection.default, {
178
- value: "",
179
- onSelect: choice => this.onSectionSelect(choice, choice.value),
180
- choiceChanged: choice => this.onChoiceChanged(choice),
181
- choiceRemoved: value => this.onChoiceRemoved(value),
182
- selectChoices: this.getRemainingChoices(),
183
- spellCheck: spellCheck,
184
- pluginProps: pluginProps
185
- }));
186
- }
187
- }
188
- exports.AlternateResponses = AlternateResponses;
189
- (0, _defineProperty2.default)(AlternateResponses, "propTypes", {
190
- choicesErrors: _propTypes.default.object,
191
- model: _propTypes.default.object.isRequired,
192
- onChange: _propTypes.default.func.isRequired,
193
- onLengthChange: _propTypes.default.func.isRequired,
194
- maxLengthPerChoiceEnabled: _propTypes.default.bool.isRequired,
195
- spellCheck: _propTypes.default.bool,
196
- pluginProps: _propTypes.default.object
197
- });
198
- var _default = exports.default = AlternateResponses;
199
- //# sourceMappingURL=alternateResponses.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alternateResponses.js","names":["_react","_interopRequireDefault","require","_propTypes","_lodashEs","_alternateSection","AlternateResponses","React","Component","constructor","args","_defineProperty2","default","maxLengthPerChoice","cloneDeep","props","model","state","choices","isEqual","values","Object","keys","length","maxLengthPerChoiceEnabled","selectedValues","reduce","obj","c","key","setState","valueKey","arr","push","label","value","choice","onChange","sectionChoices","isNew","find","newChoices","newVal","section","onLengthChange","UNSAFE_componentWillReceiveProps","nextProps","updateChoicesIfNeeded","componentDidMount","render","spellCheck","choicesErrors","pluginProps","createElement","map","selected","errors","onSelect","onSectionSelect","choiceChanged","onChoiceChanged","choiceRemoved","onChoiceRemoved","lengthChanged","onLengthChanged","selectChoices","maxLength","showMaxLength","getRemainingChoices","exports","PropTypes","object","isRequired","func","bool","_default"],"sources":["../src/alternateResponses.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { cloneDeep, isEqual, map, reduce } from 'lodash-es';\n\nimport AlternateSection from './alternateSection';\n\nexport class AlternateResponses extends React.Component {\n static propTypes = {\n choicesErrors: PropTypes.object,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n onLengthChange: PropTypes.func.isRequired,\n maxLengthPerChoiceEnabled: PropTypes.bool.isRequired,\n spellCheck: PropTypes.bool,\n pluginProps: PropTypes.object,\n };\n\n state = { maxLengthPerChoice: cloneDeep(this.props.model.maxLengthPerChoice) };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n this.updateChoicesIfNeeded(nextProps);\n }\n\n componentDidMount() {\n this.updateChoicesIfNeeded(this.props);\n }\n\n updateChoicesIfNeeded = (props) => {\n if (\n !this.state.choices ||\n !isEqual(this.state.choices, props.model.choices) ||\n !isEqual(props.model.choices, this.props.model.choices) ||\n (this.state.values && Object.keys(this.state.values).length !== Object.keys(this.props.model.choices).length) ||\n props.maxLengthPerChoiceEnabled !== this.props.maxLengthPerChoiceEnabled\n ) {\n const { choices, maxLengthPerChoice } = props.model;\n\n const selectedValues = reduce(\n choices,\n (obj, c, key) => {\n // if maxLengthPerChoiceEnabled is true, we display all the choices\n if (c && (props.maxLengthPerChoiceEnabled || c.length > 1)) {\n obj[key] = c[0];\n }\n\n return obj;\n },\n {},\n );\n\n this.setState({\n choices: props.model.choices,\n values: selectedValues,\n maxLengthPerChoice: cloneDeep(maxLengthPerChoice),\n });\n }\n };\n\n getRemainingChoices = (valueKey) => {\n const { choices } = this.state;\n\n return reduce(\n choices,\n (arr, c, key) => {\n if (c && c.length === 1 && !valueKey) {\n arr.push({\n label: c[0].label,\n value: key,\n });\n }\n\n return arr;\n },\n [],\n );\n };\n\n onChoiceChanged = (choice, key) => {\n const { onChange } = this.props;\n const { choices } = this.state;\n const sectionChoices = choices[key] || [];\n\n const isNew = !sectionChoices.find((c) => c.value === choice.value);\n\n const newChoices = sectionChoices.reduce((arr, c) => {\n const newVal = c.value === choice.value ? choice : c;\n\n arr.push(newVal);\n\n return arr;\n }, []);\n\n if (isNew) {\n newChoices.push(choice);\n }\n\n onChange({\n ...choices,\n [key]: newChoices,\n });\n };\n\n onChoiceRemoved = (value, section) => {\n const { onChange } = this.props;\n const { choices } = this.state;\n const sectionChoices = choices[section] || [];\n\n const newChoices = sectionChoices.reduce((arr, c) => {\n if (c.value === value) {\n return arr;\n }\n\n arr.push(c);\n\n return arr;\n }, []);\n\n onChange({\n ...choices,\n [section]: newChoices,\n });\n };\n\n onSectionSelect = (choice, key) => {\n const { onChange } = this.props;\n const { choices, values } = this.state;\n\n if (choices[key] && choices[key].length > 1) {\n if (!choice) {\n onChange({\n ...choices,\n [key]: [choices[key][0]],\n });\n }\n } else {\n this.setState({\n choices: {\n ...choices,\n [key]: [\n ...choices[key],\n {\n label: '',\n value: '1',\n },\n ],\n },\n values: {\n ...values,\n [key]: choices[key][0],\n },\n });\n }\n };\n\n onLengthChanged = (value, key) => {\n const { model, onLengthChange } = this.props;\n const { maxLengthPerChoice } = model;\n\n maxLengthPerChoice[key] = value;\n onLengthChange(maxLengthPerChoice);\n };\n\n render() {\n const { choices } = this.state;\n const {\n model: { maxLengthPerChoice, maxLengthPerChoiceEnabled },\n spellCheck,\n choicesErrors,\n pluginProps,\n } = this.props;\n\n return (\n <div>\n {map(choices, (c, key) => {\n // if maxLengthPerChoiceEnabled is true, we display all the choices\n if (c && (maxLengthPerChoiceEnabled || c.length > 1)) {\n const selected = this.state.values[key];\n\n return (\n <AlternateSection\n key={key}\n value={selected && selected.value}\n errors={choicesErrors && choicesErrors[key]}\n onSelect={(choice) => this.onSectionSelect(choice, key)}\n choiceChanged={(choice) => this.onChoiceChanged(choice, key)}\n choiceRemoved={(value) => this.onChoiceRemoved(value, key)}\n lengthChanged={(value) => this.onLengthChanged(value, key)}\n selectChoices={[selected]}\n choices={c}\n maxLength={maxLengthPerChoice[key]}\n showMaxLength={maxLengthPerChoiceEnabled}\n spellCheck={spellCheck}\n pluginProps={pluginProps}\n />\n );\n }\n })}\n\n {choices && Object.keys(this.state.values).length !== Object.keys(choices).length && (\n <AlternateSection\n value=\"\"\n onSelect={(choice) => this.onSectionSelect(choice, choice.value)}\n choiceChanged={(choice) => this.onChoiceChanged(choice)}\n choiceRemoved={(value) => this.onChoiceRemoved(value)}\n selectChoices={this.getRemainingChoices()}\n spellCheck={spellCheck}\n pluginProps={pluginProps}\n />\n )}\n </div>\n );\n }\n}\n\nexport default AlternateResponses;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA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AAAO,OAAgB;MACfuB,KAAK,EAAC,EAAE;MACRsB,QAAQ,EAAGrB,MAAM,IAAK,IAAI,CAACsB,eAAe,CAACtB,MAAM,EAAEA,MAAM,CAACD,KAAK,CAAE;MACjEwB,aAAa,EAAGvB,MAAM,IAAK,IAAI,CAACwB,eAAe,CAACxB,MAAM,CAAE;MACxDyB,aAAa,EAAG1B,KAAK,IAAK,IAAI,CAAC2B,eAAe,CAAC3B,KAAK,CAAE;MACtD8B,aAAa,EAAE,IAAI,CAACG,mBAAmB,CAAC,CAAE;MAC1ClB,UAAU,EAAEA,UAAW;MACvBE,WAAW,EAAEA;IAAY,CAC1B,CAEA,CAAC;EAEV;AACF;AAACiB,OAAA,CAAA/D,kBAAA,GAAAA,kBAAA;AAAA,IAAAK,gBAAA,CAAAC,OAAA,EA9MYN,kBAAkB,eACV;EACjB6C,aAAa,EAAEmB,kBAAS,CAACC,MAAM;EAC/BvD,KAAK,EAAEsD,kBAAS,CAACC,MAAM,CAACC,UAAU;EAClCnC,QAAQ,EAAEiC,kBAAS,CAACG,IAAI,CAACD,UAAU;EACnC5B,cAAc,EAAE0B,kBAAS,CAACG,IAAI,CAACD,UAAU;EACzChD,yBAAyB,EAAE8C,kBAAS,CAACI,IAAI,CAACF,UAAU;EACpDtB,UAAU,EAAEoB,kBAAS,CAACI,IAAI;EAC1BtB,WAAW,EAAEkB,kBAAS,CAACC;AACzB,CAAC;AAAA,IAAAI,QAAA,GAAAN,OAAA,CAAAzD,OAAA,GAuMYN,kBAAkB","ignoreList":[]}
@@ -1,329 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.Choice = exports.AlternateSection = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _react = _interopRequireDefault(require("react"));
11
- var _propTypes = _interopRequireDefault(require("prop-types"));
12
- var _lodashEs = require("lodash-es");
13
- var _Button = _interopRequireDefault(require("@mui/material/Button"));
14
- var _Delete = _interopRequireDefault(require("@mui/icons-material/Delete"));
15
- var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
16
- var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
17
- var _Select = _interopRequireDefault(require("@mui/material/Select"));
18
- var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
19
- var _styles = require("@mui/material/styles");
20
- var _editableHtmlTipTap = _interopRequireDefault(require("@pie-lib/editable-html-tip-tap"));
21
- var _markupUtils = require("./markupUtils");
22
- const DesignContainer = (0, _styles.styled)('div')(({
23
- theme
24
- }) => ({
25
- marginBottom: theme.spacing(0.5)
26
- }));
27
- const AltChoices = (0, _styles.styled)('div')(({
28
- theme
29
- }) => ({
30
- alignItems: 'flex-start',
31
- flexDirection: 'column',
32
- display: 'flex',
33
- paddingTop: theme.spacing(2.5),
34
- '& > *': {
35
- marginBottom: theme.spacing(2.5),
36
- width: '100%'
37
- }
38
- }));
39
- const StyledEditableHtml = (0, _styles.styled)(_editableHtmlTipTap.default)(({
40
- theme,
41
- hasError
42
- }) => ({
43
- flex: '1',
44
- marginRight: theme.spacing(2.5),
45
- ...(hasError && {
46
- border: `2px solid ${theme.palette.error.main}`,
47
- borderRadius: '6px'
48
- })
49
- }));
50
- const StyledDeleteButton = (0, _styles.styled)(_IconButton.default)(({
51
- theme
52
- }) => ({
53
- '& svg': {
54
- fill: theme.palette.grey[600]
55
- }
56
- }));
57
- const SelectContainer = (0, _styles.styled)('div')({
58
- alignItems: 'flex-end',
59
- display: 'flex',
60
- justifyContent: 'space-between',
61
- width: '100%'
62
- });
63
- const RightContainer = (0, _styles.styled)('div')({
64
- alignItems: 'center',
65
- display: 'flex'
66
- });
67
- const LengthField = (0, _styles.styled)(_TextField.default)(({
68
- theme
69
- }) => ({
70
- width: '230px',
71
- marginRight: theme.spacing(2.5),
72
- '& .MuiInput-underline:before': {
73
- borderBottomColor: theme.palette.divider
74
- },
75
- '& .MuiInput-underline:hover:not(.Mui-disabled):before': {
76
- borderBottomColor: theme.palette.text.primary
77
- },
78
- '& .MuiInput-underline:after': {
79
- borderBottomColor: theme.palette.primary.main
80
- }
81
- }));
82
- const ErrorText = (0, _styles.styled)('div')(({
83
- theme
84
- }) => ({
85
- fontSize: theme.typography.fontSize - 2,
86
- color: theme.palette.error.main,
87
- paddingTop: theme.spacing(0.5)
88
- }));
89
- const ChoiceWrapper = (0, _styles.styled)('div')({
90
- alignItems: 'center',
91
- display: 'flex',
92
- justifyContent: 'space-between'
93
- });
94
- class Choice extends _react.default.Component {
95
- constructor(...args) {
96
- super(...args);
97
- (0, _defineProperty2.default)(this, "state", {
98
- value: this.props.markup
99
- });
100
- (0, _defineProperty2.default)(this, "updateText", (0, _lodashEs.debounce)(this.props.onChange, 300));
101
- (0, _defineProperty2.default)(this, "onChange", e => {
102
- const strippedValue = (0, _markupUtils.stripHtmlTags)(e);
103
- this.setState({
104
- value: strippedValue
105
- });
106
- this.updateText(strippedValue);
107
- });
108
- (0, _defineProperty2.default)(this, "onKeyDown", event => {
109
- if (event.key === 'Enter') {
110
- return true;
111
- }
112
- });
113
- }
114
- UNSAFE_componentWillReceiveProps(nextProps) {
115
- if (nextProps.markup) {
116
- this.setState({
117
- value: nextProps.markup
118
- });
119
- }
120
- }
121
- render() {
122
- const {
123
- value
124
- } = this.state;
125
- const {
126
- onDelete,
127
- spellCheck,
128
- error,
129
- showMaxLength,
130
- pluginProps
131
- } = this.props;
132
- const inputProps = showMaxLength ? {} : {
133
- maxLength: 25
134
- };
135
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ChoiceWrapper, null, /*#__PURE__*/_react.default.createElement(StyledEditableHtml, (0, _extends2.default)({
136
- hasError: !!error,
137
- disableUnderline: true,
138
- onChange: this.onChange,
139
- onKeyDown: this.onKeyDown,
140
- markup: value || '',
141
- activePlugins: ['languageCharacters'],
142
- pluginProps: pluginProps,
143
- languageCharactersProps: [{
144
- language: 'spanish'
145
- }],
146
- spellCheck: spellCheck,
147
- autoWidthToolbar: true,
148
- toolbarOpts: {
149
- minWidth: 'auto',
150
- isHidden: !!pluginProps?.characters?.disabled
151
- }
152
- }, inputProps)), /*#__PURE__*/_react.default.createElement(StyledDeleteButton, {
153
- "aria-label": "delete",
154
- onClick: onDelete,
155
- size: "large"
156
- }, /*#__PURE__*/_react.default.createElement(_Delete.default, null))), error && /*#__PURE__*/_react.default.createElement(ErrorText, null, error));
157
- }
158
- }
159
- exports.Choice = Choice;
160
- (0, _defineProperty2.default)(Choice, "propTypes", {
161
- error: _propTypes.default.string,
162
- markup: _propTypes.default.string,
163
- onChange: _propTypes.default.func.isRequired,
164
- onDelete: _propTypes.default.func.isRequired,
165
- value: _propTypes.default.string,
166
- spellCheck: _propTypes.default.bool,
167
- showMaxLength: _propTypes.default.bool,
168
- pluginProps: _propTypes.default.object
169
- });
170
- class AlternateSection extends _react.default.Component {
171
- constructor(...args) {
172
- super(...args);
173
- (0, _defineProperty2.default)(this, "state", {});
174
- (0, _defineProperty2.default)(this, "updateChoicesIfNeeded", props => {
175
- if (!this.state.choices || !(0, _lodashEs.isEqual)(props.choices, this.state.choices) || !(0, _lodashEs.isEqual)(props.choices, this.props.choices)) {
176
- this.setState({
177
- choices: props.choices
178
- });
179
- }
180
- });
181
- (0, _defineProperty2.default)(this, "handleSelect", e => {
182
- const {
183
- onSelect,
184
- selectChoices
185
- } = this.props;
186
- const {
187
- value
188
- } = e.target;
189
- onSelect(selectChoices.find(c => c.value === value));
190
- });
191
- (0, _defineProperty2.default)(this, "onAddChoice", () => {
192
- const {
193
- choices
194
- } = this.state;
195
- if (choices.length && choices[choices.length - 1].label !== '') {
196
- const value = (0, _lodashEs.max)(choices.map(c => parseInt(c.value)).filter(id => !isNaN(id))) || 0;
197
- this.setState({
198
- choices: [...choices, {
199
- value: `${value + 1}`,
200
- label: ''
201
- }]
202
- });
203
- }
204
- });
205
- (0, _defineProperty2.default)(this, "onChoiceChanged", (choice, value, index) => {
206
- const {
207
- choiceChanged,
208
- lengthChanged,
209
- maxLength,
210
- choices
211
- } = this.props;
212
- const labelLengthsArr = choices.map(choice => (0, _markupUtils.decodeHTML)(choice.label || '').length);
213
- labelLengthsArr[index] = (0, _markupUtils.decodeHTML)(value).length;
214
- const newLength = Math.max(...labelLengthsArr);
215
- choiceChanged({
216
- ...choice,
217
- label: value
218
- });
219
- if (newLength > maxLength || newLength + 10 <= maxLength) {
220
- lengthChanged((0, _markupUtils.getAdjustedLength)(newLength));
221
- }
222
- });
223
- (0, _defineProperty2.default)(this, "onRemoveChoice", choice => {
224
- const {
225
- choiceRemoved
226
- } = this.props;
227
- choiceRemoved(choice.value);
228
- });
229
- (0, _defineProperty2.default)(this, "getChoicesMaxLength", () => {
230
- const {
231
- choices
232
- } = this.state;
233
- if (!choices) {
234
- return 1;
235
- }
236
- const labelLengthsArr = choices.map(choice => (0, _markupUtils.decodeHTML)(choice.label || '').length);
237
- return Math.max(...labelLengthsArr);
238
- });
239
- (0, _defineProperty2.default)(this, "changeLength", event => {
240
- const {
241
- lengthChanged
242
- } = this.props;
243
- const numberValue = parseInt(event.target.value, 10);
244
- const minLength = this.getChoicesMaxLength();
245
- if (numberValue && numberValue >= minLength && numberValue <= minLength + 10) {
246
- lengthChanged(numberValue);
247
- }
248
- });
249
- }
250
- UNSAFE_componentWillReceiveProps(nextProps) {
251
- this.updateChoicesIfNeeded(nextProps);
252
- }
253
- componentDidMount() {
254
- this.updateChoicesIfNeeded(this.props);
255
- }
256
- render() {
257
- const {
258
- selectChoices,
259
- maxLength,
260
- showMaxLength,
261
- value,
262
- spellCheck,
263
- errors,
264
- pluginProps
265
- } = this.props;
266
- const {
267
- choices
268
- } = this.state;
269
- const minLength = this.getChoicesMaxLength();
270
- return /*#__PURE__*/_react.default.createElement(DesignContainer, null, /*#__PURE__*/_react.default.createElement(SelectContainer, null, /*#__PURE__*/_react.default.createElement(_Select.default, {
271
- variant: "standard",
272
- displayEmpty: true,
273
- onChange: this.handleSelect,
274
- value: value || '',
275
- readOnly: showMaxLength,
276
- MenuProps: {
277
- transitionDuration: {
278
- enter: 225,
279
- exit: 195
280
- }
281
- }
282
- }, /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
283
- value: ""
284
- }, /*#__PURE__*/_react.default.createElement("em", null, value ? 'Remove selection' : 'Select a response')), selectChoices.map((c, index) => /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
285
- key: index,
286
- value: c?.value
287
- }, (0, _markupUtils.decodeHTML)(c?.label)))), choices && choices.length > 0 && /*#__PURE__*/_react.default.createElement(RightContainer, null, maxLength && showMaxLength && /*#__PURE__*/_react.default.createElement(LengthField, {
288
- variant: "standard",
289
- label: "Maximum length (characters)",
290
- type: "number",
291
- inputProps: {
292
- min: minLength,
293
- max: minLength + 10
294
- },
295
- value: maxLength,
296
- onChange: this.changeLength
297
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
298
- variant: "contained",
299
- color: "primary",
300
- onClick: this.onAddChoice
301
- }, "Add"))), errors && errors[0] && /*#__PURE__*/_react.default.createElement(ErrorText, null, errors[0]), /*#__PURE__*/_react.default.createElement(AltChoices, null, choices && choices.map((c, index) => index > 0 && /*#__PURE__*/_react.default.createElement(Choice, {
302
- key: index,
303
- markup: c.label,
304
- onChange: val => this.onChoiceChanged(c, val, index),
305
- onDelete: () => this.onRemoveChoice(c),
306
- spellCheck: spellCheck,
307
- error: errors && errors[index],
308
- showMaxLength: showMaxLength,
309
- pluginProps: pluginProps
310
- }))));
311
- }
312
- }
313
- exports.AlternateSection = AlternateSection;
314
- (0, _defineProperty2.default)(AlternateSection, "propTypes", {
315
- choices: _propTypes.default.array,
316
- selectChoices: _propTypes.default.array.isRequired,
317
- errors: _propTypes.default.object,
318
- onSelect: _propTypes.default.func.isRequired,
319
- choiceChanged: _propTypes.default.func.isRequired,
320
- lengthChanged: _propTypes.default.func,
321
- choiceRemoved: _propTypes.default.func.isRequired,
322
- value: _propTypes.default.string,
323
- maxLength: _propTypes.default.number,
324
- showMaxLength: _propTypes.default.bool,
325
- spellCheck: _propTypes.default.bool,
326
- pluginProps: _propTypes.default.object
327
- });
328
- var _default = exports.default = AlternateSection;
329
- //# sourceMappingURL=alternateSection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alternateSection.js","names":["_react","_interopRequireDefault","require","_propTypes","_lodashEs","_Button","_Delete","_IconButton","_MenuItem","_Select","_TextField","_styles","_editableHtmlTipTap","_markupUtils","DesignContainer","styled","theme","marginBottom","spacing","AltChoices","alignItems","flexDirection","display","paddingTop","width","StyledEditableHtml","EditableHtml","hasError","flex","marginRight","border","palette","error","main","borderRadius","StyledDeleteButton","IconButton","fill","grey","SelectContainer","justifyContent","RightContainer","LengthField","TextField","borderBottomColor","divider","text","primary","ErrorText","fontSize","typography","color","ChoiceWrapper","Choice","React","Component","constructor","args","_defineProperty2","default","value","props","markup","debounce","onChange","e","strippedValue","stripHtmlTags","setState","updateText","event","key","UNSAFE_componentWillReceiveProps","nextProps","render","state","onDelete","spellCheck","showMaxLength","pluginProps","inputProps","maxLength","createElement","Fragment","_extends2","disableUnderline","onKeyDown","activePlugins","languageCharactersProps","language","autoWidthToolbar","toolbarOpts","minWidth","isHidden","characters","disabled","onClick","size","exports","PropTypes","string","func","isRequired","bool","object","AlternateSection","choices","isEqual","onSelect","selectChoices","target","find","c","length","label","max","map","parseInt","filter","id","isNaN","choice","index","choiceChanged","lengthChanged","labelLengthsArr","decodeHTML","newLength","Math","getAdjustedLength","choiceRemoved","numberValue","minLength","getChoicesMaxLength","updateChoicesIfNeeded","componentDidMount","errors","variant","displayEmpty","handleSelect","readOnly","MenuProps","transitionDuration","enter","exit","type","min","changeLength","onAddChoice","val","onChoiceChanged","onRemoveChoice","array","number","_default"],"sources":["../src/alternateSection.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { debounce, isEqual } from 'lodash-es';\nimport Button from '@mui/material/Button';\nimport Delete from '@mui/icons-material/Delete';\nimport IconButton from '@mui/material/IconButton';\nimport MenuItem from '@mui/material/MenuItem';\nimport Select from '@mui/material/Select';\nimport TextField from '@mui/material/TextField';\nimport { styled } from '@mui/material/styles';\nimport { max } from 'lodash-es';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { stripHtmlTags, getAdjustedLength, decodeHTML } from './markupUtils';\n\nconst DesignContainer = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(0.5),\n}));\n\nconst AltChoices = styled('div')(({ theme }) => ({\n alignItems: 'flex-start',\n flexDirection: 'column',\n display: 'flex',\n paddingTop: theme.spacing(2.5),\n '& > *': {\n marginBottom: theme.spacing(2.5),\n width: '100%',\n },\n}));\n\nconst StyledEditableHtml = styled(EditableHtml)(({ theme, hasError }) => ({\n flex: '1',\n marginRight: theme.spacing(2.5),\n ...(hasError && {\n border: `2px solid ${theme.palette.error.main}`,\n borderRadius: '6px',\n }),\n}));\n\nconst StyledDeleteButton = styled(IconButton)(({ theme }) => ({\n '& svg': {\n fill: theme.palette.grey[600],\n },\n}));\n\nconst SelectContainer = styled('div')({\n alignItems: 'flex-end',\n display: 'flex',\n justifyContent: 'space-between',\n width: '100%',\n});\n\nconst RightContainer = styled('div')({\n alignItems: 'center',\n display: 'flex',\n});\n\nconst LengthField = styled(TextField)(({ theme }) => ({\n width: '230px',\n marginRight: theme.spacing(2.5),\n '& .MuiInput-underline:before': {\n borderBottomColor: theme.palette.divider,\n },\n '& .MuiInput-underline:hover:not(.Mui-disabled):before': {\n borderBottomColor: theme.palette.text.primary,\n },\n '& .MuiInput-underline:after': {\n borderBottomColor: theme.palette.primary.main,\n },\n}));\n\nconst ErrorText = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(0.5),\n}));\n\nconst ChoiceWrapper = styled('div')({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'space-between',\n});\n\nexport class Choice extends React.Component {\n static propTypes = {\n error: PropTypes.string,\n markup: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n onDelete: PropTypes.func.isRequired,\n value: PropTypes.string,\n spellCheck: PropTypes.bool,\n showMaxLength: PropTypes.bool,\n pluginProps: PropTypes.object,\n };\n\n state = {\n value: this.props.markup,\n };\n\n updateText = debounce(this.props.onChange, 300);\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.markup) {\n this.setState({ value: nextProps.markup });\n }\n }\n\n onChange = (e) => {\n const strippedValue = stripHtmlTags(e);\n this.setState({ value: strippedValue });\n this.updateText(strippedValue);\n };\n\n onKeyDown = (event) => {\n if (event.key === 'Enter') {\n return true;\n }\n };\n\n render() {\n const { value } = this.state;\n const { onDelete, spellCheck, error, showMaxLength, pluginProps } = this.props;\n const inputProps = showMaxLength ? {} : { maxLength: 25 };\n\n return (\n <React.Fragment>\n <ChoiceWrapper>\n <StyledEditableHtml\n hasError={!!error}\n disableUnderline\n onChange={this.onChange}\n onKeyDown={this.onKeyDown}\n markup={value || ''}\n activePlugins={['languageCharacters']}\n pluginProps={pluginProps}\n languageCharactersProps={[{ language: 'spanish' }]}\n spellCheck={spellCheck}\n autoWidthToolbar\n toolbarOpts={{\n minWidth: 'auto',\n isHidden: !!pluginProps?.characters?.disabled,\n }}\n {...inputProps}\n />\n <StyledDeleteButton aria-label=\"delete\" onClick={onDelete} size=\"large\">\n <Delete />\n </StyledDeleteButton>\n </ChoiceWrapper>\n {error && <ErrorText>{error}</ErrorText>}\n </React.Fragment>\n );\n }\n}\n\nexport class AlternateSection extends React.Component {\n static propTypes = {\n choices: PropTypes.array,\n selectChoices: PropTypes.array.isRequired,\n errors: PropTypes.object,\n onSelect: PropTypes.func.isRequired,\n choiceChanged: PropTypes.func.isRequired,\n lengthChanged: PropTypes.func,\n choiceRemoved: PropTypes.func.isRequired,\n value: PropTypes.string,\n maxLength: PropTypes.number,\n showMaxLength: PropTypes.bool,\n spellCheck: PropTypes.bool,\n pluginProps: PropTypes.object,\n };\n\n state = {};\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n this.updateChoicesIfNeeded(nextProps);\n }\n\n componentDidMount() {\n this.updateChoicesIfNeeded(this.props);\n }\n\n updateChoicesIfNeeded = (props) => {\n if (\n !this.state.choices ||\n !isEqual(props.choices, this.state.choices) ||\n !isEqual(props.choices, this.props.choices)\n ) {\n this.setState({\n choices: props.choices,\n });\n }\n };\n\n handleSelect = (e) => {\n const { onSelect, selectChoices } = this.props;\n const { value } = e.target;\n\n onSelect(selectChoices.find((c) => c.value === value));\n };\n\n onAddChoice = () => {\n const { choices } = this.state;\n\n if (choices.length && choices[choices.length - 1].label !== '') {\n const value = max(choices.map((c) => parseInt(c.value)).filter((id) => !isNaN(id))) || 0;\n\n this.setState({\n choices: [\n ...choices,\n {\n value: `${value + 1}`,\n label: '',\n },\n ],\n });\n }\n };\n\n onChoiceChanged = (choice, value, index) => {\n const { choiceChanged, lengthChanged, maxLength, choices } = this.props;\n\n const labelLengthsArr = choices.map((choice) => decodeHTML(choice.label || '').length);\n labelLengthsArr[index] = decodeHTML(value).length;\n\n const newLength = Math.max(...labelLengthsArr);\n\n choiceChanged({\n ...choice,\n label: value,\n });\n\n if (newLength > maxLength || newLength + 10 <= maxLength) {\n lengthChanged(getAdjustedLength(newLength));\n }\n };\n\n onRemoveChoice = (choice) => {\n const { choiceRemoved } = this.props;\n\n choiceRemoved(choice.value);\n };\n\n getChoicesMaxLength = () => {\n const { choices } = this.state;\n\n if (!choices) {\n return 1;\n }\n\n const labelLengthsArr = choices.map((choice) => decodeHTML(choice.label || '').length);\n\n return Math.max(...labelLengthsArr);\n };\n\n changeLength = (event) => {\n const { lengthChanged } = this.props;\n const numberValue = parseInt(event.target.value, 10);\n const minLength = this.getChoicesMaxLength();\n\n if (numberValue && numberValue >= minLength && numberValue <= minLength + 10) {\n lengthChanged(numberValue);\n }\n };\n\n render() {\n const { selectChoices, maxLength, showMaxLength, value, spellCheck, errors, pluginProps } = this.props;\n const { choices } = this.state;\n const minLength = this.getChoicesMaxLength();\n\n return (\n <DesignContainer>\n <SelectContainer>\n <Select\n variant=\"standard\"\n displayEmpty\n onChange={this.handleSelect}\n value={value || ''}\n readOnly={showMaxLength}\n MenuProps={{\n transitionDuration: { enter: 225, exit: 195 },\n }}\n >\n <MenuItem value=\"\">\n <em>{value ? 'Remove selection' : 'Select a response'}</em>\n </MenuItem>\n {selectChoices.map((c, index) => (\n <MenuItem key={index} value={c?.value}>\n {decodeHTML(c?.label)}\n </MenuItem>\n ))}\n </Select>\n\n {choices && choices.length > 0 && (\n <RightContainer>\n {maxLength && showMaxLength && (\n <LengthField\n variant=\"standard\"\n label=\"Maximum length (characters)\"\n type=\"number\"\n inputProps={{\n min: minLength,\n max: minLength + 10,\n }}\n value={maxLength}\n onChange={this.changeLength}\n />\n )}\n <Button variant=\"contained\" color=\"primary\" onClick={this.onAddChoice}>\n Add\n </Button>\n </RightContainer>\n )}\n </SelectContainer>\n {errors && errors[0] && <ErrorText>{errors[0]}</ErrorText>}\n\n <AltChoices>\n {choices &&\n choices.map(\n (c, index) =>\n index > 0 && (\n <Choice\n key={index}\n markup={c.label}\n onChange={(val) => this.onChoiceChanged(c, val, index)}\n onDelete={() => this.onRemoveChoice(c)}\n spellCheck={spellCheck}\n error={errors && errors[index]}\n showMaxLength={showMaxLength}\n pluginProps={pluginProps}\n />\n ),\n )}\n </AltChoices>\n </DesignContainer>\n );\n }\n}\n\nexport default AlternateSection;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,WAAA,GAAAN,s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