@brightspace-ui-labs/facet-filter-sort 6.7.2 → 6.7.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.
@@ -3,8 +3,8 @@ import '@brightspace-ui/core/components/colors/colors.js';
3
3
  import '@brightspace-ui/core/components/dropdown/dropdown-button-subtle.js';
4
4
  import '@brightspace-ui/core/components/dropdown/dropdown-tabs.js';
5
5
  import '@brightspace-ui/core/components/tabs/tab.js';
6
+ import '@brightspace-ui/core/components/tabs/tabs.js';
6
7
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
- import { getUseNewTabsStructureFlag } from '@brightspace-ui/core/components/tabs/tabs.js';
8
8
  import { LocalizeBehavior } from '../localize-behavior.js';
9
9
  import { mixinBehaviors } from '@polymer/polymer/lib/legacy/class.js';
10
10
 
@@ -211,17 +211,12 @@ class D2LLabsFilterDropdown extends mixinBehaviors([LocalizeBehavior], PolymerEl
211
211
 
212
212
  if (!tabsContainer || !categories || categories.length === 0) return;
213
213
 
214
- // Clean up when GAUD-8299-core-tabs-use-new-structure flag is removed
215
- const useNewTabsStructureFlag = getUseNewTabsStructureFlag();
216
-
217
214
  // Build tabInfos which is used to render d2l-tab components
218
215
  const tabInfos = [];
219
216
  categories.forEach((category, index) => {
220
217
  const key = category.getAttribute('key') || `category-${index}`;
221
218
  const text = category.getAttribute('text');
222
-
223
- // Clean up when GAUD-8299-core-tabs-use-new-structure flag is removed
224
- const isSelected = useNewTabsStructureFlag ? category._selected : category.hasAttribute('selected');
219
+ const isSelected = category._selected;
225
220
 
226
221
  category.setAttribute('labelled-by', key);
227
222
  tabInfos.push({ key, text, selected: isSelected });
@@ -229,9 +224,7 @@ class D2LLabsFilterDropdown extends mixinBehaviors([LocalizeBehavior], PolymerEl
229
224
  if (!category.__tabInfoObserver) {
230
225
  category.__tabInfoObserver = new MutationObserver(() => {
231
226
  const newText = category.getAttribute('text');
232
-
233
- // Clean up when GAUD-8299-core-tabs-use-new-structure flag is removed
234
- const newSelected = useNewTabsStructureFlag ? category._selected : category.hasAttribute('selected');
227
+ const newSelected = category._selected;
235
228
 
236
229
  this._tabInfos = this._tabInfos.map(info => {
237
230
  return info.key === key
package/lang/pl.js CHANGED
@@ -11,6 +11,6 @@ export default {
11
11
  "filterBy": "Filtruj według",
12
12
  "filterMultiple": "Filtr: Filtry {numOptions}",
13
13
  "filterSingle": "Filtr: 1 filtr",
14
- "sort": "Sortowanie",
15
- "sortWithOption": "Sortowanie: {option}"
14
+ "sort": "Sortuj",
15
+ "sortWithOption": "Sortuj według {option}"
16
16
  };
package/package.json CHANGED
@@ -12,7 +12,6 @@
12
12
  },
13
13
  "files": [
14
14
  "facet-filter-sort.serge.json",
15
- "custom-elements.json",
16
15
  "/components",
17
16
  "/lang"
18
17
  ],
@@ -36,7 +35,7 @@
36
35
  "eslint-config-brightspace": "^0.25",
37
36
  "stylelint": "^15"
38
37
  },
39
- "version": "6.7.2",
38
+ "version": "6.7.4",
40
39
  "dependencies": {
41
40
  "@brightspace-ui/core": "^3",
42
41
  "@brightspace-ui/localize-behavior": "^2",
@@ -1,529 +0,0 @@
1
- {
2
- "version": "experimental",
3
- "tags": [
4
- {
5
- "name": "d2l-labs-applied-filters",
6
- "path": "./components/applied-filters/applied-filters.js",
7
- "description": "A tag-list allowing the user to see (and remove) the currently applied filters.",
8
- "attributes": [
9
- {
10
- "name": "for",
11
- "description": "REQUIRED: The id of the \"d2l-labs-filter-dropdown\" that you want to track",
12
- "type": "string"
13
- },
14
- {
15
- "name": "label-text",
16
- "description": "Optional: The text displayed in this component's label. Default: \"Applied Filters:\"",
17
- "type": "string",
18
- "default": "\"\""
19
- }
20
- ],
21
- "properties": [
22
- {
23
- "name": "for",
24
- "attribute": "for",
25
- "description": "REQUIRED: The id of the \"d2l-labs-filter-dropdown\" that you want to track",
26
- "type": "string"
27
- },
28
- {
29
- "name": "labelText",
30
- "attribute": "label-text",
31
- "description": "Optional: The text displayed in this component's label. Default: \"Applied Filters:\"",
32
- "type": "string",
33
- "default": "\"\""
34
- }
35
- ]
36
- },
37
- {
38
- "name": "d2l-labs-filter-dropdown-category",
39
- "path": "./components/filter-dropdown/filter-dropdown-category.js",
40
- "description": "A component wrapping grouped filters",
41
- "attributes": [
42
- {
43
- "name": "search-value",
44
- "description": "Sets the value in the search input",
45
- "type": "string"
46
- },
47
- {
48
- "name": "category-text",
49
- "description": "REQUIRED: Name of the filter category, will be shown on the tab",
50
- "type": "string",
51
- "default": "\"\""
52
- },
53
- {
54
- "name": "disable-search",
55
- "description": "Hides the search bar inside a filter tab",
56
- "type": "boolean",
57
- "default": "false"
58
- },
59
- {
60
- "name": "key",
61
- "description": "Unique id to represent a filter category, sent back in category events",
62
- "type": "string",
63
- "default": "\"\""
64
- },
65
- {
66
- "name": "selected-option-count",
67
- "description": "The number of selected filter options for that filter category. When options are selected and de-selected, the consumer is responsible for updating this number after updating its own data store.",
68
- "type": "number",
69
- "default": "0"
70
- }
71
- ],
72
- "properties": [
73
- {
74
- "name": "searchValue",
75
- "attribute": "search-value",
76
- "description": "Sets the value in the search input",
77
- "type": "string"
78
- },
79
- {
80
- "name": "categoryText",
81
- "attribute": "category-text",
82
- "description": "REQUIRED: Name of the filter category, will be shown on the tab",
83
- "type": "string",
84
- "default": "\"\""
85
- },
86
- {
87
- "name": "disableSearch",
88
- "attribute": "disable-search",
89
- "description": "Hides the search bar inside a filter tab",
90
- "type": "boolean",
91
- "default": "false"
92
- },
93
- {
94
- "name": "key",
95
- "attribute": "key",
96
- "description": "Unique id to represent a filter category, sent back in category events",
97
- "type": "string",
98
- "default": "\"\""
99
- },
100
- {
101
- "name": "selectedOptionCount",
102
- "attribute": "selected-option-count",
103
- "description": "The number of selected filter options for that filter category. When options are selected and de-selected, the consumer is responsible for updating this number after updating its own data store.",
104
- "type": "number",
105
- "default": "0"
106
- },
107
- {
108
- "name": "properties",
109
- "type": "{ labelledBy: string; noPadding: boolean; role: { type: StringConstructor; reflect: boolean; }; selected: boolean; text: string; _selected: { type: BooleanConstructor; attribute: string; reflect: boolean; }; }",
110
- "default": "{\"labelledBy\":{\"type\":\"String\",\"attribute\":\"labelled-by\",\"reflect\":true},\"noPadding\":{\"type\":\"Boolean\",\"attribute\":\"no-padding\",\"reflect\":true},\"role\":{\"type\":\"String\",\"reflect\":true},\"selected\":{\"type\":\"Boolean\",\"reflect\":true},\"text\":{\"type\":\"String\"},\"_selected\":{\"type\":\"Boolean\",\"attribute\":\"_selected\",\"reflect\":true}}"
111
- },
112
- {
113
- "name": "styles",
114
- "type": "CSSResult",
115
- "default": "\"css`\\n\\t\\t:host {\\n\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\tdisplay: none;\\n\\t\\t\\tmargin: 1.2rem 0 0 0;\\n\\t\\t}\\n\\t\\t:host([no-padding]) {\\n\\t\\t\\tmargin: 0;\\n\\t\\t}\\n\\t\\t/* clean up with GAUD-8299-core-tabs-use-new-structure flag clean up */\\n\\t\\t:host([selected]) {\\n\\t\\t\\tdisplay: block;\\n\\t\\t}\\n\\t\\t:host([_selected]) {\\n\\t\\t\\tdisplay: block;\\n\\t\\t}\\n\\t`\""
116
- },
117
- {
118
- "name": "noPadding",
119
- "type": "boolean",
120
- "default": "false"
121
- }
122
- ],
123
- "events": [
124
- {
125
- "name": "d2l-labs-filter-dropdown-category-slotchange",
126
- "description": "Dispatched when the slot content changes"
127
- },
128
- {
129
- "name": "d2l-labs-filter-dropdown-category-selected",
130
- "description": "Dispatched when a filter tab is selected"
131
- },
132
- {
133
- "name": "d2l-labs-filter-dropdown-category-searched",
134
- "description": "Dispatched when a filter category is searched"
135
- },
136
- {
137
- "name": "d2l-labs-filter-dropdown-option-change",
138
- "description": "Dispatched when a filter option is selected"
139
- },
140
- {
141
- "name": "d2l-tab-panel-selected",
142
- "description": "DEPRECATED: Dispatched when a tab is selected"
143
- },
144
- {
145
- "name": "d2l-tab-panel-text-changed",
146
- "description": "DEPRECATED: Dispatched when the text attribute is changed"
147
- }
148
- ],
149
- "slots": [
150
- {
151
- "name": "",
152
- "description": "Contains the filters (e.g., d2l-labs-filter-dropdown-option) that are in the category"
153
- }
154
- ]
155
- },
156
- {
157
- "name": "d2l-labs-filter-dropdown-option",
158
- "path": "./components/filter-dropdown/filter-dropdown-option.js",
159
- "description": "A filter menu item component.",
160
- "properties": [
161
- {
162
- "name": "role",
163
- "type": "string",
164
- "default": "\"menuitemcheckbox\""
165
- },
166
- {
167
- "name": "selected",
168
- "type": "boolean",
169
- "default": "false"
170
- },
171
- {
172
- "name": "properties",
173
- "type": "{ selected: boolean; value: string; }",
174
- "default": "{\"selected\":{\"type\":\"Boolean\",\"reflect\":true},\"value\":{\"type\":\"String\"}}"
175
- },
176
- {
177
- "name": "disabled",
178
- "type": "boolean",
179
- "default": "false"
180
- },
181
- {
182
- "name": "lines",
183
- "type": "number",
184
- "default": "2"
185
- }
186
- ],
187
- "events": [
188
- {
189
- "name": "d2l-menu-item-select",
190
- "description": "Dispatched when the menu item is selected"
191
- },
192
- {
193
- "name": "d2l-menu-item-change",
194
- "description": "Dispatched when the selected menu item changes"
195
- },
196
- {
197
- "name": "d2l-menu-item-visibility-change",
198
- "description": "Dispatched when the visibility of the menu item changes"
199
- }
200
- ]
201
- },
202
- {
203
- "name": "d2l-labs-filter-dropdown",
204
- "path": "./components/filter-dropdown/filter-dropdown.js",
205
- "description": "A component containing filter options and emitting selection events",
206
- "attributes": [
207
- {
208
- "name": "disabled",
209
- "description": "Disables the dropdown opener",
210
- "type": "boolean",
211
- "default": "false"
212
- },
213
- {
214
- "name": "disable-opener-text-variation",
215
- "description": "Disables displaying different text for different number of selections, instead always displaying the term for no selections.",
216
- "type": "boolean",
217
- "default": "false"
218
- },
219
- {
220
- "name": "header-text",
221
- "description": "Sets the text for the filter content header",
222
- "type": "string",
223
- "default": "\"\""
224
- },
225
- {
226
- "name": "max-width",
227
- "description": "Sets the max-width of the filter dropdown",
228
- "type": "number",
229
- "default": "400"
230
- },
231
- {
232
- "name": "min-width",
233
- "description": "Sets the min-width of the filter dropdown",
234
- "type": "number",
235
- "default": "25"
236
- },
237
- {
238
- "name": "opener-text",
239
- "description": "Sets the text for the opener when there are no selections",
240
- "type": "string",
241
- "default": "\"\""
242
- },
243
- {
244
- "name": "opener-text-multiple",
245
- "description": "Sets the text for the opener when there are multiple selections",
246
- "type": "string",
247
- "default": "\"\""
248
- },
249
- {
250
- "name": "opener-text-single",
251
- "description": "Sets the text for the opener when there is a single selection",
252
- "type": "string",
253
- "default": "\"\""
254
- },
255
- {
256
- "name": "total-selected-option-count",
257
- "description": "The total number of selected filter options across all categories. When options are selected and de-selected, the consumer is responsible for updating this number after updating its own data store.",
258
- "type": "number",
259
- "default": "0"
260
- },
261
- {
262
- "name": "no-padding-footer",
263
- "type": "boolean",
264
- "default": "false"
265
- }
266
- ],
267
- "properties": [
268
- {
269
- "name": "disabled",
270
- "attribute": "disabled",
271
- "description": "Disables the dropdown opener",
272
- "type": "boolean",
273
- "default": "false"
274
- },
275
- {
276
- "name": "disableOpenerTextVariation",
277
- "attribute": "disable-opener-text-variation",
278
- "description": "Disables displaying different text for different number of selections, instead always displaying the term for no selections.",
279
- "type": "boolean",
280
- "default": "false"
281
- },
282
- {
283
- "name": "headerText",
284
- "attribute": "header-text",
285
- "description": "Sets the text for the filter content header",
286
- "type": "string",
287
- "default": "\"\""
288
- },
289
- {
290
- "name": "maxWidth",
291
- "attribute": "max-width",
292
- "description": "Sets the max-width of the filter dropdown",
293
- "type": "number",
294
- "default": "400"
295
- },
296
- {
297
- "name": "minWidth",
298
- "attribute": "min-width",
299
- "description": "Sets the min-width of the filter dropdown",
300
- "type": "number",
301
- "default": "25"
302
- },
303
- {
304
- "name": "openerText",
305
- "attribute": "opener-text",
306
- "description": "Sets the text for the opener when there are no selections",
307
- "type": "string",
308
- "default": "\"\""
309
- },
310
- {
311
- "name": "openerTextMultiple",
312
- "attribute": "opener-text-multiple",
313
- "description": "Sets the text for the opener when there are multiple selections",
314
- "type": "string",
315
- "default": "\"\""
316
- },
317
- {
318
- "name": "openerTextSingle",
319
- "attribute": "opener-text-single",
320
- "description": "Sets the text for the opener when there is a single selection",
321
- "type": "string",
322
- "default": "\"\""
323
- },
324
- {
325
- "name": "totalSelectedOptionCount",
326
- "attribute": "total-selected-option-count",
327
- "description": "The total number of selected filter options across all categories. When options are selected and de-selected, the consumer is responsible for updating this number after updating its own data store.",
328
- "type": "number",
329
- "default": "0"
330
- },
331
- {
332
- "name": "noPaddingFooter",
333
- "attribute": "no-padding-footer",
334
- "type": "boolean",
335
- "default": "false"
336
- },
337
- {
338
- "name": "rootPath",
339
- "type": "string"
340
- },
341
- {
342
- "name": "importPath",
343
- "type": "string"
344
- },
345
- {
346
- "name": "root",
347
- "type": "HTMLElement | StampedTemplate | ShadowRoot | null"
348
- },
349
- {
350
- "name": "$",
351
- "type": "{ [key: string]: Element; }"
352
- },
353
- {
354
- "name": "PROPERTY_EFFECT_TYPES"
355
- }
356
- ],
357
- "events": [
358
- {
359
- "name": "d2l-labs-filter-dropdown-cleared",
360
- "description": "Dispatched when the clear button is pressed to clear all filters"
361
- },
362
- {
363
- "name": "d2l-labs-filter-dropdown-close",
364
- "description": "Dispatched when the filter dropdown is closed"
365
- },
366
- {
367
- "name": "d2l-labs-filter-dropdown-category-selected"
368
- }
369
- ],
370
- "slots": [
371
- {
372
- "name": "",
373
- "description": "Contents of the dropdown, including filter categories and options"
374
- },
375
- {
376
- "name": "footer",
377
- "description": "Dropdown footer contents"
378
- }
379
- ]
380
- },
381
- {
382
- "name": "d2l-labs-sort-by-dropdown-option",
383
- "path": "./components/sort-by-dropdown/sort-by-dropdown-option.js",
384
- "description": "A dropdown option menu item component.",
385
- "properties": [
386
- {
387
- "name": "selected",
388
- "type": "boolean",
389
- "default": "false"
390
- },
391
- {
392
- "name": "properties",
393
- "type": "{ selected: boolean; value: string; }",
394
- "default": "{\"selected\":{\"type\":\"Boolean\",\"reflect\":true},\"value\":{\"type\":\"String\"}}"
395
- },
396
- {
397
- "name": "disabled",
398
- "type": "boolean",
399
- "default": "false"
400
- },
401
- {
402
- "name": "lines",
403
- "type": "number",
404
- "default": "2"
405
- }
406
- ],
407
- "events": [
408
- {
409
- "name": "d2l-labs-sort-by-dropdown-option-selected-text-change"
410
- },
411
- {
412
- "name": "d2l-menu-item-change",
413
- "description": "Dispatched when the selected menu item changes"
414
- },
415
- {
416
- "name": "d2l-menu-item-select",
417
- "description": "Dispatched when the menu item is selected"
418
- },
419
- {
420
- "name": "d2l-menu-item-visibility-change",
421
- "description": "Dispatched when the visibility of the menu item changes"
422
- }
423
- ]
424
- },
425
- {
426
- "name": "d2l-labs-sort-by-dropdown",
427
- "path": "./components/sort-by-dropdown/sort-by-dropdown.js",
428
- "description": "Polymer-based web component for D2L sort by dropdown component",
429
- "attributes": [
430
- {
431
- "name": "disabled",
432
- "description": "Whether this dropdown should be disabled",
433
- "type": "boolean",
434
- "default": "false"
435
- },
436
- {
437
- "name": "compact",
438
- "description": "Indicates whether the dropdown is in compact mode or not. The selection text\nwill not be visible when compact is true",
439
- "type": "boolean",
440
- "default": "false"
441
- },
442
- {
443
- "name": "align",
444
- "description": "Alignment of dropdown menu",
445
- "type": "string",
446
- "default": "\"start\""
447
- },
448
- {
449
- "name": "label",
450
- "description": "Label for the dropdown-menu",
451
- "type": "string",
452
- "default": "\"\""
453
- },
454
- {
455
- "name": "value",
456
- "description": "The value of the currently selected option",
457
- "type": "string"
458
- }
459
- ],
460
- "properties": [
461
- {
462
- "name": "disabled",
463
- "attribute": "disabled",
464
- "description": "Whether this dropdown should be disabled",
465
- "type": "boolean",
466
- "default": "false"
467
- },
468
- {
469
- "name": "compact",
470
- "attribute": "compact",
471
- "description": "Indicates whether the dropdown is in compact mode or not. The selection text\nwill not be visible when compact is true",
472
- "type": "boolean",
473
- "default": "false"
474
- },
475
- {
476
- "name": "align",
477
- "attribute": "align",
478
- "description": "Alignment of dropdown menu",
479
- "type": "string",
480
- "default": "\"start\""
481
- },
482
- {
483
- "name": "label",
484
- "attribute": "label",
485
- "description": "Label for the dropdown-menu",
486
- "type": "string",
487
- "default": "\"\""
488
- },
489
- {
490
- "name": "value",
491
- "attribute": "value",
492
- "description": "The value of the currently selected option",
493
- "type": "string"
494
- },
495
- {
496
- "name": "rootPath",
497
- "type": "string"
498
- },
499
- {
500
- "name": "importPath",
501
- "type": "string"
502
- },
503
- {
504
- "name": "root",
505
- "type": "HTMLElement | StampedTemplate | ShadowRoot | null"
506
- },
507
- {
508
- "name": "$",
509
- "type": "{ [key: string]: Element; }"
510
- },
511
- {
512
- "name": "PROPERTY_EFFECT_TYPES"
513
- }
514
- ],
515
- "events": [
516
- {
517
- "name": "d2l-labs-sort-by-dropdown-change",
518
- "description": "Dispatched when option is selected"
519
- }
520
- ],
521
- "slots": [
522
- {
523
- "name": "",
524
- "description": "Contains the dropdown options (e.g., d2l-labs-sort-by-dropdown-options)"
525
- }
526
- ]
527
- }
528
- ]
529
- }