@ambita/design-system 3.0.24-227.0 → 3.0.24-238.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/dist/aux.common.js +35 -0
- package/dist/aux.common.js.map +1 -1
- package/dist/aux.umd.js +35 -0
- package/dist/aux.umd.js.map +1 -1
- package/dist/aux.umd.min.js +1 -1
- package/dist/aux.umd.min.js.map +1 -1
- package/dist/types/components/Pagination/Pagination.vue.d.ts +1 -1
- package/dist/types/components/TextArea/TextArea.vue.d.ts +6 -6
- package/dist/types/helpers/formatAmount.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/aux.umd.js
CHANGED
|
@@ -4812,6 +4812,7 @@ __webpack_require__.d(__webpack_exports__, "AuxCard", function() { return /* ree
|
|
|
4812
4812
|
__webpack_require__.d(__webpack_exports__, "AuxToggle", function() { return /* reexport */ Toggle; });
|
|
4813
4813
|
__webpack_require__.d(__webpack_exports__, "AuxPagination", function() { return /* reexport */ Pagination; });
|
|
4814
4814
|
__webpack_require__.d(__webpack_exports__, "formatDate", function() { return /* reexport */ formatDate; });
|
|
4815
|
+
__webpack_require__.d(__webpack_exports__, "formatPrice", function() { return /* reexport */ formatPrice; });
|
|
4815
4816
|
|
|
4816
4817
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
4817
4818
|
// This file is imported into lib/wc client bundles.
|
|
@@ -7864,6 +7865,39 @@ function formatDate(date) {
|
|
|
7864
7865
|
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'dateAndTime';
|
|
7865
7866
|
return format === 'dateAndTime' || format === 'dateAndTimeWithSeconds' ? getDateTime(date, format) : getFormatDate(date, format);
|
|
7866
7867
|
}
|
|
7868
|
+
// CONCATENATED MODULE: ./src/helpers/formatAmount.ts
|
|
7869
|
+
var setThousandsSeparators = function setThousandsSeparators(amount, format) {
|
|
7870
|
+
var numberOfDecimals = format === 'decimals' ? 2 : 0;
|
|
7871
|
+
return new Intl.NumberFormat('nb-NB', {
|
|
7872
|
+
minimumFractionDigits: numberOfDecimals,
|
|
7873
|
+
maximumFractionDigits: numberOfDecimals
|
|
7874
|
+
}).format(amount);
|
|
7875
|
+
};
|
|
7876
|
+
|
|
7877
|
+
var addTaxLabel = function addTaxLabel(amount, taxFormat) {
|
|
7878
|
+
switch (taxFormat) {
|
|
7879
|
+
case 'excl':
|
|
7880
|
+
return "".concat(amount, " eks. mva");
|
|
7881
|
+
|
|
7882
|
+
case 'incl':
|
|
7883
|
+
return "".concat(amount, " inkl. mva");
|
|
7884
|
+
|
|
7885
|
+
default:
|
|
7886
|
+
return amount;
|
|
7887
|
+
}
|
|
7888
|
+
};
|
|
7889
|
+
|
|
7890
|
+
var addKrSymbol = function addKrSymbol(amount, format) {
|
|
7891
|
+
return format === 'rounded' ? "".concat(amount, ",-") : amount;
|
|
7892
|
+
};
|
|
7893
|
+
|
|
7894
|
+
function formatPrice(amount) {
|
|
7895
|
+
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'decimals';
|
|
7896
|
+
var taxLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'none';
|
|
7897
|
+
var amountThousandsSeparators = setThousandsSeparators(amount, format);
|
|
7898
|
+
var amountKrSymbol = addKrSymbol(amountThousandsSeparators, format);
|
|
7899
|
+
return addTaxLabel(amountKrSymbol, taxLabel);
|
|
7900
|
+
}
|
|
7867
7901
|
// CONCATENATED MODULE: ./src/index.ts
|
|
7868
7902
|
|
|
7869
7903
|
|
|
@@ -7883,6 +7917,7 @@ function formatDate(date) {
|
|
|
7883
7917
|
|
|
7884
7918
|
|
|
7885
7919
|
|
|
7920
|
+
|
|
7886
7921
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
|
|
7887
7922
|
|
|
7888
7923
|
|