@factoringplus/pl-components-pack-v3 0.1.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 (44) hide show
  1. package/.eslintrc.js +17 -0
  2. package/README.md +24 -0
  3. package/babel.config.js +5 -0
  4. package/dist/@factoringplus/pl-components-pack-v3.common.js +996 -0
  5. package/dist/@factoringplus/pl-components-pack-v3.common.js.map +1 -0
  6. package/dist/@factoringplus/pl-components-pack-v3.css +1 -0
  7. package/dist/@factoringplus/pl-components-pack-v3.umd.js +1006 -0
  8. package/dist/@factoringplus/pl-components-pack-v3.umd.js.map +1 -0
  9. package/dist/@factoringplus/pl-components-pack-v3.umd.min.js +8 -0
  10. package/dist/@factoringplus/pl-components-pack-v3.umd.min.js.map +1 -0
  11. package/dist/demo.html +10 -0
  12. package/entry.js +37 -0
  13. package/package-lock.json +20696 -0
  14. package/package.json +69 -0
  15. package/public/favicon.ico +0 -0
  16. package/public/index.html +17 -0
  17. package/src/App.vue +6 -0
  18. package/src/assets/logo.png +0 -0
  19. package/src/components/pl-currency/src/pl-currency.vue +47 -0
  20. package/src/main.js +13 -0
  21. package/src/router/index.js +16 -0
  22. package/src/store/index.js +12 -0
  23. package/src/stories/Button.stories.js +52 -0
  24. package/src/stories/Button.vue +53 -0
  25. package/src/stories/Header.stories.js +28 -0
  26. package/src/stories/Header.vue +54 -0
  27. package/src/stories/Introduction.stories.mdx +211 -0
  28. package/src/stories/Page.stories.js +30 -0
  29. package/src/stories/Page.vue +79 -0
  30. package/src/stories/assets/code-brackets.svg +1 -0
  31. package/src/stories/assets/colors.svg +1 -0
  32. package/src/stories/assets/comments.svg +1 -0
  33. package/src/stories/assets/direction.svg +1 -0
  34. package/src/stories/assets/flow.svg +1 -0
  35. package/src/stories/assets/plugin.svg +1 -0
  36. package/src/stories/assets/repo.svg +1 -0
  37. package/src/stories/assets/stackalt.svg +1 -0
  38. package/src/stories/button.css +30 -0
  39. package/src/stories/currency-input/pl-currency.stories.js +27 -0
  40. package/src/stories/currency-input/pl-currency.vue +47 -0
  41. package/src/stories/header.css +26 -0
  42. package/src/stories/page.css +69 -0
  43. package/src/views/Home.vue +10 -0
  44. package/vue.config.js +8 -0
@@ -0,0 +1,996 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = "fb15");
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ "023e":
91
+ /***/ (function(module, exports, __webpack_require__) {
92
+
93
+ // extracted by mini-css-extract-plugin
94
+
95
+ /***/ }),
96
+
97
+ /***/ "3df6":
98
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
+
100
+ "use strict";
101
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_pl_currency_vue_vue_type_style_index_0_id_0538fbc8_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("023e");
102
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_pl_currency_vue_vue_type_style_index_0_id_0538fbc8_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_v16_dist_index_js_ref_1_1_pl_currency_vue_vue_type_style_index_0_id_0538fbc8_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
103
+ /* unused harmony reexport * */
104
+
105
+
106
+ /***/ }),
107
+
108
+ /***/ "8875":
109
+ /***/ (function(module, exports, __webpack_require__) {
110
+
111
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
112
+ // MIT license
113
+ // source: https://github.com/amiller-gh/currentScript-polyfill
114
+
115
+ // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
116
+
117
+ (function (root, factory) {
118
+ if (true) {
119
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
120
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
121
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
122
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
123
+ } else {}
124
+ }(typeof self !== 'undefined' ? self : this, function () {
125
+ function getCurrentScript () {
126
+ var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
127
+ // for chrome
128
+ if (!descriptor && 'currentScript' in document && document.currentScript) {
129
+ return document.currentScript
130
+ }
131
+
132
+ // for other browsers with native support for currentScript
133
+ if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
134
+ return document.currentScript
135
+ }
136
+
137
+ // IE 8-10 support script readyState
138
+ // IE 11+ & Firefox support stack trace
139
+ try {
140
+ throw new Error();
141
+ }
142
+ catch (err) {
143
+ // Find the second match for the "at" string to get file src url from stack.
144
+ var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
145
+ ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
146
+ stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
147
+ scriptLocation = (stackDetails && stackDetails[1]) || false,
148
+ line = (stackDetails && stackDetails[2]) || false,
149
+ currentLocation = document.location.href.replace(document.location.hash, ''),
150
+ pageSource,
151
+ inlineScriptSourceRegExp,
152
+ inlineScriptSource,
153
+ scripts = document.getElementsByTagName('script'); // Live NodeList collection
154
+
155
+ if (scriptLocation === currentLocation) {
156
+ pageSource = document.documentElement.outerHTML;
157
+ inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
158
+ inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
159
+ }
160
+
161
+ for (var i = 0; i < scripts.length; i++) {
162
+ // If ready state is interactive, return the script tag
163
+ if (scripts[i].readyState === 'interactive') {
164
+ return scripts[i];
165
+ }
166
+
167
+ // If src matches, return the script tag
168
+ if (scripts[i].src === scriptLocation) {
169
+ return scripts[i];
170
+ }
171
+
172
+ // If inline source matches, return the script tag
173
+ if (
174
+ scriptLocation === currentLocation &&
175
+ scripts[i].innerHTML &&
176
+ scripts[i].innerHTML.trim() === inlineScriptSource
177
+ ) {
178
+ return scripts[i];
179
+ }
180
+ }
181
+
182
+ // If no match, return null
183
+ return null;
184
+ }
185
+ };
186
+
187
+ return getCurrentScript
188
+ }));
189
+
190
+
191
+ /***/ }),
192
+
193
+ /***/ "8afd":
194
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
195
+
196
+ "use strict";
197
+ /* unused harmony export set */
198
+ /* unused harmony export del */
199
+ /* unused harmony export Vue2 */
200
+ /* unused harmony export isVue2 */
201
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVue3", function() { return isVue3; });
202
+ /* unused harmony export install */
203
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8bbf");
204
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
205
+ /* harmony reexport (checked) */ if(__webpack_require__.o(vue__WEBPACK_IMPORTED_MODULE_0__, "computed")) __webpack_require__.d(__webpack_exports__, "computed", function() { return vue__WEBPACK_IMPORTED_MODULE_0__["computed"]; });
206
+
207
+ /* harmony reexport (checked) */ if(__webpack_require__.o(vue__WEBPACK_IMPORTED_MODULE_0__, "getCurrentInstance")) __webpack_require__.d(__webpack_exports__, "getCurrentInstance", function() { return vue__WEBPACK_IMPORTED_MODULE_0__["getCurrentInstance"]; });
208
+
209
+ /* harmony reexport (checked) */ if(__webpack_require__.o(vue__WEBPACK_IMPORTED_MODULE_0__, "onUnmounted")) __webpack_require__.d(__webpack_exports__, "onUnmounted", function() { return vue__WEBPACK_IMPORTED_MODULE_0__["onUnmounted"]; });
210
+
211
+ /* harmony reexport (checked) */ if(__webpack_require__.o(vue__WEBPACK_IMPORTED_MODULE_0__, "ref")) __webpack_require__.d(__webpack_exports__, "ref", function() { return vue__WEBPACK_IMPORTED_MODULE_0__["ref"]; });
212
+
213
+ /* harmony reexport (checked) */ if(__webpack_require__.o(vue__WEBPACK_IMPORTED_MODULE_0__, "watch")) __webpack_require__.d(__webpack_exports__, "watch", function() { return vue__WEBPACK_IMPORTED_MODULE_0__["watch"]; });
214
+
215
+
216
+
217
+ var isVue2 = false
218
+ var isVue3 = true
219
+ var Vue2 = undefined
220
+
221
+ function install() {}
222
+
223
+ function set(target, key, val) {
224
+ if (Array.isArray(target)) {
225
+ target.length = Math.max(target.length, key)
226
+ target.splice(key, 1, val)
227
+ return val
228
+ }
229
+ target[key] = val
230
+ return val
231
+ }
232
+
233
+ function del(target, key) {
234
+ if (Array.isArray(target)) {
235
+ target.splice(key, 1)
236
+ return
237
+ }
238
+ delete target[key]
239
+ }
240
+
241
+
242
+
243
+
244
+
245
+ /***/ }),
246
+
247
+ /***/ "8bbf":
248
+ /***/ (function(module, exports) {
249
+
250
+ module.exports = require("vue");
251
+
252
+ /***/ }),
253
+
254
+ /***/ "fb15":
255
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
256
+
257
+ "use strict";
258
+ // ESM COMPAT FLAG
259
+ __webpack_require__.r(__webpack_exports__);
260
+
261
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
262
+ // This file is imported into lib/wc client bundles.
263
+
264
+ if (typeof window !== 'undefined') {
265
+ var currentScript = window.document.currentScript
266
+ if (true) {
267
+ var getCurrentScript = __webpack_require__("8875")
268
+ currentScript = getCurrentScript()
269
+
270
+ // for backward compatibility, because previously we directly included the polyfill
271
+ if (!('currentScript' in document)) {
272
+ Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
273
+ }
274
+ }
275
+
276
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
277
+ if (src) {
278
+ __webpack_require__.p = src[1] // eslint-disable-line
279
+ }
280
+ }
281
+
282
+ // Indicate to webpack that this file can be concatenated
283
+ /* harmony default export */ var setPublicPath = (null);
284
+
285
+ // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
286
+ var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
287
+
288
+ // EXTERNAL MODULE: ./node_modules/vue-demi/lib/index.mjs
289
+ var lib = __webpack_require__("8afd");
290
+
291
+ // CONCATENATED MODULE: ./node_modules/vue-currency-input/dist/index.esm.js
292
+ /**
293
+ * Vue Currency Input 2.4.0
294
+ * (c) 2018-2022 Matthias Stiller
295
+ * @license MIT
296
+ */
297
+
298
+
299
+ const escapeRegExp = (str) => {
300
+ return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
301
+ };
302
+ const removeLeadingZeros = (str) => {
303
+ return str.replace(/^0+(0$|[^0])/, '$1');
304
+ };
305
+ const count = (str, search) => {
306
+ return (str.match(new RegExp(escapeRegExp(search), 'g')) || []).length;
307
+ };
308
+ const substringBefore = (str, search) => {
309
+ return str.substring(0, str.indexOf(search));
310
+ };
311
+
312
+ var CurrencyDisplay;
313
+ (function (CurrencyDisplay) {
314
+ CurrencyDisplay["symbol"] = "symbol";
315
+ CurrencyDisplay["narrowSymbol"] = "narrowSymbol";
316
+ CurrencyDisplay["code"] = "code";
317
+ CurrencyDisplay["name"] = "name";
318
+ CurrencyDisplay["hidden"] = "hidden";
319
+ })(CurrencyDisplay || (CurrencyDisplay = {}));
320
+ var ValueScaling;
321
+ (function (ValueScaling) {
322
+ ValueScaling["precision"] = "precision";
323
+ ValueScaling["thousands"] = "thousands";
324
+ ValueScaling["millions"] = "millions";
325
+ ValueScaling["billions"] = "billions";
326
+ })(ValueScaling || (ValueScaling = {}));
327
+ const parse = (formattedValue, options) => {
328
+ return new CurrencyFormat(options).parse(formattedValue);
329
+ };
330
+
331
+ const DECIMAL_SEPARATORS = [',', '.', '٫'];
332
+ const INTEGER_PATTERN = '(0|[1-9]\\d*)';
333
+ class CurrencyFormat {
334
+ constructor(options) {
335
+ var _a, _b, _c, _d, _e, _f;
336
+ const { currency, currencyDisplay, locale, precision, accountingSign } = options;
337
+ this.locale = locale;
338
+ this.options = {
339
+ style: 'currency',
340
+ currency,
341
+ currencySign: accountingSign ? 'accounting' : undefined,
342
+ currencyDisplay: currencyDisplay !== CurrencyDisplay.hidden ? currencyDisplay : undefined
343
+ };
344
+ const numberFormat = new Intl.NumberFormat(locale, this.options);
345
+ const formatParts = numberFormat.formatToParts(123456);
346
+ this.currency = (_a = formatParts.find(({ type }) => type === 'currency')) === null || _a === void 0 ? void 0 : _a.value;
347
+ this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((i) => i.toLocaleString(locale));
348
+ this.decimalSymbol = (_b = formatParts.find(({ type }) => type === 'decimal')) === null || _b === void 0 ? void 0 : _b.value;
349
+ this.groupingSymbol = (_c = formatParts.find(({ type }) => type === 'group')) === null || _c === void 0 ? void 0 : _c.value;
350
+ this.minusSign = (_d = numberFormat.formatToParts(-1).find(({ type }) => type === 'minusSign')) === null || _d === void 0 ? void 0 : _d.value;
351
+ if (this.decimalSymbol === undefined) {
352
+ this.minimumFractionDigits = this.maximumFractionDigits = 0;
353
+ }
354
+ else if (typeof precision === 'number') {
355
+ this.minimumFractionDigits = this.maximumFractionDigits = precision;
356
+ }
357
+ else {
358
+ this.minimumFractionDigits = (_e = precision === null || precision === void 0 ? void 0 : precision.min) !== null && _e !== void 0 ? _e : numberFormat.resolvedOptions().minimumFractionDigits;
359
+ this.maximumFractionDigits = (_f = precision === null || precision === void 0 ? void 0 : precision.max) !== null && _f !== void 0 ? _f : numberFormat.resolvedOptions().maximumFractionDigits;
360
+ }
361
+ const getPrefix = (str) => {
362
+ return substringBefore(str, this.digits[1]);
363
+ };
364
+ const getSuffix = (str) => {
365
+ return str.substring(str.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);
366
+ };
367
+ this.prefix = getPrefix(numberFormat.format(1));
368
+ this.suffix = getSuffix(numberFormat.format(1));
369
+ this.negativePrefix = getPrefix(numberFormat.format(-1));
370
+ this.negativeSuffix = getSuffix(numberFormat.format(-1));
371
+ }
372
+ parse(str) {
373
+ if (str) {
374
+ const negative = this.isNegative(str);
375
+ str = this.normalizeDigits(str);
376
+ str = this.stripCurrency(str, negative);
377
+ str = this.stripSignLiterals(str);
378
+ const fraction = this.decimalSymbol ? `(?:${escapeRegExp(this.decimalSymbol)}(\\d*))?` : '';
379
+ const match = this.stripGroupingSeparator(str).match(new RegExp(`^${INTEGER_PATTERN}${fraction}$`));
380
+ if (match && this.isValidIntegerFormat(this.decimalSymbol ? str.split(this.decimalSymbol)[0] : str, Number(match[1]))) {
381
+ return Number(`${negative ? '-' : ''}${this.onlyDigits(match[1])}.${this.onlyDigits(match[2] || '')}`);
382
+ }
383
+ }
384
+ return null;
385
+ }
386
+ isValidIntegerFormat(formattedNumber, integerNumber) {
387
+ const options = { ...this.options, minimumFractionDigits: 0 };
388
+ return [
389
+ this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, {
390
+ ...options,
391
+ useGrouping: true
392
+ })), false),
393
+ this.stripCurrency(this.normalizeDigits(integerNumber.toLocaleString(this.locale, {
394
+ ...options,
395
+ useGrouping: false
396
+ })), false)
397
+ ].includes(formattedNumber);
398
+ }
399
+ format(value, options = {
400
+ minimumFractionDigits: this.minimumFractionDigits,
401
+ maximumFractionDigits: this.maximumFractionDigits
402
+ }) {
403
+ return value != null ? value.toLocaleString(this.locale, { ...this.options, ...options }) : '';
404
+ }
405
+ toFraction(str) {
406
+ return `${this.digits[0]}${this.decimalSymbol}${this.onlyLocaleDigits(str.substr(1)).substr(0, this.maximumFractionDigits)}`;
407
+ }
408
+ isFractionIncomplete(str) {
409
+ return !!this.normalizeDigits(this.stripGroupingSeparator(str)).match(new RegExp(`^${INTEGER_PATTERN}${escapeRegExp(this.decimalSymbol)}$`));
410
+ }
411
+ isNegative(str) {
412
+ return (str.startsWith(this.negativePrefix) ||
413
+ (this.minusSign === undefined && (str.startsWith('(') || str.startsWith('-'))) ||
414
+ (this.minusSign !== undefined && str.replace('-', this.minusSign).startsWith(this.minusSign)));
415
+ }
416
+ insertCurrency(str, negative) {
417
+ return `${negative ? this.negativePrefix : this.prefix}${str}${negative ? this.negativeSuffix : this.suffix}`;
418
+ }
419
+ stripGroupingSeparator(str) {
420
+ return this.groupingSymbol !== undefined ? str.replace(new RegExp(escapeRegExp(this.groupingSymbol), 'g'), '') : str;
421
+ }
422
+ stripSignLiterals(str) {
423
+ if (this.minusSign !== undefined) {
424
+ return str.replace('-', this.minusSign).replace(this.minusSign, '');
425
+ }
426
+ else {
427
+ return str.replace(/[-()]/g, '');
428
+ }
429
+ }
430
+ stripCurrency(str, negative) {
431
+ return str.replace(negative ? this.negativePrefix : this.prefix, '').replace(negative ? this.negativeSuffix : this.suffix, '');
432
+ }
433
+ normalizeDecimalSeparator(str, from) {
434
+ DECIMAL_SEPARATORS.forEach((s) => {
435
+ str = str.substr(0, from) + str.substr(from).replace(s, this.decimalSymbol);
436
+ });
437
+ return str;
438
+ }
439
+ normalizeDigits(str) {
440
+ if (this.digits[0] !== '0') {
441
+ this.digits.forEach((digit, index) => {
442
+ str = str.replace(new RegExp(digit, 'g'), String(index));
443
+ });
444
+ }
445
+ return str;
446
+ }
447
+ onlyDigits(str) {
448
+ return this.normalizeDigits(str).replace(/\D+/g, '');
449
+ }
450
+ onlyLocaleDigits(str) {
451
+ return str.replace(new RegExp(`[^${this.digits.join('')}]*`, 'g'), '');
452
+ }
453
+ }
454
+
455
+ class AbstractInputMask {
456
+ constructor(currencyFormat) {
457
+ this.currencyFormat = currencyFormat;
458
+ }
459
+ }
460
+ class DefaultInputMask extends AbstractInputMask {
461
+ conformToMask(str, previousConformedValue = '') {
462
+ const negative = this.currencyFormat.isNegative(str);
463
+ const isEmptyNegativeValue = (str) => str === '' &&
464
+ negative &&
465
+ !(this.currencyFormat.minusSign === undefined
466
+ ? previousConformedValue === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix
467
+ : previousConformedValue === this.currencyFormat.negativePrefix);
468
+ const checkIncompleteValue = (str) => {
469
+ if (isEmptyNegativeValue(str)) {
470
+ return '';
471
+ }
472
+ else if (this.currencyFormat.maximumFractionDigits > 0) {
473
+ if (this.currencyFormat.isFractionIncomplete(str)) {
474
+ return str;
475
+ }
476
+ else if (str.startsWith(this.currencyFormat.decimalSymbol)) {
477
+ return this.currencyFormat.toFraction(str);
478
+ }
479
+ }
480
+ return null;
481
+ };
482
+ let value = str;
483
+ value = this.currencyFormat.stripCurrency(value, negative);
484
+ value = this.currencyFormat.stripSignLiterals(value);
485
+ const incompleteValue = checkIncompleteValue(value);
486
+ if (incompleteValue != null) {
487
+ return this.currencyFormat.insertCurrency(incompleteValue, negative);
488
+ }
489
+ const [integer, ...fraction] = value.split(this.currencyFormat.decimalSymbol);
490
+ const integerDigits = removeLeadingZeros(this.currencyFormat.onlyDigits(integer));
491
+ const fractionDigits = this.currencyFormat.onlyDigits(fraction.join('')).substr(0, this.currencyFormat.maximumFractionDigits);
492
+ const invalidFraction = fraction.length > 0 && fractionDigits.length === 0;
493
+ const invalidNegativeValue = integerDigits === '' &&
494
+ negative &&
495
+ (this.currencyFormat.minusSign === undefined
496
+ ? previousConformedValue === str.slice(0, -2) + this.currencyFormat.negativeSuffix
497
+ : previousConformedValue === str.slice(0, -1));
498
+ if (invalidFraction || invalidNegativeValue || isEmptyNegativeValue(integerDigits)) {
499
+ return previousConformedValue;
500
+ }
501
+ else if (integerDigits.match(/\d+/)) {
502
+ return {
503
+ numberValue: Number(`${negative ? '-' : ''}${integerDigits}.${fractionDigits}`),
504
+ fractionDigits
505
+ };
506
+ }
507
+ else {
508
+ return '';
509
+ }
510
+ }
511
+ }
512
+ class AutoDecimalDigitsInputMask extends AbstractInputMask {
513
+ conformToMask(str, previousConformedValue = '') {
514
+ if (str === '' ||
515
+ (this.currencyFormat.parse(previousConformedValue) === 0 &&
516
+ this.currencyFormat.stripCurrency(previousConformedValue, true).slice(0, -1) === this.currencyFormat.stripCurrency(str, true))) {
517
+ return '';
518
+ }
519
+ const negative = this.currencyFormat.isNegative(str);
520
+ const numberValue = this.currencyFormat.stripSignLiterals(str) === ''
521
+ ? -0
522
+ : Number(`${negative ? '-' : ''}${removeLeadingZeros(this.currencyFormat.onlyDigits(str))}`) / Math.pow(10, this.currencyFormat.maximumFractionDigits);
523
+ return {
524
+ numberValue,
525
+ fractionDigits: numberValue.toFixed(this.currencyFormat.maximumFractionDigits).slice(-this.currencyFormat.maximumFractionDigits)
526
+ };
527
+ }
528
+ }
529
+
530
+ const DEFAULT_OPTIONS = {
531
+ locale: undefined,
532
+ currency: undefined,
533
+ currencyDisplay: undefined,
534
+ exportValueAsInteger: false,
535
+ hideGroupingSeparatorOnFocus: true,
536
+ hideCurrencySymbolOnFocus: true,
537
+ hideNegligibleDecimalDigitsOnFocus: true,
538
+ precision: undefined,
539
+ autoDecimalDigits: false,
540
+ valueRange: undefined,
541
+ autoSign: true,
542
+ useGrouping: true,
543
+ valueScaling: undefined
544
+ };
545
+ class CurrencyInput {
546
+ constructor(el, options) {
547
+ this.el = el;
548
+ this.numberValue = null;
549
+ this.addEventListener();
550
+ this.init(options);
551
+ this.setValue(this.currencyFormat.parse(this.el.value));
552
+ }
553
+ setOptions(options) {
554
+ this.init(options);
555
+ this.applyFixedFractionFormat(this.numberValue, true);
556
+ }
557
+ getValue() {
558
+ const numberValue = this.valueScaling && this.numberValue != null ? this.toInteger(this.numberValue, this.valueScaling) : this.numberValue;
559
+ return { number: numberValue, formatted: this.formattedValue };
560
+ }
561
+ setValue(value) {
562
+ const newValue = this.valueScaling !== undefined && value != null ? this.toFloat(value, this.valueScaling) : value;
563
+ if (newValue !== this.numberValue) {
564
+ this.applyFixedFractionFormat(newValue);
565
+ }
566
+ }
567
+ dispatchEvent(eventName) {
568
+ this.el.dispatchEvent(new CustomEvent(eventName, { detail: this.getValue() }));
569
+ }
570
+ init(options) {
571
+ this.options = {
572
+ ...DEFAULT_OPTIONS,
573
+ ...options
574
+ };
575
+ if (this.options.autoDecimalDigits) {
576
+ this.options.hideNegligibleDecimalDigitsOnFocus = false;
577
+ this.el.setAttribute('inputmode', 'numeric');
578
+ }
579
+ else {
580
+ this.el.setAttribute('inputmode', 'decimal');
581
+ }
582
+ this.currencyFormat = new CurrencyFormat(this.options);
583
+ this.numberMask = this.options.autoDecimalDigits ? new AutoDecimalDigitsInputMask(this.currencyFormat) : new DefaultInputMask(this.currencyFormat);
584
+ const valueScalingOptions = {
585
+ [ValueScaling.precision]: this.currencyFormat.maximumFractionDigits,
586
+ [ValueScaling.thousands]: 3,
587
+ [ValueScaling.millions]: 6,
588
+ [ValueScaling.billions]: 9
589
+ };
590
+ if (this.options.exportValueAsInteger) {
591
+ this.valueScaling = valueScalingOptions[ValueScaling.precision];
592
+ }
593
+ else {
594
+ this.valueScaling = this.options.valueScaling ? valueScalingOptions[this.options.valueScaling] : undefined;
595
+ }
596
+ this.valueScalingFractionDigits =
597
+ this.valueScaling !== undefined && this.options.valueScaling !== ValueScaling.precision
598
+ ? this.valueScaling + this.currencyFormat.maximumFractionDigits
599
+ : this.currencyFormat.maximumFractionDigits;
600
+ this.minValue = this.getMinValue();
601
+ this.maxValue = this.getMaxValue();
602
+ }
603
+ getMinValue() {
604
+ var _a, _b;
605
+ let min = this.toFloat(-Number.MAX_SAFE_INTEGER);
606
+ if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.min) !== undefined) {
607
+ min = Math.max((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.min, this.toFloat(-Number.MAX_SAFE_INTEGER));
608
+ }
609
+ if (!this.options.autoSign && min < 0) {
610
+ min = 0;
611
+ }
612
+ return min;
613
+ }
614
+ getMaxValue() {
615
+ var _a, _b;
616
+ let max = this.toFloat(Number.MAX_SAFE_INTEGER);
617
+ if (((_a = this.options.valueRange) === null || _a === void 0 ? void 0 : _a.max) !== undefined) {
618
+ max = Math.min((_b = this.options.valueRange) === null || _b === void 0 ? void 0 : _b.max, this.toFloat(Number.MAX_SAFE_INTEGER));
619
+ }
620
+ if (!this.options.autoSign && max < 0) {
621
+ max = this.toFloat(Number.MAX_SAFE_INTEGER);
622
+ }
623
+ return max;
624
+ }
625
+ toFloat(value, maxFractionDigits) {
626
+ return value / Math.pow(10, maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits);
627
+ }
628
+ toInteger(value, maxFractionDigits) {
629
+ return Number(value
630
+ .toFixed(maxFractionDigits !== null && maxFractionDigits !== void 0 ? maxFractionDigits : this.valueScalingFractionDigits)
631
+ .split('.')
632
+ .join(''));
633
+ }
634
+ validateValueRange(value) {
635
+ return value != null ? Math.min(Math.max(value, this.minValue), this.maxValue) : value;
636
+ }
637
+ applyFixedFractionFormat(number, forcedChange = false) {
638
+ this.format(this.currencyFormat.format(this.validateValueRange(number)));
639
+ if (number !== this.numberValue || forcedChange) {
640
+ this.dispatchEvent('change');
641
+ }
642
+ }
643
+ format(value, hideNegligibleDecimalDigits = false) {
644
+ if (value != null) {
645
+ if (this.decimalSymbolInsertedAt !== undefined) {
646
+ value = this.currencyFormat.normalizeDecimalSeparator(value, this.decimalSymbolInsertedAt);
647
+ this.decimalSymbolInsertedAt = undefined;
648
+ }
649
+ const conformedValue = this.numberMask.conformToMask(value, this.formattedValue);
650
+ let formattedValue;
651
+ if (typeof conformedValue === 'object') {
652
+ const { numberValue, fractionDigits } = conformedValue;
653
+ let { maximumFractionDigits, minimumFractionDigits } = this.currencyFormat;
654
+ if (this.focus) {
655
+ minimumFractionDigits = hideNegligibleDecimalDigits
656
+ ? fractionDigits.replace(/0+$/, '').length
657
+ : Math.min(maximumFractionDigits, fractionDigits.length);
658
+ }
659
+ else if (Number.isInteger(numberValue) && !this.options.autoDecimalDigits && (this.options.precision === undefined || minimumFractionDigits === 0)) {
660
+ minimumFractionDigits = maximumFractionDigits = 0;
661
+ }
662
+ formattedValue =
663
+ this.toInteger(Math.abs(numberValue)) > Number.MAX_SAFE_INTEGER
664
+ ? this.formattedValue
665
+ : this.currencyFormat.format(numberValue, {
666
+ useGrouping: this.options.useGrouping && !(this.focus && this.options.hideGroupingSeparatorOnFocus),
667
+ minimumFractionDigits,
668
+ maximumFractionDigits
669
+ });
670
+ }
671
+ else {
672
+ formattedValue = conformedValue;
673
+ }
674
+ if (this.options.autoSign) {
675
+ if (this.maxValue <= 0 && !this.currencyFormat.isNegative(formattedValue) && this.currencyFormat.parse(formattedValue) !== 0) {
676
+ formattedValue = formattedValue.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix);
677
+ }
678
+ if (this.minValue >= 0) {
679
+ formattedValue = formattedValue.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix);
680
+ }
681
+ }
682
+ if (this.options.currencyDisplay === CurrencyDisplay.hidden || (this.focus && this.options.hideCurrencySymbolOnFocus)) {
683
+ formattedValue = formattedValue
684
+ .replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== undefined ? this.currencyFormat.minusSign : '(')
685
+ .replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== undefined ? '' : ')')
686
+ .replace(this.currencyFormat.prefix, '')
687
+ .replace(this.currencyFormat.suffix, '');
688
+ }
689
+ this.el.value = formattedValue;
690
+ this.numberValue = this.currencyFormat.parse(formattedValue);
691
+ }
692
+ else {
693
+ this.el.value = '';
694
+ this.numberValue = null;
695
+ }
696
+ this.formattedValue = this.el.value;
697
+ this.dispatchEvent('input');
698
+ }
699
+ addEventListener() {
700
+ this.el.addEventListener('input', (e) => {
701
+ if (!e.detail) {
702
+ const { value, selectionStart } = this.el;
703
+ const inputEvent = e;
704
+ if (selectionStart && inputEvent.data && DECIMAL_SEPARATORS.includes(inputEvent.data)) {
705
+ this.decimalSymbolInsertedAt = selectionStart - 1;
706
+ }
707
+ this.format(value);
708
+ if (this.focus && selectionStart != null) {
709
+ const getCaretPositionAfterFormat = () => {
710
+ const { prefix, suffix, decimalSymbol, maximumFractionDigits, groupingSymbol } = this.currencyFormat;
711
+ let caretPositionFromLeft = value.length - selectionStart;
712
+ const newValueLength = this.formattedValue.length;
713
+ if (this.currencyFormat.minusSign === undefined && (value.startsWith('(') || value.startsWith('-')) && !value.endsWith(')')) {
714
+ return newValueLength - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(selectionStart).length : 1;
715
+ }
716
+ if (this.formattedValue.substr(selectionStart, 1) === groupingSymbol &&
717
+ count(this.formattedValue, groupingSymbol) === count(value, groupingSymbol) + 1) {
718
+ return newValueLength - caretPositionFromLeft - 1;
719
+ }
720
+ if (newValueLength < caretPositionFromLeft) {
721
+ return selectionStart;
722
+ }
723
+ if (decimalSymbol !== undefined && value.indexOf(decimalSymbol) !== -1) {
724
+ const decimalSymbolPosition = value.indexOf(decimalSymbol) + 1;
725
+ if (Math.abs(newValueLength - value.length) > 1 && selectionStart <= decimalSymbolPosition) {
726
+ return this.formattedValue.indexOf(decimalSymbol) + 1;
727
+ }
728
+ else {
729
+ if (!this.options.autoDecimalDigits && selectionStart > decimalSymbolPosition) {
730
+ if (this.currencyFormat.onlyDigits(value.substr(decimalSymbolPosition)).length - 1 === maximumFractionDigits) {
731
+ caretPositionFromLeft -= 1;
732
+ }
733
+ }
734
+ }
735
+ }
736
+ return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden
737
+ ? newValueLength - caretPositionFromLeft
738
+ : Math.max(newValueLength - Math.max(caretPositionFromLeft, suffix.length), prefix.length);
739
+ };
740
+ this.setCaretPosition(getCaretPositionAfterFormat());
741
+ }
742
+ }
743
+ }, { capture: true });
744
+ this.el.addEventListener('focus', () => {
745
+ this.focus = true;
746
+ setTimeout(() => {
747
+ const { value, selectionStart, selectionEnd } = this.el;
748
+ this.format(value, this.options.hideNegligibleDecimalDigitsOnFocus);
749
+ if (selectionStart != null && selectionEnd != null && Math.abs(selectionStart - selectionEnd) > 0) {
750
+ this.setCaretPosition(0, this.el.value.length);
751
+ }
752
+ else if (selectionStart != null) {
753
+ const caretPositionOnFocus = this.getCaretPositionOnFocus(value, selectionStart);
754
+ this.setCaretPosition(caretPositionOnFocus);
755
+ }
756
+ });
757
+ });
758
+ this.el.addEventListener('blur', () => {
759
+ this.focus = false;
760
+ this.applyFixedFractionFormat(this.numberValue);
761
+ });
762
+ this.el.addEventListener('change', (e) => {
763
+ if (!e.detail) {
764
+ this.dispatchEvent('change');
765
+ }
766
+ }, { capture: true });
767
+ }
768
+ getCaretPositionOnFocus(value, selectionStart) {
769
+ if (this.numberValue == null) {
770
+ return selectionStart;
771
+ }
772
+ const { prefix, negativePrefix, suffix, negativeSuffix, groupingSymbol, currency } = this.currencyFormat;
773
+ const isNegative = this.numberValue < 0;
774
+ const currentPrefix = isNegative ? negativePrefix : prefix;
775
+ const prefixLength = currentPrefix.length;
776
+ if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === CurrencyDisplay.hidden) {
777
+ if (isNegative) {
778
+ if (selectionStart <= 1) {
779
+ return 1;
780
+ }
781
+ else if (value.endsWith(')') && selectionStart > value.indexOf(')')) {
782
+ return this.formattedValue.length - 1;
783
+ }
784
+ }
785
+ }
786
+ else {
787
+ const suffixLength = isNegative ? negativeSuffix.length : suffix.length;
788
+ if (selectionStart >= value.length - suffixLength) {
789
+ return this.formattedValue.length - suffixLength;
790
+ }
791
+ else if (selectionStart < prefixLength) {
792
+ return prefixLength;
793
+ }
794
+ }
795
+ let result = selectionStart;
796
+ if (this.options.hideCurrencySymbolOnFocus &&
797
+ this.options.currencyDisplay !== CurrencyDisplay.hidden &&
798
+ selectionStart >= prefixLength &&
799
+ currency !== undefined &&
800
+ currentPrefix.includes(currency)) {
801
+ result -= prefixLength;
802
+ if (isNegative) {
803
+ result += 1;
804
+ }
805
+ }
806
+ if (this.options.hideGroupingSeparatorOnFocus && groupingSymbol !== undefined) {
807
+ result -= count(value.substring(0, selectionStart), groupingSymbol);
808
+ }
809
+ return result;
810
+ }
811
+ setCaretPosition(start, end = start) {
812
+ this.el.setSelectionRange(start, end);
813
+ }
814
+ }
815
+
816
+ const findInput = (el) => ((el === null || el === void 0 ? void 0 : el.matches('input')) ? el : el === null || el === void 0 ? void 0 : el.querySelector('input'));
817
+ var useCurrencyInput = (options) => {
818
+ var _a;
819
+ let numberInput;
820
+ let input;
821
+ const inputRef = Object(lib["ref"])(null);
822
+ const formattedValue = Object(lib["ref"])(null);
823
+ const instance = Object(lib["getCurrentInstance"])();
824
+ const emit = (event, value) => instance === null || instance === void 0 ? void 0 : instance.emit(event, value);
825
+ const lazyModel = lib["isVue3"] && ((_a = instance === null || instance === void 0 ? void 0 : instance.attrs.modelModifiers) === null || _a === void 0 ? void 0 : _a.lazy);
826
+ const numberValue = Object(lib["computed"])(() => instance === null || instance === void 0 ? void 0 : instance.props[lib["isVue3"] ? 'modelValue' : 'value']);
827
+ const inputEvent = lib["isVue3"] ? 'update:modelValue' : 'input';
828
+ const changeEvent = lazyModel ? 'update:modelValue' : 'change';
829
+ const hasInputEventListener = !lib["isVue3"] || !lazyModel;
830
+ const hasChangeEventListener = !lib["isVue3"] || lazyModel || !(instance === null || instance === void 0 ? void 0 : instance.attrs.onChange);
831
+ const onInput = (e) => {
832
+ if (e.detail) {
833
+ if (numberValue.value !== e.detail.number) {
834
+ emit(inputEvent, e.detail.number);
835
+ }
836
+ formattedValue.value = e.detail.formatted;
837
+ }
838
+ };
839
+ const onChange = (e) => {
840
+ if (e.detail) {
841
+ emit(changeEvent, e.detail.number);
842
+ formattedValue.value = e.detail.formatted;
843
+ }
844
+ };
845
+ Object(lib["watch"])(inputRef, (value) => {
846
+ var _a, _b;
847
+ if (value) {
848
+ input = findInput((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.$el) !== null && _b !== void 0 ? _b : value);
849
+ if (input) {
850
+ numberInput = new CurrencyInput(input, options);
851
+ if (hasInputEventListener) {
852
+ input.addEventListener('input', onInput);
853
+ }
854
+ if (hasChangeEventListener) {
855
+ input.addEventListener('change', onChange);
856
+ }
857
+ numberInput.setValue(numberValue.value);
858
+ }
859
+ else {
860
+ console.error('No input element found. Please make sure that the "inputRef" template ref is properly assigned.');
861
+ }
862
+ }
863
+ else {
864
+ numberInput = null;
865
+ }
866
+ });
867
+ Object(lib["onUnmounted"])(() => {
868
+ if (hasInputEventListener) {
869
+ input === null || input === void 0 ? void 0 : input.removeEventListener('input', onInput);
870
+ }
871
+ if (hasChangeEventListener) {
872
+ input === null || input === void 0 ? void 0 : input.removeEventListener('change', onChange);
873
+ }
874
+ });
875
+ return {
876
+ inputRef,
877
+ formattedValue,
878
+ setValue: (value) => numberInput === null || numberInput === void 0 ? void 0 : numberInput.setValue(value),
879
+ setOptions: (options) => numberInput === null || numberInput === void 0 ? void 0 : numberInput.setOptions(options)
880
+ };
881
+ };
882
+
883
+
884
+
885
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader-v16/dist??ref--1-1!./src/components/pl-currency/src/pl-currency.vue?vue&type=script&setup=true&lang=js
886
+
887
+
888
+ var _hoisted_1 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", {
889
+ class: "pl-currency__rub-icon"
890
+ }, "₽", -1);
891
+
892
+
893
+ // eslint-disable-next-line no-unused-vars,no-undef
894
+
895
+ /* harmony default export */ var pl_currencyvue_type_script_setup_true_lang_js = ({
896
+ props: {
897
+ modelValue: String
898
+ },
899
+ emits: ['update:modelValue'],
900
+ setup: function setup(__props, _ref) {
901
+ var emit = _ref.emit;
902
+ var props = __props; // eslint-disable-next-line no-undef
903
+
904
+ var innerValue = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null);
905
+ var options = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
906
+ currency: 'EUR',
907
+ currencyDisplay: 'hidden',
908
+ precision: 2
909
+ });
910
+
911
+ var _useCurrencyInput = useCurrencyInput(options),
912
+ inputRef = _useCurrencyInput.inputRef;
913
+
914
+ Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(innerValue, function (newValue) {
915
+ emit('update:modelValue', newValue);
916
+ });
917
+ return function (_ctx, _cache) {
918
+ var _component_el_input = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("el-input");
919
+
920
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_el_input, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])(_ctx.$attrs, {
921
+ ref_key: "inputRef",
922
+ ref: inputRef,
923
+ modelValue: innerValue.value,
924
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
925
+ return innerValue.value = $event;
926
+ }),
927
+ class: "pl-currency"
928
+ }), {
929
+ append: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () {
930
+ return [_hoisted_1];
931
+ }),
932
+ _: 1
933
+ }, 16, ["modelValue"]);
934
+ };
935
+ }
936
+ });
937
+ // CONCATENATED MODULE: ./src/components/pl-currency/src/pl-currency.vue?vue&type=script&setup=true&lang=js
938
+
939
+ // EXTERNAL MODULE: ./src/components/pl-currency/src/pl-currency.vue?vue&type=style&index=0&id=0538fbc8&lang=scss
940
+ var pl_currencyvue_type_style_index_0_id_0538fbc8_lang_scss = __webpack_require__("3df6");
941
+
942
+ // CONCATENATED MODULE: ./src/components/pl-currency/src/pl-currency.vue
943
+
944
+
945
+
946
+
947
+
948
+ const __exports__ = pl_currencyvue_type_script_setup_true_lang_js;
949
+
950
+ /* harmony default export */ var pl_currency = (__exports__);
951
+ // CONCATENATED MODULE: ./entry.js
952
+
953
+ /* harmony default export */ var entry = (pl_currency); // // Объявление функции установки, выполняемой Vue.use()
954
+ // export function install(Vue) {
955
+ // if (install.installed) {
956
+ // return;
957
+ // }
958
+ // install.installed = true;
959
+ // Vue.component('PlCurrency', PlCurrency);
960
+ // }
961
+ //
962
+ // // Создание значения модуля для Vue.use()
963
+ // const plugin = {
964
+ // install,
965
+ // };
966
+ //
967
+ // // Автоматическая установка, когда vue найден (например в браузере с помощью тега <script>)
968
+ // let GlobalVue = null;
969
+ // if (typeof window !== 'undefined') {
970
+ // GlobalVue = window.Vue;
971
+ // } else if (typeof global !== 'undefined') {
972
+ // GlobalVue = global.Vue;
973
+ // }
974
+ // if (GlobalVue) {
975
+ // GlobalVue.use(plugin);
976
+ // }
977
+ //
978
+ // PlCurrency.install = install;
979
+ //
980
+ // // Экспорт компонента, для использования в качестве модуля (npm/webpack/etc.)
981
+ // export default {
982
+ // version: '0.1.0',
983
+ // install,
984
+ // PlCurrency,
985
+ // };
986
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
987
+
988
+
989
+ /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (entry);
990
+
991
+
992
+
993
+ /***/ })
994
+
995
+ /******/ })["default"];
996
+ //# sourceMappingURL=pl-components-pack-v3.common.js.map