@platforma-sdk/ui-vue 1.82.6 → 1.83.1

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 (141) hide show
  1. package/.turbo/turbo-build.log +169 -23
  2. package/.turbo/turbo-formatter$colon$check.log +2 -2
  3. package/.turbo/turbo-linter$colon$check.log +2 -2
  4. package/.turbo/turbo-types$colon$check.log +2 -2
  5. package/CHANGELOG.md +62 -0
  6. package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js +1 -1
  7. package/dist/components/PlAgDataTable/compositions/useFilterableColumns.d.ts +16 -16
  8. package/dist/components/PlAnnotations/components/AnnotationsSidebar.js.map +1 -1
  9. package/dist/components/PlAnnotations/components/AnnotationsSidebar.style.js.map +1 -1
  10. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js +1 -1
  11. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js.map +1 -1
  12. package/dist/components/PlAnnotations/components/FilterSidebar.js.map +1 -1
  13. package/dist/components/PlAnnotations/components/FilterSidebar.style.js.map +1 -1
  14. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +1 -1
  15. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js.map +1 -1
  16. package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js.map +1 -1
  17. package/dist/defineApp.d.ts +2 -32
  18. package/dist/defineApp.d.ts.map +1 -1
  19. package/dist/defineApp.js +20 -62
  20. package/dist/defineApp.js.map +1 -1
  21. package/dist/index.js +39 -39
  22. package/dist/internal/createAppV3.d.ts +1 -1
  23. package/dist/internal/createAppV3.js +16 -16
  24. package/dist/lib/util/helpers/dist/utils.js +2 -5
  25. package/dist/lib/util/helpers/dist/utils.js.map +1 -1
  26. package/dist/lib.js +1 -1
  27. package/package.json +8 -8
  28. package/src/components/PlAnnotations/components/AnnotationsSidebar.vue +2 -2
  29. package/src/components/PlAnnotations/components/FilterSidebar.vue +2 -2
  30. package/src/defineApp.ts +1 -183
  31. package/dist/components/BlockLayout.vue.d.ts +0 -3
  32. package/dist/components/BlockLayout.vue.d.ts.map +0 -1
  33. package/dist/components/BlockLoader.vue.d.ts +0 -6
  34. package/dist/components/BlockLoader.vue.d.ts.map +0 -1
  35. package/dist/components/LoaderPage.vue.d.ts +0 -3
  36. package/dist/components/LoaderPage.vue.d.ts.map +0 -1
  37. package/dist/components/NotFound.vue.d.ts +0 -3
  38. package/dist/components/NotFound.vue.d.ts.map +0 -1
  39. package/dist/components/PlAdvancedFilter/FilterEditor.vue.d.ts +0 -23
  40. package/dist/components/PlAdvancedFilter/FilterEditor.vue.d.ts.map +0 -1
  41. package/dist/components/PlAdvancedFilter/OperandButton.vue.d.ts +0 -9
  42. package/dist/components/PlAdvancedFilter/OperandButton.vue.d.ts.map +0 -1
  43. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue.d.ts +0 -55
  44. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue.d.ts.map +0 -1
  45. package/dist/components/PlAgCellFile/PlAgCellFile.vue.d.ts +0 -26
  46. package/dist/components/PlAgCellFile/PlAgCellFile.vue.d.ts.map +0 -1
  47. package/dist/components/PlAgCellProgress/PlAgCellProgress.vue.d.ts +0 -8
  48. package/dist/components/PlAgCellProgress/PlAgCellProgress.vue.d.ts.map +0 -1
  49. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.vue.d.ts +0 -10
  50. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.vue.d.ts.map +0 -1
  51. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue.d.ts +0 -11
  52. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue.d.ts.map +0 -1
  53. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.vue.d.ts +0 -8
  54. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.vue.d.ts.map +0 -1
  55. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.vue.d.ts +0 -10
  56. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.vue.d.ts.map +0 -1
  57. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.vue.d.ts +0 -10
  58. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.vue.d.ts.map +0 -1
  59. package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue.d.ts +0 -31
  60. package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue.d.ts.map +0 -1
  61. package/dist/components/PlAgDataTable/PlAgDataTableV2.vue.d.ts +0 -94
  62. package/dist/components/PlAgDataTable/PlAgDataTableV2.vue.d.ts.map +0 -1
  63. package/dist/components/PlAgDataTable/PlAgOverlayLoading.vue.d.ts +0 -10
  64. package/dist/components/PlAgDataTable/PlAgOverlayLoading.vue.d.ts.map +0 -1
  65. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.vue.d.ts +0 -9
  66. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.vue.d.ts.map +0 -1
  67. package/dist/components/PlAgDataTable/PlAgRowCount.vue.d.ts +0 -9
  68. package/dist/components/PlAgDataTable/PlAgRowCount.vue.d.ts.map +0 -1
  69. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.vue.d.ts +0 -17
  70. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.vue.d.ts.map +0 -1
  71. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.d.ts +0 -7
  72. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.d.ts.map +0 -1
  73. package/dist/components/PlAgRowNumHeader.vue.d.ts +0 -7
  74. package/dist/components/PlAgRowNumHeader.vue.d.ts.map +0 -1
  75. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue.d.ts +0 -32
  76. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue.d.ts.map +0 -1
  77. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue.d.ts +0 -14
  78. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue.d.ts.map +0 -1
  79. package/dist/components/PlAnnotations/components/FilterSidebar.vue.d.ts +0 -26
  80. package/dist/components/PlAnnotations/components/FilterSidebar.vue.d.ts.map +0 -1
  81. package/dist/components/PlAnnotations/components/PlAnnotations.vue.d.ts +0 -10
  82. package/dist/components/PlAnnotations/components/PlAnnotations.vue.d.ts.map +0 -1
  83. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue.d.ts +0 -8
  84. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue.d.ts.map +0 -1
  85. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue.d.ts +0 -11
  86. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue.d.ts.map +0 -1
  87. package/dist/components/PlBtnExportArchive/Item.vue.d.ts +0 -7
  88. package/dist/components/PlBtnExportArchive/Item.vue.d.ts.map +0 -1
  89. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.d.ts +0 -35
  90. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.d.ts.map +0 -1
  91. package/dist/components/PlBtnExportArchive/Summary.vue.d.ts +0 -11
  92. package/dist/components/PlBtnExportArchive/Summary.vue.d.ts.map +0 -1
  93. package/dist/components/PlDatasetSelector/PlDatasetSelector.vue.d.ts +0 -77
  94. package/dist/components/PlDatasetSelector/PlDatasetSelector.vue.d.ts.map +0 -1
  95. package/dist/components/PlTableFastSearch/PlTableFastSearch.vue.d.ts +0 -10
  96. package/dist/components/PlTableFastSearch/PlTableFastSearch.vue.d.ts.map +0 -1
  97. package/dist/components/PlTableFilters/PlTableFiltersV2.vue.d.ts +0 -14
  98. package/dist/components/PlTableFilters/PlTableFiltersV2.vue.d.ts.map +0 -1
  99. package/dist/internal/createAppModel.d.ts +0 -7
  100. package/dist/internal/createAppModel.d.ts.map +0 -1
  101. package/dist/internal/createAppModel.js +0 -57
  102. package/dist/internal/createAppModel.js.map +0 -1
  103. package/dist/internal/createAppV1.d.ts +0 -53
  104. package/dist/internal/createAppV1.d.ts.map +0 -1
  105. package/dist/internal/createAppV1.js +0 -129
  106. package/dist/internal/createAppV1.js.map +0 -1
  107. package/dist/internal/createAppV2.d.ts +0 -50
  108. package/dist/internal/createAppV2.d.ts.map +0 -1
  109. package/dist/internal/createAppV2.js +0 -137
  110. package/dist/internal/createAppV2.js.map +0 -1
  111. package/dist/internal/createAppV2.test.d.ts +0 -15
  112. package/dist/internal/createAppV2.test.d.ts.map +0 -1
  113. package/dist/internal/test-helpers/BlockMock.d.ts +0 -29
  114. package/dist/internal/test-helpers/BlockMock.d.ts.map +0 -1
  115. package/dist/internal/test-helpers/createMockApi.d.ts +0 -4
  116. package/dist/internal/test-helpers/createMockApi.d.ts.map +0 -1
  117. package/dist/internal/test-helpers/utils.d.ts +0 -4
  118. package/dist/internal/test-helpers/utils.d.ts.map +0 -1
  119. package/dist/internal/v1.static-test.d.ts +0 -7
  120. package/dist/internal/v1.static-test.d.ts.map +0 -1
  121. package/dist/internal/v2.static-test.d.ts +0 -7
  122. package/dist/internal/v2.static-test.d.ts.map +0 -1
  123. package/dist/plugins/Monetization/EndOfPeriod.vue.d.ts +0 -6
  124. package/dist/plugins/Monetization/EndOfPeriod.vue.d.ts.map +0 -1
  125. package/dist/plugins/Monetization/LimitCard.vue.d.ts +0 -11
  126. package/dist/plugins/Monetization/LimitCard.vue.d.ts.map +0 -1
  127. package/dist/plugins/Monetization/MonetizationSidebar.vue.d.ts +0 -3
  128. package/dist/plugins/Monetization/MonetizationSidebar.vue.d.ts.map +0 -1
  129. package/dist/plugins/Monetization/RunStatus.vue.d.ts +0 -23
  130. package/dist/plugins/Monetization/RunStatus.vue.d.ts.map +0 -1
  131. package/dist/plugins/Monetization/UserCabinetCard.vue.d.ts +0 -7
  132. package/dist/plugins/Monetization/UserCabinetCard.vue.d.ts.map +0 -1
  133. package/src/internal/createAppModel.ts +0 -112
  134. package/src/internal/createAppV1.ts +0 -324
  135. package/src/internal/createAppV2.test.ts +0 -207
  136. package/src/internal/createAppV2.ts +0 -392
  137. package/src/internal/test-helpers/BlockMock.ts +0 -161
  138. package/src/internal/test-helpers/createMockApi.ts +0 -104
  139. package/src/internal/test-helpers/utils.ts +0 -65
  140. package/src/internal/v1.static-test.ts +0 -107
  141. package/src/internal/v2.static-test.ts +0 -107
@@ -2,15 +2,15 @@ import { delay as e } from "../lib/util/helpers/dist/utils.js";
2
2
  import { uniqueId as t } from "../lib/util/helpers/dist/strings.js";
3
3
  import { deepClone as n } from "../lib/util/helpers/dist/objects.js";
4
4
  import "../lib/util/helpers/dist/index.js";
5
- import { MultiError as r, ensureOutputHasStableFlag as i } from "../utils.js";
6
- import { parseQuery as a } from "../urls.js";
5
+ import { parseQuery as r } from "../urls.js";
6
+ import { MultiError as i, ensureOutputHasStableFlag as a } from "../utils.js";
7
7
  import { UpdateSerializer as o } from "./UpdateSerializer.js";
8
8
  import { logDebug as s, logError as c } from "./utils.js";
9
9
  import { getServices as l } from "./getServices.js";
10
10
  import { computed as u, markRaw as d, reactive as f, ref as p } from "vue";
11
11
  import { deriveDataFromStorage as m, getPluginData as h, hasAbortError as g, isPluginOutputKey as _, pluginOutputPrefix as v, unwrapResult as y } from "@platforma-sdk/model";
12
- import { watchIgnorable as b } from "@vueuse/core";
13
- import { applyPatch as x } from "fast-json-patch";
12
+ import { applyPatch as b } from "fast-json-patch";
13
+ import { watchIgnorable as x } from "@vueuse/core";
14
14
  var S = (e) => ({
15
15
  authorId: e?.authorId ?? t(),
16
16
  localVersion: (e?.localVersion ?? 0) + 1
@@ -33,10 +33,10 @@ function C(C, w, T) {
33
33
  pluginId: e,
34
34
  value: t
35
35
  }, k()), V = async (e) => w.setNavigationState(e), H = u(() => {
36
- let e = Object.entries(R.value.outputs).filter(([e]) => !_(e)).map(([e, t]) => w.blockModelInfo.outputs[e]?.withStatus ? [e, i(t)] : [e, t.ok && t.value !== void 0 ? t.value : void 0]);
36
+ let e = Object.entries(R.value.outputs).filter(([e]) => !_(e)).map(([e, t]) => w.blockModelInfo.outputs[e]?.withStatus ? [e, a(t)] : [e, t.ok && t.value !== void 0 ? t.value : void 0]);
37
37
  return Object.fromEntries(e);
38
38
  }), U = u(() => {
39
- let e = Object.entries(R.value.outputs).filter(([e]) => !_(e)).map(([e, t]) => [e, t && t.ok === !1 ? new r(t.errors) : void 0]);
39
+ let e = Object.entries(R.value.outputs).filter(([e]) => !_(e)).map(([e, t]) => [e, t && t.ok === !1 ? new i(t.errors) : void 0]);
40
40
  return Object.fromEntries(e);
41
41
  }), W = f({
42
42
  apiVersion: 3,
@@ -46,7 +46,7 @@ function C(C, w, T) {
46
46
  outputs: H,
47
47
  outputErrors: U
48
48
  }
49
- }), { ignoreUpdates: G } = b(() => W.model, (e) => {
49
+ }), { ignoreUpdates: G } = x(() => W.model, (e) => {
50
50
  let t = n(e);
51
51
  E("setDataQueue appModel.model, data", t.data), N.run(() => z(t.data).then(y));
52
52
  }, { deep: !0 }), K = (e) => {
@@ -65,13 +65,13 @@ function C(C, w, T) {
65
65
  }
66
66
  let t = O.author?.authorId !== e.author?.authorId;
67
67
  t || O.isExternalSnapshot ? (E("got external changes, applying them to the snapshot", e.value), G(() => {
68
- R.value = x(R.value, e.value, !1, !1).newDocument, K({ data: m(R.value.blockStorage) });
68
+ R.value = b(R.value, e.value, !1, !1).newDocument, K({ data: m(R.value.blockStorage) });
69
69
  for (let [e, t] of L) t.ignoreUpdates(() => {
70
70
  t.model.data = n(h(R.value.blockStorage, e));
71
71
  });
72
72
  O.isExternalSnapshot = t;
73
73
  })) : (E("outputs changed", e.value), G(() => {
74
- R.value = x(R.value, e.value).newDocument;
74
+ R.value = b(R.value, e.value).newDocument;
75
75
  })), await new Promise((e) => setTimeout(e, 150));
76
76
  } catch (e) {
77
77
  g(e) ? (E("patches loop aborted"), A.value = !0) : (D("error in patches loop", e), await new Promise((e) => setTimeout(e, 1e3)));
@@ -94,23 +94,23 @@ function C(C, w, T) {
94
94
  await Promise.all(t);
95
95
  }
96
96
  }, X = l({ platforma: w }), Z = (e) => {
97
- let t = v(e), a = u(() => {
97
+ let t = v(e), r = u(() => {
98
98
  let e = {};
99
99
  for (let [n, r] of Object.entries(R.value.outputs)) {
100
100
  if (!n.startsWith(t)) continue;
101
- let a = n.slice(t.length);
102
- w.blockModelInfo.outputs[n]?.withStatus ? e[a] = r ? i(r) : void 0 : e[a] = r.ok && r.value !== void 0 ? r.value : void 0;
101
+ let i = n.slice(t.length);
102
+ w.blockModelInfo.outputs[n]?.withStatus ? e[i] = r ? a(r) : void 0 : e[i] = r.ok && r.value !== void 0 ? r.value : void 0;
103
103
  }
104
104
  return e;
105
105
  }), o = u(() => {
106
106
  let e = {};
107
- for (let [n, i] of Object.entries(R.value.outputs)) n.startsWith(t) && (e[n.slice(t.length)] = i && i.ok === !1 ? new r(i.errors) : void 0);
107
+ for (let [n, r] of Object.entries(R.value.outputs)) n.startsWith(t) && (e[n.slice(t.length)] = r && r.ok === !1 ? new i(r.errors) : void 0);
108
108
  return e;
109
109
  }), s = f({
110
110
  data: n(h(R.value.blockStorage, e)),
111
- outputs: a,
111
+ outputs: r,
112
112
  outputErrors: o
113
- }), { ignoreUpdates: c } = b(() => s.data, (t) => {
113
+ }), { ignoreUpdates: c } = x(() => s.data, (t) => {
114
114
  t !== void 0 && (E("plugin setData", e, t), F(e).run(() => B(e, n(t)).then(y)));
115
115
  }, { deep: !0 });
116
116
  return {
@@ -145,7 +145,7 @@ function C(C, w, T) {
145
145
  }];
146
146
  })),
147
147
  services: d(X),
148
- queryParams: u(() => a(R.value.navigationState.href)),
148
+ queryParams: u(() => r(R.value.navigationState.href)),
149
149
  href: u(() => R.value.navigationState.href),
150
150
  hasErrors: u(() => Object.values(R.value.outputs).some((e) => !e?.ok))
151
151
  }, $ = Object.assign(f(Object.assign(W, ee)), Y);
@@ -20,12 +20,9 @@ function r(e) {
20
20
  return new Promise((t) => setTimeout(t, e));
21
21
  }
22
22
  function i(e, t) {
23
- return t(e);
24
- }
25
- function a(e, t) {
26
23
  if (e != null) return t(e);
27
24
  }
28
- var o = class {
25
+ var a = class {
29
26
  promises = /* @__PURE__ */ new Map();
30
27
  fetch(e, t) {
31
28
  if (this.promises.has(e)) return this.promises.get(e);
@@ -36,6 +33,6 @@ var o = class {
36
33
  }
37
34
  };
38
35
  //#endregion
39
- export { n as Deferred, o as Fetcher, r as delay, e as isNil, t as notEmpty, i as tap, a as tapIf };
36
+ export { n as Deferred, a as Fetcher, r as delay, e as isNil, t as notEmpty, i as tapIf };
40
37
 
41
38
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../lib/util/helpers/src/utils.ts"],"sourcesContent":["import type { AwaitedStruct, Option, Primitive, Result, Unionize } from \"./types\";\n\nexport function isNil(v: unknown): v is null | undefined | void {\n return v === null || v === undefined;\n}\n\nexport function isPrimitive(v: unknown): v is Primitive {\n return (\n isNil(v) ||\n typeof v === \"string\" ||\n typeof v === \"number\" ||\n typeof v === \"boolean\" ||\n typeof v === \"bigint\"\n );\n}\n\nexport function notEmpty<T>(v: T | null | undefined, message?: string): T {\n if (v === null || v === undefined) {\n throw Error(message ?? \"Empty (null | undefined) value\");\n }\n\n return v;\n}\n\nexport function notUndef<T>(v: T | undefined, message?: string): T {\n if (v === undefined) {\n throw Error(message ?? \"Undefined value\");\n }\n\n return v;\n}\n\nexport function undef<V>(v: V | undefined = undefined): V | undefined {\n return v;\n}\n\nexport function bool<V extends boolean>(v: V): boolean {\n return v;\n}\n\nexport function uniqueValues<T>(items: T[]): T[] {\n return [...new Set(items)];\n}\n\nexport function checkIfNotEmpty<T>(v: T | null | undefined, message?: string): asserts v is T {\n if (v === undefined || v === null) {\n throw Error(message ?? \"Empty (null | undefined) value\");\n }\n}\n\nexport function checkIfDefined<T>(v: T | undefined, message?: string): asserts v is T {\n if (v === undefined) {\n throw Error(message ?? \"Undefined value\");\n }\n}\n\nexport function between(n: number, a: number, b: number) {\n const min = Math.min(a, b);\n const max = Math.max(a, b);\n\n return n >= min && n <= max;\n}\n\nexport function listToOptions<T>(list: T[] | readonly T[]): Option<T>[] {\n return list.map((value) => ({ text: String(value), value }));\n}\n\nexport function async<A extends unknown[]>(gf: (...args: A) => Generator) {\n return function (...args: A) {\n const generator = gf(...args);\n\n async function handle(result: IteratorResult<unknown>): Promise<unknown> {\n if (result.done) {\n return Promise.resolve(result.value);\n }\n\n return Promise.resolve(result.value)\n .then((res) => {\n return handle(generator.next(res));\n })\n .catch((err) => {\n return handle(generator.throw(err));\n });\n }\n\n try {\n return handle(generator.next());\n } catch (ex) {\n return Promise.reject(ex instanceof Error ? ex : Error(String(ex)));\n }\n };\n}\n\nexport class Deferred<T> {\n public readonly promise: Promise<T>;\n\n constructor() {\n this.promise = new Promise<T>((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n\n public resolve: (v: T) => void = () => {};\n\n public reject: (err: Error) => void = () => {};\n}\n\nexport function delay(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nexport function tear() {\n return new Promise<void>((r) => queueMicrotask(r));\n}\n\nexport function timer() {\n const t = new Date().getTime();\n return function () {\n return new Date().getTime() - t;\n };\n}\n\nexport function performanceTimer() {\n const t = performance.now();\n return function () {\n return performance.now() - t;\n };\n}\n\nexport function call<R>(f: () => R): R {\n return f();\n}\n\nexport function clamp(n: number, lo: number, up: number) {\n return lo > n ? lo : n > up ? up : n;\n}\n\nexport function tap<T, R>(v: T, cb: (v: T) => R) {\n return cb(v);\n}\n\nexport function tapIf<T, R>(v: T | null | undefined, cb: (v: T) => R) {\n if (v !== null && v !== undefined) {\n return cb(v);\n }\n\n return;\n}\n\nexport function* range(from: number, to: number, step = 1) {\n for (let i = from; i < to; i += step) {\n yield i;\n }\n}\n\nexport function toList<T>(iterable: Iterable<T>): T[] {\n const lst: T[] = [];\n for (const it of iterable) {\n lst.push(it);\n }\n\n return lst;\n}\n\nexport function times<R>(n: number, cb: (i: number) => R): R[] {\n return toList(range(0, n)).map(cb);\n}\n\nexport class Interval {\n constructor(private _delay: number) {}\n\n async *generate(): AsyncGenerator<number> {\n let i = 0;\n while (true) {\n await delay(this._delay);\n yield i++;\n }\n }\n\n async *[Symbol.asyncIterator]() {\n let i = 0;\n while (true) {\n await delay(this._delay);\n yield i++;\n }\n }\n}\n\nexport function arrayFrom<T>(length: number, cb: (i: number) => T) {\n return Array.from({ length }, (_, i) => cb(i));\n}\n\nexport function exhaustive(v: never, message: string): never {\n throw Error(message);\n}\n\nexport type Matcher<T extends string, R = unknown> = {\n [P in T]: () => R;\n};\n\nexport function match<T extends string, R = unknown>(matcher: Matcher<T, R>) {\n return (key: T) => matcher[key]();\n}\n\nexport function okOptional<V>(v: { ok: true; value: V } | { ok: false } | undefined) {\n if (!v) {\n return undefined;\n }\n\n if (v.ok) {\n return v.value;\n }\n}\n\nexport function errorOptional<V>(v: Result<V> | undefined) {\n if (!v) {\n return undefined;\n }\n\n if (!v.ok) {\n return v.error;\n }\n}\n\nexport function unwrap<T>(r: Result<T>): T {\n if (r.ok) {\n return r.value;\n }\n\n throw Error(r.error);\n}\n\nexport function flatValue<T>(v: T | T[]): T[] {\n return Array.isArray(v) ? v : [v];\n}\n\nexport async function resolveAwaited<O extends Record<string, unknown>>(\n obj: O,\n): Promise<AwaitedStruct<O>> {\n return Object.fromEntries(\n await Promise.all(Object.entries(obj).map(async ([k, v]) => [k, await v])),\n ) as Promise<AwaitedStruct<O>>;\n}\n\nexport function alike(obj: Record<string, unknown>, to: Record<string, unknown>) {\n return Object.keys(to).every((bKey) => obj[bKey] === to[bKey]);\n}\n\nexport const identity = <T>(v: T): T => v;\n\nexport function asConst<const T>(v: T) {\n return v;\n}\n\nexport function unionize<K extends keyof O, V, O extends Record<K, V>>(obj: O): Unionize<O>[] {\n return Object.entries(obj).map(([key, value]) => ({\n key,\n value,\n })) as Unionize<O>[];\n}\n\nexport class Fetcher<K, V> {\n private promises = new Map<K, Promise<V>>();\n fetch(key: K, callback: () => Promise<V>) {\n if (this.promises.has(key)) {\n return this.promises.get(key)!;\n }\n const promise = callback().finally(() => {\n this.promises.delete(key);\n });\n this.promises.set(key, promise);\n return promise;\n }\n}\n"],"mappings":";AAEA,SAAgB,EAAM,GAA0C;AAC9D,QAAO,KAAM;;AAaf,SAAgB,EAAY,GAAyB,GAAqB;AACxE,KAAI,KAAM,KACR,OAAM,MAAM,KAAW,iCAAgC;AAGzD,QAAO;;AAwET,IAAa,IAAb,MAAyB;CACvB;CAEA,cAAc;AACZ,OAAK,UAAU,IAAI,SAAY,GAAK,MAAQ;AAE1C,GADA,KAAK,UAAU,GACf,KAAK,SAAS;IACf;;CAGH,gBAAuC;CAEvC,eAA4C;;AAG9C,SAAgB,EAAM,GAAY;AAChC,QAAO,IAAI,SAAS,MAAY,WAAW,GAAS,EAAG,CAAA;;AA6BzD,SAAgB,EAAU,GAAM,GAAiB;AAC/C,QAAO,EAAG,EAAC;;AAGb,SAAgB,EAAY,GAAyB,GAAiB;AACpE,KAAI,KAAM,KACR,QAAO,EAAG,EAAC;;AAsHf,IAAa,IAAb,MAA2B;CACzB,2BAAmB,IAAI,KAAmB;CAC1C,MAAM,GAAQ,GAA4B;AACxC,MAAI,KAAK,SAAS,IAAI,EAAG,CACvB,QAAO,KAAK,SAAS,IAAI,EAAG;EAE9B,IAAM,IAAU,GAAU,CAAC,cAAc;AACvC,QAAK,SAAS,OAAO,EAAG;IACzB;AAED,SADA,KAAK,SAAS,IAAI,GAAK,EAAO,EACvB"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../lib/util/helpers/src/utils.ts"],"sourcesContent":["import type { AwaitedStruct, Option, Primitive, Result, Unionize } from \"./types\";\n\nexport function isNil(v: unknown): v is null | undefined | void {\n return v === null || v === undefined;\n}\n\nexport function isPrimitive(v: unknown): v is Primitive {\n return (\n isNil(v) ||\n typeof v === \"string\" ||\n typeof v === \"number\" ||\n typeof v === \"boolean\" ||\n typeof v === \"bigint\"\n );\n}\n\nexport function notEmpty<T>(v: T | null | undefined, message?: string): T {\n if (v === null || v === undefined) {\n throw Error(message ?? \"Empty (null | undefined) value\");\n }\n\n return v;\n}\n\nexport function notUndef<T>(v: T | undefined, message?: string): T {\n if (v === undefined) {\n throw Error(message ?? \"Undefined value\");\n }\n\n return v;\n}\n\nexport function undef<V>(v: V | undefined = undefined): V | undefined {\n return v;\n}\n\nexport function bool<V extends boolean>(v: V): boolean {\n return v;\n}\n\nexport function uniqueValues<T>(items: T[]): T[] {\n return [...new Set(items)];\n}\n\nexport function checkIfNotEmpty<T>(v: T | null | undefined, message?: string): asserts v is T {\n if (v === undefined || v === null) {\n throw Error(message ?? \"Empty (null | undefined) value\");\n }\n}\n\nexport function checkIfDefined<T>(v: T | undefined, message?: string): asserts v is T {\n if (v === undefined) {\n throw Error(message ?? \"Undefined value\");\n }\n}\n\nexport function between(n: number, a: number, b: number) {\n const min = Math.min(a, b);\n const max = Math.max(a, b);\n\n return n >= min && n <= max;\n}\n\nexport function listToOptions<T>(list: T[] | readonly T[]): Option<T>[] {\n return list.map((value) => ({ text: String(value), value }));\n}\n\nexport function async<A extends unknown[]>(gf: (...args: A) => Generator) {\n return function (...args: A) {\n const generator = gf(...args);\n\n async function handle(result: IteratorResult<unknown>): Promise<unknown> {\n if (result.done) {\n return Promise.resolve(result.value);\n }\n\n return Promise.resolve(result.value)\n .then((res) => {\n return handle(generator.next(res));\n })\n .catch((err) => {\n return handle(generator.throw(err));\n });\n }\n\n try {\n return handle(generator.next());\n } catch (ex) {\n return Promise.reject(ex instanceof Error ? ex : Error(String(ex)));\n }\n };\n}\n\nexport class Deferred<T> {\n public readonly promise: Promise<T>;\n\n constructor() {\n this.promise = new Promise<T>((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n\n public resolve: (v: T) => void = () => {};\n\n public reject: (err: Error) => void = () => {};\n}\n\nexport function delay(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nexport function tear() {\n return new Promise<void>((r) => queueMicrotask(r));\n}\n\nexport function timer() {\n const t = new Date().getTime();\n return function () {\n return new Date().getTime() - t;\n };\n}\n\nexport function performanceTimer() {\n const t = performance.now();\n return function () {\n return performance.now() - t;\n };\n}\n\nexport function call<R>(f: () => R): R {\n return f();\n}\n\nexport function clamp(n: number, lo: number, up: number) {\n return lo > n ? lo : n > up ? up : n;\n}\n\nexport function tap<T, R>(v: T, cb: (v: T) => R) {\n return cb(v);\n}\n\nexport function tapIf<T, R>(v: T | null | undefined, cb: (v: T) => R) {\n if (v !== null && v !== undefined) {\n return cb(v);\n }\n\n return;\n}\n\nexport function* range(from: number, to: number, step = 1) {\n for (let i = from; i < to; i += step) {\n yield i;\n }\n}\n\nexport function toList<T>(iterable: Iterable<T>): T[] {\n const lst: T[] = [];\n for (const it of iterable) {\n lst.push(it);\n }\n\n return lst;\n}\n\nexport function times<R>(n: number, cb: (i: number) => R): R[] {\n return toList(range(0, n)).map(cb);\n}\n\nexport class Interval {\n constructor(private _delay: number) {}\n\n async *generate(): AsyncGenerator<number> {\n let i = 0;\n while (true) {\n await delay(this._delay);\n yield i++;\n }\n }\n\n async *[Symbol.asyncIterator]() {\n let i = 0;\n while (true) {\n await delay(this._delay);\n yield i++;\n }\n }\n}\n\nexport function arrayFrom<T>(length: number, cb: (i: number) => T) {\n return Array.from({ length }, (_, i) => cb(i));\n}\n\nexport function exhaustive(v: never, message: string): never {\n throw Error(message);\n}\n\nexport type Matcher<T extends string, R = unknown> = {\n [P in T]: () => R;\n};\n\nexport function match<T extends string, R = unknown>(matcher: Matcher<T, R>) {\n return (key: T) => matcher[key]();\n}\n\nexport function okOptional<V>(v: { ok: true; value: V } | { ok: false } | undefined) {\n if (!v) {\n return undefined;\n }\n\n if (v.ok) {\n return v.value;\n }\n}\n\nexport function errorOptional<V>(v: Result<V> | undefined) {\n if (!v) {\n return undefined;\n }\n\n if (!v.ok) {\n return v.error;\n }\n}\n\nexport function unwrap<T>(r: Result<T>): T {\n if (r.ok) {\n return r.value;\n }\n\n throw Error(r.error);\n}\n\nexport function flatValue<T>(v: T | T[]): T[] {\n return Array.isArray(v) ? v : [v];\n}\n\nexport async function resolveAwaited<O extends Record<string, unknown>>(\n obj: O,\n): Promise<AwaitedStruct<O>> {\n return Object.fromEntries(\n await Promise.all(Object.entries(obj).map(async ([k, v]) => [k, await v])),\n ) as Promise<AwaitedStruct<O>>;\n}\n\nexport function alike(obj: Record<string, unknown>, to: Record<string, unknown>) {\n return Object.keys(to).every((bKey) => obj[bKey] === to[bKey]);\n}\n\nexport const identity = <T>(v: T): T => v;\n\nexport function asConst<const T>(v: T) {\n return v;\n}\n\nexport function unionize<K extends keyof O, V, O extends Record<K, V>>(obj: O): Unionize<O>[] {\n return Object.entries(obj).map(([key, value]) => ({\n key,\n value,\n })) as Unionize<O>[];\n}\n\nexport class Fetcher<K, V> {\n private promises = new Map<K, Promise<V>>();\n fetch(key: K, callback: () => Promise<V>) {\n if (this.promises.has(key)) {\n return this.promises.get(key)!;\n }\n const promise = callback().finally(() => {\n this.promises.delete(key);\n });\n this.promises.set(key, promise);\n return promise;\n }\n}\n"],"mappings":";AAEA,SAAgB,EAAM,GAA0C;AAC9D,QAAO,KAAM;;AAaf,SAAgB,EAAY,GAAyB,GAAqB;AACxE,KAAI,KAAM,KACR,OAAM,MAAM,KAAW,iCAAgC;AAGzD,QAAO;;AAwET,IAAa,IAAb,MAAyB;CACvB;CAEA,cAAc;AACZ,OAAK,UAAU,IAAI,SAAY,GAAK,MAAQ;AAE1C,GADA,KAAK,UAAU,GACf,KAAK,SAAS;IACf;;CAGH,gBAAuC;CAEvC,eAA4C;;AAG9C,SAAgB,EAAM,GAAY;AAChC,QAAO,IAAI,SAAS,MAAY,WAAW,GAAS,EAAG,CAAA;;AAiCzD,SAAgB,EAAY,GAAyB,GAAiB;AACpE,KAAI,KAAM,KACR,QAAO,EAAG,EAAC;;AAsHf,IAAa,IAAb,MAA2B;CACzB,2BAAmB,IAAI,KAAmB;CAC1C,MAAM,GAAQ,GAA4B;AACxC,MAAI,KAAK,SAAS,IAAI,EAAG,CACvB,QAAO,KAAK,SAAS,IAAI,EAAG;EAE9B,IAAM,IAAU,GAAU,CAAC,cAAc;AACvC,QAAK,SAAS,OAAO,EAAG;IACzB;AAED,SADA,KAAK,SAAS,IAAI,GAAK,EAAO,EACvB"}
package/dist/lib.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import "./_virtual/_rolldown/runtime.js";
2
2
  import './assets/ui.css';/* empty css */
3
3
  import "./utils.js";
4
- import "./createModel.js";
5
4
  import "./defineApp.js";
6
5
  import "./components/BlockLayout.js";
7
6
  import "./components/PlAgDataTable/PlAgOverlayLoading.js";
@@ -47,6 +46,7 @@ import "./components/PlBtnExportArchive/index.js";
47
46
  import "./components/PlDatasetSelector/PlDatasetSelector.js";
48
47
  import "./components/PlDatasetSelector/index.js";
49
48
  import "./composition/usePlugin.js";
49
+ import "./createModel.js";
50
50
  import "./defineStore.js";
51
51
  import "./composition/AgGrid/index.js";
52
52
  import "./objectHash.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/ui-vue",
3
- "version": "1.82.6",
3
+ "version": "1.83.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -28,13 +28,13 @@
28
28
  "zod": "~3.25.76",
29
29
  "@milaboratories/columns-collection-driver": "0.2.4",
30
30
  "@milaboratories/pl-model-common": "1.48.0",
31
- "@milaboratories/uikit": "2.15.25",
32
- "@platforma-sdk/model": "1.82.0",
33
- "@milaboratories/pf-spec-driver": "1.5.1"
31
+ "@milaboratories/uikit": "2.15.26",
32
+ "@milaboratories/pf-spec-driver": "1.5.1",
33
+ "@platforma-sdk/model": "1.83.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@faker-js/faker": "^9.2.0",
37
- "@vitejs/plugin-vue": "^6.0.5",
37
+ "@vitejs/plugin-vue": "^6.0.8",
38
38
  "@vitest/coverage-istanbul": "^4.1.3",
39
39
  "@vue/test-utils": "^2.4.6",
40
40
  "fast-json-patch": "^3.1.1",
@@ -43,13 +43,13 @@
43
43
  "rollup-plugin-sourcemaps2": "^0.5.2",
44
44
  "sass": "~1.83.4",
45
45
  "semver": "^7.7.2",
46
- "typescript": "~5.9.3",
46
+ "typescript": "7.0.2",
47
47
  "vite": "^8.0.6",
48
48
  "vitest": "^4.1.3",
49
+ "@milaboratories/build-configs": "2.0.1",
49
50
  "@milaboratories/helpers": "1.14.5",
50
51
  "@milaboratories/ts-configs": "1.4.0",
51
- "@milaboratories/ts-builder": "1.7.0",
52
- "@milaboratories/build-configs": "2.0.0"
52
+ "@milaboratories/ts-builder": "1.7.1"
53
53
  },
54
54
  "scripts": {
55
55
  "dev": "ts-builder serve --target browser-lib",
@@ -30,9 +30,9 @@ function produceAnnotationUpdate(updater: (draft: Annotation) => void) {
30
30
  props.onUpdateAnnotation(produce(props.annotation, updater));
31
31
  }
32
32
 
33
- function updateTitle(title: string) {
33
+ function updateTitle(title: string | undefined) {
34
34
  produceAnnotationUpdate((draft) => {
35
- draft.title = title;
35
+ draft.title = title ?? "";
36
36
  });
37
37
  }
38
38
 
@@ -49,9 +49,9 @@ function produceStepUpdate(updater: (draft: Filter) => void) {
49
49
  props.onUpdateStep(produce(props.step, updater));
50
50
  }
51
51
 
52
- function updateLabel(label: string) {
52
+ function updateLabel(label: string | undefined) {
53
53
  produceStepUpdate((draft) => {
54
- draft.label = label;
54
+ draft.label = label ?? "";
55
55
  });
56
56
  }
57
57
 
package/src/defineApp.ts CHANGED
@@ -1,9 +1,6 @@
1
1
  import { notEmpty } from "@milaboratories/helpers";
2
2
  import type {
3
- PlatformaExtended,
4
3
  PlatformaV3,
5
- PlatformaV1,
6
- PlatformaV2,
7
4
  BlockCodeKnownFeatureFlags,
8
5
  UiServices as AllUiServices,
9
6
  } from "@platforma-sdk/model";
@@ -15,8 +12,6 @@ import {
15
12
  } from "@platforma-sdk/model";
16
13
  import type { App as VueApp, Component, Reactive } from "vue";
17
14
  import { inject, markRaw, reactive } from "vue";
18
- import { createAppV1, type BaseAppV1 } from "./internal/createAppV1";
19
- import { createAppV2, type BaseAppV2 } from "./internal/createAppV2";
20
15
  import { createAppV3, type BaseAppV3 } from "./internal/createAppV3";
21
16
  import type { AppSettings, ExtendSettings, Routes } from "./types";
22
17
 
@@ -32,135 +27,6 @@ export function useFeatureFlags() {
32
27
  return sdk.featureFlags;
33
28
  }
34
29
 
35
- export function defineApp<
36
- Args = unknown,
37
- Outputs extends BlockOutputsBase = BlockOutputsBase,
38
- UiState = unknown,
39
- Href extends `/${string}` = `/${string}`,
40
- Extend extends ExtendSettings<Href> = ExtendSettings<Href>,
41
- >(
42
- platforma: PlatformaV1<Args, Outputs, UiState, Href> & {
43
- blockModelInfo: BlockModelInfo;
44
- },
45
- extendApp: (app: BaseAppV1<Args, Outputs, UiState, Href>) => Extend,
46
- settings?: AppSettings,
47
- ): SdkPluginV1<Args, Outputs, UiState, Href, Extend>;
48
-
49
- export function defineApp<
50
- Args = unknown,
51
- Outputs extends BlockOutputsBase = BlockOutputsBase,
52
- UiState = unknown,
53
- Href extends `/${string}` = `/${string}`,
54
- Extend extends ExtendSettings<Href> = ExtendSettings<Href>,
55
- >(
56
- platforma: PlatformaV2<Args, Outputs, UiState, Href> & {
57
- blockModelInfo: BlockModelInfo;
58
- },
59
- extendApp: (app: BaseAppV2<Args, Outputs, UiState, Href>) => Extend,
60
- settings?: AppSettings,
61
- ): SdkPluginV2<Args, Outputs, UiState, Href, Extend>;
62
-
63
- export function defineApp<
64
- Args = unknown,
65
- Outputs extends BlockOutputsBase = BlockOutputsBase,
66
- UiState = unknown,
67
- Href extends `/${string}` = `/${string}`,
68
- Extend extends ExtendSettings<Href> = ExtendSettings<Href>,
69
- >(
70
- platforma: PlatformaExtended<
71
- PlatformaV1<Args, Outputs, UiState, Href> | PlatformaV2<Args, Outputs, UiState, Href>
72
- >,
73
-
74
- //
75
- extendApp: (app: any) => Extend,
76
- settings: AppSettings = {},
77
- ):
78
- | SdkPluginV1<Args, Outputs, UiState, Href, Extend>
79
- | SdkPluginV2<Args, Outputs, UiState, Href, Extend> {
80
- let app:
81
- | AppV1<Args, Outputs, UiState, Href, Extend>
82
- | AppV2<Args, Outputs, UiState, Href, Extend>
83
- | undefined = undefined;
84
-
85
- const runtimeApiVersion = platforma.apiVersion ?? 1; // undefined means 1 (backward compatibility)
86
- const blockRequestedApiVersion = getPlatformaApiVersion();
87
-
88
- const loadApp = async () => {
89
- if (blockRequestedApiVersion !== runtimeApiVersion) {
90
- throw new Error(`Block requested API version ${blockRequestedApiVersion} but runtime API version is ${runtimeApiVersion}.
91
- Please update the desktop app to use the latest API version.`);
92
- }
93
-
94
- if (platforma.apiVersion === undefined || platforma.apiVersion === 1) {
95
- await platforma.loadBlockState().then((state) => {
96
- plugin.loaded = true;
97
- const baseApp = createAppV1<Args, Outputs, UiState, Href>(state, platforma, settings);
98
-
99
- const localState = extendApp(baseApp);
100
-
101
- const routes = Object.fromEntries(
102
- Object.entries(localState.routes as Routes<Href>).map(([href, component]) => {
103
- const c = typeof component === "function" ? component() : component;
104
- return [href, markRaw(c as Component)];
105
- }),
106
- );
107
-
108
- app = Object.assign(baseApp, {
109
- ...localState,
110
- getRoute(href: Href): Component | undefined {
111
- return routes[href];
112
- },
113
- } as unknown as AppV1<Args, Outputs, UiState, Href, Extend>);
114
- });
115
- } else if (platforma.apiVersion === 2) {
116
- await platforma.loadBlockState().then((stateOrError) => {
117
- const state = unwrapResult(stateOrError);
118
- plugin.loaded = true;
119
- const baseApp = createAppV2<Args, Outputs, UiState, Href>(state, platforma, settings);
120
-
121
- const localState = extendApp(baseApp);
122
-
123
- const routes = Object.fromEntries(
124
- Object.entries(localState.routes as Routes<Href>).map(([href, component]) => {
125
- const c = typeof component === "function" ? component() : component;
126
- return [href, markRaw(c as Component)];
127
- }),
128
- );
129
-
130
- app = Object.assign(baseApp, {
131
- ...localState,
132
- getRoute(href: Href): Component | undefined {
133
- return routes[href];
134
- },
135
- } as unknown as AppV2<Args, Outputs, UiState, Href, Extend>);
136
- });
137
- }
138
- };
139
-
140
- const plugin = reactive({
141
- apiVersion: platforma.apiVersion ?? 1,
142
- featureFlags: platforma.blockModelInfo.featureFlags,
143
- loaded: false,
144
- error: undefined as unknown,
145
- useApp<PageHref extends Href = Href>() {
146
- return notEmpty(app, "App is not loaded") as
147
- | AppV1<Args, Outputs, UiState, PageHref, Extend>
148
- | AppV2<Args, Outputs, UiState, PageHref, Extend>;
149
- },
150
- install(app: VueApp) {
151
- app.provide(pluginKey, this);
152
- loadApp().catch((err) => {
153
- console.error("load initial state error", err);
154
- plugin.error = err;
155
- });
156
- },
157
- });
158
-
159
- return plugin as
160
- | SdkPluginV1<Args, Outputs, UiState, Href, Extend>
161
- | SdkPluginV2<Args, Outputs, UiState, Href, Extend>;
162
- }
163
-
164
30
  export function defineAppV3<
165
31
  Data = unknown,
166
32
  Args = unknown,
@@ -256,24 +122,6 @@ export function defineAppV3<
256
122
  return plugin as SdkPluginV3<Data, Args, Outputs, Href, Plugins, Extend, UiServices>;
257
123
  }
258
124
 
259
- export type AppV1<
260
- Args = unknown,
261
- Outputs extends BlockOutputsBase = BlockOutputsBase,
262
- UiState = unknown,
263
- Href extends `/${string}` = `/${string}`,
264
- Local extends ExtendSettings<Href> = ExtendSettings<Href>,
265
- > = BaseAppV1<Args, Outputs, UiState, Href> &
266
- Reactive<Omit<Local, "routes">> & { getRoute(href: Href): Component | undefined };
267
-
268
- export type AppV2<
269
- Args = unknown,
270
- Outputs extends BlockOutputsBase = BlockOutputsBase,
271
- UiState = unknown,
272
- Href extends `/${string}` = `/${string}`,
273
- Local extends ExtendSettings<Href> = ExtendSettings<Href>,
274
- > = BaseAppV2<Args, Outputs, UiState, Href> &
275
- Reactive<Omit<Local, "routes">> & { getRoute(href: Href): Component | undefined };
276
-
277
125
  export type AppV3<
278
126
  Data = unknown,
279
127
  Args = unknown,
@@ -289,36 +137,6 @@ export type AppV3<
289
137
  // SdkPlugin types
290
138
  // ---------------------------------------------------------------------------
291
139
 
292
- export type SdkPluginV1<
293
- Args = unknown,
294
- Outputs extends BlockOutputsBase = BlockOutputsBase,
295
- UiState = unknown,
296
- Href extends `/${string}` = `/${string}`,
297
- Local extends ExtendSettings<Href> = ExtendSettings<Href>,
298
- > = {
299
- apiVersion: 1;
300
- featureFlags: BlockCodeKnownFeatureFlags;
301
- loaded: boolean;
302
- error: unknown;
303
- useApp<PageHref extends Href = Href>(): AppV1<Args, Outputs, UiState, PageHref, Local>;
304
- install(app: VueApp): void;
305
- };
306
-
307
- export type SdkPluginV2<
308
- Args = unknown,
309
- Outputs extends BlockOutputsBase = BlockOutputsBase,
310
- UiState = unknown,
311
- Href extends `/${string}` = `/${string}`,
312
- Local extends ExtendSettings<Href> = ExtendSettings<Href>,
313
- > = {
314
- apiVersion: 2;
315
- featureFlags: BlockCodeKnownFeatureFlags;
316
- loaded: boolean;
317
- error: unknown;
318
- useApp<PageHref extends Href = Href>(): AppV2<Args, Outputs, UiState, PageHref, Local>;
319
- install(app: VueApp): void;
320
- };
321
-
322
140
  export type SdkPluginV3<
323
141
  Data = unknown,
324
142
  Args = unknown,
@@ -344,4 +162,4 @@ export type SdkPluginV3<
344
162
  install(app: VueApp): void;
345
163
  };
346
164
 
347
- export type SdkPlugin = SdkPluginV1 | SdkPluginV2 | SdkPluginV3;
165
+ export type SdkPlugin = SdkPluginV3;
@@ -1,3 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
- export default _default;
3
- //# sourceMappingURL=BlockLayout.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlockLayout.vue"],"names":[],"mappings":"AAgEA,OAAO,sBAAsB,CAAC;;AA6J9B,wBAKG"}
@@ -1,6 +0,0 @@
1
- type __VLS_Props = {
2
- value: boolean | number | undefined;
3
- };
4
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
- export default _default;
6
- //# sourceMappingURL=BlockLoader.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockLoader.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlockLoader.vue"],"names":[],"mappings":"AAoCA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CACrC,CAAC;;AAkEF,wBAMG"}
@@ -1,3 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
2
- export default _default;
3
- //# sourceMappingURL=LoaderPage.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoaderPage.vue.d.ts","sourceRoot":"","sources":["../../src/components/LoaderPage.vue"],"names":[],"mappings":";AAmDA,wBAMG"}
@@ -1,3 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
2
- export default _default;
3
- //# sourceMappingURL=NotFound.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotFound.vue.d.ts","sourceRoot":"","sources":["../../src/components/NotFound.vue"],"names":[],"mappings":";AA0FA,wBAMG"}
@@ -1,23 +0,0 @@
1
- import { ListOptionBase } from '@platforma-sdk/model';
2
- import { SUPPORTED_FILTER_TYPES } from './constants';
3
- import { EditableFilter, Operand, PlAdvancedFilterColumnId, SourceOptionInfo } from './types';
4
- type __VLS_Props = {
5
- filter: EditableFilter;
6
- isLast: boolean;
7
- operand: Operand;
8
- enableDnd: boolean;
9
- columnOptions: SourceOptionInfo[];
10
- supportedFilters: typeof SUPPORTED_FILTER_TYPES;
11
- getSuggestOptions: (params: {
12
- columnId: PlAdvancedFilterColumnId;
13
- axisIdx?: number;
14
- searchType: "value" | "label";
15
- searchStr: string;
16
- }) => ListOptionBase<string | number>[] | Promise<ListOptionBase<string | number>[]>;
17
- onDelete: (columnId: PlAdvancedFilterColumnId) => void;
18
- onUpdateFilter: (filter: EditableFilter) => void;
19
- onChangeOperand: (op: Operand) => void;
20
- };
21
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
- export default _default;
23
- //# sourceMappingURL=FilterEditor.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterEditor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlAdvancedFilter/FilterEditor.vue"],"names":[],"mappings":"AA8jBA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAUnG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,gBAAgB,EAAE,OAAO,sBAAsB,CAAC;IAChD,iBAAiB,EAAE,CAAC,MAAM,EAAE;QAC1B,QAAQ,EAAE,wBAAwB,CAAC;QACnC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC;QAC9B,SAAS,EAAE,MAAM,CAAC;KACnB,KAAK,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IACrF,QAAQ,EAAE,CAAC,QAAQ,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACvD,cAAc,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,eAAe,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;;AA6uBF,wBAMG"}
@@ -1,9 +0,0 @@
1
- import { Operand } from './types';
2
- type __VLS_Props = {
3
- active: Operand;
4
- disabled: boolean;
5
- onSelect: (op: Operand) => void;
6
- };
7
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
8
- export default _default;
9
- //# sourceMappingURL=OperandButton.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OperandButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlAdvancedFilter/OperandButton.vue"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACjC,CAAC;;AA0DF,wBAOG"}
@@ -1,55 +0,0 @@
1
- import { ListOptionBase } from '@platforma-sdk/model';
2
- import { SUPPORTED_FILTER_TYPES } from './constants';
3
- import { NodeFilter, PlAdvancedFilterColumnId, RootFilter, SourceOptionInfo } from './types';
4
- declare const _default: <T extends RootFilter>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & {
6
- filters: T;
7
- onUpdateFilters: (filters: T) => void;
8
- /** List of ids of sources (columns, axes) that can be selected in filters */
9
- options: SourceOptionInfo[];
10
- /** List of supported filter types */
11
- supportedFilters?: typeof SUPPORTED_FILTER_TYPES;
12
- /** If true - new filter can be added by droppind element into filter group; else new column is added by button click */
13
- enableDnd?: boolean;
14
- /** If true - "Add group" button is shown below the filter groups */
15
- enableAddGroupButton?: boolean;
16
- /** If true - eye icon is shown per group to toggle suppression */
17
- enableToggling?: boolean;
18
- /** Function to determine if a filter is pinned */
19
- isPinned?: (item: NodeFilter, index: number) => boolean;
20
- /** Function to determine if a filter is removable */
21
- isRemovable?: (item: NodeFilter, index: number) => boolean;
22
- /** Function to determine if a filter is draggable */
23
- isDraggable?: (item: NodeFilter, index: number) => boolean;
24
- /** Function to determine if a group is complete */
25
- isCompletedGroup?: (group: NodeFilter, index: number) => boolean;
26
- /** Loading function for unique values for Equal/InSet filters and fixed axes options. */
27
- getSuggestOptions: (params: {
28
- columnId: PlAdvancedFilterColumnId;
29
- axisIdx?: number;
30
- searchStr: string;
31
- searchType: "value" | "label";
32
- }) => ListOptionBase<string | number>[] | Promise<ListOptionBase<string | number>[]>;
33
- } & Partial<{}>> & import('vue').PublicProps;
34
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
35
- attrs: any;
36
- slots: {
37
- 'group-title'?(_: {
38
- item: NodeFilter<import('./types').RequiredMeta>;
39
- index: number;
40
- }): any;
41
- 'group-title'?(_: {
42
- item: NodeFilter;
43
- index: number;
44
- }): any;
45
- 'add-group-buttons'?(_: {}): any;
46
- };
47
- emit: {};
48
- }>) => import('vue').VNode & {
49
- __ctx?: Awaited<typeof __VLS_setup>;
50
- };
51
- export default _default;
52
- type __VLS_PrettifyLocal<T> = {
53
- [K in keyof T]: T[K];
54
- } & {};
55
- //# sourceMappingURL=PlAdvancedFilter.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PlAdvancedFilter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlAdvancedFilter/PlAdvancedFilter.vue"],"names":[],"mappings":"AAsYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAK3D,OAAO,EAAwC,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,KAAK,EAGV,UAAU,EAEV,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EACjB,MAAM,SAAS,CAAC;yBAGA,CAAC,SAAS,UAAU,EACpC,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA0jBO,mBAAmB,CAAC;iBAxjBf,CAAC;yBACO,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI;QACrC,6EAA6E;iBACpE,gBAAgB,EAAE;QAC3B,qCAAqC;2BAClB,OAAO,sBAAsB;QAChD,wHAAwH;oBAC5G,OAAO;QACnB,oEAAoE;+BAC7C,OAAO;QAC9B,kEAAkE;yBACjD,OAAO;QACxB,kDAAkD;mBACvC,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO;QACvD,qDAAqD;sBACvC,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO;QAC1D,qDAAqD;sBACvC,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO;QAC1D,mDAAmD;2BAChC,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO;QAChE,yFAAyF;2BACtE,CAAC,MAAM,EAAE;YAC1B,QAAQ,EAAE,wBAAwB,CAAC;YACnC,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;YAClB,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC;SAC/B,KAAK,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;mBA8hBM,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;;YArDwB,GAAG;;;;YACF,GAAG;qCACG,GAAG;;UAqDtC,EAAE;EAEL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AArkBzE,wBAqkB4E;AAe5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,26 +0,0 @@
1
- import { ICellRendererParams } from 'ag-grid-enterprise';
2
- import { ImportFileHandle, ImportProgress } from '@platforma-sdk/model';
3
- type __VLS_Props = {
4
- params: ICellRendererParams<unknown, ImportFileHandle> & {
5
- extensions?: string[];
6
- progress?: ImportProgress;
7
- /**
8
- * The resolveProgress function is an optional input parameter for the component
9
- * that allows tracking the file upload progress in real-time.
10
- * By passing resolveProgress, you can ensure that the component
11
- * displays accurate progress values for each file as they upload.
12
- * How to use it in AgGrid
13
- * cellRendererParams: {
14
- * resolveProgress: (fileHandle: ImportFileHandle | undefined) => {
15
- * const progresses = app.progresses;
16
- * if (!fileHandle) return undefined;
17
- * else return progresses[fileHandle];
18
- * }
19
- * }
20
- */
21
- resolveProgress?: (v: ImportFileHandle | undefined) => ImportProgress | undefined;
22
- };
23
- };
24
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
25
- export default _default;
26
- //# sourceMappingURL=PlAgCellFile.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PlAgCellFile.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlAgCellFile/PlAgCellFile.vue"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG7E,KAAK,WAAW,GAAG;IAGjB,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,CAAC,GAAG;QACvD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,QAAQ,CAAC,EAAE,cAAc,CAAC;QAC1B;;;;;;;;;;;;;WAaG;QACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,gBAAgB,GAAG,SAAS,KAAK,cAAc,GAAG,SAAS,CAAC;KACnF,CAAC;CACH,CAAC;;AA4FF,wBAOG"}