aldehyde 0.2.158 → 0.2.160

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 (57) hide show
  1. package/lib/controls/action/utils.d.ts.map +1 -1
  2. package/lib/controls/action/utils.js +19 -9
  3. package/lib/controls/action/utils.js.map +1 -1
  4. package/lib/controls/entry-control.d.ts.map +1 -1
  5. package/lib/controls/entry-control.js +7 -10
  6. package/lib/controls/entry-control.js.map +1 -1
  7. package/lib/controls/view-control.d.ts.map +1 -1
  8. package/lib/controls/view-control.js +1 -0
  9. package/lib/controls/view-control.js.map +1 -1
  10. package/lib/custom-page/custom-page-router.js +1 -1
  11. package/lib/custom-page/custom-page-router.js.map +1 -1
  12. package/lib/form/form-Item-group.d.ts.map +1 -1
  13. package/lib/form/form-Item-group.js +2 -1
  14. package/lib/form/form-Item-group.js.map +1 -1
  15. package/lib/module/ltmpl-table.js +1 -1
  16. package/lib/module/ltmpl-table.js.map +1 -1
  17. package/lib/routable/ltmpl-route.d.ts.map +1 -1
  18. package/lib/routable/ltmpl-route.js +4 -10
  19. package/lib/routable/ltmpl-route.js.map +1 -1
  20. package/lib/table/act-table.d.ts.map +1 -1
  21. package/lib/table/act-table.js +7 -7
  22. package/lib/table/act-table.js.map +1 -1
  23. package/lib/table/query-table.d.ts +9 -2
  24. package/lib/table/query-table.d.ts.map +1 -1
  25. package/lib/table/query-table.js +171 -31
  26. package/lib/table/query-table.js.map +1 -1
  27. package/lib/tmpl/control-type-supportor.d.ts.map +1 -1
  28. package/lib/tmpl/control-type-supportor.js +1 -0
  29. package/lib/tmpl/control-type-supportor.js.map +1 -1
  30. package/lib/tmpl/interface.d.ts +5 -2
  31. package/lib/tmpl/interface.d.ts.map +1 -1
  32. package/lib/tmpl/tmpl-config-analysis.d.ts.map +1 -1
  33. package/lib/tmpl/tmpl-config-analysis.js +57 -24
  34. package/lib/tmpl/tmpl-config-analysis.js.map +1 -1
  35. package/lib/units/index.d.ts +4 -3
  36. package/lib/units/index.d.ts.map +1 -1
  37. package/lib/units/index.js +36 -8
  38. package/lib/units/index.js.map +1 -1
  39. package/lib/utils/dsu.d.ts +5 -0
  40. package/lib/utils/dsu.d.ts.map +1 -0
  41. package/lib/utils/dsu.js +24 -0
  42. package/lib/utils/dsu.js.map +1 -0
  43. package/package.json +1 -1
  44. package/src/aldehyde/controls/action/utils.tsx +181 -134
  45. package/src/aldehyde/controls/entry-control.tsx +7 -10
  46. package/src/aldehyde/controls/view-control.tsx +2 -0
  47. package/src/aldehyde/custom-page/custom-page-router.tsx +1 -1
  48. package/src/aldehyde/form/form-Item-group.tsx +2 -1
  49. package/src/aldehyde/module/ltmpl-table.tsx +1 -1
  50. package/src/aldehyde/routable/ltmpl-route.tsx +5 -11
  51. package/src/aldehyde/table/act-table.tsx +8 -7
  52. package/src/aldehyde/table/query-table.tsx +217 -30
  53. package/src/aldehyde/tmpl/control-type-supportor.tsx +2 -5
  54. package/src/aldehyde/tmpl/interface.tsx +11 -10
  55. package/src/aldehyde/tmpl/tmpl-config-analysis.tsx +307 -218
  56. package/src/aldehyde/units/index.tsx +50 -11
  57. package/src/aldehyde/utils/dsu.ts +27 -0
@@ -0,0 +1,27 @@
1
+ const N = 1e5 + 10;
2
+ let f;
3
+
4
+ export const init = (len: number = N) => {
5
+ f = Array.from({ length: len })
6
+ .fill(0)
7
+ .map((i, idx) => idx);
8
+ };
9
+
10
+ export const find = (x) => {
11
+ if (f[x] !== x) return (f[x] = find(f[x]));
12
+ return f[x];
13
+ };
14
+
15
+ export const merge = (a: number, b: number) => (f[find(a)] = find(b));
16
+
17
+ export const statistic = () => {
18
+ const mp = {};
19
+
20
+ for (let i = 0; i < N; i++) {
21
+ const target = find(i);
22
+ if (mp[target] === undefined) mp[target] = [];
23
+ mp[target].push(i);
24
+ }
25
+
26
+ return mp;
27
+ };