@datapos/datapos-shared 0.3.170 → 0.3.171

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,7 +42,7 @@ 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()]);
@@ -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,16 @@ 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 y, E;
82
82
  function V() {
83
83
  async function e(a, t, o) {
84
84
  await r(), o.textContent = "Micromark & Prism content goes here...";
85
85
  }
86
86
  async function r() {
87
- x && w || (x = await import(
87
+ y && E || (y = await import(
88
88
  /* @vite-ignore */
89
89
  N
90
- ), w = await import(
90
+ ), E = await import(
91
91
  /* @vite-ignore */
92
92
  _
93
93
  ), await import(
@@ -96,9 +96,9 @@ function V() {
96
96
  ), await import(
97
97
  /* @vite-ignore */
98
98
  L
99
- ), console.log("micromarkModule", x), console.log("prismModule", w));
99
+ ), console.log("micromarkModule", y), console.log("prismModule", E));
100
100
  }
101
- return { render: e };
101
+ return { micromarkModule: y, prismModule: E, render: e };
102
102
  }
103
103
  const z = 0, X = (e) => e, G = () => Date.now(), J = {
104
104
  cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
@@ -204,7 +204,7 @@ function ae(e) {
204
204
  }
205
205
  return a;
206
206
  }
207
- const S = "en-US", y = {}, ne = (e) => {
207
+ const S = "en-US", I = {}, ne = (e) => {
208
208
  switch (e) {
209
209
  case "Edm.Binary":
210
210
  return "unknown";
@@ -256,7 +256,7 @@ const S = "en-US", y = {}, ne = (e) => {
256
256
  }, i = (e, r = 2, a = r, t = S) => {
257
257
  if (e == null) return "";
258
258
  const o = `${t}decimal${r}.${a}`;
259
- let n = y[o];
259
+ let n = I[o];
260
260
  return n || (n = new Intl.NumberFormat(t, {
261
261
  localeMatcher: "best fit",
262
262
  maximumFractionDigits: r,
@@ -264,11 +264,11 @@ const S = "en-US", y = {}, ne = (e) => {
264
264
  minimumIntegerDigits: 1,
265
265
  style: "decimal",
266
266
  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) => {
267
+ }), I[o] = n), n.format(e);
268
+ }, 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
269
  if (e == null) return "";
270
270
  const a = `${r}decimal0.0`;
271
- let t = y[a];
271
+ let t = I[a];
272
272
  return t || (t = new Intl.NumberFormat(r, {
273
273
  localeMatcher: "best fit",
274
274
  maximumFractionDigits: 0,
@@ -276,7 +276,7 @@ const S = "en-US", y = {}, ne = (e) => {
276
276
  minimumIntegerDigits: 1,
277
277
  style: "decimal",
278
278
  useGrouping: !0
279
- }), y[a] = t), t.format(e);
279
+ }), I[a] = t), t.format(e);
280
280
  }, de = (e) => {
281
281
  switch (e) {
282
282
  case "csv":
@@ -368,7 +368,7 @@ export {
368
368
  ce as formatNumberAsDuration,
369
369
  ie as formatNumberAsSize,
370
370
  le as formatNumberAsStorageSize,
371
- E as formatNumberAsWholeNumber,
371
+ x as formatNumberAsWholeNumber,
372
372
  ge as getComponentStatus,
373
373
  G as getCurrentTimestamp,
374
374
  me as getDataFormats,
@@ -1,7 +1,11 @@
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
+ micromarkModule: typeof micromark | undefined;
9
+ prismModule: typeof prism | undefined;
6
10
  render: (viewType: unknown, contentConfig: PresentationVisualContentConfig, element: HTMLElement) => Promise<void>;
7
11
  };
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.171",
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,