@anzusystems/common-admin 0.0.28 → 0.0.30
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/common-admin.es.d.ts +70 -41
- package/dist/common-admin.es.js +2554 -2516
- package/dist/common-admin.es.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AllowedComponentProps } from 'vue';
|
|
2
2
|
import type { App } from 'vue';
|
|
3
|
+
import { AxiosError } from 'axios';
|
|
3
4
|
import type { AxiosInstance } from 'axios';
|
|
4
5
|
import type { AxiosRequestConfig } from 'axios';
|
|
5
6
|
import type { ComponentCustomProps } from 'vue';
|
|
@@ -1901,19 +1902,22 @@ export declare const ALogLevelChip: DefineComponent<{
|
|
|
1901
1902
|
};
|
|
1902
1903
|
}>>, {}>;
|
|
1903
1904
|
|
|
1905
|
+
declare class AnzuApiForbiddenError extends Error {
|
|
1906
|
+
constructor(cause?: Error, message?: string);
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1904
1909
|
export declare class AnzuApiResponseCodeError extends Error {
|
|
1905
|
-
|
|
1906
|
-
constructor();
|
|
1910
|
+
code: number;
|
|
1911
|
+
constructor(code: number, cause?: Error, message?: string);
|
|
1907
1912
|
}
|
|
1908
1913
|
|
|
1909
1914
|
export declare class AnzuApiValidationError extends Error {
|
|
1910
|
-
|
|
1911
|
-
constructor();
|
|
1915
|
+
fields: ValidationError[];
|
|
1916
|
+
constructor(axiosError: AxiosError, system: string, entity: string, cause?: Error, message?: string);
|
|
1912
1917
|
}
|
|
1913
1918
|
|
|
1914
1919
|
export declare class AnzuFatalError extends Error {
|
|
1915
|
-
|
|
1916
|
-
constructor(message?: string);
|
|
1920
|
+
constructor(cause?: Error, message?: string);
|
|
1917
1921
|
}
|
|
1918
1922
|
|
|
1919
1923
|
export declare const AnzuSystemsCommonAdmin: {
|
|
@@ -2045,11 +2049,6 @@ export declare const apiCreateOne: <T, R = T>(client: () => AxiosInstance, objec
|
|
|
2045
2049
|
*/
|
|
2046
2050
|
export declare const apiDeleteOne: <T, R = T>(client: () => AxiosInstance, urlTemplate: string, urlParams: UrlParams | undefined, system: string, entity: string, options?: AxiosRequestConfig) => Promise<R>;
|
|
2047
2051
|
|
|
2048
|
-
export declare interface ApiErrors {
|
|
2049
|
-
field: string;
|
|
2050
|
-
errors: string[];
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
2052
|
export declare const apiFetchByIds: <T, R = T>(client: () => AxiosInstance, ids: string[] | number[], urlTemplate: string, urlParams: UrlParams | undefined, system: string, entity: string, options?: AxiosRequestConfig, isSearchApi?: boolean) => Promise<R>;
|
|
2054
2053
|
|
|
2055
2054
|
/**
|
|
@@ -2451,6 +2450,17 @@ export declare const browserHistoryReplaceUrlByString: (path: string) => void;
|
|
|
2451
2450
|
*/
|
|
2452
2451
|
export declare const cloneDeep: <T>(object: T) => T;
|
|
2453
2452
|
|
|
2453
|
+
export declare const COMMON_CONFIG: Immutable<typeof commonConfig>;
|
|
2454
|
+
|
|
2455
|
+
declare const commonConfig: {
|
|
2456
|
+
CHIP: {
|
|
2457
|
+
ICON: {
|
|
2458
|
+
LINK: string;
|
|
2459
|
+
LINK_EXTERNAL: string;
|
|
2460
|
+
};
|
|
2461
|
+
};
|
|
2462
|
+
};
|
|
2463
|
+
|
|
2454
2464
|
export declare interface CreatedByAware {
|
|
2455
2465
|
createdBy: IntegerIdNullable;
|
|
2456
2466
|
}
|
|
@@ -2499,14 +2509,6 @@ export declare type DocId = string;
|
|
|
2499
2509
|
|
|
2500
2510
|
export declare type DocIdNullable = string | null;
|
|
2501
2511
|
|
|
2502
|
-
declare interface Error_2 {
|
|
2503
|
-
response?: {
|
|
2504
|
-
data?: {
|
|
2505
|
-
error?: string;
|
|
2506
|
-
};
|
|
2507
|
-
};
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
2512
|
export declare const eventClickBlur: (event?: Event) => void;
|
|
2511
2513
|
|
|
2512
2514
|
declare type FetchItemsByIdsType = ((ids: IntegerId[]) => Promise<ValueObjectOption<IntegerId>[]>) | ((ids: DocId[]) => Promise<ValueObjectOption<DocId>[]>);
|
|
@@ -2552,6 +2554,8 @@ export declare const HTTP_STATUS_BAD_REQUEST = 400;
|
|
|
2552
2554
|
|
|
2553
2555
|
export declare const HTTP_STATUS_CREATED = 201;
|
|
2554
2556
|
|
|
2557
|
+
export declare const HTTP_STATUS_FORBIDDEN = 403;
|
|
2558
|
+
|
|
2555
2559
|
export declare const HTTP_STATUS_NO_CONTENT = 204;
|
|
2556
2560
|
|
|
2557
2561
|
export declare const HTTP_STATUS_OK = 200;
|
|
@@ -2562,13 +2566,6 @@ export declare const HTTP_STATUS_UNPROCESSABLE_ENTITY = 422;
|
|
|
2562
2566
|
|
|
2563
2567
|
export declare const i18n: I18n<{}, {}, {}, string, true>;
|
|
2564
2568
|
|
|
2565
|
-
export declare const ICON: Immutable<typeof icons>;
|
|
2566
|
-
|
|
2567
|
-
declare const icons: {
|
|
2568
|
-
CHIP_LINK: string;
|
|
2569
|
-
CHIP_LINK_EXTERNAL: string;
|
|
2570
|
-
};
|
|
2571
|
-
|
|
2572
2569
|
export declare type Immutable<T> = {
|
|
2573
2570
|
readonly [K in keyof T]: Immutable<T[K]>;
|
|
2574
2571
|
};
|
|
@@ -2708,6 +2705,7 @@ export declare const messagesEn: {
|
|
|
2708
2705
|
common: {
|
|
2709
2706
|
alert: {
|
|
2710
2707
|
unknownError: string;
|
|
2708
|
+
forbiddenError: string;
|
|
2711
2709
|
fixValidationErrors: string;
|
|
2712
2710
|
fixApiValidationErrors: string;
|
|
2713
2711
|
recordWas: {
|
|
@@ -2791,13 +2789,29 @@ export declare const messagesEn: {
|
|
|
2791
2789
|
currentUser: {
|
|
2792
2790
|
button: string;
|
|
2793
2791
|
logout: string;
|
|
2792
|
+
logoutText: string;
|
|
2793
|
+
logoutConfirm: string;
|
|
2794
2794
|
settings: string;
|
|
2795
2795
|
};
|
|
2796
|
-
|
|
2796
|
+
breadcrumb: {
|
|
2797
2797
|
detail: string;
|
|
2798
2798
|
edit: string;
|
|
2799
2799
|
create: string;
|
|
2800
2800
|
};
|
|
2801
|
+
login: {
|
|
2802
|
+
text: string;
|
|
2803
|
+
button: string;
|
|
2804
|
+
};
|
|
2805
|
+
notFound: {
|
|
2806
|
+
title: string;
|
|
2807
|
+
text: string;
|
|
2808
|
+
backButton: string;
|
|
2809
|
+
};
|
|
2810
|
+
unauthorized: {
|
|
2811
|
+
title: string;
|
|
2812
|
+
text: string;
|
|
2813
|
+
backButton: string;
|
|
2814
|
+
};
|
|
2801
2815
|
};
|
|
2802
2816
|
anzuUser: {
|
|
2803
2817
|
meta: {
|
|
@@ -3034,6 +3048,7 @@ export declare const messagesSk: {
|
|
|
3034
3048
|
common: {
|
|
3035
3049
|
alert: {
|
|
3036
3050
|
unknownError: string;
|
|
3051
|
+
forbiddenError: string;
|
|
3037
3052
|
fixValidationErrors: string;
|
|
3038
3053
|
fixApiValidationErrors: string;
|
|
3039
3054
|
recordWas: {
|
|
@@ -3116,13 +3131,29 @@ export declare const messagesSk: {
|
|
|
3116
3131
|
currentUser: {
|
|
3117
3132
|
button: string;
|
|
3118
3133
|
logout: string;
|
|
3134
|
+
logoutText: string;
|
|
3135
|
+
logoutConfirm: string;
|
|
3119
3136
|
settings: string;
|
|
3120
3137
|
};
|
|
3121
|
-
|
|
3138
|
+
breadcrumb: {
|
|
3122
3139
|
detail: string;
|
|
3123
3140
|
edit: string;
|
|
3124
3141
|
create: string;
|
|
3125
3142
|
};
|
|
3143
|
+
login: {
|
|
3144
|
+
text: string;
|
|
3145
|
+
button: string;
|
|
3146
|
+
};
|
|
3147
|
+
notFound: {
|
|
3148
|
+
title: string;
|
|
3149
|
+
text: string;
|
|
3150
|
+
backButton: string;
|
|
3151
|
+
};
|
|
3152
|
+
unauthorized: {
|
|
3153
|
+
title: string;
|
|
3154
|
+
text: string;
|
|
3155
|
+
backButton: string;
|
|
3156
|
+
};
|
|
3126
3157
|
};
|
|
3127
3158
|
anzuUser: {
|
|
3128
3159
|
meta: {
|
|
@@ -3529,8 +3560,10 @@ export declare function useAlerts(): {
|
|
|
3529
3560
|
showWarningT: (translation: string, duration?: number) => void;
|
|
3530
3561
|
showValidationError: (duration?: number) => void;
|
|
3531
3562
|
showRecordWas: (variant: RecordWasType, duration?: number) => void;
|
|
3532
|
-
showApiError: (errors:
|
|
3563
|
+
showApiError: (errors: ValidationError[], duration?: number, fieldIsTranslated?: boolean) => void;
|
|
3533
3564
|
showUnknownError: (duration?: number) => void;
|
|
3565
|
+
showForbiddenError: (duration?: number) => void;
|
|
3566
|
+
showErrorsDefault: (error: any) => void;
|
|
3534
3567
|
};
|
|
3535
3568
|
|
|
3536
3569
|
export declare function useAnzuUserFactory(system?: string, resourceName?: string): {
|
|
@@ -3552,10 +3585,11 @@ export declare function useApiQueryBuilder(): {
|
|
|
3552
3585
|
|
|
3553
3586
|
export declare function useDatatableColumns(config: DatatableColumnConfig[]): UseTableColumns;
|
|
3554
3587
|
|
|
3555
|
-
export declare function
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3588
|
+
export declare function useErrors(): {
|
|
3589
|
+
isAnzuFatalError: (error: any) => error is AnzuFatalError;
|
|
3590
|
+
isAnzuApiForbiddenError: (error: any) => error is AnzuApiForbiddenError;
|
|
3591
|
+
isAnzuApiValidationError: (error: any) => error is AnzuApiValidationError;
|
|
3592
|
+
isAnzuApiResponseCodeError: (error: any) => error is AnzuApiResponseCodeError;
|
|
3559
3593
|
};
|
|
3560
3594
|
|
|
3561
3595
|
export declare function useFilterHelpers(): {
|
|
@@ -3732,14 +3766,9 @@ export declare function useValidateStringArrayItemLength(): (min: number, max: n
|
|
|
3732
3766
|
|
|
3733
3767
|
export declare function useValidateUrl(): ValidationRuleWithoutParams<any>;
|
|
3734
3768
|
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
fields: ValidationResponseDataFields;
|
|
3739
|
-
}
|
|
3740
|
-
|
|
3741
|
-
declare interface ValidationResponseDataFields {
|
|
3742
|
-
[key: string]: string[];
|
|
3769
|
+
declare interface ValidationError {
|
|
3770
|
+
field: string;
|
|
3771
|
+
errors: string[];
|
|
3743
3772
|
}
|
|
3744
3773
|
|
|
3745
3774
|
export declare type ValidationScope = string | number | boolean | symbol | undefined;
|