@socotra/ec-react-utils 2.18.1 → 2.19.0-next.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/dist/index.d.ts +12 -0
- package/dist/index.es.js +786 -770
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -134,6 +134,18 @@ declare interface ElementFormData {
|
|
|
134
134
|
*/
|
|
135
135
|
export declare const extractElementByLocator: <T extends ElementResponse>(response: QuoteResponse | SegmentResponse | ElementResponse, elementLocator: string) => T | null;
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* The function `extractElementFromElement takes a `QuoteResponse`, `SegmentResponse` or `ElementResponse` object and an element type string,
|
|
139
|
+
* and returns the element with the matching type from the quote or its nested elements.
|
|
140
|
+
* @param {QuoteResponse} quote - The `quote` parameter is of type `QuoteResponse`, which is an object
|
|
141
|
+
* containing information about a quote.
|
|
142
|
+
* @param {string} elementType - The `elementType` parameter is a string that represents the
|
|
143
|
+
* type of the element you want to extract from the `quote` object.
|
|
144
|
+
* @returns The function `extractElementByType` returns the element from the response object
|
|
145
|
+
* that matches the provided `elementType`.
|
|
146
|
+
*/
|
|
147
|
+
export declare const extractElementByType: <T extends ElementResponse>(response: QuoteResponse | SegmentResponse | ElementResponse, elementType: string) => T | null;
|
|
148
|
+
|
|
137
149
|
/**
|
|
138
150
|
* The function `extractElementDataModelFromQuote` extracts element data model based on a given quote, data
|
|
139
151
|
* model, and element locator.
|