@variantic/player 0.0.14 → 0.0.16

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.
@@ -15,6 +15,10 @@ export type TViewerApi = {
15
15
  * Returns the current price value.
16
16
  */
17
17
  getPrice(): number;
18
+ /**
19
+ * Returns the current price formatted with set rounding settings.
20
+ */
21
+ getRoundedPrice(): number;
18
22
  /**
19
23
  * Returns the current price formatted with the appropriate currency symbol.
20
24
  */
@@ -25,6 +29,10 @@ export type TViewerApi = {
25
29
  * @param value value to replace price with
26
30
  */
27
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;
28
36
  /** @ignore */
29
37
  getScene(): any;
30
38
  /** @ignore */
@@ -52,7 +60,7 @@ export type TViewerApi = {
52
60
  /**
53
61
  * Returns a list of materials matching the given filter ID, optionally grouped by the specified query ID.
54
62
  */
55
- getMaterialsList({ filterId, groupingQueryId, page, perPage, }: TGetMaterialsListParams): Promise<TMaterialsList>;
63
+ getMaterialsList({ filterId, groupingQueryId, page, perPage, searchPhrase, searchProps, }: TGetMaterialsListParams): Promise<TMaterialsList>;
56
64
  getMaterialsList(filterId: number, groupingQueryId?: number, page?: number, perPage?: number): Promise<TMaterialsList>;
57
65
  /**
58
66
  * Returns the current layout settings configuration.
@@ -186,7 +194,11 @@ export type TGetMaterialsListParams = {
186
194
  groupingQueryId?: number;
187
195
  page?: number;
188
196
  perPage?: number;
197
+ searchPhrase?: string;
198
+ searchProps?: TMaterialSearchProp[];
199
+ langCode?: string;
189
200
  };
201
+ export type TMaterialSearchProp = 'name' | 'code';
190
202
  export type TGetConfigurationParams = {
191
203
  /**
192
204
  * Specifies whether to include hidden items
@@ -418,4 +430,14 @@ export type TCategory = {
418
430
  export type TConfiguration = {
419
431
  categories: TCategory[];
420
432
  };
433
+ export type TPricingSection = {
434
+ name: string;
435
+ table: string[][];
436
+ price: number;
437
+ priceColumnIndex: number;
438
+ };
439
+ export type TPricingData = {
440
+ finalPrice: number;
441
+ sections: TPricingSection[];
442
+ };
421
443
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@variantic/player",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"