@configura/debug-react 2.0.0-alpha.20 → 2.0.0-alpha.22
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/.eslintrc.json +1 -14
- package/dist/css/debug.css +1 -1
- package/dist/css/debug.css.map +1 -1
- package/dist/exerciser/ExerciserReportItemView.d.ts +1 -0
- package/dist/exerciser/ExerciserReportItemView.js +2 -2
- package/dist/exerciser/ExerciserRun.js +16 -2
- package/dist/productConfiguration/DebugFeatureCommon.js +1 -0
- package/dist/productConfiguration/DebugMiscFileView.d.ts +4 -0
- package/dist/productConfiguration/DebugMiscFileView.js +10 -0
- package/dist/productConfiguration/DebugNoteView.d.ts +4 -0
- package/dist/productConfiguration/DebugNoteView.js +10 -0
- package/dist/productConfiguration/DebugRowsFactory.js +5 -7
- package/dist/productConfiguration/debugComponentsHelper.js +21 -13
- package/dist/productConfiguration/index.d.ts +2 -0
- package/dist/productConfiguration/index.js +2 -0
- package/package.json +6 -6
package/.eslintrc.json
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"parser": "@typescript-eslint/parser",
|
|
3
3
|
"plugins": ["@typescript-eslint"],
|
|
4
|
-
"extends": [
|
|
5
|
-
"eslint:recommended",
|
|
6
|
-
"plugin:@typescript-eslint/recommended",
|
|
7
|
-
"prettier"
|
|
8
|
-
|
|
9
|
-
// TODO: Type-checking rules require a proper tsconfig-file to work,
|
|
10
|
-
// pointed at by the parserOption.project setting.
|
|
11
|
-
//
|
|
12
|
-
//"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
|
13
|
-
]
|
|
14
|
-
//"rules": { "@typescript-eslint/no-floating-promises": "error" }
|
|
15
|
-
//"parserOptions": {
|
|
16
|
-
// "project": "./tsconfig.json"
|
|
17
|
-
//}
|
|
4
|
+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"]
|
|
18
5
|
}
|
package/dist/css/debug.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--cfgExerciserImageWidth:200px;--cfgExerciserLink:#2667cf}.cfgExerciser{overflow-wrap:anywhere}.cfgExerciserColumn{display:flex;flex-direction:column;flex:1 1 auto}.cfgExerciserRow{display:flex;flex-direction:row;flex-wrap:wrap}.cfgExerciserLink{color:var(--cfgExerciserLink);text-decoration:none;word-break:break-all}.cfgExerciserView{margin:0 1em}.cfgExerciserButton{font-size:1em}.cfgExerciserControl{margin:.5em 0}.cfgExerciserControl__label{display:block;text-transform:capitalize;font-weight:500}.cfgExerciserControl__select--operator{margin-right:.5em}.cfgExerciserControl__selectWrapper{display:flex;flex-direction:row;flex-wrap:wrap}.cfgExerciserControl__select--full{flex:1 0 auto}.cfgExerciserControl__error{color:#dc143c}.cfgCanvasWrapper{width:100%}.cfgExerciserReportItem{border-top:1px solid #000;display:flex;flex-wrap:wrap}.cfgExerciserReportItem .cfgDebugLog{font-size:1em}.cfgExerciserReportItem .cfgDebugLog__item{padding:1px;margin:.5em 0}@media screen and (min-width:62.5em){.cfgExerciserReportItem{flex-wrap:nowrap}}.cfgExerciserReportItem__info{flex:1 1 auto}.cfgExerciserReportItem__image{width:var(--cfgExerciserImageWidth);height:var(--cfgExerciserImageWidth)}.cfgExerciserReportItem__image img{width:100%}.cfgExerciserFilter__logMessage{display:block;padding:1px 0}.cfgExerciserSetup{display:flex;flex-direction:row;flex-wrap:wrap}.cfgExerciserSetup__select{max-width:50rem}.cfgExerciserSetup__preview,.cfgExerciserSetup__select{flex:1 1 auto}.cfgExerciserSetup__select+.cfgExerciserSetup__preview{flex:1 1 50%}.cfgFontSize10{font-size:10px}.cfgDebugLog{font-size:1.5em;margin:1em 0}.cfgDebugLog__list{list-style:none;padding-left:0}.cfgDebugLog__item{padding:1em}.cfgDebugLog__item--severityInfo,.cfgDebugLog__item--severityLog{background-color:#33f;color:#fff}.cfgDebugLog__item--severityWarn{background-color:#fd0}.cfgDebugLog__item--severityError{background-color:#c00;color:#fff}ul.debug-wrapper{-webkit-padding-start:0;padding-inline-start:0;list-style:none}.debug-component__heading{font-weight:700}.debug-component__table{color:#00f;border-top:1px solid #00f;border-left:1px solid #00f;margin-left:1px;padding-left:5px;padding-top:5px;margin-top:10px}.debug-component__table--mark-hidden{color:#88f}.debug-component__table tr td:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.debug-component__group{list-style:none;-webkit-padding-start:10px;padding-inline-start:10px}.cfgTextualConfiguration__input{width:100%;min-height:15em}.cfgTextualConfiguration__error{margin-top:1em;font-size:1.2em}.cfgTextualConfiguration__error .cfgErrorIcon{margin-right:.75em;width:1.25em;height:1em}
|
|
1
|
+
:root{--cfgExerciserImageWidth:200px;--cfgExerciserLink:#2667cf}.cfgExerciser{overflow-wrap:anywhere}.cfgExerciserColumn{display:flex;flex-direction:column;flex:1 1 auto}.cfgExerciserRow{display:flex;flex-direction:row;flex-wrap:wrap}.cfgExerciserLink{color:var(--cfgExerciserLink);text-decoration:none;word-break:break-all}.cfgExerciserView{margin:0 1em}.cfgExerciserButton{font-size:1em}.cfgExerciserControl{margin:.5em 0}.cfgExerciserControl__label{display:block;text-transform:capitalize;font-weight:500}.cfgExerciserControl__select--operator{margin-right:.5em}.cfgExerciserControl__selectWrapper{display:flex;flex-direction:row;flex-wrap:wrap}.cfgExerciserControl__select--full{flex:1 0 auto}.cfgExerciserControl__error{color:#dc143c}.cfgCanvasWrapper{width:100%}.cfgExerciserReportItem{border-top:1px solid #000;display:flex;flex-wrap:wrap}.cfgExerciserReportItem .cfgDebugLog{font-size:1em}.cfgExerciserReportItem .cfgDebugLog__item{padding:1px;margin:.5em 0}@media screen and (min-width:62.5em){.cfgExerciserReportItem{flex-wrap:nowrap}}.cfgExerciserReportItem__info{flex:1 1 auto}.cfgExerciserReportItem__info p{margin-top:4px;margin-bottom:4px}.cfgExerciserReportItem__image{width:var(--cfgExerciserImageWidth);height:var(--cfgExerciserImageWidth)}.cfgExerciserReportItem__image img{width:100%}.cfgExerciserFilter__logMessage{display:block;padding:1px 0}.cfgExerciserSetup{display:flex;flex-direction:row;flex-wrap:wrap}.cfgExerciserSetup__select{max-width:50rem}.cfgExerciserSetup__preview,.cfgExerciserSetup__select{flex:1 1 auto}.cfgExerciserSetup__select+.cfgExerciserSetup__preview{flex:1 1 50%}.cfgFontSize10{font-size:10px}.cfgDebugLog{font-size:1.5em;margin:1em 0}.cfgDebugLog__list{list-style:none;padding-left:0}.cfgDebugLog__item{padding:1em}.cfgDebugLog__item--severityInfo,.cfgDebugLog__item--severityLog{background-color:#33f;color:#fff}.cfgDebugLog__item--severityWarn{background-color:#fd0}.cfgDebugLog__item--severityError{background-color:#c00;color:#fff}ul.debug-wrapper{-webkit-padding-start:0;padding-inline-start:0;list-style:none}.debug-component__heading{font-weight:700}.debug-component__table{color:#00f;border-top:1px solid #00f;border-left:1px solid #00f;margin-left:1px;padding-left:5px;padding-top:5px;margin-top:10px}.debug-component__table--mark-hidden{color:#88f}.debug-component__table tr td:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.debug-component__group{list-style:none;-webkit-padding-start:10px;padding-inline-start:10px}.cfgTextualConfiguration__input{width:100%;min-height:15em}.cfgTextualConfiguration__error{margin-top:1em;font-size:1.2em}.cfgTextualConfiguration__error .cfgErrorIcon{margin-right:.75em;width:1.25em;height:1em}
|
package/dist/css/debug.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/scss/_exerciser.scss","../../src/scss/debug.scss","../../src/scss/debug.scss%23sass"],"names":[],"mappings":"AAAA,MACC,8BAAA,CCCD,0BACA,CDEA,cCCA,sBACA,CDEA,oBCCC,YAAA,CDCA,qBAAA,CACA,aCCD,CDEA,iBACC,YAAA,CACA,kBAAA,CACA,cCCD,CDEA,kBACC,6BAAA,CACA,oBAAA,CACA,oBCCD,CDEA,kBACC,YCCD,CDEA,oBACC,aCCD,CDEA,qBCCA,aACA,CDEA,4BACC,aAAA,CCCA,yBAAA,CDCA,eCCD,CDCA,uCACC,iBCED,CDCA,oCACC,YAAA,CACA,kBAAA,CACA,cCED,CDCA,mCACC,aCED,CDCA,4BACC,aCED,CDCA,kBACC,UCED,CDCA,wBCEC,yBAAA,CACD,YAAA,CDAC,cCED,CDAC,qCACC,aCEF,CDCC,2CACC,WAAA,CCCD,aACD,CDGA,qCACC,wBCAE,gBACD,CACF,CDGA,8BCDC,aACD,CDIA,+BACC,mCAAA,CACA,oCCDD,CDIA,mCACC,UCDD,CDIA,gCACC,aAAA,CACA,aCDD,CDIA,mBACC,YAAA,CACA,kBAAA,CACA,cCDD,CDIA,2BACC,eCDD,CDIA,uDAEC,aCDD,CDIA,uDACC,YCDD,
|
|
1
|
+
{"version":3,"sources":["../../src/scss/_exerciser.scss","../../src/scss/debug.scss","../../src/scss/debug.scss%23sass"],"names":[],"mappings":"AAAA,MACC,8BAAA,CCCD,0BACA,CDEA,cCCA,sBACA,CDEA,oBCCC,YAAA,CDCA,qBAAA,CACA,aCCD,CDEA,iBACC,YAAA,CACA,kBAAA,CACA,cCCD,CDEA,kBACC,6BAAA,CACA,oBAAA,CACA,oBCCD,CDEA,kBACC,YCCD,CDEA,oBACC,aCCD,CDEA,qBCCA,aACA,CDEA,4BACC,aAAA,CCCA,yBAAA,CDCA,eCCD,CDCA,uCACC,iBCED,CDCA,oCACC,YAAA,CACA,kBAAA,CACA,cCED,CDCA,mCACC,aCED,CDCA,4BACC,aCED,CDCA,kBACC,UCED,CDCA,wBCEC,yBAAA,CACD,YAAA,CDAC,cCED,CDAC,qCACC,aCEF,CDCC,2CACC,WAAA,CCCD,aACD,CDGA,qCACC,wBCAE,gBACD,CACF,CDGA,8BCDC,aACD,CDIA,gCACC,cAAA,CACA,iBCDD,CDIA,+BACC,mCAAA,CACA,oCCDD,CDIA,mCACC,UCDD,CDIA,gCACC,aAAA,CACA,aCDD,CDIA,mBACC,YAAA,CACA,kBAAA,CACA,cCDD,CDIA,2BACC,eCDD,CDIA,uDAEC,aCDD,CDIA,uDACC,YCDD,CC3HA,eACC,cD8HD,CC3HA,aACC,eAAA,CACA,YD8HD,CC5HC,mBACC,eAAA,CACA,cD8HF,CC3HC,mBACC,WD6HF,CC3HE,iEAEC,qBAAA,CACA,UD4HH,CC1HE,iCACC,qBD4HH,CC1HE,kCACC,qBAAA,CACA,UD4HH,CCvHA,iBACC,uBAAA,CAAA,sBAAA,CACA,eD0HD,CCtHC,0BACC,eDyHF,CCtHC,wBACC,UAAA,CACA,yBAAA,CACA,0BAAA,CACA,eAAA,CACA,gBAAA,CACA,eAAA,CACA,eDwHF,CCtHE,qCACC,UDwHH,CCpHG,2CACC,kBAAA,CACA,eAAA,CACA,sBDsHJ,CCjHC,wBACC,eAAA,CACA,0BAAA,CAAA,yBDmHF,CC9GC,gCACC,UAAA,CACA,eDiHF,CC9GC,gCACC,cAAA,CACA,eDgHF,CC9GE,8CACC,kBAAA,CACA,YAAA,CACA,UDgHH","file":"debug.css","sourcesContent":[":root {\n\t--cfgExerciserImageWidth: 200px;\n\t--cfgExerciserLink: hsl(217, 69%, 48%);\n}\n\n.cfgExerciser {\n\toverflow-wrap: anywhere;\n}\n\n.cfgExerciserColumn {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n}\n\n.cfgExerciserRow {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n\n.cfgExerciserLink {\n\tcolor: var(--cfgExerciserLink);\n\ttext-decoration: none;\n\tword-break: break-all;\n}\n\n.cfgExerciserView {\n\tmargin: 0 1em;\n}\n\n.cfgExerciserButton {\n\tfont-size: 1em;\n}\n\n.cfgExerciserControl {\n\tmargin: 0.5em 0;\n}\n\n.cfgExerciserControl__label {\n\tdisplay: block;\n\ttext-transform: capitalize;\n\tfont-weight: 500;\n}\n.cfgExerciserControl__select--operator {\n\tmargin-right: 0.5em;\n}\n\n.cfgExerciserControl__selectWrapper {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n\n.cfgExerciserControl__select--full {\n\tflex: 1 0 auto;\n}\n\n.cfgExerciserControl__error {\n\tcolor: crimson;\n}\n\n.cfgCanvasWrapper {\n\twidth: 100%;\n}\n\n.cfgExerciserReportItem {\n\tborder-top: 1px solid black;\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\n\t& .cfgDebugLog {\n\t\tfont-size: 1em;\n\t}\n\n\t& .cfgDebugLog__item {\n\t\tpadding: 1px;\n\t\tmargin: 0.5em 0;\n\t}\n}\n\n@media screen and (min-width: 62.5em) {\n\t.cfgExerciserReportItem {\n\t\tflex-wrap: nowrap;\n\t}\n}\n\n.cfgExerciserReportItem__info {\n\tflex: 1 1 auto;\n}\n\n.cfgExerciserReportItem__info p {\n\tmargin-top: 4px;\n\tmargin-bottom: 4px;\n}\n\n.cfgExerciserReportItem__image {\n\twidth: var(--cfgExerciserImageWidth);\n\theight: var(--cfgExerciserImageWidth);\n}\n\n.cfgExerciserReportItem__image img {\n\twidth: 100%;\n}\n\n.cfgExerciserFilter__logMessage {\n\tdisplay: block;\n\tpadding: 1px 0;\n}\n\n.cfgExerciserSetup {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n\n.cfgExerciserSetup__select {\n\tmax-width: 50rem;\n}\n\n.cfgExerciserSetup__select,\n.cfgExerciserSetup__preview {\n\tflex: 1 1 auto;\n}\n\n.cfgExerciserSetup__select + .cfgExerciserSetup__preview {\n\tflex: 1 1 50%;\n}\n","@import \"exerciser\";\n\n.cfgFontSize10 {\n\tfont-size: 10px;\n}\n\n.cfgDebugLog {\n\tfont-size: 1.5em;\n\tmargin: 1em 0;\n\n\t&__list {\n\t\tlist-style: none;\n\t\tpadding-left: 0;\n\t}\n\n\t&__item {\n\t\tpadding: 1em;\n\n\t\t&--severityLog,\n\t\t&--severityInfo {\n\t\t\tbackground-color: #3333ff;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t&--severityWarn {\n\t\t\tbackground-color: #ffdd00;\n\t\t}\n\t\t&--severityError {\n\t\t\tbackground-color: #cc0000;\n\t\t\tcolor: #fff;\n\t\t}\n\t}\n}\n\nul.debug-wrapper {\n\tpadding-inline-start: 0;\n\tlist-style: none;\n}\n\n.debug-component {\n\t&__heading {\n\t\tfont-weight: 700;\n\t}\n\n\t&__table {\n\t\tcolor: blue;\n\t\tborder-top: 1px blue solid;\n\t\tborder-left: 1px blue solid;\n\t\tmargin-left: 1px;\n\t\tpadding-left: 5px;\n\t\tpadding-top: 5px;\n\t\tmargin-top: 10px;\n\n\t\t&--mark-hidden {\n\t\t\tcolor: #8888ff;\n\t\t}\n\n\t\ttr {\n\t\t\ttd:nth-child(2) {\n\t\t\t\twhite-space: nowrap;\n\t\t\t\toverflow: hidden;\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__group {\n\t\tlist-style: none;\n\t\tpadding-inline-start: 10px;\n\t}\n}\n\n.cfgTextualConfiguration {\n\t&__input {\n\t\twidth: 100%;\n\t\tmin-height: 15em;\n\t}\n\n\t&__error {\n\t\tmargin-top: 1em;\n\t\tfont-size: 1.2em;\n\n\t\t.cfgErrorIcon {\n\t\t\tmargin-right: 0.75em;\n\t\t\twidth: 1.25em;\n\t\t\theight: 1em;\n\t\t}\n\t}\n}\n","@import \"exerciser\";\n\n.cfgFontSize10 {\n\tfont-size: 10px;\n}\n\n.cfgDebugLog {\n\tfont-size: 1.5em;\n\tmargin: 1em 0;\n\n\t&__list {\n\t\tlist-style: none;\n\t\tpadding-left: 0;\n\t}\n\n\t&__item {\n\t\tpadding: 1em;\n\n\t\t&--severityLog,\n\t\t&--severityInfo {\n\t\t\tbackground-color: #3333ff;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t&--severityWarn {\n\t\t\tbackground-color: #ffdd00;\n\t\t}\n\t\t&--severityError {\n\t\t\tbackground-color: #cc0000;\n\t\t\tcolor: #fff;\n\t\t}\n\t}\n}\n\nul.debug-wrapper {\n\tpadding-inline-start: 0;\n\tlist-style: none;\n}\n\n.debug-component {\n\t&__heading {\n\t\tfont-weight: 700;\n\t}\n\n\t&__table {\n\t\tcolor: blue;\n\t\tborder-top: 1px blue solid;\n\t\tborder-left: 1px blue solid;\n\t\tmargin-left: 1px;\n\t\tpadding-left: 5px;\n\t\tpadding-top: 5px;\n\t\tmargin-top: 10px;\n\n\t\t&--mark-hidden {\n\t\t\tcolor: #8888ff;\n\t\t}\n\n\t\ttr {\n\t\t\ttd:nth-child(2) {\n\t\t\t\twhite-space: nowrap;\n\t\t\t\toverflow: hidden;\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__group {\n\t\tlist-style: none;\n\t\tpadding-inline-start: 10px;\n\t}\n}\n\n.cfgTextualConfiguration {\n\t&__input {\n\t\twidth: 100%;\n\t\tmin-height: 15em;\n\t}\n\n\t&__error {\n\t\tmargin-top: 1em;\n\t\tfont-size: 1.2em;\n\n\t\t.cfgErrorIcon {\n\t\t\tmargin-right: 0.75em;\n\t\t\twidth: 1.25em;\n\t\t\theight: 1em;\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Link } from "react-router-dom";
|
|
3
3
|
import { LogMessagesView } from "../LogMessagesView.js";
|
|
4
|
-
export const ExerciserReportItemView = ({ item }) => {
|
|
4
|
+
export const ExerciserReportItemView = ({ item, showImg = true }) => {
|
|
5
5
|
const { duration, productWithConfiguration, logMessages, imageDataUrl, productUrl } = item;
|
|
6
6
|
if (productWithConfiguration === undefined) {
|
|
7
7
|
return null;
|
|
@@ -48,6 +48,6 @@ export const ExerciserReportItemView = ({ item }) => {
|
|
|
48
48
|
duration.toFixed(0),
|
|
49
49
|
" ms")),
|
|
50
50
|
React.createElement(LogMessagesView, { messages: logMessages })),
|
|
51
|
-
imageDataUrl && (React.createElement("div", { className: "cfgExerciserReportItem__image" },
|
|
51
|
+
imageDataUrl && showImg && (React.createElement("div", { className: "cfgExerciserReportItem__image" },
|
|
52
52
|
React.createElement("img", { src: imageDataUrl, alt: "Product preview" })))));
|
|
53
53
|
};
|
|
@@ -11,6 +11,7 @@ import { SingleProductViewPhase, } from "@configura/babylon-view";
|
|
|
11
11
|
import { BabylonView } from "@configura/babylon-view-react";
|
|
12
12
|
import { degToRad, loadImage, LogObservable, toError, } from "@configura/web-utilities";
|
|
13
13
|
import React, { useEffect, useState } from "react";
|
|
14
|
+
import { ExerciserReportItemView } from "./ExerciserReportItemView.js";
|
|
14
15
|
/**
|
|
15
16
|
* This configures the Babylon view, for example the camera configuration and detail levels used.
|
|
16
17
|
*
|
|
@@ -39,6 +40,7 @@ export function ExerciserRunner(props) {
|
|
|
39
40
|
const [productResult, setProductResult] = useState();
|
|
40
41
|
const [product, setProduct] = useState();
|
|
41
42
|
const [snapshotResult, setSnapshotResult] = useState();
|
|
43
|
+
const [currentItem, setCurrentItem] = useState();
|
|
42
44
|
const loadNext = () => {
|
|
43
45
|
setSnapshotResult(undefined);
|
|
44
46
|
setViewStateReachedIdleOrError(undefined);
|
|
@@ -119,13 +121,22 @@ export function ExerciserRunner(props) {
|
|
|
119
121
|
addErrorReportItem(snapshotResult);
|
|
120
122
|
}
|
|
121
123
|
else {
|
|
124
|
+
const randNum = Math.random();
|
|
125
|
+
setCurrentItem({
|
|
126
|
+
duration: performance.now() - startLoading,
|
|
127
|
+
imageDataUrl: snapshotResult.image && snapshotResult.url,
|
|
128
|
+
logMessages: [],
|
|
129
|
+
productWithConfiguration: product,
|
|
130
|
+
productUrl: "",
|
|
131
|
+
randId: randNum,
|
|
132
|
+
});
|
|
122
133
|
addReportItem({
|
|
123
134
|
duration: performance.now() - startLoading,
|
|
124
135
|
imageDataUrl: snapshotResult.image && snapshotResult.url,
|
|
125
136
|
logMessages: LogObservable.allMessages,
|
|
126
137
|
productWithConfiguration: product,
|
|
127
138
|
productUrl: generateExerciserUrl("run", product.product.lang, Object.assign(Object.assign({}, product.product.catId), { partNumber: product.product.partNumber })),
|
|
128
|
-
randId:
|
|
139
|
+
randId: randNum,
|
|
129
140
|
});
|
|
130
141
|
}
|
|
131
142
|
loadNext();
|
|
@@ -136,9 +147,12 @@ export function ExerciserRunner(props) {
|
|
|
136
147
|
product,
|
|
137
148
|
snapshotResult,
|
|
138
149
|
startLoading,
|
|
150
|
+
currentItem,
|
|
139
151
|
]);
|
|
140
152
|
if (!product) {
|
|
141
153
|
return null;
|
|
142
154
|
}
|
|
143
|
-
return (React.createElement(
|
|
155
|
+
return (React.createElement("div", { className: "cfgExerciserColumn" },
|
|
156
|
+
currentItem && React.createElement(ExerciserReportItemView, { item: currentItem, showImg: false }),
|
|
157
|
+
React.createElement(BabylonView, { errorCallback: setProductResult, applicationAreas: product.applicationAreasResponse.applicationAreas, product: product.product, width: 500, height: 500, viewPhaseCallback: setViewPhase, renderEnvironmentCallback: setRenderEnv, configuration: viewConfiguration })));
|
|
144
158
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CfgMiscFileViewProps } from "@configura/web-ui/dist/components/productConfiguration/CfgFeatureView";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare const debugMiscFileComponentViewFactory: (Original: React.ComponentType<CfgMiscFileViewProps>) => React.FC<CfgMiscFileViewProps>;
|
|
4
|
+
//# sourceMappingURL=DebugMiscFileView.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { debugRowsFactory } from "./DebugRowsFactory.js";
|
|
3
|
+
import { DebugTable } from "./DebugTable.js";
|
|
4
|
+
const DebugRowsMiscFile = debugRowsFactory();
|
|
5
|
+
const keys = ["key"];
|
|
6
|
+
export const debugMiscFileComponentViewFactory = (Original) => (props) => (React.createElement("li", null,
|
|
7
|
+
React.createElement(DebugTable, { heading: "MiscFile" },
|
|
8
|
+
React.createElement(DebugRowsMiscFile, { target: props.miscFile, attributes: keys })),
|
|
9
|
+
React.createElement("ul", { className: "debug-wrapper" },
|
|
10
|
+
React.createElement(Original, Object.assign({}, props)))));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CfgNoteViewProps } from "@configura/web-ui/dist/components/productConfiguration/CfgFeatureView";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare const debugNoteComponentViewFactory: (Original: React.ComponentType<CfgNoteViewProps>) => React.FC<CfgNoteViewProps>;
|
|
4
|
+
//# sourceMappingURL=DebugNoteView.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { debugRowsFactory } from "./DebugRowsFactory.js";
|
|
3
|
+
import { DebugTable } from "./DebugTable.js";
|
|
4
|
+
const DebugRowsNote = debugRowsFactory();
|
|
5
|
+
const keys = ["key", "code", "severity"];
|
|
6
|
+
export const debugNoteComponentViewFactory = (Original) => (props) => (React.createElement("li", null,
|
|
7
|
+
React.createElement(DebugTable, { heading: "Note" },
|
|
8
|
+
React.createElement(DebugRowsNote, { target: props.note, attributes: keys })),
|
|
9
|
+
React.createElement("ul", { className: "debug-wrapper" },
|
|
10
|
+
React.createElement(Original, Object.assign({}, props)))));
|
|
@@ -23,11 +23,9 @@ export const DebugRow = (props) => {
|
|
|
23
23
|
React.createElement("td", null,
|
|
24
24
|
React.createElement(Formatted, { value: value }))));
|
|
25
25
|
};
|
|
26
|
-
export const debugRowsFactory = (includeFunc) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.map((attribute) => (React.createElement(DebugRow, { key: attribute.toString(), label: attribute.toString(), value: target[attribute] })))));
|
|
32
|
-
};
|
|
26
|
+
export const debugRowsFactory = (includeFunc) => (props) => {
|
|
27
|
+
const { target, attributes } = props;
|
|
28
|
+
return (React.createElement(React.Fragment, null, attributes
|
|
29
|
+
.filter((attribute) => includeFunc === undefined || includeFunc(target, attribute))
|
|
30
|
+
.map((attribute) => (React.createElement(DebugRow, { key: attribute.toString(), label: attribute.toString(), value: target[attribute] })))));
|
|
33
31
|
};
|
|
@@ -2,21 +2,13 @@ import { useMemo } from "react";
|
|
|
2
2
|
import { getDebugAdditionalProductView } from "./DebugAdditionalProductView.js";
|
|
3
3
|
import { DebugFeatureFlattenView, DebugFeatureGroupView } from "./DebugFeatureGroupView.js";
|
|
4
4
|
import { debugFeatureSelectManyViewFactory, debugFeatureSelectOneViewFactory, } from "./DebugFeatureView.js";
|
|
5
|
+
import { debugMiscFileComponentViewFactory } from "./DebugMiscFileView.js";
|
|
6
|
+
import { debugNoteComponentViewFactory } from "./DebugNoteView.js";
|
|
5
7
|
import { debugOptionSelectManyViewFactory, debugOptionSelectOneViewFactory, } from "./DebugOptionView.js";
|
|
6
|
-
export const augmentWithDebugComponents = (components) => (Object.assign(Object.assign({}, components), { additionalProductComponent: getDebugAdditionalProductView(components.additionalProductComponent), featureFlattenComponent: DebugFeatureFlattenView, featureGroupComponent: DebugFeatureGroupView, featureSelectManyComponent: debugFeatureSelectManyViewFactory(components.featureSelectManyComponent), featureSelectOneComponent: debugFeatureSelectOneViewFactory(components.featureSelectOneComponent), optionSelectManyComponent: debugOptionSelectManyViewFactory(components.optionSelectManyComponent), optionSelectOneComponent: debugOptionSelectOneViewFactory(components.optionSelectOneComponent) }));
|
|
8
|
+
export const augmentWithDebugComponents = (components) => (Object.assign(Object.assign({}, components), { additionalProductComponent: getDebugAdditionalProductView(components.additionalProductComponent), featureFlattenComponent: DebugFeatureFlattenView, featureGroupComponent: DebugFeatureGroupView, featureSelectManyComponent: debugFeatureSelectManyViewFactory(components.featureSelectManyComponent), featureSelectOneComponent: debugFeatureSelectOneViewFactory(components.featureSelectOneComponent), optionSelectManyComponent: debugOptionSelectManyViewFactory(components.optionSelectManyComponent), optionSelectOneComponent: debugOptionSelectOneViewFactory(components.optionSelectOneComponent), noteComponent: debugNoteComponentViewFactory(components.noteComponent), miscFileComponent: debugMiscFileComponentViewFactory(components.miscFileComponent) }));
|
|
7
9
|
export const useDebugComponents = (components) => {
|
|
8
|
-
const { additionalProductComponent, featureFlattenComponent, featureGroupComponent, featureSelectManyComponent, featureSelectOneComponent, optionSelectManyComponent, optionSelectOneComponent, } = components;
|
|
9
|
-
return useMemo(() => {
|
|
10
|
-
return augmentWithDebugComponents({
|
|
11
|
-
additionalProductComponent,
|
|
12
|
-
featureFlattenComponent,
|
|
13
|
-
featureGroupComponent,
|
|
14
|
-
featureSelectManyComponent,
|
|
15
|
-
featureSelectOneComponent,
|
|
16
|
-
optionSelectManyComponent,
|
|
17
|
-
optionSelectOneComponent,
|
|
18
|
-
});
|
|
19
|
-
}, [
|
|
10
|
+
const { additionalProductComponent, featureFlattenComponent, featureGroupComponent, featureSelectManyComponent, featureSelectOneComponent, optionSelectManyComponent, optionSelectOneComponent, noteComponent, notesComponent, miscFileComponent, miscFilesComponent, } = components;
|
|
11
|
+
return useMemo(() => augmentWithDebugComponents({
|
|
20
12
|
additionalProductComponent,
|
|
21
13
|
featureFlattenComponent,
|
|
22
14
|
featureGroupComponent,
|
|
@@ -24,5 +16,21 @@ export const useDebugComponents = (components) => {
|
|
|
24
16
|
featureSelectOneComponent,
|
|
25
17
|
optionSelectManyComponent,
|
|
26
18
|
optionSelectOneComponent,
|
|
19
|
+
noteComponent,
|
|
20
|
+
notesComponent,
|
|
21
|
+
miscFileComponent,
|
|
22
|
+
miscFilesComponent,
|
|
23
|
+
}), [
|
|
24
|
+
additionalProductComponent,
|
|
25
|
+
featureFlattenComponent,
|
|
26
|
+
featureGroupComponent,
|
|
27
|
+
featureSelectManyComponent,
|
|
28
|
+
featureSelectOneComponent,
|
|
29
|
+
optionSelectManyComponent,
|
|
30
|
+
optionSelectOneComponent,
|
|
31
|
+
noteComponent,
|
|
32
|
+
notesComponent,
|
|
33
|
+
miscFileComponent,
|
|
34
|
+
miscFilesComponent,
|
|
27
35
|
]);
|
|
28
36
|
};
|
|
@@ -2,6 +2,8 @@ export * from "./DebugAdditionalProductView.js";
|
|
|
2
2
|
export * from "./debugComponentsHelper.js";
|
|
3
3
|
export * from "./DebugFeatureGroupView.js";
|
|
4
4
|
export * from "./DebugFeatureView.js";
|
|
5
|
+
export * from "./DebugMiscFileView.js";
|
|
6
|
+
export * from "./DebugNoteView.js";
|
|
5
7
|
export * from "./DebugOptionView.js";
|
|
6
8
|
export * from "./DebugProductConfigurationView.js";
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,5 +2,7 @@ export * from "./DebugAdditionalProductView.js";
|
|
|
2
2
|
export * from "./debugComponentsHelper.js";
|
|
3
3
|
export * from "./DebugFeatureGroupView.js";
|
|
4
4
|
export * from "./DebugFeatureView.js";
|
|
5
|
+
export * from "./DebugMiscFileView.js";
|
|
6
|
+
export * from "./DebugNoteView.js";
|
|
5
7
|
export * from "./DebugOptionView.js";
|
|
6
8
|
export * from "./DebugProductConfigurationView.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/debug-react",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.22",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@configura/babylon-view": "2.0.0-alpha.
|
|
23
|
-
"@configura/babylon-view-react": "2.0.0-alpha.
|
|
24
|
-
"@configura/web-ui": "2.0.0-alpha.
|
|
25
|
-
"@configura/web-utilities": "2.0.0-alpha.
|
|
22
|
+
"@configura/babylon-view": "2.0.0-alpha.22",
|
|
23
|
+
"@configura/babylon-view-react": "2.0.0-alpha.22",
|
|
24
|
+
"@configura/web-ui": "2.0.0-alpha.22",
|
|
25
|
+
"@configura/web-utilities": "2.0.0-alpha.22",
|
|
26
26
|
"react": "17.x || ^16.12.0",
|
|
27
27
|
"react-dom": "17.x || ^16.12.0",
|
|
28
28
|
"react-router-dom": "^5.2.0"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "cfa2ea1601ad133a4caa98fcfccc6666b9cd8638"
|
|
48
48
|
}
|