@k-int/stripes-kint-components 1.6.0 → 1.7.1

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 (349) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/es/index.js +34 -48
  3. package/es/lib/ActionList/ActionList.js +29 -69
  4. package/es/lib/ActionList/ActionListFieldArray.js +105 -211
  5. package/es/lib/ActionList/index.js +2 -8
  6. package/es/lib/EditableRefdataList/EditableRefdataList.js +48 -127
  7. package/es/lib/EditableRefdataList/index.js +2 -8
  8. package/es/lib/EditableSettingsList/EditableSettingsList.js +11 -47
  9. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +16 -61
  10. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +62 -137
  11. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +23 -91
  12. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +103 -127
  13. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +19 -75
  14. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +188 -357
  15. package/es/lib/EditableSettingsList/SettingField/SettingField.js +39 -120
  16. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +61 -157
  17. package/es/lib/EditableSettingsList/SettingField/index.js +4 -12
  18. package/es/lib/EditableSettingsList/index.js +4 -12
  19. package/es/lib/NoResultsMessage/NoResultsMessage.js +24 -61
  20. package/es/lib/NoResultsMessage/index.js +2 -8
  21. package/es/lib/QueryTypedown/QueryTypedown.js +15 -89
  22. package/es/lib/QueryTypedown/index.js +2 -8
  23. package/es/lib/RefdataButtons/RefdataButtons.js +32 -85
  24. package/es/lib/RefdataButtons/index.js +2 -8
  25. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +122 -224
  26. package/es/lib/SASQLookupComponent/index.js +2 -8
  27. package/es/lib/SASQRoute/SASQRoute.js +27 -76
  28. package/es/lib/SASQRoute/index.js +2 -8
  29. package/es/lib/SASQViewComponent/SASQViewComponent.js +28 -89
  30. package/es/lib/SASQViewComponent/index.js +2 -8
  31. package/es/lib/SearchField/SearchField.js +11 -61
  32. package/es/lib/SearchField/index.js +2 -8
  33. package/es/lib/SettingPage/SettingPage.js +17 -63
  34. package/es/lib/SettingPage/SettingPagePane.js +13 -58
  35. package/es/lib/SettingPage/index.js +3 -10
  36. package/es/lib/TypeDown/TypeDown.js +61 -132
  37. package/es/lib/TypeDown/index.js +2 -8
  38. package/es/lib/Typedown/Typedown.js +74 -153
  39. package/es/lib/Typedown/index.js +2 -8
  40. package/es/lib/constants/eventCodes.js +3 -36
  41. package/es/lib/contexts/SettingsContext.js +2 -34
  42. package/es/lib/contexts/index.js +2 -8
  43. package/es/lib/hooks/index.js +12 -27
  44. package/es/lib/hooks/settingsHooks/index.js +3 -10
  45. package/es/lib/hooks/settingsHooks/useSettingSection.js +16 -60
  46. package/es/lib/hooks/settingsHooks/useSettings.js +51 -130
  47. package/es/lib/hooks/typedownHooks/index.js +4 -12
  48. package/es/lib/hooks/typedownHooks/useTypedown.js +60 -114
  49. package/es/lib/hooks/typedownHooks/useTypedownData.js +13 -69
  50. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +15 -71
  51. package/es/lib/hooks/useActiveElement.js +10 -63
  52. package/es/lib/hooks/useHelperApp.js +37 -111
  53. package/es/lib/hooks/useKiwtFieldArray.js +35 -101
  54. package/es/lib/hooks/useKiwtSASQuery.js +36 -107
  55. package/es/lib/hooks/useLocalStorageState.js +7 -69
  56. package/es/lib/hooks/useMutateRefdataValue.js +31 -115
  57. package/es/lib/hooks/useQIndex.js +17 -87
  58. package/es/lib/hooks/useRefdata.js +19 -71
  59. package/es/lib/hooks/useTemplates.js +16 -60
  60. package/es/lib/utils/buildUrl.js +11 -51
  61. package/es/lib/utils/generateKiwtQuery.js +4 -40
  62. package/es/lib/utils/generateKiwtQueryParams.js +38 -125
  63. package/es/lib/utils/index.js +15 -20
  64. package/es/lib/utils/refdataOptions.js +13 -0
  65. package/es/lib/utils/renderHelpText.js +32 -89
  66. package/es/lib/utils/selectorSafe.js +2 -34
  67. package/es/lib/utils/sortByLabel.js +4 -41
  68. package/es/lib/utils/toCamelCase.js +8 -42
  69. package/package.json +17 -3
  70. package/src/index.js +1 -0
  71. package/src/lib/ActionList/ActionList.js +5 -2
  72. package/src/lib/ActionList/ActionListFieldArray.js +20 -8
  73. package/src/lib/ActionList/README.md +1 -0
  74. package/src/lib/EditableRefdataList/EditableRefdataList.js +9 -4
  75. package/src/lib/SASQLookupComponent/SASQLookupComponent.js +6 -0
  76. package/src/lib/hooks/useRefdata.js +2 -8
  77. package/src/lib/utils/index.js +2 -0
  78. package/src/lib/utils/refdataOptions.js +7 -0
  79. package/artifacts/coverage-jest/lcov-report/base.css +0 -224
  80. package/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
  81. package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/ActionList.js.html +0 -389
  82. package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/ActionListFieldArray.js.html +0 -1076
  83. package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/index.html +0 -147
  84. package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/index.js.html +0 -140
  85. package/artifacts/coverage-jest/lcov-report/es/lib/EditableRefdataList/EditableRefdataList.js.html +0 -680
  86. package/artifacts/coverage-jest/lcov-report/es/lib/EditableRefdataList/index.html +0 -132
  87. package/artifacts/coverage-jest/lcov-report/es/lib/EditableRefdataList/index.js.html +0 -140
  88. package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/EditableSettingsList.js.html +0 -353
  89. package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -353
  90. package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -482
  91. package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -434
  92. package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/SettingField.js.html +0 -644
  93. package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/index.html +0 -162
  94. package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/index.js.html +0 -188
  95. package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/index.html +0 -147
  96. package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/index.js.html +0 -188
  97. package/artifacts/coverage-jest/lcov-report/es/lib/NoResultsMessage/NoResultsMessage.js.html +0 -449
  98. package/artifacts/coverage-jest/lcov-report/es/lib/NoResultsMessage/index.html +0 -132
  99. package/artifacts/coverage-jest/lcov-report/es/lib/NoResultsMessage/index.js.html +0 -140
  100. package/artifacts/coverage-jest/lcov-report/es/lib/QueryTypedown/QueryTypedown.js.html +0 -413
  101. package/artifacts/coverage-jest/lcov-report/es/lib/QueryTypedown/index.html +0 -132
  102. package/artifacts/coverage-jest/lcov-report/es/lib/QueryTypedown/index.js.html +0 -140
  103. package/artifacts/coverage-jest/lcov-report/es/lib/RefdataButtons/RefdataButtons.js.html +0 -512
  104. package/artifacts/coverage-jest/lcov-report/es/lib/RefdataButtons/index.html +0 -132
  105. package/artifacts/coverage-jest/lcov-report/es/lib/RefdataButtons/index.js.html +0 -140
  106. package/artifacts/coverage-jest/lcov-report/es/lib/SASQLookupComponent/SASQLookupComponent.js.html +0 -1115
  107. package/artifacts/coverage-jest/lcov-report/es/lib/SASQLookupComponent/index.html +0 -132
  108. package/artifacts/coverage-jest/lcov-report/es/lib/SASQLookupComponent/index.js.html +0 -140
  109. package/artifacts/coverage-jest/lcov-report/es/lib/SASQRoute/SASQRoute.js.html +0 -404
  110. package/artifacts/coverage-jest/lcov-report/es/lib/SASQRoute/index.html +0 -132
  111. package/artifacts/coverage-jest/lcov-report/es/lib/SASQRoute/index.js.html +0 -140
  112. package/artifacts/coverage-jest/lcov-report/es/lib/SASQViewComponent/SASQViewComponent.js.html +0 -413
  113. package/artifacts/coverage-jest/lcov-report/es/lib/SASQViewComponent/index.html +0 -132
  114. package/artifacts/coverage-jest/lcov-report/es/lib/SASQViewComponent/index.js.html +0 -140
  115. package/artifacts/coverage-jest/lcov-report/es/lib/SearchField/SearchField.js.html +0 -353
  116. package/artifacts/coverage-jest/lcov-report/es/lib/SearchField/index.html +0 -132
  117. package/artifacts/coverage-jest/lcov-report/es/lib/SearchField/index.js.html +0 -140
  118. package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/SettingPage.js.html +0 -380
  119. package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/SettingPagePane.js.html +0 -308
  120. package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/index.html +0 -147
  121. package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/index.js.html +0 -164
  122. package/artifacts/coverage-jest/lcov-report/es/lib/TypeDown/TypeDown.js.html +0 -839
  123. package/artifacts/coverage-jest/lcov-report/es/lib/TypeDown/index.html +0 -132
  124. package/artifacts/coverage-jest/lcov-report/es/lib/TypeDown/index.js.html +0 -140
  125. package/artifacts/coverage-jest/lcov-report/es/lib/Typedown/Typedown.js.html +0 -887
  126. package/artifacts/coverage-jest/lcov-report/es/lib/Typedown/index.html +0 -132
  127. package/artifacts/coverage-jest/lcov-report/es/lib/Typedown/index.js.html +0 -140
  128. package/artifacts/coverage-jest/lcov-report/es/lib/constants/eventCodes.js.html +0 -209
  129. package/artifacts/coverage-jest/lcov-report/es/lib/constants/index.html +0 -117
  130. package/artifacts/coverage-jest/lcov-report/es/lib/contexts/SettingsContext.js.html +0 -206
  131. package/artifacts/coverage-jest/lcov-report/es/lib/contexts/index.html +0 -132
  132. package/artifacts/coverage-jest/lcov-report/es/lib/contexts/index.js.html +0 -140
  133. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/index.html +0 -252
  134. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/index.js.html +0 -374
  135. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/index.html +0 -147
  136. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/index.js.html +0 -164
  137. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/useSettingSection.js.html +0 -305
  138. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/useSettings.js.html +0 -584
  139. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/index.html +0 -162
  140. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/index.js.html +0 -188
  141. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/useTypedown.js.html +0 -644
  142. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/useTypedownData.js.html +0 -335
  143. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/useTypedownToggle.js.html +0 -350
  144. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useActiveElement.js.html +0 -323
  145. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useHelperApp.js.html +0 -488
  146. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useKiwtFieldArray.js.html +0 -509
  147. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useKiwtSASQuery.js.html +0 -467
  148. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useLocalStorageState.js.html +0 -329
  149. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useMutateRefdataValue.js.html +0 -488
  150. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useQIndex.js.html +0 -407
  151. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useRefdata.js.html +0 -401
  152. package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useTemplates.js.html +0 -314
  153. package/artifacts/coverage-jest/lcov-report/es/lib/utils/buildUrl.js.html +0 -296
  154. package/artifacts/coverage-jest/lcov-report/es/lib/utils/generateKiwtQuery.js.html +0 -230
  155. package/artifacts/coverage-jest/lcov-report/es/lib/utils/generateKiwtQueryParams.js.html +0 -545
  156. package/artifacts/coverage-jest/lcov-report/es/lib/utils/getFocusableElements.js.html +0 -572
  157. package/artifacts/coverage-jest/lcov-report/es/lib/utils/index.html +0 -237
  158. package/artifacts/coverage-jest/lcov-report/es/lib/utils/index.js.html +0 -284
  159. package/artifacts/coverage-jest/lcov-report/es/lib/utils/renderHelpText.js.html +0 -410
  160. package/artifacts/coverage-jest/lcov-report/es/lib/utils/selectorSafe.js.html +0 -209
  161. package/artifacts/coverage-jest/lcov-report/es/lib/utils/sortByLabel.js.html +0 -248
  162. package/artifacts/coverage-jest/lcov-report/es/lib/utils/toCamelCase.js.html +0 -227
  163. package/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
  164. package/artifacts/coverage-jest/lcov-report/index.html +0 -717
  165. package/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
  166. package/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
  167. package/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
  168. package/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
  169. package/artifacts/coverage-jest/lcov-report/src/index.html +0 -117
  170. package/artifacts/coverage-jest/lcov-report/src/index.js.html +0 -305
  171. package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/ActionList.js.html +0 -248
  172. package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/ActionListFieldArray.js.html +0 -764
  173. package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/index.html +0 -147
  174. package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/index.js.html +0 -89
  175. package/artifacts/coverage-jest/lcov-report/src/lib/EditableRefdataList/EditableRefdataList.js.html +0 -362
  176. package/artifacts/coverage-jest/lcov-report/src/lib/EditableRefdataList/index.html +0 -132
  177. package/artifacts/coverage-jest/lcov-report/src/lib/EditableRefdataList/index.js.html +0 -86
  178. package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/EditableSettingsList.js.html +0 -224
  179. package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -212
  180. package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -308
  181. package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -260
  182. package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/SettingField.js.html +0 -437
  183. package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/index.html +0 -162
  184. package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/index.js.html +0 -95
  185. package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/index.html +0 -147
  186. package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/index.js.html +0 -95
  187. package/artifacts/coverage-jest/lcov-report/src/lib/NoResultsMessage/NoResultsMessage.js.html +0 -320
  188. package/artifacts/coverage-jest/lcov-report/src/lib/NoResultsMessage/index.html +0 -132
  189. package/artifacts/coverage-jest/lcov-report/src/lib/NoResultsMessage/index.js.html +0 -89
  190. package/artifacts/coverage-jest/lcov-report/src/lib/QueryTypedown/QueryTypedown.js.html +0 -185
  191. package/artifacts/coverage-jest/lcov-report/src/lib/QueryTypedown/index.html +0 -132
  192. package/artifacts/coverage-jest/lcov-report/src/lib/QueryTypedown/index.js.html +0 -89
  193. package/artifacts/coverage-jest/lcov-report/src/lib/RefdataButtons/RefdataButtons.js.html +0 -371
  194. package/artifacts/coverage-jest/lcov-report/src/lib/RefdataButtons/index.html +0 -132
  195. package/artifacts/coverage-jest/lcov-report/src/lib/RefdataButtons/index.js.html +0 -89
  196. package/artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/SASQLookupComponent.js.html +0 -932
  197. package/artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/index.html +0 -132
  198. package/artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/index.js.html +0 -89
  199. package/artifacts/coverage-jest/lcov-report/src/lib/SASQRoute/SASQRoute.js.html +0 -275
  200. package/artifacts/coverage-jest/lcov-report/src/lib/SASQRoute/index.html +0 -132
  201. package/artifacts/coverage-jest/lcov-report/src/lib/SASQRoute/index.js.html +0 -89
  202. package/artifacts/coverage-jest/lcov-report/src/lib/SASQViewComponent/SASQViewComponent.js.html +0 -251
  203. package/artifacts/coverage-jest/lcov-report/src/lib/SASQViewComponent/index.html +0 -132
  204. package/artifacts/coverage-jest/lcov-report/src/lib/SASQViewComponent/index.js.html +0 -89
  205. package/artifacts/coverage-jest/lcov-report/src/lib/SearchField/SearchField.js.html +0 -215
  206. package/artifacts/coverage-jest/lcov-report/src/lib/SearchField/index.html +0 -132
  207. package/artifacts/coverage-jest/lcov-report/src/lib/SearchField/index.js.html +0 -89
  208. package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/SettingPage.js.html +0 -212
  209. package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/SettingPagePane.js.html +0 -149
  210. package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/index.html +0 -147
  211. package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/index.js.html +0 -92
  212. package/artifacts/coverage-jest/lcov-report/src/lib/TypeDown/TypeDown.js.html +0 -764
  213. package/artifacts/coverage-jest/lcov-report/src/lib/TypeDown/index.html +0 -132
  214. package/artifacts/coverage-jest/lcov-report/src/lib/TypeDown/index.js.html +0 -89
  215. package/artifacts/coverage-jest/lcov-report/src/lib/Typedown/Typedown.js.html +0 -788
  216. package/artifacts/coverage-jest/lcov-report/src/lib/Typedown/index.html +0 -132
  217. package/artifacts/coverage-jest/lcov-report/src/lib/Typedown/index.js.html +0 -89
  218. package/artifacts/coverage-jest/lcov-report/src/lib/constants/eventCodes.js.html +0 -95
  219. package/artifacts/coverage-jest/lcov-report/src/lib/constants/index.html +0 -117
  220. package/artifacts/coverage-jest/lcov-report/src/lib/contexts/SettingsContext.js.html +0 -98
  221. package/artifacts/coverage-jest/lcov-report/src/lib/contexts/index.html +0 -132
  222. package/artifacts/coverage-jest/lcov-report/src/lib/contexts/index.js.html +0 -86
  223. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/index.html +0 -252
  224. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/index.js.html +0 -116
  225. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/index.html +0 -147
  226. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/index.js.html +0 -92
  227. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/useSettingSection.js.html +0 -164
  228. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/useSettings.js.html +0 -377
  229. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/index.html +0 -162
  230. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/index.js.html +0 -95
  231. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedown.js.html +0 -524
  232. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedownData.js.html +0 -164
  233. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedownToggle.js.html +0 -164
  234. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useActiveElement.js.html +0 -158
  235. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useHelperApp.js.html +0 -284
  236. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useKiwtFieldArray.js.html +0 -275
  237. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useKiwtSASQuery.js.html +0 -179
  238. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useLocalStorageState.js.html +0 -137
  239. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useMutateRefdataValue.js.html +0 -302
  240. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useQIndex.js.html +0 -209
  241. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useRefdata.js.html +0 -287
  242. package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useTemplates.js.html +0 -167
  243. package/artifacts/coverage-jest/lcov-report/src/lib/utils/buildUrl.js.html +0 -194
  244. package/artifacts/coverage-jest/lcov-report/src/lib/utils/generateKiwtQuery.js.html +0 -110
  245. package/artifacts/coverage-jest/lcov-report/src/lib/utils/generateKiwtQueryParams.js.html +0 -287
  246. package/artifacts/coverage-jest/lcov-report/src/lib/utils/getFocusableElements.js.html +0 -380
  247. package/artifacts/coverage-jest/lcov-report/src/lib/utils/index.html +0 -237
  248. package/artifacts/coverage-jest/lcov-report/src/lib/utils/index.js.html +0 -116
  249. package/artifacts/coverage-jest/lcov-report/src/lib/utils/renderHelpText.js.html +0 -167
  250. package/artifacts/coverage-jest/lcov-report/src/lib/utils/selectorSafe.js.html +0 -104
  251. package/artifacts/coverage-jest/lcov-report/src/lib/utils/sortByLabel.js.html +0 -131
  252. package/artifacts/coverage-jest/lcov-report/src/lib/utils/toCamelCase.js.html +0 -128
  253. package/artifacts/coverage-jest/lcov.info +0 -10040
  254. package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -109
  255. package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -998
  256. package/es/artifacts/coverage-jest/lcov-report/sorter.js +0 -238
  257. package/junit.xml +0 -79
  258. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -248
  259. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -764
  260. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +0 -147
  261. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +0 -89
  262. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +0 -362
  263. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +0 -132
  264. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +0 -89
  265. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +0 -224
  266. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -212
  267. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -377
  268. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -263
  269. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +0 -437
  270. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +0 -162
  271. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +0 -95
  272. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +0 -147
  273. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +0 -95
  274. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +0 -320
  275. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +0 -132
  276. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +0 -89
  277. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +0 -185
  278. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +0 -132
  279. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +0 -89
  280. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +0 -371
  281. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +0 -132
  282. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +0 -89
  283. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +0 -932
  284. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +0 -132
  285. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +0 -89
  286. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +0 -275
  287. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +0 -132
  288. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +0 -89
  289. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +0 -251
  290. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +0 -132
  291. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +0 -89
  292. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +0 -215
  293. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +0 -132
  294. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +0 -89
  295. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +0 -212
  296. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +0 -179
  297. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +0 -147
  298. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +0 -92
  299. package/src/artifacts/coverage-jest/lcov-report/TypeDown/TypeDown.js.html +0 -770
  300. package/src/artifacts/coverage-jest/lcov-report/TypeDown/index.html +0 -132
  301. package/src/artifacts/coverage-jest/lcov-report/TypeDown/index.js.html +0 -89
  302. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +0 -791
  303. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +0 -132
  304. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +0 -89
  305. package/src/artifacts/coverage-jest/lcov-report/base.css +0 -224
  306. package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
  307. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +0 -95
  308. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +0 -117
  309. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +0 -98
  310. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +0 -132
  311. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +0 -92
  312. package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
  313. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +0 -252
  314. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +0 -116
  315. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +0 -147
  316. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +0 -92
  317. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +0 -164
  318. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +0 -404
  319. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +0 -162
  320. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +0 -95
  321. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +0 -524
  322. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +0 -164
  323. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +0 -164
  324. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +0 -158
  325. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +0 -284
  326. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +0 -275
  327. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +0 -179
  328. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +0 -137
  329. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +0 -302
  330. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +0 -209
  331. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +0 -287
  332. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +0 -167
  333. package/src/artifacts/coverage-jest/lcov-report/index.html +0 -402
  334. package/src/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
  335. package/src/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
  336. package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
  337. package/src/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
  338. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +0 -194
  339. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +0 -110
  340. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +0 -287
  341. package/src/artifacts/coverage-jest/lcov-report/utils/getFocusableElements.js.html +0 -386
  342. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +0 -237
  343. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -116
  344. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +0 -167
  345. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +0 -104
  346. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +0 -131
  347. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +0 -128
  348. package/src/artifacts/coverage-jest/lcov.info +0 -2073
  349. package/yarn-error.log +0 -15050
@@ -4,132 +4,48 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _reactQuery = require("react-query");
11
-
12
9
  var _core = require("@folio/stripes/core");
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- (function () {
17
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
18
- enterModule && enterModule(module);
19
- })();
20
-
21
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
22
-
23
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
24
-
25
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26
- return a;
27
- };
28
-
29
- var useMutateRefdataValue = function useMutateRefdataValue(_ref) {
30
- var afterQueryCalls = _ref.afterQueryCalls,
31
- endpoint = _ref.endpoint,
32
- id = _ref.id,
33
- queryParams = _ref.queryParams,
34
- _ref$returnQueryObjec = _ref.returnQueryObject,
35
- returnQueryObject = _ref$returnQueryObjec === void 0 ? {
36
- put: false,
37
- delete: false
38
- } : _ref$returnQueryObjec;
39
- var returnObj = {};
40
- var ky = (0, _core.useOkapiKy)();
41
- var deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataValue', 'delete', id], /*#__PURE__*/function () {
42
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(data) {
43
- return regeneratorRuntime.wrap(function _callee$(_context) {
44
- while (1) {
45
- switch (_context.prev = _context.next) {
46
- case 0:
47
- return _context.abrupt("return", ky.put("".concat(endpoint, "/").concat(id), {
48
- json: {
49
- id: id,
50
- values: [{
51
- id: data,
52
- _delete: true
53
- }]
54
- }
55
- }).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.delete));
56
-
57
- case 1:
58
- case "end":
59
- return _context.stop();
60
- }
61
- }
62
- }, _callee);
63
- }));
64
-
65
- return function (_x) {
66
- return _ref2.apply(this, arguments);
67
- };
68
- }(), queryParams === null || queryParams === void 0 ? void 0 : queryParams.delete);
69
- var putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'editableRefdataList', 'editValue', id], /*#__PURE__*/function () {
70
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(data) {
71
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
72
- while (1) {
73
- switch (_context2.prev = _context2.next) {
74
- case 0:
75
- return _context2.abrupt("return", ky.put("".concat(endpoint, "/").concat(id), {
76
- json: {
77
- id: id,
78
- values: [data]
79
- }
80
- }).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.put));
81
-
82
- case 1:
83
- case "end":
84
- return _context2.stop();
85
- }
86
- }
87
- }, _callee2);
88
- }));
89
-
90
- return function (_x2) {
91
- return _ref3.apply(this, arguments);
92
- };
93
- }(), queryParams === null || queryParams === void 0 ? void 0 : queryParams.put);
94
-
95
- if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.delete) {
11
+ const useMutateRefdataValue = _ref => {
12
+ let {
13
+ afterQueryCalls,
14
+ endpoint,
15
+ id,
16
+ queryParams,
17
+ returnQueryObject = {
18
+ put: false,
19
+ delete: false
20
+ }
21
+ } = _ref;
22
+ const returnObj = {};
23
+ const ky = (0, _core.useOkapiKy)();
24
+ const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataValue', 'delete', id], async data => ky.put(`${endpoint}/${id}`, {
25
+ json: {
26
+ id,
27
+ values: [{
28
+ id: data,
29
+ _delete: true
30
+ }]
31
+ }
32
+ }).json().then(afterQueryCalls?.delete), queryParams?.delete);
33
+ const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'editableRefdataList', 'editValue', id], async data => ky.put(`${endpoint}/${id}`, {
34
+ json: {
35
+ id,
36
+ values: [data]
37
+ }
38
+ }).json().then(afterQueryCalls?.put), queryParams?.put);
39
+ if (returnQueryObject?.delete) {
96
40
  returnObj.delete = deleteQueryObject;
97
41
  } else {
98
42
  returnObj.delete = deleteQueryObject.mutateAsync;
99
43
  }
100
-
101
- if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.put) {
44
+ if (returnQueryObject?.put) {
102
45
  returnObj.put = putQueryObject;
103
46
  } else {
104
47
  returnObj.put = putQueryObject.mutateAsync;
105
48
  }
106
-
107
49
  return returnObj;
108
50
  };
109
-
110
- __signature__(useMutateRefdataValue, "useOkapiKy{ky}\nuseMutation{deleteQueryObject}\nuseMutation{putQueryObject}", function () {
111
- return [_core.useOkapiKy, _reactQuery.useMutation, _reactQuery.useMutation];
112
- });
113
-
114
- var _default = useMutateRefdataValue;
115
- var _default2 = _default;
116
- exports.default = _default2;
117
- ;
118
-
119
- (function () {
120
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
121
-
122
- if (!reactHotLoader) {
123
- return;
124
- }
125
-
126
- reactHotLoader.register(useMutateRefdataValue, "useMutateRefdataValue", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useMutateRefdataValue.js");
127
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useMutateRefdataValue.js");
128
- })();
129
-
130
- ;
131
-
132
- (function () {
133
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
134
- leaveModule && leaveModule(module);
135
- })();
51
+ var _default = exports.default = useMutateRefdataValue;
@@ -1,108 +1,38 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.default = void 0;
9
-
10
7
  var _react = _interopRequireWildcard(require("react"));
11
-
12
8
  var _reactRouterDom = require("react-router-dom");
13
-
14
9
  var _queryString = _interopRequireDefault(require("query-string"));
15
-
16
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- (function () {
23
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
24
- enterModule && enterModule(module);
25
- })();
26
-
27
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
28
-
29
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
30
-
31
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
32
-
33
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
34
-
35
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
36
-
37
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
38
-
39
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
40
-
41
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
42
-
43
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
44
-
45
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
46
- return a;
47
- };
48
-
49
- var useQIndex = function useQIndex() {
50
- var history = (0, _reactRouterDom.useHistory)();
51
- var location = (0, _reactRouterDom.useLocation)();
52
-
53
- var query = _queryString.default.parse(location.search);
54
-
55
- var _useState = (0, _react.useState)(query === null || query === void 0 ? void 0 : query.qindex),
56
- _useState2 = _slicedToArray(_useState, 2),
57
- currentQindex = _useState2[0],
58
- setCurrentQindex = _useState2[1];
59
-
60
- var handleQindexChange = function handleQindexChange(newQindex) {
11
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
+ const useQIndex = () => {
14
+ const history = (0, _reactRouterDom.useHistory)();
15
+ const location = (0, _reactRouterDom.useLocation)();
16
+ const query = _queryString.default.parse(location.search);
17
+ const [currentQindex, setCurrentQindex] = (0, _react.useState)(query?.qindex);
18
+ const handleQindexChange = newQindex => {
61
19
  setCurrentQindex(newQindex);
62
-
63
- if (newQindex !== (query === null || query === void 0 ? void 0 : query.qindex)) {
64
- var newQuery = _objectSpread(_objectSpread({}, query), {}, {
20
+ if (newQindex !== query?.qindex) {
21
+ const newQuery = {
22
+ ...query,
65
23
  qindex: newQindex
66
- });
67
-
24
+ };
68
25
  history.push({
69
26
  pathname: location.pathname,
70
- search: "?".concat(_queryString.default.stringify(newQuery))
27
+ search: `?${_queryString.default.stringify(newQuery)}`
71
28
  });
72
29
  }
73
30
  };
74
-
75
- (0, _react.useEffect)(function () {
76
- if (currentQindex !== (query === null || query === void 0 ? void 0 : query.qindex)) {
77
- setCurrentQindex(query === null || query === void 0 ? void 0 : query.qindex);
31
+ (0, _react.useEffect)(() => {
32
+ if (currentQindex !== query?.qindex) {
33
+ setCurrentQindex(query?.qindex);
78
34
  }
79
35
  }, [currentQindex, history, location, query]);
80
36
  return [currentQindex, handleQindexChange];
81
37
  };
82
-
83
- __signature__(useQIndex, "useHistory{history}\nuseLocation{location}\nuseState{[currentQindex, setCurrentQindex](query?.qindex)}\nuseEffect{}", function () {
84
- return [_reactRouterDom.useHistory, _reactRouterDom.useLocation];
85
- });
86
-
87
- var _default = useQIndex;
88
- var _default2 = _default;
89
- exports.default = _default2;
90
- ;
91
-
92
- (function () {
93
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
94
-
95
- if (!reactHotLoader) {
96
- return;
97
- }
98
-
99
- reactHotLoader.register(useQIndex, "useQIndex", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useQIndex.js");
100
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useQIndex.js");
101
- })();
102
-
103
- ;
104
-
105
- (function () {
106
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
107
- leaveModule && leaveModule(module);
108
- })();
38
+ var _default = exports.default = useQIndex;
@@ -4,44 +4,23 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _reactQuery = require("react-query");
13
-
14
10
  var _core = require("@folio/stripes/core");
15
-
16
11
  var _utils = require("../utils");
17
-
18
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ const useRefdata = _ref => {
14
+ let {
15
+ endpoint,
16
+ desc,
17
+ options = _utils.refdataOptions,
18
+ queryParams,
19
+ returnQueryObject = false
20
+ } = _ref;
21
+ const ky = (0, _core.useOkapiKy)();
22
+ const nsValues = {};
19
23
 
20
- (function () {
21
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
22
- enterModule && enterModule(module);
23
- })();
24
-
25
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26
- return a;
27
- };
28
-
29
- var useRefdata = function useRefdata(_ref) {
30
- var endpoint = _ref.endpoint,
31
- desc = _ref.desc,
32
- queryParams = _ref.queryParams,
33
- _ref$returnQueryObjec = _ref.returnQueryObject,
34
- returnQueryObject = _ref$returnQueryObjec === void 0 ? false : _ref$returnQueryObjec,
35
- _ref$options = _ref.options,
36
- options = _ref$options === void 0 ? {
37
- filterKeys: {
38
- DescKey: 'desc'
39
- },
40
- stats: false,
41
- max: 100
42
- } : _ref$options;
43
- var ky = (0, _core.useOkapiKy)();
44
- var nsValues = {};
45
24
  /* Desc will tend to contain a '.', which will throw off generateKiwtQuery.
46
25
  * To combat this we can insert another Desc. at the beginning to act as the filtername, so
47
26
  * Funder.Name => Desc.desc=Funder.Name. This way "Desc" acts as the filterName, and without a filterKey
@@ -50,57 +29,26 @@ var useRefdata = function useRefdata(_ref) {
50
29
 
51
30
  if (Array.isArray(desc)) {
52
31
  // If we have an array, append a desc filter for each desc given
53
- nsValues.filters = desc.map(function (d) {
54
- return "DescKey.".concat(d);
55
- }).join(',');
32
+ nsValues.filters = desc.map(d => `DescKey.${d}`).join(',');
56
33
  } else if (desc) {
57
34
  // If we just have a string, append a single desc filter
58
- nsValues.filters = "DescKey.".concat(desc);
35
+ nsValues.filters = `DescKey.${desc}`;
59
36
  }
60
-
61
- var query = (0, _utils.generateKiwtQuery)(options, nsValues);
62
- var path = "".concat(endpoint).concat(query);
63
- var queryObject = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useRefdata', 'refdata', desc !== null && desc !== void 0 ? desc : ''], function () {
64
- return ky(path).json();
65
- }, queryParams);
66
-
37
+ const query = (0, _utils.generateKiwtQuery)(options, nsValues);
38
+ const path = `${endpoint}${query}`;
39
+ const queryObject = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useRefdata', 'refdata', desc ?? ''], () => ky(path).json(), queryParams);
67
40
  if (returnQueryObject) {
68
41
  return queryObject || {};
69
42
  }
70
-
71
- var refdata = queryObject.data;
43
+ const {
44
+ data: refdata
45
+ } = queryObject;
72
46
  return refdata || [];
73
47
  };
74
-
75
- __signature__(useRefdata, "useOkapiKy{ky}\nuseQuery{queryObject}", function () {
76
- return [_core.useOkapiKy, _reactQuery.useQuery];
77
- });
78
-
79
48
  useRefdata.propTypes = {
80
49
  endpoint: _propTypes.default.string,
81
50
  desc: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
82
51
  queryParams: _propTypes.default.object,
83
52
  returnQueryObject: _propTypes.default.bool
84
53
  };
85
- var _default = useRefdata;
86
- var _default2 = _default;
87
- exports.default = _default2;
88
- ;
89
-
90
- (function () {
91
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
92
-
93
- if (!reactHotLoader) {
94
- return;
95
- }
96
-
97
- reactHotLoader.register(useRefdata, "useRefdata", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useRefdata.js");
98
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useRefdata.js");
99
- })();
100
-
101
- ;
102
-
103
- (function () {
104
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
105
- leaveModule && leaveModule(module);
106
- })();
54
+ var _default = exports.default = useRefdata;
@@ -4,74 +4,30 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _reactQuery = require("react-query");
11
-
12
9
  var _core = require("@folio/stripes/core");
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- (function () {
17
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
18
- enterModule && enterModule(module);
19
- })();
20
-
21
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
22
- return a;
23
- };
24
-
25
- var useTemplates = function useTemplates(_ref) {
26
- var context = _ref.context,
27
- endpoint = _ref.endpoint,
28
- queryParams = _ref.queryParams,
29
- sort = _ref.sort;
30
- var ky = (0, _core.useOkapiKy)();
31
- var extraPathItems = [];
32
-
11
+ const useTemplates = _ref => {
12
+ let {
13
+ context,
14
+ endpoint,
15
+ queryParams,
16
+ sort
17
+ } = _ref;
18
+ const ky = (0, _core.useOkapiKy)();
19
+ const extraPathItems = [];
33
20
  if (context) {
34
- extraPathItems.push("filters=context=".concat(context));
21
+ extraPathItems.push(`filters=context=${context}`);
35
22
  }
36
-
37
23
  if (sort) {
38
- extraPathItems.push("sort=".concat(sort));
24
+ extraPathItems.push(`sort=${sort}`);
39
25
  }
40
-
41
26
  extraPathItems.push('max=500');
42
- var path = "".concat(endpoint, "?").concat(extraPathItems.join('&'));
43
-
44
- var _useQuery = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context !== null && context !== void 0 ? context : ''], function () {
45
- return ky(path).json();
46
- }, queryParams),
47
- templates = _useQuery.data;
48
-
27
+ const path = `${endpoint}?${extraPathItems.join('&')}`;
28
+ const {
29
+ data: templates
30
+ } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context ?? ''], () => ky(path).json(), queryParams);
49
31
  return templates || [];
50
32
  };
51
-
52
- __signature__(useTemplates, "useOkapiKy{ky}\nuseQuery{{ data: templates }}", function () {
53
- return [_core.useOkapiKy, _reactQuery.useQuery];
54
- });
55
-
56
- var _default = useTemplates;
57
- var _default2 = _default;
58
- exports.default = _default2;
59
- ;
60
-
61
- (function () {
62
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
63
-
64
- if (!reactHotLoader) {
65
- return;
66
- }
67
-
68
- reactHotLoader.register(useTemplates, "useTemplates", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useTemplates.js");
69
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useTemplates.js");
70
- })();
71
-
72
- ;
73
-
74
- (function () {
75
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
76
- leaveModule && leaveModule(module);
77
- })();
33
+ var _default = exports.default = useTemplates;
@@ -4,68 +4,28 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = buildUrl;
7
-
8
- var _forOwn2 = _interopRequireDefault(require("lodash/forOwn"));
9
-
10
- var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
11
-
12
- var _unset2 = _interopRequireDefault(require("lodash/unset"));
13
-
14
7
  var _queryString = _interopRequireDefault(require("query-string"));
15
-
8
+ var _lodash = require("lodash");
16
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- (function () {
19
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
20
- enterModule && enterModule(module);
21
- })();
22
-
23
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24
- return a;
25
- };
10
+ // File copied from https://github.com/folio-org/stripes-smart-components/blob/master/lib/SearchAndSort/buildUrl.js
26
11
 
27
12
  function getLocationQuery(location) {
28
13
  return location.query ? location.query : _queryString.default.parse(location.search);
29
14
  }
30
-
31
15
  function removeEmpty(obj) {
32
- var cleanObj = {};
33
- (0, _forOwn2.default)(obj, function (value, key) {
16
+ const cleanObj = {};
17
+ (0, _lodash.forOwn)(obj, (value, key) => {
34
18
  if (value) cleanObj[key] = value;
35
19
  });
36
20
  return cleanObj;
37
21
  }
38
-
39
22
  function buildUrl(location, values, basePath) {
40
- var locationQuery = getLocationQuery(location);
41
- var url = values._path || basePath || location.pathname;
42
- var params = removeEmpty(Object.assign(locationQuery, values));
43
- (0, _unset2.default)(params, '_path');
44
-
45
- if (!(0, _isEmpty2.default)(params)) {
46
- url += "?".concat(_queryString.default.stringify(params));
23
+ const locationQuery = getLocationQuery(location);
24
+ let url = values._path || basePath || location.pathname;
25
+ const params = removeEmpty(Object.assign(locationQuery, values));
26
+ (0, _lodash.unset)(params, '_path');
27
+ if (!(0, _lodash.isEmpty)(params)) {
28
+ url += `?${_queryString.default.stringify(params)}`;
47
29
  }
48
-
49
30
  return url;
50
- }
51
-
52
- ;
53
-
54
- (function () {
55
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
56
-
57
- if (!reactHotLoader) {
58
- return;
59
- }
60
-
61
- reactHotLoader.register(getLocationQuery, "getLocationQuery", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/buildUrl.js");
62
- reactHotLoader.register(removeEmpty, "removeEmpty", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/buildUrl.js");
63
- reactHotLoader.register(buildUrl, "buildUrl", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/buildUrl.js");
64
- })();
65
-
66
- ;
67
-
68
- (function () {
69
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
70
- leaveModule && leaveModule(module);
71
- })();
31
+ }
@@ -4,46 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _generateKiwtQueryParams = _interopRequireDefault(require("./generateKiwtQueryParams"));
9
-
10
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- (function () {
13
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
14
- enterModule && enterModule(module);
15
- })();
16
-
17
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18
- return a;
19
- };
20
-
21
- var generateKiwtQuery = function generateKiwtQuery(options, nsValues) {
22
- var paramsArray = (0, _generateKiwtQueryParams.default)(options, nsValues);
23
- return paramsArray.length ? '?' + paramsArray.map(function (p) {
24
- return encodeURI(p);
25
- }).join('&') : '';
9
+ const generateKiwtQuery = (options, nsValues) => {
10
+ const paramsArray = (0, _generateKiwtQueryParams.default)(options, nsValues);
11
+ return paramsArray.length ? '?' + paramsArray.map(p => encodeURI(p)).join('&') : '';
26
12
  };
27
-
28
- var _default = generateKiwtQuery;
29
- var _default2 = _default;
30
- exports.default = _default2;
31
- ;
32
-
33
- (function () {
34
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
35
-
36
- if (!reactHotLoader) {
37
- return;
38
- }
39
-
40
- reactHotLoader.register(generateKiwtQuery, "generateKiwtQuery", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/generateKiwtQuery.js");
41
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/generateKiwtQuery.js");
42
- })();
43
-
44
- ;
45
-
46
- (function () {
47
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
48
- leaveModule && leaveModule(module);
49
- })();
13
+ var _default = exports.default = generateKiwtQuery;