@wcardinal/wcardinal-ui 0.413.0 → 0.415.0

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 (43) hide show
  1. package/dist/types/wcardinal/ui/d-select.d.ts +1 -1
  2. package/dist/types/wcardinal/ui/d-table-category-cell.d.ts +3 -20
  3. package/dist/types/wcardinal/ui/d-table-category-column-impl.d.ts +1 -2
  4. package/dist/types/wcardinal/ui/d-table-category-container-impl.d.ts +1 -1
  5. package/dist/types/wcardinal/ui/d-table-cell-edge.d.ts +69 -0
  6. package/dist/types/wcardinal/ui/d-table-column-impl.d.ts +2 -0
  7. package/dist/types/wcardinal/ui/d-table-column.d.ts +2 -0
  8. package/dist/types/wcardinal/ui/d-table-data.d.ts +3 -3
  9. package/dist/types/wcardinal/ui/d-table-header-cell.d.ts +3 -19
  10. package/dist/types/wcardinal/ui/d-tree-data.d.ts +1 -1
  11. package/dist/wcardinal/ui/d-select.js.map +1 -1
  12. package/dist/wcardinal/ui/d-table-category-cell.js +5 -207
  13. package/dist/wcardinal/ui/d-table-category-cell.js.map +1 -1
  14. package/dist/wcardinal/ui/d-table-category-column-impl.js +19 -34
  15. package/dist/wcardinal/ui/d-table-category-column-impl.js.map +1 -1
  16. package/dist/wcardinal/ui/d-table-category-container-impl.js +14 -7
  17. package/dist/wcardinal/ui/d-table-category-container-impl.js.map +1 -1
  18. package/dist/wcardinal/ui/d-table-cell-edge.js +557 -0
  19. package/dist/wcardinal/ui/d-table-cell-edge.js.map +1 -0
  20. package/dist/wcardinal/ui/d-table-column-impl.js +2 -0
  21. package/dist/wcardinal/ui/d-table-column-impl.js.map +1 -1
  22. package/dist/wcardinal/ui/d-table-column.js.map +1 -1
  23. package/dist/wcardinal/ui/d-table-data.js.map +1 -1
  24. package/dist/wcardinal/ui/d-table-header-cell.js +6 -200
  25. package/dist/wcardinal/ui/d-table-header-cell.js.map +1 -1
  26. package/dist/wcardinal/ui/d-tree-data.js.map +1 -1
  27. package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
  28. package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
  29. package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
  30. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
  31. package/dist/wcardinal-ui-theme-dark.js +1 -1
  32. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  33. package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
  34. package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
  35. package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
  36. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
  37. package/dist/wcardinal-ui-theme-white.js +1 -1
  38. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  39. package/dist/wcardinal-ui.cjs.js +558 -407
  40. package/dist/wcardinal-ui.js +558 -407
  41. package/dist/wcardinal-ui.min.js +2 -2
  42. package/dist/wcardinal-ui.min.js.map +1 -1
  43. package/package.json +2 -2
@@ -0,0 +1,557 @@
1
+ /*
2
+ * Copyright (C) 2019 Toshiba Corporation
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { InteractionEvent, Point } from "pixi.js";
6
+ import { DTableState } from "./d-table-state";
7
+ import { UtilPointerEvent } from "./util/util-pointer-event";
8
+ import { DApplications } from "./d-applications";
9
+ export var DTableCellEdgeHovered = {
10
+ NONE: 0,
11
+ LEFT: 1,
12
+ RIGHT: 2,
13
+ BOTH: 3
14
+ };
15
+ var DTableCellEdge = /** @class */ (function () {
16
+ function DTableCellEdge(row, cell, columnIndex, size) {
17
+ this._row = row;
18
+ this._cell = cell;
19
+ this._columnIndex = columnIndex;
20
+ this._size = size;
21
+ this._dragged = false;
22
+ this._minWidth = 8;
23
+ }
24
+ DTableCellEdge.prototype.findResizableCell = function (columnIndex, direction, weight) {
25
+ var children = this._row.children;
26
+ var childrenLength = children.length;
27
+ if (direction) {
28
+ for (var i = columnIndex; i < childrenLength; ++i) {
29
+ var child = children[childrenLength - i - 1];
30
+ var childColumn = child.column;
31
+ if (childColumn.resizable) {
32
+ if (weight == null) {
33
+ return child;
34
+ }
35
+ else if (weight === true) {
36
+ if (childColumn.weight != null) {
37
+ return child;
38
+ }
39
+ }
40
+ else {
41
+ if (childColumn.weight == null) {
42
+ return child;
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ else {
49
+ for (var i = columnIndex; 0 <= i; --i) {
50
+ var child = children[childrenLength - i - 1];
51
+ var childColumn = child.column;
52
+ if (childColumn.resizable) {
53
+ if (weight == null) {
54
+ return child;
55
+ }
56
+ else if (weight === true) {
57
+ if (childColumn.weight != null) {
58
+ return child;
59
+ }
60
+ }
61
+ else {
62
+ if (childColumn.weight == null) {
63
+ return child;
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ return null;
70
+ };
71
+ DTableCellEdge.prototype.findCells = function (columnIndex, direction, weight) {
72
+ var result = [];
73
+ var children = this._row.children;
74
+ var childrenLength = children.length;
75
+ if (direction) {
76
+ for (var i = columnIndex; i < childrenLength; ++i) {
77
+ var child = children[childrenLength - i - 1];
78
+ if (weight) {
79
+ if (child.column.weight != null) {
80
+ result.push(child);
81
+ }
82
+ }
83
+ else {
84
+ if (child.column.weight == null) {
85
+ result.push(child);
86
+ }
87
+ }
88
+ }
89
+ }
90
+ else {
91
+ for (var i = columnIndex; 0 <= i; --i) {
92
+ var child = children[childrenLength - i - 1];
93
+ if (weight) {
94
+ if (child.column.weight != null) {
95
+ result.push(child);
96
+ }
97
+ }
98
+ else {
99
+ if (child.column.weight == null) {
100
+ result.push(child);
101
+ }
102
+ }
103
+ }
104
+ }
105
+ return result;
106
+ };
107
+ DTableCellEdge.prototype.calcData = function (columnIndex) {
108
+ var left = this.findResizableCell(columnIndex, false, null);
109
+ if (left != null) {
110
+ var leftColumn = left.column;
111
+ var right = this.findResizableCell(columnIndex + 1, true, null);
112
+ if (right != null) {
113
+ var rightColumn = right.column;
114
+ if (leftColumn.weight == null) {
115
+ if (rightColumn.weight == null) {
116
+ // Width - Width
117
+ return [1, left, right];
118
+ }
119
+ else {
120
+ // Width - Weight
121
+ var others = this.findCells(0, true, true);
122
+ return [2, left, right, others];
123
+ }
124
+ }
125
+ else {
126
+ if (rightColumn.weight == null) {
127
+ // Weight - Width
128
+ var others = this.findCells(0, true, true);
129
+ return [3, left, right, others];
130
+ }
131
+ else {
132
+ // Weight - Weight
133
+ return [1, left, right];
134
+ }
135
+ }
136
+ }
137
+ else {
138
+ if (leftColumn.weight == null) {
139
+ // Width
140
+ var ls = this.findCells(left.columnIndex - 1, false, true);
141
+ if (ls.length <= 0) {
142
+ return [0, left];
143
+ }
144
+ // Not resizable
145
+ return null;
146
+ }
147
+ else {
148
+ // Not resizable
149
+ return null;
150
+ }
151
+ }
152
+ }
153
+ // Not resizable
154
+ return null;
155
+ };
156
+ Object.defineProperty(DTableCellEdge.prototype, "left", {
157
+ get: function () {
158
+ var result = this._left;
159
+ if (result === undefined) {
160
+ result = this.calcData(this._columnIndex - 1);
161
+ this._left = result;
162
+ }
163
+ return result;
164
+ },
165
+ enumerable: false,
166
+ configurable: true
167
+ });
168
+ Object.defineProperty(DTableCellEdge.prototype, "right", {
169
+ get: function () {
170
+ var result = this._right;
171
+ if (result === undefined) {
172
+ result = this.calcData(this._columnIndex);
173
+ this._right = result;
174
+ }
175
+ return result;
176
+ },
177
+ enumerable: false,
178
+ configurable: true
179
+ });
180
+ DTableCellEdge.prototype.onDown = function (e) {
181
+ var cell = this._cell;
182
+ var hoveredOnEdge = cell.state.valueOf(DTableState.HOVERED_ON_EDGE);
183
+ if (hoveredOnEdge != null) {
184
+ this._dragged = true;
185
+ var layer = DApplications.getLayer(cell);
186
+ if (layer != null) {
187
+ var interactionManager = layer.renderer.plugins.interaction;
188
+ if (hoveredOnEdge === DTableCellEdgeHovered.LEFT) {
189
+ var left = this.left;
190
+ if (left != null) {
191
+ this.onDown_(e.data.global.x, left, interactionManager);
192
+ }
193
+ }
194
+ else {
195
+ var right = this.right;
196
+ if (right != null) {
197
+ this.onDown_(e.data.global.x, right, interactionManager);
198
+ }
199
+ }
200
+ }
201
+ return true;
202
+ }
203
+ else {
204
+ this._dragged = false;
205
+ return false;
206
+ }
207
+ };
208
+ DTableCellEdge.prototype.onDown_ = function (onDownPoint, data, interactionManager) {
209
+ switch (data[0]) {
210
+ case 0:
211
+ this.onDown0(onDownPoint, data, interactionManager);
212
+ break;
213
+ case 1:
214
+ this.onDown1(onDownPoint, data, interactionManager);
215
+ break;
216
+ case 2:
217
+ this.onDown2(onDownPoint, data, interactionManager);
218
+ break;
219
+ case 3:
220
+ this.onDown3(onDownPoint, data, interactionManager);
221
+ break;
222
+ }
223
+ };
224
+ DTableCellEdge.prototype.onOver = function (e) {
225
+ var _this = this;
226
+ var _a;
227
+ if (this.left != null || this.right != null) {
228
+ var onHoveredBound = ((_a = this._onHoveredBound) !== null && _a !== void 0 ? _a : (this._onHoveredBound = function (event) {
229
+ _this.onHovered(event);
230
+ }));
231
+ var cell = this._cell;
232
+ cell.off(UtilPointerEvent.move, onHoveredBound);
233
+ cell.on(UtilPointerEvent.move, onHoveredBound);
234
+ // Since the cursor is set by InteractionManager before this method is called,
235
+ // the cursor need to be overriden.
236
+ this.onHovered(e);
237
+ var layer = DApplications.getLayer(cell);
238
+ if (layer != null) {
239
+ layer.renderer.plugins.interaction.cursor = cell.cursor;
240
+ }
241
+ }
242
+ };
243
+ DTableCellEdge.prototype.onOut = function (e) {
244
+ var onHoveredBound = this._onHoveredBound;
245
+ if (onHoveredBound != null) {
246
+ var cell = this._cell;
247
+ cell.state.remove(DTableState.HOVERED_ON_EDGE);
248
+ cell.off(UtilPointerEvent.move, onHoveredBound);
249
+ }
250
+ };
251
+ DTableCellEdge.prototype.onHovered = function (e) {
252
+ var cell = this._cell;
253
+ var width = cell.width;
254
+ var x = this.toX(e);
255
+ var size = this._size;
256
+ var onLeft = 0 <= x && x <= size;
257
+ var onRight = width - size <= x && x <= width;
258
+ if (onLeft && onRight) {
259
+ if (x <= width - x) {
260
+ onRight = false;
261
+ }
262
+ else {
263
+ onLeft = false;
264
+ }
265
+ }
266
+ if (onLeft) {
267
+ if (this.left != null) {
268
+ cell.state.add(DTableState.HOVERED_ON_EDGE, DTableCellEdgeHovered.LEFT);
269
+ }
270
+ else {
271
+ cell.state.remove(DTableState.HOVERED_ON_EDGE);
272
+ }
273
+ }
274
+ else if (onRight) {
275
+ if (this.right != null) {
276
+ cell.state.add(DTableState.HOVERED_ON_EDGE, DTableCellEdgeHovered.RIGHT);
277
+ }
278
+ else {
279
+ cell.state.remove(DTableState.HOVERED_ON_EDGE);
280
+ }
281
+ }
282
+ else {
283
+ cell.state.remove(DTableState.HOVERED_ON_EDGE);
284
+ }
285
+ };
286
+ DTableCellEdge.prototype.toX = function (e) {
287
+ var _a;
288
+ var checkWork = ((_a = this._checkWork) !== null && _a !== void 0 ? _a : (this._checkWork = new Point()));
289
+ return this._cell.toLocal(e.data.global, undefined, checkWork, true).x;
290
+ };
291
+ DTableCellEdge.prototype.onDown0 = function (onDownPoint, data, interactionManager) {
292
+ var left = data[1];
293
+ var leftColumn = left.column;
294
+ var leftOldWidth = left.width;
295
+ var leftMinWidth = Math.max(this._minWidth, leftColumn.minWidth);
296
+ var onMove = function (e) {
297
+ leftColumn.width = Math.max(leftMinWidth, leftOldWidth + e.data.global.x - onDownPoint);
298
+ };
299
+ this.newOnUp(onMove, interactionManager);
300
+ };
301
+ DTableCellEdge.prototype.onDown1 = function (onDownPoint, data, interactionManager) {
302
+ var minWidth = this._minWidth;
303
+ var left = data[1];
304
+ var leftColumn = left.column;
305
+ var leftOldWidth = left.width;
306
+ var right = data[2];
307
+ var rightColumn = right.column;
308
+ var rightOldWidth = right.width;
309
+ var totalWidth = leftOldWidth + rightOldWidth;
310
+ if (leftColumn.weight == null) {
311
+ var leftMinWidth_1 = Math.max(minWidth, leftColumn.minWidth);
312
+ var rightMinWidth = Math.max(minWidth, rightColumn.minWidth);
313
+ var leftMaxWidth_1 = totalWidth - rightMinWidth;
314
+ if (totalWidth <= 0 || leftMaxWidth_1 <= leftMinWidth_1) {
315
+ // The left and right resizable cells doesn't have enough width
316
+ return;
317
+ }
318
+ var onMove = function (e) {
319
+ var leftNewWidth = Math.max(leftMinWidth_1, Math.min(leftMaxWidth_1, leftOldWidth + e.data.global.x - onDownPoint));
320
+ leftColumn.width = leftNewWidth;
321
+ rightColumn.width = totalWidth - leftNewWidth;
322
+ };
323
+ this.newOnUp(onMove, interactionManager);
324
+ }
325
+ else {
326
+ var leftOldWeight = left.weight;
327
+ var rightOldWeight = right.weight;
328
+ var totalWeight_1 = leftOldWeight + rightOldWeight;
329
+ var leftMinWeight_1 = leftColumn.minWeight;
330
+ var rightMinWeight = rightColumn.minWeight;
331
+ var leftMaxWeight_1 = totalWeight_1 - rightMinWeight;
332
+ var leftMinWidth_2 = minWidth;
333
+ var rightMinWidth = minWidth;
334
+ var leftMaxWidth_2 = totalWidth - rightMinWidth;
335
+ if (totalWidth <= 0 || leftMaxWidth_2 <= leftMinWidth_2 || leftMaxWeight_1 <= leftMinWeight_1) {
336
+ // The left and right resizable cells doesn't have enough width
337
+ return;
338
+ }
339
+ var onMove = function (e) {
340
+ var leftNewWidth = Math.max(leftMinWidth_2, Math.min(leftMaxWidth_2, leftOldWidth + e.data.global.x - onDownPoint));
341
+ var leftNewWeight = Math.max(leftMinWeight_1, Math.min(leftMaxWeight_1, totalWeight_1 * (leftNewWidth / totalWidth)));
342
+ leftColumn.weight = leftNewWeight;
343
+ rightColumn.weight = totalWeight_1 - leftNewWeight;
344
+ };
345
+ this.newOnUp(onMove, interactionManager);
346
+ }
347
+ };
348
+ DTableCellEdge.prototype.onDown2 = function (onDownPoint, data, interactionManager) {
349
+ if (data[3].length <= 1) {
350
+ this.onDown2a(onDownPoint, data, interactionManager);
351
+ }
352
+ else {
353
+ this.onDown2b(onDownPoint, data, interactionManager);
354
+ }
355
+ };
356
+ DTableCellEdge.prototype.onDown2a = function (onDownPoint, data, interactionManager) {
357
+ var minWidth = this._minWidth;
358
+ var left = data[1];
359
+ var leftColumn = left.column;
360
+ var leftOldWidth = left.width;
361
+ var leftMinWidth = Math.max(minWidth, leftColumn.minWidth);
362
+ var right = data[2];
363
+ var rightOldWidth = right.width;
364
+ var rightMinWidth = minWidth;
365
+ var totalWidth = leftOldWidth + rightOldWidth;
366
+ var leftMaxWidth = totalWidth - rightMinWidth;
367
+ if (totalWidth <= 0 || leftMaxWidth <= leftMinWidth) {
368
+ // The left and right resizable cells doesn't have enough width
369
+ return;
370
+ }
371
+ var onMove = function (e) {
372
+ leftColumn.width = Math.max(leftMinWidth, Math.min(leftMaxWidth, leftOldWidth + e.data.global.x - onDownPoint));
373
+ };
374
+ this.newOnUp(onMove, interactionManager);
375
+ };
376
+ DTableCellEdge.prototype.onDown2b = function (onDownPoint, data, interactionManager) {
377
+ var minWidth = this._minWidth;
378
+ var left = data[1];
379
+ var leftColumn = left.column;
380
+ var leftOldWidth = left.width;
381
+ var leftMinWidth = Math.max(minWidth, leftColumn.minWidth);
382
+ var right = data[2];
383
+ var rightColumn = right.column;
384
+ var rightOldWidth = right.width;
385
+ var rightMinWeight = rightColumn.minWeight;
386
+ var totalWidth = leftOldWidth + rightOldWidth;
387
+ var others = data[3];
388
+ var totalWeight = 0;
389
+ var totalSpace = 0;
390
+ for (var i = 0, imax = others.length; i < imax; ++i) {
391
+ var other = others[i];
392
+ totalWeight += other.weight;
393
+ totalSpace += other.width;
394
+ }
395
+ if (totalWeight <= 0 || totalSpace <= 0) {
396
+ var rightMinWidth = minWidth;
397
+ var leftMaxWidth_3 = totalWidth - rightMinWidth;
398
+ if (totalWidth <= 0 || leftMaxWidth_3 <= leftMinWidth) {
399
+ // The left and right resizable cells doesn't have enough width
400
+ return;
401
+ }
402
+ if (totalWeight <= 0) {
403
+ totalWeight = 0;
404
+ for (var i = 0, imax = others.length; i < imax; ++i) {
405
+ var other = others[i];
406
+ var otherColumn = other.column;
407
+ if (other !== right) {
408
+ var otherNewWeight = otherColumn.minWeight;
409
+ otherColumn.weight = otherNewWeight;
410
+ totalWeight += otherNewWeight;
411
+ }
412
+ else {
413
+ var rightNewWeight = Math.max(1, rightMinWeight);
414
+ otherColumn.weight = rightNewWeight;
415
+ totalWeight += rightNewWeight;
416
+ }
417
+ }
418
+ }
419
+ var onMove = function (e) {
420
+ leftColumn.width = Math.max(leftMinWidth, Math.min(leftMaxWidth_3, leftOldWidth + e.data.global.x - onDownPoint));
421
+ };
422
+ this.newOnUp(onMove, interactionManager);
423
+ }
424
+ else {
425
+ var rightMinWidth = Math.max(minWidth, totalSpace * (rightMinWeight / totalWeight));
426
+ var leftMaxWidth_4 = totalWidth - rightMinWidth;
427
+ if (totalWidth <= 0 || leftMaxWidth_4 <= leftMinWidth) {
428
+ // The left and right resizable cells doesn't have enough width
429
+ return;
430
+ }
431
+ var onMove = function (e) {
432
+ var leftNewWidth = Math.max(leftMinWidth, Math.min(leftMaxWidth_4, leftOldWidth + e.data.global.x - onDownPoint));
433
+ var rightNewWidth = totalWidth - leftNewWidth;
434
+ var rightNewWeight = Math.max(rightMinWeight, totalWeight * (rightNewWidth / totalSpace));
435
+ leftColumn.width = leftNewWidth;
436
+ rightColumn.weight = rightNewWeight;
437
+ };
438
+ this.newOnUp(onMove, interactionManager);
439
+ }
440
+ };
441
+ DTableCellEdge.prototype.onDown3 = function (onDownPoint, data, interactionManager) {
442
+ if (data[3].length <= 1) {
443
+ this.onDown3a(onDownPoint, data, interactionManager);
444
+ }
445
+ else {
446
+ this.onDown3b(onDownPoint, data, interactionManager);
447
+ }
448
+ };
449
+ DTableCellEdge.prototype.onDown3a = function (onDownPoint, data, interactionManager) {
450
+ var minWidth = this._minWidth;
451
+ var left = data[1];
452
+ var leftOldWidth = left.width;
453
+ var leftMinWidth = minWidth;
454
+ var right = data[2];
455
+ var rightColumn = right.column;
456
+ var rightOldWidth = right.width;
457
+ var rightMinWidth = Math.max(minWidth, rightColumn.minWidth);
458
+ var totalWidth = leftOldWidth + rightOldWidth;
459
+ var rightMaxWidth = totalWidth - leftMinWidth;
460
+ if (totalWidth <= 0 || rightMaxWidth <= rightMinWidth) {
461
+ // The left and right resizable cells doesn't have enough width
462
+ return;
463
+ }
464
+ var onMove = function (e) {
465
+ rightColumn.width = Math.max(rightMinWidth, Math.min(rightMaxWidth, rightOldWidth + onDownPoint - e.data.global.x));
466
+ };
467
+ this.newOnUp(onMove, interactionManager);
468
+ };
469
+ DTableCellEdge.prototype.onDown3b = function (onDownPoint, data, interactionManager) {
470
+ var minWidth = this._minWidth;
471
+ var left = data[1];
472
+ var leftColumn = left.column;
473
+ var leftOldWidth = left.width;
474
+ var leftMinWeight = leftColumn.minWeight;
475
+ var right = data[2];
476
+ var rightColumn = right.column;
477
+ var rightOldWidth = right.width;
478
+ var rightMinWidth = Math.max(minWidth, rightColumn.minWidth);
479
+ var totalWidth = leftOldWidth + rightOldWidth;
480
+ var others = data[3];
481
+ var totalWeight = 0;
482
+ var totalSpace = 0;
483
+ for (var i = 0, imax = others.length; i < imax; ++i) {
484
+ var other = others[i];
485
+ totalWeight += other.weight;
486
+ totalSpace += other.width;
487
+ }
488
+ if (totalWeight <= 0 || totalSpace <= 0) {
489
+ var leftMinWidth = minWidth;
490
+ var rightMaxWidth_1 = totalWidth - leftMinWidth;
491
+ if (totalWidth <= 0 || rightMaxWidth_1 <= rightMinWidth) {
492
+ // The left and right resizable cells doesn't have enough width
493
+ return;
494
+ }
495
+ if (totalWeight <= 0) {
496
+ totalWeight = 0;
497
+ for (var i = 0, imax = others.length; i < imax; ++i) {
498
+ var other = others[i];
499
+ var otherColumn = other.column;
500
+ if (other !== left) {
501
+ var otherNewWeight = otherColumn.minWeight;
502
+ otherColumn.weight = otherNewWeight;
503
+ totalWeight += otherNewWeight;
504
+ }
505
+ else {
506
+ var leftNewWeight = Math.max(1, leftMinWeight);
507
+ otherColumn.weight = leftNewWeight;
508
+ totalWeight += leftNewWeight;
509
+ }
510
+ }
511
+ }
512
+ var onMove = function (e) {
513
+ rightColumn.width = Math.max(rightMinWidth, Math.min(rightMaxWidth_1, rightOldWidth + onDownPoint - e.data.global.x));
514
+ };
515
+ this.newOnUp(onMove, interactionManager);
516
+ }
517
+ else {
518
+ var leftMinWidth = Math.max(minWidth, totalSpace * (leftMinWeight / totalWeight));
519
+ var rightMaxWidth_2 = totalWidth - leftMinWidth;
520
+ if (totalWidth <= 0 || rightMaxWidth_2 <= rightMinWidth) {
521
+ // The left and right resizable cells doesn't have enough width
522
+ return;
523
+ }
524
+ var onMove = function (e) {
525
+ var rightNewWidth = Math.max(rightMinWidth, Math.min(rightMaxWidth_2, rightOldWidth + onDownPoint - e.data.global.x));
526
+ var leftNewWidth = totalWidth - rightNewWidth;
527
+ var leftNewWeight = Math.max(leftMinWeight, totalWeight * (leftNewWidth / totalSpace));
528
+ rightColumn.width = rightNewWidth;
529
+ leftColumn.weight = leftNewWeight;
530
+ };
531
+ this.newOnUp(onMove, interactionManager);
532
+ }
533
+ };
534
+ DTableCellEdge.prototype.newOnUp = function (onMove, interactionManager) {
535
+ var row = this._row;
536
+ row.state.add(DTableState.RESIZING);
537
+ var onUp = function () {
538
+ row.state.remove(DTableState.RESIZING);
539
+ interactionManager.off(UtilPointerEvent.move, onMove);
540
+ interactionManager.off(UtilPointerEvent.up, onUp);
541
+ interactionManager.off(UtilPointerEvent.upoutside, onUp);
542
+ interactionManager.off(UtilPointerEvent.cancel, onUp);
543
+ };
544
+ interactionManager.on(UtilPointerEvent.move, onMove);
545
+ interactionManager.on(UtilPointerEvent.up, onUp);
546
+ interactionManager.on(UtilPointerEvent.upoutside, onUp);
547
+ interactionManager.on(UtilPointerEvent.cancel, onUp);
548
+ return onUp;
549
+ };
550
+ DTableCellEdge.prototype.isClicked = function (e) {
551
+ return (e instanceof InteractionEvent &&
552
+ (this._cell.state.is(DTableState.HOVERED_ON_EDGE) || this._dragged));
553
+ };
554
+ return DTableCellEdge;
555
+ }());
556
+ export { DTableCellEdge };
557
+ //# sourceMappingURL=d-table-cell-edge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"d-table-cell-edge.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-table-cell-edge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,gBAAgB,EAEhB,KAAK,EAEL,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,MAAM,CAAC,IAAM,qBAAqB,GAAG;IACpC,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;CACE,CAAC;AAwCX;IAYC,wBAAY,GAA4B,EAAE,IAAU,EAAE,WAAmB,EAAE,IAAY;QACtF,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACpB,CAAC;IAES,0CAAiB,GAA3B,UACC,WAAmB,EACnB,SAAkB,EAClB,MAAsB;QAEtB,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QACpC,IAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC;QACvC,IAAI,SAAS,EAAE;YACd,KAAK,IAAI,CAAC,GAAG,WAAW,EAAE,CAAC,GAAG,cAAc,EAAE,EAAE,CAAC,EAAE;gBAClD,IAAM,KAAK,GAAG,QAAQ,CAAC,cAAc,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC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BAAkB,CAAC,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACrD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,kCAAS,GAAT,UAAU,CAA8D;QACvE,OAAO,CACN,CAAC,YAAY,gBAAgB;YAC7B,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CACnE,CAAC;IACH,CAAC;IACF,qBAAC;AAAD,CAAC,AAtnBD,IAsnBC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n\tDisplayObject,\n\tIPointData,\n\tInteractionEvent,\n\tInteractionManager,\n\tPoint,\n\tutils\n} from \"pixi.js\";\nimport { DTableState } from \"./d-table-state\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { DApplications } from \"./d-applications\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\nimport { DApplicationTarget } from \"./d-application-like\";\n\nexport const DTableCellEdgeHovered = {\n\tNONE: 0,\n\tLEFT: 1,\n\tRIGHT: 2,\n\tBOTH: 3\n} as const;\n\nexport type DTableCellEdgeHovered =\n\t(typeof DTableCellEdgeHovered)[keyof typeof DTableCellEdgeHovered];\n\nexport type DTableCellEdgeData0<CELL> = [0, CELL];\nexport type DTableCellEdgeData1<CELL> = [1, CELL, CELL];\nexport type DTableCellEdgeData2<CELL> = [2, CELL, CELL, CELL[]];\nexport type DTableCellEdgeData3<CELL> = [3, CELL, CELL, CELL[]];\n\nexport type DTableCellEdgeData<CELL> =\n\t| DTableCellEdgeData0<CELL>\n\t| DTableCellEdgeData1<CELL>\n\t| DTableCellEdgeData2<CELL>\n\t| DTableCellEdgeData3<CELL>;\n\nexport interface DTableCellEdgeRow<CELL> {\n\treadonly state: DBaseStateSet;\n\treadonly children: CELL[];\n}\n\nexport interface DTableCellEdgeColumn {\n\tweight?: number;\n\treadonly minWeight: number;\n\twidth?: number;\n\treadonly minWidth: number;\n\treadonly resizable: boolean;\n}\n\nexport interface DTableCellEdgeCell extends DApplicationTarget, utils.EventEmitter {\n\treadonly state: DBaseStateSet;\n\treadonly column: DTableCellEdgeColumn;\n\treadonly columnIndex: number;\n\treadonly cursor: string;\n\treadonly width: number;\n\treadonly weight: number;\n\n\ttoLocal(position: IPointData, from?: DisplayObject, point?: Point, skipUpdate?: boolean): Point;\n}\n\nexport class DTableCellEdge<CELL extends DTableCellEdgeCell> {\n\tprotected _row: DTableCellEdgeRow<CELL>;\n\tprotected _cell: CELL;\n\tprotected _columnIndex: number;\n\tprotected _checkWork?: Point;\n\tprotected _onHoveredBound?: (e: InteractionEvent) => void;\n\tprotected _left?: DTableCellEdgeData<CELL> | null;\n\tprotected _right?: DTableCellEdgeData<CELL> | null;\n\tprotected _size: number;\n\tprotected _dragged: boolean;\n\tprotected _minWidth: number;\n\n\tconstructor(row: DTableCellEdgeRow<CELL>, cell: CELL, columnIndex: number, size: number) {\n\t\tthis._row = row;\n\t\tthis._cell = cell;\n\t\tthis._columnIndex = columnIndex;\n\t\tthis._size = size;\n\t\tthis._dragged = false;\n\t\tthis._minWidth = 8;\n\t}\n\n\tprotected findResizableCell(\n\t\tcolumnIndex: number,\n\t\tdirection: boolean,\n\t\tweight: boolean | null\n\t): CELL | null {\n\t\tconst children = this._row.children;\n\t\tconst childrenLength = children.length;\n\t\tif (direction) {\n\t\t\tfor (let i = columnIndex; i < childrenLength; ++i) {\n\t\t\t\tconst child = children[childrenLength - i - 1];\n\t\t\t\tconst childColumn = child.column;\n\t\t\t\tif (childColumn.resizable) {\n\t\t\t\t\tif (weight == null) {\n\t\t\t\t\t\treturn child;\n\t\t\t\t\t} else if (weight === true) {\n\t\t\t\t\t\tif (childColumn.weight != null) {\n\t\t\t\t\t\t\treturn child;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (childColumn.weight == null) {\n\t\t\t\t\t\t\treturn child;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (let i = columnIndex; 0 <= i; --i) {\n\t\t\t\tconst child = children[childrenLength - i - 1];\n\t\t\t\tconst childColumn = child.column;\n\t\t\t\tif (childColumn.resizable) {\n\t\t\t\t\tif (weight == null) {\n\t\t\t\t\t\treturn child;\n\t\t\t\t\t} else if (weight === true) {\n\t\t\t\t\t\tif (childColumn.weight != null) {\n\t\t\t\t\t\t\treturn child;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (childColumn.weight == null) {\n\t\t\t\t\t\t\treturn child;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected findCells(columnIndex: number, direction: boolean, weight: boolean): CELL[] {\n\t\tconst result = [];\n\t\tconst children = this._row.children;\n\t\tconst childrenLength = children.length;\n\t\tif (direction) {\n\t\t\tfor (let i = columnIndex; i < childrenLength; ++i) {\n\t\t\t\tconst child = children[childrenLength - i - 1];\n\t\t\t\tif (weight) {\n\t\t\t\t\tif (child.column.weight != null) {\n\t\t\t\t\t\tresult.push(child);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (child.column.weight == null) {\n\t\t\t\t\t\tresult.push(child);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (let i = columnIndex; 0 <= i; --i) {\n\t\t\t\tconst child = children[childrenLength - i - 1];\n\t\t\t\tif (weight) {\n\t\t\t\t\tif (child.column.weight != null) {\n\t\t\t\t\t\tresult.push(child);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (child.column.weight == null) {\n\t\t\t\t\t\tresult.push(child);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected calcData(columnIndex: number): DTableCellEdgeData<CELL> | null {\n\t\tconst left = this.findResizableCell(columnIndex, false, null);\n\t\tif (left != null) {\n\t\t\tconst leftColumn = left.column;\n\t\t\tconst right = this.findResizableCell(columnIndex + 1, true, null);\n\t\t\tif (right != null) {\n\t\t\t\tconst rightColumn = right.column;\n\t\t\t\tif (leftColumn.weight == null) {\n\t\t\t\t\tif (rightColumn.weight == null) {\n\t\t\t\t\t\t// Width - Width\n\t\t\t\t\t\treturn [1, left, right];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Width - Weight\n\t\t\t\t\t\tconst others = this.findCells(0, true, true);\n\t\t\t\t\t\treturn [2, left, right, others];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (rightColumn.weight == null) {\n\t\t\t\t\t\t// Weight - Width\n\t\t\t\t\t\tconst others = this.findCells(0, true, true);\n\t\t\t\t\t\treturn [3, left, right, others];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Weight - Weight\n\t\t\t\t\t\treturn [1, left, right];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (leftColumn.weight == null) {\n\t\t\t\t\t// Width\n\t\t\t\t\tconst ls = this.findCells(left.columnIndex - 1, false, true);\n\t\t\t\t\tif (ls.length <= 0) {\n\t\t\t\t\t\treturn [0, left];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Not resizable\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\t// Not resizable\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Not resizable\n\t\treturn null;\n\t}\n\n\tget left(): DTableCellEdgeData<CELL> | null {\n\t\tlet result = this._left;\n\t\tif (result === undefined) {\n\t\t\tresult = this.calcData(this._columnIndex - 1);\n\t\t\tthis._left = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tget right(): DTableCellEdgeData<CELL> | null {\n\t\tlet result = this._right;\n\t\tif (result === undefined) {\n\t\t\tresult = this.calcData(this._columnIndex);\n\t\t\tthis._right = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tonDown(e: InteractionEvent): boolean {\n\t\tconst cell = this._cell;\n\t\tconst hoveredOnEdge = cell.state.valueOf(DTableState.HOVERED_ON_EDGE);\n\t\tif (hoveredOnEdge != null) {\n\t\t\tthis._dragged = true;\n\t\t\tconst layer = DApplications.getLayer(cell);\n\t\t\tif (layer != null) {\n\t\t\t\tconst interactionManager = layer.renderer.plugins.interaction;\n\t\t\t\tif (hoveredOnEdge === DTableCellEdgeHovered.LEFT) {\n\t\t\t\t\tconst left = this.left;\n\t\t\t\t\tif (left != null) {\n\t\t\t\t\t\tthis.onDown_(e.data.global.x, left, interactionManager);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst right = this.right;\n\t\t\t\t\tif (right != null) {\n\t\t\t\t\t\tthis.onDown_(e.data.global.x, right, interactionManager);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis._dragged = false;\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tprotected onDown_(\n\t\tonDownPoint: number,\n\t\tdata: DTableCellEdgeData<CELL>,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tswitch (data[0]) {\n\t\t\tcase 0:\n\t\t\t\tthis.onDown0(onDownPoint, data, interactionManager);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tthis.onDown1(onDownPoint, data, interactionManager);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tthis.onDown2(onDownPoint, data, interactionManager);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tthis.onDown3(onDownPoint, data, interactionManager);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tonOver(e: InteractionEvent): void {\n\t\tif (this.left != null || this.right != null) {\n\t\t\tconst onHoveredBound = (this._onHoveredBound ??= (event: InteractionEvent): void => {\n\t\t\t\tthis.onHovered(event);\n\t\t\t});\n\t\t\tconst cell = this._cell;\n\t\t\tcell.off(UtilPointerEvent.move, onHoveredBound);\n\t\t\tcell.on(UtilPointerEvent.move, onHoveredBound);\n\n\t\t\t// Since the cursor is set by InteractionManager before this method is called,\n\t\t\t// the cursor need to be overriden.\n\t\t\tthis.onHovered(e);\n\t\t\tconst layer = DApplications.getLayer(cell);\n\t\t\tif (layer != null) {\n\t\t\t\tlayer.renderer.plugins.interaction.cursor = cell.cursor;\n\t\t\t}\n\t\t}\n\t}\n\n\tonOut(e: InteractionEvent): void {\n\t\tconst onHoveredBound = this._onHoveredBound;\n\t\tif (onHoveredBound != null) {\n\t\t\tconst cell = this._cell;\n\t\t\tcell.state.remove(DTableState.HOVERED_ON_EDGE);\n\t\t\tcell.off(UtilPointerEvent.move, onHoveredBound);\n\t\t}\n\t}\n\n\tprotected onHovered(e: InteractionEvent): void {\n\t\tconst cell = this._cell;\n\t\tconst width = cell.width;\n\t\tconst x = this.toX(e);\n\t\tconst size = this._size;\n\t\tlet onLeft = 0 <= x && x <= size;\n\t\tlet onRight = width - size <= x && x <= width;\n\t\tif (onLeft && onRight) {\n\t\t\tif (x <= width - x) {\n\t\t\t\tonRight = false;\n\t\t\t} else {\n\t\t\t\tonLeft = false;\n\t\t\t}\n\t\t}\n\t\tif (onLeft) {\n\t\t\tif (this.left != null) {\n\t\t\t\tcell.state.add(DTableState.HOVERED_ON_EDGE, DTableCellEdgeHovered.LEFT);\n\t\t\t} else {\n\t\t\t\tcell.state.remove(DTableState.HOVERED_ON_EDGE);\n\t\t\t}\n\t\t} else if (onRight) {\n\t\t\tif (this.right != null) {\n\t\t\t\tcell.state.add(DTableState.HOVERED_ON_EDGE, DTableCellEdgeHovered.RIGHT);\n\t\t\t} else {\n\t\t\t\tcell.state.remove(DTableState.HOVERED_ON_EDGE);\n\t\t\t}\n\t\t} else {\n\t\t\tcell.state.remove(DTableState.HOVERED_ON_EDGE);\n\t\t}\n\t}\n\n\tprotected toX(e: InteractionEvent): number {\n\t\tconst checkWork = (this._checkWork ??= new Point());\n\t\treturn this._cell.toLocal(e.data.global, undefined, checkWork, true).x;\n\t}\n\n\tprotected onDown0(\n\t\tonDownPoint: number,\n\t\tdata: DTableCellEdgeData0<CELL>,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tconst left = data[1];\n\t\tconst leftColumn = left.column;\n\t\tconst leftOldWidth = left.width;\n\t\tconst leftMinWidth = Math.max(this._minWidth, leftColumn.minWidth);\n\t\tconst onMove = (e: InteractionEvent): void => {\n\t\t\tleftColumn.width = Math.max(leftMinWidth, leftOldWidth + e.data.global.x - onDownPoint);\n\t\t};\n\t\tthis.newOnUp(onMove, interactionManager);\n\t}\n\n\tprotected onDown1(\n\t\tonDownPoint: number,\n\t\tdata: DTableCellEdgeData1<CELL>,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tconst minWidth = this._minWidth;\n\n\t\tconst left = data[1];\n\t\tconst leftColumn = left.column;\n\t\tconst leftOldWidth = left.width;\n\n\t\tconst right = data[2];\n\t\tconst rightColumn = right.column;\n\t\tconst rightOldWidth = right.width;\n\n\t\tconst totalWidth = leftOldWidth + rightOldWidth;\n\t\tif (leftColumn.weight == null) {\n\t\t\tconst leftMinWidth = Math.max(minWidth, leftColumn.minWidth);\n\t\t\tconst rightMinWidth = Math.max(minWidth, rightColumn.minWidth);\n\t\t\tconst leftMaxWidth = totalWidth - rightMinWidth;\n\t\t\tif (totalWidth <= 0 || leftMaxWidth <= leftMinWidth) {\n\t\t\t\t// The left and right resizable cells doesn't have enough width\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst onMove = (e: InteractionEvent): void => {\n\t\t\t\tconst leftNewWidth = Math.max(\n\t\t\t\t\tleftMinWidth,\n\t\t\t\t\tMath.min(leftMaxWidth, leftOldWidth + e.data.global.x - onDownPoint)\n\t\t\t\t);\n\t\t\t\tleftColumn.width = leftNewWidth;\n\t\t\t\trightColumn.width = totalWidth - leftNewWidth;\n\t\t\t};\n\t\t\tthis.newOnUp(onMove, interactionManager);\n\t\t} else {\n\t\t\tconst leftOldWeight = left.weight;\n\t\t\tconst rightOldWeight = right.weight;\n\t\t\tconst totalWeight = leftOldWeight + rightOldWeight;\n\t\t\tconst leftMinWeight = leftColumn.minWeight;\n\t\t\tconst rightMinWeight = rightColumn.minWeight;\n\t\t\tconst leftMaxWeight = totalWeight - rightMinWeight;\n\t\t\tconst leftMinWidth = minWidth;\n\t\t\tconst rightMinWidth = minWidth;\n\t\t\tconst leftMaxWidth = totalWidth - rightMinWidth;\n\t\t\tif (totalWidth <= 0 || leftMaxWidth <= leftMinWidth || leftMaxWeight <= leftMinWeight) {\n\t\t\t\t// The left and right resizable cells doesn't have enough width\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst onMove = (e: InteractionEvent): void => {\n\t\t\t\tconst leftNewWidth = Math.max(\n\t\t\t\t\tleftMinWidth,\n\t\t\t\t\tMath.min(leftMaxWidth, leftOldWidth + e.data.global.x - onDownPoint)\n\t\t\t\t);\n\t\t\t\tconst leftNewWeight = Math.max(\n\t\t\t\t\tleftMinWeight,\n\t\t\t\t\tMath.min(leftMaxWeight, totalWeight * (leftNewWidth / totalWidth))\n\t\t\t\t);\n\t\t\t\tleftColumn.weight = leftNewWeight;\n\t\t\t\trightColumn.weight = totalWeight - leftNewWeight;\n\t\t\t};\n\t\t\tthis.newOnUp(onMove, interactionManager);\n\t\t}\n\t}\n\n\tprotected onDown2(\n\t\tonDownPoint: number,\n\t\tdata: DTableCellEdgeData2<CELL>,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tif (data[3].length <= 1) {\n\t\t\tthis.onDown2a(onDownPoint, data, interactionManager);\n\t\t} else {\n\t\t\tthis.onDown2b(onDownPoint, data, interactionManager);\n\t\t}\n\t}\n\n\tprotected onDown2a(\n\t\tonDownPoint: number,\n\t\tdata: DTableCellEdgeData2<CELL>,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tconst minWidth = this._minWidth;\n\n\t\tconst left = data[1];\n\t\tconst leftColumn = left.column;\n\t\tconst leftOldWidth = left.width;\n\t\tconst leftMinWidth = Math.max(minWidth, leftColumn.minWidth);\n\n\t\tconst right = data[2];\n\t\tconst rightOldWidth = right.width;\n\t\tconst rightMinWidth = minWidth;\n\n\t\tconst totalWidth = leftOldWidth + rightOldWidth;\n\t\tconst leftMaxWidth = totalWidth - rightMinWidth;\n\t\tif (totalWidth <= 0 || leftMaxWidth <= leftMinWidth) {\n\t\t\t// The left and right resizable cells doesn't have enough width\n\t\t\treturn;\n\t\t}\n\t\tconst onMove = (e: InteractionEvent): void => {\n\t\t\tleftColumn.width = Math.max(\n\t\t\t\tleftMinWidth,\n\t\t\t\tMath.min(leftMaxWidth, leftOldWidth + e.data.global.x - onDownPoint)\n\t\t\t);\n\t\t};\n\t\tthis.newOnUp(onMove, interactionManager);\n\t}\n\n\tprotected onDown2b(\n\t\tonDownPoint: number,\n\t\tdata: DTableCellEdgeData2<CELL>,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tconst minWidth = this._minWidth;\n\n\t\tconst left = data[1];\n\t\tconst leftColumn = left.column;\n\t\tconst leftOldWidth = left.width;\n\t\tconst leftMinWidth = Math.max(minWidth, leftColumn.minWidth);\n\n\t\tconst right = data[2];\n\t\tconst rightColumn = right.column;\n\t\tconst rightOldWidth = right.width;\n\t\tconst rightMinWeight = rightColumn.minWeight;\n\n\t\tconst totalWidth = leftOldWidth + rightOldWidth;\n\n\t\tconst others = data[3];\n\t\tlet totalWeight = 0;\n\t\tlet totalSpace = 0;\n\t\tfor (let i = 0, imax = others.length; i < imax; ++i) {\n\t\t\tconst other = others[i];\n\t\t\ttotalWeight += other.weight;\n\t\t\ttotalSpace += other.width;\n\t\t}\n\t\tif (totalWeight <= 0 || totalSpace <= 0) {\n\t\t\tconst rightMinWidth = minWidth;\n\t\t\tconst leftMaxWidth = totalWidth - rightMinWidth;\n\t\t\tif (totalWidth <= 0 || leftMaxWidth <= leftMinWidth) {\n\t\t\t\t// The left and right resizable cells doesn't have enough width\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (totalWeight <= 0) {\n\t\t\t\ttotalWeight = 0;\n\t\t\t\tfor (let i = 0, imax = others.length; i < imax; ++i) {\n\t\t\t\t\tconst other = others[i];\n\t\t\t\t\tconst otherColumn = other.column;\n\t\t\t\t\tif (other !== right) {\n\t\t\t\t\t\tconst otherNewWeight = otherColumn.minWeight;\n\t\t\t\t\t\totherColumn.weight = otherNewWeight;\n\t\t\t\t\t\ttotalWeight += otherNewWeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst rightNewWeight = Math.max(1, rightMinWeight);\n\t\t\t\t\t\totherColumn.weight = rightNewWeight;\n\t\t\t\t\t\ttotalWeight += rightNewWeight;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst onMove = (e: InteractionEvent): void => {\n\t\t\t\tleftColumn.width = Math.max(\n\t\t\t\t\tleftMinWidth,\n\t\t\t\t\tMath.min(leftMaxWidth, leftOldWidth + e.data.global.x - onDownPoint)\n\t\t\t\t);\n\t\t\t};\n\t\t\tthis.newOnUp(onMove, interactionManager);\n\t\t} else {\n\t\t\tconst rightMinWidth = Math.max(minWidth, totalSpace * (rightMinWeight / totalWeight));\n\t\t\tconst leftMaxWidth = totalWidth - rightMinWidth;\n\t\t\tif (totalWidth <= 0 || leftMaxWidth <= leftMinWidth) {\n\t\t\t\t// The left and right resizable cells doesn't have enough width\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst onMove = (e: InteractionEvent): void => {\n\t\t\t\tconst leftNewWidth = Math.max(\n\t\t\t\t\tleftMinWidth,\n\t\t\t\t\tMath.min(leftMaxWidth, leftOldWidth + e.data.global.x - onDownPoint)\n\t\t\t\t);\n\t\t\t\tconst rightNewWidth = totalWidth - leftNewWidth;\n\t\t\t\tconst rightNewWeight = Math.max(\n\t\t\t\t\trightMinWeight,\n\t\t\t\t\ttotalWeight * (rightNewWidth / totalSpace)\n\t\t\t\t);\n\t\t\t\tleftColumn.width = leftNewWidth;\n\t\t\t\trightColumn.weight = rightNewWeight;\n\t\t\t};\n\t\t\tthis.newOnUp(onMove, interactionManager);\n\t\t}\n\t}\n\n\tprotected onDown3(\n\t\tonDownPoint: number,\n\t\tdata: DTableCellEdgeData3<CELL>,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tif (data[3].length <= 1) {\n\t\t\tthis.onDown3a(onDownPoint, data, interactionManager);\n\t\t} else {\n\t\t\tthis.onDown3b(onDownPoint, data, interactionManager);\n\t\t}\n\t}\n\n\tprotected onDown3a(\n\t\tonDownPoint: number,\n\t\tdata: DTableCellEdgeData3<CELL>,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tconst minWidth = this._minWidth;\n\n\t\tconst left = data[1];\n\t\tconst leftOldWidth = left.width;\n\t\tconst leftMinWidth = minWidth;\n\n\t\tconst right = data[2];\n\t\tconst rightColumn = right.column;\n\t\tconst rightOldWidth = right.width;\n\t\tconst rightMinWidth = Math.max(minWidth, rightColumn.minWidth);\n\n\t\tconst totalWidth = leftOldWidth + rightOldWidth;\n\t\tconst rightMaxWidth = totalWidth - leftMinWidth;\n\t\tif (totalWidth <= 0 || rightMaxWidth <= rightMinWidth) {\n\t\t\t// The left and right resizable cells doesn't have enough width\n\t\t\treturn;\n\t\t}\n\t\tconst onMove = (e: InteractionEvent): void => {\n\t\t\trightColumn.width = Math.max(\n\t\t\t\trightMinWidth,\n\t\t\t\tMath.min(rightMaxWidth, rightOldWidth + onDownPoint - e.data.global.x)\n\t\t\t);\n\t\t};\n\t\tthis.newOnUp(onMove, interactionManager);\n\t}\n\n\tprotected onDown3b(\n\t\tonDownPoint: number,\n\t\tdata: DTableCellEdgeData3<CELL>,\n\t\tinteractionManager: InteractionManager\n\t): void {\n\t\tconst minWidth = this._minWidth;\n\n\t\tconst left = data[1];\n\t\tconst leftColumn = left.column;\n\t\tconst leftOldWidth = left.width;\n\t\tconst leftMinWeight = leftColumn.minWeight;\n\n\t\tconst right = data[2];\n\t\tconst rightColumn = right.column;\n\t\tconst rightOldWidth = right.width;\n\t\tconst rightMinWidth = Math.max(minWidth, rightColumn.minWidth);\n\n\t\tconst totalWidth = leftOldWidth + rightOldWidth;\n\n\t\tconst others = data[3];\n\t\tlet totalWeight = 0;\n\t\tlet totalSpace = 0;\n\t\tfor (let i = 0, imax = others.length; i < imax; ++i) {\n\t\t\tconst other = others[i];\n\t\t\ttotalWeight += other.weight;\n\t\t\ttotalSpace += other.width;\n\t\t}\n\t\tif (totalWeight <= 0 || totalSpace <= 0) {\n\t\t\tconst leftMinWidth = minWidth;\n\t\t\tconst rightMaxWidth = totalWidth - leftMinWidth;\n\t\t\tif (totalWidth <= 0 || rightMaxWidth <= rightMinWidth) {\n\t\t\t\t// The left and right resizable cells doesn't have enough width\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (totalWeight <= 0) {\n\t\t\t\ttotalWeight = 0;\n\t\t\t\tfor (let i = 0, imax = others.length; i < imax; ++i) {\n\t\t\t\t\tconst other = others[i];\n\t\t\t\t\tconst otherColumn = other.column;\n\t\t\t\t\tif (other !== left) {\n\t\t\t\t\t\tconst otherNewWeight = otherColumn.minWeight;\n\t\t\t\t\t\totherColumn.weight = otherNewWeight;\n\t\t\t\t\t\ttotalWeight += otherNewWeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst leftNewWeight = Math.max(1, leftMinWeight);\n\t\t\t\t\t\totherColumn.weight = leftNewWeight;\n\t\t\t\t\t\ttotalWeight += leftNewWeight;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst onMove = (e: InteractionEvent): void => {\n\t\t\t\trightColumn.width = Math.max(\n\t\t\t\t\trightMinWidth,\n\t\t\t\t\tMath.min(rightMaxWidth, rightOldWidth + onDownPoint - e.data.global.x)\n\t\t\t\t);\n\t\t\t};\n\t\t\tthis.newOnUp(onMove, interactionManager);\n\t\t} else {\n\t\t\tconst leftMinWidth = Math.max(minWidth, totalSpace * (leftMinWeight / totalWeight));\n\t\t\tconst rightMaxWidth = totalWidth - leftMinWidth;\n\t\t\tif (totalWidth <= 0 || rightMaxWidth <= rightMinWidth) {\n\t\t\t\t// The left and right resizable cells doesn't have enough width\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst onMove = (e: InteractionEvent): void => {\n\t\t\t\tconst rightNewWidth = Math.max(\n\t\t\t\t\trightMinWidth,\n\t\t\t\t\tMath.min(rightMaxWidth, rightOldWidth + onDownPoint - e.data.global.x)\n\t\t\t\t);\n\t\t\t\tconst leftNewWidth = totalWidth - rightNewWidth;\n\t\t\t\tconst leftNewWeight = Math.max(\n\t\t\t\t\tleftMinWeight,\n\t\t\t\t\ttotalWeight * (leftNewWidth / totalSpace)\n\t\t\t\t);\n\t\t\t\trightColumn.width = rightNewWidth;\n\t\t\t\tleftColumn.weight = leftNewWeight;\n\t\t\t};\n\t\t\tthis.newOnUp(onMove, interactionManager);\n\t\t}\n\t}\n\n\tprotected newOnUp(\n\t\tonMove: (e: InteractionEvent) => void,\n\t\tinteractionManager: InteractionManager\n\t): () => void {\n\t\tconst row = this._row;\n\t\trow.state.add(DTableState.RESIZING);\n\t\tconst onUp = () => {\n\t\t\trow.state.remove(DTableState.RESIZING);\n\t\t\tinteractionManager.off(UtilPointerEvent.move, onMove);\n\t\t\tinteractionManager.off(UtilPointerEvent.up, onUp);\n\t\t\tinteractionManager.off(UtilPointerEvent.upoutside, onUp);\n\t\t\tinteractionManager.off(UtilPointerEvent.cancel, onUp);\n\t\t};\n\t\tinteractionManager.on(UtilPointerEvent.move, onMove);\n\t\tinteractionManager.on(UtilPointerEvent.up, onUp);\n\t\tinteractionManager.on(UtilPointerEvent.upoutside, onUp);\n\t\tinteractionManager.on(UtilPointerEvent.cancel, onUp);\n\t\treturn onUp;\n\t}\n\n\tisClicked(e?: InteractionEvent | KeyboardEvent | MouseEvent | TouchEvent): boolean {\n\t\treturn (\n\t\t\te instanceof InteractionEvent &&\n\t\t\t(this._cell.state.is(DTableState.HOVERED_ON_EDGE) || this._dragged)\n\t\t);\n\t}\n}\n"]}
@@ -321,7 +321,9 @@ var DTableColumnImpl = /** @class */ (function (_super) {
321
321
  var getter = toGetter(options, type, path);
322
322
  var setter = toSetter(options, type, path);
323
323
  _this._weight = weight;
324
+ _this.minWeight = 0;
324
325
  _this._width = width;
326
+ _this.minWidth = 0;
325
327
  _this.resizable = (_b = options.resizable) !== null && _b !== void 0 ? _b : false;
326
328
  _this.type = type;
327
329
  _this.label = label;