@datapos/datapos-shared 0.3.196 → 0.3.198

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,11 +1,11 @@
1
- const U = ["createObject", "dropObject", "removeRecords", "upsertRecords"], B = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
1
+ const H = ["createObject", "dropObject", "removeRecords", "upsertRecords"], B = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
2
2
  function P() {
3
3
  function e(a, r, t) {
4
4
  t.textContent = "Cytoscape.js diagram goes here...";
5
5
  }
6
6
  return { render: e };
7
7
  }
8
- function H() {
8
+ function W() {
9
9
  function e(a, r, t) {
10
10
  t.textContent = "values table goes here...";
11
11
  }
@@ -13,52 +13,52 @@ function H() {
13
13
  }
14
14
  const S = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", I = "highcharts";
15
15
  let b, D = !1;
16
- function W() {
16
+ function V() {
17
17
  async function e(n, s, m, h) {
18
18
  await t();
19
- const c = [];
20
- for (const l of s.data.measures)
21
- c.push({ type: n.options.highchartsType, name: l.name, data: l.data });
22
- const p = {
19
+ const l = [];
20
+ for (const c of s.data.measures)
21
+ l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
22
+ const g = {
23
23
  chart: { type: n.options.highchartsType },
24
24
  plotOptions: { series: { borderColor: "#333" } },
25
- series: c,
25
+ series: l,
26
26
  title: { text: s.title.text },
27
27
  xAxis: { categories: s.data.categoryLabels },
28
28
  yAxis: { title: { text: s.data.name } }
29
- }, u = b.chart(m, p, h);
29
+ }, u = b.chart(m, g, h);
30
30
  return { chart: u, resize: () => u.reflow(), vendorId: I };
31
31
  }
32
32
  async function a(n, s, m, h) {
33
33
  await Promise.all([t(), o()]);
34
- const c = [];
35
- for (const l of s.data.measures)
36
- c.push({ type: n.options.highchartsType, name: l.name, data: l.data });
37
- const p = {
34
+ const l = [];
35
+ for (const c of s.data.measures)
36
+ l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
37
+ const g = {
38
38
  chart: { polar: !0 },
39
39
  plotOptions: { series: { borderColor: "#333" } },
40
- series: c,
40
+ series: l,
41
41
  title: { text: s.title.text },
42
42
  xAxis: { categories: s.data.categoryLabels },
43
43
  yAxis: { title: { text: s.data.name } }
44
- }, u = b.chart(m, p, h);
44
+ }, u = b.chart(m, g, h);
45
45
  return { chart: u, resize: () => u.reflow(), vendorId: I };
46
46
  }
47
47
  async function r(n, s, m, h) {
48
48
  await Promise.all([t(), o()]);
49
- const c = [], p = [];
49
+ const l = [], g = [];
50
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]]);
52
- c.push({ type: n.options.highchartsType, name: "Unknown", data: p });
51
+ g.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
52
+ l.push({ type: n.options.highchartsType, name: "Unknown", data: g });
53
53
  const u = {
54
54
  chart: { type: n.options.highchartsType, inverted: n.options.inverted },
55
55
  plotOptions: { series: { borderColor: "#333" } },
56
- series: c,
56
+ series: l,
57
57
  title: { text: s.title.text },
58
58
  xAxis: { categories: s.data.categoryLabels },
59
59
  yAxis: { title: { text: s.data.name } }
60
- }, l = b.chart(m, u, h);
61
- return { chart: l, resize: () => l.reflow(), vendorId: I };
60
+ }, c = b.chart(m, u, h);
61
+ return { chart: c, resize: () => c.reflow(), vendorId: I };
62
62
  }
63
63
  async function t() {
64
64
  if (b) return;
@@ -77,11 +77,11 @@ function W() {
77
77
  }
78
78
  return { renderCartesianChart: e, renderPolarChart: a, renderRangeChart: r };
79
79
  }
80
- const v = 4, O = `https://cdn.jsdelivr.net/npm/micromark@${v}/+esm`, A = 3, _ = `https://cdn.jsdelivr.net/npm/micromark-extension-gfm@${A}/+esm`, C = 1, L = `https://cdn.jsdelivr.net/npm/prismjs@${C}/+esm`;
81
- let x, T;
82
- function V() {
80
+ const O = 4, A = `https://cdn.jsdelivr.net/npm/micromark@${O}/+esm`, _ = 3, C = `https://cdn.jsdelivr.net/npm/micromark-extension-gfm@${_}/+esm`, L = 1, $ = `https://cdn.jsdelivr.net/npm/prismjs@${L}/+esm`;
81
+ let x, T, N;
82
+ function X() {
83
83
  async function e() {
84
- return await r(), { gfmExtension: T, micromark: x };
84
+ return await r(), { gfmExtension: T, gfmHtmlExtension: N, micromark: x };
85
85
  }
86
86
  async function a() {
87
87
  await r();
@@ -91,22 +91,22 @@ function V() {
91
91
  const t = await Promise.all([
92
92
  import(
93
93
  /* @vite-ignore */
94
- O
94
+ A
95
95
  ),
96
96
  import(
97
97
  /* @vite-ignore */
98
- _
98
+ C
99
99
  ),
100
100
  import(
101
101
  /* @vite-ignore */
102
- L
102
+ $
103
103
  )
104
104
  ]);
105
- x = t[0].micromark, T = t[1].gfm;
105
+ console.log(t), console.log(t[1]), x = t[0].micromark, T = t[1].gfm, N = t[1].gfmHtml;
106
106
  }
107
107
  return { getStuff: e, render: a };
108
108
  }
109
- const X = 0, G = (e) => e, z = () => Date.now(), K = {
109
+ const G = 0, z = (e) => e, K = () => Date.now(), J = {
110
110
  cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
111
111
  cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
112
112
  cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
@@ -131,57 +131,57 @@ class w extends Error {
131
131
  super(a, t), this.name = "DataPosError", this.locator = r, Error.captureStackTrace?.(this, new.target);
132
132
  }
133
133
  }
134
- class g extends w {
134
+ class p extends w {
135
135
  constructor(a, r, t) {
136
136
  super(a, r, t), this.name = "ApplicationError";
137
137
  }
138
138
  }
139
- class J extends g {
139
+ class q extends p {
140
140
  constructor(a, r, t) {
141
141
  super(a, r, t), this.name = "APIError";
142
142
  }
143
143
  }
144
- class q extends g {
144
+ class Q extends p {
145
145
  constructor(a, r, t) {
146
146
  super(a, r, t), this.name = "EngineError";
147
147
  }
148
148
  }
149
- class N extends g {
149
+ class R extends p {
150
150
  body;
151
151
  constructor(a, r, t, o) {
152
152
  super(a, r, o), this.name = "FetchError", this.body = t;
153
153
  }
154
154
  }
155
- class $ extends g {
155
+ class F extends p {
156
156
  componentName;
157
157
  info;
158
158
  constructor(a, r, t, o, n) {
159
159
  super(a, r, n), this.name = "VueHandledError", this.info = t, this.componentName = o;
160
160
  }
161
161
  }
162
- class Q extends g {
162
+ class Y extends p {
163
163
  constructor(a, r, t) {
164
164
  super(a, r, t), this.name = "WindowHandledRuntimeError";
165
165
  }
166
166
  }
167
- class Y extends g {
167
+ class Z extends p {
168
168
  constructor(a, r, t) {
169
169
  super(a, r, t), this.name = "WindowHandledPromiseRejectionError";
170
170
  }
171
171
  }
172
- class Z extends w {
172
+ class ee extends w {
173
173
  constructor(a, r, t) {
174
174
  super(a, r, t), this.name = "OperationalError";
175
175
  }
176
176
  }
177
- async function ee(e, a, r) {
177
+ async function te(e, a, r) {
178
178
  const t = `${a} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
179
- return new N(t, r, o);
179
+ return new R(t, r, o);
180
180
  }
181
- function te(e) {
181
+ function re(e) {
182
182
  return e.map((a) => a.message).join(" ");
183
183
  }
184
- function re(e, a = "Unknown error.") {
184
+ function ae(e, a = "Unknown error.") {
185
185
  if (e instanceof Error) return e;
186
186
  if (typeof e == "string") return new Error(e);
187
187
  try {
@@ -190,15 +190,15 @@ function re(e, a = "Unknown error.") {
190
190
  return new Error(a);
191
191
  }
192
192
  }
193
- function ae(e) {
193
+ function ne(e) {
194
194
  const a = /* @__PURE__ */ new Set(), r = [];
195
195
  let t = e;
196
196
  for (; t && !a.has(t); ) {
197
197
  a.add(t);
198
198
  let o;
199
- if (t instanceof N)
199
+ if (t instanceof R)
200
200
  o = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
201
- else if (t instanceof $)
201
+ else if (t instanceof F)
202
202
  o = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
203
203
  else if (t instanceof w)
204
204
  o = { locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
@@ -210,7 +210,7 @@ function ae(e) {
210
210
  }
211
211
  return r;
212
212
  }
213
- const R = "en-US", y = {}, ne = (e) => {
213
+ const v = "en-US", y = {}, oe = (e) => {
214
214
  switch (e) {
215
215
  case "Edm.Binary":
216
216
  return "unknown";
@@ -249,17 +249,17 @@ const R = "en-US", y = {}, ne = (e) => {
249
249
  default:
250
250
  return "unknown";
251
251
  }
252
- }, oe = (e) => {
252
+ }, se = (e) => {
253
253
  if (e) {
254
254
  const a = e.lastIndexOf("/"), r = e.lastIndexOf(".", a > -1 ? a : e.length);
255
255
  return r > -1 ? e.substring(0, r) : e;
256
256
  }
257
- }, se = (e) => {
257
+ }, ie = (e) => {
258
258
  if (e) {
259
259
  const a = e.lastIndexOf(".");
260
260
  if (a > -1) return e.substring(a + 1);
261
261
  }
262
- }, i = (e, a = 2, r = a, t = R) => {
262
+ }, i = (e, a = 2, r = a, t = v) => {
263
263
  if (e == null) return "";
264
264
  const o = `${t}decimal${a}.${r}`;
265
265
  let n = y[o];
@@ -271,7 +271,7 @@ const R = "en-US", y = {}, ne = (e) => {
271
271
  style: "decimal",
272
272
  useGrouping: !0
273
273
  }), y[o] = n), n.format(e);
274
- }, 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`, ce = (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`, le = (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, a = R) => {
274
+ }, le = (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`, ce = (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`, de = (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, a = v) => {
275
275
  if (e == null) return "";
276
276
  const r = `${a}decimal0.0`;
277
277
  let t = y[r];
@@ -283,7 +283,7 @@ const R = "en-US", y = {}, ne = (e) => {
283
283
  style: "decimal",
284
284
  useGrouping: !0
285
285
  }), y[r] = t), t.format(e);
286
- }, de = (e) => {
286
+ }, me = (e) => {
287
287
  switch (e) {
288
288
  case "csv":
289
289
  return "text/csv";
@@ -305,22 +305,22 @@ const R = "en-US", y = {}, ne = (e) => {
305
305
  { id: "xls", label: { "en-gb": "XLS" } },
306
306
  { id: "xlsx", label: { "en-gb": "XLSX" } },
307
307
  { id: "xml", label: { "en-gb": "XML" } }
308
- ], me = (e = d) => {
308
+ ], ue = (e = d) => {
309
309
  const a = [];
310
310
  for (const r of k) a.push({ ...r, label: r.label[e] || r.label[d] || r.id });
311
311
  return a;
312
- }, F = [
312
+ }, M = [
313
313
  { id: `
314
314
  `, label: { "en-gb": "Newline" } },
315
315
  { id: "\r", label: { "en-gb": "Carriage Return" } },
316
316
  { id: `\r
317
317
  `, label: { "en-gb": "Carriage Return/Newline" } }
318
- ], ue = (e = d) => {
318
+ ], ge = (e = d) => {
319
319
  const a = [];
320
- for (const r of F)
320
+ for (const r of M)
321
321
  a.push({ ...r, label: r.label[e] || r.label[d] || r.id });
322
322
  return a;
323
- }, M = [
323
+ }, j = [
324
324
  { id: ":", label: { "en-gb": "Colon" } },
325
325
  { id: ",", label: { "en-gb": "Comma" } },
326
326
  { id: "!", label: { "en-gb": "Exclamation Mark" } },
@@ -334,10 +334,10 @@ const R = "en-US", y = {}, ne = (e) => {
334
334
  { id: "|", label: { "en-gb": "Vertical Bar" } }
335
335
  ], pe = (e = d) => {
336
336
  const a = [];
337
- for (const r of M)
337
+ for (const r of j)
338
338
  a.push({ ...r, label: r.label[e] || r.label[d] || r.id });
339
339
  return a;
340
- }, j = [
340
+ }, U = [
341
341
  { id: "alpha", color: "red", label: { "en-gb": "alpha" } },
342
342
  { id: "beta", color: "amber", label: { "en-gb": "beta" } },
343
343
  { id: "generalAvailability", color: "green", label: { "en-gb": "" } },
@@ -347,45 +347,45 @@ const R = "en-US", y = {}, ne = (e) => {
347
347
  { id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
348
348
  { id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
349
349
  { id: "underReview", color: "other", label: { "en-gb": "under-review" } }
350
- ], ge = (e, a = d) => {
351
- const r = j.find((t) => t.id === e);
350
+ ], he = (e, a = d) => {
351
+ const r = U.find((t) => t.id === e);
352
352
  return r ? { ...r, label: r.label[a] || r.label[d] || e } : { id: e, color: "other", label: e };
353
353
  }, d = "en-gb";
354
354
  export {
355
- J as APIError,
356
- g as ApplicationError,
357
- U as CONNECTOR_DESTINATION_OPERATIONS,
355
+ q as APIError,
356
+ p as ApplicationError,
357
+ H as CONNECTOR_DESTINATION_OPERATIONS,
358
358
  B as CONNECTOR_SOURCE_OPERATIONS,
359
359
  d as DEFAULT_LOCALE_CODE,
360
- X as DefaultTimestamp,
361
- q as EngineError,
362
- N as FetchError,
363
- Z as OperationalError,
364
- $ as VueError,
365
- Y as WindowPromiseRejectionError,
366
- Q as WindowRuntimeError,
367
- ee as buildFetchError,
368
- te as concatenateSerialisedErrorMessages,
369
- G as convertMillisecondsToTimestamp,
370
- ne as convertODataTypeIdToUsageTypeId,
371
- se as extractExtensionFromPath,
372
- oe as extractNameFromPath,
360
+ G as DefaultTimestamp,
361
+ Q as EngineError,
362
+ R as FetchError,
363
+ ee as OperationalError,
364
+ F as VueError,
365
+ Z as WindowPromiseRejectionError,
366
+ Y as WindowRuntimeError,
367
+ te as buildFetchError,
368
+ re as concatenateSerialisedErrorMessages,
369
+ z as convertMillisecondsToTimestamp,
370
+ oe as convertODataTypeIdToUsageTypeId,
371
+ ie as extractExtensionFromPath,
372
+ se as extractNameFromPath,
373
373
  i as formatNumberAsDecimalNumber,
374
- le as formatNumberAsDuration,
375
- ie as formatNumberAsSize,
374
+ de as formatNumberAsDuration,
375
+ le as formatNumberAsSize,
376
376
  ce as formatNumberAsStorageSize,
377
377
  E as formatNumberAsWholeNumber,
378
- ge as getComponentStatus,
379
- z as getCurrentTimestamp,
380
- me as getDataFormats,
381
- ue as getRecordDelimiters,
378
+ he as getComponentStatus,
379
+ K as getCurrentTimestamp,
380
+ ue as getDataFormats,
381
+ ge as getRecordDelimiters,
382
382
  pe as getValueDelimiters,
383
- de as lookupMimeTypeForExtension,
384
- re as normalizeToError,
385
- K as presentationViewTypeMap,
386
- ae as serialiseError,
383
+ me as lookupMimeTypeForExtension,
384
+ ae as normalizeToError,
385
+ J as presentationViewTypeMap,
386
+ ne as serialiseError,
387
387
  P as useCytoscapeJS,
388
- H as useDataTable,
389
- W as useHighcharts,
390
- V as useMicromark
388
+ W as useDataTable,
389
+ V as useHighcharts,
390
+ X as useMicromark
391
391
  };
@@ -1,4 +1,5 @@
1
1
  import { micromark } from 'micromark';
2
+ import { gfm, gfmHtml } from 'micromark-extension-gfm';
2
3
  import { Module } from '../../module';
3
4
  import { Component, ComponentConfig, ComponentRef } from '..';
4
5
  export interface Presenter extends Module, Component {
@@ -16,5 +17,7 @@ export type PresenterLocalisedConfig = Omit<PresenterConfig, 'label' | 'descript
16
17
  description: string;
17
18
  };
18
19
  export type PresenterTools = {
20
+ gfmExtension: typeof gfm;
21
+ gfmHtmlExtension: typeof gfmHtml;
19
22
  micromark: typeof micromark;
20
23
  };
@@ -1,7 +1,8 @@
1
- import { gfm } from 'micromark-extension-gfm';
2
1
  import { micromark } from 'micromark';
2
+ import { gfm, gfmHtml } from 'micromark-extension-gfm';
3
3
  export declare function useMicromark(): {
4
4
  getStuff: () => Promise<{
5
+ gfmHtmlExtension: typeof gfmHtml;
5
6
  gfmExtension: typeof gfm;
6
7
  micromark: typeof micromark;
7
8
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.196",
3
+ "version": "0.3.198",
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,