@hiver/connector-agent 3.0.1 → 3.1.0
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/api/conversationMeta.d.ts +14 -0
- package/api/conversationMeta.d.ts.map +1 -0
- package/api/form.d.ts +5 -0
- package/api/form.d.ts.map +1 -0
- package/api/linkCard.d.ts +10 -0
- package/api/linkCard.d.ts.map +1 -0
- package/api/previewCard.d.ts +3 -0
- package/api/previewCard.d.ts.map +1 -0
- package/app/connector-cards.d.ts.map +1 -1
- package/components/ui/loader/skeleton.d.ts +6 -0
- package/components/ui/loader/skeleton.d.ts.map +1 -0
- package/components/ui/switch/index.d.ts +2 -2
- package/components/ui/switch/index.d.ts.map +1 -1
- package/constants/api.d.ts +2 -0
- package/constants/api.d.ts.map +1 -1
- package/constants/endpoints.d.ts +6 -0
- package/constants/endpoints.d.ts.map +1 -0
- package/constants/form.d.ts +14 -0
- package/constants/form.d.ts.map +1 -0
- package/constants/global-constants.d.ts +2 -0
- package/constants/global-constants.d.ts.map +1 -1
- package/{features/write-form/constants/regex-pattern.d.ts → constants/regex-patterns.d.ts} +1 -1
- package/constants/regex-patterns.d.ts.map +1 -0
- package/context/react-query-client-provider/index.d.ts.map +1 -1
- package/features/connector-cards/api/index.d.ts +0 -1
- package/features/connector-cards/api/index.d.ts.map +1 -1
- package/features/connector-cards/components/card-list/cards-view.d.ts +16 -0
- package/features/connector-cards/components/card-list/cards-view.d.ts.map +1 -0
- package/features/connector-cards/components/card-list/email-selection.d.ts +2 -1
- package/features/connector-cards/components/card-list/email-selection.d.ts.map +1 -1
- package/features/connector-cards/components/card-list/style.d.ts.map +1 -1
- package/features/connector-cards/constants/api.d.ts +0 -1
- package/features/connector-cards/constants/api.d.ts.map +1 -1
- package/features/connector-cards/store/slice.d.ts +1 -16
- package/features/connector-cards/store/slice.d.ts.map +1 -1
- package/features/global-search/api/getSearchResults.d.ts +10 -0
- package/features/global-search/api/getSearchResults.d.ts.map +1 -0
- package/features/global-search/api/getSmartSuggestions.d.ts +13 -0
- package/features/global-search/api/getSmartSuggestions.d.ts.map +1 -0
- package/features/global-search/components/index.d.ts +12 -0
- package/features/global-search/components/index.d.ts.map +1 -0
- package/features/global-search/components/preview-and-link/index.d.ts +9 -0
- package/features/global-search/components/preview-and-link/index.d.ts.map +1 -0
- package/features/global-search/components/preview-and-link/styles.d.ts +4 -0
- package/features/global-search/components/preview-and-link/styles.d.ts.map +1 -0
- package/features/global-search/components/search-form/SearchForm.d.ts +10 -0
- package/features/global-search/components/search-form/SearchForm.d.ts.map +1 -0
- package/features/global-search/components/search-form/index.d.ts +10 -0
- package/features/global-search/components/search-form/index.d.ts.map +1 -0
- package/features/global-search/components/search-form/reducer.d.ts +12 -0
- package/features/global-search/components/search-form/reducer.d.ts.map +1 -0
- package/features/global-search/components/search-option/index.d.ts +1 -0
- package/features/global-search/components/search-option/index.d.ts.map +1 -1
- package/features/global-search/components/search-option/styles.d.ts +7 -3
- package/features/global-search/components/search-option/styles.d.ts.map +1 -1
- package/features/global-search/components/search-results/components/index.d.ts +1 -0
- package/features/global-search/components/search-results/components/index.d.ts.map +1 -1
- package/features/global-search/components/search-results/components/no-search-results.d.ts +2 -0
- package/features/global-search/components/search-results/components/no-search-results.d.ts.map +1 -0
- package/features/global-search/components/search-results/components/search-results-loading.d.ts +2 -0
- package/features/global-search/components/search-results/components/search-results-loading.d.ts.map +1 -0
- package/features/global-search/components/search-results/index.d.ts +5 -3
- package/features/global-search/components/search-results/index.d.ts.map +1 -1
- package/features/global-search/components/search-results/styles.d.ts +3 -1
- package/features/global-search/components/search-results/styles.d.ts.map +1 -1
- package/features/global-search/components/search-select/components/index.d.ts.map +1 -1
- package/features/global-search/components/search-select/index.d.ts +4 -1
- package/features/global-search/components/search-select/index.d.ts.map +1 -1
- package/features/global-search/components/search-select/styles.d.ts.map +1 -1
- package/features/global-search/components/search-suggestions/index.d.ts +1 -0
- package/features/global-search/components/search-suggestions/index.d.ts.map +1 -1
- package/features/global-search/components/styles.d.ts +5 -0
- package/features/global-search/components/styles.d.ts.map +1 -0
- package/features/global-search/constants/api.d.ts +3 -0
- package/features/global-search/constants/api.d.ts.map +1 -0
- package/features/global-search/constants/index.d.ts +1 -0
- package/features/global-search/constants/index.d.ts.map +1 -1
- package/features/global-search/constants/storage.d.ts +2 -0
- package/features/global-search/constants/storage.d.ts.map +1 -0
- package/features/global-search/hooks/useObjectSort.d.ts +10 -0
- package/features/global-search/hooks/useObjectSort.d.ts.map +1 -0
- package/features/global-search/store/selectors.d.ts +15 -0
- package/features/global-search/store/selectors.d.ts.map +1 -0
- package/features/global-search/types/index.d.ts +11 -1
- package/features/global-search/types/index.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 +0 -5
- package/features/write-form/api/index.d.ts.map +1 -1
- package/features/write-form/components/card-linking/card-linking.d.ts.map +1 -1
- package/features/write-form/components/card-linking/card-preview.d.ts +2 -2
- package/features/write-form/components/card-linking/card-preview.d.ts.map +1 -1
- package/features/write-form/components/write-form/index.d.ts.map +1 -1
- package/features/write-form/constants/api.d.ts +0 -1
- package/features/write-form/constants/api.d.ts.map +1 -1
- package/features/write-form/constants/index.d.ts +0 -12
- package/features/write-form/constants/index.d.ts.map +1 -1
- package/features/write-form/store/initial-state.d.ts +5 -5
- package/features/write-form/store/initial-state.d.ts.map +1 -1
- package/features/write-form/store/selectors.d.ts +1 -3
- package/features/write-form/store/selectors.d.ts.map +1 -1
- package/features/write-form/store/slice.d.ts +6 -52
- package/features/write-form/store/slice.d.ts.map +1 -1
- package/features/write-form/types/form.d.ts +1 -80
- package/features/write-form/types/form.d.ts.map +1 -1
- package/features/write-form/utils/index.d.ts +1 -28
- package/features/write-form/utils/index.d.ts.map +1 -1
- package/hooks/useDropdownConfig.d.ts +16 -0
- package/hooks/useDropdownConfig.d.ts.map +1 -0
- package/hooks/useFormHandlers.d.ts +18 -0
- package/hooks/useFormHandlers.d.ts.map +1 -0
- package/hooks/useFormReducer.d.ts +13 -0
- package/hooks/useFormReducer.d.ts.map +1 -0
- package/index.es.js +8770 -7685
- package/index.umd.js +181 -116
- package/package.json +1 -1
- package/store/hooks.d.ts +2 -0
- package/store/hooks.d.ts.map +1 -1
- package/store/index.d.ts +6 -0
- package/store/index.d.ts.map +1 -1
- package/store/initial-state.d.ts +19 -0
- package/store/initial-state.d.ts.map +1 -0
- package/store/selectors.d.ts +4 -0
- package/store/selectors.d.ts.map +1 -0
- package/store/slice.d.ts +61 -0
- package/store/slice.d.ts.map +1 -0
- package/testing/mocks/handlers/common.d.ts +2 -0
- package/testing/mocks/handlers/common.d.ts.map +1 -0
- package/testing/mocks/handlers/fetch-cards.d.ts +2 -2
- package/testing/mocks/handlers/fetch-cards.d.ts.map +1 -1
- package/testing/mocks/handlers/global-search.d.ts +2 -0
- package/testing/mocks/handlers/global-search.d.ts.map +1 -0
- package/testing/mocks/handlers/write-capability.d.ts.map +1 -1
- 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/form.d.ts +107 -0
- package/types/form.d.ts.map +1 -0
- package/utils/form.d.ts +20 -0
- package/utils/form.d.ts.map +1 -0
- package/{utils.d.ts → utils/index.d.ts} +3 -3
- package/utils/index.d.ts.map +1 -0
- package/utils/poll.d.ts +13 -0
- package/utils/poll.d.ts.map +1 -0
- package/utils/validations.d.ts +10 -0
- package/utils/validations.d.ts.map +1 -0
- package/features/write-form/components/write-form/reducer.d.ts +0 -12
- package/features/write-form/components/write-form/reducer.d.ts.map +0 -1
- package/features/write-form/constants/regex-pattern.d.ts.map +0 -1
- package/utils.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/features/global-search/constants/api.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB,EAAE,MAAsD,CAAC;AAC9F,eAAO,MAAM,qBAAqB,EAAE,MAAgF,CAAC"}
|
|
@@ -3,4 +3,5 @@ export declare const SUGGESTION_PLACEHOLDER = "Start typing to search..";
|
|
|
3
3
|
export declare const SUGGESTION_TITLE = "Smart search suggestion";
|
|
4
4
|
export declare const SEARCH_RESULTS_INFO_TEMPLATE = ":count result:countSuffix found for :searchObject in :connectorName";
|
|
5
5
|
export declare const BACK_TO_SEARCH_RESULTS = "Back to search results";
|
|
6
|
+
export declare const NO_SEARCH_RESULTS = "No search results found";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/global-search/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,sBAAsB,6BAA6B,CAAC;AACjE,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAC1D,eAAO,MAAM,4BAA4B,wEAAwE,CAAC;AAClH,eAAO,MAAM,sBAAsB,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/global-search/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,sBAAsB,6BAA6B,CAAC;AACjE,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAC1D,eAAO,MAAM,4BAA4B,wEAAwE,CAAC;AAClH,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,iBAAiB,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/features/global-search/constants/storage.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OptionType } from '@connector/ui';
|
|
2
|
+
interface ObjectSortProps {
|
|
3
|
+
objectList: OptionType[];
|
|
4
|
+
}
|
|
5
|
+
export declare const useObjectSort: ({ objectList }: ObjectSortProps) => {
|
|
6
|
+
sortedObjectList: OptionType[];
|
|
7
|
+
updatePriority: (objectKey: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=useObjectSort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useObjectSort.d.ts","sourceRoot":"","sources":["../../../../src/features/global-search/hooks/useObjectSort.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,UAAU,eAAe;IACvB,UAAU,EAAE,UAAU,EAAE,CAAC;CAC1B;AAID,eAAO,MAAM,aAAa,mBAAoB,eAAe;;gCASxB,MAAM;CAa1C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RootState } from '../../../store';
|
|
2
|
+
export declare const selectSearchObjectList: (state: RootState) => import('@connector/ui').OptionType[];
|
|
3
|
+
export declare const selectObjectDict: (state: RootState) => {
|
|
4
|
+
[key: string]: import('../../../types/form').ObjectItem;
|
|
5
|
+
} | null;
|
|
6
|
+
export declare const selectFormFields: (state: RootState) => {
|
|
7
|
+
[key: string]: import('../../write-form/types/form').WriteFormFields[];
|
|
8
|
+
} | null;
|
|
9
|
+
export declare const selectDependentFieldsMap: (state: RootState) => {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
[key: string]: string[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const selectObjectListApiLoading: (state: RootState) => boolean;
|
|
15
|
+
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../../src/features/global-search/store/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,sBAAsB,UAAW,SAAS,yCAAiC,CAAC;AACzF,eAAO,MAAM,gBAAgB,UAAW,SAAS;;QAA2B,CAAC;AAC7E,eAAO,MAAM,gBAAgB,UAAW,SAAS;;QAA2B,CAAC;AAC7E,eAAO,MAAM,wBAAwB,UAAW,SAAS;;;;CAAmC,CAAC;AAC7F,eAAO,MAAM,0BAA0B,UAAW,SAAS,YAAkD,CAAC"}
|
|
@@ -2,7 +2,10 @@ import { StylesConfig, GroupBase, ControlProps, OptionProps } from 'react-select
|
|
|
2
2
|
export type SearchOptionType = {
|
|
3
3
|
label: string;
|
|
4
4
|
description: string;
|
|
5
|
-
|
|
5
|
+
avatarUrl: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
connectorName?: string;
|
|
8
|
+
objectName?: string;
|
|
6
9
|
};
|
|
7
10
|
export type SelectStyles = StylesConfig<SearchOptionType, false, GroupBase<SearchOptionType>>;
|
|
8
11
|
export type SelectControlProps = ControlProps<SearchOptionType, false, GroupBase<SearchOptionType>>;
|
|
@@ -15,4 +18,11 @@ export type SearchResultsType = null | {
|
|
|
15
18
|
[key: string]: string;
|
|
16
19
|
};
|
|
17
20
|
}[];
|
|
21
|
+
export type SmartSuggestion = {
|
|
22
|
+
form_id: string;
|
|
23
|
+
search_string: string;
|
|
24
|
+
connector_name: string;
|
|
25
|
+
object_name: string;
|
|
26
|
+
connector_logo: string;
|
|
27
|
+
};
|
|
18
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/global-search/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEvF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/global-search/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEvF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAC9F,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACpG,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAElG,MAAM,MAAM,iBAAiB,GACzB,IAAI,GACJ;IACE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,IAAI,GAAG;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;CACH,EAAE,CAAC;AAER,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -3,6 +3,8 @@ export declare const ERROR_TOAST: "error";
|
|
|
3
3
|
export declare const INFO_DARK: "info-dark";
|
|
4
4
|
export declare const REFRESH_FAILED = "Some error occured. Please contact support@hiverhq.com";
|
|
5
5
|
export declare const REFRESH_SUCCESS = "Card refreshed successfully";
|
|
6
|
+
export declare const LINK_SUCCESS = "Card linked successfully";
|
|
7
|
+
export declare const LINK_FAIL = "Error in linking the card";
|
|
6
8
|
export declare const UNLINK_SUCCESS = "Card unlinked successfully";
|
|
7
9
|
export declare const UNLINK_FAIL = "Failed to unlink the card";
|
|
8
10
|
export declare const GENERIC_ERROR = "Something went wrong";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../../src/features/toast-message/constants/toast.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,WAAqB,CAAC;AAChD,eAAO,MAAM,WAAW,SAAmB,CAAC;AAC5C,eAAO,MAAM,SAAS,aAAuB,CAAC;AAE9C,eAAO,MAAM,cAAc,2DAA2D,CAAC;AACvF,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAE7D,eAAO,MAAM,cAAc,+BAA+B,CAAC;AAC3D,eAAO,MAAM,WAAW,8BAA8B,CAAC;AAEvD,eAAO,MAAM,aAAa,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../../src/features/toast-message/constants/toast.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,WAAqB,CAAC;AAChD,eAAO,MAAM,WAAW,SAAmB,CAAC;AAC5C,eAAO,MAAM,SAAS,aAAuB,CAAC;AAE9C,eAAO,MAAM,cAAc,2DAA2D,CAAC;AACvF,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAE7D,eAAO,MAAM,YAAY,6BAA6B,CAAC;AACvD,eAAO,MAAM,SAAS,8BAA8B,CAAC;AAErD,eAAO,MAAM,cAAc,+BAA+B,CAAC;AAC3D,eAAO,MAAM,WAAW,8BAA8B,CAAC;AAEvD,eAAO,MAAM,aAAa,yBAAyB,CAAC"}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { JSONObject } from '../../../types/json';
|
|
2
|
-
import { PreviewArgs } from '../types/form';
|
|
3
2
|
export declare const fetchObjectListData: ({ inboxIds, channelType, conversationId }: {
|
|
4
3
|
inboxIds: string[];
|
|
5
4
|
channelType: string;
|
|
6
5
|
conversationId: number;
|
|
7
6
|
}) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
|
|
8
|
-
export declare const fetchFieldData: (placeholders: {
|
|
9
|
-
[key: string]: string | number;
|
|
10
|
-
}, data: JSONObject, channelType?: string) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
|
|
11
7
|
export declare const createFormApi: (placeholders: {
|
|
12
8
|
[key: string]: string | number;
|
|
13
9
|
}, data: JSONObject, channelType?: string) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
|
|
14
10
|
export declare const unlinkCardApi: (id: string, channelType: string | undefined, externalResourceId: string, conversationId: number) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
|
|
15
11
|
export declare const linkCardApi: (id: string, externalResourceId: string, channelType: string | undefined, conversationId: number) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
|
|
16
|
-
export declare const previewCardApi: (id: string, args: PreviewArgs, channelType?: string) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
|
|
17
12
|
export declare const getCurrentResourceDetails: (id: string, channelType: string | undefined, conversationId: number, externalResourceId: string, email: string) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
|
|
18
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/api/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/api/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,mBAAmB,8CAI7B;IACD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB,iEAUA,CAAC;AAEF,eAAO,MAAM,aAAa,iBACV;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,QAC1C,UAAU,gBACH,MAAM,iEAUpB,CAAC;AAEF,eAAO,MAAM,aAAa,OACpB,MAAM,eACG,MAAM,kCACC,MAAM,kBACV,MAAM,iEAavB,CAAC;AAEF,eAAO,MAAM,WAAW,OAClB,MAAM,sBACU,MAAM,eACb,MAAM,8BACH,MAAM,iEAavB,CAAC;AAEF,eAAO,MAAM,yBAAyB,OAChC,MAAM,eACG,MAAM,8BACH,MAAM,sBACF,MAAM,SACnB,MAAM,iEAYd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-linking.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/card-linking/card-linking.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card-linking.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/card-linking/card-linking.tsx"],"names":[],"mappings":"AAmCA,UAAU,MAAM;IACd,kBAAkB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,WAAW,6CAA8C,MAAM,4CA6J3E,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ApiStatus } from '../../../../types/api';
|
|
2
2
|
import { ISpecificCard } from '../../../../types/cards';
|
|
3
|
-
import { PreviewArgs } from '
|
|
3
|
+
import { PreviewArgs } from '../../../../types/form';
|
|
4
4
|
interface IProps {
|
|
5
5
|
cardData: ISpecificCard | null;
|
|
6
6
|
cardDataApiStatus: ApiStatus;
|
|
7
7
|
objectToLink: string;
|
|
8
8
|
args: PreviewArgs;
|
|
9
9
|
}
|
|
10
|
-
export declare const CardPreview: ({ cardData, cardDataApiStatus, objectToLink, args }: IProps) => import("react/jsx-runtime").JSX.Element
|
|
10
|
+
export declare const CardPreview: ({ cardData, cardDataApiStatus, objectToLink, args }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
12
12
|
//# sourceMappingURL=card-preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-preview.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/card-linking/card-preview.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"card-preview.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/card-linking/card-preview.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAW9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,UAAU,MAAM;IACd,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,iBAAiB,EAAE,SAAS,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,wDAAyD,MAAM,4CA8DtF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/write-form/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/write-form/index.tsx"],"names":[],"mappings":"AA8CA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAIrD,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,CAAC;CACzE;AACD,QAAA,MAAM,SAAS,gEAAyE,cAAc,4CAiTrG,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -3,7 +3,6 @@ export declare const FETCH_OBJECT_LIST_API: string;
|
|
|
3
3
|
export declare const UNLINK_CARD_API: string;
|
|
4
4
|
export declare const LINK_CARD_API: string;
|
|
5
5
|
export declare const PREVIEW_CARD_API: string;
|
|
6
|
-
export declare const FETCH_FIELD_DATA: string;
|
|
7
6
|
export declare const CREATE_FORM: string;
|
|
8
7
|
export declare const FETCH_CURRENT_RESOURCE_DETAILS_API: string;
|
|
9
8
|
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/constants/api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,YAAY,CAAC;AAClC,eAAO,MAAM,qBAAqB,EAAE,MAA4C,CAAC;AACjF,eAAO,MAAM,eAAe,EAAE,MAAkD,CAAC;AACjF,eAAO,MAAM,aAAa,EAAE,MAAgD,CAAC;AAC7E,eAAO,MAAM,gBAAgB,EAAE,MAAmD,CAAC;AACnF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/constants/api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,YAAY,CAAC;AAClC,eAAO,MAAM,qBAAqB,EAAE,MAA4C,CAAC;AACjF,eAAO,MAAM,eAAe,EAAE,MAAkD,CAAC;AACjF,eAAO,MAAM,aAAa,EAAE,MAAgD,CAAC;AAC7E,eAAO,MAAM,gBAAgB,EAAE,MAAmD,CAAC;AACnF,eAAO,MAAM,WAAW,EAAE,MAA8C,CAAC;AACzE,eAAO,MAAM,kCAAkC,EAAE,MAAoD,CAAC"}
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
export declare const CARD_PREVIEW_ERROR_MSG = "Error in previewing the card";
|
|
2
2
|
export declare const CARD_LINK_SUCCESS_MSG = "Card linked successfully";
|
|
3
3
|
export declare const CARD_LINK_ERROR_MSG = "Error in linking the card";
|
|
4
|
-
export declare const INVALID_URL_MSG = "Please enter a valid URL";
|
|
5
|
-
export declare const INVALID_ID = "Please enter valid ID";
|
|
6
|
-
export declare const INVALID_INPUT = "Please enter valid input";
|
|
7
|
-
export declare const URL_MUST_START_WITH_HTTPS = "URL must start with https://";
|
|
8
|
-
export declare const URL_SHOULD_NOT_END_WITH_SLASH = "URL should not end with a slash";
|
|
9
|
-
export declare const INVALID_EMAIL = "Invalid email address";
|
|
10
|
-
export declare const STRING_EMAIL = "Email must be a string";
|
|
11
|
-
export declare const INVALID_DATE_MSG = "Invalid date";
|
|
12
|
-
export declare const PAST_DISABLED_MSG = "Date cannot be in the past";
|
|
13
|
-
export declare const FUTURE_DISABLED_MSG = "Date cannot be in the future";
|
|
14
|
-
export declare const INVALID_NUMBER = "Invalid number";
|
|
15
|
-
export declare const INVALID_TEXT = "Invalid text";
|
|
16
4
|
export declare const NEW_CARD_CREATED = "New card created";
|
|
17
5
|
export declare const CARD_CREATION_FAILED = "Card creation failed";
|
|
18
6
|
export declare const DEFAULT_AVATAR_URL = "https://avatars.githubusercontent.com/u/62397590";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,iCAAiC,CAAC;AACrE,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAChE,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAC/D,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,iCAAiC,CAAC;AACrE,eAAO,MAAM,qBAAqB,6BAA6B,CAAC;AAChE,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAC/D,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,kBAAkB,qDAAqD,CAAC;AACrF,eAAO,MAAM,mBAAmB,qEAAqE,CAAC;AACtG,eAAO,MAAM,gCAAgC,wDAAwD,CAAC;AACtG,eAAO,MAAM,sCAAsC,0IAC4E,CAAC;AAChI,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AACvE,eAAO,MAAM,2BAA2B,oIAA0H,CAAC;AACnK,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AACvE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AACzD,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AACvD,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,oBAAoB,yBAAyB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ObjectItem } from '../../../types/form';
|
|
2
2
|
import { ApiStatus } from '../../../types/api';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { OptionType } from '@connector/ui';
|
|
4
|
+
import { ICard } from '../../../types/cards';
|
|
5
|
+
import { WriteFormFields, WriteFormState } from '../types/form';
|
|
5
6
|
interface OptionsData {
|
|
6
7
|
options: OptionType[];
|
|
7
8
|
hasMore: boolean;
|
|
@@ -11,17 +12,16 @@ export interface WriteCapabilityState {
|
|
|
11
12
|
createObjectList: OptionType[];
|
|
12
13
|
linkObjectList: OptionType[];
|
|
13
14
|
editObjectList: OptionType[];
|
|
15
|
+
searchObjectList: OptionType[];
|
|
14
16
|
objectDict: {
|
|
15
17
|
[key: string]: ObjectItem;
|
|
16
18
|
} | null;
|
|
17
19
|
formFields: {
|
|
18
20
|
[key: string]: WriteFormFields[];
|
|
19
21
|
} | null;
|
|
20
|
-
previewCardData: ISpecificCard | null;
|
|
21
22
|
objectListApiStatus: ApiStatus;
|
|
22
23
|
unlinkCardApiStatus: ApiStatus;
|
|
23
24
|
linkCardApiStatus: ApiStatus;
|
|
24
|
-
previewCardApiStatus: ApiStatus;
|
|
25
25
|
optionsMap: {
|
|
26
26
|
[key: string]: OptionsData;
|
|
27
27
|
} | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initial-state.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/store/initial-state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"initial-state.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/store/initial-state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAErE,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,cAAc,EAAE,UAAU,EAAE,CAAC;IAC7B,gBAAgB,EAAE,UAAU,EAAE,CAAC;IAC/B,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,mBAAmB,EAAE,SAAS,CAAC;IAC/B,mBAAmB,EAAE,SAAS,CAAC;IAC/B,iBAAiB,EAAE,SAAS,CAAC;IAC7B,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;IAC/B,mBAAmB,EAAE,SAAS,CAAC;IAC/B,+BAA+B,EAAE,SAAS,CAAC;IAC3C,sBAAsB,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9C,iBAAiB,EAAE,KAAK,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAGD,eAAO,MAAM,YAAY,EAAE,oBAmB1B,CAAC"}
|
|
@@ -3,13 +3,11 @@ export declare const selectCreateObjectList: (state: RootState) => import('@conn
|
|
|
3
3
|
export declare const selectLinkObjectList: (state: RootState) => import('@connector/ui').OptionType[];
|
|
4
4
|
export declare const selectEditObjectList: (state: RootState) => import('@connector/ui').OptionType[];
|
|
5
5
|
export declare const selectObjectDict: (state: RootState) => {
|
|
6
|
-
[key: string]: import('
|
|
6
|
+
[key: string]: import('../../../types/form').ObjectItem;
|
|
7
7
|
} | null;
|
|
8
8
|
export declare const selectFormFields: (state: RootState) => {
|
|
9
9
|
[key: string]: import('../types/form').WriteFormFields[];
|
|
10
10
|
} | null;
|
|
11
|
-
export declare const selectCardPreviewData: (state: RootState) => import('../../../types/cards').ISpecificCard | null;
|
|
12
|
-
export declare const selectCardPreviewApiStatus: (state: RootState) => import('../../../types/api').ApiStatus;
|
|
13
11
|
export declare const selectLinkCardApiStatus: (state: RootState) => import('../../../types/api').ApiStatus;
|
|
14
12
|
export declare const selectUnlinkCardApiStatus: (state: RootState) => import('../../../types/api').ApiStatus;
|
|
15
13
|
export declare const selectDependentFieldsMap: (state: RootState) => {
|
|
@@ -1 +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,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,
|
|
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,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,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;AAC/F,eAAO,MAAM,yBAAyB,UAAW,SAAS,2CAAoC,CAAC;AAC/F,eAAO,MAAM,4BAA4B,UAAW,SAAS,kDAAuC,CAAC;AACrG,eAAO,MAAM,qCAAqC,UAAW,SAAS,2CAAgD,CAAC;AACvH,eAAO,MAAM,uBAAuB,UAAW,SAAS,gDAAkC,CAAC;AAC3F,eAAO,MAAM,uBAAuB,UAAW,SAAS,YAAkC,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fetchDropDownOptions } from '../../../store/slice';
|
|
2
|
+
import { WriteFormFields, WriteFormState } from '../types/form';
|
|
3
|
+
import { ObjectItem } from '../../../types/form';
|
|
2
4
|
import { OptionType } from '@connector/ui';
|
|
3
5
|
export declare const writeCapabilitySlice: import('@reduxjs/toolkit').Slice<import('./initial-state').WriteCapabilityState, {
|
|
4
6
|
resetState: () => import('./initial-state').WriteCapabilityState;
|
|
@@ -16,6 +18,7 @@ declare const fetchObjectList: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
16
18
|
createObjectList: never[];
|
|
17
19
|
linkObjectList: never[];
|
|
18
20
|
editObjectList: never[];
|
|
21
|
+
searchObjectList: never[];
|
|
19
22
|
formFields: null;
|
|
20
23
|
objectDict: null;
|
|
21
24
|
dependentFieldsMap: {};
|
|
@@ -23,6 +26,7 @@ declare const fetchObjectList: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
23
26
|
createObjectList: OptionType[];
|
|
24
27
|
linkObjectList: OptionType[];
|
|
25
28
|
editObjectList: OptionType[];
|
|
29
|
+
searchObjectList: OptionType[];
|
|
26
30
|
formFields: {
|
|
27
31
|
[key: string]: WriteFormFields[];
|
|
28
32
|
};
|
|
@@ -48,37 +52,6 @@ declare const fetchObjectList: import('@reduxjs/toolkit').AsyncThunk<{
|
|
|
48
52
|
fulfilledMeta?: unknown;
|
|
49
53
|
rejectedMeta?: unknown;
|
|
50
54
|
}>;
|
|
51
|
-
declare const fetchDropDownOptions: import('@reduxjs/toolkit').AsyncThunk<{
|
|
52
|
-
optionsList: {
|
|
53
|
-
label: string;
|
|
54
|
-
value: string | number;
|
|
55
|
-
}[];
|
|
56
|
-
fieldName: string;
|
|
57
|
-
formId: string;
|
|
58
|
-
currentPage: number;
|
|
59
|
-
hasMore: boolean;
|
|
60
|
-
key: string;
|
|
61
|
-
}, {
|
|
62
|
-
fieldName: string;
|
|
63
|
-
formId: string;
|
|
64
|
-
fieldConfig: WriteFormFields;
|
|
65
|
-
interfaceId?: string;
|
|
66
|
-
pagination: InterfaceDetails["pagination"];
|
|
67
|
-
callback?: (options: OptionType[]) => void;
|
|
68
|
-
args?: {
|
|
69
|
-
[key: string]: string | number | boolean | null;
|
|
70
|
-
};
|
|
71
|
-
isScrollToBottomEvent?: boolean;
|
|
72
|
-
}, {
|
|
73
|
-
state?: unknown;
|
|
74
|
-
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
75
|
-
extra?: unknown;
|
|
76
|
-
rejectValue?: unknown;
|
|
77
|
-
serializedErrorType?: unknown;
|
|
78
|
-
pendingMeta?: unknown;
|
|
79
|
-
fulfilledMeta?: unknown;
|
|
80
|
-
rejectedMeta?: unknown;
|
|
81
|
-
}>;
|
|
82
55
|
declare const createForm: import('@reduxjs/toolkit').AsyncThunk<undefined, {
|
|
83
56
|
formId: string;
|
|
84
57
|
args: {
|
|
@@ -151,25 +124,6 @@ declare const linkCard: import('@reduxjs/toolkit').AsyncThunk<void, {
|
|
|
151
124
|
fulfilledMeta?: unknown;
|
|
152
125
|
rejectedMeta?: unknown;
|
|
153
126
|
}>;
|
|
154
|
-
declare const previewCard: import('@reduxjs/toolkit').AsyncThunk<{
|
|
155
|
-
data: null;
|
|
156
|
-
} | {
|
|
157
|
-
data: import('../../../types/cards').ISpecificCard;
|
|
158
|
-
}, {
|
|
159
|
-
id: string;
|
|
160
|
-
args: PreviewArgs;
|
|
161
|
-
channelType?: string;
|
|
162
|
-
isRefresh?: boolean;
|
|
163
|
-
}, {
|
|
164
|
-
state?: unknown;
|
|
165
|
-
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
166
|
-
extra?: unknown;
|
|
167
|
-
rejectValue?: unknown;
|
|
168
|
-
serializedErrorType?: unknown;
|
|
169
|
-
pendingMeta?: unknown;
|
|
170
|
-
fulfilledMeta?: unknown;
|
|
171
|
-
rejectedMeta?: unknown;
|
|
172
|
-
}>;
|
|
173
127
|
declare const fetchCurrentResourceDetails: import('@reduxjs/toolkit').AsyncThunk<{
|
|
174
128
|
data: WriteFormState;
|
|
175
129
|
status: number | undefined;
|
|
@@ -192,5 +146,5 @@ declare const fetchCurrentResourceDetails: import('@reduxjs/toolkit').AsyncThunk
|
|
|
192
146
|
declare const resetState: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"writeCapability/resetState">, setCurrentCardInEdit: import('@reduxjs/toolkit').ActionCreatorWithPayload<any, "writeCapability/setCurrentCardInEdit">, resetCurrentResourceDetails: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"writeCapability/resetCurrentResourceDetails">, setHasUnsavedChanges: import('@reduxjs/toolkit').ActionCreatorWithPayload<any, "writeCapability/setHasUnsavedChanges">;
|
|
193
147
|
declare const _default: import('redux').Reducer<import('./initial-state').WriteCapabilityState>;
|
|
194
148
|
export default _default;
|
|
195
|
-
export { fetchObjectList, resetState, fetchDropDownOptions, createForm, linkCard, unlinkCard,
|
|
149
|
+
export { fetchObjectList, resetState, fetchDropDownOptions, createForm, linkCard, unlinkCard, updateForm, fetchCurrentResourceDetails, setCurrentCardInEdit, resetCurrentResourceDetails, setHasUnsavedChanges };
|
|
196
150
|
//# sourceMappingURL=slice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/store/slice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/store/slice.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAIrD,OAAO,KAAK,EAAsB,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,eAAO,MAAM,oBAAoB;;;;;;;;;;;mIAgH/B,CAAC;AAEH,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;cAES,MAAM,EAAE;iBAAe,MAAM;oBAAkB,MAAM;;;;;;;;;;EAuJlF,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;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;wBACC,MAAM;kBACZ;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;KAAE;sBAC9D,MAAM,IAAI;sBACV,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI;;;;;;;;;;EAyB7C,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,2BAA2B;;;;QAIvB,MAAM;iBACG,MAAM;oBACH,MAAM;wBACF,MAAM;kBACZ,MAAM;;;;;;;;;;EAmDzB,CAAC;AAEF,QAAA,MAAQ,UAAU,wFAAE,oBAAoB,oGAAE,2BAA2B,yGAAE,oBAAoB,kGAC7D,CAAC;;AAC/B,wBAA4C;AAC5C,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,UAAU,EACV,2BAA2B,EAC3B,oBAAoB,EACpB,2BAA2B,EAC3B,oBAAoB,EACrB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FIELD_TYPES, OptionType } from '@connector/ui';
|
|
2
|
+
import { FieldListResponse, ObjectItem } from '../../../types/form';
|
|
2
3
|
export type FieldValue = string | number | OptionType | boolean | Date | OptionType[];
|
|
3
4
|
export type WriteFieldKeys = string;
|
|
4
5
|
export type WriteFormStateValues = Partial<Record<WriteFieldKeys, FieldValue | undefined>>;
|
|
@@ -10,93 +11,13 @@ export interface WriteFormState {
|
|
|
10
11
|
export interface AllValues {
|
|
11
12
|
values: Partial<Record<WriteFieldKeys, FieldValue>>;
|
|
12
13
|
}
|
|
13
|
-
export interface Value {
|
|
14
|
-
value?: FieldValue | boolean;
|
|
15
|
-
name: string;
|
|
16
|
-
}
|
|
17
|
-
export interface FormActionValue {
|
|
18
|
-
type: string;
|
|
19
|
-
payload?: AllValues | Value;
|
|
20
|
-
}
|
|
21
|
-
export type ValidationObject = {
|
|
22
|
-
msg: string;
|
|
23
|
-
};
|
|
24
|
-
export interface WriteValidations {
|
|
25
|
-
isRequired?: boolean | ValidationObject;
|
|
26
|
-
isUrl?: boolean | ValidationObject;
|
|
27
|
-
isEmail?: boolean | ValidationObject;
|
|
28
|
-
disableFuture?: boolean | ValidationObject;
|
|
29
|
-
disablePast?: boolean | ValidationObject;
|
|
30
|
-
maxCharacters?: number;
|
|
31
|
-
maxRows?: number;
|
|
32
|
-
range?: {
|
|
33
|
-
min: number;
|
|
34
|
-
max: number;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export interface InterfaceDetails {
|
|
38
|
-
id: string;
|
|
39
|
-
args?: {
|
|
40
|
-
[key: string]: string;
|
|
41
|
-
};
|
|
42
|
-
previousArgs?: {
|
|
43
|
-
[key: string]: string;
|
|
44
|
-
};
|
|
45
|
-
optionalArgs?: {
|
|
46
|
-
[key: string]: string;
|
|
47
|
-
};
|
|
48
|
-
pagination?: {
|
|
49
|
-
enabled: boolean;
|
|
50
|
-
limit?: number | null;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export interface FieldListResponse {
|
|
54
|
-
name: string;
|
|
55
|
-
placeholder?: string;
|
|
56
|
-
type: FIELD_TYPES | 'multi-select' | 'multiline';
|
|
57
|
-
label: string;
|
|
58
|
-
value?: string | number;
|
|
59
|
-
disabled?: boolean;
|
|
60
|
-
disablePast?: boolean;
|
|
61
|
-
disableFuture?: boolean;
|
|
62
|
-
validations?: WriteValidations;
|
|
63
|
-
defaultOptions?: boolean | OptionType[];
|
|
64
|
-
interfaceDetails?: InterfaceDetails;
|
|
65
|
-
isInfiniteScrollable?: boolean;
|
|
66
|
-
isApiSearchEnabled?: boolean;
|
|
67
|
-
min?: number;
|
|
68
|
-
max?: number;
|
|
69
|
-
multiline?: boolean;
|
|
70
|
-
maxRows?: number;
|
|
71
|
-
limit?: number;
|
|
72
|
-
rows?: number;
|
|
73
|
-
priority: number;
|
|
74
|
-
defaultValue?: string | number;
|
|
75
|
-
meta?: {
|
|
76
|
-
[key: string]: string | number | boolean;
|
|
77
|
-
};
|
|
78
|
-
isClearable?: boolean;
|
|
79
|
-
}
|
|
80
14
|
export interface WriteFormFields extends FieldListResponse {
|
|
81
15
|
type: FIELD_TYPES;
|
|
82
16
|
isMultiSelect?: boolean;
|
|
83
17
|
loadOptionsOnFocus?: boolean;
|
|
84
18
|
}
|
|
85
|
-
export interface ObjectItem extends OptionType {
|
|
86
|
-
id: string;
|
|
87
|
-
name: string;
|
|
88
|
-
interfaceDetails?: InterfaceDetails;
|
|
89
|
-
type: 'create' | 'link' | 'edit';
|
|
90
|
-
connectorId: string;
|
|
91
|
-
cardId: string;
|
|
92
|
-
authenticated?: boolean;
|
|
93
|
-
logoUrl?: string;
|
|
94
|
-
}
|
|
95
19
|
export interface ObjectResponseItem extends Omit<ObjectItem, 'label' | 'value'> {
|
|
96
20
|
fieldList?: FieldListResponse[];
|
|
97
21
|
}
|
|
98
22
|
export type Predicates = Partial<Record<WriteFieldKeys, boolean>>;
|
|
99
|
-
export interface PreviewArgs {
|
|
100
|
-
[key: string]: string;
|
|
101
|
-
}
|
|
102
23
|
//# sourceMappingURL=form.d.ts.map
|
|
@@ -1 +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;
|
|
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;AACxD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE7D,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,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC;AAC3F,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;AAErF,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,IAAI,EAAE,WAAW,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;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"}
|
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { WriteFormFields, WriteFormState, WriteFormStateValues } from '../types/form';
|
|
3
|
-
export declare const getAllCompletedArgs: (state: WriteFormState, args?: {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
}) => string[];
|
|
1
|
+
import { WriteFormState, WriteFormStateValues } from '../types/form';
|
|
6
2
|
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 | null;
|
|
11
|
-
};
|
|
12
|
-
export declare const generateDropdownOptionKey: (args: {
|
|
13
|
-
[key: string]: string | number | boolean | null;
|
|
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
|
-
export declare const parseFormStateToArgs: (state: WriteFormState, args: {
|
|
26
|
-
[key: string]: string;
|
|
27
|
-
}) => {
|
|
28
|
-
[key: string]: string | number | boolean | (string | number)[];
|
|
29
|
-
};
|
|
30
3
|
export declare const isDate: (date: string | object) => boolean;
|
|
31
4
|
export declare const canonicalizedValuesObject: (obj: WriteFormStateValues) => WriteFormStateValues;
|
|
32
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErE,eAAO,MAAM,eAAe,SAAU,MAAM,SAAS,cAAc,SAAS,MAAM,EAAE,WAWnF,CAAC;AAEF,eAAO,MAAM,MAAM,SAAU,MAAM,GAAG,MAAM,KAAG,OAQ9C,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAS,oBAAoB,KAAG,oBAUrE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AsyncLoadOptions, OptionType } from '@connector/ui';
|
|
2
|
+
import { FormFields, FormState } from '../types/form';
|
|
3
|
+
interface DropdownConfigProps {
|
|
4
|
+
formFields: FormFields[];
|
|
5
|
+
formState: FormState;
|
|
6
|
+
formId: string | number;
|
|
7
|
+
}
|
|
8
|
+
export declare const useDropdownConfig: ({ formFields, formState, formId }: DropdownConfigProps) => {
|
|
9
|
+
fetchConfig: {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
loadOptions: AsyncLoadOptions<OptionType>;
|
|
12
|
+
};
|
|
13
|
+
} | null;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=useDropdownConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDropdownConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useDropdownConfig.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,UAAU,mBAAmB;IAC3B,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,iBAAiB,sCAAuC,mBAAmB;;;yBAyC1C,gBAAgB,CAAC,UAAU,CAAC;;;CASzE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormValidation } from '@connector/ui';
|
|
2
|
+
import { FormState, FormActionValue, FieldValue } from '../types/form';
|
|
3
|
+
import { Dispatch } from 'react';
|
|
4
|
+
interface FormHandlersProps {
|
|
5
|
+
dispatch: Dispatch<FormActionValue>;
|
|
6
|
+
state: FormState;
|
|
7
|
+
validations: FormValidation;
|
|
8
|
+
}
|
|
9
|
+
export declare const useFormHandlers: ({ state, dispatch, validations }: FormHandlersProps) => {
|
|
10
|
+
setValue: (name: string, value?: FieldValue) => void;
|
|
11
|
+
isErrorInValidations: () => boolean;
|
|
12
|
+
inputChangeHandler: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
dateChangeHandler: (name: string, date: Date | null) => void;
|
|
14
|
+
handleValidationError: (name: string, error: string | boolean) => void;
|
|
15
|
+
clearDependentFields: (fieldName: string, dependentFieldsMap: Record<string, string[]>) => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useFormHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormHandlers.d.ts","sourceRoot":"","sources":["../../src/hooks/useFormHandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,UAAU,iBAAiB;IACzB,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IACpC,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,EAAE,cAAc,CAAC;CAC7B;AAED,eAAO,MAAM,eAAe,qCAAsC,iBAAiB;qBAGzD,MAAM,UAAU,UAAU;;gCASf,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;8BAMrC,MAAM,QAAQ,IAAI,GAAG,IAAI;kCAIrB,MAAM,SAAS,MAAM,GAAG,OAAO;sCAM3B,MAAM,sBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;CAuB9F,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormState, FormActionValue } from '../types/form';
|
|
2
|
+
export declare const intialState: FormState;
|
|
3
|
+
export declare const ACTIONS: {
|
|
4
|
+
SET_FIELD_VALUE: string;
|
|
5
|
+
CLEAR_ERROR: string;
|
|
6
|
+
SET_FIELD_ERROR: string;
|
|
7
|
+
SET_FIELDS: string;
|
|
8
|
+
CLEAR_FIELDS: string;
|
|
9
|
+
RESET_STATE: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const reducer: (state: FormState, action: FormActionValue) => FormState;
|
|
12
|
+
export declare const useFormReducer: () => [FormState, import('react').Dispatch<FormActionValue>];
|
|
13
|
+
//# sourceMappingURL=useFormReducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormReducer.d.ts","sourceRoot":"","sources":["../../src/hooks/useFormReducer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/D,eAAO,MAAM,WAAW,EAAE,SAGzB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;CAOnB,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,SAAS,UAAU,eAAe,KAAG,SAyDnE,CAAC;AAEF,eAAO,MAAM,cAAc,8DAE1B,CAAC"}
|