@configura/debug-react 1.6.1 → 2.0.0-alpha.0
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/dist/TextualConfigurationView.d.ts +8 -0
- package/dist/TextualConfigurationView.js +41 -0
- package/dist/css/debug.css +1 -1
- package/dist/css/debug.css.map +1 -1
- package/dist/exerciser/Exerciser.d.ts +7 -7
- package/dist/exerciser/Exerciser.js +4 -3
- package/dist/exerciser/ExerciserRun.d.ts +2 -2
- package/dist/exerciser/ExerciserSetup.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CfgObservableStateManager } from "@configura/web-api";
|
|
2
|
+
import { CssProps } from "@configura/web-ui/dist/utilities";
|
|
3
|
+
import React from "react";
|
|
4
|
+
export declare const TextualConfigurationView: React.FC<{
|
|
5
|
+
active: boolean;
|
|
6
|
+
observableStateManager: CfgObservableStateManager;
|
|
7
|
+
} & CssProps>;
|
|
8
|
+
//# sourceMappingURL=TextualConfigurationView.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
export const TextualConfigurationView = (props) => {
|
|
3
|
+
const { active, observableStateManager } = props;
|
|
4
|
+
const [editActive, setEditActive] = useState(false);
|
|
5
|
+
const [textualConfiguration, setTextualConfiguration] = useState(observableStateManager.stateAsString);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const textualConfigurationListener = (v) => {
|
|
8
|
+
if (editActive) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
setTextualConfiguration(v);
|
|
12
|
+
};
|
|
13
|
+
observableStateManager.listenForStateChange(textualConfigurationListener);
|
|
14
|
+
return () => {
|
|
15
|
+
observableStateManager.stopListenForStateChange(textualConfigurationListener);
|
|
16
|
+
};
|
|
17
|
+
}, [editActive, observableStateManager]);
|
|
18
|
+
return active ? (React.createElement("div", { className: `cfgTextualConfiguration ${props.className || ""}`, style: props.style },
|
|
19
|
+
props.children,
|
|
20
|
+
editActive && React.createElement("p", null, "Editing like this is experimental"),
|
|
21
|
+
React.createElement("textarea", { className: "cfgTextualConfiguration__input cfgInput", disabled: !editActive, value: textualConfiguration, onChange: (event) => {
|
|
22
|
+
if (!editActive) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
setTextualConfiguration(event.target.value);
|
|
26
|
+
} }),
|
|
27
|
+
React.createElement("div", { className: "cfgButtonRow" },
|
|
28
|
+
React.createElement("button", { className: "cfgButtonRow__button cfgButton", onClick: () => {
|
|
29
|
+
navigator.clipboard.writeText(textualConfiguration);
|
|
30
|
+
} }, "Copy to clipboard"),
|
|
31
|
+
!editActive && (React.createElement("button", { className: "cfgButtonRow__button cfgButton", onClick: () => setEditActive(true) }, "Edit")),
|
|
32
|
+
editActive && (React.createElement(React.Fragment, null,
|
|
33
|
+
React.createElement("button", { className: "cfgButtonRow__button cfgButton", onClick: () => {
|
|
34
|
+
setTextualConfiguration(observableStateManager.stateAsString);
|
|
35
|
+
setEditActive(false);
|
|
36
|
+
} }, "Cancel Edit"),
|
|
37
|
+
React.createElement("button", { className: "cfgButtonRow__button cfgButton", disabled: observableStateManager.stateAsString === textualConfiguration, onClick: () => {
|
|
38
|
+
setEditActive(false);
|
|
39
|
+
observableStateManager.stateAsString = textualConfiguration;
|
|
40
|
+
} }, "Apply Edit")))))) : null;
|
|
41
|
+
};
|
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}
|
|
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}
|
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,
|
|
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,2CCCD,WAAA,CDCE,aCCF,CDGA,qCACC,wBACC,gBCAA,CACF,CDGA,8BACC,aCDD,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,CCtHA,eACC,cDyHD,CCtHA,aACC,eAAA,CACA,YDyHD,CCvHC,mBACC,eAAA,CACA,cDyHF,CCtHC,mBACC,WDwHF,CCtHE,iEAEC,qBAAA,CACA,UDuHH,CCrHE,iCACC,qBDuHH,CCrHE,kCACC,qBAAA,CACA,UDuHH,CClHA,iBACC,uBAAA,CAAA,sBAAA,CACA,eDqHD,CCjHC,0BACC,eDoHF,CCjHC,wBACC,UAAA,CACA,yBAAA,CACA,0BAAA,CACA,eAAA,CACA,gBAAA,CACA,eAAA,CACA,eDmHF,CCjHE,qCACC,UDmHH,CC/GG,2CACC,kBAAA,CACA,eAAA,CACA,sBDiHJ,CC5GC,wBACC,eAAA,CACA,0BAAA,CAAA,yBD8GF,CCzGC,gCACC,UAAA,CACA,eD4GF","file":"debug.css","sourcesContent":[":root {\r\n\t--cfgExerciserImageWidth: 200px;\r\n\t--cfgExerciserLink: hsl(217, 69%, 48%);\r\n}\r\n\r\n.cfgExerciser {\r\n\toverflow-wrap: anywhere;\r\n}\r\n\r\n.cfgExerciserColumn {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tflex: 1 1 auto;\r\n}\r\n\r\n.cfgExerciserRow {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tflex-wrap: wrap;\r\n}\r\n\r\n.cfgExerciserLink {\r\n\tcolor: var(--cfgExerciserLink);\r\n\ttext-decoration: none;\r\n\tword-break: break-all;\r\n}\r\n\r\n.cfgExerciserView {\r\n\tmargin: 0 1em;\r\n}\r\n\r\n.cfgExerciserButton {\r\n\tfont-size: 1em;\r\n}\r\n\r\n.cfgExerciserControl {\r\n\tmargin: 0.5em 0;\r\n}\r\n\r\n.cfgExerciserControl__label {\r\n\tdisplay: block;\r\n\ttext-transform: capitalize;\r\n\tfont-weight: 500;\r\n}\r\n.cfgExerciserControl__select--operator {\r\n\tmargin-right: 0.5em;\r\n}\r\n\r\n.cfgExerciserControl__selectWrapper {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tflex-wrap: wrap;\r\n}\r\n\r\n.cfgExerciserControl__select--full {\r\n\tflex: 1 0 auto;\r\n}\r\n\r\n.cfgExerciserControl__error {\r\n\tcolor: crimson;\r\n}\r\n\r\n.cfgCanvasWrapper {\r\n\twidth: 100%;\r\n}\r\n\r\n.cfgExerciserReportItem {\r\n\tborder-top: 1px solid black;\r\n\tdisplay: flex;\r\n\tflex-wrap: wrap;\r\n\r\n\t& .cfgDebugLog {\r\n\t\tfont-size: 1em;\r\n\t}\r\n\r\n\t& .cfgDebugLog__item {\r\n\t\tpadding: 1px;\r\n\t\tmargin: 0.5em 0;\r\n\t}\r\n}\r\n\r\n@media screen and (min-width: 62.5em) {\r\n\t.cfgExerciserReportItem {\r\n\t\tflex-wrap: nowrap;\r\n\t}\r\n}\r\n\r\n.cfgExerciserReportItem__info {\r\n\tflex: 1 1 auto;\r\n}\r\n\r\n.cfgExerciserReportItem__image {\r\n\twidth: var(--cfgExerciserImageWidth);\r\n\theight: var(--cfgExerciserImageWidth);\r\n}\r\n\r\n.cfgExerciserReportItem__image img {\r\n\twidth: 100%;\r\n}\r\n\r\n.cfgExerciserFilter__logMessage {\r\n\tdisplay: block;\r\n\tpadding: 1px 0;\r\n}\r\n\r\n.cfgExerciserSetup {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tflex-wrap: wrap;\r\n}\r\n\r\n.cfgExerciserSetup__select {\r\n\tmax-width: 50rem;\r\n}\r\n\r\n.cfgExerciserSetup__select,\r\n.cfgExerciserSetup__preview {\r\n\tflex: 1 1 auto;\r\n}\r\n\r\n.cfgExerciserSetup__select + .cfgExerciserSetup__preview {\r\n\tflex: 1 1 50%;\r\n}\r\n","@import \"exerciser\";\r\n\r\n.cfgFontSize10 {\r\n\tfont-size: 10px;\r\n}\r\n\r\n.cfgDebugLog {\r\n\tfont-size: 1.5em;\r\n\tmargin: 1em 0;\r\n\r\n\t&__list {\r\n\t\tlist-style: none;\r\n\t\tpadding-left: 0;\r\n\t}\r\n\r\n\t&__item {\r\n\t\tpadding: 1em;\r\n\r\n\t\t&--severityLog,\r\n\t\t&--severityInfo {\r\n\t\t\tbackground-color: #3333ff;\r\n\t\t\tcolor: #fff;\r\n\t\t}\r\n\t\t&--severityWarn {\r\n\t\t\tbackground-color: #ffdd00;\r\n\t\t}\r\n\t\t&--severityError {\r\n\t\t\tbackground-color: #cc0000;\r\n\t\t\tcolor: #fff;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nul.debug-wrapper {\r\n\tpadding-inline-start: 0;\r\n\tlist-style: none;\r\n}\r\n\r\n.debug-component {\r\n\t&__heading {\r\n\t\tfont-weight: 700;\r\n\t}\r\n\r\n\t&__table {\r\n\t\tcolor: blue;\r\n\t\tborder-top: 1px blue solid;\r\n\t\tborder-left: 1px blue solid;\r\n\t\tmargin-left: 1px;\r\n\t\tpadding-left: 5px;\r\n\t\tpadding-top: 5px;\r\n\t\tmargin-top: 10px;\r\n\r\n\t\t&--mark-hidden {\r\n\t\t\tcolor: #8888ff;\r\n\t\t}\r\n\r\n\t\ttr {\r\n\t\t\ttd:nth-child(2) {\r\n\t\t\t\twhite-space: nowrap;\r\n\t\t\t\toverflow: hidden;\r\n\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&__group {\r\n\t\tlist-style: none;\r\n\t\tpadding-inline-start: 10px;\r\n\t}\r\n}\r\n\r\n.cfgTextualConfiguration {\r\n\t&__input {\r\n\t\twidth: 100%;\r\n\t\tmin-height: 15em;\r\n\t}\r\n}\r\n","@import \"exerciser\";\r\n\r\n.cfgFontSize10 {\r\n\tfont-size: 10px;\r\n}\r\n\r\n.cfgDebugLog {\r\n\tfont-size: 1.5em;\r\n\tmargin: 1em 0;\r\n\r\n\t&__list {\r\n\t\tlist-style: none;\r\n\t\tpadding-left: 0;\r\n\t}\r\n\r\n\t&__item {\r\n\t\tpadding: 1em;\r\n\r\n\t\t&--severityLog,\r\n\t\t&--severityInfo {\r\n\t\t\tbackground-color: #3333ff;\r\n\t\t\tcolor: #fff;\r\n\t\t}\r\n\t\t&--severityWarn {\r\n\t\t\tbackground-color: #ffdd00;\r\n\t\t}\r\n\t\t&--severityError {\r\n\t\t\tbackground-color: #cc0000;\r\n\t\t\tcolor: #fff;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nul.debug-wrapper {\r\n\tpadding-inline-start: 0;\r\n\tlist-style: none;\r\n}\r\n\r\n.debug-component {\r\n\t&__heading {\r\n\t\tfont-weight: 700;\r\n\t}\r\n\r\n\t&__table {\r\n\t\tcolor: blue;\r\n\t\tborder-top: 1px blue solid;\r\n\t\tborder-left: 1px blue solid;\r\n\t\tmargin-left: 1px;\r\n\t\tpadding-left: 5px;\r\n\t\tpadding-top: 5px;\r\n\t\tmargin-top: 10px;\r\n\r\n\t\t&--mark-hidden {\r\n\t\t\tcolor: #8888ff;\r\n\t\t}\r\n\r\n\t\ttr {\r\n\t\t\ttd:nth-child(2) {\r\n\t\t\t\twhite-space: nowrap;\r\n\t\t\t\toverflow: hidden;\r\n\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&__group {\r\n\t\tlist-style: none;\r\n\t\tpadding-inline-start: 10px;\r\n\t}\r\n}\r\n\r\n.cfgTextualConfiguration {\r\n\t&__input {\r\n\t\twidth: 100%;\r\n\t\tmin-height: 15em;\r\n\t}\r\n}\r\n"]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { CatalogueAPI,
|
|
1
|
+
import { CatalogueAPI, DtoCatalogueParams, DtoCatalogueParamsWithoutCid, DtoCataloguePermission, DtoProductParams, DtoTOCResponse, GeneratedProductConfiguration, ProductRefParams } from "@configura/web-api";
|
|
2
2
|
import { AggregatedLoadingObservable, Filter, Filters, LogLevel } from "@configura/web-utilities";
|
|
3
3
|
import React from "react";
|
|
4
4
|
export declare type ExerciserAction = "setup" | "run";
|
|
5
5
|
export declare function validateAction(action: string): ExerciserAction;
|
|
6
|
-
export declare function flattenCataloguePermissions(permissions:
|
|
6
|
+
export declare function flattenCataloguePermissions(permissions: DtoCataloguePermission[]): DtoCatalogueParams[];
|
|
7
7
|
export declare function filtersKey(...filters: Filter[]): string;
|
|
8
|
-
export declare function catalogueFiltersKey(filters: Filters<
|
|
9
|
-
export declare function useCatalogueFilters(props: ExerciserState): Filters<
|
|
8
|
+
export declare function catalogueFiltersKey(filters: Filters<DtoCatalogueParamsWithoutCid>): string;
|
|
9
|
+
export declare function useCatalogueFilters(props: ExerciserState): Filters<DtoCatalogueParamsWithoutCid>;
|
|
10
10
|
export declare function productFiltersKey(filters: Filters<ProductRefParams>): string;
|
|
11
11
|
export declare function useProductFilters(props: ExerciserState): Filters<ProductRefParams>;
|
|
12
|
-
export declare function useProductConfigurationIterator(api: CatalogueAPI, lang: string, result:
|
|
13
|
-
export declare function useToc(api: CatalogueAPI, params:
|
|
12
|
+
export declare function useProductConfigurationIterator(api: CatalogueAPI, lang: string, result: DtoCatalogueParams[], productConditions: Filters<ProductRefParams>): AsyncIterableIterator<GeneratedProductConfiguration | Error>;
|
|
13
|
+
export declare function useToc(api: CatalogueAPI, params: DtoCatalogueParamsWithoutCid | undefined, lang: string, setError: (err: unknown) => void, loadingObservable: AggregatedLoadingObservable): DtoTOCResponse | undefined;
|
|
14
14
|
export interface LogMessageCount {
|
|
15
15
|
message: string;
|
|
16
16
|
level: LogLevel;
|
|
@@ -29,7 +29,7 @@ export interface ExerciserState {
|
|
|
29
29
|
interface Props {
|
|
30
30
|
api: CatalogueAPI;
|
|
31
31
|
exerciserState: ExerciserState;
|
|
32
|
-
generateExerciserUrl: (action: ExerciserAction, lang: string, params: Partial<
|
|
32
|
+
generateExerciserUrl: (action: ExerciserAction, lang: string, params: Partial<DtoProductParams>) => string;
|
|
33
33
|
setError: (err: unknown) => void;
|
|
34
34
|
setExerciserState: (next: ExerciserState) => void;
|
|
35
35
|
}
|
|
@@ -15,14 +15,15 @@ export function validateAction(action) {
|
|
|
15
15
|
return "setup";
|
|
16
16
|
}
|
|
17
17
|
export function flattenCataloguePermissions(permissions) {
|
|
18
|
-
|
|
18
|
+
const params = [];
|
|
19
19
|
for (const p of permissions) {
|
|
20
|
-
const { enterprise, prdCat, prdCatVersion } = p;
|
|
20
|
+
const { cid, enterprise, prdCat, prdCatVersion } = p;
|
|
21
21
|
const vendors = p.vendors || ["-"];
|
|
22
22
|
for (const vendor of vendors) {
|
|
23
23
|
const priceLists = p.priceLists || ["-"];
|
|
24
24
|
for (const priceList of priceLists) {
|
|
25
25
|
params.push({
|
|
26
|
+
cid,
|
|
26
27
|
enterprise,
|
|
27
28
|
prdCat,
|
|
28
29
|
prdCatVersion,
|
|
@@ -63,7 +64,7 @@ export function useProductFilters(props) {
|
|
|
63
64
|
export function useProductConfigurationIterator(api, lang, result, productConditions) {
|
|
64
65
|
return useMemo(() => generateProductConfigurations(api, lang, result, productConditions, {
|
|
65
66
|
strictSelectOneSelectionCount: true,
|
|
66
|
-
}), [api, lang,
|
|
67
|
+
}), [api, lang, productConditions, result]);
|
|
67
68
|
}
|
|
68
69
|
export function useToc(api, params, lang, setError, loadingObservable) {
|
|
69
70
|
let [response, setResponse] = useState();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DtoProductParams, GeneratedProductConfiguration } from "@configura/web-api";
|
|
2
2
|
import { AggregatedLoadingObservable, LogLevel } from "@configura/web-utilities";
|
|
3
3
|
import { ExerciserAction } from "./Exerciser.js";
|
|
4
4
|
import { ExerciserReportItem } from "./ExerciserReportItem.js";
|
|
@@ -13,7 +13,7 @@ interface Props {
|
|
|
13
13
|
addReportItem: (item: ExerciserReportItem) => void;
|
|
14
14
|
loadingObservable: AggregatedLoadingObservable;
|
|
15
15
|
productIterator: AsyncIterableIterator<GeneratedProductConfiguration | Error>;
|
|
16
|
-
generateExerciserUrl: (action: ExerciserAction, lang: string, params: Partial<
|
|
16
|
+
generateExerciserUrl: (action: ExerciserAction, lang: string, params: Partial<DtoProductParams>) => string;
|
|
17
17
|
}
|
|
18
18
|
export declare function ExerciserRunner(props: Props): JSX.Element | null;
|
|
19
19
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CatalogueAPI,
|
|
1
|
+
import { CatalogueAPI, DtoProductParams, GeneratedProductConfiguration } from "@configura/web-api";
|
|
2
2
|
import { AggregatedLoadingObservable } from "@configura/web-utilities";
|
|
3
3
|
import { ExerciserAction, ExerciserState } from "./Exerciser.js";
|
|
4
4
|
interface Props {
|
|
5
5
|
api: CatalogueAPI;
|
|
6
6
|
exerciserState: ExerciserState;
|
|
7
|
-
generateExerciserUrl: (action: ExerciserAction, lang: string, params: Partial<
|
|
7
|
+
generateExerciserUrl: (action: ExerciserAction, lang: string, params: Partial<DtoProductParams>) => string;
|
|
8
8
|
loadingObservable: AggregatedLoadingObservable;
|
|
9
9
|
setError: (err: unknown) => void;
|
|
10
10
|
setExerciserState: (next: ExerciserState) => void;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/debug-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
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": "
|
|
23
|
-
"@configura/babylon-view-react": "
|
|
24
|
-
"@configura/web-ui": "
|
|
25
|
-
"@configura/web-utilities": "
|
|
22
|
+
"@configura/babylon-view": "2.0.0-alpha.0",
|
|
23
|
+
"@configura/babylon-view-react": "2.0.0-alpha.0",
|
|
24
|
+
"@configura/web-ui": "2.0.0-alpha.0",
|
|
25
|
+
"@configura/web-utilities": "2.0.0-alpha.0",
|
|
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": "b802ecc481c41f8dd8342dc6eaf5010a86f0f85d"
|
|
48
48
|
}
|