pangea-lib 2.11.49 → 2.11.51

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/main.es.js CHANGED
@@ -44,7 +44,11 @@ var tr = { exports: {} };
44
44
  const f = l(s(425));
45
45
  r.getCoinValueInUsd = function(u) {
46
46
  return o(this, void 0, void 0, function* () {
47
- return u === "ARS" ? 1 / (yield f.default.get("https://dolarapi.com/v1/dolares/blue")).data.venta : ["BTC", "ETH", "LTC", "USDT"].includes(u) ? (yield f.default.get("https://api.coincap.io/v2/assets")).data.data.find((h) => h.symbol === u).priceUsd : 1 / (yield f.default.get("https://v6.exchangerate-api.com/v6/65057543fdcbb1629e21c3a2/latest/USD")).data.conversion_rates[u];
47
+ try {
48
+ return u === "ARS" ? 1 / (yield f.default.get("https://dolarapi.com/v1/dolares/blue")).data.venta : ["BTC", "ETH", "LTC", "USDT"].includes(u) ? (yield f.default.get("https://api.coincap.io/v2/assets")).data.data.find((h) => h.symbol === u).priceUsd : 1 / (yield f.default.get("https://v6.exchangerate-api.com/v6/65057543fdcbb1629e21c3a2/latest/USD")).data.conversion_rates[u];
49
+ } catch {
50
+ throw new Error(`Unable to get the value of ${u} at this time. Try again later.`);
51
+ }
48
52
  });
49
53
  };
50
54
  }, 563: (i, r) => {
@@ -55,7 +59,7 @@ var tr = { exports: {} };
55
59
  for (const u in f)
56
60
  s(f[u]) ? (l[u] || (l[u] = {}), o(l[u], f[u])) : l[u] = f[u];
57
61
  }
58
- Object.defineProperty(r, "__esModule", { value: !0 }), r.mergeDeep = r.merge = r.isObject = r.removeProps = r.copyAvailableFields = void 0, r.copyAvailableFields = function l(f, u) {
62
+ Object.defineProperty(r, "__esModule", { value: !0 }), r.filterKeysDeep = r.filterKeys = r.mergeDeep = r.merge = r.isObject = r.removeProps = r.copyAvailableFields = void 0, r.copyAvailableFields = function l(f, u) {
59
63
  if (f && u)
60
64
  for (const h in u)
61
65
  u.hasOwnProperty(h) && f.hasOwnProperty(h) && (typeof u[h] == "object" && u[h] !== null ? l(f[h], u[h]) : f[h] = u[h]);
@@ -65,12 +69,29 @@ var tr = { exports: {} };
65
69
  }, r.isObject = s, r.merge = o, r.mergeDeep = function(l, f) {
66
70
  const u = {};
67
71
  return o(u, l), o(u, f), u;
72
+ }, r.filterKeys = function(l, f) {
73
+ const u = {}, h = Object.keys(l);
74
+ for (const d of h)
75
+ u[d] = f[d];
76
+ return u;
77
+ }, r.filterKeysDeep = function l(f, u) {
78
+ const h = {}, d = Object.keys(f);
79
+ for (const p of d)
80
+ s(f[p]) && s(u[p]) ? h[p] = l(f[p], u[p]) : h[p] = u[p];
81
+ return h;
68
82
  };
69
83
  }, 849: (i, r) => {
70
- Object.defineProperty(r, "__esModule", { value: !0 }), r.camelToSnakeCase = r.getFirstChartInUppercase = void 0, r.getFirstChartInUppercase = function(s) {
71
- return `${s.charAt(0).toUpperCase()}${s.slice(1)}`;
72
- }, r.camelToSnakeCase = function(s) {
73
- return s.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/-/g, "-").toLowerCase();
84
+ function s(o) {
85
+ return o.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/-/g, "-").toLowerCase();
86
+ }
87
+ Object.defineProperty(r, "__esModule", { value: !0 }), r.camelToKebab = r.camelToUpperSnake = r.camelToSnake = r.getFirstChartInUppercase = r.getFirstChartInLowercase = void 0, r.getFirstChartInLowercase = function(o) {
88
+ return `${o.charAt(0).toLowerCase()}${o.slice(1)}`;
89
+ }, r.getFirstChartInUppercase = function(o) {
90
+ return `${o.charAt(0).toUpperCase()}${o.slice(1)}`;
91
+ }, r.camelToSnake = s, r.camelToUpperSnake = function(o) {
92
+ return s(o).toUpperCase();
93
+ }, r.camelToKebab = function(o) {
94
+ return o.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
74
95
  };
75
96
  }, 927: function(i, r, s) {
76
97
  var o = this && this.__createBinding || (Object.create ? function(f, u, h, d) {
@@ -1015,11 +1036,11 @@ const yM = {
1015
1036
  },
1016
1037
  backgroundSecond: {
1017
1038
  light: "#f5f5f5",
1018
- dark: "#262626"
1039
+ dark: "#212121"
1019
1040
  },
1020
1041
  backgroundThird: {
1021
1042
  light: "#e0e0e0",
1022
- dark: "#2e2e2e"
1043
+ dark: "#262626"
1023
1044
  }
1024
1045
  }, LM = {
1025
1046
  primary: {
@@ -3510,7 +3531,7 @@ function Bt(e, c) {
3510
3531
  }
3511
3532
  function we(e, c) {
3512
3533
  const a = "--pga-color-";
3513
- Bt(`${a}${v8.camelToSnakeCase(e)}`, c), Bt(`${a}${v8.camelToSnakeCase(e)}-rgb`, SH(c));
3534
+ Bt(`${a}${v8.camelToSnake(e)}`, c), Bt(`${a}${v8.camelToSnake(e)}-rgb`, SH(c));
3514
3535
  }
3515
3536
  const Nr = E8(
3516
3537
  "pga-theme",
@@ -1,8 +1,10 @@
1
+ type Language = string;
2
+ type Messages<L extends Language> = Record<string, Record<L, Record<string, string>>>;
1
3
  type Props = {
2
4
  [prop: string]: string | number;
3
5
  count?: number;
4
6
  };
5
- export declare function createI18n<L extends string, M extends Record<string, Record<L, Record<string, string>>>>(storeId: string, defaultLanguage: L, messages: M): {
7
+ export declare function createI18n<L extends Language = Language, M extends Messages<L> = Messages<L>>(storeId: string, defaultLanguage: L, messages: M): {
6
8
  getLanguage: () => import('vue').UnwrapRef<import('vue').UnwrapRef<L>>;
7
9
  setLanguage: (language: L) => void;
8
10
  useI18n: <FN extends keyof M>(fileName: FN) => <MK extends keyof M[FN][L]>(messageKey: MK, props?: Props) => string;
@@ -1,29 +1,4 @@
1
- export declare const getLanguage: () => "es", setLanguage: (language: "es") => void, useI18n: <FN extends "Alert" | "PgaDatePicker" | "PgaModal" | "Notifications">(fileName: FN) => <MK extends keyof {
2
- Alert: {
3
- es: {
4
- alertTitle: string;
5
- cancelBtn: string;
6
- acceptBtn: string;
7
- };
8
- };
9
- PgaDatePicker: {
10
- es: {
11
- cancelBtn: string;
12
- selectBtn: string;
13
- };
14
- };
15
- PgaModal: {
16
- es: {
17
- cancelBtn: string;
18
- acceptBtn: string;
19
- };
20
- };
21
- Notifications: {
22
- es: {
23
- removeAllBtn: string;
24
- };
25
- };
26
- }[FN]["es"]>(messageKey: MK, props?: {
1
+ export declare const getLanguage: () => "es", setLanguage: (language: "es") => void, useI18n: <FN extends string>(fileName: FN) => <MK extends string>(messageKey: MK, props?: {
27
2
  [prop: string]: string | number;
28
3
  count?: number;
29
4
  }) => string;
@@ -1,4 +1,4 @@
1
- import { DeepPartial } from 'pangea-helpers';
1
+ import { PartialDeep } from 'pangea-helpers';
2
2
  import { ButtonType, Size } from '../types';
3
3
  import { NotificationTimeoutTime } from '../notifications/notifications.types';
4
4
  import { AppColors } from '../colors/colors.types';
@@ -30,4 +30,4 @@ export type OptionsStore = {
30
30
  export type Options = OptionsStore & {
31
31
  colors: AppColors;
32
32
  };
33
- export type UserOptions = DeepPartial<Options>;
33
+ export type UserOptions = PartialDeep<Options>;
package/package.json CHANGED
@@ -1,7 +1,20 @@
1
1
  {
2
2
  "name": "pangea-lib",
3
3
  "description": "",
4
- "version": "2.11.49",
4
+ "version": "2.11.51",
5
+ "author": "Gianfranco Raselli",
6
+ "license": "ISC",
7
+ "homepage": "https://github.com/GianfrancoRaselli/pangea#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/GianfrancoRaselli/pangea.git"
11
+ },
12
+ "keywords": [
13
+ "web",
14
+ "front-end",
15
+ "vue",
16
+ "vue3"
17
+ ],
5
18
  "type": "module",
6
19
  "files": [
7
20
  "dist"
@@ -25,22 +38,6 @@
25
38
  "build": "vue-tsc && vite build",
26
39
  "deploy": "node deploy.js"
27
40
  },
28
- "keywords": [
29
- "web",
30
- "front-end",
31
- "vue",
32
- "vue3"
33
- ],
34
- "author": "Gianfranco Raselli",
35
- "license": "ISC",
36
- "repository": {
37
- "type": "git",
38
- "url": "git+https://github.com/GianfrancoRaselli/pangea.git"
39
- },
40
- "bugs": {
41
- "url": "https://github.com/GianfrancoRaselli/pangea/issues"
42
- },
43
- "homepage": "https://github.com/GianfrancoRaselli/pangea#readme",
44
41
  "dependencies": {
45
42
  "@fortawesome/fontawesome-svg-core": "^6.5.1",
46
43
  "@fortawesome/free-brands-svg-icons": "^6.5.1",
@@ -53,7 +50,7 @@
53
50
  "click-outside-vue3": "^4.0.1",
54
51
  "floating-vue": "^5.2.2",
55
52
  "moment": "^2.30.1",
56
- "pangea-helpers": "^1.3.7",
53
+ "pangea-helpers": "^1.3.16",
57
54
  "pinia": "^2.1.7",
58
55
  "pinia-plugin-persistedstate": "^3.2.1",
59
56
  "sanitize.css": "^13.0.0",