@hiver/connector-agent 1.3.7 → 1.3.8-beta.2
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/app/__tests__/card-list.test.d.ts.map +1 -0
- package/app/connector-cards.d.ts +7 -0
- package/app/connector-cards.d.ts.map +1 -0
- package/app/provider.d.ts.map +1 -1
- package/components/ui/layover/index.d.ts +10 -0
- package/components/ui/layover/index.d.ts.map +1 -0
- package/components/ui/layover/styles.d.ts +6 -0
- package/components/ui/layover/styles.d.ts.map +1 -0
- package/components/ui/modal/index.d.ts +1 -0
- package/components/ui/modal/index.d.ts.map +1 -1
- package/components/ui/text-field/index.d.ts +3 -0
- package/components/ui/text-field/index.d.ts.map +1 -0
- package/constants/app-constants.d.ts +4 -0
- package/constants/app-constants.d.ts.map +1 -0
- package/constants/card.d.ts +8 -0
- package/constants/card.d.ts.map +1 -1
- package/constants/global-constants.d.ts +1 -0
- package/constants/global-constants.d.ts.map +1 -1
- package/constants/tracking-events.d.ts +8 -0
- package/constants/tracking-events.d.ts.map +1 -1
- package/context/index.d.ts +2 -0
- package/context/index.d.ts.map +1 -1
- package/context/main-app-provider/index.d.ts +2 -1
- package/context/main-app-provider/index.d.ts.map +1 -1
- package/features/connector-cards/api/index.d.ts +3 -2
- package/features/connector-cards/api/index.d.ts.map +1 -1
- package/features/connector-cards/components/card-list/Card.d.ts +1 -0
- package/features/connector-cards/components/card-list/Card.d.ts.map +1 -1
- package/features/connector-cards/components/card-list/style.d.ts +4 -1
- package/features/connector-cards/components/card-list/style.d.ts.map +1 -1
- package/features/connector-cards/constants/api.d.ts.map +1 -1
- package/features/connector-cards/constants/card-content.d.ts +2 -2
- package/features/connector-cards/constants/card-content.d.ts.map +1 -1
- package/features/connector-cards/store/initial-state.d.ts +1 -0
- package/features/connector-cards/store/initial-state.d.ts.map +1 -1
- package/features/connector-cards/store/selectors.d.ts +2 -1
- package/features/connector-cards/store/selectors.d.ts.map +1 -1
- package/features/connector-cards/store/slice.d.ts +4 -0
- package/features/connector-cards/store/slice.d.ts.map +1 -1
- package/features/schedule-call/style.d.ts.map +1 -1
- package/features/toast-message/constants/toast.d.ts +2 -0
- package/features/toast-message/constants/toast.d.ts.map +1 -1
- package/features/write-form/api/index.d.ts +17 -0
- package/features/write-form/api/index.d.ts.map +1 -0
- package/features/write-form/components/card-linking/card-linking.d.ts +7 -0
- package/features/write-form/components/card-linking/card-linking.d.ts.map +1 -0
- package/features/write-form/components/card-linking/card-preview.d.ts +12 -0
- package/features/write-form/components/card-linking/card-preview.d.ts.map +1 -0
- package/features/write-form/components/card-linking/style.d.ts +6 -0
- package/features/write-form/components/card-linking/style.d.ts.map +1 -0
- package/features/write-form/components/card-linking/unlink-card-modal.d.ts +12 -0
- package/features/write-form/components/card-linking/unlink-card-modal.d.ts.map +1 -0
- package/features/write-form/components/confirmation-modal/index.d.ts +12 -0
- package/features/write-form/components/confirmation-modal/index.d.ts.map +1 -0
- package/features/write-form/components/create-task-banner/index.d.ts +7 -0
- package/features/write-form/components/create-task-banner/index.d.ts.map +1 -0
- package/features/write-form/components/create-task-banner/styles.d.ts +5 -0
- package/features/write-form/components/create-task-banner/styles.d.ts.map +1 -0
- package/features/write-form/components/write-form/index.d.ts +9 -0
- package/features/write-form/components/write-form/index.d.ts.map +1 -0
- package/features/write-form/components/write-form/reducer.d.ts +12 -0
- package/features/write-form/components/write-form/reducer.d.ts.map +1 -0
- package/features/write-form/components/write-form/styles.d.ts +7 -0
- package/features/write-form/components/write-form/styles.d.ts.map +1 -0
- package/features/write-form/constants/api.d.ts +8 -0
- package/features/write-form/constants/api.d.ts.map +1 -0
- package/features/write-form/constants/index.d.ts +29 -0
- package/features/write-form/constants/index.d.ts.map +1 -0
- package/features/write-form/constants/regex-pattern.d.ts +3 -0
- package/features/write-form/constants/regex-pattern.d.ts.map +1 -0
- package/features/write-form/store/initial-state.d.ts +37 -0
- package/features/write-form/store/initial-state.d.ts.map +1 -0
- package/features/write-form/store/selectors.d.ts +20 -0
- package/features/write-form/store/selectors.d.ts.map +1 -0
- package/features/write-form/store/slice.d.ts +144 -0
- package/features/write-form/store/slice.d.ts.map +1 -0
- package/features/write-form/types/form.d.ts +92 -0
- package/features/write-form/types/form.d.ts.map +1 -0
- package/features/write-form/types/modal.d.ts +6 -0
- package/features/write-form/types/modal.d.ts.map +1 -0
- package/features/write-form/utils/index.d.ts +25 -0
- package/features/write-form/utils/index.d.ts.map +1 -0
- package/index.es.js +27052 -16655
- package/index.umd.js +523 -222
- package/package.json +1 -1
- package/store/hooks.d.ts +9 -0
- package/store/hooks.d.ts.map +1 -0
- package/store/index.d.ts +31 -0
- package/store/index.d.ts.map +1 -0
- package/testing/mocks/handlers/fetch-cards.d.ts +3 -2
- package/testing/mocks/handlers/fetch-cards.d.ts.map +1 -1
- package/testing/mocks/handlers/write-capability.d.ts +2 -0
- package/testing/mocks/handlers/write-capability.d.ts.map +1 -0
- package/testing/mocks/handlers.d.ts.map +1 -1
- package/testing/test-utils.d.ts +1 -1
- package/testing/test-utils.d.ts.map +1 -1
- package/types/cards.d.ts +7 -0
- package/types/cards.d.ts.map +1 -1
- package/types/json.d.ts +7 -0
- package/types/json.d.ts.map +1 -0
- package/utils.d.ts +5 -2
- package/utils.d.ts.map +1 -1
- package/features/connector-cards/components/card-list/__tests__/card-list.test.d.ts.map +0 -1
- package/features/connector-cards/components/card-list/index.d.ts +0 -7
- package/features/connector-cards/components/card-list/index.d.ts.map +0 -1
- package/features/connector-cards/store/hooks.d.ts +0 -7
- package/features/connector-cards/store/hooks.d.ts.map +0 -1
- package/features/connector-cards/store/index.d.ts +0 -25
- package/features/connector-cards/store/index.d.ts.map +0 -1
- /package/{features/connector-cards/components/card-list → app}/__tests__/card-list.test.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex-pattern.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/constants/regex-pattern.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAuE,CAAC;AAChG,eAAO,MAAM,aAAa,QAA+B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ISpecificCard } from '../../../types/cards';
|
|
2
|
+
import { ObjectItem, WriteFormFields } from '../types/form';
|
|
3
|
+
import { ApiStatus } from '../../../types/api';
|
|
4
|
+
import { OptionType } from '@connector/ui';
|
|
5
|
+
interface OptionsData {
|
|
6
|
+
options: OptionType[];
|
|
7
|
+
hasMore: boolean;
|
|
8
|
+
currentPage: number;
|
|
9
|
+
}
|
|
10
|
+
export interface WriteCapabilityState {
|
|
11
|
+
createObjectList: OptionType[];
|
|
12
|
+
linkObjectList: OptionType[];
|
|
13
|
+
objectDict: {
|
|
14
|
+
[key: string]: ObjectItem;
|
|
15
|
+
} | null;
|
|
16
|
+
formFields: {
|
|
17
|
+
[key: string]: WriteFormFields[];
|
|
18
|
+
} | null;
|
|
19
|
+
previewCardData: ISpecificCard | null;
|
|
20
|
+
objectListApiStatus: ApiStatus;
|
|
21
|
+
unlinkCardApiStatus: ApiStatus;
|
|
22
|
+
linkCardApiStatus: ApiStatus;
|
|
23
|
+
previewCardApiStatus: ApiStatus;
|
|
24
|
+
optionsMap: {
|
|
25
|
+
[key: string]: OptionsData;
|
|
26
|
+
} | null;
|
|
27
|
+
dependentFieldsMap: {
|
|
28
|
+
[key: string]: {
|
|
29
|
+
[key: string]: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
dropdownOptionsApis: ApiStatus;
|
|
33
|
+
createFormApiStatus: ApiStatus;
|
|
34
|
+
}
|
|
35
|
+
export declare const initialState: WriteCapabilityState;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=initial-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initial-state.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/store/initial-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,UAAU,WAAW;IACnB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,EAAE,UAAU,EAAE,CAAC;IAC/B,cAAc,EAAE,UAAU,EAAE,CAAC;IAC7B,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,GAAG,IAAI,CAAC;IACjD,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;IACxD,eAAe,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,mBAAmB,EAAE,SAAS,CAAC;IAC/B,mBAAmB,EAAE,SAAS,CAAC;IAC/B,iBAAiB,EAAE,SAAS,CAAC;IAC7B,oBAAoB,EAAE,SAAS,CAAC;IAChC,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,GAAG,IAAI,CAAC;IAClD,kBAAkB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;SAAE,CAAA;KAAE,CAAC;IACnE,mBAAmB,EAAE,SAAS,CAAC;IAC/B,mBAAmB,EAAE,SAAS,CAAC;CAChC;AAGD,eAAO,MAAM,YAAY,EAAE,oBAc1B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RootState } from '../../../store';
|
|
2
|
+
export declare const selectCreateObjectList: (state: RootState) => import('@connector/ui').OptionType[];
|
|
3
|
+
export declare const selectLinkObjectList: (state: RootState) => import('@connector/ui').OptionType[];
|
|
4
|
+
export declare const selectObjectDict: (state: RootState) => {
|
|
5
|
+
[key: string]: import('../types/form').ObjectItem;
|
|
6
|
+
} | null;
|
|
7
|
+
export declare const selectFormFields: (state: RootState) => {
|
|
8
|
+
[key: string]: import('../types/form').WriteFormFields[];
|
|
9
|
+
} | null;
|
|
10
|
+
export declare const selectCardPreviewData: (state: RootState) => import('../../../types/cards').ISpecificCard | null;
|
|
11
|
+
export declare const selectCardPreviewApiStatus: (state: RootState) => import('../../../types/api').ApiStatus;
|
|
12
|
+
export declare const selectLinkCardApiStatus: (state: RootState) => import('../../../types/api').ApiStatus;
|
|
13
|
+
export declare const selectUnlinkCardApiStatus: (state: RootState) => import('../../../types/api').ApiStatus;
|
|
14
|
+
export declare const selectDependentFieldsMap: (state: RootState) => {
|
|
15
|
+
[key: string]: {
|
|
16
|
+
[key: string]: string[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const selectCreateFormApiStatus: (state: RootState) => import('../../../types/api').ApiStatus;
|
|
20
|
+
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/store/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,eAAO,MAAM,sBAAsB,UAAW,SAAS,yCAAiC,CAAC;AACzF,eAAO,MAAM,oBAAoB,UAAW,SAAS,yCAA+B,CAAC;AACrF,eAAO,MAAM,gBAAgB,UAAW,SAAS;;QAA2B,CAAC;AAC7E,eAAO,MAAM,gBAAgB,UAAW,SAAS;;QAA2B,CAAC;AAC7E,eAAO,MAAM,qBAAqB,UAAW,SAAS,wDAAgC,CAAC;AACvF,eAAO,MAAM,0BAA0B,UAAW,SAAS,2CAAqC,CAAC;AACjG,eAAO,MAAM,uBAAuB,UAAW,SAAS,2CAAkC,CAAC;AAC3F,eAAO,MAAM,yBAAyB,UAAW,SAAS,2CAAoC,CAAC;AAC/F,eAAO,MAAM,wBAAwB,UAAW,SAAS;;;;CAAmC,CAAC;AAC7F,eAAO,MAAM,yBAAyB,UAAW,SAAS,2CAAoC,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { InterfaceDetails, ObjectItem, PreviewArgs, WriteFormFields } from '../types/form';
|
|
2
|
+
import { OptionType } from '@connector/ui';
|
|
3
|
+
import { ISpecificCard } from '../../../types/cards';
|
|
4
|
+
export declare const writeCapabilitySlice: import('@reduxjs/toolkit').Slice<import('./initial-state').WriteCapabilityState, {
|
|
5
|
+
resetState: () => import('./initial-state').WriteCapabilityState;
|
|
6
|
+
}, "writeCapability", "writeCapability", import('@reduxjs/toolkit').SliceSelectors<import('./initial-state').WriteCapabilityState>>;
|
|
7
|
+
declare const fetchObjectList: import('@reduxjs/toolkit').AsyncThunk<{
|
|
8
|
+
createObjectList: never[];
|
|
9
|
+
linkObjectList: never[];
|
|
10
|
+
formFields: null;
|
|
11
|
+
objectDict: null;
|
|
12
|
+
dependentFieldsMap: {};
|
|
13
|
+
} | {
|
|
14
|
+
createObjectList: OptionType[];
|
|
15
|
+
linkObjectList: OptionType[];
|
|
16
|
+
formFields: {
|
|
17
|
+
[key: string]: WriteFormFields[];
|
|
18
|
+
};
|
|
19
|
+
objectDict: {
|
|
20
|
+
[key: string]: ObjectItem;
|
|
21
|
+
};
|
|
22
|
+
dependentFieldsMap: {
|
|
23
|
+
[key: string]: {
|
|
24
|
+
[key: string]: string[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}, {
|
|
28
|
+
inboxIds: string[];
|
|
29
|
+
channelType: string;
|
|
30
|
+
conversationId: number;
|
|
31
|
+
}, {
|
|
32
|
+
state?: unknown;
|
|
33
|
+
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
34
|
+
extra?: unknown;
|
|
35
|
+
rejectValue?: unknown;
|
|
36
|
+
serializedErrorType?: unknown;
|
|
37
|
+
pendingMeta?: unknown;
|
|
38
|
+
fulfilledMeta?: unknown;
|
|
39
|
+
rejectedMeta?: unknown;
|
|
40
|
+
}>;
|
|
41
|
+
declare const fetchDropDownOptions: import('@reduxjs/toolkit').AsyncThunk<{
|
|
42
|
+
optionsList: {
|
|
43
|
+
label: string;
|
|
44
|
+
value: string | number;
|
|
45
|
+
}[];
|
|
46
|
+
fieldName: string;
|
|
47
|
+
formId: string;
|
|
48
|
+
currentPage: number;
|
|
49
|
+
hasMore: boolean;
|
|
50
|
+
key: string;
|
|
51
|
+
}, {
|
|
52
|
+
fieldName: string;
|
|
53
|
+
formId: string;
|
|
54
|
+
fieldConfig: WriteFormFields;
|
|
55
|
+
interfaceId?: string;
|
|
56
|
+
pagination: InterfaceDetails["pagination"];
|
|
57
|
+
callback?: (options: OptionType[]) => void;
|
|
58
|
+
args?: {
|
|
59
|
+
[key: string]: string | number | boolean;
|
|
60
|
+
};
|
|
61
|
+
isScrollToBottomEvent?: boolean;
|
|
62
|
+
}, {
|
|
63
|
+
state?: unknown;
|
|
64
|
+
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
65
|
+
extra?: unknown;
|
|
66
|
+
rejectValue?: unknown;
|
|
67
|
+
serializedErrorType?: unknown;
|
|
68
|
+
pendingMeta?: unknown;
|
|
69
|
+
fulfilledMeta?: unknown;
|
|
70
|
+
rejectedMeta?: unknown;
|
|
71
|
+
}>;
|
|
72
|
+
declare const createForm: import('@reduxjs/toolkit').AsyncThunk<undefined, {
|
|
73
|
+
formId: string;
|
|
74
|
+
args: {
|
|
75
|
+
[key: string]: string | number | boolean | (number | string)[];
|
|
76
|
+
};
|
|
77
|
+
conversationId: number;
|
|
78
|
+
interfaceId: string;
|
|
79
|
+
successCallback?: () => void;
|
|
80
|
+
failureCallback?: (err: unknown) => void;
|
|
81
|
+
}, {
|
|
82
|
+
state?: unknown;
|
|
83
|
+
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
84
|
+
extra?: unknown;
|
|
85
|
+
rejectValue?: unknown;
|
|
86
|
+
serializedErrorType?: unknown;
|
|
87
|
+
pendingMeta?: unknown;
|
|
88
|
+
fulfilledMeta?: unknown;
|
|
89
|
+
rejectedMeta?: unknown;
|
|
90
|
+
}>;
|
|
91
|
+
declare const unlinkCard: import('@reduxjs/toolkit').AsyncThunk<void, {
|
|
92
|
+
id: string;
|
|
93
|
+
channelType?: string;
|
|
94
|
+
externalResourceId: string;
|
|
95
|
+
conversationId: number;
|
|
96
|
+
}, {
|
|
97
|
+
state?: unknown;
|
|
98
|
+
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
99
|
+
extra?: unknown;
|
|
100
|
+
rejectValue?: unknown;
|
|
101
|
+
serializedErrorType?: unknown;
|
|
102
|
+
pendingMeta?: unknown;
|
|
103
|
+
fulfilledMeta?: unknown;
|
|
104
|
+
rejectedMeta?: unknown;
|
|
105
|
+
}>;
|
|
106
|
+
declare const linkCard: import('@reduxjs/toolkit').AsyncThunk<void, {
|
|
107
|
+
id: string;
|
|
108
|
+
externalResourceId: string;
|
|
109
|
+
channelType?: string;
|
|
110
|
+
conversationId: number;
|
|
111
|
+
}, {
|
|
112
|
+
state?: unknown;
|
|
113
|
+
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
114
|
+
extra?: unknown;
|
|
115
|
+
rejectValue?: unknown;
|
|
116
|
+
serializedErrorType?: unknown;
|
|
117
|
+
pendingMeta?: unknown;
|
|
118
|
+
fulfilledMeta?: unknown;
|
|
119
|
+
rejectedMeta?: unknown;
|
|
120
|
+
}>;
|
|
121
|
+
declare const previewCard: import('@reduxjs/toolkit').AsyncThunk<{
|
|
122
|
+
data: null;
|
|
123
|
+
} | {
|
|
124
|
+
data: ISpecificCard;
|
|
125
|
+
}, {
|
|
126
|
+
id: string;
|
|
127
|
+
args: PreviewArgs;
|
|
128
|
+
channelType?: string;
|
|
129
|
+
isRefresh?: boolean;
|
|
130
|
+
}, {
|
|
131
|
+
state?: unknown;
|
|
132
|
+
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
133
|
+
extra?: unknown;
|
|
134
|
+
rejectValue?: unknown;
|
|
135
|
+
serializedErrorType?: unknown;
|
|
136
|
+
pendingMeta?: unknown;
|
|
137
|
+
fulfilledMeta?: unknown;
|
|
138
|
+
rejectedMeta?: unknown;
|
|
139
|
+
}>;
|
|
140
|
+
declare const resetState: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"writeCapability/resetState">;
|
|
141
|
+
declare const _default: import('redux').Reducer<import('./initial-state').WriteCapabilityState>;
|
|
142
|
+
export default _default;
|
|
143
|
+
export { fetchObjectList, resetState, fetchDropDownOptions, createForm, linkCard, unlinkCard, previewCard };
|
|
144
|
+
//# sourceMappingURL=slice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/store/slice.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAsB,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEpH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,eAAO,MAAM,oBAAoB;;mIAmF/B,CAAC;AAEH,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;cAES,MAAM,EAAE;iBAAe,MAAM;oBAAkB,MAAM;;;;;;;;;;EA4IlF,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;;;;;;;;;eAIT,MAAM;YACT,MAAM;iBACD,eAAe;kBACd,MAAM;gBACR,gBAAgB,CAAC,YAAY,CAAC;eAC/B,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI;WACnC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;KAAE;4BAC3B,OAAO;;;;;;;;;;EA6GpC,CAAC;AAEF,QAAA,MAAM,UAAU;YAIF,MAAM;UACR;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;KAAE;oBACxD,MAAM;iBACT,MAAM;sBACD,MAAM,IAAI;sBACV,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI;;;;;;;;;;EAgB7C,CAAC;AAEF,QAAA,MAAM,UAAU;QAQR,MAAM;kBACI,MAAM;wBACA,MAAM;oBACV,MAAM;;;;;;;;;;EAIzB,CAAC;AAEF,QAAA,MAAM,QAAQ;QAQN,MAAM;wBACU,MAAM;kBACZ,MAAM;oBACJ,MAAM;;;;;;;;;;EAIzB,CAAC;AAEF,QAAA,MAAM,WAAW;;;;;QAQT,MAAM;UACJ,WAAW;kBACH,MAAM;gBACR,OAAO;;;;;;;;;;EA0BtB,CAAC;AAEF,QAAA,MAAQ,UAAU,sFAAiC,CAAC;;AACpD,wBAA4C;AAC5C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,oBAAoB,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { FIELD_TYPES, OptionType } from '@connector/ui';
|
|
2
|
+
export type FieldValue = string | number | OptionType | boolean | Date | OptionType[];
|
|
3
|
+
export type WriteFieldKeys = string;
|
|
4
|
+
export interface WriteFormState {
|
|
5
|
+
values: Partial<Record<WriteFieldKeys, FieldValue | undefined>>;
|
|
6
|
+
errors: Partial<Record<WriteFieldKeys, string | boolean>>;
|
|
7
|
+
}
|
|
8
|
+
export interface AllValues {
|
|
9
|
+
values: Partial<Record<WriteFieldKeys, FieldValue>>;
|
|
10
|
+
}
|
|
11
|
+
export interface Value {
|
|
12
|
+
value?: FieldValue | boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
15
|
+
export interface FormActionValue {
|
|
16
|
+
type: string;
|
|
17
|
+
payload?: AllValues | Value;
|
|
18
|
+
}
|
|
19
|
+
export type ValidationObject = {
|
|
20
|
+
msg: string;
|
|
21
|
+
};
|
|
22
|
+
export interface WriteValidations {
|
|
23
|
+
isRequired?: boolean | ValidationObject;
|
|
24
|
+
isUrl?: boolean | ValidationObject;
|
|
25
|
+
isEmail?: boolean | ValidationObject;
|
|
26
|
+
disableFuture?: boolean | ValidationObject;
|
|
27
|
+
disablePast?: boolean | ValidationObject;
|
|
28
|
+
maxCharacters?: number;
|
|
29
|
+
maxRows?: number;
|
|
30
|
+
range?: {
|
|
31
|
+
min: number;
|
|
32
|
+
max: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface InterfaceDetails {
|
|
36
|
+
id: string;
|
|
37
|
+
args?: {
|
|
38
|
+
[key: string]: string;
|
|
39
|
+
};
|
|
40
|
+
pagination?: {
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
limit?: number | null;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface FieldListResponse {
|
|
46
|
+
name: string;
|
|
47
|
+
placeholder?: string;
|
|
48
|
+
type: FIELD_TYPES | 'multi-select' | 'multiline';
|
|
49
|
+
label: string;
|
|
50
|
+
value?: string | number;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
disablePast?: boolean;
|
|
53
|
+
disableFuture?: boolean;
|
|
54
|
+
validations?: WriteValidations;
|
|
55
|
+
defaultOptions?: boolean | OptionType[];
|
|
56
|
+
interfaceDetails?: InterfaceDetails;
|
|
57
|
+
isInfiniteScrollable?: boolean;
|
|
58
|
+
isApiSearchEnabled?: boolean;
|
|
59
|
+
min?: number;
|
|
60
|
+
max?: number;
|
|
61
|
+
multiline?: boolean;
|
|
62
|
+
maxRows?: number;
|
|
63
|
+
limit?: number;
|
|
64
|
+
rows?: number;
|
|
65
|
+
priority: number;
|
|
66
|
+
defaultValue?: string | number;
|
|
67
|
+
meta?: {
|
|
68
|
+
[key: string]: string | number | boolean;
|
|
69
|
+
};
|
|
70
|
+
isClearable?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface WriteFormFields extends FieldListResponse {
|
|
73
|
+
type: FIELD_TYPES;
|
|
74
|
+
isMultiSelect?: boolean;
|
|
75
|
+
loadOptionsOnFocus?: boolean;
|
|
76
|
+
}
|
|
77
|
+
export interface ObjectItem extends OptionType {
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
interfaceDetails?: InterfaceDetails;
|
|
81
|
+
type: 'create' | 'link';
|
|
82
|
+
connectorId: string;
|
|
83
|
+
cardId: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ObjectResponseItem extends Omit<ObjectItem, 'label' | 'value'> {
|
|
86
|
+
fieldList?: FieldListResponse[];
|
|
87
|
+
}
|
|
88
|
+
export type Predicates = Partial<Record<WriteFieldKeys, boolean>>;
|
|
89
|
+
export interface PreviewArgs {
|
|
90
|
+
[key: string]: string;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/types/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,GAAG,UAAU,EAAE,CAAC;AAEtF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,UAA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AM,CAAC;IACb,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7E,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC;AAElE,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/types/modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FormValidation, IValidateConfig } from '@connector/ui';
|
|
2
|
+
import { WriteFormFields, WriteFormState } from '../types/form';
|
|
3
|
+
export declare const getAllCompletedArgs: (state: WriteFormState, args?: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
}) => string[];
|
|
6
|
+
export declare const getFormFieldKey: (name: string, state: WriteFormState, args?: string[]) => string;
|
|
7
|
+
export declare const getArgsValueMap: (state: WriteFormState, args?: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
}) => {
|
|
10
|
+
[key: string]: string | number | boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const generateDropdownOptionKey: (args: {
|
|
13
|
+
[key: string]: string | number | boolean;
|
|
14
|
+
}, id: string, name: string) => string;
|
|
15
|
+
export declare const validateUrl: (msg?: string) => (url: unknown) => string | boolean;
|
|
16
|
+
export declare const validateEmail: (msg?: string) => (email: unknown) => string | boolean;
|
|
17
|
+
export declare const validateIsRequired: (msg?: string) => (value: unknown) => string | boolean;
|
|
18
|
+
export declare const validateDate: (msg?: string) => (date: unknown, appConfigs: IValidateConfig) => string | boolean;
|
|
19
|
+
export declare const validateNumber: (msg?: string) => (value: unknown, appConfigs: IValidateConfig) => string | boolean;
|
|
20
|
+
export declare const validateTextField: (msg?: string) => (value: unknown, appConfigs: IValidateConfig) => string | boolean;
|
|
21
|
+
export declare const validateIdOrUrl: (msg?: string) => (input: unknown) => string | boolean;
|
|
22
|
+
export declare const getFormFieldsValidations: ({ formFields }: {
|
|
23
|
+
formFields: WriteFormFields[];
|
|
24
|
+
}) => FormValidation;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAehE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAIhE,eAAO,MAAM,mBAAmB,UAAW,cAAc,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,KAAG,MAAM,EAMnG,CAAC;AAEF,eAAO,MAAM,eAAe,SAAU,MAAM,SAAS,cAAc,SAAS,MAAM,EAAE,WAWnF,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,cAAc,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;CA2BtF,CAAC;AAEF,eAAO,MAAM,yBAAyB,SAC9B;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAAE,MAC9C,MAAM,QACJ,M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