@crystaldesign/diva-web-planner-react 26.12.0-beta.27 → 26.12.0-beta.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/build/umd/7909.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9054.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
- package/build/umd/1219.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/1219.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-web-planner-react",
|
|
3
|
-
"version": "26.12.0-beta.
|
|
3
|
+
"version": "26.12.0-beta.28",
|
|
4
4
|
"description": "React layer for the web planner: view and UI handlers plus planner widgets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"react-dom": "18.3.1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@crystaldesign/content-item": "26.12.0-beta.
|
|
18
|
-
"@crystaldesign/planner-2d-core": "26.12.0-beta.
|
|
19
|
-
"@crystaldesign/product-detail-page": "26.12.0-beta.
|
|
20
|
-
"@crystaldesign/products-component": "26.12.0-beta.
|
|
21
|
-
"@crystaldesign/real-time-viewer": "26.12.0-beta.
|
|
22
|
-
"@crystaldesign/real-time-viewer-next": "26.12.0-beta.
|
|
23
|
-
"@crystaldesign/web-planner-logic": "26.12.0-beta.
|
|
24
|
-
"@crystaldesign/widget-contact-form": "26.12.0-beta.
|
|
17
|
+
"@crystaldesign/content-item": "26.12.0-beta.28",
|
|
18
|
+
"@crystaldesign/planner-2d-core": "26.12.0-beta.28",
|
|
19
|
+
"@crystaldesign/product-detail-page": "26.12.0-beta.28",
|
|
20
|
+
"@crystaldesign/products-component": "26.12.0-beta.28",
|
|
21
|
+
"@crystaldesign/real-time-viewer": "26.12.0-beta.28",
|
|
22
|
+
"@crystaldesign/real-time-viewer-next": "26.12.0-beta.28",
|
|
23
|
+
"@crystaldesign/web-planner-logic": "26.12.0-beta.28",
|
|
24
|
+
"@crystaldesign/widget-contact-form": "26.12.0-beta.28",
|
|
25
25
|
"@google/model-viewer": "3.5.0",
|
|
26
26
|
"@react-google-maps/api": "2.20.8",
|
|
27
27
|
"@types/three": "0.176.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"types": "./build/types/web-planner-react/src/index.d.ts"
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "66dd30b08ce1292fb2f5047f139db2941c4b61c1"
|
|
71
71
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 1219.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1219],{65411:(t,r,i)=>{i.d(r,{Z:()=>c});var o=i(13125),a=i(43860),l=i(89429),u=i(49736);function _superPropBase(t,r){for(;!{}.hasOwnProperty.call(t,r)&&null!==(t=(0,u.Z)(t)););return t}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,r,i){var o=_superPropBase(t,r);if(o){var a=Object.getOwnPropertyDescriptor(o,r);return a.get?a.get.call(arguments.length<3?t:i):a.value}},_get.apply(null,arguments)}var g=i(91870);function _callSuper(t,r,i){return r=(0,u.Z)(r),(0,l.Z)(t,_isNativeReflectConstruct()?Reflect.construct(r,i||[],(0,u.Z)(t).constructor):r.apply(t,i))}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}const c=new(function(t){function DockingPointHandler(){return(0,o.Z)(this,DockingPointHandler),_callSuper(this,DockingPointHandler,arguments)}return(0,g.Z)(DockingPointHandler,t),(0,a.Z)(DockingPointHandler,[{key:"initDockingPointsFromSvg",value:function initDockingPointsFromSvg(t,r,i,o){var a="minX"in i?i:{minX:i.svgMinXVal,minY:i.svgMinYVal};!function _superPropGet(t,r,i,o){var a=_get((0,u.Z)(1&o?t.prototype:t),r,i);return 2&o&&"function"==typeof a?function(t){return a.apply(i,t)}:a}(DockingPointHandler,"initDockingPointsFromSvg",this,3)([t,r,a,o])}}])}(i(60415).pD))},41219:(t,r,i)=>{i.d(r,{Z:()=>L});var o=i(84658),a=i(13125),l=i(43860),u=i(80248),g=i(50747),c=i.n(g),h=i(34988),v=i(12952),d=i(69369),p=i(60415),m=i(64357);function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,g=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return u=t.done,t},e:function e(t){g=!0,l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(g)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=Array(r);i<r;i++)o[i]=t[i];return o}var y=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),P=function(){return(0,l.Z)((function SVGUtils(){(0,a.Z)(this,SVGUtils)}),[{key:"removeOLFFromSvg",value:function removeOLFFromSvg(t){var r=(0,p.ON)(t),i=r.evaluate("//*[starts-with(@id,'VIF')]",r,null,7,null);if(i.snapshotLength>0)for(var o=0;o<i.snapshotLength;o++){var a;null===(a=i.snapshotItem(o).parentElement)||void 0===a||a.removeChild(i.snapshotItem(o))}var l=r.evaluate("//*[starts-with(@id,'OLF')]",r,null,7,null);if(l.snapshotLength>0)for(o=0;o<l.snapshotLength;o++){var u;null===(u=l.snapshotItem(o).parentElement)||void 0===u||u.removeChild(l.snapshotItem(o))}return(0,p.cx)(r)}},{key:"getDPsInSVG",value:function getDPsInSVG(t){var r=[],i=(0,p.ON)(t),o=i.evaluate("//*[starts-with(@id,'AV')]",i,null,7,null);if(o.snapshotLength>0)for(var a=0;a<o.snapshotLength;a++){var l=o.snapshotItem(a);if("line"!==(null==l?void 0:l.nodeName))throw new Error("nodename type: "+l.nodeName+" not implemented");r.push({x1:Number(l.getAttribute("x1")),y1:Number(l.getAttribute("y1")),x2:Number(l.getAttribute("x2")),y2:Number(l.getAttribute("y2")),dockingName:l.getAttribute("id"),dockingType:l.getAttribute("id").substring(0,3)})}return r.sort((function(t,r){return"AVL"===t.dockingType||"AVR"===t.dockingType&&["AVR","AVC","AVU","AVO","AVS","AVN"].includes(r.dockingType)?-1:0})),r}},{key:"getPointOfPoligonById",value:function getPointOfPoligonById(t,r){var i=[],o=(0,p.ON)(t),a=o.evaluate("//*[starts-with(@id,'"+r+"')]",o,null,7,null);if(!(a.snapshotLength>1||0==a.snapshotLength)){for(var l=0;l<a.snapshotLength;l++){var u=a.snapshotItem(l);if("polygon"===(null==u?void 0:u.nodeName)){var g=u.getAttribute("points");if(!g)return;for(var c=g.split(" "),h=0;h<c.length;h++){var v=c[h].split(",");2===v.length&&i.push(new m.FM(Number(v[0]),Number(v[1])))}}}return i}}},{key:"getBoundingBoxOfPoints",value:function getBoundingBoxOfPoints(t){var r=t.map((function(t){return t.x})),i=t.map((function(t){return t.y})),o=Math.min.apply(Math,(0,v.Z)(r)),a=Math.max.apply(Math,(0,v.Z)(r)),l=Math.min.apply(Math,(0,v.Z)(i));return{width:a-o,height:Math.max.apply(Math,(0,v.Z)(i))-l,minX:o,minY:l}}},{key:"getOLFGeometryFromSvg",value:function getOLFGeometryFromSvg(t){for(var r=(0,p.ON)(t),i=r.evaluate("//*[starts-with(@id,'OLF')]",r,null,7,null),o=0;o<i.snapshotLength;o++){var a,l,u,g,c=i.snapshotItem(o);if("rect"===(null==c?void 0:c.nodeName))return{minX:parseFloat(null!==(a=c.getAttribute("x"))&&void 0!==a?a:"0"),minY:parseFloat(null!==(l=c.getAttribute("y"))&&void 0!==l?l:"0"),width:parseFloat(null!==(u=c.getAttribute("width"))&&void 0!==u?u:"0"),height:parseFloat(null!==(g=c.getAttribute("height"))&&void 0!==g?g:"0")};if("polygon"===(null==c?void 0:c.nodeName)){var v=c.getAttribute("points");if(v){var d=v.split(/\s+/).reduce((function(t,r){var i=r.split(","),o=(0,h.Z)(i,2),a=o[0],l=o[1];return null!=a&&null!=l&&t.push(new m.FM(Number(a),Number(l))),t}),[]);if(d.length){var y=this.getBoundingBoxOfPoints(d);return{minX:y.minX,minY:y.minY,width:y.width,height:y.height}}}}}}},{key:"getOLTGeometryFromSvg",value:function getOLTGeometryFromSvg(t){for(var r=(0,p.ON)(t),i=r.evaluate("//*[starts-with(@id,'OLT')]",r,null,7,null),o=0;o<i.snapshotLength;o++){var a,l,u,g,c=i.snapshotItem(o);if("rect"===(null==c?void 0:c.nodeName))return{x:parseFloat(null!==(a=c.getAttribute("x"))&&void 0!==a?a:"0"),y:parseFloat(null!==(l=c.getAttribute("y"))&&void 0!==l?l:"0"),width:parseFloat(null!==(u=c.getAttribute("width"))&&void 0!==u?u:"0"),height:parseFloat(null!==(g=c.getAttribute("height"))&&void 0!==g?g:"0")};if("polygon"===(null==c?void 0:c.nodeName)){var v=c.getAttribute("points");if(v){var d=v.split(/\s+/).reduce((function(t,r){var i=r.split(","),o=(0,h.Z)(i,2),a=o[0],l=o[1];return null!=a&&null!=l&&t.push(new m.FM(Number(a),Number(l))),t}),[]);if(d.length){var y=this.getBoundingBoxOfPoints(d);return{x:y.minX,y:y.minY,width:y.width,height:y.height}}}}}}},{key:"removeMaskFromSvg",value:function removeMaskFromSvg(t){return(0,p.Uo)(t)}},{key:"ccCheckStretchAreas",value:function ccCheckStretchAreas(t,r,i,o,a,l,u,g){var c,h=(0,p.ZC)(t,r,i,{useGlobalScale:o,minBorderX:a,minBorderY:l}),v=_createForOfIteratorHelper(h.warnings);try{for(v.s();!(c=v.n()).done;){var d=c.value;y.warn("[SVGUtils] ccCheckStretchAreas: "+d+(g?" (svg: "+g+")":""))}}catch(t){v.e(t)}finally{v.f()}return u(h.svg),h.sizes}}])}(),O=i(65411),S=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC");const L=new(function(){return(0,l.Z)((function PlannerHandler2D(){(0,a.Z)(this,PlannerHandler2D),(0,u.Z)(this,"svgUtils",void 0),this.svgUtils=new P}),[{key:"checkCollision",value:function checkCollision(t,r,i){if(d.ZP.startSpanOfApm("PlannerHandler2D checkCollision"),!(t.Layer==r.Layer||i.includes(Number(t.Layer))&&i.includes(Number(r.Layer))))return d.ZP.endSpanOfApm("PlannerHandler2D checkCollision"),!1;var o=t.getWorld2DBBoxOutline(),a=r.getWorld2DBBoxOutline();if((0,p.JU)(o,a)){if(!t.HasOLTPolygon&&!t.HasOLFPolygon)return S.error(new d.GE("checkCollision PlannerHandler2D - The element with id: "+t.getElementId()+" has no OLT AND no OLF",{code:"WC_0012"})),d.ZP.endSpanOfApm("PlannerHandler2D checkCollision"),!1;if(!r.HasOLTPolygon&&!r.HasOLFPolygon)return S.error(new d.GE("checkCollision PlannerHandler2D - The element with id: "+r.getElementId()+" has no OLT AND no OLF",{code:"WC_0012"})),d.ZP.endSpanOfApm("PlannerHandler2D checkCollision"),!1;var l=t.HasOLFPolygon?t.getOLFPolygonWorldPos():t.getOLTPolygonWorldPos(),u=r.HasOLFPolygon?r.getOLFPolygonWorldPos():r.getOLTPolygonWorldPos();return d.ZP.endSpanOfApm("PlannerHandler2D checkCollision"),(0,p.JU)(l,u)}return d.ZP.endSpanOfApm("PlannerHandler2D checkCollision"),(0,p.uA)(o,a)}},{key:"parseSvg",value:function parseSvg(t,r,i,o,a){var l,u;r=this.svgUtils.removeMaskFromSvg(r),O.Z.initDockingPointsFromSvg(t,this.svgUtils.getDPsInSVG(r),i,o);var g=this.svgUtils.getPointOfPoligonById(r,"OLT");null!=g&&g.length||S.warn("no olt fount in svg for element"+t.ArticleCodex+" with id "+t.getElementId()),t.OLTPolygon=g;var c=this.svgUtils.getPointOfPoligonById(r,"OLF"),h=(0,p.Qq)(r);if(null!=c&&c.length){var v,y,P=this.svgUtils.getBoundingBoxOfPoints(c),L=null!==(v=null==h?void 0:h.width)&&void 0!==v?v:P.width,k=null!==(y=null==h?void 0:h.height)&&void 0!==y?y:P.height;t.setupOLF(c,L,k)}else if(h){var w=[new m.FM(h.minX,h.minY),new m.FM(h.minX+h.width,h.minY),new m.FM(h.minX+h.width,h.minY+h.height),new m.FM(h.minX,h.minY+h.height)];t.setupOLF(w,h.width,h.height)}else null!=a&&a.heightOLF,null!=a&&a.widthOLF?t.setupOLF(c,null==a?void 0:a.widthOLF,null==a?void 0:a.heightOLF):t.clearOLF();var b=(0,p.hd)(r);if(t.OLTWidth=null!==(l=null==b?void 0:b.width)&&void 0!==l?l:0,t.OLTDepth=null!==(u=null==b?void 0:b.height)&&void 0!==u?u:0,t.OLTLeft=b&&h?b.x-h.minX:0,t.OLTTop=b&&h?b.y-h.minY:0,t.DoSetWidthFromSVG||t.DoSetDepthFromSVG){var A=(0,p.O3)(r);t.DoSetWidthFromSVG&&null!=A&&A.width&&(t.WidthFromSVG=A.width/d.ZP.UnitRecalc),t.DoSetDepthFromSVG&&null!=A&&A.height&&(t.DepthFromSVG=A.height/d.ZP.UnitRecalc)}t.SvgData=r,t.cleanShapeOLF2D(),t.cleanShapeOLT2D()}},{key:"getMinBorderSVG",value:function getMinBorderSVG(t){var r=(0,p.dI)(t);return{svgMinXVal:r.minX,svgMinYVal:r.minY}}},{key:"loadSVG",value:(t=(0,o.Z)(c().mark((function _callee(t,r){var i,o,a,l,u,g,h,v,p,m,y=this;return c().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:if(i=t.SvgFileName){c.next=3;break}return c.abrupt("return",!1);case 3:if(!r.CatalogData.isIDMFormat){c.next=9;break}return c.next=6,r.api.fetchData(i,{method:"GET",config:{},data:{}});case 6:o=c.sent,c.next=16;break;case 9:return c.next=11,r.api.getDataCache(this.getSVGUrl(i,r.CatalogData.mediaUrl),void 0,r.CatalogData.accountSessionGuid);case 11:if(!(l=c.sent).Error){c.next=14;break}throw new Error(l.Error);case 14:"success"==l.Result.toLowerCase()&&(a=l.Content),o=d.ZP.decodeBase64(a);case 16:if(o||S.error(new d.GE("Fehler beim laden des SVGs ",{code:"WC_0009",custom:{svgFile:i}})),t.svgBefore=o,u=t.Width,-1===(g=t.Depth)&&-1!==t.Height&&(g=t.Height),!(null!=u&&u>0&&null!=g&&g>0)){c.next=31;break}return v=this.getMinBorderSVG(o),p=r.CatalogData.isIDMFormat?i:"".concat(r.CatalogData.mediaUrl,"pln_").concat(i),m="",c.next=27,new Promise((function(t,i){h=y.svgUtils.ccCheckStretchAreas(o,u,g,r.CatalogData.useGlobalSVGScale,v.svgMinXVal,v.svgMinYVal,(function(r){m=r,t()}),p)}));case 27:t.svgAfter=m,this.parseSvg(t,m,v,r.CatalogData.getPlannerConfig(),h),c.next=33;break;case 31:t.svgAfter=o,this.parseSvg(t,o,{svgMinXVal:0,svgMinYVal:0},r.CatalogData.getPlannerConfig());case 33:return c.abrupt("return",!0);case 34:case"end":return c.stop()}}),_callee,this)}))),function loadSVG(r,i){return t.apply(this,arguments)})},{key:"getSVGUrl",value:function getSVGUrl(t,r){var i=r+"pln_"+t,o=i.indexOf("/files/");return i=i.substring(o),"function=GetFileAsString&fileUrl="+encodeURIComponent(i)}}]);var t}())}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:1219 */
|