@ubnt/store.core 9.6.0-alpha.1 → 9.6.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/CHANGELOG.md +41 -1
- package/lib/assets/android.svg +3 -0
- package/lib/assets/close.svg +4 -1
- package/lib/assets/close2.svg +1 -4
- package/lib/assets/connectDisplay.jpg +0 -0
- package/lib/assets/icons/wizard/plus.svg.js +1 -1
- package/lib/assets/icons/wizard/plus.svg.mjs +2 -2
- package/lib/assets/plus.svg +4 -22
- package/lib/assets/plus2.svg +22 -4
- package/lib/assets/ucCast.jpg +0 -0
- package/lib/assets/ucCastPro.jpg +0 -0
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/CustomImage/CustomImage.js +1 -1
- package/lib/components/CustomImage/CustomImage.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.js +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.mjs +2 -2
- package/lib/components/GridGallery/GridModal/GridModal.js +1 -1
- package/lib/components/GridGallery/GridModal/GridModal.mjs +1 -1
- package/lib/components/Header/CartModalV2/CartModal.js +1 -1
- package/lib/components/Header/CartModalV2/CartModal.mjs +1 -1
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.mjs +1 -1
- package/lib/components/Header/ProHeader/ProHeader.js +23 -7
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +25 -9
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +0 -32
- package/lib/components/Header/ProHeader/ProHeader.styles.js +0 -32
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +2 -31
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.mjs +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +3 -1
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/ProfessionalAV/connectDisplay.jpg.js +27 -0
- package/lib/components/ModelCompareV3/assets/ProfessionalAV/connectDisplay.jpg.js.map +1 -0
- package/lib/components/ModelCompareV3/assets/ProfessionalAV/connectDisplay.jpg.mjs +3 -0
- package/lib/components/ModelCompareV3/assets/ProfessionalAV/connectDisplay.jpg.mjs.map +1 -0
- package/lib/components/ModelCompareV3/assets/android.svg.js +27 -0
- package/lib/components/ModelCompareV3/assets/android.svg.js.map +1 -0
- package/lib/components/ModelCompareV3/assets/android.svg.mjs +3 -0
- package/lib/components/ModelCompareV3/assets/android.svg.mjs.map +1 -0
- package/lib/components/ModelCompareV3/data/CloudGateways.js +7 -7
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +5 -5
- package/lib/components/ModelCompareV3/data/{DisplayCast.d.ts → ProfessionalAV.d.ts} +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalAV.js +26 -0
- package/lib/components/ModelCompareV3/data/ProfessionalAV.js.map +1 -0
- package/lib/components/ModelCompareV3/data/{DisplayCast.mjs → ProfessionalAV.mjs} +10 -7
- package/lib/components/ModelCompareV3/data/ProfessionalAV.mjs.map +1 -0
- package/lib/components/ModelCompareV3/data/index.d.ts +1 -1
- package/lib/components/ModelCompareV3/data/index.js +3 -3
- package/lib/components/ModelCompareV3/data/index.js.map +1 -1
- package/lib/components/ModelCompareV3/data/index.mjs +3 -3
- package/lib/components/ModelCompareV3/data/index.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/connectDisplay.d.ts +2 -0
- package/lib/components/ModelCompareV3/data/products/connectDisplay.js +105 -0
- package/lib/components/ModelCompareV3/data/products/connectDisplay.js.map +1 -0
- package/lib/components/ModelCompareV3/data/products/connectDisplay.mjs +97 -0
- package/lib/components/ModelCompareV3/data/products/connectDisplay.mjs.map +1 -0
- package/lib/components/ModelCompareV3/data/products/ucCast.js +17 -3
- package/lib/components/ModelCompareV3/data/products/ucCast.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucCast.mjs +18 -4
- package/lib/components/ModelCompareV3/data/products/ucCast.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucCastPro.js +18 -3
- package/lib/components/ModelCompareV3/data/products/ucCastPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucCastPro.mjs +19 -4
- package/lib/components/ModelCompareV3/data/products/ucCastPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udm.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udm.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/ModelCompareV3/data/properties/androidAppMode.d.ts +2 -0
- package/lib/components/ModelCompareV3/data/properties/androidAppMode.js +19 -0
- package/lib/components/ModelCompareV3/data/properties/androidAppMode.js.map +1 -0
- package/lib/components/ModelCompareV3/data/properties/androidAppMode.mjs +11 -0
- package/lib/components/ModelCompareV3/data/properties/androidAppMode.mjs.map +1 -0
- package/lib/components/ModelCompareV3/data/properties/index.d.ts +1 -0
- package/lib/components/ModelCompareV3/data/properties/index.js +2 -0
- package/lib/components/ModelCompareV3/data/properties/index.js.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs +1 -0
- package/lib/components/ModelCompareV3/data/properties/index.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.js +37 -27
- package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.mjs +37 -27
- package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
- package/lib/components/ProductWizard/ProductWizard.js +1 -1
- package/lib/components/ProductWizard/ProductWizard.mjs +1 -1
- package/lib/components/QuantityInput/QuantityInput.js +1 -1
- package/lib/components/QuantityInput/QuantityInput.mjs +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js +6 -7
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs +6 -7
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/Search/Input/Input.js +1 -1
- package/lib/components/Search/Input/Input.mjs +1 -1
- package/lib/components/Tooltip/Tooltip.d.ts +2 -0
- package/lib/components/Tooltip/Tooltip.js +38 -0
- package/lib/components/Tooltip/Tooltip.js.map +1 -0
- package/lib/components/Tooltip/Tooltip.mjs +36 -0
- package/lib/components/Tooltip/Tooltip.mjs.map +1 -0
- package/lib/components/Tooltip/Tooltip.styles.d.ts +32 -0
- package/lib/components/Tooltip/Tooltip.styles.js +44 -0
- package/lib/components/Tooltip/Tooltip.styles.js.map +1 -0
- package/lib/components/Tooltip/Tooltip.styles.mjs +34 -0
- package/lib/components/Tooltip/Tooltip.styles.mjs.map +1 -0
- package/lib/components/Tooltip/index.d.ts +1 -0
- package/lib/components/Tooltip/index.js +6 -0
- package/lib/components/Tooltip/index.js.map +1 -0
- package/lib/components/Tooltip/index.mjs +3 -0
- package/lib/components/Tooltip/index.mjs.map +1 -0
- package/lib/constants/icons/generic/close.svg.js +1 -1
- package/lib/constants/icons/generic/close.svg.mjs +2 -2
- package/lib/constants/icons/generic/index.js +1 -1
- package/lib/constants/icons/generic/index.mjs +1 -1
- package/lib/contexts/MenuContext/mapping.js +17 -2
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs +17 -2
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/utils/money/allocators/index.d.ts +1 -0
- package/lib/utils/money/allocators/index.js +2 -0
- package/lib/utils/money/allocators/index.js.map +1 -1
- package/lib/utils/money/allocators/index.mjs +1 -0
- package/lib/utils/money/allocators/index.mjs.map +1 -1
- package/lib/utils/money/allocators/productAmount.d.ts +13 -0
- package/lib/utils/money/allocators/productAmount.js +110 -0
- package/lib/utils/money/allocators/productAmount.js.map +1 -0
- package/lib/utils/money/allocators/productAmount.mjs +108 -0
- package/lib/utils/money/allocators/productAmount.mjs.map +1 -0
- package/lib/utils/money/exchangeRate.d.ts +1 -1
- package/lib/utils/money/exchangeRate.js.map +1 -1
- package/lib/utils/money/exchangeRate.mjs.map +1 -1
- package/lib/utils/money/types.d.ts +19 -5
- package/package.json +4 -4
- package/lib/components/ModelCompareV3/data/DisplayCast.js +0 -23
- package/lib/components/ModelCompareV3/data/DisplayCast.js.map +0 -1
- package/lib/components/ModelCompareV3/data/DisplayCast.mjs.map +0 -1
- /package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCast.jpg.js +0 -0
- /package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCast.jpg.js.map +0 -0
- /package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCast.jpg.mjs +0 -0
- /package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCast.jpg.mjs.map +0 -0
- /package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCastPro.jpg.js +0 -0
- /package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCastPro.jpg.js.map +0 -0
- /package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCastPro.jpg.mjs +0 -0
- /package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCastPro.jpg.mjs.map +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var fixedAmount = require('./fixedAmount.js');
|
|
4
|
+
var productAmount = require('./productAmount.js');
|
|
4
5
|
"use strict";
|
|
5
6
|
exports.FixedAmountAllocator = fixedAmount.FixedAmountAllocator;
|
|
7
|
+
exports.ProductAmountAllocator = productAmount.ProductAmountAllocator;
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FullLineItemSummary } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Helper class to distribute a total amount for a product
|
|
4
|
+
*/
|
|
5
|
+
export declare class ProductAmountAllocator {
|
|
6
|
+
#private;
|
|
7
|
+
/**
|
|
8
|
+
* Remaining quantity to allocate
|
|
9
|
+
*/
|
|
10
|
+
quantity: number;
|
|
11
|
+
constructor(productSummary: FullLineItemSummary);
|
|
12
|
+
allocateQty(quantity: number): FullLineItemSummary;
|
|
13
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var misc = require('../misc.js');
|
|
4
|
+
var fixedAmount = require('./fixedAmount.js');
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
configurable: true,
|
|
10
|
+
writable: true,
|
|
11
|
+
value
|
|
12
|
+
}) : obj[key] = value;
|
|
13
|
+
var __publicField = (obj, key, value) => {
|
|
14
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15
|
+
return value;
|
|
16
|
+
};
|
|
17
|
+
var __accessCheck = (obj, member, msg) => {
|
|
18
|
+
if (!member.has(obj)) throw TypeError("Cannot " + msg);
|
|
19
|
+
};
|
|
20
|
+
var __privateGet = (obj, member, getter) => {
|
|
21
|
+
__accessCheck(obj, member, "read from private field");
|
|
22
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
23
|
+
};
|
|
24
|
+
var __privateAdd = (obj, member, value) => {
|
|
25
|
+
if (member.has(obj)) throw TypeError("Cannot add the same private member more than once");
|
|
26
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
27
|
+
};
|
|
28
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
29
|
+
__accessCheck(obj, member, "write to private field");
|
|
30
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
31
|
+
return value;
|
|
32
|
+
};
|
|
33
|
+
var _itemPrice, _currency, _subtotal, _discountAmount, _taxableAmount, _tax, _total;
|
|
34
|
+
class ProductAmountAllocator {
|
|
35
|
+
constructor(productSummary) {
|
|
36
|
+
// #############################################################################
|
|
37
|
+
// Fixed values
|
|
38
|
+
// #############################################################################
|
|
39
|
+
__privateAdd(this, _itemPrice, void 0);
|
|
40
|
+
__privateAdd(this, _currency, void 0);
|
|
41
|
+
// #############################################################################
|
|
42
|
+
/**
|
|
43
|
+
* Remaining quantity to allocate
|
|
44
|
+
*/
|
|
45
|
+
__publicField(this, "quantity");
|
|
46
|
+
// #############################################################################
|
|
47
|
+
// Specific amount allocators
|
|
48
|
+
// #############################################################################
|
|
49
|
+
__privateAdd(this, _subtotal, void 0);
|
|
50
|
+
__privateAdd(this, _discountAmount, void 0);
|
|
51
|
+
__privateAdd(this, _taxableAmount, void 0);
|
|
52
|
+
__privateAdd(this, _tax, void 0);
|
|
53
|
+
__privateAdd(this, _total, void 0);
|
|
54
|
+
const currency = productSummary.currency;
|
|
55
|
+
const priceForAllocation = productSummary.itemPrice * productSummary.quantity;
|
|
56
|
+
__privateSet(this, _itemPrice, productSummary.itemPrice);
|
|
57
|
+
__privateSet(this, _currency, currency);
|
|
58
|
+
this.quantity = productSummary.quantity;
|
|
59
|
+
__privateSet(this, _subtotal, new fixedAmount.FixedAmountAllocator({
|
|
60
|
+
initialAllocateAmount: productSummary.subtotal,
|
|
61
|
+
initialTotalAmount: priceForAllocation,
|
|
62
|
+
currency
|
|
63
|
+
}));
|
|
64
|
+
__privateSet(this, _discountAmount, new fixedAmount.FixedAmountAllocator({
|
|
65
|
+
initialAllocateAmount: productSummary.discountAmount,
|
|
66
|
+
initialTotalAmount: priceForAllocation,
|
|
67
|
+
currency
|
|
68
|
+
}));
|
|
69
|
+
__privateSet(this, _taxableAmount, new fixedAmount.FixedAmountAllocator({
|
|
70
|
+
initialAllocateAmount: productSummary.taxableAmount,
|
|
71
|
+
initialTotalAmount: priceForAllocation,
|
|
72
|
+
currency
|
|
73
|
+
}));
|
|
74
|
+
__privateSet(this, _tax, new fixedAmount.FixedAmountAllocator({
|
|
75
|
+
initialAllocateAmount: productSummary.tax,
|
|
76
|
+
initialTotalAmount: priceForAllocation,
|
|
77
|
+
currency
|
|
78
|
+
}));
|
|
79
|
+
__privateSet(this, _total, new fixedAmount.FixedAmountAllocator({
|
|
80
|
+
initialAllocateAmount: productSummary.total,
|
|
81
|
+
initialTotalAmount: priceForAllocation,
|
|
82
|
+
currency
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
allocateQty(quantity) {
|
|
86
|
+
let quantityNormalized = Math.max(quantity, 0);
|
|
87
|
+
quantityNormalized = this.quantity - quantityNormalized >= 0 ? quantityNormalized : 0;
|
|
88
|
+
this.quantity = Math.max(this.quantity - quantityNormalized, 0);
|
|
89
|
+
const itemQuantityPrice = __privateGet(this, _itemPrice) * quantityNormalized;
|
|
90
|
+
return {
|
|
91
|
+
itemPrice: __privateGet(this, _itemPrice),
|
|
92
|
+
currency: __privateGet(this, _currency),
|
|
93
|
+
quantity: quantityNormalized,
|
|
94
|
+
subtotal: misc.amount(__privateGet(this, _subtotal).allocate(itemQuantityPrice, __privateGet(this, _currency))),
|
|
95
|
+
discountAmount: misc.amount(__privateGet(this, _discountAmount).allocate(itemQuantityPrice, __privateGet(this, _currency))),
|
|
96
|
+
taxableAmount: misc.amount(__privateGet(this, _taxableAmount).allocate(itemQuantityPrice, __privateGet(this, _currency))),
|
|
97
|
+
tax: misc.amount(__privateGet(this, _tax).allocate(itemQuantityPrice, __privateGet(this, _currency))),
|
|
98
|
+
total: misc.amount(__privateGet(this, _total).allocate(itemQuantityPrice, __privateGet(this, _currency)))
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
_itemPrice = new WeakMap();
|
|
103
|
+
_currency = new WeakMap();
|
|
104
|
+
_subtotal = new WeakMap();
|
|
105
|
+
_discountAmount = new WeakMap();
|
|
106
|
+
_taxableAmount = new WeakMap();
|
|
107
|
+
_tax = new WeakMap();
|
|
108
|
+
_total = new WeakMap();
|
|
109
|
+
exports.ProductAmountAllocator = ProductAmountAllocator;
|
|
110
|
+
//# sourceMappingURL=productAmount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productAmount.js","sources":["../../../../src/utils/money/allocators/productAmount.ts"],"sourcesContent":["import type { Currency } from \"../../../types\";\nimport { amount } from \"../misc\";\nimport type { Cents, FullLineItemSummary } from \"../types\";\nimport { FixedAmountAllocator } from \"./fixedAmount\";\n\n/**\n * Helper class to distribute a total amount for a product\n */\nexport class ProductAmountAllocator {\n // #############################################################################\n // Fixed values\n // #############################################################################\n readonly #itemPrice: Cents;\n readonly #currency: Currency;\n // #############################################################################\n /**\n * Remaining quantity to allocate\n */\n quantity: number;\n // #############################################################################\n // Specific amount allocators\n // #############################################################################\n #subtotal: FixedAmountAllocator;\n #discountAmount: FixedAmountAllocator;\n #taxableAmount: FixedAmountAllocator;\n #tax: FixedAmountAllocator;\n #total: FixedAmountAllocator;\n\n constructor(productSummary: FullLineItemSummary) {\n const currency = productSummary.currency;\n\n /**\n * Somewhat hackish, just need a stable price that can easily divide later by quantity\n */\n const priceForAllocation =\n productSummary.itemPrice * productSummary.quantity;\n\n this.#itemPrice = productSummary.itemPrice;\n this.#currency = currency;\n this.quantity = productSummary.quantity;\n this.#subtotal = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.subtotal,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#discountAmount = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.discountAmount,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#taxableAmount = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.taxableAmount,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#tax = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.tax,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#total = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.total,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n }\n\n allocateQty(quantity: number): FullLineItemSummary {\n // Calculate remaining allocatable quantity\n let quantityNormalized = Math.max(quantity, 0);\n quantityNormalized =\n this.quantity - quantityNormalized >= 0 ? quantityNormalized : 0;\n\n // Adjust remaining qty\n this.quantity = Math.max(this.quantity - quantityNormalized, 0);\n\n // How big of a slice of the total price we need to allocate\n const itemQuantityPrice = this.#itemPrice * quantityNormalized;\n\n return {\n itemPrice: this.#itemPrice,\n currency: this.#currency,\n quantity: quantityNormalized,\n subtotal: amount(\n this.#subtotal.allocate(itemQuantityPrice, this.#currency),\n ),\n discountAmount: amount(\n this.#discountAmount.allocate(itemQuantityPrice, this.#currency),\n ),\n taxableAmount: amount(\n this.#taxableAmount.allocate(itemQuantityPrice, this.#currency),\n ),\n tax: amount(this.#tax.allocate(itemQuantityPrice, this.#currency)),\n total: amount(this.#total.allocate(itemQuantityPrice, this.#currency)),\n } satisfies FullLineItemSummary;\n }\n}\n"],"names":["_itemPrice","_currency","_subtotal","_discountAmount","_taxableAmount","_tax","_total","ProductAmountAllocator","constructor","productSummary","__privateAdd","__publicField","currency","priceForAllocation","itemPrice","quantity","__privateSet","FixedAmountAllocator","initialAllocateAmount","subtotal","initialTotalAmount","discountAmount","taxableAmount","tax","total","allocateQty","quantityNormalized","Math","max","itemQuantityPrice","__privateGet","amount","allocate","WeakMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,EAAAC,SAAA,EAAAC,SAAA,EAAAC,eAAA,EAAAC,cAAA,EAAAC,IAAA,EAAAC,MAAA;AAQO,MAAMC,sBAAuB,CAAA;EAoBlCC,YAAYC,cAAqC,EAAA;IAhBjD;IAAA;IAAA;IAAAC,YAAA,CAAA,IAAA,EAASV,UAAT,EAAA,KAAA,CAAA,CAAA;IACAU,YAAA,CAAA,IAAA,EAAST,SAAT,EAAA,KAAA,CAAA,CAAA;IAKA;IAAA;AAAA;AAAA;IAAAU,aAAA,CAAA,IAAA,EAAA,UAAA,CAAA;IAIA;IAAA;IAAA;IAAAD,YAAA,CAAA,IAAA,EAAAR,SAAA,EAAA,KAAA,CAAA,CAAA;IACAQ,YAAA,CAAA,IAAA,EAAAP,eAAA,EAAA,KAAA,CAAA,CAAA;IACAO,YAAA,CAAA,IAAA,EAAAN,cAAA,EAAA,KAAA,CAAA,CAAA;IACAM,YAAA,CAAA,IAAA,EAAAL,IAAA,EAAA,KAAA,CAAA,CAAA;IACAK,YAAA,CAAA,IAAA,EAAAJ,MAAA,EAAA,KAAA,CAAA,CAAA;IAGE,MAAMM,WAAWH,cAAe,CAAAG,QAAA;IAK1B,MAAAC,kBAAA,GACJJ,cAAe,CAAAK,SAAA,GAAYL,cAAe,CAAAM,QAAA;IAE5CC,YAAA,CAAA,IAAA,EAAKhB,YAAaS,cAAe,CAAAK,SAAA,CAAA;IACjCE,YAAA,CAAA,IAAA,EAAKf,SAAY,EAAAW,QAAA,CAAA;IACjB,IAAA,CAAKG,WAAWN,cAAe,CAAAM,QAAA;IAC1BC,YAAA,CAAA,IAAA,EAAAd,SAAA,EAAY,IAAIe,gCAAqB,CAAA;MACxCC,uBAAuBT,cAAe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|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value
|
|
10
|
+
}) : obj[key] = value;
|
|
11
|
+
var __publicField = (obj, key, value) => {
|
|
12
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
13
|
+
return value;
|
|
14
|
+
};
|
|
15
|
+
var __accessCheck = (obj, member, msg) => {
|
|
16
|
+
if (!member.has(obj)) throw TypeError("Cannot " + msg);
|
|
17
|
+
};
|
|
18
|
+
var __privateGet = (obj, member, getter) => {
|
|
19
|
+
__accessCheck(obj, member, "read from private field");
|
|
20
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
21
|
+
};
|
|
22
|
+
var __privateAdd = (obj, member, value) => {
|
|
23
|
+
if (member.has(obj)) throw TypeError("Cannot add the same private member more than once");
|
|
24
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
25
|
+
};
|
|
26
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
27
|
+
__accessCheck(obj, member, "write to private field");
|
|
28
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
29
|
+
return value;
|
|
30
|
+
};
|
|
31
|
+
var _itemPrice, _currency, _subtotal, _discountAmount, _taxableAmount, _tax, _total;
|
|
32
|
+
class ProductAmountAllocator {
|
|
33
|
+
constructor(productSummary) {
|
|
34
|
+
// #############################################################################
|
|
35
|
+
// Fixed values
|
|
36
|
+
// #############################################################################
|
|
37
|
+
__privateAdd(this, _itemPrice, void 0);
|
|
38
|
+
__privateAdd(this, _currency, void 0);
|
|
39
|
+
// #############################################################################
|
|
40
|
+
/**
|
|
41
|
+
* Remaining quantity to allocate
|
|
42
|
+
*/
|
|
43
|
+
__publicField(this, "quantity");
|
|
44
|
+
// #############################################################################
|
|
45
|
+
// Specific amount allocators
|
|
46
|
+
// #############################################################################
|
|
47
|
+
__privateAdd(this, _subtotal, void 0);
|
|
48
|
+
__privateAdd(this, _discountAmount, void 0);
|
|
49
|
+
__privateAdd(this, _taxableAmount, void 0);
|
|
50
|
+
__privateAdd(this, _tax, void 0);
|
|
51
|
+
__privateAdd(this, _total, void 0);
|
|
52
|
+
const currency = productSummary.currency;
|
|
53
|
+
const priceForAllocation = productSummary.itemPrice * productSummary.quantity;
|
|
54
|
+
__privateSet(this, _itemPrice, productSummary.itemPrice);
|
|
55
|
+
__privateSet(this, _currency, currency);
|
|
56
|
+
this.quantity = productSummary.quantity;
|
|
57
|
+
__privateSet(this, _subtotal, new FixedAmountAllocator({
|
|
58
|
+
initialAllocateAmount: productSummary.subtotal,
|
|
59
|
+
initialTotalAmount: priceForAllocation,
|
|
60
|
+
currency
|
|
61
|
+
}));
|
|
62
|
+
__privateSet(this, _discountAmount, new FixedAmountAllocator({
|
|
63
|
+
initialAllocateAmount: productSummary.discountAmount,
|
|
64
|
+
initialTotalAmount: priceForAllocation,
|
|
65
|
+
currency
|
|
66
|
+
}));
|
|
67
|
+
__privateSet(this, _taxableAmount, new FixedAmountAllocator({
|
|
68
|
+
initialAllocateAmount: productSummary.taxableAmount,
|
|
69
|
+
initialTotalAmount: priceForAllocation,
|
|
70
|
+
currency
|
|
71
|
+
}));
|
|
72
|
+
__privateSet(this, _tax, new FixedAmountAllocator({
|
|
73
|
+
initialAllocateAmount: productSummary.tax,
|
|
74
|
+
initialTotalAmount: priceForAllocation,
|
|
75
|
+
currency
|
|
76
|
+
}));
|
|
77
|
+
__privateSet(this, _total, new FixedAmountAllocator({
|
|
78
|
+
initialAllocateAmount: productSummary.total,
|
|
79
|
+
initialTotalAmount: priceForAllocation,
|
|
80
|
+
currency
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
allocateQty(quantity) {
|
|
84
|
+
let quantityNormalized = Math.max(quantity, 0);
|
|
85
|
+
quantityNormalized = this.quantity - quantityNormalized >= 0 ? quantityNormalized : 0;
|
|
86
|
+
this.quantity = Math.max(this.quantity - quantityNormalized, 0);
|
|
87
|
+
const itemQuantityPrice = __privateGet(this, _itemPrice) * quantityNormalized;
|
|
88
|
+
return {
|
|
89
|
+
itemPrice: __privateGet(this, _itemPrice),
|
|
90
|
+
currency: __privateGet(this, _currency),
|
|
91
|
+
quantity: quantityNormalized,
|
|
92
|
+
subtotal: amount(__privateGet(this, _subtotal).allocate(itemQuantityPrice, __privateGet(this, _currency))),
|
|
93
|
+
discountAmount: amount(__privateGet(this, _discountAmount).allocate(itemQuantityPrice, __privateGet(this, _currency))),
|
|
94
|
+
taxableAmount: amount(__privateGet(this, _taxableAmount).allocate(itemQuantityPrice, __privateGet(this, _currency))),
|
|
95
|
+
tax: amount(__privateGet(this, _tax).allocate(itemQuantityPrice, __privateGet(this, _currency))),
|
|
96
|
+
total: amount(__privateGet(this, _total).allocate(itemQuantityPrice, __privateGet(this, _currency)))
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
_itemPrice = new WeakMap();
|
|
101
|
+
_currency = new WeakMap();
|
|
102
|
+
_subtotal = new WeakMap();
|
|
103
|
+
_discountAmount = new WeakMap();
|
|
104
|
+
_taxableAmount = new WeakMap();
|
|
105
|
+
_tax = new WeakMap();
|
|
106
|
+
_total = new WeakMap();
|
|
107
|
+
export { ProductAmountAllocator };
|
|
108
|
+
//# sourceMappingURL=productAmount.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productAmount.mjs","sources":["../../../../src/utils/money/allocators/productAmount.ts"],"sourcesContent":["import type { Currency } from \"../../../types\";\nimport { amount } from \"../misc\";\nimport type { Cents, FullLineItemSummary } from \"../types\";\nimport { FixedAmountAllocator } from \"./fixedAmount\";\n\n/**\n * Helper class to distribute a total amount for a product\n */\nexport class ProductAmountAllocator {\n // #############################################################################\n // Fixed values\n // #############################################################################\n readonly #itemPrice: Cents;\n readonly #currency: Currency;\n // #############################################################################\n /**\n * Remaining quantity to allocate\n */\n quantity: number;\n // #############################################################################\n // Specific amount allocators\n // #############################################################################\n #subtotal: FixedAmountAllocator;\n #discountAmount: FixedAmountAllocator;\n #taxableAmount: FixedAmountAllocator;\n #tax: FixedAmountAllocator;\n #total: FixedAmountAllocator;\n\n constructor(productSummary: FullLineItemSummary) {\n const currency = productSummary.currency;\n\n /**\n * Somewhat hackish, just need a stable price that can easily divide later by quantity\n */\n const priceForAllocation =\n productSummary.itemPrice * productSummary.quantity;\n\n this.#itemPrice = productSummary.itemPrice;\n this.#currency = currency;\n this.quantity = productSummary.quantity;\n this.#subtotal = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.subtotal,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#discountAmount = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.discountAmount,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#taxableAmount = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.taxableAmount,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#tax = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.tax,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#total = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.total,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n }\n\n allocateQty(quantity: number): FullLineItemSummary {\n // Calculate remaining allocatable quantity\n let quantityNormalized = Math.max(quantity, 0);\n quantityNormalized =\n this.quantity - quantityNormalized >= 0 ? quantityNormalized : 0;\n\n // Adjust remaining qty\n this.quantity = Math.max(this.quantity - quantityNormalized, 0);\n\n // How big of a slice of the total price we need to allocate\n const itemQuantityPrice = this.#itemPrice * quantityNormalized;\n\n return {\n itemPrice: this.#itemPrice,\n currency: this.#currency,\n quantity: quantityNormalized,\n subtotal: amount(\n this.#subtotal.allocate(itemQuantityPrice, this.#currency),\n ),\n discountAmount: amount(\n this.#discountAmount.allocate(itemQuantityPrice, this.#currency),\n ),\n taxableAmount: amount(\n this.#taxableAmount.allocate(itemQuantityPrice, this.#currency),\n ),\n tax: amount(this.#tax.allocate(itemQuantityPrice, this.#currency)),\n total: amount(this.#total.allocate(itemQuantityPrice, this.#currency)),\n } satisfies FullLineItemSummary;\n }\n}\n"],"names":["_itemPrice","_currency","_subtotal","_discountAmount","_taxableAmount","_tax","_total","ProductAmountAllocator","constructor","productSummary","__privateAdd","__publicField","currency","priceForAllocation","itemPrice","quantity","__privateSet","FixedAmountAllocator","initialAllocateAmount","subtotal","initialTotalAmount","discountAmount","taxableAmount","tax","total","allocateQty","quantityNormalized","Math","max","itemQuantityPrice","__privateGet","amount","allocate","WeakMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,EAAAC,SAAA,EAAAC,SAAA,EAAAC,eAAA,EAAAC,cAAA,EAAAC,IAAA,EAAAC,MAAA;AAQO,MAAMC,sBAAuB,CAAA;EAoBlCC,YAAYC,cAAqC,EAAA;IAhBjD;IAAA;IAAA;IAAAC,YAAA,CAAA,IAAA,EAASV,UAAT,EAAA,KAAA,CAAA,CAAA;IACAU,YAAA,CAAA,IAAA,EAAST,SAAT,EAAA,KAAA,CAAA,CAAA;IAKA;IAAA;AAAA;AAAA;IAAAU,aAAA,CAAA,IAAA,EAAA,UAAA,CAAA;IAIA;IAAA;IAAA;IAAAD,YAAA,CAAA,IAAA,EAAAR,SAAA,EAAA,KAAA,CAAA,CAAA;IACAQ,YAAA,CAAA,IAAA,EAAAP,eAAA,EAAA,KAAA,CAAA,CAAA;IACAO,YAAA,CAAA,IAAA,EAAAN,cAAA,EAAA,KAAA,CAAA,CAAA;IACAM,YAAA,CAAA,IAAA,EAAAL,IAAA,EAAA,KAAA,CAAA,CAAA;IACAK,YAAA,CAAA,IAAA,EAAAJ,MAAA,EAAA,KAAA,CAAA,CAAA;IAGE,MAAMM,WAAWH,cAAe,CAAAG,QAAA;IAK1B,MAAAC,kBAAA,GACJJ,cAAe,CAAAK,SAAA,GAAYL,cAAe,CAAAM,QAA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ACA5B,IAAA,GAAA,IAAA4B,OAAA,CAAA,CAAA;AACA3B,MAAA,GAAA,IAAA2B,OAAA,CAAA,CAAA;"}
|
|
@@ -21,7 +21,7 @@ export declare const toSnapshotExchangeRate: (exchangeRate: TaxRate) => {
|
|
|
21
21
|
* toFixedExchangeRate("0.123456789", true) // 0.123457
|
|
22
22
|
*/
|
|
23
23
|
export declare function toFixedExchangeRate(rate: string | number, asNumber?: boolean): string;
|
|
24
|
-
export declare function toFixedExchangeRate(rate: string | number, asNumber
|
|
24
|
+
export declare function toFixedExchangeRate(rate: string | number, asNumber: true): number;
|
|
25
25
|
/**
|
|
26
26
|
* Invert an exchange rate by doing 1 / rate
|
|
27
27
|
* Used to fake a reverse exchange rate in case we don't have it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exchangeRate.js","sources":["../../../src/utils/money/exchangeRate.ts"],"sourcesContent":["import { assert } from \"../errors\";\nimport { isFloat, toFixedRate } from \"../number\";\nimport { EXCHANGE_RATE_DINERO_CURRENCY } from \"./constants\";\nimport { floatToInt } from \"./misc.private\";\nimport type { Cents, TaxRate } from \"./types\";\n\n// FIXME: reconsider if needed her as only used in BE for exchange rate Graph other places in code use Float|number\n/**\n * Parse exchange rate to dinero friendly amount and scale.\n *\n * Used to prepare exchange rate for sending over API.\n *\n * @example\n * toSnapshotExchangeRate(0.22); // {amount: 22000, scale: 6}\n */\nexport const toSnapshotExchangeRate = (\n exchangeRate: TaxRate,\n): {\n amount: Cents;\n scale: number;\n} => {\n // Validate input\n isFloat(exchangeRate, \"Exchange rate\");\n assert(exchangeRate > 0, \"Exchange rate must be greater than 0\");\n\n // Get scale of exchange rate\n const rateInt = floatToInt(\n exchangeRate,\n EXCHANGE_RATE_DINERO_CURRENCY.base,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n );\n\n // Return dinero friendly amount and scale\n return {\n amount: rateInt,\n scale: EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n };\n};\n\n/**\n * Converts an arbitrary exchange rate to a fixed decimal place number.\n *\n * Used to take in an input and convert it for storage in the database.\n *\n * @example\n * toFixedExchangeRate(\"0.123456789\") // \"0.123457\"\n * toFixedExchangeRate(\"0.123456789\", true) // 0.123457\n */\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber
|
|
1
|
+
{"version":3,"file":"exchangeRate.js","sources":["../../../src/utils/money/exchangeRate.ts"],"sourcesContent":["import { assert } from \"../errors\";\nimport { isFloat, toFixedRate } from \"../number\";\nimport { EXCHANGE_RATE_DINERO_CURRENCY } from \"./constants\";\nimport { floatToInt } from \"./misc.private\";\nimport type { Cents, TaxRate } from \"./types\";\n\n// FIXME: reconsider if needed her as only used in BE for exchange rate Graph other places in code use Float|number\n/**\n * Parse exchange rate to dinero friendly amount and scale.\n *\n * Used to prepare exchange rate for sending over API.\n *\n * @example\n * toSnapshotExchangeRate(0.22); // {amount: 22000, scale: 6}\n */\nexport const toSnapshotExchangeRate = (\n exchangeRate: TaxRate,\n): {\n amount: Cents;\n scale: number;\n} => {\n // Validate input\n isFloat(exchangeRate, \"Exchange rate\");\n assert(exchangeRate > 0, \"Exchange rate must be greater than 0\");\n\n // Get scale of exchange rate\n const rateInt = floatToInt(\n exchangeRate,\n EXCHANGE_RATE_DINERO_CURRENCY.base,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n );\n\n // Return dinero friendly amount and scale\n return {\n amount: rateInt,\n scale: EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n };\n};\n\n/**\n * Converts an arbitrary exchange rate to a fixed decimal place number.\n *\n * Used to take in an input and convert it for storage in the database.\n *\n * @example\n * toFixedExchangeRate(\"0.123456789\") // \"0.123457\"\n * toFixedExchangeRate(\"0.123456789\", true) // 0.123457\n */\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber: true,\n): number;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string | number {\n // FIXME: Remove + but instead add proper parsing of the string --> number\n // https://stackoverflow.com/a/12862627/1378261\n return toFixedRate(\n typeof rate === \"string\" ? +rate : rate,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n asNumber,\n );\n}\n\n/**\n * Invert an exchange rate by doing 1 / rate\n * Used to fake a reverse exchange rate in case we don't have it\n * @example\n * invertExchangeRate(\"0.22\") // \"4.545455\"\n */\nexport function invertExchangeRate(rate: string | number) {\n const exchangeRate = toFixedExchangeRate(rate, true);\n return toFixedExchangeRate(1 / exchangeRate, false);\n}\n"],"names":["toSnapshotExchangeRate","exchangeRate","isFloat","assert","rateInt","floatToInt","EXCHANGE_RATE_DINERO_CURRENCY","base","exponent","amount","scale","toFixedExchangeRate","rate","asNumber","toFixedRate","invertExchangeRate"],"mappings":";;;;;;;AAea,MAAAA,sBAAA,GACXC,YAIG,IAAA;EAEHC,cAAA,CAAQD,cAAc,eAAe,CAAA;EAC9BE,MAAAA,CAAAA,MAAA,CAAAF,YAAA,GAAe,GAAG,sCAAsC,CAAA;EAG/D,MAAMG,OAAU,GAAAC,YAAA,CAAAA,UAAA,CACdJ,YAAA,EACAK,SAAAA,CAAAA,6BAA8B,CAAAC,IAAA,EAC9BD,SAAAA,CAAAA,6BAA8B,CAAAE,QAAA,CAChC;EAGO,OAAA;IACLC,MAAQ,EAAAL,OAAA;IACRM,OAAOJ,SAA8B,CAAAA,6BAAA,CAAAE;EAAA,CACvC;AACF,CAAA;AAmBgB,SAAAG,mBAAAA,CACdC,MACAC,QACiB,EAAA;EAGV,OAAAC,MAAA,CAAAA,WAAA,CACL,OAAOF,IAAA,KAAS,QAAW,GAAA,CAACA,IAAO,GAAAA,IAAA,EACnCN,SAAAA,CAAAA,6BAA8B,CAAAE,QAAA,EAC9BK,QAAA,CACF;AACF;AAQO,SAASE,mBAAmBH,IAAuB,EAAA;EAClD,MAAAX,YAAA,GAAeU,mBAAoB,CAAAC,IAAA,EAAM,IAAI,CAAA;EAC5C,OAAAD,mBAAA,CAAoB,CAAI,GAAAV,YAAA,EAAc,KAAK,CAAA;AACpD;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exchangeRate.mjs","sources":["../../../src/utils/money/exchangeRate.ts"],"sourcesContent":["import { assert } from \"../errors\";\nimport { isFloat, toFixedRate } from \"../number\";\nimport { EXCHANGE_RATE_DINERO_CURRENCY } from \"./constants\";\nimport { floatToInt } from \"./misc.private\";\nimport type { Cents, TaxRate } from \"./types\";\n\n// FIXME: reconsider if needed her as only used in BE for exchange rate Graph other places in code use Float|number\n/**\n * Parse exchange rate to dinero friendly amount and scale.\n *\n * Used to prepare exchange rate for sending over API.\n *\n * @example\n * toSnapshotExchangeRate(0.22); // {amount: 22000, scale: 6}\n */\nexport const toSnapshotExchangeRate = (\n exchangeRate: TaxRate,\n): {\n amount: Cents;\n scale: number;\n} => {\n // Validate input\n isFloat(exchangeRate, \"Exchange rate\");\n assert(exchangeRate > 0, \"Exchange rate must be greater than 0\");\n\n // Get scale of exchange rate\n const rateInt = floatToInt(\n exchangeRate,\n EXCHANGE_RATE_DINERO_CURRENCY.base,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n );\n\n // Return dinero friendly amount and scale\n return {\n amount: rateInt,\n scale: EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n };\n};\n\n/**\n * Converts an arbitrary exchange rate to a fixed decimal place number.\n *\n * Used to take in an input and convert it for storage in the database.\n *\n * @example\n * toFixedExchangeRate(\"0.123456789\") // \"0.123457\"\n * toFixedExchangeRate(\"0.123456789\", true) // 0.123457\n */\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber
|
|
1
|
+
{"version":3,"file":"exchangeRate.mjs","sources":["../../../src/utils/money/exchangeRate.ts"],"sourcesContent":["import { assert } from \"../errors\";\nimport { isFloat, toFixedRate } from \"../number\";\nimport { EXCHANGE_RATE_DINERO_CURRENCY } from \"./constants\";\nimport { floatToInt } from \"./misc.private\";\nimport type { Cents, TaxRate } from \"./types\";\n\n// FIXME: reconsider if needed her as only used in BE for exchange rate Graph other places in code use Float|number\n/**\n * Parse exchange rate to dinero friendly amount and scale.\n *\n * Used to prepare exchange rate for sending over API.\n *\n * @example\n * toSnapshotExchangeRate(0.22); // {amount: 22000, scale: 6}\n */\nexport const toSnapshotExchangeRate = (\n exchangeRate: TaxRate,\n): {\n amount: Cents;\n scale: number;\n} => {\n // Validate input\n isFloat(exchangeRate, \"Exchange rate\");\n assert(exchangeRate > 0, \"Exchange rate must be greater than 0\");\n\n // Get scale of exchange rate\n const rateInt = floatToInt(\n exchangeRate,\n EXCHANGE_RATE_DINERO_CURRENCY.base,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n );\n\n // Return dinero friendly amount and scale\n return {\n amount: rateInt,\n scale: EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n };\n};\n\n/**\n * Converts an arbitrary exchange rate to a fixed decimal place number.\n *\n * Used to take in an input and convert it for storage in the database.\n *\n * @example\n * toFixedExchangeRate(\"0.123456789\") // \"0.123457\"\n * toFixedExchangeRate(\"0.123456789\", true) // 0.123457\n */\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber: true,\n): number;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string | number {\n // FIXME: Remove + but instead add proper parsing of the string --> number\n // https://stackoverflow.com/a/12862627/1378261\n return toFixedRate(\n typeof rate === \"string\" ? +rate : rate,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n asNumber,\n );\n}\n\n/**\n * Invert an exchange rate by doing 1 / rate\n * Used to fake a reverse exchange rate in case we don't have it\n * @example\n * invertExchangeRate(\"0.22\") // \"4.545455\"\n */\nexport function invertExchangeRate(rate: string | number) {\n const exchangeRate = toFixedExchangeRate(rate, true);\n return toFixedExchangeRate(1 / exchangeRate, false);\n}\n"],"names":["toSnapshotExchangeRate","exchangeRate","isFloat","assert","rateInt","floatToInt","EXCHANGE_RATE_DINERO_CURRENCY","base","exponent","amount","scale","toFixedExchangeRate","rate","asNumber","toFixedRate","invertExchangeRate"],"mappings":";;;;;AAea,MAAAA,sBAAA,GACXC,YAIG,IAAA;EAEHC,OAAA,CAAQD,cAAc,eAAe,CAAA;EAC9BE,MAAA,CAAAF,YAAA,GAAe,GAAG,sCAAsC,CAAA;EAG/D,MAAMG,OAAU,GAAAC,UAAA,CACdJ,YAAA,EACAK,6BAA8B,CAAAC,IAAA,EAC9BD,6BAA8B,CAAAE,QAAA,CAChC;EAGO,OAAA;IACLC,MAAQ,EAAAL,OAAA;IACRM,OAAOJ,6BAA8B,CAAAE;EAAA,CACvC;AACF,CAAA;AAmBgB,SAAAG,mBAAAA,CACdC,MACAC,QACiB,EAAA;EAGV,OAAAC,WAAA,CACL,OAAOF,IAAA,KAAS,QAAW,GAAA,CAACA,IAAO,GAAAA,IAAA,EACnCN,6BAA8B,CAAAE,QAAA,EAC9BK,QAAA,CACF;AACF;AAQO,SAASE,mBAAmBH,IAAuB,EAAA;EAClD,MAAAX,YAAA,GAAeU,mBAAoB,CAAAC,IAAA,EAAM,IAAI,CAAA;EAC5C,OAAAD,mBAAA,CAAoB,CAAI,GAAAV,YAAA,EAAc,KAAK,CAAA;AACpD;"}
|
|
@@ -48,19 +48,19 @@ export type LocalizedCurrency = {
|
|
|
48
48
|
export interface LineItemSummary {
|
|
49
49
|
itemPrice: Cents;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Item quantity that is always bigger than zero!
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
quantity: number;
|
|
54
|
+
currency: Currency;
|
|
54
55
|
/**
|
|
55
56
|
* Total discount amount (only) applied for the given item quantity.
|
|
56
57
|
* No taxes are included. Calculated by `total_raw_price * <discount-allocation-percentage>`
|
|
57
58
|
*/
|
|
58
59
|
discountAmount: Cents;
|
|
59
|
-
currency: Currency;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* subtotal - discountAmount
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
taxableAmount: Cents;
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Pretty much the same as PreTaxItemSummary but with quantity always set to 1 (for clearer type hinting and reasoning
|
|
@@ -69,3 +69,17 @@ export interface LineItemSummary {
|
|
|
69
69
|
export interface SingleLineItemSummary extends LineItemSummary {
|
|
70
70
|
quantity: 1;
|
|
71
71
|
}
|
|
72
|
+
export interface FullLineItemSummary extends LineItemSummary {
|
|
73
|
+
/**
|
|
74
|
+
* Total price for the given item quantity. Calculated by `(itemPrice * quantity)`
|
|
75
|
+
*/
|
|
76
|
+
subtotal: Cents;
|
|
77
|
+
/**
|
|
78
|
+
* Total tax amount for the given item quantity.
|
|
79
|
+
*/
|
|
80
|
+
tax: Cents;
|
|
81
|
+
/**
|
|
82
|
+
* Total price for the given item quantity. Calculated by `subtotal - discountAmount + tax`
|
|
83
|
+
*/
|
|
84
|
+
total: Cents;
|
|
85
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ubnt/store.core",
|
|
3
|
-
"version": "9.6.0-alpha.
|
|
3
|
+
"version": "9.6.0-alpha.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"scripts": {
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
"style-loader": "4.0.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@dinero.js/currencies": "
|
|
62
|
+
"@dinero.js/currencies": "2.0.0-alpha.8",
|
|
63
63
|
"@faker-js/faker": "^7.6.0",
|
|
64
64
|
"@formatjs/intl": "^2.10.4",
|
|
65
65
|
"@types/lodash-es": "^4.17.12",
|
|
66
66
|
"@ubnt/ui-components": "^62.1.1",
|
|
67
67
|
"big.js": "^6.2.1",
|
|
68
|
-
"convert-units": "
|
|
68
|
+
"convert-units": "3.0.0-beta.5",
|
|
69
69
|
"countup.js": "^2.6.2",
|
|
70
|
-
"dinero.js": "
|
|
70
|
+
"dinero.js": "2.0.0-alpha.8",
|
|
71
71
|
"intl-messageformat": "^10.5.14",
|
|
72
72
|
"libphonenumber-js": "^1.11.4",
|
|
73
73
|
"lodash-es": "^4.17.21",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var ucCast = require('./products/ucCast.js');
|
|
4
|
-
var ucCastPro = require('./products/ucCastPro.js');
|
|
5
|
-
require('./properties/index.js');
|
|
6
|
-
var digitalSignageMode = require('./properties/digitalSignageMode.js');
|
|
7
|
-
var videoContentSupport = require('./properties/videoContentSupport.js');
|
|
8
|
-
var webMode = require('./properties/webMode.js');
|
|
9
|
-
var youtubeMode = require('./properties/youtubeMode.js');
|
|
10
|
-
var hdmiCec = require('./properties/hdmiCec.js');
|
|
11
|
-
var usbCPeripheralSupport = require('./properties/usbCPeripheralSupport.js');
|
|
12
|
-
var connectivity = require('./properties/connectivity.js');
|
|
13
|
-
var powerMethodPoe = require('./properties/powerMethodPoe.js');
|
|
14
|
-
"use strict";
|
|
15
|
-
const DisplayCast = {
|
|
16
|
-
properties: [digitalSignageMode.digitalSignageMode, videoContentSupport.videoContentSupport, webMode.webMode, youtubeMode.youtubeMode, hdmiCec.hdmiCec, usbCPeripheralSupport.usbCPeripheralSupport, connectivity.connectivity, powerMethodPoe.powerMethodPoe],
|
|
17
|
-
products: [ucCastPro.ucCastPro, ucCast.ucCast],
|
|
18
|
-
showBadges: true,
|
|
19
|
-
columnWidth: 324,
|
|
20
|
-
propertyColumnWidth: 251
|
|
21
|
-
};
|
|
22
|
-
exports.DisplayCast = DisplayCast;
|
|
23
|
-
//# sourceMappingURL=DisplayCast.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayCast.js","sources":["../../../../src/components/ModelCompareV3/data/DisplayCast.tsx"],"sourcesContent":["import type { Section } from \"../ModelCompareV3.types\";\nimport { ucCast } from \"./products/ucCast\";\nimport { ucCastPro } from \"./products/ucCastPro\";\nimport {\n connectivity,\n hdmiCec,\n powerMethodPoe,\n usbCPeripheralSupport,\n videoContentSupport,\n webMode,\n youtubeMode,\n} from \"./properties\";\nimport { digitalSignageMode } from \"./properties/digitalSignageMode\";\n\nexport const DisplayCast: Section = {\n properties: [\n digitalSignageMode,\n videoContentSupport,\n webMode,\n youtubeMode,\n hdmiCec,\n usbCPeripheralSupport,\n connectivity,\n powerMethodPoe,\n ],\n products: [ucCastPro, ucCast],\n showBadges: true,\n columnWidth: 324,\n propertyColumnWidth: 251,\n};\n"],"names":["DisplayCast","properties","digitalSignageMode","videoContentSupport","webMode","youtubeMode","hdmiCec","usbCPeripheralSupport","connectivity","powerMethodPoe","products","ucCastPro","ucCast","showBadges","columnWidth","propertyColumnWidth"],"mappings":";;;;;;;;;;;;;;AAcO,MAAMA,WAAuB,GAAA;EAClCC,UAAY,EAAA,CACVC,kBAAA,CAAAA,kBAAA,EACAC,mBAAA,CAAAA,mBAAA,EACAC,OAAA,CAAAA,OAAA,EACAC,WAAA,CAAAA,WAAA,EACAC,OAAA,CAAAA,OAAA,EACAC,qBAAA,CAAAA,qBAAA,EACAC,YAAA,CAAAA,YAAA,EACAC,cAAA,CAAAA,cAAA,CACF;EACAC,QAAA,EAAU,CAACC,SAAA,CAAAA,SAAA,EAAWC,aAAM,CAAA;EAC5BC,UAAY,EAAA,IAAA;EACZC,WAAa,EAAA,GAAA;EACbC,mBAAqB,EAAA;AACvB,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayCast.mjs","sources":["../../../../src/components/ModelCompareV3/data/DisplayCast.tsx"],"sourcesContent":["import type { Section } from \"../ModelCompareV3.types\";\nimport { ucCast } from \"./products/ucCast\";\nimport { ucCastPro } from \"./products/ucCastPro\";\nimport {\n connectivity,\n hdmiCec,\n powerMethodPoe,\n usbCPeripheralSupport,\n videoContentSupport,\n webMode,\n youtubeMode,\n} from \"./properties\";\nimport { digitalSignageMode } from \"./properties/digitalSignageMode\";\n\nexport const DisplayCast: Section = {\n properties: [\n digitalSignageMode,\n videoContentSupport,\n webMode,\n youtubeMode,\n hdmiCec,\n usbCPeripheralSupport,\n connectivity,\n powerMethodPoe,\n ],\n products: [ucCastPro, ucCast],\n showBadges: true,\n columnWidth: 324,\n propertyColumnWidth: 251,\n};\n"],"names":["DisplayCast","properties","digitalSignageMode","videoContentSupport","webMode","youtubeMode","hdmiCec","usbCPeripheralSupport","connectivity","powerMethodPoe","products","ucCastPro","ucCast","showBadges","columnWidth","propertyColumnWidth"],"mappings":";;;;;;;;;;;;AAcO,MAAMA,WAAuB,GAAA;EAClCC,UAAY,EAAA,CACVC,kBAAA,EACAC,mBAAA,EACAC,OAAA,EACAC,WAAA,EACAC,OAAA,EACAC,qBAAA,EACAC,YAAA,EACAC,cAAA,CACF;EACAC,QAAA,EAAU,CAACC,SAAA,EAAWC,MAAM,CAAA;EAC5BC,UAAY,EAAA,IAAA;EACZC,WAAa,EAAA,GAAA;EACbC,mBAAqB,EAAA;AACvB,CAAA;"}
|
|
File without changes
|
/package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCast.jpg.js.map
RENAMED
|
File without changes
|
|
File without changes
|
/package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCast.jpg.mjs.map
RENAMED
|
File without changes
|
/package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCastPro.jpg.js
RENAMED
|
File without changes
|
/package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCastPro.jpg.js.map
RENAMED
|
File without changes
|
/package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCastPro.jpg.mjs
RENAMED
|
File without changes
|
/package/lib/components/ModelCompareV3/assets/{DisplayCast → ProfessionalAV}/ucCastPro.jpg.mjs.map
RENAMED
|
File without changes
|