@datapos/datapos-shared 0.3.170 → 0.3.172

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.
@@ -11,7 +11,7 @@ function W() {
11
11
  }
12
12
  return { render: e };
13
13
  }
14
- const A = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", I = "highcharts";
14
+ const A = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", w = "highcharts";
15
15
  let b, R = !1;
16
16
  function H() {
17
17
  async function e(n, s, m, h) {
@@ -27,7 +27,7 @@ function H() {
27
27
  xAxis: { categories: s.data.categoryLabels },
28
28
  yAxis: { title: { text: s.data.name } }
29
29
  }, u = b.chart(m, p, h);
30
- return { chart: u, resize: () => u.reflow(), vendorId: I };
30
+ return { chart: u, resize: () => u.reflow(), vendorId: w };
31
31
  }
32
32
  async function r(n, s, m, h) {
33
33
  await Promise.all([t(), o()]);
@@ -42,13 +42,13 @@ function H() {
42
42
  xAxis: { categories: s.data.categoryLabels },
43
43
  yAxis: { title: { text: s.data.name } }
44
44
  }, u = b.chart(m, p, h);
45
- return { chart: u, resize: () => u.reflow(), vendorId: I };
45
+ return { chart: u, resize: () => u.reflow(), vendorId: w };
46
46
  }
47
47
  async function a(n, s, m, h) {
48
48
  await Promise.all([t(), o()]);
49
49
  const l = [], p = [];
50
- for (let f = 0; f < s.data.measures[0].data.length; f++)
51
- p.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
50
+ for (let E = 0; E < s.data.measures[0].data.length; E++)
51
+ p.push([s.data.measures[0].data[E][0], s.data.measures[1].data[E][0]]);
52
52
  l.push({ type: n.options.highchartsType, name: "Unknown", data: p });
53
53
  const u = {
54
54
  chart: { type: n.options.highchartsType, inverted: n.options.inverted },
@@ -58,7 +58,7 @@ function H() {
58
58
  xAxis: { categories: s.data.categoryLabels },
59
59
  yAxis: { title: { text: s.data.name } }
60
60
  }, c = b.chart(m, u, h);
61
- return { chart: c, resize: () => c.reflow(), vendorId: I };
61
+ return { chart: c, resize: () => c.reflow(), vendorId: w };
62
62
  }
63
63
  async function t() {
64
64
  if (b) return;
@@ -78,16 +78,19 @@ function H() {
78
78
  return { renderCartesianChart: e, renderPolarChart: r, renderRangeChart: a };
79
79
  }
80
80
  const O = 4, N = `https://cdn.jsdelivr.net/npm/micromark@${O}/+esm`, T = 1, _ = `https://cdn.jsdelivr.net/npm/prismjs@${T}/+esm`, C = `https://cdn.jsdelivr.net/npm/prismjs@${T}/components/prism-javascript.min.js`, L = `https://cdn.jsdelivr.net/npm/prismjs@${T}/components/prism-javascript.min.js`;
81
- let x, w;
81
+ let f, y;
82
82
  function V() {
83
- async function e(a, t, o) {
84
- await r(), o.textContent = "Micromark & Prism content goes here...";
83
+ async function e(t, o, n) {
84
+ await a(), n.textContent = "Micromark & Prism content goes here...";
85
85
  }
86
- async function r() {
87
- x && w || (x = await import(
86
+ function r() {
87
+ return { micromarkModule: f, prismModule: y };
88
+ }
89
+ async function a() {
90
+ f && y || (f = await import(
88
91
  /* @vite-ignore */
89
92
  N
90
- ), w = await import(
93
+ ), y = await import(
91
94
  /* @vite-ignore */
92
95
  _
93
96
  ), await import(
@@ -96,9 +99,9 @@ function V() {
96
99
  ), await import(
97
100
  /* @vite-ignore */
98
101
  L
99
- ), console.log("micromarkModule", x), console.log("prismModule", w));
102
+ ), console.log("micromarkModule", f), console.log("prismModule", y));
100
103
  }
101
- return { render: e };
104
+ return { getStuff: r, micromarkModule: f, prismModule: y, render: e };
102
105
  }
103
106
  const z = 0, X = (e) => e, G = () => Date.now(), J = {
104
107
  cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
@@ -204,7 +207,7 @@ function ae(e) {
204
207
  }
205
208
  return a;
206
209
  }
207
- const S = "en-US", y = {}, ne = (e) => {
210
+ const S = "en-US", I = {}, ne = (e) => {
208
211
  switch (e) {
209
212
  case "Edm.Binary":
210
213
  return "unknown";
@@ -256,7 +259,7 @@ const S = "en-US", y = {}, ne = (e) => {
256
259
  }, i = (e, r = 2, a = r, t = S) => {
257
260
  if (e == null) return "";
258
261
  const o = `${t}decimal${r}.${a}`;
259
- let n = y[o];
262
+ let n = I[o];
260
263
  return n || (n = new Intl.NumberFormat(t, {
261
264
  localeMatcher: "best fit",
262
265
  maximumFractionDigits: r,
@@ -264,11 +267,11 @@ const S = "en-US", y = {}, ne = (e) => {
264
267
  minimumIntegerDigits: 1,
265
268
  style: "decimal",
266
269
  useGrouping: !0
267
- }), y[o] = n), n.format(e);
268
- }, ie = (e) => e == null ? "" : e < 1e3 ? E(e) : e < 1e6 ? `${i(e / 1e3, 2, 0)}K` : e < 1e9 ? `${i(e / 1e6, 2, 0)}M` : e < 1e12 ? `${i(e / 1e9, 2, 0)}B` : `${i(e / 1e12, 2, 0)}T`, le = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${E(e)} bytes` : e < 1048576 ? `${i(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${i(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${i(e / 1073741824, 2, 0)} GB` : `${i(e / 1099511627776, 2, 0)} TB`, ce = (e) => e == null ? "" : e < 1e3 ? `${E(e)} ms` : e === 1e3 ? `${E(e)} sec` : e < 6e4 ? `${i(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${i(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${i(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${i(e / 864e5, 2, 0)} days`, E = (e, r = S) => {
270
+ }), I[o] = n), n.format(e);
271
+ }, ie = (e) => e == null ? "" : e < 1e3 ? x(e) : e < 1e6 ? `${i(e / 1e3, 2, 0)}K` : e < 1e9 ? `${i(e / 1e6, 2, 0)}M` : e < 1e12 ? `${i(e / 1e9, 2, 0)}B` : `${i(e / 1e12, 2, 0)}T`, le = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${x(e)} bytes` : e < 1048576 ? `${i(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${i(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${i(e / 1073741824, 2, 0)} GB` : `${i(e / 1099511627776, 2, 0)} TB`, ce = (e) => e == null ? "" : e < 1e3 ? `${x(e)} ms` : e === 1e3 ? `${x(e)} sec` : e < 6e4 ? `${i(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${i(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${i(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${i(e / 864e5, 2, 0)} days`, x = (e, r = S) => {
269
272
  if (e == null) return "";
270
273
  const a = `${r}decimal0.0`;
271
- let t = y[a];
274
+ let t = I[a];
272
275
  return t || (t = new Intl.NumberFormat(r, {
273
276
  localeMatcher: "best fit",
274
277
  maximumFractionDigits: 0,
@@ -276,7 +279,7 @@ const S = "en-US", y = {}, ne = (e) => {
276
279
  minimumIntegerDigits: 1,
277
280
  style: "decimal",
278
281
  useGrouping: !0
279
- }), y[a] = t), t.format(e);
282
+ }), I[a] = t), t.format(e);
280
283
  }, de = (e) => {
281
284
  switch (e) {
282
285
  case "csv":
@@ -368,7 +371,7 @@ export {
368
371
  ce as formatNumberAsDuration,
369
372
  ie as formatNumberAsSize,
370
373
  le as formatNumberAsStorageSize,
371
- E as formatNumberAsWholeNumber,
374
+ x as formatNumberAsWholeNumber,
372
375
  ge as getComponentStatus,
373
376
  G as getCurrentTimestamp,
374
377
  me as getDataFormats,
@@ -1,7 +1,15 @@
1
+ import { micromark } from 'micromark';
2
+ import { default as prism } from 'prismjs';
1
3
  import { PresentationView, PresentationVisualContentConfig } from '../index';
2
4
  export interface CytoscapeJSView extends PresentationView {
3
5
  diagram: unknown;
4
6
  }
5
7
  export declare function useMicromark(): {
8
+ getStuff: () => {
9
+ micromarkModule: typeof micromark | undefined;
10
+ prismModule: typeof prism | undefined;
11
+ };
12
+ micromarkModule: typeof micromark | undefined;
13
+ prismModule: typeof prism | undefined;
6
14
  render: (viewType: unknown, contentConfig: PresentationVisualContentConfig, element: HTMLElement) => Promise<void>;
7
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.170",
3
+ "version": "0.3.172",
4
4
  "description": "A TypeScript library containing common declarations and utilities used across other Data Positioning repositories.",
5
5
  "license": "MIT",
6
6
  "private": false,