@rxap/layout 22.0.0-dev.0 → 22.0.0-dev.2

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 (322) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +5 -3
  3. package/compodoc/{directives/FooterDirective-1.html → architecture.html} +68 -139
  4. package/compodoc/changelog.html +98 -5
  5. package/compodoc/components/AppsButtonComponent.html +174 -40
  6. package/compodoc/components/BaseLayoutComponent.html +115 -23
  7. package/compodoc/components/DefaultHeaderComponent.html +205 -36
  8. package/compodoc/components/FooterComponent.html +142 -27
  9. package/compodoc/components/HeaderComponent.html +165 -61
  10. package/compodoc/components/LayoutComponent.html +194 -44
  11. package/compodoc/components/MinimalLayoutComponent.html +120 -26
  12. package/compodoc/components/NavigationComponent.html +220 -133
  13. package/compodoc/components/NavigationItemComponent.html +248 -115
  14. package/compodoc/components/NavigationProgressBarComponent.html +121 -25
  15. package/compodoc/components/ReleaseInfoComponent.html +149 -32
  16. package/compodoc/components/SettingsButtonComponent.html +220 -62
  17. package/compodoc/components/SidenavComponent.html +222 -56
  18. package/compodoc/components/SidenavToggleButtonComponent.html +117 -27
  19. package/compodoc/components/UserProfileIconComponent.html +155 -66
  20. package/compodoc/dependencies.html +152 -49
  21. package/compodoc/directives/FooterDirective.html +74 -20
  22. package/compodoc/directives/HeaderDirective.html +74 -20
  23. package/compodoc/directives/SidenavFooterDirective.html +91 -19
  24. package/compodoc/directives/SidenavHeaderDirective.html +72 -19
  25. package/compodoc/index.html +50 -8
  26. package/compodoc/injectables/DefaultHeaderService.html +91 -25
  27. package/compodoc/injectables/ExternalAppsService.html +123 -21
  28. package/compodoc/injectables/FooterService.html +91 -25
  29. package/compodoc/injectables/HeaderService.html +91 -25
  30. package/compodoc/injectables/LayoutService.html +91 -21
  31. package/compodoc/injectables/LogoService.html +103 -17
  32. package/compodoc/injectables/NavigationService.html +84 -24
  33. package/compodoc/interfaces/NavigationDividerItem.html +155 -100
  34. package/compodoc/interfaces/NavigationInsertItem.html +114 -64
  35. package/compodoc/interfaces/NavigationItem.html +305 -216
  36. package/compodoc/interfaces/NavigationStatus.html +80 -35
  37. package/compodoc/interfaces/ReleaseInfoModule.html +197 -137
  38. package/compodoc/interfaces/SettingsMenuItem.html +197 -137
  39. package/compodoc/js/architecture-graph.js +288 -0
  40. package/compodoc/js/libs/bootstrap-native.js +4 -2
  41. package/compodoc/js/libs/jszip.min.js +13 -0
  42. package/compodoc/js/libs/svg-pan-zoom.min.js +3 -3
  43. package/compodoc/js/libs/tablesort.min.js +3 -3
  44. package/compodoc/js/libs/tablesort.number.min.js +3 -3
  45. package/compodoc/js/libs/vis-network.min.js +78 -0
  46. package/compodoc/js/menu-wc.js +26 -13
  47. package/compodoc/js/menu.js +10 -11
  48. package/compodoc/js/routes/routes_index.js +1 -0
  49. package/compodoc/js/routes.js +142 -34
  50. package/compodoc/js/search/search-lunr.js +6 -8
  51. package/compodoc/js/search/search.js +118 -66
  52. package/compodoc/js/search/search_index.js +2 -2
  53. package/compodoc/js/tabs.js +98 -15
  54. package/compodoc/js/tree.js +44 -7
  55. package/compodoc/license.html +48 -6
  56. package/compodoc/llms.txt +525 -0
  57. package/compodoc/miscellaneous/functions.html +171 -41
  58. package/compodoc/miscellaneous/typealiases.html +55 -12
  59. package/compodoc/miscellaneous/variables.html +163 -20
  60. package/compodoc/modules.html +44 -3
  61. package/compodoc/overview.html +54 -3
  62. package/compodoc/properties.html +45 -4
  63. package/compodoc/routes.html +227 -0
  64. package/compodoc/styles/compodoc.css +365 -44
  65. package/compodoc/styles/dark.css +16 -0
  66. package/compodoc/template-playground/default-templates.json +192 -0
  67. package/compodoc/template-playground/hbs-render.service.ts +217 -0
  68. package/compodoc/template-playground/main.ts +9 -0
  69. package/compodoc/template-playground/template-editor.service.ts +173 -0
  70. package/compodoc/template-playground/template-playground.component.ts +614 -0
  71. package/compodoc/template-playground/template-playground.module.ts +29 -0
  72. package/compodoc/template-playground/zip-export.service.ts +86 -0
  73. package/compodoc/template-playground-app/app.js +1389 -0
  74. package/compodoc/template-playground-app/index.html +462 -0
  75. package/docs/documentation.json +1700 -1219
  76. package/docs/html/assets/highlight.css +1 -1
  77. package/docs/html/assets/icons.js +1 -1
  78. package/docs/html/assets/icons.svg +1 -1
  79. package/docs/html/assets/main.js +5 -5
  80. package/docs/html/assets/search.js +1 -1
  81. package/docs/html/assets/style.css +265 -228
  82. package/docs/html/classes/AppsButtonComponent.html +110 -8
  83. package/docs/html/classes/BaseLayoutComponent.html +56 -2
  84. package/docs/html/classes/DefaultHeaderComponent.html +112 -10
  85. package/docs/html/classes/DefaultHeaderService.html +128 -13
  86. package/docs/html/classes/ExternalAppsService.html +240 -19
  87. package/docs/html/classes/FooterComponent.html +82 -5
  88. package/docs/html/classes/FooterDirective.html +95 -6
  89. package/docs/html/classes/FooterService.html +128 -13
  90. package/docs/html/classes/HeaderComponent.html +88 -6
  91. package/docs/html/classes/HeaderDirective.html +95 -6
  92. package/docs/html/classes/HeaderService.html +128 -13
  93. package/docs/html/classes/LayoutComponent.html +88 -6
  94. package/docs/html/classes/LayoutService.html +174 -16
  95. package/docs/html/classes/LogoService.html +88 -6
  96. package/docs/html/classes/MinimalLayoutComponent.html +56 -2
  97. package/docs/html/classes/NavigationComponent.html +156 -12
  98. package/docs/html/classes/NavigationItemComponent.html +172 -14
  99. package/docs/html/classes/NavigationProgressBarComponent.html +76 -4
  100. package/docs/html/classes/NavigationService.html +197 -12
  101. package/docs/html/classes/ReleaseInfoComponent.html +100 -6
  102. package/docs/html/classes/SettingsButtonComponent.html +242 -19
  103. package/docs/html/classes/SidenavComponent.html +190 -19
  104. package/docs/html/classes/SidenavFooterDirective.html +70 -3
  105. package/docs/html/classes/SidenavHeaderDirective.html +70 -3
  106. package/docs/html/classes/SidenavToggleButtonComponent.html +94 -5
  107. package/docs/html/classes/UserProfileIconComponent.html +106 -7
  108. package/docs/html/functions/IsNavigationDividerItem.html +42 -1
  109. package/docs/html/functions/IsNavigationInsertItem.html +42 -1
  110. package/docs/html/functions/IsNavigationItem.html +42 -1
  111. package/docs/html/functions/provideExternalApps.html +42 -1
  112. package/docs/html/functions/provideLayout.html +42 -1
  113. package/docs/html/functions/withDefaultHeaderComponent.html +38 -1
  114. package/docs/html/functions/withDefaultHeaderItems.html +42 -1
  115. package/docs/html/functions/withFooterComponents.html +42 -1
  116. package/docs/html/functions/withHeaderComponents.html +42 -1
  117. package/docs/html/functions/withNavigationConfig.html +42 -1
  118. package/docs/html/functions/withNavigationInserts.html +42 -1
  119. package/docs/html/functions/withReleaseInfoModules.html +42 -1
  120. package/docs/html/functions/withSettingsMenuItems.html +42 -1
  121. package/docs/html/functions/withUserProfileDataSource.html +43 -1
  122. package/docs/html/hierarchy.html +29 -0
  123. package/docs/html/index.html +96 -21
  124. package/docs/html/interfaces/NavigationDividerItem.html +61 -3
  125. package/docs/html/interfaces/NavigationInsertItem.html +55 -2
  126. package/docs/html/interfaces/NavigationItem.html +94 -6
  127. package/docs/html/interfaces/NavigationStatus.html +63 -2
  128. package/docs/html/interfaces/ReleaseInfoModule.html +67 -4
  129. package/docs/html/interfaces/SettingsMenuItem.html +67 -4
  130. package/docs/html/modules.html +52 -1
  131. package/docs/html/types/DefaultHeaderItemComponent.html +33 -1
  132. package/docs/html/types/ExternalApp.html +33 -1
  133. package/docs/html/types/ExtractUsernameFromProfileFn.html +49 -1
  134. package/docs/html/types/Navigation.html +33 -1
  135. package/docs/html/types/NavigationWithInserts.html +33 -1
  136. package/docs/html/types/SettingsMenuItemComponent.html +33 -1
  137. package/docs/html/variables/EXTRACT_USERNAME_FROM_PROFILE.html +33 -1
  138. package/docs/html/variables/RXAP_DEFAULT_HEADER_ITEM_COMPONENT.html +33 -1
  139. package/docs/html/variables/RXAP_EXTERNAL_APP.html +33 -1
  140. package/docs/html/variables/RXAP_EXTERNAL_APP_FILTER.html +33 -1
  141. package/docs/html/variables/RXAP_FOOTER_COMPONENT.html +33 -1
  142. package/docs/html/variables/RXAP_HEADER_COMPONENT.html +33 -1
  143. package/docs/html/variables/RXAP_LAYOUT_APPS_GRID.html +33 -1
  144. package/docs/html/variables/RXAP_LOGO_CONFIG.html +33 -1
  145. package/docs/html/variables/RXAP_LOGO_CONFIG_DEFAULTS.html +33 -1
  146. package/docs/html/variables/RXAP_NAVIGATION_CONFIG.html +33 -1
  147. package/docs/html/variables/RXAP_NAVIGATION_CONFIG_INSERTS.html +33 -1
  148. package/docs/html/variables/RXAP_NAVIGATION_LAYOUT_CONFIG_DEFAULTS.html +33 -1
  149. package/docs/html/variables/RXAP_RELEASE_INFO_MODULE.html +33 -1
  150. package/docs/html/variables/RXAP_SETTINGS_MENU_ITEM.html +33 -1
  151. package/docs/html/variables/RXAP_SETTINGS_MENU_ITEM_COMPONENT.html +33 -1
  152. package/docs/html/variables/RXAP_USER_PROFILE_DATA_SOURCE.html +33 -1
  153. package/docs/markdown/README.md +6 -4
  154. package/docs/markdown/classes/AppsButtonComponent.md +11 -11
  155. package/docs/markdown/classes/BaseLayoutComponent.md +5 -5
  156. package/docs/markdown/classes/DefaultHeaderComponent.md +13 -13
  157. package/docs/markdown/classes/DefaultHeaderService.md +9 -9
  158. package/docs/markdown/classes/ExternalAppsService.md +29 -29
  159. package/docs/markdown/classes/FooterComponent.md +8 -8
  160. package/docs/markdown/classes/FooterDirective.md +7 -7
  161. package/docs/markdown/classes/FooterService.md +9 -9
  162. package/docs/markdown/classes/HeaderComponent.md +9 -9
  163. package/docs/markdown/classes/HeaderDirective.md +7 -7
  164. package/docs/markdown/classes/HeaderService.md +9 -9
  165. package/docs/markdown/classes/LayoutComponent.md +9 -9
  166. package/docs/markdown/classes/LayoutService.md +21 -21
  167. package/docs/markdown/classes/LogoService.md +9 -9
  168. package/docs/markdown/classes/MinimalLayoutComponent.md +5 -5
  169. package/docs/markdown/classes/NavigationComponent.md +19 -19
  170. package/docs/markdown/classes/NavigationItemComponent.md +21 -21
  171. package/docs/markdown/classes/NavigationProgressBarComponent.md +7 -7
  172. package/docs/markdown/classes/NavigationService.md +26 -26
  173. package/docs/markdown/classes/ReleaseInfoComponent.md +9 -9
  174. package/docs/markdown/classes/SettingsButtonComponent.md +24 -24
  175. package/docs/markdown/classes/SidenavComponent.md +24 -24
  176. package/docs/markdown/classes/SidenavFooterDirective.md +6 -6
  177. package/docs/markdown/classes/SidenavHeaderDirective.md +6 -6
  178. package/docs/markdown/classes/SidenavToggleButtonComponent.md +8 -8
  179. package/docs/markdown/classes/UserProfileIconComponent.md +11 -11
  180. package/docs/markdown/functions/IsNavigationDividerItem.md +2 -2
  181. package/docs/markdown/functions/IsNavigationInsertItem.md +2 -2
  182. package/docs/markdown/functions/IsNavigationItem.md +2 -2
  183. package/docs/markdown/functions/provideExternalApps.md +2 -2
  184. package/docs/markdown/functions/provideLayout.md +2 -2
  185. package/docs/markdown/functions/withDefaultHeaderComponent.md +2 -2
  186. package/docs/markdown/functions/withDefaultHeaderItems.md +3 -3
  187. package/docs/markdown/functions/withFooterComponents.md +2 -2
  188. package/docs/markdown/functions/withHeaderComponents.md +2 -2
  189. package/docs/markdown/functions/withNavigationConfig.md +3 -3
  190. package/docs/markdown/functions/withNavigationInserts.md +2 -2
  191. package/docs/markdown/functions/withReleaseInfoModules.md +2 -2
  192. package/docs/markdown/functions/withSettingsMenuItems.md +3 -3
  193. package/docs/markdown/functions/withUserProfileDataSource.md +4 -4
  194. package/docs/markdown/globals.md +2 -2
  195. package/docs/markdown/interfaces/NavigationDividerItem.md +5 -5
  196. package/docs/markdown/interfaces/NavigationInsertItem.md +3 -3
  197. package/docs/markdown/interfaces/NavigationItem.md +14 -12
  198. package/docs/markdown/interfaces/NavigationStatus.md +3 -3
  199. package/docs/markdown/interfaces/ReleaseInfoModule.md +6 -6
  200. package/docs/markdown/interfaces/SettingsMenuItem.md +7 -7
  201. package/docs/markdown/type-aliases/DefaultHeaderItemComponent.md +3 -3
  202. package/docs/markdown/type-aliases/ExternalApp.md +3 -3
  203. package/docs/markdown/type-aliases/ExtractUsernameFromProfileFn.md +7 -5
  204. package/docs/markdown/type-aliases/Navigation.md +3 -3
  205. package/docs/markdown/type-aliases/NavigationWithInserts.md +3 -3
  206. package/docs/markdown/type-aliases/SettingsMenuItemComponent.md +3 -3
  207. package/docs/markdown/variables/EXTRACT_USERNAME_FROM_PROFILE.md +2 -2
  208. package/docs/markdown/variables/RXAP_DEFAULT_HEADER_ITEM_COMPONENT.md +3 -3
  209. package/docs/markdown/variables/RXAP_EXTERNAL_APP.md +2 -2
  210. package/docs/markdown/variables/RXAP_EXTERNAL_APP_FILTER.md +2 -2
  211. package/docs/markdown/variables/RXAP_FOOTER_COMPONENT.md +2 -2
  212. package/docs/markdown/variables/RXAP_HEADER_COMPONENT.md +2 -2
  213. package/docs/markdown/variables/RXAP_LAYOUT_APPS_GRID.md +2 -2
  214. package/docs/markdown/variables/RXAP_LOGO_CONFIG.md +2 -2
  215. package/docs/markdown/variables/RXAP_LOGO_CONFIG_DEFAULTS.md +2 -2
  216. package/docs/markdown/variables/RXAP_NAVIGATION_CONFIG.md +3 -3
  217. package/docs/markdown/variables/RXAP_NAVIGATION_CONFIG_INSERTS.md +2 -2
  218. package/docs/markdown/variables/RXAP_NAVIGATION_LAYOUT_CONFIG_DEFAULTS.md +2 -2
  219. package/docs/markdown/variables/RXAP_RELEASE_INFO_MODULE.md +2 -2
  220. package/docs/markdown/variables/RXAP_SETTINGS_MENU_ITEM.md +2 -2
  221. package/docs/markdown/variables/RXAP_SETTINGS_MENU_ITEM_COMPONENT.md +3 -3
  222. package/docs/markdown/variables/RXAP_USER_PROFILE_DATA_SOURCE.md +2 -2
  223. package/docs/wiki/Class.AppsButtonComponent.md +10 -10
  224. package/docs/wiki/Class.BaseLayoutComponent.md +4 -4
  225. package/docs/wiki/Class.DefaultHeaderComponent.md +12 -12
  226. package/docs/wiki/Class.DefaultHeaderService.md +8 -8
  227. package/docs/wiki/Class.ExternalAppsService.md +28 -28
  228. package/docs/wiki/Class.FooterComponent.md +7 -7
  229. package/docs/wiki/Class.FooterDirective.md +6 -6
  230. package/docs/wiki/Class.FooterService.md +8 -8
  231. package/docs/wiki/Class.HeaderComponent.md +8 -8
  232. package/docs/wiki/Class.HeaderDirective.md +6 -6
  233. package/docs/wiki/Class.HeaderService.md +8 -8
  234. package/docs/wiki/Class.LayoutComponent.md +8 -8
  235. package/docs/wiki/Class.LayoutService.md +20 -20
  236. package/docs/wiki/Class.LogoService.md +8 -8
  237. package/docs/wiki/Class.MinimalLayoutComponent.md +4 -4
  238. package/docs/wiki/Class.NavigationComponent.md +18 -18
  239. package/docs/wiki/Class.NavigationItemComponent.md +20 -20
  240. package/docs/wiki/Class.NavigationProgressBarComponent.md +6 -6
  241. package/docs/wiki/Class.NavigationService.md +25 -25
  242. package/docs/wiki/Class.ReleaseInfoComponent.md +8 -8
  243. package/docs/wiki/Class.SettingsButtonComponent.md +23 -23
  244. package/docs/wiki/Class.SidenavComponent.md +23 -23
  245. package/docs/wiki/Class.SidenavFooterDirective.md +5 -5
  246. package/docs/wiki/Class.SidenavHeaderDirective.md +5 -5
  247. package/docs/wiki/Class.SidenavToggleButtonComponent.md +7 -7
  248. package/docs/wiki/Class.UserProfileIconComponent.md +10 -10
  249. package/docs/wiki/Function.IsNavigationDividerItem.md +1 -1
  250. package/docs/wiki/Function.IsNavigationInsertItem.md +1 -1
  251. package/docs/wiki/Function.IsNavigationItem.md +1 -1
  252. package/docs/wiki/Function.provideExternalApps.md +1 -1
  253. package/docs/wiki/Function.provideLayout.md +1 -1
  254. package/docs/wiki/Function.withDefaultHeaderComponent.md +1 -1
  255. package/docs/wiki/Function.withDefaultHeaderItems.md +2 -2
  256. package/docs/wiki/Function.withFooterComponents.md +1 -1
  257. package/docs/wiki/Function.withHeaderComponents.md +1 -1
  258. package/docs/wiki/Function.withNavigationConfig.md +2 -2
  259. package/docs/wiki/Function.withNavigationInserts.md +1 -1
  260. package/docs/wiki/Function.withReleaseInfoModules.md +1 -1
  261. package/docs/wiki/Function.withSettingsMenuItems.md +2 -2
  262. package/docs/wiki/Function.withUserProfileDataSource.md +3 -3
  263. package/docs/wiki/Home.md +5 -3
  264. package/docs/wiki/Interface.NavigationDividerItem.md +4 -4
  265. package/docs/wiki/Interface.NavigationInsertItem.md +2 -2
  266. package/docs/wiki/Interface.NavigationItem.md +13 -11
  267. package/docs/wiki/Interface.NavigationStatus.md +2 -2
  268. package/docs/wiki/Interface.ReleaseInfoModule.md +5 -5
  269. package/docs/wiki/Interface.SettingsMenuItem.md +6 -6
  270. package/docs/wiki/TypeAlias.DefaultHeaderItemComponent.md +2 -2
  271. package/docs/wiki/TypeAlias.ExternalApp.md +2 -2
  272. package/docs/wiki/TypeAlias.ExtractUsernameFromProfileFn.md +6 -4
  273. package/docs/wiki/TypeAlias.Navigation.md +2 -2
  274. package/docs/wiki/TypeAlias.NavigationWithInserts.md +2 -2
  275. package/docs/wiki/TypeAlias.SettingsMenuItemComponent.md +2 -2
  276. package/docs/wiki/Variable.EXTRACT_USERNAME_FROM_PROFILE.md +1 -1
  277. package/docs/wiki/Variable.RXAP_DEFAULT_HEADER_ITEM_COMPONENT.md +2 -2
  278. package/docs/wiki/Variable.RXAP_EXTERNAL_APP.md +1 -1
  279. package/docs/wiki/Variable.RXAP_EXTERNAL_APP_FILTER.md +1 -1
  280. package/docs/wiki/Variable.RXAP_FOOTER_COMPONENT.md +1 -1
  281. package/docs/wiki/Variable.RXAP_HEADER_COMPONENT.md +1 -1
  282. package/docs/wiki/Variable.RXAP_LAYOUT_APPS_GRID.md +1 -1
  283. package/docs/wiki/Variable.RXAP_LOGO_CONFIG.md +1 -1
  284. package/docs/wiki/Variable.RXAP_LOGO_CONFIG_DEFAULTS.md +1 -1
  285. package/docs/wiki/Variable.RXAP_NAVIGATION_CONFIG.md +2 -2
  286. package/docs/wiki/Variable.RXAP_NAVIGATION_CONFIG_INSERTS.md +1 -1
  287. package/docs/wiki/Variable.RXAP_NAVIGATION_LAYOUT_CONFIG_DEFAULTS.md +1 -1
  288. package/docs/wiki/Variable.RXAP_RELEASE_INFO_MODULE.md +1 -1
  289. package/docs/wiki/Variable.RXAP_SETTINGS_MENU_ITEM.md +1 -1
  290. package/docs/wiki/Variable.RXAP_SETTINGS_MENU_ITEM_COMPONENT.md +2 -2
  291. package/docs/wiki/Variable.RXAP_USER_PROFILE_DATA_SOURCE.md +1 -1
  292. package/docs/wiki/globals.md +1 -1
  293. package/fesm2022/rxap-layout.mjs +19 -17
  294. package/fesm2022/rxap-layout.mjs.map +1 -1
  295. package/package.json +38 -40
  296. package/src/generators/init/generator.js +120 -0
  297. package/src/generators/init/index.js +6 -0
  298. package/src/generators/package.json +3 -0
  299. package/src/migrations/18.0.0/add-user-theme-provider-to-layout-providers/add-user-theme-provider-to-layout-providers.spec.ts +9 -0
  300. package/src/migrations/18.0.0/add-with-user-profile-provider/add-with-user-profile-provider.spec.ts +9 -0
  301. package/src/test-setup.ts +4 -17
  302. package/compodoc/components/LanguageSelectorComponent.html +0 -478
  303. package/compodoc/components/ResetButtonComponent.html +0 -486
  304. package/compodoc/components/SignOutComponent.html +0 -440
  305. package/compodoc/components/ToggleWindowSidenavButtonComponent.html +0 -549
  306. package/compodoc/components/VersionComponent.html +0 -524
  307. package/compodoc/components/WindowContainerSidenavComponent.html +0 -687
  308. package/compodoc/injectables/AppUrlService.html +0 -829
  309. package/compodoc/injectables/AuthenticationServiceMock.html +0 -303
  310. package/compodoc/injectables/LayoutComponentService.html +0 -848
  311. package/compodoc/injectables/ReplaceRouterPathsService.html +0 -337
  312. package/compodoc/injectables/SidenavComponentService.html +0 -408
  313. package/compodoc/interfaces/ExternalApps.html +0 -634
  314. package/compodoc/interfaces/LogoConfig.html +0 -381
  315. package/compodoc/js/libs/vis.min.js +0 -47
  316. package/compodoc/js/menu-wc_es5.js +0 -40
  317. package/compodoc/pipes/ReplaceRouterPathsPipe.html +0 -363
  318. package/src/generators/init/generator.spec.ts +0 -228
  319. package/src/generators/init/generator.ts +0 -139
  320. package/src/generators/init/index.ts +0 -5
  321. package/src/generators/init/schema.d.ts +0 -2
  322. package/theme.css +0 -425
@@ -0,0 +1,614 @@
1
+ import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { TemplateEditorService } from './template-editor.service';
4
+ import { ZipExportService } from './zip-export.service';
5
+ import { HbsRenderService } from './hbs-render.service';
6
+
7
+ interface Template {
8
+ name: string;
9
+ path: string;
10
+ type: 'template' | 'partial';
11
+ }
12
+
13
+ interface Session {
14
+ sessionId: string;
15
+ success: boolean;
16
+ message: string;
17
+ }
18
+
19
+ interface CompoDocConfig {
20
+ hideGenerator?: boolean;
21
+ disableSourceCode?: boolean;
22
+ disableGraph?: boolean;
23
+ disableCoverage?: boolean;
24
+ disablePrivate?: boolean;
25
+ disableProtected?: boolean;
26
+ disableInternal?: boolean;
27
+ disableLifeCycleHooks?: boolean;
28
+ disableConstructors?: boolean;
29
+ disableRoutesGraph?: boolean;
30
+ disableSearch?: boolean;
31
+ disableDependencies?: boolean;
32
+ disableProperties?: boolean;
33
+ disableDomTree?: boolean;
34
+ disableTemplateTab?: boolean;
35
+ disableStyleTab?: boolean;
36
+ disableMainGraph?: boolean;
37
+ disableFilePath?: boolean;
38
+ disableOverview?: boolean;
39
+ hideDarkModeToggle?: boolean;
40
+ minimal?: boolean;
41
+ customFavicon?: string;
42
+ includes?: string;
43
+ includesName?: string;
44
+ }
45
+
46
+ @Component({
47
+ selector: 'template-playground-root',
48
+ template: `
49
+ <div class="template-playground">
50
+ <div class="template-playground-header">
51
+ <h2>Template Playground</h2>
52
+ <div class="template-playground-status">
53
+ <span *ngIf="sessionId" class="session-info">Session: {{sessionId.substring(0, 8)}}...</span>
54
+ <span *ngIf="saving" class="saving-indicator">Saving...</span>
55
+ <span *ngIf="lastSaved" class="last-saved">Last saved: {{lastSaved | date:'short'}}</span>
56
+ </div>
57
+ <div class="template-playground-actions">
58
+ <button class="btn btn-secondary" (click)="toggleConfigPanel()">⚙️ Config</button>
59
+ <button class="btn btn-primary" (click)="resetToDefault()">Reset to Default</button>
60
+ <button class="btn btn-success" (click)="exportZip()">Download Templates</button>
61
+ </div>
62
+ </div>
63
+
64
+ <!-- Configuration Panel -->
65
+ <div class="config-panel" [class.collapsed]="!showConfigPanel">
66
+ <h3>CompoDoc Configuration</h3>
67
+ <div class="config-options">
68
+ <label><input type="checkbox" [(ngModel)]="config.hideGenerator" (change)="updateConfig()"> Hide Generator</label>
69
+ <label><input type="checkbox" [(ngModel)]="config.hideDarkModeToggle" (change)="updateConfig()"> Hide Dark Mode Toggle</label>
70
+ <label><input type="checkbox" [(ngModel)]="config.minimal" (change)="updateConfig()"> Minimal Mode</label>
71
+ <label><input type="checkbox" [(ngModel)]="config.disableOverview" (change)="updateConfig()"> Disable Overview</label>
72
+ <label><input type="checkbox" [(ngModel)]="config.disableFilePath" (change)="updateConfig()"> Disable File Path</label>
73
+ <label><input type="checkbox" [(ngModel)]="config.disableSourceCode" (change)="updateConfig()"> Disable Source Code</label>
74
+ <label><input type="checkbox" [(ngModel)]="config.disableGraph" (change)="updateConfig()"> Disable Graph</label>
75
+ <label><input type="checkbox" [(ngModel)]="config.disableMainGraph" (change)="updateConfig()"> Disable Main Graph</label>
76
+ <label><input type="checkbox" [(ngModel)]="config.disableRoutesGraph" (change)="updateConfig()"> Disable Routes Graph</label>
77
+ <label><input type="checkbox" [(ngModel)]="config.disableCoverage" (change)="updateConfig()"> Disable Coverage</label>
78
+ <label><input type="checkbox" [(ngModel)]="config.disableSearch" (change)="updateConfig()"> Disable Search</label>
79
+ <label><input type="checkbox" [(ngModel)]="config.disableDependencies" (change)="updateConfig()"> Disable Dependencies</label>
80
+ <label><input type="checkbox" [(ngModel)]="config.disablePrivate" (change)="updateConfig()"> Disable Private</label>
81
+ <label><input type="checkbox" [(ngModel)]="config.disableProtected" (change)="updateConfig()"> Disable Protected</label>
82
+ <label><input type="checkbox" [(ngModel)]="config.disableInternal" (change)="updateConfig()"> Disable Internal</label>
83
+ <label><input type="checkbox" [(ngModel)]="config.disableLifeCycleHooks" (change)="updateConfig()"> Disable Lifecycle Hooks</label>
84
+ <label><input type="checkbox" [(ngModel)]="config.disableConstructors" (change)="updateConfig()"> Disable Constructors</label>
85
+ <label><input type="checkbox" [(ngModel)]="config.disableProperties" (change)="updateConfig()"> Disable Properties</label>
86
+ <label><input type="checkbox" [(ngModel)]="config.disableDomTree" (change)="updateConfig()"> Disable DOM Tree</label>
87
+ <label><input type="checkbox" [(ngModel)]="config.disableTemplateTab" (change)="updateConfig()"> Disable Template Tab</label>
88
+ <label><input type="checkbox" [(ngModel)]="config.disableStyleTab" (change)="updateConfig()"> Disable Style Tab</label>
89
+ </div>
90
+ </div>
91
+
92
+ <div class="template-playground-body">
93
+ <div class="template-playground-sidebar">
94
+ <div class="template-file-list">
95
+ <h3>Templates</h3>
96
+ <ul class="file-list">
97
+ <li *ngFor="let template of templates; trackBy: trackByName"
98
+ [class.active]="selectedFile === template"
99
+ (click)="selectFile(template)">
100
+ <i class="file-icon ion-document-text"></i>
101
+ {{template.name}}
102
+ <span class="file-type">{{template.type}}</span>
103
+ </li>
104
+ </ul>
105
+
106
+ <div *ngIf="templates.length === 0" class="loading-templates">
107
+ Loading templates...
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+ <div class="template-playground-main">
113
+ <div class="template-playground-editor">
114
+ <div class="editor-header" *ngIf="selectedFile">
115
+ <h4>{{selectedFile.path}}</h4>
116
+ <span class="file-type-badge">{{selectedFile.type}}</span>
117
+ </div>
118
+ <div #editorContainer class="editor-container"></div>
119
+ </div>
120
+
121
+ <div class="template-playground-preview">
122
+ <div class="preview-header">
123
+ <h4>Live Preview</h4>
124
+ <button class="btn btn-sm btn-secondary" (click)="refreshPreview()">🔄 Refresh</button>
125
+ </div>
126
+ <iframe #previewFrame class="preview-frame" [src]="previewUrl"></iframe>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ `,
132
+ styles: [`
133
+ .template-playground {
134
+ display: flex;
135
+ flex-direction: column;
136
+ height: 100vh;
137
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
138
+ }
139
+
140
+ .template-playground-header {
141
+ display: flex;
142
+ justify-content: space-between;
143
+ align-items: center;
144
+ padding: 1rem 2rem;
145
+ background: #f8f9fa;
146
+ border-bottom: 1px solid #dee2e6;
147
+ }
148
+
149
+ .template-playground-status {
150
+ display: flex;
151
+ align-items: center;
152
+ gap: 1rem;
153
+ font-size: 0.875rem;
154
+ }
155
+
156
+ .session-info {
157
+ color: #6c757d;
158
+ font-family: monospace;
159
+ }
160
+
161
+ .saving-indicator {
162
+ color: #ffc107;
163
+ font-weight: bold;
164
+ }
165
+
166
+ .last-saved {
167
+ color: #28a745;
168
+ }
169
+
170
+ .template-playground-actions {
171
+ display: flex;
172
+ gap: 0.5rem;
173
+ }
174
+
175
+ .config-panel {
176
+ background: #e9ecef;
177
+ padding: 1rem 2rem;
178
+ border-bottom: 1px solid #dee2e6;
179
+ transition: all 0.3s ease;
180
+ max-height: 200px;
181
+ overflow: hidden;
182
+ }
183
+
184
+ .config-panel.collapsed {
185
+ max-height: 0;
186
+ padding: 0 2rem;
187
+ }
188
+
189
+ .config-options {
190
+ display: grid;
191
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
192
+ gap: 0.5rem;
193
+ margin-top: 0.5rem;
194
+ }
195
+
196
+ .config-options label {
197
+ display: flex;
198
+ align-items: center;
199
+ gap: 0.5rem;
200
+ font-size: 0.875rem;
201
+ }
202
+
203
+ .template-playground-body {
204
+ display: flex;
205
+ flex: 1;
206
+ overflow: hidden;
207
+ }
208
+
209
+ .template-playground-sidebar {
210
+ width: 250px;
211
+ background: #f8f9fa;
212
+ border-right: 1px solid #dee2e6;
213
+ overflow-y: auto;
214
+ }
215
+
216
+ .template-file-list {
217
+ padding: 1rem;
218
+ }
219
+
220
+ .template-file-list h3 {
221
+ margin: 0 0 0.5rem 0;
222
+ font-size: 0.875rem;
223
+ font-weight: 600;
224
+ color: #495057;
225
+ text-transform: uppercase;
226
+ letter-spacing: 0.5px;
227
+ }
228
+
229
+ .file-list {
230
+ list-style: none;
231
+ padding: 0;
232
+ margin: 0 0 1.5rem 0;
233
+ }
234
+
235
+ .file-list li {
236
+ display: flex;
237
+ align-items: center;
238
+ padding: 0.5rem;
239
+ cursor: pointer;
240
+ border-radius: 4px;
241
+ font-size: 0.875rem;
242
+ transition: background-color 0.15s ease;
243
+ }
244
+
245
+ .file-list li:hover {
246
+ background: #e9ecef;
247
+ }
248
+
249
+ .file-list li.active {
250
+ background: #007bff;
251
+ color: white;
252
+ }
253
+
254
+ .file-icon {
255
+ margin-right: 0.5rem;
256
+ opacity: 0.7;
257
+ }
258
+
259
+ .file-type {
260
+ margin-left: auto;
261
+ font-size: 0.75rem;
262
+ opacity: 0.7;
263
+ text-transform: uppercase;
264
+ }
265
+
266
+ .loading-templates {
267
+ text-align: center;
268
+ color: #6c757d;
269
+ font-style: italic;
270
+ padding: 2rem;
271
+ }
272
+
273
+ .template-playground-main {
274
+ flex: 1;
275
+ display: flex;
276
+ overflow: hidden;
277
+ }
278
+
279
+ .template-playground-editor {
280
+ width: 50%;
281
+ display: flex;
282
+ flex-direction: column;
283
+ border-right: 1px solid #dee2e6;
284
+ }
285
+
286
+ .editor-header {
287
+ display: flex;
288
+ justify-content: space-between;
289
+ align-items: center;
290
+ padding: 0.75rem 1rem;
291
+ background: #f8f9fa;
292
+ border-bottom: 1px solid #dee2e6;
293
+ }
294
+
295
+ .editor-header h4 {
296
+ margin: 0;
297
+ font-size: 0.875rem;
298
+ font-weight: 600;
299
+ }
300
+
301
+ .file-type-badge {
302
+ background: #6c757d;
303
+ color: white;
304
+ padding: 0.125rem 0.5rem;
305
+ border-radius: 12px;
306
+ font-size: 0.75rem;
307
+ text-transform: uppercase;
308
+ }
309
+
310
+ .editor-container {
311
+ flex: 1;
312
+ position: relative;
313
+ }
314
+
315
+ .template-playground-preview {
316
+ width: 50%;
317
+ display: flex;
318
+ flex-direction: column;
319
+ }
320
+
321
+ .preview-header {
322
+ display: flex;
323
+ justify-content: space-between;
324
+ align-items: center;
325
+ padding: 0.75rem 1rem;
326
+ background: #f8f9fa;
327
+ border-bottom: 1px solid #dee2e6;
328
+ }
329
+
330
+ .preview-header h4 {
331
+ margin: 0;
332
+ font-size: 0.875rem;
333
+ font-weight: 600;
334
+ }
335
+
336
+ .preview-frame {
337
+ flex: 1;
338
+ border: none;
339
+ background: white;
340
+ }
341
+
342
+ .btn {
343
+ padding: 0.375rem 0.75rem;
344
+ border: 1px solid transparent;
345
+ border-radius: 0.25rem;
346
+ font-size: 0.875rem;
347
+ font-weight: 500;
348
+ text-decoration: none;
349
+ cursor: pointer;
350
+ transition: all 0.15s ease;
351
+ }
352
+
353
+ .btn-primary {
354
+ background: #007bff;
355
+ border-color: #007bff;
356
+ color: white;
357
+ }
358
+
359
+ .btn-primary:hover {
360
+ background: #0056b3;
361
+ border-color: #004085;
362
+ }
363
+
364
+ .btn-secondary {
365
+ background: #6c757d;
366
+ border-color: #6c757d;
367
+ color: white;
368
+ }
369
+
370
+ .btn-secondary:hover {
371
+ background: #545b62;
372
+ border-color: #4e555b;
373
+ }
374
+
375
+ .btn-success {
376
+ background: #28a745;
377
+ border-color: #28a745;
378
+ color: white;
379
+ }
380
+
381
+ .btn-success:hover {
382
+ background: #1e7e34;
383
+ border-color: #1c7430;
384
+ }
385
+
386
+ .btn-sm {
387
+ padding: 0.25rem 0.5rem;
388
+ font-size: 0.75rem;
389
+ }
390
+ `]
391
+ })
392
+ export class TemplatePlaygroundComponent implements OnInit, OnDestroy {
393
+ @ViewChild('editorContainer', { static: true }) editorContainer!: ElementRef;
394
+ @ViewChild('previewFrame', { static: true }) previewFrame!: ElementRef;
395
+
396
+ sessionId: string = '';
397
+ templates: Template[] = [];
398
+ selectedFile: Template | null = null;
399
+ config: CompoDocConfig = {};
400
+ showConfigPanel: boolean = false;
401
+ saving: boolean = false;
402
+ lastSaved: Date | null = null;
403
+
404
+ private saveTimeout?: number;
405
+ private readonly SAVE_DELAY = 300; // 300ms debounce
406
+
407
+ get previewUrl(): string {
408
+ return this.sessionId ? `/api/session/${this.sessionId}/docs/` : '';
409
+ }
410
+
411
+ constructor(
412
+ private http: HttpClient,
413
+ private editorService: TemplateEditorService,
414
+ private zipService: ZipExportService,
415
+ private hbsService: HbsRenderService
416
+ ) {}
417
+
418
+ async ngOnInit() {
419
+ try {
420
+ await this.createSession();
421
+ await this.loadSessionTemplates();
422
+ await this.loadSessionConfig();
423
+ this.initializeEditor();
424
+ } catch (error) {
425
+ console.error('Error initializing template playground:', error);
426
+ }
427
+ }
428
+
429
+ ngOnDestroy() {
430
+ if (this.saveTimeout) {
431
+ clearTimeout(this.saveTimeout);
432
+ }
433
+ }
434
+
435
+ private async createSession(): Promise<void> {
436
+ const response = await this.http.post<Session>('/api/session/create', {}).toPromise();
437
+ if (response && response.success) {
438
+ this.sessionId = response.sessionId;
439
+ console.log('Session created:', this.sessionId);
440
+ } else {
441
+ throw new Error('Failed to create session');
442
+ }
443
+ }
444
+
445
+ private async loadSessionTemplates(): Promise<void> {
446
+ if (!this.sessionId) return;
447
+
448
+ const response = await this.http.get<{templates: Template[], success: boolean}>(`/api/session/${this.sessionId}/templates`).toPromise();
449
+ if (response && response.success) {
450
+ this.templates = response.templates;
451
+
452
+ // Auto-select the first template
453
+ if (this.templates.length > 0 && !this.selectedFile) {
454
+ this.selectFile(this.templates[0]);
455
+ }
456
+ }
457
+ }
458
+
459
+ private async loadSessionConfig(): Promise<void> {
460
+ if (!this.sessionId) return;
461
+
462
+ const response = await this.http.get<{config: CompoDocConfig, success: boolean}>(`/api/session/${this.sessionId}/config`).toPromise();
463
+ if (response && response.success) {
464
+ this.config = response.config;
465
+ }
466
+ }
467
+
468
+ initializeEditor() {
469
+ this.editorService.initializeEditor(this.editorContainer.nativeElement);
470
+
471
+ // Set up debounced save on content change
472
+ this.editorService.setOnChangeCallback((content: string) => {
473
+ this.scheduleAutoSave(content);
474
+ });
475
+ }
476
+
477
+ async selectFile(template: Template) {
478
+ this.selectedFile = template;
479
+
480
+ if (!this.sessionId) return;
481
+
482
+ try {
483
+ const response = await this.http.get<{content: string, success: boolean}>(`/api/session/${this.sessionId}/template/${template.path}`).toPromise();
484
+ if (response && response.success) {
485
+ this.editorService.setEditorContent(response.content, template.type === 'template' ? 'handlebars' : 'handlebars');
486
+ }
487
+ } catch (error) {
488
+ console.error('Error loading template:', error);
489
+ }
490
+ }
491
+
492
+ private scheduleAutoSave(content: string): void {
493
+ if (!this.selectedFile || !this.sessionId) return;
494
+
495
+ // Clear existing timeout
496
+ if (this.saveTimeout) {
497
+ clearTimeout(this.saveTimeout);
498
+ }
499
+
500
+ // Set saving indicator
501
+ this.saving = true;
502
+
503
+ // Schedule new save
504
+ this.saveTimeout = window.setTimeout(async () => {
505
+ try {
506
+ await this.saveTemplate(content);
507
+ this.saving = false;
508
+ this.lastSaved = new Date();
509
+ } catch (error) {
510
+ console.error('Error saving template:', error);
511
+ this.saving = false;
512
+ }
513
+ }, this.SAVE_DELAY);
514
+ }
515
+
516
+ private async saveTemplate(content: string): Promise<void> {
517
+ if (!this.selectedFile || !this.sessionId) return;
518
+
519
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/template/${this.selectedFile.path}`, {
520
+ content
521
+ }).toPromise();
522
+
523
+ if (!response || !response.success) {
524
+ throw new Error('Failed to save template');
525
+ }
526
+ }
527
+
528
+ async updateConfig(): Promise<void> {
529
+ if (!this.sessionId) return;
530
+
531
+ try {
532
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/config`, {
533
+ config: this.config
534
+ }).toPromise();
535
+
536
+ if (response && response.success) {
537
+ // Config updated, documentation will be regenerated automatically
538
+ }
539
+ } catch (error) {
540
+ console.error('Error updating config:', error);
541
+ }
542
+ }
543
+
544
+ toggleConfigPanel(): void {
545
+ this.showConfigPanel = !this.showConfigPanel;
546
+ }
547
+
548
+ refreshPreview(): void {
549
+ if (this.previewFrame?.nativeElement) {
550
+ this.previewFrame.nativeElement.src = this.previewFrame.nativeElement.src;
551
+ }
552
+ }
553
+
554
+ resetToDefault(): void {
555
+ // Implementation for resetting to default templates
556
+ if (confirm('Are you sure you want to reset all templates to their default values? This action cannot be undone.')) {
557
+ // TODO: Implement reset functionality
558
+ console.log('Reset to default templates');
559
+ }
560
+ }
561
+
562
+ async exportZip(): Promise<void> {
563
+ try {
564
+ if (!this.sessionId) {
565
+ console.error('No active session. Please refresh the page and try again.');
566
+ return;
567
+ }
568
+
569
+ console.log('Creating template package...');
570
+
571
+ // Call server-side ZIP creation endpoint for all templates
572
+ const response = await this.http.post(`/api/session/${this.sessionId}/download-all-templates`, {}, {
573
+ responseType: 'blob',
574
+ observe: 'response'
575
+ }).toPromise();
576
+
577
+ if (!response || !response.body) {
578
+ throw new Error('Failed to create template package');
579
+ }
580
+
581
+ // Get the ZIP file as a blob
582
+ const zipBlob = response.body;
583
+
584
+ // Get filename from response headers or construct it
585
+ const contentDisposition = response.headers.get('Content-Disposition');
586
+ let filename = `compodoc-templates-${this.sessionId}.zip`;
587
+
588
+ if (contentDisposition) {
589
+ const filenameMatch = contentDisposition.match(/filename="([^"]+)"/);
590
+ if (filenameMatch) {
591
+ filename = filenameMatch[1];
592
+ }
593
+ }
594
+
595
+ // Create download link and trigger download
596
+ const url = URL.createObjectURL(zipBlob);
597
+ const a = document.createElement('a');
598
+ a.href = url;
599
+ a.download = filename;
600
+ document.body.appendChild(a);
601
+ a.click();
602
+ document.body.removeChild(a);
603
+ URL.revokeObjectURL(url);
604
+
605
+ console.log('Template package downloaded successfully!');
606
+ } catch (error) {
607
+ console.error('Error downloading template package:', error);
608
+ }
609
+ }
610
+
611
+ trackByName(index: number, item: Template): string {
612
+ return item.name;
613
+ }
614
+ }
@@ -0,0 +1,29 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { BrowserModule } from '@angular/platform-browser';
3
+ import { CommonModule } from '@angular/common';
4
+ import { FormsModule } from '@angular/forms';
5
+ import { HttpClientModule } from '@angular/common/http';
6
+
7
+ import { TemplatePlaygroundComponent } from './template-playground.component';
8
+ import { TemplateEditorService } from './template-editor.service';
9
+ import { ZipExportService } from './zip-export.service';
10
+ import { HbsRenderService } from './hbs-render.service';
11
+
12
+ @NgModule({
13
+ declarations: [
14
+ TemplatePlaygroundComponent
15
+ ],
16
+ imports: [
17
+ BrowserModule,
18
+ CommonModule,
19
+ FormsModule,
20
+ HttpClientModule
21
+ ],
22
+ providers: [
23
+ TemplateEditorService,
24
+ ZipExportService,
25
+ HbsRenderService
26
+ ],
27
+ bootstrap: [TemplatePlaygroundComponent]
28
+ })
29
+ export class TemplatePlaygroundModule { }