@brightspace-ui/core 2.186.3 → 2.186.4

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.
@@ -46,12 +46,7 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
46
46
  * Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.
47
47
  * @type {boolean}
48
48
  */
49
- selectionSingle: { type: Boolean, attribute: 'selection-single' },
50
- /**
51
- * ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.
52
- * @type {number}
53
- */
54
- selectionCountOverride: { type: Number, attribute: 'selection-count-override' }
49
+ selectionSingle: { type: Boolean, attribute: 'selection-single' }
55
50
  };
56
51
  }
57
52
 
@@ -55,38 +55,31 @@ class Summary extends LocalizeCoreElement(SelectionObserverMixin(LitElement)) {
55
55
  return;
56
56
  }
57
57
 
58
- let count;
59
- if (this._provider && this._provider.selectionCountOverride !== undefined) {
60
- count = this._provider.selectionCountOverride;
61
- this._summary = this._provider.selectionCountOverride === 0 && this.noSelectionText ?
62
- this.noSelectionText : this.localize('components.selection.selected', 'count', count);
63
- } else {
64
- /* If lazy loading items is supported (ex. d2l-list) then check the keys to determine if the plus sign should be included.
65
- * If lazy loading is not supported (ex. d2l-table-wrapper), then skip this.
66
- */
67
- let includePlus = false;
68
- if (this._provider && this._provider._getLazyLoadItems) {
69
- const lazyLoadListItems = this._provider._getLazyLoadItems();
70
- if (lazyLoadListItems.size > 0) {
71
- for (const selectedItemKey of this.selectionInfo.keys) {
72
- if (lazyLoadListItems.has(selectedItemKey)) {
73
- includePlus = true;
74
- break;
75
- }
58
+ /* If lazy loading items is supported (ex. d2l-list) then check the keys to determine if the plus sign should be included.
59
+ * If lazy loading is not supported (ex. d2l-table-wrapper), then skip this.
60
+ */
61
+ let includePlus = false;
62
+ if (this._provider && this._provider._getLazyLoadItems) {
63
+ const lazyLoadListItems = this._provider._getLazyLoadItems();
64
+ if (lazyLoadListItems.size > 0) {
65
+ for (const selectedItemKey of this.selectionInfo.keys) {
66
+ if (lazyLoadListItems.has(selectedItemKey)) {
67
+ includePlus = true;
68
+ break;
76
69
  }
77
70
  }
78
71
  }
72
+ }
79
73
 
80
- count = (this._provider && this.selectionInfo.state === SelectionInfo.states.allPages) ?
81
- this._provider.itemCount : this.selectionInfo.keys.length;
74
+ const count = (this._provider && this.selectionInfo.state === SelectionInfo.states.allPages) ?
75
+ this._provider.itemCount : this.selectionInfo.keys.length;
82
76
 
83
- if (this.selectionInfo.state === SelectionInfo.states.none && this.noSelectionText) {
84
- this._summary = this.noSelectionText;
85
- } else if (includePlus) {
86
- this._summary = this.localize('components.selection.selected-plus', 'count', count);
87
- } else {
88
- this._summary = this.localize('components.selection.selected', 'count', count);
89
- }
77
+ if (this.selectionInfo.state === SelectionInfo.states.none && this.noSelectionText) {
78
+ this._summary = this.noSelectionText;
79
+ } else if (includePlus) {
80
+ this._summary = this.localize('components.selection.selected-plus', 'count', count);
81
+ } else {
82
+ this._summary = this.localize('components.selection.selected', 'count', count);
90
83
  }
91
84
  }
92
85
 
@@ -9188,11 +9188,6 @@
9188
9188
  "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
9189
9189
  "type": "number"
9190
9190
  },
9191
- {
9192
- "name": "selection-count-override",
9193
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
9194
- "type": "number"
9195
- },
9196
9191
  {
9197
9192
  "name": "selection-single",
9198
9193
  "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
@@ -9261,12 +9256,6 @@
9261
9256
  "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
9262
9257
  "type": "number"
9263
9258
  },
9264
- {
9265
- "name": "selectionCountOverride",
9266
- "attribute": "selection-count-override",
9267
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
9268
- "type": "number"
9269
- },
9270
9259
  {
9271
9260
  "name": "selectionSingle",
9272
9261
  "attribute": "selection-single",
@@ -10594,11 +10583,6 @@
10594
10583
  "name": "d2l-demo-selection",
10595
10584
  "path": "./components/selection/demo/demo-selection.js",
10596
10585
  "attributes": [
10597
- {
10598
- "name": "selection-count-override",
10599
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
10600
- "type": "number"
10601
- },
10602
10586
  {
10603
10587
  "name": "selection-single",
10604
10588
  "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
@@ -10607,12 +10591,6 @@
10607
10591
  }
10608
10592
  ],
10609
10593
  "properties": [
10610
- {
10611
- "name": "selectionCountOverride",
10612
- "attribute": "selection-count-override",
10613
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
10614
- "type": "number"
10615
- },
10616
10594
  {
10617
10595
  "name": "selectionSingle",
10618
10596
  "attribute": "selection-single",
@@ -10645,11 +10623,6 @@
10645
10623
  "name": "d2l-demo-selection-pageable",
10646
10624
  "path": "./components/selection/demo/demo-selection.js",
10647
10625
  "attributes": [
10648
- {
10649
- "name": "selection-count-override",
10650
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
10651
- "type": "number"
10652
- },
10653
10626
  {
10654
10627
  "name": "selection-single",
10655
10628
  "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
@@ -10663,12 +10636,6 @@
10663
10636
  }
10664
10637
  ],
10665
10638
  "properties": [
10666
- {
10667
- "name": "selectionCountOverride",
10668
- "attribute": "selection-count-override",
10669
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
10670
- "type": "number"
10671
- },
10672
10639
  {
10673
10640
  "name": "selectionSingle",
10674
10641
  "attribute": "selection-single",
@@ -11313,11 +11280,6 @@
11313
11280
  "name": "d2l-test-selection",
11314
11281
  "path": "./components/selection/test/selection-component.js",
11315
11282
  "attributes": [
11316
- {
11317
- "name": "selection-count-override",
11318
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
11319
- "type": "number"
11320
- },
11321
11283
  {
11322
11284
  "name": "selection-single",
11323
11285
  "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
@@ -11326,12 +11288,6 @@
11326
11288
  }
11327
11289
  ],
11328
11290
  "properties": [
11329
- {
11330
- "name": "selectionCountOverride",
11331
- "attribute": "selection-count-override",
11332
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
11333
- "type": "number"
11334
- },
11335
11291
  {
11336
11292
  "name": "selectionSingle",
11337
11293
  "attribute": "selection-single",
@@ -11418,11 +11374,6 @@
11418
11374
  "name": "d2l-test-selection-pageable",
11419
11375
  "path": "./components/selection/test/selection-component.js",
11420
11376
  "attributes": [
11421
- {
11422
- "name": "selection-count-override",
11423
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
11424
- "type": "number"
11425
- },
11426
11377
  {
11427
11378
  "name": "selection-single",
11428
11379
  "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
@@ -11436,12 +11387,6 @@
11436
11387
  }
11437
11388
  ],
11438
11389
  "properties": [
11439
- {
11440
- "name": "selectionCountOverride",
11441
- "attribute": "selection-count-override",
11442
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
11443
- "type": "number"
11444
- },
11445
11390
  {
11446
11391
  "name": "selectionSingle",
11447
11392
  "attribute": "selection-single",
@@ -11955,11 +11900,6 @@
11955
11900
  "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
11956
11901
  "type": "number"
11957
11902
  },
11958
- {
11959
- "name": "selection-count-override",
11960
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
11961
- "type": "number"
11962
- },
11963
11903
  {
11964
11904
  "name": "selection-single",
11965
11905
  "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
@@ -12020,12 +11960,6 @@
12020
11960
  "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
12021
11961
  "type": "number"
12022
11962
  },
12023
- {
12024
- "name": "selectionCountOverride",
12025
- "attribute": "selection-count-override",
12026
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
12027
- "type": "number"
12028
- },
12029
11963
  {
12030
11964
  "name": "selectionSingle",
12031
11965
  "attribute": "selection-single",
@@ -12224,11 +12158,6 @@
12224
12158
  "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
12225
12159
  "type": "number"
12226
12160
  },
12227
- {
12228
- "name": "selection-count-override",
12229
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
12230
- "type": "number"
12231
- },
12232
12161
  {
12233
12162
  "name": "selection-single",
12234
12163
  "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
@@ -12271,12 +12200,6 @@
12271
12200
  "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
12272
12201
  "type": "number"
12273
12202
  },
12274
- {
12275
- "name": "selectionCountOverride",
12276
- "attribute": "selection-count-override",
12277
- "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
12278
- "type": "number"
12279
- },
12280
12203
  {
12281
12204
  "name": "selectionSingle",
12282
12205
  "attribute": "selection-single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.186.3",
3
+ "version": "2.186.4",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",