@brightspace-ui-labs/facet-filter-sort 6.6.0 → 6.7.1

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.
@@ -2,9 +2,9 @@ import '@brightspace-ui/core/components/button/button-subtle.js';
2
2
  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
- import '@brightspace-ui/core/components/tabs/tabs.js';
6
5
  import '@brightspace-ui/core/components/tabs/tab.js';
7
6
  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,12 +211,17 @@ 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
+
214
217
  // Build tabInfos which is used to render d2l-tab components
215
218
  const tabInfos = [];
216
219
  categories.forEach((category, index) => {
217
220
  const key = category.getAttribute('key') || `category-${index}`;
218
221
  const text = category.getAttribute('text');
219
- const isSelected = category.hasAttribute('selected');
222
+
223
+ // Clean up when GAUD-8299-core-tabs-use-new-structure flag is removed
224
+ const isSelected = useNewTabsStructureFlag ? category._selected : category.hasAttribute('selected');
220
225
 
221
226
  category.setAttribute('labelled-by', key);
222
227
  tabInfos.push({ key, text, selected: isSelected });
@@ -224,7 +229,10 @@ class D2LLabsFilterDropdown extends mixinBehaviors([LocalizeBehavior], PolymerEl
224
229
  if (!category.__tabInfoObserver) {
225
230
  category.__tabInfoObserver = new MutationObserver(() => {
226
231
  const newText = category.getAttribute('text');
227
- const newSelected = category.hasAttribute('selected');
232
+
233
+ // Clean up when GAUD-8299-core-tabs-use-new-structure flag is removed
234
+ const newSelected = useNewTabsStructureFlag ? category._selected : category.hasAttribute('selected');
235
+
228
236
  this._tabInfos = this._tabInfos.map(info => {
229
237
  return info.key === key
230
238
  ? { ...info, text: newText, selected: newSelected }
@@ -73,9 +73,14 @@
73
73
  "description": "REQUIRED: Id of the tab that labels this panel",
74
74
  "type": "string"
75
75
  },
76
+ {
77
+ "name": "selected",
78
+ "description": "DEPRECATED: Use to select the tab. Do NOT set if using the d2l-tab/d2l-tab-panel implementation.\nRemove with GAUD-8299-core-tabs-use-new-structure flag clean up.",
79
+ "type": "boolean"
80
+ },
76
81
  {
77
82
  "name": "text",
78
- "description": "DEPRECATED: The text used for the tab, as well as labelling the panel. Required if not using d2l-tab/d2l-tab-panel implementation.",
83
+ "description": "DEPRECATED: The text used for the tab, as well as labelling the panel. Required if not using d2l-tab/d2l-tab-panel implementation.\nRemove with GAUD-8299-core-tabs-use-new-structure flag clean up.",
79
84
  "type": "string"
80
85
  },
81
86
  {
@@ -83,12 +88,6 @@
83
88
  "description": "Opt out of default padding/whitespace around the panel",
84
89
  "type": "boolean",
85
90
  "default": "false"
86
- },
87
- {
88
- "name": "selected",
89
- "description": "DEPRECATED: Use to select the tab. Do NOT set if using the d2l-tab/d2l-tab-panel implementation.",
90
- "type": "boolean",
91
- "default": "false"
92
91
  }
93
92
  ],
94
93
  "properties": [
@@ -132,10 +131,16 @@
132
131
  "description": "REQUIRED: Id of the tab that labels this panel",
133
132
  "type": "string"
134
133
  },
134
+ {
135
+ "name": "selected",
136
+ "attribute": "selected",
137
+ "description": "DEPRECATED: Use to select the tab. Do NOT set if using the d2l-tab/d2l-tab-panel implementation.\nRemove with GAUD-8299-core-tabs-use-new-structure flag clean up.",
138
+ "type": "boolean"
139
+ },
135
140
  {
136
141
  "name": "text",
137
142
  "attribute": "text",
138
- "description": "DEPRECATED: The text used for the tab, as well as labelling the panel. Required if not using d2l-tab/d2l-tab-panel implementation.",
143
+ "description": "DEPRECATED: The text used for the tab, as well as labelling the panel. Required if not using d2l-tab/d2l-tab-panel implementation.\nRemove with GAUD-8299-core-tabs-use-new-structure flag clean up.",
139
144
  "type": "string"
140
145
  },
141
146
  {
@@ -144,13 +149,6 @@
144
149
  "description": "Opt out of default padding/whitespace around the panel",
145
150
  "type": "boolean",
146
151
  "default": "false"
147
- },
148
- {
149
- "name": "selected",
150
- "attribute": "selected",
151
- "description": "DEPRECATED: Use to select the tab. Do NOT set if using the d2l-tab/d2l-tab-panel implementation.",
152
- "type": "boolean",
153
- "default": "false"
154
152
  }
155
153
  ],
156
154
  "events": [
package/lang/ca.js ADDED
@@ -0,0 +1,16 @@
1
+ /* eslint quotes: 0 */
2
+
3
+ export default {
4
+ "appliedFilters": "Filtres aplicats:",
5
+ "noActiveFilters": "Cap filtre actiu",
6
+ "clearFilters": "Esborrar filtres",
7
+ "categoryTitleMultiple": "{title} ({numSelected})",
8
+ "searchBy": "Cercar per {category}",
9
+ "clear": "Esborrar",
10
+ "filter": "Filtre",
11
+ "filterBy": "Filtrar per",
12
+ "filterMultiple": "Filtrar: {numOptions} filtres",
13
+ "filterSingle": "Filtrar: 1 filtre",
14
+ "sort": "Ordena",
15
+ "sortWithOption": "Ordenar: {option}"
16
+ };
package/package.json CHANGED
@@ -37,7 +37,7 @@
37
37
  "lit-analyzer": "^1",
38
38
  "stylelint": "^15"
39
39
  },
40
- "version": "6.6.0",
40
+ "version": "6.7.1",
41
41
  "dependencies": {
42
42
  "@brightspace-ui/core": "^3",
43
43
  "@brightspace-ui/localize-behavior": "^2",