openstack-uicore-foundation 4.2.26 → 5.0.0-beta.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 (265) hide show
  1. package/.claude/settings.local.json +12 -0
  2. package/lib/components/ajaxloader.js.map +1 -1
  3. package/lib/components/attendance-tracker.js +1 -1
  4. package/lib/components/attendance-tracker.js.map +1 -1
  5. package/lib/components/bulk-actions-selector.js.map +1 -1
  6. package/lib/components/circle-button.js.map +1 -1
  7. package/lib/components/clock.js +1 -1
  8. package/lib/components/clock.js.map +1 -1
  9. package/lib/components/exclusive-wrapper.js.map +1 -1
  10. package/lib/components/extra-questions-mui.js.map +1 -1
  11. package/lib/components/extra-questions.js +1 -1
  12. package/lib/components/extra-questions.js.map +1 -1
  13. package/lib/components/form-validation.js.map +1 -1
  14. package/lib/components/forms/rsvp-form.js.map +1 -1
  15. package/lib/components/forms/simple-form.js +1 -1
  16. package/lib/components/forms/simple-form.js.map +1 -1
  17. package/lib/components/free-text-search.js +1 -1
  18. package/lib/components/free-text-search.js.map +1 -1
  19. package/lib/components/google-map.js +1 -1
  20. package/lib/components/google-map.js.map +1 -1
  21. package/lib/components/index.js +1 -1
  22. package/lib/components/index.js.map +1 -1
  23. package/lib/components/inputs/access-levels-input.js +1 -1
  24. package/lib/components/inputs/access-levels-input.js.map +1 -1
  25. package/lib/components/inputs/action-dropdown.js.map +1 -1
  26. package/lib/components/inputs/attendee-input.js +1 -1
  27. package/lib/components/inputs/attendee-input.js.map +1 -1
  28. package/lib/components/inputs/checkbox-list.js.map +1 -1
  29. package/lib/components/inputs/company-input-v2.js +1 -1
  30. package/lib/components/inputs/company-input-v2.js.map +1 -1
  31. package/lib/components/inputs/company-input.js +1 -1
  32. package/lib/components/inputs/company-input.js.map +1 -1
  33. package/lib/components/inputs/country-dropdown.js +1 -1
  34. package/lib/components/inputs/country-dropdown.js.map +1 -1
  35. package/lib/components/inputs/country-input.js +1 -1
  36. package/lib/components/inputs/country-input.js.map +1 -1
  37. package/lib/components/inputs/datetimepicker.js.map +1 -1
  38. package/lib/components/inputs/dropdown.js.map +1 -1
  39. package/lib/components/inputs/editor-input-v2.js.map +1 -1
  40. package/lib/components/inputs/editor-input-v3.js.map +1 -1
  41. package/lib/components/inputs/editor-input.js.map +1 -1
  42. package/lib/components/inputs/event-input.js +1 -1
  43. package/lib/components/inputs/event-input.js.map +1 -1
  44. package/lib/components/inputs/free-multi-text-input.js.map +1 -1
  45. package/lib/components/inputs/group-input.js +1 -1
  46. package/lib/components/inputs/group-input.js.map +1 -1
  47. package/lib/components/inputs/grouped-dropdown.js.map +1 -1
  48. package/lib/components/inputs/language-input.js +1 -1
  49. package/lib/components/inputs/language-input.js.map +1 -1
  50. package/lib/components/inputs/member-input.js +1 -1
  51. package/lib/components/inputs/member-input.js.map +1 -1
  52. package/lib/components/inputs/operator-input.js.map +1 -1
  53. package/lib/components/inputs/organization-input.js +1 -1
  54. package/lib/components/inputs/organization-input.js.map +1 -1
  55. package/lib/components/inputs/promocode-input.js +1 -1
  56. package/lib/components/inputs/promocode-input.js.map +1 -1
  57. package/lib/components/inputs/radio-list.js.map +1 -1
  58. package/lib/components/inputs/registration-company-input.js +1 -1
  59. package/lib/components/inputs/registration-company-input.js.map +1 -1
  60. package/lib/components/inputs/speaker-input.js +1 -1
  61. package/lib/components/inputs/speaker-input.js.map +1 -1
  62. package/lib/components/inputs/sponsor-input.js +1 -1
  63. package/lib/components/inputs/sponsor-input.js.map +1 -1
  64. package/lib/components/inputs/stepped-select.js.map +1 -1
  65. package/lib/components/inputs/summit-days-select.js.map +1 -1
  66. package/lib/components/inputs/summit-input.js +1 -1
  67. package/lib/components/inputs/summit-input.js.map +1 -1
  68. package/lib/components/inputs/summit-venues-select.js.map +1 -1
  69. package/lib/components/inputs/tag-input.js +1 -1
  70. package/lib/components/inputs/tag-input.js.map +1 -1
  71. package/lib/components/inputs/text-input.js.map +1 -1
  72. package/lib/components/inputs/textarea-input.js.map +1 -1
  73. package/lib/components/inputs/ticket-types-input.js +1 -1
  74. package/lib/components/inputs/ticket-types-input.js.map +1 -1
  75. package/lib/components/inputs/upload-input-v2.js +1 -1
  76. package/lib/components/inputs/upload-input-v2.js.map +1 -1
  77. package/lib/components/inputs/upload-input-v3.js +1 -1
  78. package/lib/components/inputs/upload-input-v3.js.map +1 -1
  79. package/lib/components/inputs/upload-input.js.map +1 -1
  80. package/lib/components/mui/alert-button.js +2 -0
  81. package/lib/components/mui/alert-button.js.map +1 -0
  82. package/lib/components/mui/alert-modal.js +2 -0
  83. package/lib/components/mui/alert-modal.js.map +1 -0
  84. package/lib/components/mui/auth-button.js +2 -0
  85. package/lib/components/mui/auth-button.js.map +1 -0
  86. package/lib/components/mui/cart-button.js +2 -0
  87. package/lib/components/mui/cart-button.js.map +1 -0
  88. package/lib/components/mui/checkbox-list.js +2 -0
  89. package/lib/components/mui/checkbox-list.js.map +1 -0
  90. package/lib/components/mui/chip-list.js +2 -0
  91. package/lib/components/mui/chip-list.js.map +1 -0
  92. package/lib/components/mui/chip-notify.js +2 -0
  93. package/lib/components/mui/chip-notify.js.map +1 -0
  94. package/lib/components/mui/chip-select-input.js +2 -0
  95. package/lib/components/mui/chip-select-input.js.map +1 -0
  96. package/lib/components/mui/confirm-delete-dialog.js +2 -0
  97. package/lib/components/mui/confirm-delete-dialog.js.map +1 -0
  98. package/lib/components/mui/confirm-dialog.js +2 -0
  99. package/lib/components/mui/confirm-dialog.js.map +1 -0
  100. package/lib/components/mui/custom-alert.js +2 -0
  101. package/lib/components/mui/custom-alert.js.map +1 -0
  102. package/lib/components/mui/dashboard-card.js +2 -0
  103. package/lib/components/mui/dashboard-card.js.map +1 -0
  104. package/lib/components/mui/dnd-list.js +2 -0
  105. package/lib/components/mui/dnd-list.js.map +1 -0
  106. package/lib/components/mui/download-btn.js +2 -0
  107. package/lib/components/mui/download-btn.js.map +1 -0
  108. package/lib/components/mui/dropdown-checkbox.js +2 -0
  109. package/lib/components/mui/dropdown-checkbox.js.map +1 -0
  110. package/lib/components/mui/editable-table.js +2 -0
  111. package/lib/components/mui/editable-table.js.map +1 -0
  112. package/lib/components/mui/form-item-table.js +2 -0
  113. package/lib/components/mui/form-item-table.js.map +1 -0
  114. package/lib/components/mui/formik-inputs/additional-input-list.js +2 -0
  115. package/lib/components/mui/formik-inputs/additional-input-list.js.map +1 -0
  116. package/lib/components/mui/formik-inputs/additional-input.js +2 -0
  117. package/lib/components/mui/formik-inputs/additional-input.js.map +1 -0
  118. package/lib/components/mui/formik-inputs/async-select.js +2 -0
  119. package/lib/components/mui/formik-inputs/async-select.js.map +1 -0
  120. package/lib/components/mui/formik-inputs/checkbox-group.js +2 -0
  121. package/lib/components/mui/formik-inputs/checkbox-group.js.map +1 -0
  122. package/lib/components/mui/formik-inputs/checkbox.js +2 -0
  123. package/lib/components/mui/formik-inputs/checkbox.js.map +1 -0
  124. package/lib/components/mui/formik-inputs/company-input.js +2 -0
  125. package/lib/components/mui/formik-inputs/company-input.js.map +1 -0
  126. package/lib/components/mui/formik-inputs/datepicker.js +2 -0
  127. package/lib/components/mui/formik-inputs/datepicker.js.map +1 -0
  128. package/lib/components/mui/formik-inputs/discount-field.js +2 -0
  129. package/lib/components/mui/formik-inputs/discount-field.js.map +1 -0
  130. package/lib/components/mui/formik-inputs/dropdown-checkbox.js +2 -0
  131. package/lib/components/mui/formik-inputs/dropdown-checkbox.js.map +1 -0
  132. package/lib/components/mui/formik-inputs/dropdown-radio.js +2 -0
  133. package/lib/components/mui/formik-inputs/dropdown-radio.js.map +1 -0
  134. package/lib/components/mui/formik-inputs/file-size-field.js +2 -0
  135. package/lib/components/mui/formik-inputs/file-size-field.js.map +1 -0
  136. package/lib/components/mui/formik-inputs/item-price-tiers.js +2 -0
  137. package/lib/components/mui/formik-inputs/item-price-tiers.js.map +1 -0
  138. package/lib/components/mui/formik-inputs/price-field.js +2 -0
  139. package/lib/components/mui/formik-inputs/price-field.js.map +1 -0
  140. package/lib/components/mui/formik-inputs/quantity-field.js +2 -0
  141. package/lib/components/mui/formik-inputs/quantity-field.js.map +1 -0
  142. package/lib/components/mui/formik-inputs/radio-group.js +2 -0
  143. package/lib/components/mui/formik-inputs/radio-group.js.map +1 -0
  144. package/lib/components/mui/formik-inputs/select-group.js +2 -0
  145. package/lib/components/mui/formik-inputs/select-group.js.map +1 -0
  146. package/lib/components/mui/formik-inputs/select.js +2 -0
  147. package/lib/components/mui/formik-inputs/select.js.map +1 -0
  148. package/lib/components/mui/formik-inputs/sponsor-input.js +2 -0
  149. package/lib/components/mui/formik-inputs/sponsor-input.js.map +1 -0
  150. package/lib/components/mui/formik-inputs/sponsorship-input.js +2 -0
  151. package/lib/components/mui/formik-inputs/sponsorship-input.js.map +1 -0
  152. package/lib/components/mui/formik-inputs/sponsorship-summit-select.js +2 -0
  153. package/lib/components/mui/formik-inputs/sponsorship-summit-select.js.map +1 -0
  154. package/lib/components/mui/formik-inputs/summit-addon-select.js +2 -0
  155. package/lib/components/mui/formik-inputs/summit-addon-select.js.map +1 -0
  156. package/lib/components/mui/formik-inputs/switch.js +2 -0
  157. package/lib/components/mui/formik-inputs/switch.js.map +1 -0
  158. package/lib/components/mui/formik-inputs/textfield.js +2 -0
  159. package/lib/components/mui/formik-inputs/textfield.js.map +1 -0
  160. package/lib/components/mui/formik-inputs/timepicker.js +2 -0
  161. package/lib/components/mui/formik-inputs/timepicker.js.map +1 -0
  162. package/lib/components/mui/formik-inputs/upload.js +2 -0
  163. package/lib/components/mui/formik-inputs/upload.js.map +1 -0
  164. package/lib/components/mui/infinite-table.js +2 -0
  165. package/lib/components/mui/infinite-table.js.map +1 -0
  166. package/lib/components/mui/item-settings-modal.js +2 -0
  167. package/lib/components/mui/item-settings-modal.js.map +1 -0
  168. package/lib/components/mui/loading-overlay.js +2 -0
  169. package/lib/components/mui/loading-overlay.js.map +1 -0
  170. package/lib/components/mui/menu-button.js +2 -0
  171. package/lib/components/mui/menu-button.js.map +1 -0
  172. package/lib/components/mui/nav-bar.js +2 -0
  173. package/lib/components/mui/nav-bar.js.map +1 -0
  174. package/lib/components/mui/notes-modal.js +2 -0
  175. package/lib/components/mui/notes-modal.js.map +1 -0
  176. package/lib/components/mui/order-summary.js +2 -0
  177. package/lib/components/mui/order-summary.js.map +1 -0
  178. package/lib/components/mui/search-input.js +2 -0
  179. package/lib/components/mui/search-input.js.map +1 -0
  180. package/lib/components/mui/show-confirm-dialog.js +2 -0
  181. package/lib/components/mui/show-confirm-dialog.js.map +1 -0
  182. package/lib/components/mui/snackbar-notification.js +2 -0
  183. package/lib/components/mui/snackbar-notification.js.map +1 -0
  184. package/lib/components/mui/sortable-table.js +2 -0
  185. package/lib/components/mui/sortable-table.js.map +1 -0
  186. package/lib/components/mui/sponsor-addon-select.js +2 -0
  187. package/lib/components/mui/sponsor-addon-select.js.map +1 -0
  188. package/lib/components/mui/status-chip.js +2 -0
  189. package/lib/components/mui/status-chip.js.map +1 -0
  190. package/lib/components/mui/stripe-payment.js +2 -0
  191. package/lib/components/mui/stripe-payment.js.map +1 -0
  192. package/lib/components/mui/summit-addon-select.js +2 -0
  193. package/lib/components/mui/summit-addon-select.js.map +1 -0
  194. package/lib/components/mui/summits-dropdown.js +2 -0
  195. package/lib/components/mui/summits-dropdown.js.map +1 -0
  196. package/lib/components/mui/table.js +2 -0
  197. package/lib/components/mui/table.js.map +1 -0
  198. package/lib/components/mui/upload-btn.js +2 -0
  199. package/lib/components/mui/upload-btn.js.map +1 -0
  200. package/lib/components/mui/upload-dialog.js +2 -0
  201. package/lib/components/mui/upload-dialog.js.map +1 -0
  202. package/lib/components/progressive-img.js.map +1 -1
  203. package/lib/components/raw-html.js.map +1 -1
  204. package/lib/components/schedule-builder-view.js +1 -1
  205. package/lib/components/schedule-builder-view.js.map +1 -1
  206. package/lib/components/sections/panel.js.map +1 -1
  207. package/lib/components/simple-link-list.js.map +1 -1
  208. package/lib/components/sponsored-project-input.js +1 -1
  209. package/lib/components/sponsored-project-input.js.map +1 -1
  210. package/lib/components/summit-dropdown.js.map +1 -1
  211. package/lib/components/table-editable.js +1 -1
  212. package/lib/components/table-editable.js.map +1 -1
  213. package/lib/components/table-selectable.js.map +1 -1
  214. package/lib/components/table-sortable.js.map +1 -1
  215. package/lib/components/table.js.map +1 -1
  216. package/lib/components/video-stream.js.map +1 -1
  217. package/lib/css/components/extra-questions.css +1 -1
  218. package/lib/css/components/extra-questions.css.map +1 -1
  219. package/lib/css/components/free-text-search.css +1 -1
  220. package/lib/css/components/free-text-search.css.map +1 -1
  221. package/lib/css/components/index.css +2 -2
  222. package/lib/css/components/index.css.map +1 -1
  223. package/lib/css/components/mui/auth-button.css +1 -0
  224. package/lib/css/components/mui/formik-inputs/upload.css +2 -0
  225. package/lib/css/components/mui/formik-inputs/upload.css.map +1 -0
  226. package/lib/css/components/mui/infinite-table.css +2 -0
  227. package/lib/css/components/mui/infinite-table.css.map +1 -0
  228. package/lib/css/components/mui/nav-bar.css +1 -0
  229. package/lib/css/components/mui/sortable-table.css +2 -0
  230. package/lib/css/components/mui/sortable-table.css.map +1 -0
  231. package/lib/css/components/mui/table.css +2 -0
  232. package/lib/css/components/mui/table.css.map +1 -0
  233. package/lib/css/components/mui/upload-dialog.css +2 -0
  234. package/lib/css/components/mui/upload-dialog.css.map +1 -0
  235. package/lib/i18n.js +1 -1
  236. package/lib/i18n.js.map +1 -1
  237. package/lib/models/index.js.map +1 -1
  238. package/lib/models/summit-event.js.map +1 -1
  239. package/lib/security/abstract-auth-callback-route-v2.js +1 -1
  240. package/lib/security/abstract-auth-callback-route-v2.js.map +1 -1
  241. package/lib/security/abstract-auth-callback-route.js +1 -1
  242. package/lib/security/abstract-auth-callback-route.js.map +1 -1
  243. package/lib/security/actions.js +1 -1
  244. package/lib/security/actions.js.map +1 -1
  245. package/lib/security/methods.js +1 -1
  246. package/lib/security/methods.js.map +1 -1
  247. package/lib/security/reducers.js +1 -1
  248. package/lib/security/reducers.js.map +1 -1
  249. package/lib/security/session-checker.js +1 -1
  250. package/lib/security/session-checker.js.map +1 -1
  251. package/lib/utils/actions.js +1 -1
  252. package/lib/utils/actions.js.map +1 -1
  253. package/lib/utils/fragment-parser.js.map +1 -1
  254. package/lib/utils/methods.js +1 -1
  255. package/lib/utils/methods.js.map +1 -1
  256. package/lib/utils/money.js +1 -1
  257. package/lib/utils/money.js.map +1 -1
  258. package/lib/utils/query-actions.js +1 -1
  259. package/lib/utils/query-actions.js.map +1 -1
  260. package/lib/utils/questions-set.js +1 -1
  261. package/lib/utils/questions-set.js.map +1 -1
  262. package/lib/utils/reducers.js +1 -1
  263. package/lib/utils/reducers.js.map +1 -1
  264. package/lib/utils/use-fit-text.js.map +1 -1
  265. package/package.json +26 -12
@@ -1 +1 @@
1
- {"version":3,"file":"components/forms/rsvp-form.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,gRCUM,MAAMC,UAAqBC,IAAAA,UAEtCC,WAAAA,CAAYC,GACRC,MAAMD,GAEN,IAAIE,IAAaF,EAAMG,OAAQH,EAAMG,MAAMC,MAAMC,IAAML,EAAMM,QAAQC,KAAIC,GAAMA,EAAGL,QAAOM,SAASJ,KAElGT,KAAKc,MAAQ,CACTC,eAAgBT,GAGpBN,KAAKgB,aAAehB,KAAKgB,aAAaC,KAAKjB,MAC3CA,KAAKkB,oBAAsBlB,KAAKkB,oBAAoBD,KAAKjB,KAC5D,CAEDgB,YAAAA,CAAaG,GACT,IAAIC,EAAepB,KAAKI,MAAMM,QAAQC,KAAIC,GAAMA,EAAGL,QAC/CA,EAAQP,KAAKI,MAAMG,MAAQ,IAAIP,KAAKI,MAAMG,OAAS,GAEvD,GAA0B,aAAtBY,EAAME,OAAOC,KACb,GAAIH,EAAME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AE4F,EAAF,SAAae,GAAa5I,KAAKI,MAEnC,OACI,0BAAM+B,UAAU,aACX0F,EAAUlH,KAAImH,GACX,yBAAK5E,IAAK,YAAY4E,EAAEhG,GAAIK,UAAU,kBAClC,yBAAKA,UAAU,aACX,+BACI,kBAAC,UAAD,KAAU2F,EAAE1E,OADhB,IACkC0E,EAAEe,cAAgB,KAEnD7I,KAAKmI,eAAeL,OAIhCc,GACG,yBAAKzG,UAAU,OACX,yBAAKA,UAAU,aACX,4BAAQA,UAAU,kBAAkB2G,QAAS9I,KAAKkI,cAAlD,YAMvB,EAGL,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/inputs/checkbox-list.js","webpack://openstack-uicore-foundation/./src/components/inputs/dropdown.js","webpack://openstack-uicore-foundation/./src/components/inputs/radio-list.js","webpack://openstack-uicore-foundation/./src/components/inputs/text-input.js","webpack://openstack-uicore-foundation/./src/components/raw-html/index.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-select\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/forms/rsvp-form.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\nimport PropTypes from 'prop-types'\nimport React from 'react';\nimport T from 'i18n-react/dist/i18n-react';\nimport RawHTML from '../raw-html';\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\n\nexport default class CheckboxList extends React.Component {\n\n constructor(props) {\n super(props);\n\n let otherValue = props.value ? props.value.find( v => !props.options.map(op => op.value).includes(v) ) : false;\n\n this.state = {\n otherChecked: !!otherValue\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleOtherCBChange = this.handleOtherCBChange.bind(this);\n }\n\n handleChange(event) {\n let optionValues = this.props.options.map(op => op.value);\n let value = this.props.value ? [...this.props.value] : [];\n\n if (event.target.type === 'checkbox') {\n if (event.target.checked) {\n const theVal = isNaN(event.target.value) ? event.target.value : parseInt(event.target.value);\n value.push(theVal);\n } else {\n value = value.filter( v => v != event.target.value )\n }\n } else {\n value = value.filter(v => optionValues.includes(v));\n value.push(event.target.value);\n }\n\n let ev = {target: {\n id: this.props.id,\n value: value,\n type: 'checkboxlist'\n }};\n\n this.props.onChange(ev);\n }\n\n handleOtherCBChange(event) {\n this.setState({otherChecked: event.target.checked});\n }\n\n render() {\n\n let {onChange, value, className, options, id, children, error, disabled,name, ariaLabelledBy, ...rest} = this.props;\n let { otherChecked } = this.state;\n\n let inline = ( this.props.hasOwnProperty('inline') );\n let allowOther = ( this.props.hasOwnProperty('allowOther') );\n let otherValue = value ? value.find( v => !options.map(op => op.value).includes(v) ) : false ;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n } else {\n style = {\n paddingLeft: '22px',\n marginTop: '7px'\n }\n }\n\n return (\n <div id={`chl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n <div className={\"checkboxes-div\" + (has_error ? ' error' : '') }>\n { options.map(op => {\n let checked = value ? value.includes(op.value) : false;\n return (\n <div className=\"form-check abc-checkbox\" key={\"radio_key_\" + op.value} style={style}>\n <input type=\"checkbox\"\n id={`cb_${id}_${op.value}`}\n name={name? name : id }\n checked={checked}\n disabled={isDisabled}\n onChange={this.handleChange} className=\"form-check-input\" value={op.value} />\n <label className=\"form-check-label\" htmlFor={`cb_${id}_${op.value}` } >\n <RawHTML>{op.label}</RawHTML>\n </label>\n </div>\n )\n })}\n\n {allowOther &&\n <div className=\"form-check abc-checkbox\" style={style}>\n <input type=\"checkbox\" id={\"cb_other\" + id} checked={otherChecked} disabled={isDisabled}\n onChange={this.handleOtherCBChange} className=\"form-check-input\" value=\"other\" />\n <label className=\"form-check-label\" htmlFor={\"cb_other\" + id}>\n {T.translate(\"general.other\")}\n </label>\n </div>\n }\n\n {allowOther && otherChecked &&\n <div style={{paddingLeft: '22px', width: '50%'}}>\n <input className=\"form-control\" disabled={isDisabled} onChange={this.handleChange} value={otherValue} />\n </div>\n }\n\n </div>\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nCheckboxList.defaultProps = {\n ariaLabelledBy : null,\n}\n\n\nCheckboxList.propTypes = {\n id: PropTypes.string.isRequired\n};\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport Select from 'react-select';\n\nexport default class Dropdown extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n handleChange(selection) {\n\n let value = null;\n if (this.props.isMulti) {\n value = selection ? selection.map(val => val.value) : null;\n } else {\n value = selection ? selection.value : null;\n }\n\n let ev = {target: {\n id: this.props.id,\n value: value,\n type: 'dropdown'\n }};\n\n this.props.onChange(ev);\n }\n\n render() {\n\n let {onChange, value, className, error, clearable, disabled, overrideCSS, ariaLabelledBy, ...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error != '' );\n let isClearable = (this.props.hasOwnProperty('clearable'));\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n let theValue = null;\n\n let selectClassName = className;\n\n if (!this.props.hasOwnProperty('overrideCSS') || overrideCSS == false) {\n selectClassName = 'dropdown ' + className + ' ' + (has_error ? 'error' : '');\n }\n\n if (this.props.isMulti) {\n theValue = this.props.options.filter(op => value.includes(op.value));\n } else {\n theValue = (value instanceof Object || value == null) ? value : this.props.options.find(opt => opt.value == value);\n }\n\n const selectStyles = { menu: styles => ({ ...styles, zIndex: 999 }) };\n\n return (\n <div>\n <Select\n className={selectClassName}\n value={theValue}\n onChange={this.handleChange}\n isClearable={isClearable}\n isDisabled={isDisabled}\n styles={selectStyles}\n aria-labelledby={ariaLabelledBy}\n formatOptionLabel={(data) => <span dangerouslySetInnerHTML={{ __html: data.label }} />}\n {...rest}\n />\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nDropdown.defaultProps = {\n ariaLabelledBy : null,\n}\n","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport RawHTML from '../raw-html';\nimport PropTypes from 'prop-types'\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\n\nexport default class RadioList extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n value: props.value,\n };\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n handleChange(selection) {\n\n let ev = {target: {\n id: this.props.id,\n value: selection.target.value,\n type: 'radio'\n }};\n\n this.props.onChange(ev);\n }\n\n getLabel(option, id, inline, simple) {\n if (inline) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n <RawHTML>\n {option.label}\n </RawHTML>\n </label>\n );\n } else if (simple) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} >\n {option.label}\n </label>\n );\n } else {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n <h4 style={{marginTop: '0px'}}>{option.label}</h4>\n <RawHTML>{option.description}</RawHTML>\n </label>\n );\n }\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, disabled, options,id, name,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error != '' );\n let inline = ( this.props.hasOwnProperty('inline') );\n let simple = ( this.props.hasOwnProperty('simple') );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n\n\n } else {\n style = {\n paddingLeft: '22px'\n }\n }\n\n return (\n <div id={`rl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n { options.map(op => {\n let checked = (op.value == value);\n return (\n <div className=\"form-check abc-radio\" key={`radio_key_${id}_${op.value}`} style={style}>\n <input\n className=\"form-check-input\"\n type=\"radio\"\n id={`radio_${id}_${op.value}`}\n value={op.value}\n checked={checked}\n onChange={this.handleChange}\n disabled={isDisabled}\n name={name ? name : `radio_${id}`}\n />\n {this.getLabel(op, id, inline, simple)}\n </div>\n )\n })}\n\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nRadioList.defaultProps = {\n ariaLabelledBy : null,\n}\n\nRadioList.propTypes = {\n id: PropTypes.string.isRequired\n};\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\n\nexport default class Input extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (this.props.value !== prevProps.value) {\n this.input.value = this.props.value;\n }\n }\n\n handleChange(ev) {\n this.props.onChange(ev);\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, containerClassName,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let class_name = this.props.hasOwnProperty('className') ? className : 'form-control';\n let container_class_name = this.props.hasOwnProperty('containerClassName') ? containerClassName : 'container-form-control';\n return (\n <div className={container_class_name}>\n <input\n className={`${class_name} ${has_error ? 'error' : ''}`}\n ref={node => {this.input = node}}\n defaultValue={value}\n aria-labelledby={ariaLabelledBy}\n onChange={this.handleChange}\n {...rest}\n />\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nInput.defaultProps = {\n ariaLabelledBy : null,\n}","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\", ...rest}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} {...rest}/>\n\nexport default RawHTML;","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"react-select\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react'\nimport 'awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css'\nimport Input from '../inputs/text-input'\nimport Dropdown from '../inputs/dropdown'\nimport RawHTML from '../raw-html'\nimport CheckboxList from '../inputs/checkbox-list'\nimport RadioList from '../inputs/radio-list'\n\n\nclass RsvpForm extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n answers: props.questions.map(q => ({question_id: q.id, value: null})),\n errors: props.errors\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.hasErrors = this.hasErrors.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n renderQuestion(q) {\n const {answers} = this.state;\n const value = answers.find(a => a.question_id === q.id).value;\n\n switch(q.class_name) {\n case 'RSVPMemberEmailQuestionTemplate':\n case 'RSVPMemberFirstNameQuestionTemplate':\n case 'RSVPMemberLastNameQuestionTemplate':\n case 'RSVPTextBoxQuestionTemplate':\n return (\n <Input\n id={q.id}\n value={value || ''}\n onChange={this.handleChange}\n className=\"form-control\"\n error={this.hasErrors(q.id)}\n />\n );\n break;\n case 'RSVPTextAreaQuestionTemplate':\n return (\n <textarea\n id={q.id}\n value={value || ''}\n className=\"form-control\"\n onChange={this.handleChange}\n />);\n break;\n case 'RSVPLiteralContentQuestionTemplate':\n return (<div><RawHTML>{q.value}</RawHTML></div>);\n break;\n case 'RSVPCheckBoxListQuestionTemplate':\n return (\n <CheckboxList\n id={q.id}\n value={value}\n options={q.values.map(v => ({value: `${v.id}`, label: v.label}))}\n onChange={this.handleChange}\n error={this.hasErrors(q.id)}\n />\n );\n break;\n case 'RSVPRadioButtonListQuestionTemplate':\n return (\n <RadioList\n id={q.id}\n value={value}\n onChange={this.handleChange}\n options={q.values.map(v => ({value: `${v.id}`, label: v.label}))}\n error={this.hasErrors(q.id)}\n simple\n />\n );\n break;\n case 'RSVPDropDownQuestionTemplate':\n let values = (q.is_country_selector) ? q.values.map(v => ({value:v.id, label: v.value})) : q.values;\n\n return (\n <Dropdown\n id={q.id}\n isMulti={q.is_multiselect}\n value={value}\n onChange={this.handleChange}\n placeholder={q.empty_string}\n options={values}\n />\n );\n break;\n }\n }\n\n handleChange(ev) {\n let answers = [...this.state.answers];\n let {value, id} = ev.target;\n\n if (ev.target.type === 'datetime') {\n value = value.valueOf() / 1000;\n }\n\n let answer = answers.find(a => a.question_id === parseInt(id));\n answer.value = value;\n\n this.setState({answers});\n }\n\n hasErrors(field) {\n let {errors} = this.state;\n if(field in errors) {\n return errors[field];\n }\n\n return '';\n }\n\n handleSubmit(ev) {\n ev.preventDefault();\n\n let { onSubmit } = this.props;\n let {answers} = this.state;\n\n onSubmit(answers);\n }\n\n render() {\n let { questions, onSubmit } = this.props;\n\n return (\n <form className=\"rsvp-form\">\n {questions.map(q =>\n <div key={'question_'+q.id} className=\"row form-group\">\n <div className=\"col-md-12\">\n <label>\n <RawHTML>{q.label}</RawHTML> {q.is_mandatory && '*'}\n </label>\n {this.renderQuestion(q)}\n </div>\n </div>\n )}\n {onSubmit &&\n <div className=\"row\">\n <div className=\"col-md-12\">\n <button className=\"btn btn-primary\" onClick={this.handleSubmit}>Submit</button>\n </div>\n </div>\n }\n </form>\n );\n }\n}\n\nexport default RsvpForm;\n"],"names":["root","factory","exports","module","define","amd","this","CheckboxList","React","constructor","props","super","otherValue","value","find","v","options","map","op","includes","state","otherChecked","handleChange","bind","handleOtherCBChange","event","optionValues","target","type","checked","theVal","isNaN","parseInt","push","filter","ev","id","onChange","setState","render","style","className","children","error","disabled","name","ariaLabelledBy","inline","hasOwnProperty","allowOther","has_error","isDisabled","paddingLeft","marginLeft","float","marginTop","key","htmlFor","label","T","width","defaultProps","propTypes","PropTypes","isRequired","Dropdown","selection","isMulti","val","clearable","overrideCSS","rest","isClearable","theValue","selectClassName","Object","opt","selectStyles","menu","styles","zIndex","formatOptionLabel","data","dangerouslySetInnerHTML","__html","RadioList","getLabel","option","simple","display","description","Input","componentDidUpdate","prevProps","prevState","snapshot","input","containerClassName","class_name","container_class_name","ref","node","defaultValue","replaceNewLine","replace","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","obj","prop","prototype","call","r","Symbol","toStringTag","RsvpForm","answers","questions","q","question_id","errors","hasErrors","handleSubmit","renderQuestion","values","is_country_selector","is_multiselect","placeholder","empty_string","valueOf","field","preventDefault","onSubmit","is_mandatory","onClick"],"sourceRoot":""}
1
+ {"version":3,"file":"components/forms/rsvp-form.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,gRCUM,MAAMC,UAAqBC,IAAAA,UAEtCC,WAAAA,CAAYC,GACRC,MAAMD,GAEN,IAAIE,IAAaF,EAAMG,OAAQH,EAAMG,MAAMC,MAAMC,IAAML,EAAMM,QAAQC,KAAI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C,IAAAA,cAAA,aACIA,IAAAA,cAACqD,EAAAA,QAAO,KAAE+E,EAAE9E,OAAgB,IAAE8E,EAAEe,cAAgB,KAEnDrJ,KAAK2I,eAAeL,OAIhCc,GACGlJ,IAAAA,cAAA,OAAKkC,UAAU,OACXlC,IAAAA,cAAA,OAAKkC,UAAU,aACXlC,IAAAA,cAAA,UAAQkC,UAAU,kBAAkBkH,QAAStJ,KAAK0I,cAAc,YAMxF,EAGJ,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/inputs/checkbox-list.js","webpack://openstack-uicore-foundation/./src/components/inputs/dropdown.js","webpack://openstack-uicore-foundation/./src/components/inputs/radio-list.js","webpack://openstack-uicore-foundation/./src/components/inputs/text-input.js","webpack://openstack-uicore-foundation/./src/components/raw-html/index.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-select\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/forms/rsvp-form.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\nimport PropTypes from 'prop-types'\nimport React from 'react';\nimport T from 'i18n-react/dist/i18n-react';\nimport RawHTML from '../raw-html';\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\n\nexport default class CheckboxList extends React.Component {\n\n constructor(props) {\n super(props);\n\n let otherValue = props.value ? props.value.find( v => !props.options.map(op => op.value).includes(v) ) : false;\n\n this.state = {\n otherChecked: !!otherValue\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleOtherCBChange = this.handleOtherCBChange.bind(this);\n }\n\n handleChange(event) {\n let optionValues = this.props.options.map(op => op.value);\n let value = this.props.value ? [...this.props.value] : [];\n\n if (event.target.type === 'checkbox') {\n if (event.target.checked) {\n const theVal = isNaN(event.target.value) ? event.target.value : parseInt(event.target.value);\n value.push(theVal);\n } else {\n value = value.filter( v => v != event.target.value )\n }\n } else {\n value = value.filter(v => optionValues.includes(v));\n value.push(event.target.value);\n }\n\n let ev = {target: {\n id: this.props.id,\n value: value,\n type: 'checkboxlist'\n }};\n\n this.props.onChange(ev);\n }\n\n handleOtherCBChange(event) {\n this.setState({otherChecked: event.target.checked});\n }\n\n render() {\n\n let {onChange, value, className, options, id, children, error, disabled,name, ariaLabelledBy, ...rest} = this.props;\n let { otherChecked } = this.state;\n\n let inline = ( this.props.hasOwnProperty('inline') );\n let allowOther = ( this.props.hasOwnProperty('allowOther') );\n let otherValue = value ? value.find( v => !options.map(op => op.value).includes(v) ) : false ;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n } else {\n style = {\n paddingLeft: '22px',\n marginTop: '7px'\n }\n }\n\n return (\n <div id={`chl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n <div className={\"checkboxes-div\" + (has_error ? ' error' : '') }>\n { options.map(op => {\n let checked = value ? value.includes(op.value) : false;\n return (\n <div className=\"form-check abc-checkbox\" key={\"radio_key_\" + op.value} style={style}>\n <input type=\"checkbox\"\n id={`cb_${id}_${op.value}`}\n name={name? name : id }\n checked={checked}\n disabled={isDisabled}\n onChange={this.handleChange} className=\"form-check-input\" value={op.value} />\n <label className=\"form-check-label\" htmlFor={`cb_${id}_${op.value}` } >\n <RawHTML>{op.label}</RawHTML>\n </label>\n </div>\n )\n })}\n\n {allowOther &&\n <div className=\"form-check abc-checkbox\" style={style}>\n <input type=\"checkbox\" id={\"cb_other\" + id} checked={otherChecked} disabled={isDisabled}\n onChange={this.handleOtherCBChange} className=\"form-check-input\" value=\"other\" />\n <label className=\"form-check-label\" htmlFor={\"cb_other\" + id}>\n {T.translate(\"general.other\")}\n </label>\n </div>\n }\n\n {allowOther && otherChecked &&\n <div style={{paddingLeft: '22px', width: '50%'}}>\n <input className=\"form-control\" disabled={isDisabled} onChange={this.handleChange} value={otherValue} />\n </div>\n }\n\n </div>\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nCheckboxList.defaultProps = {\n ariaLabelledBy : null,\n}\n\n\nCheckboxList.propTypes = {\n id: PropTypes.string.isRequired\n};\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport Select from 'react-select';\n\nexport default class Dropdown extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n handleChange(selection) {\n\n let value = null;\n if (this.props.isMulti) {\n value = selection ? selection.map(val => val.value) : null;\n } else {\n value = selection ? selection.value : null;\n }\n\n let ev = {target: {\n id: this.props.id,\n value: value,\n type: 'dropdown'\n }};\n\n this.props.onChange(ev);\n }\n\n render() {\n\n let {onChange, value, className, error, clearable, disabled, overrideCSS, ariaLabelledBy, ...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error != '' );\n let isClearable = (this.props.hasOwnProperty('clearable'));\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n let theValue = null;\n\n let selectClassName = className;\n\n if (!this.props.hasOwnProperty('overrideCSS') || overrideCSS == false) {\n selectClassName = 'dropdown ' + className + ' ' + (has_error ? 'error' : '');\n }\n\n if (this.props.isMulti) {\n theValue = this.props.options.filter(op => value.includes(op.value));\n } else {\n theValue = (value instanceof Object || value == null) ? value : this.props.options.find(opt => opt.value == value);\n }\n\n const selectStyles = { menu: styles => ({ ...styles, zIndex: 999 }) };\n\n return (\n <div>\n <Select\n className={selectClassName}\n value={theValue}\n onChange={this.handleChange}\n isClearable={isClearable}\n isDisabled={isDisabled}\n styles={selectStyles}\n aria-labelledby={ariaLabelledBy}\n formatOptionLabel={(data) => <span dangerouslySetInnerHTML={{ __html: data.label }} />}\n {...rest}\n />\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nDropdown.defaultProps = {\n ariaLabelledBy : null,\n}\n","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport RawHTML from '../raw-html';\nimport PropTypes from 'prop-types'\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\n\nexport default class RadioList extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n value: props.value,\n };\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n handleChange(selection) {\n\n let ev = {target: {\n id: this.props.id,\n value: selection.target.value,\n type: 'radio'\n }};\n\n this.props.onChange(ev);\n }\n\n getLabel(option, id, inline, simple) {\n if (inline) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n <RawHTML>\n {option.label}\n </RawHTML>\n </label>\n );\n } else if (simple) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} >\n {option.label}\n </label>\n );\n } else {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n <h4 style={{marginTop: '0px'}}>{option.label}</h4>\n <RawHTML>{option.description}</RawHTML>\n </label>\n );\n }\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, disabled, options,id, name,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error != '' );\n let inline = ( this.props.hasOwnProperty('inline') );\n let simple = ( this.props.hasOwnProperty('simple') );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n\n\n } else {\n style = {\n paddingLeft: '22px'\n }\n }\n\n return (\n <div id={`rl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n { options.map(op => {\n let checked = (op.value == value);\n return (\n <div className=\"form-check abc-radio\" key={`radio_key_${id}_${op.value}`} style={style}>\n <input\n className=\"form-check-input\"\n type=\"radio\"\n id={`radio_${id}_${op.value}`}\n value={op.value}\n checked={checked}\n onChange={this.handleChange}\n disabled={isDisabled}\n name={name ? name : `radio_${id}`}\n />\n {this.getLabel(op, id, inline, simple)}\n </div>\n )\n })}\n\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nRadioList.defaultProps = {\n ariaLabelledBy : null,\n}\n\nRadioList.propTypes = {\n id: PropTypes.string.isRequired\n};\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\n\nexport default class Input extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (this.props.value !== prevProps.value) {\n this.input.value = this.props.value;\n }\n }\n\n handleChange(ev) {\n this.props.onChange(ev);\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, containerClassName,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let class_name = this.props.hasOwnProperty('className') ? className : 'form-control';\n let container_class_name = this.props.hasOwnProperty('containerClassName') ? containerClassName : 'container-form-control';\n return (\n <div className={container_class_name}>\n <input\n className={`${class_name} ${has_error ? 'error' : ''}`}\n ref={node => {this.input = node}}\n defaultValue={value}\n aria-labelledby={ariaLabelledBy}\n onChange={this.handleChange}\n {...rest}\n />\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nInput.defaultProps = {\n ariaLabelledBy : null,\n}","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\", ...rest}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} {...rest}/>\n\nexport default RawHTML;","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"react-select\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react'\nimport 'awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css'\nimport Input from '../inputs/text-input'\nimport Dropdown from '../inputs/dropdown'\nimport RawHTML from '../raw-html'\nimport CheckboxList from '../inputs/checkbox-list'\nimport RadioList from '../inputs/radio-list'\n\n\nclass RsvpForm extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n answers: props.questions.map(q => ({question_id: q.id, value: null})),\n errors: props.errors\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.hasErrors = this.hasErrors.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n renderQuestion(q) {\n const {answers} = this.state;\n const value = answers.find(a => a.question_id === q.id).value;\n\n switch(q.class_name) {\n case 'RSVPMemberEmailQuestionTemplate':\n case 'RSVPMemberFirstNameQuestionTemplate':\n case 'RSVPMemberLastNameQuestionTemplate':\n case 'RSVPTextBoxQuestionTemplate':\n return (\n <Input\n id={q.id}\n value={value || ''}\n onChange={this.handleChange}\n className=\"form-control\"\n error={this.hasErrors(q.id)}\n />\n );\n break;\n case 'RSVPTextAreaQuestionTemplate':\n return (\n <textarea\n id={q.id}\n value={value || ''}\n className=\"form-control\"\n onChange={this.handleChange}\n />);\n break;\n case 'RSVPLiteralContentQuestionTemplate':\n return (<div><RawHTML>{q.value}</RawHTML></div>);\n break;\n case 'RSVPCheckBoxListQuestionTemplate':\n return (\n <CheckboxList\n id={q.id}\n value={value}\n options={q.values.map(v => ({value: `${v.id}`, label: v.label}))}\n onChange={this.handleChange}\n error={this.hasErrors(q.id)}\n />\n );\n break;\n case 'RSVPRadioButtonListQuestionTemplate':\n return (\n <RadioList\n id={q.id}\n value={value}\n onChange={this.handleChange}\n options={q.values.map(v => ({value: `${v.id}`, label: v.label}))}\n error={this.hasErrors(q.id)}\n simple\n />\n );\n break;\n case 'RSVPDropDownQuestionTemplate':\n let values = (q.is_country_selector) ? q.values.map(v => ({value:v.id, label: v.value})) : q.values;\n\n return (\n <Dropdown\n id={q.id}\n isMulti={q.is_multiselect}\n value={value}\n onChange={this.handleChange}\n placeholder={q.empty_string}\n options={values}\n />\n );\n break;\n }\n }\n\n handleChange(ev) {\n let answers = [...this.state.answers];\n let {value, id} = ev.target;\n\n if (ev.target.type === 'datetime') {\n value = value.valueOf() / 1000;\n }\n\n let answer = answers.find(a => a.question_id === parseInt(id));\n answer.value = value;\n\n this.setState({answers});\n }\n\n hasErrors(field) {\n let {errors} = this.state;\n if(field in errors) {\n return errors[field];\n }\n\n return '';\n }\n\n handleSubmit(ev) {\n ev.preventDefault();\n\n let { onSubmit } = this.props;\n let {answers} = this.state;\n\n onSubmit(answers);\n }\n\n render() {\n let { questions, onSubmit } = this.props;\n\n return (\n <form className=\"rsvp-form\">\n {questions.map(q =>\n <div key={'question_'+q.id} className=\"row form-group\">\n <div className=\"col-md-12\">\n <label>\n <RawHTML>{q.label}</RawHTML> {q.is_mandatory && '*'}\n </label>\n {this.renderQuestion(q)}\n </div>\n </div>\n )}\n {onSubmit &&\n <div className=\"row\">\n <div className=\"col-md-12\">\n <button className=\"btn btn-primary\" onClick={this.handleSubmit}>Submit</button>\n </div>\n </div>\n }\n </form>\n );\n }\n}\n\nexport default RsvpForm;\n"],"names":["root","factory","exports","module","define","amd","this","CheckboxList","React","constructor","props","super","otherValue","value","find","v","options","map","op","includes","state","otherChecked","handleChange","bind","handleOtherCBChange","event","optionValues","target","type","checked","theVal","isNaN","parseInt","push","filter","ev","id","onChange","setState","render","style","_this$props","className","children","error","disabled","name","ariaLabelledBy","_objectWithoutProperties","_excluded","inline","hasOwnProperty","allowOther","has_error","isDisabled","paddingLeft","marginLeft","float","marginTop","key","htmlFor","RawHTML","label","T","width","defaultProps","propTypes","PropTypes","isRequired","Dropdown","selection","isMulti","val","clearable","overrideCSS","rest","isClearable","theValue","selectClassName","Object","opt","selectStyles","menu","styles","_objectSpread","zIndex","Select","_extends","formatOptionLabel","data","dangerouslySetInnerHTML","__html","RadioList","getLabel","option","simple","display","description","Input","componentDidUpdate","prevProps","prevState","snapshot","input","containerClassName","class_name","container_class_name","ref","node","defaultValue","_ref","replaceNewLine","replace","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","obj","prop","prototype","call","r","Symbol","toStringTag","RsvpForm","answers","questions","q","question_id","errors","hasErrors","handleSubmit","renderQuestion","values","is_country_selector","is_multiselect","placeholder","empty_string","valueOf","field","preventDefault","onSubmit","is_mandatory","onClick"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={7651:(e,t,r)=>{r.d(t,{default:()=>p});var a=r(6031),n=r.n(a),s=r(2462),o=r.n(s),l=r(2015),i=r.n(l);const c=["onChange","value","className","error","ariaLabelledBy","containerClassName"];class p extends i().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}componentDidUpdate(e,t,r){this.props.value!==e.value&&(this.input.value=this.props.value)}handleChange(e){this.props.onChange(e)}render(){let e=this.props,{onChange:t,value:r,className:a,error:s,ariaLabelledBy:l,containerClassName:p}=e,h=o()(e,c),m=this.props.hasOwnProperty("error")&&""!==s,u=this.props.hasOwnProperty("className")?a:"form-control",d=this.props.hasOwnProperty("containerClassName")?p:"container-form-control";return i().createElement("div",{className:d},i().createElement("input",n()({className:`${u} ${m?"error":""}`,ref:e=>{this.input=e},defaultValue:r,"aria-labelledby":l,onChange:this.handleChange},h)),m&&i().createElement("p",{className:"error-label"},s))}}p.defaultProps={ariaLabelledBy:null}},9558:(e,t,r)=>{r.d(t,{hasErrors:()=>n,isEmpty:()=>o,scrollToError:()=>a,shallowEqual:()=>s});r(5812),r(8041);const a=e=>{if(Object.keys(e).length>0){const t=Object.keys(e)[0],r=document.getElementById(t);r&&window.scrollTo(0,(e=>{var t=-70;if(e.offsetParent){do{t+=e.offsetTop}while(e=e.offsetParent);return[t]}})(r))}},n=(e,t)=>e in t?t[e]:"",s=(e,t)=>{const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(let a of r)if(e[a]!==t[a])return!1;return!0},o=e=>0===Object.keys(e).length},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},1536:e=>{e.exports=require("awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},5812:e=>{e.exports=require("moment-timezone")},2015:e=>{e.exports=require("react")},8041:e=>{e.exports=require("urijs")}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,r),s.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var a={};r.r(a),r.d(a,{default:()=>b});var n=r(1116),s=r.n(n),o=r(2015),l=r.n(o),i=r(6842),c=r.n(i),p=(r(1536),r(7651)),h=r(9558);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class d extends l().Component{constructor(e){super(e),this.state={entity:u({},e.entity),errors:e.errors},this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}componentDidUpdate(e,t,r){const a={};(0,h.scrollToError)(this.props.errors),e.entity.id!==this.props.entity.id&&(a.entity=u({},this.props.entity),a.errors={}),(0,h.shallowEqual)(e.errors,this.props.errors)||(a.errors=u({},this.props.errors)),(0,h.isEmpty)(a)||this.setState(u(u({},this.state),a))}handleChange(e){let t=u({},this.state.entity),r=u({},this.state.errors),{value:a,id:n}=e.target;"checkbox"===e.target.type&&(a=e.target.checked),r[n]="",t[n]=a,this.setState({entity:t,errors:r})}handleSubmit(e){u({},this.state.entity);e.preventDefault(),this.props.onSubmit(this.state.entity)}createField(e){let{entity:t,errors:r}=this.state;switch(e.type){case"text":return l().createElement("div",{key:"field_"+e.name,className:"row form-group"},l().createElement("div",{className:"col-md-6"},l().createElement("label",null," ",e.label," "),l().createElement(p.default,{id:e.name,value:t[e.name],onChange:this.handleChange,className:"form-control",error:(0,h.hasErrors)(e.name,r)})));case"textarea":return l().createElement("div",{key:"field_"+e.name,className:"row form-group"},l().createElement("div",{className:"col-md-6"},l().createElement("label",null," ",e.label," "),l().createElement("textarea",{id:e.name,value:t[e.name],onChange:this.handleChange,className:"form-control"})));case"checkbox":return l().createElement("div",{key:"field_"+e.name,className:"row form-group"},l().createElement("div",{className:"col-md-6"},l().createElement("div",{className:"form-check abc-checkbox"},l().createElement("input",{type:"checkbox",id:e.name,checked:t[e.name],onChange:this.handleChange,className:"form-check-input"}),l().createElement("label",{className:"form-check-label",htmlFor:e.name},e.label))))}}render(){let{entity:e}=this.state,{fields:t}=this.props;return l().createElement("form",{className:"simple-form"},l().createElement("input",{type:"hidden",id:"id",value:e.id}),t.map((e=>this.createField(e))),l().createElement("div",{className:"row"},l().createElement("div",{className:"col-md-12 submit-buttons"},l().createElement("input",{type:"button",onClick:this.handleSubmit,className:"btn btn-primary pull-right",value:c().translate("general.save")}))))}}const b=d;return a})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={7651:(e,t,r)=>{r.d(t,{default:()=>p});var a=r(6031),n=r.n(a),s=r(2462),o=r.n(s),l=r(2015),i=r.n(l);const c=["onChange","value","className","error","ariaLabelledBy","containerClassName"];class p extends i().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}componentDidUpdate(e,t,r){this.props.value!==e.value&&(this.input.value=this.props.value)}handleChange(e){this.props.onChange(e)}render(){let e=this.props,{onChange:t,value:r,className:a,error:s,ariaLabelledBy:l,containerClassName:p}=e,h=o()(e,c),m=this.props.hasOwnProperty("error")&&""!==s,u=this.props.hasOwnProperty("className")?a:"form-control",d=this.props.hasOwnProperty("containerClassName")?p:"container-form-control";return i().createElement("div",{className:d},i().createElement("input",n()({className:`${u} ${m?"error":""}`,ref:e=>{this.input=e},defaultValue:r,"aria-labelledby":l,onChange:this.handleChange},h)),m&&i().createElement("p",{className:"error-label"},s))}}p.defaultProps={ariaLabelledBy:null}},9128:(e,t,r)=>{r.d(t,{hasErrors:()=>n,isEmpty:()=>o,scrollToError:()=>a,shallowEqual:()=>s});require("@sentry/react");r(5812),r(8041);const a=e=>{if(Object.keys(e).length>0){const t=Object.keys(e)[0],r=document.getElementById(t);r&&window.scrollTo(0,(e=>{var t=-70;if(e.offsetParent){do{t+=e.offsetTop}while(e=e.offsetParent);return[t]}})(r))}},n=(e,t)=>e in t?t[e]:"",s=(e,t)=>{const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(let a of r)if(e[a]!==t[a])return!1;return!0},o=e=>0===Object.keys(e).length},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},1536:e=>{e.exports=require("awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},5812:e=>{e.exports=require("moment-timezone")},2015:e=>{e.exports=require("react")},8041:e=>{e.exports=require("urijs")}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,r),s.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var a={};r.r(a),r.d(a,{default:()=>b});var n=r(1116),s=r.n(n),o=r(2015),l=r.n(o),i=r(6842),c=r.n(i),p=(r(1536),r(7651)),h=r(9128);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class d extends l().Component{constructor(e){super(e),this.state={entity:u({},e.entity),errors:e.errors},this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}componentDidUpdate(e,t,r){const a={};(0,h.scrollToError)(this.props.errors),e.entity.id!==this.props.entity.id&&(a.entity=u({},this.props.entity),a.errors={}),(0,h.shallowEqual)(e.errors,this.props.errors)||(a.errors=u({},this.props.errors)),(0,h.isEmpty)(a)||this.setState(u(u({},this.state),a))}handleChange(e){let t=u({},this.state.entity),r=u({},this.state.errors),{value:a,id:n}=e.target;"checkbox"===e.target.type&&(a=e.target.checked),r[n]="",t[n]=a,this.setState({entity:t,errors:r})}handleSubmit(e){u({},this.state.entity);e.preventDefault(),this.props.onSubmit(this.state.entity)}createField(e){let{entity:t,errors:r}=this.state;switch(e.type){case"text":return l().createElement("div",{key:"field_"+e.name,className:"row form-group"},l().createElement("div",{className:"col-md-6"},l().createElement("label",null," ",e.label," "),l().createElement(p.default,{id:e.name,value:t[e.name],onChange:this.handleChange,className:"form-control",error:(0,h.hasErrors)(e.name,r)})));case"textarea":return l().createElement("div",{key:"field_"+e.name,className:"row form-group"},l().createElement("div",{className:"col-md-6"},l().createElement("label",null," ",e.label," "),l().createElement("textarea",{id:e.name,value:t[e.name],onChange:this.handleChange,className:"form-control"})));case"checkbox":return l().createElement("div",{key:"field_"+e.name,className:"row form-group"},l().createElement("div",{className:"col-md-6"},l().createElement("div",{className:"form-check abc-checkbox"},l().createElement("input",{type:"checkbox",id:e.name,checked:t[e.name],onChange:this.handleChange,className:"form-check-input"}),l().createElement("label",{className:"form-check-label",htmlFor:e.name},e.label))))}}render(){let{entity:e}=this.state,{fields:t}=this.props;return l().createElement("form",{className:"simple-form"},l().createElement("input",{type:"hidden",id:"id",value:e.id}),t.map((e=>this.createField(e))),l().createElement("div",{className:"row"},l().createElement("div",{className:"col-md-12 submit-buttons"},l().createElement("input",{type:"button",onClick:this.handleSubmit,className:"btn btn-primary pull-right",value:c().translate("general.save")}))))}}const b=d;return a})()));
2
2
  //# sourceMappingURL=simple-form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/forms/simple-form.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,oNCMM,MAAMC,UAAcC,IAAAA,UAE/BC,WAAAA,CAAYC,GACRC,MAAMD,GAENJ,KAAKM,aAAeN,KAAKM,aAAaC,KAAKP,KAC9C,CAEDQ,kBAAAA,CAAmBC,EAAWC,EAAWC,GACjCX,KAAKI,MAAMQ,QAAUH,EAAUG,QAC/BZ,KAAKa,MAAMD,MAAQZ,KAAKI,MAAMQ,MAErC,CAEDN,YAAAA,CAAaQ,GACTd,KAAKI,MAAMW,SAASD,EACvB,CAEDE,MAAAA,GAEI,IAAI,EAAkFhB,KAAKI,OAAvF,SAACW,EAAD,MAAWH,EAAX,UAAkBK,EAAlB,MAA6BC,EAA7B,eAAoCC,EAApC,mBAAoDC,GAAxD,EAA8EC,EAA9E,SACIC,EAActB,KAAKI,MAAMmB,eAAe,UAA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AAU,eACVC,OAAO4B,EAAAA,EAAAA,WAAUC,EAAM2C,KAAM3D,OAMjD,IAAK,WACD,OACI,yBAAKsB,IAAK,SAASN,EAAM2C,KAAMzE,UAAU,kBACrC,yBAAKA,UAAU,YACX,mCAAS8B,EAAM4C,MAAf,KACA,8BACIT,GAAInC,EAAM2C,KACV9E,MAAOoE,EAAOjC,EAAM2C,MACpB3E,SAAUf,KAAKM,aACfW,UAAU,mBAM9B,IAAK,WACD,OACI,yBAAKoC,IAAK,SAASN,EAAM2C,KAAMzE,UAAU,kBACrC,yBAAKA,UAAU,YACX,yBAAKA,UAAU,2BACX,2BAAOoE,KAAK,WAAWH,GAAInC,EAAM2C,KAAMJ,QAASN,EAAOjC,EAAM2C,MACtD3E,SAAUf,KAAKM,aAAcW,UAAU,qBAC9C,2BAAOA,UAAU,mBAAmB2E,QAAS7C,EAAM2C,MAC9C3C,EAAM4C,UAStC,CAED3E,MAAAA,GACI,IAAI,OAACgE,GAAUhF,KAAK+E,OAChB,OAACc,GAAU7F,KAAKI,MAEpB,OACI,0BAAMa,UAAU,eACZ,2BAAOoE,KAAK,SAASH,GAAG,KAAKtE,MAAOoE,EAAOE,KAE1CW,EAAOC,KAAIC,GACD/F,KAAKyF,YAAYM,KAG5B,yBAAK9E,UAAU,OACX,yBAAKA,UAAU,4BACX,2BAAOoE,KAAK,SAASW,QAAShG,KAAKiF,aAC5BhE,UAAU,6BAA6BL,MAAOqF,IAAAA,UAAY,oBAKpF,EAGL,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/inputs/text-input.js","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"urijs\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/forms/simple-form.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\n\nexport default class Input extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (this.props.value !== prevProps.value) {\n this.input.value = this.props.value;\n }\n }\n\n handleChange(ev) {\n this.props.onChange(ev);\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, containerClassName,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let class_name = this.props.hasOwnProperty('className') ? className : 'form-control';\n let container_class_name = this.props.hasOwnProperty('containerClassName') ? containerClassName : 'container-form-control';\n return (\n <div className={container_class_name}>\n <input\n className={`${class_name} ${has_error ? 'error' : ''}`}\n ref={node => {this.input = node}}\n defaultValue={value}\n aria-labelledby={ariaLabelledBy}\n onChange={this.handleChange}\n {...rest}\n />\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nInput.defaultProps = {\n ariaLabelledBy : null,\n}","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport moment from 'moment-timezone';\nimport URI from \"urijs\";\n\nexport const findElementPos = (obj) => {\n var curtop = -70;\n if (obj.offsetParent) {\n do {\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return [curtop];\n }\n};\n\nexport const epochToMoment = (atime) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime);\n};\n\nexport const epochToMomentTimeZone = (atime, time_zone) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime).tz(time_zone);\n};\n\nexport const formatEpoch = (atime, format = 'M/D/YYYY h:mm a') => {\n if(!atime) return atime;\n return epochToMoment(atime).format(format);\n};\n\nexport const parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\n}\n\nexport const objectToQueryString = (obj) => {\n var str = \"\";\n for (var key in obj) {\n if (str != \"\") {\n str += \"&\";\n }\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n\n return str;\n};\n\nexport const getBackURL = () => {\n let url = URI(window.location.href);\n let query = url.search(true);\n let fragment = url.fragment();\n let backUrl = query.hasOwnProperty('BackUrl') ? query['BackUrl'] : null;\n if(backUrl != null && fragment != null && fragment != ''){\n backUrl += `#${fragment}`;\n }\n return backUrl;\n};\n\nexport const toSlug = (text) =>{\n text = text.toLowerCase();\n return text.replace(/[^a-zA-Z0-9]+/g,'_');\n}\n\nexport const getAuthCallback = () => {\n if(typeof window !== 'undefined') {\n return `${window.location.origin}/auth/callback`;\n }\n return null;\n};\n\nexport const getCurrentLocation = () => {\n let location = '';\n if(typeof window !== 'undefined') {\n location = window.location;\n // check if we are on iframe\n if (window.top)\n location = window.top.location;\n }\n return location;\n};\n\nexport const getOrigin = () => {\n if(typeof window !== 'undefined') {\n return window.location.origin;\n }\n return null;\n};\n\nexport const getCurrentPathName = () => {\n if(typeof window !== 'undefined') {\n return window.location.pathname;\n }\n return null;\n};\n\nexport const getCurrentHref = () => {\n if(typeof window !== 'undefined') {\n return window.location.href;\n }\n return null;\n};\n\nexport const getAllowedUserGroups = () => {\n if(typeof window !== 'undefined') {\n return window.ALLOWED_USER_GROUPS || '';\n }\n return null;\n};\n\nexport const buildAPIBaseUrl = (relativeUrl) => {\n if(typeof window !== 'undefined'){\n return `${window.API_BASE_URL}${relativeUrl}`;\n }\n return null``;\n};\n\nexport const putOnLocalStorage = (key, value) => {\n if(typeof window !== 'undefined') {\n window.localStorage.setItem(key, value);\n }\n};\n\nexport const getFromLocalStorage = (key, removeIt) => {\n if(typeof window !== 'undefined') {\n let val = window.localStorage.getItem(key);\n if(removeIt){\n console.log(`getFromLocalStorage removing key ${key}`);\n removeFromLocalStorage(key);\n }\n return val;\n }\n return null;\n};\n\nexport const removeFromLocalStorage = (key) => {\n if(typeof window !== 'undefined') {\n window.localStorage.removeItem(key);\n }\n}\n\nexport const isClearingSessionState = () => {\n if(typeof window !== 'undefined') {\n return window.clearing_session_state;\n }\n return false;\n};\n\nexport const setSessionClearingState = (val) => {\n if(typeof window !== 'undefined') {\n window.clearing_session_state = val;\n }\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const scrollToError = (errors) => {\n if(Object.keys(errors).length > 0) {\n const firstError = Object.keys(errors)[0];\n const firstNode = document.getElementById(firstError);\n if (firstNode) window.scrollTo(0, findElementPos(firstNode));\n }\n};\n\nexport const hasErrors = (field, errors) => {\n if(field in errors) {\n return errors[field];\n }\n return '';\n};\n\nexport const shallowEqual = (object1, object2) => {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const arraysEqual = (a1, a2) =>\n a1.length === a2.length && a1.every((o, idx) => shallowEqual(o, a2[idx]));\n\nexport const isEmpty = (obj) => {\n return Object.keys(obj).length === 0;\n};\n\n\nexport const base64URLEncode = (str) => {\n return str\n .toString('base64')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '')\n}\n\nexport const retryPromise = async (\n cb,\n maxNumberOfRetries = 3\n) => {\n for (let i = 0; i < maxNumberOfRetries; i++) {\n if (await cb()) {\n return true;\n }\n }\n\n return false;\n}\n\nexport const getTimeServiceUrl = () => {\n if(typeof window !== 'undefined') {\n return window.TIMEINTERVALSINCE1970_API_URL || process.env.TIMEINTERVALSINCE1970_API_URL;\n }\n return null;\n};\n\nexport const getEventLocation = (event, summitVenueCount, summitShowLocDate = null, nowUtc = null) => {\n const shouldShowVenues = (summitShowLocDate && nowUtc) ? summitShowLocDate * 1000 < nowUtc : true;\n const locationName = [];\n const { location } = event;\n\n if (!shouldShowVenues) return 'TBA';\n\n if (!location) return 'TBA';\n\n if (summitVenueCount > 1 && location.venue?.name) locationName.push(location.venue.name);\n if (location.floor?.name) locationName.push(location.floor.name);\n if (location.name) locationName.push(location.name);\n\n return locationName.length > 0 ? locationName.join(' - ') : 'TBA';\n};\n\nexport const getEventHosts = (event) => {\n let hosts = [];\n if (event.speakers?.length > 0) {\n hosts = [...event.speakers];\n }\n if (event.moderator) hosts.push(event.moderator);\n\n return hosts;\n};\n\nconst loadImage = async url => {\n const img = document.createElement('img')\n img.src = url\n img.crossOrigin = 'anonymous'\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img)\n img.onerror = reject\n })\n}\n\nexport const convertSVGtoImg = async (svgUrl) => {\n const img = await loadImage(svgUrl)\n const newWidth = 100\n const newHeight = Math.floor(img.naturalHeight * 100 / img.naturalWidth)\n\n const canvas = document.createElement('canvas')\n canvas.width = newWidth\n canvas.height = newHeight\n canvas.getContext('2d').drawImage(img, 0, 0, newWidth, newHeight)\n\n const url = await canvas.toDataURL(`image/png`, 1.0)\n console.log(url, newWidth, newHeight);\n return {url, width: newWidth, height: newHeight}\n}\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"react\");","module.exports = require(\"urijs\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react'\nimport T from 'i18n-react/dist/i18n-react'\nimport 'awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css'\nimport Input from '../inputs/text-input'\nimport { scrollToError, isEmpty, shallowEqual, hasErrors } from '../../utils/methods'\n\n\nclass SimpleForm extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n entity: {...props.entity},\n errors: props.errors\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n const state = {};\n scrollToError(this.props.errors);\n\n if(prevProps.entity.id !== this.props.entity.id) {\n state.entity = {...this.props.entity};\n state.errors = {};\n }\n\n if (!shallowEqual(prevProps.errors, this.props.errors)) {\n state.errors = {...this.props.errors};\n }\n\n if (!isEmpty(state)) {\n this.setState({...this.state, ...state})\n }\n }\n\n handleChange(ev) {\n let entity = {...this.state.entity};\n let errors = {...this.state.errors};\n let {value, id} = ev.target;\n\n if (ev.target.type === 'checkbox') {\n value = ev.target.checked;\n }\n\n errors[id] = '';\n entity[id] = value;\n this.setState({entity: entity, errors: errors});\n }\n\n handleSubmit(ev) {\n let entity = {...this.state.entity};\n ev.preventDefault();\n\n this.props.onSubmit(this.state.entity);\n }\n\n createField(field) {\n let {entity, errors} = this.state;\n\n switch (field.type) {\n case 'text':\n return (\n <div key={\"field_\"+field.name} className=\"row form-group\">\n <div className=\"col-md-6\">\n <label> {field.label} </label>\n <Input\n id={field.name}\n value={entity[field.name]}\n onChange={this.handleChange}\n className=\"form-control\"\n error={hasErrors(field.name, errors)}\n />\n </div>\n </div>\n );\n break;\n case 'textarea':\n return (\n <div key={\"field_\"+field.name} className=\"row form-group\">\n <div className=\"col-md-6\">\n <label> {field.label} </label>\n <textarea\n id={field.name}\n value={entity[field.name]}\n onChange={this.handleChange}\n className=\"form-control\"\n />\n </div>\n </div>\n );\n break;\n case 'checkbox':\n return (\n <div key={\"field_\"+field.name} className=\"row form-group\">\n <div className=\"col-md-6\">\n <div className=\"form-check abc-checkbox\">\n <input type=\"checkbox\" id={field.name} checked={entity[field.name]}\n onChange={this.handleChange} className=\"form-check-input\" />\n <label className=\"form-check-label\" htmlFor={field.name}>\n {field.label}\n </label>\n </div>\n </div>\n </div>\n );\n break;\n\n }\n }\n\n render() {\n let {entity} = this.state;\n let {fields} = this.props;\n\n return (\n <form className=\"simple-form\">\n <input type=\"hidden\" id=\"id\" value={entity.id} />\n\n {fields.map(f => {\n return this.createField(f);\n })}\n\n <div className=\"row\">\n <div className=\"col-md-12 submit-buttons\">\n <input type=\"button\" onClick={this.handleSubmit}\n className=\"btn btn-primary pull-right\" value={T.translate(\"general.save\")}/>\n </div>\n </div>\n </form>\n );\n }\n}\n\nexport default SimpleForm;\n"],"names":["root","factory","exports","module","define","amd","this","Input","React","constructor","props","super","handleChange","bind","componentDidUpdate","prevProps","prevState","snapshot","value","input","ev","onChange","render","className","error","ariaLabelledBy","containerClassName","rest","has_error","hasOwnProperty","class_name","container_class_name","ref","node","defaultValue","defaultProps","scrollToError","errors","Object","keys","length","firstError","firstNode","document","getElementById","window","scrollTo","obj","curtop","offsetParent","offsetTop","findElementPos","hasErrors","field","shallowEqual","object1","object2","keys1","keys2","key","isEmpty","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","prop","prototype","call","r","Symbol","toStringTag","SimpleForm","state","entity","handleSubmit","id","setState","target","type","checked","preventDefault","onSubmit","createField","name","label","htmlFor","fields","map","f","onClick","T"],"sourceRoot":""}
1
+ {"version":3,"file":"components/forms/simple-form.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,oNCMM,MAAMC,UAAcC,IAAAA,UAE/BC,WAAAA,CAAYC,GACRC,MAAMD,GAENJ,KAAKM,aAAeN,KAAKM,aAAaC,KAAKP,KAC/C,CAEAQ,kBAAAA,CAAmBC,EAAWC,EAAWC,GACjCX,KAAKI,MAAMQ,QAAUH,EAAUG,QAC/BZ,KAAKa,MAAMD,MAAQZ,KAAKI,MAAMQ,MAEtC,CAEAN,YAAAA,CAAaQ,GACTd,KAAKI,MAAMW,SAASD,EACxB,CAEAE,MAAAA,GAEI,IAAAC,EAAsFjB,KAAKI,OAAvF,SAACW,EAAQ,MAAEH,EAAK,UAAEM,E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CW,EAAOC,KAAIC,GACDpG,KAAK8F,YAAYM,KAG5BlG,IAAAA,cAAA,OAAKgB,UAAU,OACXhB,IAAAA,cAAA,OAAKgB,UAAU,4BACXhB,IAAAA,cAAA,SAAOwF,KAAK,SAASW,QAASrG,KAAKsF,aAC5BpE,UAAU,6BAA6BN,MAAO0F,IAAAA,UAAY,oBAKrF,EAGJ,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/inputs/text-input.js","webpack://openstack-uicore-foundation/external commonjs \"@sentry/react\"","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"urijs\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/forms/simple-form.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\n\nexport default class Input extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (this.props.value !== prevProps.value) {\n this.input.value = this.props.value;\n }\n }\n\n handleChange(ev) {\n this.props.onChange(ev);\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, containerClassName,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let class_name = this.props.hasOwnProperty('className') ? className : 'form-control';\n let container_class_name = this.props.hasOwnProperty('containerClassName') ? containerClassName : 'container-form-control';\n return (\n <div className={container_class_name}>\n <input\n className={`${class_name} ${has_error ? 'error' : ''}`}\n ref={node => {this.input = node}}\n defaultValue={value}\n aria-labelledby={ariaLabelledBy}\n onChange={this.handleChange}\n {...rest}\n />\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nInput.defaultProps = {\n ariaLabelledBy : null,\n}","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@sentry/react\");","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport * as Sentry from \"@sentry/react\";\nimport moment from 'moment-timezone';\nimport URI from \"urijs\";\n\nexport const findElementPos = (obj) => {\n var curtop = -70;\n if (obj.offsetParent) {\n do {\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return [curtop];\n }\n};\n\nexport const epochToMoment = (atime) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime);\n};\n\nexport const epochToMomentTimeZone = (atime, time_zone) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime).tz(time_zone);\n};\n\nexport const formatEpoch = (atime, format = 'M/D/YYYY h:mm a') => {\n if(!atime) return atime;\n return epochToMoment(atime).format(format);\n};\n\nexport const parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\n}\n\nexport const objectToQueryString = (obj) => {\n var str = \"\";\n for (var key in obj) {\n if (str != \"\") {\n str += \"&\";\n }\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n\n return str;\n};\n\nexport const getBackURL = () => {\n let url = URI(window.location.href);\n let query = url.search(true);\n let fragment = url.fragment();\n let backUrl = query.hasOwnProperty('BackUrl') ? query['BackUrl'] : null;\n if(backUrl != null && fragment != null && fragment != ''){\n backUrl += `#${fragment}`;\n }\n return backUrl;\n};\n\nexport const toSlug = (text) =>{\n text = text.toLowerCase();\n return text.replace(/[^a-zA-Z0-9]+/g,'_');\n}\n\nexport const getAuthCallback = () => {\n if(typeof window !== 'undefined') {\n return `${window.location.origin}/auth/callback`;\n }\n return null;\n};\n\nexport const getCurrentLocation = () => {\n let location = '';\n if(typeof window !== 'undefined') {\n location = window.location;\n // check if we are on iframe\n if (window.top)\n location = window.top.location;\n }\n return location;\n};\n\nexport const getOrigin = () => {\n if(typeof window !== 'undefined') {\n return window.location.origin;\n }\n return null;\n};\n\nexport const getCurrentPathName = () => {\n if(typeof window !== 'undefined') {\n return window.location.pathname;\n }\n return null;\n};\n\nexport const getCurrentHref = () => {\n if(typeof window !== 'undefined') {\n return window.location.href;\n }\n return null;\n};\n\nexport const getAllowedUserGroups = () => {\n if(typeof window !== 'undefined') {\n return window.ALLOWED_USER_GROUPS || '';\n }\n return null;\n};\n\nexport const buildAPIBaseUrl = (relativeUrl) => {\n if(typeof window !== 'undefined'){\n return `${window.API_BASE_URL}${relativeUrl}`;\n }\n return null``;\n};\n\nexport const putOnLocalStorage = (key, value) => {\n if(typeof window !== 'undefined') {\n window.localStorage.setItem(key, value);\n }\n};\n\nexport const getFromLocalStorage = (key, removeIt) => {\n if(typeof window !== 'undefined') {\n let val = window.localStorage.getItem(key);\n if(removeIt){\n console.log(`getFromLocalStorage removing key ${key}`);\n removeFromLocalStorage(key);\n }\n return val;\n }\n return null;\n};\n\nexport const removeFromLocalStorage = (key) => {\n if(typeof window !== 'undefined') {\n window.localStorage.removeItem(key);\n }\n}\n\nexport const isClearingSessionState = () => {\n if(typeof window !== 'undefined') {\n return window.clearing_session_state;\n }\n return false;\n};\n\nexport const setSessionClearingState = (val) => {\n if(typeof window !== 'undefined') {\n window.clearing_session_state = val;\n }\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const scrollToError = (errors) => {\n if(Object.keys(errors).length > 0) {\n const firstError = Object.keys(errors)[0];\n const firstNode = document.getElementById(firstError);\n if (firstNode) window.scrollTo(0, findElementPos(firstNode));\n }\n};\n\nexport const hasErrors = (field, errors) => {\n if(field in errors) {\n return errors[field];\n }\n return '';\n};\n\nexport const shallowEqual = (object1, object2) => {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const arraysEqual = (a1, a2) =>\n a1.length === a2.length && a1.every((o, idx) => shallowEqual(o, a2[idx]));\n\nexport const isEmpty = (obj) => {\n return Object.keys(obj).length === 0;\n};\n\n\nexport const base64URLEncode = (str) => {\n return str\n .toString('base64')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '')\n}\n\nexport const retryPromise = async (\n cb,\n maxNumberOfRetries = 3\n) => {\n for (let i = 0; i < maxNumberOfRetries; i++) {\n if (await cb()) {\n return true;\n }\n }\n\n return false;\n}\n\nexport const getTimeServiceUrl = () => {\n if(typeof window !== 'undefined') {\n return window.TIMEINTERVALSINCE1970_API_URL || process.env.TIMEINTERVALSINCE1970_API_URL;\n }\n return null;\n};\n\nexport const getEventLocation = (event, summitVenueCount, summitShowLocDate = null, nowUtc = null) => {\n const shouldShowVenues = (summitShowLocDate && nowUtc) ? summitShowLocDate * 1000 < nowUtc : true;\n const locationName = [];\n const { location } = event;\n\n if (!shouldShowVenues) return 'TBA';\n\n if (!location) return 'TBA';\n\n if (summitVenueCount > 1 && location.venue?.name) locationName.push(location.venue.name);\n if (location.floor?.name) locationName.push(location.floor.name);\n if (location.name) locationName.push(location.name);\n\n return locationName.length > 0 ? locationName.join(' - ') : 'TBA';\n};\n\nexport const getEventHosts = (event) => {\n let hosts = [];\n if (event.speakers?.length > 0) {\n hosts = [...event.speakers];\n }\n if (event.moderator) hosts.push(event.moderator);\n\n return hosts;\n};\n\nconst loadImage = async url => {\n const img = document.createElement('img')\n img.src = url\n img.crossOrigin = 'anonymous'\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img)\n img.onerror = reject\n })\n}\n\nexport const convertSVGtoImg = async (svgUrl) => {\n const img = await loadImage(svgUrl)\n const newWidth = 100\n const newHeight = Math.floor(img.naturalHeight * 100 / img.naturalWidth)\n\n const canvas = document.createElement('canvas')\n canvas.width = newWidth\n canvas.height = newHeight\n canvas.getContext('2d').drawImage(img, 0, 0, newWidth, newHeight)\n\n const url = await canvas.toDataURL(`image/png`, 1.0)\n console.log(url, newWidth, newHeight);\n return {url, width: newWidth, height: newHeight}\n}\n\nexport const isRateEnabled = (value) =>\n value !== null && value !== undefined && value !== \"\";\n\nconst isSentryInitialized = () => typeof window !== \"undefined\" && !!window.SENTRY_DSN;\n\nexport const handleSentryException = (err) =>\n isSentryInitialized()\n ? Sentry.captureException(err)\n : console.log(\"Error on registration: \", err);","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"react\");","module.exports = require(\"urijs\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react'\nimport T from 'i18n-react/dist/i18n-react'\nimport 'awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css'\nimport Input from '../inputs/text-input'\nimport { scrollToError, isEmpty, shallowEqual, hasErrors } from '../../utils/methods'\n\n\nclass SimpleForm extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n entity: {...props.entity},\n errors: props.errors\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n const state = {};\n scrollToError(this.props.errors);\n\n if(prevProps.entity.id !== this.props.entity.id) {\n state.entity = {...this.props.entity};\n state.errors = {};\n }\n\n if (!shallowEqual(prevProps.errors, this.props.errors)) {\n state.errors = {...this.props.errors};\n }\n\n if (!isEmpty(state)) {\n this.setState({...this.state, ...state})\n }\n }\n\n handleChange(ev) {\n let entity = {...this.state.entity};\n let errors = {...this.state.errors};\n let {value, id} = ev.target;\n\n if (ev.target.type === 'checkbox') {\n value = ev.target.checked;\n }\n\n errors[id] = '';\n entity[id] = value;\n this.setState({entity: entity, errors: errors});\n }\n\n handleSubmit(ev) {\n let entity = {...this.state.entity};\n ev.preventDefault();\n\n this.props.onSubmit(this.state.entity);\n }\n\n createField(field) {\n let {entity, errors} = this.state;\n\n switch (field.type) {\n case 'text':\n return (\n <div key={\"field_\"+field.name} className=\"row form-group\">\n <div className=\"col-md-6\">\n <label> {field.label} </label>\n <Input\n id={field.name}\n value={entity[field.name]}\n onChange={this.handleChange}\n className=\"form-control\"\n error={hasErrors(field.name, errors)}\n />\n </div>\n </div>\n );\n break;\n case 'textarea':\n return (\n <div key={\"field_\"+field.name} className=\"row form-group\">\n <div className=\"col-md-6\">\n <label> {field.label} </label>\n <textarea\n id={field.name}\n value={entity[field.name]}\n onChange={this.handleChange}\n className=\"form-control\"\n />\n </div>\n </div>\n );\n break;\n case 'checkbox':\n return (\n <div key={\"field_\"+field.name} className=\"row form-group\">\n <div className=\"col-md-6\">\n <div className=\"form-check abc-checkbox\">\n <input type=\"checkbox\" id={field.name} checked={entity[field.name]}\n onChange={this.handleChange} className=\"form-check-input\" />\n <label className=\"form-check-label\" htmlFor={field.name}>\n {field.label}\n </label>\n </div>\n </div>\n </div>\n );\n break;\n\n }\n }\n\n render() {\n let {entity} = this.state;\n let {fields} = this.props;\n\n return (\n <form className=\"simple-form\">\n <input type=\"hidden\" id=\"id\" value={entity.id} />\n\n {fields.map(f => {\n return this.createField(f);\n })}\n\n <div className=\"row\">\n <div className=\"col-md-12 submit-buttons\">\n <input type=\"button\" onClick={this.handleSubmit}\n className=\"btn btn-primary pull-right\" value={T.translate(\"general.save\")}/>\n </div>\n </div>\n </form>\n );\n }\n}\n\nexport default SimpleForm;\n"],"names":["root","factory","exports","module","define","amd","this","Input","React","constructor","props","super","handleChange","bind","componentDidUpdate","prevProps","prevState","snapshot","value","input","ev","onChange","render","_this$props","className","error","ariaLabelledBy","containerClassName","rest","_objectWithoutProperties","_excluded","has_error","hasOwnProperty","class_name","container_class_name","_extends","ref","node","defaultValue","defaultProps","require","scrollToError","errors","Object","keys","length","firstError","firstNode","document","getElementById","window","scrollTo","obj","curtop","offsetParent","offsetTop","findElementPos","hasErrors","field","shallowEqual","object1","object2","keys1","keys2","key","isEmpty","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","prop","prototype","call","r","Symbol","toStringTag","SimpleForm","state","entity","_objectSpread","handleSubmit","id","setState","target","type","checked","preventDefault","onSubmit","createField","name","label","htmlFor","fields","map","f","onClick","T"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={6108:(e,t,a)=>{var r=a(6031),n=a.n(r),s=a(2462),l=a.n(s),i=a(2015),o=a.n(i),u=a(9825),c=a.n(u),d=a(7651),m=a(6604),p=a(5639),h=a(7017),b=a(356);const g=require("react-final-form");var v=a(9558);const f="CheckBox",y="RadioButton";a(1536);const _=["input","meta","question","className","isDisabled","isRequired"],E=["input","meta","question","isDisabled","isRequired"],C=["input","meta","question","isDisabled","isRequired"],q=["input","meta","question","isDisabled","isRequired","maxValues"],w=e=>{let{input:t,meta:a,question:r,className:s,isDisabled:i,isRequired:u}=e,c=l()(e,_);return o().createElement(d.default,n()({},t,c,{containerClassName:s,name:(0,v.toSlug)(r.name),ariaLabelledBy:`${(0,v.toSlug)(r.name)} label`,id:(0,v.toSlug)(r.name),value:t.value,disabled:i,required:u,onChange:t.onChange,placeholder:r.placeholder}))},N=e=>{let{input:t,meta:a,question:r,isDisabled:s,isRequired:i}=e,u=l()(e,E);return o().createElement(p.default,n()({},t,u,{name:(0,v.toSlug)(r.name),ariaLabelledBy:`${(0,v.toSlug)(r.name)} label`,id:(0,v.toSlug)(r.name),overrideCSS:!0,value:t.value,disabled:s,required:i,onChange:t.onChange}))},S=e=>{let{input:t,meta:a,question:r,isDisabled:s,isRequired:i}=e,u=l()(e,C);return o().createElement(m.default,n()({},t,u,{name:(0,v.toSlug)(r.name),ariaLabelledBy:`${(0,v.toSlug)(r.name)} label`,id:(0,v.toSlug)(r.name),overrideCSS:!0,className:"ddl-extra-questions-container",classNamePrefix:"ddl-extra-questions",value:t.value,disabled:s,required:i,onChange:t.onChange}))},k=e=>{let{input:t,meta:a,question:r,isDisabled:s,isRequired:i,maxValues:u}=e,c=l()(e,q);return o().createElement(h.default,n()({},t,c,{id:(0,v.toSlug)(r.name),name:(0,v.toSlug)(r.name),ariaLabelledBy:`${(0,v.toSlug)(r.name)} label`,value:t.value,disabled:s,required:i,onChange:e=>{const a=e.target.value;return u>0&&a.length>u?null:t.onChange(e)}}))},x=e=>e?e=>e?void 0:"Required":()=>{},O=o().forwardRef((({extraQuestions:e,userAnswers:t,onAnswerChanges:a,className:r="questions-form",questionContainerClassName:n="question-container",questionLabelContainerClassName:s="question-label-container",questionControlContainerClassName:l="question-control-container",readOnly:u=!1,debug:c=!1,buttonText:d="Submit",RequiredErrorMessage:m="Required",ValidationErrorClassName:p="extra-question-error",allowExtraQuestionsEdit:h=!0,onError:_=e=>console.log("form errors: ",e),shouldScroll2FirstError:E=!0},C)=>{let q=null;const O=(0,i.useRef)({}),P=(0,i.useRef)(null),[B,F]=(0,i.useState)({});(0,i.useEffect)((()=>{j()}),[e]),(0,i.useImperativeHandle)(C,(()=>({doSubmit(){var e;null===(e=P.current)||void 0===e||e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))},scroll2QuestionById(e){K(e)}})));const L=e=>(O.current[e]||(O.current[e]=o().createRef()),O.current[e]),j=()=>{const a=new b.default(e,t);F(a.formatAnswers())},$=({when:e,rule:t,children:a})=>o().createElement(g.Field,{name:e,subscription:{value:!0}},(({input:{value:e}})=>D(t,A(e,t),a))),R=({name:e})=>o().createElement(g.Field,{name:e,subscription:{error:!0,touched:!0,submitFailed:!0}},(({meta:{error:e,touched:t,submitFailed:a}})=>e&&(t||a)?o().createElement("div",{className:p},e):null)),A=(e,t)=>{let a=t.answer_values;if(Array.isArray(e)){if(!e.length)return!1;let r="And"===t.answer_values_operator;return a.forEach((a=>{r="And"===t.answer_values_operator?r&&e.includes(parseInt(a)):r||e.includes(parseInt(a))})),r}return a.includes(e.toString())},D=(e,t,a)=>"Visible"===e.visibility?"Equal"===e.visibility_condition?t?a:(delete O.current[e.sub_question.id],null):t?(delete O.current[e.sub_question.id],null):a:"Equal"===e.visibility_condition?t?(delete O.current[e.sub_question.id],null):a:t?a:(delete O.current[e.sub_question.id],null),I=e=>{var t;const a=String.fromCharCode(160),r=null==e||null===(t=e.label)||void 0===t?void 0:t.replace(/\n/g,"<br />").replace(/<p>(.*)<\/p>/gi,"$1"),n=[f,y],s=e.mandatory&&!n.includes(e.type)?`${r}${a}<b>*</b>`:r;return o().createElement("label",{dangerouslySetInnerHTML:{__html:s},htmlFor:(0,v.toSlug)(e.name),id:`${(0,v.toSlug)(e.name)} label`})},Q=e=>{let t=e.values;const a=!h&&((e,t)=>{const a=(0,v.toSlug)(e.name);if(!t.hasOwnProperty(a))return!1;const r=t[a];return Array.isArray(r)||"string"==typeof r?r.length>0:"number"==typeof r?r>0:"boolean"==typeof r&&r})(e,B);var r,u,c,d;if("Text"===e.type)return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:l},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),question:e,isDisabled:a,isRequired:e.mandatory,validate:x(e.mandatory),component:w}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(r=e.sub_question_rules)||void 0===r?void 0:r.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))));if("TextArea"===e.type)return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:l},o().createElement(g.Field,{validate:x(e.mandatory),name:(0,v.toSlug)(e.name),id:(0,v.toSlug)(e.name),disabled:a,required:e.mandatory,component:"textarea"}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(u=e.sub_question_rules)||void 0===u?void 0:u.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))));if(e.type===f)return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:`${n} checkbox-wrapper`},o().createElement("div",{className:`${l} input-wrapper`},o().createElement("div",{className:"form-check abc-checkbox"},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),id:(0,v.toSlug)(e.name),validate:x(e.mandatory),disabled:a,required:e.mandatory,type:"checkbox",className:"form-check-input",component:"input"}),o().createElement("label",{className:"form-check-label",htmlFor:(0,v.toSlug)(e.name)}),e.mandatory&&o().createElement("span",{className:"checkbox-mandatory"},o().createElement("b",null,"*")))),o().createElement("span",{className:`eq-checkbox-label ${s}`},I(e))),o().createElement(R,{name:(0,v.toSlug)(e.name)}),(null===(c=e.sub_question_rules)||void 0===c?void 0:c.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))));if(e.type===y)return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:`${n} checkbox-wrapper`},o().createElement("div",{className:`${l} input-wrapper`},o().createElement("div",{className:"form-check abc-radio"},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),id:(0,v.toSlug)(e.name),validate:x(e.mandatory),disabled:a,required:e.mandatory,type:"radio",className:"form-check-input",value:"true",component:"input"}),o().createElement("label",{className:"form-check-label",htmlFor:(0,v.toSlug)(e.name)}),e.mandatory&&o().createElement("span",{className:"checkbox-mandatory"},o().createElement("b",null,"*")))),o().createElement("span",{className:`eq-checkbox-label ${s}`},I(e))),o().createElement(R,{name:(0,v.toSlug)(e.name)}),(null===(d=e.sub_question_rules)||void 0===d?void 0:d.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))));if("RadioButtonList"===e.type){var m;const r=t.map((e=>({label:e.label,value:e.id})));return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:l},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),options:r,question:e,validate:x(e.mandatory),isDisabled:a,isRequired:e.mandatory,component:N}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(m=e.sub_question_rules)||void 0===m?void 0:m.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))))}if("ComboBox"===e.type||"CountryComboBox"===e.type){var p;const r=t.map((e=>({label:e.label,value:e.id})));return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:`${l} reactSelectDropdown`},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),options:r,question:e,validate:x(e.mandatory),isDisabled:a,isRequired:e.mandatory,component:S}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(p=e.sub_question_rules)||void 0===p?void 0:p.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))))}if("CheckBoxList"===e.type){var b;const r=t.map((e=>({label:e.label,value:e.id})));return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:l},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),className:l,validate:x(e.mandatory),options:r,question:e,maxValues:e.max_selected_values,isDisabled:a,isRequired:e.mandatory,component:k}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(b=e.sub_question_rules)||void 0===b?void 0:b.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))))}return null},V=(e,t,a)=>{var r;if(e.mandatory&&(e=>!!O.current[e.id])(e)){const r=(0,v.toSlug)(e.name);t.hasOwnProperty((0,v.toSlug)(r))&&""!==t[(0,v.toSlug)(r)]&&0!==t[r].length||(a[r]=m)}null===(r=e.sub_question_rules)||void 0===r||r.forEach((e=>{V(e.sub_question,t,a)}))};if(!Object.keys(B).length)return null;const T=(e,t,a)=>{var r;t.includes((0,v.toSlug)(e.name))&&a.push(e),null===(r=e.sub_question_rules)||void 0===r||r.forEach((e=>{T(e.sub_question,t,a)}))},M=t=>{const a=[];return e.forEach((e=>{T(e,t,a)})),a.sort(((e,t)=>e.order>t.order))[0]},K=e=>{const t=O.current[e];t&&t.current&&(t.current.focus(),t.current.scrollIntoView({behavior:"smooth",block:"center"}))};return Object.keys(B).length?o().createElement("div",{className:r},o().createElement(g.Form,{validate:t=>{const a={};return e.forEach((e=>{V(e,t,a)})),a},onSubmit:e=>{a(e)},initialValues:B},(({handleSubmit:t,form:a,submitting:r,pristine:n,values:s})=>(q=t,o().createElement("form",{onSubmit:e=>{const r=a.getRegisteredFields().filter((e=>a.getFieldState(e).invalid));if(r.length>0){const e=M(r);_(r,O.current[e.id],e.id),E&&(e=>{const t=M(e);t&&K(t.id)})(r)}t(e)},ref:P},u?o().createElement("fieldset",{disabled:"disabled"},e.map((e=>Q(e)))):e.map((e=>Q(e))),c&&o().createElement("pre",null,JSON.stringify(s,0,2)))))),!C&&o().createElement("button",{type:"submit",onClick:e=>{q(e)},style:{marginTop:10}},d)):null}));O.propTypes={extraQuestions:c().array.isRequired,userAnswers:c().array.isRequired,onAnswerChanges:c().func.isRequired,className:c().string,debug:c().bool,buttonText:c().string,questionContainerClassName:c().string,questionLabelContainerClassName:c().string,questionControlContainerClassName:c().string,RequiredErrorMessage:c().string,ValidationErrorClassName:c().string,allowExtraQuestionsEdit:c().bool,shouldScroll2FirstError:c().bool,readOnly:c().bool}},7017:(e,t,a)=>{a.d(t,{default:()=>p});var r=a(2462),n=a.n(r),s=a(9825),l=a.n(s),i=a(2015),o=a.n(i),u=a(6842),c=a.n(u),d=a(5028);a(1536);const m=["onChange","value","className","options","id","children","error","disabled","name","ariaLabelledBy"];class p extends o().Component{constructor(e){super(e);let t=!!e.value&&e.value.find((t=>!e.options.map((e=>e.value)).includes(t)));this.state={otherChecked:!!t},this.handleChange=this.handleChange.bind(this),this.handleOtherCBChange=this.handleOtherCBChange.bind(this)}handleChange(e){let t=this.props.options.map((e=>e.value)),a=this.props.value?[...this.props.value]:[];if("checkbox"===e.target.type)if(e.target.checked){const t=isNaN(e.target.value)?e.target.value:parseInt(e.target.value);a.push(t)}else a=a.filter((t=>t!=e.target.value));else a=a.filter((e=>t.includes(e))),a.push(e.target.value);let r={target:{id:this.props.id,value:a,type:"checkboxlist"}};this.props.onChange(r)}handleOtherCBChange(e){this.setState({otherChecked:e.target.checked})}render(){let e,t=this.props,{onChange:a,value:r,className:s,options:l,id:i,children:u,error:p,disabled:h,name:b,ariaLabelledBy:g}=t,{otherChecked:v}=(n()(t,m),this.state),f=this.props.hasOwnProperty("inline"),y=this.props.hasOwnProperty("allowOther"),_=!!r&&r.find((e=>!l.map((e=>e.value)).includes(e))),E=this.props.hasOwnProperty("error")&&""!==p,C=this.props.hasOwnProperty("disabled")&&1==h;return e=f?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px",marginTop:"7px"},o().createElement("div",{id:`chl_wrapper_${i}`,"aria-labelledby":g},o().createElement("div",{className:"checkboxes-div"+(E?" error":"")},l.map((t=>{let a=!!r&&r.includes(t.value);return o().createElement("div",{className:"form-check abc-checkbox",key:"radio_key_"+t.value,style:e},o().createElement("input",{type:"checkbox",id:`cb_${i}_${t.value}`,name:b||i,checked:a,disabled:C,onChange:this.handleChange,className:"form-check-input",value:t.value}),o().createElement("label",{className:"form-check-label",htmlFor:`cb_${i}_${t.value}`},o().createElement(d.default,null,t.label)))})),y&&o().createElement("div",{className:"form-check abc-checkbox",style:e},o().createElement("input",{type:"checkbox",id:"cb_other"+i,checked:v,disabled:C,onChange:this.handleOtherCBChange,className:"form-check-input",value:"other"}),o().createElement("label",{className:"form-check-label",htmlFor:"cb_other"+i},c().translate("general.other"))),y&&v&&o().createElement("div",{style:{paddingLeft:"22px",width:"50%"}},o().createElement("input",{className:"form-control",disabled:C,onChange:this.handleChange,value:_}))),E&&o().createElement("p",{className:"error-label"},p))}}p.defaultProps={ariaLabelledBy:null},p.propTypes={id:l().string.isRequired}},6604:(e,t,a)=>{a.d(t,{default:()=>g});var r=a(6031),n=a.n(r),s=a(1116),l=a.n(s),i=a(2462),o=a.n(i),u=a(2015),c=a.n(u),d=a(8466),m=a.n(d);const p=["onChange","value","className","error","clearable","disabled","overrideCSS","ariaLabelledBy"];function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?h(Object(a),!0).forEach((function(t){l()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):h(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}class g extends c().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(e){let t=null;t=this.props.isMulti?e?e.map((e=>e.value)):null:e?e.value:null;let a={target:{id:this.props.id,value:t,type:"dropdown"}};this.props.onChange(a)}render(){let e=this.props,{onChange:t,value:a,className:r,error:s,clearable:l,disabled:i,overrideCSS:u,ariaLabelledBy:d}=e,h=o()(e,p),g=this.props.hasOwnProperty("error")&&""!=s,v=this.props.hasOwnProperty("clearable"),f=this.props.hasOwnProperty("disabled")&&1==i,y=null,_=r;this.props.hasOwnProperty("overrideCSS")&&0!=u||(_="dropdown "+r+" "+(g?"error":"")),y=this.props.isMulti?this.props.options.filter((e=>a.includes(e.value))):a instanceof Object||null==a?a:this.props.options.find((e=>e.value==a));const E={menu:e=>b(b({},e),{},{zIndex:999})};return c().createElement("div",null,c().createElement(m(),n()({className:_,value:y,onChange:this.handleChange,isClearable:v,isDisabled:f,styles:E,"aria-labelledby":d,formatOptionLabel:e=>c().createElement("span",{dangerouslySetInnerHTML:{__html:e.label}})},h)),g&&c().createElement("p",{className:"error-label"},s))}}g.defaultProps={ariaLabelledBy:null}},5639:(e,t,a)=>{a.d(t,{default:()=>d});var r=a(2462),n=a.n(r),s=a(2015),l=a.n(s),i=a(5028),o=a(9825),u=a.n(o);a(1536);const c=["onChange","value","className","error","ariaLabelledBy","disabled","options","id","name"];class d extends l().Component{constructor(e){super(e),this.state={value:e.value},this.handleChange=this.handleChange.bind(this)}handleChange(e){let t={target:{id:this.props.id,value:e.target.value,type:"radio"}};this.props.onChange(t)}getLabel(e,t,a,r){return a?l().createElement("label",{className:"form-check-label",htmlFor:`radio_${t}_${e.value}`,style:{display:"inline-block"}},l().createElement(i.default,null,e.label)):r?l().createElement("label",{className:"form-check-label",htmlFor:`radio_${t}_${e.value}`},e.label):l().createElement("label",{className:"form-check-label",htmlFor:`radio_${t}_${e.value}`,style:{display:"inline-block"}},l().createElement("h4",{style:{marginTop:"0px"}},e.label),l().createElement(i.default,null,e.description))}render(){let e,t=this.props,{onChange:a,value:r,className:s,error:i,ariaLabelledBy:o,disabled:u,options:d,id:m,name:p}=t,h=(n()(t,c),this.props.hasOwnProperty("error")&&""!=i),b=this.props.hasOwnProperty("inline"),g=this.props.hasOwnProperty("simple"),v=this.props.hasOwnProperty("disabled")&&1==u;return e=b?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px"},l().createElement("div",{id:`rl_wrapper_${m}`,"aria-labelledby":o},d.map((t=>{let a=t.value==r;return l().createElement("div",{className:"form-check abc-radio",key:`radio_key_${m}_${t.value}`,style:e},l().createElement("input",{className:"form-check-input",type:"radio",id:`radio_${m}_${t.value}`,value:t.value,checked:a,onChange:this.handleChange,disabled:v,name:p||`radio_${m}`}),this.getLabel(t,m,b,g))})),h&&l().createElement("p",{className:"error-label"},i))}}d.defaultProps={ariaLabelledBy:null},d.propTypes={id:u().string.isRequired}},7651:(e,t,a)=>{a.d(t,{default:()=>c});var r=a(6031),n=a.n(r),s=a(2462),l=a.n(s),i=a(2015),o=a.n(i);const u=["onChange","value","className","error","ariaLabelledBy","containerClassName"];class c extends o().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}componentDidUpdate(e,t,a){this.props.value!==e.value&&(this.input.value=this.props.value)}handleChange(e){this.props.onChange(e)}render(){let e=this.props,{onChange:t,value:a,className:r,error:s,ariaLabelledBy:i,containerClassName:c}=e,d=l()(e,u),m=this.props.hasOwnProperty("error")&&""!==s,p=this.props.hasOwnProperty("className")?r:"form-control",h=this.props.hasOwnProperty("containerClassName")?c:"container-form-control";return o().createElement("div",{className:h},o().createElement("input",n()({className:`${p} ${m?"error":""}`,ref:e=>{this.input=e},defaultValue:a,"aria-labelledby":i,onChange:this.handleChange},d)),m&&o().createElement("p",{className:"error-label"},s))}}c.defaultProps={ariaLabelledBy:null}},5028:(e,t,a)=>{a.d(t,{default:()=>c});var r=a(6031),n=a.n(r),s=a(2462),l=a.n(s),i=a(2015),o=a.n(i);const u=["children","replaceNewLine","className"],c=e=>{let{children:t,replaceNewLine:a=!1,className:r=""}=e,s=l()(e,u);return o().createElement("span",n()({className:r,dangerouslySetInnerHTML:{__html:a?null==t?void 0:t.replace(/\n/g,"<br />"):t}},s))}},9558:(e,t,a)=>{a.d(t,{toSlug:()=>r});a(5812),a(8041);const r=e=>(e=e.toLowerCase()).replace(/[^a-zA-Z0-9]+/g,"_")},356:(e,t,a)=>{a.d(t,{default:()=>h});var r=a(1116),n=a.n(r),s=a(9558);function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){n()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}const o="ComboBox",u="CheckBoxList",c="RadioButtonList",d=[o,u,c],m="And",p="Equal";class h{constructor(e,t=[]){n()(this,"_parseQuestion",(e=>{if(this.questionByName[(0,s.toSlug)(e.name)]=e,this.questionById[parseInt(e.id)]=e,e.hasOwnProperty("sub_question_rules"))for(let t of e.sub_question_rules)this.rules[parseInt(t.id)]=t,this._parseQuestion(t.sub_question)})),n()(this,"_parseQuestions",(()=>{for(let e of this.questions)this._parseQuestion(e)})),n()(this,"_allowsValues",(e=>d.includes(e.type))),n()(this,"_allowsValue",((e,t)=>{let a=t.value.split(",").map((e=>parseInt(e)));for(let t of a)if(!e.values.map((e=>e.id)).includes(t))return!1;return!0})),n()(this,"_getAnswerFor",(e=>{let t=Number.isInteger(e)?e:e.id,a=this.answers[t]||null;return a||null})),n()(this,"_hasValue",(e=>""!==e.value)),n()(this,"_answerContains",((e,t)=>e.value.split(",").includes(t))),n()(this,"_isSubQuestionVisible",(e=>{let t=e.answer_values_operator===m;const a=this._getAnswerFor(e.parent_question_id);if(a)switch(e.visibility_condition){case p:for(let r of e.answer_values)t=e.answer_values_operator===m?t&&this._answerContains(a,r):t||this._answerContains(a,r);break;case"NotEqual":for(let r of e.answer_values)t=e.answer_values_operator===m?t&&!this._answerContains(a,r):t||!this._answerContains(a,r)}else t=e.visibility_condition!==p;return"Visible"===e.visibility?t:!t})),n()(this,"_isAnswered",(e=>{const t=this._getAnswerFor(e);if("MainQuestion"===e.class)return!e.mandatory||!!t&&(!!this._hasValue(t)&&!(this._allowsValues(e)&&!this._allowsValue(e,t)));for(let a of e.parent_rules)if(this._isSubQuestionVisible(this.rules[a]))return!e.mandatory||!!t&&(!!this._hasValue(t)&&!(this._allowsValues(e)&&!this._allowsValue(e,t)));return!0})),n()(this,"_checkQuestion",(e=>{let t=this._isAnswered(e);if(e.hasOwnProperty("sub_question_rules"))for(let a of e.sub_question_rules)t=t&&this._checkQuestion(a.sub_question);return t})),n()(this,"_formatQuestionAnswer",(e=>{var t,a;let r={};const n=(0,s.toSlug)(e.name);let l=null===(t=this.originalAnswers.find((t=>t.question_id===e.id)))||void 0===t?void 0:t.value;if(!l&&(null==e||null===(a=e.values)||void 0===a?void 0:a.length)>0){const t=e.values.find((e=>e.is_default));t&&(l=t.id.toString())}if(l&&("CheckBox"===e.type&&(l="false"!==l&&!!l),e.type!==c&&e.type!==o||(l=parseInt(l)),e.type===u&&(l=l.split(",").map((e=>parseInt(e)))||[])),r[n]=l||"",e.type===u&&""===r[n]&&(r[n]=[]),e.hasOwnProperty("sub_question_rules"))for(let t of e.sub_question_rules){let e=this._formatQuestionAnswer(t.sub_question);r=i(i({},r),e)}return r})),n()(this,"formatAnswers",(()=>{let e={};return this.questions.forEach((t=>{let a=this._formatQuestionAnswer(t);e=i(i({},e),a)})),e})),n()(this,"completed",(()=>{let e=!0;for(let t of this.questions)e=e&&this._checkQuestion(t);return e})),n()(this,"getQuestionByName",(e=>{const t=(0,s.toSlug)(e);return this.questionByName[e]||this.questionByName[t]||null})),n()(this,"getQuestionById",(e=>this.questionById[parseInt(e)]||null)),this.questions=e,this.originalAnswers=t,this.answers=[];for(let e of this.originalAnswers)this.answers[e.question_id]=e;this.questionByName={},this.questionById={},this.rules={},this._parseQuestions()}}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},1536:e=>{e.exports=require("awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},5812:e=>{e.exports=require("moment-timezone")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},8466:e=>{e.exports=require("react-select")},8041:e=>{e.exports=require("urijs")}},t={};function a(r){var n=t[r];if(void 0!==n)return n.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,a),s.exports}(()=>{a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t}})(),(()=>{a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};a.r(r),a.d(r,{default:()=>d});var n=a(2015),s=a.n(n),l=a(6842),i=a.n(l),o=(a(6108),a(9825)),u=a.n(o);class c extends s().Component{constructor(e){super(e),this.onSearchClick=this.onSearchClick.bind(this),this.onClearClick=this.onClearClick.bind(this),this.onKeyPressed=this.onKeyPressed.bind(this),this.onChange=this.onChange.bind(this),this.state={value:e.value||""}}onSearchClick(e){let{preventEvents:t}=this.props;t&&e.preventDefault(),this.doFiltering(this.state.value)}onClearClick(e){let{preventEvents:t}=this.props;t&&e.preventDefault(),this.doFiltering(""),this.setState({value:""})}doFiltering(e=""){this.props.onSearch(e.trim())}onKeyPressed(e){13===(e.keyCode||e.which)&&this.doFiltering(this.state.value)}onChange(e){this.setState({value:e.target.value}),this.props.onChange&&this.props.onChange(e.target.value)}render(){let{value:e}=this.state;return s().createElement("div",{className:"row search-container"},s().createElement("div",{className:"col-md-12"},s().createElement("div",{className:"input-group"},s().createElement("input",{type:"text",value:e,className:"form-control",placeholder:this.props.placeholder,onKeyPress:this.onKeyPressed,onChange:this.onChange}),s().createElement("span",{className:"input-group-btn",style:{width:"5%"}},s().createElement("button",{onClick:this.onSearchClick,className:"btn btn-default",title:i().translate("general.search")},s().createElement("i",{className:"fa fa-search"})),s().createElement("button",{onClick:this.onClearClick,className:"btn btn-default",title:i().translate("general.clear")},s().createElement("i",{className:"fa fa-times"}))))))}}c.defaultProps={preventEvents:!1,onChange:null,value:""},c.propTypes={preventEvents:u().bool,onChange:u().func};const d=c;return r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={6108:(e,t,a)=>{var r=a(6031),n=a.n(r),s=a(2462),l=a.n(s),i=a(2015),o=a.n(i),u=a(9825),c=a.n(u),d=a(7651),m=a(6604),p=a(5639),h=a(7017),b=a(356);const g=require("react-final-form");var v=a(9128);const f="CheckBox",y="RadioButton";a(1536);const _=["input","meta","question","className","isDisabled","isRequired"],E=["input","meta","question","isDisabled","isRequired"],C=["input","meta","question","isDisabled","isRequired"],q=["input","meta","question","isDisabled","isRequired","maxValues"],w=e=>{let{input:t,meta:a,question:r,className:s,isDisabled:i,isRequired:u}=e,c=l()(e,_);return o().createElement(d.default,n()({},t,c,{containerClassName:s,name:(0,v.toSlug)(r.name),ariaLabelledBy:`${(0,v.toSlug)(r.name)} label`,id:(0,v.toSlug)(r.name),value:t.value,disabled:i,required:u,onChange:t.onChange,placeholder:r.placeholder}))},N=e=>{let{input:t,meta:a,question:r,isDisabled:s,isRequired:i}=e,u=l()(e,E);return o().createElement(p.default,n()({},t,u,{name:(0,v.toSlug)(r.name),ariaLabelledBy:`${(0,v.toSlug)(r.name)} label`,id:(0,v.toSlug)(r.name),overrideCSS:!0,value:t.value,disabled:s,required:i,onChange:t.onChange}))},S=e=>{let{input:t,meta:a,question:r,isDisabled:s,isRequired:i}=e,u=l()(e,C);return o().createElement(m.default,n()({},t,u,{name:(0,v.toSlug)(r.name),ariaLabelledBy:`${(0,v.toSlug)(r.name)} label`,id:(0,v.toSlug)(r.name),overrideCSS:!0,className:"ddl-extra-questions-container",classNamePrefix:"ddl-extra-questions",value:t.value,disabled:s,required:i,onChange:t.onChange}))},k=e=>{let{input:t,meta:a,question:r,isDisabled:s,isRequired:i,maxValues:u}=e,c=l()(e,q);return o().createElement(h.default,n()({},t,c,{id:(0,v.toSlug)(r.name),name:(0,v.toSlug)(r.name),ariaLabelledBy:`${(0,v.toSlug)(r.name)} label`,value:t.value,disabled:s,required:i,onChange:e=>{const a=e.target.value;return u>0&&a.length>u?null:t.onChange(e)}}))},x=e=>e?e=>e?void 0:"Required":()=>{},O=o().forwardRef((({extraQuestions:e,userAnswers:t,onAnswerChanges:a,className:r="questions-form",questionContainerClassName:n="question-container",questionLabelContainerClassName:s="question-label-container",questionControlContainerClassName:l="question-control-container",readOnly:u=!1,debug:c=!1,buttonText:d="Submit",RequiredErrorMessage:m="Required",ValidationErrorClassName:p="extra-question-error",allowExtraQuestionsEdit:h=!0,onError:_=e=>console.log("form errors: ",e),shouldScroll2FirstError:E=!0},C)=>{let q=null;const O=(0,i.useRef)({}),P=(0,i.useRef)(null),[B,F]=(0,i.useState)({});(0,i.useEffect)((()=>{j()}),[e]),(0,i.useImperativeHandle)(C,(()=>({doSubmit(){var e;null===(e=P.current)||void 0===e||e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))},scroll2QuestionById(e){K(e)}})));const L=e=>(O.current[e]||(O.current[e]=o().createRef()),O.current[e]),j=()=>{const a=new b.default(e,t);F(a.formatAnswers())},$=({when:e,rule:t,children:a})=>o().createElement(g.Field,{name:e,subscription:{value:!0}},(({input:{value:e}})=>D(t,A(e,t),a))),R=({name:e})=>o().createElement(g.Field,{name:e,subscription:{error:!0,touched:!0,submitFailed:!0}},(({meta:{error:e,touched:t,submitFailed:a}})=>e&&(t||a)?o().createElement("div",{className:p},e):null)),A=(e,t)=>{let a=t.answer_values;if(Array.isArray(e)){if(!e.length)return!1;let r="And"===t.answer_values_operator;return a.forEach((a=>{r="And"===t.answer_values_operator?r&&e.includes(parseInt(a)):r||e.includes(parseInt(a))})),r}return a.includes(e.toString())},D=(e,t,a)=>"Visible"===e.visibility?"Equal"===e.visibility_condition?t?a:(delete O.current[e.sub_question.id],null):t?(delete O.current[e.sub_question.id],null):a:"Equal"===e.visibility_condition?t?(delete O.current[e.sub_question.id],null):a:t?a:(delete O.current[e.sub_question.id],null),I=e=>{var t;const a=String.fromCharCode(160),r=null==e||null===(t=e.label)||void 0===t?void 0:t.replace(/\n/g,"<br />").replace(/<p>(.*)<\/p>/gi,"$1"),n=[f,y],s=e.mandatory&&!n.includes(e.type)?`${r}${a}<b>*</b>`:r;return o().createElement("label",{dangerouslySetInnerHTML:{__html:s},htmlFor:(0,v.toSlug)(e.name),id:`${(0,v.toSlug)(e.name)} label`})},Q=e=>{let t=e.values;const a=!h&&((e,t)=>{const a=(0,v.toSlug)(e.name);if(!t.hasOwnProperty(a))return!1;const r=t[a];return Array.isArray(r)||"string"==typeof r?r.length>0:"number"==typeof r?r>0:"boolean"==typeof r&&r})(e,B);var r,u,c,d;if("Text"===e.type)return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:l},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),question:e,isDisabled:a,isRequired:e.mandatory,validate:x(e.mandatory),component:w}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(r=e.sub_question_rules)||void 0===r?void 0:r.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))));if("TextArea"===e.type)return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:l},o().createElement(g.Field,{validate:x(e.mandatory),name:(0,v.toSlug)(e.name),id:(0,v.toSlug)(e.name),disabled:a,required:e.mandatory,component:"textarea"}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(u=e.sub_question_rules)||void 0===u?void 0:u.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))));if(e.type===f)return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:`${n} checkbox-wrapper`},o().createElement("div",{className:`${l} input-wrapper`},o().createElement("div",{className:"form-check abc-checkbox"},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),id:(0,v.toSlug)(e.name),validate:x(e.mandatory),disabled:a,required:e.mandatory,type:"checkbox",className:"form-check-input",component:"input"}),o().createElement("label",{className:"form-check-label",htmlFor:(0,v.toSlug)(e.name)}),e.mandatory&&o().createElement("span",{className:"checkbox-mandatory"},o().createElement("b",null,"*")))),o().createElement("span",{className:`eq-checkbox-label ${s}`},I(e))),o().createElement(R,{name:(0,v.toSlug)(e.name)}),(null===(c=e.sub_question_rules)||void 0===c?void 0:c.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))));if(e.type===y)return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:`${n} checkbox-wrapper`},o().createElement("div",{className:`${l} input-wrapper`},o().createElement("div",{className:"form-check abc-radio"},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),id:(0,v.toSlug)(e.name),validate:x(e.mandatory),disabled:a,required:e.mandatory,type:"radio",className:"form-check-input",value:"true",component:"input"}),o().createElement("label",{className:"form-check-label",htmlFor:(0,v.toSlug)(e.name)}),e.mandatory&&o().createElement("span",{className:"checkbox-mandatory"},o().createElement("b",null,"*")))),o().createElement("span",{className:`eq-checkbox-label ${s}`},I(e))),o().createElement(R,{name:(0,v.toSlug)(e.name)}),(null===(d=e.sub_question_rules)||void 0===d?void 0:d.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))));if("RadioButtonList"===e.type){var m;const r=t.map((e=>({label:e.label,value:e.id})));return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:l},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),options:r,question:e,validate:x(e.mandatory),isDisabled:a,isRequired:e.mandatory,component:N}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(m=e.sub_question_rules)||void 0===m?void 0:m.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))))}if("ComboBox"===e.type||"CountryComboBox"===e.type){var p;const r=t.map((e=>({label:e.label,value:e.id})));return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:`${l} reactSelectDropdown`},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),options:r,question:e,validate:x(e.mandatory),isDisabled:a,isRequired:e.mandatory,component:S}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(p=e.sub_question_rules)||void 0===p?void 0:p.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))))}if("CheckBoxList"===e.type){var b;const r=t.map((e=>({label:e.label,value:e.id})));return o().createElement(i.Fragment,{key:(0,v.toSlug)(e.name)},o().createElement("div",{ref:L(e.id),className:n},o().createElement("span",{className:s},I(e)),o().createElement("div",{className:l},o().createElement(g.Field,{name:(0,v.toSlug)(e.name),className:l,validate:x(e.mandatory),options:r,question:e,maxValues:e.max_selected_values,isDisabled:a,isRequired:e.mandatory,component:k}),o().createElement(R,{name:(0,v.toSlug)(e.name)}))),(null===(b=e.sub_question_rules)||void 0===b?void 0:b.length)>0&&e.sub_question_rules.map((t=>o().createElement($,{key:t.id,when:(0,v.toSlug)(e.name),rule:t},Q(t.sub_question)))))}return null},V=(e,t,a)=>{var r;if(e.mandatory&&(e=>!!O.current[e.id])(e)){const r=(0,v.toSlug)(e.name);t.hasOwnProperty((0,v.toSlug)(r))&&""!==t[(0,v.toSlug)(r)]&&0!==t[r].length||(a[r]=m)}null===(r=e.sub_question_rules)||void 0===r||r.forEach((e=>{V(e.sub_question,t,a)}))};if(!Object.keys(B).length)return null;const T=(e,t,a)=>{var r;t.includes((0,v.toSlug)(e.name))&&a.push(e),null===(r=e.sub_question_rules)||void 0===r||r.forEach((e=>{T(e.sub_question,t,a)}))},M=t=>{const a=[];return e.forEach((e=>{T(e,t,a)})),a.sort(((e,t)=>e.order>t.order))[0]},K=e=>{const t=O.current[e];t&&t.current&&(t.current.focus(),t.current.scrollIntoView({behavior:"smooth",block:"center"}))};return Object.keys(B).length?o().createElement("div",{className:r},o().createElement(g.Form,{validate:t=>{const a={};return e.forEach((e=>{V(e,t,a)})),a},onSubmit:e=>{a(e)},initialValues:B},(({handleSubmit:t,form:a,submitting:r,pristine:n,values:s})=>(q=t,o().createElement("form",{onSubmit:e=>{const r=a.getRegisteredFields().filter((e=>a.getFieldState(e).invalid));if(r.length>0){const e=M(r);_(r,O.current[e.id],e.id),E&&(e=>{const t=M(e);t&&K(t.id)})(r)}t(e)},ref:P},u?o().createElement("fieldset",{disabled:"disabled"},e.map((e=>Q(e)))):e.map((e=>Q(e))),c&&o().createElement("pre",null,JSON.stringify(s,0,2)))))),!C&&o().createElement("button",{type:"submit",onClick:e=>{q(e)},style:{marginTop:10}},d)):null}));O.propTypes={extraQuestions:c().array.isRequired,userAnswers:c().array.isRequired,onAnswerChanges:c().func.isRequired,className:c().string,debug:c().bool,buttonText:c().string,questionContainerClassName:c().string,questionLabelContainerClassName:c().string,questionControlContainerClassName:c().string,RequiredErrorMessage:c().string,ValidationErrorClassName:c().string,allowExtraQuestionsEdit:c().bool,shouldScroll2FirstError:c().bool,readOnly:c().bool}},7017:(e,t,a)=>{a.d(t,{default:()=>p});var r=a(2462),n=a.n(r),s=a(9825),l=a.n(s),i=a(2015),o=a.n(i),u=a(6842),c=a.n(u),d=a(5028);a(1536);const m=["onChange","value","className","options","id","children","error","disabled","name","ariaLabelledBy"];class p extends o().Component{constructor(e){super(e);let t=!!e.value&&e.value.find((t=>!e.options.map((e=>e.value)).includes(t)));this.state={otherChecked:!!t},this.handleChange=this.handleChange.bind(this),this.handleOtherCBChange=this.handleOtherCBChange.bind(this)}handleChange(e){let t=this.props.options.map((e=>e.value)),a=this.props.value?[...this.props.value]:[];if("checkbox"===e.target.type)if(e.target.checked){const t=isNaN(e.target.value)?e.target.value:parseInt(e.target.value);a.push(t)}else a=a.filter((t=>t!=e.target.value));else a=a.filter((e=>t.includes(e))),a.push(e.target.value);let r={target:{id:this.props.id,value:a,type:"checkboxlist"}};this.props.onChange(r)}handleOtherCBChange(e){this.setState({otherChecked:e.target.checked})}render(){let e,t=this.props,{onChange:a,value:r,className:s,options:l,id:i,children:u,error:p,disabled:h,name:b,ariaLabelledBy:g}=t,{otherChecked:v}=(n()(t,m),this.state),f=this.props.hasOwnProperty("inline"),y=this.props.hasOwnProperty("allowOther"),_=!!r&&r.find((e=>!l.map((e=>e.value)).includes(e))),E=this.props.hasOwnProperty("error")&&""!==p,C=this.props.hasOwnProperty("disabled")&&1==h;return e=f?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px",marginTop:"7px"},o().createElement("div",{id:`chl_wrapper_${i}`,"aria-labelledby":g},o().createElement("div",{className:"checkboxes-div"+(E?" error":"")},l.map((t=>{let a=!!r&&r.includes(t.value);return o().createElement("div",{className:"form-check abc-checkbox",key:"radio_key_"+t.value,style:e},o().createElement("input",{type:"checkbox",id:`cb_${i}_${t.value}`,name:b||i,checked:a,disabled:C,onChange:this.handleChange,className:"form-check-input",value:t.value}),o().createElement("label",{className:"form-check-label",htmlFor:`cb_${i}_${t.value}`},o().createElement(d.default,null,t.label)))})),y&&o().createElement("div",{className:"form-check abc-checkbox",style:e},o().createElement("input",{type:"checkbox",id:"cb_other"+i,checked:v,disabled:C,onChange:this.handleOtherCBChange,className:"form-check-input",value:"other"}),o().createElement("label",{className:"form-check-label",htmlFor:"cb_other"+i},c().translate("general.other"))),y&&v&&o().createElement("div",{style:{paddingLeft:"22px",width:"50%"}},o().createElement("input",{className:"form-control",disabled:C,onChange:this.handleChange,value:_}))),E&&o().createElement("p",{className:"error-label"},p))}}p.defaultProps={ariaLabelledBy:null},p.propTypes={id:l().string.isRequired}},6604:(e,t,a)=>{a.d(t,{default:()=>g});var r=a(6031),n=a.n(r),s=a(1116),l=a.n(s),i=a(2462),o=a.n(i),u=a(2015),c=a.n(u),d=a(8466),m=a.n(d);const p=["onChange","value","className","error","clearable","disabled","overrideCSS","ariaLabelledBy"];function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function b(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?h(Object(a),!0).forEach((function(t){l()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):h(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}class g extends c().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(e){let t=null;t=this.props.isMulti?e?e.map((e=>e.value)):null:e?e.value:null;let a={target:{id:this.props.id,value:t,type:"dropdown"}};this.props.onChange(a)}render(){let e=this.props,{onChange:t,value:a,className:r,error:s,clearable:l,disabled:i,overrideCSS:u,ariaLabelledBy:d}=e,h=o()(e,p),g=this.props.hasOwnProperty("error")&&""!=s,v=this.props.hasOwnProperty("clearable"),f=this.props.hasOwnProperty("disabled")&&1==i,y=null,_=r;this.props.hasOwnProperty("overrideCSS")&&0!=u||(_="dropdown "+r+" "+(g?"error":"")),y=this.props.isMulti?this.props.options.filter((e=>a.includes(e.value))):a instanceof Object||null==a?a:this.props.options.find((e=>e.value==a));const E={menu:e=>b(b({},e),{},{zIndex:999})};return c().createElement("div",null,c().createElement(m(),n()({className:_,value:y,onChange:this.handleChange,isClearable:v,isDisabled:f,styles:E,"aria-labelledby":d,formatOptionLabel:e=>c().createElement("span",{dangerouslySetInnerHTML:{__html:e.label}})},h)),g&&c().createElement("p",{className:"error-label"},s))}}g.defaultProps={ariaLabelledBy:null}},5639:(e,t,a)=>{a.d(t,{default:()=>d});var r=a(2462),n=a.n(r),s=a(2015),l=a.n(s),i=a(5028),o=a(9825),u=a.n(o);a(1536);const c=["onChange","value","className","error","ariaLabelledBy","disabled","options","id","name"];class d extends l().Component{constructor(e){super(e),this.state={value:e.value},this.handleChange=this.handleChange.bind(this)}handleChange(e){let t={target:{id:this.props.id,value:e.target.value,type:"radio"}};this.props.onChange(t)}getLabel(e,t,a,r){return a?l().createElement("label",{className:"form-check-label",htmlFor:`radio_${t}_${e.value}`,style:{display:"inline-block"}},l().createElement(i.default,null,e.label)):r?l().createElement("label",{className:"form-check-label",htmlFor:`radio_${t}_${e.value}`},e.label):l().createElement("label",{className:"form-check-label",htmlFor:`radio_${t}_${e.value}`,style:{display:"inline-block"}},l().createElement("h4",{style:{marginTop:"0px"}},e.label),l().createElement(i.default,null,e.description))}render(){let e,t=this.props,{onChange:a,value:r,className:s,error:i,ariaLabelledBy:o,disabled:u,options:d,id:m,name:p}=t,h=(n()(t,c),this.props.hasOwnProperty("error")&&""!=i),b=this.props.hasOwnProperty("inline"),g=this.props.hasOwnProperty("simple"),v=this.props.hasOwnProperty("disabled")&&1==u;return e=b?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px"},l().createElement("div",{id:`rl_wrapper_${m}`,"aria-labelledby":o},d.map((t=>{let a=t.value==r;return l().createElement("div",{className:"form-check abc-radio",key:`radio_key_${m}_${t.value}`,style:e},l().createElement("input",{className:"form-check-input",type:"radio",id:`radio_${m}_${t.value}`,value:t.value,checked:a,onChange:this.handleChange,disabled:v,name:p||`radio_${m}`}),this.getLabel(t,m,b,g))})),h&&l().createElement("p",{className:"error-label"},i))}}d.defaultProps={ariaLabelledBy:null},d.propTypes={id:u().string.isRequired}},7651:(e,t,a)=>{a.d(t,{default:()=>c});var r=a(6031),n=a.n(r),s=a(2462),l=a.n(s),i=a(2015),o=a.n(i);const u=["onChange","value","className","error","ariaLabelledBy","containerClassName"];class c extends o().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}componentDidUpdate(e,t,a){this.props.value!==e.value&&(this.input.value=this.props.value)}handleChange(e){this.props.onChange(e)}render(){let e=this.props,{onChange:t,value:a,className:r,error:s,ariaLabelledBy:i,containerClassName:c}=e,d=l()(e,u),m=this.props.hasOwnProperty("error")&&""!==s,p=this.props.hasOwnProperty("className")?r:"form-control",h=this.props.hasOwnProperty("containerClassName")?c:"container-form-control";return o().createElement("div",{className:h},o().createElement("input",n()({className:`${p} ${m?"error":""}`,ref:e=>{this.input=e},defaultValue:a,"aria-labelledby":i,onChange:this.handleChange},d)),m&&o().createElement("p",{className:"error-label"},s))}}c.defaultProps={ariaLabelledBy:null}},5028:(e,t,a)=>{a.d(t,{default:()=>c});var r=a(6031),n=a.n(r),s=a(2462),l=a.n(s),i=a(2015),o=a.n(i);const u=["children","replaceNewLine","className"],c=e=>{let{children:t,replaceNewLine:a=!1,className:r=""}=e,s=l()(e,u);return o().createElement("span",n()({className:r,dangerouslySetInnerHTML:{__html:a?null==t?void 0:t.replace(/\n/g,"<br />"):t}},s))}},9128:(e,t,a)=>{a.d(t,{toSlug:()=>r});require("@sentry/react");a(5812),a(8041);const r=e=>(e=e.toLowerCase()).replace(/[^a-zA-Z0-9]+/g,"_")},356:(e,t,a)=>{a.d(t,{default:()=>h});var r=a(1116),n=a.n(r),s=a(9128);function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){n()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}const o="ComboBox",u="CheckBoxList",c="RadioButtonList",d=[o,u,c],m="And",p="Equal";class h{constructor(e,t=[]){n()(this,"_parseQuestion",(e=>{if(this.questionByName[(0,s.toSlug)(e.name)]=e,this.questionById[parseInt(e.id)]=e,e.hasOwnProperty("sub_question_rules"))for(let t of e.sub_question_rules)this.rules[parseInt(t.id)]=t,this._parseQuestion(t.sub_question)})),n()(this,"_parseQuestions",(()=>{for(let e of this.questions)this._parseQuestion(e)})),n()(this,"_allowsValues",(e=>d.includes(e.type))),n()(this,"_allowsValue",((e,t)=>{let a=t.value.split(",").map((e=>parseInt(e)));for(let t of a)if(!e.values.map((e=>e.id)).includes(t))return!1;return!0})),n()(this,"_getAnswerFor",(e=>{let t=Number.isInteger(e)?e:e.id,a=this.answers[t]||null;return a||null})),n()(this,"_hasValue",(e=>""!==e.value)),n()(this,"_answerContains",((e,t)=>e.value.split(",").includes(t))),n()(this,"_isSubQuestionVisible",(e=>{let t=e.answer_values_operator===m;const a=this._getAnswerFor(e.parent_question_id);if(a)switch(e.visibility_condition){case p:for(let r of e.answer_values)t=e.answer_values_operator===m?t&&this._answerContains(a,r):t||this._answerContains(a,r);break;case"NotEqual":for(let r of e.answer_values)t=e.answer_values_operator===m?t&&!this._answerContains(a,r):t||!this._answerContains(a,r)}else t=e.visibility_condition!==p;return"Visible"===e.visibility?t:!t})),n()(this,"_isAnswered",(e=>{const t=this._getAnswerFor(e);if("MainQuestion"===e.class)return!e.mandatory||!!t&&(!!this._hasValue(t)&&!(this._allowsValues(e)&&!this._allowsValue(e,t)));for(let a of e.parent_rules)if(this._isSubQuestionVisible(this.rules[a]))return!e.mandatory||!!t&&(!!this._hasValue(t)&&!(this._allowsValues(e)&&!this._allowsValue(e,t)));return!0})),n()(this,"_checkQuestion",(e=>{let t=this._isAnswered(e);if(e.hasOwnProperty("sub_question_rules"))for(let a of e.sub_question_rules)t=t&&this._checkQuestion(a.sub_question);return t})),n()(this,"_formatQuestionAnswer",(e=>{var t,a;let r={};const n=(0,s.toSlug)(e.name);let l=null===(t=this.originalAnswers.find((t=>t.question_id===e.id)))||void 0===t?void 0:t.value;if(!l&&(null==e||null===(a=e.values)||void 0===a?void 0:a.length)>0){const t=e.values.find((e=>e.is_default));t&&(l=t.id.toString())}if(l&&("CheckBox"===e.type&&(l="false"!==l&&!!l),e.type!==c&&e.type!==o||(l=parseInt(l)),e.type===u&&(l=l.split(",").map((e=>parseInt(e)))||[])),r[n]=l||"",e.type===u&&""===r[n]&&(r[n]=[]),e.hasOwnProperty("sub_question_rules"))for(let t of e.sub_question_rules){let e=this._formatQuestionAnswer(t.sub_question);r=i(i({},r),e)}return r})),n()(this,"formatAnswers",(()=>{let e={};return this.questions.forEach((t=>{let a=this._formatQuestionAnswer(t);e=i(i({},e),a)})),e})),n()(this,"completed",(()=>{let e=!0;for(let t of this.questions)e=e&&this._checkQuestion(t);return e})),n()(this,"getQuestionByName",(e=>{const t=(0,s.toSlug)(e);return this.questionByName[e]||this.questionByName[t]||null})),n()(this,"getQuestionById",(e=>this.questionById[parseInt(e)]||null)),this.questions=e,this.originalAnswers=t,this.answers=[];for(let e of this.originalAnswers)this.answers[e.question_id]=e;this.questionByName={},this.questionById={},this.rules={},this._parseQuestions()}}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},1536:e=>{e.exports=require("awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},5812:e=>{e.exports=require("moment-timezone")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},8466:e=>{e.exports=require("react-select")},8041:e=>{e.exports=require("urijs")}},t={};function a(r){var n=t[r];if(void 0!==n)return n.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,a),s.exports}(()=>{a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t}})(),(()=>{a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};a.r(r),a.d(r,{default:()=>d});var n=a(2015),s=a.n(n),l=a(6842),i=a.n(l),o=(a(6108),a(9825)),u=a.n(o);class c extends s().Component{constructor(e){super(e),this.onSearchClick=this.onSearchClick.bind(this),this.onClearClick=this.onClearClick.bind(this),this.onKeyPressed=this.onKeyPressed.bind(this),this.onChange=this.onChange.bind(this),this.state={value:e.value||""}}onSearchClick(e){let{preventEvents:t}=this.props;t&&e.preventDefault(),this.doFiltering(this.state.value)}onClearClick(e){let{preventEvents:t}=this.props;t&&e.preventDefault(),this.doFiltering(""),this.setState({value:""})}doFiltering(e=""){this.props.onSearch(e.trim())}onKeyPressed(e){13===(e.keyCode||e.which)&&this.doFiltering(this.state.value)}onChange(e){this.setState({value:e.target.value}),this.props.onChange&&this.props.onChange(e.target.value)}render(){let{value:e}=this.state;return s().createElement("div",{className:"row search-container"},s().createElement("div",{className:"col-md-12"},s().createElement("div",{className:"input-group"},s().createElement("input",{type:"text",value:e,className:"form-control",placeholder:this.props.placeholder,onKeyPress:this.onKeyPressed,onChange:this.onChange}),s().createElement("span",{className:"input-group-btn",style:{width:"5%"}},s().createElement("button",{onClick:this.onSearchClick,className:"btn btn-default",title:i().translate("general.search")},s().createElement("i",{className:"fa fa-search"})),s().createElement("button",{onClick:this.onClearClick,className:"btn btn-default",title:i().translate("general.clear")},s().createElement("i",{className:"fa fa-times"}))))))}}c.defaultProps={preventEvents:!1,onChange:null,value:""},c.propTypes={preventEvents:u().bool,onChange:u().func};const d=c;return r})()));
2
2
  //# sourceMappingURL=free-text-search.js.map