@socotra/ec-react-utils 2.2.5-alpha.2 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -5
- package/dist/index.es.js +283 -305
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AccountRequest } from '@socotra/ec-react-schemas';
|
|
2
1
|
import { AccountResponse } from '@socotra/ec-react-schemas';
|
|
3
2
|
import { DataModel } from '@socotra/ec-react-schemas';
|
|
4
3
|
import { DataTypeConfigRecord } from '@socotra/ec-react-schemas';
|
|
@@ -39,7 +38,16 @@ export declare const extractElementFromQuote: (quote: QuoteResponse, elementLoca
|
|
|
39
38
|
tenantLocator?: string | undefined;
|
|
40
39
|
parentLocator?: string | undefined;
|
|
41
40
|
} & {
|
|
42
|
-
elements?:
|
|
41
|
+
elements?: ({
|
|
42
|
+
type: string;
|
|
43
|
+
locator: string;
|
|
44
|
+
staticLocator: string;
|
|
45
|
+
data?: Record<string, any> | undefined;
|
|
46
|
+
coverageTerms?: Record<string, string> | undefined;
|
|
47
|
+
rootLocator?: string | undefined;
|
|
48
|
+
tenantLocator?: string | undefined;
|
|
49
|
+
parentLocator?: string | undefined;
|
|
50
|
+
} & any)[];
|
|
43
51
|
});
|
|
44
52
|
|
|
45
53
|
export declare const extractProductDataModel: ({ dataModel, element: { productName }, }: {
|
|
@@ -54,9 +62,9 @@ export declare const extractProductElements: ({ dataModel, productDataModel, }:
|
|
|
54
62
|
productDataModel: ProductConfig;
|
|
55
63
|
}) => ProductElementMap;
|
|
56
64
|
|
|
57
|
-
export declare const
|
|
65
|
+
export declare const getDefaultElementValues: (element: ElementResponse) => Partial<ElementResponse>;
|
|
58
66
|
|
|
59
|
-
export declare const
|
|
67
|
+
export declare const getDefaultQuoteValues: (quote: QuoteResponse) => {
|
|
60
68
|
default: {
|
|
61
69
|
expirationTime?: string | undefined;
|
|
62
70
|
endTime?: string | undefined;
|
|
@@ -88,7 +96,7 @@ export declare const getQuoteRequest: ({ data }: QuoteFormData) => QuoteRequest;
|
|
|
88
96
|
* @param elementType The element type to parse, e.g. `element.type` from an `ElementResponse`
|
|
89
97
|
* @returns [elementName: string, scope: 'Quote' | 'QuickQuote' | 'Policy' | null]
|
|
90
98
|
*/
|
|
91
|
-
export declare const parseElementTypeAndScopeByElementType: (elementType: string) => [elementName: string, scope:
|
|
99
|
+
export declare const parseElementTypeAndScopeByElementType: (elementType: string) => [elementName: string, scope: "Quote" | "QuickQuote" | "Policy" | null];
|
|
92
100
|
|
|
93
101
|
declare type ProductElement = Record<string, ElementConfig>;
|
|
94
102
|
|