@configura/web-ui 2.0.0-alpha.9 → 2.0.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/.eslintrc.json +5 -0
- 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 +23 -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/ResetButton.d.ts +9 -0
- package/dist/components/ResetButton.js +7 -0
- package/dist/components/ShareView.d.ts +4 -0
- package/dist/components/ShareView.js +21 -0
- 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 +46 -42
- package/dist/components/productConfiguration/CfgCheckboxView.d.ts +4 -7
- package/dist/components/productConfiguration/CfgCheckboxView.js +7 -29
- package/dist/components/productConfiguration/CfgCheckboxesView.d.ts +4 -7
- package/dist/components/productConfiguration/CfgCheckboxesView.js +20 -18
- package/dist/components/productConfiguration/CfgConfigurationCommonView.d.ts +8 -0
- package/dist/components/productConfiguration/CfgConfigurationCommonView.js +8 -0
- package/dist/components/productConfiguration/CfgDropdownOptionView.d.ts +4 -7
- package/dist/components/productConfiguration/CfgDropdownOptionView.js +23 -44
- package/dist/components/productConfiguration/CfgDropdownView.d.ts +4 -7
- package/dist/components/productConfiguration/CfgDropdownView.js +23 -20
- package/dist/components/productConfiguration/CfgFeatureView.d.ts +72 -31
- package/dist/components/productConfiguration/CfgFeatureView.js +76 -60
- package/dist/components/productConfiguration/CfgGroupView.d.ts +4 -4
- package/dist/components/productConfiguration/CfgGroupView.js +7 -7
- package/dist/components/productConfiguration/CfgMiscFile.d.ts +5 -0
- package/dist/components/productConfiguration/CfgMiscFile.js +9 -0
- package/dist/components/productConfiguration/CfgMiscFiles.d.ts +5 -0
- package/dist/components/productConfiguration/CfgMiscFiles.js +5 -0
- package/dist/components/productConfiguration/CfgNote.d.ts +5 -0
- package/dist/components/productConfiguration/CfgNote.js +15 -0
- package/dist/components/productConfiguration/CfgNotes.d.ts +5 -0
- package/dist/components/productConfiguration/CfgNotes.js +5 -0
- package/dist/components/productConfiguration/CfgOptionCommonView.d.ts +7 -0
- package/dist/components/productConfiguration/CfgOptionCommonView.js +48 -0
- 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 +31 -29
- package/dist/components/productConfiguration/CfgProductConfigurationView.d.ts +22 -22
- package/dist/components/productConfiguration/CfgProductConfigurationView.js +50 -47
- package/dist/css/web-ui.css +1 -1
- package/dist/css/web-ui.css.map +1 -1
- package/dist/index.d.ts +29 -24
- package/dist/index.js +29 -24
- package/dist/scss/_button.scss +52 -52
- package/dist/scss/_configurator.scss +132 -88
- package/dist/scss/_expandable.scss +38 -37
- package/dist/scss/_feature-item.scss +142 -137
- package/dist/scss/_forms.scss +44 -42
- package/dist/scss/_hr.scss +16 -16
- package/dist/scss/_loading.scss +98 -98
- package/dist/scss/_misc-file-and-note.scss +44 -0
- package/dist/scss/_mixins.scss +56 -56
- package/dist/scss/_option-tree.scss +29 -29
- package/dist/scss/_product-information.scss +53 -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 +156 -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 +17 -17
- package/dist/useCatParams.js +29 -29
- 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 +3 -7
- package/dist/utilities.d.ts +5 -5
- package/dist/utilities.js +1 -1
- package/package.json +3 -3
- package/dist/components/productConfiguration/CfgOptionFeaturesView.d.ts +0 -4
- package/dist/components/productConfiguration/CfgOptionFeaturesView.js +0 -13
package/dist/useSelected.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
export function useSelected(option) {
|
|
3
|
-
const [selected, setSelected] = useState(option.selected);
|
|
4
|
-
useEffect(() => {
|
|
5
|
-
setSelected(option.selected);
|
|
6
|
-
}, [option]);
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
const listener = () => setSelected(option.selected);
|
|
9
|
-
option.listenForChange(listener);
|
|
10
|
-
return () => option.stopListenForChange(listener);
|
|
11
|
-
}, [option]);
|
|
12
|
-
return selected;
|
|
13
|
-
}
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
export function useSelected(option) {
|
|
3
|
+
const [selected, setSelected] = useState(option.selected);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
setSelected(option.selected);
|
|
6
|
+
}, [option]);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const listener = () => setSelected(option.selected);
|
|
9
|
+
option.listenForChange(listener);
|
|
10
|
+
return () => option.stopListenForChange(listener);
|
|
11
|
+
}, [option]);
|
|
12
|
+
return selected;
|
|
13
|
+
}
|
package/dist/useUniqueId.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useUuid: () => string;
|
|
1
|
+
export declare const useUuid: () => string;
|
|
2
2
|
//# sourceMappingURL=useUniqueId.d.ts.map
|
package/dist/useUniqueId.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import { v4 } from "uuid";
|
|
3
|
-
export const useUuid = () => {
|
|
4
|
-
return useMemo(() => {
|
|
5
|
-
return `${v4()}`;
|
|
6
|
-
}, []);
|
|
7
|
-
};
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { v4 } from "uuid";
|
|
3
|
+
export const useUuid = () => useMemo(() => `${v4()}`, []);
|
package/dist/utilities.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CSSProperties } from "react";
|
|
2
|
-
export declare type CssProps = {
|
|
3
|
-
className?: string;
|
|
4
|
-
style?: CSSProperties;
|
|
5
|
-
};
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
export declare type CssProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
};
|
|
6
6
|
//# sourceMappingURL=utilities.d.ts.map
|
package/dist/utilities.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/web-ui",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@configura/web-api": "2.0.0
|
|
35
|
+
"@configura/web-api": "2.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@babel/preset-env": "^7.14.4",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "efc959fe673f0ef172d332fae1bd53093f88b134"
|
|
68
68
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CfgFeatureView, forwardProps } from "./CfgFeatureView.js";
|
|
3
|
-
export const CfgOptionFeaturesView = (props) => {
|
|
4
|
-
const { option } = props;
|
|
5
|
-
const { features, selected } = option;
|
|
6
|
-
if (!selected) {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
if (features.length === 0) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
return (React.createElement("ul", { className: "cfgOptionTree cfgOptionTree--subLevel cfgOptionTree--indent" }, features.map((f) => (React.createElement(CfgFeatureView, Object.assign({ feature: f, key: f.key }, forwardProps(props)))))));
|
|
13
|
-
};
|