hart-estate-widget 4.4.26 → 4.4.28
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 +11 -7
- package/build/api.js +1 -1
- package/build/createWidget.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -225,13 +225,17 @@ Here you can see a list of accessible options and examples of usage. There are a
|
|
225
225
|
"tabs": ["plan", "rotation", "panorama"],
|
226
226
|
|
227
227
|
// Controls in bottom bar, can be:
|
228
|
-
// "ruler" - Ruler enable/disable button
|
229
|
-
// "scale" - Scale x1, x2, x0.5 button
|
230
|
-
// "autoRotate" - Auto rotate enable/disable button
|
231
|
-
// "minusScale" - Scale minus button
|
232
|
-
// "plusScale" - Scale plus button
|
233
|
-
// "prevPanorama" - Prev panorama button
|
234
|
-
// "nextPanorama" - Next panorama button
|
228
|
+
// "ruler" - Ruler enable/disable button (panorama tab only)
|
229
|
+
// "scale" - Scale x1, x2, x0.5 button (panorama tab only)
|
230
|
+
// "autoRotate" - Auto rotate enable/disable button (panorama tab only)
|
231
|
+
// "minusScale" - Scale minus button (panorama tab only)
|
232
|
+
// "plusScale" - Scale plus button (panorama tab only)
|
233
|
+
// "prevPanorama" - Prev panorama button (panorama tab only)
|
234
|
+
// "nextPanorama" - Next panorama button (panorama tab only)
|
235
|
+
// "2d" - 2D tab button
|
236
|
+
// "3d" - 3D tab button
|
237
|
+
// "360" - 360 tab button
|
238
|
+
// "isometry" - Isometry rotation arrows (rotation tab only)
|
235
239
|
"controls": ["ruler", "scale", "autoRotate"],
|
236
240
|
|
237
241
|
// Enable/disable modal of instruction in 3D tour
|
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.4.
|
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.4.28"}}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)}}const a=e.j;export{a as Api};
|