@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
package/package.json
CHANGED
package/store/hooks.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export declare const useAppDispatch: import('react-redux').UseDispatch<import('redux-thunk').ThunkDispatch<{
|
|
2
2
|
cardList: import('../features/connector-cards/store/initial-state').IConnectorState;
|
|
3
3
|
write: import('../features/write-form/store/initial-state').WriteCapabilityState;
|
|
4
|
+
common: import('./initial-state').CommonSliceState;
|
|
4
5
|
}, undefined, import('redux').UnknownAction> & import('redux').Dispatch<import('redux').UnknownAction>>;
|
|
5
6
|
export declare const useAppSelector: import('react-redux').UseSelector<{
|
|
6
7
|
cardList: import('../features/connector-cards/store/initial-state').IConnectorState;
|
|
7
8
|
write: import('../features/write-form/store/initial-state').WriteCapabilityState;
|
|
9
|
+
common: import('./initial-state').CommonSliceState;
|
|
8
10
|
}>;
|
|
9
11
|
//# sourceMappingURL=hooks.d.ts.map
|
package/store/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/store/hooks.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/store/hooks.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;;;uGAAuC,CAAC;AACnE,eAAO,MAAM,cAAc;;;;EAAqC,CAAC"}
|
package/store/index.d.ts
CHANGED
|
@@ -2,26 +2,32 @@ import { Action, ThunkAction } from '@reduxjs/toolkit';
|
|
|
2
2
|
export declare const rootReducer: import('redux').Reducer<{
|
|
3
3
|
cardList: import('../features/connector-cards/store/initial-state').IConnectorState;
|
|
4
4
|
write: import('../features/write-form/store/initial-state').WriteCapabilityState;
|
|
5
|
+
common: import('./initial-state').CommonSliceState;
|
|
5
6
|
}, import('redux').UnknownAction, Partial<{
|
|
6
7
|
cardList: import('../features/connector-cards/store/initial-state').IConnectorState | undefined;
|
|
7
8
|
write: import('../features/write-form/store/initial-state').WriteCapabilityState | undefined;
|
|
9
|
+
common: import('./initial-state').CommonSliceState | undefined;
|
|
8
10
|
}>>;
|
|
9
11
|
export declare const store: import('@reduxjs/toolkit').EnhancedStore<{
|
|
10
12
|
cardList: import('../features/connector-cards/store/initial-state').IConnectorState;
|
|
11
13
|
write: import('../features/write-form/store/initial-state').WriteCapabilityState;
|
|
14
|
+
common: import('./initial-state').CommonSliceState;
|
|
12
15
|
}, import('redux').UnknownAction, import('@reduxjs/toolkit').Tuple<[import('redux').StoreEnhancer<{
|
|
13
16
|
dispatch: import('redux-thunk').ThunkDispatch<{
|
|
14
17
|
cardList: import('../features/connector-cards/store/initial-state').IConnectorState;
|
|
15
18
|
write: import('../features/write-form/store/initial-state').WriteCapabilityState;
|
|
19
|
+
common: import('./initial-state').CommonSliceState;
|
|
16
20
|
}, undefined, import('redux').UnknownAction>;
|
|
17
21
|
}>, import('redux').StoreEnhancer]>>;
|
|
18
22
|
export declare const customStore: (preloadedState?: Partial<RootState>) => import('@reduxjs/toolkit').EnhancedStore<{
|
|
19
23
|
cardList: import('../features/connector-cards/store/initial-state').IConnectorState;
|
|
20
24
|
write: import('../features/write-form/store/initial-state').WriteCapabilityState;
|
|
25
|
+
common: import('./initial-state').CommonSliceState;
|
|
21
26
|
}, import('redux').UnknownAction, import('@reduxjs/toolkit').Tuple<[import('redux').StoreEnhancer<{
|
|
22
27
|
dispatch: import('redux-thunk').ThunkDispatch<{
|
|
23
28
|
cardList: import('../features/connector-cards/store/initial-state').IConnectorState;
|
|
24
29
|
write: import('../features/write-form/store/initial-state').WriteCapabilityState;
|
|
30
|
+
common: import('./initial-state').CommonSliceState;
|
|
25
31
|
}, undefined, import('redux').UnknownAction>;
|
|
26
32
|
}>, import('redux').StoreEnhancer]>>;
|
|
27
33
|
export type AppStore = typeof store;
|
package/store/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5D,eAAO,MAAM,WAAW;;;;;;;;GAItB,CAAC;AAEH,eAAO,MAAM,KAAK;;;;;;;;;;oCAGhB,CAAC;AAEH,eAAO,MAAM,WAAW,oBAAqB,OAAO,CAAC,SAAS,CAAC;;;;;;;;;;oCAM9D,CAAC;AAGF,MAAM,MAAM,QAAQ,GAAG,OAAO,KAAK,CAAC;AACpC,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AAE/C,MAAM,MAAM,QAAQ,CAAC,eAAe,GAAG,IAAI,IAAI,WAAW,CAAC,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ApiStatus } from '../types/api';
|
|
2
|
+
import { ISpecificCard } from '../types/cards';
|
|
3
|
+
import { OptionType } from '@connector/ui';
|
|
4
|
+
interface OptionsData {
|
|
5
|
+
options: OptionType[];
|
|
6
|
+
hasMore: boolean;
|
|
7
|
+
currentPage: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CommonSliceState {
|
|
10
|
+
optionsMap: {
|
|
11
|
+
[key: string]: OptionsData;
|
|
12
|
+
} | null;
|
|
13
|
+
dropdownOptionsApis: ApiStatus;
|
|
14
|
+
previewCardData: ISpecificCard | null;
|
|
15
|
+
previewCardApiStatus: ApiStatus;
|
|
16
|
+
}
|
|
17
|
+
export declare const initialState: CommonSliceState;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=initial-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initial-state.d.ts","sourceRoot":"","sources":["../../src/store/initial-state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,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,gBAAgB;IAC/B,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,GAAG,IAAI,CAAC;IAClD,mBAAmB,EAAE,SAAS,CAAC;IAC/B,eAAe,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,oBAAoB,EAAE,SAAS,CAAC;CACjC;AAGD,eAAO,MAAM,YAAY,EAAE,gBAK1B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RootState } from '.';
|
|
2
|
+
export declare const selectPreviewCardData: (state: RootState) => import('../types/cards').ISpecificCard | null;
|
|
3
|
+
export declare const selectPreviewCardApiStatus: (state: RootState) => import('../types/api').ApiStatus;
|
|
4
|
+
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,qBAAqB,UAAW,SAAS,kDAAiC,CAAC;AACxF,eAAO,MAAM,0BAA0B,UAAW,SAAS,qCAAsC,CAAC"}
|
package/store/slice.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { OptionType } from '@connector/ui';
|
|
2
|
+
import { InterfaceDetails, FormFields, PreviewArgs } from '../types/form';
|
|
3
|
+
export declare const commonSlice: import('@reduxjs/toolkit').Slice<import('./initial-state').CommonSliceState, {
|
|
4
|
+
resetState: () => import('./initial-state').CommonSliceState;
|
|
5
|
+
resetPreviewCardData: (state: import('immer').WritableDraft<import('./initial-state').CommonSliceState>) => void;
|
|
6
|
+
}, "commonSlice", "commonSlice", import('@reduxjs/toolkit').SliceSelectors<import('./initial-state').CommonSliceState>>;
|
|
7
|
+
export declare const fetchDropDownOptions: import('@reduxjs/toolkit').AsyncThunk<{
|
|
8
|
+
optionsList: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string | number;
|
|
11
|
+
}[];
|
|
12
|
+
fieldName: string;
|
|
13
|
+
formId: string;
|
|
14
|
+
currentPage: number;
|
|
15
|
+
hasMore: boolean;
|
|
16
|
+
key: string;
|
|
17
|
+
}, {
|
|
18
|
+
fieldName: string;
|
|
19
|
+
formId: string;
|
|
20
|
+
fieldConfig: FormFields;
|
|
21
|
+
interfaceId?: string;
|
|
22
|
+
pagination: InterfaceDetails["pagination"];
|
|
23
|
+
callback?: (options: OptionType[]) => void;
|
|
24
|
+
args?: {
|
|
25
|
+
[key: string]: string | number | boolean | null;
|
|
26
|
+
};
|
|
27
|
+
isScrollToBottomEvent?: boolean;
|
|
28
|
+
}, {
|
|
29
|
+
state?: unknown;
|
|
30
|
+
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
31
|
+
extra?: unknown;
|
|
32
|
+
rejectValue?: unknown;
|
|
33
|
+
serializedErrorType?: unknown;
|
|
34
|
+
pendingMeta?: unknown;
|
|
35
|
+
fulfilledMeta?: unknown;
|
|
36
|
+
rejectedMeta?: unknown;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const previewCard: import('@reduxjs/toolkit').AsyncThunk<{
|
|
39
|
+
data: null;
|
|
40
|
+
} | {
|
|
41
|
+
data: import('../types/cards').ISpecificCard;
|
|
42
|
+
}, {
|
|
43
|
+
id: string;
|
|
44
|
+
args: PreviewArgs;
|
|
45
|
+
channelType?: string;
|
|
46
|
+
isRefresh?: boolean;
|
|
47
|
+
}, {
|
|
48
|
+
state?: unknown;
|
|
49
|
+
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
50
|
+
extra?: unknown;
|
|
51
|
+
rejectValue?: unknown;
|
|
52
|
+
serializedErrorType?: unknown;
|
|
53
|
+
pendingMeta?: unknown;
|
|
54
|
+
fulfilledMeta?: unknown;
|
|
55
|
+
rejectedMeta?: unknown;
|
|
56
|
+
}>;
|
|
57
|
+
declare const resetState: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"commonSlice/resetState">, resetPreviewCardData: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"commonSlice/resetPreviewCardData">;
|
|
58
|
+
declare const _default: import('redux').Reducer<import('./initial-state').CommonSliceState>;
|
|
59
|
+
export default _default;
|
|
60
|
+
export { resetState, resetPreviewCardData };
|
|
61
|
+
//# sourceMappingURL=slice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../src/store/slice.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG9E,eAAO,MAAM,WAAW;;;uHA6CtB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;eAIhB,MAAM;YACT,MAAM;iBACD,UAAU;kBACT,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,GAAG,IAAI,CAAA;KAAE;4BAClC,OAAO;;;;;;;;;;EA6GpC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;QAQhB,MAAM;UACJ,WAAW;kBACH,MAAM;gBACR,OAAO;;;;;;;;;;EActB,CAAC;AAEF,QAAA,MAAQ,UAAU,oFAAE,oBAAoB,4FAAwB,CAAC;;AACjE,wBAAmC;AAEnC,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/testing/mocks/handlers/common.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,QAAQ,6BAA+B,CAAC"}
|
|
@@ -8,7 +8,7 @@ export declare const getSpecificConnector: (id: string, count?: number, isPrevie
|
|
|
8
8
|
readonly label: string;
|
|
9
9
|
readonly value: string | null;
|
|
10
10
|
readonly errorMessage: "" | null;
|
|
11
|
-
readonly statusCode: 404 |
|
|
11
|
+
readonly statusCode: 404 | 500 | 200 | 400;
|
|
12
12
|
readonly priority: number;
|
|
13
13
|
readonly deepLink: string | null;
|
|
14
14
|
readonly key: string;
|
|
@@ -18,7 +18,7 @@ export declare const getSpecificConnector: (id: string, count?: number, isPrevie
|
|
|
18
18
|
readonly label: string;
|
|
19
19
|
readonly value: string | null;
|
|
20
20
|
readonly errorMessage: "" | null;
|
|
21
|
-
readonly statusCode: 404 |
|
|
21
|
+
readonly statusCode: 404 | 500 | 200 | 400;
|
|
22
22
|
readonly priority: number;
|
|
23
23
|
readonly deepLink: string | null;
|
|
24
24
|
readonly key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-cards.d.ts","sourceRoot":"","sources":["../../../../src/testing/mocks/handlers/fetch-cards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-cards.d.ts","sourceRoot":"","sources":["../../../../src/testing/mocks/handlers/fetch-cards.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AA8BpE,eAAO,MAAM,oBAAoB,OAAQ,MAAM,UAAS,MAAM,cAAiB,OAAO;;;cAqDjC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa9D,CAAC;AAaF,eAAO,MAAM,QAAQ,6BAAkD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-search.d.ts","sourceRoot":"","sources":["../../../../src/testing/mocks/handlers/global-search.ts"],"names":[],"mappings":"AAqDA,eAAO,MAAM,QAAQ,6BAAmD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-capability.d.ts","sourceRoot":"","sources":["../../../../src/testing/mocks/handlers/write-capability.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"write-capability.d.ts","sourceRoot":"","sources":["../../../../src/testing/mocks/handlers/write-capability.ts"],"names":[],"mappings":"AA4cA,eAAO,MAAM,QAAQ,6BASpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/testing/mocks/handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/testing/mocks/handlers.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,6BAMpB,CAAC"}
|
package/testing/test-utils.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const waitForLoadingToFinish: () => Promise<void>;
|
|
|
9
9
|
export declare const renderApp: (ui: React.ReactElement, { preloadedState, store, ...renderOptions }?: ExtendedRenderOptions) => Promise<{
|
|
10
10
|
container: HTMLElement;
|
|
11
11
|
baseElement: HTMLElement;
|
|
12
|
-
debug: (baseElement?: import('react-dom/client').Container | (
|
|
12
|
+
debug: (baseElement?: import('react-dom/client').Container | (Document | Element) | Array<import('react-dom/client').Container | (Document | Element)> | undefined, maxLength?: number | undefined, options?: import('pretty-format').OptionsReceived | undefined) => void;
|
|
13
13
|
rerender: (ui: React.ReactNode) => void;
|
|
14
14
|
unmount: () => void;
|
|
15
15
|
asFragment: () => DocumentFragment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/testing/test-utils.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAqC,MAAM,wBAAwB,CAAC;AAChG,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/testing/test-utils.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAqC,MAAM,wBAAwB,CAAC;AAChG,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAI5D,UAAU,qBAAsB,SAAQ,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC;IACpE,cAAc,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAED,eAAO,MAAM,sBAAsB,qBAG/B,CAAC;AAEL,eAAO,MAAM,SAAS,OAChB,KAAK,CAAC,YAAY,gDACyD,qBAAqB;;;uBAF9F,CAAC,yJAE8F,CAAC,6BAElF,CAAC;yBAIb,SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBX,CAAC;AAGF,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
|
package/types/form.d.ts
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { FIELD_TYPES, OptionType } from '@connector/ui';
|
|
2
|
+
export type FieldValue = string | number | OptionType | boolean | Date | OptionType[];
|
|
3
|
+
export type FormStateValues = Partial<Record<string, FieldValue>>;
|
|
4
|
+
export type FormStateErrors = Partial<Record<string, string | boolean>>;
|
|
5
|
+
export interface FormState {
|
|
6
|
+
values: FormStateValues;
|
|
7
|
+
errors: FormStateErrors;
|
|
8
|
+
}
|
|
9
|
+
export interface Value {
|
|
10
|
+
value?: FieldValue;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
interface Payload {
|
|
14
|
+
values?: FormStateValues;
|
|
15
|
+
value?: Value;
|
|
16
|
+
}
|
|
17
|
+
export interface FormActionValue {
|
|
18
|
+
type: string;
|
|
19
|
+
payload?: Payload;
|
|
20
|
+
}
|
|
21
|
+
export type ValidationObject = {
|
|
22
|
+
msg: string;
|
|
23
|
+
};
|
|
24
|
+
export interface Validations {
|
|
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?: Validations;
|
|
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
|
+
export interface FormFields extends FieldListResponse {
|
|
81
|
+
type: FIELD_TYPES;
|
|
82
|
+
isMultiSelect?: boolean;
|
|
83
|
+
loadOptionsOnFocus?: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface ObjectItem extends OptionType {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
logoUrl: string;
|
|
89
|
+
searchInterfaceDetails?: InterfaceDetails;
|
|
90
|
+
interfaceDetails?: InterfaceDetails;
|
|
91
|
+
type: 'create' | 'link' | 'edit' | 'search_and_link';
|
|
92
|
+
connectorId: string;
|
|
93
|
+
cardId: string;
|
|
94
|
+
authenticated?: boolean;
|
|
95
|
+
connectorName?: string;
|
|
96
|
+
searchObject?: string;
|
|
97
|
+
}
|
|
98
|
+
export type FormArgValue = string | boolean | number | (string | number)[];
|
|
99
|
+
export interface PreviewArgs {
|
|
100
|
+
[key: string]: string;
|
|
101
|
+
}
|
|
102
|
+
export type PreviewMeta = {
|
|
103
|
+
externalResourceId: string;
|
|
104
|
+
formId: string;
|
|
105
|
+
};
|
|
106
|
+
export {};
|
|
107
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
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
import { FormValidation } from '@connector/ui';
|
|
2
|
+
import { FormState, FormFields, FormArgValue } from '../types/form';
|
|
3
|
+
export declare const generateDropdownOptionKey: (args: {
|
|
4
|
+
[key: string]: string | number | boolean | null;
|
|
5
|
+
}, id: string, name: string) => string;
|
|
6
|
+
export declare const getAllCompletedArgs: (state: FormState, args?: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
}) => string[];
|
|
9
|
+
export declare const getArgsValueMap: (state: FormState, args?: {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
}) => {
|
|
12
|
+
[key: string]: string | number | boolean | null;
|
|
13
|
+
};
|
|
14
|
+
export declare const getFormFieldsValidations: ({ formFields }: {
|
|
15
|
+
formFields: FormFields[];
|
|
16
|
+
}) => FormValidation;
|
|
17
|
+
export declare const parseFormStateToArgs: (state: FormState, args: {
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
}) => Record<string, FormArgValue>;
|
|
20
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/utils/form.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAExE,eAAO,MAAM,yBAAyB,SAC9B;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CAAE,MACrD,MAAM,QACJ,MAAM,WAOb,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAAW,SAAS,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,KAAG,MAAM,EAM9F,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,SAAS,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;CA6BjF,CAAC;AAEF,eAAO,MAAM,wBAAwB,mBAAoB;IAAE,UAAU,EAAE,UAAU,EAAE,CAAA;CAAE,KAAG,cAsCvF,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAAW,SAAS,QAAQ;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,iCAoBrF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IAvailableFtr } from '
|
|
2
|
-
import { IEventData, ICardData, ISpecificCard, ISpecificCardSlice } from '
|
|
1
|
+
import { IAvailableFtr } from '../context';
|
|
2
|
+
import { IEventData, ICardData, ISpecificCard, ISpecificCardSlice } from '../types/cards';
|
|
3
3
|
export declare const generateUniqueKey: (text: number | string) => string;
|
|
4
4
|
export declare const getVersionData: (version: string) => string | number | (() => StringIterator<string>) | ((url: string) => string) | (() => string) | ((pos: number) => string) | ((index: number) => number) | ((...strings: string[]) => string) | ((searchString: string, position?: number) => number) | ((searchString: string, position?: number) => number) | {
|
|
5
5
|
(that: string): number;
|
|
@@ -56,4 +56,4 @@ export declare const replacePlaceholders: (template: string, values: {
|
|
|
56
56
|
}) => string;
|
|
57
57
|
export declare const getCardLoadedGainSightEventsData: (data: ICardData, title: string, isExpanded: boolean, isSuccess?: boolean) => IEventData;
|
|
58
58
|
export declare const parseCardData: (data: ISpecificCardSlice) => ISpecificCard;
|
|
59
|
-
//# sourceMappingURL=
|
|
59
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE9F,eAAO,MAAM,iBAAiB,SAAU,MAAM,GAAG,MAAM,WAGtD,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,MAAM;;+DAsH0+0M,eAAe;kCA1Ezh1M,eAAe,iBAAiB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAxBf,eAGrC;;;oBAIE,eAAe;;;;;;;4XAvBzB,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAAa,MAAM,YAIxD,CAAC;AAOF,eAAO,MAAM,yBAAyB,YAAa,MAAM,WAAU,MAAM,YAIxE,CAAC;AAEF,eAAO,MAAM,mBAAmB,YAAa,MAAM,gBAAe,OAAO,aAAoB,OAAO,SA2BnG,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,sBAAuB,aAAa,2BAAoB,MAAM,YAM5F,CAAC;AAEF,eAAO,MAAM,mBAAmB,aAAc,MAAM,UAAU;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,KAAG,MAElG,CAAC;AAEF,eAAO,MAAM,gCAAgC,SACrC,SAAS,SACR,MAAM,cACD,OAAO,cACR,OAAO,eAcnB,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,kBAAkB,KAAG,aA4BxD,CAAC"}
|
package/utils/poll.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type CreatePollApiProps<Args extends unknown[], Res> = {
|
|
2
|
+
apiFn: (...args: Args) => Promise<Res>;
|
|
3
|
+
/** interval in milliseconds between each call */
|
|
4
|
+
intervalMillis: number;
|
|
5
|
+
/** maximum retries for pending case. Beyond this, the response will be treated as error */
|
|
6
|
+
maxRetries: number;
|
|
7
|
+
/** the function to verify if success condition is satisfied */
|
|
8
|
+
isSatisfied: (body: Res) => boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const promiseDelay: (delay: number) => Promise<unknown>;
|
|
11
|
+
export declare const createPollApi: <Args extends unknown[], Res>({ apiFn, intervalMillis, maxRetries, isSatisfied }: CreatePollApiProps<Args, Res>) => (...args: Args) => Promise<Res>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=poll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../src/utils/poll.ts"],"names":[],"mappings":"AAAA,KAAK,kBAAkB,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,GAAG,IAAI;IACrD,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,iDAAiD;IACjD,cAAc,EAAE,MAAM,CAAC;IACvB,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,WAAW,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,MAAM,qBAEzC,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,IAAI,SAAS,OAAO,EAAE,EAAE,GAAG,sDAKtD,kBAAkB,CAAC,IAAI,EAAE,GAAG,CAAC,eACA,IAAI,KAAG,OAAO,CAAC,GAAG,CAiBjD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IValidateConfig } from '@connector/ui';
|
|
2
|
+
export declare const validateUrl: (msg?: string) => (url: unknown) => string | boolean;
|
|
3
|
+
export declare const validateEmail: (msg?: string) => (email: unknown) => string | boolean;
|
|
4
|
+
export declare const validateIsRequired: (msg?: string) => (value: unknown) => string | boolean;
|
|
5
|
+
export declare const validateDate: (msg?: string) => (date: unknown, appConfigs: IValidateConfig) => string | boolean;
|
|
6
|
+
export declare const validateNumber: (msg?: string) => (value: unknown, appConfigs: IValidateConfig) => string | boolean;
|
|
7
|
+
export declare const validateTextField: (msg?: string) => (value: unknown, appConfigs: IValidateConfig) => string | boolean;
|
|
8
|
+
export declare const validateIdOrUrl: (msg?: string) => (input: unknown) => string | boolean;
|
|
9
|
+
export declare const compareObjects: <T extends Record<string, unknown>>(obj1: T, obj2: T) => boolean;
|
|
10
|
+
//# sourceMappingURL=validations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validations.d.ts","sourceRoot":"","sources":["../../src/utils/validations.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,WAAW,SACf,MAAM,WACP,OAAO,KAAG,MAAM,GAAG,OAuBxB,CAAC;AAEJ,eAAO,MAAM,aAAa,SACjB,MAAM,aACL,OAAO,KAAG,MAAM,GAAG,OAU1B,CAAC;AAEJ,eAAO,MAAM,kBAAkB,SACtB,MAAM,aACL,OAAO,KAAG,MAAM,GAAG,OAK1B,CAAC;AAEJ,eAAO,MAAM,YAAY,SAChB,MAAM,YACN,OAAO,cAAc,eAAe,KAAG,MAAM,GAAG,OA6BtD,CAAC;AAEJ,eAAO,MAAM,cAAc,SAClB,MAAM,aACL,OAAO,cAAc,eAAe,KAAG,MAAM,GAAG,OAiBvD,CAAC;AAEJ,eAAO,MAAM,iBAAiB,SACrB,MAAM,aACL,OAAO,cAAc,eAAe,KAAG,MAAM,GAAG,OAWvD,CAAC;AAEJ,eAAO,MAAM,eAAe,SACnB,MAAM,aACL,OAAO,KAAG,MAAM,GAAG,OAe1B,CAAC;AAEJ,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAmBjF,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { WriteFormState, FormActionValue } from '../../types/form';
|
|
2
|
-
export declare const intialState: WriteFormState;
|
|
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: WriteFormState, action: FormActionValue) => WriteFormState;
|
|
12
|
-
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/write-form/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExE,eAAO,MAAM,WAAW,EAAE,cAGzB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;CAOnB,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,cAAc,UAAU,eAAe,KAAG,cAyDxE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAM1C,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE9F,eAAO,MAAM,iBAAiB,SAAU,MAAM,GAAG,MAAM,WAGtD,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,MAAM;;+DAsH4+0M,eAAe;kCA1Ezh1M,eAAe,iBAAiB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAvB/D,eAEW;;;oBAIE,eAAe;;;;;;;4XAvB3B,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAAa,MAAM,YAIxD,CAAC;AAOF,eAAO,MAAM,yBAAyB,YAAa,MAAM,WAAU,MAAM,YAIxE,CAAC;AAEF,eAAO,MAAM,mBAAmB,YAAa,MAAM,gBAAe,OAAO,aAAoB,OAAO,SA2BnG,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,sBAAuB,aAAa,2BAAoB,MAAM,YAM5F,CAAC;AAEF,eAAO,MAAM,mBAAmB,aAAc,MAAM,UAAU;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,KAAG,MAElG,CAAC;AAEF,eAAO,MAAM,gCAAgC,SACrC,SAAS,SACR,MAAM,cACD,OAAO,cACR,OAAO,eAcnB,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,kBAAkB,KAAG,aA4BxD,CAAC"}
|