@edx/frontend-platform 4.6.0 → 4.6.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 (229) hide show
  1. package/.env.development +30 -0
  2. package/.env.test +30 -0
  3. package/.eslintignore +6 -0
  4. package/.eslintrc.js +28 -0
  5. package/.github/PULL_REQUEST_TEMPLATE.md +13 -0
  6. package/.github/workflows/add-depr-ticket-to-depr-board.yml +19 -0
  7. package/.github/workflows/add-remove-label-on-comment.yml +20 -0
  8. package/.github/workflows/ci.yml +42 -0
  9. package/.github/workflows/commitlint.yml +10 -0
  10. package/.github/workflows/lockfileversion-check.yml +13 -0
  11. package/.github/workflows/manual-publish.yml +43 -0
  12. package/.github/workflows/npm-deprecate.yml +22 -0
  13. package/.github/workflows/release.yml +45 -0
  14. package/.github/workflows/self-assign-issue.yml +12 -0
  15. package/.github/workflows/update-browserslist-db.yml +12 -0
  16. package/.nvmrc +1 -0
  17. package/.releaserc +32 -0
  18. package/catalog-info.yaml +21 -0
  19. package/dist/LICENSE +661 -0
  20. package/dist/README.md +155 -0
  21. package/dist/package.json +86 -0
  22. package/docs/addTagsPlugin.js +10 -0
  23. package/docs/auth-API.md +114 -0
  24. package/docs/decisions/0001-record-architecture-decisions.rst +32 -0
  25. package/docs/decisions/0002-frontend-base-design-goals.rst +222 -0
  26. package/docs/decisions/0003-consolidation-into-frontend-platform.rst +71 -0
  27. package/docs/decisions/0004-axios-caching-implementation.rst +88 -0
  28. package/docs/decisions/0005-token-null-after-successful-refresh.rst +69 -0
  29. package/docs/decisions/0006-middleware-support-for-http-clients.rst +44 -0
  30. package/docs/decisions/0007-javascript-file-configuration.rst +143 -0
  31. package/docs/how_tos/automatic-case-conversion.rst +58 -0
  32. package/docs/how_tos/caching.rst +93 -0
  33. package/docs/how_tos/i18n.rst +305 -0
  34. package/docs/removeExport.js +24 -0
  35. package/docs/template/edx/README.md +12 -0
  36. package/docs/template/edx/publish.js +713 -0
  37. package/docs/template/edx/static/fonts/OpenSans-Bold-webfont.eot +0 -0
  38. package/docs/template/edx/static/fonts/OpenSans-Bold-webfont.svg +1830 -0
  39. package/docs/template/edx/static/fonts/OpenSans-Bold-webfont.woff +0 -0
  40. package/docs/template/edx/static/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  41. package/docs/template/edx/static/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  42. package/docs/template/edx/static/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  43. package/docs/template/edx/static/fonts/OpenSans-Italic-webfont.eot +0 -0
  44. package/docs/template/edx/static/fonts/OpenSans-Italic-webfont.svg +1830 -0
  45. package/docs/template/edx/static/fonts/OpenSans-Italic-webfont.woff +0 -0
  46. package/docs/template/edx/static/fonts/OpenSans-Light-webfont.eot +0 -0
  47. package/docs/template/edx/static/fonts/OpenSans-Light-webfont.svg +1831 -0
  48. package/docs/template/edx/static/fonts/OpenSans-Light-webfont.woff +0 -0
  49. package/docs/template/edx/static/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  50. package/docs/template/edx/static/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  51. package/docs/template/edx/static/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  52. package/docs/template/edx/static/fonts/OpenSans-Regular-webfont.eot +0 -0
  53. package/docs/template/edx/static/fonts/OpenSans-Regular-webfont.svg +1831 -0
  54. package/docs/template/edx/static/fonts/OpenSans-Regular-webfont.woff +0 -0
  55. package/docs/template/edx/static/scripts/linenumber.js +25 -0
  56. package/docs/template/edx/static/scripts/prettify/Apache-License-2.0.txt +202 -0
  57. package/docs/template/edx/static/scripts/prettify/lang-css.js +2 -0
  58. package/docs/template/edx/static/scripts/prettify/prettify.js +28 -0
  59. package/docs/template/edx/static/styles/jsdoc-default.css +356 -0
  60. package/docs/template/edx/static/styles/prettify-jsdoc.css +111 -0
  61. package/docs/template/edx/static/styles/prettify-tomorrow.css +132 -0
  62. package/docs/template/edx/tmpl/augments.tmpl +10 -0
  63. package/docs/template/edx/tmpl/container.tmpl +196 -0
  64. package/docs/template/edx/tmpl/details.tmpl +143 -0
  65. package/docs/template/edx/tmpl/example.tmpl +2 -0
  66. package/docs/template/edx/tmpl/examples.tmpl +13 -0
  67. package/docs/template/edx/tmpl/exceptions.tmpl +32 -0
  68. package/docs/template/edx/tmpl/layout.tmpl +39 -0
  69. package/docs/template/edx/tmpl/mainpage.tmpl +10 -0
  70. package/docs/template/edx/tmpl/members.tmpl +38 -0
  71. package/docs/template/edx/tmpl/method.tmpl +131 -0
  72. package/docs/template/edx/tmpl/modifies.tmpl +14 -0
  73. package/docs/template/edx/tmpl/params.tmpl +131 -0
  74. package/docs/template/edx/tmpl/properties.tmpl +108 -0
  75. package/docs/template/edx/tmpl/returns.tmpl +19 -0
  76. package/docs/template/edx/tmpl/source.tmpl +8 -0
  77. package/docs/template/edx/tmpl/tutorial.tmpl +19 -0
  78. package/docs/template/edx/tmpl/type.tmpl +7 -0
  79. package/env.config.js +8 -0
  80. package/jsdoc.json +36 -0
  81. package/openedx.yaml +12 -0
  82. package/package.json +6 -6
  83. package/service-interface.png +0 -0
  84. package/src/analytics/MockAnalyticsService.js +71 -0
  85. package/src/analytics/SegmentAnalyticsService.js +243 -0
  86. package/src/analytics/index.js +12 -0
  87. package/src/analytics/interface.js +142 -0
  88. package/src/auth/AxiosCsrfTokenService.js +60 -0
  89. package/src/auth/AxiosJwtAuthService.js +364 -0
  90. package/src/auth/AxiosJwtTokenService.js +134 -0
  91. package/src/auth/LocalForageCache.js +78 -0
  92. package/src/auth/MockAuthService.js +285 -0
  93. package/src/auth/index.js +19 -0
  94. package/src/auth/interceptors/createCsrfTokenProviderInterceptor.js +37 -0
  95. package/src/auth/interceptors/createJwtTokenProviderInterceptor.js +38 -0
  96. package/src/auth/interceptors/createProcessAxiosRequestErrorInterceptor.js +20 -0
  97. package/src/auth/interceptors/createRetryInterceptor.js +72 -0
  98. package/src/auth/interface.js +309 -0
  99. package/src/auth/utils.js +105 -0
  100. package/src/config.js +327 -0
  101. package/src/constants.js +66 -0
  102. package/src/i18n/countries.js +57 -0
  103. package/src/i18n/index.js +123 -0
  104. package/src/i18n/injectIntlWithShim.jsx +45 -0
  105. package/src/i18n/languages.js +60 -0
  106. package/src/i18n/lib.js +282 -0
  107. package/src/i18n/scripts/README.md +29 -0
  108. package/src/i18n/scripts/intl-imports.js +259 -0
  109. package/src/i18n/scripts/transifex-utils.js +75 -0
  110. package/src/index.js +42 -0
  111. package/src/initialize.js +357 -0
  112. package/src/logging/MockLoggingService.js +31 -0
  113. package/src/logging/NewRelicLoggingService.js +181 -0
  114. package/src/logging/index.js +9 -0
  115. package/src/logging/interface.js +110 -0
  116. package/src/pubSub.js +47 -0
  117. package/src/react/AppContext.jsx +24 -0
  118. package/src/react/AppProvider.jsx +93 -0
  119. package/src/react/AuthenticatedPageRoute.jsx +60 -0
  120. package/src/react/ErrorBoundary.jsx +44 -0
  121. package/src/react/ErrorPage.jsx +76 -0
  122. package/src/react/LoginRedirect.jsx +16 -0
  123. package/src/react/OptionalReduxProvider.jsx +28 -0
  124. package/src/react/PageRoute.jsx +31 -0
  125. package/src/react/hooks.js +50 -0
  126. package/src/react/index.js +16 -0
  127. package/src/scripts/GoogleAnalyticsLoader.js +53 -0
  128. package/src/scripts/index.js +2 -0
  129. package/src/testing/index.js +9 -0
  130. package/src/testing/initializeMockApp.js +77 -0
  131. package/src/testing/mockMessages.js +21 -0
  132. package/src/utils.js +167 -0
  133. /package/{analytics → dist/analytics}/MockAnalyticsService.js +0 -0
  134. /package/{analytics → dist/analytics}/MockAnalyticsService.js.map +0 -0
  135. /package/{analytics → dist/analytics}/SegmentAnalyticsService.js +0 -0
  136. /package/{analytics → dist/analytics}/SegmentAnalyticsService.js.map +0 -0
  137. /package/{analytics → dist/analytics}/index.js +0 -0
  138. /package/{analytics → dist/analytics}/index.js.map +0 -0
  139. /package/{analytics → dist/analytics}/interface.js +0 -0
  140. /package/{analytics → dist/analytics}/interface.js.map +0 -0
  141. /package/{auth → dist/auth}/AxiosCsrfTokenService.js +0 -0
  142. /package/{auth → dist/auth}/AxiosCsrfTokenService.js.map +0 -0
  143. /package/{auth → dist/auth}/AxiosJwtAuthService.js +0 -0
  144. /package/{auth → dist/auth}/AxiosJwtAuthService.js.map +0 -0
  145. /package/{auth → dist/auth}/AxiosJwtTokenService.js +0 -0
  146. /package/{auth → dist/auth}/AxiosJwtTokenService.js.map +0 -0
  147. /package/{auth → dist/auth}/LocalForageCache.js +0 -0
  148. /package/{auth → dist/auth}/LocalForageCache.js.map +0 -0
  149. /package/{auth → dist/auth}/MockAuthService.js +0 -0
  150. /package/{auth → dist/auth}/MockAuthService.js.map +0 -0
  151. /package/{auth → dist/auth}/index.js +0 -0
  152. /package/{auth → dist/auth}/index.js.map +0 -0
  153. /package/{auth → dist/auth}/interceptors/createCsrfTokenProviderInterceptor.js +0 -0
  154. /package/{auth → dist/auth}/interceptors/createCsrfTokenProviderInterceptor.js.map +0 -0
  155. /package/{auth → dist/auth}/interceptors/createJwtTokenProviderInterceptor.js +0 -0
  156. /package/{auth → dist/auth}/interceptors/createJwtTokenProviderInterceptor.js.map +0 -0
  157. /package/{auth → dist/auth}/interceptors/createProcessAxiosRequestErrorInterceptor.js +0 -0
  158. /package/{auth → dist/auth}/interceptors/createProcessAxiosRequestErrorInterceptor.js.map +0 -0
  159. /package/{auth → dist/auth}/interceptors/createRetryInterceptor.js +0 -0
  160. /package/{auth → dist/auth}/interceptors/createRetryInterceptor.js.map +0 -0
  161. /package/{auth → dist/auth}/interface.js +0 -0
  162. /package/{auth → dist/auth}/interface.js.map +0 -0
  163. /package/{auth → dist/auth}/utils.js +0 -0
  164. /package/{auth → dist/auth}/utils.js.map +0 -0
  165. /package/{config.js → dist/config.js} +0 -0
  166. /package/{config.js.map → dist/config.js.map} +0 -0
  167. /package/{constants.js → dist/constants.js} +0 -0
  168. /package/{constants.js.map → dist/constants.js.map} +0 -0
  169. /package/{i18n → dist/i18n}/countries.js +0 -0
  170. /package/{i18n → dist/i18n}/countries.js.map +0 -0
  171. /package/{i18n → dist/i18n}/index.js +0 -0
  172. /package/{i18n → dist/i18n}/index.js.map +0 -0
  173. /package/{i18n → dist/i18n}/injectIntlWithShim.js +0 -0
  174. /package/{i18n → dist/i18n}/injectIntlWithShim.js.map +0 -0
  175. /package/{i18n → dist/i18n}/languages.js +0 -0
  176. /package/{i18n → dist/i18n}/languages.js.map +0 -0
  177. /package/{i18n → dist/i18n}/lib.js +0 -0
  178. /package/{i18n → dist/i18n}/lib.js.map +0 -0
  179. /package/{i18n → dist/i18n}/scripts/README.md +0 -0
  180. /package/{i18n → dist/i18n}/scripts/intl-imports.js +0 -0
  181. /package/{i18n → dist/i18n}/scripts/intl-imports.js.map +0 -0
  182. /package/{i18n → dist/i18n}/scripts/transifex-utils.js +0 -0
  183. /package/{i18n → dist/i18n}/scripts/transifex-utils.js.map +0 -0
  184. /package/{index.js → dist/index.js} +0 -0
  185. /package/{index.js.map → dist/index.js.map} +0 -0
  186. /package/{initialize.js → dist/initialize.js} +0 -0
  187. /package/{initialize.js.map → dist/initialize.js.map} +0 -0
  188. /package/{logging → dist/logging}/MockLoggingService.js +0 -0
  189. /package/{logging → dist/logging}/MockLoggingService.js.map +0 -0
  190. /package/{logging → dist/logging}/NewRelicLoggingService.js +0 -0
  191. /package/{logging → dist/logging}/NewRelicLoggingService.js.map +0 -0
  192. /package/{logging → dist/logging}/index.js +0 -0
  193. /package/{logging → dist/logging}/index.js.map +0 -0
  194. /package/{logging → dist/logging}/interface.js +0 -0
  195. /package/{logging → dist/logging}/interface.js.map +0 -0
  196. /package/{pubSub.js → dist/pubSub.js} +0 -0
  197. /package/{pubSub.js.map → dist/pubSub.js.map} +0 -0
  198. /package/{react → dist/react}/AppContext.js +0 -0
  199. /package/{react → dist/react}/AppContext.js.map +0 -0
  200. /package/{react → dist/react}/AppProvider.js +0 -0
  201. /package/{react → dist/react}/AppProvider.js.map +0 -0
  202. /package/{react → dist/react}/AuthenticatedPageRoute.js +0 -0
  203. /package/{react → dist/react}/AuthenticatedPageRoute.js.map +0 -0
  204. /package/{react → dist/react}/ErrorBoundary.js +0 -0
  205. /package/{react → dist/react}/ErrorBoundary.js.map +0 -0
  206. /package/{react → dist/react}/ErrorPage.js +0 -0
  207. /package/{react → dist/react}/ErrorPage.js.map +0 -0
  208. /package/{react → dist/react}/LoginRedirect.js +0 -0
  209. /package/{react → dist/react}/LoginRedirect.js.map +0 -0
  210. /package/{react → dist/react}/OptionalReduxProvider.js +0 -0
  211. /package/{react → dist/react}/OptionalReduxProvider.js.map +0 -0
  212. /package/{react → dist/react}/PageRoute.js +0 -0
  213. /package/{react → dist/react}/PageRoute.js.map +0 -0
  214. /package/{react → dist/react}/hooks.js +0 -0
  215. /package/{react → dist/react}/hooks.js.map +0 -0
  216. /package/{react → dist/react}/index.js +0 -0
  217. /package/{react → dist/react}/index.js.map +0 -0
  218. /package/{scripts → dist/scripts}/GoogleAnalyticsLoader.js +0 -0
  219. /package/{scripts → dist/scripts}/GoogleAnalyticsLoader.js.map +0 -0
  220. /package/{scripts → dist/scripts}/index.js +0 -0
  221. /package/{scripts → dist/scripts}/index.js.map +0 -0
  222. /package/{testing → dist/testing}/index.js +0 -0
  223. /package/{testing → dist/testing}/index.js.map +0 -0
  224. /package/{testing → dist/testing}/initializeMockApp.js +0 -0
  225. /package/{testing → dist/testing}/initializeMockApp.js.map +0 -0
  226. /package/{testing → dist/testing}/mockMessages.js +0 -0
  227. /package/{testing → dist/testing}/mockMessages.js.map +0 -0
  228. /package/{utils.js → dist/utils.js} +0 -0
  229. /package/{utils.js.map → dist/utils.js.map} +0 -0
@@ -0,0 +1,111 @@
1
+ /* JSDoc prettify.js theme */
2
+
3
+ /* plain text */
4
+ .pln {
5
+ color: #000000;
6
+ font-weight: normal;
7
+ font-style: normal;
8
+ }
9
+
10
+ /* string content */
11
+ .str {
12
+ color: #006400;
13
+ font-weight: normal;
14
+ font-style: normal;
15
+ }
16
+
17
+ /* a keyword */
18
+ .kwd {
19
+ color: #000000;
20
+ font-weight: bold;
21
+ font-style: normal;
22
+ }
23
+
24
+ /* a comment */
25
+ .com {
26
+ font-weight: normal;
27
+ font-style: italic;
28
+ }
29
+
30
+ /* a type name */
31
+ .typ {
32
+ color: #000000;
33
+ font-weight: normal;
34
+ font-style: normal;
35
+ }
36
+
37
+ /* a literal value */
38
+ .lit {
39
+ color: #006400;
40
+ font-weight: normal;
41
+ font-style: normal;
42
+ }
43
+
44
+ /* punctuation */
45
+ .pun {
46
+ color: #000000;
47
+ font-weight: bold;
48
+ font-style: normal;
49
+ }
50
+
51
+ /* lisp open bracket */
52
+ .opn {
53
+ color: #000000;
54
+ font-weight: bold;
55
+ font-style: normal;
56
+ }
57
+
58
+ /* lisp close bracket */
59
+ .clo {
60
+ color: #000000;
61
+ font-weight: bold;
62
+ font-style: normal;
63
+ }
64
+
65
+ /* a markup tag name */
66
+ .tag {
67
+ color: #006400;
68
+ font-weight: normal;
69
+ font-style: normal;
70
+ }
71
+
72
+ /* a markup attribute name */
73
+ .atn {
74
+ color: #006400;
75
+ font-weight: normal;
76
+ font-style: normal;
77
+ }
78
+
79
+ /* a markup attribute value */
80
+ .atv {
81
+ color: #006400;
82
+ font-weight: normal;
83
+ font-style: normal;
84
+ }
85
+
86
+ /* a declaration */
87
+ .dec {
88
+ color: #000000;
89
+ font-weight: bold;
90
+ font-style: normal;
91
+ }
92
+
93
+ /* a variable name */
94
+ .var {
95
+ color: #000000;
96
+ font-weight: normal;
97
+ font-style: normal;
98
+ }
99
+
100
+ /* a function name */
101
+ .fun {
102
+ color: #000000;
103
+ font-weight: bold;
104
+ font-style: normal;
105
+ }
106
+
107
+ /* Specify class=linenums on a pre to get line numbering */
108
+ ol.linenums {
109
+ margin-top: 0;
110
+ margin-bottom: 0;
111
+ }
@@ -0,0 +1,132 @@
1
+ /* Tomorrow Theme */
2
+ /* Original theme - https://github.com/chriskempson/tomorrow-theme */
3
+ /* Pretty printing styles. Used with prettify.js. */
4
+ /* SPAN elements with the classes below are added by prettyprint. */
5
+ /* plain text */
6
+ .pln {
7
+ color: #4d4d4c; }
8
+
9
+ @media screen {
10
+ /* string content */
11
+ .str {
12
+ color: #718c00; }
13
+
14
+ /* a keyword */
15
+ .kwd {
16
+ color: #8959a8; }
17
+
18
+ /* a comment */
19
+ .com {
20
+ color: #8e908c; }
21
+
22
+ /* a type name */
23
+ .typ {
24
+ color: #4271ae; }
25
+
26
+ /* a literal value */
27
+ .lit {
28
+ color: #f5871f; }
29
+
30
+ /* punctuation */
31
+ .pun {
32
+ color: #4d4d4c; }
33
+
34
+ /* lisp open bracket */
35
+ .opn {
36
+ color: #4d4d4c; }
37
+
38
+ /* lisp close bracket */
39
+ .clo {
40
+ color: #4d4d4c; }
41
+
42
+ /* a markup tag name */
43
+ .tag {
44
+ color: #c82829; }
45
+
46
+ /* a markup attribute name */
47
+ .atn {
48
+ color: #f5871f; }
49
+
50
+ /* a markup attribute value */
51
+ .atv {
52
+ color: #3e999f; }
53
+
54
+ /* a declaration */
55
+ .dec {
56
+ color: #f5871f; }
57
+
58
+ /* a variable name */
59
+ .var {
60
+ color: #c82829; }
61
+
62
+ /* a function name */
63
+ .fun {
64
+ color: #4271ae; } }
65
+ /* Use higher contrast and text-weight for printable form. */
66
+ @media print, projection {
67
+ .str {
68
+ color: #060; }
69
+
70
+ .kwd {
71
+ color: #006;
72
+ font-weight: bold; }
73
+
74
+ .com {
75
+ color: #600;
76
+ font-style: italic; }
77
+
78
+ .typ {
79
+ color: #404;
80
+ font-weight: bold; }
81
+
82
+ .lit {
83
+ color: #044; }
84
+
85
+ .pun, .opn, .clo {
86
+ color: #440; }
87
+
88
+ .tag {
89
+ color: #006;
90
+ font-weight: bold; }
91
+
92
+ .atn {
93
+ color: #404; }
94
+
95
+ .atv {
96
+ color: #060; } }
97
+ /* Style */
98
+ /*
99
+ pre.prettyprint {
100
+ background: white;
101
+ font-family: Consolas, Monaco, 'Andale Mono', monospace;
102
+ font-size: 12px;
103
+ line-height: 1.5;
104
+ border: 1px solid #ccc;
105
+ padding: 10px; }
106
+ */
107
+
108
+ /* Specify class=linenums on a pre to get line numbering */
109
+ ol.linenums {
110
+ margin-top: 0;
111
+ margin-bottom: 0; }
112
+
113
+ /* IE indents via margin-left */
114
+ li.L0,
115
+ li.L1,
116
+ li.L2,
117
+ li.L3,
118
+ li.L4,
119
+ li.L5,
120
+ li.L6,
121
+ li.L7,
122
+ li.L8,
123
+ li.L9 {
124
+ /* */ }
125
+
126
+ /* Alternate shading for lines */
127
+ li.L1,
128
+ li.L3,
129
+ li.L5,
130
+ li.L7,
131
+ li.L9 {
132
+ /* */ }
@@ -0,0 +1,10 @@
1
+ <?js
2
+ var data = obj;
3
+ var self = this;
4
+ ?>
5
+
6
+ <?js if (data.augments && data.augments.length) { ?>
7
+ <ul><?js data.augments.forEach(function(a) { ?>
8
+ <li><?js= self.linkto(a, a) ?></li>
9
+ <?js }) ?></ul>
10
+ <?js } ?>
@@ -0,0 +1,196 @@
1
+ <?js
2
+ var self = this;
3
+ var isGlobalPage;
4
+
5
+ docs.forEach(function(doc, i) {
6
+ ?>
7
+
8
+ <?js
9
+ // we only need to check this once
10
+ if (typeof isGlobalPage === 'undefined') {
11
+ isGlobalPage = (doc.kind === 'globalobj');
12
+ }
13
+ ?>
14
+ <?js if (doc.kind === 'mainpage' || (doc.kind === 'package')) { ?>
15
+ <?js= self.partial('mainpage.tmpl', doc) ?>
16
+ <?js } else if (doc.kind === 'source') { ?>
17
+ <?js= self.partial('source.tmpl', doc) ?>
18
+ <?js } else { ?>
19
+
20
+ <section>
21
+
22
+ <header>
23
+ <?js if (!doc.longname || doc.kind !== 'module') { ?>
24
+ <h2><?js if (doc.attribs) { ?><span class="attribs"><?js= doc.attribs ?></span><?js }
25
+ if (doc.ancestors && doc.ancestors.length) { ?>
26
+ <span class="ancestors"><?js= doc.ancestors.join('') ?></span><?js
27
+ }
28
+ ?><?js= doc.name ?><?js
29
+ if (doc.variation) { ?>
30
+ <sup class="variation"><?js= doc.variation ?></sup><?js }
31
+ if (doc.signature && !doc.hideconstructor) { ?><?js= doc.signature ?><?js } ?></h2>
32
+ <?js if (doc.classdesc) { ?>
33
+ <div class="class-description"><?js= doc.classdesc ?></div>
34
+ <?js } ?>
35
+ <?js } else if (doc.kind === 'module' && doc.modules) { ?>
36
+ <?js doc.modules.forEach(function(module) { ?>
37
+ <?js if (module.classdesc) { ?>
38
+ <div class="class-description"><?js= module.classdesc ?></div>
39
+ <?js } ?>
40
+ <?js }) ?>
41
+ <?js } ?>
42
+ </header>
43
+
44
+ <article>
45
+ <div class="container-overview">
46
+ <?js if (doc.kind === 'module' && doc.modules) { ?>
47
+ <?js if (doc.description) { ?>
48
+ <div class="description"><?js= doc.description ?></div>
49
+ <?js } ?>
50
+
51
+ <?js doc.modules.forEach(function(module) { ?>
52
+ <?js= self.partial('method.tmpl', module) ?>
53
+ <?js }) ?>
54
+ <?js } else if (doc.kind === 'class' || (doc.kind === 'namespace' && doc.signature)) { ?>
55
+ <?js= self.partial('method.tmpl', doc) ?>
56
+ <?js } else { ?>
57
+ <?js if (doc.description) { ?>
58
+ <div class="description"><?js= doc.description ?></div>
59
+ <?js } ?>
60
+
61
+ <?js= self.partial('details.tmpl', doc) ?>
62
+
63
+ <?js if (doc.examples && doc.examples.length) { ?>
64
+ <h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
65
+ <?js= self.partial('examples.tmpl', doc.examples) ?>
66
+ <?js } ?>
67
+ <?js } ?>
68
+ </div>
69
+
70
+ <?js if (doc.augments && doc.augments.length) { ?>
71
+ <h3 class="subsection-title">Extends</h3>
72
+
73
+ <?js= self.partial('augments.tmpl', doc) ?>
74
+ <?js } ?>
75
+
76
+ <?js if (doc.requires && doc.requires.length) { ?>
77
+ <h3 class="subsection-title">Requires</h3>
78
+
79
+ <ul><?js doc.requires.forEach(function(r) { ?>
80
+ <li><?js= self.linkto(r, r) ?></li>
81
+ <?js }); ?></ul>
82
+ <?js } ?>
83
+
84
+ <?js
85
+ var classes = self.find({kind: 'class', memberof: doc.longname});
86
+ if (!isGlobalPage && classes && classes.length) {
87
+ ?>
88
+ <h3 class="subsection-title">Classes</h3>
89
+
90
+ <dl><?js classes.forEach(function(c) { ?>
91
+ <dt><?js= self.linkto(c.longname, c.name) ?></dt>
92
+ <dd><?js if (c.summary) { ?><?js= c.summary ?><?js } ?></dd>
93
+ <?js }); ?></dl>
94
+ <?js } ?>
95
+
96
+ <?js
97
+ var interfaces = self.find({kind: 'interface', memberof: doc.longname});
98
+ if (!isGlobalPage && interfaces && interfaces.length) {
99
+ ?>
100
+ <h3 class="subsection-title">Interfaces</h3>
101
+
102
+ <dl><?js interfaces.forEach(function(i) { ?>
103
+ <dt><?js= self.linkto(i.longname, i.name) ?></dt>
104
+ <dd><?js if (i.summary) { ?><?js= i.summary ?><?js } ?></dd>
105
+ <?js }); ?></dl>
106
+ <?js } ?>
107
+
108
+ <?js
109
+ var mixins = self.find({kind: 'mixin', memberof: doc.longname});
110
+ if (!isGlobalPage && mixins && mixins.length) {
111
+ ?>
112
+ <h3 class="subsection-title">Mixins</h3>
113
+
114
+ <dl><?js mixins.forEach(function(m) { ?>
115
+ <dt><?js= self.linkto(m.longname, m.name) ?></dt>
116
+ <dd><?js if (m.summary) { ?><?js= m.summary ?><?js } ?></dd>
117
+ <?js }); ?></dl>
118
+ <?js } ?>
119
+
120
+ <?js
121
+ var namespaces = self.find({kind: 'namespace', memberof: doc.longname});
122
+ if (!isGlobalPage && namespaces && namespaces.length) {
123
+ ?>
124
+ <h3 class="subsection-title">Namespaces</h3>
125
+
126
+ <dl><?js namespaces.forEach(function(n) { ?>
127
+ <dt><?js= self.linkto(n.longname, n.name) ?></dt>
128
+ <dd><?js if (n.summary) { ?><?js= n.summary ?><?js } ?></dd>
129
+ <?js }); ?></dl>
130
+ <?js } ?>
131
+
132
+ <?js
133
+ var members = self.find({kind: 'member', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
134
+
135
+ // symbols that are assigned to module.exports are not globals, even though they're not a memberof anything
136
+ if (isGlobalPage && members && members.length && members.forEach) {
137
+ members = members.filter(function(m) {
138
+ return m.longname && m.longname.indexOf('module:') !== 0;
139
+ });
140
+ }
141
+ if (members && members.length && members.forEach) {
142
+ ?>
143
+ <h3 class="subsection-title">Members</h3>
144
+
145
+ <?js members.forEach(function(p) { ?>
146
+ <?js= self.partial('members.tmpl', p) ?>
147
+ <?js }); ?>
148
+ <?js } ?>
149
+
150
+ <?js
151
+ var methods = self.find({kind: 'function', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
152
+ if (methods && methods.length && methods.forEach) {
153
+ ?>
154
+ <h3 class="subsection-title">Methods</h3>
155
+
156
+ <?js methods.forEach(function(m) { ?>
157
+ <?js= self.partial('method.tmpl', m) ?>
158
+ <?js }); ?>
159
+ <?js } ?>
160
+
161
+ <?js
162
+ var typedefs = self.find({kind: 'typedef', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
163
+ if (typedefs && typedefs.length && typedefs.forEach) {
164
+ ?>
165
+ <h3 class="subsection-title">Type Definitions</h3>
166
+
167
+ <?js typedefs.forEach(function(e) {
168
+ if (e.signature) {
169
+ ?>
170
+ <?js= self.partial('method.tmpl', e) ?>
171
+ <?js
172
+ }
173
+ else {
174
+ ?>
175
+ <?js= self.partial('members.tmpl', e) ?>
176
+ <?js
177
+ }
178
+ }); ?>
179
+ <?js } ?>
180
+
181
+ <?js
182
+ var events = self.find({kind: 'event', memberof: isGlobalPage ? {isUndefined: true} : doc.longname});
183
+ if (events && events.length && events.forEach) {
184
+ ?>
185
+ <h3 class="subsection-title">Events</h3>
186
+
187
+ <?js events.forEach(function(e) { ?>
188
+ <?js= self.partial('method.tmpl', e) ?>
189
+ <?js }); ?>
190
+ <?js } ?>
191
+ </article>
192
+
193
+ </section>
194
+ <?js } ?>
195
+
196
+ <?js }); ?>
@@ -0,0 +1,143 @@
1
+ <?js
2
+ var data = obj;
3
+ var self = this;
4
+ var defaultObjectClass = '';
5
+
6
+ // Check if the default value is an object or array; if so, apply code highlighting
7
+ if (data.defaultvalue && (data.defaultvaluetype === 'object' || data.defaultvaluetype === 'array')) {
8
+ data.defaultvalue = "<pre class=\"prettyprint\"><code>" + data.defaultvalue + "</code></pre>";
9
+ defaultObjectClass = ' class="object-value"';
10
+ }
11
+ ?>
12
+ <?js
13
+ var properties = data.properties;
14
+ if (properties && properties.length && properties.forEach && !data.hideconstructor) {
15
+ ?>
16
+
17
+ <h5 class="subsection-title">Properties:</h5>
18
+
19
+ <?js= this.partial('properties.tmpl', data) ?>
20
+
21
+ <?js } ?>
22
+
23
+ <dl class="details">
24
+
25
+ <?js if (data.version) {?>
26
+ <dt class="tag-version">Version:</dt>
27
+ <dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd>
28
+ <?js } ?>
29
+
30
+ <?js if (data.since) {?>
31
+ <dt class="tag-since">Since:</dt>
32
+ <dd class="tag-since"><ul class="dummy"><li><?js= since ?></li></ul></dd>
33
+ <?js } ?>
34
+
35
+ <?js if (data.inherited && data.inherits && !data.overrides) { ?>
36
+ <dt class="inherited-from">Inherited From:</dt>
37
+ <dd class="inherited-from"><ul class="dummy"><li>
38
+ <?js= this.linkto(data.inherits, this.htmlsafe(data.inherits)) ?>
39
+ </li></ul></dd>
40
+ <?js } ?>
41
+
42
+ <?js if (data.overrides) { ?>
43
+ <dt class="tag-overrides">Overrides:</dt>
44
+ <dd class="tag-overrides"><ul class="dummy"><li>
45
+ <?js= this.linkto(data.overrides, this.htmlsafe(data.overrides)) ?>
46
+ </li></ul></dd>
47
+ <?js } ?>
48
+
49
+ <?js if (data.implementations && data.implementations.length) { ?>
50
+ <dt class="implementations">Implementations:</dt>
51
+ <dd class="implementations"><ul>
52
+ <?js data.implementations.forEach(function(impl) { ?>
53
+ <li><?js= self.linkto(impl, self.htmlsafe(impl)) ?></li>
54
+ <?js }); ?>
55
+ </ul></dd>
56
+ <?js } ?>
57
+
58
+ <?js if (data.implements && data.implements.length) { ?>
59
+ <dt class="implements">Implements:</dt>
60
+ <dd class="implements"><ul>
61
+ <?js data.implements.forEach(function(impl) { ?>
62
+ <li><?js= self.linkto(impl, self.htmlsafe(impl)) ?></li>
63
+ <?js }); ?>
64
+ </ul></dd>
65
+ <?js } ?>
66
+
67
+ <?js if (data.mixes && data.mixes.length) { ?>
68
+ <dt class="mixes">Mixes In:</dt>
69
+
70
+ <dd class="mixes"><ul>
71
+ <?js data.mixes.forEach(function(a) { ?>
72
+ <li><?js= self.linkto(a, a) ?></li>
73
+ <?js }); ?>
74
+ </ul></dd>
75
+ <?js } ?>
76
+
77
+ <?js if (data.deprecated) { ?>
78
+ <dt class="important tag-deprecated">Deprecated:</dt><?js
79
+ if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
80
+ else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li></ul></dd><?js }
81
+ ?>
82
+ <?js } ?>
83
+
84
+ <?js if (data.author && author.length) {?>
85
+ <dt class="tag-author">Author:</dt>
86
+ <dd class="tag-author">
87
+ <ul><?js author.forEach(function(a) { ?>
88
+ <li><?js= self.resolveAuthorLinks(a) ?></li>
89
+ <?js }); ?></ul>
90
+ </dd>
91
+ <?js } ?>
92
+
93
+ <?js if (data.copyright) {?>
94
+ <dt class="tag-copyright">Copyright:</dt>
95
+ <dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd>
96
+ <?js } ?>
97
+
98
+ <?js if (data.license) {?>
99
+ <dt class="tag-license">License:</dt>
100
+ <dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd>
101
+ <?js } ?>
102
+
103
+ <?js if (data.defaultvalue) {?>
104
+ <dt class="tag-default">Default Value:</dt>
105
+ <dd class="tag-default"><ul class="dummy">
106
+ <li<?js= defaultObjectClass ?>><?js= data.defaultvalue ?></li>
107
+ </ul></dd>
108
+ <?js } ?>
109
+
110
+ <?js if (data.meta && self.outputSourceFiles) {?>
111
+ <dt class="tag-source">Source:</dt>
112
+ <dd class="tag-source"><ul class="dummy"><li>
113
+ <?js= self.linkto(meta.shortpath) ?>, <?js= self.linkto(meta.shortpath, 'line ' + meta.lineno, null, 'line' + meta.lineno) ?>
114
+ </li></ul></dd>
115
+ <?js } ?>
116
+
117
+ <?js if (data.tutorials && tutorials.length) {?>
118
+ <dt class="tag-tutorial">Tutorials:</dt>
119
+ <dd class="tag-tutorial">
120
+ <ul><?js tutorials.forEach(function(t) { ?>
121
+ <li><?js= self.tutoriallink(t) ?></li>
122
+ <?js }); ?></ul>
123
+ </dd>
124
+ <?js } ?>
125
+
126
+ <?js if (data.see && see.length) {?>
127
+ <dt class="tag-see">See:</dt>
128
+ <dd class="tag-see">
129
+ <ul><?js see.forEach(function(s) { ?>
130
+ <li><?js= self.linkto(s) ?></li>
131
+ <?js }); ?></ul>
132
+ </dd>
133
+ <?js } ?>
134
+
135
+ <?js if (data.todo && todo.length) {?>
136
+ <dt class="tag-todo">To Do:</dt>
137
+ <dd class="tag-todo">
138
+ <ul><?js todo.forEach(function(t) { ?>
139
+ <li><?js= t ?></li>
140
+ <?js }); ?></ul>
141
+ </dd>
142
+ <?js } ?>
143
+ </dl>
@@ -0,0 +1,2 @@
1
+ <?js var data = obj; ?>
2
+ <pre><code><?js= data ?></code></pre>
@@ -0,0 +1,13 @@
1
+ <?js
2
+ var data = obj;
3
+ var self = this;
4
+
5
+ data.forEach(function(example) {
6
+ if (example.caption) {
7
+ ?>
8
+ <p class="code-caption"><?js= example.caption ?></p>
9
+ <?js } ?>
10
+ <pre class="prettyprint"><code><?js= self.htmlsafe(example.code) ?></code></pre>
11
+ <?js
12
+ });
13
+ ?>
@@ -0,0 +1,32 @@
1
+ <?js
2
+ var data = obj;
3
+ ?>
4
+ <?js if (data.description && data.type && data.type.names) { ?>
5
+ <dl>
6
+ <dt>
7
+ <div class="param-desc">
8
+ <?js= data.description ?>
9
+ </div>
10
+ </dt>
11
+ <dd></dd>
12
+ <dt>
13
+ <dl>
14
+ <dt>
15
+ Type
16
+ </dt>
17
+ <dd>
18
+ <?js= this.partial('type.tmpl', data.type.names) ?>
19
+ </dd>
20
+ </dl>
21
+ </dt>
22
+ <dd></dd>
23
+ </dl>
24
+ <?js } else { ?>
25
+ <div class="param-desc">
26
+ <?js if (data.description) { ?>
27
+ <?js= data.description ?>
28
+ <?js } else if (data.type && data.type.names) { ?>
29
+ <?js= this.partial('type.tmpl', data.type.names) ?>
30
+ <?js } ?>
31
+ </div>
32
+ <?js } ?>
@@ -0,0 +1,39 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: <?js= title ?></title>
6
+
7
+ <script src="scripts/prettify/prettify.js"> </script>
8
+ <script src="scripts/prettify/lang-css.js"> </script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
13
+
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
16
+ </head>
17
+
18
+ <body data-module="<?js= moduleName ?>">
19
+
20
+ <div id="main">
21
+ <h1 class="page-title"><?js= title ?></h1>
22
+
23
+ <?js= content ?>
24
+ </div>
25
+
26
+ <nav>
27
+ <?js= this.nav ?>
28
+ </nav>
29
+
30
+ <br class="clear">
31
+
32
+ <footer>
33
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc <?js= env.version.number ?></a><?js if(env.conf.templates && env.conf.templates.default && env.conf.templates.default.includeDate !== false) { ?> on <?js= (new Date()) ?><?js } ?>
34
+ </footer>
35
+
36
+ <script> prettyPrint(); </script>
37
+ <script src="scripts/linenumber.js"> </script>
38
+ </body>
39
+ </html>
@@ -0,0 +1,10 @@
1
+ <?js
2
+ var data = obj;
3
+ var self = this;
4
+ ?>
5
+
6
+ <?js if (data.readme) { ?>
7
+ <section>
8
+ <article><?js= data.readme ?></article>
9
+ </section>
10
+ <?js } ?>