cedar-embeddable-editor 0.9.1 → 0.9.3

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 (257) hide show
  1. package/cedar-embeddable-editor.js +1 -0
  2. package/package.json +1 -1
  3. package/.browserslistrc +0 -18
  4. package/.editorconfig +0 -16
  5. package/README.md +0 -302
  6. package/angular.json +0 -153
  7. package/cedar-embeddable-editor-0.9.0.tgz +0 -0
  8. package/e2e/protractor.conf.js +0 -36
  9. package/e2e/src/app.e2e-spec.ts +0 -23
  10. package/e2e/src/app.po.ts +0 -11
  11. package/e2e/tsconfig.json +0 -14
  12. package/karma.conf.js +0 -32
  13. package/license.txt +0 -26
  14. package/src/app/app.component.dev.ts +0 -74
  15. package/src/app/app.component.html +0 -5
  16. package/src/app/app.component.prod.ts +0 -76
  17. package/src/app/app.component.scss +0 -1
  18. package/src/app/app.module.dev.ts +0 -58
  19. package/src/app/app.module.prod.ts +0 -56
  20. package/src/app/modules/input-types/components/cedar-foo-bar/cedar-foo-bar.component.html +0 -0
  21. package/src/app/modules/input-types/components/cedar-foo-bar/cedar-foo-bar.component.scss +0 -0
  22. package/src/app/modules/input-types/components/cedar-foo-bar/cedar-foo-bar.component.spec.ts +0 -24
  23. package/src/app/modules/input-types/components/cedar-foo-bar/cedar-foo-bar.component.ts +0 -39
  24. package/src/app/modules/input-types/components/cedar-input-attribute-value/cedar-input-attribute-value.component.html +0 -25
  25. package/src/app/modules/input-types/components/cedar-input-attribute-value/cedar-input-attribute-value.component.scss +0 -0
  26. package/src/app/modules/input-types/components/cedar-input-attribute-value/cedar-input-attribute-value.component.spec.ts +0 -25
  27. package/src/app/modules/input-types/components/cedar-input-attribute-value/cedar-input-attribute-value.component.ts +0 -91
  28. package/src/app/modules/input-types/components/cedar-input-checkbox/cedar-input-checkbox.component.html +0 -8
  29. package/src/app/modules/input-types/components/cedar-input-checkbox/cedar-input-checkbox.component.scss +0 -0
  30. package/src/app/modules/input-types/components/cedar-input-checkbox/cedar-input-checkbox.component.spec.ts +0 -25
  31. package/src/app/modules/input-types/components/cedar-input-checkbox/cedar-input-checkbox.component.ts +0 -104
  32. package/src/app/modules/input-types/components/cedar-input-controlled/cedar-input-controlled.component.html +0 -22
  33. package/src/app/modules/input-types/components/cedar-input-controlled/cedar-input-controlled.component.scss +0 -0
  34. package/src/app/modules/input-types/components/cedar-input-controlled/cedar-input-controlled.component.spec.ts +0 -24
  35. package/src/app/modules/input-types/components/cedar-input-controlled/cedar-input-controlled.component.ts +0 -135
  36. package/src/app/modules/input-types/components/cedar-input-datetime/cedar-input-datetime.component.html +0 -44
  37. package/src/app/modules/input-types/components/cedar-input-datetime/cedar-input-datetime.component.scss +0 -0
  38. package/src/app/modules/input-types/components/cedar-input-datetime/cedar-input-datetime.component.spec.ts +0 -25
  39. package/src/app/modules/input-types/components/cedar-input-datetime/cedar-input-datetime.component.ts +0 -451
  40. package/src/app/modules/input-types/components/cedar-input-email/cedar-input-email.component.html +0 -16
  41. package/src/app/modules/input-types/components/cedar-input-email/cedar-input-email.component.scss +0 -0
  42. package/src/app/modules/input-types/components/cedar-input-email/cedar-input-email.component.spec.ts +0 -25
  43. package/src/app/modules/input-types/components/cedar-input-email/cedar-input-email.component.ts +0 -91
  44. package/src/app/modules/input-types/components/cedar-input-link/cedar-input-link.component.html +0 -16
  45. package/src/app/modules/input-types/components/cedar-input-link/cedar-input-link.component.scss +0 -0
  46. package/src/app/modules/input-types/components/cedar-input-link/cedar-input-link.component.spec.ts +0 -25
  47. package/src/app/modules/input-types/components/cedar-input-link/cedar-input-link.component.ts +0 -92
  48. package/src/app/modules/input-types/components/cedar-input-multiple-choice/cedar-input-multiple-choice.component.html +0 -18
  49. package/src/app/modules/input-types/components/cedar-input-multiple-choice/cedar-input-multiple-choice.component.scss +0 -5
  50. package/src/app/modules/input-types/components/cedar-input-multiple-choice/cedar-input-multiple-choice.component.spec.ts +0 -25
  51. package/src/app/modules/input-types/components/cedar-input-multiple-choice/cedar-input-multiple-choice.component.ts +0 -78
  52. package/src/app/modules/input-types/components/cedar-input-numeric/cedar-input-numeric.component.html +0 -15
  53. package/src/app/modules/input-types/components/cedar-input-numeric/cedar-input-numeric.component.scss +0 -0
  54. package/src/app/modules/input-types/components/cedar-input-numeric/cedar-input-numeric.component.spec.ts +0 -25
  55. package/src/app/modules/input-types/components/cedar-input-numeric/cedar-input-numeric.component.ts +0 -169
  56. package/src/app/modules/input-types/components/cedar-input-phone/cedar-input-phone.component.html +0 -15
  57. package/src/app/modules/input-types/components/cedar-input-phone/cedar-input-phone.component.scss +0 -0
  58. package/src/app/modules/input-types/components/cedar-input-phone/cedar-input-phone.component.spec.ts +0 -25
  59. package/src/app/modules/input-types/components/cedar-input-phone/cedar-input-phone.component.ts +0 -94
  60. package/src/app/modules/input-types/components/cedar-input-select/cedar-input-select.component.html +0 -19
  61. package/src/app/modules/input-types/components/cedar-input-select/cedar-input-select.component.scss +0 -0
  62. package/src/app/modules/input-types/components/cedar-input-select/cedar-input-select.component.spec.ts +0 -25
  63. package/src/app/modules/input-types/components/cedar-input-select/cedar-input-select.component.ts +0 -108
  64. package/src/app/modules/input-types/components/cedar-input-text/cedar-input-text.component.html +0 -25
  65. package/src/app/modules/input-types/components/cedar-input-text/cedar-input-text.component.scss +0 -0
  66. package/src/app/modules/input-types/components/cedar-input-text/cedar-input-text.component.spec.ts +0 -25
  67. package/src/app/modules/input-types/components/cedar-input-text/cedar-input-text.component.ts +0 -125
  68. package/src/app/modules/input-types/components/cedar-static-image/cedar-static-image.component.html +0 -8
  69. package/src/app/modules/input-types/components/cedar-static-image/cedar-static-image.component.scss +0 -0
  70. package/src/app/modules/input-types/components/cedar-static-image/cedar-static-image.component.spec.ts +0 -24
  71. package/src/app/modules/input-types/components/cedar-static-image/cedar-static-image.component.ts +0 -40
  72. package/src/app/modules/input-types/components/cedar-static-page-break/cedar-static-page-break.component.html +0 -20
  73. package/src/app/modules/input-types/components/cedar-static-page-break/cedar-static-page-break.component.scss +0 -24
  74. package/src/app/modules/input-types/components/cedar-static-page-break/cedar-static-page-break.component.spec.ts +0 -25
  75. package/src/app/modules/input-types/components/cedar-static-page-break/cedar-static-page-break.component.ts +0 -36
  76. package/src/app/modules/input-types/components/cedar-static-rich-text/cedar-static-rich-text.component.html +0 -2
  77. package/src/app/modules/input-types/components/cedar-static-rich-text/cedar-static-rich-text.component.scss +0 -0
  78. package/src/app/modules/input-types/components/cedar-static-rich-text/cedar-static-rich-text.component.spec.ts +0 -25
  79. package/src/app/modules/input-types/components/cedar-static-rich-text/cedar-static-rich-text.component.ts +0 -35
  80. package/src/app/modules/input-types/components/cedar-static-section-break/cedar-static-section-break.component.html +0 -8
  81. package/src/app/modules/input-types/components/cedar-static-section-break/cedar-static-section-break.component.scss +0 -0
  82. package/src/app/modules/input-types/components/cedar-static-section-break/cedar-static-section-break.component.spec.ts +0 -24
  83. package/src/app/modules/input-types/components/cedar-static-section-break/cedar-static-section-break.component.ts +0 -39
  84. package/src/app/modules/input-types/components/cedar-static-youtube/cedar-static-youtube.component.html +0 -6
  85. package/src/app/modules/input-types/components/cedar-static-youtube/cedar-static-youtube.component.scss +0 -0
  86. package/src/app/modules/input-types/components/cedar-static-youtube/cedar-static-youtube.component.spec.ts +0 -24
  87. package/src/app/modules/input-types/components/cedar-static-youtube/cedar-static-youtube.component.ts +0 -42
  88. package/src/app/modules/input-types/input-types.module.ts +0 -139
  89. package/src/app/modules/shared/components/cedar-component-header/cedar-component-header.component.html +0 -13
  90. package/src/app/modules/shared/components/cedar-component-header/cedar-component-header.component.scss +0 -12
  91. package/src/app/modules/shared/components/cedar-component-header/cedar-component-header.component.spec.ts +0 -25
  92. package/src/app/modules/shared/components/cedar-component-header/cedar-component-header.component.ts +0 -42
  93. package/src/app/modules/shared/components/cedar-component-renderer/cedar-component-renderer.component.html +0 -117
  94. package/src/app/modules/shared/components/cedar-component-renderer/cedar-component-renderer.component.scss +0 -5
  95. package/src/app/modules/shared/components/cedar-component-renderer/cedar-component-renderer.component.spec.ts +0 -25
  96. package/src/app/modules/shared/components/cedar-component-renderer/cedar-component-renderer.component.ts +0 -101
  97. package/src/app/modules/shared/components/cedar-data-saver/cedar-data-saver.component.html +0 -22
  98. package/src/app/modules/shared/components/cedar-data-saver/cedar-data-saver.component.scss +0 -23
  99. package/src/app/modules/shared/components/cedar-data-saver/cedar-data-saver.component.spec.ts +0 -24
  100. package/src/app/modules/shared/components/cedar-data-saver/cedar-data-saver.component.ts +0 -139
  101. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor/cedar-embeddable-metadata-editor.component.html +0 -56
  102. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor/cedar-embeddable-metadata-editor.component.scss +0 -13
  103. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor/cedar-embeddable-metadata-editor.component.spec.ts +0 -25
  104. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor/cedar-embeddable-metadata-editor.component.ts +0 -184
  105. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor-wrapper/cedar-embeddable-metadata-editor-wrapper.component.html +0 -15
  106. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor-wrapper/cedar-embeddable-metadata-editor-wrapper.component.scss +0 -2
  107. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor-wrapper/cedar-embeddable-metadata-editor-wrapper.component.spec.ts +0 -25
  108. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor-wrapper/cedar-embeddable-metadata-editor-wrapper.component.ts +0 -240
  109. package/src/app/modules/shared/components/cedar-multi-pager/cedar-multi-pager.component.html +0 -35
  110. package/src/app/modules/shared/components/cedar-multi-pager/cedar-multi-pager.component.scss +0 -41
  111. package/src/app/modules/shared/components/cedar-multi-pager/cedar-multi-pager.component.spec.ts +0 -25
  112. package/src/app/modules/shared/components/cedar-multi-pager/cedar-multi-pager.component.ts +0 -282
  113. package/src/app/modules/shared/components/date-picker/date-picker.component.html +0 -46
  114. package/src/app/modules/shared/components/date-picker/date-picker.component.scss +0 -7
  115. package/src/app/modules/shared/components/date-picker/date-picker.component.spec.ts +0 -25
  116. package/src/app/modules/shared/components/date-picker/date-picker.component.ts +0 -100
  117. package/src/app/modules/shared/components/file-uploader/bytes/bytes.pipe.spec.ts +0 -33
  118. package/src/app/modules/shared/components/file-uploader/bytes/bytes.pipe.ts +0 -16
  119. package/src/app/modules/shared/components/file-uploader/file-upload-input-for/file-upload-input-for.directive.spec.ts +0 -54
  120. package/src/app/modules/shared/components/file-uploader/file-upload-input-for/file-upload-input-for.directive.ts +0 -67
  121. package/src/app/modules/shared/components/file-uploader/file-uploader.component.html +0 -26
  122. package/src/app/modules/shared/components/file-uploader/file-uploader.component.scss +0 -55
  123. package/src/app/modules/shared/components/file-uploader/file-uploader.component.spec.ts +0 -25
  124. package/src/app/modules/shared/components/file-uploader/file-uploader.component.ts +0 -67
  125. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.component.html +0 -42
  126. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.component.scss +0 -31
  127. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.component.spec.ts +0 -177
  128. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.component.ts +0 -145
  129. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.service.ts +0 -21
  130. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.component.html +0 -1
  131. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.component.scss +0 -0
  132. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.component.spec.ts +0 -59
  133. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.component.ts +0 -139
  134. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.service.spec.ts +0 -33
  135. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.service.ts +0 -17
  136. package/src/app/modules/shared/components/file-uploader/mat-file-upload.module.ts +0 -35
  137. package/src/app/modules/shared/components/file-uploader/mat-file-upload.type.ts +0 -24
  138. package/src/app/modules/shared/components/preferences-menu/preferences-menu.component.html +0 -18
  139. package/src/app/modules/shared/components/preferences-menu/preferences-menu.component.scss +0 -0
  140. package/src/app/modules/shared/components/preferences-menu/preferences-menu.component.spec.ts +0 -23
  141. package/src/app/modules/shared/components/preferences-menu/preferences-menu.component.ts +0 -10
  142. package/src/app/modules/shared/components/sample-templates/sample-template-select/sample-template-select.component.html +0 -16
  143. package/src/app/modules/shared/components/sample-templates/sample-template-select/sample-template-select.component.scss +0 -0
  144. package/src/app/modules/shared/components/sample-templates/sample-template-select/sample-template-select.component.spec.ts +0 -25
  145. package/src/app/modules/shared/components/sample-templates/sample-template-select/sample-template-select.component.ts +0 -89
  146. package/src/app/modules/shared/components/sample-templates/sample-templates.component.html +0 -19
  147. package/src/app/modules/shared/components/sample-templates/sample-templates.component.scss +0 -0
  148. package/src/app/modules/shared/components/sample-templates/sample-templates.component.spec.ts +0 -25
  149. package/src/app/modules/shared/components/sample-templates/sample-templates.component.ts +0 -66
  150. package/src/app/modules/shared/components/sample-templates/sample-templates.service.ts +0 -175
  151. package/src/app/modules/shared/components/source-panels/source-panels.component.html +0 -98
  152. package/src/app/modules/shared/components/source-panels/source-panels.component.scss +0 -0
  153. package/src/app/modules/shared/components/source-panels/source-panels.component.spec.ts +0 -25
  154. package/src/app/modules/shared/components/source-panels/source-panels.component.ts +0 -36
  155. package/src/app/modules/shared/components/static-footer/static-footer.component.html +0 -17
  156. package/src/app/modules/shared/components/static-footer/static-footer.component.scss +0 -110
  157. package/src/app/modules/shared/components/static-footer/static-footer.component.spec.ts +0 -25
  158. package/src/app/modules/shared/components/static-footer/static-footer.component.ts +0 -16
  159. package/src/app/modules/shared/components/static-header/static-header.component.html +0 -10
  160. package/src/app/modules/shared/components/static-header/static-header.component.scss +0 -13
  161. package/src/app/modules/shared/components/static-header/static-header.component.spec.ts +0 -25
  162. package/src/app/modules/shared/components/static-header/static-header.component.ts +0 -21
  163. package/src/app/modules/shared/components/timezone-picker/timezone-picker.component.html +0 -16
  164. package/src/app/modules/shared/components/timezone-picker/timezone-picker.component.scss +0 -0
  165. package/src/app/modules/shared/components/timezone-picker/timezone-picker.component.spec.ts +0 -25
  166. package/src/app/modules/shared/components/timezone-picker/timezone-picker.component.ts +0 -251
  167. package/src/app/modules/shared/factory/template-representation.factory.ts +0 -323
  168. package/src/app/modules/shared/handler/component-type.handler.ts +0 -51
  169. package/src/app/modules/shared/handler/data-object-builder.handler.ts +0 -159
  170. package/src/app/modules/shared/handler/data-object-data-value.handler.ts +0 -270
  171. package/src/app/modules/shared/handler/data-object-structure.handler.ts +0 -145
  172. package/src/app/modules/shared/handler/multi-instance-object.handler.ts +0 -317
  173. package/src/app/modules/shared/models/cedar-input-template.model.ts +0 -3
  174. package/src/app/modules/shared/models/cedar-model.model.ts +0 -48
  175. package/src/app/modules/shared/models/component/cedar-component.model.ts +0 -16
  176. package/src/app/modules/shared/models/component/component-representation.model.ts +0 -30
  177. package/src/app/modules/shared/models/component/element-component.model.ts +0 -11
  178. package/src/app/modules/shared/models/component/field-component.model.ts +0 -23
  179. package/src/app/modules/shared/models/component/multi-component.model.ts +0 -10
  180. package/src/app/modules/shared/models/component/null-component.model.ts +0 -20
  181. package/src/app/modules/shared/models/component/single-component.model.ts +0 -6
  182. package/src/app/modules/shared/models/element/abstract-element-component.model.ts +0 -26
  183. package/src/app/modules/shared/models/element/multi-element-component.model.ts +0 -19
  184. package/src/app/modules/shared/models/element/single-element-component.model.ts +0 -16
  185. package/src/app/modules/shared/models/enum/data-object-building-mode.model.ts +0 -6
  186. package/src/app/modules/shared/models/field/abstract-field-component.model.ts +0 -28
  187. package/src/app/modules/shared/models/field/multi-field-component.model.ts +0 -21
  188. package/src/app/modules/shared/models/field/single-field-component.model.ts +0 -18
  189. package/src/app/modules/shared/models/info/basic-info.model.ts +0 -8
  190. package/src/app/modules/shared/models/info/choice-info.model.ts +0 -9
  191. package/src/app/modules/shared/models/info/choice-option.model.ts +0 -6
  192. package/src/app/modules/shared/models/info/content-info.model.ts +0 -5
  193. package/src/app/modules/shared/models/info/controlled-info.model.ts +0 -8
  194. package/src/app/modules/shared/models/info/current-multi-info.model.ts +0 -7
  195. package/src/app/modules/shared/models/info/label-info.model.ts +0 -7
  196. package/src/app/modules/shared/models/info/multi-info.model.ts +0 -10
  197. package/src/app/modules/shared/models/info/multi-instance-info.model.ts +0 -20
  198. package/src/app/modules/shared/models/info/multi-instance-object-info.model.ts +0 -30
  199. package/src/app/modules/shared/models/info/number-info.model.ts +0 -9
  200. package/src/app/modules/shared/models/info/value-info.model.ts +0 -9
  201. package/src/app/modules/shared/models/input-type.model.ts +0 -21
  202. package/src/app/modules/shared/models/instance-extract-data.model.ts +0 -3
  203. package/src/app/modules/shared/models/instance-full-data.model.ts +0 -5
  204. package/src/app/modules/shared/models/javascript-types.model.ts +0 -7
  205. package/src/app/modules/shared/models/json-schema.model.ts +0 -39
  206. package/src/app/modules/shared/models/numbers.model.ts +0 -10
  207. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-request-parameter-object.ts +0 -8
  208. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-request-value-constraints.ts +0 -8
  209. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-request.ts +0 -9
  210. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-response-item.ts +0 -10
  211. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-response.ts +0 -13
  212. package/src/app/modules/shared/models/static/static-field-component.model.ts +0 -24
  213. package/src/app/modules/shared/models/template/cedar-template.model.ts +0 -24
  214. package/src/app/modules/shared/models/template/empty-template.model.ts +0 -5
  215. package/src/app/modules/shared/models/template/null-template.model.ts +0 -23
  216. package/src/app/modules/shared/models/template/template-component.model.ts +0 -12
  217. package/src/app/modules/shared/models/temporal.model.ts +0 -13
  218. package/src/app/modules/shared/models/ui/cedar-ui-component.model.ts +0 -17
  219. package/src/app/modules/shared/models/xsd.model.ts +0 -11
  220. package/src/app/modules/shared/pipe/keep-html.pipe.ts +0 -13
  221. package/src/app/modules/shared/pipe/rdf.pipe.ts +0 -10
  222. package/src/app/modules/shared/service/active-component-registry.service.ts +0 -134
  223. package/src/app/modules/shared/service/component-data.service.ts +0 -25
  224. package/src/app/modules/shared/service/controlled-field-data.service.ts +0 -37
  225. package/src/app/modules/shared/service/date-time/custom-date-adapter.ts +0 -19
  226. package/src/app/modules/shared/service/date-time/date-time.service.ts +0 -30
  227. package/src/app/modules/shared/service/local-settings.service.ts +0 -22
  228. package/src/app/modules/shared/service/message-handler.service.ts +0 -35
  229. package/src/app/modules/shared/service/page-break-paginator.service.ts +0 -78
  230. package/src/app/modules/shared/shared.module.ts +0 -97
  231. package/src/app/modules/shared/util/data-context.ts +0 -42
  232. package/src/app/modules/shared/util/data-object-util.ts +0 -102
  233. package/src/app/modules/shared/util/handler-context.ts +0 -81
  234. package/src/app/modules/shared/util/template-object-util.ts +0 -21
  235. package/src/assets/.gitkeep +0 -0
  236. package/src/assets/fonts/MaterialIcons-Regular.eot +0 -0
  237. package/src/assets/fonts/MaterialIcons-Regular.ttf +0 -0
  238. package/src/assets/fonts/MaterialIcons-Regular.woff +0 -0
  239. package/src/assets/fonts/MaterialIcons-Regular.woff2 +0 -0
  240. package/src/assets/i18n-cee/en.json +0 -86
  241. package/src/assets/i18n-cee/hu.json +0 -86
  242. package/src/assets/images/bmir-logo.png +0 -0
  243. package/src/assets/images/cedar-logo-80x80.png +0 -0
  244. package/src/environments/environment.prod.ts +0 -5
  245. package/src/environments/environment.ts +0 -18
  246. package/src/favicon.ico +0 -0
  247. package/src/index.html +0 -16
  248. package/src/main.ts +0 -28
  249. package/src/polyfills.ts +0 -65
  250. package/src/styles-own.scss +0 -352
  251. package/src/styles.scss +0 -116
  252. package/src/test.ts +0 -25
  253. package/tsconfig.app.json +0 -16
  254. package/tsconfig.base.json +0 -20
  255. package/tsconfig.json +0 -20
  256. package/tsconfig.spec.json +0 -18
  257. package/tslint.json +0 -152
@@ -1,24 +0,0 @@
1
- import {ComponentFixture, TestBed} from '@angular/core/testing';
2
- import {CedarInputControlledComponent} from './cedar-input-controlled.component';
3
-
4
- describe('CedarInputControlledComponent', () => {
5
- let component: CedarInputControlledComponent;
6
- let fixture: ComponentFixture<CedarInputControlledComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- declarations: [CedarInputControlledComponent]
11
- })
12
- .compileComponents();
13
- });
14
-
15
- beforeEach(() => {
16
- fixture = TestBed.createComponent(CedarInputControlledComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- });
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,135 +0,0 @@
1
- import {AfterViewInit, Component, Input, OnInit, ViewChild, ViewEncapsulation} from '@angular/core';
2
- import {FieldComponent} from '../../../shared/models/component/field-component.model';
3
- import {FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Validators} from '@angular/forms';
4
- import {ComponentDataService} from '../../../shared/service/component-data.service';
5
- import {CedarUIComponent} from '../../../shared/models/ui/cedar-ui-component.model';
6
- import {ActiveComponentRegistryService} from '../../../shared/service/active-component-registry.service';
7
- import {HandlerContext} from '../../../shared/util/handler-context';
8
- import {ErrorStateMatcher} from '@angular/material/core';
9
- import {Observable} from 'rxjs';
10
- import {debounceTime, distinctUntilChanged, map, startWith, switchMap} from 'rxjs/operators';
11
- import {IntegratedSearchResponseItem} from '../../../shared/models/rest/integrated-search/integrated-search-response-item';
12
- import {JsonSchema} from '../../../shared/models/json-schema.model';
13
- import {ControlledFieldDataService} from '../../../shared/service/controlled-field-data.service';
14
- import {MessageHandlerService} from '../../../shared/service/message-handler.service';
15
- import {MatAutocompleteTrigger} from '@angular/material/autocomplete';
16
- export class TextFieldErrorStateMatcher implements ErrorStateMatcher {
17
- isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {
18
- return !!(control && control.invalid && (control.dirty || control.touched));
19
- }
20
- }
21
-
22
- @Component({
23
- selector: 'app-cedar-input-controlled',
24
- templateUrl: './cedar-input-controlled.component.html',
25
- styleUrls: ['./cedar-input-controlled.component.scss'],
26
- encapsulation: ViewEncapsulation.None
27
- })
28
- export class CedarInputControlledComponent extends CedarUIComponent implements OnInit, AfterViewInit {
29
- @ViewChild('autoCompleteInput', { static: false, read: MatAutocompleteTrigger }) trigger: MatAutocompleteTrigger;
30
- selectedData = new FormControl();
31
- component: FieldComponent;
32
- options: FormGroup;
33
- inputValueControl = new FormControl(null, null);
34
- errorStateMatcher = new TextFieldErrorStateMatcher();
35
- @Input() handlerContext: HandlerContext;
36
- model: IntegratedSearchResponseItem = null;
37
-
38
- filteredOptions: Observable<IntegratedSearchResponseItem[]>;
39
-
40
- constructor(
41
- fb: FormBuilder,
42
- public cds: ComponentDataService,
43
- private activeComponentRegistry: ActiveComponentRegistryService,
44
- private controlledFieldDataService: ControlledFieldDataService,
45
- private messageHandlerService: MessageHandlerService
46
- ) {
47
- super();
48
- this.options = fb.group({
49
- inputValue: this.inputValueControl,
50
- });
51
- }
52
-
53
- ngOnInit(): void {
54
- const validators: any[] = [];
55
-
56
- if (this.component.valueInfo.requiredValue) {
57
- validators.push(Validators.required);
58
- }
59
- this.inputValueControl = new FormControl(null, validators);
60
-
61
- if (this.component.valueInfo.defaultValue &&
62
- typeof this.component.valueInfo.defaultValue === 'object' &&
63
- (this.component.valueInfo.defaultValue as object).hasOwnProperty(JsonSchema.termUri)) {
64
- this.setValueUIAndModel(this.component.valueInfo.defaultValue ? this.component.valueInfo.defaultValue[JsonSchema.termUri] : null,
65
- this.component.valueInfo.defaultValue ? this.component.valueInfo.defaultValue[JsonSchema.rdfsLabel] : null);
66
- }
67
-
68
- this.filteredOptions = this.inputValueControl.valueChanges
69
- .pipe(
70
- startWith(''),
71
- debounceTime(400),
72
- distinctUntilChanged(),
73
- switchMap(val => {
74
- return this.filter(val || '');
75
- })
76
- );
77
- }
78
-
79
- ngAfterViewInit(): void {
80
- this.trigger.panelClosingActions
81
- .subscribe(e => {
82
- if (!e){
83
- this.clearValue();
84
- }
85
- });
86
- }
87
-
88
- filter(val: string): Observable<IntegratedSearchResponseItem[]> {
89
- return this.controlledFieldDataService.getData(val, this.component).pipe(
90
- map(response => {
91
- if (response == null) {
92
- return null;
93
- } else if (response.collection) {
94
- return response.collection.filter(option => {
95
- return option.prefLabel.toLowerCase().indexOf(val.toLowerCase()) === 0;
96
- });
97
- } else {
98
- if (!val) {
99
- val = 'empty string';
100
- }
101
- this.messageHandlerService.errorObject(val, response);
102
- }
103
- })
104
- );
105
- }
106
-
107
- @Input() set componentToRender(componentToRender: FieldComponent) {
108
- this.component = componentToRender;
109
- this.activeComponentRegistry.registerComponent(this.component, this);
110
- }
111
-
112
- onSelectionChange(option: IntegratedSearchResponseItem): void {
113
- this.handlerContext.changeControlledValue(this.component, option[JsonSchema.atId], option.prefLabel);
114
- }
115
-
116
- inputChanged(event): void {
117
- if (!(event.target as HTMLTextAreaElement).value) {
118
- this.clearValue();
119
- }
120
- }
121
-
122
- setCurrentValue(currentValue: any): void {
123
- this.inputValueControl.setValue(currentValue);
124
- }
125
-
126
- clearValue(): void {
127
- this.inputValueControl.setValue(null);
128
- this.handlerContext.changeControlledValue(this.component, null, null);
129
- }
130
-
131
- private setValueUIAndModel(atId: string, prefLabel: string): void {
132
- this.inputValueControl.setValue(prefLabel);
133
- this.handlerContext.changeControlledValue(this.component, atId, prefLabel);
134
- }
135
- }
@@ -1,44 +0,0 @@
1
- <app-date-picker *ngIf="showDatePicker()"
2
- [dateFormat]="dateFormat()"
3
- (dateChangedEvent)="dateInputChanged($event)"
4
- [dateMonthYear]="dateMonthYearControl"
5
- [required]="required"
6
- xmlns="http://www.w3.org/1999/html"></app-date-picker>
7
- <ng-container *ngIf="showTimePicker()">
8
- <div>
9
- <!-- <mat-label>Select Time</mat-label>-->
10
- <ngx-mat-timepicker
11
- (ngModelChange)="timeInputChanged($event)"
12
- (input)="timeInputChanged($event)"
13
- [(ngModel)]="timePickerTime"
14
- [showSpinners]="true"
15
- [enableMeridian]="enableMeridian()"
16
- [disableMinute]="disableMinute()"
17
- [showSeconds]="showSeconds()">
18
- </ngx-mat-timepicker>
19
- </div>
20
- </ng-container>
21
- <ng-container *ngIf="showDecimalSeconds()">
22
- <mat-form-field>
23
- <!-- <mat-label>Select Decimal Seconds</mat-label>-->
24
- <input matInput type="number"
25
- (input)="decimalSecondsChanged($event)"
26
- [(ngModel)]="decimalSeconds"
27
- name="decimalSeconds"
28
- attr.aria-label="{{'Generic.SelectDecimalSeconds' | translate}}">
29
- </mat-form-field>
30
- </ng-container>
31
- <ng-container *ngIf="showTimezonePicker()">
32
- <app-timezone-picker
33
- [(ngModel)]="timezone"
34
- (ngModelChange)="timezoneInputChanged($event)"
35
- customPlaceholderText="{{'Generic.SelectTimeZone' | translate}}"
36
- customNotFoundText="{{'Generic.NoTimeZoneFound' | translate}}"
37
- [getUserZone]="setDefaultZone"
38
- [clearable]="false"
39
- ></app-timezone-picker>
40
- </ng-container>
41
- <!--<p class="info-box">-->
42
- <!-- DateTime is:&nbsp;&nbsp;&nbsp;{{datetimeParsed.toDateRepresentation()}}<br/>-->
43
- <!-- Stored as:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{datetimeParsed.toStorageRepresentation()}}-->
44
- <!--</p>-->
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed} from '@angular/core/testing';
2
-
3
- import {CedarInputDatetimeComponent} from './cedar-input-datetime.component';
4
-
5
- describe('CedarInputDatetimeComponent', () => {
6
- let component: CedarInputDatetimeComponent;
7
- let fixture: ComponentFixture<CedarInputDatetimeComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [CedarInputDatetimeComponent]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(CedarInputDatetimeComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,451 +0,0 @@
1
- import {AfterViewInit, ChangeDetectorRef, Component, Input, OnInit, ViewEncapsulation} from '@angular/core';
2
- import {FieldComponent} from '../../../shared/models/component/field-component.model';
3
- import {FormBuilder, FormControl} from '@angular/forms';
4
- import {CedarUIComponent} from '../../../shared/models/ui/cedar-ui-component.model';
5
- import {ActiveComponentRegistryService} from '../../../shared/service/active-component-registry.service';
6
- import {HandlerContext} from '../../../shared/util/handler-context';
7
- import {DatePickerComponent} from '../../../shared/components/date-picker/date-picker.component';
8
- import {Xsd} from '../../../shared/models/xsd.model';
9
- import {Temporal} from '../../../shared/models/temporal.model';
10
- import moment, {Moment} from 'moment';
11
- import {TimezonePickerComponent, TZone} from '../../../shared/components/timezone-picker/timezone-picker.component';
12
- // import {Moment} from 'moment';
13
- // import * as moment from 'moment-timezone';
14
-
15
-
16
- @Component({
17
- selector: 'app-cedar-input-datetime',
18
- templateUrl: './cedar-input-datetime.component.html',
19
- styleUrls: ['./cedar-input-datetime.component.scss'],
20
- encapsulation: ViewEncapsulation.None
21
- })
22
-
23
- export class CedarInputDatetimeComponent extends CedarUIComponent implements OnInit, AfterViewInit {
24
-
25
- component: FieldComponent;
26
-
27
- timePickerTime: Date;
28
- decimalSeconds: number;
29
- timezone: TZone;
30
- setDefaultZone = false;
31
- datetimeParsed: DatetimeRepresentation;
32
- dateMonthYearControl: FormControl;
33
- required: boolean;
34
-
35
- @Input() handlerContext: HandlerContext;
36
-
37
- constructor(
38
- fb: FormBuilder,
39
- private activeComponentRegistry: ActiveComponentRegistryService,
40
- private cdr: ChangeDetectorRef
41
- ) {
42
- super();
43
- this.datetimeParsed = new DatetimeRepresentation();
44
- this.timePickerTime = this.getDefaultTime();
45
- }
46
-
47
- ngOnInit(): void {
48
- }
49
-
50
- ngAfterViewInit(): void {
51
- this.cdr.detectChanges();
52
- }
53
-
54
- @Input() set componentToRender(componentToRender: FieldComponent) {
55
- this.component = componentToRender;
56
- this.required = this.component.valueInfo.requiredValue;
57
- this.activeComponentRegistry.registerComponent(this.component, this);
58
- }
59
-
60
- dateInputChanged(event): void {
61
- this.datetimeParsed.setDate(event);
62
- this.handlerContext.changeValue(this.component, this.datetimeParsed.toStorageRepresentation());
63
- }
64
-
65
- timeInputChanged(event): void {
66
- this.datetimeParsed.setHours(this.timePickerTime.getHours());
67
- this.datetimeParsed.setAMPM(this.enableMeridian());
68
-
69
- if (!this.disableMinute()) {
70
- this.datetimeParsed.setMinutes(this.timePickerTime.getMinutes());
71
- }
72
-
73
- if (this.showSeconds()) {
74
- this.datetimeParsed.setSeconds(this.timePickerTime.getSeconds());
75
- }
76
- this.handlerContext.changeValue(this.component, this.datetimeParsed.toStorageRepresentation());
77
- }
78
-
79
- decimalSecondsChanged(event): void {
80
- this.datetimeParsed.setDecimalSeconds(this.decimalSeconds);
81
- this.handlerContext.changeValue(this.component, this.datetimeParsed.toStorageRepresentation());
82
- }
83
-
84
- timezoneInputChanged(event): void {
85
- if (event != null) {
86
- this.datetimeParsed.setTimezone(event);
87
- this.handlerContext.changeValue(this.component, this.datetimeParsed.toStorageRepresentation());
88
- }
89
- }
90
-
91
- showDatePicker(): boolean {
92
- return [Xsd.dateTime, Xsd.date].indexOf(this.component.valueInfo.temporalType) > -1;
93
- }
94
-
95
- dateFormat(): string {
96
- let format = DatePickerComponent.YEAR_MONTH_DAY_FORMAT;
97
-
98
- if (this.component.valueInfo.temporalType === Xsd.date) {
99
- switch (this.component.basicInfo.temporalGranularity) {
100
- case Temporal.month:
101
- format = DatePickerComponent.YEAR_MONTH_FORMAT;
102
- break;
103
- case Temporal.year:
104
- format = DatePickerComponent.YEAR_FORMAT;
105
- break;
106
- }
107
- }
108
- return format;
109
- }
110
-
111
- showTimePicker(): boolean {
112
- return [Xsd.dateTime, Xsd.time].indexOf(this.component.valueInfo.temporalType) > -1;
113
- }
114
-
115
- enableMeridian(): boolean {
116
- return (this.component.basicInfo.inputTimeFormat === Temporal.inputType12h);
117
- }
118
-
119
- disableMinute(): boolean {
120
- return (this.component.basicInfo.temporalGranularity === Temporal.hour);
121
- }
122
-
123
- showSeconds(): boolean {
124
- return [Temporal.second, Temporal.decimalSecond].indexOf(this.component.basicInfo.temporalGranularity) > -1;
125
- }
126
-
127
- showDecimalSeconds(): boolean {
128
- return (this.component.basicInfo.temporalGranularity === Temporal.decimalSecond);
129
- }
130
-
131
- showTimezonePicker(): boolean {
132
- return (this.component.basicInfo.timezoneEnabled === true);
133
- }
134
-
135
- setCurrentValue(currentValue: any): void {
136
- if (currentValue) {
137
- this.datetimeParsed = DatetimeRepresentation.fromStorageRepresentation(currentValue as string, this.enableMeridian());
138
-
139
- if (this.datetimeParsed.dateIsSet) {
140
- const m = moment();
141
- m.set('date', +this.datetimeParsed.day);
142
- m.set('month', +this.datetimeParsed.month - 1);
143
- m.set('year', +this.datetimeParsed.year);
144
- this.dateMonthYearControl = new FormControl(m);
145
- }
146
-
147
- if (this.datetimeParsed.timeIsSet) {
148
- // reset timepicker UI
149
- this.timePickerTime = new Date();
150
- this.timePickerTime.setHours(+this.datetimeParsed.hours, +this.datetimeParsed.minutes, +this.datetimeParsed.seconds);
151
-
152
- // reset decimal seconds
153
- if (this.datetimeParsed.decimalSeconds.length > 0) {
154
- this.decimalSeconds = +this.datetimeParsed.decimalSeconds;
155
- } else {
156
- this.decimalSeconds = null;
157
- }
158
-
159
- if (this.datetimeParsed.timezoneIsSet) {
160
- this.timezone = {
161
- id: this.datetimeParsed.timezoneOffset,
162
- label: this.datetimeParsed.timezoneName
163
- };
164
- } else {
165
- this.resetTimezone();
166
- }
167
- }
168
- }
169
- // set datetime UI to default view
170
- else {
171
- this.resetDate();
172
- this.resetTime();
173
- }
174
- }
175
-
176
- private resetDate(): void {
177
- if (this.showDatePicker()) {
178
- const defDate = this.getDefaultDate();
179
- this.dateMonthYearControl = new FormControl(defDate);
180
- this.datetimeParsed.setDate(defDate);
181
- this.handlerContext.changeValue(this.component, this.datetimeParsed.toStorageRepresentation());
182
- }
183
- }
184
-
185
- private resetTime(): void {
186
- if (this.showTimePicker()) {
187
- this.timePickerTime = this.getDefaultTime();
188
- this.decimalSeconds = null;
189
- this.datetimeParsed.setDecimalSeconds(null);
190
- this.resetTimezone();
191
- this.handlerContext.changeValue(this.component, this.datetimeParsed.toStorageRepresentation());
192
- }
193
- }
194
-
195
- private resetTimezone(): void {
196
- if (this.showTimezonePicker()) {
197
- let tz = null;
198
-
199
- if (this.setDefaultZone) {
200
- tz = TimezonePickerComponent.guessedUserZone();
201
- }
202
- this.timezone = tz;
203
- this.datetimeParsed.setTimezone(tz);
204
- this.handlerContext.changeValue(this.component, this.datetimeParsed.toStorageRepresentation());
205
- }
206
- }
207
-
208
- private getDefaultDate(): Moment {
209
- const dt = moment();
210
- const format = this.dateFormat();
211
-
212
- switch (format) {
213
- case DatePickerComponent.YEAR_MONTH_FORMAT:
214
- dt.set('date', 1);
215
- break;
216
- case DatePickerComponent.YEAR_FORMAT:
217
- dt.set('date', 1);
218
- dt.set('month', 0);
219
- break;
220
- }
221
- return dt;
222
- }
223
-
224
- private getDefaultTime(): Date {
225
- const dt = new Date();
226
- // dt.setHours(0,0,0,0);
227
- return dt;
228
- }
229
- }
230
-
231
- export class DatetimeRepresentation {
232
-
233
- static readonly DATE_SEPARATOR = '-';
234
- static readonly TIME_SEPARATOR = ':';
235
- static readonly DATE_TIME_SEPARATOR = 'T';
236
- static readonly TIME_DECIMAL_SECOND_SEPARATOR = '.';
237
- static readonly DATE_STORED_FORMAT = 'YYYY-MM-DD';
238
-
239
- dateIsSet: boolean;
240
- timeIsSet: boolean;
241
- timezoneIsSet: boolean;
242
-
243
- year: string;
244
- month: string;
245
- day: string;
246
-
247
- hours: string;
248
- minutes: string;
249
- seconds: string;
250
- decimalSeconds: string;
251
- ampm: boolean;
252
-
253
- timezoneName: string;
254
- timezoneOffset: string;
255
-
256
-
257
- constructor() {
258
- // set default values
259
- const DEF_ZERO = '00';
260
- const DEF_ONE = '01';
261
-
262
- this.dateIsSet = false;
263
- this.timeIsSet = false;
264
- this.timezoneIsSet = false;
265
-
266
- this.year = '';
267
- this.month = DEF_ONE;
268
- this.day = DEF_ONE;
269
-
270
- this.hours = DEF_ZERO;
271
- this.minutes = DEF_ZERO;
272
- this.seconds = DEF_ZERO;
273
- this.decimalSeconds = '';
274
- this.ampm = true;
275
-
276
- this.timezoneName = '';
277
- this.timezoneOffset = '';
278
- }
279
-
280
- static fromStorageRepresentation(storedDateStr: string, ampm: boolean): DatetimeRepresentation {
281
- const that = new DatetimeRepresentation();
282
- const datePatternStr = '^\\d{4}\\' + DatetimeRepresentation.DATE_SEPARATOR + '\\d{2}\\' + DatetimeRepresentation.DATE_SEPARATOR + '\\d{2}';
283
- const datePattern = new RegExp(datePatternStr);
284
- const dateStr = storedDateStr.match(datePattern);
285
-
286
- if (dateStr && dateStr.length > 0) {
287
- that.dateIsSet = true;
288
- that.setDate(moment(dateStr[0], DatetimeRepresentation.DATE_STORED_FORMAT));
289
- }
290
- const timePatternStr = '(\\d{2}\\' + DatetimeRepresentation.TIME_SEPARATOR + '\\d{2}\\' + DatetimeRepresentation.TIME_SEPARATOR + '\\d{2})(\\.[\\d\\.]+)*';
291
- const timePattern = new RegExp(timePatternStr);
292
- const timeStr = storedDateStr.match(timePattern);
293
-
294
- if (timeStr && timeStr.length > 1) {
295
- that.setAMPM(ampm);
296
- const timeArr = timeStr[1].split(DatetimeRepresentation.TIME_SEPARATOR);
297
- that.setHours(+timeArr[0]);
298
- that.setMinutes(+timeArr[1]);
299
- that.setSeconds(+timeArr[2]);
300
-
301
- if (timeStr.length > 2 && timeStr[2]) {
302
- that.setDecimalSeconds(+timeStr[2].substring(1));
303
- }
304
- const timezonePatternStr = 'Z|[\\-\\+]{1}\\d{2}\\' + DatetimeRepresentation.TIME_SEPARATOR + '\\d{2}$';
305
- const timezonePattern = new RegExp(timezonePatternStr);
306
- const timezoneStr = storedDateStr.match(timezonePattern);
307
-
308
- if (timezoneStr && timezoneStr.length > 0) {
309
- const timezone = TimezonePickerComponent.AVAILABLE_TIMEZONES.find(z => z.id === timezoneStr[0]);
310
- that.setTimezone(timezone);
311
- }
312
- }
313
- return that;
314
- }
315
-
316
- static regexIndexOf(text, re, i): number {
317
- const indexInSuffix = text.slice(i).search(re);
318
- return indexInSuffix < 0 ? indexInSuffix : indexInSuffix + i;
319
- }
320
-
321
- static indexOfEnd(sourceStr, matchStr): number {
322
- const io = sourceStr.indexOf(matchStr);
323
- return io === -1 ? -1 : io + matchStr.length;
324
- }
325
-
326
- setDate(dateIn: Moment): void {
327
- if (!dateIn){
328
- return;
329
- }
330
- this.dateIsSet = true;
331
- this.year = dateIn.year().toLocaleString().replace(/,/,'');
332
- this.month = this.stringify((dateIn.month() + 1).toLocaleString());
333
- this.day = this.stringify(dateIn.date().toLocaleString());
334
- }
335
-
336
- setHours(hoursIn: number): void {
337
- this.timeIsSet = true;
338
- this.hours = this.stringify(hoursIn);
339
- }
340
-
341
- setMinutes(minutesIn: number): void {
342
- this.timeIsSet = true;
343
- this.minutes = this.stringify(minutesIn);
344
- }
345
-
346
- setSeconds(secondsIn: number): void {
347
- this.timeIsSet = true;
348
- this.seconds = this.stringify(secondsIn);
349
- }
350
-
351
- setAMPM(val: boolean): void {
352
- this.ampm = val;
353
- }
354
-
355
- setDecimalSeconds(decSecondsIn: number): void {
356
- this.timeIsSet = true;
357
-
358
- if (decSecondsIn == null) {
359
- this.decimalSeconds = '';
360
- } else {
361
- this.decimalSeconds = decSecondsIn.toString();
362
- }
363
- }
364
-
365
- setTimezone(timezoneIn: TZone): void {
366
- if (timezoneIn) {
367
- this.timezoneIsSet = true;
368
- this.timezoneOffset = timezoneIn.id;
369
- this.timezoneName = timezoneIn.label;
370
- } else {
371
- this.timezoneIsSet = false;
372
- this.timezoneOffset = '';
373
- this.timezoneName = '';
374
- }
375
- }
376
-
377
- toDateRepresentation(): string {
378
- const m = moment();
379
- const formatArr = [];
380
-
381
- if (this.timezoneIsSet) {
382
- m.utcOffset(this.timezoneOffset);
383
- }
384
-
385
- if (this.dateIsSet) {
386
- m.set({year: +this.year, month: +this.month - 1, date: +this.day});
387
- formatArr.push(DatePickerComponent.YEAR_MONTH_DAY_FORMAT);
388
- }
389
-
390
- if (this.timeIsSet) {
391
- m.set({hour: +this.hours, minute: +this.minutes, second: +this.seconds});
392
-
393
- if (this.dateIsSet) {
394
- formatArr.push(' ');
395
- }
396
-
397
- if (this.ampm) {
398
- formatArr.push('hh:mm:ss A');
399
- } else {
400
- formatArr.push('HH:mm:ss'); // 24-hour clock time
401
- }
402
- }
403
-
404
- if (this.timezoneIsSet) {
405
- formatArr.push('Z');
406
- }
407
- return m.format(formatArr.join(''));
408
- }
409
-
410
- toStorageRepresentation(): string {
411
- let dateStr = '';
412
-
413
- if (this.dateIsSet) {
414
- dateStr += this.year + DatetimeRepresentation.DATE_SEPARATOR +
415
- this.month + DatetimeRepresentation.DATE_SEPARATOR +
416
- this.day;
417
- }
418
-
419
- if (this.timeIsSet) {
420
- if (this.dateIsSet) {
421
- dateStr += DatetimeRepresentation.DATE_TIME_SEPARATOR;
422
- }
423
- dateStr += this.hours + DatetimeRepresentation.TIME_SEPARATOR +
424
- this.minutes + DatetimeRepresentation.TIME_SEPARATOR +
425
- this.seconds;
426
-
427
- if (this.decimalSeconds.length > 0) {
428
- dateStr += DatetimeRepresentation.TIME_DECIMAL_SECOND_SEPARATOR +
429
- this.decimalSeconds;
430
- }
431
- }
432
-
433
- if (this.timezoneIsSet) {
434
- dateStr += this.timezoneOffset;
435
- }
436
- return dateStr;
437
- }
438
-
439
- toString(): string {
440
- return this.toStorageRepresentation();
441
- }
442
-
443
- private stringify(valIn: any): string {
444
- let str = valIn.toString();
445
- if (valIn < 10) {
446
- str = '0' + str;
447
- }
448
- return str;
449
- }
450
-
451
- }
@@ -1,16 +0,0 @@
1
- <form class="form-container" [formGroup]="options">
2
- <mat-form-field class="full-width">
3
- <!-- <mat-label>{{cds.getRenderingLabelForComponent(component)}}</mat-label>-->
4
- <input matInput type="text" placeholder="example@domain.com"
5
- [formControl]="inputValueControl"
6
- [errorStateMatcher]="errorStateMatcher"
7
- (input)="inputChanged($event)"
8
- attr.aria-label="{{cds.getRenderingLabelForComponent(component)}}">
9
- <button type="button" mat-button *ngIf="inputValueControl.value" matSuffix mat-icon-button attr.aria-label="{{'Generic.Clear' | translate}}" (click)="clearValue()">
10
- <mat-icon>close</mat-icon>
11
- </button>
12
- <mat-error align="start" *ngIf="inputValueControl.getError('email')" class="mat-error">{{'Validation.Email.Invalid' | translate}}</mat-error>
13
- <mat-error align="start" *ngIf="inputValueControl.getError('required')" class="mat-error">{{'Validation.Required' | translate}}</mat-error>
14
- </mat-form-field>
15
- </form>
16
-