@1771technologies/lytenyte-pro 1.0.15 → 1.0.16

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 (129) hide show
  1. package/dist/__play__/filter-select/filter-select.play.d.ts +4 -0
  2. package/dist/__play__/filter-select/filter-select.play.js +76 -0
  3. package/dist/__play__/test-utils/row-handler.js +3 -4
  4. package/dist/cell-selection/bound-selection-rect.js +1 -1
  5. package/dist/cell-selection/cell-selection-driver.js +7 -6
  6. package/dist/column-manager/branch.d.ts +1 -1
  7. package/dist/column-manager/branch.js +1 -1
  8. package/dist/column-manager/label.d.ts +1 -1
  9. package/dist/column-manager/label.js +1 -1
  10. package/dist/column-manager/leaf.js +1 -1
  11. package/dist/column-manager/move-handle.d.ts +1 -1
  12. package/dist/column-manager/move-handle.js +1 -2
  13. package/dist/column-manager/visibility-checkbox.d.ts +1 -1
  14. package/dist/column-manager/visibility-checkbox.js +1 -1
  15. package/dist/filter-selects/apply.d.ts +7 -0
  16. package/dist/filter-selects/apply.js +22 -0
  17. package/dist/filter-selects/context.d.ts +12 -0
  18. package/dist/filter-selects/context.js +3 -0
  19. package/dist/filter-selects/filter-combinator.d.ts +10 -0
  20. package/dist/filter-selects/filter-combinator.js +19 -0
  21. package/dist/filter-selects/filter-row-context.d.ts +30 -0
  22. package/dist/filter-selects/filter-row-context.js +3 -0
  23. package/dist/filter-selects/filter-row.d.ts +13 -0
  24. package/dist/filter-selects/filter-row.js +118 -0
  25. package/dist/filter-selects/index.d.ts +20 -0
  26. package/dist/filter-selects/index.js +18 -0
  27. package/dist/filter-selects/is-complete-filter.d.ts +2 -0
  28. package/dist/filter-selects/is-complete-filter.js +5 -0
  29. package/dist/filter-selects/operator-select.d.ts +14 -0
  30. package/dist/filter-selects/operator-select.js +25 -0
  31. package/dist/filter-selects/options.d.ts +9 -0
  32. package/dist/filter-selects/options.js +100 -0
  33. package/dist/filter-selects/reset.d.ts +7 -0
  34. package/dist/filter-selects/reset.js +22 -0
  35. package/dist/filter-selects/root.d.ts +13 -0
  36. package/dist/filter-selects/root.js +5 -0
  37. package/dist/filter-selects/to-filter-item.d.ts +3 -0
  38. package/dist/filter-selects/to-filter-item.js +7 -0
  39. package/dist/filter-selects/use-filter-select.d.ts +37 -0
  40. package/dist/filter-selects/use-filter-select.js +158 -0
  41. package/dist/filter-selects/value-input.d.ts +12 -0
  42. package/dist/filter-selects/value-input.js +27 -0
  43. package/dist/filter-tree/branch.d.ts +1 -1
  44. package/dist/filter-tree/branch.js +1 -1
  45. package/dist/filter-tree/hooks/use-filter-tree.js +1 -1
  46. package/dist/filter-tree/inclusion-checkbox.d.ts +1 -1
  47. package/dist/filter-tree/inclusion-checkbox.js +1 -1
  48. package/dist/filter-tree/label.d.ts +1 -1
  49. package/dist/filter-tree/label.js +1 -1
  50. package/dist/filter-tree/root.d.ts +1 -1
  51. package/dist/filter-tree/root.js +1 -1
  52. package/dist/grid/header-cell.d.ts +1 -1
  53. package/dist/grid/header-cell.js +1 -2
  54. package/dist/grid/header.d.ts +1 -1
  55. package/dist/grid/row-full-width.d.ts +1 -1
  56. package/dist/grid/row-full-width.js +1 -2
  57. package/dist/grid/row.d.ts +1 -1
  58. package/dist/grid/row.js +0 -1
  59. package/dist/grid/rows-container.d.ts +1 -1
  60. package/dist/grid-box/item.d.ts +1 -1
  61. package/dist/grid-box/item.js +1 -2
  62. package/dist/grid-box/panel.js +1 -1
  63. package/dist/grid-box/use-aggregation-box-items.js +1 -1
  64. package/dist/grid-box/use-column-box-items.js +1 -1
  65. package/dist/grid-box/use-row-group-box-items.js +1 -1
  66. package/dist/grid.d.ts +2 -2
  67. package/dist/index.d.ts +2 -1
  68. package/dist/index.js +2 -1
  69. package/dist/license/index.d.ts +1 -0
  70. package/dist/license/index.js +1 -0
  71. package/dist/license/license.d.ts +3 -0
  72. package/dist/license/license.js +215 -0
  73. package/dist/license/md5-hash.d.ts +9 -0
  74. package/dist/license/md5-hash.js +167 -0
  75. package/dist/license.js +1 -1
  76. package/dist/listbox/item.js +1 -1
  77. package/dist/listbox/panel.js +2 -2
  78. package/dist/row-data-source-client/filter/compute-filtered-rows.js +1 -1
  79. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +1 -1
  80. package/dist/row-data-source-client/use-client-data-source-paginated.js +3 -2
  81. package/dist/row-data-source-client/use-client-data-source.js +3 -2
  82. package/dist/row-data-source-client/use-client-tree-data-source.js +3 -2
  83. package/dist/row-data-source-server/server-data.js +1 -1
  84. package/dist/row-data-source-server/use-server-data-source.js +2 -2
  85. package/dist/sort-manager/hooks/use-sort-manager.js +2 -2
  86. package/dist/sort-manager/hooks/use-sort-row-item.js +1 -1
  87. package/dist/sort-manager/sort-add.d.ts +1 -1
  88. package/dist/sort-manager/sort-add.js +1 -1
  89. package/dist/sort-manager/sort-apply.d.ts +1 -1
  90. package/dist/sort-manager/sort-apply.js +2 -2
  91. package/dist/sort-manager/sort-cancel.d.ts +1 -1
  92. package/dist/sort-manager/sort-cancel.js +2 -2
  93. package/dist/sort-manager/sort-clear.d.ts +1 -1
  94. package/dist/sort-manager/sort-clear.js +1 -1
  95. package/dist/sort-manager/sort-column-select.d.ts +1 -1
  96. package/dist/sort-manager/sort-column-select.js +1 -1
  97. package/dist/sort-manager/sort-direction-select.d.ts +1 -1
  98. package/dist/sort-manager/sort-direction-select.js +1 -1
  99. package/dist/sort-manager/sort-remove.d.ts +1 -1
  100. package/dist/sort-manager/sort-remove.js +1 -1
  101. package/dist/sort-manager/sort-value-select.d.ts +1 -1
  102. package/dist/sort-manager/sort-value-select.js +1 -1
  103. package/dist/state/+types.d.ts +2 -1
  104. package/dist/state/api/column-field.js +1 -1
  105. package/dist/state/api/edit-begin.js +1 -1
  106. package/dist/state/api/focus-cell.js +1 -1
  107. package/dist/state/api/position-from-element.d.ts +5 -2
  108. package/dist/state/api/position-from-element.js +3 -3
  109. package/dist/state/api/row-handle-select.js +1 -1
  110. package/dist/state/api/use-row-drag.js +3 -2
  111. package/dist/state/helpers/column-add-row-group.js +1 -1
  112. package/dist/state/helpers/column-marker.js +1 -1
  113. package/dist/state/use-lytenyte.js +18 -3
  114. package/dist/tree-view/branch/branch.d.ts +1 -1
  115. package/dist/tree-view/branch/branch.js +1 -1
  116. package/dist/tree-view/branch/use-branch-keys.js +2 -2
  117. package/dist/tree-view/leaf.js +1 -1
  118. package/dist/tree-view/panel/make-handle-navigation.js +1 -1
  119. package/dist/tree-view/panel/make-handle-selection.js +1 -1
  120. package/dist/tree-view/panel/panel.js +2 -2
  121. package/dist/tree-view/panel/use-tree-navigation.js +1 -1
  122. package/dist/tree-view/root.js +1 -1
  123. package/dist/tree-view/utils/get-focusable-nodes.js +1 -1
  124. package/dist/tree-view/utils/get-focused-node.js +1 -1
  125. package/dist/tree-view/utils/get-sibling-branches.js +1 -1
  126. package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +1 -1
  127. package/dist/tree-view/virtualized/use-row-start-and-end.js +1 -1
  128. package/dist/tree-view/virtualized/use-virtualized-tree.js +1 -1
  129. package/package.json +3 -7
package/dist/index.d.ts CHANGED
@@ -4,7 +4,8 @@ export { SortManager } from "./sort-manager/sort-manager.js";
4
4
  export { FilterTree } from "./filter-tree/filter-tree.js";
5
5
  export { ColumnManager } from "./column-manager/column-manager.js";
6
6
  export { GridBox } from "./grid-box/grid-box.js";
7
- export { DropWrap } from "@1771technologies/lytenyte-dragon";
7
+ export { DropWrap } from "@1771technologies/lytenyte-core/yinternal";
8
+ export { FilterSelect } from "./filter-selects/index.js";
8
9
  export { activateLicense } from "./license.js";
9
10
  export { measureText } from "@1771technologies/lytenyte-shared";
10
11
  export { makeClientDataSource, useClientRowDataSource, } from "./row-data-source-client/use-client-data-source.js";
package/dist/index.js CHANGED
@@ -4,7 +4,8 @@ export { SortManager } from "./sort-manager/sort-manager.js";
4
4
  export { FilterTree } from "./filter-tree/filter-tree.js";
5
5
  export { ColumnManager } from "./column-manager/column-manager.js";
6
6
  export { GridBox } from "./grid-box/grid-box.js";
7
- export { DropWrap } from "@1771technologies/lytenyte-dragon";
7
+ export { DropWrap } from "@1771technologies/lytenyte-core/yinternal";
8
+ export { FilterSelect } from "./filter-selects/index.js";
8
9
  export { activateLicense } from "./license.js";
9
10
  export { measureText } from "@1771technologies/lytenyte-shared";
10
11
  export { makeClientDataSource, useClientRowDataSource, } from "./row-data-source-client/use-client-data-source.js";
@@ -0,0 +1 @@
1
+ export { activateLicense, hasAValidLicense } from "./license.js";
@@ -0,0 +1 @@
1
+ export { activateLicense, hasAValidLicense } from "./license.js";
@@ -0,0 +1,3 @@
1
+ export declare let hasAValidLicense: boolean;
2
+ export declare let licenseState: "invalid" | "expired" | null;
3
+ export declare function activateLicense(license: string): boolean;
@@ -0,0 +1,215 @@
1
+ const hashSalt = "faec0f3c45281b1fe12d87e64a6c3271";
2
+ // @ts-expect-error will be replaced by build script
3
+ const issueDate = globalThis.ISSUE_DATE ?? new Date("2023-03-01");
4
+ function getHostname() {
5
+ const win = globalThis?.document?.defaultView || (typeof window !== "undefined" ? window : null);
6
+ const loc = win?.location;
7
+ const { hostname = "" } = loc ?? {};
8
+ return hostname;
9
+ }
10
+ function isWebsiteUrl() {
11
+ const hostname = getHostname();
12
+ return hostname.match(/^((?:\w+\.)?1771technologies\.com)$/) !== null;
13
+ }
14
+ function isLocalhost() {
15
+ const hostname = getHostname();
16
+ return hostname.match(/^(?:127\.0\.0\.1|localhost)$/) !== null;
17
+ }
18
+ export let hasAValidLicense = isWebsiteUrl() || isLocalhost();
19
+ export let licenseState = null;
20
+ export function activateLicense(license) {
21
+ const parts = license.split("|");
22
+ const details = parts[0];
23
+ const hash = parts[1];
24
+ const detailHash = new MD5().md5(details + hashSalt);
25
+ if (detailHash !== hash) {
26
+ console.error(`
27
+ ********************************************************************************
28
+ LyteNyte Grid PRO
29
+
30
+ Invalid license key. Please verify the key and try again.
31
+
32
+ Visit https://1771technolgies.com for more information.
33
+ ********************************************************************************
34
+ `);
35
+ licenseState = "invalid";
36
+ return false;
37
+ }
38
+ const detailParts = details.split(" ");
39
+ const endDate = new Date(detailParts[1]);
40
+ if (issueDate > endDate) {
41
+ console.error(`
42
+ ********************************************************************************
43
+ LyteNyte Grid PRO
44
+
45
+ License key expired. Your license covers earlier versions only.
46
+
47
+ Visit https://1771technolgies.com for more information.
48
+ ********************************************************************************
49
+ `);
50
+ licenseState = "expired";
51
+ return false;
52
+ }
53
+ hasAValidLicense = true;
54
+ return true;
55
+ }
56
+ // see: https://www.myersdaily.org/joseph/javascript/md5-text.html
57
+ // https://stackoverflow.com/a/1655795
58
+ class MD5 {
59
+ md5cycle(x, k) {
60
+ let a = x[0];
61
+ let b = x[1];
62
+ let c = x[2];
63
+ let d = x[3];
64
+ a = this.ff(a, b, c, d, k[0], 7, -680876936);
65
+ d = this.ff(d, a, b, c, k[1], 12, -389564586);
66
+ c = this.ff(c, d, a, b, k[2], 17, 606105819);
67
+ b = this.ff(b, c, d, a, k[3], 22, -1044525330);
68
+ a = this.ff(a, b, c, d, k[4], 7, -176418897);
69
+ d = this.ff(d, a, b, c, k[5], 12, 1200080426);
70
+ c = this.ff(c, d, a, b, k[6], 17, -1473231341);
71
+ b = this.ff(b, c, d, a, k[7], 22, -45705983);
72
+ a = this.ff(a, b, c, d, k[8], 7, 1770035416);
73
+ d = this.ff(d, a, b, c, k[9], 12, -1958414417);
74
+ c = this.ff(c, d, a, b, k[10], 17, -42063);
75
+ b = this.ff(b, c, d, a, k[11], 22, -1990404162);
76
+ a = this.ff(a, b, c, d, k[12], 7, 1804603682);
77
+ d = this.ff(d, a, b, c, k[13], 12, -40341101);
78
+ c = this.ff(c, d, a, b, k[14], 17, -1502002290);
79
+ b = this.ff(b, c, d, a, k[15], 22, 1236535329);
80
+ a = this.gg(a, b, c, d, k[1], 5, -165796510);
81
+ d = this.gg(d, a, b, c, k[6], 9, -1069501632);
82
+ c = this.gg(c, d, a, b, k[11], 14, 643717713);
83
+ b = this.gg(b, c, d, a, k[0], 20, -373897302);
84
+ a = this.gg(a, b, c, d, k[5], 5, -701558691);
85
+ d = this.gg(d, a, b, c, k[10], 9, 38016083);
86
+ c = this.gg(c, d, a, b, k[15], 14, -660478335);
87
+ b = this.gg(b, c, d, a, k[4], 20, -405537848);
88
+ a = this.gg(a, b, c, d, k[9], 5, 568446438);
89
+ d = this.gg(d, a, b, c, k[14], 9, -1019803690);
90
+ c = this.gg(c, d, a, b, k[3], 14, -187363961);
91
+ b = this.gg(b, c, d, a, k[8], 20, 1163531501);
92
+ a = this.gg(a, b, c, d, k[13], 5, -1444681467);
93
+ d = this.gg(d, a, b, c, k[2], 9, -51403784);
94
+ c = this.gg(c, d, a, b, k[7], 14, 1735328473);
95
+ b = this.gg(b, c, d, a, k[12], 20, -1926607734);
96
+ a = this.hh(a, b, c, d, k[5], 4, -378558);
97
+ d = this.hh(d, a, b, c, k[8], 11, -2022574463);
98
+ c = this.hh(c, d, a, b, k[11], 16, 1839030562);
99
+ b = this.hh(b, c, d, a, k[14], 23, -35309556);
100
+ a = this.hh(a, b, c, d, k[1], 4, -1530992060);
101
+ d = this.hh(d, a, b, c, k[4], 11, 1272893353);
102
+ c = this.hh(c, d, a, b, k[7], 16, -155497632);
103
+ b = this.hh(b, c, d, a, k[10], 23, -1094730640);
104
+ a = this.hh(a, b, c, d, k[13], 4, 681279174);
105
+ d = this.hh(d, a, b, c, k[0], 11, -358537222);
106
+ c = this.hh(c, d, a, b, k[3], 16, -722521979);
107
+ b = this.hh(b, c, d, a, k[6], 23, 76029189);
108
+ a = this.hh(a, b, c, d, k[9], 4, -640364487);
109
+ d = this.hh(d, a, b, c, k[12], 11, -421815835);
110
+ c = this.hh(c, d, a, b, k[15], 16, 530742520);
111
+ b = this.hh(b, c, d, a, k[2], 23, -995338651);
112
+ a = this.ii(a, b, c, d, k[0], 6, -198630844);
113
+ d = this.ii(d, a, b, c, k[7], 10, 1126891415);
114
+ c = this.ii(c, d, a, b, k[14], 15, -1416354905);
115
+ b = this.ii(b, c, d, a, k[5], 21, -57434055);
116
+ a = this.ii(a, b, c, d, k[12], 6, 1700485571);
117
+ d = this.ii(d, a, b, c, k[3], 10, -1894986606);
118
+ c = this.ii(c, d, a, b, k[10], 15, -1051523);
119
+ b = this.ii(b, c, d, a, k[1], 21, -2054922799);
120
+ a = this.ii(a, b, c, d, k[8], 6, 1873313359);
121
+ d = this.ii(d, a, b, c, k[15], 10, -30611744);
122
+ c = this.ii(c, d, a, b, k[6], 15, -1560198380);
123
+ b = this.ii(b, c, d, a, k[13], 21, 1309151649);
124
+ a = this.ii(a, b, c, d, k[4], 6, -145523070);
125
+ d = this.ii(d, a, b, c, k[11], 10, -1120210379);
126
+ c = this.ii(c, d, a, b, k[2], 15, 718787259);
127
+ b = this.ii(b, c, d, a, k[9], 21, -343485551);
128
+ x[0] = this.add32(a, x[0]);
129
+ x[1] = this.add32(b, x[1]);
130
+ x[2] = this.add32(c, x[2]);
131
+ x[3] = this.add32(d, x[3]);
132
+ }
133
+ cmn(q, a, b, x, s, t) {
134
+ a = this.add32(this.add32(a, q), this.add32(x, t));
135
+ return this.add32((a << s) | (a >>> (32 - s)), b);
136
+ }
137
+ ff(a, b, c, d, x, s, t) {
138
+ return this.cmn((b & c) | (~b & d), a, b, x, s, t);
139
+ }
140
+ gg(a, b, c, d, x, s, t) {
141
+ return this.cmn((b & d) | (c & ~d), a, b, x, s, t);
142
+ }
143
+ hh(a, b, c, d, x, s, t) {
144
+ return this.cmn(b ^ c ^ d, a, b, x, s, t);
145
+ }
146
+ ii(a, b, c, d, x, s, t) {
147
+ return this.cmn(c ^ (b | ~d), a, b, x, s, t);
148
+ }
149
+ md51(s) {
150
+ const n = s.length;
151
+ const state = [1732584193, -271733879, -1732584194, 271733878];
152
+ let i;
153
+ for (i = 64; i <= s.length; i += 64) {
154
+ this.md5cycle(state, this.md5blk(s.substring(i - 64, i)));
155
+ }
156
+ s = s.substring(i - 64);
157
+ const tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
158
+ for (i = 0; i < s.length; i++) {
159
+ tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
160
+ }
161
+ tail[i >> 2] |= 0x80 << (i % 4 << 3);
162
+ if (i > 55) {
163
+ this.md5cycle(state, tail);
164
+ for (i = 0; i < 16; i++) {
165
+ tail[i] = 0;
166
+ }
167
+ }
168
+ tail[14] = n * 8;
169
+ this.md5cycle(state, tail);
170
+ return state;
171
+ }
172
+ /* there needs to be support for Unicode here, * unless we pretend that we can redefine the MD-5
173
+ * algorithm for multi-byte characters (perhaps by adding every four 16-bit characters and
174
+ * shortening the sum to 32 bits). Otherwise I suthis.ggest performing MD-5 as if every character
175
+ * was two bytes--e.g., 0040 0025 = @%--but then how will an ordinary MD-5 sum be matched?
176
+ * There is no way to standardize text to something like UTF-8 before transformation; speed cost is
177
+ * utterly prohibitive. The JavaScript standard itself needs to look at this: it should start
178
+ * providing access to strings as preformed UTF-8 8-bit unsigned value arrays.
179
+ */
180
+ md5blk(s) {
181
+ const md5blks = [];
182
+ for (let i = 0; i < 64; i += 4) {
183
+ md5blks[i >> 2] =
184
+ s.charCodeAt(i) +
185
+ (s.charCodeAt(i + 1) << 8) +
186
+ (s.charCodeAt(i + 2) << 16) +
187
+ (s.charCodeAt(i + 3) << 24);
188
+ }
189
+ return md5blks;
190
+ }
191
+ rhex(n) {
192
+ const hex_chr = "0123456789abcdef".split("");
193
+ let s = "";
194
+ let j = 0;
195
+ for (; j < 4; j++) {
196
+ s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];
197
+ }
198
+ return s;
199
+ }
200
+ hex(x) {
201
+ for (let i = 0; i < x.length; i++) {
202
+ x[i] = this.rhex(x[i]);
203
+ }
204
+ return x.join("");
205
+ }
206
+ md5(s) {
207
+ return this.hex(this.md51(s));
208
+ }
209
+ add32(a, b) {
210
+ return this.add32Std(a, b);
211
+ }
212
+ add32Std(a, b) {
213
+ return (a + b) & 0xffffffff;
214
+ }
215
+ }
@@ -0,0 +1,9 @@
1
+ interface GetHashArguments {
2
+ companyName: string;
3
+ startDate: string;
4
+ endDate: string;
5
+ randomString: string;
6
+ licenseType: "seated" | "company-wide";
7
+ }
8
+ export declare function getHash({ companyName, startDate, endDate, licenseType, randomString, }: GetHashArguments): string;
9
+ export {};
@@ -0,0 +1,167 @@
1
+ // WARNING --- DO NOT TOUCH THIS STRING OR THIS MODULE.
2
+ const hashSalt = "faec0f3c45281b1fe12d87e64a6c3271";
3
+ export function getHash({ companyName, startDate, endDate, licenseType, randomString, }) {
4
+ const details = `${startDate} ${endDate} ${companyName} ${licenseType} ${randomString}`;
5
+ const hash = new MD5().md5(details + hashSalt);
6
+ return `${details}|${hash}`;
7
+ }
8
+ // see: https://www.myersdaily.org/joseph/javascript/md5-text.html
9
+ // https://stackoverflow.com/a/1655795
10
+ class MD5 {
11
+ md5cycle(x, k) {
12
+ let a = x[0];
13
+ let b = x[1];
14
+ let c = x[2];
15
+ let d = x[3];
16
+ a = this.ff(a, b, c, d, k[0], 7, -680876936);
17
+ d = this.ff(d, a, b, c, k[1], 12, -389564586);
18
+ c = this.ff(c, d, a, b, k[2], 17, 606105819);
19
+ b = this.ff(b, c, d, a, k[3], 22, -1044525330);
20
+ a = this.ff(a, b, c, d, k[4], 7, -176418897);
21
+ d = this.ff(d, a, b, c, k[5], 12, 1200080426);
22
+ c = this.ff(c, d, a, b, k[6], 17, -1473231341);
23
+ b = this.ff(b, c, d, a, k[7], 22, -45705983);
24
+ a = this.ff(a, b, c, d, k[8], 7, 1770035416);
25
+ d = this.ff(d, a, b, c, k[9], 12, -1958414417);
26
+ c = this.ff(c, d, a, b, k[10], 17, -42063);
27
+ b = this.ff(b, c, d, a, k[11], 22, -1990404162);
28
+ a = this.ff(a, b, c, d, k[12], 7, 1804603682);
29
+ d = this.ff(d, a, b, c, k[13], 12, -40341101);
30
+ c = this.ff(c, d, a, b, k[14], 17, -1502002290);
31
+ b = this.ff(b, c, d, a, k[15], 22, 1236535329);
32
+ a = this.gg(a, b, c, d, k[1], 5, -165796510);
33
+ d = this.gg(d, a, b, c, k[6], 9, -1069501632);
34
+ c = this.gg(c, d, a, b, k[11], 14, 643717713);
35
+ b = this.gg(b, c, d, a, k[0], 20, -373897302);
36
+ a = this.gg(a, b, c, d, k[5], 5, -701558691);
37
+ d = this.gg(d, a, b, c, k[10], 9, 38016083);
38
+ c = this.gg(c, d, a, b, k[15], 14, -660478335);
39
+ b = this.gg(b, c, d, a, k[4], 20, -405537848);
40
+ a = this.gg(a, b, c, d, k[9], 5, 568446438);
41
+ d = this.gg(d, a, b, c, k[14], 9, -1019803690);
42
+ c = this.gg(c, d, a, b, k[3], 14, -187363961);
43
+ b = this.gg(b, c, d, a, k[8], 20, 1163531501);
44
+ a = this.gg(a, b, c, d, k[13], 5, -1444681467);
45
+ d = this.gg(d, a, b, c, k[2], 9, -51403784);
46
+ c = this.gg(c, d, a, b, k[7], 14, 1735328473);
47
+ b = this.gg(b, c, d, a, k[12], 20, -1926607734);
48
+ a = this.hh(a, b, c, d, k[5], 4, -378558);
49
+ d = this.hh(d, a, b, c, k[8], 11, -2022574463);
50
+ c = this.hh(c, d, a, b, k[11], 16, 1839030562);
51
+ b = this.hh(b, c, d, a, k[14], 23, -35309556);
52
+ a = this.hh(a, b, c, d, k[1], 4, -1530992060);
53
+ d = this.hh(d, a, b, c, k[4], 11, 1272893353);
54
+ c = this.hh(c, d, a, b, k[7], 16, -155497632);
55
+ b = this.hh(b, c, d, a, k[10], 23, -1094730640);
56
+ a = this.hh(a, b, c, d, k[13], 4, 681279174);
57
+ d = this.hh(d, a, b, c, k[0], 11, -358537222);
58
+ c = this.hh(c, d, a, b, k[3], 16, -722521979);
59
+ b = this.hh(b, c, d, a, k[6], 23, 76029189);
60
+ a = this.hh(a, b, c, d, k[9], 4, -640364487);
61
+ d = this.hh(d, a, b, c, k[12], 11, -421815835);
62
+ c = this.hh(c, d, a, b, k[15], 16, 530742520);
63
+ b = this.hh(b, c, d, a, k[2], 23, -995338651);
64
+ a = this.ii(a, b, c, d, k[0], 6, -198630844);
65
+ d = this.ii(d, a, b, c, k[7], 10, 1126891415);
66
+ c = this.ii(c, d, a, b, k[14], 15, -1416354905);
67
+ b = this.ii(b, c, d, a, k[5], 21, -57434055);
68
+ a = this.ii(a, b, c, d, k[12], 6, 1700485571);
69
+ d = this.ii(d, a, b, c, k[3], 10, -1894986606);
70
+ c = this.ii(c, d, a, b, k[10], 15, -1051523);
71
+ b = this.ii(b, c, d, a, k[1], 21, -2054922799);
72
+ a = this.ii(a, b, c, d, k[8], 6, 1873313359);
73
+ d = this.ii(d, a, b, c, k[15], 10, -30611744);
74
+ c = this.ii(c, d, a, b, k[6], 15, -1560198380);
75
+ b = this.ii(b, c, d, a, k[13], 21, 1309151649);
76
+ a = this.ii(a, b, c, d, k[4], 6, -145523070);
77
+ d = this.ii(d, a, b, c, k[11], 10, -1120210379);
78
+ c = this.ii(c, d, a, b, k[2], 15, 718787259);
79
+ b = this.ii(b, c, d, a, k[9], 21, -343485551);
80
+ x[0] = this.add32(a, x[0]);
81
+ x[1] = this.add32(b, x[1]);
82
+ x[2] = this.add32(c, x[2]);
83
+ x[3] = this.add32(d, x[3]);
84
+ }
85
+ cmn(q, a, b, x, s, t) {
86
+ a = this.add32(this.add32(a, q), this.add32(x, t));
87
+ return this.add32((a << s) | (a >>> (32 - s)), b);
88
+ }
89
+ ff(a, b, c, d, x, s, t) {
90
+ return this.cmn((b & c) | (~b & d), a, b, x, s, t);
91
+ }
92
+ gg(a, b, c, d, x, s, t) {
93
+ return this.cmn((b & d) | (c & ~d), a, b, x, s, t);
94
+ }
95
+ hh(a, b, c, d, x, s, t) {
96
+ return this.cmn(b ^ c ^ d, a, b, x, s, t);
97
+ }
98
+ ii(a, b, c, d, x, s, t) {
99
+ return this.cmn(c ^ (b | ~d), a, b, x, s, t);
100
+ }
101
+ md51(s) {
102
+ const n = s.length;
103
+ const state = [1732584193, -271733879, -1732584194, 271733878];
104
+ let i;
105
+ for (i = 64; i <= s.length; i += 64) {
106
+ this.md5cycle(state, this.md5blk(s.substring(i - 64, i)));
107
+ }
108
+ s = s.substring(i - 64);
109
+ const tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
110
+ for (i = 0; i < s.length; i++) {
111
+ tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
112
+ }
113
+ tail[i >> 2] |= 0x80 << (i % 4 << 3);
114
+ if (i > 55) {
115
+ this.md5cycle(state, tail);
116
+ for (i = 0; i < 16; i++) {
117
+ tail[i] = 0;
118
+ }
119
+ }
120
+ tail[14] = n * 8;
121
+ this.md5cycle(state, tail);
122
+ return state;
123
+ }
124
+ /* there needs to be support for Unicode here, * unless we pretend that we can redefine the MD-5
125
+ * algorithm for multi-byte characters (perhaps by adding every four 16-bit characters and
126
+ * shortening the sum to 32 bits). Otherwise I suthis.ggest performing MD-5 as if every character
127
+ * was two bytes--e.g., 0040 0025 = @%--but then how will an ordinary MD-5 sum be matched?
128
+ * There is no way to standardize text to something like UTF-8 before transformation; speed cost is
129
+ * utterly prohibitive. The JavaScript standard itself needs to look at this: it should start
130
+ * providing access to strings as preformed UTF-8 8-bit unsigned value arrays.
131
+ */
132
+ md5blk(s) {
133
+ const md5blks = [];
134
+ for (let i = 0; i < 64; i += 4) {
135
+ md5blks[i >> 2] =
136
+ s.charCodeAt(i) +
137
+ (s.charCodeAt(i + 1) << 8) +
138
+ (s.charCodeAt(i + 2) << 16) +
139
+ (s.charCodeAt(i + 3) << 24);
140
+ }
141
+ return md5blks;
142
+ }
143
+ rhex(n) {
144
+ const hex_chr = "0123456789abcdef".split("");
145
+ let s = "";
146
+ let j = 0;
147
+ for (; j < 4; j++) {
148
+ s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];
149
+ }
150
+ return s;
151
+ }
152
+ hex(x) {
153
+ for (let i = 0; i < x.length; i++) {
154
+ x[i] = this.rhex(x[i]);
155
+ }
156
+ return x.join("");
157
+ }
158
+ md5(s) {
159
+ return this.hex(this.md51(s));
160
+ }
161
+ add32(a, b) {
162
+ return this.add32Std(a, b);
163
+ }
164
+ add32Std(a, b) {
165
+ return (a + b) & 0xffffffff;
166
+ }
167
+ }
package/dist/license.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const hashSalt = "faec0f3c45281b1fe12d87e64a6c3271";
2
- const issueDate = new Date("2025-09-11");
2
+ const issueDate = new Date("2025-10-05");
3
3
  function getHostname() {
4
4
  const win = globalThis?.document?.defaultView || (typeof window !== "undefined" ? window : null);
5
5
  const loc = win?.location;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { useListboxContext } from "./context.js";
4
- import { getTabbables } from "@1771technologies/lytenyte-dom-utils";
4
+ import { getTabbables } from "@1771technologies/lytenyte-shared";
5
5
  export const Item = forwardRef(function Item(props, forwarded) {
6
6
  const ctx = useListboxContext();
7
7
  return (_jsx("div", { ...props, role: "option", onKeyDownCapture: (ev) => {
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useEffect, useState } from "react";
3
3
  import { useListboxContext } from "./context.js";
4
- import { useCombinedRefs } from "@1771technologies/lytenyte-react-hooks";
5
- import { getTabbables } from "@1771technologies/lytenyte-dom-utils";
4
+ import { getTabbables } from "@1771technologies/lytenyte-shared";
5
+ import { useCombinedRefs } from "@1771technologies/lytenyte-core/yinternal";
6
6
  export const Panel = forwardRef(function Panel(props, forwarded) {
7
7
  const [ref, setRef] = useState();
8
8
  const combinedRef = useCombinedRefs(setRef, forwarded);
@@ -1,5 +1,5 @@
1
1
  import { evaluateDateFilter, evaluateNumberFilter, evaluateStringFilter, getDateFilterSettings, getNumberFilterSettings, getStringFilterSettings, } from "@1771technologies/lytenyte-shared";
2
- import { itemsWithIdToMap } from "@1771technologies/lytenyte-js-utils";
2
+ import { itemsWithIdToMap } from "@1771technologies/lytenyte-shared";
3
3
  export function computeFilteredRows(rows, grid, filterModel, filterInModel, quickSearch, sensitivity, isPivot) {
4
4
  if (!grid)
5
5
  return rows;
@@ -1,4 +1,4 @@
1
- import { upperCaseFirstLetter } from "@1771technologies/lytenyte-js-utils";
1
+ import { upperCaseFirstLetter } from "@1771technologies/lytenyte-shared";
2
2
  export function createColumnPivotsFromPaths(grid, columns, lookup, paths) {
3
3
  const separator = grid.state.columnGroupJoinDelimiter.get();
4
4
  const cols = paths.map((path) => {
@@ -1,8 +1,9 @@
1
1
  import {} from "../+types.js";
2
2
  import { useRef } from "react";
3
3
  import { traverse } from "./tree/traverse.js";
4
- import { computed, dateComparator, effect, makeAtom, numberComparator, peek, signal, stringComparator, } from "@1771technologies/lytenyte-shared";
5
- import { clamp, equal, get } from "@1771technologies/lytenyte-js-utils";
4
+ import { dateComparator, numberComparator, stringComparator, } from "@1771technologies/lytenyte-shared";
5
+ import { computed, effect, makeAtom, peek, signal, } from "@1771technologies/lytenyte-core/yinternal";
6
+ import { clamp, equal, get } from "@1771technologies/lytenyte-shared";
6
7
  import { makeClientTree } from "./tree/client-tree.js";
7
8
  import { computeFilteredRows } from "./filter/compute-filtered-rows.js";
8
9
  import { builtIns } from "./built-ins/built-ins.js";
@@ -1,8 +1,9 @@
1
1
  import {} from "../+types.js";
2
2
  import { useRef } from "react";
3
3
  import { traverse } from "./tree/traverse.js";
4
- import { computed, dateComparator, effect, makeAtom, numberComparator, peek, signal, stringComparator, } from "@1771technologies/lytenyte-shared";
5
- import { equal, get, itemsWithIdToMap } from "@1771technologies/lytenyte-js-utils";
4
+ import { dateComparator, numberComparator, stringComparator, } from "@1771technologies/lytenyte-shared";
5
+ import { computed, effect, makeAtom, peek, signal, } from "@1771technologies/lytenyte-core/yinternal";
6
+ import { equal, get, itemsWithIdToMap } from "@1771technologies/lytenyte-shared";
6
7
  import { computeFilteredRows } from "./filter/compute-filtered-rows.js";
7
8
  import { builtIns } from "./built-ins/built-ins.js";
8
9
  import { createPivotColumns } from "./pivots/create-pivot-columns.js";
@@ -1,8 +1,9 @@
1
1
  import {} from "../+types.js";
2
2
  import { useRef } from "react";
3
3
  import { traverse } from "./tree/traverse.js";
4
- import { computed, dateComparator, effect, makeAtom, numberComparator, peek, signal, stringComparator, } from "@1771technologies/lytenyte-shared";
5
- import { equal } from "@1771technologies/lytenyte-js-utils";
4
+ import { dateComparator, numberComparator, stringComparator, } from "@1771technologies/lytenyte-shared";
5
+ import { computed, effect, makeAtom, peek, signal, } from "@1771technologies/lytenyte-core/yinternal";
6
+ import { equal } from "@1771technologies/lytenyte-shared";
6
7
  import { makeClientTree } from "./tree/client-tree.js";
7
8
  import { computeFilteredRows } from "./filter/compute-filtered-rows.js";
8
9
  import { builtIns } from "./built-ins/built-ins.js";
@@ -1,4 +1,4 @@
1
- import { equal } from "@1771technologies/lytenyte-js-utils";
1
+ import { equal } from "@1771technologies/lytenyte-shared";
2
2
  import { makeAsyncTree } from "./async-tree/make-async-tree.js";
3
3
  import { RangeTree } from "./range-tree/range-tree.js";
4
4
  import { getRequestId } from "./utils/get-request-id.js";
@@ -1,7 +1,7 @@
1
- import { effect, makeAtom, signal } from "@1771technologies/lytenyte-shared";
1
+ import { effect, makeAtom, signal } from "@1771technologies/lytenyte-core/yinternal";
2
2
  import { useRef } from "react";
3
3
  import { ServerData } from "./server-data.js";
4
- import { equal } from "@1771technologies/lytenyte-js-utils";
4
+ import { equal } from "@1771technologies/lytenyte-shared";
5
5
  export function makeServerDataSource({ dataFetcher, dataInFilterItemFetcher, dataColumnPivotFetcher, cellUpdateHandler, cellUpdateOptimistically, blockSize = 200, }) {
6
6
  let grid = null;
7
7
  let flat;
@@ -1,8 +1,8 @@
1
1
  import { useCallback, useEffect, useRef, useState } from "react";
2
2
  import { sortModelToSortItems } from "../utils/sort-model-to-sort-items.js";
3
- import { itemsWithIdToMap } from "@1771technologies/lytenyte-js-utils";
3
+ import { itemsWithIdToMap } from "@1771technologies/lytenyte-shared";
4
4
  import { useSortRowItems } from "./use-sort-row-item.js";
5
- import { useEvent } from "@1771technologies/lytenyte-react-hooks";
5
+ import { useEvent } from "@1771technologies/lytenyte-core/yinternal";
6
6
  export function useSortManager({ grid, pivotMode }) {
7
7
  const statePivotMode = grid.state.columnPivotMode.useValue();
8
8
  const mode = pivotMode ?? statePivotMode;
@@ -1,6 +1,6 @@
1
1
  import { useMemo } from "react";
2
2
  import { useSortableColumnItems } from "./use-sortable-column-items.js";
3
- import { itemsWithIdToMap } from "@1771technologies/lytenyte-js-utils";
3
+ import { itemsWithIdToMap } from "@1771technologies/lytenyte-shared";
4
4
  export function useSortRowItems(sortItems, setSortItems, grid, pivotMode) {
5
5
  const columnItems = useSortableColumnItems(grid, pivotMode);
6
6
  const pivotColumns = grid.state.columnPivotColumns.useValue();
@@ -1,4 +1,4 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
1
+ import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
2
2
  export interface SortAddProps {
3
3
  readonly as?: SlotComponent<{
4
4
  onAdd: () => void;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useSlot } from "@1771technologies/lytenyte-react-hooks";
3
2
  import { forwardRef } from "react";
4
3
  import { useSortRowCtx } from "./context.js";
4
+ import { useSlot } from "@1771technologies/lytenyte-core/yinternal";
5
5
  export const SortAdd = forwardRef(function SortAdd({ as: as, ...props }, forwarded) {
6
6
  const row = useSortRowCtx();
7
7
  const renderer = useSlot({
@@ -1,4 +1,4 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
1
+ import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
2
2
  export interface SortApplyProps {
3
3
  readonly as?: SlotComponent<{
4
4
  onApply: () => void;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEvent, useSlot } from "@1771technologies/lytenyte-react-hooks";
3
2
  import { forwardRef } from "react";
4
3
  import { useSortManagerCtx } from "./context.js";
5
- import { itemsWithIdToMap } from "@1771technologies/lytenyte-js-utils";
4
+ import { itemsWithIdToMap } from "@1771technologies/lytenyte-shared";
6
5
  import { sortItemsToSortModel } from "./utils/sort-item-to-sort-model.js";
6
+ import { useEvent, useSlot } from "@1771technologies/lytenyte-core/yinternal";
7
7
  export const SortApply = forwardRef(function SortApply({ as, ...props }, forwarded) {
8
8
  const ctx = useSortManagerCtx();
9
9
  const onApply = useEvent(() => {
@@ -1,4 +1,4 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
1
+ import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
2
2
  export interface SortCancelProps {
3
3
  readonly as?: SlotComponent<{
4
4
  onCancel: () => void;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEvent, useSlot } from "@1771technologies/lytenyte-react-hooks";
3
2
  import { forwardRef } from "react";
4
3
  import { useSortManagerCtx } from "./context.js";
5
4
  import { sortModelToSortItems } from "./utils/sort-model-to-sort-items.js";
6
- import { itemsWithIdToMap } from "@1771technologies/lytenyte-js-utils";
5
+ import { itemsWithIdToMap } from "@1771technologies/lytenyte-shared";
6
+ import { useEvent, useSlot } from "@1771technologies/lytenyte-core/yinternal";
7
7
  export const SortCancel = forwardRef(function SortCancel({ as, ...props }, forwarded) {
8
8
  const ctx = useSortManagerCtx();
9
9
  const onCancel = useEvent(() => {
@@ -1,4 +1,4 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
1
+ import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
2
2
  export interface SortClearProps {
3
3
  readonly as?: SlotComponent<{
4
4
  onClear: () => void;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEvent, useSlot } from "@1771technologies/lytenyte-react-hooks";
3
2
  import { forwardRef } from "react";
4
3
  import { useSortManagerCtx } from "./context.js";
4
+ import { useEvent, useSlot } from "@1771technologies/lytenyte-core/yinternal";
5
5
  export const SortClear = forwardRef(function SortClear({ as, ...props }, forwarded) {
6
6
  const ctx = useSortManagerCtx();
7
7
  const onClear = useEvent(() => {
@@ -1,5 +1,5 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
2
1
  import type { Option } from "./+types";
2
+ import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
3
3
  export interface SortColumnSelectProps {
4
4
  readonly as?: SlotComponent<{
5
5
  options: Option[];
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useSlot } from "@1771technologies/lytenyte-react-hooks";
3
2
  import { forwardRef } from "react";
4
3
  import { useSortRowCtx } from "./context.js";
4
+ import { useSlot } from "@1771technologies/lytenyte-core/yinternal";
5
5
  export const SortColumnSelect = forwardRef(function SortColumnSelect({ as, ...props }, forwarded) {
6
6
  const row = useSortRowCtx();
7
7
  const el = (_jsxs("select", { "aria-label": "Select column to sort", value: row.columnItem?.value ?? "", onChange: (e) => {