@reni-corp/reni-2c-ui 0.3.24 → 0.3.26

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyValue.d.ts","sourceRoot":"","sources":["../../src/valueObjects/CurrencyValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAKpE,qBAAa,aAAc,SAAQ,WAAW,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;gBAGd,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpB,EACE,MAAsB,EACtB,QAA0B,GAC3B,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO;IAOhD,QAAQ,IAAI,MAAM;CAQnB"}
1
+ {"version":3,"file":"CurrencyValue.d.ts","sourceRoot":"","sources":["../../src/valueObjects/CurrencyValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAKpE,qBAAa,aAAc,SAAQ,WAAW,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;gBAGd,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpB,EACE,MAAsB,EACtB,QAA0B,GAC3B,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO;IAOhD,QAAQ,IAAI,MAAM;CAanB"}
@@ -1,10 +1,10 @@
1
1
  var l = Object.defineProperty;
2
2
  var i = (e, r, t) => r in e ? l(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
- var a = (e, r, t) => (i(e, typeof r != "symbol" ? r + "" : r, t), t);
4
- class o {
3
+ var n = (e, r, t) => (i(e, typeof r != "symbol" ? r + "" : r, t), t);
4
+ class u {
5
5
  constructor(r) {
6
- a(this, "_value");
7
- this._value = s(r), this.init();
6
+ n(this, "_value");
7
+ this._value = c(r), this.init();
8
8
  }
9
9
  init() {
10
10
  }
@@ -18,39 +18,40 @@ class o {
18
18
  return this.value;
19
19
  }
20
20
  }
21
- function s(e) {
22
- return e instanceof o ? e.value : e;
21
+ function c(e) {
22
+ return e instanceof u ? e.value : e;
23
23
  }
24
24
  const h = "ja-JP", m = "JPY";
25
- class v extends o {
25
+ class v extends u {
26
26
  constructor(t, {
27
- locale: n = h,
28
- currency: u = m
27
+ locale: a = h,
28
+ currency: o = m
29
29
  } = {}) {
30
30
  super(t);
31
- a(this, "locale");
32
- a(this, "currency");
33
- this.locale = n, this.currency = u;
31
+ n(this, "locale");
32
+ n(this, "currency");
33
+ this.locale = a, this.currency = o;
34
34
  }
35
35
  toString() {
36
- return new Intl.NumberFormat(this.locale, {
36
+ let a = new Intl.NumberFormat(this.locale, {
37
37
  style: "currency",
38
38
  currency: this.currency
39
39
  }).format(this.value);
40
+ return this.currency === "JPY" && (a = a.replace(/\uFFE5|\u00A5/g, "¥")), a;
40
41
  }
41
42
  }
42
43
  const f = "ja-JP";
43
- class c extends o {
44
- constructor(t, { locale: n = f } = {}) {
44
+ class s extends u {
45
+ constructor(t, { locale: a = f } = {}) {
45
46
  super(t);
46
- a(this, "locale");
47
- this.locale = n;
47
+ n(this, "locale");
48
+ this.locale = a;
48
49
  }
49
50
  add(t) {
50
- return new c(this.value + s(t));
51
+ return new s(this.value + c(t));
51
52
  }
52
53
  subtract(t) {
53
- return new c(this.value - s(t));
54
+ return new s(this.value - c(t));
54
55
  }
55
56
  toString() {
56
57
  return new Intl.NumberFormat(this.locale).format(this.value);
@@ -64,7 +65,7 @@ class c extends o {
64
65
  }
65
66
  export {
66
67
  v as C,
67
- c as N,
68
- o as V,
69
- s as g
68
+ s as N,
69
+ u as V,
70
+ c as g
70
71
  };
@@ -1,4 +1,4 @@
1
- import { C as a, N as u } from "./valueObjects-94fc347b.js";
1
+ import { C as a, N as u } from "./valueObjects-e0ea7f1b.js";
2
2
  export {
3
3
  a as CurrencyValue,
4
4
  u as NumberValue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reni-corp/reni-2c-ui",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",