@configura/debug-react 2.2.0-alpha.1 → 2.2.0-alpha.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/.eslintrc.json +5 -5
- package/.postcssrc.json +8 -8
- package/LICENSE +201 -201
- package/dist/LogMessageView.d.ts +5 -5
- package/dist/LogMessageView.js +8 -8
- package/dist/LogMessagesView.d.ts +5 -5
- package/dist/LogMessagesView.js +10 -10
- package/dist/TextualConfigurationView.d.ts +7 -7
- package/dist/TextualConfigurationView.js +58 -58
- package/dist/css/debug.css +1 -1
- package/dist/css/debug.css.map +1 -1
- package/dist/exerciser/Exerciser.d.ts +37 -37
- package/dist/exerciser/Exerciser.js +155 -155
- package/dist/exerciser/ExerciserReportFilterView.d.ts +9 -9
- package/dist/exerciser/ExerciserReportFilterView.js +205 -205
- package/dist/exerciser/ExerciserReportItem.d.ts +10 -10
- package/dist/exerciser/ExerciserReportItem.js +1 -1
- package/dist/exerciser/ExerciserReportItemView.d.ts +6 -6
- package/dist/exerciser/ExerciserReportItemView.js +53 -53
- package/dist/exerciser/ExerciserReportView.d.ts +7 -7
- package/dist/exerciser/ExerciserReportView.js +8 -8
- package/dist/exerciser/ExerciserRun.d.ts +19 -19
- package/dist/exerciser/ExerciserRun.js +158 -158
- package/dist/exerciser/ExerciserSetup.d.ts +15 -15
- package/dist/exerciser/ExerciserSetup.js +54 -54
- package/dist/exerciser/FilterSelect.d.ts +8 -8
- package/dist/exerciser/FilterSelect.js +40 -40
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +7 -7
- package/dist/index.d.ts +12 -12
- package/dist/index.js +12 -12
- package/dist/productConfiguration/DebugAdditionalProductView.d.ts +3 -3
- package/dist/productConfiguration/DebugAdditionalProductView.js +6 -6
- package/dist/productConfiguration/DebugFeatureCommon.d.ts +10 -10
- package/dist/productConfiguration/DebugFeatureCommon.js +35 -35
- package/dist/productConfiguration/DebugFeatureGroupView.d.ts +4 -4
- package/dist/productConfiguration/DebugFeatureGroupView.js +20 -20
- package/dist/productConfiguration/DebugFeatureView.d.ts +4 -4
- package/dist/productConfiguration/DebugFeatureView.js +8 -8
- package/dist/productConfiguration/DebugMiscFileView.d.ts +3 -3
- package/dist/productConfiguration/DebugMiscFileView.js +10 -10
- package/dist/productConfiguration/DebugNoteView.d.ts +3 -3
- package/dist/productConfiguration/DebugNoteView.js +10 -10
- package/dist/productConfiguration/DebugOptionCommon.d.ts +10 -10
- package/dist/productConfiguration/DebugOptionCommon.js +30 -30
- package/dist/productConfiguration/DebugOptionView.d.ts +4 -4
- package/dist/productConfiguration/DebugOptionView.js +8 -8
- package/dist/productConfiguration/DebugProductCommon.d.ts +9 -9
- package/dist/productConfiguration/DebugProductCommon.js +40 -40
- package/dist/productConfiguration/DebugProductConfigurationView.d.ts +16 -16
- package/dist/productConfiguration/DebugProductConfigurationView.js +26 -26
- package/dist/productConfiguration/DebugRowsFactory.d.ts +9 -9
- package/dist/productConfiguration/DebugRowsFactory.js +31 -31
- package/dist/productConfiguration/DebugTable.d.ts +8 -8
- package/dist/productConfiguration/DebugTable.js +8 -8
- package/dist/productConfiguration/debugComponentsHelper.d.ts +3 -3
- package/dist/productConfiguration/debugComponentsHelper.js +36 -36
- package/dist/productConfiguration/index.d.ts +8 -8
- package/dist/productConfiguration/index.js +8 -8
- package/package.json +6 -6
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
const trueFalseToText = (b) => b === undefined ? "-" : b ? "Yes" : "No";
|
|
3
|
-
const Formatted = (props) => {
|
|
4
|
-
const { value } = props;
|
|
5
|
-
switch (typeof value) {
|
|
6
|
-
case "undefined":
|
|
7
|
-
return React.createElement(React.Fragment, null, "-");
|
|
8
|
-
case "boolean":
|
|
9
|
-
return React.createElement(React.Fragment, null, trueFalseToText(value));
|
|
10
|
-
default: {
|
|
11
|
-
const asString = `${value}`;
|
|
12
|
-
if (asString.indexOf("http") === 0) {
|
|
13
|
-
return React.createElement("a", { href: asString }, asString);
|
|
14
|
-
}
|
|
15
|
-
return React.createElement(React.Fragment, null, asString);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export const DebugRow = (props) => {
|
|
20
|
-
const { label, value } = props;
|
|
21
|
-
return (React.createElement("tr", null,
|
|
22
|
-
React.createElement("td", null, label),
|
|
23
|
-
React.createElement("td", null,
|
|
24
|
-
React.createElement(Formatted, { value: value }))));
|
|
25
|
-
};
|
|
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] })))));
|
|
31
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
const trueFalseToText = (b) => b === undefined ? "-" : b ? "Yes" : "No";
|
|
3
|
+
const Formatted = (props) => {
|
|
4
|
+
const { value } = props;
|
|
5
|
+
switch (typeof value) {
|
|
6
|
+
case "undefined":
|
|
7
|
+
return React.createElement(React.Fragment, null, "-");
|
|
8
|
+
case "boolean":
|
|
9
|
+
return React.createElement(React.Fragment, null, trueFalseToText(value));
|
|
10
|
+
default: {
|
|
11
|
+
const asString = `${value}`;
|
|
12
|
+
if (asString.indexOf("http") === 0) {
|
|
13
|
+
return React.createElement("a", { href: asString }, asString);
|
|
14
|
+
}
|
|
15
|
+
return React.createElement(React.Fragment, null, asString);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const DebugRow = (props) => {
|
|
20
|
+
const { label, value } = props;
|
|
21
|
+
return (React.createElement("tr", null,
|
|
22
|
+
React.createElement("td", null, label),
|
|
23
|
+
React.createElement("td", null,
|
|
24
|
+
React.createElement(Formatted, { value: value }))));
|
|
25
|
+
};
|
|
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] })))));
|
|
31
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare type Props = {
|
|
3
|
-
heading: string;
|
|
4
|
-
tooltip?: string;
|
|
5
|
-
markAsHidden?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare const DebugTable: React.FC<Props>;
|
|
8
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type Props = {
|
|
3
|
+
heading: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
markAsHidden?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const DebugTable: React.FC<Props>;
|
|
8
|
+
export {};
|
|
9
9
|
//# sourceMappingURL=DebugTable.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const DebugTable = (props) => {
|
|
3
|
-
const { heading, tooltip, children, markAsHidden } = props;
|
|
4
|
-
return (React.createElement("div", { className: `debug-component__table ${markAsHidden ? "debug-component__table--mark-hidden" : ""}` },
|
|
5
|
-
React.createElement("div", { className: "debug-component__heading", title: tooltip }, heading),
|
|
6
|
-
React.createElement("table", null,
|
|
7
|
-
React.createElement("tbody", null, children))));
|
|
8
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
export const DebugTable = (props) => {
|
|
3
|
+
const { heading, tooltip, children, markAsHidden } = props;
|
|
4
|
+
return (React.createElement("div", { className: `debug-component__table ${markAsHidden ? "debug-component__table--mark-hidden" : ""}` },
|
|
5
|
+
React.createElement("div", { className: "debug-component__heading", title: tooltip }, heading),
|
|
6
|
+
React.createElement("table", null,
|
|
7
|
+
React.createElement("tbody", null, children))));
|
|
8
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CfgProductConfigurationComponent } from "@configura/web-ui";
|
|
2
|
-
export declare const augmentWithDebugComponents: <T extends CfgProductConfigurationComponent>(components: T) => T;
|
|
3
|
-
export declare const useDebugComponents: (components: CfgProductConfigurationComponent) => CfgProductConfigurationComponent;
|
|
1
|
+
import { CfgProductConfigurationComponent } from "@configura/web-ui";
|
|
2
|
+
export declare const augmentWithDebugComponents: <T extends CfgProductConfigurationComponent>(components: T) => T;
|
|
3
|
+
export declare const useDebugComponents: (components: CfgProductConfigurationComponent) => CfgProductConfigurationComponent;
|
|
4
4
|
//# sourceMappingURL=debugComponentsHelper.d.ts.map
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import { getDebugAdditionalProductView } from "./DebugAdditionalProductView.js";
|
|
3
|
-
import { DebugFeatureFlattenView, DebugFeatureGroupView } from "./DebugFeatureGroupView.js";
|
|
4
|
-
import { debugFeatureSelectManyViewFactory, debugFeatureSelectOneViewFactory, } from "./DebugFeatureView.js";
|
|
5
|
-
import { debugMiscFileComponentViewFactory } from "./DebugMiscFileView.js";
|
|
6
|
-
import { debugNoteComponentViewFactory } from "./DebugNoteView.js";
|
|
7
|
-
import { debugOptionSelectManyViewFactory, debugOptionSelectOneViewFactory, } from "./DebugOptionView.js";
|
|
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) }));
|
|
9
|
-
export const useDebugComponents = (components) => {
|
|
10
|
-
const { additionalProductComponent, featureFlattenComponent, featureGroupComponent, featureSelectManyComponent, featureSelectOneComponent, optionSelectManyComponent, optionSelectOneComponent, noteComponent, notesComponent, miscFileComponent, miscFilesComponent, } = components;
|
|
11
|
-
return useMemo(() => augmentWithDebugComponents({
|
|
12
|
-
additionalProductComponent,
|
|
13
|
-
featureFlattenComponent,
|
|
14
|
-
featureGroupComponent,
|
|
15
|
-
featureSelectManyComponent,
|
|
16
|
-
featureSelectOneComponent,
|
|
17
|
-
optionSelectManyComponent,
|
|
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,
|
|
35
|
-
]);
|
|
36
|
-
};
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { getDebugAdditionalProductView } from "./DebugAdditionalProductView.js";
|
|
3
|
+
import { DebugFeatureFlattenView, DebugFeatureGroupView } from "./DebugFeatureGroupView.js";
|
|
4
|
+
import { debugFeatureSelectManyViewFactory, debugFeatureSelectOneViewFactory, } from "./DebugFeatureView.js";
|
|
5
|
+
import { debugMiscFileComponentViewFactory } from "./DebugMiscFileView.js";
|
|
6
|
+
import { debugNoteComponentViewFactory } from "./DebugNoteView.js";
|
|
7
|
+
import { debugOptionSelectManyViewFactory, debugOptionSelectOneViewFactory, } from "./DebugOptionView.js";
|
|
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) }));
|
|
9
|
+
export const useDebugComponents = (components) => {
|
|
10
|
+
const { additionalProductComponent, featureFlattenComponent, featureGroupComponent, featureSelectManyComponent, featureSelectOneComponent, optionSelectManyComponent, optionSelectOneComponent, noteComponent, notesComponent, miscFileComponent, miscFilesComponent, } = components;
|
|
11
|
+
return useMemo(() => augmentWithDebugComponents({
|
|
12
|
+
additionalProductComponent,
|
|
13
|
+
featureFlattenComponent,
|
|
14
|
+
featureGroupComponent,
|
|
15
|
+
featureSelectManyComponent,
|
|
16
|
+
featureSelectOneComponent,
|
|
17
|
+
optionSelectManyComponent,
|
|
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,
|
|
35
|
+
]);
|
|
36
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./DebugAdditionalProductView.js";
|
|
2
|
-
export * from "./debugComponentsHelper.js";
|
|
3
|
-
export * from "./DebugFeatureGroupView.js";
|
|
4
|
-
export * from "./DebugFeatureView.js";
|
|
5
|
-
export * from "./DebugMiscFileView.js";
|
|
6
|
-
export * from "./DebugNoteView.js";
|
|
7
|
-
export * from "./DebugOptionView.js";
|
|
8
|
-
export * from "./DebugProductConfigurationView.js";
|
|
1
|
+
export * from "./DebugAdditionalProductView.js";
|
|
2
|
+
export * from "./debugComponentsHelper.js";
|
|
3
|
+
export * from "./DebugFeatureGroupView.js";
|
|
4
|
+
export * from "./DebugFeatureView.js";
|
|
5
|
+
export * from "./DebugMiscFileView.js";
|
|
6
|
+
export * from "./DebugNoteView.js";
|
|
7
|
+
export * from "./DebugOptionView.js";
|
|
8
|
+
export * from "./DebugProductConfigurationView.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./DebugAdditionalProductView.js";
|
|
2
|
-
export * from "./debugComponentsHelper.js";
|
|
3
|
-
export * from "./DebugFeatureGroupView.js";
|
|
4
|
-
export * from "./DebugFeatureView.js";
|
|
5
|
-
export * from "./DebugMiscFileView.js";
|
|
6
|
-
export * from "./DebugNoteView.js";
|
|
7
|
-
export * from "./DebugOptionView.js";
|
|
8
|
-
export * from "./DebugProductConfigurationView.js";
|
|
1
|
+
export * from "./DebugAdditionalProductView.js";
|
|
2
|
+
export * from "./debugComponentsHelper.js";
|
|
3
|
+
export * from "./DebugFeatureGroupView.js";
|
|
4
|
+
export * from "./DebugFeatureView.js";
|
|
5
|
+
export * from "./DebugMiscFileView.js";
|
|
6
|
+
export * from "./DebugNoteView.js";
|
|
7
|
+
export * from "./DebugOptionView.js";
|
|
8
|
+
export * from "./DebugProductConfigurationView.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/debug-react",
|
|
3
|
-
"version": "2.2.0-alpha.
|
|
3
|
+
"version": "2.2.0-alpha.2",
|
|
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.2.0-alpha.
|
|
23
|
-
"@configura/babylon-view-react": "2.2.0-alpha.
|
|
24
|
-
"@configura/web-ui": "2.2.0-alpha.
|
|
25
|
-
"@configura/web-utilities": "2.2.0-alpha.
|
|
22
|
+
"@configura/babylon-view": "2.2.0-alpha.2",
|
|
23
|
+
"@configura/babylon-view-react": "2.2.0-alpha.2",
|
|
24
|
+
"@configura/web-ui": "2.2.0-alpha.2",
|
|
25
|
+
"@configura/web-utilities": "2.2.0-alpha.2",
|
|
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": "5f45900d6b4fcda8f13a33f9ffdcba8a0a5b6c95"
|
|
48
48
|
}
|