@variantic/player 0.0.15 → 0.0.17
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.
|
@@ -29,6 +29,10 @@ export type TViewerApi = {
|
|
|
29
29
|
* @param value value to replace price with
|
|
30
30
|
*/
|
|
31
31
|
setPrice(value: number | string): void;
|
|
32
|
+
/**
|
|
33
|
+
* If enabled, returns price components calculated based on the selected pricing rule. Otherwise, returns null.
|
|
34
|
+
*/
|
|
35
|
+
getPricing(): TPricingData | null;
|
|
32
36
|
/** @ignore */
|
|
33
37
|
getScene(): any;
|
|
34
38
|
/** @ignore */
|
|
@@ -56,7 +60,7 @@ export type TViewerApi = {
|
|
|
56
60
|
/**
|
|
57
61
|
* Returns a list of materials matching the given filter ID, optionally grouped by the specified query ID.
|
|
58
62
|
*/
|
|
59
|
-
getMaterialsList({ filterId, groupingQueryId, page, perPage, }: TGetMaterialsListParams): Promise<TMaterialsList>;
|
|
63
|
+
getMaterialsList({ filterId, groupingQueryId, page, perPage, searchPhrase, searchProps, }: TGetMaterialsListParams): Promise<TMaterialsList>;
|
|
60
64
|
getMaterialsList(filterId: number, groupingQueryId?: number, page?: number, perPage?: number): Promise<TMaterialsList>;
|
|
61
65
|
/**
|
|
62
66
|
* Returns the current layout settings configuration.
|
|
@@ -154,6 +158,10 @@ export type TViewerApi = {
|
|
|
154
158
|
* Toggles dimension visibility based on the state and optional dimension IDs or presets.
|
|
155
159
|
*/
|
|
156
160
|
toggleDimensions(state: boolean, dimensions?: number[] | 'default' | 'defaultNotControlledByEvent'): void;
|
|
161
|
+
/**
|
|
162
|
+
* Loads preset with given ID and reloads the viewer
|
|
163
|
+
*/
|
|
164
|
+
loadPreset(id: string | TPreset): Promise<void>;
|
|
157
165
|
};
|
|
158
166
|
export type TViewerApiEvents = TWebComponentEvents<{
|
|
159
167
|
loaded: TTimestampEventPayload;
|
|
@@ -190,7 +198,11 @@ export type TGetMaterialsListParams = {
|
|
|
190
198
|
groupingQueryId?: number;
|
|
191
199
|
page?: number;
|
|
192
200
|
perPage?: number;
|
|
201
|
+
searchPhrase?: string;
|
|
202
|
+
searchProps?: TMaterialSearchProp[];
|
|
203
|
+
langCode?: string;
|
|
193
204
|
};
|
|
205
|
+
export type TMaterialSearchProp = 'name' | 'code';
|
|
194
206
|
export type TGetConfigurationParams = {
|
|
195
207
|
/**
|
|
196
208
|
* Specifies whether to include hidden items
|
|
@@ -422,4 +434,19 @@ export type TCategory = {
|
|
|
422
434
|
export type TConfiguration = {
|
|
423
435
|
categories: TCategory[];
|
|
424
436
|
};
|
|
437
|
+
export type TPricingSection = {
|
|
438
|
+
name: string;
|
|
439
|
+
table: string[][];
|
|
440
|
+
price: number;
|
|
441
|
+
priceColumnIndex: number;
|
|
442
|
+
};
|
|
443
|
+
export type TPricingData = {
|
|
444
|
+
finalPrice: number;
|
|
445
|
+
sections: TPricingSection[];
|
|
446
|
+
};
|
|
447
|
+
export type TPreset = {
|
|
448
|
+
id: string;
|
|
449
|
+
name: string;
|
|
450
|
+
configuration: any;
|
|
451
|
+
};
|
|
425
452
|
export {};
|