@configura/web-ui 2.1.0-alpha.1 → 2.1.0-alpha.3

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 (115) hide show
  1. package/.eslintrc.json +5 -5
  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 -23
  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 +8 -8
  26. package/dist/components/ResetButton.js +7 -7
  27. package/dist/components/ShareView.d.ts +3 -3
  28. package/dist/components/ShareView.js +21 -21
  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 -46
  45. package/dist/components/productConfiguration/CfgCheckboxView.d.ts +4 -4
  46. package/dist/components/productConfiguration/CfgCheckboxView.js +7 -7
  47. package/dist/components/productConfiguration/CfgCheckboxesView.d.ts +4 -4
  48. package/dist/components/productConfiguration/CfgCheckboxesView.js +20 -20
  49. package/dist/components/productConfiguration/CfgConfigurationCommonView.d.ts +7 -7
  50. package/dist/components/productConfiguration/CfgConfigurationCommonView.js +8 -8
  51. package/dist/components/productConfiguration/CfgDropdownOptionView.d.ts +4 -4
  52. package/dist/components/productConfiguration/CfgDropdownOptionView.js +23 -23
  53. package/dist/components/productConfiguration/CfgDropdownView.d.ts +4 -4
  54. package/dist/components/productConfiguration/CfgDropdownView.js +23 -23
  55. package/dist/components/productConfiguration/CfgFeatureView.d.ts +72 -72
  56. package/dist/components/productConfiguration/CfgFeatureView.js +77 -76
  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 +4 -4
  60. package/dist/components/productConfiguration/CfgMiscFile.js +9 -9
  61. package/dist/components/productConfiguration/CfgMiscFiles.d.ts +4 -4
  62. package/dist/components/productConfiguration/CfgMiscFiles.js +5 -5
  63. package/dist/components/productConfiguration/CfgNote.d.ts +4 -4
  64. package/dist/components/productConfiguration/CfgNote.js +15 -15
  65. package/dist/components/productConfiguration/CfgNotes.d.ts +4 -4
  66. package/dist/components/productConfiguration/CfgNotes.js +5 -5
  67. package/dist/components/productConfiguration/CfgOptionCommonView.d.ts +6 -6
  68. package/dist/components/productConfiguration/CfgOptionCommonView.js +53 -50
  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 -31
  73. package/dist/components/productConfiguration/CfgProductConfigurationView.d.ts +24 -22
  74. package/dist/components/productConfiguration/CfgProductConfigurationView.js +50 -50
  75. package/dist/css/web-ui.css.map +1 -1
  76. package/dist/index.d.ts +29 -29
  77. package/dist/index.js +29 -29
  78. package/dist/scss/_button.scss +52 -52
  79. package/dist/scss/_configurator.scss +132 -132
  80. package/dist/scss/_expandable.scss +38 -38
  81. package/dist/scss/_feature-item.scss +146 -146
  82. package/dist/scss/_forms.scss +44 -44
  83. package/dist/scss/_hr.scss +16 -16
  84. package/dist/scss/_loading.scss +98 -98
  85. package/dist/scss/_misc-file-and-note.scss +44 -44
  86. package/dist/scss/_mixins.scss +56 -56
  87. package/dist/scss/_option-tree.scss +29 -29
  88. package/dist/scss/_product-information.scss +53 -53
  89. package/dist/scss/_range-view.scss +39 -39
  90. package/dist/scss/_slider.scss +70 -70
  91. package/dist/scss/_tasks.scss +72 -72
  92. package/dist/scss/_themed.scss +156 -156
  93. package/dist/scss/_utilities.scss +21 -21
  94. package/dist/scss/_variables.scss +6 -6
  95. package/dist/scss/icons/_checkmark.scss +46 -46
  96. package/dist/scss/icons/_chevron.scss +62 -62
  97. package/dist/scss/icons/_circle-xmark-icon.scss +24 -24
  98. package/dist/scss/icons/_download-icon.scss +24 -24
  99. package/dist/scss/icons/_error-icon.scss +24 -24
  100. package/dist/scss/web-ui.scss +11 -11
  101. package/dist/useCatParams.d.ts +17 -17
  102. package/dist/useCatParams.js +29 -29
  103. package/dist/useObservable.d.ts +4 -4
  104. package/dist/useObservable.js +18 -18
  105. package/dist/useRerender.d.ts +1 -1
  106. package/dist/useRerender.js +5 -5
  107. package/dist/useResize.d.ts +6 -6
  108. package/dist/useResize.js +47 -47
  109. package/dist/useSelected.d.ts +2 -2
  110. package/dist/useSelected.js +13 -13
  111. package/dist/useUniqueId.d.ts +1 -1
  112. package/dist/useUniqueId.js +3 -3
  113. package/dist/utilities.d.ts +5 -5
  114. package/dist/utilities.js +1 -1
  115. package/package.json +3 -3
@@ -1,21 +1,21 @@
1
- /**
2
- * Web UI Utilities
3
- */
4
-
5
- .cfgMl1 {
6
- margin-left: 1em;
7
- }
8
-
9
- .cfgMt1 {
10
- margin-top: 1em;
11
- }
12
-
13
- .cfgMb1 {
14
- margin-bottom: 1em;
15
- }
16
-
17
- .cfgTextOverflow {
18
- overflow: hidden;
19
- text-overflow: ellipsis;
20
- white-space: nowrap;
21
- }
1
+ /**
2
+ * Web UI Utilities
3
+ */
4
+
5
+ .cfgMl1 {
6
+ margin-left: 1em;
7
+ }
8
+
9
+ .cfgMt1 {
10
+ margin-top: 1em;
11
+ }
12
+
13
+ .cfgMb1 {
14
+ margin-bottom: 1em;
15
+ }
16
+
17
+ .cfgTextOverflow {
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap;
21
+ }
@@ -1,6 +1,6 @@
1
- /**
2
- * Web UI Variables
3
- */
4
-
5
- $baseFontSize: 10px !default; // We use 10px for easy em conversion
6
- $overlayingZIndex: 1000 !default;
1
+ /**
2
+ * Web UI Variables
3
+ */
4
+
5
+ $baseFontSize: 10px !default; // We use 10px for easy em conversion
6
+ $overlayingZIndex: 1000 !default;
@@ -1,46 +1,46 @@
1
- @use "../mixins";
2
-
3
- @mixin classes($colorActive, $colorPassive) {
4
- .cfgCheckmark {
5
- /* The distance-units inside the checkmark are px even though everything
6
- else is relative units. The SVG has its own coordinate space. */
7
-
8
- @include mixins.cfgRootStyles;
9
-
10
- display: inline-block;
11
- width: 100%;
12
- height: 100%;
13
-
14
- &__container {
15
- transition: transform 0.4s;
16
- transform: translateY(17px);
17
- }
18
-
19
- &__line {
20
- stroke: $colorActive;
21
- stroke-linecap: round;
22
- stroke-width: 12;
23
- transform-origin: 50px 50px;
24
- transition: transform 0.4s, stroke 0.4s;
25
- }
26
-
27
- &__lineLeft {
28
- stroke: $colorActive;
29
- transform: rotate(40deg) translateY(24px) translateX(18px);
30
- }
31
-
32
- &__lineRight {
33
- stroke: $colorActive;
34
- transform: rotate(-50deg) translateY(-2px) translateX(-3px);
35
- }
36
-
37
- @content;
38
-
39
- &__border {
40
- @include mixins.cfgCheckbox($colorPassive);
41
- &--active {
42
- @include mixins.cfgCheckbox($colorActive);
43
- }
44
- }
45
- }
46
- }
1
+ @use "../mixins";
2
+
3
+ @mixin classes($colorActive, $colorPassive) {
4
+ .cfgCheckmark {
5
+ /* The distance-units inside the checkmark are px even though everything
6
+ else is relative units. The SVG has its own coordinate space. */
7
+
8
+ @include mixins.cfgRootStyles;
9
+
10
+ display: inline-block;
11
+ width: 100%;
12
+ height: 100%;
13
+
14
+ &__container {
15
+ transition: transform 0.4s;
16
+ transform: translateY(17px);
17
+ }
18
+
19
+ &__line {
20
+ stroke: $colorActive;
21
+ stroke-linecap: round;
22
+ stroke-width: 12;
23
+ transform-origin: 50px 50px;
24
+ transition: transform 0.4s, stroke 0.4s;
25
+ }
26
+
27
+ &__lineLeft {
28
+ stroke: $colorActive;
29
+ transform: rotate(40deg) translateY(24px) translateX(18px);
30
+ }
31
+
32
+ &__lineRight {
33
+ stroke: $colorActive;
34
+ transform: rotate(-50deg) translateY(-2px) translateX(-3px);
35
+ }
36
+
37
+ @content;
38
+
39
+ &__border {
40
+ @include mixins.cfgCheckbox($colorPassive);
41
+ &--active {
42
+ @include mixins.cfgCheckbox($colorActive);
43
+ }
44
+ }
45
+ }
46
+ }
@@ -1,62 +1,62 @@
1
- @use "../mixins";
2
-
3
- @mixin classes($activeColor, $passiveColor) {
4
- .cfgChevron {
5
- /* The distance-units inside the chevron are px even though everything
6
- else is relative units. The SVG has its own coordinate space. */
7
-
8
- @include mixins.cfgRootStyles;
9
-
10
- display: inline-block;
11
- width: 100%;
12
-
13
- &__container {
14
- transition: transform 0.4s;
15
-
16
- &--down {
17
- transform: translateY(13px);
18
- }
19
-
20
- &--up {
21
- transform: translateY(-13px);
22
- }
23
- }
24
-
25
- &__line {
26
- stroke-linecap: round;
27
- stroke-width: 10;
28
- transform-origin: 50px 50px;
29
- transition: transform 0.4s, stroke 0.4s;
30
- }
31
-
32
- &__lineLeft,
33
- &__lineRight {
34
- &--active {
35
- stroke: $activeColor;
36
- }
37
- &--passive {
38
- stroke: $passiveColor;
39
- }
40
- }
41
-
42
- &__lineLeft {
43
- &--down {
44
- transform: rotate(40deg);
45
- }
46
- &--up {
47
- transform: rotate(-40deg);
48
- }
49
- }
50
- &__lineRight {
51
- &--down {
52
- transform: rotate(-40deg);
53
- }
54
-
55
- &--up {
56
- transform: rotate(40deg);
57
- }
58
- }
59
-
60
- @content;
61
- }
62
- }
1
+ @use "../mixins";
2
+
3
+ @mixin classes($activeColor, $passiveColor) {
4
+ .cfgChevron {
5
+ /* The distance-units inside the chevron are px even though everything
6
+ else is relative units. The SVG has its own coordinate space. */
7
+
8
+ @include mixins.cfgRootStyles;
9
+
10
+ display: inline-block;
11
+ width: 100%;
12
+
13
+ &__container {
14
+ transition: transform 0.4s;
15
+
16
+ &--down {
17
+ transform: translateY(13px);
18
+ }
19
+
20
+ &--up {
21
+ transform: translateY(-13px);
22
+ }
23
+ }
24
+
25
+ &__line {
26
+ stroke-linecap: round;
27
+ stroke-width: 10;
28
+ transform-origin: 50px 50px;
29
+ transition: transform 0.4s, stroke 0.4s;
30
+ }
31
+
32
+ &__lineLeft,
33
+ &__lineRight {
34
+ &--active {
35
+ stroke: $activeColor;
36
+ }
37
+ &--passive {
38
+ stroke: $passiveColor;
39
+ }
40
+ }
41
+
42
+ &__lineLeft {
43
+ &--down {
44
+ transform: rotate(40deg);
45
+ }
46
+ &--up {
47
+ transform: rotate(-40deg);
48
+ }
49
+ }
50
+ &__lineRight {
51
+ &--down {
52
+ transform: rotate(-40deg);
53
+ }
54
+
55
+ &--up {
56
+ transform: rotate(40deg);
57
+ }
58
+ }
59
+
60
+ @content;
61
+ }
62
+ }
@@ -1,24 +1,24 @@
1
- @use "../mixins";
2
-
3
- @mixin classes($color) {
4
- .cfgCircleXmarkIcon {
5
- /* The distance-units inside the icon are px even though everything
6
- else is relative units. The SVG has its own coordinate space. */
7
-
8
- @include mixins.cfgRootStyles;
9
-
10
- display: inline-block;
11
- width: 100%;
12
- height: 100%;
13
-
14
- path,
15
- circle {
16
- stroke: $color;
17
- stroke-linecap: round;
18
- stroke-linejoin: round;
19
- stroke-width: 1.5;
20
- }
21
-
22
- @content;
23
- }
24
- }
1
+ @use "../mixins";
2
+
3
+ @mixin classes($color) {
4
+ .cfgCircleXmarkIcon {
5
+ /* The distance-units inside the icon are px even though everything
6
+ else is relative units. The SVG has its own coordinate space. */
7
+
8
+ @include mixins.cfgRootStyles;
9
+
10
+ display: inline-block;
11
+ width: 100%;
12
+ height: 100%;
13
+
14
+ path,
15
+ circle {
16
+ stroke: $color;
17
+ stroke-linecap: round;
18
+ stroke-linejoin: round;
19
+ stroke-width: 1.5;
20
+ }
21
+
22
+ @content;
23
+ }
24
+ }
@@ -1,24 +1,24 @@
1
- @use "../mixins";
2
-
3
- @mixin classes($color) {
4
- .cfgDownloadIcon {
5
- /* The distance-units inside the icon are px even though everything
6
- else is relative units. The SVG has its own coordinate space. */
7
-
8
- @include mixins.cfgRootStyles;
9
-
10
- display: inline-block;
11
- width: 100%;
12
- height: 100%;
13
-
14
- path,
15
- circle {
16
- stroke: $color;
17
- stroke-linecap: round;
18
- stroke-linejoin: round;
19
- stroke-width: 1.5;
20
- }
21
-
22
- @content;
23
- }
24
- }
1
+ @use "../mixins";
2
+
3
+ @mixin classes($color) {
4
+ .cfgDownloadIcon {
5
+ /* The distance-units inside the icon are px even though everything
6
+ else is relative units. The SVG has its own coordinate space. */
7
+
8
+ @include mixins.cfgRootStyles;
9
+
10
+ display: inline-block;
11
+ width: 100%;
12
+ height: 100%;
13
+
14
+ path,
15
+ circle {
16
+ stroke: $color;
17
+ stroke-linecap: round;
18
+ stroke-linejoin: round;
19
+ stroke-width: 1.5;
20
+ }
21
+
22
+ @content;
23
+ }
24
+ }
@@ -1,24 +1,24 @@
1
- @use "../mixins";
2
-
3
- @mixin classes($color) {
4
- .cfgErrorIcon {
5
- /* The distance-units inside the icon are px even though everything
6
- else is relative units. The SVG has its own coordinate space. */
7
-
8
- @include mixins.cfgRootStyles;
9
-
10
- display: inline-block;
11
- width: 100%;
12
- height: 100%;
13
-
14
- path,
15
- circle {
16
- stroke: $color;
17
- stroke-linecap: round;
18
- stroke-linejoin: round;
19
- stroke-width: 1.5;
20
- }
21
-
22
- @content;
23
- }
24
- }
1
+ @use "../mixins";
2
+
3
+ @mixin classes($color) {
4
+ .cfgErrorIcon {
5
+ /* The distance-units inside the icon are px even though everything
6
+ else is relative units. The SVG has its own coordinate space. */
7
+
8
+ @include mixins.cfgRootStyles;
9
+
10
+ display: inline-block;
11
+ width: 100%;
12
+ height: 100%;
13
+
14
+ path,
15
+ circle {
16
+ stroke: $color;
17
+ stroke-linecap: round;
18
+ stroke-linejoin: round;
19
+ stroke-width: 1.5;
20
+ }
21
+
22
+ @content;
23
+ }
24
+ }
@@ -1,11 +1,11 @@
1
- /**
2
- * Web UI Styling
3
- */
4
-
5
- @use "themed";
6
-
7
- @include themed.themed(themed.$lightTheme);
8
-
9
- .cfgDarkTheme {
10
- @include themed.themed(themed.$darkTheme);
11
- }
1
+ /**
2
+ * Web UI Styling
3
+ */
4
+
5
+ @use "themed";
6
+
7
+ @include themed.themed(themed.$lightTheme);
8
+
9
+ .cfgDarkTheme {
10
+ @include themed.themed(themed.$darkTheme);
11
+ }
@@ -1,18 +1,18 @@
1
- import { DtoCatalogueParamsWithCid, DtoCatalogueParamsWithCidAndLang, DtoProductParamsWithCid, DtoProductParamsWithCidAndLang } from "@configura/web-api";
2
- /**
3
- * Returns a memozied version of the catParams
4
- */
5
- export declare function useMemoCatalogueParams(catParams: DtoCatalogueParamsWithCid): DtoCatalogueParamsWithCid;
6
- /**
7
- * Returns a memozied version of the catParams
8
- */
9
- export declare function useMemoCatalogueParamsWithLang(catParams: DtoCatalogueParamsWithCidAndLang): DtoCatalogueParamsWithCidAndLang;
10
- /**
11
- * Returns a memozied version of the prodParams
12
- */
13
- export declare function useMemoProductParams(prodParams: DtoProductParamsWithCid): DtoProductParamsWithCid;
14
- /**
15
- * Returns a memozied version of the prodParams
16
- */
17
- export declare function useMemoProductParamsWithLang(prodParams: DtoProductParamsWithCidAndLang): DtoProductParamsWithCidAndLang;
1
+ import { DtoCatalogueParamsWithCid, DtoCatalogueParamsWithCidAndLang, DtoProductParamsWithCid, DtoProductParamsWithCidAndLang } from "@configura/web-api";
2
+ /**
3
+ * Returns a memozied version of the catParams
4
+ */
5
+ export declare function useMemoCatalogueParams(catParams: DtoCatalogueParamsWithCid): DtoCatalogueParamsWithCid;
6
+ /**
7
+ * Returns a memozied version of the catParams
8
+ */
9
+ export declare function useMemoCatalogueParamsWithLang(catParams: DtoCatalogueParamsWithCidAndLang): DtoCatalogueParamsWithCidAndLang;
10
+ /**
11
+ * Returns a memozied version of the prodParams
12
+ */
13
+ export declare function useMemoProductParams(prodParams: DtoProductParamsWithCid): DtoProductParamsWithCid;
14
+ /**
15
+ * Returns a memozied version of the prodParams
16
+ */
17
+ export declare function useMemoProductParamsWithLang(prodParams: DtoProductParamsWithCidAndLang): DtoProductParamsWithCidAndLang;
18
18
  //# sourceMappingURL=useCatParams.d.ts.map
@@ -1,29 +1,29 @@
1
- import { useMemo } from "react";
2
- /**
3
- * Returns a memozied version of the catParams
4
- */
5
- export function useMemoCatalogueParams(catParams) {
6
- const { cid, enterprise, prdCat, prdCatVersion, vendor, priceList } = catParams;
7
- return useMemo(() => ({ cid, enterprise, prdCat, prdCatVersion, vendor, priceList }), [cid, enterprise, prdCat, prdCatVersion, priceList, vendor]);
8
- }
9
- /**
10
- * Returns a memozied version of the catParams
11
- */
12
- export function useMemoCatalogueParamsWithLang(catParams) {
13
- const { lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList } = catParams;
14
- return useMemo(() => ({ lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList }), [lang, cid, enterprise, prdCat, prdCatVersion, priceList, vendor]);
15
- }
16
- /**
17
- * Returns a memozied version of the prodParams
18
- */
19
- export function useMemoProductParams(prodParams) {
20
- const { cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber } = prodParams;
21
- return useMemo(() => ({ cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber }), [cid, enterprise, prdCat, prdCatVersion, priceList, vendor, partNumber]);
22
- }
23
- /**
24
- * Returns a memozied version of the prodParams
25
- */
26
- export function useMemoProductParamsWithLang(prodParams) {
27
- const { lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber } = prodParams;
28
- return useMemo(() => ({ lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber }), [lang, cid, enterprise, prdCat, prdCatVersion, priceList, vendor, partNumber]);
29
- }
1
+ import { useMemo } from "react";
2
+ /**
3
+ * Returns a memozied version of the catParams
4
+ */
5
+ export function useMemoCatalogueParams(catParams) {
6
+ const { cid, enterprise, prdCat, prdCatVersion, vendor, priceList } = catParams;
7
+ return useMemo(() => ({ cid, enterprise, prdCat, prdCatVersion, vendor, priceList }), [cid, enterprise, prdCat, prdCatVersion, priceList, vendor]);
8
+ }
9
+ /**
10
+ * Returns a memozied version of the catParams
11
+ */
12
+ export function useMemoCatalogueParamsWithLang(catParams) {
13
+ const { lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList } = catParams;
14
+ return useMemo(() => ({ lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList }), [lang, cid, enterprise, prdCat, prdCatVersion, priceList, vendor]);
15
+ }
16
+ /**
17
+ * Returns a memozied version of the prodParams
18
+ */
19
+ export function useMemoProductParams(prodParams) {
20
+ const { cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber } = prodParams;
21
+ return useMemo(() => ({ cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber }), [cid, enterprise, prdCat, prdCatVersion, priceList, vendor, partNumber]);
22
+ }
23
+ /**
24
+ * Returns a memozied version of the prodParams
25
+ */
26
+ export function useMemoProductParamsWithLang(prodParams) {
27
+ const { lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber } = prodParams;
28
+ return useMemo(() => ({ lang, cid, enterprise, prdCat, prdCatVersion, vendor, priceList, partNumber }), [lang, cid, enterprise, prdCat, prdCatVersion, priceList, vendor, partNumber]);
29
+ }
@@ -1,5 +1,5 @@
1
- import { Observable } from "@configura/web-utilities";
2
- import { Dispatch, SetStateAction } from "react";
3
- export declare function useObservableWithCallback<T>(o: Observable<T> | undefined | null | false, callback: ((x: T) => void) | undefined): void;
4
- export declare function useObservableState<T>(o: Observable<T> | undefined, initValue: T): [T, Dispatch<SetStateAction<T>>];
1
+ import { Observable } from "@configura/web-utilities";
2
+ import { Dispatch, SetStateAction } from "react";
3
+ export declare function useObservableWithCallback<T>(o: Observable<T> | undefined | null | false, callback: ((x: T) => void) | undefined): void;
4
+ export declare function useObservableState<T>(o: Observable<T> | undefined, initValue: T): [T, Dispatch<SetStateAction<T>>];
5
5
  //# sourceMappingURL=useObservable.d.ts.map
@@ -1,18 +1,18 @@
1
- import { useEffect, useState } from "react";
2
- export function useObservableWithCallback(o, callback) {
3
- useEffect(() => {
4
- if (o === undefined || o === null || o === false || callback === undefined) {
5
- return;
6
- }
7
- o.listen(callback);
8
- return () => {
9
- o.stopListen(callback);
10
- };
11
- }, [o, callback]);
12
- }
13
- export function useObservableState(o, initValue) {
14
- const state = useState(initValue);
15
- const [, set] = state;
16
- useObservableWithCallback(o, set);
17
- return state;
18
- }
1
+ import { useEffect, useState } from "react";
2
+ export function useObservableWithCallback(o, callback) {
3
+ useEffect(() => {
4
+ if (o === undefined || o === null || o === false || callback === undefined) {
5
+ return;
6
+ }
7
+ o.listen(callback);
8
+ return () => {
9
+ o.stopListen(callback);
10
+ };
11
+ }, [o, callback]);
12
+ }
13
+ export function useObservableState(o, initValue) {
14
+ const state = useState(initValue);
15
+ const [, set] = state;
16
+ useObservableWithCallback(o, set);
17
+ return state;
18
+ }
@@ -1,2 +1,2 @@
1
- export declare function useRerender(): () => void;
1
+ export declare function useRerender(): () => void;
2
2
  //# sourceMappingURL=useRerender.d.ts.map
@@ -1,5 +1,5 @@
1
- import { useCallback, useState } from "react";
2
- export function useRerender() {
3
- const [, updateState] = useState({});
4
- return useCallback(() => updateState({}), []);
5
- }
1
+ import { useCallback, useState } from "react";
2
+ export function useRerender() {
3
+ const [, updateState] = useState({});
4
+ return useCallback(() => updateState({}), []);
5
+ }
@@ -1,7 +1,7 @@
1
- interface Size {
2
- width: number;
3
- height: number;
4
- }
5
- export declare function useResize(element?: Element): [Size, () => void];
6
- export {};
1
+ interface Size {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ export declare function useResize(element?: Element): [Size, () => void];
6
+ export {};
7
7
  //# sourceMappingURL=useResize.d.ts.map