@edx/frontend-platform 4.6.2 → 4.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/.env.development +0 -30
- package/.env.test +0 -30
- package/.eslintignore +0 -6
- package/.eslintrc.js +0 -28
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -13
- package/.github/workflows/add-depr-ticket-to-depr-board.yml +0 -19
- package/.github/workflows/add-remove-label-on-comment.yml +0 -20
- package/.github/workflows/ci.yml +0 -42
- package/.github/workflows/commitlint.yml +0 -10
- package/.github/workflows/lockfileversion-check.yml +0 -13
- package/.github/workflows/manual-publish.yml +0 -43
- package/.github/workflows/npm-deprecate.yml +0 -22
- package/.github/workflows/release.yml +0 -45
- package/.github/workflows/self-assign-issue.yml +0 -12
- package/.github/workflows/update-browserslist-db.yml +0 -12
- package/.nvmrc +0 -1
- package/.releaserc +0 -32
- package/catalog-info.yaml +0 -21
- package/dist/LICENSE +0 -661
- package/dist/README.md +0 -155
- package/dist/package.json +0 -86
- package/docs/addTagsPlugin.js +0 -10
- package/docs/auth-API.md +0 -114
- package/docs/decisions/0001-record-architecture-decisions.rst +0 -32
- package/docs/decisions/0002-frontend-base-design-goals.rst +0 -222
- package/docs/decisions/0003-consolidation-into-frontend-platform.rst +0 -71
- package/docs/decisions/0004-axios-caching-implementation.rst +0 -88
- package/docs/decisions/0005-token-null-after-successful-refresh.rst +0 -69
- package/docs/decisions/0006-middleware-support-for-http-clients.rst +0 -44
- package/docs/decisions/0007-javascript-file-configuration.rst +0 -143
- package/docs/how_tos/automatic-case-conversion.rst +0 -58
- package/docs/how_tos/caching.rst +0 -93
- package/docs/how_tos/i18n.rst +0 -305
- package/docs/removeExport.js +0 -24
- package/docs/template/edx/README.md +0 -12
- package/docs/template/edx/publish.js +0 -713
- package/docs/template/edx/static/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/template/edx/static/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docs/template/edx/static/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/template/edx/static/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/template/edx/static/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docs/template/edx/static/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/template/edx/static/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/template/edx/static/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docs/template/edx/static/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/template/edx/static/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/template/edx/static/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docs/template/edx/static/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/template/edx/static/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/template/edx/static/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docs/template/edx/static/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/template/edx/static/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/template/edx/static/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docs/template/edx/static/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/template/edx/static/scripts/linenumber.js +0 -25
- package/docs/template/edx/static/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/template/edx/static/scripts/prettify/lang-css.js +0 -2
- package/docs/template/edx/static/scripts/prettify/prettify.js +0 -28
- package/docs/template/edx/static/styles/jsdoc-default.css +0 -356
- package/docs/template/edx/static/styles/prettify-jsdoc.css +0 -111
- package/docs/template/edx/static/styles/prettify-tomorrow.css +0 -132
- package/docs/template/edx/tmpl/augments.tmpl +0 -10
- package/docs/template/edx/tmpl/container.tmpl +0 -196
- package/docs/template/edx/tmpl/details.tmpl +0 -143
- package/docs/template/edx/tmpl/example.tmpl +0 -2
- package/docs/template/edx/tmpl/examples.tmpl +0 -13
- package/docs/template/edx/tmpl/exceptions.tmpl +0 -32
- package/docs/template/edx/tmpl/layout.tmpl +0 -39
- package/docs/template/edx/tmpl/mainpage.tmpl +0 -10
- package/docs/template/edx/tmpl/members.tmpl +0 -38
- package/docs/template/edx/tmpl/method.tmpl +0 -131
- package/docs/template/edx/tmpl/modifies.tmpl +0 -14
- package/docs/template/edx/tmpl/params.tmpl +0 -131
- package/docs/template/edx/tmpl/properties.tmpl +0 -108
- package/docs/template/edx/tmpl/returns.tmpl +0 -19
- package/docs/template/edx/tmpl/source.tmpl +0 -8
- package/docs/template/edx/tmpl/tutorial.tmpl +0 -19
- package/docs/template/edx/tmpl/type.tmpl +0 -7
- package/env.config.js +0 -8
- package/jsdoc.json +0 -36
- package/openedx.yaml +0 -12
- package/service-interface.png +0 -0
- package/src/analytics/MockAnalyticsService.js +0 -71
- package/src/analytics/SegmentAnalyticsService.js +0 -243
- package/src/analytics/index.js +0 -12
- package/src/analytics/interface.js +0 -142
- package/src/auth/AxiosCsrfTokenService.js +0 -60
- package/src/auth/AxiosJwtAuthService.js +0 -364
- package/src/auth/AxiosJwtTokenService.js +0 -134
- package/src/auth/LocalForageCache.js +0 -78
- package/src/auth/MockAuthService.js +0 -285
- package/src/auth/index.js +0 -19
- package/src/auth/interceptors/createCsrfTokenProviderInterceptor.js +0 -37
- package/src/auth/interceptors/createJwtTokenProviderInterceptor.js +0 -38
- package/src/auth/interceptors/createProcessAxiosRequestErrorInterceptor.js +0 -20
- package/src/auth/interceptors/createRetryInterceptor.js +0 -72
- package/src/auth/interface.js +0 -309
- package/src/auth/utils.js +0 -105
- package/src/config.js +0 -327
- package/src/constants.js +0 -66
- package/src/i18n/countries.js +0 -57
- package/src/i18n/index.js +0 -123
- package/src/i18n/injectIntlWithShim.jsx +0 -45
- package/src/i18n/languages.js +0 -60
- package/src/i18n/lib.js +0 -282
- package/src/i18n/scripts/README.md +0 -29
- package/src/i18n/scripts/intl-imports.js +0 -259
- package/src/i18n/scripts/transifex-utils.js +0 -75
- package/src/index.js +0 -42
- package/src/initialize.js +0 -357
- package/src/logging/MockLoggingService.js +0 -31
- package/src/logging/NewRelicLoggingService.js +0 -181
- package/src/logging/index.js +0 -9
- package/src/logging/interface.js +0 -110
- package/src/pubSub.js +0 -47
- package/src/react/AppContext.jsx +0 -24
- package/src/react/AppProvider.jsx +0 -93
- package/src/react/AuthenticatedPageRoute.jsx +0 -60
- package/src/react/ErrorBoundary.jsx +0 -44
- package/src/react/ErrorPage.jsx +0 -76
- package/src/react/LoginRedirect.jsx +0 -16
- package/src/react/OptionalReduxProvider.jsx +0 -28
- package/src/react/PageRoute.jsx +0 -31
- package/src/react/hooks.js +0 -50
- package/src/react/index.js +0 -16
- package/src/scripts/GoogleAnalyticsLoader.js +0 -53
- package/src/scripts/index.js +0 -2
- package/src/testing/index.js +0 -9
- package/src/testing/initializeMockApp.js +0 -77
- package/src/testing/mockMessages.js +0 -21
- package/src/utils.js +0 -167
- /package/{dist/analytics → analytics}/MockAnalyticsService.js +0 -0
- /package/{dist/analytics → analytics}/MockAnalyticsService.js.map +0 -0
- /package/{dist/analytics → analytics}/SegmentAnalyticsService.js +0 -0
- /package/{dist/analytics → analytics}/SegmentAnalyticsService.js.map +0 -0
- /package/{dist/analytics → analytics}/index.js +0 -0
- /package/{dist/analytics → analytics}/index.js.map +0 -0
- /package/{dist/analytics → analytics}/interface.js +0 -0
- /package/{dist/analytics → analytics}/interface.js.map +0 -0
- /package/{dist/auth → auth}/AxiosCsrfTokenService.js +0 -0
- /package/{dist/auth → auth}/AxiosCsrfTokenService.js.map +0 -0
- /package/{dist/auth → auth}/AxiosJwtAuthService.js +0 -0
- /package/{dist/auth → auth}/AxiosJwtAuthService.js.map +0 -0
- /package/{dist/auth → auth}/AxiosJwtTokenService.js +0 -0
- /package/{dist/auth → auth}/AxiosJwtTokenService.js.map +0 -0
- /package/{dist/auth → auth}/LocalForageCache.js +0 -0
- /package/{dist/auth → auth}/LocalForageCache.js.map +0 -0
- /package/{dist/auth → auth}/MockAuthService.js +0 -0
- /package/{dist/auth → auth}/MockAuthService.js.map +0 -0
- /package/{dist/auth → auth}/index.js +0 -0
- /package/{dist/auth → auth}/index.js.map +0 -0
- /package/{dist/auth → auth}/interceptors/createCsrfTokenProviderInterceptor.js +0 -0
- /package/{dist/auth → auth}/interceptors/createCsrfTokenProviderInterceptor.js.map +0 -0
- /package/{dist/auth → auth}/interceptors/createJwtTokenProviderInterceptor.js +0 -0
- /package/{dist/auth → auth}/interceptors/createJwtTokenProviderInterceptor.js.map +0 -0
- /package/{dist/auth → auth}/interceptors/createProcessAxiosRequestErrorInterceptor.js +0 -0
- /package/{dist/auth → auth}/interceptors/createProcessAxiosRequestErrorInterceptor.js.map +0 -0
- /package/{dist/auth → auth}/interceptors/createRetryInterceptor.js +0 -0
- /package/{dist/auth → auth}/interceptors/createRetryInterceptor.js.map +0 -0
- /package/{dist/auth → auth}/interface.js +0 -0
- /package/{dist/auth → auth}/interface.js.map +0 -0
- /package/{dist/auth → auth}/utils.js +0 -0
- /package/{dist/auth → auth}/utils.js.map +0 -0
- /package/{dist/config.js → config.js} +0 -0
- /package/{dist/config.js.map → config.js.map} +0 -0
- /package/{dist/constants.js → constants.js} +0 -0
- /package/{dist/constants.js.map → constants.js.map} +0 -0
- /package/{dist/i18n → i18n}/countries.js +0 -0
- /package/{dist/i18n → i18n}/countries.js.map +0 -0
- /package/{dist/i18n → i18n}/index.js +0 -0
- /package/{dist/i18n → i18n}/index.js.map +0 -0
- /package/{dist/i18n → i18n}/injectIntlWithShim.js +0 -0
- /package/{dist/i18n → i18n}/injectIntlWithShim.js.map +0 -0
- /package/{dist/i18n → i18n}/languages.js +0 -0
- /package/{dist/i18n → i18n}/languages.js.map +0 -0
- /package/{dist/i18n → i18n}/lib.js +0 -0
- /package/{dist/i18n → i18n}/lib.js.map +0 -0
- /package/{dist/i18n → i18n}/scripts/README.md +0 -0
- /package/{dist/i18n → i18n}/scripts/intl-imports.js +0 -0
- /package/{dist/i18n → i18n}/scripts/intl-imports.js.map +0 -0
- /package/{dist/i18n → i18n}/scripts/transifex-utils.js +0 -0
- /package/{dist/i18n → i18n}/scripts/transifex-utils.js.map +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/index.js.map → index.js.map} +0 -0
- /package/{dist/initialize.js → initialize.js} +0 -0
- /package/{dist/initialize.js.map → initialize.js.map} +0 -0
- /package/{dist/logging → logging}/MockLoggingService.js +0 -0
- /package/{dist/logging → logging}/MockLoggingService.js.map +0 -0
- /package/{dist/logging → logging}/NewRelicLoggingService.js +0 -0
- /package/{dist/logging → logging}/NewRelicLoggingService.js.map +0 -0
- /package/{dist/logging → logging}/index.js +0 -0
- /package/{dist/logging → logging}/index.js.map +0 -0
- /package/{dist/logging → logging}/interface.js +0 -0
- /package/{dist/logging → logging}/interface.js.map +0 -0
- /package/{dist/pubSub.js → pubSub.js} +0 -0
- /package/{dist/pubSub.js.map → pubSub.js.map} +0 -0
- /package/{dist/react → react}/AppContext.js +0 -0
- /package/{dist/react → react}/AppContext.js.map +0 -0
- /package/{dist/react → react}/AppProvider.js +0 -0
- /package/{dist/react → react}/AppProvider.js.map +0 -0
- /package/{dist/react → react}/AuthenticatedPageRoute.js +0 -0
- /package/{dist/react → react}/AuthenticatedPageRoute.js.map +0 -0
- /package/{dist/react → react}/ErrorBoundary.js +0 -0
- /package/{dist/react → react}/ErrorBoundary.js.map +0 -0
- /package/{dist/react → react}/ErrorPage.js +0 -0
- /package/{dist/react → react}/ErrorPage.js.map +0 -0
- /package/{dist/react → react}/LoginRedirect.js +0 -0
- /package/{dist/react → react}/LoginRedirect.js.map +0 -0
- /package/{dist/react → react}/OptionalReduxProvider.js +0 -0
- /package/{dist/react → react}/OptionalReduxProvider.js.map +0 -0
- /package/{dist/react → react}/PageRoute.js +0 -0
- /package/{dist/react → react}/PageRoute.js.map +0 -0
- /package/{dist/react → react}/hooks.js +0 -0
- /package/{dist/react → react}/hooks.js.map +0 -0
- /package/{dist/react → react}/index.js +0 -0
- /package/{dist/react → react}/index.js.map +0 -0
- /package/{dist/scripts → scripts}/GoogleAnalyticsLoader.js +0 -0
- /package/{dist/scripts → scripts}/GoogleAnalyticsLoader.js.map +0 -0
- /package/{dist/scripts → scripts}/index.js +0 -0
- /package/{dist/scripts → scripts}/index.js.map +0 -0
- /package/{dist/testing → testing}/index.js +0 -0
- /package/{dist/testing → testing}/index.js.map +0 -0
- /package/{dist/testing → testing}/initializeMockApp.js +0 -0
- /package/{dist/testing → testing}/initializeMockApp.js.map +0 -0
- /package/{dist/testing → testing}/mockMessages.js +0 -0
- /package/{dist/testing → testing}/mockMessages.js.map +0 -0
- /package/{dist/utils.js → utils.js} +0 -0
- /package/{dist/utils.js.map → utils.js.map} +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var data = obj;
|
|
3
|
-
var self = this;
|
|
4
|
-
?>
|
|
5
|
-
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + name + (data.signature ? data.signature : '') ?></h4>
|
|
6
|
-
|
|
7
|
-
<?js if (data.summary) { ?>
|
|
8
|
-
<p class="summary"><?js= summary ?></p>
|
|
9
|
-
<?js } ?>
|
|
10
|
-
|
|
11
|
-
<?js if (data.description) { ?>
|
|
12
|
-
<div class="description">
|
|
13
|
-
<?js= data.description ?>
|
|
14
|
-
</div>
|
|
15
|
-
<?js } ?>
|
|
16
|
-
|
|
17
|
-
<?js if (data.type && data.type.names) {?>
|
|
18
|
-
<h5>Type:</h5>
|
|
19
|
-
<ul>
|
|
20
|
-
<li>
|
|
21
|
-
<?js= self.partial('type.tmpl', data.type.names) ?>
|
|
22
|
-
</li>
|
|
23
|
-
</ul>
|
|
24
|
-
<?js } ?>
|
|
25
|
-
|
|
26
|
-
<?js= this.partial('details.tmpl', data) ?>
|
|
27
|
-
|
|
28
|
-
<?js if (data.fires && fires.length) { ?>
|
|
29
|
-
<h5>Fires:</h5>
|
|
30
|
-
<ul><?js fires.forEach(function(f) { ?>
|
|
31
|
-
<li><?js= self.linkto(f) ?></li>
|
|
32
|
-
<?js }); ?></ul>
|
|
33
|
-
<?js } ?>
|
|
34
|
-
|
|
35
|
-
<?js if (data.examples && examples.length) { ?>
|
|
36
|
-
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
|
37
|
-
<?js= this.partial('examples.tmpl', examples) ?>
|
|
38
|
-
<?js } ?>
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var data = obj;
|
|
3
|
-
var self = this;
|
|
4
|
-
?>
|
|
5
|
-
<?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
|
|
6
|
-
<?js if (data.kind === 'class' && data.classdesc) { ?>
|
|
7
|
-
<h2>Constructor</h2>
|
|
8
|
-
<?js } ?>
|
|
9
|
-
|
|
10
|
-
<?js if (data.kind !== 'namespace') { ?>
|
|
11
|
-
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '') +
|
|
12
|
-
name + (data.signature || '') ?></h4>
|
|
13
|
-
<?js } ?>
|
|
14
|
-
|
|
15
|
-
<?js if (data.summary) { ?>
|
|
16
|
-
<p class="summary"><?js= summary ?></p>
|
|
17
|
-
<?js } ?>
|
|
18
|
-
<?js } ?>
|
|
19
|
-
|
|
20
|
-
<?js if (data.kind !== 'module' && data.description && !data.hideconstructor) { ?>
|
|
21
|
-
<div class="description">
|
|
22
|
-
<?js= data.description ?>
|
|
23
|
-
</div>
|
|
24
|
-
<?js } ?>
|
|
25
|
-
|
|
26
|
-
<?js if (data.augments && data.alias && data.alias.indexOf('module:') === 0) { ?>
|
|
27
|
-
<h5>Extends:</h5>
|
|
28
|
-
<?js= self.partial('augments.tmpl', data) ?>
|
|
29
|
-
<?js } ?>
|
|
30
|
-
|
|
31
|
-
<?js if (kind === 'event' && data.type && data.type.names) {?>
|
|
32
|
-
<h5>Type:</h5>
|
|
33
|
-
<ul>
|
|
34
|
-
<li>
|
|
35
|
-
<?js= self.partial('type.tmpl', data.type.names) ?>
|
|
36
|
-
</li>
|
|
37
|
-
</ul>
|
|
38
|
-
<?js } ?>
|
|
39
|
-
|
|
40
|
-
<?js if (data['this']) { ?>
|
|
41
|
-
<h5>This:</h5>
|
|
42
|
-
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
|
|
43
|
-
<?js } ?>
|
|
44
|
-
|
|
45
|
-
<?js if (data.params && params.length && !data.hideconstructor) { ?>
|
|
46
|
-
<h5>Parameters:</h5>
|
|
47
|
-
<?js= this.partial('params.tmpl', params) ?>
|
|
48
|
-
<?js } ?>
|
|
49
|
-
|
|
50
|
-
<?js= this.partial('details.tmpl', data) ?>
|
|
51
|
-
|
|
52
|
-
<?js if (data.kind !== 'module' && data.requires && data.requires.length) { ?>
|
|
53
|
-
<h5>Requires:</h5>
|
|
54
|
-
<ul><?js data.requires.forEach(function(r) { ?>
|
|
55
|
-
<li><?js= self.linkto(r) ?></li>
|
|
56
|
-
<?js }); ?></ul>
|
|
57
|
-
<?js } ?>
|
|
58
|
-
|
|
59
|
-
<?js if (data.fires && fires.length) { ?>
|
|
60
|
-
<h5>Fires:</h5>
|
|
61
|
-
<ul><?js fires.forEach(function(f) { ?>
|
|
62
|
-
<li><?js= self.linkto(f) ?></li>
|
|
63
|
-
<?js }); ?></ul>
|
|
64
|
-
<?js } ?>
|
|
65
|
-
|
|
66
|
-
<?js if (data.listens && listens.length) { ?>
|
|
67
|
-
<h5>Listens to Events:</h5>
|
|
68
|
-
<ul><?js listens.forEach(function(f) { ?>
|
|
69
|
-
<li><?js= self.linkto(f) ?></li>
|
|
70
|
-
<?js }); ?></ul>
|
|
71
|
-
<?js } ?>
|
|
72
|
-
|
|
73
|
-
<?js if (data.listeners && listeners.length) { ?>
|
|
74
|
-
<h5>Listeners of This Event:</h5>
|
|
75
|
-
<ul><?js listeners.forEach(function(f) { ?>
|
|
76
|
-
<li><?js= self.linkto(f) ?></li>
|
|
77
|
-
<?js }); ?></ul>
|
|
78
|
-
<?js } ?>
|
|
79
|
-
|
|
80
|
-
<?js if (data.modifies && modifies.length) {?>
|
|
81
|
-
<h5>Modifies:</h5>
|
|
82
|
-
<?js if (modifies.length > 1) { ?><ul><?js
|
|
83
|
-
modifies.forEach(function(m) { ?>
|
|
84
|
-
<li><?js= self.partial('modifies.tmpl', m) ?></li>
|
|
85
|
-
<?js });
|
|
86
|
-
?></ul><?js } else {
|
|
87
|
-
modifies.forEach(function(m) { ?>
|
|
88
|
-
<?js= self.partial('modifies.tmpl', m) ?>
|
|
89
|
-
<?js });
|
|
90
|
-
} } ?>
|
|
91
|
-
|
|
92
|
-
<?js if (data.exceptions && exceptions.length) { ?>
|
|
93
|
-
<h5>Throws:</h5>
|
|
94
|
-
<?js if (exceptions.length > 1) { ?><ul><?js
|
|
95
|
-
exceptions.forEach(function(r) { ?>
|
|
96
|
-
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
|
|
97
|
-
<?js });
|
|
98
|
-
?></ul><?js } else {
|
|
99
|
-
exceptions.forEach(function(r) { ?>
|
|
100
|
-
<?js= self.partial('exceptions.tmpl', r) ?>
|
|
101
|
-
<?js });
|
|
102
|
-
} } ?>
|
|
103
|
-
|
|
104
|
-
<?js if (data.returns && returns.length) { ?>
|
|
105
|
-
<h5>Returns:</h5>
|
|
106
|
-
<?js if (returns.length > 1) { ?><ul><?js
|
|
107
|
-
returns.forEach(function(r) { ?>
|
|
108
|
-
<li><?js= self.partial('returns.tmpl', r) ?></li>
|
|
109
|
-
<?js });
|
|
110
|
-
?></ul><?js } else {
|
|
111
|
-
returns.forEach(function(r) { ?>
|
|
112
|
-
<?js= self.partial('returns.tmpl', r) ?>
|
|
113
|
-
<?js });
|
|
114
|
-
} } ?>
|
|
115
|
-
|
|
116
|
-
<?js if (data.yields && yields.length) { ?>
|
|
117
|
-
<h5>Yields:</h5>
|
|
118
|
-
<?js if (yields.length > 1) { ?><ul><?js
|
|
119
|
-
yields.forEach(function(r) { ?>
|
|
120
|
-
<li><?js= self.partial('returns.tmpl', r) ?></li>
|
|
121
|
-
<?js });
|
|
122
|
-
?></ul><?js } else {
|
|
123
|
-
yields.forEach(function(r) { ?>
|
|
124
|
-
<?js= self.partial('returns.tmpl', r) ?>
|
|
125
|
-
<?js });
|
|
126
|
-
} } ?>
|
|
127
|
-
|
|
128
|
-
<?js if (data.examples && examples.length) { ?>
|
|
129
|
-
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
|
130
|
-
<?js= this.partial('examples.tmpl', examples) ?>
|
|
131
|
-
<?js } ?>
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var params = obj;
|
|
3
|
-
|
|
4
|
-
/* sort subparams under their parent params (like opts.classname) */
|
|
5
|
-
var parentParam = null;
|
|
6
|
-
params.forEach(function(param, i) {
|
|
7
|
-
var paramRegExp;
|
|
8
|
-
|
|
9
|
-
if (!param) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (parentParam && parentParam.name && param.name) {
|
|
14
|
-
try {
|
|
15
|
-
paramRegExp = new RegExp('^(?:' + parentParam.name + '(?:\\[\\])*)\\.(.+)$');
|
|
16
|
-
}
|
|
17
|
-
catch (e) {
|
|
18
|
-
// there's probably a typo in the JSDoc comment that resulted in a weird
|
|
19
|
-
// parameter name
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if ( paramRegExp.test(param.name) ) {
|
|
24
|
-
param.name = RegExp.$1;
|
|
25
|
-
parentParam.subparams = parentParam.subparams || [];
|
|
26
|
-
parentParam.subparams.push(param);
|
|
27
|
-
params[i] = null;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
parentParam = param;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
parentParam = param;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
/* determine if we need extra columns, "attributes" and "default" */
|
|
39
|
-
params.hasAttributes = false;
|
|
40
|
-
params.hasDefault = false;
|
|
41
|
-
params.hasName = false;
|
|
42
|
-
|
|
43
|
-
params.forEach(function(param) {
|
|
44
|
-
if (!param) { return; }
|
|
45
|
-
|
|
46
|
-
if (param.optional || param.nullable || param.variable) {
|
|
47
|
-
params.hasAttributes = true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (param.name) {
|
|
51
|
-
params.hasName = true;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (typeof param.defaultvalue !== 'undefined') {
|
|
55
|
-
params.hasDefault = true;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
?>
|
|
59
|
-
|
|
60
|
-
<table class="params">
|
|
61
|
-
<thead>
|
|
62
|
-
<tr>
|
|
63
|
-
<?js if (params.hasName) {?>
|
|
64
|
-
<th>Name</th>
|
|
65
|
-
<?js } ?>
|
|
66
|
-
|
|
67
|
-
<th>Type</th>
|
|
68
|
-
|
|
69
|
-
<?js if (params.hasAttributes) {?>
|
|
70
|
-
<th>Attributes</th>
|
|
71
|
-
<?js } ?>
|
|
72
|
-
|
|
73
|
-
<?js if (params.hasDefault) {?>
|
|
74
|
-
<th>Default</th>
|
|
75
|
-
<?js } ?>
|
|
76
|
-
|
|
77
|
-
<th class="last">Description</th>
|
|
78
|
-
</tr>
|
|
79
|
-
</thead>
|
|
80
|
-
|
|
81
|
-
<tbody>
|
|
82
|
-
<?js
|
|
83
|
-
var self = this;
|
|
84
|
-
params.forEach(function(param) {
|
|
85
|
-
if (!param) { return; }
|
|
86
|
-
?>
|
|
87
|
-
|
|
88
|
-
<tr>
|
|
89
|
-
<?js if (params.hasName) {?>
|
|
90
|
-
<td class="name"><code><?js= param.name ?></code></td>
|
|
91
|
-
<?js } ?>
|
|
92
|
-
|
|
93
|
-
<td class="type">
|
|
94
|
-
<?js if (param.type && param.type.names) {?>
|
|
95
|
-
<?js= self.partial('type.tmpl', param.type.names) ?>
|
|
96
|
-
<?js } ?>
|
|
97
|
-
</td>
|
|
98
|
-
|
|
99
|
-
<?js if (params.hasAttributes) {?>
|
|
100
|
-
<td class="attributes">
|
|
101
|
-
<?js if (param.optional) { ?>
|
|
102
|
-
<optional><br>
|
|
103
|
-
<?js } ?>
|
|
104
|
-
|
|
105
|
-
<?js if (param.nullable) { ?>
|
|
106
|
-
<nullable><br>
|
|
107
|
-
<?js } ?>
|
|
108
|
-
|
|
109
|
-
<?js if (param.variable) { ?>
|
|
110
|
-
<repeatable><br>
|
|
111
|
-
<?js } ?>
|
|
112
|
-
</td>
|
|
113
|
-
<?js } ?>
|
|
114
|
-
|
|
115
|
-
<?js if (params.hasDefault) {?>
|
|
116
|
-
<td class="default">
|
|
117
|
-
<?js if (typeof param.defaultvalue !== 'undefined') { ?>
|
|
118
|
-
<?js= self.htmlsafe(param.defaultvalue) ?>
|
|
119
|
-
<?js } ?>
|
|
120
|
-
</td>
|
|
121
|
-
<?js } ?>
|
|
122
|
-
|
|
123
|
-
<td class="description last"><?js= param.description ?><?js if (param.subparams) { ?>
|
|
124
|
-
<h6>Properties</h6>
|
|
125
|
-
<?js= self.partial('params.tmpl', param.subparams) ?>
|
|
126
|
-
<?js } ?></td>
|
|
127
|
-
</tr>
|
|
128
|
-
|
|
129
|
-
<?js }); ?>
|
|
130
|
-
</tbody>
|
|
131
|
-
</table>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var data = obj;
|
|
3
|
-
var props = data.subprops || data.properties;
|
|
4
|
-
|
|
5
|
-
/* sort subprops under their parent props (like opts.classname) */
|
|
6
|
-
var parentProp = null;
|
|
7
|
-
props.forEach(function(prop, i) {
|
|
8
|
-
if (!prop) { return; }
|
|
9
|
-
if ( parentProp && prop.name && prop.name.indexOf(parentProp.name + '.') === 0 ) {
|
|
10
|
-
prop.name = prop.name.substr(parentProp.name.length+1);
|
|
11
|
-
parentProp.subprops = parentProp.subprops || [];
|
|
12
|
-
parentProp.subprops.push(prop);
|
|
13
|
-
props[i] = null;
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
parentProp = prop;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
/* determine if we need extra columns, "attributes" and "default" */
|
|
21
|
-
props.hasAttributes = false;
|
|
22
|
-
props.hasDefault = false;
|
|
23
|
-
props.hasName = false;
|
|
24
|
-
|
|
25
|
-
props.forEach(function(prop) {
|
|
26
|
-
if (!prop) { return; }
|
|
27
|
-
|
|
28
|
-
if (prop.optional || prop.nullable) {
|
|
29
|
-
props.hasAttributes = true;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (prop.name) {
|
|
33
|
-
props.hasName = true;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (typeof prop.defaultvalue !== 'undefined' && !data.isEnum) {
|
|
37
|
-
props.hasDefault = true;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
?>
|
|
41
|
-
|
|
42
|
-
<table class="props">
|
|
43
|
-
<thead>
|
|
44
|
-
<tr>
|
|
45
|
-
<?js if (props.hasName) {?>
|
|
46
|
-
<th>Name</th>
|
|
47
|
-
<?js } ?>
|
|
48
|
-
|
|
49
|
-
<th>Type</th>
|
|
50
|
-
|
|
51
|
-
<?js if (props.hasAttributes) {?>
|
|
52
|
-
<th>Attributes</th>
|
|
53
|
-
<?js } ?>
|
|
54
|
-
|
|
55
|
-
<?js if (props.hasDefault) {?>
|
|
56
|
-
<th>Default</th>
|
|
57
|
-
<?js } ?>
|
|
58
|
-
|
|
59
|
-
<th class="last">Description</th>
|
|
60
|
-
</tr>
|
|
61
|
-
</thead>
|
|
62
|
-
|
|
63
|
-
<tbody>
|
|
64
|
-
<?js
|
|
65
|
-
var self = this;
|
|
66
|
-
props.forEach(function(prop) {
|
|
67
|
-
if (!prop) { return; }
|
|
68
|
-
?>
|
|
69
|
-
|
|
70
|
-
<tr>
|
|
71
|
-
<?js if (props.hasName) {?>
|
|
72
|
-
<td class="name"><code><?js= prop.name ?></code></td>
|
|
73
|
-
<?js } ?>
|
|
74
|
-
|
|
75
|
-
<td class="type">
|
|
76
|
-
<?js if (prop.type && prop.type.names) {?>
|
|
77
|
-
<?js= self.partial('type.tmpl', prop.type.names) ?>
|
|
78
|
-
<?js } ?>
|
|
79
|
-
</td>
|
|
80
|
-
|
|
81
|
-
<?js if (props.hasAttributes) {?>
|
|
82
|
-
<td class="attributes">
|
|
83
|
-
<?js if (prop.optional) { ?>
|
|
84
|
-
<optional><br>
|
|
85
|
-
<?js } ?>
|
|
86
|
-
|
|
87
|
-
<?js if (prop.nullable) { ?>
|
|
88
|
-
<nullable><br>
|
|
89
|
-
<?js } ?>
|
|
90
|
-
</td>
|
|
91
|
-
<?js } ?>
|
|
92
|
-
|
|
93
|
-
<?js if (props.hasDefault) {?>
|
|
94
|
-
<td class="default">
|
|
95
|
-
<?js if (typeof prop.defaultvalue !== 'undefined') { ?>
|
|
96
|
-
<?js= self.htmlsafe(prop.defaultvalue) ?>
|
|
97
|
-
<?js } ?>
|
|
98
|
-
</td>
|
|
99
|
-
<?js } ?>
|
|
100
|
-
|
|
101
|
-
<td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?>
|
|
102
|
-
<h6>Properties</h6><?js= self.partial('properties.tmpl', prop) ?>
|
|
103
|
-
<?js } ?></td>
|
|
104
|
-
</tr>
|
|
105
|
-
|
|
106
|
-
<?js }); ?>
|
|
107
|
-
</tbody>
|
|
108
|
-
</table>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var data = obj || {};
|
|
3
|
-
if (data.description) {
|
|
4
|
-
?>
|
|
5
|
-
<div class="param-desc">
|
|
6
|
-
<?js= description ?>
|
|
7
|
-
</div>
|
|
8
|
-
<?js } ?>
|
|
9
|
-
|
|
10
|
-
<?js if (data.type && data.type.names) {?>
|
|
11
|
-
<dl>
|
|
12
|
-
<dt>
|
|
13
|
-
Type
|
|
14
|
-
</dt>
|
|
15
|
-
<dd>
|
|
16
|
-
<?js= this.partial('type.tmpl', data.type.names) ?>
|
|
17
|
-
</dd>
|
|
18
|
-
</dl>
|
|
19
|
-
<?js } ?>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<section>
|
|
2
|
-
|
|
3
|
-
<header>
|
|
4
|
-
<?js if (children.length > 0) { ?>
|
|
5
|
-
<ul><?js
|
|
6
|
-
var self = this;
|
|
7
|
-
children.forEach(function(t) { ?>
|
|
8
|
-
<li><?js= self.tutoriallink(t.name) ?></li>
|
|
9
|
-
<?js }); ?></ul>
|
|
10
|
-
<?js } ?>
|
|
11
|
-
|
|
12
|
-
<h2><?js= header ?></h2>
|
|
13
|
-
</header>
|
|
14
|
-
|
|
15
|
-
<article>
|
|
16
|
-
<?js= content ?>
|
|
17
|
-
</article>
|
|
18
|
-
|
|
19
|
-
</section>
|
package/env.config.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// NOTE: This file is used by the example app. frontend-build expects the file
|
|
2
|
-
// to be in the root of the repository. This is not used by the actual frontend-platform library.
|
|
3
|
-
// Also note that in an actual application this file would be added to .gitignore.
|
|
4
|
-
const config = {
|
|
5
|
-
JS_FILE_VAR: 'JS_FILE_VAR_VALUE_FOR_EXAMPLE_APP',
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default config;
|
package/jsdoc.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tags": {
|
|
3
|
-
"allowUnknownTags": true,
|
|
4
|
-
"dictionaries": ["jsdoc"]
|
|
5
|
-
},
|
|
6
|
-
"source": {
|
|
7
|
-
"include": ["src", "package.json", "README.md"],
|
|
8
|
-
"includePattern": ".+\\.js(doc|x)?$",
|
|
9
|
-
"excludePattern": "(node_modules/|docs)"
|
|
10
|
-
},
|
|
11
|
-
"plugins": [
|
|
12
|
-
"plugins/markdown",
|
|
13
|
-
"docs/addTagsPlugin",
|
|
14
|
-
"docs/removeExport"
|
|
15
|
-
],
|
|
16
|
-
"templates": {
|
|
17
|
-
"cleverLinks": false,
|
|
18
|
-
"monospaceLinks": true,
|
|
19
|
-
"useLongnameInNav": false,
|
|
20
|
-
"showInheritedInNav": true,
|
|
21
|
-
"default": {
|
|
22
|
-
"staticFiles": {
|
|
23
|
-
"include": [
|
|
24
|
-
"./service-interface.png"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"opts": {
|
|
30
|
-
"destination": "./docs/api",
|
|
31
|
-
"encoding": "utf8",
|
|
32
|
-
"private": true,
|
|
33
|
-
"recurse": true,
|
|
34
|
-
"template": "docs/template/edx"
|
|
35
|
-
}
|
|
36
|
-
}
|
package/openedx.yaml
DELETED
package/service-interface.png
DELETED
|
Binary file
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The MockAnalyticsService implements all functions of AnalyticsService as Jest mocks (jest.fn())).
|
|
3
|
-
* It emulates the behavior of a real analytics service but witohut making any requests. It has no
|
|
4
|
-
* other functionality.
|
|
5
|
-
*
|
|
6
|
-
* @implements {AnalyticsService}
|
|
7
|
-
* @memberof module:Analytics
|
|
8
|
-
*/
|
|
9
|
-
class MockAnalyticsService {
|
|
10
|
-
static hasIdentifyBeenCalled = false;
|
|
11
|
-
|
|
12
|
-
constructor({ httpClient, loggingService }) {
|
|
13
|
-
this.loggingService = loggingService;
|
|
14
|
-
this.httpClient = httpClient;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
checkIdentifyCalled = jest.fn(() => {
|
|
18
|
-
if (!this.hasIdentifyBeenCalled) {
|
|
19
|
-
this.loggingService.logError('Identify must be called before other tracking events.');
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Returns a resolved promise.
|
|
25
|
-
*
|
|
26
|
-
* @returns {Promise} The promise returned by HttpClient.post.
|
|
27
|
-
*/
|
|
28
|
-
sendTrackingLogEvent = jest.fn(() => Promise.resolve());
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* No-op, but records that identify has been called.
|
|
32
|
-
*
|
|
33
|
-
* @param {string} userId
|
|
34
|
-
* @throws {Error} If userId argument is not supplied.
|
|
35
|
-
*/
|
|
36
|
-
identifyAuthenticatedUser = jest.fn((userId) => {
|
|
37
|
-
if (!userId) {
|
|
38
|
-
throw new Error('UserId is required for identifyAuthenticatedUser.');
|
|
39
|
-
}
|
|
40
|
-
this.hasIdentifyBeenCalled = true;
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* No-op, but records that it has been called to prevent double-identification.
|
|
45
|
-
* @returns {Promise} A resolved promise.
|
|
46
|
-
*/
|
|
47
|
-
identifyAnonymousUser = jest.fn(() => {
|
|
48
|
-
this.hasIdentifyBeenCalled = true;
|
|
49
|
-
return Promise.resolve();
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Logs the event to the console.
|
|
54
|
-
*
|
|
55
|
-
* Checks whether identify has been called, logging an error to the logging service if not.
|
|
56
|
-
*/
|
|
57
|
-
sendTrackEvent = jest.fn(() => {
|
|
58
|
-
this.checkIdentifyCalled();
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Logs the event to the console.
|
|
63
|
-
*
|
|
64
|
-
* Checks whether identify has been called, logging an error to the logging service if not.
|
|
65
|
-
*/
|
|
66
|
-
sendPageEvent = jest.fn(() => {
|
|
67
|
-
this.checkIdentifyCalled();
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export default MockAnalyticsService;
|