thm-p3-configurator 0.0.183 → 0.0.184
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.
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.symbol.description.js");
|
|
4
4
|
require("core-js/modules/es.weak-map.js");
|
|
5
|
-
require("core-js/modules/esnext.iterator.map.js");
|
|
6
5
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
7
6
|
require("core-js/modules/es.weak-map.js");
|
|
8
7
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -10,8 +9,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
10
9
|
});
|
|
11
10
|
exports.default = void 0;
|
|
12
11
|
require("core-js/modules/es.symbol.description.js");
|
|
13
|
-
require("core-js/modules/esnext.iterator.map.js");
|
|
14
12
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
13
|
+
var _quillDeltaToHtml = require("quill-delta-to-html");
|
|
15
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
15
|
var _queries = require("../__api__/queries");
|
|
17
16
|
var _CardWide = _interopRequireDefault(require("../__components__/Cards/CardWide"));
|
|
@@ -52,7 +51,7 @@ function _interopRequireWildcard(e, r) {
|
|
|
52
51
|
return n.default = e, t && t.set(e, n), n;
|
|
53
52
|
}
|
|
54
53
|
const ProductDiscountCard = () => {
|
|
55
|
-
var _discountCodeInfo$
|
|
54
|
+
var _discountCodeInfo$des2, _discountCodeInfo$ima3;
|
|
56
55
|
const [{
|
|
57
56
|
licensePlate,
|
|
58
57
|
model,
|
|
@@ -76,6 +75,14 @@ const ProductDiscountCard = () => {
|
|
|
76
75
|
discountCode,
|
|
77
76
|
priceCalculationDate
|
|
78
77
|
});
|
|
78
|
+
const discountDescriptionHtml = (0, _react.useMemo)(() => {
|
|
79
|
+
var _discountCodeInfo$des;
|
|
80
|
+
if (discountCodeInfo !== null && discountCodeInfo !== void 0 && (_discountCodeInfo$des = discountCodeInfo.description) !== null && _discountCodeInfo$des !== void 0 && _discountCodeInfo$des.ops) {
|
|
81
|
+
const converter = new _quillDeltaToHtml.QuillDeltaToHtmlConverter(discountCodeInfo.description.ops, {});
|
|
82
|
+
return converter.convert();
|
|
83
|
+
}
|
|
84
|
+
return '';
|
|
85
|
+
}, [discountCodeInfo === null || discountCodeInfo === void 0 || (_discountCodeInfo$des2 = discountCodeInfo.description) === null || _discountCodeInfo$des2 === void 0 ? void 0 : _discountCodeInfo$des2.ops]);
|
|
79
86
|
|
|
80
87
|
/**
|
|
81
88
|
* @description Memoized and parsed discount image from Hyper
|
|
@@ -102,9 +109,11 @@ const ProductDiscountCard = () => {
|
|
|
102
109
|
className: (0, _helpers__.withStyle)('row')
|
|
103
110
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
104
111
|
className: (0, _helpers__.withStyle)('col-12')
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
}, discountDescriptionHtml && /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
+
dangerouslySetInnerHTML: {
|
|
114
|
+
__html: discountDescriptionHtml
|
|
115
|
+
}
|
|
116
|
+
}), /*#__PURE__*/_react.default.createElement(_ANWBMembershipInput.default, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
108
117
|
className: (0, _helpers__.withStyle)('col-12 col-md-6')
|
|
109
118
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
110
119
|
className: (0, _helpers__.withStyle)('fw-bold mb-2')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thm-p3-configurator",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.184",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"author": "EnoRm.",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"moment": "^2.29.1",
|
|
40
40
|
"node-gyp": "^10.0.1",
|
|
41
41
|
"path": "^0.12.7",
|
|
42
|
+
"quill-delta-to-html": "^0.12.1",
|
|
42
43
|
"react": "^17.0.2",
|
|
43
44
|
"react-datepicker": "^4.2.0",
|
|
44
45
|
"react-dom": "^17.0.2",
|