From bcca40860d224bfb350d6481fafc35bd75a3445c Mon Sep 17 00:00:00 2001 From: mfnefd Date: Mon, 2 Dec 2024 23:18:40 +0400 Subject: [PATCH 01/10] =?UTF-8?q?add:=20api=20=D0=BA=D0=BB=D0=B8=D0=B5?= =?UTF-8?q?=D0=BD=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/.gitignore | 2 + front/src/core/api/Api.ts | 460 +++++++++++++++++++++++++++ front/src/core/api/data-contracts.ts | 96 ++++++ front/src/core/api/http-client.ts | 220 +++++++++++++ 4 files changed, 778 insertions(+) create mode 100644 front/src/core/api/Api.ts create mode 100644 front/src/core/api/data-contracts.ts create mode 100644 front/src/core/api/http-client.ts diff --git a/front/.gitignore b/front/.gitignore index a547bf3..3b0b403 100644 --- a/front/.gitignore +++ b/front/.gitignore @@ -22,3 +22,5 @@ dist-ssr *.njsproj *.sln *.sw? + +.env \ No newline at end of file diff --git a/front/src/core/api/Api.ts b/front/src/core/api/Api.ts new file mode 100644 index 0000000..ab58717 --- /dev/null +++ b/front/src/core/api/Api.ts @@ -0,0 +1,460 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { + ChangeRecordDto, + ChangeRecordViewModel, + SpendingGroupDto, + SpendingGroupViewModel, + SpendingPlanDto, + SpendingPlanViewModel, + UserDto, + UserLoginDTO, + UserViewModel, +} from "./data-contracts"; +import { ContentType, HttpClient, RequestParams } from "./http-client"; + +export class Api extends HttpClient { + /** + * No description + * + * @tags Auth + * @name AuthCreate + * @request POST:/api/Auth + * @response `200` `UserViewModel` Success + */ + authCreate = (data: UserLoginDTO, params: RequestParams = {}) => + this.request({ + path: `/api/Auth`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Auth + * @name AuthRegisterCreate + * @request POST:/api/Auth/register + * @response `200` `UserViewModel` Success + */ + authRegisterCreate = (data: UserDto, params: RequestParams = {}) => + this.request({ + path: `/api/Auth/register`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ChangeRecord + * @name ChangeRecordCreate + * @request POST:/api/ChangeRecord + * @response `200` `ChangeRecordViewModel` Success + */ + changeRecordCreate = (data: ChangeRecordDto, params: RequestParams = {}) => + this.request({ + path: `/api/ChangeRecord`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ChangeRecord + * @name ChangeRecordList + * @request GET:/api/ChangeRecord + * @response `200` `(ChangeRecordViewModel)[]` Success + */ + changeRecordList = (params: RequestParams = {}) => + this.request({ + path: `/api/ChangeRecord`, + method: "GET", + format: "json", + ...params, + }); + /** + * No description + * + * @tags ChangeRecord + * @name ChangeRecordPartialUpdate + * @request PATCH:/api/ChangeRecord + * @response `200` `ChangeRecordViewModel` Success + */ + changeRecordPartialUpdate = (data: ChangeRecordDto, params: RequestParams = {}) => + this.request({ + path: `/api/ChangeRecord`, + method: "PATCH", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ChangeRecord + * @name ChangeRecordDelete + * @request DELETE:/api/ChangeRecord + * @response `200` `void` Success + */ + changeRecordDelete = ( + query?: { + /** @format uuid */ + Id?: string; + /** @format uuid */ + SpendingGroupId?: string; + /** @format date-time */ + From?: string; + /** @format date-time */ + To?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/ChangeRecord`, + method: "DELETE", + query: query, + ...params, + }); + /** + * No description + * + * @tags ChangeRecord + * @name ChangeRecordFilterList + * @request GET:/api/ChangeRecord/filter + * @response `200` `(ChangeRecordViewModel)[]` Success + */ + changeRecordFilterList = ( + query?: { + /** @format uuid */ + Id?: string; + /** @format uuid */ + SpendingGroupId?: string; + /** @format date-time */ + From?: string; + /** @format date-time */ + To?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/ChangeRecord/filter`, + method: "GET", + query: query, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingGroup + * @name SpendingGroupDetail + * @request GET:/api/SpendingGroup/{id} + * @response `200` `SpendingGroupViewModel` Success + */ + spendingGroupDetail = ( + id: string, + query?: { + /** @format uuid */ + Id?: string; + Name?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/SpendingGroup/${id}`, + method: "GET", + query: query, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingGroup + * @name SpendingGroupList + * @request GET:/api/SpendingGroup + * @response `200` `(SpendingGroupViewModel)[]` Success + */ + spendingGroupList = (params: RequestParams = {}) => + this.request({ + path: `/api/SpendingGroup`, + method: "GET", + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingGroup + * @name SpendingGroupCreate + * @request POST:/api/SpendingGroup + * @response `200` `SpendingGroupViewModel` Success + */ + spendingGroupCreate = (data: SpendingGroupDto, params: RequestParams = {}) => + this.request({ + path: `/api/SpendingGroup`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingGroup + * @name SpendingGroupPartialUpdate + * @request PATCH:/api/SpendingGroup + * @response `200` `SpendingGroupViewModel` Success + */ + spendingGroupPartialUpdate = (data: SpendingGroupDto, params: RequestParams = {}) => + this.request({ + path: `/api/SpendingGroup`, + method: "PATCH", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingGroup + * @name SpendingGroupDelete + * @request DELETE:/api/SpendingGroup + * @response `200` `void` Success + */ + spendingGroupDelete = ( + query?: { + /** @format uuid */ + Id?: string; + Name?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/SpendingGroup`, + method: "DELETE", + query: query, + ...params, + }); + /** + * No description + * + * @tags SpendingGroup + * @name SpendingGroupFilterList + * @request GET:/api/SpendingGroup/filter + * @response `200` `(SpendingGroupViewModel)[]` Success + */ + spendingGroupFilterList = ( + query?: { + /** @format uuid */ + Id?: string; + Name?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/SpendingGroup/filter`, + method: "GET", + query: query, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingPlan + * @name SpendingPlanDetail + * @request GET:/api/SpendingPlan/{id} + * @response `200` `SpendingPlanViewModel` Success + */ + spendingPlanDetail = ( + id: string, + query?: { + /** @format uuid */ + Id?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/SpendingPlan/${id}`, + method: "GET", + query: query, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingPlan + * @name SpendingPlanList + * @request GET:/api/SpendingPlan + * @response `200` `(SpendingPlanViewModel)[]` Success + */ + spendingPlanList = (params: RequestParams = {}) => + this.request({ + path: `/api/SpendingPlan`, + method: "GET", + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingPlan + * @name SpendingPlanCreate + * @request POST:/api/SpendingPlan + * @response `200` `SpendingPlanViewModel` Success + */ + spendingPlanCreate = (data: SpendingPlanDto, params: RequestParams = {}) => + this.request({ + path: `/api/SpendingPlan`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingPlan + * @name SpendingPlanPartialUpdate + * @request PATCH:/api/SpendingPlan + * @response `200` `SpendingPlanViewModel` Success + */ + spendingPlanPartialUpdate = (data: SpendingPlanDto, params: RequestParams = {}) => + this.request({ + path: `/api/SpendingPlan`, + method: "PATCH", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SpendingPlan + * @name SpendingPlanDelete + * @request DELETE:/api/SpendingPlan + * @response `200` `void` Success + */ + spendingPlanDelete = ( + query?: { + /** @format uuid */ + Id?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/SpendingPlan`, + method: "DELETE", + query: query, + ...params, + }); + /** + * No description + * + * @tags SpendingPlan + * @name SpendingPlanFilterList + * @request GET:/api/SpendingPlan/filter + * @response `200` `(SpendingPlanViewModel)[]` Success + */ + spendingPlanFilterList = ( + query?: { + /** @format uuid */ + Id?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/SpendingPlan/filter`, + method: "GET", + query: query, + format: "json", + ...params, + }); + /** + * No description + * + * @tags User + * @name UserList + * @request GET:/api/User + * @response `200` `UserViewModel` Success + */ + userList = ( + query?: { + /** @format uuid */ + Id?: string; + Name?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/User`, + method: "GET", + query: query, + format: "json", + ...params, + }); + /** + * No description + * + * @tags User + * @name UserPartialUpdate + * @request PATCH:/api/User + * @response `200` `UserViewModel` Success + */ + userPartialUpdate = (data: UserDto, params: RequestParams = {}) => + this.request({ + path: `/api/User`, + method: "PATCH", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags User + * @name UserDelete + * @request DELETE:/api/User + * @response `200` `UserViewModel` Success + */ + userDelete = ( + query?: { + /** @format uuid */ + Id?: string; + Name?: string; + }, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/User`, + method: "DELETE", + query: query, + format: "json", + ...params, + }); +} diff --git a/front/src/core/api/data-contracts.ts b/front/src/core/api/data-contracts.ts new file mode 100644 index 0000000..1788da0 --- /dev/null +++ b/front/src/core/api/data-contracts.ts @@ -0,0 +1,96 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +export interface ChangeRecordDto { + /** @format uuid */ + id?: string; + /** @format uuid */ + userId?: string; + /** @format uuid */ + spendingGroupId?: string | null; + /** @format double */ + sum?: number; + /** @format date-time */ + changedAt?: string; +} + +export interface ChangeRecordViewModel { + /** @format uuid */ + id?: string; + /** @format double */ + sum?: number; + /** @format date-time */ + changedAt?: string; +} + +export interface SpendingGroupDto { + /** @format uuid */ + id?: string; + name?: string | null; + /** @format uuid */ + userId?: string; + changeRecords?: ChangeRecordDto[] | null; + spendingPlans?: SpendingPlanDto[] | null; +} + +export interface SpendingGroupViewModel { + /** @format uuid */ + id?: string; + name?: string | null; + changeRecords?: ChangeRecordViewModel[] | null; + spendingPlans?: SpendingPlanViewModel[] | null; +} + +export interface SpendingPlanDto { + /** @format uuid */ + id?: string; + /** @format uuid */ + spendingGroupId?: string; + /** @format double */ + sum?: number; + /** @format date-time */ + startAt?: string; + /** @format date-time */ + endAt?: string; +} + +export interface SpendingPlanViewModel { + /** @format uuid */ + id?: string; + /** @format date-time */ + startAt?: string; + /** @format date-time */ + endAt?: string; + /** @format double */ + sum?: number; +} + +export interface UserDto { + /** @format uuid */ + id?: string; + name?: string | null; + password?: string | null; + /** @format double */ + balance?: number; +} + +export interface UserLoginDTO { + name?: string | null; + password?: string | null; +} + +export interface UserViewModel { + /** @format uuid */ + id?: string; + name?: string | null; + /** @format double */ + balance?: number; +} diff --git a/front/src/core/api/http-client.ts b/front/src/core/api/http-client.ts new file mode 100644 index 0000000..db03d42 --- /dev/null +++ b/front/src/core/api/http-client.ts @@ -0,0 +1,220 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +export type QueryParamsType = Record; +export type ResponseFormat = keyof Omit; + +export interface FullRequestParams extends Omit { + /** set parameter to `true` for call `securityWorker` for this request */ + secure?: boolean; + /** request path */ + path: string; + /** content type of request body */ + type?: ContentType; + /** query params */ + query?: QueryParamsType; + /** format of response (i.e. response.json() -> format: "json") */ + format?: ResponseFormat; + /** request body */ + body?: unknown; + /** base url */ + baseUrl?: string; + /** request cancellation token */ + cancelToken?: CancelToken; +} + +export type RequestParams = Omit; + +export interface ApiConfig { + baseUrl?: string; + baseApiParams?: Omit; + securityWorker?: (securityData: SecurityDataType | null) => Promise | RequestParams | void; + customFetch?: typeof fetch; +} + +export interface HttpResponse extends Response { + data: D; + error: E; +} + +type CancelToken = Symbol | string | number; + +export enum ContentType { + Json = "application/json", + FormData = "multipart/form-data", + UrlEncoded = "application/x-www-form-urlencoded", + Text = "text/plain", +} + +export class HttpClient { + public baseUrl: string = ""; + private securityData: SecurityDataType | null = null; + private securityWorker?: ApiConfig["securityWorker"]; + private abortControllers = new Map(); + private customFetch = (...fetchParams: Parameters) => fetch(...fetchParams); + + private baseApiParams: RequestParams = { + credentials: "same-origin", + headers: {}, + redirect: "follow", + referrerPolicy: "no-referrer", + }; + + constructor(apiConfig: ApiConfig = {}) { + Object.assign(this, apiConfig); + } + + public setSecurityData = (data: SecurityDataType | null) => { + this.securityData = data; + }; + + protected encodeQueryParam(key: string, value: any) { + const encodedKey = encodeURIComponent(key); + return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`; + } + + protected addQueryParam(query: QueryParamsType, key: string) { + return this.encodeQueryParam(key, query[key]); + } + + protected addArrayQueryParam(query: QueryParamsType, key: string) { + const value = query[key]; + return value.map((v: any) => this.encodeQueryParam(key, v)).join("&"); + } + + protected toQueryString(rawQuery?: QueryParamsType): string { + const query = rawQuery || {}; + const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]); + return keys + .map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key))) + .join("&"); + } + + protected addQueryParams(rawQuery?: QueryParamsType): string { + const queryString = this.toQueryString(rawQuery); + return queryString ? `?${queryString}` : ""; + } + + private contentFormatters: Record any> = { + [ContentType.Json]: (input: any) => + input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, + [ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input), + [ContentType.FormData]: (input: any) => + Object.keys(input || {}).reduce((formData, key) => { + const property = input[key]; + formData.append( + key, + property instanceof Blob + ? property + : typeof property === "object" && property !== null + ? JSON.stringify(property) + : `${property}`, + ); + return formData; + }, new FormData()), + [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), + }; + + protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams { + return { + ...this.baseApiParams, + ...params1, + ...(params2 || {}), + headers: { + ...(this.baseApiParams.headers || {}), + ...(params1.headers || {}), + ...((params2 && params2.headers) || {}), + }, + }; + } + + protected createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => { + if (this.abortControllers.has(cancelToken)) { + const abortController = this.abortControllers.get(cancelToken); + if (abortController) { + return abortController.signal; + } + return void 0; + } + + const abortController = new AbortController(); + this.abortControllers.set(cancelToken, abortController); + return abortController.signal; + }; + + public abortRequest = (cancelToken: CancelToken) => { + const abortController = this.abortControllers.get(cancelToken); + + if (abortController) { + abortController.abort(); + this.abortControllers.delete(cancelToken); + } + }; + + public request = async ({ + body, + secure, + path, + type, + query, + format, + baseUrl, + cancelToken, + ...params + }: FullRequestParams): Promise> => { + const secureParams = + ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) && + this.securityWorker && + (await this.securityWorker(this.securityData))) || + {}; + const requestParams = this.mergeRequestParams(params, secureParams); + const queryString = query && this.toQueryString(query); + const payloadFormatter = this.contentFormatters[type || ContentType.Json]; + const responseFormat = format || requestParams.format; + + return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { + ...requestParams, + headers: { + ...(requestParams.headers || {}), + ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), + }, + signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null, + body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), + }).then(async (response) => { + const r = response.clone() as HttpResponse; + r.data = null as unknown as T; + r.error = null as unknown as E; + + const data = !responseFormat + ? r + : await response[responseFormat]() + .then((data) => { + if (r.ok) { + r.data = data; + } else { + r.error = data; + } + return r; + }) + .catch((e) => { + r.error = e; + return r; + }); + + if (cancelToken) { + this.abortControllers.delete(cancelToken); + } + + if (!response.ok) throw data; + return data; + }); + }; +} From c1d1e91594417b2b33279992b94c134fd06d99cc Mon Sep 17 00:00:00 2001 From: mfnefd Date: Mon, 2 Dec 2024 23:19:00 +0400 Subject: [PATCH 02/10] =?UTF-8?q?add:=20=D1=85=D0=B5=D0=B4=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/App.vue | 9 +++++++-- front/src/components/main/Header.vue | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 front/src/components/main/Header.vue diff --git a/front/src/App.vue b/front/src/App.vue index bbb0db4..751fbfd 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -1,9 +1,14 @@ + + \ No newline at end of file diff --git a/front/src/components/main/Header.vue b/front/src/components/main/Header.vue new file mode 100644 index 0000000..219a6ff --- /dev/null +++ b/front/src/components/main/Header.vue @@ -0,0 +1,18 @@ + + + + + From ae0db073a2dfdba7b8157fa550f077f8f4af25f5 Mon Sep 17 00:00:00 2001 From: mfnefd Date: Mon, 2 Dec 2024 23:22:24 +0400 Subject: [PATCH 03/10] =?UTF-8?q?add:=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=BA=D0=B0=20vuex,=20=D1=82=D0=B5=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D1=8C=20=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=20=D1=85=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=82=D1=8C=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D1=8C=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/package-lock.json | 790 +++++++++++++++++++++++++++++++++++++++- front/package.json | 7 +- front/src/main.ts | 7 +- front/src/store.ts | 20 + 4 files changed, 820 insertions(+), 4 deletions(-) create mode 100644 front/src/store.ts diff --git a/front/package-lock.json b/front/package-lock.json index 7fb419c..f3c1dca 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -8,15 +8,32 @@ "name": "dombudg", "version": "0.0.0", "dependencies": { - "vue": "^3.5.12" + "vue": "^3.5.12", + "vuex": "^4.1.0" }, "devDependencies": { "@vitejs/plugin-vue": "^5.1.4", + "swagger-typescript-api": "^13.0.23", "typescript": "~5.6.2", "vite": "^5.4.10", "vue-tsc": "^2.1.8" } }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-string-parser": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", @@ -454,6 +471,13 @@ "node": ">=12" } }, + "node_modules/@exodus/schemasafe": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==", + "dev": true, + "license": "MIT" + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", @@ -719,6 +743,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/swagger-schema-official": { + "version": "2.0.25", + "resolved": "https://registry.npmjs.org/@types/swagger-schema-official/-/swagger-schema-official-2.0.25.tgz", + "integrity": "sha512-T92Xav+Gf/Ik1uPW581nA+JftmjWPgskw/WBf4TJzxRG/SJ+DfNnNE+WuZ4mrXuzflQMqMkm1LSYjzYW7MB1Cg==", + "dev": true, + "license": "MIT" + }, "node_modules/@vitejs/plugin-vue": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.0.tgz", @@ -823,6 +854,12 @@ "he": "^1.2.0" } }, + "node_modules/@vue/devtools-api": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", + "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", + "license": "MIT" + }, "node_modules/@vue/language-core": { "version": "2.1.10", "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.1.10.tgz", @@ -905,6 +942,39 @@ "dev": true, "license": "MIT" }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -922,6 +992,95 @@ "balanced-match": "^1.0.0" } }, + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", + "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", @@ -935,6 +1094,20 @@ "dev": true, "license": "MIT" }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -947,6 +1120,33 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", + "dev": true, + "license": "MIT" + }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", @@ -986,12 +1186,42 @@ "@esbuild/win32-x64": "0.21.5" } }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "license": "MIT" }, + "node_modules/eta": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eta/-/eta-2.2.0.tgz", + "integrity": "sha512-UVQ72Rqjy/ZKQalzV5dCCJP80GrmPrMxh6NlNf+erV6ObL0ZFkhCstWRawS85z3smdr3d2wXPsZEY7rDPfGd2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "url": "https://github.com/eta-dev/eta?sponsor=1" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true, + "license": "MIT" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -1007,6 +1237,16 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -1017,6 +1257,88 @@ "he": "bin/he" } }, + "node_modules/http2-client": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", + "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==", + "dev": true, + "license": "MIT" + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, "node_modules/magic-string": { "version": "0.30.13", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.13.tgz", @@ -1067,6 +1389,157 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch-h2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "http2-client": "^1.2.5" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-readfiles": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", + "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es6-promise": "^3.2.1" + } + }, + "node_modules/oas-kit-common": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", + "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "fast-safe-stringify": "^2.0.7" + } + }, + "node_modules/oas-linter": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz", + "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@exodus/schemasafe": "^1.0.0-rc.2", + "should": "^13.2.1", + "yaml": "^1.10.0" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-resolver": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz", + "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.8", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" + }, + "bin": { + "resolve": "resolve.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-schema-walker": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", + "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", + "dev": true, + "license": "BSD-3-Clause", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-validator": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz", + "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "call-me-maybe": "^1.0.1", + "oas-kit-common": "^1.0.8", + "oas-linter": "^3.2.2", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "reftools": "^1.1.9", + "should": "^13.2.1", + "yaml": "^1.10.0" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -1108,6 +1581,52 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/reftools": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", + "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", + "dev": true, + "license": "BSD-3-Clause", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/rollup": { "version": "4.27.4", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.4.tgz", @@ -1159,6 +1678,66 @@ "node": ">=10" } }, + "node_modules/should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "node_modules/should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-type": "^1.4.0" + } + }, + "node_modules/should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "node_modules/should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "node_modules/should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", + "dev": true, + "license": "MIT" + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -1168,6 +1747,118 @@ "node": ">=0.10.0" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/swagger-schema-official": { + "version": "2.0.0-bab6bed", + "resolved": "https://registry.npmjs.org/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz", + "integrity": "sha512-rCC0NWGKr/IJhtRuPq/t37qvZHI/mH4I4sxflVM+qgVe5Z2uOCivzWaVbuioJaB61kvm5UvB7b49E+oBY0M8jA==", + "dev": true, + "license": "ISC" + }, + "node_modules/swagger-typescript-api": { + "version": "13.0.23", + "resolved": "https://registry.npmjs.org/swagger-typescript-api/-/swagger-typescript-api-13.0.23.tgz", + "integrity": "sha512-HhoIepxlFEU7Ol42Gh8/tvwhSxdkHcweX2tRkNhbZYBiEA+rK3C6N85MnwoeQR5XbidE3Kz8mLOqIerVGgR9uw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/swagger-schema-official": "^2.0.25", + "consola": "^3.2.3", + "cosmiconfig": "^9.0.0", + "didyoumean": "^1.2.2", + "eta": "^2.2.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "nanoid": "^3.3.7", + "prettier": "~3.3.3", + "swagger-schema-official": "2.0.0-bab6bed", + "swagger2openapi": "^7.0.8", + "typescript": "~5.5.4" + }, + "bin": { + "sta": "dist/cli.js", + "swagger-typescript-api": "dist/cli.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/swagger-typescript-api/node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/swagger2openapi": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", + "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "call-me-maybe": "^1.0.1", + "node-fetch": "^2.6.1", + "node-fetch-h2": "^2.3.0", + "node-readfiles": "^0.2.0", + "oas-kit-common": "^1.0.8", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "oas-validator": "^5.0.8", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" + }, + "bin": { + "boast": "boast.js", + "oas-validate": "oas-validate.js", + "swagger2openapi": "swagger2openapi.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT" + }, "node_modules/typescript": { "version": "5.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", @@ -1287,6 +1978,103 @@ "peerDependencies": { "typescript": ">=5.0.0" } + }, + "node_modules/vuex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz", + "integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.0.0-beta.11" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } } } } diff --git a/front/package.json b/front/package.json index a3857a9..1bc180c 100644 --- a/front/package.json +++ b/front/package.json @@ -6,13 +6,16 @@ "scripts": { "dev": "vite", "build": "vue-tsc -b && vite build", - "preview": "vite preview" + "preview": "vite preview", + "gen-api": "swagger-typescript-api -r -o ./src/core/api/ --modular -p " }, "dependencies": { - "vue": "^3.5.12" + "vue": "^3.5.12", + "vuex": "^4.1.0" }, "devDependencies": { "@vitejs/plugin-vue": "^5.1.4", + "swagger-typescript-api": "^13.0.23", "typescript": "~5.6.2", "vite": "^5.4.10", "vue-tsc": "^2.1.8" diff --git a/front/src/main.ts b/front/src/main.ts index 2425c0f..16b6431 100644 --- a/front/src/main.ts +++ b/front/src/main.ts @@ -1,5 +1,10 @@ import { createApp } from 'vue' import './style.css' import App from './App.vue' +import { key, store } from './store' -createApp(App).mount('#app') +const app = createApp(App) + +app.use(store, key) + +app.mount('#app') diff --git a/front/src/store.ts b/front/src/store.ts new file mode 100644 index 0000000..573a419 --- /dev/null +++ b/front/src/store.ts @@ -0,0 +1,20 @@ +import { InjectionKey } from 'vue' +import { createStore, Store } from 'vuex' +import { UserViewModel } from './core/api/data-contracts' + +export interface State { + user: UserViewModel | null +} + +export const key: InjectionKey> = Symbol() + +export const store = createStore({ + state: { + user: null + }, + mutations: { + setUser(state: any, user: UserViewModel) { + state.user = user + } + } +}) From bc5992552a2f8ac71ab8f534cb688fbb1703c926 Mon Sep 17 00:00:00 2001 From: mfnefd Date: Mon, 2 Dec 2024 23:44:01 +0400 Subject: [PATCH 04/10] =?UTF-8?q?add:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D1=80=D0=BE=D1=83=D1=82=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/package-lock.json | 846 +++++++++++++++++++++++++++- front/package.json | 3 + front/src/App.vue | 2 +- front/src/components/pages/Home.vue | 11 + front/src/main.ts | 2 + front/src/router.ts | 11 + 6 files changed, 869 insertions(+), 6 deletions(-) create mode 100644 front/src/components/pages/Home.vue create mode 100644 front/src/router.ts diff --git a/front/package-lock.json b/front/package-lock.json index f3c1dca..0c06863 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -8,17 +8,58 @@ "name": "dombudg", "version": "0.0.0", "dependencies": { + "ant-design-vue": "^4.2.6", "vue": "^3.5.12", + "vue-router": "^4.5.0", "vuex": "^4.1.0" }, "devDependencies": { "@vitejs/plugin-vue": "^5.1.4", "swagger-typescript-api": "^13.0.23", "typescript": "~5.6.2", + "unplugin-vue-components": "^0.27.5", "vite": "^5.4.10", "vue-tsc": "^2.1.8" } }, + "node_modules/@ant-design/colors": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-6.0.0.tgz", + "integrity": "sha512-qAZRvPzfdWHtfameEGP2Qvuf838NhergR35o+EuVyB5XvSA98xod5r4utvi4TJ3ywmevm290g9nsCG5MryrdWQ==", + "license": "MIT", + "dependencies": { + "@ctrl/tinycolor": "^3.4.0" + } + }, + "node_modules/@ant-design/icons-svg": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.4.2.tgz", + "integrity": "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==", + "license": "MIT" + }, + "node_modules/@ant-design/icons-vue": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@ant-design/icons-vue/-/icons-vue-7.0.1.tgz", + "integrity": "sha512-eCqY2unfZK6Fe02AwFlDHLfoyEFreP6rBwAZMIJ1LugmfMiVgwWDYlp1YsRugaPtICYOabV1iWxXdP12u9U43Q==", + "license": "MIT", + "dependencies": { + "@ant-design/colors": "^6.0.0", + "@ant-design/icons-svg": "^4.2.1" + }, + "peerDependencies": { + "vue": ">=3.0.3" + } + }, + "node_modules/@antfu/utils": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.10.tgz", + "integrity": "sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/@babel/code-frame": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", @@ -67,6 +108,18 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/runtime": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/types": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", @@ -80,6 +133,27 @@ "node": ">=6.9.0" } }, + "node_modules/@ctrl/tinycolor": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz", + "integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", + "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==", + "license": "MIT" + }, + "node_modules/@emotion/unitless": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==", + "license": "MIT" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -484,6 +558,67 @@ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "license": "MIT" }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.27.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz", @@ -736,6 +871,16 @@ "win32" ] }, + "node_modules/@simonwep/pickr": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@simonwep/pickr/-/pickr-1.8.2.tgz", + "integrity": "sha512-/l5w8BIkrpP6n1xsetx9MWPWlU6OblN5YgZZphxan0Tq4BByTCETL6lyIeY8lagalS2Nbt4F2W034KHLIiunKA==", + "license": "MIT", + "dependencies": { + "core-js": "^3.15.1", + "nanopop": "^2.1.0" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -935,6 +1080,19 @@ "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==", "license": "MIT" }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/alien-signals": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-0.2.2.tgz", @@ -968,6 +1126,73 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/ant-design-vue": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/ant-design-vue/-/ant-design-vue-4.2.6.tgz", + "integrity": "sha512-t7eX13Yj3i9+i5g9lqFyYneoIb3OzTvQjq9Tts1i+eiOd3Eva/6GagxBSXM1fOCjqemIu0FYVE1ByZ/38epR3Q==", + "license": "MIT", + "dependencies": { + "@ant-design/colors": "^6.0.0", + "@ant-design/icons-vue": "^7.0.0", + "@babel/runtime": "^7.10.5", + "@ctrl/tinycolor": "^3.5.0", + "@emotion/hash": "^0.9.0", + "@emotion/unitless": "^0.8.0", + "@simonwep/pickr": "~1.8.0", + "array-tree-filter": "^2.1.0", + "async-validator": "^4.0.0", + "csstype": "^3.1.1", + "dayjs": "^1.10.5", + "dom-align": "^1.12.1", + "dom-scroll-into-view": "^2.0.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.15", + "resize-observer-polyfill": "^1.5.1", + "scroll-into-view-if-needed": "^2.2.25", + "shallow-equal": "^1.0.0", + "stylis": "^4.1.3", + "throttle-debounce": "^5.0.0", + "vue-types": "^3.0.0", + "warning": "^4.0.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ant-design-vue" + }, + "peerDependencies": { + "vue": ">=3.2.0" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -975,6 +1200,18 @@ "dev": true, "license": "Python-2.0" }, + "node_modules/array-tree-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-tree-filter/-/array-tree-filter-2.1.0.tgz", + "integrity": "sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==", + "license": "MIT" + }, + "node_modules/async-validator": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz", + "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==", + "license": "MIT" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -982,6 +1219,19 @@ "dev": true, "license": "MIT" }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -992,6 +1242,19 @@ "balanced-match": "^1.0.0" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/call-me-maybe": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", @@ -1009,6 +1272,31 @@ "node": ">=6" } }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -1044,6 +1332,19 @@ "dev": true, "license": "MIT" }, + "node_modules/compute-scroll-into-view": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz", + "integrity": "sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==", + "license": "MIT" + }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, "node_modules/consola": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", @@ -1054,6 +1355,17 @@ "node": "^14.18.0 || >=16.10.0" } }, + "node_modules/core-js": { + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", + "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==", + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/cosmiconfig": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", @@ -1087,6 +1399,12 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "license": "MIT" }, + "node_modules/dayjs": { + "version": "1.11.13", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", + "license": "MIT" + }, "node_modules/de-indent": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", @@ -1094,6 +1412,24 @@ "dev": true, "license": "MIT" }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -1101,6 +1437,18 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/dom-align": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.4.tgz", + "integrity": "sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==", + "license": "MIT" + }, + "node_modules/dom-scroll-into-view": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/dom-scroll-into-view/-/dom-scroll-into-view-2.0.1.tgz", + "integrity": "sha512-bvVTQe1lfaUr1oFzZX80ce9KLDlZ3iU+XGNE/bz9HnGdklTieqsbmsLHe+rT2XWqopvL0PckkYqN7ksmm5pe3w==", + "license": "MIT" + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -1215,6 +1563,23 @@ "url": "https://github.com/eta-dev/eta?sponsor=1" } }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", @@ -1222,6 +1587,29 @@ "dev": true, "license": "MIT" }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -1247,6 +1635,19 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -1288,6 +1689,29 @@ "dev": true, "license": "MIT" }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -1298,11 +1722,42 @@ "node": ">=8" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-object": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz", + "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -1332,22 +1787,93 @@ "dev": true, "license": "MIT" }, + "node_modules/local-pkg": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz", + "integrity": "sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true, "license": "MIT" }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/magic-string": { - "version": "0.30.13", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.13.tgz", - "integrity": "sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g==", + "version": "0.30.14", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.14.tgz", + "integrity": "sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw==", "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -1364,6 +1890,26 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/mlly": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.3.tgz", + "integrity": "sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.14.0", + "pathe": "^1.1.2", + "pkg-types": "^1.2.1", + "ufo": "^1.5.4" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/muggle-string": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", @@ -1389,6 +1935,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/nanopop": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/nanopop/-/nanopop-2.4.2.tgz", + "integrity": "sha512-NzOgmMQ+elxxHeIha+OG/Pv3Oc3p4RU2aBhwWwAqDpXrdTbtRylbRLQztLy8dMMwfl6pclznBdfUhccEn9ZIzw==", + "license": "MIT" + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -1433,6 +1985,16 @@ "es6-promise": "^3.2.1" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/oas-kit-common": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", @@ -1547,12 +2109,44 @@ "dev": true, "license": "MIT" }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-types": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", + "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.2", + "pathe": "^1.1.2" + } + }, "node_modules/postcss": { "version": "8.4.49", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", @@ -1597,6 +2191,53 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/reftools": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", @@ -1607,6 +2248,12 @@ "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1617,6 +2264,12 @@ "node": ">=0.10.0" } }, + "node_modules/resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", + "license": "MIT" + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -1627,6 +2280,17 @@ "node": ">=4" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rollup": { "version": "4.27.4", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.4.tgz", @@ -1665,6 +2329,39 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scroll-into-view-if-needed": { + "version": "2.2.31", + "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.31.tgz", + "integrity": "sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==", + "license": "MIT", + "dependencies": { + "compute-scroll-into-view": "^1.0.20" + } + }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -1678,6 +2375,12 @@ "node": ">=10" } }, + "node_modules/shallow-equal": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.2.1.tgz", + "integrity": "sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==", + "license": "MIT" + }, "node_modules/should": { "version": "13.2.3", "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", @@ -1775,6 +2478,12 @@ "node": ">=8" } }, + "node_modules/stylis": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.4.tgz", + "integrity": "sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==", + "license": "MIT" + }, "node_modules/swagger-schema-official": { "version": "2.0.0-bab6bed", "resolved": "https://registry.npmjs.org/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz", @@ -1852,6 +2561,28 @@ "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, + "node_modules/throttle-debounce": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-5.0.2.tgz", + "integrity": "sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A==", + "license": "MIT", + "engines": { + "node": ">=12.22" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -1873,6 +2604,65 @@ "node": ">=14.17" } }, + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/unplugin": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.16.0.tgz", + "integrity": "sha512-5liCNPuJW8dqh3+DM6uNM2EI3MLLpCKp/KY+9pB5M2S2SR2qvvDHhKgBOaTWEbZTAws3CXfB0rKTIolWKL05VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.14.0", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/unplugin-vue-components": { + "version": "0.27.5", + "resolved": "https://registry.npmjs.org/unplugin-vue-components/-/unplugin-vue-components-0.27.5.tgz", + "integrity": "sha512-m9j4goBeNwXyNN8oZHHxvIIYiG8FQ9UfmKWeNllpDvhU7btKNNELGPt+o3mckQKuPwrE7e0PvCsx+IWuDSD9Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@antfu/utils": "^0.7.10", + "@rollup/pluginutils": "^5.1.3", + "chokidar": "^3.6.0", + "debug": "^4.3.7", + "fast-glob": "^3.3.2", + "local-pkg": "^0.5.1", + "magic-string": "^0.30.14", + "minimatch": "^9.0.5", + "mlly": "^1.7.3", + "unplugin": "^1.16.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@babel/parser": "^7.15.8", + "@nuxt/kit": "^3.2.2", + "vue": "2 || 3" + }, + "peerDependenciesMeta": { + "@babel/parser": { + "optional": true + }, + "@nuxt/kit": { + "optional": true + } + } + }, "node_modules/vite": { "version": "5.4.11", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", @@ -1961,6 +2751,21 @@ } } }, + "node_modules/vue-router": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.5.0.tgz", + "integrity": "sha512-HDuk+PuH5monfNuY+ct49mNmkCRK4xJAV9Ts4z9UFc4rzdDnxQLyCMGGc8pKhZhHTVzfanpNwB/lwqevcBwI4w==", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.6.4" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, "node_modules/vue-tsc": { "version": "2.1.10", "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.1.10.tgz", @@ -1979,6 +2784,21 @@ "typescript": ">=5.0.0" } }, + "node_modules/vue-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/vue-types/-/vue-types-3.0.2.tgz", + "integrity": "sha512-IwUC0Aq2zwaXqy74h4WCvFCUtoV0iSWr0snWnE9TnU18S66GAQyqQbRf2qfJtUuiFsBf6qp0MEwdonlwznlcrw==", + "license": "MIT", + "dependencies": { + "is-plain-object": "3.0.1" + }, + "engines": { + "node": ">=10.15.0" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vuex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz", @@ -1991,6 +2811,15 @@ "vue": "^3.2.0" } }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -1998,6 +2827,13 @@ "dev": true, "license": "BSD-2-Clause" }, + "node_modules/webpack-virtual-modules": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", + "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", + "dev": true, + "license": "MIT" + }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", diff --git a/front/package.json b/front/package.json index 1bc180c..a986ca7 100644 --- a/front/package.json +++ b/front/package.json @@ -10,13 +10,16 @@ "gen-api": "swagger-typescript-api -r -o ./src/core/api/ --modular -p " }, "dependencies": { + "ant-design-vue": "^4.2.6", "vue": "^3.5.12", + "vue-router": "^4.5.0", "vuex": "^4.1.0" }, "devDependencies": { "@vitejs/plugin-vue": "^5.1.4", "swagger-typescript-api": "^13.0.23", "typescript": "~5.6.2", + "unplugin-vue-components": "^0.27.5", "vite": "^5.4.10", "vue-tsc": "^2.1.8" } diff --git a/front/src/App.vue b/front/src/App.vue index 751fbfd..231231d 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -5,7 +5,7 @@ import Header from './components/main/Header.vue'; diff --git a/front/src/components/pages/Home.vue b/front/src/components/pages/Home.vue new file mode 100644 index 0000000..6803de9 --- /dev/null +++ b/front/src/components/pages/Home.vue @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/front/src/main.ts b/front/src/main.ts index 16b6431..3a09299 100644 --- a/front/src/main.ts +++ b/front/src/main.ts @@ -2,9 +2,11 @@ import { createApp } from 'vue' import './style.css' import App from './App.vue' import { key, store } from './store' +import router from './router' const app = createApp(App) app.use(store, key) +app.use(router) app.mount('#app') diff --git a/front/src/router.ts b/front/src/router.ts new file mode 100644 index 0000000..87fe847 --- /dev/null +++ b/front/src/router.ts @@ -0,0 +1,11 @@ +import { createRouter, createWebHistory } from 'vue-router'; + +export default createRouter({ + history: createWebHistory(), + routes: [ + { + path: '/', + component: () => import('./components/pages/Home.vue'), + } + ], +}) From e8bb036d35b679f7e660085e8ca783022bb4ddf1 Mon Sep 17 00:00:00 2001 From: mfnefd Date: Tue, 3 Dec 2024 02:10:20 +0400 Subject: [PATCH 05/10] =?UTF-8?q?add:=20=D1=81=D1=82=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=86=D0=B0=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BD=D0=B0,=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20=D1=81=20vuex=20?= =?UTF-8?q?=D0=BD=D0=B0=20pinia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/Controllers/Program.cs | 3 +- front/components.d.ts | 22 +++++++ front/package-lock.json | 68 +++++++++++++++++----- front/package.json | 4 +- front/src/App.vue | 7 ++- front/src/components/main/Header.vue | 10 +--- front/src/components/pages/Login.vue | 76 +++++++++++++++++++++++++ front/src/components/pages/SignUp.vue | 0 front/src/core/api/Api.ts | 6 +- front/src/core/api/data-contracts.ts | 2 +- front/src/core/api/http-client.ts | 2 +- front/src/core/services/auth-service.ts | 25 ++++++++ front/src/main.ts | 10 +++- front/src/router.ts | 6 ++ front/src/store.ts | 25 ++++---- front/vite.config.ts | 13 ++++- 16 files changed, 231 insertions(+), 48 deletions(-) create mode 100644 front/components.d.ts create mode 100644 front/src/components/pages/Login.vue create mode 100644 front/src/components/pages/SignUp.vue create mode 100644 front/src/core/services/auth-service.ts diff --git a/back/Controllers/Program.cs b/back/Controllers/Program.cs index 2e20712..2c70319 100644 --- a/back/Controllers/Program.cs +++ b/back/Controllers/Program.cs @@ -20,9 +20,10 @@ if (app.Environment.IsDevelopment()) app.UseSwagger(); app.UseSwaggerUI(); } - app.MigrateDb(); +app.UseCors(builder => builder.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin()); + app.UseHttpsRedirection(); app.UseAuthorization(); diff --git a/front/components.d.ts b/front/components.d.ts new file mode 100644 index 0000000..5a49b6b --- /dev/null +++ b/front/components.d.ts @@ -0,0 +1,22 @@ +/* eslint-disable */ +// @ts-nocheck +// Generated by unplugin-vue-components +// Read more: https://github.com/vuejs/core/pull/3399 +export {} + +/* prettier-ignore */ +declare module 'vue' { + export interface GlobalComponents { + AButton: typeof import('ant-design-vue/es')['Button'] + AForm: typeof import('ant-design-vue/es')['Form'] + AFormItem: typeof import('ant-design-vue/es')['FormItem'] + AInput: typeof import('ant-design-vue/es')['Input'] + AInputPassword: typeof import('ant-design-vue/es')['InputPassword'] + Header: typeof import('./src/components/main/Header.vue')['default'] + Home: typeof import('./src/components/pages/Home.vue')['default'] + Login: typeof import('./src/components/pages/Login.vue')['default'] + RouterLink: typeof import('vue-router')['RouterLink'] + RouterView: typeof import('vue-router')['RouterView'] + SignUp: typeof import('./src/components/pages/SignUp.vue')['default'] + } +} diff --git a/front/package-lock.json b/front/package-lock.json index 0c06863..7f99dfb 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -9,9 +9,9 @@ "version": "0.0.0", "dependencies": { "ant-design-vue": "^4.2.6", + "pinia": "^2.2.8", "vue": "^3.5.12", - "vue-router": "^4.5.0", - "vuex": "^4.1.0" + "vue-router": "^4.5.0" }, "devDependencies": { "@vitejs/plugin-vue": "^5.1.4", @@ -2135,6 +2135,58 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pinia": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.2.8.tgz", + "integrity": "sha512-NRTYy2g+kju5tBRe0oNlriZIbMNvma8ZJrpHsp3qudyiMEA8jMmPPKQ2QMHg0Oc4BkUyQYWagACabrwriCK9HQ==", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.6.3", + "vue-demi": "^0.14.10" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "@vue/composition-api": "^1.4.0", + "typescript": ">=4.4.4", + "vue": "^2.6.14 || ^3.5.11" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/pinia/node_modules/vue-demi": { + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/pkg-types": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", @@ -2799,18 +2851,6 @@ "vue": "^3.0.0" } }, - "node_modules/vuex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz", - "integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==", - "license": "MIT", - "dependencies": { - "@vue/devtools-api": "^6.0.0-beta.11" - }, - "peerDependencies": { - "vue": "^3.2.0" - } - }, "node_modules/warning": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", diff --git a/front/package.json b/front/package.json index a986ca7..daa2045 100644 --- a/front/package.json +++ b/front/package.json @@ -11,9 +11,9 @@ }, "dependencies": { "ant-design-vue": "^4.2.6", + "pinia": "^2.2.8", "vue": "^3.5.12", - "vue-router": "^4.5.0", - "vuex": "^4.1.0" + "vue-router": "^4.5.0" }, "devDependencies": { "@vitejs/plugin-vue": "^5.1.4", diff --git a/front/src/App.vue b/front/src/App.vue index 231231d..8436d0e 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -10,5 +10,10 @@ import Header from './components/main/Header.vue'; \ No newline at end of file diff --git a/front/src/components/main/Header.vue b/front/src/components/main/Header.vue index 219a6ff..5a754b1 100644 --- a/front/src/components/main/Header.vue +++ b/front/src/components/main/Header.vue @@ -2,15 +2,7 @@ \ No newline at end of file diff --git a/front/src/components/pages/SignUp.vue b/front/src/components/pages/SignUp.vue new file mode 100644 index 0000000..e69de29 diff --git a/front/src/core/api/Api.ts b/front/src/core/api/Api.ts index ab58717..a9c2824 100644 --- a/front/src/core/api/Api.ts +++ b/front/src/core/api/Api.ts @@ -17,7 +17,7 @@ import { SpendingPlanDto, SpendingPlanViewModel, UserDto, - UserLoginDTO, + UserLoginDto, UserViewModel, } from "./data-contracts"; import { ContentType, HttpClient, RequestParams } from "./http-client"; @@ -31,7 +31,7 @@ export class Api extends HttpClient + auth = (data: UserLoginDto, params: RequestParams = {}) => this.request({ path: `/api/Auth`, method: "POST", @@ -48,7 +48,7 @@ export class Api extends HttpClient + authRegister = (data: UserDto, params: RequestParams = {}) => this.request({ path: `/api/Auth/register`, method: "POST", diff --git a/front/src/core/api/data-contracts.ts b/front/src/core/api/data-contracts.ts index 1788da0..9c35c81 100644 --- a/front/src/core/api/data-contracts.ts +++ b/front/src/core/api/data-contracts.ts @@ -82,7 +82,7 @@ export interface UserDto { balance?: number; } -export interface UserLoginDTO { +export interface UserLoginDto { name?: string | null; password?: string | null; } diff --git a/front/src/core/api/http-client.ts b/front/src/core/api/http-client.ts index db03d42..c338a86 100644 --- a/front/src/core/api/http-client.ts +++ b/front/src/core/api/http-client.ts @@ -55,7 +55,7 @@ export enum ContentType { } export class HttpClient { - public baseUrl: string = ""; + public baseUrl: string = "http://localhost:5125"; private securityData: SecurityDataType | null = null; private securityWorker?: ApiConfig["securityWorker"]; private abortControllers = new Map(); diff --git a/front/src/core/services/auth-service.ts b/front/src/core/services/auth-service.ts new file mode 100644 index 0000000..131d201 --- /dev/null +++ b/front/src/core/services/auth-service.ts @@ -0,0 +1,25 @@ +import { useUserStore } from "../../store"; +import { Api } from "../api/Api"; +import { UserDto, UserLoginDto } from "../api/data-contracts"; + +export class AuthService { + private readonly _api: Api; + + constructor(api: Api) { + this._api = api; + + } + async login(data: UserLoginDto) { + let result = await this._api.auth(data); + console.log(result); + const store = useUserStore(); + store.updateUser(result.data); + } + + async register(data: UserDto) { + let result = await this._api.authRegister(data); + const store = useUserStore(); + store.updateUser(result.data); + } + +} \ No newline at end of file diff --git a/front/src/main.ts b/front/src/main.ts index 3a09299..97fdbc8 100644 --- a/front/src/main.ts +++ b/front/src/main.ts @@ -1,12 +1,18 @@ import { createApp } from 'vue' import './style.css' import App from './App.vue' -import { key, store } from './store' import router from './router' +import { Api } from './core/api/Api' +import { createPinia } from 'pinia' +import { AuthService } from './core/services/auth-service' const app = createApp(App) -app.use(store, key) app.use(router) +app.use(createPinia()) + +// Di +const api = new Api(); +app.provide(typeof(AuthService), new AuthService(api)) app.mount('#app') diff --git a/front/src/router.ts b/front/src/router.ts index 87fe847..435c0d0 100644 --- a/front/src/router.ts +++ b/front/src/router.ts @@ -5,7 +5,13 @@ export default createRouter({ routes: [ { path: '/', + name: 'home', component: () => import('./components/pages/Home.vue'), + }, + { + path: '/login', + name: 'login', + component: () => import('./components/pages/Login.vue'), } ], }) diff --git a/front/src/store.ts b/front/src/store.ts index 573a419..a4aa04d 100644 --- a/front/src/store.ts +++ b/front/src/store.ts @@ -1,20 +1,19 @@ -import { InjectionKey } from 'vue' -import { createStore, Store } from 'vuex' import { UserViewModel } from './core/api/data-contracts' +import { defineStore } from 'pinia' export interface State { - user: UserViewModel | null + user: UserViewModel } -export const key: InjectionKey> = Symbol() +export const useUserStore = defineStore('user', { + state: (): State => ({ + user: {} as UserViewModel + }), + actions: { + updateUser(payload: UserViewModel) { + if (!payload) return; -export const store = createStore({ - state: { - user: null - }, - mutations: { - setUser(state: any, user: UserViewModel) { - state.user = user - } + this.user = payload; + }, } -}) +}) \ No newline at end of file diff --git a/front/vite.config.ts b/front/vite.config.ts index bbcf80c..18f6270 100644 --- a/front/vite.config.ts +++ b/front/vite.config.ts @@ -1,7 +1,18 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import Components from 'unplugin-vue-components/vite' +import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers' // https://vite.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [ + vue(), + Components({ + resolvers: [ + AntDesignVueResolver({ + importStyle: false, // css in js + }), + ], + }), + ], }) From 48cdffe868b465b33dd1b715cb36cf2b4cb54698 Mon Sep 17 00:00:00 2001 From: mfnefd Date: Tue, 3 Dec 2024 03:46:46 +0400 Subject: [PATCH 06/10] =?UTF-8?q?fix:=20=D1=85=D0=B5=D0=B4=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/components.d.ts | 8 ++++ front/src/App.vue | 10 +++-- front/src/components/main/Header.vue | 50 ++++++++++++++++++++++++- front/src/components/pages/Login.vue | 4 +- front/src/core/services/auth-service.ts | 7 +++- 5 files changed, 71 insertions(+), 8 deletions(-) diff --git a/front/components.d.ts b/front/components.d.ts index 5a49b6b..783e5ec 100644 --- a/front/components.d.ts +++ b/front/components.d.ts @@ -8,10 +8,18 @@ export {} declare module 'vue' { export interface GlobalComponents { AButton: typeof import('ant-design-vue/es')['Button'] + ACol: typeof import('ant-design-vue/es')['Col'] AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] AInput: typeof import('ant-design-vue/es')['Input'] AInputPassword: typeof import('ant-design-vue/es')['InputPassword'] + ALayout: typeof import('ant-design-vue/es')['Layout'] + ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent'] + ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader'] + AMenu: typeof import('ant-design-vue/es')['Menu'] + AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] + ARow: typeof import('ant-design-vue/es')['Row'] + ATypographyText: typeof import('ant-design-vue/es')['TypographyText'] Header: typeof import('./src/components/main/Header.vue')['default'] Home: typeof import('./src/components/pages/Home.vue')['default'] Login: typeof import('./src/components/pages/Login.vue')['default'] diff --git a/front/src/App.vue b/front/src/App.vue index 8436d0e..53041e8 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -3,10 +3,12 @@ import Header from './components/main/Header.vue'; diff --git a/front/src/components/pages/Login.vue b/front/src/components/pages/Login.vue index edcb766..905b60a 100644 --- a/front/src/components/pages/Login.vue +++ b/front/src/components/pages/Login.vue @@ -53,9 +53,9 @@ const formState = reactive({ const authService = inject(typeof(AuthService)) as AuthService; // Логика формы -const onFinish = (values: any) => { +const onFinish = async (values: any) => { console.log('Success:', values); - authService.login(formState); + await authService.login(formState); router.push({ name: 'home' }); }; const onFinishFailed = (errorInfo: any) => { diff --git a/front/src/core/services/auth-service.ts b/front/src/core/services/auth-service.ts index 131d201..1e7754c 100644 --- a/front/src/core/services/auth-service.ts +++ b/front/src/core/services/auth-service.ts @@ -1,6 +1,6 @@ import { useUserStore } from "../../store"; import { Api } from "../api/Api"; -import { UserDto, UserLoginDto } from "../api/data-contracts"; +import { UserDto, UserLoginDto, UserViewModel } from "../api/data-contracts"; export class AuthService { private readonly _api: Api; @@ -16,6 +16,11 @@ export class AuthService { store.updateUser(result.data); } + logout() { + const store = useUserStore(); + store.updateUser({} as UserViewModel); + } + async register(data: UserDto) { let result = await this._api.authRegister(data); const store = useUserStore(); From 9d2f2be6eefac8b4838ba275c5faca50aa2abb2d Mon Sep 17 00:00:00 2001 From: mfnefd Date: Tue, 3 Dec 2024 04:02:35 +0400 Subject: [PATCH 07/10] =?UTF-8?q?add:=20=D1=81=D1=82=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=86=D0=B0=20=D1=80=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/components.d.ts | 1 + front/src/App.vue | 2 +- front/src/components/main/Header.vue | 4 +- front/src/components/pages/Login.vue | 2 +- front/src/components/pages/SignUp.vue | 86 +++++++++++++++++++++++++++ front/src/router.ts | 5 ++ 6 files changed, 96 insertions(+), 4 deletions(-) diff --git a/front/components.d.ts b/front/components.d.ts index 783e5ec..f648f6c 100644 --- a/front/components.d.ts +++ b/front/components.d.ts @@ -12,6 +12,7 @@ declare module 'vue' { AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] AInput: typeof import('ant-design-vue/es')['Input'] + AInputNumber: typeof import('ant-design-vue/es')['InputNumber'] AInputPassword: typeof import('ant-design-vue/es')['InputPassword'] ALayout: typeof import('ant-design-vue/es')['Layout'] ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent'] diff --git a/front/src/App.vue b/front/src/App.vue index 53041e8..bf3d117 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -16,6 +16,6 @@ main { display: flex; justify-content: center; align-items: center; - height: 100vh; + height: 80vh; } \ No newline at end of file diff --git a/front/src/components/main/Header.vue b/front/src/components/main/Header.vue index 04f4380..e614b8b 100644 --- a/front/src/components/main/Header.vue +++ b/front/src/components/main/Header.vue @@ -31,7 +31,7 @@ function logout() { name="logout" @click="logout()" danger - style="margin-left: 10px" + style="margin-left: 30px" > Выйти @@ -52,7 +52,7 @@ function logout() { justify-content: left; } .base-nav a { - margin-left: 10px; + margin-left: 30px; } diff --git a/front/src/components/pages/Login.vue b/front/src/components/pages/Login.vue index 905b60a..b8eab92 100644 --- a/front/src/components/pages/Login.vue +++ b/front/src/components/pages/Login.vue @@ -34,7 +34,7 @@ Войти Или - зарегестрироваться + создать аккаунт diff --git a/front/src/components/pages/SignUp.vue b/front/src/components/pages/SignUp.vue index e69de29..4adbbc8 100644 --- a/front/src/components/pages/SignUp.vue +++ b/front/src/components/pages/SignUp.vue @@ -0,0 +1,86 @@ + + + \ No newline at end of file diff --git a/front/src/router.ts b/front/src/router.ts index 435c0d0..5da31ed 100644 --- a/front/src/router.ts +++ b/front/src/router.ts @@ -12,6 +12,11 @@ export default createRouter({ path: '/login', name: 'login', component: () => import('./components/pages/Login.vue'), + }, + { + path: '/signup', + name: 'signup', + component: () => import('./components/pages/SignUp.vue'), } ], }) From dffe2a665504c85aaee3400bec4cc829c104a71c Mon Sep 17 00:00:00 2001 From: mfnefd Date: Tue, 3 Dec 2024 18:37:22 +0400 Subject: [PATCH 08/10] =?UTF-8?q?add,=20fix:=20=D0=AF=20=D0=9D=D0=95=20?= =?UTF-8?q?=D0=97=D0=9D=D0=90=D0=AE=20=D0=9D=D0=90=D0=94=D0=9E=20=D0=A1?= =?UTF-8?q?=D0=A0=D0=9E=D0=A7=D0=9D=D0=9E=20=D0=92=D0=A1=D0=95=20=D0=94?= =?UTF-8?q?=D0=95=D0=9B=D0=90=D0=A2=D0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/Contracts/DTOs/ChangeRecordDto.cs | 1 + back/Contracts/DTOs/UserLoginDTO.cs | 2 +- back/Contracts/Mappers/ChangeRecordMapper.cs | 3 +- .../SearchModels/ChangeRecordSearch.cs | 1 + .../SearchModels/SpendingGroupSearch.cs | 1 + back/Contracts/Services/IAuthService.cs | 2 +- .../ViewModels/ChangeRecordViewModel.cs | 1 + .../Controllers/Controllers/AuthController.cs | 2 +- .../Repositories/ChangeRecordRepo.cs | 6 +- .../Repositories/SpendingGroupRepo.cs | 9 +- .../Support/Mappers/ChangeRecordMapper.cs | 3 +- back/Services/Domain/AuthService.cs | 2 +- front/components.d.ts | 14 +++ front/package-lock.json | 44 +++++++++ front/package.json | 2 + front/src/App.vue | 10 +- front/src/components/main/Header.vue | 5 +- front/src/components/pages/Groups.vue | 47 ++++++++++ front/src/components/pages/Home.vue | 38 +++++++- front/src/components/pages/Login.vue | 4 +- front/src/components/pages/Plans.vue | 52 +++++++++++ front/src/components/pages/SignUp.vue | 2 +- .../support/ChangeRecordManager.vue | 92 +++++++++++++++++++ front/src/components/support/PlanManager.vue | 77 ++++++++++++++++ .../support/SpendingGroupManager.vue | 53 +++++++++++ front/src/core/api/Api.ts | 12 ++- front/src/core/api/data-contracts.ts | 2 + .../core/services/change-record-service.ts | 30 ++++++ front/src/core/services/group-service.ts | 27 ++++++ front/src/core/services/plans-service.ts | 18 ++++ front/src/main.ts | 8 +- front/src/router.ts | 28 +++++- 32 files changed, 573 insertions(+), 25 deletions(-) create mode 100644 front/src/components/pages/Groups.vue create mode 100644 front/src/components/pages/Plans.vue create mode 100644 front/src/components/support/ChangeRecordManager.vue create mode 100644 front/src/components/support/PlanManager.vue create mode 100644 front/src/components/support/SpendingGroupManager.vue create mode 100644 front/src/core/services/change-record-service.ts create mode 100644 front/src/core/services/group-service.ts create mode 100644 front/src/core/services/plans-service.ts diff --git a/back/Contracts/DTOs/ChangeRecordDto.cs b/back/Contracts/DTOs/ChangeRecordDto.cs index 21d140c..30f8dbd 100644 --- a/back/Contracts/DTOs/ChangeRecordDto.cs +++ b/back/Contracts/DTOs/ChangeRecordDto.cs @@ -5,6 +5,7 @@ public class ChangeRecordDto public Guid Id { get; set; } public Guid UserId { get; set; } public Guid? SpendingGroupId { get; set; } + public string? SpendingGroupName { get; set; } public decimal Sum { get; set; } public DateTime ChangedAt { get; set; } } \ No newline at end of file diff --git a/back/Contracts/DTOs/UserLoginDTO.cs b/back/Contracts/DTOs/UserLoginDTO.cs index 73210e9..31acccc 100644 --- a/back/Contracts/DTOs/UserLoginDTO.cs +++ b/back/Contracts/DTOs/UserLoginDTO.cs @@ -1,6 +1,6 @@ namespace Contracts.DTO; -public class UserLoginDTO +public class UserLoginDto { public string Name { get; set; } = string.Empty; public string Password { get; set; } = string.Empty; diff --git a/back/Contracts/Mappers/ChangeRecordMapper.cs b/back/Contracts/Mappers/ChangeRecordMapper.cs index 606344d..3f251ed 100644 --- a/back/Contracts/Mappers/ChangeRecordMapper.cs +++ b/back/Contracts/Mappers/ChangeRecordMapper.cs @@ -10,6 +10,7 @@ public static class ChangeRecordMapper { Id = dto.Id, Sum = dto.Sum, - ChangedAt = dto.ChangedAt + ChangedAt = dto.ChangedAt, + SpendingGroupName = dto.SpendingGroupName ?? string.Empty }; } \ No newline at end of file diff --git a/back/Contracts/SearchModels/ChangeRecordSearch.cs b/back/Contracts/SearchModels/ChangeRecordSearch.cs index 65a5094..cfad78f 100644 --- a/back/Contracts/SearchModels/ChangeRecordSearch.cs +++ b/back/Contracts/SearchModels/ChangeRecordSearch.cs @@ -6,4 +6,5 @@ public class ChangeRecordSearch public Guid? SpendingGroupId { get; set; } public DateTime? From { get; set; } public DateTime? To { get; set; } + public Guid? UserId { get; set; } } \ No newline at end of file diff --git a/back/Contracts/SearchModels/SpendingGroupSearch.cs b/back/Contracts/SearchModels/SpendingGroupSearch.cs index 927a206..8ae4ba6 100644 --- a/back/Contracts/SearchModels/SpendingGroupSearch.cs +++ b/back/Contracts/SearchModels/SpendingGroupSearch.cs @@ -4,4 +4,5 @@ public class SpendingGroupSearch { public Guid? Id { get; set; } public string? Name { get; set; } + public Guid? UserId { get; set; } } \ No newline at end of file diff --git a/back/Contracts/Services/IAuthService.cs b/back/Contracts/Services/IAuthService.cs index 03548f7..5829bce 100644 --- a/back/Contracts/Services/IAuthService.cs +++ b/back/Contracts/Services/IAuthService.cs @@ -6,6 +6,6 @@ namespace Contracts.Services; public interface IAuthService { - public Task Login(UserLoginDTO loginData); + public Task Login(UserLoginDto loginData); public Task Register(UserDto user); } \ No newline at end of file diff --git a/back/Contracts/ViewModels/ChangeRecordViewModel.cs b/back/Contracts/ViewModels/ChangeRecordViewModel.cs index 3a75eb3..99e6d82 100644 --- a/back/Contracts/ViewModels/ChangeRecordViewModel.cs +++ b/back/Contracts/ViewModels/ChangeRecordViewModel.cs @@ -5,4 +5,5 @@ public class ChangeRecordViewModel public Guid Id { get; set; } public decimal Sum { get; set; } public DateTime ChangedAt { get; set; } + public string SpendingGroupName { get; set; } = string.Empty; } \ No newline at end of file diff --git a/back/Controllers/Controllers/AuthController.cs b/back/Controllers/Controllers/AuthController.cs index 15eb928..3a5c5d1 100644 --- a/back/Controllers/Controllers/AuthController.cs +++ b/back/Controllers/Controllers/AuthController.cs @@ -18,7 +18,7 @@ public class AuthController : ControllerBase } [HttpPost] - public async Task> Login([FromBody] UserLoginDTO loginData) + public async Task> Login([FromBody] UserLoginDto loginData) { try { diff --git a/back/Infrastructure/Repositories/ChangeRecordRepo.cs b/back/Infrastructure/Repositories/ChangeRecordRepo.cs index 6da1839..289d89e 100644 --- a/back/Infrastructure/Repositories/ChangeRecordRepo.cs +++ b/back/Infrastructure/Repositories/ChangeRecordRepo.cs @@ -70,8 +70,12 @@ public class ChangeRecordRepo : IChangeRecordRepo { query = query.Where(x => x.ChangedAt >= search.From && x.ChangedAt <= search.To); } + if (search.UserId.HasValue) + { + query = query.Where(x => x.UserId == search.UserId); + } } - return await query.Select(x => x.ToDto()).ToListAsync(); + return await query.Include(x => x.SpendingGroup).Select(x => x.ToDto()).ToListAsync(); } public async Task Update(ChangeRecordDto changeRecord) diff --git a/back/Infrastructure/Repositories/SpendingGroupRepo.cs b/back/Infrastructure/Repositories/SpendingGroupRepo.cs index 6c8382a..e35215f 100644 --- a/back/Infrastructure/Repositories/SpendingGroupRepo.cs +++ b/back/Infrastructure/Repositories/SpendingGroupRepo.cs @@ -49,7 +49,9 @@ public class SpendingGroupRepo : ISpendingGroupRepo .Include(x => x.ChangeRecords) .Include(x => x.SpendingPlans) .FirstOrDefaultAsync(x => x.Id == search.Id - || x.Name == search.Name); + || (!string.IsNullOrWhiteSpace(search.Name) + && x.Name == search.Name + && x.UserId == search.UserId)); return group?.ToDto(); } @@ -67,9 +69,10 @@ public class SpendingGroupRepo : ISpendingGroupRepo query = query.Where(x => x.Id == search.Id); } - if (!string.IsNullOrWhiteSpace(search.Name)) + if (!string.IsNullOrWhiteSpace(search.Name) && search.UserId.HasValue) { - query = query.Where(x => x.Name.Contains(search.Name, StringComparison.OrdinalIgnoreCase)); + query = query.Where(x => x.Name.Contains(search.Name, StringComparison.OrdinalIgnoreCase) + && x.UserId == search.UserId); } } diff --git a/back/Infrastructure/Support/Mappers/ChangeRecordMapper.cs b/back/Infrastructure/Support/Mappers/ChangeRecordMapper.cs index cd5d76e..6f62cd6 100644 --- a/back/Infrastructure/Support/Mappers/ChangeRecordMapper.cs +++ b/back/Infrastructure/Support/Mappers/ChangeRecordMapper.cs @@ -12,7 +12,8 @@ public static class ChangeRecordMapper Sum = changeRecord.Sum, ChangedAt = changeRecord.ChangedAt, SpendingGroupId = changeRecord.SpendingGroupId, - UserId = changeRecord.UserId + UserId = changeRecord.UserId, + SpendingGroupName = changeRecord.SpendingGroup?.Name }; public static ChangeRecord ToModel(this ChangeRecordDto changeRecord) diff --git a/back/Services/Domain/AuthService.cs b/back/Services/Domain/AuthService.cs index 4d59a79..c00a47a 100644 --- a/back/Services/Domain/AuthService.cs +++ b/back/Services/Domain/AuthService.cs @@ -17,7 +17,7 @@ public class AuthService : IAuthService _userRepo = userRepo; } - public async Task Login(UserLoginDTO loginData) + public async Task Login(UserLoginDto loginData) { if (loginData == null || string.IsNullOrWhiteSpace(loginData.Name) || string.IsNullOrWhiteSpace(loginData.Password)) diff --git a/front/components.d.ts b/front/components.d.ts index f648f6c..917c6e7 100644 --- a/front/components.d.ts +++ b/front/components.d.ts @@ -9,6 +9,8 @@ declare module 'vue' { export interface GlobalComponents { AButton: typeof import('ant-design-vue/es')['Button'] ACol: typeof import('ant-design-vue/es')['Col'] + ADatePicker: typeof import('ant-design-vue/es')['DatePicker'] + AFlex: typeof import('ant-design-vue/es')['Flex'] AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] AInput: typeof import('ant-design-vue/es')['Input'] @@ -20,12 +22,24 @@ declare module 'vue' { AMenu: typeof import('ant-design-vue/es')['Menu'] AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] ARow: typeof import('ant-design-vue/es')['Row'] + ASelect: typeof import('ant-design-vue/es')['Select'] + ASelectOption: typeof import('ant-design-vue/es')['SelectOption'] + ASpace: typeof import('ant-design-vue/es')['Space'] + ASpin: typeof import('ant-design-vue/es')['Spin'] + ATable: typeof import('ant-design-vue/es')['Table'] ATypographyText: typeof import('ant-design-vue/es')['TypographyText'] + ChangeRecordManager: typeof import('./src/components/support/ChangeRecordManager.vue')['default'] + ChangeRecordMenu: typeof import('./src/components/support/ChangeRecordMenu.vue')['default'] + Groups: typeof import('./src/components/pages/Groups.vue')['default'] Header: typeof import('./src/components/main/Header.vue')['default'] Home: typeof import('./src/components/pages/Home.vue')['default'] Login: typeof import('./src/components/pages/Login.vue')['default'] + Manager: typeof import('./src/components/support/Manager.vue')['default'] + PlanManager: typeof import('./src/components/support/PlanManager.vue')['default'] + Plans: typeof import('./src/components/pages/Plans.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SignUp: typeof import('./src/components/pages/SignUp.vue')['default'] + SpendingGroupManager: typeof import('./src/components/support/SpendingGroupManager.vue')['default'] } } diff --git a/front/package-lock.json b/front/package-lock.json index 7f99dfb..c1ae6fb 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -8,7 +8,9 @@ "name": "dombudg", "version": "0.0.0", "dependencies": { + "@vueuse/core": "^12.0.0", "ant-design-vue": "^4.2.6", + "dayjs": "^1.11.13", "pinia": "^2.2.8", "vue": "^3.5.12", "vue-router": "^4.5.0" @@ -895,6 +897,12 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", + "license": "MIT" + }, "node_modules/@vitejs/plugin-vue": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.0.tgz", @@ -1080,6 +1088,42 @@ "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==", "license": "MIT" }, + "node_modules/@vueuse/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-12.0.0.tgz", + "integrity": "sha512-C12RukhXiJCbx4MGhjmd/gH52TjJsc3G0E0kQj/kb19H3Nt6n1CA4DRWuTdWWcaFRdlTe0npWDS942mvacvNBw==", + "license": "MIT", + "dependencies": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "12.0.0", + "@vueuse/shared": "12.0.0", + "vue": "^3.5.13" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/metadata": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-12.0.0.tgz", + "integrity": "sha512-Yzimd1D3sjxTDOlF05HekU5aSGdKjxhuhRFHA7gDWLn57PRbBIh+SF5NmjhJ0WRgF3my7T8LBucyxdFJjIfRJQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-12.0.0.tgz", + "integrity": "sha512-3i6qtcq2PIio5i/vVYidkkcgvmTjCqrf26u+Fd4LhnbBmIT6FN8y6q/GJERp8lfcB9zVEfjdV0Br0443qZuJpw==", + "license": "MIT", + "dependencies": { + "vue": "^3.5.13" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/acorn": { "version": "8.14.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", diff --git a/front/package.json b/front/package.json index daa2045..9dae701 100644 --- a/front/package.json +++ b/front/package.json @@ -10,7 +10,9 @@ "gen-api": "swagger-typescript-api -r -o ./src/core/api/ --modular -p " }, "dependencies": { + "@vueuse/core": "^12.0.0", "ant-design-vue": "^4.2.6", + "dayjs": "^1.11.13", "pinia": "^2.2.8", "vue": "^3.5.12", "vue-router": "^4.5.0" diff --git a/front/src/App.vue b/front/src/App.vue index bf3d117..5e62ec2 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -6,16 +6,16 @@ import Header from './components/main/Header.vue';
- + + + \ No newline at end of file diff --git a/front/src/components/main/Header.vue b/front/src/components/main/Header.vue index e614b8b..d2d0563 100644 --- a/front/src/components/main/Header.vue +++ b/front/src/components/main/Header.vue @@ -5,7 +5,7 @@ import { AuthService } from '../../core/services/auth-service'; import router from '../../router'; const store = useUserStore(); -const authService = inject(typeof(AuthService)) as AuthService; +const authService = inject(AuthService.name) as AuthService; function logout() { authService.logout(); @@ -20,13 +20,14 @@ function logout() {
ДомБюдж
Войти
- + +import { useAsyncState } from '@vueuse/core'; +import { inject } from 'vue'; +import { GroupService } from '../../core/services/group-service'; +import SpendingGroupManager from '../support/SpendingGroupManager.vue'; + +const groupService = inject(GroupService.name) as GroupService; + +const { state, isReady } = useAsyncState(() => groupService.getList(), []); +const columns = [ + { + title: "Название группы", + dataIndex: "name", + key: "name", + }, + { + title: "Планы группы", + dataIndex: "plans", + key: "plans", + } +] + +const refreshData = () => { + groupService.getList().then(data => { + state.value = data; + isReady.value = true; + }); +} + + + + + \ No newline at end of file diff --git a/front/src/components/pages/Home.vue b/front/src/components/pages/Home.vue index 6803de9..3bff76c 100644 --- a/front/src/components/pages/Home.vue +++ b/front/src/components/pages/Home.vue @@ -1,9 +1,45 @@ \ No newline at end of file diff --git a/front/src/components/pages/SignUp.vue b/front/src/components/pages/SignUp.vue index 4adbbc8..4e8ecc6 100644 --- a/front/src/components/pages/SignUp.vue +++ b/front/src/components/pages/SignUp.vue @@ -35,7 +35,7 @@ name="balance" :rules="[{ required: true, message: 'Пожалуйста, введите свой баланс' }]" > - + diff --git a/front/src/components/support/ChangeRecordManager.vue b/front/src/components/support/ChangeRecordManager.vue new file mode 100644 index 0000000..8041ed9 --- /dev/null +++ b/front/src/components/support/ChangeRecordManager.vue @@ -0,0 +1,92 @@ + + + diff --git a/front/src/components/support/PlanManager.vue b/front/src/components/support/PlanManager.vue new file mode 100644 index 0000000..2efe8cc --- /dev/null +++ b/front/src/components/support/PlanManager.vue @@ -0,0 +1,77 @@ + + + diff --git a/front/src/components/support/SpendingGroupManager.vue b/front/src/components/support/SpendingGroupManager.vue new file mode 100644 index 0000000..28a760a --- /dev/null +++ b/front/src/components/support/SpendingGroupManager.vue @@ -0,0 +1,53 @@ + + \ No newline at end of file diff --git a/front/src/core/api/Api.ts b/front/src/core/api/Api.ts index a9c2824..6e6cab0 100644 --- a/front/src/core/api/Api.ts +++ b/front/src/core/api/Api.ts @@ -124,6 +124,8 @@ export class Api extends HttpClient @@ -151,6 +153,8 @@ export class Api extends HttpClient @@ -175,6 +179,8 @@ export class Api extends HttpClient @@ -247,6 +253,8 @@ export class Api extends HttpClient @@ -269,6 +277,8 @@ export class Api extends HttpClient @@ -402,7 +412,7 @@ export class Api extends HttpClient { + const store = useUserStore(); + if (!store.user.id) return null; + + let UserId = store.user.id; + let result = await this._api.changeRecordFilterList({ UserId }); + + console.log(result); + return result.data; + } +} \ No newline at end of file diff --git a/front/src/core/services/group-service.ts b/front/src/core/services/group-service.ts new file mode 100644 index 0000000..53930a3 --- /dev/null +++ b/front/src/core/services/group-service.ts @@ -0,0 +1,27 @@ +import { useUserStore } from "../../store"; +import { Api } from "../api/Api"; +import { SpendingGroupDto, SpendingGroupViewModel } from "../api/data-contracts"; + +export class GroupService { + private readonly _api: Api; + constructor(api: Api) { + this._api = api; + } + + async getList(): Promise { + const store = useUserStore(); + console.log("get list " + store.user.id); + if (!store.user.id) return null; + + let UserId = store.user.id; + let result = await this._api.spendingGroupFilterList({ UserId }); + + console.log(result); + return result.data; + } + + async createGroup(data: SpendingGroupDto) { + let result = await this._api.spendingGroupCreate(data); + console.log(result); + } +} \ No newline at end of file diff --git a/front/src/core/services/plans-service.ts b/front/src/core/services/plans-service.ts new file mode 100644 index 0000000..d46dd34 --- /dev/null +++ b/front/src/core/services/plans-service.ts @@ -0,0 +1,18 @@ +import { Api } from "../api/Api"; +import { SpendingPlanDto, SpendingPlanViewModel } from "../api/data-contracts"; + +export class PlanService { + async createPlan(data: SpendingPlanDto) { + const result = await this._api.spendingPlanCreate(data); + console.log(result); + } + private readonly _api: Api + constructor(api: Api) { + this._api = api; + } + + async getList(groupId: string): Promise { + const result = await this._api.spendingGroupDetail(groupId); + return result.data.spendingPlans || null; + } +} \ No newline at end of file diff --git a/front/src/main.ts b/front/src/main.ts index 97fdbc8..f18efa1 100644 --- a/front/src/main.ts +++ b/front/src/main.ts @@ -5,6 +5,9 @@ import router from './router' import { Api } from './core/api/Api' import { createPinia } from 'pinia' import { AuthService } from './core/services/auth-service' +import { ChangeRecordService } from './core/services/change-record-service' +import { GroupService } from './core/services/group-service' +import { PlanService } from './core/services/plans-service' const app = createApp(App) @@ -13,6 +16,9 @@ app.use(createPinia()) // Di const api = new Api(); -app.provide(typeof(AuthService), new AuthService(api)) +app.provide(AuthService.name, new AuthService(api)); +app.provide(ChangeRecordService.name, new ChangeRecordService(api)); +app.provide(GroupService.name, new GroupService(api)); +app.provide(PlanService.name, new PlanService(api)); app.mount('#app') diff --git a/front/src/router.ts b/front/src/router.ts index 5da31ed..7ea7136 100644 --- a/front/src/router.ts +++ b/front/src/router.ts @@ -1,6 +1,7 @@ import { createRouter, createWebHistory } from 'vue-router'; +import { useUserStore } from './store'; -export default createRouter({ +const router = createRouter({ history: createWebHistory(), routes: [ { @@ -12,11 +13,34 @@ export default createRouter({ path: '/login', name: 'login', component: () => import('./components/pages/Login.vue'), + meta: { notRequiresAuth: true }, }, { path: '/signup', name: 'signup', component: () => import('./components/pages/SignUp.vue'), + meta: { notRequiresAuth: true }, + }, + { + path: '/groups', + name: 'groups', + component: () => import('./components/pages/Groups.vue'), + }, + { + path: '/plans/:groupId', + name: 'plans', + component: () => import('./components/pages/Plans.vue'), } ], -}) +}); + +router.beforeEach((to, from, next) => { + const store = useUserStore(); + if (!to.meta.notRequiresAuth && !store.user.id) { + next({ name: 'login' }); + } else { + next(); + } +}); + +export default router; \ No newline at end of file From 310aa7fb835927a9e32dc830f7ac60d961cfc6b6 Mon Sep 17 00:00:00 2001 From: mfnefd Date: Tue, 3 Dec 2024 18:58:51 +0400 Subject: [PATCH 09/10] =?UTF-8?q?add:=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=81=D1=83=D1=89=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/components.d.ts | 1 + front/src/components/pages/Groups.vue | 22 +++++++++++++++ front/src/components/pages/Home.vue | 28 +++++++++++++++++-- front/src/components/pages/Plans.vue | 25 +++++++++++++++++ .../core/services/change-record-service.ts | 16 +++++++++-- front/src/core/services/group-service.ts | 6 ++++ front/src/core/services/plans-service.ts | 16 ++++++++--- 7 files changed, 106 insertions(+), 8 deletions(-) diff --git a/front/components.d.ts b/front/components.d.ts index 917c6e7..ce64ae3 100644 --- a/front/components.d.ts +++ b/front/components.d.ts @@ -21,6 +21,7 @@ declare module 'vue' { ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader'] AMenu: typeof import('ant-design-vue/es')['Menu'] AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] + APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] ARow: typeof import('ant-design-vue/es')['Row'] ASelect: typeof import('ant-design-vue/es')['Select'] ASelectOption: typeof import('ant-design-vue/es')['SelectOption'] diff --git a/front/src/components/pages/Groups.vue b/front/src/components/pages/Groups.vue index edbd173..b544b72 100644 --- a/front/src/components/pages/Groups.vue +++ b/front/src/components/pages/Groups.vue @@ -3,6 +3,7 @@ import { useAsyncState } from '@vueuse/core'; import { inject } from 'vue'; import { GroupService } from '../../core/services/group-service'; import SpendingGroupManager from '../support/SpendingGroupManager.vue'; +import { DeleteOutlined } from '@ant-design/icons-vue'; const groupService = inject(GroupService.name) as GroupService; @@ -17,6 +18,11 @@ const columns = [ title: "Планы группы", dataIndex: "plans", key: "plans", + }, + { + title: 'Операция', + dataIndex: 'operation', + key: 'operation', } ] @@ -26,6 +32,13 @@ const refreshData = () => { isReady.value = true; }); } + +const onDelete = (key: string) => { + groupService.deleteGroup(key) + .then(() => { + refreshData(); + }) +}
diff --git a/front/src/components/pages/Home.vue b/front/src/components/pages/Home.vue index 3bff76c..68045db 100644 --- a/front/src/components/pages/Home.vue +++ b/front/src/components/pages/Home.vue @@ -3,7 +3,7 @@ import { useAsyncState } from '@vueuse/core'; import ChangeRecordMenu from '../support/ChangeRecordManager.vue'; import { ChangeRecordService } from '../../core/services/change-record-service'; import { inject } from 'vue'; -import { ChangeRecordViewModel } from '../../core/api/data-contracts'; +import { DeleteOutlined } from '@ant-design/icons-vue'; const changeRecordService = inject(ChangeRecordService.name) as ChangeRecordService; @@ -23,6 +23,11 @@ const columns = [ title: 'Группа расходов', dataIndex: 'spendingGroupName', key: 'spendingGroupName', + }, + { + title: 'Операция', + dataIndex: 'operation', + key: 'operation', } ] @@ -32,11 +37,30 @@ const refreshData = () => { isReady.value = true; }); } + +const onDelete = (key: string) => { + changeRecordService.deleteRecord(key) + .then(() => { + refreshData(); + }) +}