@vaadin/grid 25.3.0-alpha6 → 25.3.0-dev.1fa5a51482
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.
- package/custom-elements.json +173 -114
- package/package.json +12 -12
- package/src/directives/cell-content-directive.js +32 -0
- package/src/vaadin-grid-a11y-mixin.js +0 -9
- package/src/vaadin-grid-column-auto-width-mixin.js +1 -5
- package/src/vaadin-grid-column-group-mixin.js +3 -14
- package/src/vaadin-grid-column-mixin.js +26 -29
- package/src/vaadin-grid-column-reordering-mixin.js +9 -4
- package/src/vaadin-grid-dynamic-columns-mixin.js +0 -5
- package/src/vaadin-grid-filter.js +1 -0
- package/src/vaadin-grid-header-footer-rendering-mixin.js +265 -0
- package/src/vaadin-grid-mixin.js +20 -158
- package/src/vaadin-grid-sort-column-mixin.js +11 -2
- package/src/vaadin-grid-sorter.js +1 -0
- package/src/vaadin-grid-tree-toggle.js +1 -0
- package/src/vaadin-grid.js +1 -0
- package/web-types.json +8 -82
- package/web-types.lit.json +4 -4
package/custom-elements.json
CHANGED
|
@@ -3350,30 +3350,6 @@
|
|
|
3350
3350
|
"name": "value-changed"
|
|
3351
3351
|
}
|
|
3352
3352
|
],
|
|
3353
|
-
"mixins": [
|
|
3354
|
-
{
|
|
3355
|
-
"name": "GridFilterElementMixin",
|
|
3356
|
-
"module": "src/vaadin-grid-filter-element-mixin.js"
|
|
3357
|
-
},
|
|
3358
|
-
{
|
|
3359
|
-
"name": "ThemableMixin",
|
|
3360
|
-
"package": "@vaadin/vaadin-themable-mixin"
|
|
3361
|
-
},
|
|
3362
|
-
{
|
|
3363
|
-
"name": "PolylitMixin",
|
|
3364
|
-
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
3365
|
-
},
|
|
3366
|
-
{
|
|
3367
|
-
"name": "LumoInjectionMixin",
|
|
3368
|
-
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
3369
|
-
}
|
|
3370
|
-
],
|
|
3371
|
-
"superclass": {
|
|
3372
|
-
"name": "LitElement",
|
|
3373
|
-
"package": "lit"
|
|
3374
|
-
},
|
|
3375
|
-
"tagName": "vaadin-grid-filter",
|
|
3376
|
-
"customElement": true,
|
|
3377
3353
|
"attributes": [
|
|
3378
3354
|
{
|
|
3379
3355
|
"name": "path",
|
|
@@ -3387,6 +3363,13 @@
|
|
|
3387
3363
|
"module": "src/vaadin-grid-filter-element-mixin.js"
|
|
3388
3364
|
}
|
|
3389
3365
|
},
|
|
3366
|
+
{
|
|
3367
|
+
"type": {
|
|
3368
|
+
"text": "string"
|
|
3369
|
+
},
|
|
3370
|
+
"description": "The theme variants to apply to the component.",
|
|
3371
|
+
"name": "theme"
|
|
3372
|
+
},
|
|
3390
3373
|
{
|
|
3391
3374
|
"name": "value",
|
|
3392
3375
|
"type": {
|
|
@@ -3399,7 +3382,31 @@
|
|
|
3399
3382
|
"module": "src/vaadin-grid-filter-element-mixin.js"
|
|
3400
3383
|
}
|
|
3401
3384
|
}
|
|
3402
|
-
]
|
|
3385
|
+
],
|
|
3386
|
+
"mixins": [
|
|
3387
|
+
{
|
|
3388
|
+
"name": "GridFilterElementMixin",
|
|
3389
|
+
"module": "src/vaadin-grid-filter-element-mixin.js"
|
|
3390
|
+
},
|
|
3391
|
+
{
|
|
3392
|
+
"name": "ThemableMixin",
|
|
3393
|
+
"package": "@vaadin/vaadin-themable-mixin"
|
|
3394
|
+
},
|
|
3395
|
+
{
|
|
3396
|
+
"name": "PolylitMixin",
|
|
3397
|
+
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
3398
|
+
},
|
|
3399
|
+
{
|
|
3400
|
+
"name": "LumoInjectionMixin",
|
|
3401
|
+
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
3402
|
+
}
|
|
3403
|
+
],
|
|
3404
|
+
"superclass": {
|
|
3405
|
+
"name": "LitElement",
|
|
3406
|
+
"package": "lit"
|
|
3407
|
+
},
|
|
3408
|
+
"tagName": "vaadin-grid-filter",
|
|
3409
|
+
"customElement": true
|
|
3403
3410
|
}
|
|
3404
3411
|
],
|
|
3405
3412
|
"exports": [
|
|
@@ -3413,6 +3420,33 @@
|
|
|
3413
3420
|
}
|
|
3414
3421
|
]
|
|
3415
3422
|
},
|
|
3423
|
+
{
|
|
3424
|
+
"kind": "javascript-module",
|
|
3425
|
+
"path": "src/vaadin-grid-header-footer-rendering-mixin.js",
|
|
3426
|
+
"declarations": [
|
|
3427
|
+
{
|
|
3428
|
+
"kind": "mixin",
|
|
3429
|
+
"description": "A mixin providing rendering of header and footer rows based on the column tree.",
|
|
3430
|
+
"name": "HeaderFooterRenderingMixin",
|
|
3431
|
+
"members": [],
|
|
3432
|
+
"parameters": [
|
|
3433
|
+
{
|
|
3434
|
+
"name": "superClass"
|
|
3435
|
+
}
|
|
3436
|
+
]
|
|
3437
|
+
}
|
|
3438
|
+
],
|
|
3439
|
+
"exports": [
|
|
3440
|
+
{
|
|
3441
|
+
"kind": "js",
|
|
3442
|
+
"name": "HeaderFooterRenderingMixin",
|
|
3443
|
+
"declaration": {
|
|
3444
|
+
"name": "HeaderFooterRenderingMixin",
|
|
3445
|
+
"module": "src/vaadin-grid-header-footer-rendering-mixin.js"
|
|
3446
|
+
}
|
|
3447
|
+
}
|
|
3448
|
+
]
|
|
3449
|
+
},
|
|
3416
3450
|
{
|
|
3417
3451
|
"kind": "javascript-module",
|
|
3418
3452
|
"path": "src/vaadin-grid-helpers.js",
|
|
@@ -4739,6 +4773,10 @@
|
|
|
4739
4773
|
"name": "DynamicColumnsMixin",
|
|
4740
4774
|
"module": "src/vaadin-grid-dynamic-columns-mixin.js"
|
|
4741
4775
|
},
|
|
4776
|
+
{
|
|
4777
|
+
"name": "HeaderFooterRenderingMixin",
|
|
4778
|
+
"module": "src/vaadin-grid-header-footer-rendering-mixin.js"
|
|
4779
|
+
},
|
|
4742
4780
|
{
|
|
4743
4781
|
"name": "ActiveItemMixin",
|
|
4744
4782
|
"module": "src/vaadin-grid-active-item-mixin.js"
|
|
@@ -6768,6 +6806,39 @@
|
|
|
6768
6806
|
}
|
|
6769
6807
|
}
|
|
6770
6808
|
],
|
|
6809
|
+
"attributes": [
|
|
6810
|
+
{
|
|
6811
|
+
"name": "direction",
|
|
6812
|
+
"type": {
|
|
6813
|
+
"text": "string"
|
|
6814
|
+
},
|
|
6815
|
+
"description": "How to sort the data.\nPossible values are `asc` to use an ascending algorithm, `desc` to sort the data in\ndescending direction, or `null` for not sorting the data.",
|
|
6816
|
+
"fieldName": "direction",
|
|
6817
|
+
"inheritedFrom": {
|
|
6818
|
+
"name": "GridSorterMixin",
|
|
6819
|
+
"module": "src/vaadin-grid-sorter-mixin.js"
|
|
6820
|
+
}
|
|
6821
|
+
},
|
|
6822
|
+
{
|
|
6823
|
+
"name": "path",
|
|
6824
|
+
"type": {
|
|
6825
|
+
"text": "string"
|
|
6826
|
+
},
|
|
6827
|
+
"description": "JS Path of the property in the item used for sorting the data.",
|
|
6828
|
+
"fieldName": "path",
|
|
6829
|
+
"inheritedFrom": {
|
|
6830
|
+
"name": "GridSorterMixin",
|
|
6831
|
+
"module": "src/vaadin-grid-sorter-mixin.js"
|
|
6832
|
+
}
|
|
6833
|
+
},
|
|
6834
|
+
{
|
|
6835
|
+
"type": {
|
|
6836
|
+
"text": "string"
|
|
6837
|
+
},
|
|
6838
|
+
"description": "The theme variants to apply to the component.",
|
|
6839
|
+
"name": "theme"
|
|
6840
|
+
}
|
|
6841
|
+
],
|
|
6771
6842
|
"mixins": [
|
|
6772
6843
|
{
|
|
6773
6844
|
"name": "GridSorterMixin",
|
|
@@ -6795,33 +6866,7 @@
|
|
|
6795
6866
|
"package": "lit"
|
|
6796
6867
|
},
|
|
6797
6868
|
"tagName": "vaadin-grid-sorter",
|
|
6798
|
-
"customElement": true
|
|
6799
|
-
"attributes": [
|
|
6800
|
-
{
|
|
6801
|
-
"name": "direction",
|
|
6802
|
-
"type": {
|
|
6803
|
-
"text": "string"
|
|
6804
|
-
},
|
|
6805
|
-
"description": "How to sort the data.\nPossible values are `asc` to use an ascending algorithm, `desc` to sort the data in\ndescending direction, or `null` for not sorting the data.",
|
|
6806
|
-
"fieldName": "direction",
|
|
6807
|
-
"inheritedFrom": {
|
|
6808
|
-
"name": "GridSorterMixin",
|
|
6809
|
-
"module": "src/vaadin-grid-sorter-mixin.js"
|
|
6810
|
-
}
|
|
6811
|
-
},
|
|
6812
|
-
{
|
|
6813
|
-
"name": "path",
|
|
6814
|
-
"type": {
|
|
6815
|
-
"text": "string"
|
|
6816
|
-
},
|
|
6817
|
-
"description": "JS Path of the property in the item used for sorting the data.",
|
|
6818
|
-
"fieldName": "path",
|
|
6819
|
-
"inheritedFrom": {
|
|
6820
|
-
"name": "GridSorterMixin",
|
|
6821
|
-
"module": "src/vaadin-grid-sorter-mixin.js"
|
|
6822
|
-
}
|
|
6823
|
-
}
|
|
6824
|
-
]
|
|
6869
|
+
"customElement": true
|
|
6825
6870
|
}
|
|
6826
6871
|
],
|
|
6827
6872
|
"exports": [
|
|
@@ -7537,34 +7582,6 @@
|
|
|
7537
7582
|
"name": "expanded-changed"
|
|
7538
7583
|
}
|
|
7539
7584
|
],
|
|
7540
|
-
"mixins": [
|
|
7541
|
-
{
|
|
7542
|
-
"name": "GridTreeToggleMixin",
|
|
7543
|
-
"module": "src/vaadin-grid-tree-toggle-mixin.js"
|
|
7544
|
-
},
|
|
7545
|
-
{
|
|
7546
|
-
"name": "ThemableMixin",
|
|
7547
|
-
"package": "@vaadin/vaadin-themable-mixin"
|
|
7548
|
-
},
|
|
7549
|
-
{
|
|
7550
|
-
"name": "DirMixin",
|
|
7551
|
-
"package": "@vaadin/component-base/src/dir-mixin.js"
|
|
7552
|
-
},
|
|
7553
|
-
{
|
|
7554
|
-
"name": "PolylitMixin",
|
|
7555
|
-
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
7556
|
-
},
|
|
7557
|
-
{
|
|
7558
|
-
"name": "LumoInjectionMixin",
|
|
7559
|
-
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
7560
|
-
}
|
|
7561
|
-
],
|
|
7562
|
-
"superclass": {
|
|
7563
|
-
"name": "LitElement",
|
|
7564
|
-
"package": "lit"
|
|
7565
|
-
},
|
|
7566
|
-
"tagName": "vaadin-grid-tree-toggle",
|
|
7567
|
-
"customElement": true,
|
|
7568
7585
|
"attributes": [
|
|
7569
7586
|
{
|
|
7570
7587
|
"name": "expanded",
|
|
@@ -7601,8 +7618,43 @@
|
|
|
7601
7618
|
"name": "GridTreeToggleMixin",
|
|
7602
7619
|
"module": "src/vaadin-grid-tree-toggle-mixin.js"
|
|
7603
7620
|
}
|
|
7621
|
+
},
|
|
7622
|
+
{
|
|
7623
|
+
"type": {
|
|
7624
|
+
"text": "string"
|
|
7625
|
+
},
|
|
7626
|
+
"description": "The theme variants to apply to the component.",
|
|
7627
|
+
"name": "theme"
|
|
7604
7628
|
}
|
|
7605
|
-
]
|
|
7629
|
+
],
|
|
7630
|
+
"mixins": [
|
|
7631
|
+
{
|
|
7632
|
+
"name": "GridTreeToggleMixin",
|
|
7633
|
+
"module": "src/vaadin-grid-tree-toggle-mixin.js"
|
|
7634
|
+
},
|
|
7635
|
+
{
|
|
7636
|
+
"name": "ThemableMixin",
|
|
7637
|
+
"package": "@vaadin/vaadin-themable-mixin"
|
|
7638
|
+
},
|
|
7639
|
+
{
|
|
7640
|
+
"name": "DirMixin",
|
|
7641
|
+
"package": "@vaadin/component-base/src/dir-mixin.js"
|
|
7642
|
+
},
|
|
7643
|
+
{
|
|
7644
|
+
"name": "PolylitMixin",
|
|
7645
|
+
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
7646
|
+
},
|
|
7647
|
+
{
|
|
7648
|
+
"name": "LumoInjectionMixin",
|
|
7649
|
+
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
7650
|
+
}
|
|
7651
|
+
],
|
|
7652
|
+
"superclass": {
|
|
7653
|
+
"name": "LitElement",
|
|
7654
|
+
"package": "lit"
|
|
7655
|
+
},
|
|
7656
|
+
"tagName": "vaadin-grid-tree-toggle",
|
|
7657
|
+
"customElement": true
|
|
7606
7658
|
}
|
|
7607
7659
|
],
|
|
7608
7660
|
"exports": [
|
|
@@ -8369,38 +8421,6 @@
|
|
|
8369
8421
|
"name": "size-changed"
|
|
8370
8422
|
}
|
|
8371
8423
|
],
|
|
8372
|
-
"mixins": [
|
|
8373
|
-
{
|
|
8374
|
-
"name": "GridMixin",
|
|
8375
|
-
"module": "src/vaadin-grid-mixin.js"
|
|
8376
|
-
},
|
|
8377
|
-
{
|
|
8378
|
-
"name": "I18nMixin",
|
|
8379
|
-
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
8380
|
-
},
|
|
8381
|
-
{
|
|
8382
|
-
"name": "ElementMixin",
|
|
8383
|
-
"package": "@vaadin/component-base/src/element-mixin.js"
|
|
8384
|
-
},
|
|
8385
|
-
{
|
|
8386
|
-
"name": "ThemableMixin",
|
|
8387
|
-
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
8388
|
-
},
|
|
8389
|
-
{
|
|
8390
|
-
"name": "PolylitMixin",
|
|
8391
|
-
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
8392
|
-
},
|
|
8393
|
-
{
|
|
8394
|
-
"name": "LumoInjectionMixin",
|
|
8395
|
-
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
8396
|
-
}
|
|
8397
|
-
],
|
|
8398
|
-
"superclass": {
|
|
8399
|
-
"name": "LitElement",
|
|
8400
|
-
"package": "lit"
|
|
8401
|
-
},
|
|
8402
|
-
"tagName": "vaadin-grid",
|
|
8403
|
-
"customElement": true,
|
|
8404
8424
|
"attributes": [
|
|
8405
8425
|
{
|
|
8406
8426
|
"name": "accessible-name",
|
|
@@ -8677,8 +8697,47 @@
|
|
|
8677
8697
|
"name": "DataProviderMixin",
|
|
8678
8698
|
"module": "src/vaadin-grid-data-provider-mixin.js"
|
|
8679
8699
|
}
|
|
8700
|
+
},
|
|
8701
|
+
{
|
|
8702
|
+
"type": {
|
|
8703
|
+
"text": "string"
|
|
8704
|
+
},
|
|
8705
|
+
"description": "The theme variants to apply to the component.",
|
|
8706
|
+
"name": "theme"
|
|
8680
8707
|
}
|
|
8681
|
-
]
|
|
8708
|
+
],
|
|
8709
|
+
"mixins": [
|
|
8710
|
+
{
|
|
8711
|
+
"name": "GridMixin",
|
|
8712
|
+
"module": "src/vaadin-grid-mixin.js"
|
|
8713
|
+
},
|
|
8714
|
+
{
|
|
8715
|
+
"name": "I18nMixin",
|
|
8716
|
+
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
8717
|
+
},
|
|
8718
|
+
{
|
|
8719
|
+
"name": "ElementMixin",
|
|
8720
|
+
"package": "@vaadin/component-base/src/element-mixin.js"
|
|
8721
|
+
},
|
|
8722
|
+
{
|
|
8723
|
+
"name": "ThemableMixin",
|
|
8724
|
+
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
8725
|
+
},
|
|
8726
|
+
{
|
|
8727
|
+
"name": "PolylitMixin",
|
|
8728
|
+
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
8729
|
+
},
|
|
8730
|
+
{
|
|
8731
|
+
"name": "LumoInjectionMixin",
|
|
8732
|
+
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
8733
|
+
}
|
|
8734
|
+
],
|
|
8735
|
+
"superclass": {
|
|
8736
|
+
"name": "LitElement",
|
|
8737
|
+
"package": "lit"
|
|
8738
|
+
},
|
|
8739
|
+
"tagName": "vaadin-grid",
|
|
8740
|
+
"customElement": true
|
|
8682
8741
|
}
|
|
8683
8742
|
],
|
|
8684
8743
|
"exports": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/grid",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-dev.1fa5a51482",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
48
|
-
"@vaadin/a11y-base": "25.3.0-
|
|
49
|
-
"@vaadin/checkbox": "25.3.0-
|
|
50
|
-
"@vaadin/component-base": "25.3.0-
|
|
51
|
-
"@vaadin/lit-renderer": "25.3.0-
|
|
52
|
-
"@vaadin/text-field": "25.3.0-
|
|
53
|
-
"@vaadin/vaadin-themable-mixin": "25.3.0-
|
|
48
|
+
"@vaadin/a11y-base": "25.3.0-dev.1fa5a51482",
|
|
49
|
+
"@vaadin/checkbox": "25.3.0-dev.1fa5a51482",
|
|
50
|
+
"@vaadin/component-base": "25.3.0-dev.1fa5a51482",
|
|
51
|
+
"@vaadin/lit-renderer": "25.3.0-dev.1fa5a51482",
|
|
52
|
+
"@vaadin/text-field": "25.3.0-dev.1fa5a51482",
|
|
53
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-dev.1fa5a51482",
|
|
54
54
|
"lit": "^3.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@vaadin/aura": "25.3.0-
|
|
58
|
-
"@vaadin/chai-plugins": "25.3.0-
|
|
59
|
-
"@vaadin/test-runner-commands": "25.3.0-
|
|
57
|
+
"@vaadin/aura": "25.3.0-dev.1fa5a51482",
|
|
58
|
+
"@vaadin/chai-plugins": "25.3.0-dev.1fa5a51482",
|
|
59
|
+
"@vaadin/test-runner-commands": "25.3.0-dev.1fa5a51482",
|
|
60
60
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
61
|
-
"@vaadin/vaadin-lumo-styles": "25.3.0-
|
|
61
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-dev.1fa5a51482",
|
|
62
62
|
"sinon": "^22.0.0"
|
|
63
63
|
},
|
|
64
64
|
"customElements": "custom-elements.json",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"web-types.json",
|
|
67
67
|
"web-types.lit.json"
|
|
68
68
|
],
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "1cd5964b758ffbce3ddb6248a1997f55f8e0ebf6"
|
|
70
70
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2016 - 2026 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import { html } from 'lit';
|
|
7
|
+
import { AsyncDirective, directive } from 'lit/async-directive.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A directive that manages the `<vaadin-grid-cell-content>` element for a cell.
|
|
11
|
+
*/
|
|
12
|
+
class CellContentDirective extends AsyncDirective {
|
|
13
|
+
#cell;
|
|
14
|
+
|
|
15
|
+
update(part, [grid, slotName]) {
|
|
16
|
+
this.#cell = part.parentNode;
|
|
17
|
+
this.#cell._content ??= document.createElement('vaadin-grid-cell-content');
|
|
18
|
+
this.#cell._content.slot = slotName;
|
|
19
|
+
|
|
20
|
+
if (!grid.contains(this.#cell._content)) {
|
|
21
|
+
grid.appendChild(this.#cell._content);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return html`<slot name="${slotName}"></slot>`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
disconnected() {
|
|
28
|
+
this.#cell._content?.remove();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const cellContent = directive(CellContentDirective);
|
|
@@ -153,15 +153,6 @@ export const A11yMixin = (superClass) =>
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
/**
|
|
157
|
-
* @param {!HTMLElement} cell
|
|
158
|
-
* @param {number} colspan
|
|
159
|
-
* @private
|
|
160
|
-
*/
|
|
161
|
-
__a11yUpdateCellColspan(cell, colspan) {
|
|
162
|
-
cell.setAttribute('aria-colspan', Number(colspan));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
156
|
/** @private */
|
|
166
157
|
__a11yUpdateSorters() {
|
|
167
158
|
Array.from(this.querySelectorAll('vaadin-grid-sorter')).forEach((sorter) => {
|
|
@@ -137,11 +137,7 @@ export const ColumnAutoWidthMixin = (superClass) =>
|
|
|
137
137
|
_recalculateColumnWidths() {
|
|
138
138
|
// Flush to make sure DOM is up-to-date when measuring the column widths
|
|
139
139
|
this.__virtualizer.flush();
|
|
140
|
-
|
|
141
|
-
if (row.__debounceUpdateHeaderFooterRowVisibility) {
|
|
142
|
-
row.__debounceUpdateHeaderFooterRowVisibility.flush();
|
|
143
|
-
}
|
|
144
|
-
});
|
|
140
|
+
this.__renderHeaderFooterDebouncer?.flush();
|
|
145
141
|
|
|
146
142
|
this.__hasHadRenderedRowsForColumnWidthCalculation ||= this._getRenderedRows().length > 0;
|
|
147
143
|
|
|
@@ -57,7 +57,7 @@ export const GridColumnGroupMixin = (superClass) =>
|
|
|
57
57
|
'_groupFrozenChanged(frozen, _rootColumns)',
|
|
58
58
|
'_groupFrozenToEndChanged(frozenToEnd, _rootColumns)',
|
|
59
59
|
'_groupHiddenChanged(hidden)',
|
|
60
|
-
'_colSpanChanged(_colSpan
|
|
60
|
+
'_colSpanChanged(_colSpan)',
|
|
61
61
|
'_groupOrderChanged(_order, _rootColumns)',
|
|
62
62
|
'_groupReorderStatusChanged(_reorderStatus, _rootColumns)',
|
|
63
63
|
'_groupResizableChanged(resizable, _rootColumns)',
|
|
@@ -307,19 +307,8 @@ export const GridColumnGroupMixin = (superClass) =>
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
/** @private */
|
|
310
|
-
_colSpanChanged(
|
|
311
|
-
|
|
312
|
-
headerCell.setAttribute('colspan', colSpan);
|
|
313
|
-
if (this._grid) {
|
|
314
|
-
this._grid.__a11yUpdateCellColspan(headerCell, colSpan);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
if (footerCell) {
|
|
318
|
-
footerCell.setAttribute('colspan', colSpan);
|
|
319
|
-
if (this._grid) {
|
|
320
|
-
this._grid.__a11yUpdateCellColspan(footerCell, colSpan);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
310
|
+
_colSpanChanged() {
|
|
311
|
+
this._grid?.__scheduleRenderHeaderFooter?.();
|
|
323
312
|
}
|
|
324
313
|
|
|
325
314
|
/**
|
|
@@ -7,7 +7,8 @@ import { animationFrame } from '@vaadin/component-base/src/async.js';
|
|
|
7
7
|
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
8
8
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
9
9
|
import { get } from '@vaadin/component-base/src/path-utils.js';
|
|
10
|
-
import {
|
|
10
|
+
import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
|
|
11
|
+
import { updateCellState } from './vaadin-grid-helpers.js';
|
|
11
12
|
|
|
12
13
|
export const ColumnBaseMixin = (superClass) =>
|
|
13
14
|
class ColumnBaseMixin extends superClass {
|
|
@@ -270,7 +271,7 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
270
271
|
'_onRendererOrBindingChanged(_renderer, _cells, _bodyContentHidden, path)',
|
|
271
272
|
'_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header)',
|
|
272
273
|
'_onFooterRendererOrBindingChanged(_footerRenderer, _footerCell)',
|
|
273
|
-
'_resizableChanged(resizable
|
|
274
|
+
'_resizableChanged(resizable)',
|
|
274
275
|
'_reorderStatusChanged(_reorderStatus, _headerCell, _footerCell, _cells)',
|
|
275
276
|
'_hiddenChanged(hidden, _headerCell, _footerCell, _cells)',
|
|
276
277
|
'_rowHeaderChanged(rowHeader, _cells)',
|
|
@@ -302,6 +303,19 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
302
303
|
.filter((cell) => cell);
|
|
303
304
|
}
|
|
304
305
|
|
|
306
|
+
constructor() {
|
|
307
|
+
super();
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* A stable unique id assigned once per column instance. Used to build
|
|
311
|
+
* cell content slot names that stay stable across re-renders, so lit
|
|
312
|
+
* can reuse the cell content elements when the column tree changes.
|
|
313
|
+
*
|
|
314
|
+
* @protected
|
|
315
|
+
*/
|
|
316
|
+
this._id = generateUniqueId();
|
|
317
|
+
}
|
|
318
|
+
|
|
305
319
|
/** @protected */
|
|
306
320
|
connectedCallback() {
|
|
307
321
|
super.connectedCallback();
|
|
@@ -313,7 +327,7 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
313
327
|
return;
|
|
314
328
|
}
|
|
315
329
|
|
|
316
|
-
this.
|
|
330
|
+
this._cells?.forEach((cell) => {
|
|
317
331
|
if (!cell._content.parentNode) {
|
|
318
332
|
this._grid.appendChild(cell._content);
|
|
319
333
|
}
|
|
@@ -332,7 +346,7 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
332
346
|
return;
|
|
333
347
|
}
|
|
334
348
|
|
|
335
|
-
this.
|
|
349
|
+
this._cells?.forEach((cell) => {
|
|
336
350
|
if (cell._content.parentNode) {
|
|
337
351
|
cell._content.parentNode.removeChild(cell._content);
|
|
338
352
|
}
|
|
@@ -485,27 +499,12 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
485
499
|
}
|
|
486
500
|
|
|
487
501
|
/** @private */
|
|
488
|
-
_resizableChanged(resizable
|
|
489
|
-
if (resizable === undefined ||
|
|
502
|
+
_resizableChanged(resizable) {
|
|
503
|
+
if (resizable === undefined || this._grid === undefined) {
|
|
490
504
|
return;
|
|
491
505
|
}
|
|
492
506
|
|
|
493
|
-
|
|
494
|
-
[headerCell].concat(this._emptyCells).forEach((cell) => {
|
|
495
|
-
if (cell) {
|
|
496
|
-
const existingHandle = cell.querySelector('[part~="resize-handle"]');
|
|
497
|
-
if (existingHandle) {
|
|
498
|
-
cell.removeChild(existingHandle);
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
if (resizable) {
|
|
502
|
-
const handle = document.createElement('div');
|
|
503
|
-
updatePart(handle, 'resize-handle', true);
|
|
504
|
-
cell.appendChild(handle);
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
});
|
|
508
|
-
}
|
|
507
|
+
this._grid.__scheduleRenderHeaderFooter?.();
|
|
509
508
|
}
|
|
510
509
|
|
|
511
510
|
/** @private */
|
|
@@ -531,7 +530,7 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
531
530
|
|
|
532
531
|
if (!!hidden !== !!this._previousHidden && this._grid) {
|
|
533
532
|
if (hidden === true) {
|
|
534
|
-
this.
|
|
533
|
+
this._cells?.forEach((cell) => {
|
|
535
534
|
if (cell._content.parentNode) {
|
|
536
535
|
cell._content.parentNode.removeChild(cell._content);
|
|
537
536
|
}
|
|
@@ -632,9 +631,8 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
632
631
|
}
|
|
633
632
|
|
|
634
633
|
this.__renderCellsContent(headerRenderer, [headerCell]);
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
}
|
|
634
|
+
|
|
635
|
+
this._grid?.__scheduleRenderHeaderFooter();
|
|
638
636
|
}
|
|
639
637
|
|
|
640
638
|
/** @protected */
|
|
@@ -689,9 +687,8 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
689
687
|
}
|
|
690
688
|
|
|
691
689
|
this.__renderCellsContent(footerRenderer, [footerCell]);
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
}
|
|
690
|
+
|
|
691
|
+
this._grid?.__scheduleRenderHeaderFooter();
|
|
695
692
|
}
|
|
696
693
|
|
|
697
694
|
/** @protected */
|
|
@@ -203,6 +203,8 @@ export const ColumnReorderingMixin = (superClass) =>
|
|
|
203
203
|
for (let i = startIndex; i !== endIndex; i += direction) {
|
|
204
204
|
this._swapColumnOrders(this._draggedColumn, levelColumnsInOrder[i + direction]);
|
|
205
205
|
}
|
|
206
|
+
|
|
207
|
+
this.__renderHeaderFooter();
|
|
206
208
|
}
|
|
207
209
|
|
|
208
210
|
this._updateGhostPosition(e.detail.x, this._touchDevice ? e.detail.y - 50 : e.detail.y);
|
|
@@ -434,7 +436,7 @@ export const ColumnReorderingMixin = (superClass) =>
|
|
|
434
436
|
}
|
|
435
437
|
|
|
436
438
|
/**
|
|
437
|
-
* Swaps column orders and
|
|
439
|
+
* Swaps column orders and reorders cells in all rows.
|
|
438
440
|
* @param {!GridColumn} column1
|
|
439
441
|
* @param {!GridColumn} column2
|
|
440
442
|
* @protected
|
|
@@ -444,8 +446,7 @@ export const ColumnReorderingMixin = (superClass) =>
|
|
|
444
446
|
[column1._order, column2._order] = [column2._order, column1._order];
|
|
445
447
|
const [firstColumn, secondColumn] = column1._order < column2._order ? [column1, column2] : [column2, column1];
|
|
446
448
|
|
|
447
|
-
|
|
448
|
-
[...this.$.header.children, ...this.$.footer.children, ...this.$.items.children, this.$.sizer].forEach((row) => {
|
|
449
|
+
[...this.$.items.children, this.$.sizer].forEach((row) => {
|
|
449
450
|
const cells = getBodyRowCells(row);
|
|
450
451
|
const firstColumnCells = cells.filter((cell) => firstColumn.contains(cell._column));
|
|
451
452
|
const secondColumnFirstCell = cells.find((cell) => secondColumn.contains(cell._column));
|
|
@@ -456,8 +457,12 @@ export const ColumnReorderingMixin = (superClass) =>
|
|
|
456
457
|
}
|
|
457
458
|
});
|
|
458
459
|
|
|
460
|
+
[...this.$.items.children, this.$.sizer].forEach((row) => {
|
|
461
|
+
this._updateFirstAndLastColumnForRow(row);
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
this.__scheduleRenderHeaderFooter();
|
|
459
465
|
this._debounceUpdateFrozenColumn();
|
|
460
|
-
this._updateFirstAndLastColumn();
|
|
461
466
|
}
|
|
462
467
|
|
|
463
468
|
/**
|
|
@@ -143,11 +143,6 @@ export const DynamicColumnsMixin = (superClass) =>
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
/** @protected */
|
|
147
|
-
_updateFirstAndLastColumn() {
|
|
148
|
-
Array.from(this.shadowRoot.querySelectorAll('tr')).forEach((row) => this._updateFirstAndLastColumnForRow(row));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
146
|
/**
|
|
152
147
|
* @param {!HTMLElement} row
|
|
153
148
|
* @protected
|
|
@@ -37,6 +37,7 @@ import { GridFilterElementMixin } from './vaadin-grid-filter-element-mixin.js';
|
|
|
37
37
|
*
|
|
38
38
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
39
39
|
*
|
|
40
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
40
41
|
* @customElement vaadin-grid-filter
|
|
41
42
|
* @extends HTMLElement
|
|
42
43
|
*/
|