cedar-embeddable-editor 0.9.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 (256) hide show
  1. package/.browserslistrc +18 -0
  2. package/.editorconfig +16 -0
  3. package/README.md +302 -0
  4. package/angular.json +153 -0
  5. package/cedar-embeddable-editor-0.9.0.tgz +0 -0
  6. package/e2e/protractor.conf.js +36 -0
  7. package/e2e/src/app.e2e-spec.ts +23 -0
  8. package/e2e/src/app.po.ts +11 -0
  9. package/e2e/tsconfig.json +14 -0
  10. package/karma.conf.js +32 -0
  11. package/license.txt +26 -0
  12. package/package.json +61 -0
  13. package/src/app/app.component.dev.ts +74 -0
  14. package/src/app/app.component.html +5 -0
  15. package/src/app/app.component.prod.ts +76 -0
  16. package/src/app/app.component.scss +1 -0
  17. package/src/app/app.module.dev.ts +58 -0
  18. package/src/app/app.module.prod.ts +56 -0
  19. package/src/app/modules/input-types/components/cedar-foo-bar/cedar-foo-bar.component.html +0 -0
  20. package/src/app/modules/input-types/components/cedar-foo-bar/cedar-foo-bar.component.scss +0 -0
  21. package/src/app/modules/input-types/components/cedar-foo-bar/cedar-foo-bar.component.spec.ts +24 -0
  22. package/src/app/modules/input-types/components/cedar-foo-bar/cedar-foo-bar.component.ts +39 -0
  23. package/src/app/modules/input-types/components/cedar-input-attribute-value/cedar-input-attribute-value.component.html +25 -0
  24. package/src/app/modules/input-types/components/cedar-input-attribute-value/cedar-input-attribute-value.component.scss +0 -0
  25. package/src/app/modules/input-types/components/cedar-input-attribute-value/cedar-input-attribute-value.component.spec.ts +25 -0
  26. package/src/app/modules/input-types/components/cedar-input-attribute-value/cedar-input-attribute-value.component.ts +91 -0
  27. package/src/app/modules/input-types/components/cedar-input-checkbox/cedar-input-checkbox.component.html +8 -0
  28. package/src/app/modules/input-types/components/cedar-input-checkbox/cedar-input-checkbox.component.scss +0 -0
  29. package/src/app/modules/input-types/components/cedar-input-checkbox/cedar-input-checkbox.component.spec.ts +25 -0
  30. package/src/app/modules/input-types/components/cedar-input-checkbox/cedar-input-checkbox.component.ts +104 -0
  31. package/src/app/modules/input-types/components/cedar-input-controlled/cedar-input-controlled.component.html +22 -0
  32. package/src/app/modules/input-types/components/cedar-input-controlled/cedar-input-controlled.component.scss +0 -0
  33. package/src/app/modules/input-types/components/cedar-input-controlled/cedar-input-controlled.component.spec.ts +24 -0
  34. package/src/app/modules/input-types/components/cedar-input-controlled/cedar-input-controlled.component.ts +135 -0
  35. package/src/app/modules/input-types/components/cedar-input-datetime/cedar-input-datetime.component.html +44 -0
  36. package/src/app/modules/input-types/components/cedar-input-datetime/cedar-input-datetime.component.scss +0 -0
  37. package/src/app/modules/input-types/components/cedar-input-datetime/cedar-input-datetime.component.spec.ts +25 -0
  38. package/src/app/modules/input-types/components/cedar-input-datetime/cedar-input-datetime.component.ts +451 -0
  39. package/src/app/modules/input-types/components/cedar-input-email/cedar-input-email.component.html +16 -0
  40. package/src/app/modules/input-types/components/cedar-input-email/cedar-input-email.component.scss +0 -0
  41. package/src/app/modules/input-types/components/cedar-input-email/cedar-input-email.component.spec.ts +25 -0
  42. package/src/app/modules/input-types/components/cedar-input-email/cedar-input-email.component.ts +91 -0
  43. package/src/app/modules/input-types/components/cedar-input-link/cedar-input-link.component.html +16 -0
  44. package/src/app/modules/input-types/components/cedar-input-link/cedar-input-link.component.scss +0 -0
  45. package/src/app/modules/input-types/components/cedar-input-link/cedar-input-link.component.spec.ts +25 -0
  46. package/src/app/modules/input-types/components/cedar-input-link/cedar-input-link.component.ts +92 -0
  47. package/src/app/modules/input-types/components/cedar-input-multiple-choice/cedar-input-multiple-choice.component.html +18 -0
  48. package/src/app/modules/input-types/components/cedar-input-multiple-choice/cedar-input-multiple-choice.component.scss +5 -0
  49. package/src/app/modules/input-types/components/cedar-input-multiple-choice/cedar-input-multiple-choice.component.spec.ts +25 -0
  50. package/src/app/modules/input-types/components/cedar-input-multiple-choice/cedar-input-multiple-choice.component.ts +78 -0
  51. package/src/app/modules/input-types/components/cedar-input-numeric/cedar-input-numeric.component.html +15 -0
  52. package/src/app/modules/input-types/components/cedar-input-numeric/cedar-input-numeric.component.scss +0 -0
  53. package/src/app/modules/input-types/components/cedar-input-numeric/cedar-input-numeric.component.spec.ts +25 -0
  54. package/src/app/modules/input-types/components/cedar-input-numeric/cedar-input-numeric.component.ts +169 -0
  55. package/src/app/modules/input-types/components/cedar-input-phone/cedar-input-phone.component.html +15 -0
  56. package/src/app/modules/input-types/components/cedar-input-phone/cedar-input-phone.component.scss +0 -0
  57. package/src/app/modules/input-types/components/cedar-input-phone/cedar-input-phone.component.spec.ts +25 -0
  58. package/src/app/modules/input-types/components/cedar-input-phone/cedar-input-phone.component.ts +94 -0
  59. package/src/app/modules/input-types/components/cedar-input-select/cedar-input-select.component.html +19 -0
  60. package/src/app/modules/input-types/components/cedar-input-select/cedar-input-select.component.scss +0 -0
  61. package/src/app/modules/input-types/components/cedar-input-select/cedar-input-select.component.spec.ts +25 -0
  62. package/src/app/modules/input-types/components/cedar-input-select/cedar-input-select.component.ts +108 -0
  63. package/src/app/modules/input-types/components/cedar-input-text/cedar-input-text.component.html +25 -0
  64. package/src/app/modules/input-types/components/cedar-input-text/cedar-input-text.component.scss +0 -0
  65. package/src/app/modules/input-types/components/cedar-input-text/cedar-input-text.component.spec.ts +25 -0
  66. package/src/app/modules/input-types/components/cedar-input-text/cedar-input-text.component.ts +125 -0
  67. package/src/app/modules/input-types/components/cedar-static-image/cedar-static-image.component.html +8 -0
  68. package/src/app/modules/input-types/components/cedar-static-image/cedar-static-image.component.scss +0 -0
  69. package/src/app/modules/input-types/components/cedar-static-image/cedar-static-image.component.spec.ts +24 -0
  70. package/src/app/modules/input-types/components/cedar-static-image/cedar-static-image.component.ts +40 -0
  71. package/src/app/modules/input-types/components/cedar-static-page-break/cedar-static-page-break.component.html +20 -0
  72. package/src/app/modules/input-types/components/cedar-static-page-break/cedar-static-page-break.component.scss +24 -0
  73. package/src/app/modules/input-types/components/cedar-static-page-break/cedar-static-page-break.component.spec.ts +25 -0
  74. package/src/app/modules/input-types/components/cedar-static-page-break/cedar-static-page-break.component.ts +36 -0
  75. package/src/app/modules/input-types/components/cedar-static-rich-text/cedar-static-rich-text.component.html +2 -0
  76. package/src/app/modules/input-types/components/cedar-static-rich-text/cedar-static-rich-text.component.scss +0 -0
  77. package/src/app/modules/input-types/components/cedar-static-rich-text/cedar-static-rich-text.component.spec.ts +25 -0
  78. package/src/app/modules/input-types/components/cedar-static-rich-text/cedar-static-rich-text.component.ts +35 -0
  79. package/src/app/modules/input-types/components/cedar-static-section-break/cedar-static-section-break.component.html +8 -0
  80. package/src/app/modules/input-types/components/cedar-static-section-break/cedar-static-section-break.component.scss +0 -0
  81. package/src/app/modules/input-types/components/cedar-static-section-break/cedar-static-section-break.component.spec.ts +24 -0
  82. package/src/app/modules/input-types/components/cedar-static-section-break/cedar-static-section-break.component.ts +39 -0
  83. package/src/app/modules/input-types/components/cedar-static-youtube/cedar-static-youtube.component.html +6 -0
  84. package/src/app/modules/input-types/components/cedar-static-youtube/cedar-static-youtube.component.scss +0 -0
  85. package/src/app/modules/input-types/components/cedar-static-youtube/cedar-static-youtube.component.spec.ts +24 -0
  86. package/src/app/modules/input-types/components/cedar-static-youtube/cedar-static-youtube.component.ts +42 -0
  87. package/src/app/modules/input-types/input-types.module.ts +139 -0
  88. package/src/app/modules/shared/components/cedar-component-header/cedar-component-header.component.html +13 -0
  89. package/src/app/modules/shared/components/cedar-component-header/cedar-component-header.component.scss +12 -0
  90. package/src/app/modules/shared/components/cedar-component-header/cedar-component-header.component.spec.ts +25 -0
  91. package/src/app/modules/shared/components/cedar-component-header/cedar-component-header.component.ts +42 -0
  92. package/src/app/modules/shared/components/cedar-component-renderer/cedar-component-renderer.component.html +117 -0
  93. package/src/app/modules/shared/components/cedar-component-renderer/cedar-component-renderer.component.scss +5 -0
  94. package/src/app/modules/shared/components/cedar-component-renderer/cedar-component-renderer.component.spec.ts +25 -0
  95. package/src/app/modules/shared/components/cedar-component-renderer/cedar-component-renderer.component.ts +101 -0
  96. package/src/app/modules/shared/components/cedar-data-saver/cedar-data-saver.component.html +22 -0
  97. package/src/app/modules/shared/components/cedar-data-saver/cedar-data-saver.component.scss +23 -0
  98. package/src/app/modules/shared/components/cedar-data-saver/cedar-data-saver.component.spec.ts +24 -0
  99. package/src/app/modules/shared/components/cedar-data-saver/cedar-data-saver.component.ts +139 -0
  100. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor/cedar-embeddable-metadata-editor.component.html +56 -0
  101. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor/cedar-embeddable-metadata-editor.component.scss +13 -0
  102. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor/cedar-embeddable-metadata-editor.component.spec.ts +25 -0
  103. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor/cedar-embeddable-metadata-editor.component.ts +184 -0
  104. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor-wrapper/cedar-embeddable-metadata-editor-wrapper.component.html +15 -0
  105. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor-wrapper/cedar-embeddable-metadata-editor-wrapper.component.scss +2 -0
  106. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor-wrapper/cedar-embeddable-metadata-editor-wrapper.component.spec.ts +25 -0
  107. package/src/app/modules/shared/components/cedar-embeddable-metadata-editor-wrapper/cedar-embeddable-metadata-editor-wrapper.component.ts +240 -0
  108. package/src/app/modules/shared/components/cedar-multi-pager/cedar-multi-pager.component.html +35 -0
  109. package/src/app/modules/shared/components/cedar-multi-pager/cedar-multi-pager.component.scss +41 -0
  110. package/src/app/modules/shared/components/cedar-multi-pager/cedar-multi-pager.component.spec.ts +25 -0
  111. package/src/app/modules/shared/components/cedar-multi-pager/cedar-multi-pager.component.ts +282 -0
  112. package/src/app/modules/shared/components/date-picker/date-picker.component.html +46 -0
  113. package/src/app/modules/shared/components/date-picker/date-picker.component.scss +7 -0
  114. package/src/app/modules/shared/components/date-picker/date-picker.component.spec.ts +25 -0
  115. package/src/app/modules/shared/components/date-picker/date-picker.component.ts +100 -0
  116. package/src/app/modules/shared/components/file-uploader/bytes/bytes.pipe.spec.ts +33 -0
  117. package/src/app/modules/shared/components/file-uploader/bytes/bytes.pipe.ts +16 -0
  118. package/src/app/modules/shared/components/file-uploader/file-upload-input-for/file-upload-input-for.directive.spec.ts +54 -0
  119. package/src/app/modules/shared/components/file-uploader/file-upload-input-for/file-upload-input-for.directive.ts +67 -0
  120. package/src/app/modules/shared/components/file-uploader/file-uploader.component.html +26 -0
  121. package/src/app/modules/shared/components/file-uploader/file-uploader.component.scss +55 -0
  122. package/src/app/modules/shared/components/file-uploader/file-uploader.component.spec.ts +25 -0
  123. package/src/app/modules/shared/components/file-uploader/file-uploader.component.ts +67 -0
  124. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.component.html +42 -0
  125. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.component.scss +31 -0
  126. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.component.spec.ts +177 -0
  127. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.component.ts +145 -0
  128. package/src/app/modules/shared/components/file-uploader/mat-file-upload/mat-file-upload.service.ts +21 -0
  129. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.component.html +1 -0
  130. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.component.scss +0 -0
  131. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.component.spec.ts +59 -0
  132. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.component.ts +139 -0
  133. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.service.spec.ts +33 -0
  134. package/src/app/modules/shared/components/file-uploader/mat-file-upload-queue/mat-file-upload-queue.service.ts +17 -0
  135. package/src/app/modules/shared/components/file-uploader/mat-file-upload.module.ts +35 -0
  136. package/src/app/modules/shared/components/file-uploader/mat-file-upload.type.ts +24 -0
  137. package/src/app/modules/shared/components/preferences-menu/preferences-menu.component.html +18 -0
  138. package/src/app/modules/shared/components/preferences-menu/preferences-menu.component.scss +0 -0
  139. package/src/app/modules/shared/components/preferences-menu/preferences-menu.component.spec.ts +23 -0
  140. package/src/app/modules/shared/components/preferences-menu/preferences-menu.component.ts +10 -0
  141. package/src/app/modules/shared/components/sample-templates/sample-template-select/sample-template-select.component.html +16 -0
  142. package/src/app/modules/shared/components/sample-templates/sample-template-select/sample-template-select.component.scss +0 -0
  143. package/src/app/modules/shared/components/sample-templates/sample-template-select/sample-template-select.component.spec.ts +25 -0
  144. package/src/app/modules/shared/components/sample-templates/sample-template-select/sample-template-select.component.ts +89 -0
  145. package/src/app/modules/shared/components/sample-templates/sample-templates.component.html +19 -0
  146. package/src/app/modules/shared/components/sample-templates/sample-templates.component.scss +0 -0
  147. package/src/app/modules/shared/components/sample-templates/sample-templates.component.spec.ts +25 -0
  148. package/src/app/modules/shared/components/sample-templates/sample-templates.component.ts +66 -0
  149. package/src/app/modules/shared/components/sample-templates/sample-templates.service.ts +175 -0
  150. package/src/app/modules/shared/components/source-panels/source-panels.component.html +98 -0
  151. package/src/app/modules/shared/components/source-panels/source-panels.component.scss +0 -0
  152. package/src/app/modules/shared/components/source-panels/source-panels.component.spec.ts +25 -0
  153. package/src/app/modules/shared/components/source-panels/source-panels.component.ts +36 -0
  154. package/src/app/modules/shared/components/static-footer/static-footer.component.html +17 -0
  155. package/src/app/modules/shared/components/static-footer/static-footer.component.scss +110 -0
  156. package/src/app/modules/shared/components/static-footer/static-footer.component.spec.ts +25 -0
  157. package/src/app/modules/shared/components/static-footer/static-footer.component.ts +16 -0
  158. package/src/app/modules/shared/components/static-header/static-header.component.html +10 -0
  159. package/src/app/modules/shared/components/static-header/static-header.component.scss +13 -0
  160. package/src/app/modules/shared/components/static-header/static-header.component.spec.ts +25 -0
  161. package/src/app/modules/shared/components/static-header/static-header.component.ts +21 -0
  162. package/src/app/modules/shared/components/timezone-picker/timezone-picker.component.html +16 -0
  163. package/src/app/modules/shared/components/timezone-picker/timezone-picker.component.scss +0 -0
  164. package/src/app/modules/shared/components/timezone-picker/timezone-picker.component.spec.ts +25 -0
  165. package/src/app/modules/shared/components/timezone-picker/timezone-picker.component.ts +251 -0
  166. package/src/app/modules/shared/factory/template-representation.factory.ts +323 -0
  167. package/src/app/modules/shared/handler/component-type.handler.ts +51 -0
  168. package/src/app/modules/shared/handler/data-object-builder.handler.ts +159 -0
  169. package/src/app/modules/shared/handler/data-object-data-value.handler.ts +270 -0
  170. package/src/app/modules/shared/handler/data-object-structure.handler.ts +145 -0
  171. package/src/app/modules/shared/handler/multi-instance-object.handler.ts +317 -0
  172. package/src/app/modules/shared/models/cedar-input-template.model.ts +3 -0
  173. package/src/app/modules/shared/models/cedar-model.model.ts +48 -0
  174. package/src/app/modules/shared/models/component/cedar-component.model.ts +16 -0
  175. package/src/app/modules/shared/models/component/component-representation.model.ts +30 -0
  176. package/src/app/modules/shared/models/component/element-component.model.ts +11 -0
  177. package/src/app/modules/shared/models/component/field-component.model.ts +23 -0
  178. package/src/app/modules/shared/models/component/multi-component.model.ts +10 -0
  179. package/src/app/modules/shared/models/component/null-component.model.ts +20 -0
  180. package/src/app/modules/shared/models/component/single-component.model.ts +6 -0
  181. package/src/app/modules/shared/models/element/abstract-element-component.model.ts +26 -0
  182. package/src/app/modules/shared/models/element/multi-element-component.model.ts +19 -0
  183. package/src/app/modules/shared/models/element/single-element-component.model.ts +16 -0
  184. package/src/app/modules/shared/models/enum/data-object-building-mode.model.ts +6 -0
  185. package/src/app/modules/shared/models/field/abstract-field-component.model.ts +28 -0
  186. package/src/app/modules/shared/models/field/multi-field-component.model.ts +21 -0
  187. package/src/app/modules/shared/models/field/single-field-component.model.ts +18 -0
  188. package/src/app/modules/shared/models/info/basic-info.model.ts +8 -0
  189. package/src/app/modules/shared/models/info/choice-info.model.ts +9 -0
  190. package/src/app/modules/shared/models/info/choice-option.model.ts +6 -0
  191. package/src/app/modules/shared/models/info/content-info.model.ts +5 -0
  192. package/src/app/modules/shared/models/info/controlled-info.model.ts +8 -0
  193. package/src/app/modules/shared/models/info/current-multi-info.model.ts +7 -0
  194. package/src/app/modules/shared/models/info/label-info.model.ts +7 -0
  195. package/src/app/modules/shared/models/info/multi-info.model.ts +10 -0
  196. package/src/app/modules/shared/models/info/multi-instance-info.model.ts +20 -0
  197. package/src/app/modules/shared/models/info/multi-instance-object-info.model.ts +30 -0
  198. package/src/app/modules/shared/models/info/number-info.model.ts +9 -0
  199. package/src/app/modules/shared/models/info/value-info.model.ts +9 -0
  200. package/src/app/modules/shared/models/input-type.model.ts +21 -0
  201. package/src/app/modules/shared/models/instance-extract-data.model.ts +3 -0
  202. package/src/app/modules/shared/models/instance-full-data.model.ts +5 -0
  203. package/src/app/modules/shared/models/javascript-types.model.ts +7 -0
  204. package/src/app/modules/shared/models/json-schema.model.ts +39 -0
  205. package/src/app/modules/shared/models/numbers.model.ts +10 -0
  206. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-request-parameter-object.ts +8 -0
  207. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-request-value-constraints.ts +8 -0
  208. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-request.ts +9 -0
  209. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-response-item.ts +10 -0
  210. package/src/app/modules/shared/models/rest/integrated-search/integrated-search-response.ts +13 -0
  211. package/src/app/modules/shared/models/static/static-field-component.model.ts +24 -0
  212. package/src/app/modules/shared/models/template/cedar-template.model.ts +24 -0
  213. package/src/app/modules/shared/models/template/empty-template.model.ts +5 -0
  214. package/src/app/modules/shared/models/template/null-template.model.ts +23 -0
  215. package/src/app/modules/shared/models/template/template-component.model.ts +12 -0
  216. package/src/app/modules/shared/models/temporal.model.ts +13 -0
  217. package/src/app/modules/shared/models/ui/cedar-ui-component.model.ts +17 -0
  218. package/src/app/modules/shared/models/xsd.model.ts +11 -0
  219. package/src/app/modules/shared/pipe/keep-html.pipe.ts +13 -0
  220. package/src/app/modules/shared/pipe/rdf.pipe.ts +10 -0
  221. package/src/app/modules/shared/service/active-component-registry.service.ts +134 -0
  222. package/src/app/modules/shared/service/component-data.service.ts +25 -0
  223. package/src/app/modules/shared/service/controlled-field-data.service.ts +37 -0
  224. package/src/app/modules/shared/service/date-time/custom-date-adapter.ts +19 -0
  225. package/src/app/modules/shared/service/date-time/date-time.service.ts +30 -0
  226. package/src/app/modules/shared/service/local-settings.service.ts +22 -0
  227. package/src/app/modules/shared/service/message-handler.service.ts +35 -0
  228. package/src/app/modules/shared/service/page-break-paginator.service.ts +78 -0
  229. package/src/app/modules/shared/shared.module.ts +97 -0
  230. package/src/app/modules/shared/util/data-context.ts +42 -0
  231. package/src/app/modules/shared/util/data-object-util.ts +102 -0
  232. package/src/app/modules/shared/util/handler-context.ts +81 -0
  233. package/src/app/modules/shared/util/template-object-util.ts +21 -0
  234. package/src/assets/.gitkeep +0 -0
  235. package/src/assets/fonts/MaterialIcons-Regular.eot +0 -0
  236. package/src/assets/fonts/MaterialIcons-Regular.ttf +0 -0
  237. package/src/assets/fonts/MaterialIcons-Regular.woff +0 -0
  238. package/src/assets/fonts/MaterialIcons-Regular.woff2 +0 -0
  239. package/src/assets/i18n-cee/en.json +86 -0
  240. package/src/assets/i18n-cee/hu.json +86 -0
  241. package/src/assets/images/bmir-logo.png +0 -0
  242. package/src/assets/images/cedar-logo-80x80.png +0 -0
  243. package/src/environments/environment.prod.ts +5 -0
  244. package/src/environments/environment.ts +18 -0
  245. package/src/favicon.ico +0 -0
  246. package/src/index.html +16 -0
  247. package/src/main.ts +28 -0
  248. package/src/polyfills.ts +65 -0
  249. package/src/styles-own.scss +352 -0
  250. package/src/styles.scss +116 -0
  251. package/src/test.ts +25 -0
  252. package/tsconfig.app.json +16 -0
  253. package/tsconfig.base.json +20 -0
  254. package/tsconfig.json +20 -0
  255. package/tsconfig.spec.json +18 -0
  256. package/tslint.json +152 -0
@@ -0,0 +1,8 @@
1
+ export class ControlledInfo {
2
+
3
+ ontologies: Array<object>;
4
+ valueSets: Array<object>;
5
+ classes: Array<object>;
6
+ branches: Array<object>;
7
+
8
+ }
@@ -0,0 +1,7 @@
1
+ // make this disappear
2
+ export class CurrentMultiInfo {
3
+
4
+ count: number;
5
+ currentIndex: number;
6
+
7
+ }
@@ -0,0 +1,7 @@
1
+ export class LabelInfo {
2
+
3
+ preferredLabel: string;
4
+ description: string;
5
+ label: string;
6
+
7
+ }
@@ -0,0 +1,10 @@
1
+ export class MultiInfo {
2
+
3
+ minItems: number;
4
+ maxItems: number;
5
+
6
+ getSafeMinItems(): number {
7
+ return this.minItems === null ? 0 : this.minItems;
8
+ }
9
+
10
+ }
@@ -0,0 +1,20 @@
1
+ import {MultiInstanceObjectInfo} from './multi-instance-object-info.model';
2
+
3
+ export class MultiInstanceInfo extends Object {
4
+
5
+ constructor() {
6
+ super();
7
+ }
8
+
9
+ addChild(multiInfo: MultiInstanceObjectInfo): void {
10
+ this[multiInfo.componentName] = multiInfo;
11
+ }
12
+
13
+ getChildByName(componentName: string): MultiInstanceObjectInfo {
14
+ if (this.hasOwnProperty(componentName)) {
15
+ return this[componentName];
16
+ } else {
17
+ return null;
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,30 @@
1
+ import {MultiInstanceInfo} from './multi-instance-info.model';
2
+
3
+ export class MultiInstanceObjectInfo {
4
+
5
+ componentName: string;
6
+ currentCount: number;
7
+ currentIndex: number;
8
+ children: Array<MultiInstanceInfo>;
9
+
10
+ constructor() {
11
+ this.componentName = null;
12
+ this.currentCount = 0;
13
+ this.currentIndex = -1;
14
+ this.children = new Array<MultiInstanceInfo>();
15
+ }
16
+
17
+ public addChild(child: MultiInstanceInfo): void {
18
+ this.children.push(child);
19
+ }
20
+
21
+ //
22
+ // getChildByName(childName: string): MultiInstanceInfo {
23
+ // for (const child of this.children) {
24
+ // if (child.componentName === childName) {
25
+ // return child;
26
+ // }
27
+ // }
28
+ // return null;
29
+ // }
30
+ }
@@ -0,0 +1,9 @@
1
+ export class NumberInfo {
2
+
3
+ numberType: string;
4
+ unitOfMeasure: string;
5
+ minValue: number;
6
+ maxValue: number;
7
+ decimalPlace: number;
8
+
9
+ }
@@ -0,0 +1,9 @@
1
+ export class ValueInfo {
2
+
3
+ requiredValue: boolean;
4
+ defaultValue: string;
5
+ minLength: number;
6
+ maxLength: number;
7
+ temporalType: string;
8
+
9
+ }
@@ -0,0 +1,21 @@
1
+ export class InputType {
2
+
3
+ static numeric = 'numeric';
4
+ static text = 'textfield';
5
+ static textarea = 'textarea';
6
+ static richText = 'richtext';
7
+ static controlled = 'controlled';
8
+ static email = 'email';
9
+ static link = 'link';
10
+ static phoneNumber = 'phone-number';
11
+ static list = 'list';
12
+ static checkbox = 'checkbox';
13
+ static radio = 'radio';
14
+ static temporal = 'temporal';
15
+ static image = 'image';
16
+ static youtube = 'youtube';
17
+ static sectionBreak = 'section-break';
18
+ static pageBreak = 'page-break';
19
+ static attributeValue = 'attribute-value';
20
+
21
+ }
@@ -0,0 +1,3 @@
1
+ export class InstanceExtractData extends Object {
2
+
3
+ }
@@ -0,0 +1,5 @@
1
+ import {InstanceExtractData} from './instance-extract-data.model';
2
+
3
+ export class InstanceFullData extends InstanceExtractData {
4
+
5
+ }
@@ -0,0 +1,7 @@
1
+ export class JavascriptTypes {
2
+
3
+ static array = 'array';
4
+ static object = 'object';
5
+ static string = 'string';
6
+
7
+ }
@@ -0,0 +1,39 @@
1
+ export class JsonSchema {
2
+
3
+ // special properties used to add attribute-value fields to the model
4
+ static reservedAttributeName = '__reserved__attribute_name';
5
+ static reservedAttributeValue = '__reserved__attribute_value';
6
+ static reservedDefaultAttributeName = 'Attribute Value Field';
7
+
8
+ static properties = 'properties';
9
+
10
+ static atContext = '@context';
11
+ static atId = '@id';
12
+ static atType = '@type';
13
+ static atValue = '@value';
14
+ static schemaIsBasedOn = 'schema:isBasedOn';
15
+ static schemaName = 'schema:name';
16
+ static schemaDescription = 'schema:description';
17
+ static pavDerivedFrom = 'pav:derivedFrom';
18
+ static pavCreatedOn = 'pav:createdOn';
19
+ static pavCreatedBy = 'pav:createdBy';
20
+ static pavLastUpdatedOn = 'pav:lastUpdatedOn';
21
+ static oslcModifiedBy = 'oslc:modifiedBy';
22
+ static rdfsLabel = 'rdfs:label';
23
+ static termUri = 'termUri';
24
+
25
+ static builtInProperties: Map<string, boolean> = new Map([
26
+ [JsonSchema.atId, true],
27
+ [JsonSchema.atContext, true],
28
+ [JsonSchema.atType, true],
29
+ [JsonSchema.schemaIsBasedOn, true],
30
+ [JsonSchema.schemaName, true],
31
+ [JsonSchema.schemaDescription, true],
32
+ [JsonSchema.pavDerivedFrom, true],
33
+ [JsonSchema.pavCreatedOn, true],
34
+ [JsonSchema.pavCreatedBy, true],
35
+ [JsonSchema.pavLastUpdatedOn, true],
36
+ [JsonSchema.oslcModifiedBy, true]
37
+ ]);
38
+
39
+ }
@@ -0,0 +1,10 @@
1
+ export class Numbers {
2
+
3
+ static PATTERN_XSD_INT_AND_LONG = '[+-]?(0|[1-9][0-9]*)';
4
+ static PATTERN_XSD_FLOAT_AND_DOUBLE = '([+-]?((0|[1-9][0-9]*)(\\.[0-9]{0,maxDig})?|\\.[0-9]{0,maxDig}))';
5
+ static NUMBER_INT_MAX = 2147483647;
6
+ static NUMBER_INT_MIN = -2147483648;
7
+ static NUMBER_LONG_MAX = 9223372036854775807;
8
+ static NUMBER_LONG_MIN = -9223372036854775808;
9
+
10
+ }
@@ -0,0 +1,8 @@
1
+ import {IntegratedSearchRequestValueConstraints} from './integrated-search-request-value-constraints';
2
+
3
+ export class IntegratedSearchRequestParameterObject {
4
+
5
+ valueConstraints: IntegratedSearchRequestValueConstraints = new IntegratedSearchRequestValueConstraints();
6
+ inputText = '';
7
+
8
+ }
@@ -0,0 +1,8 @@
1
+ export class IntegratedSearchRequestValueConstraints {
2
+
3
+ ontologies: Array<object> = [];
4
+ valueSets: Array<object> = [];
5
+ classes: Array<object> = [];
6
+ branches: Array<object> = [];
7
+
8
+ }
@@ -0,0 +1,9 @@
1
+ import {IntegratedSearchRequestParameterObject} from './integrated-search-request-parameter-object';
2
+
3
+ export class IntegratedSearchRequest {
4
+
5
+ parameterObject: IntegratedSearchRequestParameterObject = new IntegratedSearchRequestParameterObject();
6
+ page = 1;
7
+ pageSize = 50;
8
+
9
+ }
@@ -0,0 +1,10 @@
1
+ export class IntegratedSearchResponseItem {
2
+
3
+ id: string;
4
+ type: string;
5
+ prefLabel: string;
6
+ notation: object;
7
+ definition: string;
8
+ source: string;
9
+
10
+ }
@@ -0,0 +1,13 @@
1
+ import {IntegratedSearchResponseItem} from './integrated-search-response-item';
2
+
3
+ export class IntegratedSearchResponse {
4
+
5
+ page: number;
6
+ pageCount: number;
7
+ pageSize: number;
8
+ totalCount: number;
9
+ prevPage: object;
10
+ nextPage: object;
11
+ collection: Array<IntegratedSearchResponseItem>;
12
+
13
+ }
@@ -0,0 +1,24 @@
1
+ import {SingleComponent} from '../component/single-component.model';
2
+ import {LabelInfo} from '../info/label-info.model';
3
+ import {BasicInfo} from '../info/basic-info.model';
4
+ import {ContentInfo} from '../info/content-info.model';
5
+
6
+ export class StaticFieldComponent implements SingleComponent {
7
+
8
+ className = 'StaticFieldComponent';
9
+
10
+ name: string;
11
+ path: string[];
12
+ labelInfo: LabelInfo = new LabelInfo();
13
+ basicInfo: BasicInfo = new BasicInfo();
14
+ contentInfo: ContentInfo = new ContentInfo();
15
+ linkedStaticFieldComponent: StaticFieldComponent = null;
16
+
17
+ isMulti(): boolean {
18
+ return false;
19
+ }
20
+
21
+ isMultiPage(): boolean {
22
+ return false;
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ import {TemplateComponent} from './template-component.model';
2
+ import {AbstractElementComponent} from '../element/abstract-element-component.model';
3
+ import {CedarComponent} from '../component/cedar-component.model';
4
+ import {DataObjectUtil} from '../../util/data-object-util';
5
+
6
+ export class CedarTemplate extends AbstractElementComponent implements TemplateComponent {
7
+
8
+ className = 'CedarTemplate';
9
+ pageBreakChildren: Array<CedarComponent[]>;
10
+
11
+
12
+ hasPageBreaks(): boolean {
13
+ return (this.pageBreakChildren.length > 1 && !DataObjectUtil.arraysEqual(this.children, this.pageBreakChildren[0]));
14
+ }
15
+
16
+ isMulti(): boolean {
17
+ return false;
18
+ }
19
+
20
+ isMultiPage(): boolean {
21
+ return false;
22
+ }
23
+
24
+ }
@@ -0,0 +1,5 @@
1
+ import {TemplateComponent} from './template-component.model';
2
+ import {NullTemplate} from './null-template.model';
3
+
4
+ export class EmptyTemplate extends NullTemplate implements TemplateComponent {
5
+ }
@@ -0,0 +1,23 @@
1
+ import {TemplateComponent} from './template-component.model';
2
+ import {AbstractElementComponent} from '../element/abstract-element-component.model';
3
+ import {CedarComponent} from '../component/cedar-component.model';
4
+
5
+ export class NullTemplate extends AbstractElementComponent implements TemplateComponent {
6
+
7
+ className = 'NullTemplate';
8
+ pageBreakChildren: Array<CedarComponent[]>;
9
+
10
+
11
+ hasPageBreaks(): boolean {
12
+ return false;
13
+ }
14
+
15
+ isMulti(): boolean {
16
+ return false;
17
+ }
18
+
19
+ isMultiPage(): boolean {
20
+ return false;
21
+ }
22
+
23
+ }
@@ -0,0 +1,12 @@
1
+ import {ElementComponent} from '../component/element-component.model';
2
+ import {CedarComponent} from '../component/cedar-component.model';
3
+ import {DataObjectUtil} from '../../util/data-object-util';
4
+
5
+ // tslint:disable-next-line:no-empty-interface
6
+ export interface TemplateComponent extends ElementComponent {
7
+
8
+ pageBreakChildren: Array<CedarComponent[]>;
9
+
10
+ hasPageBreaks(): boolean;
11
+
12
+ }
@@ -0,0 +1,13 @@
1
+ export class Temporal {
2
+
3
+ static year = 'year';
4
+ static month = 'month';
5
+ static day = 'day';
6
+ static hour = 'hour';
7
+ static minute = 'minute';
8
+ static second = 'second';
9
+ static decimalSecond = 'decimalSecond';
10
+
11
+ static inputType12h = '12h';
12
+ static inputType24h = '24h';
13
+ }
@@ -0,0 +1,17 @@
1
+ import {Component, OnInit} from '@angular/core';
2
+
3
+ @Component({
4
+ template: ''
5
+ })
6
+ export abstract class CedarUIComponent implements OnInit {
7
+
8
+ abstract ngOnInit(): void;
9
+ abstract setCurrentValue(currentValue: any): void;
10
+
11
+ deleteCurrentValue(): void {
12
+ // do nothing unless overridden
13
+ // used for executing component-specific operations
14
+ // for deleting an instance
15
+ }
16
+
17
+ }
@@ -0,0 +1,11 @@
1
+ export class Xsd {
2
+
3
+ static int = 'xsd:int';
4
+ static long = 'xsd:long';
5
+ static float = 'xsd:float';
6
+ static double = 'xsd:double';
7
+ static date = 'xsd:date';
8
+ static dateTime = 'xsd:dateTime';
9
+ static time = 'xsd:time';
10
+
11
+ }
@@ -0,0 +1,13 @@
1
+ import {Pipe, PipeTransform} from '@angular/core';
2
+ import {DomSanitizer, SafeHtml} from '@angular/platform-browser';
3
+
4
+ @Pipe({name: 'keepHtml', pure: false})
5
+
6
+ export class EscapeHtmlPipe implements PipeTransform {
7
+ constructor(private sanitizer: DomSanitizer) {
8
+ }
9
+
10
+ transform(content: string): SafeHtml {
11
+ return this.sanitizer.bypassSecurityTrustHtml(content);
12
+ }
13
+ }
@@ -0,0 +1,10 @@
1
+ import {Pipe, PipeTransform} from '@angular/core';
2
+
3
+ @Pipe({name: 'rdf'})
4
+ export class RdfPipe implements PipeTransform {
5
+
6
+ transform(value: object): string {
7
+ return value.toString();
8
+ }
9
+
10
+ }
@@ -0,0 +1,134 @@
1
+ import {CedarUIComponent} from '../models/ui/cedar-ui-component.model';
2
+ import {CedarComponent} from '../models/component/cedar-component.model';
3
+ import {SingleFieldComponent} from '../models/field/single-field-component.model';
4
+ import {JsonSchema} from '../models/json-schema.model';
5
+ import {MultiFieldComponent} from '../models/field/multi-field-component.model';
6
+ import {SingleElementComponent} from '../models/element/single-element-component.model';
7
+ import {MultiElementComponent} from '../models/element/multi-element-component.model';
8
+ import {Injectable} from '@angular/core';
9
+ import {CedarMultiPagerComponent} from '../components/cedar-multi-pager/cedar-multi-pager.component';
10
+ import {MultiInstanceObjectInfo} from '../models/info/multi-instance-object-info.model';
11
+ import {HandlerContext} from '../util/handler-context';
12
+ import {InputType} from '../models/input-type.model';
13
+
14
+ @Injectable({
15
+ providedIn: 'root'
16
+ })
17
+ export class ActiveComponentRegistryService {
18
+
19
+ public modelToUI: Map<CedarComponent, CedarUIComponent> = new Map<CedarComponent, CedarUIComponent>();
20
+ private modelToMultiPagerUI: Map<CedarComponent, CedarMultiPagerComponent> = new Map<CedarComponent, CedarMultiPagerComponent>();
21
+
22
+ private getUIComponent(component: CedarComponent): CedarUIComponent {
23
+ return this.modelToUI.get(component);
24
+ }
25
+
26
+ private getMultiPagerUI(component: CedarComponent): CedarMultiPagerComponent {
27
+ return this.modelToMultiPagerUI.get(component);
28
+ }
29
+
30
+ updateViewToModel(component: CedarComponent, handlerContext: HandlerContext): void {
31
+ if (component instanceof SingleFieldComponent) {
32
+ const dataObject: object = handlerContext.getDataObjectNodeByPath(component.path);
33
+ const uiComponent: CedarUIComponent = this.getUIComponent(component);
34
+ if (uiComponent != null && dataObject != null) {
35
+ if (dataObject.hasOwnProperty(JsonSchema.atValue)) {
36
+ uiComponent.setCurrentValue(dataObject[JsonSchema.atValue]);
37
+ } else if (dataObject.hasOwnProperty(JsonSchema.atId) && (component.basicInfo.inputType === InputType.link)) {
38
+ // url field single
39
+ uiComponent.setCurrentValue(dataObject[JsonSchema.atId]);
40
+ } else if (dataObject.hasOwnProperty(JsonSchema.atId)) {
41
+ // controlled field single
42
+ uiComponent.setCurrentValue(dataObject[JsonSchema.rdfsLabel]);
43
+ }
44
+ }
45
+ } else if (component instanceof MultiFieldComponent) {
46
+ const dataObject: object = handlerContext.getDataObjectNodeByPath(component.path);
47
+ const parentDataObject = handlerContext.getParentDataObjectNodeByPath(component.path);
48
+ const uiComponent: CedarUIComponent = this.getUIComponent(component);
49
+ const multiInstanceInfo: MultiInstanceObjectInfo =
50
+ handlerContext.multiInstanceObjectService.getMultiInstanceInfoForComponent(component);
51
+
52
+ // this is a multi-value but not multi-page component, such as checkbox or multiselect
53
+ if (!component.isMultiPage()) {
54
+ const dataArr = dataObject as Array<object>;
55
+
56
+ if (uiComponent) {
57
+ uiComponent.setCurrentValue(dataArr.map(a => a[JsonSchema.atValue]));
58
+ }
59
+ } else if (dataObject[multiInstanceInfo.currentIndex] != null) {
60
+ if (component.basicInfo.inputType === InputType.attributeValue) {
61
+ let key = dataObject[multiInstanceInfo.currentIndex];
62
+
63
+ if (key instanceof Object && key.hasOwnProperty(JsonSchema.atValue) && key[JsonSchema.atValue] === null) {
64
+ handlerContext.changeAttributeValue(component, null, null);
65
+ } else if (multiInstanceInfo.currentIndex > 0) {
66
+ const cloneSourceKey = dataObject[multiInstanceInfo.currentIndex - 1];
67
+
68
+ if (key === cloneSourceKey) {
69
+ const val = parentDataObject[cloneSourceKey][JsonSchema.atValue];
70
+ handlerContext.changeAttributeValue(component, null, val);
71
+ }
72
+ }
73
+ key = dataObject[multiInstanceInfo.currentIndex];
74
+ const value = parentDataObject[key][JsonSchema.atValue];
75
+ const obj = {};
76
+ obj[key] = value;
77
+
78
+ if (uiComponent) {
79
+ uiComponent.setCurrentValue(obj);
80
+ }
81
+ } else {
82
+ if (dataObject[multiInstanceInfo.currentIndex].hasOwnProperty(JsonSchema.atValue)) {
83
+ if (uiComponent) {
84
+ uiComponent.setCurrentValue(dataObject[multiInstanceInfo.currentIndex][JsonSchema.atValue]);
85
+ }
86
+ } else if (dataObject[multiInstanceInfo.currentIndex].hasOwnProperty(JsonSchema.atId)) {
87
+ // controlled field multipage
88
+ if (uiComponent) {
89
+ uiComponent.setCurrentValue(dataObject[multiInstanceInfo.currentIndex][JsonSchema.rdfsLabel]);
90
+ }
91
+ }
92
+ }
93
+
94
+ if (component.isMultiPage()) {
95
+ const uiPager = this.getMultiPagerUI(component);
96
+
97
+ if (uiPager) {
98
+ uiPager.updatePagingUI();
99
+ }
100
+ }
101
+ }
102
+ } else if (component instanceof SingleElementComponent) {
103
+ for (const childComponent of component.children) {
104
+ this.updateViewToModel(childComponent, handlerContext);
105
+ }
106
+ } else if (component instanceof MultiElementComponent) {
107
+ const uiPager = this.getMultiPagerUI(component);
108
+
109
+ if (uiPager) {
110
+ uiPager.updatePagingUI();
111
+ }
112
+
113
+ for (const childComponent of component.children) {
114
+ this.updateViewToModel(childComponent, handlerContext);
115
+ }
116
+ }
117
+ }
118
+
119
+ deleteCurrentValue(component: CedarComponent): void {
120
+ const uiComponent: CedarUIComponent = this.getUIComponent(component);
121
+
122
+ if (uiComponent) {
123
+ uiComponent.deleteCurrentValue();
124
+ }
125
+ }
126
+
127
+ registerComponent(modelComponent: CedarComponent, uiComponent: CedarUIComponent): void {
128
+ this.modelToUI.set(modelComponent, uiComponent);
129
+ }
130
+
131
+ registerMultiPagerComponent(modelComponent: CedarComponent, uiComponent: CedarMultiPagerComponent): void {
132
+ this.modelToMultiPagerUI.set(modelComponent, uiComponent);
133
+ }
134
+ }
@@ -0,0 +1,25 @@
1
+ import {CedarComponent} from '../models/component/cedar-component.model';
2
+ import {Injectable} from '@angular/core';
3
+
4
+ @Injectable({
5
+ providedIn: 'root',
6
+ })
7
+ export class ComponentDataService {
8
+
9
+ public getRenderingLabelForComponent(component: CedarComponent): string {
10
+ if (component.labelInfo !== undefined &&
11
+ component.labelInfo.preferredLabel !== undefined &&
12
+ component.labelInfo.preferredLabel !== null) {
13
+ return component.labelInfo.preferredLabel;
14
+ }
15
+ if (component.labelInfo !== undefined &&
16
+ component.labelInfo.label !== undefined &&
17
+ component.labelInfo.label !== null) {
18
+ return component.labelInfo.label;
19
+ }
20
+ if (component.name !== null) {
21
+ return component.name;
22
+ }
23
+ }
24
+
25
+ }
@@ -0,0 +1,37 @@
1
+ import {Injectable} from '@angular/core';
2
+ import {Observable} from 'rxjs';
3
+ import {IntegratedSearchResponse} from '../models/rest/integrated-search/integrated-search-response';
4
+ import {IntegratedSearchRequest} from '../models/rest/integrated-search/integrated-search-request';
5
+ import {FieldComponent} from '../models/component/field-component.model';
6
+ import {HttpClient} from '@angular/common/http';
7
+ import {MessageHandlerService} from './message-handler.service';
8
+
9
+ @Injectable({
10
+ providedIn: 'root',
11
+ })
12
+ export class ControlledFieldDataService {
13
+
14
+ private terminologyProxyUrl = null;
15
+
16
+ constructor(
17
+ private http: HttpClient,
18
+ private messageHandlerService: MessageHandlerService
19
+ ) {
20
+ }
21
+
22
+ setTerminologyProxyUrl(terminologyProxyUrl: string): void {
23
+ this.terminologyProxyUrl = terminologyProxyUrl;
24
+ }
25
+
26
+ getData(val: string, component: FieldComponent): Observable<IntegratedSearchResponse> {
27
+ const postData = new IntegratedSearchRequest();
28
+ postData.parameterObject.inputText = val;
29
+ postData.parameterObject.valueConstraints.branches = component.controlledInfo.branches;
30
+ postData.parameterObject.valueConstraints.classes = component.controlledInfo.classes;
31
+ postData.parameterObject.valueConstraints.ontologies = component.controlledInfo.ontologies;
32
+ postData.parameterObject.valueConstraints.valueSets = component.controlledInfo.valueSets;
33
+ // this.messageHandlerService.traceObject('Read terminology integrated search:', postData);
34
+ return this.http.post<IntegratedSearchResponse>(this.terminologyProxyUrl, postData);
35
+ }
36
+
37
+ }
@@ -0,0 +1,19 @@
1
+ import {Injectable} from '@angular/core';
2
+ import {MomentDateAdapter} from '@angular/material-moment-adapter';
3
+ import * as moment from 'moment';
4
+ import {DateTimeService} from './date-time.service';
5
+
6
+ @Injectable()
7
+ export class CustomDateAdapter extends MomentDateAdapter {
8
+ constructor(private dateTimeService: DateTimeService) {
9
+ super(dateTimeService.locale);
10
+ }
11
+
12
+ public format(date: moment.Moment, displayFormat: string): string {
13
+ const locale = this.dateTimeService.locale;
14
+ const format = this.dateTimeService.format;
15
+ date.locale(locale);
16
+ const result = date.format(format);
17
+ return result;
18
+ }
19
+ }