@dxs-ts/eveli-ide 0.0.394 → 0.0.395
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/build/dialob-dashboard/DialobAdmin.d.ts +2 -0
- package/build/dialob-dashboard/DialobAdminView.d.ts +2 -0
- package/build/dialob-dashboard/backend/buildApiUrl.d.ts +6 -0
- package/build/dialob-dashboard/backend/index.d.ts +2 -0
- package/build/dialob-dashboard/backend/useAdminBackend.d.ts +11 -0
- package/build/dialob-dashboard/components/CreateDialog.d.ts +10 -0
- package/build/dialob-dashboard/components/CustomDatePicker.d.ts +7 -0
- package/build/dialob-dashboard/components/DeleteDialog.d.ts +10 -0
- package/build/dialob-dashboard/components/LabelChips.d.ts +7 -0
- package/build/dialob-dashboard/components/SortField.d.ts +8 -0
- package/build/dialob-dashboard/components/Spinner.d.ts +5 -0
- package/build/dialob-dashboard/components/TagTableRow.d.ts +13 -0
- package/build/dialob-dashboard/components/index.d.ts +7 -0
- package/build/dialob-dashboard/context/DialobDashboardFetchContext.d.ts +9 -0
- package/build/dialob-dashboard/context/DialobDashboardStateContext.d.ts +55 -0
- package/build/dialob-dashboard/context/index.d.ts +2 -0
- package/build/dialob-dashboard/index.d.ts +8 -0
- package/build/dialob-dashboard/intl/index.d.ts +3 -0
- package/build/dialob-dashboard/middleware/checkHttpResponse.d.ts +3 -0
- package/build/dialob-dashboard/middleware/index.d.ts +1 -0
- package/build/dialob-dashboard/types/index.d.ts +2 -0
- package/build/dialob-dashboard/types/publicTypes.d.ts +17 -0
- package/build/dialob-dashboard/types/types.d.ts +50 -0
- package/build/dialob-dashboard/util/constants.d.ts +8 -0
- package/build/dialob-dashboard/util/helperFunctions.d.ts +2 -0
- package/build/dialob-dashboard/util/index.d.ts +4 -0
- package/build/dialob-dashboard/util/useFetchAuth.d.ts +3 -0
- package/build/dialob-dashboard/util/useFormTagOptions.d.ts +15 -0
- package/build/eveli-styles/StyledSelect.d.ts +1 -0
- package/build/index.js +14939 -13840
- package/build/intl/en.d.ts +2 -0
- package/build/intl/index.d.ts +2 -0
- package/build/routes/secured.$locale.assets.forms.index.d.ts +1 -1
- package/build/stencil-locale/LocaleLabels.d.ts +0 -1
- package/build/stencil-locale/LocaleLabels_original.d.ts +16 -0
- package/package.json +15 -14
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DialobAdminConfig } from '../types';
|
|
2
|
+
export declare const buildFormListOrCreateUrl: (config: DialobAdminConfig) => string;
|
|
3
|
+
export declare const buildFormTagsUrl: (formId: string, config: DialobAdminConfig) => string;
|
|
4
|
+
export declare const buildAllTagsUrl: (config: DialobAdminConfig) => string;
|
|
5
|
+
export declare const buildSingleFormUrl: (formId: string, config: DialobAdminConfig) => string;
|
|
6
|
+
export declare const buildEditFormUrl: (formName: string, config: DialobAdminConfig) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DialobAdminConfig } from '../types';
|
|
2
|
+
export declare const useAdminBackend: (config: DialobAdminConfig) => {
|
|
3
|
+
getAdminFormConfigurationList: () => Promise<Response>;
|
|
4
|
+
getAdminFormConfigurationTags: (formId: string) => Promise<Response>;
|
|
5
|
+
getAdminFormAllTags: () => Promise<Response>;
|
|
6
|
+
getAdminFormConfiguration: (formId: string) => Promise<Response>;
|
|
7
|
+
addAdminFormConfiguration: (form: any) => Promise<Response>;
|
|
8
|
+
addAdminFormConfigurationFromCsv: (csvData: string) => Promise<Response>;
|
|
9
|
+
editAdminFormConfiguration: (form: any) => Promise<Response>;
|
|
10
|
+
deleteAdminFormConfiguration: (formId: string) => Promise<Response>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormConfiguration, DialobAdminConfig } from '../types';
|
|
3
|
+
export interface CreateDialogProps {
|
|
4
|
+
createModalOpen: boolean;
|
|
5
|
+
handleCreateModalClose: () => void;
|
|
6
|
+
formConfiguration?: FormConfiguration;
|
|
7
|
+
setFetchAgain: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
config: DialobAdminConfig;
|
|
9
|
+
}
|
|
10
|
+
export declare const CreateDialog: React.FC<CreateDialogProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormConfiguration, DialobAdminConfig } from '../types';
|
|
3
|
+
export interface DeleteDialogProps {
|
|
4
|
+
deleteModalOpen: boolean;
|
|
5
|
+
handleDeleteModalClose: () => void;
|
|
6
|
+
formConfiguration: FormConfiguration | undefined;
|
|
7
|
+
setFetchAgain: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
config: DialobAdminConfig;
|
|
9
|
+
}
|
|
10
|
+
export declare const DeleteDialog: React.FC<DeleteDialogProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LabelAction } from '../util';
|
|
3
|
+
export interface LabelChipsProps {
|
|
4
|
+
labels: string[];
|
|
5
|
+
onUpdate: (label: any, action: LabelAction) => Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare const LabelChips: React.FC<LabelChipsProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormConfiguration, FormConfigurationFilters, DialobAdminConfig } from '../types';
|
|
3
|
+
export interface TagTableRowProps {
|
|
4
|
+
filters: FormConfigurationFilters;
|
|
5
|
+
formConfiguration: FormConfiguration;
|
|
6
|
+
deleteFormConfiguration: (formConfiguration: FormConfiguration) => void;
|
|
7
|
+
copyFormConfiguration: (formConfiguration: FormConfiguration) => void;
|
|
8
|
+
config: DialobAdminConfig;
|
|
9
|
+
getDialobForm: (formName: string) => Promise<any>;
|
|
10
|
+
setFetchAgain: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
|
+
onOpenForm?: (formId: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const TagTableRow: React.FC<TagTableRowProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface DialobDashboardFetchProviderProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
fetch?: FetchAuthFunction;
|
|
5
|
+
}
|
|
6
|
+
export type FetchAuthFunction = typeof window.fetch;
|
|
7
|
+
export declare const DialobDashboardFetchContext: React.Context<((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) & typeof fetch>;
|
|
8
|
+
export declare const useDialobDashboardFetch: () => FetchAuthFunction;
|
|
9
|
+
export declare const DialobDashboardFetchProvider: React.FC<DialobDashboardFetchProviderProps>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DialobAdminConfig, FormConfiguration, FormConfigurationFilters, FormTag } from '../types';
|
|
3
|
+
interface SortConfig {
|
|
4
|
+
field: string | null;
|
|
5
|
+
direction: 'asc' | 'desc';
|
|
6
|
+
}
|
|
7
|
+
export interface DashboardStateContextType {
|
|
8
|
+
config: DialobAdminConfig;
|
|
9
|
+
formConfigurations: FormConfiguration[];
|
|
10
|
+
setFormConfigurations: React.Dispatch<React.SetStateAction<FormConfiguration[]>>;
|
|
11
|
+
selectedFormConfiguration?: FormConfiguration;
|
|
12
|
+
setSelectedFormConfiguration: React.Dispatch<React.SetStateAction<FormConfiguration | undefined>>;
|
|
13
|
+
filters: FormConfigurationFilters;
|
|
14
|
+
setFilters: React.Dispatch<React.SetStateAction<FormConfigurationFilters>>;
|
|
15
|
+
sortConfig: SortConfig;
|
|
16
|
+
setSortConfig: React.Dispatch<React.SetStateAction<SortConfig>>;
|
|
17
|
+
fetchAgain: boolean;
|
|
18
|
+
setFetchAgain: React.Dispatch<React.SetStateAction<boolean>>;
|
|
19
|
+
createModalOpen: boolean;
|
|
20
|
+
setCreateModalOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
21
|
+
deleteModalOpen: boolean;
|
|
22
|
+
setDeleteModalOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
23
|
+
handleSort: (field: string) => void;
|
|
24
|
+
uploadJsonDialogForm: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
25
|
+
uploadCsvDialogForm: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
26
|
+
handleJsonUploadClick: () => void;
|
|
27
|
+
handleCsvUploadClick: () => void;
|
|
28
|
+
handleCreateModalClose: () => void;
|
|
29
|
+
handleDeleteModalClose: () => void;
|
|
30
|
+
copyFormConfiguration: (formConfiguration: FormConfiguration) => void;
|
|
31
|
+
addFormConfiguration: () => void;
|
|
32
|
+
deleteFormConfiguration: (formConfiguration: FormConfiguration) => void;
|
|
33
|
+
handleChangeInput: (e: any) => void;
|
|
34
|
+
handleDateChange: (name: string, date: Date | null) => void;
|
|
35
|
+
handleDateClear: (name: string) => void;
|
|
36
|
+
getDialobForm: (formName: string) => Promise<any | null>;
|
|
37
|
+
downloadAllFormConfigurations: () => void;
|
|
38
|
+
fileInputRefJson: React.RefObject<HTMLInputElement>;
|
|
39
|
+
fileInputRefCsv: React.RefObject<HTMLInputElement>;
|
|
40
|
+
showNotification?: (message: string, severity: "success" | "error") => void;
|
|
41
|
+
fetchFormConfigurations: () => Promise<void>;
|
|
42
|
+
findLatestTag: (allTags: FormTag[] | undefined, formId: string) => FormTag | undefined;
|
|
43
|
+
sortedFormConfigurations: FormConfiguration[];
|
|
44
|
+
onOpenForm?: (formId: string) => void;
|
|
45
|
+
}
|
|
46
|
+
export declare const DialobDashboardStateContext: React.Context<DashboardStateContextType>;
|
|
47
|
+
export declare const useDialobDashboardState: () => DashboardStateContextType;
|
|
48
|
+
export interface DialobDashboardStateProviderProps {
|
|
49
|
+
children: React.ReactNode;
|
|
50
|
+
config: DialobAdminConfig;
|
|
51
|
+
showNotification?: (message: string, severity: "success" | "error") => void;
|
|
52
|
+
onOpenForm?: (formId: string) => void;
|
|
53
|
+
}
|
|
54
|
+
export declare const DialobDashboardStateProvider: React.FC<DialobDashboardStateProviderProps>;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const checkHttpResponse: (response: Response, setLoginRequired: () => any) => Response | Promise<never>;
|
|
2
|
+
export declare const handleRejection: (ex: any, setTechnicalError: any) => void;
|
|
3
|
+
export declare const checkSearchHttpResponse: (response: Response, setLoginRequired: () => any) => Response | Promise<never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './checkHttpResponse';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface CsrfShape {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DialobAdminConfig {
|
|
6
|
+
dialobApiUrl: string;
|
|
7
|
+
setLoginRequired: () => void;
|
|
8
|
+
setTechnicalError: () => void;
|
|
9
|
+
language: string;
|
|
10
|
+
csrf?: CsrfShape;
|
|
11
|
+
tenantId?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DialobAdminProps {
|
|
14
|
+
config: DialobAdminConfig;
|
|
15
|
+
showNotification?: (message: string, severity: 'success' | 'error') => void;
|
|
16
|
+
onOpenForm?: (formId: string) => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface FormConfiguration {
|
|
2
|
+
id: string;
|
|
3
|
+
metadata: Metadata;
|
|
4
|
+
latestTagName?: string;
|
|
5
|
+
latestTagDate?: Date;
|
|
6
|
+
}
|
|
7
|
+
export interface FormConfigurationFilters {
|
|
8
|
+
label: string | undefined;
|
|
9
|
+
latestTagDate: Date | undefined;
|
|
10
|
+
lastSaved: Date | undefined;
|
|
11
|
+
latestTagName: string | undefined;
|
|
12
|
+
labels: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface FormConfigurationTag {
|
|
15
|
+
latestTagName: string;
|
|
16
|
+
latestTagDate: Date;
|
|
17
|
+
}
|
|
18
|
+
export interface Metadata {
|
|
19
|
+
label?: string;
|
|
20
|
+
created: Date;
|
|
21
|
+
lastSaved: Date;
|
|
22
|
+
tenantId: string;
|
|
23
|
+
modified: string;
|
|
24
|
+
modifiedBy: string;
|
|
25
|
+
labels: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface DefaultForm {
|
|
28
|
+
name: string;
|
|
29
|
+
data: FormData;
|
|
30
|
+
metadata: FormMetadata;
|
|
31
|
+
}
|
|
32
|
+
export interface FormData {
|
|
33
|
+
questionnaire: FormQuestionnaire;
|
|
34
|
+
}
|
|
35
|
+
export interface FormQuestionnaire {
|
|
36
|
+
id: string;
|
|
37
|
+
type: string;
|
|
38
|
+
items: any;
|
|
39
|
+
}
|
|
40
|
+
export interface FormMetadata {
|
|
41
|
+
label: string;
|
|
42
|
+
languages: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface FormTag {
|
|
45
|
+
formName: string;
|
|
46
|
+
name: string;
|
|
47
|
+
created: Date;
|
|
48
|
+
formId: string;
|
|
49
|
+
description: string;
|
|
50
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormConfigurationFilters, DefaultForm } from '../types';
|
|
2
|
+
export declare const DEFAULT_CONFIGURATION_FILTERS: FormConfigurationFilters;
|
|
3
|
+
export declare const DEFAULT_FORM: DefaultForm;
|
|
4
|
+
export declare enum LabelAction {
|
|
5
|
+
ADD = "ADD",
|
|
6
|
+
DELETE = "DELETE"
|
|
7
|
+
}
|
|
8
|
+
export declare const dateOptions: Intl.DateTimeFormatOptions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LabelAction } from '../util';
|
|
2
|
+
import { FormConfiguration, FormConfigurationFilters, DialobAdminConfig } from '../types';
|
|
3
|
+
export interface FormTagOptions {
|
|
4
|
+
filteredRow: FormConfigurationFilters | undefined;
|
|
5
|
+
downloadFormConfiguration: () => Promise<void>;
|
|
6
|
+
updateLabels: (label: any, action: LabelAction) => Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export interface UseFormTagOptionsParams {
|
|
9
|
+
formConfiguration: FormConfiguration;
|
|
10
|
+
filters: FormConfigurationFilters;
|
|
11
|
+
config: DialobAdminConfig;
|
|
12
|
+
getDialobForm: (formName: string) => Promise<any>;
|
|
13
|
+
setFetchAgain: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
|
+
}
|
|
15
|
+
export declare function useFormTagOptions({ formConfiguration, filters, config, getDialobForm, setFetchAgain }: UseFormTagOptionsParams): FormTagOptions;
|
|
@@ -26,6 +26,7 @@ declare const StyledSelectMultiple: React.FC<{
|
|
|
26
26
|
sx?: SxProps<Theme>;
|
|
27
27
|
}[];
|
|
28
28
|
renderValue?: (values: string[]) => React.ReactNode;
|
|
29
|
+
variant?: 'ARTICLE_SELECT' | undefined;
|
|
29
30
|
} & StyledSelectProps<string[]>>;
|
|
30
31
|
export type { StyledSelectProps };
|
|
31
32
|
export { StyledSelect, StyledSelectMultiple };
|