@datapos/datapos-shared 0.3.54 → 0.3.55

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,4 +1,4 @@
1
- const x = 0, h = (e) => e, w = () => Date.now();
1
+ const h = 0, x = (e) => e, w = () => Date.now();
2
2
  class d extends Error {
3
3
  locator;
4
4
  constructor(t, n, r) {
@@ -29,8 +29,8 @@ class u extends i {
29
29
  class f extends i {
30
30
  componentName;
31
31
  info;
32
- constructor(t, n, r, a, o) {
33
- super(t, n, o), this.name = "VueHandledError", this.info = r, this.componentName = a;
32
+ constructor(t, n, r, a, s) {
33
+ super(t, n, s), this.name = "VueHandledError", this.info = r, this.componentName = a;
34
34
  }
35
35
  }
36
36
  class y extends i {
@@ -77,8 +77,8 @@ function F(e) {
77
77
  else if (r instanceof d)
78
78
  a = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
79
79
  else if (r instanceof Error) {
80
- const o = r;
81
- a = { locator: "", message: o.message, name: o.name, stack: o.stack }, r = o.cause;
80
+ const s = r;
81
+ a = { locator: "", message: s.message, name: s.name, stack: s.stack }, r = s.cause;
82
82
  } else r ? (a = { locator: "", message: String(r), name: "Error" }, r = void 0) : (a = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
83
83
  /(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a);
84
84
  }
@@ -133,19 +133,19 @@ const m = "en-US", l = {}, k = (e) => {
133
133
  const t = e.lastIndexOf(".");
134
134
  if (t > -1) return e.substring(t + 1);
135
135
  }
136
- }, s = (e, t = 2, n = t, r = m) => {
136
+ }, o = (e, t = 2, n = t, r = m) => {
137
137
  if (e == null) return "";
138
138
  const a = `${r}decimal${t}.${n}`;
139
- let o = l[a];
140
- return o || (o = new Intl.NumberFormat(r, {
139
+ let s = l[a];
140
+ return s || (s = new Intl.NumberFormat(r, {
141
141
  localeMatcher: "best fit",
142
142
  maximumFractionDigits: t,
143
143
  minimumFractionDigits: n,
144
144
  minimumIntegerDigits: 1,
145
145
  style: "decimal",
146
146
  useGrouping: !0
147
- }), l[a] = o), o.format(e);
148
- }, M = (e) => e == null ? "" : e < 1e3 ? c(e) : e < 1e6 ? `${s(e / 1e3, 2, 0)}K` : e < 1e9 ? `${s(e / 1e6, 2, 0)}M` : e < 1e12 ? `${s(e / 1e9, 2, 0)}B` : `${s(e / 1e12, 2, 0)}T`, R = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${c(e)} bytes` : e < 1048576 ? `${s(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${s(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${s(e / 1073741824, 2, 0)} GB` : `${s(e / 1099511627776, 2, 0)} TB`, O = (e) => e == null ? "" : e < 1e3 ? `${c(e)} ms` : e === 1e3 ? `${c(e)} sec` : e < 6e4 ? `${s(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${s(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${s(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${s(e / 864e5, 2, 0)} days`, c = (e, t = m) => {
147
+ }), l[a] = s), s.format(e);
148
+ }, M = (e) => e == null ? "" : e < 1e3 ? c(e) : e < 1e6 ? `${o(e / 1e3, 2, 0)}K` : e < 1e9 ? `${o(e / 1e6, 2, 0)}M` : e < 1e12 ? `${o(e / 1e9, 2, 0)}B` : `${o(e / 1e12, 2, 0)}T`, R = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${c(e)} bytes` : e < 1048576 ? `${o(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${o(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${o(e / 1073741824, 2, 0)} GB` : `${o(e / 1099511627776, 2, 0)} TB`, O = (e) => e == null ? "" : e < 1e3 ? `${c(e)} ms` : e === 1e3 ? `${c(e)} sec` : e < 6e4 ? `${o(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${o(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${o(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${o(e / 864e5, 2, 0)} days`, c = (e, t = m) => {
149
149
  if (e == null) return "";
150
150
  const n = `${t}decimal0.0`;
151
151
  let r = l[n];
@@ -215,18 +215,18 @@ const m = "en-US", l = {}, k = (e) => {
215
215
  { id: "generalAvailability", label: { en: "" } },
216
216
  { id: "notApplicable", label: { en: "not-applicable" } },
217
217
  { id: "preAlpha", color: "red", label: { en: "pre-alpha" } },
218
- { id: "proposed", color: "slate", label: { en: "proposed" } },
218
+ { id: "proposed", color: "other", label: { en: "proposed" } },
219
219
  { id: "releaseCandidate", label: { en: "release-candidate" } },
220
- { id: "unavailable", color: "slate", label: { en: "unavailable" } },
221
- { id: "underReview", color: "slate", label: { en: "under-review" } }
220
+ { id: "unavailable", color: "other", label: { en: "unavailable" } },
221
+ { id: "underReview", color: "other", label: { en: "under-review" } }
222
222
  ], G = (e, t = "en") => {
223
223
  const n = g.find((r) => r.id === e);
224
- return n ? { ...n, label: n.label[t] || n.label.en || e } : { id: e, color: "slate", label: e };
224
+ return n ? { ...n, label: n.label[t] || n.label.en || e } : { id: e, color: "other", label: e };
225
225
  };
226
226
  export {
227
227
  N as APIError,
228
228
  i as ApplicationError,
229
- x as DefaultTimestamp,
229
+ h as DefaultTimestamp,
230
230
  S as EngineError,
231
231
  u as FetchError,
232
232
  $ as OperationalError,
@@ -235,11 +235,11 @@ export {
235
235
  y as WindowRuntimeError,
236
236
  v as buildFetchError,
237
237
  T as concatenateSerialisedErrorMessages,
238
- h as convertMillisecondsToTimestamp,
238
+ x as convertMillisecondsToTimestamp,
239
239
  k as convertODataTypeIdToUsageTypeId,
240
240
  B as extractExtensionFromPath,
241
241
  A as extractNameFromPath,
242
- s as formatNumberAsDecimalNumber,
242
+ o as formatNumberAsDecimalNumber,
243
243
  O as formatNumberAsDuration,
244
244
  M as formatNumberAsSize,
245
245
  R as formatNumberAsStorageSize,
@@ -16,7 +16,7 @@ export interface ComponentRef {
16
16
  label: Record<string, string>;
17
17
  }
18
18
  export type ComponentTypeId = 'app' | 'connection' | 'connector' | 'engine' | 'focus' | 'model' | 'dataView' | 'eventQuery' | 'presentation' | 'presenter' | 'tutorial';
19
- type StatusColor = 'amber' | 'orange' | 'red' | 'slate';
19
+ type StatusColor = 'amber' | 'red' | 'other';
20
20
  export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
21
21
  export type ComponentStatus = {
22
22
  id: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@datapos/datapos-shared",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "0.3.54",
5
+ "version": "0.3.55",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"