pangea-lib 4.0.510 → 4.0.512
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs.js +1831 -1831
- package/dist/main.css +1 -1
- package/dist/main.es.js +38302 -38407
- package/dist/types/api/create-api.d.ts +38 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/methods/call-axios.d.ts +4 -0
- package/dist/types/api/methods/connect-to-api.d.ts +7 -0
- package/dist/types/api/methods/convert-json-to-model.d.ts +3 -0
- package/dist/types/api/methods/get-finals.d.ts +6 -0
- package/dist/types/components/form/PgaInputGroup.vue.d.ts +2 -24
- package/dist/types/components/form/inputs/PgaColorSelector.vue.d.ts +23 -11
- package/dist/types/components/form/inputs/PgaDatePicker.vue.d.ts +21 -9
- package/dist/types/components/form/inputs/PgaDatetimePicker.vue.d.ts +17 -5
- package/dist/types/components/form/inputs/PgaIconSelector.vue.d.ts +23 -11
- package/dist/types/components/form/inputs/PgaInput.vue.d.ts +15 -3
- package/dist/types/components/form/inputs/PgaInputSelect.vue.d.ts +15 -3
- package/dist/types/components/form/inputs/PgaMonthPicker.vue.d.ts +17 -5
- package/dist/types/components/form/inputs/PgaRangePicker.vue.d.ts +17 -5
- package/dist/types/components/form/inputs/PgaSelect.vue.d.ts +38 -26
- package/dist/types/components/form/inputs/PgaSwitch.vue.d.ts +28 -18
- package/dist/types/components/form/inputs/PgaSwitchOptions.vue.d.ts +21 -9
- package/dist/types/components/form/inputs/PgaTextarea.vue.d.ts +15 -3
- package/dist/types/components/form/inputs/PgaYearPicker.vue.d.ts +17 -5
- package/dist/types/components/form/inputs/components/PgaDatePickerInputGroup.vue.d.ts +122 -0
- package/dist/types/composables/index.d.ts +1 -0
- package/dist/types/composables/use-input-group-props.composable.d.ts +3 -0
- package/dist/types/main.d.ts +1 -1
- package/dist/types/types/api.types.d.ts +39 -0
- package/dist/types/types/form.types.d.ts +13 -0
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/api-connections/create-api-connections.d.ts +0 -38
- package/dist/types/api-connections/index.d.ts +0 -1
- package/dist/types/api-connections/methods/call-axios.d.ts +0 -4
- package/dist/types/api-connections/methods/connect-to-api.d.ts +0 -7
- package/dist/types/api-connections/methods/convert-json-to-model.d.ts +0 -3
- package/dist/types/api-connections/methods/get-finals.d.ts +0 -6
- package/dist/types/types/api-connections.types.d.ts +0 -39
- /package/dist/types/{api-connections → api}/i18n/api-connections-error.i18n.d.ts +0 -0
- /package/dist/types/{api-connections → api}/i18n/api-connections-success.i18n.d.ts +0 -0
- /package/dist/types/{api-connections → api}/methods/convert-params-into-form-data.d.ts +0 -0
- /package/dist/types/{api-connections → api}/methods/display-error.d.ts +0 -0
- /package/dist/types/{api-connections → api}/methods/display-success.d.ts +0 -0
- /package/dist/types/{api-connections → api}/methods/get-request-config.d.ts +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PlainObject } from 'pangea-helpers';
|
|
2
|
-
import { ApiMethod, ApiConfig, EndpointSettings, ApiConnectionsConfig } from '../../types/api-connections.types';
|
|
3
|
-
|
|
4
|
-
export declare function connectToApi<T extends ApiMethod, SuccessRes, TCount>(method: T, url: string, endpointSettings: EndpointSettings, params: PlainObject | Array<any>, appVersion: string, apiConnectionsConfig: ApiConnectionsConfig | undefined, apiConfig?: ApiConfig<SuccessRes, TCount>): Promise<{
|
|
5
|
-
data: SuccessRes;
|
|
6
|
-
totalCount: TCount;
|
|
7
|
-
}>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PlainObject } from 'pangea-helpers';
|
|
2
|
-
import { Id } from '../../types';
|
|
3
|
-
import { EndpointSettingsParams } from '../../types/api-connections.types';
|
|
4
|
-
|
|
5
|
-
export declare function getFinalUrl(url: string, id?: Id): string;
|
|
6
|
-
export declare function getFinalParams(Model: EndpointSettingsParams, params: PlainObject | PlainObject[]): import('../../models').BaseParams;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { AxiosError, AxiosBasicCredentials } from 'axios';
|
|
3
|
-
import { BaseModel } from '../models/base-model.model';
|
|
4
|
-
import { BaseParams } from '../models/base-params.models';
|
|
5
|
-
import { BaseResponse } from '../models/base-response.models';
|
|
6
|
-
import { ExtractConstructor } from 'pangea-helpers';
|
|
7
|
-
import { ClassWithConstructor } from '.';
|
|
8
|
-
|
|
9
|
-
export type ApiMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
10
|
-
export type ApiConnectionMethod = 'getOne' | 'getMany' | 'postOne' | 'postMany' | 'putOne' | 'putMany' | 'deleteOne' | 'deleteMany';
|
|
11
|
-
export type ApiConfig<SuccessRes, TCount = undefined> = {
|
|
12
|
-
success?: (data: SuccessRes, totalCount?: TCount) => void;
|
|
13
|
-
error?: (err: AxiosError) => void;
|
|
14
|
-
noDisplayError?: boolean;
|
|
15
|
-
noThrowError?: boolean;
|
|
16
|
-
isLoading?: Ref<boolean>;
|
|
17
|
-
basicAuth?: AxiosBasicCredentials;
|
|
18
|
-
};
|
|
19
|
-
export type Headers = Record<string, string>;
|
|
20
|
-
export type GetCustomHeaders = () => Headers;
|
|
21
|
-
export type ApiConnectionsConfig = {
|
|
22
|
-
getCustomHeaders?: GetCustomHeaders;
|
|
23
|
-
};
|
|
24
|
-
export type EndpointSettingsParams = typeof BaseParams;
|
|
25
|
-
export type EndpointSettingsResponse = typeof BaseModel | typeof BaseResponse | ClassWithConstructor | undefined;
|
|
26
|
-
export type EndpointSettingsMeta = {
|
|
27
|
-
sendAsFormData?: boolean;
|
|
28
|
-
};
|
|
29
|
-
export type EndpointSettings = {
|
|
30
|
-
params?: EndpointSettingsParams;
|
|
31
|
-
response: EndpointSettingsResponse;
|
|
32
|
-
meta?: EndpointSettingsMeta;
|
|
33
|
-
};
|
|
34
|
-
export type ApiEndpoints = Record<string, Partial<Record<ApiConnectionMethod, EndpointSettings>>>;
|
|
35
|
-
export type ApiEndpointName<AE extends ApiEndpoints, CM extends ApiConnectionMethod> = {
|
|
36
|
-
[K in keyof AE]: CM extends keyof AE[K] ? K : never;
|
|
37
|
-
}[keyof AE];
|
|
38
|
-
export type ApiEndpointParams<AE extends ApiEndpoints, EN extends ApiEndpointName<AE, CM>, CM extends ApiConnectionMethod> = EN extends keyof AE ? CM extends keyof AE[EN] ? 'params' extends keyof AE[EN][CM] ? InstanceType<ExtractConstructor<AE[EN][CM]['params']>> : never : never : any;
|
|
39
|
-
export type ApiEndpointResponse<AE extends ApiEndpoints, EN extends ApiEndpointName<AE, CM>, CM extends ApiConnectionMethod> = EN extends keyof AE ? CM extends keyof AE[EN] ? 'response' extends keyof AE[EN][CM] ? InstanceType<ExtractConstructor<AE[EN][CM]['response']>> : never : never : any;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|