@configura/web-ui 2.0.0-alpha.0 → 2.0.0-alpha.11
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/.postcssrc.json +8 -8
- package/LICENSE +201 -201
- package/README.md +1 -1
- package/dist/components/CanvasWrapper.d.ts +9 -9
- package/dist/components/CanvasWrapper.js +8 -8
- package/dist/components/CfgPriceView.d.ts +6 -6
- package/dist/components/CfgPriceView.js +13 -13
- package/dist/components/ConfigurationActionsButtonRow.d.ts +14 -14
- package/dist/components/ConfigurationActionsButtonRow.js +16 -16
- package/dist/components/Configurator.d.ts +12 -12
- package/dist/components/Configurator.js +15 -15
- package/dist/components/ConfiguratorWrapper.d.ts +8 -8
- package/dist/components/ConfiguratorWrapper.js +5 -5
- package/dist/components/CurrencyPrice.d.ts +9 -9
- package/dist/components/CurrencyPrice.js +7 -7
- package/dist/components/ErrorContext.d.ts +2 -2
- package/dist/components/ErrorContext.js +2 -2
- package/dist/components/ExpandableHeadingRow.d.ts +15 -15
- package/dist/components/ExpandableHeadingRow.js +21 -21
- package/dist/components/Loading.d.ts +13 -13
- package/dist/components/Loading.js +20 -20
- package/dist/components/ProductInformation.d.ts +13 -13
- package/dist/components/ProductInformation.js +14 -14
- package/dist/components/TaskListView.d.ts +8 -8
- package/dist/components/TaskListView.js +69 -69
- package/dist/components/TaskStartView.d.ts +12 -12
- package/dist/components/TaskStartView.js +29 -29
- package/dist/components/icons/Checkmark.d.ts +6 -6
- package/dist/components/icons/Checkmark.js +12 -12
- package/dist/components/icons/Chevron.d.ts +7 -7
- package/dist/components/icons/Chevron.js +18 -18
- package/dist/components/icons/CircleXmarkIcon.d.ts +3 -3
- package/dist/components/icons/CircleXmarkIcon.js +8 -8
- package/dist/components/icons/DownloadIcon.d.ts +3 -3
- package/dist/components/icons/DownloadIcon.js +8 -8
- package/dist/components/icons/ErrorIcon.d.ts +3 -3
- package/dist/components/icons/ErrorIcon.js +8 -8
- package/dist/components/productConfiguration/CfgAdditionalProductView.d.ts +3 -3
- package/dist/components/productConfiguration/CfgAdditionalProductView.js +42 -42
- package/dist/components/productConfiguration/CfgCheckboxView.d.ts +7 -9
- package/dist/components/productConfiguration/CfgCheckboxView.js +29 -29
- package/dist/components/productConfiguration/CfgCheckboxesView.d.ts +7 -9
- package/dist/components/productConfiguration/CfgCheckboxesView.js +18 -18
- package/dist/components/productConfiguration/CfgDropdownOptionView.d.ts +7 -9
- package/dist/components/productConfiguration/CfgDropdownOptionView.js +44 -44
- package/dist/components/productConfiguration/CfgDropdownView.d.ts +7 -9
- package/dist/components/productConfiguration/CfgDropdownView.js +20 -20
- package/dist/components/productConfiguration/CfgFeatureView.d.ts +31 -35
- package/dist/components/productConfiguration/CfgFeatureView.js +60 -64
- package/dist/components/productConfiguration/CfgGroupView.d.ts +4 -4
- package/dist/components/productConfiguration/CfgGroupView.js +7 -7
- package/dist/components/productConfiguration/CfgOptionFeaturesView.d.ts +3 -3
- package/dist/components/productConfiguration/CfgOptionFeaturesView.js +13 -13
- package/dist/components/productConfiguration/CfgOptionNumericView.d.ts +29 -29
- package/dist/components/productConfiguration/CfgOptionNumericView.js +132 -132
- package/dist/components/productConfiguration/CfgOptionPriceView.d.ts +9 -9
- package/dist/components/productConfiguration/CfgOptionPriceView.js +29 -29
- package/dist/components/productConfiguration/CfgProductConfigurationView.d.ts +22 -17
- package/dist/components/productConfiguration/CfgProductConfigurationView.js +47 -47
- package/dist/css/web-ui.css.map +1 -1
- package/dist/index.d.ts +24 -23
- package/dist/index.js +24 -23
- package/dist/scss/_button.scss +52 -52
- package/dist/scss/_configurator.scss +88 -88
- package/dist/scss/_expandable.scss +37 -37
- package/dist/scss/_feature-item.scss +137 -137
- package/dist/scss/_forms.scss +42 -42
- package/dist/scss/_hr.scss +16 -16
- package/dist/scss/_loading.scss +98 -98
- package/dist/scss/_mixins.scss +56 -56
- package/dist/scss/_option-tree.scss +29 -29
- package/dist/scss/_product-information.scss +49 -49
- package/dist/scss/_range-view.scss +39 -39
- package/dist/scss/_slider.scss +70 -70
- package/dist/scss/_tasks.scss +72 -72
- package/dist/scss/_themed.scss +149 -149
- package/dist/scss/_utilities.scss +21 -21
- package/dist/scss/_variables.scss +6 -6
- package/dist/scss/icons/_checkmark.scss +46 -46
- package/dist/scss/icons/_chevron.scss +62 -62
- package/dist/scss/icons/_circle-xmark-icon.scss +24 -24
- package/dist/scss/icons/_download-icon.scss +24 -24
- package/dist/scss/icons/_error-icon.scss +24 -24
- package/dist/scss/web-ui.scss +11 -11
- package/dist/useCatParams.d.ts +18 -0
- package/dist/useCatParams.js +29 -0
- package/dist/useObservable.d.ts +4 -4
- package/dist/useObservable.js +18 -18
- package/dist/useRerender.d.ts +1 -1
- package/dist/useRerender.js +5 -5
- package/dist/useResize.d.ts +6 -6
- package/dist/useResize.js +47 -47
- package/dist/useSelected.d.ts +2 -2
- package/dist/useSelected.js +13 -13
- package/dist/useUniqueId.d.ts +1 -1
- package/dist/useUniqueId.js +7 -7
- package/dist/utilities.d.ts +5 -5
- package/dist/utilities.js +1 -1
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CssProps } from "../utilities";
|
|
3
|
-
interface Props {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare type ConfiguratorWrapperRef = HTMLDivElement;
|
|
7
|
-
export declare const ConfiguratorWrapper: React.ForwardRefExoticComponent<Props & CssProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssProps } from "../utilities";
|
|
3
|
+
interface Props {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare type ConfiguratorWrapperRef = HTMLDivElement;
|
|
7
|
+
export declare const ConfiguratorWrapper: React.ForwardRefExoticComponent<Props & CssProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export {};
|
|
9
9
|
//# sourceMappingURL=ConfiguratorWrapper.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const ConfiguratorWrapper = React.forwardRef((props, ref) => {
|
|
3
|
-
const { children } = props;
|
|
4
|
-
return (React.createElement("div", { ref: ref, className: `cfgConfiguratorWrapper ${props.className || ""}`, style: props.style }, children));
|
|
5
|
-
});
|
|
1
|
+
import React from "react";
|
|
2
|
+
export const ConfiguratorWrapper = React.forwardRef((props, ref) => {
|
|
3
|
+
const { children } = props;
|
|
4
|
+
return (React.createElement("div", { ref: ref, className: `cfgConfiguratorWrapper ${props.className || ""}`, style: props.style }, children));
|
|
5
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
currency: string;
|
|
4
|
-
language?: string;
|
|
5
|
-
price: number;
|
|
6
|
-
fractionDigits: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const CurrencyPrice: React.FC<Props>;
|
|
9
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
currency: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
price: number;
|
|
6
|
+
fractionDigits: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const CurrencyPrice: React.FC<Props>;
|
|
9
|
+
export {};
|
|
10
10
|
//# sourceMappingURL=CurrencyPrice.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { formatPrice } from "@configura/web-utilities";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export const CurrencyPrice = (props) => {
|
|
4
|
-
const { price, fractionDigits, currency, language } = props;
|
|
5
|
-
const lang = language || navigator.language;
|
|
6
|
-
return React.createElement(React.Fragment, null, formatPrice(price, fractionDigits, lang, currency));
|
|
7
|
-
};
|
|
1
|
+
import { formatPrice } from "@configura/web-utilities";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export const CurrencyPrice = (props) => {
|
|
4
|
+
const { price, fractionDigits, currency, language } = props;
|
|
5
|
+
const lang = language || navigator.language;
|
|
6
|
+
return React.createElement(React.Fragment, null, formatPrice(price, fractionDigits, lang, currency));
|
|
7
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare const ErrorContext: React.Context<(err: unknown) => void>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const ErrorContext: React.Context<(err: unknown) => void>;
|
|
3
3
|
//# sourceMappingURL=ErrorContext.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const ErrorContext = React.createContext(() => undefined);
|
|
1
|
+
import React from "react";
|
|
2
|
+
export const ErrorContext = React.createContext(() => undefined);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CssProps } from "../utilities.js";
|
|
3
|
-
export declare enum ExpandableHeadingRowSymbol {
|
|
4
|
-
Chevron = 0,
|
|
5
|
-
Checkbox = 1
|
|
6
|
-
}
|
|
7
|
-
declare type Props = {
|
|
8
|
-
heading: string;
|
|
9
|
-
open: boolean;
|
|
10
|
-
onClick: () => void;
|
|
11
|
-
expandable?: boolean;
|
|
12
|
-
symbol?: ExpandableHeadingRowSymbol;
|
|
13
|
-
};
|
|
14
|
-
export declare const ExpandableHeadingRow: React.FC<Props & CssProps>;
|
|
15
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssProps } from "../utilities.js";
|
|
3
|
+
export declare enum ExpandableHeadingRowSymbol {
|
|
4
|
+
Chevron = 0,
|
|
5
|
+
Checkbox = 1
|
|
6
|
+
}
|
|
7
|
+
declare type Props = {
|
|
8
|
+
heading: string;
|
|
9
|
+
open: boolean;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
expandable?: boolean;
|
|
12
|
+
symbol?: ExpandableHeadingRowSymbol;
|
|
13
|
+
};
|
|
14
|
+
export declare const ExpandableHeadingRow: React.FC<Props & CssProps>;
|
|
15
|
+
export {};
|
|
16
16
|
//# sourceMappingURL=ExpandableHeadingRow.d.ts.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CheckmarkWithBorder } from "./icons/Checkmark.js";
|
|
3
|
-
import { Chevron } from "./icons/Chevron.js";
|
|
4
|
-
export var ExpandableHeadingRowSymbol;
|
|
5
|
-
(function (ExpandableHeadingRowSymbol) {
|
|
6
|
-
ExpandableHeadingRowSymbol[ExpandableHeadingRowSymbol["Chevron"] = 0] = "Chevron";
|
|
7
|
-
ExpandableHeadingRowSymbol[ExpandableHeadingRowSymbol["Checkbox"] = 1] = "Checkbox";
|
|
8
|
-
})(ExpandableHeadingRowSymbol || (ExpandableHeadingRowSymbol = {}));
|
|
9
|
-
export const ExpandableHeadingRow = (props) => {
|
|
10
|
-
const { heading, open: active, onClick, children } = props;
|
|
11
|
-
const symbol = props.symbol === undefined ? ExpandableHeadingRowSymbol.Chevron : props.symbol;
|
|
12
|
-
if (props.expandable === false) {
|
|
13
|
-
return (React.createElement("div", { className: "cfgExpandableHeadingRow" },
|
|
14
|
-
children,
|
|
15
|
-
React.createElement("div", { className: "cfgExpandableHeadingRow__title cfgTextOverflow" }, heading)));
|
|
16
|
-
}
|
|
17
|
-
return (React.createElement("button", { className: `cfgExpandableHeadingRow cfgExpandableHeadingRow--expandable ${props.className || ""}`, style: props.style, onClick: onClick },
|
|
18
|
-
children,
|
|
19
|
-
React.createElement("div", { className: "cfgExpandableHeadingRow__title cfgTextOverflow" }, heading),
|
|
20
|
-
React.createElement("div", { className: "cfgExpandableHeadingRow__icon" }, symbol === ExpandableHeadingRowSymbol.Chevron ? (React.createElement(Chevron, { active: active })) : (React.createElement(CheckmarkWithBorder, { active: active })))));
|
|
21
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CheckmarkWithBorder } from "./icons/Checkmark.js";
|
|
3
|
+
import { Chevron } from "./icons/Chevron.js";
|
|
4
|
+
export var ExpandableHeadingRowSymbol;
|
|
5
|
+
(function (ExpandableHeadingRowSymbol) {
|
|
6
|
+
ExpandableHeadingRowSymbol[ExpandableHeadingRowSymbol["Chevron"] = 0] = "Chevron";
|
|
7
|
+
ExpandableHeadingRowSymbol[ExpandableHeadingRowSymbol["Checkbox"] = 1] = "Checkbox";
|
|
8
|
+
})(ExpandableHeadingRowSymbol || (ExpandableHeadingRowSymbol = {}));
|
|
9
|
+
export const ExpandableHeadingRow = (props) => {
|
|
10
|
+
const { heading, open: active, onClick, children } = props;
|
|
11
|
+
const symbol = props.symbol === undefined ? ExpandableHeadingRowSymbol.Chevron : props.symbol;
|
|
12
|
+
if (props.expandable === false) {
|
|
13
|
+
return (React.createElement("div", { className: "cfgExpandableHeadingRow" },
|
|
14
|
+
children,
|
|
15
|
+
React.createElement("div", { className: "cfgExpandableHeadingRow__title cfgTextOverflow" }, heading)));
|
|
16
|
+
}
|
|
17
|
+
return (React.createElement("button", { className: `cfgExpandableHeadingRow cfgExpandableHeadingRow--expandable ${props.className || ""}`, style: props.style, onClick: onClick },
|
|
18
|
+
children,
|
|
19
|
+
React.createElement("div", { className: "cfgExpandableHeadingRow__title cfgTextOverflow" }, heading),
|
|
20
|
+
React.createElement("div", { className: "cfgExpandableHeadingRow__icon" }, symbol === ExpandableHeadingRowSymbol.Chevron ? (React.createElement(Chevron, { active: active })) : (React.createElement(CheckmarkWithBorder, { active: active })))));
|
|
21
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CssProps } from "../utilities";
|
|
3
|
-
interface SpinnerProps {
|
|
4
|
-
small?: boolean;
|
|
5
|
-
}
|
|
6
|
-
interface OverlayProps {
|
|
7
|
-
clickThrough?: boolean;
|
|
8
|
-
fullWindow?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const Loading: React.FC<SpinnerProps & CssProps>;
|
|
11
|
-
export declare const CenteredLoading: React.FC<CssProps>;
|
|
12
|
-
export declare const OverlayLoading: React.FC<OverlayProps & CssProps>;
|
|
13
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssProps } from "../utilities";
|
|
3
|
+
interface SpinnerProps {
|
|
4
|
+
small?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface OverlayProps {
|
|
7
|
+
clickThrough?: boolean;
|
|
8
|
+
fullWindow?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const Loading: React.FC<SpinnerProps & CssProps>;
|
|
11
|
+
export declare const CenteredLoading: React.FC<CssProps>;
|
|
12
|
+
export declare const OverlayLoading: React.FC<OverlayProps & CssProps>;
|
|
13
|
+
export {};
|
|
14
14
|
//# sourceMappingURL=Loading.d.ts.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const Loading = (props) => {
|
|
3
|
-
const { small } = props;
|
|
4
|
-
const smallClass = small ? "cfgLoading--small" : "";
|
|
5
|
-
return (React.createElement("div", { className: `cfgLoading ${smallClass} ${props.className || ""}`, style: props.style }));
|
|
6
|
-
};
|
|
7
|
-
const LoadingWithText = (props) => {
|
|
8
|
-
return (React.createElement("div", { className: `cfgLoadingWithText ${props.className || ""}`, style: props.style },
|
|
9
|
-
React.createElement(Loading, Object.assign({}, props)),
|
|
10
|
-
React.createElement("div", { className: "cfgLoadingWithText__text" }, "Loading")));
|
|
11
|
-
};
|
|
12
|
-
export const CenteredLoading = (props) => {
|
|
13
|
-
return (React.createElement("div", { className: `cfgCenteredLoading ${props.className || ""}`, style: props.style },
|
|
14
|
-
React.createElement(LoadingWithText, null)));
|
|
15
|
-
};
|
|
16
|
-
export const OverlayLoading = (props) => {
|
|
17
|
-
const { clickThrough, fullWindow } = props;
|
|
18
|
-
return (React.createElement("div", { className: `cfgOverlayLoading ${clickThrough ? "cfgOverlayLoading--clickThrough" : ""} ${fullWindow ? "cfgOverlayLoading--fullWindow" : ""} ${props.className || ""}`, style: props.style },
|
|
19
|
-
React.createElement(LoadingWithText, null)));
|
|
20
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
export const Loading = (props) => {
|
|
3
|
+
const { small } = props;
|
|
4
|
+
const smallClass = small ? "cfgLoading--small" : "";
|
|
5
|
+
return (React.createElement("div", { className: `cfgLoading ${smallClass} ${props.className || ""}`, style: props.style }));
|
|
6
|
+
};
|
|
7
|
+
const LoadingWithText = (props) => {
|
|
8
|
+
return (React.createElement("div", { className: `cfgLoadingWithText ${props.className || ""}`, style: props.style },
|
|
9
|
+
React.createElement(Loading, Object.assign({}, props)),
|
|
10
|
+
React.createElement("div", { className: "cfgLoadingWithText__text" }, "Loading")));
|
|
11
|
+
};
|
|
12
|
+
export const CenteredLoading = (props) => {
|
|
13
|
+
return (React.createElement("div", { className: `cfgCenteredLoading ${props.className || ""}`, style: props.style },
|
|
14
|
+
React.createElement(LoadingWithText, null)));
|
|
15
|
+
};
|
|
16
|
+
export const OverlayLoading = (props) => {
|
|
17
|
+
const { clickThrough, fullWindow } = props;
|
|
18
|
+
return (React.createElement("div", { className: `cfgOverlayLoading ${clickThrough ? "cfgOverlayLoading--clickThrough" : ""} ${fullWindow ? "cfgOverlayLoading--fullWindow" : ""} ${props.className || ""}`, style: props.style },
|
|
19
|
+
React.createElement(LoadingWithText, null)));
|
|
20
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { CfgPrice } from "@configura/web-api";
|
|
2
|
-
import React, { ReactElement } from "react";
|
|
3
|
-
import { CssProps } from "../utilities.js";
|
|
4
|
-
interface Props {
|
|
5
|
-
description: string | undefined;
|
|
6
|
-
lang: string | undefined;
|
|
7
|
-
styleNr: string | undefined;
|
|
8
|
-
price: CfgPrice | undefined;
|
|
9
|
-
leftContent?: ReactElement;
|
|
10
|
-
rightContent?: ReactElement;
|
|
11
|
-
}
|
|
12
|
-
export declare const ProductInformation: React.FC<Props & CssProps>;
|
|
13
|
-
export {};
|
|
1
|
+
import { CfgPrice } from "@configura/web-api";
|
|
2
|
+
import React, { ReactElement } from "react";
|
|
3
|
+
import { CssProps } from "../utilities.js";
|
|
4
|
+
interface Props {
|
|
5
|
+
description: string | undefined;
|
|
6
|
+
lang: string | undefined;
|
|
7
|
+
styleNr: string | undefined;
|
|
8
|
+
price: CfgPrice | undefined;
|
|
9
|
+
leftContent?: ReactElement;
|
|
10
|
+
rightContent?: ReactElement;
|
|
11
|
+
}
|
|
12
|
+
export declare const ProductInformation: React.FC<Props & CssProps>;
|
|
13
|
+
export {};
|
|
14
14
|
//# sourceMappingURL=ProductInformation.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CfgPriceView } from "./CfgPriceView.js";
|
|
3
|
-
export const ProductInformation = (props) => {
|
|
4
|
-
const { styleNr, price, description, lang, leftContent, rightContent } = props;
|
|
5
|
-
return (React.createElement("div", { className: `cfgProductInfo ${props.className || ""}`, style: props.style },
|
|
6
|
-
React.createElement("div", { className: "cfgProductInfo__left" },
|
|
7
|
-
React.createElement("h2", { className: "cfgProductInfo__name cfgTextOverflow" }, description),
|
|
8
|
-
React.createElement("div", { className: "cfgProductInfo__number cfgTextOverflow" }, styleNr),
|
|
9
|
-
leftContent),
|
|
10
|
-
React.createElement("div", { className: "cfgProductInfo__right" },
|
|
11
|
-
React.createElement("div", { className: "cfgProductInfo__name cfgProductInfo__name--right" },
|
|
12
|
-
React.createElement(CfgPriceView, { price: price, lang: lang })),
|
|
13
|
-
rightContent)));
|
|
14
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CfgPriceView } from "./CfgPriceView.js";
|
|
3
|
+
export const ProductInformation = (props) => {
|
|
4
|
+
const { styleNr, price, description, lang, leftContent, rightContent } = props;
|
|
5
|
+
return (React.createElement("div", { className: `cfgProductInfo ${props.className || ""}`, style: props.style },
|
|
6
|
+
React.createElement("div", { className: "cfgProductInfo__left" },
|
|
7
|
+
React.createElement("h2", { className: "cfgProductInfo__name cfgTextOverflow" }, description),
|
|
8
|
+
React.createElement("div", { className: "cfgProductInfo__number cfgTextOverflow" }, styleNr),
|
|
9
|
+
leftContent),
|
|
10
|
+
React.createElement("div", { className: "cfgProductInfo__right" },
|
|
11
|
+
React.createElement("div", { className: "cfgProductInfo__name cfgProductInfo__name--right" },
|
|
12
|
+
React.createElement(CfgPriceView, { price: price, lang: lang })),
|
|
13
|
+
rightContent)));
|
|
14
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TaskHandler } from "@configura/web-api";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { CssProps } from "../utilities.js";
|
|
4
|
-
declare type Props = {
|
|
5
|
-
taskHandler: TaskHandler;
|
|
6
|
-
};
|
|
7
|
-
export declare const TaskListView: React.FC<Props & CssProps>;
|
|
8
|
-
export {};
|
|
1
|
+
import { TaskHandler } from "@configura/web-api";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { CssProps } from "../utilities.js";
|
|
4
|
+
declare type Props = {
|
|
5
|
+
taskHandler: TaskHandler;
|
|
6
|
+
};
|
|
7
|
+
export declare const TaskListView: React.FC<Props & CssProps>;
|
|
8
|
+
export {};
|
|
9
9
|
//# sourceMappingURL=TaskListView.d.ts.map
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { isRenderFormat } from "@configura/web-api";
|
|
2
|
-
import React, { useContext } from "react";
|
|
3
|
-
import { ErrorContext } from "./ErrorContext.js";
|
|
4
|
-
import { CircleXmarkIcon } from "./icons/CircleXmarkIcon.js";
|
|
5
|
-
import { DownloadIcon } from "./icons/DownloadIcon.js";
|
|
6
|
-
import { ErrorIcon } from "./icons/ErrorIcon.js";
|
|
7
|
-
import { Loading } from "./Loading.js";
|
|
8
|
-
export const TaskListView = (props) => {
|
|
9
|
-
var _a;
|
|
10
|
-
const tasks = props.taskHandler.tasks;
|
|
11
|
-
if (tasks.length === 0) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
return (React.createElement("div", { className: `cfgTaskList ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}`, style: props.style },
|
|
15
|
-
React.createElement("ul", null, tasks.map((task) => (React.createElement(TaskView, { task: task, key: task.uuid }))))));
|
|
16
|
-
};
|
|
17
|
-
const spinner = (React.createElement("span", { className: "cfgLoadingSizer" },
|
|
18
|
-
React.createElement(Loading, null)));
|
|
19
|
-
const TaskView = (props) => {
|
|
20
|
-
const { task } = props;
|
|
21
|
-
const { status, format, url, previewUrl } = task;
|
|
22
|
-
const setError = useContext(ErrorContext);
|
|
23
|
-
let icon;
|
|
24
|
-
let statusMessage;
|
|
25
|
-
switch (status) {
|
|
26
|
-
case "pending":
|
|
27
|
-
icon = spinner;
|
|
28
|
-
statusMessage = `Pending ${format.toUpperCase()} ${isRenderFormat(format) ? "render" : "export"}...`;
|
|
29
|
-
break;
|
|
30
|
-
case "running":
|
|
31
|
-
icon = spinner;
|
|
32
|
-
statusMessage = `${isRenderFormat(format) ? "Rendering" : "Exporting"} ${format.toUpperCase()}...`;
|
|
33
|
-
break;
|
|
34
|
-
case "finished":
|
|
35
|
-
icon = React.createElement(DownloadIcon, null);
|
|
36
|
-
statusMessage = `Download ${format.toUpperCase()}`;
|
|
37
|
-
break;
|
|
38
|
-
case "failed":
|
|
39
|
-
icon = React.createElement(ErrorIcon, null);
|
|
40
|
-
statusMessage = `Failed ${isRenderFormat(format) ? "rendering" : "export"} ${format.toUpperCase()}`;
|
|
41
|
-
break;
|
|
42
|
-
default:
|
|
43
|
-
icon = undefined;
|
|
44
|
-
statusMessage = "";
|
|
45
|
-
}
|
|
46
|
-
return (React.createElement("li", { className: "cfgTaskList__item" },
|
|
47
|
-
React.createElement("div", { className: "cfgTaskList__preview" }, previewUrl && React.createElement("img", { src: previewUrl, alt: `Preview of ${statusMessage}` })),
|
|
48
|
-
React.createElement("div", { className: "cfgTaskList__icon" }, url === undefined ? (icon) : (React.createElement("a", { href: url, title: statusMessage }, icon))),
|
|
49
|
-
React.createElement("div", { className: "cfgTaskList__status" },
|
|
50
|
-
url === undefined ? (statusMessage) : (React.createElement("a", { href: url, title: statusMessage }, statusMessage)),
|
|
51
|
-
status === "failed" && (React.createElement(React.Fragment, null,
|
|
52
|
-
" ",
|
|
53
|
-
React.createElement("button", { className: "cfgTaskList__restart", onClick: () => {
|
|
54
|
-
task.restart().catch((e) => {
|
|
55
|
-
setError(e);
|
|
56
|
-
throw e;
|
|
57
|
-
});
|
|
58
|
-
} }, "Restart")))),
|
|
59
|
-
React.createElement("button", { className: "cfgTaskList__abort", onClick: () => {
|
|
60
|
-
try {
|
|
61
|
-
task.abort();
|
|
62
|
-
}
|
|
63
|
-
catch (e) {
|
|
64
|
-
setError(e);
|
|
65
|
-
throw e;
|
|
66
|
-
}
|
|
67
|
-
} },
|
|
68
|
-
React.createElement(CircleXmarkIcon, null))));
|
|
69
|
-
};
|
|
1
|
+
import { isRenderFormat } from "@configura/web-api";
|
|
2
|
+
import React, { useContext } from "react";
|
|
3
|
+
import { ErrorContext } from "./ErrorContext.js";
|
|
4
|
+
import { CircleXmarkIcon } from "./icons/CircleXmarkIcon.js";
|
|
5
|
+
import { DownloadIcon } from "./icons/DownloadIcon.js";
|
|
6
|
+
import { ErrorIcon } from "./icons/ErrorIcon.js";
|
|
7
|
+
import { Loading } from "./Loading.js";
|
|
8
|
+
export const TaskListView = (props) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const tasks = props.taskHandler.tasks;
|
|
11
|
+
if (tasks.length === 0) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return (React.createElement("div", { className: `cfgTaskList ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}`, style: props.style },
|
|
15
|
+
React.createElement("ul", null, tasks.map((task) => (React.createElement(TaskView, { task: task, key: task.uuid }))))));
|
|
16
|
+
};
|
|
17
|
+
const spinner = (React.createElement("span", { className: "cfgLoadingSizer" },
|
|
18
|
+
React.createElement(Loading, null)));
|
|
19
|
+
const TaskView = (props) => {
|
|
20
|
+
const { task } = props;
|
|
21
|
+
const { status, format, url, previewUrl } = task;
|
|
22
|
+
const setError = useContext(ErrorContext);
|
|
23
|
+
let icon;
|
|
24
|
+
let statusMessage;
|
|
25
|
+
switch (status) {
|
|
26
|
+
case "pending":
|
|
27
|
+
icon = spinner;
|
|
28
|
+
statusMessage = `Pending ${format.toUpperCase()} ${isRenderFormat(format) ? "render" : "export"}...`;
|
|
29
|
+
break;
|
|
30
|
+
case "running":
|
|
31
|
+
icon = spinner;
|
|
32
|
+
statusMessage = `${isRenderFormat(format) ? "Rendering" : "Exporting"} ${format.toUpperCase()}...`;
|
|
33
|
+
break;
|
|
34
|
+
case "finished":
|
|
35
|
+
icon = React.createElement(DownloadIcon, null);
|
|
36
|
+
statusMessage = `Download ${format.toUpperCase()}`;
|
|
37
|
+
break;
|
|
38
|
+
case "failed":
|
|
39
|
+
icon = React.createElement(ErrorIcon, null);
|
|
40
|
+
statusMessage = `Failed ${isRenderFormat(format) ? "rendering" : "export"} ${format.toUpperCase()}`;
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
icon = undefined;
|
|
44
|
+
statusMessage = "";
|
|
45
|
+
}
|
|
46
|
+
return (React.createElement("li", { className: "cfgTaskList__item" },
|
|
47
|
+
React.createElement("div", { className: "cfgTaskList__preview" }, previewUrl && React.createElement("img", { src: previewUrl, alt: `Preview of ${statusMessage}` })),
|
|
48
|
+
React.createElement("div", { className: "cfgTaskList__icon" }, url === undefined ? (icon) : (React.createElement("a", { href: url, title: statusMessage }, icon))),
|
|
49
|
+
React.createElement("div", { className: "cfgTaskList__status" },
|
|
50
|
+
url === undefined ? (statusMessage) : (React.createElement("a", { href: url, title: statusMessage }, statusMessage)),
|
|
51
|
+
status === "failed" && (React.createElement(React.Fragment, null,
|
|
52
|
+
" ",
|
|
53
|
+
React.createElement("button", { className: "cfgTaskList__restart", onClick: () => {
|
|
54
|
+
task.restart().catch((e) => {
|
|
55
|
+
setError(e);
|
|
56
|
+
throw e;
|
|
57
|
+
});
|
|
58
|
+
} }, "Restart")))),
|
|
59
|
+
React.createElement("button", { className: "cfgTaskList__abort", onClick: () => {
|
|
60
|
+
try {
|
|
61
|
+
task.abort();
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
setError(e);
|
|
65
|
+
throw e;
|
|
66
|
+
}
|
|
67
|
+
} },
|
|
68
|
+
React.createElement(CircleXmarkIcon, null))));
|
|
69
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { CfgProduct, RenderOrExportFormat, RenderTaskParams, TaskHandler } from "@configura/web-api";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { CssProps } from "../utilities.js";
|
|
4
|
-
declare type Props = {
|
|
5
|
-
taskHandler: TaskHandler;
|
|
6
|
-
product: CfgProduct;
|
|
7
|
-
renderTaskParams: (() => RenderTaskParams) | RenderTaskParams | undefined;
|
|
8
|
-
getPreviewUrl: (() => Promise<string>) | undefined;
|
|
9
|
-
formats?: RenderOrExportFormat[];
|
|
10
|
-
};
|
|
11
|
-
export declare const TaskStartView: React.FC<Props & CssProps>;
|
|
12
|
-
export {};
|
|
1
|
+
import { CfgProduct, RenderOrExportFormat, RenderTaskParams, TaskHandler } from "@configura/web-api";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { CssProps } from "../utilities.js";
|
|
4
|
+
declare type Props = {
|
|
5
|
+
taskHandler: TaskHandler;
|
|
6
|
+
product: CfgProduct;
|
|
7
|
+
renderTaskParams: (() => RenderTaskParams) | RenderTaskParams | undefined;
|
|
8
|
+
getPreviewUrl: (() => Promise<string>) | undefined;
|
|
9
|
+
formats?: RenderOrExportFormat[];
|
|
10
|
+
};
|
|
11
|
+
export declare const TaskStartView: React.FC<Props & CssProps>;
|
|
12
|
+
export {};
|
|
13
13
|
//# sourceMappingURL=TaskStartView.d.ts.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import React, { useContext } from "react";
|
|
2
|
-
import { ErrorContext } from "./ErrorContext.js";
|
|
3
|
-
export const TaskStartView = (props) => {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
const { taskHandler, product, renderTaskParams, getPreviewUrl } = props;
|
|
6
|
-
const setError = useContext(ErrorContext);
|
|
7
|
-
const formats = (_a = props.formats) !== null && _a !== void 0 ? _a : taskHandler.availableFormats;
|
|
8
|
-
if (formats.length === 0) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
return (React.createElement("div", { className: `cfgTaskStart ${(_b = props.className) !== null && _b !== void 0 ? _b : ""}`, style: props.style },
|
|
12
|
-
React.createElement("div", { className: "cfgFormSelect" },
|
|
13
|
-
React.createElement("select", { value: "", onChange: (event) => {
|
|
14
|
-
const index = event.target.selectedIndex;
|
|
15
|
-
if (index === 0) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
taskHandler
|
|
19
|
-
.start(formats[index - 1], product, typeof renderTaskParams === "function"
|
|
20
|
-
? renderTaskParams()
|
|
21
|
-
: renderTaskParams, getPreviewUrl)
|
|
22
|
-
.catch((e) => {
|
|
23
|
-
setError(e);
|
|
24
|
-
throw e;
|
|
25
|
-
});
|
|
26
|
-
} },
|
|
27
|
-
React.createElement("option", { value: "" }, "Export"),
|
|
28
|
-
formats.map((format) => (React.createElement("option", { value: format, key: format }, format)))))));
|
|
29
|
-
};
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
|
+
import { ErrorContext } from "./ErrorContext.js";
|
|
3
|
+
export const TaskStartView = (props) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
const { taskHandler, product, renderTaskParams, getPreviewUrl } = props;
|
|
6
|
+
const setError = useContext(ErrorContext);
|
|
7
|
+
const formats = (_a = props.formats) !== null && _a !== void 0 ? _a : taskHandler.availableFormats;
|
|
8
|
+
if (formats.length === 0) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return (React.createElement("div", { className: `cfgTaskStart ${(_b = props.className) !== null && _b !== void 0 ? _b : ""}`, style: props.style },
|
|
12
|
+
React.createElement("div", { className: "cfgFormSelect" },
|
|
13
|
+
React.createElement("select", { value: "", onChange: (event) => {
|
|
14
|
+
const index = event.target.selectedIndex;
|
|
15
|
+
if (index === 0) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
taskHandler
|
|
19
|
+
.start(formats[index - 1], product, typeof renderTaskParams === "function"
|
|
20
|
+
? renderTaskParams()
|
|
21
|
+
: renderTaskParams, getPreviewUrl)
|
|
22
|
+
.catch((e) => {
|
|
23
|
+
setError(e);
|
|
24
|
+
throw e;
|
|
25
|
+
});
|
|
26
|
+
} },
|
|
27
|
+
React.createElement("option", { value: "" }, "Export"),
|
|
28
|
+
formats.map((format) => (React.createElement("option", { value: format, key: format }, format)))))));
|
|
29
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CssProps } from "../../utilities";
|
|
3
|
-
export declare const CheckmarkWithBorder: React.FC<{
|
|
4
|
-
active: boolean;
|
|
5
|
-
} & CssProps>;
|
|
6
|
-
export declare const Checkmark: React.FC<CssProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssProps } from "../../utilities";
|
|
3
|
+
export declare const CheckmarkWithBorder: React.FC<{
|
|
4
|
+
active: boolean;
|
|
5
|
+
} & CssProps>;
|
|
6
|
+
export declare const Checkmark: React.FC<CssProps>;
|
|
7
7
|
//# sourceMappingURL=Checkmark.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const CheckmarkWithBorder = (props) => {
|
|
3
|
-
const { active } = props;
|
|
4
|
-
return (React.createElement("div", { className: `cfgCheckmark__border ${props.className || ""} ${active ? "cfgCheckmark__border--active" : ""}`, style: props.style }, active && React.createElement(Checkmark, null)));
|
|
5
|
-
};
|
|
6
|
-
export const Checkmark = (props) => {
|
|
7
|
-
return (React.createElement("span", { className: `cfgCheckmark ${props.className || ""}`, style: props.style },
|
|
8
|
-
React.createElement("svg", { height: "100%", preserveAspectRatio: "xMidYMid", version: "1.1", viewBox: "0 0 100 100", width: "100%", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
|
-
React.createElement("g", { className: "cfgCheckmark__container" },
|
|
10
|
-
React.createElement("line", { className: "cfgCheckmark__line cfgCheckmark__lineLeft", x1: "10", y1: "30", x2: "30", y2: "30" }),
|
|
11
|
-
React.createElement("line", { className: "cfgCheckmark__line cfgCheckmark__lineRight", x1: "90", y1: "50", x2: "50", y2: "50" })))));
|
|
12
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
export const CheckmarkWithBorder = (props) => {
|
|
3
|
+
const { active } = props;
|
|
4
|
+
return (React.createElement("div", { className: `cfgCheckmark__border ${props.className || ""} ${active ? "cfgCheckmark__border--active" : ""}`, style: props.style }, active && React.createElement(Checkmark, null)));
|
|
5
|
+
};
|
|
6
|
+
export const Checkmark = (props) => {
|
|
7
|
+
return (React.createElement("span", { className: `cfgCheckmark ${props.className || ""}`, style: props.style },
|
|
8
|
+
React.createElement("svg", { height: "100%", preserveAspectRatio: "xMidYMid", version: "1.1", viewBox: "0 0 100 100", width: "100%", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
|
+
React.createElement("g", { className: "cfgCheckmark__container" },
|
|
10
|
+
React.createElement("line", { className: "cfgCheckmark__line cfgCheckmark__lineLeft", x1: "10", y1: "30", x2: "30", y2: "30" }),
|
|
11
|
+
React.createElement("line", { className: "cfgCheckmark__line cfgCheckmark__lineRight", x1: "90", y1: "50", x2: "50", y2: "50" })))));
|
|
12
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CssProps } from "../../utilities";
|
|
3
|
-
export interface Props {
|
|
4
|
-
active: boolean;
|
|
5
|
-
up?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const Chevron: React.FC<Props & CssProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssProps } from "../../utilities";
|
|
3
|
+
export interface Props {
|
|
4
|
+
active: boolean;
|
|
5
|
+
up?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const Chevron: React.FC<Props & CssProps>;
|
|
8
8
|
//# sourceMappingURL=Chevron.d.ts.map
|