@milaboratories/uikit 2.15.12 → 2.15.14

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,6 +1,6 @@
1
1
   WARN  Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @milaboratories/uikit@2.15.12 build /home/runner/_work/platforma/platforma/lib/ui/uikit
3
+ > @milaboratories/uikit@2.15.14 build /home/runner/_work/platforma/platforma/lib/ui/uikit
4
4
  > ts-builder build --target browser-lib --build-config ./build.browser-lib.config.js
5
5
 
6
6
  Building browser-lib project...
@@ -24,7 +24,7 @@ Using custom config: ./build.browser-lib.config.js
24
24
  rendering chunks...
25
25
 
26
26
  [vite:dts] Start generate declaration files...
27
- [vite:dts] Declaration files built in 6067ms.
27
+ [vite:dts] Declaration files built in 8196ms.
28
28
 
29
29
  computing gzip size...
30
30
  dist/components/PlClipboard/PlClipboard.vue?vue&type=style&index=0&lang.css 0.04 kB │ gzip: 0.06 kB
@@ -435,7 +435,6 @@ dist/assets/icons/icon-assets-min/24_error.js
435
435
  dist/assets/images/required.js 0.49 kB │ gzip: 0.36 kB │ map: 0.56 kB
436
436
  dist/assets/icons/icon-assets-min/16_filter-on.js 0.49 kB │ gzip: 0.35 kB │ map: 0.57 kB
437
437
  dist/assets/icons/icon-assets-min/24_legend-box-dot.js 0.49 kB │ gzip: 0.33 kB │ map: 0.59 kB
438
- dist/composition/computedCached.js 0.49 kB │ gzip: 0.32 kB │ map: 1.94 kB
439
438
  dist/layout/PlPlaceholder/PlPlaceholder.vue_vue_type_style_index_0_lang.module.js 0.49 kB │ gzip: 0.29 kB │ map: 0.82 kB
440
439
  dist/assets/icons/icon-assets-min/24_export.js 0.50 kB │ gzip: 0.34 kB │ map: 0.57 kB
441
440
  dist/assets/icons/icon-assets-min/24_import.js 0.50 kB │ gzip: 0.33 kB │ map: 0.57 kB
@@ -507,6 +506,7 @@ dist/assets/icons/icon-assets-min/24_edit.js
507
506
  dist/assets/icons/icon-assets-min/24_line-error.js 0.58 kB │ gzip: 0.34 kB │ map: 0.67 kB
508
507
  dist/assets/icons/icon-assets-min/16_copy.js 0.59 kB │ gzip: 0.37 kB │ map: 0.68 kB
509
508
  dist/assets/icons/icon-assets-min/24_reverse.js 0.59 kB │ gzip: 0.36 kB │ map: 0.66 kB
509
+ dist/composition/computedCached.js 0.59 kB │ gzip: 0.36 kB │ map: 2.72 kB
510
510
  dist/assets/icons/icon-assets-min/24_files-export.js 0.59 kB │ gzip: 0.38 kB │ map: 0.68 kB
511
511
  dist/assets/icons/icon-assets-min/16_edit.js 0.59 kB │ gzip: 0.38 kB │ map: 0.67 kB
512
512
  dist/assets/icons/icon-assets-min/24_files-import.js 0.60 kB │ gzip: 0.38 kB │ map: 0.68 kB
@@ -534,14 +534,6 @@ dist/composition/useQuery.js
534
534
  dist/assets/icons/icon-assets-min/16_settings.js 0.64 kB │ gzip: 0.37 kB │ map: 0.71 kB
535
535
  dist/assets/icons/icon-assets-min/24_table-upload.js 0.64 kB │ gzip: 0.38 kB │ map: 0.73 kB
536
536
  dist/assets/icons/icon-assets-min/16_data-dimentions.js 0.64 kB │ gzip: 0.42 kB │ map: 0.74 kB
537
- [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugins. Here is a breakdown:
538
- - vite:asset (38%)
539
- - vite:css-post (12%)
540
- - vite:dts (11%)
541
- - vite:vue (10%)
542
- - sourcemaps (10%)
543
- See https://rolldown.rs/options/checks#plugintimings for more details.
544
- 
545
537
  dist/assets/icons/icon-assets-min/16_clipboard.js 0.64 kB │ gzip: 0.38 kB │ map: 0.72 kB
546
538
  dist/components/PlFileDialog/utils.js 0.64 kB │ gzip: 0.43 kB │ map: 2.18 kB
547
539
  dist/assets/icons/icon-assets-min/24_frame-type-none.js 0.65 kB │ gzip: 0.30 kB │ map: 0.72 kB
@@ -652,6 +644,14 @@ dist/helpers/downloadContent.js
652
644
  dist/assets/icons/icon-assets-min/24_boxplot-binned.js 1.00 kB │ gzip: 0.47 kB │ map: 1.09 kB
653
645
  dist/assets/icons/icon-assets-min/24_bar-error.js 1.00 kB │ gzip: 0.43 kB │ map: 1.14 kB
654
646
  dist/assets/icons/icon-assets-min/24_dendrogram-Y.js 1.00 kB │ gzip: 0.41 kB │ map: 1.14 kB
647
+ [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugins. Here is a breakdown:
648
+ - vite:asset (33%)
649
+ - sourcemaps (15%)
650
+ - vite:dts (14%)
651
+ - vite:css-post (10%)
652
+ - vite:vue (10%)
653
+ See https://rolldown.rs/options/checks#plugintimings for more details.
654
+ 
655
655
  dist/assets/icons/icon-assets-min/24_view-show.js 1.01 kB │ gzip: 0.59 kB │ map: 1.09 kB
656
656
  dist/components/DataTable/assets/TableIcon.js 1.01 kB │ gzip: 0.57 kB │ map: 1.02 kB
657
657
  dist/assets/icons/icon-assets-min/24_theme-dark.js 1.02 kB │ gzip: 0.52 kB │ map: 1.09 kB
@@ -796,5 +796,5 @@ dist/composition/filters/metadata.js
796
796
  dist/index.js 12.53 kB │ gzip: 2.96 kB │ map: 21.32 kB
797
797
  dist/components/PlSvg/PlSvg.vue_vue_type_script_setup_true_lang.js 39.41 kB │ gzip: 3.40 kB │ map: 8.66 kB
798
798
 
799
- ✓ built in 8.14s
799
+ ✓ built in 10.91s
800
800
  Build completed successfully
@@ -1,6 +1,6 @@
1
1
   WARN  Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @milaboratories/uikit@2.15.12 formatter:check /home/runner/_work/platforma/platforma/lib/ui/uikit
3
+ > @milaboratories/uikit@2.15.14 formatter:check /home/runner/_work/platforma/platforma/lib/ui/uikit
4
4
  > ts-builder formatter --check
5
5
 
6
6
  Checking formatting...
@@ -8,5 +8,5 @@ Checking formatting...
8
8
  Checking formatting...
9
9
 
10
10
  All matched files use the correct format.
11
- Finished in 1657ms on 381 files using 16 threads.
11
+ Finished in 3184ms on 381 files using 16 threads.
12
12
  Format check completed successfully
@@ -1,10 +1,10 @@
1
1
   WARN  Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @milaboratories/uikit@2.15.12 linter:check /home/runner/_work/platforma/platforma/lib/ui/uikit
3
+ > @milaboratories/uikit@2.15.14 linter:check /home/runner/_work/platforma/platforma/lib/ui/uikit
4
4
  > ts-builder linter --check
5
5
 
6
6
  Linting project...
7
7
  ↳ oxlint --config /home/runner/_work/platforma/platforma/lib/ui/uikit/.oxlintrc.json --deny-warnings
8
8
  Found 0 warnings and 0 errors.
9
- Finished in 32ms on 308 files with 108 rules using 16 threads.
9
+ Finished in 31ms on 308 files with 108 rules using 16 threads.
10
10
  Linting completed successfully
@@ -1,6 +1,6 @@
1
1
   WARN  Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @milaboratories/uikit@2.15.12 types:check /home/runner/_work/platforma/platforma/lib/ui/uikit
3
+ > @milaboratories/uikit@2.15.14 types:check /home/runner/_work/platforma/platforma/lib/ui/uikit
4
4
  > ts-builder type-check --target browser-lib
5
5
 
6
6
  ↳ vue-tsc.js --noEmit --project ./tsconfig.json --customConditions ,
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @milaboratories/uikit
2
2
 
3
+ ## 2.15.14
4
+
5
+ ### Patch Changes
6
+
7
+ - f0b5537: Fix an infinite grid-remount loop in `PlAgDataTableV2` that made the column
8
+ headers strobe (rapid flickering of the column type icons) and flooded the
9
+ console with AG Grid "grid has been destroyed" (#26) errors.
10
+
11
+ The reload watch destroys and recreates the whole grid via `:key="reloadKey"`.
12
+ The stored grid state was read through a debounced cache, so right after a
13
+ reload the cache kept reporting the pre-reload value while the fresh grid
14
+ already reported the state AG Grid normalized it to; the two never converged and
15
+ the grid remounted on every frame. `computedCached` gains a `writeThrough`
16
+ option that adopts a set value into the cache synchronously (the debounce then
17
+ only defers the downstream write), so the reload comparison converges after the
18
+ single remount that applies the state.
19
+
20
+ Also guards the row-number column auto-size so it no longer calls
21
+ `applyColumnState` on an already-destroyed grid.
22
+
23
+ ## 2.15.13
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [c07d2bb]
28
+ - @milaboratories/helpers@1.14.3
29
+ - @platforma-sdk/model@1.79.27
30
+
3
31
  ## 2.15.12
4
32
 
5
33
  ### Patch Changes
@@ -2,10 +2,15 @@ import { ComputedGetter, ComputedSetter, ComputedRef, WritableComputedRef } from
2
2
  /**
3
3
  * Alternative to `computed`, but triggering only on actual data changes.
4
4
  * Always `deep` as the plain `computed` is.
5
+ *
6
+ * With `writeThrough`, a set updates the cache synchronously, so a read reflects
7
+ * the write immediately even when `set` defers its work (e.g. debounced); the
8
+ * getter must then map set values to themselves (`get(x)` deep-equals `x`).
5
9
  */
6
10
  export declare function computedCached<T>(options: {
7
11
  get: ComputedGetter<T>;
8
12
  set: ComputedSetter<T>;
13
+ writeThrough?: boolean;
9
14
  }): WritableComputedRef<T>;
10
15
  export declare function computedCached<T>(getter: ComputedGetter<T>): ComputedRef<T>;
11
16
  //# sourceMappingURL=computedCached.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"computedCached.d.ts","sourceRoot":"","sources":["../../src/composition/computedCached.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACzB,MAAM,KAAK,CAAC;AAEb;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE;IACzC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACvB,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;CACxB,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAC3B,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"computedCached.d.ts","sourceRoot":"","sources":["../../src/composition/computedCached.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACzB,MAAM,KAAK,CAAC;AAEb;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE;IACzC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACvB,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAC3B,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC"}
@@ -2,15 +2,17 @@ import { computed as e, ref as t, watch as n } from "vue";
2
2
  import { deepClone as r, isJsonEqual as i } from "@milaboratories/helpers";
3
3
  //#region src/composition/computedCached.ts
4
4
  function a(a) {
5
- let o, s;
6
- typeof a == "function" ? o = a : (o = a.get, s = a.set);
7
- let c = t(o());
5
+ let o, s, c = !1;
6
+ typeof a == "function" ? o = a : (o = a.get, s = a.set, c = a.writeThrough ?? !1);
7
+ let l = t(o());
8
8
  return n(o, (e) => {
9
- i(e, c.value) || (c.value = r(e));
9
+ i(e, l.value) || (l.value = r(e));
10
10
  }, { deep: !0 }), s ? e({
11
- get: () => c.value,
12
- set: s
13
- }) : c;
11
+ get: () => l.value,
12
+ set: c ? (e) => {
13
+ i(e, l.value) || (l.value = r(e)), s(e);
14
+ } : s
15
+ }) : l;
14
16
  }
15
17
  //#endregion
16
18
  export { a as computedCached };
@@ -1 +1 @@
1
- {"version":3,"file":"computedCached.js","names":[],"sources":["../../src/composition/computedCached.ts"],"sourcesContent":["import { deepClone, isJsonEqual } from \"@milaboratories/helpers\";\nimport {\n computed,\n ref,\n watch,\n type ComputedGetter,\n type ComputedSetter,\n type ComputedRef,\n type WritableComputedRef,\n} from \"vue\";\n\n/**\n * Alternative to `computed`, but triggering only on actual data changes.\n * Always `deep` as the plain `computed` is.\n */\nexport function computedCached<T>(options: {\n get: ComputedGetter<T>;\n set: ComputedSetter<T>;\n}): WritableComputedRef<T>;\nexport function computedCached<T>(getter: ComputedGetter<T>): ComputedRef<T>;\nexport function computedCached<T>(\n arg:\n | ComputedGetter<T>\n | {\n get: ComputedGetter<T>;\n set: ComputedSetter<T>;\n },\n) {\n let getter: ComputedGetter<T>;\n let setter: ComputedSetter<T> | undefined = undefined;\n if (typeof arg === \"function\") {\n getter = arg;\n } else {\n getter = arg.get;\n setter = arg.set;\n }\n\n const cachedValue = ref<T>(getter());\n watch(\n getter,\n (newValue) => {\n if (!isJsonEqual(newValue, cachedValue.value)) {\n // `deepClone` is needed because in case some fields are patched the deep would be triggered,\n // but objects would be equal as the saved value was also patched\n cachedValue.value = deepClone(newValue);\n }\n },\n { deep: true },\n );\n\n if (setter) {\n return computed({\n get: () => cachedValue.value,\n set: setter,\n });\n } else {\n return cachedValue;\n }\n}\n"],"mappings":";;;AAoBA,SAAgB,EACd,GAMA;CACA,IAAI,GACA;AACJ,CAAI,OAAO,KAAQ,aACjB,IAAS,KAET,IAAS,EAAI,KACb,IAAS,EAAI;CAGf,IAAM,IAAc,EAAO,GAAQ,CAAC;AAmBlC,QAlBF,EACE,IACC,MAAa;AACZ,EAAK,EAAY,GAAU,EAAY,MAAM,KAG3C,EAAY,QAAQ,EAAU,EAAS;IAG3C,EAAE,MAAM,IAAM,CACf,EAEG,IACK,EAAS;EACd,WAAW,EAAY;EACvB,KAAK;EACN,CAAC,GAEK"}
1
+ {"version":3,"file":"computedCached.js","names":[],"sources":["../../src/composition/computedCached.ts"],"sourcesContent":["import { deepClone, isJsonEqual } from \"@milaboratories/helpers\";\nimport {\n computed,\n ref,\n watch,\n type ComputedGetter,\n type ComputedSetter,\n type ComputedRef,\n type WritableComputedRef,\n} from \"vue\";\n\n/**\n * Alternative to `computed`, but triggering only on actual data changes.\n * Always `deep` as the plain `computed` is.\n *\n * With `writeThrough`, a set updates the cache synchronously, so a read reflects\n * the write immediately even when `set` defers its work (e.g. debounced); the\n * getter must then map set values to themselves (`get(x)` deep-equals `x`).\n */\nexport function computedCached<T>(options: {\n get: ComputedGetter<T>;\n set: ComputedSetter<T>;\n writeThrough?: boolean;\n}): WritableComputedRef<T>;\nexport function computedCached<T>(getter: ComputedGetter<T>): ComputedRef<T>;\nexport function computedCached<T>(\n arg:\n | ComputedGetter<T>\n | {\n get: ComputedGetter<T>;\n set: ComputedSetter<T>;\n writeThrough?: boolean;\n },\n) {\n let getter: ComputedGetter<T>;\n let setter: ComputedSetter<T> | undefined = undefined;\n let writeThrough = false;\n if (typeof arg === \"function\") {\n getter = arg;\n } else {\n getter = arg.get;\n setter = arg.set;\n writeThrough = arg.writeThrough ?? false;\n }\n\n const cachedValue = ref<T>(getter());\n watch(\n getter,\n (newValue) => {\n if (!isJsonEqual(newValue, cachedValue.value)) {\n // `deepClone` is needed because in case some fields are patched the deep would be triggered,\n // but objects would be equal as the saved value was also patched\n cachedValue.value = deepClone(newValue);\n }\n },\n { deep: true },\n );\n\n if (setter) {\n return computed({\n get: () => cachedValue.value,\n set: writeThrough\n ? (newValue) => {\n // Reflect the value in the cache now; `set` itself may defer its work.\n if (!isJsonEqual(newValue, cachedValue.value)) cachedValue.value = deepClone(newValue);\n setter(newValue);\n }\n : setter,\n });\n } else {\n return cachedValue;\n }\n}\n"],"mappings":";;;AAyBA,SAAgB,EACd,GAOA;CACA,IAAI,GACA,GACA,IAAe;AACnB,CAAI,OAAO,KAAQ,aACjB,IAAS,KAET,IAAS,EAAI,KACb,IAAS,EAAI,KACb,IAAe,EAAI,gBAAgB;CAGrC,IAAM,IAAc,EAAO,GAAQ,CAAC;AAyBlC,QAxBF,EACE,IACC,MAAa;AACZ,EAAK,EAAY,GAAU,EAAY,MAAM,KAG3C,EAAY,QAAQ,EAAU,EAAS;IAG3C,EAAE,MAAM,IAAM,CACf,EAEG,IACK,EAAS;EACd,WAAW,EAAY;EACvB,KAAK,KACA,MAAa;AAGZ,GADK,EAAY,GAAU,EAAY,MAAM,KAAE,EAAY,QAAQ,EAAU,EAAS,GACtF,EAAO,EAAS;MAElB;EACL,CAAC,GAEK"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/uikit",
3
- "version": "2.15.12",
3
+ "version": "2.15.14",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -31,8 +31,8 @@
31
31
  "resize-observer-polyfill": "^1.5.1",
32
32
  "sortablejs": "^1.15.6",
33
33
  "vue": "3.5.24",
34
- "@platforma-sdk/model": "1.79.24",
35
- "@milaboratories/helpers": "1.14.2"
34
+ "@milaboratories/helpers": "1.14.3",
35
+ "@platforma-sdk/model": "1.79.27"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@vitest/coverage-istanbul": "^4.1.3",
@@ -40,9 +40,9 @@
40
40
  "svgo": "^3.3.2",
41
41
  "typescript": "~5.9.3",
42
42
  "vitest": "^4.1.3",
43
- "@milaboratories/ts-builder": "1.6.0",
44
43
  "@milaboratories/build-configs": "2.0.0",
45
- "@milaboratories/ts-configs": "1.3.0"
44
+ "@milaboratories/ts-configs": "1.3.0",
45
+ "@milaboratories/ts-builder": "1.6.0"
46
46
  },
47
47
  "scripts": {
48
48
  "dev": "ts-builder serve --target browser-lib --build-config ./build.browser-lib.config.js",
@@ -12,10 +12,15 @@ import {
12
12
  /**
13
13
  * Alternative to `computed`, but triggering only on actual data changes.
14
14
  * Always `deep` as the plain `computed` is.
15
+ *
16
+ * With `writeThrough`, a set updates the cache synchronously, so a read reflects
17
+ * the write immediately even when `set` defers its work (e.g. debounced); the
18
+ * getter must then map set values to themselves (`get(x)` deep-equals `x`).
15
19
  */
16
20
  export function computedCached<T>(options: {
17
21
  get: ComputedGetter<T>;
18
22
  set: ComputedSetter<T>;
23
+ writeThrough?: boolean;
19
24
  }): WritableComputedRef<T>;
20
25
  export function computedCached<T>(getter: ComputedGetter<T>): ComputedRef<T>;
21
26
  export function computedCached<T>(
@@ -24,15 +29,18 @@ export function computedCached<T>(
24
29
  | {
25
30
  get: ComputedGetter<T>;
26
31
  set: ComputedSetter<T>;
32
+ writeThrough?: boolean;
27
33
  },
28
34
  ) {
29
35
  let getter: ComputedGetter<T>;
30
36
  let setter: ComputedSetter<T> | undefined = undefined;
37
+ let writeThrough = false;
31
38
  if (typeof arg === "function") {
32
39
  getter = arg;
33
40
  } else {
34
41
  getter = arg.get;
35
42
  setter = arg.set;
43
+ writeThrough = arg.writeThrough ?? false;
36
44
  }
37
45
 
38
46
  const cachedValue = ref<T>(getter());
@@ -51,7 +59,13 @@ export function computedCached<T>(
51
59
  if (setter) {
52
60
  return computed({
53
61
  get: () => cachedValue.value,
54
- set: setter,
62
+ set: writeThrough
63
+ ? (newValue) => {
64
+ // Reflect the value in the cache now; `set` itself may defer its work.
65
+ if (!isJsonEqual(newValue, cachedValue.value)) cachedValue.value = deepClone(newValue);
66
+ setter(newValue);
67
+ }
68
+ : setter,
55
69
  });
56
70
  } else {
57
71
  return cachedValue;