@quan-erp/base-frontend 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist-export/api/area-region/area-region.api.d.ts +8 -0
  2. package/dist-export/api/area-region/area-region.api.d.ts.map +1 -0
  3. package/dist-export/api/area-region/area-region.api.js +33 -0
  4. package/dist-export/api/area-region/area-region.constants.d.ts +9 -0
  5. package/dist-export/api/area-region/area-region.constants.d.ts.map +1 -0
  6. package/dist-export/api/area-region/area-region.constants.js +4 -0
  7. package/dist-export/api/area-region/area-region.export.d.ts +14 -0
  8. package/dist-export/api/area-region/area-region.export.d.ts.map +1 -0
  9. package/dist-export/api/area-region/area-region.export.js +16 -0
  10. package/dist-export/api/area-region/area-region.mutations.d.ts +10 -0
  11. package/dist-export/api/area-region/area-region.mutations.d.ts.map +1 -0
  12. package/dist-export/api/area-region/area-region.mutations.js +34 -0
  13. package/dist-export/api/area-region/area-region.queries.d.ts +5 -0
  14. package/dist-export/api/area-region/area-region.queries.d.ts.map +1 -0
  15. package/dist-export/api/area-region/area-region.queries.js +14 -0
  16. package/dist-export/api/area-region/area-region.types.d.ts +17 -0
  17. package/dist-export/api/area-region/area-region.types.d.ts.map +1 -0
  18. package/dist-export/api/area-region/area-region.types.js +1 -0
  19. package/dist-export/api/business-unit/business-unit.api.d.ts +8 -0
  20. package/dist-export/api/business-unit/business-unit.api.d.ts.map +1 -0
  21. package/dist-export/api/business-unit/business-unit.api.js +33 -0
  22. package/dist-export/api/business-unit/business-unit.constants.d.ts +9 -0
  23. package/dist-export/api/business-unit/business-unit.constants.d.ts.map +1 -0
  24. package/dist-export/api/business-unit/business-unit.constants.js +4 -0
  25. package/dist-export/api/business-unit/business-unit.export.d.ts +14 -0
  26. package/dist-export/api/business-unit/business-unit.export.d.ts.map +1 -0
  27. package/dist-export/api/business-unit/business-unit.export.js +16 -0
  28. package/dist-export/api/business-unit/business-unit.mutations.d.ts +10 -0
  29. package/dist-export/api/business-unit/business-unit.mutations.d.ts.map +1 -0
  30. package/dist-export/api/business-unit/business-unit.mutations.js +34 -0
  31. package/dist-export/api/business-unit/business-unit.queries.d.ts +5 -0
  32. package/dist-export/api/business-unit/business-unit.queries.d.ts.map +1 -0
  33. package/dist-export/api/business-unit/business-unit.queries.js +14 -0
  34. package/dist-export/api/business-unit/business-unit.types.d.ts +17 -0
  35. package/dist-export/api/business-unit/business-unit.types.d.ts.map +1 -0
  36. package/dist-export/api/business-unit/business-unit.types.js +1 -0
  37. package/dist-export/api/partner/partner.type.d.ts +8 -0
  38. package/dist-export/api/partner/partner.type.d.ts.map +1 -1
  39. package/dist-export/export.d.ts +14 -0
  40. package/dist-export/export.d.ts.map +1 -1
  41. package/dist-export/export.js +16 -0
  42. package/dist-export/page/partner/area-region.export.d.ts +5 -0
  43. package/dist-export/page/partner/area-region.export.d.ts.map +1 -0
  44. package/dist-export/page/partner/area-region.export.js +6 -0
  45. package/dist-export/page/partner/business-unit.export.d.ts +5 -0
  46. package/dist-export/page/partner/business-unit.export.d.ts.map +1 -0
  47. package/dist-export/page/partner/business-unit.export.js +6 -0
  48. package/dist-export/page/partner/component/area-region-form.d.ts +8 -0
  49. package/dist-export/page/partner/component/area-region-form.d.ts.map +1 -0
  50. package/dist-export/page/partner/component/area-region-form.js +101 -0
  51. package/dist-export/page/partner/component/area-region.dropdown.d.ts +16 -0
  52. package/dist-export/page/partner/component/area-region.dropdown.d.ts.map +1 -0
  53. package/dist-export/page/partner/component/area-region.dropdown.js +62 -0
  54. package/dist-export/page/partner/component/business-unit-form.d.ts +8 -0
  55. package/dist-export/page/partner/component/business-unit-form.d.ts.map +1 -0
  56. package/dist-export/page/partner/component/business-unit-form.js +101 -0
  57. package/dist-export/page/partner/component/business-unit.dropdown.d.ts +16 -0
  58. package/dist-export/page/partner/component/business-unit.dropdown.d.ts.map +1 -0
  59. package/dist-export/page/partner/component/business-unit.dropdown.js +62 -0
  60. package/dist-export/page/partner/locales/en-US.json +82 -0
  61. package/dist-export/page/partner/locales/my-MM.json +82 -0
  62. package/dist-export/page/partner/locales/zh-CN.json +82 -0
  63. package/dist-export/page/partner/partner.locale.d.ts +3 -0
  64. package/dist-export/page/partner/partner.locale.d.ts.map +1 -0
  65. package/dist-export/page/partner/partner.locale.js +5 -0
  66. package/package.json +6 -6
@@ -0,0 +1,8 @@
1
+ import type { CreateAreaRegionDto, AreaRegionDto, UpdateAreaRegionDto } from "./area-region.types";
2
+ export declare const getAreaRegionsApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(skip: number, limit: number, search?: string) => Promise<AreaRegionDto[]>>;
3
+ export declare const createAreaRegionApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(data: CreateAreaRegionDto) => Promise<{
4
+ id: number;
5
+ }>>;
6
+ export declare const updateAreaRegionApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(id: number, data: UpdateAreaRegionDto) => Promise<any>>;
7
+ export declare const deleteAreaRegionApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(id: number) => Promise<any>>;
8
+ //# sourceMappingURL=area-region.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-region.api.d.ts","sourceRoot":"","sources":["../../../src/api/area-region/area-region.api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAInG,eAAO,MAAM,iBAAiB,iEAEJ,MAAM,SAAS,MAAM,WAAW,MAAM,KAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAMzF,CAAC;AAEH,eAAO,MAAM,mBAAmB,iEAEN,mBAAmB,KAAG,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,CAIrE,CAAC;AAEH,eAAO,MAAM,mBAAmB,+DAER,MAAM,QAAQ,mBAAmB,kBAIvD,CAAC;AAEH,eAAO,MAAM,mBAAmB,+DAER,MAAM,kBAI5B,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { RequestDto } from "@quan-erp/shared-frontend-core";
2
+ import axiosClient from "../../utils/axios-client";
3
+ import { withApiMetadataFetchFn } from "../permission/permission.lib";
4
+ export const getAreaRegionsApi = withApiMetadataFetchFn({
5
+ api: { method: "GET", url: "/area-region" },
6
+ fetchFn: async (skip, limit, search) => {
7
+ const response = await axiosClient.get(`/area-region`, {
8
+ params: { skip, limit, search },
9
+ });
10
+ return response.data.payload;
11
+ },
12
+ });
13
+ export const createAreaRegionApi = withApiMetadataFetchFn({
14
+ api: { method: "POST", url: "/area-region" },
15
+ fetchFn: async (data) => {
16
+ const response = await axiosClient.post("/area-region", new RequestDto(data));
17
+ return response.data.payload;
18
+ },
19
+ });
20
+ export const updateAreaRegionApi = withApiMetadataFetchFn({
21
+ api: { method: "PUT", url: "/area-region/:id" },
22
+ fetchFn: async (id, data) => {
23
+ const response = await axiosClient.put(`/area-region/${id}`, new RequestDto(data));
24
+ return response.data;
25
+ },
26
+ });
27
+ export const deleteAreaRegionApi = withApiMetadataFetchFn({
28
+ api: { method: "DELETE", url: "/area-region/:id" },
29
+ fetchFn: async (id) => {
30
+ const response = await axiosClient.delete(`/area-region/${id}`);
31
+ return response.data;
32
+ },
33
+ });
@@ -0,0 +1,9 @@
1
+ export declare const AREA_REGION_QUERY_KEYS: {
2
+ all: readonly ["area-region"];
3
+ list: (currentPage?: number, pageSize?: number, query?: string) => readonly ["area-region", "list", {
4
+ readonly currentPage: number | undefined;
5
+ readonly pageSize: number | undefined;
6
+ readonly query: string | undefined;
7
+ }];
8
+ };
9
+ //# sourceMappingURL=area-region.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-region.constants.d.ts","sourceRoot":"","sources":["../../../src/api/area-region/area-region.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;yBAEV,MAAM,aAAa,MAAM,UAAU,MAAM;;;;;CAEjE,CAAC"}
@@ -0,0 +1,4 @@
1
+ export const AREA_REGION_QUERY_KEYS = {
2
+ all: ["area-region"],
3
+ list: (currentPage, pageSize, query) => [...AREA_REGION_QUERY_KEYS.all, "list", { currentPage, pageSize, query }],
4
+ };
@@ -0,0 +1,14 @@
1
+ import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
2
+ import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
3
+ import type { AreaRegionDto, CreateAreaRegionDto, UpdateAreaRegionDto } from "./area-region.types";
4
+ export * from "./area-region.types";
5
+ export declare function useAreaRegionQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<AreaRegionDto[]>, "queryFn" | "queryKey">): UseQueryResult<AreaRegionDto[], Error>;
6
+ export declare function useCreateAreaRegionMutation(): UseMutationResult<{
7
+ id: number;
8
+ }, Error, CreateAreaRegionDto, unknown>;
9
+ export declare function useUpdateAreaRegionMutation(): UseMutationResult<any, Error, {
10
+ id: number;
11
+ data: UpdateAreaRegionDto;
12
+ }, unknown>;
13
+ export declare function useDeleteAreaRegionMutation(): UseMutationResult<any, Error, number, unknown>;
14
+ //# sourceMappingURL=area-region.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-region.export.d.ts","sourceRoot":"","sources":["../../../src/api/area-region/area-region.export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,KAAK,EACR,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAE7B,cAAc,qBAAqB,CAAC;AAOpC,wBAAgB,kBAAkB,CAC9B,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,0CAG1E;AAGD,wBAAgB,2BAA2B;QADmB,MAAM;wCAGnE;AAQD,wBAAgB,2BAA2B;QAHjC,MAAM;UAAQ,mBAAmB;YAK1C;AAGD,wBAAgB,2BAA2B,mDAE1C"}
@@ -0,0 +1,16 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { APINames } from "../../export";
3
+ import { BUILTIN_PLUGIN } from "../../utils/common";
4
+ export * from "./area-region.types";
5
+ export function useAreaRegionQuery(query = {}, option) {
6
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useAreaRegionQuery)(query, option);
7
+ }
8
+ export function useCreateAreaRegionMutation() {
9
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useCreateAreaRegionMutation)();
10
+ }
11
+ export function useUpdateAreaRegionMutation() {
12
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useUpdateAreaRegionMutation)();
13
+ }
14
+ export function useDeleteAreaRegionMutation() {
15
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useDeleteAreaRegionMutation)();
16
+ }
@@ -0,0 +1,10 @@
1
+ import type { CreateAreaRegionDto, UpdateAreaRegionDto } from "./area-region.types";
2
+ export declare function useCreateAreaRegionMutation(): import("@tanstack/react-query").UseMutationResult<{
3
+ id: number;
4
+ }, Error, CreateAreaRegionDto, unknown>;
5
+ export declare function useUpdateAreaRegionMutation(): import("@tanstack/react-query").UseMutationResult<any, Error, {
6
+ id: number;
7
+ data: UpdateAreaRegionDto;
8
+ }, unknown>;
9
+ export declare function useDeleteAreaRegionMutation(): import("@tanstack/react-query").UseMutationResult<any, Error, number, unknown>;
10
+ //# sourceMappingURL=area-region.mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-region.mutations.d.ts","sourceRoot":"","sources":["../../../src/api/area-region/area-region.mutations.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AASpF,wBAAgB,2BAA2B;;wCAO1C;AAED,wBAAgB,2BAA2B;QAEF,MAAM;UAAQ,mBAAmB;YAMzE;AAED,wBAAgB,2BAA2B,mFAO1C"}
@@ -0,0 +1,34 @@
1
+ import { useMutation } from "@tanstack/react-query";
2
+ import { useAppRegistry } from "../../plugin/app-state";
3
+ import { createAreaRegionApi, deleteAreaRegionApi, updateAreaRegionApi, } from "./area-region.api";
4
+ import { AREA_REGION_QUERY_KEYS } from "./area-region.constants";
5
+ function invalidateAreaRegionQueries() {
6
+ useAppRegistry.getState().queryClient.invalidateQueries({
7
+ queryKey: AREA_REGION_QUERY_KEYS.all,
8
+ exact: false,
9
+ });
10
+ }
11
+ export function useCreateAreaRegionMutation() {
12
+ return useMutation({
13
+ mutationFn: (data) => createAreaRegionApi.fetchFn(data),
14
+ onSuccess() {
15
+ invalidateAreaRegionQueries();
16
+ },
17
+ });
18
+ }
19
+ export function useUpdateAreaRegionMutation() {
20
+ return useMutation({
21
+ mutationFn: ({ id, data }) => updateAreaRegionApi.fetchFn(id, data),
22
+ onSuccess() {
23
+ invalidateAreaRegionQueries();
24
+ },
25
+ });
26
+ }
27
+ export function useDeleteAreaRegionMutation() {
28
+ return useMutation({
29
+ mutationFn: (id) => deleteAreaRegionApi.fetchFn(id),
30
+ onSuccess() {
31
+ invalidateAreaRegionQueries();
32
+ },
33
+ });
34
+ }
@@ -0,0 +1,5 @@
1
+ import { type UseQueryOptions } from "@tanstack/react-query";
2
+ import type { RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
3
+ import type { AreaRegionDto } from "./area-region.types";
4
+ export declare function useAreaRegionQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<AreaRegionDto[]>, "queryFn" | "queryKey">): import("@tanstack/react-query").UseQueryResult<AreaRegionDto[], Error>;
5
+ //# sourceMappingURL=area-region.queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-region.queries.d.ts","sourceRoot":"","sources":["../../../src/api/area-region/area-region.queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAKhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,wBAAgB,kBAAkB,CAC9B,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,0EAS1E"}
@@ -0,0 +1,14 @@
1
+ import { useQuery } from "@tanstack/react-query";
2
+ import { resolveIndexPagination } from "../../utils/pagination";
3
+ import { DEFAULT_STALE_TIME } from "../../utils/common";
4
+ import { getAreaRegionsApi } from "./area-region.api";
5
+ import { AREA_REGION_QUERY_KEYS } from "./area-region.constants";
6
+ export function useAreaRegionQuery(query = {}, option) {
7
+ const { currentPage, pageSize, skip, query: search } = resolveIndexPagination(query);
8
+ return useQuery({
9
+ queryFn: () => getAreaRegionsApi.fetchFn(skip, pageSize, search ?? undefined),
10
+ queryKey: AREA_REGION_QUERY_KEYS.list(currentPage, pageSize, search),
11
+ staleTime: DEFAULT_STALE_TIME,
12
+ ...(option || {}),
13
+ });
14
+ }
@@ -0,0 +1,17 @@
1
+ export type CreateAreaRegionDto = {
2
+ name: string;
3
+ code?: string;
4
+ isActive?: boolean;
5
+ };
6
+ export type UpdateAreaRegionDto = {
7
+ name?: string;
8
+ code?: string | null;
9
+ isActive?: boolean;
10
+ };
11
+ export type AreaRegionDto = {
12
+ id: number;
13
+ name: string;
14
+ code?: string | null;
15
+ isActive: boolean;
16
+ };
17
+ //# sourceMappingURL=area-region.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-region.types.d.ts","sourceRoot":"","sources":["../../../src/api/area-region/area-region.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { CreateBusinessUnitDto, BusinessUnitDto, UpdateBusinessUnitDto } from "./business-unit.types";
2
+ export declare const getBusinessUnitsApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(skip: number, limit: number, search?: string) => Promise<BusinessUnitDto[]>>;
3
+ export declare const createBusinessUnitApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(data: CreateBusinessUnitDto) => Promise<{
4
+ id: number;
5
+ }>>;
6
+ export declare const updateBusinessUnitApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(id: number, data: UpdateBusinessUnitDto) => Promise<any>>;
7
+ export declare const deleteBusinessUnitApi: import("@quan-erp/shared-types").WithApiMetadataFetchFn<(id: number) => Promise<any>>;
8
+ //# sourceMappingURL=business-unit.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-unit.api.d.ts","sourceRoot":"","sources":["../../../src/api/business-unit/business-unit.api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAI3G,eAAO,MAAM,mBAAmB,iEAEN,MAAM,SAAS,MAAM,WAAW,MAAM,KAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAM3F,CAAC;AAEH,eAAO,MAAM,qBAAqB,iEAER,qBAAqB,KAAG,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,CAIvE,CAAC;AAEH,eAAO,MAAM,qBAAqB,+DAEV,MAAM,QAAQ,qBAAqB,kBAIzD,CAAC;AAEH,eAAO,MAAM,qBAAqB,+DAEV,MAAM,kBAI5B,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { RequestDto } from "@quan-erp/shared-frontend-core";
2
+ import axiosClient from "../../utils/axios-client";
3
+ import { withApiMetadataFetchFn } from "../permission/permission.lib";
4
+ export const getBusinessUnitsApi = withApiMetadataFetchFn({
5
+ api: { method: "GET", url: "/business-unit" },
6
+ fetchFn: async (skip, limit, search) => {
7
+ const response = await axiosClient.get(`/business-unit`, {
8
+ params: { skip, limit, search },
9
+ });
10
+ return response.data.payload;
11
+ },
12
+ });
13
+ export const createBusinessUnitApi = withApiMetadataFetchFn({
14
+ api: { method: "POST", url: "/business-unit" },
15
+ fetchFn: async (data) => {
16
+ const response = await axiosClient.post("/business-unit", new RequestDto(data));
17
+ return response.data.payload;
18
+ },
19
+ });
20
+ export const updateBusinessUnitApi = withApiMetadataFetchFn({
21
+ api: { method: "PUT", url: "/business-unit/:id" },
22
+ fetchFn: async (id, data) => {
23
+ const response = await axiosClient.put(`/business-unit/${id}`, new RequestDto(data));
24
+ return response.data;
25
+ },
26
+ });
27
+ export const deleteBusinessUnitApi = withApiMetadataFetchFn({
28
+ api: { method: "DELETE", url: "/business-unit/:id" },
29
+ fetchFn: async (id) => {
30
+ const response = await axiosClient.delete(`/business-unit/${id}`);
31
+ return response.data;
32
+ },
33
+ });
@@ -0,0 +1,9 @@
1
+ export declare const BUSINESS_UNIT_QUERY_KEYS: {
2
+ all: readonly ["business-unit"];
3
+ list: (currentPage?: number, pageSize?: number, query?: string) => readonly ["business-unit", "list", {
4
+ readonly currentPage: number | undefined;
5
+ readonly pageSize: number | undefined;
6
+ readonly query: string | undefined;
7
+ }];
8
+ };
9
+ //# sourceMappingURL=business-unit.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-unit.constants.d.ts","sourceRoot":"","sources":["../../../src/api/business-unit/business-unit.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;yBAEZ,MAAM,aAAa,MAAM,UAAU,MAAM;;;;;CAEjE,CAAC"}
@@ -0,0 +1,4 @@
1
+ export const BUSINESS_UNIT_QUERY_KEYS = {
2
+ all: ["business-unit"],
3
+ list: (currentPage, pageSize, query) => [...BUSINESS_UNIT_QUERY_KEYS.all, "list", { currentPage, pageSize, query }],
4
+ };
@@ -0,0 +1,14 @@
1
+ import { type RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
2
+ import type { UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
3
+ import type { BusinessUnitDto, CreateBusinessUnitDto, UpdateBusinessUnitDto } from "./business-unit.types";
4
+ export * from "./business-unit.types";
5
+ export declare function useBusinessUnitQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<BusinessUnitDto[]>, "queryFn" | "queryKey">): UseQueryResult<BusinessUnitDto[], Error>;
6
+ export declare function useCreateBusinessUnitMutation(): UseMutationResult<{
7
+ id: number;
8
+ }, Error, CreateBusinessUnitDto, unknown>;
9
+ export declare function useUpdateBusinessUnitMutation(): UseMutationResult<any, Error, {
10
+ id: number;
11
+ data: UpdateBusinessUnitDto;
12
+ }, unknown>;
13
+ export declare function useDeleteBusinessUnitMutation(): UseMutationResult<any, Error, number, unknown>;
14
+ //# sourceMappingURL=business-unit.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-unit.export.d.ts","sourceRoot":"","sources":["../../../src/api/business-unit/business-unit.export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,KAAK,EACR,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,cAAc,uBAAuB,CAAC;AAOtC,wBAAgB,oBAAoB,CAChC,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,eAAe,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,4CAG5E;AAGD,wBAAgB,6BAA6B;QADmB,MAAM;0CAGrE;AAQD,wBAAgB,6BAA6B;QAHnC,MAAM;UAAQ,qBAAqB;YAK5C;AAGD,wBAAgB,6BAA6B,mDAE5C"}
@@ -0,0 +1,16 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { APINames } from "../../export";
3
+ import { BUILTIN_PLUGIN } from "../../utils/common";
4
+ export * from "./business-unit.types";
5
+ export function useBusinessUnitQuery(query = {}, option) {
6
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useBusinessUnitQuery)(query, option);
7
+ }
8
+ export function useCreateBusinessUnitMutation() {
9
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useCreateBusinessUnitMutation)();
10
+ }
11
+ export function useUpdateBusinessUnitMutation() {
12
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useUpdateBusinessUnitMutation)();
13
+ }
14
+ export function useDeleteBusinessUnitMutation() {
15
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.useDeleteBusinessUnitMutation)();
16
+ }
@@ -0,0 +1,10 @@
1
+ import type { CreateBusinessUnitDto, UpdateBusinessUnitDto } from "./business-unit.types";
2
+ export declare function useCreateBusinessUnitMutation(): import("@tanstack/react-query").UseMutationResult<{
3
+ id: number;
4
+ }, Error, CreateBusinessUnitDto, unknown>;
5
+ export declare function useUpdateBusinessUnitMutation(): import("@tanstack/react-query").UseMutationResult<any, Error, {
6
+ id: number;
7
+ data: UpdateBusinessUnitDto;
8
+ }, unknown>;
9
+ export declare function useDeleteBusinessUnitMutation(): import("@tanstack/react-query").UseMutationResult<any, Error, number, unknown>;
10
+ //# sourceMappingURL=business-unit.mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-unit.mutations.d.ts","sourceRoot":"","sources":["../../../src/api/business-unit/business-unit.mutations.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAS1F,wBAAgB,6BAA6B;;0CAO5C;AAED,wBAAgB,6BAA6B;QAEJ,MAAM;UAAQ,qBAAqB;YAM3E;AAED,wBAAgB,6BAA6B,mFAO5C"}
@@ -0,0 +1,34 @@
1
+ import { useMutation } from "@tanstack/react-query";
2
+ import { useAppRegistry } from "../../plugin/app-state";
3
+ import { createBusinessUnitApi, deleteBusinessUnitApi, updateBusinessUnitApi, } from "./business-unit.api";
4
+ import { BUSINESS_UNIT_QUERY_KEYS } from "./business-unit.constants";
5
+ function invalidateBusinessUnitQueries() {
6
+ useAppRegistry.getState().queryClient.invalidateQueries({
7
+ queryKey: BUSINESS_UNIT_QUERY_KEYS.all,
8
+ exact: false,
9
+ });
10
+ }
11
+ export function useCreateBusinessUnitMutation() {
12
+ return useMutation({
13
+ mutationFn: (data) => createBusinessUnitApi.fetchFn(data),
14
+ onSuccess() {
15
+ invalidateBusinessUnitQueries();
16
+ },
17
+ });
18
+ }
19
+ export function useUpdateBusinessUnitMutation() {
20
+ return useMutation({
21
+ mutationFn: ({ id, data }) => updateBusinessUnitApi.fetchFn(id, data),
22
+ onSuccess() {
23
+ invalidateBusinessUnitQueries();
24
+ },
25
+ });
26
+ }
27
+ export function useDeleteBusinessUnitMutation() {
28
+ return useMutation({
29
+ mutationFn: (id) => deleteBusinessUnitApi.fetchFn(id),
30
+ onSuccess() {
31
+ invalidateBusinessUnitQueries();
32
+ },
33
+ });
34
+ }
@@ -0,0 +1,5 @@
1
+ import { type UseQueryOptions } from "@tanstack/react-query";
2
+ import type { RequestIndexPaginationDto } from "@quan-erp/shared-frontend-core";
3
+ import type { BusinessUnitDto } from "./business-unit.types";
4
+ export declare function useBusinessUnitQuery(query?: RequestIndexPaginationDto, option?: Omit<UseQueryOptions<BusinessUnitDto[]>, "queryFn" | "queryKey">): import("@tanstack/react-query").UseQueryResult<BusinessUnitDto[], Error>;
5
+ //# sourceMappingURL=business-unit.queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-unit.queries.d.ts","sourceRoot":"","sources":["../../../src/api/business-unit/business-unit.queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAKhF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,wBAAgB,oBAAoB,CAChC,KAAK,GAAE,yBAA8B,EACrC,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,eAAe,EAAE,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,4EAS5E"}
@@ -0,0 +1,14 @@
1
+ import { useQuery } from "@tanstack/react-query";
2
+ import { resolveIndexPagination } from "../../utils/pagination";
3
+ import { DEFAULT_STALE_TIME } from "../../utils/common";
4
+ import { getBusinessUnitsApi } from "./business-unit.api";
5
+ import { BUSINESS_UNIT_QUERY_KEYS } from "./business-unit.constants";
6
+ export function useBusinessUnitQuery(query = {}, option) {
7
+ const { currentPage, pageSize, skip, query: search } = resolveIndexPagination(query);
8
+ return useQuery({
9
+ queryFn: () => getBusinessUnitsApi.fetchFn(skip, pageSize, search ?? undefined),
10
+ queryKey: BUSINESS_UNIT_QUERY_KEYS.list(currentPage, pageSize, search),
11
+ staleTime: DEFAULT_STALE_TIME,
12
+ ...(option || {}),
13
+ });
14
+ }
@@ -0,0 +1,17 @@
1
+ export type CreateBusinessUnitDto = {
2
+ name: string;
3
+ code: string;
4
+ isActive?: boolean;
5
+ };
6
+ export type UpdateBusinessUnitDto = {
7
+ name?: string;
8
+ code?: string;
9
+ isActive?: boolean;
10
+ };
11
+ export type BusinessUnitDto = {
12
+ id: number;
13
+ name: string;
14
+ code: string;
15
+ isActive: boolean;
16
+ };
17
+ //# sourceMappingURL=business-unit.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-unit.types.d.ts","sourceRoot":"","sources":["../../../src/api/business-unit/business-unit.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import type { PartnerShippingAddressDto } from "../partner-shipping-address/partner-shipping-address.type";
2
2
  import type { TagDto } from "../tag/tag.dto";
3
+ import type { AreaRegionDto } from "../area-region/area-region.types";
4
+ import type { BusinessUnitDto } from "../business-unit/business-unit.types";
3
5
  export interface CreatePartnerDto {
4
6
  firstName: string;
5
7
  lastName: string;
@@ -17,6 +19,8 @@ export interface CreatePartnerDto {
17
19
  isCustomer?: boolean;
18
20
  isSupplier?: boolean;
19
21
  tags?: number[];
22
+ areaRegionId?: number | null;
23
+ businessUnitId?: number | null;
20
24
  }
21
25
  export interface PartnerDto {
22
26
  id: number;
@@ -36,6 +40,10 @@ export interface PartnerDto {
36
40
  isCustomer: boolean;
37
41
  isSupplier: boolean;
38
42
  tags?: TagDto[];
43
+ areaRegionId?: number | null;
44
+ areaRegion?: AreaRegionDto;
45
+ businessUnitId?: number | null;
46
+ businessUnit?: BusinessUnitDto;
39
47
  shippingAddress: PartnerShippingAddressDto[];
40
48
  }
41
49
  //# sourceMappingURL=partner.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"partner.type.d.ts","sourceRoot":"","sources":["../../../src/api/partner/partner.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AAC3G,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IACvB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAID,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IACvB,GAAG,CAA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
30
  PartnerDropdown = "PartnerDropdown",
31
+ useAreaRegionQuery = "useAreaRegionQuery",
32
+ useCreateAreaRegionMutation = "useCreateAreaRegionMutation",
33
+ useUpdateAreaRegionMutation = "useUpdateAreaRegionMutation",
34
+ useDeleteAreaRegionMutation = "useDeleteAreaRegionMutation",
35
+ AreaRegionDropdown = "AreaRegionDropdown",
36
+ useBusinessUnitQuery = "useBusinessUnitQuery",
37
+ useCreateBusinessUnitMutation = "useCreateBusinessUnitMutation",
38
+ useUpdateBusinessUnitMutation = "useUpdateBusinessUnitMutation",
39
+ useDeleteBusinessUnitMutation = "useDeleteBusinessUnitMutation",
40
+ BusinessUnitDropdown = "BusinessUnitDropdown",
31
41
  useCountriesQuery = "useCountriesQuery",
32
42
  useStatesQuery = "useStatesQuery",
33
43
  useDivisionsQuery = "useDivisionsQuery",
@@ -96,6 +106,8 @@ export * from './api/currency-exchange/currency-exchange.export';
96
106
  export * from './api/branch/branch.export';
97
107
  export * from './api/location/location.export';
98
108
  export * from './api/partner/partner.export';
109
+ export * from './api/area-region/area-region.export';
110
+ export * from './api/business-unit/business-unit.export';
99
111
  export * from './api/partner-shipping-address/partner-shipping-adderss.export';
100
112
  export * from './api/currency/currency.export';
101
113
  export * from './api/file/file.export';
@@ -113,6 +125,8 @@ export * from './components/home-shortcut-item/home-shortcut-item.export';
113
125
  export * from './components/tag/tag.dropdown.export';
114
126
  export * from './components/location/location.export';
115
127
  export * from './page/partner/partner.export';
128
+ export * from './page/partner/area-region.export';
129
+ export * from './page/partner/business-unit.export';
116
130
  export * from './page/uoc/uoc.export';
117
131
  export * from './page/user/user.export';
118
132
  export * from './page/branch/branch.export';
@@ -1 +1 @@
1
- {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../src/export.tsx"],"names":[],"mappings":"AAGA,oBAAY,QAAQ;IAClB,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IAErB,yBAAyB,8BAA8B;IACvD,sCAAsC,2CAA2C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BAA6B,CAAA;AAC3C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAI/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,gCAAgC,CAAA;AAC9C,cAAc,4CAA4C,CAAA;AAC1D,cAAc,oDAAoD,CAAA;AAClE,cAAc,wDAAwD,CAAA;AACtE,cAAc,4DAA4D,CAAA;AAG1E,cAAc,yDAAyD,CAAA;AAGvE,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA"}
@@ -32,6 +32,18 @@ export var APINames;
32
32
  APINames["useUpdatePartnerQuery"] = "useUpdatePartnerQuery";
33
33
  APINames["partnerDetailTabs"] = "partnerDetailTabs";
34
34
  APINames["PartnerDropdown"] = "PartnerDropdown";
35
+ // area region
36
+ APINames["useAreaRegionQuery"] = "useAreaRegionQuery";
37
+ APINames["useCreateAreaRegionMutation"] = "useCreateAreaRegionMutation";
38
+ APINames["useUpdateAreaRegionMutation"] = "useUpdateAreaRegionMutation";
39
+ APINames["useDeleteAreaRegionMutation"] = "useDeleteAreaRegionMutation";
40
+ APINames["AreaRegionDropdown"] = "AreaRegionDropdown";
41
+ // business unit
42
+ APINames["useBusinessUnitQuery"] = "useBusinessUnitQuery";
43
+ APINames["useCreateBusinessUnitMutation"] = "useCreateBusinessUnitMutation";
44
+ APINames["useUpdateBusinessUnitMutation"] = "useUpdateBusinessUnitMutation";
45
+ APINames["useDeleteBusinessUnitMutation"] = "useDeleteBusinessUnitMutation";
46
+ APINames["BusinessUnitDropdown"] = "BusinessUnitDropdown";
35
47
  // location
36
48
  APINames["useCountriesQuery"] = "useCountriesQuery";
37
49
  APINames["useStatesQuery"] = "useStatesQuery";
@@ -105,6 +117,8 @@ export * from './api/currency-exchange/currency-exchange.export';
105
117
  export * from './api/branch/branch.export';
106
118
  export * from './api/location/location.export';
107
119
  export * from './api/partner/partner.export';
120
+ export * from './api/area-region/area-region.export';
121
+ export * from './api/business-unit/business-unit.export';
108
122
  export * from './api/partner-shipping-address/partner-shipping-adderss.export';
109
123
  export * from './api/currency/currency.export';
110
124
  export * from './api/file/file.export';
@@ -123,6 +137,8 @@ export * from './components/home-shortcut-item/home-shortcut-item.export';
123
137
  export * from './components/tag/tag.dropdown.export';
124
138
  export * from './components/location/location.export';
125
139
  export * from './page/partner/partner.export';
140
+ export * from './page/partner/area-region.export';
141
+ export * from './page/partner/business-unit.export';
126
142
  export * from './page/uoc/uoc.export';
127
143
  export * from './page/user/user.export';
128
144
  export * from './page/branch/branch.export';
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from "react";
2
+ import type { AreaRegionDropdownProps } from "./component/area-region.dropdown";
3
+ export type { AreaRegionDropdownProps } from "./component/area-region.dropdown";
4
+ export declare function AreaRegionDropdown(props: AreaRegionDropdownProps): ReactNode;
5
+ //# sourceMappingURL=area-region.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-region.export.d.ts","sourceRoot":"","sources":["../../../src/page/partner/area-region.export.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,YAAY,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAIhF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,aAEhE"}
@@ -0,0 +1,6 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { APINames } from "../../export";
3
+ import { BUILTIN_PLUGIN } from "../../utils/common";
4
+ export function AreaRegionDropdown(props) {
5
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.AreaRegionDropdown)(props);
6
+ }
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from "react";
2
+ import type { BusinessUnitDropdownProps } from "./component/business-unit.dropdown";
3
+ export type { BusinessUnitDropdownProps } from "./component/business-unit.dropdown";
4
+ export declare function BusinessUnitDropdown(props: BusinessUnitDropdownProps): ReactNode;
5
+ //# sourceMappingURL=business-unit.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-unit.export.d.ts","sourceRoot":"","sources":["../../../src/page/partner/business-unit.export.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAEpF,YAAY,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAIpF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,aAEpE"}
@@ -0,0 +1,6 @@
1
+ import { PluginAPI } from "@quan-erp/shared-frontend-core";
2
+ import { APINames } from "../../export";
3
+ import { BUILTIN_PLUGIN } from "../../utils/common";
4
+ export function BusinessUnitDropdown(props) {
5
+ return PluginAPI.use(BUILTIN_PLUGIN.name, APINames.BusinessUnitDropdown)(props);
6
+ }
@@ -0,0 +1,8 @@
1
+ import type { AreaRegionDto } from "../../../api/area-region/area-region.types";
2
+ export type AreaRegionFormRefType = {
3
+ open: () => void;
4
+ close: () => void;
5
+ setInitialData: (data: AreaRegionDto | null) => void;
6
+ };
7
+ export declare const AreaRegionForm: import("react").ForwardRefExoticComponent<import("react").RefAttributes<AreaRegionFormRefType>>;
8
+ //# sourceMappingURL=area-region-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-region-form.d.ts","sourceRoot":"","sources":["../../../../src/page/partner/component/area-region-form.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAchF,MAAM,MAAM,qBAAqB,GAAG;IAChC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,cAAc,EAAE,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,eAAO,MAAM,cAAc,iGAsMzB,CAAC"}