@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.
Files changed (118) hide show
  1. package/.eslintrc.json +5 -0
  2. package/.postcssrc.json +8 -8
  3. package/LICENSE +201 -201
  4. package/README.md +1 -1
  5. package/dist/components/CanvasWrapper.d.ts +9 -9
  6. package/dist/components/CanvasWrapper.js +8 -8
  7. package/dist/components/CfgPriceView.d.ts +6 -6
  8. package/dist/components/CfgPriceView.js +13 -13
  9. package/dist/components/ConfigurationActionsButtonRow.d.ts +14 -14
  10. package/dist/components/ConfigurationActionsButtonRow.js +16 -16
  11. package/dist/components/Configurator.d.ts +12 -12
  12. package/dist/components/Configurator.js +15 -15
  13. package/dist/components/ConfiguratorWrapper.d.ts +8 -8
  14. package/dist/components/ConfiguratorWrapper.js +5 -5
  15. package/dist/components/CurrencyPrice.d.ts +9 -9
  16. package/dist/components/CurrencyPrice.js +7 -7
  17. package/dist/components/ErrorContext.d.ts +2 -2
  18. package/dist/components/ErrorContext.js +2 -2
  19. package/dist/components/ExpandableHeadingRow.d.ts +15 -15
  20. package/dist/components/ExpandableHeadingRow.js +23 -21
  21. package/dist/components/Loading.d.ts +13 -13
  22. package/dist/components/Loading.js +20 -20
  23. package/dist/components/ProductInformation.d.ts +13 -13
  24. package/dist/components/ProductInformation.js +14 -14
  25. package/dist/components/ResetButton.d.ts +9 -0
  26. package/dist/components/ResetButton.js +7 -0
  27. package/dist/components/ShareView.d.ts +4 -0
  28. package/dist/components/ShareView.js +21 -0
  29. package/dist/components/TaskListView.d.ts +8 -8
  30. package/dist/components/TaskListView.js +69 -69
  31. package/dist/components/TaskStartView.d.ts +12 -12
  32. package/dist/components/TaskStartView.js +29 -29
  33. package/dist/components/icons/Checkmark.d.ts +6 -6
  34. package/dist/components/icons/Checkmark.js +12 -12
  35. package/dist/components/icons/Chevron.d.ts +7 -7
  36. package/dist/components/icons/Chevron.js +18 -18
  37. package/dist/components/icons/CircleXmarkIcon.d.ts +3 -3
  38. package/dist/components/icons/CircleXmarkIcon.js +8 -8
  39. package/dist/components/icons/DownloadIcon.d.ts +3 -3
  40. package/dist/components/icons/DownloadIcon.js +8 -8
  41. package/dist/components/icons/ErrorIcon.d.ts +3 -3
  42. package/dist/components/icons/ErrorIcon.js +8 -8
  43. package/dist/components/productConfiguration/CfgAdditionalProductView.d.ts +3 -3
  44. package/dist/components/productConfiguration/CfgAdditionalProductView.js +46 -42
  45. package/dist/components/productConfiguration/CfgCheckboxView.d.ts +4 -7
  46. package/dist/components/productConfiguration/CfgCheckboxView.js +7 -29
  47. package/dist/components/productConfiguration/CfgCheckboxesView.d.ts +4 -7
  48. package/dist/components/productConfiguration/CfgCheckboxesView.js +20 -18
  49. package/dist/components/productConfiguration/CfgConfigurationCommonView.d.ts +8 -0
  50. package/dist/components/productConfiguration/CfgConfigurationCommonView.js +8 -0
  51. package/dist/components/productConfiguration/CfgDropdownOptionView.d.ts +4 -7
  52. package/dist/components/productConfiguration/CfgDropdownOptionView.js +23 -44
  53. package/dist/components/productConfiguration/CfgDropdownView.d.ts +4 -7
  54. package/dist/components/productConfiguration/CfgDropdownView.js +23 -20
  55. package/dist/components/productConfiguration/CfgFeatureView.d.ts +72 -31
  56. package/dist/components/productConfiguration/CfgFeatureView.js +76 -60
  57. package/dist/components/productConfiguration/CfgGroupView.d.ts +4 -4
  58. package/dist/components/productConfiguration/CfgGroupView.js +7 -7
  59. package/dist/components/productConfiguration/CfgMiscFile.d.ts +5 -0
  60. package/dist/components/productConfiguration/CfgMiscFile.js +9 -0
  61. package/dist/components/productConfiguration/CfgMiscFiles.d.ts +5 -0
  62. package/dist/components/productConfiguration/CfgMiscFiles.js +5 -0
  63. package/dist/components/productConfiguration/CfgNote.d.ts +5 -0
  64. package/dist/components/productConfiguration/CfgNote.js +15 -0
  65. package/dist/components/productConfiguration/CfgNotes.d.ts +5 -0
  66. package/dist/components/productConfiguration/CfgNotes.js +5 -0
  67. package/dist/components/productConfiguration/CfgOptionCommonView.d.ts +7 -0
  68. package/dist/components/productConfiguration/CfgOptionCommonView.js +48 -0
  69. package/dist/components/productConfiguration/CfgOptionNumericView.d.ts +29 -29
  70. package/dist/components/productConfiguration/CfgOptionNumericView.js +132 -132
  71. package/dist/components/productConfiguration/CfgOptionPriceView.d.ts +9 -9
  72. package/dist/components/productConfiguration/CfgOptionPriceView.js +31 -29
  73. package/dist/components/productConfiguration/CfgProductConfigurationView.d.ts +22 -22
  74. package/dist/components/productConfiguration/CfgProductConfigurationView.js +50 -47
  75. package/dist/css/web-ui.css +1 -1
  76. package/dist/css/web-ui.css.map +1 -1
  77. package/dist/index.d.ts +29 -24
  78. package/dist/index.js +29 -24
  79. package/dist/scss/_button.scss +52 -52
  80. package/dist/scss/_configurator.scss +132 -88
  81. package/dist/scss/_expandable.scss +38 -37
  82. package/dist/scss/_feature-item.scss +142 -137
  83. package/dist/scss/_forms.scss +44 -42
  84. package/dist/scss/_hr.scss +16 -16
  85. package/dist/scss/_loading.scss +98 -98
  86. package/dist/scss/_misc-file-and-note.scss +44 -0
  87. package/dist/scss/_mixins.scss +56 -56
  88. package/dist/scss/_option-tree.scss +29 -29
  89. package/dist/scss/_product-information.scss +53 -49
  90. package/dist/scss/_range-view.scss +39 -39
  91. package/dist/scss/_slider.scss +70 -70
  92. package/dist/scss/_tasks.scss +72 -72
  93. package/dist/scss/_themed.scss +156 -149
  94. package/dist/scss/_utilities.scss +21 -21
  95. package/dist/scss/_variables.scss +6 -6
  96. package/dist/scss/icons/_checkmark.scss +46 -46
  97. package/dist/scss/icons/_chevron.scss +62 -62
  98. package/dist/scss/icons/_circle-xmark-icon.scss +24 -24
  99. package/dist/scss/icons/_download-icon.scss +24 -24
  100. package/dist/scss/icons/_error-icon.scss +24 -24
  101. package/dist/scss/web-ui.scss +11 -11
  102. package/dist/useCatParams.d.ts +17 -17
  103. package/dist/useCatParams.js +29 -29
  104. package/dist/useObservable.d.ts +4 -4
  105. package/dist/useObservable.js +18 -18
  106. package/dist/useRerender.d.ts +1 -1
  107. package/dist/useRerender.js +5 -5
  108. package/dist/useResize.d.ts +6 -6
  109. package/dist/useResize.js +47 -47
  110. package/dist/useSelected.d.ts +2 -2
  111. package/dist/useSelected.js +13 -13
  112. package/dist/useUniqueId.d.ts +1 -1
  113. package/dist/useUniqueId.js +3 -7
  114. package/dist/utilities.d.ts +5 -5
  115. package/dist/utilities.js +1 -1
  116. package/package.json +3 -3
  117. package/dist/components/productConfiguration/CfgOptionFeaturesView.d.ts +0 -4
  118. package/dist/components/productConfiguration/CfgOptionFeaturesView.js +0 -13
@@ -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
+ }
@@ -1,2 +1,2 @@
1
- export declare const useUuid: () => string;
1
+ export declare const useUuid: () => string;
2
2
  //# sourceMappingURL=useUniqueId.d.ts.map
@@ -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()}`, []);
@@ -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-alpha.9",
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-alpha.9"
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": "734f4e65f7d3dc9836c5c0321dbe6c36bbfa2531"
67
+ "gitHead": "efc959fe673f0ef172d332fae1bd53093f88b134"
68
68
  }
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import { CfgOptionViewProps } from "./CfgFeatureView.js";
3
- export declare const CfgOptionFeaturesView: React.FC<CfgOptionViewProps>;
4
- //# sourceMappingURL=CfgOptionFeaturesView.d.ts.map
@@ -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
- };