@davra/ui-core 1.0.2 → 1.0.4

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.
Files changed (2) hide show
  1. package/dist/ui-core.es.js +40 -40
  2. package/package.json +22 -22
@@ -72,7 +72,7 @@ const ee = {
72
72
  } catch {
73
73
  throw new Error("Twins API Error");
74
74
  }
75
- }, je = async (e) => {
75
+ }, Oe = async (e) => {
76
76
  try {
77
77
  const { data: t, headers: o } = await f().post(
78
78
  "/api/v1/twins/query",
@@ -87,7 +87,7 @@ const ee = {
87
87
  } catch {
88
88
  throw new Error("Twins API Error");
89
89
  }
90
- }, Oe = async (e) => {
90
+ }, je = async (e) => {
91
91
  try {
92
92
  const { data: t, headers: o } = await f().get(
93
93
  `/api/v1/twins?arrayUUIDs=${e.join(",")}`,
@@ -149,9 +149,9 @@ const ee = {
149
149
  getTwins: Re,
150
150
  getTwinsByTypeName: Me,
151
151
  getTwinByUUID: Pe,
152
- getTwinByUUIDs: Oe,
152
+ getTwinByUUIDs: je,
153
153
  getTwinAttachements: Be,
154
- queryTwins: je
154
+ queryTwins: Oe
155
155
  };
156
156
  var te;
157
157
  const xe = typeof window < "u", Le = (e) => typeof e < "u", Ne = (e) => typeof e == "function";
@@ -205,7 +205,7 @@ const Ke = {
205
205
  Je({
206
206
  linear: qe
207
207
  }, Ke);
208
- function G(e, t, o, l = {}) {
208
+ function H(e, t, o, l = {}) {
209
209
  var n, r, s;
210
210
  const {
211
211
  clone: a = !1,
@@ -216,12 +216,12 @@ function G(e, t, o, l = {}) {
216
216
  } = l, w = be(), I = o || (w == null ? void 0 : w.emit) || ((n = w == null ? void 0 : w.$emit) == null ? void 0 : n.bind(w)) || ((s = (r = w == null ? void 0 : w.proxy) == null ? void 0 : r.$emit) == null ? void 0 : s.bind(w == null ? void 0 : w.proxy));
217
217
  let T = v;
218
218
  t || (t = "modelValue"), T = v || T || `update:${t.toString()}`;
219
- const j = (D) => a ? Ne(a) ? a(D) : ze(D) : D, U = () => Le(e[t]) ? j(e[t]) : h;
219
+ const O = (D) => a ? Ne(a) ? a(D) : ze(D) : D, U = () => Le(e[t]) ? O(e[t]) : h;
220
220
  if (c) {
221
- const D = U(), O = b(D);
222
- return J(() => e[t], (m) => O.value = j(m)), J(O, (m) => {
221
+ const D = U(), j = b(D);
222
+ return J(() => e[t], (m) => j.value = O(m)), J(j, (m) => {
223
223
  (m !== e[t] || _) && I(T, m);
224
- }, { deep: _ }), O;
224
+ }, { deep: _ }), j;
225
225
  } else
226
226
  return S({
227
227
  get() {
@@ -232,13 +232,13 @@ function G(e, t, o, l = {}) {
232
232
  }
233
233
  });
234
234
  }
235
- function Ge(e, t, o = {}) {
235
+ function He(e, t, o = {}) {
236
236
  const l = {};
237
237
  for (const n in e)
238
- l[n] = G(e, n, t, o);
238
+ l[n] = H(e, n, t, o);
239
239
  return l;
240
240
  }
241
- const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("span", null, null, -1), ve = /* @__PURE__ */ L({
241
+ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("span", null, null, -1), ve = /* @__PURE__ */ L({
242
242
  __name: "LabelInput",
243
243
  props: {
244
244
  labels: {},
@@ -254,11 +254,11 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
254
254
  ...o.labels,
255
255
  { header: "Digital Twin Types", color: "purple", icon: "mdi-content-duplicate" },
256
256
  ...o.twintypes
257
- ]), { labelkey: n, labelvalue: r } = Ge(o, t), s = b(""), a = b(""), c = b([]), v = b([]), _ = b(!1), h = (m) => o.twintypes.find((g) => g === m) ? "twintypes" : "labels", w = S(() => h(n.value)), I = () => {
257
+ ]), { labelkey: n, labelvalue: r } = He(o, t), s = b(""), a = b(""), c = b([]), v = b([]), _ = b(!1), h = (m) => o.twintypes.find((g) => g === m) ? "twintypes" : "labels", w = S(() => h(n.value)), I = () => {
258
258
  document.activeElement.blur();
259
259
  }, T = (m) => {
260
260
  m.key === "Enter" && I();
261
- }, j = async (m) => {
261
+ }, O = async (m) => {
262
262
  const g = h(m);
263
263
  if (_.value = !0, g === "twintypes")
264
264
  try {
@@ -277,12 +277,12 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
277
277
  _.value = !1;
278
278
  };
279
279
  J(n, async (m, g) => {
280
- m !== g && (j(m), g !== "" && (r.value = ""));
280
+ m !== g && (O(m), g !== "" && (r.value = ""));
281
281
  });
282
282
  const U = b(), D = S(() => {
283
283
  var m;
284
284
  return (m = U.value) == null ? void 0 : m.isFocused;
285
- }), O = {
285
+ }), j = {
286
286
  specialNames: (m) => ![
287
287
  "deviceid",
288
288
  "uuid",
@@ -295,12 +295,12 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
295
295
  notEmpty: (m) => !!m.trim() || "Required"
296
296
  };
297
297
  return ue(() => {
298
- n.value && j(n.value);
298
+ n.value && O(n.value);
299
299
  }), (m, g) => {
300
- const k = p("v-icon"), $ = p("v-chip"), V = p("v-list-item-title"), M = p("v-list-item"), X = p("v-combobox"), H = p("v-col"), _e = p("v-autocomplete"), fe = p("v-btn"), we = p("v-row");
300
+ const k = p("v-icon"), $ = p("v-chip"), V = p("v-list-item-title"), M = p("v-list-item"), X = p("v-combobox"), Y = p("v-col"), _e = p("v-autocomplete"), fe = p("v-btn"), we = p("v-row");
301
301
  return A(), C(we, { class: "py-2" }, {
302
302
  default: i(() => [
303
- d(H, { class: "py-0 flex-grow-1 flex-shrink-0" }, {
303
+ d(Y, { class: "py-0 flex-grow-1 flex-shrink-0" }, {
304
304
  default: i(() => [
305
305
  d(X, {
306
306
  modelValue: u(n),
@@ -318,12 +318,12 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
318
318
  "no-data-text": "",
319
319
  "hide-details": "auto",
320
320
  density: "compact",
321
- rules: [O.alphanumericAndDash, O.specialNames],
321
+ rules: [j.alphanumericAndDash, j.specialNames],
322
322
  "menu-props": { maxHeight: "400px", zIndex: 9999999 },
323
323
  onKeydown: T
324
324
  }, {
325
325
  "no-data": i(() => [
326
- He
326
+ Ye
327
327
  ]),
328
328
  "prepend-item": i(() => [
329
329
  u(s) && !u(l).includes(u(s)) ? (A(), C(M, {
@@ -399,7 +399,7 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
399
399
  ]),
400
400
  _: 1
401
401
  }),
402
- d(H, { class: "py-0 flex-grow-1 flex-shrink-0" }, {
402
+ d(Y, { class: "py-0 flex-grow-1 flex-shrink-0" }, {
403
403
  default: i(() => [
404
404
  u(w) === "twintypes" ? (A(), C(_e, {
405
405
  key: 0,
@@ -461,11 +461,11 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
461
461
  "item-value": "value",
462
462
  "hide-no-data": !1,
463
463
  "no-data-text": "",
464
- rules: [O.alphanumericAndDash],
464
+ rules: [j.alphanumericAndDash],
465
465
  readonly: "readonly" in m ? m.readonly : u(q)
466
466
  }, {
467
467
  "no-data": i(() => [
468
- Ye
468
+ Ge
469
469
  ]),
470
470
  "prepend-item": i(() => [
471
471
  u(a) && !u(c).find((y) => y === u(a)) ? (A(), C(M, {
@@ -519,7 +519,7 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
519
519
  ]),
520
520
  _: 1
521
521
  }),
522
- d(H, {
522
+ d(Y, {
523
523
  cols: "1",
524
524
  style: { "min-width": "40px" },
525
525
  class: "pa-0 flex-grow-0 flex-shrink-1"
@@ -611,7 +611,7 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
611
611
  }, { deep: !0 }), ue(() => {
612
612
  o.modelValue && (r.value = Object.entries(o.modelValue).map(([_, h]) => ({ key: _, value: h })));
613
613
  }), (_, h) => {
614
- const w = p("v-spacer"), I = p("v-btn"), T = p("v-row"), j = p("v-card-title"), U = p("v-list-subheader"), D = p("v-col"), O = p("v-divider"), m = ve, g = p("v-card-text"), k = p("v-sheet");
614
+ const w = p("v-spacer"), I = p("v-btn"), T = p("v-row"), O = p("v-card-title"), U = p("v-list-subheader"), D = p("v-col"), j = p("v-divider"), m = ve, g = p("v-card-text"), k = p("v-sheet");
615
615
  return A(), C(k, {
616
616
  class: "pa-3",
617
617
  variant: "tonal",
@@ -620,7 +620,7 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
620
620
  color: "grey-lighten-4"
621
621
  }, {
622
622
  default: i(() => [
623
- d(j, { class: "text-primary" }, {
623
+ d(O, { class: "text-primary" }, {
624
624
  default: i(() => [
625
625
  d(T, { "no-gutters": "" }, {
626
626
  default: i(() => [
@@ -675,7 +675,7 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
675
675
  ]),
676
676
  _: 1
677
677
  }),
678
- d(O, { class: "mb-3" }),
678
+ d(j, { class: "mb-3" }),
679
679
  (A(!0), pe(Ae, null, Ee(u(r), ($, V) => (A(), C(m, {
680
680
  key: V,
681
681
  labelkey: u(r)[V].key,
@@ -704,7 +704,7 @@ const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("
704
704
  },
705
705
  emits: ["confirm", "update:modelValue"],
706
706
  setup(e, { emit: t }) {
707
- const o = e, l = o.parentActivator ? b(!1) : G(o, "modelValue", t);
707
+ const o = e, l = o.parentActivator ? b(!1) : H(o, "modelValue", t);
708
708
  return (n, r) => {
709
709
  const s = p("v-dialog");
710
710
  return A(), C(s, {
@@ -736,12 +736,12 @@ const ot = /* @__PURE__ */ L({
736
736
  },
737
737
  emits: ["confirm", "update:modelValue"],
738
738
  setup(e, { emit: t }) {
739
- const o = e, l = o.parentActivator ? b(!1) : G(o, "modelValue", t), n = () => {
739
+ const o = e, l = o.parentActivator ? b(!1) : H(o, "modelValue", t), n = () => {
740
740
  t("confirm"), l.value = !1;
741
741
  }, { mobile: r } = st();
742
742
  return (s, a) => {
743
- const c = p("v-toolbar-title"), v = p("v-btn"), _ = p("v-toolbar"), h = p("v-card-text"), w = p("v-spacer"), I = p("v-card-actions"), T = p("v-card"), j = p("v-dialog");
744
- return A(), C(j, {
743
+ const c = p("v-toolbar-title"), v = p("v-btn"), _ = p("v-toolbar"), h = p("v-card-text"), w = p("v-spacer"), I = p("v-card-actions"), T = p("v-card"), O = p("v-dialog");
744
+ return A(), C(O, {
745
745
  modelValue: u(l),
746
746
  "onUpdate:modelValue": a[2] || (a[2] = (U) => R(l) ? l.value = U : null),
747
747
  activator: s.parentActivator ? "parent" : void 0,
@@ -822,7 +822,7 @@ const ot = /* @__PURE__ */ L({
822
822
  },
823
823
  emits: ["confirm", "update:modelValue"],
824
824
  setup(e, { emit: t }) {
825
- const o = e, l = o.parentActivator ? b(!1) : G(o, "modelValue", t), n = () => {
825
+ const o = e, l = o.parentActivator ? b(!1) : H(o, "modelValue", t), n = () => {
826
826
  t("confirm"), l.value = !1;
827
827
  };
828
828
  return (r, s) => {
@@ -1090,8 +1090,8 @@ const Bt = {
1090
1090
  { Action: "features.CREATE_FEATURE" },
1091
1091
  { Action: "oauthclients.ACCESS" },
1092
1092
  { Action: "oauthclients.CREATE" },
1093
- { Action: "digitalSignatures.ACCESS" },
1094
- { Action: "digitalSignatures.CREATE_DIGITAL_SIGNATURE" },
1093
+ { Action: "anomalyDetection.ACCESS" },
1094
+ { Action: "anomalyDetection.CREATE_ANOMALY_DETECTOR" },
1095
1095
  { Action: "dashboards.ACCESS" },
1096
1096
  { Action: "dashboards.CREATE_DASHBOARD" },
1097
1097
  { Action: "integrations.ACCESS" },
@@ -1313,7 +1313,7 @@ const Bt = {
1313
1313
  } catch {
1314
1314
  throw new Error("Devices API Error");
1315
1315
  }
1316
- }, Y = {
1316
+ }, G = {
1317
1317
  getDevices: Ct,
1318
1318
  queryDevices: It,
1319
1319
  getDeviceByUUID: St,
@@ -1409,7 +1409,7 @@ const Bt = {
1409
1409
  delete e.value[s];
1410
1410
  });
1411
1411
  try {
1412
- const s = await Y.getDeviceByUUIDs(n);
1412
+ const s = await G.getDeviceByUUIDs(n);
1413
1413
  return s.records.forEach((a) => {
1414
1414
  e.value[a.UUID] = a;
1415
1415
  }), s;
@@ -1422,7 +1422,7 @@ const Bt = {
1422
1422
  },
1423
1423
  pullDevices: async (n, r, s, a) => {
1424
1424
  try {
1425
- const c = await Y.getDevices(n, r, s, a);
1425
+ const c = await G.getDevices(n, r, s, a);
1426
1426
  return c.records.forEach((v) => {
1427
1427
  e.value[v.UUID] = v;
1428
1428
  }), c;
@@ -1441,7 +1441,7 @@ const Bt = {
1441
1441
  if (r)
1442
1442
  return null;
1443
1443
  try {
1444
- const a = await Y.getDeviceByUUID(n);
1444
+ const a = await G.getDeviceByUUID(n);
1445
1445
  if (a)
1446
1446
  return e.value[a.UUID] = a, a;
1447
1447
  } catch {
@@ -1561,7 +1561,7 @@ export {
1561
1561
  ee as DavraApiConfig,
1562
1562
  rt as DeleteModal,
1563
1563
  xt as DevicesCountersService,
1564
- Y as DevicesService,
1564
+ G as DevicesService,
1565
1565
  ve as LabelInput,
1566
1566
  tt as LabelsSelector,
1567
1567
  Z as LabelsService,
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@davra/ui-core",
3
- "types": "./dist/types/index.d.ts",
4
- "version": "1.0.2",
5
- "scripts": {
6
- "build": "rimraf dist && vue-tsc && vite build",
7
- "build:watch": "rimraf dist && vue-tsc && vite build --watch",
8
- "docs:dev": "vitepress dev docs",
9
- "docs:build": "vitepress build docs",
10
- "docs:serve": "vitepress serve docs",
11
- "test": "LC_ALL=en_US.UTF-8 TZ=UTC vitest",
12
- "test:ci": "LC_ALL=en_US.UTF-8 TZ=UTC vitest run",
13
- "coverage": "LC_ALL=en_US.UTF-8 TZ=UTC vitest run --coverage"
3
+ "version": "1.0.4",
4
+ "exports": {
5
+ ".": {
6
+ "import": "./dist/ui-core.es.js",
7
+ "types": "./dist/types/index.d.ts"
8
+ },
9
+ "./dist/style.css": "./dist/style.css"
14
10
  },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "module": "./dist/ui-core.es.js",
15
15
  "peerDependencies": {
16
16
  "@vueuse/core": "^9.1.0",
17
17
  "@vueuse/head": "^0.7.9",
@@ -23,6 +23,17 @@
23
23
  "vue": "^3.3.4",
24
24
  "vuetify": "^3.3.16"
25
25
  },
26
+ "scripts": {
27
+ "build": "rimraf dist && vue-tsc && vite build",
28
+ "build:watch": "rimraf dist && vue-tsc && vite build --watch",
29
+ "coverage": "LC_ALL=en_US.UTF-8 TZ=UTC vitest run --coverage",
30
+ "docs:build": "vitepress build docs",
31
+ "docs:dev": "vitepress dev docs",
32
+ "docs:serve": "vitepress serve docs",
33
+ "test": "LC_ALL=en_US.UTF-8 TZ=UTC vitest",
34
+ "test:ci": "LC_ALL=en_US.UTF-8 TZ=UTC vitest run"
35
+ },
36
+ "types": "./dist/types/index.d.ts",
26
37
  "devDependencies": {
27
38
  "@pinia/testing": "^0.0.14",
28
39
  "@types/node": "^20.3.3",
@@ -39,16 +50,5 @@
39
50
  "vitepress": "^0.22.4",
40
51
  "vitest": "^0.34.6",
41
52
  "vue-tsc": "^1.8.3"
42
- },
43
- "files": [
44
- "dist"
45
- ],
46
- "module": "./dist/ui-core.es.js",
47
- "exports": {
48
- ".": {
49
- "types": "./dist/types/index.d.ts",
50
- "import": "./dist/ui-core.es.js"
51
- },
52
- "./dist/style.css": "./dist/style.css"
53
53
  }
54
54
  }