@ajf/material 13.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +6 -0
  3. package/barcode/_barcode.scss +0 -0
  4. package/barcode/barcode-module.d.ts +23 -0
  5. package/barcode/barcode.d.ts +30 -0
  6. package/barcode/index.d.ts +4 -0
  7. package/barcode/index.metadata.json +1 -0
  8. package/barcode/package.json +9 -0
  9. package/barcode/public-api.d.ts +23 -0
  10. package/bundles/material-barcode.umd.js +433 -0
  11. package/bundles/material-barcode.umd.js.map +1 -0
  12. package/bundles/material-calendar.umd.js +435 -0
  13. package/bundles/material-calendar.umd.js.map +1 -0
  14. package/bundles/material-checkbox-group.umd.js +432 -0
  15. package/bundles/material-checkbox-group.umd.js.map +1 -0
  16. package/bundles/material-form-builder.umd.js +3558 -0
  17. package/bundles/material-form-builder.umd.js.map +1 -0
  18. package/bundles/material-forms.umd.js +968 -0
  19. package/bundles/material-forms.umd.js.map +1 -0
  20. package/bundles/material-image.umd.js +420 -0
  21. package/bundles/material-image.umd.js.map +1 -0
  22. package/bundles/material-monaco-editor.umd.js +755 -0
  23. package/bundles/material-monaco-editor.umd.js.map +1 -0
  24. package/bundles/material-node-icon.umd.js +415 -0
  25. package/bundles/material-node-icon.umd.js.map +1 -0
  26. package/bundles/material-page-slider.umd.js +424 -0
  27. package/bundles/material-page-slider.umd.js.map +1 -0
  28. package/bundles/material-report-builder.umd.js +5814 -0
  29. package/bundles/material-report-builder.umd.js.map +1 -0
  30. package/bundles/material-reports.umd.js +731 -0
  31. package/bundles/material-reports.umd.js.map +1 -0
  32. package/bundles/material-time.umd.js +424 -0
  33. package/bundles/material-time.umd.js.map +1 -0
  34. package/bundles/material.umd.js +40 -0
  35. package/bundles/material.umd.js.map +1 -0
  36. package/calendar/_calendar.scss +0 -0
  37. package/calendar/calendar-module.d.ts +23 -0
  38. package/calendar/calendar.d.ts +30 -0
  39. package/calendar/index.d.ts +4 -0
  40. package/calendar/index.metadata.json +1 -0
  41. package/calendar/package.json +9 -0
  42. package/calendar/public-api.d.ts +23 -0
  43. package/checkbox-group/_checkbox-group.scss +0 -0
  44. package/checkbox-group/checkbox-group-item.d.ts +25 -0
  45. package/checkbox-group/checkbox-group-module.d.ts +23 -0
  46. package/checkbox-group/index.d.ts +4 -0
  47. package/checkbox-group/index.metadata.json +1 -0
  48. package/checkbox-group/package.json +9 -0
  49. package/checkbox-group/public-api.d.ts +23 -0
  50. package/esm2015/barcode/barcode-module.js +50 -0
  51. package/esm2015/barcode/barcode.externs.js +6 -0
  52. package/esm2015/barcode/barcode.js +52 -0
  53. package/esm2015/barcode/index.js +5 -0
  54. package/esm2015/barcode/public-api.js +24 -0
  55. package/esm2015/calendar/calendar-module.js +48 -0
  56. package/esm2015/calendar/calendar.externs.js +6 -0
  57. package/esm2015/calendar/calendar.js +55 -0
  58. package/esm2015/calendar/index.js +5 -0
  59. package/esm2015/calendar/public-api.js +24 -0
  60. package/esm2015/checkbox-group/checkbox-group-item.js +51 -0
  61. package/esm2015/checkbox-group/checkbox-group-module.js +47 -0
  62. package/esm2015/checkbox-group/checkbox-group.externs.js +6 -0
  63. package/esm2015/checkbox-group/index.js +5 -0
  64. package/esm2015/checkbox-group/public-api.js +24 -0
  65. package/esm2015/form-builder/branch-line.js +73 -0
  66. package/esm2015/form-builder/choices-origin-data-source.js +38 -0
  67. package/esm2015/form-builder/choices-origin-editor-dialog.js +57 -0
  68. package/esm2015/form-builder/choices-origin-editor.js +78 -0
  69. package/esm2015/form-builder/condition-editor-dialog.js +59 -0
  70. package/esm2015/form-builder/condition-editor.js +143 -0
  71. package/esm2015/form-builder/form-builder-module.js +96 -0
  72. package/esm2015/form-builder/form-builder-service.js +764 -0
  73. package/esm2015/form-builder/form-builder-utils.js +63 -0
  74. package/esm2015/form-builder/form-builder.externs.js +6 -0
  75. package/esm2015/form-builder/form-builder.js +187 -0
  76. package/esm2015/form-builder/index.js +16 -0
  77. package/esm2015/form-builder/node-entry.js +245 -0
  78. package/esm2015/form-builder/node-properties.js +968 -0
  79. package/esm2015/form-builder/node-type-entry.js +50 -0
  80. package/esm2015/form-builder/operations.js +23 -0
  81. package/esm2015/form-builder/public-api.js +26 -0
  82. package/esm2015/form-builder/string-identifier-dialog.js +94 -0
  83. package/esm2015/form-builder/validation-condition-editor-dialog.js +59 -0
  84. package/esm2015/form-builder/warning-condition-editor-dialog.js +59 -0
  85. package/esm2015/forms/barcode-field.js +43 -0
  86. package/esm2015/forms/boolean-field.js +43 -0
  87. package/esm2015/forms/date-field.js +43 -0
  88. package/esm2015/forms/date-input-field.js +65 -0
  89. package/esm2015/forms/empty-field.js +43 -0
  90. package/esm2015/forms/field-service.js +115 -0
  91. package/esm2015/forms/field-warning-dialog.js +32 -0
  92. package/esm2015/forms/field.js +45 -0
  93. package/esm2015/forms/form.js +46 -0
  94. package/esm2015/forms/forms-module.js +107 -0
  95. package/esm2015/forms/forms.externs.js +6 -0
  96. package/esm2015/forms/index.js +9 -0
  97. package/esm2015/forms/input-field.js +43 -0
  98. package/esm2015/forms/multiple-choice-field.js +44 -0
  99. package/esm2015/forms/public-api.js +37 -0
  100. package/esm2015/forms/range-field.js +45 -0
  101. package/esm2015/forms/single-choice-field.js +44 -0
  102. package/esm2015/forms/table-field.js +43 -0
  103. package/esm2015/forms/text-field.js +43 -0
  104. package/esm2015/forms/time-field.js +43 -0
  105. package/esm2015/forms/video-url-field.js +47 -0
  106. package/esm2015/forms/warning-alert-service.js +42 -0
  107. package/esm2015/image/image-module.js +42 -0
  108. package/esm2015/image/image.externs.js +6 -0
  109. package/esm2015/image/image.js +44 -0
  110. package/esm2015/image/index.js +5 -0
  111. package/esm2015/image/public-api.js +24 -0
  112. package/esm2015/index.js +28 -0
  113. package/esm2015/material.externs.js +0 -0
  114. package/esm2015/monaco-editor/auto-complete-item-model.js +44 -0
  115. package/esm2015/monaco-editor/autocomplete-singleton-model.js +134 -0
  116. package/esm2015/monaco-editor/editor-language-model.js +60 -0
  117. package/esm2015/monaco-editor/editor-options-model.js +27 -0
  118. package/esm2015/monaco-editor/editor-scrollbar-options.js +23 -0
  119. package/esm2015/monaco-editor/editor-theme.js +30 -0
  120. package/esm2015/monaco-editor/index.js +5 -0
  121. package/esm2015/monaco-editor/monaco-editor-module.js +36 -0
  122. package/esm2015/monaco-editor/monaco-editor.externs.js +6 -0
  123. package/esm2015/monaco-editor/monaco-editor.js +389 -0
  124. package/esm2015/monaco-editor/public-api.js +24 -0
  125. package/esm2015/node-icon/index.js +5 -0
  126. package/esm2015/node-icon/node-icon-module.js +42 -0
  127. package/esm2015/node-icon/node-icon.externs.js +6 -0
  128. package/esm2015/node-icon/node-icon.js +35 -0
  129. package/esm2015/node-icon/public-api.js +24 -0
  130. package/esm2015/page-slider/index.js +5 -0
  131. package/esm2015/page-slider/page-slider-module.js +49 -0
  132. package/esm2015/page-slider/page-slider.externs.js +6 -0
  133. package/esm2015/page-slider/page-slider.js +44 -0
  134. package/esm2015/page-slider/public-api.js +24 -0
  135. package/esm2015/report-builder/column.js +97 -0
  136. package/esm2015/report-builder/condition-editor.js +159 -0
  137. package/esm2015/report-builder/content.js +255 -0
  138. package/esm2015/report-builder/custom-widget-dialog.js +51 -0
  139. package/esm2015/report-builder/custom-widget-toolbar-button.js +70 -0
  140. package/esm2015/report-builder/custom-widgets-toolbar.js +124 -0
  141. package/esm2015/report-builder/forms-analyzer-dialog.js +315 -0
  142. package/esm2015/report-builder/forms-analyzer.js +264 -0
  143. package/esm2015/report-builder/image-filter.js +32 -0
  144. package/esm2015/report-builder/image-group.js +106 -0
  145. package/esm2015/report-builder/index.js +25 -0
  146. package/esm2015/report-builder/models.js +23 -0
  147. package/esm2015/report-builder/operations.js +23 -0
  148. package/esm2015/report-builder/properties.js +765 -0
  149. package/esm2015/report-builder/public-api.js +26 -0
  150. package/esm2015/report-builder/quill-editor.js +299 -0
  151. package/esm2015/report-builder/renderer-widget.js +238 -0
  152. package/esm2015/report-builder/report-builder-drag-data.js +23 -0
  153. package/esm2015/report-builder/report-builder-module.js +114 -0
  154. package/esm2015/report-builder/report-builder-service.js +1685 -0
  155. package/esm2015/report-builder/report-builder.externs.js +6 -0
  156. package/esm2015/report-builder/report-builder.js +69 -0
  157. package/esm2015/report-builder/theme-color-dialog.js +90 -0
  158. package/esm2015/report-builder/theme-color.js +215 -0
  159. package/esm2015/report-builder/tokens.js +24 -0
  160. package/esm2015/report-builder/toolbar-dialog.js +56 -0
  161. package/esm2015/report-builder/toolbar.js +90 -0
  162. package/esm2015/report-builder/utils.js +48 -0
  163. package/esm2015/report-builder/widget-toolbar-button.js +47 -0
  164. package/esm2015/report-builder/widgets-row-buttons.js +133 -0
  165. package/esm2015/report-builder/widgets-toolbar.js +79 -0
  166. package/esm2015/reports/chart-widget.js +41 -0
  167. package/esm2015/reports/formula-widget.js +41 -0
  168. package/esm2015/reports/image-container-widget.js +43 -0
  169. package/esm2015/reports/image-widget.js +41 -0
  170. package/esm2015/reports/index.js +5 -0
  171. package/esm2015/reports/layout-widget.js +22 -0
  172. package/esm2015/reports/map-widget.js +41 -0
  173. package/esm2015/reports/page-break-widget.js +41 -0
  174. package/esm2015/reports/public-api.js +33 -0
  175. package/esm2015/reports/report.js +41 -0
  176. package/esm2015/reports/reports-module.js +79 -0
  177. package/esm2015/reports/reports.externs.js +6 -0
  178. package/esm2015/reports/table-widget.js +41 -0
  179. package/esm2015/reports/text-widget.js +41 -0
  180. package/esm2015/reports/widget.js +120 -0
  181. package/esm2015/time/index.js +5 -0
  182. package/esm2015/time/public-api.js +24 -0
  183. package/esm2015/time/time-module.js +44 -0
  184. package/esm2015/time/time.externs.js +6 -0
  185. package/esm2015/time/time.js +46 -0
  186. package/fesm2015/barcode.js +129 -0
  187. package/fesm2015/barcode.js.map +1 -0
  188. package/fesm2015/calendar.js +128 -0
  189. package/fesm2015/calendar.js.map +1 -0
  190. package/fesm2015/checkbox-group.js +124 -0
  191. package/fesm2015/checkbox-group.js.map +1 -0
  192. package/fesm2015/form-builder.js +2987 -0
  193. package/fesm2015/form-builder.js.map +1 -0
  194. package/fesm2015/forms.js +923 -0
  195. package/fesm2015/forms.js.map +1 -0
  196. package/fesm2015/image.js +113 -0
  197. package/fesm2015/image.js.map +1 -0
  198. package/fesm2015/material.js +30 -0
  199. package/fesm2015/material.js.map +1 -0
  200. package/fesm2015/monaco-editor.js +741 -0
  201. package/fesm2015/monaco-editor.js.map +1 -0
  202. package/fesm2015/node-icon.js +104 -0
  203. package/fesm2015/node-icon.js.map +1 -0
  204. package/fesm2015/page-slider.js +119 -0
  205. package/fesm2015/page-slider.js.map +1 -0
  206. package/fesm2015/report-builder.js +5332 -0
  207. package/fesm2015/report-builder.js.map +1 -0
  208. package/fesm2015/reports.js +560 -0
  209. package/fesm2015/reports.js.map +1 -0
  210. package/fesm2015/time.js +116 -0
  211. package/fesm2015/time.js.map +1 -0
  212. package/form-builder/_form-builder.scss +0 -0
  213. package/form-builder/branch-line.d.ts +36 -0
  214. package/form-builder/choices-origin-data-source.d.ts +35 -0
  215. package/form-builder/choices-origin-editor-dialog.d.ts +34 -0
  216. package/form-builder/choices-origin-editor.d.ts +43 -0
  217. package/form-builder/condition-editor-dialog.d.ts +35 -0
  218. package/form-builder/condition-editor.d.ts +37 -0
  219. package/form-builder/form-builder-module.d.ts +23 -0
  220. package/form-builder/form-builder-service.d.ts +191 -0
  221. package/form-builder/form-builder-utils.d.ts +41 -0
  222. package/form-builder/form-builder.d.ts +78 -0
  223. package/form-builder/index.d.ts +15 -0
  224. package/form-builder/index.metadata.json +1 -0
  225. package/form-builder/node-entry.d.ts +93 -0
  226. package/form-builder/node-properties.d.ts +184 -0
  227. package/form-builder/node-type-entry.d.ts +30 -0
  228. package/form-builder/operations.d.ts +31 -0
  229. package/form-builder/package.json +9 -0
  230. package/form-builder/public-api.d.ts +25 -0
  231. package/form-builder/string-identifier-dialog.d.ts +45 -0
  232. package/form-builder/validation-condition-editor-dialog.d.ts +36 -0
  233. package/form-builder/warning-condition-editor-dialog.d.ts +36 -0
  234. package/forms/_forms.scss +0 -0
  235. package/forms/barcode-field.d.ts +27 -0
  236. package/forms/boolean-field.d.ts +27 -0
  237. package/forms/date-field.d.ts +27 -0
  238. package/forms/date-input-field.d.ts +34 -0
  239. package/forms/empty-field.d.ts +27 -0
  240. package/forms/field-service.d.ts +25 -0
  241. package/forms/field-warning-dialog.d.ts +24 -0
  242. package/forms/field.d.ts +30 -0
  243. package/forms/form.d.ts +36 -0
  244. package/forms/forms-module.d.ts +25 -0
  245. package/forms/index.d.ts +8 -0
  246. package/forms/index.metadata.json +1 -0
  247. package/forms/input-field.d.ts +27 -0
  248. package/forms/multiple-choice-field.d.ts +27 -0
  249. package/forms/package.json +9 -0
  250. package/forms/public-api.d.ts +36 -0
  251. package/forms/range-field.d.ts +28 -0
  252. package/forms/single-choice-field.d.ts +27 -0
  253. package/forms/table-field.d.ts +27 -0
  254. package/forms/text-field.d.ts +27 -0
  255. package/forms/time-field.d.ts +27 -0
  256. package/forms/video-url-field.d.ts +29 -0
  257. package/forms/warning-alert-service.d.ts +29 -0
  258. package/image/_image.scss +0 -0
  259. package/image/image-module.d.ts +23 -0
  260. package/image/image.d.ts +27 -0
  261. package/image/index.d.ts +4 -0
  262. package/image/index.metadata.json +1 -0
  263. package/image/package.json +9 -0
  264. package/image/public-api.d.ts +23 -0
  265. package/index.d.ts +22 -0
  266. package/monaco-editor/_monaco-editor.scss +0 -0
  267. package/monaco-editor/auto-complete-item-model.d.ts +35 -0
  268. package/monaco-editor/autocomplete-singleton-model.d.ts +55 -0
  269. package/monaco-editor/editor-language-model.d.ts +59 -0
  270. package/monaco-editor/editor-options-model.d.ts +334 -0
  271. package/monaco-editor/editor-scrollbar-options.d.ts +83 -0
  272. package/monaco-editor/editor-theme.d.ts +29 -0
  273. package/monaco-editor/index.d.ts +4 -0
  274. package/monaco-editor/index.metadata.json +1 -0
  275. package/monaco-editor/monaco-editor-module.d.ts +23 -0
  276. package/monaco-editor/monaco-editor.d.ts +152 -0
  277. package/monaco-editor/package.json +9 -0
  278. package/monaco-editor/public-api.d.ts +23 -0
  279. package/node-icon/_node-icon.scss +0 -0
  280. package/node-icon/index.d.ts +4 -0
  281. package/node-icon/index.metadata.json +1 -0
  282. package/node-icon/node-icon-module.d.ts +23 -0
  283. package/node-icon/node-icon.d.ts +24 -0
  284. package/node-icon/package.json +9 -0
  285. package/node-icon/public-api.d.ts +23 -0
  286. package/package.json +38 -0
  287. package/page-slider/_page-slider.scss +0 -0
  288. package/page-slider/index.d.ts +4 -0
  289. package/page-slider/index.metadata.json +1 -0
  290. package/page-slider/package.json +9 -0
  291. package/page-slider/page-slider-module.d.ts +23 -0
  292. package/page-slider/page-slider.d.ts +30 -0
  293. package/page-slider/public-api.d.ts +23 -0
  294. package/report-builder/_report-builder.scss +0 -0
  295. package/report-builder/column.d.ts +63 -0
  296. package/report-builder/condition-editor.d.ts +67 -0
  297. package/report-builder/content.d.ts +142 -0
  298. package/report-builder/custom-widget-dialog.d.ts +31 -0
  299. package/report-builder/custom-widget-toolbar-button.d.ts +45 -0
  300. package/report-builder/custom-widgets-toolbar.d.ts +71 -0
  301. package/report-builder/forms-analyzer-dialog.d.ts +91 -0
  302. package/report-builder/forms-analyzer.d.ts +102 -0
  303. package/report-builder/image-filter.d.ts +25 -0
  304. package/report-builder/image-group.d.ts +69 -0
  305. package/report-builder/index.d.ts +24 -0
  306. package/report-builder/index.metadata.json +1 -0
  307. package/report-builder/models.d.ts +43 -0
  308. package/report-builder/operations.d.ts +45 -0
  309. package/report-builder/package.json +9 -0
  310. package/report-builder/properties.d.ts +365 -0
  311. package/report-builder/public-api.d.ts +26 -0
  312. package/report-builder/quill-editor.d.ts +113 -0
  313. package/report-builder/renderer-widget.d.ts +80 -0
  314. package/report-builder/report-builder-drag-data.d.ts +32 -0
  315. package/report-builder/report-builder-module.d.ts +23 -0
  316. package/report-builder/report-builder-service.d.ts +722 -0
  317. package/report-builder/report-builder.d.ts +36 -0
  318. package/report-builder/theme-color-dialog.d.ts +42 -0
  319. package/report-builder/theme-color.d.ts +108 -0
  320. package/report-builder/tokens.d.ts +24 -0
  321. package/report-builder/toolbar-dialog.d.ts +30 -0
  322. package/report-builder/toolbar.d.ts +48 -0
  323. package/report-builder/utils.d.ts +29 -0
  324. package/report-builder/widget-toolbar-button.d.ts +28 -0
  325. package/report-builder/widgets-row-buttons.d.ts +57 -0
  326. package/report-builder/widgets-toolbar.d.ts +44 -0
  327. package/reports/_reports.scss +0 -0
  328. package/reports/chart-widget.d.ts +26 -0
  329. package/reports/formula-widget.d.ts +26 -0
  330. package/reports/image-container-widget.d.ts +28 -0
  331. package/reports/image-widget.d.ts +26 -0
  332. package/reports/index.d.ts +4 -0
  333. package/reports/index.metadata.json +1 -0
  334. package/reports/layout-widget.d.ts +21 -0
  335. package/reports/map-widget.d.ts +26 -0
  336. package/reports/package.json +9 -0
  337. package/reports/page-break-widget.d.ts +26 -0
  338. package/reports/public-api.d.ts +32 -0
  339. package/reports/report.d.ts +26 -0
  340. package/reports/reports-module.d.ts +23 -0
  341. package/reports/table-widget.d.ts +26 -0
  342. package/reports/text-widget.d.ts +26 -0
  343. package/reports/widget.d.ts +40 -0
  344. package/time/_time.scss +0 -0
  345. package/time/index.d.ts +4 -0
  346. package/time/index.metadata.json +1 -0
  347. package/time/package.json +9 -0
  348. package/time/public-api.d.ts +23 -0
  349. package/time/time-module.d.ts +23 -0
  350. package/time/time.d.ts +28 -0
@@ -0,0 +1,923 @@
1
+ import { AjfBaseFieldComponent, AjfFormRendererService, AJF_WARNING_ALERT_SERVICE, AjfDateValueStringPipe, AjfInputFieldComponent as AjfInputFieldComponent$1, AjfFieldWithChoicesComponent, AJF_SEARCH_ALERT_THRESHOLD, AjfTableFieldComponent as AjfTableFieldComponent$1, AjfVideoUrlFieldComponent as AjfVideoUrlFieldComponent$1, AjfFieldService as AjfFieldService$1, AjfFieldType, AjfReadOnlyFieldComponent, AjfReadOnlyTableFieldComponent, AjfReadOnlySelectFieldComponent, AjfFileFieldComponent, AjfReadOnlyFileFieldComponent, AjfImageFieldComponent, AjfReadOnlyImageFieldComponent, AjfReadOnlyVideoUrlFieldComponent, AjfFormField as AjfFormField$1, AjfFormRenderer as AjfFormRenderer$1, AjfFormsModule as AjfFormsModule$1 } from '@ajf/core/forms';
2
+ import * as i0 from '@angular/core';
3
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, Injectable, ChangeDetectorRef, Inject, ViewChild, Optional, ComponentFactoryResolver, Input, NgModule } from '@angular/core';
4
+ import { MatDialog, MatDialogModule } from '@angular/material/dialog';
5
+ import { map } from 'rxjs/operators';
6
+ import { MatInput, MatInputModule } from '@angular/material/input';
7
+ import { AjfRange } from '@ajf/core/range';
8
+ import { HttpClient } from '@angular/common/http';
9
+ import { DomSanitizer } from '@angular/platform-browser';
10
+ import { AjfCommonModule } from '@ajf/core/common';
11
+ import { AjfTranslocoModule } from '@ajf/core/transloco';
12
+ import { AjfBarcodeModule } from '@ajf/material/barcode';
13
+ import { AjfCalendarModule } from '@ajf/material/calendar';
14
+ import { AjfCheckboxGroupModule } from '@ajf/material/checkbox-group';
15
+ import { AjfPageSliderModule } from '@ajf/material/page-slider';
16
+ import { AjfTimeModule } from '@ajf/material/time';
17
+ import { TextFieldModule } from '@angular/cdk/text-field';
18
+ import { CommonModule } from '@angular/common';
19
+ import { ReactiveFormsModule } from '@angular/forms';
20
+ import { MatButtonModule } from '@angular/material/button';
21
+ import { MatCardModule } from '@angular/material/card';
22
+ import { MatFormFieldModule } from '@angular/material/form-field';
23
+ import { MatIconModule } from '@angular/material/icon';
24
+ import { MatRadioModule } from '@angular/material/radio';
25
+ import { MatSelectModule } from '@angular/material/select';
26
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
27
+ import { MatSliderModule } from '@angular/material/slider';
28
+ import { MatToolbarModule } from '@angular/material/toolbar';
29
+ import { MatTooltipModule } from '@angular/material/tooltip';
30
+
31
+ /**
32
+ * @license
33
+ * Copyright (C) Gnucoop soc. coop.
34
+ *
35
+ * This file is part of the Advanced JSON forms (ajf).
36
+ *
37
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
38
+ * modify it under the terms of the GNU Affero General Public License as
39
+ * published by the Free Software Foundation, either version 3 of the License,
40
+ * or (at your option) any later version.
41
+ *
42
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
43
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
44
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
45
+ * General Public License for more details.
46
+ *
47
+ * You should have received a copy of the GNU Affero General Public License
48
+ * along with Advanced JSON forms (ajf).
49
+ * If not, see http://www.gnu.org/licenses/.
50
+ *
51
+ */
52
+ class AjfFieldWarningDialog {
53
+ }
54
+ AjfFieldWarningDialog.decorators = [
55
+ { type: Component, args: [{
56
+ template: "<mat-dialog-content><div [innerHTML]=\"message\"></div></mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"true\">Ok</button>\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\n</mat-dialog-actions>\n",
57
+ changeDetection: ChangeDetectionStrategy.OnPush,
58
+ encapsulation: ViewEncapsulation.None
59
+ },] }
60
+ ];
61
+
62
+ /**
63
+ * @license
64
+ * Copyright (C) Gnucoop soc. coop.
65
+ *
66
+ * This file is part of the Advanced JSON forms (ajf).
67
+ *
68
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
69
+ * modify it under the terms of the GNU Affero General Public License as
70
+ * published by the Free Software Foundation, either version 3 of the License,
71
+ * or (at your option) any later version.
72
+ *
73
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
74
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
75
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
76
+ * General Public License for more details.
77
+ *
78
+ * You should have received a copy of the GNU Affero General Public License
79
+ * along with Advanced JSON forms (ajf).
80
+ * If not, see http://www.gnu.org/licenses/.
81
+ *
82
+ */
83
+ class AjfWarningAlertService {
84
+ constructor(_dialog) {
85
+ this._dialog = _dialog;
86
+ }
87
+ showWarningAlertPrompt(warnings) {
88
+ const dialog = this._dialog.open(AjfFieldWarningDialog);
89
+ dialog.componentInstance.message = warnings.join('<br>');
90
+ return dialog.afterClosed().pipe(map((result) => ({ result })));
91
+ }
92
+ }
93
+ AjfWarningAlertService.decorators = [
94
+ { type: Injectable }
95
+ ];
96
+ AjfWarningAlertService.ctorParameters = () => [
97
+ { type: MatDialog }
98
+ ];
99
+
100
+ /**
101
+ * @license
102
+ * Copyright (C) Gnucoop soc. coop.
103
+ *
104
+ * This file is part of the Advanced JSON forms (ajf).
105
+ *
106
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
107
+ * modify it under the terms of the GNU Affero General Public License as
108
+ * published by the Free Software Foundation, either version 3 of the License,
109
+ * or (at your option) any later version.
110
+ *
111
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
112
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
113
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
114
+ * General Public License for more details.
115
+ *
116
+ * You should have received a copy of the GNU Affero General Public License
117
+ * along with Advanced JSON forms (ajf).
118
+ * If not, see http://www.gnu.org/licenses/.
119
+ *
120
+ */
121
+ class AjfBooleanFieldComponent extends AjfBaseFieldComponent {
122
+ constructor(cdr, service, was) {
123
+ super(cdr, service, was);
124
+ }
125
+ }
126
+ AjfBooleanFieldComponent.decorators = [
127
+ { type: Component, args: [{
128
+ template: "<mat-slide-toggle *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\"></mat-slide-toggle>\n",
129
+ changeDetection: ChangeDetectionStrategy.OnPush,
130
+ encapsulation: ViewEncapsulation.None,
131
+ styles: ["\n"]
132
+ },] }
133
+ ];
134
+ AjfBooleanFieldComponent.ctorParameters = () => [
135
+ { type: ChangeDetectorRef },
136
+ { type: AjfFormRendererService },
137
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] }
138
+ ];
139
+
140
+ /**
141
+ * @license
142
+ * Copyright (C) Gnucoop soc. coop.
143
+ *
144
+ * This file is part of the Advanced JSON forms (ajf).
145
+ *
146
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
147
+ * modify it under the terms of the GNU Affero General Public License as
148
+ * published by the Free Software Foundation, either version 3 of the License,
149
+ * or (at your option) any later version.
150
+ *
151
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
152
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
153
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
154
+ * General Public License for more details.
155
+ *
156
+ * You should have received a copy of the GNU Affero General Public License
157
+ * along with Advanced JSON forms (ajf).
158
+ * If not, see http://www.gnu.org/licenses/.
159
+ *
160
+ */
161
+ class AjfDateFieldComponent extends AjfBaseFieldComponent {
162
+ constructor(cdr, service, was) {
163
+ super(cdr, service, was);
164
+ }
165
+ }
166
+ AjfDateFieldComponent.decorators = [
167
+ { type: Component, args: [{
168
+ template: "<ajf-calendar\n *ngIf=\"control|async as ctrl\"\n selectionMode=\"day\"\n [dateOnlyForDay]=\"true\"\n [minDate]=\"instance.node.minDate|ajfDateValue\"\n [maxDate]=\"instance.node.maxDate|ajfDateValue\"\n [formControl]=\"ctrl!\"\n></ajf-calendar>\n",
169
+ changeDetection: ChangeDetectionStrategy.OnPush,
170
+ encapsulation: ViewEncapsulation.None,
171
+ styles: ["\n"]
172
+ },] }
173
+ ];
174
+ AjfDateFieldComponent.ctorParameters = () => [
175
+ { type: ChangeDetectorRef },
176
+ { type: AjfFormRendererService },
177
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] }
178
+ ];
179
+
180
+ /**
181
+ * @license
182
+ * Copyright (C) Gnucoop soc. coop.
183
+ *
184
+ * This file is part of the Advanced JSON forms (ajf).
185
+ *
186
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
187
+ * modify it under the terms of the GNU Affero General Public License as
188
+ * published by the Free Software Foundation, either version 3 of the License,
189
+ * or (at your option) any later version.
190
+ *
191
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
192
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
193
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
194
+ * General Public License for more details.
195
+ *
196
+ * You should have received a copy of the GNU Affero General Public License
197
+ * along with Advanced JSON forms (ajf).
198
+ * If not, see http://www.gnu.org/licenses/.
199
+ *
200
+ */
201
+ class AjfDateInputFieldComponent extends AjfBaseFieldComponent {
202
+ constructor(cdr, service, was, _dvs) {
203
+ super(cdr, service, was);
204
+ this._dvs = _dvs;
205
+ }
206
+ onChange() {
207
+ if (this.input == null) {
208
+ return;
209
+ }
210
+ const val = this.input.value || '';
211
+ if (val.length > 0) {
212
+ if ((this._minDateStr != null && val < this._minDateStr) ||
213
+ (this._maxDateStr != null && val > this._maxDateStr)) {
214
+ this.input.value = '';
215
+ }
216
+ }
217
+ }
218
+ _onInstanceChange() {
219
+ this._minDateStr = this._dvs.transform(this.instance.node.minDate);
220
+ this._maxDateStr = this._dvs.transform(this.instance.node.maxDate);
221
+ }
222
+ }
223
+ AjfDateInputFieldComponent.decorators = [
224
+ { type: Component, args: [{
225
+ template: "<mat-form-field *ngIf=\"control|async as ctrl\">\n <input matInput type=\"date\"\n [attr.aria-label]=\"instance.node.label || (instance|ajfNodeCompleteName)\"\n [min]=\"instance.node.minDate|ajfDateValueString\"\n [max]=\"instance.node.maxDate|ajfDateValueString\"\n (change)=\"onChange()\"\n [formControl]=\"ctrl!\">\n</mat-form-field>\n",
226
+ changeDetection: ChangeDetectionStrategy.OnPush,
227
+ encapsulation: ViewEncapsulation.None,
228
+ styles: ["\n"]
229
+ },] }
230
+ ];
231
+ AjfDateInputFieldComponent.ctorParameters = () => [
232
+ { type: ChangeDetectorRef },
233
+ { type: AjfFormRendererService },
234
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] },
235
+ { type: AjfDateValueStringPipe }
236
+ ];
237
+ AjfDateInputFieldComponent.propDecorators = {
238
+ input: [{ type: ViewChild, args: [MatInput, { static: false },] }]
239
+ };
240
+
241
+ /**
242
+ * @license
243
+ * Copyright (C) Gnucoop soc. coop.
244
+ *
245
+ * This file is part of the Advanced JSON forms (ajf).
246
+ *
247
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
248
+ * modify it under the terms of the GNU Affero General Public License as
249
+ * published by the Free Software Foundation, either version 3 of the License,
250
+ * or (at your option) any later version.
251
+ *
252
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
253
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
254
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
255
+ * General Public License for more details.
256
+ *
257
+ * You should have received a copy of the GNU Affero General Public License
258
+ * along with Advanced JSON forms (ajf).
259
+ * If not, see http://www.gnu.org/licenses/.
260
+ *
261
+ */
262
+ class AjfEmptyFieldComponent extends AjfBaseFieldComponent {
263
+ constructor(cdr, service, was) {
264
+ super(cdr, service, was);
265
+ }
266
+ }
267
+ AjfEmptyFieldComponent.decorators = [
268
+ { type: Component, args: [{
269
+ template: "<h1 [innerHTML]=\"instance.node.label | transloco\"></h1>\n<div [innerHTML]=\"instance.node.HTML | transloco\"></div>\n",
270
+ changeDetection: ChangeDetectionStrategy.OnPush,
271
+ encapsulation: ViewEncapsulation.None,
272
+ styles: ["\n"]
273
+ },] }
274
+ ];
275
+ AjfEmptyFieldComponent.ctorParameters = () => [
276
+ { type: ChangeDetectorRef },
277
+ { type: AjfFormRendererService },
278
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] }
279
+ ];
280
+
281
+ /**
282
+ * @license
283
+ * Copyright (C) Gnucoop soc. coop.
284
+ *
285
+ * This file is part of the Advanced JSON forms (ajf).
286
+ *
287
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
288
+ * modify it under the terms of the GNU Affero General Public License as
289
+ * published by the Free Software Foundation, either version 3 of the License,
290
+ * or (at your option) any later version.
291
+ *
292
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
293
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
294
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
295
+ * General Public License for more details.
296
+ *
297
+ * You should have received a copy of the GNU Affero General Public License
298
+ * along with Advanced JSON forms (ajf).
299
+ * If not, see http://www.gnu.org/licenses/.
300
+ *
301
+ */
302
+ class AjfBarcodeFieldComponent extends AjfBaseFieldComponent {
303
+ constructor(cdr, service, was) {
304
+ super(cdr, service, was);
305
+ }
306
+ }
307
+ AjfBarcodeFieldComponent.decorators = [
308
+ { type: Component, args: [{
309
+ template: "<ajf-barcode *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\"></ajf-barcode>\n",
310
+ changeDetection: ChangeDetectionStrategy.OnPush,
311
+ encapsulation: ViewEncapsulation.None,
312
+ styles: ["\n"]
313
+ },] }
314
+ ];
315
+ AjfBarcodeFieldComponent.ctorParameters = () => [
316
+ { type: ChangeDetectorRef },
317
+ { type: AjfFormRendererService },
318
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] }
319
+ ];
320
+
321
+ /**
322
+ * @license
323
+ * Copyright (C) Gnucoop soc. coop.
324
+ *
325
+ * This file is part of the Advanced JSON forms (ajf).
326
+ *
327
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
328
+ * modify it under the terms of the GNU Affero General Public License as
329
+ * published by the Free Software Foundation, either version 3 of the License,
330
+ * or (at your option) any later version.
331
+ *
332
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
333
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
334
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
335
+ * General Public License for more details.
336
+ *
337
+ * You should have received a copy of the GNU Affero General Public License
338
+ * along with Advanced JSON forms (ajf).
339
+ * If not, see http://www.gnu.org/licenses/.
340
+ *
341
+ */
342
+ class AjfInputFieldComponent extends AjfInputFieldComponent$1 {
343
+ constructor(cdr, service, was) {
344
+ super(cdr, service, was);
345
+ }
346
+ }
347
+ AjfInputFieldComponent.decorators = [
348
+ { type: Component, args: [{
349
+ template: "<mat-form-field *ngIf=\"control|async as ctrl\">\n <input matInput *ngIf=\"type === 'text'\" type=\"text\" [formControl]=\"ctrl!\"\n [readonly]=\"instance|ajfIsReadonlyInputField\" [attr.aria-labelledby]=\"instance.node.name\">\n <input matInput *ngIf=\"type === 'number'\" type=\"number\" [formControl]=\"ctrl!\"\n [readonly]=\"instance|ajfIsReadonlyInputField\" [attr.aria-labelledby]=\"instance.node.name\">\n</mat-form-field>\n",
350
+ changeDetection: ChangeDetectionStrategy.OnPush,
351
+ encapsulation: ViewEncapsulation.None,
352
+ styles: ["\n"]
353
+ },] }
354
+ ];
355
+ AjfInputFieldComponent.ctorParameters = () => [
356
+ { type: ChangeDetectorRef },
357
+ { type: AjfFormRendererService },
358
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] }
359
+ ];
360
+
361
+ /**
362
+ * @license
363
+ * Copyright (C) Gnucoop soc. coop.
364
+ *
365
+ * This file is part of the Advanced JSON forms (ajf).
366
+ *
367
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
368
+ * modify it under the terms of the GNU Affero General Public License as
369
+ * published by the Free Software Foundation, either version 3 of the License,
370
+ * or (at your option) any later version.
371
+ *
372
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
373
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
374
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
375
+ * General Public License for more details.
376
+ *
377
+ * You should have received a copy of the GNU Affero General Public License
378
+ * along with Advanced JSON forms (ajf).
379
+ * If not, see http://www.gnu.org/licenses/.
380
+ *
381
+ */
382
+ class AjfMultipleChoiceFieldComponent extends AjfFieldWithChoicesComponent {
383
+ constructor(cdr, service, was, searchThreshold) {
384
+ super(cdr, service, was, searchThreshold);
385
+ }
386
+ }
387
+ AjfMultipleChoiceFieldComponent.decorators = [
388
+ { type: Component, args: [{
389
+ template: "<ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold); else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\" [multiple]=\"true\">\n <mat-option [value]=\"choice.value\"\n *ngFor=\"let choice of instance.filteredChoices\">\n {{ choice.label | transloco }}\n </mat-option>\n </mat-select>\n</ng-container>\n<ng-template #expanded>\n <ajf-checkbox-group *ngIf=\"control|async as ctrl\" class=\"ajf-choices-container\"\n [formControl]=\"ctrl!\">\n <ajf-checkbox-group-item *ngFor=\"let choice of instance.filteredChoices\"\n [value]=\"choice.value\">\n {{ choice.label | transloco }}\n </ajf-checkbox-group-item>\n </ajf-checkbox-group>\n</ng-template>\n",
390
+ changeDetection: ChangeDetectionStrategy.OnPush,
391
+ encapsulation: ViewEncapsulation.None,
392
+ styles: ["\n"]
393
+ },] }
394
+ ];
395
+ AjfMultipleChoiceFieldComponent.ctorParameters = () => [
396
+ { type: ChangeDetectorRef },
397
+ { type: AjfFormRendererService },
398
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] },
399
+ { type: Number, decorators: [{ type: Optional }, { type: Inject, args: [AJF_SEARCH_ALERT_THRESHOLD,] }] }
400
+ ];
401
+
402
+ /**
403
+ * @license
404
+ * Copyright (C) Gnucoop soc. coop.
405
+ *
406
+ * This file is part of the Advanced JSON forms (ajf).
407
+ *
408
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
409
+ * modify it under the terms of the GNU Affero General Public License as
410
+ * published by the Free Software Foundation, either version 3 of the License,
411
+ * or (at your option) any later version.
412
+ *
413
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
414
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
415
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
416
+ * General Public License for more details.
417
+ *
418
+ * You should have received a copy of the GNU Affero General Public License
419
+ * along with Advanced JSON forms (ajf).
420
+ * If not, see http://www.gnu.org/licenses/.
421
+ *
422
+ */
423
+ class AjfRangeFieldComponent extends AjfRange {
424
+ constructor(cdr, service, was) {
425
+ super(cdr, service, was);
426
+ }
427
+ }
428
+ AjfRangeFieldComponent.decorators = [
429
+ { type: Component, args: [{
430
+ selector: 'ajf-range',
431
+ template: "<mat-slider\n *ngIf=\"control|async as ctrl\"\n thumbLabel\n [formControl]=\"ctrl!\"\n [tickInterval]=\"step\"\n [step]=\"step\"\n [min]=\"start\"\n [max]=\"end\"\n [attr.aria-label]=\"name\"\n [attr.name]=\"name\"\n></mat-slider>\n",
432
+ changeDetection: ChangeDetectionStrategy.OnPush,
433
+ encapsulation: ViewEncapsulation.None,
434
+ styles: ["\n"]
435
+ },] }
436
+ ];
437
+ AjfRangeFieldComponent.ctorParameters = () => [
438
+ { type: ChangeDetectorRef },
439
+ { type: AjfFormRendererService },
440
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] }
441
+ ];
442
+
443
+ /**
444
+ * @license
445
+ * Copyright (C) Gnucoop soc. coop.
446
+ *
447
+ * This file is part of the Advanced JSON forms (ajf).
448
+ *
449
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
450
+ * modify it under the terms of the GNU Affero General Public License as
451
+ * published by the Free Software Foundation, either version 3 of the License,
452
+ * or (at your option) any later version.
453
+ *
454
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
455
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
456
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
457
+ * General Public License for more details.
458
+ *
459
+ * You should have received a copy of the GNU Affero General Public License
460
+ * along with Advanced JSON forms (ajf).
461
+ * If not, see http://www.gnu.org/licenses/.
462
+ *
463
+ */
464
+ class AjfSingleChoiceFieldComponent extends AjfFieldWithChoicesComponent {
465
+ constructor(cdr, service, was, searchThreshold) {
466
+ super(cdr, service, was, searchThreshold);
467
+ }
468
+ }
469
+ AjfSingleChoiceFieldComponent.decorators = [
470
+ { type: Component, args: [{
471
+ template: "<ng-container *ngIf=\"!(instance|ajfExpandFieldWithChoices:searchThreshold) ; else expanded\">\n <mat-select *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\">\n <mat-option [value]=\"choice.value\"\n *ngFor=\"let choice of instance.filteredChoices\">\n {{ choice.label | transloco }}\n </mat-option>\n </mat-select>\n</ng-container>\n<ng-template #expanded>\n <mat-radio-group *ngIf=\"control|async as ctrl\" class=\"ajf-choices-container\"\n [attr.aria-labelledby]=\"instance.node.name\"\n [formControl]=\"ctrl!\">\n <mat-radio-button [value]=\"choice.value\"\n *ngFor=\"let choice of instance.filteredChoices\">\n {{ choice.label | transloco }}\n </mat-radio-button>\n </mat-radio-group>\n</ng-template>\n",
472
+ changeDetection: ChangeDetectionStrategy.OnPush,
473
+ encapsulation: ViewEncapsulation.None,
474
+ styles: ["\n"]
475
+ },] }
476
+ ];
477
+ AjfSingleChoiceFieldComponent.ctorParameters = () => [
478
+ { type: ChangeDetectorRef },
479
+ { type: AjfFormRendererService },
480
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] },
481
+ { type: Number, decorators: [{ type: Optional }, { type: Inject, args: [AJF_SEARCH_ALERT_THRESHOLD,] }] }
482
+ ];
483
+
484
+ /**
485
+ * @license
486
+ * Copyright (C) Gnucoop soc. coop.
487
+ *
488
+ * This file is part of the Advanced JSON forms (ajf).
489
+ *
490
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
491
+ * modify it under the terms of the GNU Affero General Public License as
492
+ * published by the Free Software Foundation, either version 3 of the License,
493
+ * or (at your option) any later version.
494
+ *
495
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
496
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
497
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
498
+ * General Public License for more details.
499
+ *
500
+ * You should have received a copy of the GNU Affero General Public License
501
+ * along with Advanced JSON forms (ajf).
502
+ * If not, see http://www.gnu.org/licenses/.
503
+ *
504
+ */
505
+ class AjfTableFieldComponent extends AjfTableFieldComponent$1 {
506
+ constructor(cdr, service, was) {
507
+ super(cdr, service, was);
508
+ }
509
+ }
510
+ AjfTableFieldComponent.decorators = [
511
+ { type: Component, args: [{
512
+ template: "<table class=\"ajf-table-field\">\n <ng-container *ngIf=\"instance.node as node\">\n <ng-container *ngFor=\"let columns of instance.controls; let row = index\">\n <tr [ngClass]=\"row | ajfTableRowClass\">\n <td>\n <ng-container *ngIf=\"columns.length > 0 && columns[0] != null\">\n {{ columns[0] | ajfTranslateIfString | ajfFormatIfNumber: '.0-2' }}\n </ng-container>\n </td>\n <ng-container *ngIf=\"columns.length > 1\">\n <td *ngFor=\"let c of columns[1]; let column = index\">\n <ng-container *ngIf=\"row == 0; else controlCell\">\n {{ c | ajfTranslateIfString | ajfFormatIfNumber: '.0-2' }}\n </ng-container>\n <ng-template #controlCell>\n <ng-container *ngIf=\"c|ajfGetTableCellControl as contr\">\n <ng-container *ngIf=\"contr != null\">\n <ng-container\n *ngIf=\"contr!.show && (node.rows[row-1][column]|ajfIsCellEditable); else plainTextCell\"\n >\n <ng-container\n *ngIf=\"contr.type === 'number';else genericInput\"\n >\n <input\n (focusout)=\"contr!.show = false\"\n type=\"number\"\n [formControl]=\"contr.control\"\n (keydown.tab)=\"goToNextCell($event, row, column)\"\n autofocus\n />\n </ng-container>\n <ng-template #genericInput>\n <input\n (focusout)=\"contr!.show = false\"\n [type]=\"contr.type\"\n [formControl]=\"contr.control\"\n (keydown.tab)=\"goToNextCell($event, row, column)\"\n autofocus\n />\n </ng-template>\n </ng-container>\n\n <ng-template #plainTextCell>\n <span class=\"ajf-table-cell\" (click)=\"goToCell(row, column)\"\n >{{ contr.control!.value | ajfTranslateIfString |\n ajfFormatIfNumber: '.0-2' }}</span\n >\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-template>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n</table>\n",
513
+ changeDetection: ChangeDetectionStrategy.OnPush,
514
+ encapsulation: ViewEncapsulation.None,
515
+ styles: ["table.ajf-table-field{border-collapse:collapse;border-spacing:0;width:100%}table.ajf-table-field tr td{position:relative;min-width:1em}table.ajf-table-field tr td span,table.ajf-table-field tr td input{cursor:text;position:absolute;width:100%;box-sizing:border-box;outline:none;top:0;right:0;bottom:0;left:0;display:inline-block;border-top:solid 1px #ccc;border-right:solid 1px transparent;border-bottom:solid 1px transparent;border-left:solid 1px #ccc;font-family:inherit;font-size:inherit;line-height:inherit;text-align:center}table.ajf-table-field tr td:last-child span,table.ajf-table-field tr td:last-child input{border-right-color:#ccc}table.ajf-table-field tr:last-of-type td span,table.ajf-table-field tr:last-of-type td input{border-bottom-color:#ccc}\n"]
516
+ },] }
517
+ ];
518
+ AjfTableFieldComponent.ctorParameters = () => [
519
+ { type: ChangeDetectorRef },
520
+ { type: AjfFormRendererService },
521
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] }
522
+ ];
523
+
524
+ /**
525
+ * @license
526
+ * Copyright (C) Gnucoop soc. coop.
527
+ *
528
+ * This file is part of the Advanced JSON forms (ajf).
529
+ *
530
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
531
+ * modify it under the terms of the GNU Affero General Public License as
532
+ * published by the Free Software Foundation, either version 3 of the License,
533
+ * or (at your option) any later version.
534
+ *
535
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
536
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
537
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
538
+ * General Public License for more details.
539
+ *
540
+ * You should have received a copy of the GNU Affero General Public License
541
+ * along with Advanced JSON forms (ajf).
542
+ * If not, see http://www.gnu.org/licenses/.
543
+ *
544
+ */
545
+ class AjfTextFieldComponent extends AjfInputFieldComponent$1 {
546
+ constructor(cdr, service, was) {
547
+ super(cdr, service, was);
548
+ }
549
+ }
550
+ AjfTextFieldComponent.decorators = [
551
+ { type: Component, args: [{
552
+ template: "<mat-form-field *ngIf=\"control|async as ctrl\">\n <textarea matInput cdkTextareaAutosize [formControl]=\"ctrl!\"></textarea>\n</mat-form-field>\n",
553
+ changeDetection: ChangeDetectionStrategy.OnPush,
554
+ encapsulation: ViewEncapsulation.None,
555
+ styles: ["\n"]
556
+ },] }
557
+ ];
558
+ AjfTextFieldComponent.ctorParameters = () => [
559
+ { type: ChangeDetectorRef },
560
+ { type: AjfFormRendererService },
561
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] }
562
+ ];
563
+
564
+ /**
565
+ * @license
566
+ * Copyright (C) Gnucoop soc. coop.
567
+ *
568
+ * This file is part of the Advanced JSON forms (ajf).
569
+ *
570
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
571
+ * modify it under the terms of the GNU Affero General Public License as
572
+ * published by the Free Software Foundation, either version 3 of the License,
573
+ * or (at your option) any later version.
574
+ *
575
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
576
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
577
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
578
+ * General Public License for more details.
579
+ *
580
+ * You should have received a copy of the GNU Affero General Public License
581
+ * along with Advanced JSON forms (ajf).
582
+ * If not, see http://www.gnu.org/licenses/.
583
+ *
584
+ */
585
+ class AjfTimeFieldComponent extends AjfBaseFieldComponent {
586
+ constructor(cdr, service, was) {
587
+ super(cdr, service, was);
588
+ }
589
+ }
590
+ AjfTimeFieldComponent.decorators = [
591
+ { type: Component, args: [{
592
+ template: "<ajf-time *ngIf=\"control|async as ctrl\" [formControl]=\"ctrl!\"></ajf-time>\n",
593
+ changeDetection: ChangeDetectionStrategy.OnPush,
594
+ encapsulation: ViewEncapsulation.None,
595
+ styles: ["\n"]
596
+ },] }
597
+ ];
598
+ AjfTimeFieldComponent.ctorParameters = () => [
599
+ { type: ChangeDetectorRef },
600
+ { type: AjfFormRendererService },
601
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] }
602
+ ];
603
+
604
+ /**
605
+ * @license
606
+ * Copyright (C) Gnucoop soc. coop.
607
+ *
608
+ * This file is part of the Advanced JSON forms (ajf).
609
+ *
610
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
611
+ * modify it under the terms of the GNU Affero General Public License as
612
+ * published by the Free Software Foundation, either version 3 of the License,
613
+ * or (at your option) any later version.
614
+ *
615
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
616
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
617
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
618
+ * General Public License for more details.
619
+ *
620
+ * You should have received a copy of the GNU Affero General Public License
621
+ * along with Advanced JSON forms (ajf).
622
+ * If not, see http://www.gnu.org/licenses/.
623
+ *
624
+ */
625
+ class AjfVideoUrlFieldComponent extends AjfVideoUrlFieldComponent$1 {
626
+ constructor(cdr, service, was, domSanitizer, httpClient) {
627
+ super(cdr, service, was, domSanitizer, httpClient);
628
+ }
629
+ }
630
+ AjfVideoUrlFieldComponent.decorators = [
631
+ { type: Component, args: [{
632
+ template: "<ng-container *ngIf=\"control|async as ctrl\">\n <mat-form-field class=\"ajf-video-input\">\n <input matInput type=\"url\" [formControl]=\"ctrl!\">\n </mat-form-field>\n <div class=\"ajf-video-thumbnail\">\n <ng-container *ngIf=\"validUrl|async\">\n <a target=\"_blank\" [href]=\"ctrl.value\">\n <img *ngIf=\"videoThumbnail|async as thumb\" [src]=\"thumb\" class=\"\" alt=\"\">\n </a>\n </ng-container>\n </div>\n</ng-container>\n",
633
+ changeDetection: ChangeDetectionStrategy.OnPush,
634
+ encapsulation: ViewEncapsulation.None,
635
+ styles: [".ajf-video-input{width:100%}.ajf-video-thumbnail{width:212px;height:120px;background-color:#eee;display:flex;align-items:center;justify-content:center}.ajf-video-thumbnail img{flex:1 1 auto}\n"]
636
+ },] }
637
+ ];
638
+ AjfVideoUrlFieldComponent.ctorParameters = () => [
639
+ { type: ChangeDetectorRef },
640
+ { type: AjfFormRendererService },
641
+ { type: AjfWarningAlertService, decorators: [{ type: Inject, args: [AJF_WARNING_ALERT_SERVICE,] }] },
642
+ { type: DomSanitizer },
643
+ { type: HttpClient }
644
+ ];
645
+
646
+ /**
647
+ * @license
648
+ * Copyright (C) Gnucoop soc. coop.
649
+ *
650
+ * This file is part of the Advanced JSON forms (ajf).
651
+ *
652
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
653
+ * modify it under the terms of the GNU Affero General Public License as
654
+ * published by the Free Software Foundation, either version 3 of the License,
655
+ * or (at your option) any later version.
656
+ *
657
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
658
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
659
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
660
+ * General Public License for more details.
661
+ *
662
+ * You should have received a copy of the GNU Affero General Public License
663
+ * along with Advanced JSON forms (ajf).
664
+ * If not, see http://www.gnu.org/licenses/.
665
+ *
666
+ */
667
+ class AjfFieldService extends AjfFieldService$1 {
668
+ constructor() {
669
+ super();
670
+ this.componentsMap[AjfFieldType.String] = {
671
+ component: AjfInputFieldComponent,
672
+ readOnlyComponent: AjfReadOnlyFieldComponent
673
+ },
674
+ this.componentsMap[AjfFieldType.Text] = {
675
+ component: AjfTextFieldComponent,
676
+ readOnlyComponent: AjfReadOnlyFieldComponent
677
+ },
678
+ this.componentsMap[AjfFieldType.Number] = {
679
+ component: AjfInputFieldComponent,
680
+ readOnlyComponent: AjfReadOnlyFieldComponent,
681
+ inputs: { type: 'number' }
682
+ },
683
+ this.componentsMap[AjfFieldType.Boolean] = {
684
+ component: AjfBooleanFieldComponent,
685
+ readOnlyComponent: AjfReadOnlyFieldComponent
686
+ },
687
+ this.componentsMap[AjfFieldType.Formula] = {
688
+ component: AjfInputFieldComponent,
689
+ readOnlyComponent: AjfReadOnlyFieldComponent,
690
+ inputs: { readonly: true }
691
+ },
692
+ this.componentsMap[AjfFieldType.Date] = {
693
+ component: AjfDateFieldComponent,
694
+ readOnlyComponent: AjfReadOnlyFieldComponent
695
+ },
696
+ this.componentsMap[AjfFieldType.DateInput] = {
697
+ component: AjfDateInputFieldComponent,
698
+ readOnlyComponent: AjfReadOnlyFieldComponent
699
+ },
700
+ this.componentsMap[AjfFieldType.Table] = {
701
+ component: AjfTableFieldComponent,
702
+ readOnlyComponent: AjfReadOnlyTableFieldComponent
703
+ },
704
+ this.componentsMap[AjfFieldType.Empty] = { component: AjfEmptyFieldComponent },
705
+ this.componentsMap[AjfFieldType.SingleChoice] = {
706
+ component: AjfSingleChoiceFieldComponent,
707
+ readOnlyComponent: AjfReadOnlySelectFieldComponent
708
+ },
709
+ this.componentsMap[AjfFieldType.MultipleChoice] = {
710
+ component: AjfMultipleChoiceFieldComponent,
711
+ readOnlyComponent: AjfReadOnlySelectFieldComponent
712
+ },
713
+ this.componentsMap[AjfFieldType.Time] = {
714
+ component: AjfTimeFieldComponent,
715
+ readOnlyComponent: AjfReadOnlyFieldComponent
716
+ },
717
+ this.componentsMap[AjfFieldType.Barcode] = {
718
+ component: AjfBarcodeFieldComponent,
719
+ readOnlyComponent: AjfReadOnlyFieldComponent
720
+ };
721
+ this.componentsMap[AjfFieldType.File] = {
722
+ component: AjfFileFieldComponent,
723
+ readOnlyComponent: AjfReadOnlyFileFieldComponent
724
+ };
725
+ this.componentsMap[AjfFieldType.Image] = {
726
+ component: AjfImageFieldComponent,
727
+ readOnlyComponent: AjfReadOnlyImageFieldComponent
728
+ };
729
+ this.componentsMap[AjfFieldType.VideoUrl] = {
730
+ component: AjfVideoUrlFieldComponent,
731
+ readOnlyComponent: AjfReadOnlyVideoUrlFieldComponent
732
+ };
733
+ this.componentsMap[AjfFieldType.Range] = {
734
+ component: AjfRangeFieldComponent,
735
+ readOnlyComponent: AjfReadOnlyFieldComponent
736
+ };
737
+ }
738
+ }
739
+ AjfFieldService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AjfFieldService_Factory() { return new AjfFieldService(); }, token: AjfFieldService, providedIn: "root" });
740
+ AjfFieldService.decorators = [
741
+ { type: Injectable, args: [{ providedIn: 'root' },] }
742
+ ];
743
+ AjfFieldService.ctorParameters = () => [];
744
+
745
+ /**
746
+ * @license
747
+ * Copyright (C) Gnucoop soc. coop.
748
+ *
749
+ * This file is part of the Advanced JSON forms (ajf).
750
+ *
751
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
752
+ * modify it under the terms of the GNU Affero General Public License as
753
+ * published by the Free Software Foundation, either version 3 of the License,
754
+ * or (at your option) any later version.
755
+ *
756
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
757
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
758
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
759
+ * General Public License for more details.
760
+ *
761
+ * You should have received a copy of the GNU Affero General Public License
762
+ * along with Advanced JSON forms (ajf).
763
+ * If not, see http://www.gnu.org/licenses/.
764
+ *
765
+ */
766
+ class AjfFormField extends AjfFormField$1 {
767
+ constructor(cdr, cfr, fieldService) {
768
+ super(cdr, cfr);
769
+ this.componentsMap = fieldService.componentsMap;
770
+ }
771
+ }
772
+ AjfFormField.decorators = [
773
+ { type: Component, args: [{
774
+ selector: 'ajf-field,ajf-form-field',
775
+ template: "<div\n [ngClass]=\"'ajf-field-' + (instance|ajfNodeCompleteName)\"\n [class.ajf-validated]=\"instance.validationResults|ajfFieldIsValid\"\n>\n <ng-template ajf-field-host></ng-template>\n</div>\n<ng-container *ngIf=\"instance && instance.node && instance.node.attachments\">\n <a *ngFor=\"let attachment of instance.node.attachments\"\n [href]=\"attachment.value\" target=\"_blank\">{{attachment.label | transloco}}</a>\n</ng-container>\n<div *ngIf=\"!readonly && instance && instance.validationResults\" class=\"ajf-errors\">\n <ng-container *ngFor=\"let res of instance.validationResults\">\n <div class=\"error\" *ngIf=\"!res.result\">\n {{ res.error|transloco }} \n </div>\n </ng-container>\n</div>\n",
776
+ changeDetection: ChangeDetectionStrategy.OnPush,
777
+ encapsulation: ViewEncapsulation.None,
778
+ styles: ["ajf-field .ajf-choices-container{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch}ajf-field .ajf-item-container{position:relative}ajf-field .ajf-errors{font-style:italic;padding:5px}ajf-field tr.ajf-row-odd{background-color:gray}table{border-collapse:collapse;border-spacing:0}table tr td{position:relative}table tr td span,table tr td input{cursor:text;position:absolute;width:100%;box-sizing:border-box;outline:none;top:0;right:0;bottom:0;left:0;display:inline-block;border-top:solid 1px #ccc;border-right:solid 1px transparent;border-bottom:solid 1px transparent;border-left:solid 1px #ccc;font-family:inherit;font-size:inherit;line-height:inherit;text-align:center}table tr td:last-child span,table tr td:last-child input{border-right-color:#ccc}table tr:last-of-type td span,table tr:last-of-type td input{border-bottom-color:#ccc}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"]
779
+ },] }
780
+ ];
781
+ AjfFormField.ctorParameters = () => [
782
+ { type: ChangeDetectorRef },
783
+ { type: ComponentFactoryResolver },
784
+ { type: AjfFieldService }
785
+ ];
786
+
787
+ /**
788
+ * @license
789
+ * Copyright (C) Gnucoop soc. coop.
790
+ *
791
+ * This file is part of the Advanced JSON forms (ajf).
792
+ *
793
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
794
+ * modify it under the terms of the GNU Affero General Public License as
795
+ * published by the Free Software Foundation, either version 3 of the License,
796
+ * or (at your option) any later version.
797
+ *
798
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
799
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
800
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
801
+ * General Public License for more details.
802
+ *
803
+ * You should have received a copy of the GNU Affero General Public License
804
+ * along with Advanced JSON forms (ajf).
805
+ * If not, see http://www.gnu.org/licenses/.
806
+ *
807
+ */
808
+ class AjfFormRenderer extends AjfFormRenderer$1 {
809
+ constructor(rendererService, changeDetectorRef) {
810
+ super(rendererService, changeDetectorRef);
811
+ this.topBar = false;
812
+ }
813
+ }
814
+ AjfFormRenderer.decorators = [
815
+ { type: Component, args: [{
816
+ selector: 'ajf-form',
817
+ template: "<ng-container *ngIf=\"formGroup|async as fg\">\n <form novalidate [formGroup]=\"fg!\">\n <div class=\"ajf-form-container\">\n <mat-toolbar *ngIf=\"!hideTopToolbar && topBar\" class=\"ajf-btn-strip\">\n <ng-template\n ngFor\n let-slideInstance\n [ngForOf]=\"slides|async\"\n [ngForTrackBy]=\"trackNodeById\"\n >\n <button\n mat-button\n class=\"ajf-topbar-button\"\n *ngIf=\"slideInstance.node != null && slideInstance.node.label != null && slideInstance.node.label.length > 0\"\n (click)=\"scrollToSlide(slideInstance)\"\n >\n {{slideInstance.node.label | transloco}}\n </button>\n </ng-template>\n </mat-toolbar>\n <mat-toolbar *ngIf=\"!hideTopToolbar\">\n {{ title }}\n <span class=\"ajf-spacer\"></span>\n <!-- this content projection allow to add buttons on toolbar -->\n <ng-content select=\"[ajfFormTopToolbarButtons]\"></ng-content>\n <!-- apply a default save button only when ajfFormSaveButton is empty -->\n <span *ngIf=\"!saveDisabled\" (click)=\"onSave($event)\">\n <span #saveButton\n ><ng-content select=\"[ajfFormSaveButton]\"></ng-content\n ></span>\n <button\n *ngIf=\"saveButton != null && saveButton.childNodes != null && saveButton.childNodes.length == 0\"\n mat-button\n default\n >\n {{'Save'|transloco}}\n </button>\n </span>\n </mat-toolbar>\n <div class=\"ajf-slider-container\">\n <ajf-page-slider\n (orientationChange)=\"orientationChangeHandler($event)\"\n [fixedOrientation]=\"fixedOrientation\"\n [hideNavigationButtons]=\"hideNavigationButtons\"\n [orientation]=\"orientation\"\n #formSlider\n >\n <ng-container *ngIf=\"(slides|async) as curSlides\">\n <ng-container *ngIf=\"curSlides!.length > 0 && hasStartMessage\">\n <ajf-page-slider-item>\n <div class=\"ajf-form-page\">\n <mat-card>\n <mat-card-header>\n <div class=\"ajf-page-slider-item-header\">\n <h2>\n <span class=\"ajf-form-header-number\"> 1 &rarr; </span>\n <span class=\"ajf-title\">\n <ng-content\n select=\"[ajfFormStartMessageTitle]\"\n ></ng-content>\n </span>\n </h2>\n </div>\n </mat-card-header>\n <mat-card-content>\n <ng-content select=\"[ajfFormStartMessage]\"></ng-content>\n </mat-card-content>\n </mat-card>\n </div>\n </ajf-page-slider-item>\n </ng-container>\n <ng-container\n *ngFor=\"let slideInstance of curSlides; trackBy:trackNodeById\"\n >\n <!-- non repeating slides -->\n <ng-container *ngIf=\"slideInstance.visible\">\n <ng-container\n *ngIf=\"!(slideInstance|ajfIsRepeatingSlideInstance)\"\n >\n <ajf-page-slider-item>\n <div class=\"ajf-form-page\">\n <mat-card>\n <mat-card-header>\n <div class=\"ajf-page-slider-item-header\">\n <h2>\n <span class=\"ajf-form-header-number\"\n >{{ slideInstance.position + (hasStartMessage |\n ajfBoolToInt) }} &rarr;</span\n >\n <span\n [innerHTML]=\"slideInstance.node.label | transloco\"\n ></span>\n </h2>\n <mat-icon\n class=\"ajf-warning\"\n *ngIf=\"!slideInstance.valid\"\n >warning</mat-icon\n >\n <mat-icon\n class=\"ajf-success\"\n *ngIf=\"slideInstance.valid\"\n >check</mat-icon\n >\n </div>\n </mat-card-header>\n <mat-card-content>\n <ng-template\n ngFor\n let-fieldInstance\n [ngForOf]=\"slideInstance.flatNodes\"\n [ngForTrackBy]=\"trackNodeById\"\n >\n <div\n [ngClass]=\"'ajf-' + (fieldInstance|ajfAsFieldInstance).node.size\"\n class=\"ajf-field-entry\"\n *ngIf=\"fieldInstance.visible\"\n >\n <i\n [class]=\"(fieldInstance|ajfAsFieldInstance).node.fieldType | ajfFieldIcon\"\n item-right\n ></i>\n <p>\n {{\n ((fieldInstance|ajfAsFieldInstance).node.description\n || '') | transloco }}\n </p>\n <label\n [attr.id]=\"fieldInstance.node.name\"\n *ngIf=\"(fieldInstance|ajfAsFieldInstance).node.fieldType !== 7\"\n [innerHTML]=\"fieldInstance.node.label | transloco\"\n ></label>\n <mat-icon\n class=\"ajf-tooltip-icon\"\n *ngIf=\"(fieldInstance|ajfAsFieldInstance).node?.hint as hint\"\n [matTooltip]=\"hint\"\n matTooltipPosition=\"right\"\n >\n {{(fieldInstance|ajfAsFieldInstance).node?.hintIcon\n || 'help'}}</mat-icon\n >\n <ajf-field\n [instance]=\"fieldInstance|ajfAsFieldInstance\"\n [readonly]=\"readonly || !slideInstance.editable\"\n >\n </ajf-field>\n </div>\n </ng-template>\n </mat-card-content>\n </mat-card>\n </div>\n </ajf-page-slider-item>\n </ng-container>\n <!-- repeating slides -->\n <ng-container\n *ngIf=\"(slideInstance|ajfIsRepeatingSlideInstance)\"\n >\n <ajf-page-slider-item\n *ngFor=\"let curRep of ((slideInstance|ajfAsRepeatingSlideInstance).reps|ajfRange); let idx = index; let lastSlide = last\"\n >\n <div class=\"ajf-form-page\">\n <mat-card>\n <mat-card-header>\n <div class=\"ajf-page-slider-item-header\">\n <h2>\n <span class=\"ajf-form-header-number\"\n >{{ slideInstance.position|ajfIncrement:idx +\n (hasStartMessage | ajfBoolToInt) }} &rarr;</span\n >\n <span\n [innerHTML]=\"slideInstance.node.label | transloco\"\n ></span>\n </h2>\n <mat-icon\n class=\"ajf-warning\"\n *ngIf=\"!(slideInstance|ajfValidSlide:idx)\"\n >warning</mat-icon\n >\n <mat-icon\n class=\"ajf-success\"\n *ngIf=\"(slideInstance|ajfValidSlide:idx)\"\n >check</mat-icon\n >\n </div>\n </mat-card-header>\n <mat-card-content>\n <div\n *ngIf=\"lastSlide && !readonly\"\n class=\"ajf-group-actions\"\n >\n <button\n (click)=\"addGroup(slideInstance)\"\n [disabled]=\"!(slideInstance|ajfAsRepeatingSlideInstance).canAdd || ((slideInstance|ajfAsRepeatingSlideInstance).node?.disableRemoval && !slideInstance.valid)\"\n mat-mini-fab\n >\n <mat-icon>add</mat-icon>\n </button>\n <button\n (click)=\"removeGroup(slideInstance)\"\n [disabled]=\"!(slideInstance|ajfAsRepeatingSlideInstance).canRemove || (slideInstance|ajfAsRepeatingSlideInstance).node?.disableRemoval\"\n mat-mini-fab\n >\n <mat-icon>remove</mat-icon>\n </button>\n </div>\n <ng-template\n ngFor\n let-fieldInstance\n [ngForOf]=\"slideInstance.slideNodes[idx]\"\n [ngForTrackBy]=\"trackNodeById\"\n >\n <div\n [ngClass]=\"'ajf-' + (fieldInstance|ajfAsFieldInstance).node.size\"\n class=\"ajf-field-entry\"\n *ngIf=\"fieldInstance.visible\"\n >\n <i\n [class]=\"(fieldInstance|ajfAsFieldInstance).node.fieldType | ajfFieldIcon\"\n item-right\n ></i>\n <p>\n {{\n ((fieldInstance|ajfAsFieldInstance).node.description\n || '') | transloco }}\n </p>\n <label\n [attr.id]=\"fieldInstance.node.name\"\n [innerHTML]=\"fieldInstance.node.label | transloco\"\n ></label>\n <mat-icon\n class=\"ajf-tooltip-icon\"\n *ngIf=\"(fieldInstance|ajfAsFieldInstance).node?.hint as hint\"\n [matTooltip]=\"hint\"\n matTooltipPosition=\"right\"\n >\n {{(fieldInstance|ajfAsFieldInstance).node?.hintIcon\n || 'help'}}</mat-icon\n >\n <ajf-field\n [instance]=\"fieldInstance|ajfAsFieldInstance\"\n [readonly]=\"readonly || (!lastSlide && (slideInstance|ajfAsRepeatingSlideInstance).node?.disableRemoval)\"\n >\n </ajf-field>\n </div>\n </ng-template>\n </mat-card-content>\n </mat-card>\n </div>\n </ajf-page-slider-item>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"curSlides && curSlides!.length > 0 && hasEndMessage\"\n >\n <ajf-page-slider-item>\n <div class=\"ajf-form-page\">\n <mat-card>\n <mat-card-header>\n <div class=\"ajf-page-slider-item-header\">\n <h2>\n <span\n *ngIf=\"(slidesNum|async) as snum\"\n class=\"ajf-form-header-number\"\n >\n {{ snum! + (hasStartMessage | ajfBoolToInt ) + 1 }}\n &rarr;\n </span>\n <span class=\"ajf-title\">\n <ng-content\n select=\"[ajfFormEndMessageTitle]\"\n ></ng-content>\n </span>\n </h2>\n </div>\n </mat-card-header>\n <mat-card-content>\n <ng-content select=\"[ajfFormEndMessage]\"></ng-content>\n </mat-card-content>\n </mat-card>\n </div>\n </ajf-page-slider-item>\n </ng-container>\n </ng-container>\n <div ajfPageSliderBar *ngIf=\"!hideBottomToolbar\">\n <div class=\"ajf-left-bar\">\n <div class=\"ajf-errors\" *ngIf=\"((errors | async) || 0) > 0\">\n <button mat-button (click)=\"goToPrevError()\" danger>\n <mat-icon>arrow_upward</mat-icon>\n </button>\n <button mat-button (click)=\"goToNextError()\" danger>\n <mat-icon>arrow_downward</mat-icon>\n </button>\n </div>\n <div class=\"ajf-info-box ajf-error\">\n <div class=\"ajf-title\">{{'Errors'|transloco}}</div>\n <div class=\"ajf-content\">\n {{ errors | async }} / {{ slidesNum|async }}\n </div>\n </div>\n </div>\n </div>\n </ajf-page-slider>\n </div>\n </div>\n </form>\n</ng-container>\n",
818
+ encapsulation: ViewEncapsulation.None,
819
+ changeDetection: ChangeDetectionStrategy.OnPush,
820
+ styles: ["ajf-form{display:block}ajf-form .ajf-form-container{display:flex;flex-direction:column;position:absolute;top:0;right:0;bottom:0;left:0}ajf-form .ajf-form-container mat-toolbar.ajf-btn-strip{overflow:auto}ajf-form .ajf-form-container mat-toolbar.ajf-btn-strip button.ajf-topbar-button.mat-button{flex:1 1 auto}ajf-form .ajf-form-container mat-toolbar.ajf-btn-strip button.ajf-topbar-button.mat-button *{display:block;width:100%;overflow:hidden;text-overflow:ellipsis}ajf-form .ajf-form-container mat-toolbar.ajf-hidden{opacity:0}ajf-form .ajf-form-container .ajf-topbar-button{margin-right:10px}ajf-form .ajf-form-container>.ajf-slider-container{flex:1;position:relative}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider{height:100%}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content{padding:16px}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page{flex:1;max-height:100%}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card{margin:1em 0 3em}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card>mat-card-content{display:flex;flex-wrap:wrap;flex-direction:row;align-content:flex-start;position:relative}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card>mat-card-content .ajf-group-actions{position:absolute;right:0;top:-30px;padding:15px;z-index:10}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card>mat-card-content>.ajf-field-entry{flex:1 0 auto;padding-left:10px;padding-right:10px;width:100%}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card>mat-card-content>.ajf-field-entry .mat-icon{vertical-align:bottom;margin-left:5px}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card>mat-card-content>.ajf-field-entry.ajf-normal{width:100%}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card>mat-card-content>.ajf-field-entry.ajf-small{width:50%}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card>mat-card-content>.ajf-field-entry.ajf-smaller{width:33%}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card>mat-card-content>.ajf-field-entry.ajf-tiny{width:25%}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider ajf-page-slider-item .ajf-page-slider-item-content .ajf-form-page>mat-card>mat-card-content>.ajf-field-entry.ajf-mini{width:20%}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider .ajf-page-slider-item-header{display:flex;align-items:center;width:100%}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider .ajf-page-slider-item-header>h2{flex:1}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider .ajf-page-slider-item-header>h2>.ajf-form-header-number{margin-right:.5em}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider .ajf-page-slider-item-header mat-icon.ajf-warning{color:#f53d3d}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider .ajf-page-slider-item-header mat-icon.ajf-success{color:#32db64}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider .ajf-page-slider-item-header h2>.ajf-title{display:inline-block;margin-right:40px;white-space:normal;vertical-align:top}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider [ajfPageSliderBar] .ajf-left-bar{display:flex;align-items:flex-start;flex-direction:row;position:absolute;bottom:0}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider [ajfPageSliderBar] .ajf-left-bar .ajf-right-button{float:right}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider [ajfPageSliderBar] .ajf-left-bar .ajf-button-icon-only ion-icon{padding:0 .1em}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider [ajfPageSliderBar] .ajf-left-bar .ajf-info-box{height:40px;padding:4px}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider [ajfPageSliderBar] .ajf-left-bar .ajf-info-box>div{height:16px;line-height:16px}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider [ajfPageSliderBar] .ajf-left-bar .ajf-info-box>div.ajf-content{font-weight:bold}ajf-form .ajf-form-container>.ajf-slider-container>ajf-page-slider [ajfPageSliderBar] .ajf-left-bar .ajf-info-box.ajf-error{order:2;color:red}ajf-form .ajf-form-container .ajf-spacer{flex:1 0 auto}\n"]
821
+ },] }
822
+ ];
823
+ AjfFormRenderer.ctorParameters = () => [
824
+ { type: AjfFormRendererService },
825
+ { type: ChangeDetectorRef }
826
+ ];
827
+ AjfFormRenderer.propDecorators = {
828
+ topBar: [{ type: Input }]
829
+ };
830
+
831
+ /**
832
+ * @license
833
+ * Copyright (C) Gnucoop soc. coop.
834
+ *
835
+ * This file is part of the Advanced JSON forms (ajf).
836
+ *
837
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
838
+ * modify it under the terms of the GNU Affero General Public License as
839
+ * published by the Free Software Foundation, either version 3 of the License,
840
+ * or (at your option) any later version.
841
+ *
842
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
843
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
844
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
845
+ * General Public License for more details.
846
+ *
847
+ * You should have received a copy of the GNU Affero General Public License
848
+ * along with Advanced JSON forms (ajf).
849
+ * If not, see http://www.gnu.org/licenses/.
850
+ *
851
+ */
852
+ class AjfFormsModule {
853
+ static forRoot() {
854
+ return {
855
+ ngModule: AjfFormsModule,
856
+ providers: [
857
+ AjfFieldService,
858
+ ],
859
+ };
860
+ }
861
+ }
862
+ AjfFormsModule.decorators = [
863
+ { type: NgModule, args: [{
864
+ imports: [
865
+ AjfBarcodeModule, AjfCalendarModule, AjfCommonModule, AjfFormsModule$1,
866
+ AjfCheckboxGroupModule, AjfPageSliderModule, AjfTimeModule, AjfTranslocoModule,
867
+ CommonModule, MatButtonModule, MatCardModule, MatDialogModule,
868
+ MatFormFieldModule, MatIconModule, MatInputModule, MatRadioModule,
869
+ MatSelectModule, MatSlideToggleModule, MatToolbarModule, MatTooltipModule,
870
+ ReactiveFormsModule, TextFieldModule, MatSliderModule
871
+ ],
872
+ declarations: [
873
+ AjfBarcodeFieldComponent, AjfBooleanFieldComponent, AjfDateFieldComponent,
874
+ AjfDateInputFieldComponent, AjfEmptyFieldComponent, AjfFieldWarningDialog, AjfFormField,
875
+ AjfFormRenderer, AjfInputFieldComponent, AjfMultipleChoiceFieldComponent,
876
+ AjfRangeFieldComponent, AjfSingleChoiceFieldComponent, AjfTableFieldComponent,
877
+ AjfTextFieldComponent, AjfTimeFieldComponent, AjfVideoUrlFieldComponent
878
+ ],
879
+ entryComponents: [
880
+ AjfBarcodeFieldComponent, AjfBooleanFieldComponent, AjfDateFieldComponent,
881
+ AjfDateInputFieldComponent, AjfEmptyFieldComponent, AjfInputFieldComponent,
882
+ AjfMultipleChoiceFieldComponent, AjfRangeFieldComponent, AjfSingleChoiceFieldComponent,
883
+ AjfTableFieldComponent, AjfTextFieldComponent, AjfTimeFieldComponent, AjfVideoUrlFieldComponent
884
+ ],
885
+ exports: [
886
+ AjfFormField,
887
+ AjfFormRenderer,
888
+ ],
889
+ providers: [
890
+ AjfFieldService,
891
+ { provide: AJF_WARNING_ALERT_SERVICE, useClass: AjfWarningAlertService },
892
+ ],
893
+ },] }
894
+ ];
895
+
896
+ /**
897
+ * @license
898
+ * Copyright (C) Gnucoop soc. coop.
899
+ *
900
+ * This file is part of the Advanced JSON forms (ajf).
901
+ *
902
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
903
+ * modify it under the terms of the GNU Affero General Public License as
904
+ * published by the Free Software Foundation, either version 3 of the License,
905
+ * or (at your option) any later version.
906
+ *
907
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
908
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
909
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
910
+ * General Public License for more details.
911
+ *
912
+ * You should have received a copy of the GNU Affero General Public License
913
+ * along with Advanced JSON forms (ajf).
914
+ * If not, see http://www.gnu.org/licenses/.
915
+ *
916
+ */
917
+
918
+ /**
919
+ * Generated bundle index. Do not edit.
920
+ */
921
+
922
+ export { AjfBooleanFieldComponent, AjfDateFieldComponent, AjfDateInputFieldComponent, AjfEmptyFieldComponent, AjfFieldService, AjfFieldWarningDialog, AjfFormField, AjfFormRenderer, AjfFormsModule, AjfInputFieldComponent, AjfMultipleChoiceFieldComponent, AjfSingleChoiceFieldComponent, AjfTableFieldComponent, AjfTimeFieldComponent, AjfWarningAlertService, AjfBarcodeFieldComponent as ɵgc_ajf_src_material_forms_forms_a, AjfRangeFieldComponent as ɵgc_ajf_src_material_forms_forms_b, AjfTextFieldComponent as ɵgc_ajf_src_material_forms_forms_c, AjfVideoUrlFieldComponent as ɵgc_ajf_src_material_forms_forms_d };
923
+ //# sourceMappingURL=forms.js.map