@brightspace-ui-labs/facet-filter-sort 6.3.0 → 6.5.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.
@@ -5,12 +5,9 @@ import '@brightspace-ui/core/components/dropdown/dropdown-tabs.js';
5
5
  import '@brightspace-ui/core/components/tabs/tabs.js';
6
6
  import '@brightspace-ui/core/components/tabs/tab.js';
7
7
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
8
- import { getFlag } from '@brightspace-ui/core/helpers/flags.js';
9
8
  import { LocalizeBehavior } from '../localize-behavior.js';
10
9
  import { mixinBehaviors } from '@polymer/polymer/lib/legacy/class.js';
11
10
 
12
- const useTabsNewStructure = getFlag('GAUD-7146-tabs-new-structure', true);
13
-
14
11
  /**
15
12
  * A component containing filter options and emitting selection events
16
13
  * @slot - Contents of the dropdown, including filter categories and options
@@ -92,10 +89,6 @@ class D2LLabsFilterDropdown extends mixinBehaviors([LocalizeBehavior], PolymerEl
92
89
  type: Boolean,
93
90
  value: false
94
91
  },
95
- _useNewStructure: {
96
- type: Boolean,
97
- value: useTabsNewStructure
98
- },
99
92
  _tabInfos: {
100
93
  type: Array,
101
94
  value: () => []
@@ -139,15 +132,10 @@ class D2LLabsFilterDropdown extends mixinBehaviors([LocalizeBehavior], PolymerEl
139
132
  <d2l-button-subtle text="[[localize('clear')]]" hidden$="[[!totalSelectedOptionCount]]" on-click="clearFilters"></d2l-button-subtle>
140
133
  </div>
141
134
  <d2l-tabs>
142
- <template is="dom-if" if="[[!_useNewStructure]]">
143
- <slot></slot>
144
- </template>
145
- <template is="dom-if" if="[[_useNewStructure]]">
146
- <template is="dom-repeat" items="[[_tabInfos]]" as="tab">
147
- <d2l-tab id="[[tab.key]]" text="[[tab.text]]" slot="tabs" selected$="[[tab.selected]]"></d2l-tab>
148
- </template>
149
- <slot on-slotchange="_handleCategoriesSlotChange" slot="panels"></slot>
135
+ <template is="dom-repeat" items="[[_tabInfos]]" as="tab">
136
+ <d2l-tab id="[[tab.key]]" text="[[tab.text]]" slot="tabs" selected$="[[tab.selected]]"></d2l-tab>
150
137
  </template>
138
+ <slot on-slotchange="_handleCategoriesSlotChange" slot="panels"></slot>
151
139
  </d2l-tabs>
152
140
  <slot name="footer" slot="[[_getFooterSlotValue(_hasFooter)]]" on-slotchange="_handleFooterSlotChange"></slot>
153
141
  </d2l-dropdown-tabs>
@@ -180,15 +168,13 @@ class D2LLabsFilterDropdown extends mixinBehaviors([LocalizeBehavior], PolymerEl
180
168
  this.removeEventListener('d2l-dropdown-close', this._handleDropdownClose);
181
169
  this.removeEventListener('d2l-tab-panel-selected', this._stopTabPanelSelectedEvent);
182
170
 
183
- if (this._useNewStructure) {
184
- const categories = this.querySelectorAll('d2l-labs-filter-dropdown-category');
185
- categories.forEach(cat => {
186
- if (cat.__tabInfoObserver) {
187
- cat.__tabInfoObserver.disconnect();
188
- delete cat.__tabInfoObserver;
189
- }
190
- });
191
- }
171
+ const categories = this.querySelectorAll('d2l-labs-filter-dropdown-category');
172
+ categories.forEach(cat => {
173
+ if (cat.__tabInfoObserver) {
174
+ cat.__tabInfoObserver.disconnect();
175
+ delete cat.__tabInfoObserver;
176
+ }
177
+ });
192
178
  }
193
179
 
194
180
  focus() {
@@ -212,8 +198,6 @@ class D2LLabsFilterDropdown extends mixinBehaviors([LocalizeBehavior], PolymerEl
212
198
  }
213
199
 
214
200
  async _handleCategoriesSlotChange() {
215
- if (!this._useNewStructure) return;
216
-
217
201
  const tabsContainer = this.shadowRoot.querySelector('d2l-tabs');
218
202
  const categories = this.querySelectorAll('d2l-labs-filter-dropdown-category');
219
203
 
package/lang/ar.js CHANGED
@@ -5,12 +5,12 @@ export default {
5
5
  "noActiveFilters": "لا توجد عوامل تصفية نشطة",
6
6
  "clearFilters": "مسح عوامل التصفية",
7
7
  "categoryTitleMultiple": "{title} ({numSelected})",
8
- "searchBy": "بحث حسب {category}",
8
+ "searchBy": "البحث حسب {category}",
9
9
  "clear": "مسح",
10
- "filter": "عامل التصفية",
11
- "filterBy": "تصفية حسب",
12
- "filterMultiple": "عامل التصفية: {numOptions} من عوامل التصفية",
13
- "filterSingle": "عامل التصفية: عامل تصفية واحد",
10
+ "filter": "التصفية",
11
+ "filterBy": "التصفية حسب",
12
+ "filterMultiple": "التصفية: {numOptions} من عوامل التصفية",
13
+ "filterSingle": "التصفية: عامل تصفية واحد",
14
14
  "sort": "فرز",
15
15
  "sortWithOption": "فرز: {option}"
16
16
  };
package/package.json CHANGED
@@ -37,7 +37,7 @@
37
37
  "lit-analyzer": "^1",
38
38
  "stylelint": "^15"
39
39
  },
40
- "version": "6.3.0",
40
+ "version": "6.5.0",
41
41
  "dependencies": {
42
42
  "@brightspace-ui/core": "^3",
43
43
  "@brightspace-ui/localize-behavior": "^2",