hart-estate-widget 4.3.0 → 4.3.2

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/README.md CHANGED
@@ -42,18 +42,18 @@ npm install -S -D sass-embedded # Sass style compiler
42
42
  ├── package.json
43
43
  └── package-lock.json
44
44
  ```
45
- - Copy-paste sample assets from below.
46
- - Run with `rm -rf dist && npx vite`
47
- - Open browser at:
45
+ - Copy-paste sample assets from below.
46
+ - Run with `rm -rf dist && npx vite`
47
+ - Open browser at:
48
48
  http://localhost:1234/?id=73b833c3-072a-4ac2-9f5d-7f7ac3d1fc9c
49
49
 
50
- > The query `id` parameter accepts the UUID4 received from [getfloorplan.com](https://getfloorplan.com)
51
- > You can use these UUID4 for test purposes:
52
- > - Scandy style: `228ba1dd-64d3-4d33-bcd7-b4c670bed40e`
53
- > - Boho style: `f9032373-bb2c-416e-b0ab-20b8fd24d482`
54
- > - England style: `b21871a2-2d5b-4beb-817b-ed750eebab9a`
55
- > - Neutral style: `e8553134-0457-488c-8d3e-611b0e2be4d4`
56
- > - Modern style: `73b833c3-072a-4ac2-9f5d-7f7ac3d1fc9c`
50
+ > The query `id` parameter accepts the UUID4 received from [getfloorplan.com](https://getfloorplan.com)
51
+ > You can use these UUID4 for test purposes:
52
+ > - Scandy style: `228ba1dd-64d3-4d33-bcd7-b4c670bed40e`
53
+ > - Boho style: `f9032373-bb2c-416e-b0ab-20b8fd24d482`
54
+ > - England style: `b21871a2-2d5b-4beb-817b-ed750eebab9a`
55
+ > - Neutral style: `e8553134-0457-488c-8d3e-611b0e2be4d4`
56
+ > - Modern style: `73b833c3-072a-4ac2-9f5d-7f7ac3d1fc9c`
57
57
 
58
58
  ## VITE
59
59
  Insert the example into a file `vite.config.ts`
@@ -249,8 +249,17 @@ Here you can see a list of accessible options and examples of usage. There are a
249
249
  // false: always use default RotationTab
250
250
  "isInteractiveTabAvailable": true,
251
251
 
252
- // Camera persective FOV
252
+ // Base camera persective FOV
253
253
  "cameraFov": 75,
254
+ // Custom camera fovs by base FOV Scale
255
+ "cameraFovs": [
256
+ { "text": "1x", "value": 1 },
257
+ { "text": "2x", "value": 0.5 },
258
+ { "text": "4x", "value": 0.25 },
259
+ { "text": "0.5x", "value": 1.35 },
260
+ ],
261
+ // Legacy camera fovs by scale texts (available: 0.5x, 1x, 2x)
262
+ "scales": ["1x", "2x", "0.5x"],
254
263
 
255
264
  // Panorama fade time in seconds
256
265
  "panoramaFadeTime": 0.5,
@@ -281,9 +290,9 @@ export default {
281
290
  plan_id: "<uuid>", // variant service plan uuid
282
291
  json: "<url>", // json url for additional plan data
283
292
  assets_path: "<path>", // plan assets base url
284
- capabilities: { /*...*/ }, // plan capabilities
293
+ capabilities: { /*...*/ }, // plan capabilities
285
294
  rendering_settings: { /*...*/ }, // plan rendering settings
286
-
295
+
287
296
  primary_floor: 0, // primary plan floor index
288
297
  floors: [ // plan floors
289
298
  {
@@ -309,15 +318,15 @@ export default {
309
318
  location: { X: 0, Y: 0, Z: 0 }, // floor location
310
319
  height: 280, // floor height
311
320
 
312
- vertices: [ /*...*/ ], // plan vertices data
313
- rooms: [ /*...*/ ], // plan rooms data
314
- camera_points: [ /*...*/ ], // plan camera points data
321
+ vertices: [ /*...*/ ], // plan vertices data
322
+ rooms: [ /*...*/ ], // plan rooms data
323
+ camera_points: [ /*...*/ ], // plan camera points data
315
324
  walls: [ /*...*/ ], // plan walls data
316
- doors: [ /*...*/ ], // plan doors data
317
- stairs: [ /*...*/ ], // plan stairs data
318
- portals: [ /*...*/ ], // plan portals data
319
- apertures: [ /*...*/ ], // plan apertures data
320
- decors: [ /*...*/ ], // plan decors data
325
+ doors: [ /*...*/ ], // plan doors data
326
+ stairs: [ /*...*/ ], // plan stairs data
327
+ portals: [ /*...*/ ], // plan portals data
328
+ apertures: [ /*...*/ ], // plan apertures data
329
+ decors: [ /*...*/ ], // plan decors data
321
330
 
322
331
  object_pairs: [], // color pairs for furniture data
323
332
  room_pairs: [], // color pairs for room data
@@ -332,12 +341,12 @@ export default {
332
341
  # Versioning
333
342
  For the latest stable version refer to the latest up-to-date version in [Quick Start](#quick-start)
334
343
 
335
- This project is maintained under the [Semantic Versioning guidelines](https://semver.org).
344
+ This project is maintained under the [Semantic Versioning guidelines](https://semver.org).
336
345
 
337
346
  However, some versions are being developed for specific clients. **We do not recommend using them**, as changes in these versions are not documented and may affect your functionality.
338
347
 
339
348
  # Copyright and license
340
- The project code is licensed under the [GPLv3 license](https://www.gnu.org/licenses/gpl-3.0-standalone.html).
349
+ The project code is licensed under the [GPLv3 license](https://www.gnu.org/licenses/gpl-3.0-standalone.html).
341
350
 
342
- Project code and documentation copyright [hart-digital.com](https://hart-digital.com).
343
- All renders of floor plans copyright [getfloorplan.com](https://getfloorplan.com).
351
+ Project code and documentation copyright [hart-digital.com](https://hart-digital.com).
352
+ All renders of floor plans copyright [getfloorplan.com](https://getfloorplan.com).
package/build/api.js CHANGED
@@ -1 +1 @@
1
- var r={d:(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e)},e={};r.d(e,{j:()=>t});class t{baseUrl;constructor(r){this.baseUrl=r}get headers(){return{Accept:"application/json;widget-version=4.3.0"}}loadCrmWidgetData=async r=>{if(!r)return this.makeError(404,"No crmPlanId!");try{const e=await this.fetch(`/api/crm/plans/${r}/v4/widget`);return e.ok?e.json():this.makeErrorFromResponse(e,"Failed to get CRM Plan widget data!")}catch(r){return this.makeError(520,r.message)}};loadWidgetData=async r=>{if(!r)return this.makeError(404,"No planId!");try{const e=await this.fetch(`/api/plans/${r}/v4/widget`);return e.ok?e.json():this.makeErrorFromResponse(e,"Failed to get Plan widget data!")}catch(r){return this.makeError(520,r.message)}};loadJson=async r=>{try{return(await fetch(r)).json()}catch(r){return this.makeError(500,r.message)}};makeError(r,e="Unknown error"){return{error:{status:r,message:e}}}async makeErrorFromResponse(r,e){if("application/json"===r.headers.get("Content-Type")){const e=await r.json();if("message"in e&&"string"==typeof e.message)return this.makeError(r.status,e.message)}return this.makeError(r.status,e)}fetch(r,e={headers:this.headers}){return fetch(`${this.baseUrl}${r}`,e)}}var a=e.j;export{a as Api};
1
+ var r={d:(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e)},e={};r.d(e,{j:()=>t});class t{baseUrl;constructor(r){this.baseUrl=r}get headers(){return{Accept:"application/json;widget-version=4.3.2"}}loadCrmWidgetData=async r=>{if(!r)return this.makeError(404,"No crmPlanId!");try{const e=await this.fetch(`/api/crm/plans/${r}/v4/widget`);return e.ok?e.json():this.makeErrorFromResponse(e,"Failed to get CRM Plan widget data!")}catch(r){return this.makeError(520,r.message)}};loadWidgetData=async r=>{if(!r)return this.makeError(404,"No planId!");try{const e=await this.fetch(`/api/plans/${r}/v4/widget`);return e.ok?e.json():this.makeErrorFromResponse(e,"Failed to get Plan widget data!")}catch(r){return this.makeError(520,r.message)}};loadJson=async r=>{try{return(await fetch(r)).json()}catch(r){return this.makeError(500,r.message)}};makeError(r,e="Unknown error"){return{error:{status:r,message:e}}}async makeErrorFromResponse(r,e){if("application/json"===r.headers.get("Content-Type")){const e=await r.json();if("message"in e&&"string"==typeof e.message)return this.makeError(r.status,e.message)}return this.makeError(r.status,e)}fetch(r,e={headers:this.headers}){return fetch(`${this.baseUrl}${r}`,e)}}var a=e.j;export{a as Api};