@c8y/login 1022.3.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 (40) hide show
  1. package/.browserslistrc +16 -0
  2. package/cumulocity.config.ts +27 -0
  3. package/jest.config.js +18 -0
  4. package/package.json +23 -0
  5. package/public/favicon.ico +0 -0
  6. package/public/platform-animation.svg +2533 -0
  7. package/src/app/app.config.ts +11 -0
  8. package/src/app/bootstrap-login/bootstrap-login.component.html +3 -0
  9. package/src/app/bootstrap-login/bootstrap-login.component.ts +16 -0
  10. package/src/app/login/change-password/change-password.component.html +97 -0
  11. package/src/app/login/change-password/change-password.component.ts +101 -0
  12. package/src/app/login/credentials/credentials.component.html +141 -0
  13. package/src/app/login/credentials/credentials.component.ts +148 -0
  14. package/src/app/login/credentials-component-params.ts +4 -0
  15. package/src/app/login/credentials-from-query-params.service.ts +86 -0
  16. package/src/app/login/index.ts +9 -0
  17. package/src/app/login/login.component.html +128 -0
  18. package/src/app/login/login.component.less +136 -0
  19. package/src/app/login/login.component.ts +238 -0
  20. package/src/app/login/login.model.ts +36 -0
  21. package/src/app/login/login.service.ts +651 -0
  22. package/src/app/login/missing-application-access/missing-application-access.component.html +2 -0
  23. package/src/app/login/missing-application-access/missing-application-access.component.ts +21 -0
  24. package/src/app/login/password-strength-validator.directive.ts +26 -0
  25. package/src/app/login/provide-phone-number/provide-phone-number.component.html +39 -0
  26. package/src/app/login/provide-phone-number/provide-phone-number.component.ts +73 -0
  27. package/src/app/login/recover-password/recover-password.component.html +53 -0
  28. package/src/app/login/recover-password/recover-password.component.ts +59 -0
  29. package/src/app/login/sms-challenge/sms-challenge.component.html +50 -0
  30. package/src/app/login/sms-challenge/sms-challenge.component.ts +134 -0
  31. package/src/app/login/strength-validator-service.ts +18 -0
  32. package/src/app/login/tenant-id-setup/tenant-id-setup.component.html +28 -0
  33. package/src/app/login/tenant-id-setup/tenant-id-setup.component.ts +94 -0
  34. package/src/app/login/totp-auth/totp-auth.component.html +18 -0
  35. package/src/app/login/totp-auth/totp-auth.component.ts +72 -0
  36. package/src/bootstrap.ts +19 -0
  37. package/src/i18n.ts +18 -0
  38. package/src/main.ts +25 -0
  39. package/src/polyfills.ts +33 -0
  40. package/tsconfig.app.json +20 -0
package/src/main.ts ADDED
@@ -0,0 +1,25 @@
1
+ import { IApplication } from '@c8y/client';
2
+ import './i18n';
3
+
4
+ const barHolder: HTMLElement | null = document.querySelector('body > .init-load');
5
+ export const removeProgress = () => barHolder?.parentNode?.removeChild(barHolder);
6
+
7
+ applicationSetup();
8
+
9
+ async function applicationSetup() {
10
+ const { loadOptions, applyOptions } = await import('@c8y/bootstrap');
11
+ const options = await loadOptions();
12
+ await applyOptions({
13
+ ...options
14
+ });
15
+ const { bootstrap } = await import(
16
+ /* webpackPreload: true */
17
+ './bootstrap'
18
+ );
19
+
20
+ const { name, contextPath, key } = options as Partial<IApplication>;
21
+ bootstrap({
22
+ options,
23
+ currentApp: { name, contextPath, key }
24
+ }).then(removeProgress);
25
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * This file includes polyfills needed by Angular and is loaded before the app.
3
+ * You can add your own extra polyfills to this file.
4
+ *
5
+ * This file is divided into 2 sections:
6
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8
+ * file.
9
+ *
10
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13
+ *
14
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15
+ */
16
+
17
+ /***************************************************************************************************
18
+ * BROWSER POLYFILLS
19
+ */
20
+
21
+ /**
22
+ * By default, zone.js will patch all possible macroTask and DomEvents
23
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
24
+ */
25
+
26
+ (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
27
+ // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
28
+ (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove', 'message'];
29
+
30
+ /***************************************************************************************************
31
+ * Zone JS is required by default for Angular itself.
32
+ */
33
+ import 'zone.js'; // Included with Angular CLI.
@@ -0,0 +1,20 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./out-tsc/app",
5
+ "noImplicitOverride": false,
6
+ "skipLibCheck": true,
7
+ "strict": false
8
+ },
9
+ "files": [
10
+ "src/main.ts"
11
+ ],
12
+ "include": [
13
+ "src/**/*.ts",
14
+ "../ngx-components/**/*.ts"
15
+ ],
16
+ "exclude": [
17
+ "src/**/*.spec.ts",
18
+ "../ngx-components/dist",
19
+ ]
20
+ }