From f4a41894e23134c7c6c897efdacaac420a23f505 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miko=C5=82aj=20Nowak?=
<12396461+m3nowak@users.noreply.github.com>
Date: Wed, 13 Nov 2024 22:33:25 +0100
Subject: [PATCH 1/2] Add storybook, mess with buttons a bit
---
.gitignore | 3 +-
.storybook/main.ts | 12 +
.storybook/preview.ts | 17 +
.storybook/tsconfig.doc.json | 10 +
.storybook/tsconfig.json | 11 +
.storybook/typings.d.ts | 4 +
angular.json | 21 +
documentation.json | 6210 ++++++++++++
package-lock.json | 8366 ++++++++++++-----
package.json | 20 +-
.../btn.directive.stories.ts | 37 +
.../strava-btn/strava-btn.component.html | 2 +-
.../strava-btn/strava-btn.component.ts | 8 +-
.../strava-btn/strava-btn.stories.ts | 23 +
.../main-layout/main-layout.component.html | 2 +-
.../welcome-screen.component.html | 2 +-
src/stories/.eslintrc.json | 5 +
src/stories/Configure.mdx | 364 +
src/stories/assets/accessibility.png | Bin 0 -> 42336 bytes
src/stories/assets/accessibility.svg | 1 +
src/stories/assets/addon-library.png | Bin 0 -> 467366 bytes
src/stories/assets/assets.png | Bin 0 -> 3899 bytes
src/stories/assets/avif-test-image.avif | Bin 0 -> 829 bytes
src/stories/assets/context.png | Bin 0 -> 6119 bytes
src/stories/assets/discord.svg | 1 +
src/stories/assets/docs.png | Bin 0 -> 27875 bytes
src/stories/assets/figma-plugin.png | Bin 0 -> 44246 bytes
src/stories/assets/github.svg | 1 +
src/stories/assets/share.png | Bin 0 -> 40767 bytes
src/stories/assets/styling.png | Bin 0 -> 7237 bytes
src/stories/assets/testing.png | Bin 0 -> 49313 bytes
src/stories/assets/theming.png | Bin 0 -> 44374 bytes
src/stories/assets/tutorials.svg | 1 +
src/stories/assets/youtube.svg | 1 +
src/stories/button.component.ts | 48 +
src/stories/button.css | 30 +
src/stories/button.stories.ts | 49 +
src/stories/header.component.ts | 76 +
src/stories/header.css | 32 +
src/stories/header.stories.ts | 33 +
src/stories/page.component.ts | 82 +
src/stories/page.css | 69 +
src/stories/page.stories.ts | 32 +
src/stories/user.ts | 3 +
44 files changed, 13088 insertions(+), 2488 deletions(-)
create mode 100644 .storybook/main.ts
create mode 100644 .storybook/preview.ts
create mode 100644 .storybook/tsconfig.doc.json
create mode 100644 .storybook/tsconfig.json
create mode 100644 .storybook/typings.d.ts
create mode 100644 documentation.json
create mode 100644 src/app/common-components/btn.directive.stories.ts
create mode 100644 src/app/common-components/strava-btn/strava-btn.stories.ts
create mode 100644 src/stories/.eslintrc.json
create mode 100644 src/stories/Configure.mdx
create mode 100644 src/stories/assets/accessibility.png
create mode 100644 src/stories/assets/accessibility.svg
create mode 100644 src/stories/assets/addon-library.png
create mode 100644 src/stories/assets/assets.png
create mode 100644 src/stories/assets/avif-test-image.avif
create mode 100644 src/stories/assets/context.png
create mode 100644 src/stories/assets/discord.svg
create mode 100644 src/stories/assets/docs.png
create mode 100644 src/stories/assets/figma-plugin.png
create mode 100644 src/stories/assets/github.svg
create mode 100644 src/stories/assets/share.png
create mode 100644 src/stories/assets/styling.png
create mode 100644 src/stories/assets/testing.png
create mode 100644 src/stories/assets/theming.png
create mode 100644 src/stories/assets/tutorials.svg
create mode 100644 src/stories/assets/youtube.svg
create mode 100644 src/stories/button.component.ts
create mode 100644 src/stories/button.css
create mode 100644 src/stories/button.stories.ts
create mode 100644 src/stories/header.component.ts
create mode 100644 src/stories/header.css
create mode 100644 src/stories/header.stories.ts
create mode 100644 src/stories/page.component.ts
create mode 100644 src/stories/page.css
create mode 100644 src/stories/page.stories.ts
create mode 100644 src/stories/user.ts
diff --git a/.gitignore b/.gitignore
index 9c7f5c1..020428a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,4 +42,5 @@ testem.log
Thumbs.db
openapi.json
-openapi.yaml
\ No newline at end of file
+openapi.yaml
+*storybook.log
diff --git a/.storybook/main.ts b/.storybook/main.ts
new file mode 100644
index 0000000..012447d
--- /dev/null
+++ b/.storybook/main.ts
@@ -0,0 +1,12 @@
+import type { StorybookConfig } from '@storybook/angular';
+
+const config: StorybookConfig = {
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
+ addons: ['@storybook/addon-onboarding', '@storybook/addon-essentials', '@chromatic-com/storybook', '@storybook/addon-interactions'],
+ framework: {
+ name: '@storybook/angular',
+ options: {},
+ },
+ staticDirs: ['../public'],
+};
+export default config;
diff --git a/.storybook/preview.ts b/.storybook/preview.ts
new file mode 100644
index 0000000..0af8a75
--- /dev/null
+++ b/.storybook/preview.ts
@@ -0,0 +1,17 @@
+import type { Preview } from '@storybook/angular';
+import { setCompodocJson } from '@storybook/addon-docs/angular';
+import docJson from '../documentation.json';
+setCompodocJson(docJson);
+
+const preview: Preview = {
+ parameters: {
+ controls: {
+ matchers: {
+ color: /(background|color)$/i,
+ date: /Date$/i,
+ },
+ },
+ },
+};
+
+export default preview;
diff --git a/.storybook/tsconfig.doc.json b/.storybook/tsconfig.doc.json
new file mode 100644
index 0000000..22e282b
--- /dev/null
+++ b/.storybook/tsconfig.doc.json
@@ -0,0 +1,10 @@
+// This tsconfig is used by Compodoc to generate the documentation for the project.
+// If Compodoc is not used, this file can be deleted.
+{
+ "extends": "./tsconfig.json",
+ // Exclude all files that are not needed for documentation generation.
+ "exclude": ["../src/test.ts", "../src/**/*.spec.ts", "../src/**/*.stories.ts"],
+ // Please make sure to include all files from which Compodoc should generate documentation.
+ "include": ["../src/**/*"],
+ "files": ["./typings.d.ts"]
+}
diff --git a/.storybook/tsconfig.json b/.storybook/tsconfig.json
new file mode 100644
index 0000000..84d7e74
--- /dev/null
+++ b/.storybook/tsconfig.json
@@ -0,0 +1,11 @@
+{
+ "extends": "../tsconfig.app.json",
+ "compilerOptions": {
+ "types": ["node"],
+ "allowSyntheticDefaultImports": true,
+ "resolveJsonModule": true
+ },
+ "exclude": ["../src/test.ts", "../src/**/*.spec.ts"],
+ "include": ["../src/**/*.stories.*", "./preview.ts"],
+ "files": ["./typings.d.ts"]
+}
diff --git a/.storybook/typings.d.ts b/.storybook/typings.d.ts
new file mode 100644
index 0000000..f73d61b
--- /dev/null
+++ b/.storybook/typings.d.ts
@@ -0,0 +1,4 @@
+declare module '*.md' {
+ const content: string;
+ export default content;
+}
diff --git a/angular.json b/angular.json
index be82715..93f745a 100644
--- a/angular.json
+++ b/angular.json
@@ -98,6 +98,27 @@
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
+ },
+ "storybook": {
+ "builder": "@storybook/angular:start-storybook",
+ "options": {
+ "configDir": ".storybook",
+ "browserTarget": "rowerowe-gminy:build",
+ "compodoc": true,
+ "compodocArgs": ["-e", "json", "-d", "."],
+ "port": 6006,
+ "styles": ["src/styles.scss"]
+ }
+ },
+ "build-storybook": {
+ "builder": "@storybook/angular:build-storybook",
+ "options": {
+ "configDir": ".storybook",
+ "browserTarget": "rowerowe-gminy:build",
+ "compodoc": true,
+ "compodocArgs": ["-e", "json", "-d", "."],
+ "outputDir": "storybook-static"
+ }
}
}
}
diff --git a/documentation.json b/documentation.json
new file mode 100644
index 0000000..62b4b22
--- /dev/null
+++ b/documentation.json
@@ -0,0 +1,6210 @@
+{
+ "pipes": [],
+ "interfaces": [
+ {
+ "name": "AdmInfo",
+ "id": "interface-AdmInfo-51da72f5e1f6788e4a980f461042b8e006b6d2eea80cf1bbbb09dc197c08c5d2d349dc76ad557dc6fafabe05aba4161563d97e6e1754591abc552324ac8b31c6",
+ "file": "src/app/models/adm-info.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface AdmInfo {\n TERYT: string;\n name: string;\n area: number;\n population: number;\n link: string;\n coa_link: string;\n type: string;\n has_one_child: boolean;\n only_child: boolean;\n subtypeDigit?: number;\n}\n",
+ "properties": [
+ {
+ "name": "area",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "coa_link",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "has_one_child",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "link",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "only_child",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ },
+ {
+ "name": "population",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "subtypeDigit",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 11
+ },
+ {
+ "name": "TERYT",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "type",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ApiConfigurationParams",
+ "id": "interface-ApiConfigurationParams-a3ae41820c5a32f5fd1c30843f2c7332d67c224dec12832e54ac4b1eca6fbfcac7de2fd6122e7bc38717ab3bb56d9c0e5e5898f66d35036e54a868a072295b99",
+ "file": "src/app/api/api-configuration.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Injectable } from '@angular/core';\n\n/**\n * Global configuration\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ApiConfiguration {\n rootUrl: string = '/';\n}\n\n/**\n * Parameters for `ApiModule.forRoot()`\n */\nexport interface ApiConfigurationParams {\n rootUrl?: string;\n}\n",
+ "properties": [
+ {
+ "name": "rootUrl",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 19
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "description": "
Parameters for ApiModule.forRoot()
\n",
+ "rawdescription": "\n\nParameters for `ApiModule.forRoot()`\n",
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "AuthenticateAuthenticate$Params",
+ "id": "interface-AuthenticateAuthenticate$Params-36a2aad82bf855b477dcb27293727ef3e471ad18561e53b338c775564954a511360295dfa1f8116adcfc9c2aceb60dcdeab4bb65212b64ce97ac56141a1a18e5",
+ "file": "src/app/api/fn/operations/authenticate-authenticate.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\nimport { StrictHttpResponse } from '../../strict-http-response';\nimport { RequestBuilder } from '../../request-builder';\n\nimport { StravaAuthResponse } from '../../models/strava-auth-response';\n\nexport interface AuthenticateAuthenticate$Params {\n code: string;\n}\n\nexport function authenticateAuthenticate(\n http: HttpClient,\n rootUrl: string,\n params: AuthenticateAuthenticate$Params,\n context?: HttpContext,\n): Observable> {\n const rb = new RequestBuilder(rootUrl, authenticateAuthenticate.PATH, 'get');\n if (params) {\n rb.query('code', params.code, {});\n }\n\n return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(\n filter((r: any): r is HttpResponse => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as StrictHttpResponse;\n }),\n );\n}\n\nauthenticateAuthenticate.PATH = '/authenticate';\n",
+ "properties": [
+ {
+ "name": "code",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "AuthenticateLoginAuthenticateHandler$Params",
+ "id": "interface-AuthenticateLoginAuthenticateHandler$Params-c33cb759b3678c220354a6d3c13b907f54121b93261c3f06068727b7eb4d703fbe14985ccc77fd9ef3bfebe8630cce9d38433a4550925754bf141eb41362ff8e",
+ "file": "src/app/api/fn/auth/authenticate-login-authenticate-handler.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\nimport { StrictHttpResponse } from '../../strict-http-response';\nimport { RequestBuilder } from '../../request-builder';\n\nimport { AuthRequest } from '../../models/auth-request';\nimport { OAuth2Login } from '../../models/o-auth-2-login';\n\nexport interface AuthenticateLoginAuthenticateHandler$Params {\n body: AuthRequest\n}\n\nexport function authenticateLoginAuthenticateHandler(http: HttpClient, rootUrl: string, params: AuthenticateLoginAuthenticateHandler$Params, context?: HttpContext): Observable> {\n const rb = new RequestBuilder(rootUrl, authenticateLoginAuthenticateHandler.PATH, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return http.request(\n rb.build({ responseType: 'json', accept: 'application/json', context })\n ).pipe(\n filter((r: any): r is HttpResponse => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as StrictHttpResponse;\n })\n );\n}\n\nauthenticateLoginAuthenticateHandler.PATH = '/authenticate/login';\n",
+ "properties": [
+ {
+ "name": "body",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "AuthRequest",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "AuthRequest",
+ "id": "interface-AuthRequest-27e354fc7852eb16d8719df4f6ffc6f2d9a34a9221ee91fbd53ee6d46817506278421888c5e1bf513b08b19e182e2a32ffd26406728d7ea34da14f150be1a3ea",
+ "file": "src/app/api/models/auth-request.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface AuthRequest {\n code: string;\n rememberLonger?: boolean;\n scopes: Array<'read' | 'read_all' | 'profile:read_all' | 'profile:write' | 'activity:read' | 'activity:read_all' | 'activity:write'>;\n}\n",
+ "properties": [
+ {
+ "name": "code",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "rememberLonger",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "scopes",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Array<\"read\" | \"read_all\" | \"profile:read_all\" | \"profile:write\" | \"activity:read\" | \"activity:read_all\" | \"activity:write\">",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "HcHcHandler$Params",
+ "id": "interface-HcHcHandler$Params-54232f00bafed624bc38cdc1f7a1570b926b9c89ec57561a001b1c3d5ee6ec02a70271c2c857f2a78bf7a07fbb189a77c207ac360fe28a48a8188ade766c3ef7",
+ "file": "src/app/api/fn/internals/hc-hc-handler.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\nimport { StrictHttpResponse } from '../../strict-http-response';\nimport { RequestBuilder } from '../../request-builder';\n\n\nexport interface HcHcHandler$Params {\n}\n\nexport function hcHcHandler(http: HttpClient, rootUrl: string, params?: HcHcHandler$Params, context?: HttpContext): Observable> {\n const rb = new RequestBuilder(rootUrl, hcHcHandler.PATH, 'get');\n if (params) {\n }\n\n return http.request(\n rb.build({ responseType: 'text', accept: 'text/plain', context })\n ).pipe(\n filter((r: any): r is HttpResponse => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as StrictHttpResponse;\n })\n );\n}\n\nhcHcHandler.PATH = '/hc';\n",
+ "properties": [],
+ "indexSignatures": [],
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "LoadingInfo",
+ "id": "interface-LoadingInfo-582b438c6ab8fb3fcfef4859586917218f7363ab73720e7a6ff492c2fdfc7bf7184e8acd6f4669a001d40f46948a60543b73368dd0f4c26e8a4a6c6b0250b9b3",
+ "file": "src/app/models/loading_info.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface LoadingInfo {\n total: number;\n loaded: number;\n}\n",
+ "properties": [
+ {
+ "name": "loaded",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "total",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "MapDisplaySettings",
+ "id": "interface-MapDisplaySettings-a3f3d0e3adc77af1ed337268c6e18b8a6c41dc299537cb4b7afe67378665474aa13e6e90490a8059b229c6dd84c57185537374f9623d0d92d84b0f3e51116dad",
+ "file": "src/app/models/map-display-settings.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface MapDisplaySettings {\n opacity: number;\n hueRotation: number;\n brightnessMin: number;\n brightnessMax: number;\n saturation: number;\n contrast: number;\n}\n",
+ "properties": [
+ {
+ "name": "brightnessMax",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "brightnessMin",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "contrast",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "hueRotation",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "opacity",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "saturation",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "NamedFeatureCollection",
+ "id": "interface-NamedFeatureCollection-fc2c908d4b61b94021dd52c8c9467fe6187f1b97e241e506c506c44117ab7d4737d14fdd04684f8b9a71035e264467b7dfe87af2bebae85647b0abffa9421a05",
+ "file": "src/app/models/geo-ext.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { FeatureCollection } from 'geojson';\n\nexport interface NamedFeatureCollection {\n name: string;\n features: FeatureCollection;\n}\n",
+ "properties": [
+ {
+ "name": "features",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "FeatureCollection",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "OAuth2Login",
+ "id": "interface-OAuth2Login-225f5c681a413d862dff3b0867863f46dcb111ec1cf76a9dadffd5002be193416a844c0bdbae5035c3619088e7027395a2f180473dfe10b74dd5fe2c461c7fc6",
+ "file": "src/app/api/models/o-auth-2-login.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface OAuth2Login {\n access_token: string;\n expires_in?: (null | number);\n refresh_token?: (null | string);\n token_type: string;\n}\n",
+ "properties": [
+ {
+ "name": "access_token",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "expires_in",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "refresh_token",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "token_type",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ParameterOptions",
+ "id": "interface-ParameterOptions-03c6655a88136897de437edf3a30da69554cc1d87c735d783699c39724e5ead46ac969ae09e5c009e68a092860488944526901452f1d24d113e0f0cd5e6dbda5",
+ "file": "src/app/api/request-builder.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { HttpRequest, HttpParameterCodec, HttpParams, HttpHeaders, HttpContext } from '@angular/common/http';\n\n/**\n * Custom parameter codec to correctly handle the plus sign in parameter\n * values. See https://github.com/angular/angular/issues/18261\n */\nclass ParameterCodec implements HttpParameterCodec {\n encodeKey(key: string): string {\n return encodeURIComponent(key);\n }\n\n encodeValue(value: string): string {\n return encodeURIComponent(value);\n }\n\n decodeKey(key: string): string {\n return decodeURIComponent(key);\n }\n\n decodeValue(value: string): string {\n return decodeURIComponent(value);\n }\n}\nconst ParameterCodecInstance = new ParameterCodec();\n\n/**\n * Defines the options for appending a parameter\n */\ninterface ParameterOptions {\n style?: string;\n explode?: boolean;\n}\n\n/**\n * Base class for a parameter\n */\nabstract class Parameter {\n constructor(public name: string, public value: any, public options: ParameterOptions, defaultStyle: string, defaultExplode: boolean) {\n this.options = options || {};\n if (this.options.style === null || this.options.style === undefined) {\n this.options.style = defaultStyle;\n }\n if (this.options.explode === null || this.options.explode === undefined) {\n this.options.explode = defaultExplode;\n }\n }\n\n serializeValue(value: any, separator = ','): string {\n if (value === null || value === undefined) {\n return '';\n } else if (value instanceof Array) {\n return value.map(v => this.serializeValue(v).split(separator).join(encodeURIComponent(separator))).join(separator);\n } else if (typeof value === 'object') {\n const array: string[] = [];\n for (const key of Object.keys(value)) {\n let propVal = value[key];\n if (propVal !== null && propVal !== undefined) {\n propVal = this.serializeValue(propVal).split(separator).join(encodeURIComponent(separator));\n if (this.options.explode) {\n array.push(`${key}=${propVal}`);\n } else {\n array.push(key);\n array.push(propVal);\n }\n }\n }\n return array.join(separator);\n } else {\n return String(value);\n }\n }\n}\n\n/**\n * A parameter in the operation path\n */\nclass PathParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'simple', false);\n }\n\n append(path: string): string {\n let value = this.value;\n if (value === null || value === undefined) {\n value = '';\n }\n let prefix = this.options.style === 'label' ? '.' : '';\n let separator = this.options.explode ? prefix === '' ? ',' : prefix : ',';\n let alreadySerialized = false;\n if (this.options.style === 'matrix') {\n // The parameter name is just used as prefix, except in some cases...\n prefix = `;${this.name}=`;\n if (this.options.explode && typeof value === 'object') {\n prefix = ';';\n if (value instanceof Array) {\n // For arrays we have to repeat the name for each element\n value = value.map(v => `${this.name}=${this.serializeValue(v, ';')}`);\n value = value.join(';');\n alreadySerialized = true;\n } else {\n // For objects we have to put each the key / value pairs\n value = this.serializeValue(value, ';');\n alreadySerialized = true\n }\n }\n }\n value = prefix + (alreadySerialized ? value : this.serializeValue(value, separator));\n // Replace both the plain variable and the corresponding variant taking in the prefix and explode into account\n path = path.replace(`{${this.name}}`, value);\n path = path.replace(`{${prefix}${this.name}${this.options.explode ? '*' : ''}}`, value);\n return path;\n }\n\n // @ts-ignore\n serializeValue(value: any, separator = ','): string {\n var result = typeof value === 'string' ? encodeURIComponent(value) : super.serializeValue(value, separator);\n result = result.replace(/%3D/g, '=');\n result = result.replace(/%3B/g, ';');\n result = result.replace(/%2C/g, ',');\n return result;\n }\n}\n\n/**\n * A parameter in the query\n */\nclass QueryParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'form', true);\n }\n\n append(params: HttpParams): HttpParams {\n if (this.value instanceof Array) {\n // Array serialization\n if (this.options.explode) {\n for (const v of this.value) {\n params = params.append(this.name, this.serializeValue(v));\n }\n } else {\n const separator = this.options.style === 'spaceDelimited'\n ? ' ' : this.options.style === 'pipeDelimited'\n ? '|' : ',';\n return params.append(this.name, this.serializeValue(this.value, separator));\n }\n } else if (this.value !== null && typeof this.value === 'object') {\n // Object serialization\n if (this.options.style === 'deepObject') {\n // Append a parameter for each key, in the form `name[key]`\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n params = params.append(`${this.name}[${key}]`, this.serializeValue(propVal));\n }\n }\n } else if (this.options.explode) {\n // Append a parameter for each key without using the parameter name\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n params = params.append(key, this.serializeValue(propVal));\n }\n }\n } else {\n // Append a single parameter whose values are a comma-separated list of key,value,key,value...\n const array: any[] = [];\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n array.push(key);\n array.push(propVal);\n }\n }\n params = params.append(this.name, this.serializeValue(array));\n }\n } else if (this.value !== null && this.value !== undefined) {\n // Plain value\n params = params.append(this.name, this.serializeValue(this.value));\n }\n return params;\n }\n}\n\n/**\n * A parameter in the HTTP request header\n */\nclass HeaderParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'simple', false);\n }\n\n append(headers: HttpHeaders): HttpHeaders {\n if (this.value !== null && this.value !== undefined) {\n if (this.value instanceof Array) {\n for (const v of this.value) {\n headers = headers.append(this.name, this.serializeValue(v));\n }\n } else {\n headers = headers.append(this.name, this.serializeValue(this.value));\n }\n }\n return headers;\n }\n}\n\n/**\n * Helper to build http requests from parameters\n */\nexport class RequestBuilder {\n\n private _path = new Map();\n private _query = new Map();\n private _header = new Map();\n _bodyContent: any | null;\n _bodyContentType?: string;\n\n constructor(\n public rootUrl: string,\n public operationPath: string,\n public method: string) {\n }\n\n /**\n * Sets a path parameter\n */\n path(name: string, value: any, options?: ParameterOptions): void {\n this._path.set(name, new PathParameter(name, value, options || {}));\n }\n\n /**\n * Sets a query parameter\n */\n query(name: string, value: any, options?: ParameterOptions): void {\n this._query.set(name, new QueryParameter(name, value, options || {}));\n }\n\n /**\n * Sets a header parameter\n */\n header(name: string, value: any, options?: ParameterOptions): void {\n this._header.set(name, new HeaderParameter(name, value, options || {}));\n }\n\n /**\n * Sets the body content, along with the content type\n */\n body(value: any, contentType = 'application/json'): void {\n if (value instanceof Blob) {\n this._bodyContentType = value.type;\n } else {\n this._bodyContentType = contentType;\n }\n if (this._bodyContentType === 'application/x-www-form-urlencoded' && value !== null && typeof value === 'object') {\n // Handle URL-encoded data\n const pairs: Array<[string, string]> = [];\n for (const key of Object.keys(value)) {\n let val = value[key];\n if (!(val instanceof Array)) {\n val = [val];\n }\n for (const v of val) {\n const formValue = this.formDataValue(v);\n if (formValue !== null) {\n pairs.push([key, formValue]);\n }\n }\n }\n this._bodyContent = pairs.map(p => `${encodeURIComponent(p[0])}=${encodeURIComponent(p[1])}`).join('&');\n } else if (this._bodyContentType === 'multipart/form-data') {\n // Handle multipart form data\n const formData = new FormData();\n if (value !== null && value !== undefined) {\n for (const key of Object.keys(value)) {\n const val = value[key];\n if (val instanceof Array) {\n for (const v of val) {\n const toAppend = this.formDataValue(v);\n if (toAppend !== null) {\n formData.append(key, toAppend);\n }\n }\n } else {\n const toAppend = this.formDataValue(val);\n if (toAppend !== null) {\n formData.set(key, toAppend);\n }\n }\n }\n }\n this._bodyContent = formData;\n } else {\n // The body is the plain content\n this._bodyContent = value;\n }\n }\n\n private formDataValue(value: any): any {\n if (value === null || value === undefined) {\n return null;\n }\n if (value instanceof Blob) {\n return value;\n }\n if (typeof value === 'object') {\n return new Blob([JSON.stringify(value)], {type: 'application/json'})\n }\n return String(value);\n }\n\n /**\n * Builds the request with the current set parameters\n */\n build(options?: {\n /** Which content types to accept */\n accept?: string;\n\n /** The expected response type */\n responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';\n\n /** Whether to report progress on uploads / downloads */\n reportProgress?: boolean;\n\n /** Allow passing HttpContext for HttpClient */\n context?: HttpContext;\n }): HttpRequest {\n\n options = options || {};\n\n // Path parameters\n let path = this.operationPath;\n for (const pathParam of this._path.values()) {\n path = pathParam.append(path);\n }\n const url = this.rootUrl + path;\n\n // Query parameters\n let httpParams = new HttpParams({\n encoder: ParameterCodecInstance\n });\n for (const queryParam of this._query.values()) {\n httpParams = queryParam.append(httpParams);\n }\n\n // Header parameters\n let httpHeaders = new HttpHeaders();\n if (options.accept) {\n httpHeaders = httpHeaders.append('Accept', options.accept);\n }\n for (const headerParam of this._header.values()) {\n httpHeaders = headerParam.append(httpHeaders);\n }\n\n // Request content headers\n if (this._bodyContentType && !(this._bodyContent instanceof FormData)) {\n httpHeaders = httpHeaders.set('Content-Type', this._bodyContentType);\n }\n\n // Perform the request\n return new HttpRequest(this.method.toUpperCase(), url, this._bodyContent, {\n params: httpParams,\n headers: httpHeaders,\n responseType: options.responseType,\n reportProgress: options.reportProgress,\n context: options.context\n });\n }\n}\n",
+ "properties": [
+ {
+ "name": "explode",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 33
+ },
+ {
+ "name": "style",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 32
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "description": "Defines the options for appending a parameter
\n",
+ "rawdescription": "\n\nDefines the options for appending a parameter\n",
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "StravaInfo",
+ "id": "interface-StravaInfo-43c3c305ccd5ca0073ab2eea1c2814521f52badf715aa1e21bb9285cf2721aca93ea005f9854269f393b58d08e2cdba0534f7dbd9072e8c4907aefdbc5f750b8",
+ "file": "src/app/models/user.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface StravaInfo {\n profilePic?: string;\n profilePicMedium?: string;\n username?: string;\n id: number;\n}\n",
+ "properties": [
+ {
+ "name": "id",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "profilePic",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "profilePicMedium",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "username",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 4
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "User",
+ "id": "interface-User-d4821beac0e4a852e513391b7470981c4353fdd95a18628bb68136c8695b489ee15b926e2e5031bc26cf30e1508e0a362c3ee13a06734702b4d15af140e485d5",
+ "file": "src/stories/user.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface User {\n name: string;\n}\n",
+ "properties": [
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 171,
+ "methods": [],
+ "extends": []
+ }
+ ],
+ "injectables": [
+ {
+ "name": "AdmService",
+ "id": "injectable-AdmService-b91464e453671fe1b9167a5091f2e49beaf039ac1159f20f64d7b126970903d7d6a8b78e182ccbba366f6a727363eb1eee5bfeb5d8f402f4e47228afbc48cefa",
+ "file": "src/app/services/adm.service.ts",
+ "properties": [
+ {
+ "name": "_loadProgress",
+ "defaultValue": "signal(undefined)",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 24,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "admInfo",
+ "defaultValue": "signal