@pocketprep/ui-kit 2.0.33 → 2.0.34

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.
@@ -1042,7 +1042,7 @@ var component = (0,componentNormalizer/* default */.Z)(
1042
1042
 
1043
1043
  /***/ }),
1044
1044
 
1045
- /***/ 70921:
1045
+ /***/ 64126:
1046
1046
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1047
1047
 
1048
1048
  "use strict";
@@ -1055,7 +1055,7 @@ __webpack_require__.d(__webpack_exports__, {
1055
1055
  "default": () => (/* binding */ FilterOptions)
1056
1056
  });
1057
1057
 
1058
- ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Filters/FilterOptions.vue?vue&type=template&id=019d1178&
1058
+ ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Filters/FilterOptions.vue?vue&type=template&id=6b512266&
1059
1059
  var render = function () {
1060
1060
  var _obj;
1061
1061
  var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"dark",rawName:"v-dark"}],staticClass:"filter-options",class:( _obj = {}, _obj[("filter-options--" + _vm.align)] = true, _obj[("filter-options-" + _vm.size)] = true, _obj )},[_vm._t("radioLabel",function(){return [(_vm.radioOptions.length > 0)?_c('div',{directives:[{name:"dark",rawName:"v-dark"}],staticClass:"filter-options__label",class:{ 'filter-options__label--active': _vm.showRadioOptions },attrs:{"aria-expanded":_vm.showFilterDropdown ? 'true' : 'false'},on:{"click":function($event){_vm.showRadioOptions = !_vm.showRadioOptions; _vm.showCheckboxOptions = false;},"mousedown":function($event){$event.preventDefault();}}},[_vm._t("radioLabelText",function(){return [_c('span',[_vm._v("FILTER BY QUESTION TYPE")])]}),_vm._t("radioLabelIcon",function(){return [_c('Icon',{directives:[{name:"dark",rawName:"v-dark",value:(_vm.isDarkMode),expression:"isDarkMode"}],staticClass:"filter-options__arrow",attrs:{"type":"accordionArrow"}})]})],2):_vm._e()]}),_vm._t("radio",function(){return [(_vm.showRadioOptions)?_c('Radio',{staticClass:"filter-options__radio",attrs:{"aria-live":"polite","data":_vm.radioOptions},model:{value:(_vm.radioEntry),callback:function ($$v) {_vm.radioEntry=$$v},expression:"radioEntry"}}):_vm._e()]}),_vm._t("checkboxLabel",function(){return [(_vm.radioOptions.length > 0)?_c('div',{directives:[{name:"dark",rawName:"v-dark"}],staticClass:"filter-options__label",class:{ 'filter-options__label--active': _vm.showCheckboxOptions },attrs:{"aria-expanded":_vm.showFilterDropdown ? 'true' : 'false'},on:{"click":function($event){_vm.showCheckboxOptions = !_vm.showCheckboxOptions; _vm.showRadioOptions = false;},"mousedown":function($event){$event.preventDefault();}}},[_vm._t("checkboxLabelText",function(){return [_c('span',[_vm._v("FILTER BY SUBJECT")])]}),_vm._t("checkboxLabelIcon",function(){return [_c('Icon',{directives:[{name:"dark",rawName:"v-dark",value:(_vm.isDarkMode),expression:"isDarkMode"}],staticClass:"filter-options__arrow",attrs:{"type":"accordionArrow"}})]})],2):_c('div',{directives:[{name:"dark",rawName:"v-dark"}],staticClass:"filter-options__label",class:{ 'filter-options__label--active': _vm.showCheckboxOptions },attrs:{"aria-expanded":_vm.showFilterDropdown ? 'true' : 'false'}},[_vm._t("checkboxLabelText",function(){return [_c('span',[_vm._v("FILTER BY SUBJECT")])]})],2)]}),_vm._t("checkbox",function(){return [(_vm.showCheckboxOptions || _vm.radioOptions.length === 0)?_c('div',{staticClass:"filter-options__checkbox"},_vm._l((_vm.checkboxOptions),function(option){return _c('CheckboxOption',{directives:[{name:"dark",rawName:"v-dark",value:(_vm.isDarkMode),expression:"isDarkMode"}],key:option.id,staticClass:"filter-options__option",attrs:{"label":option.label},on:{"click":function($event){option.enabled = !option.enabled}},model:{value:(option.enabled),callback:function ($$v) {_vm.$set(option, "enabled", $$v)},expression:"option.enabled"}})}),1):_vm._e()]})],2)}
@@ -18076,7 +18076,7 @@ var Link_vue_1 = tslib_1.__importDefault(__webpack_require__(66985));
18076
18076
 
18077
18077
  var Icon_vue_1 = tslib_1.__importDefault(__webpack_require__(64652));
18078
18078
 
18079
- var FilterOptions_vue_1 = tslib_1.__importDefault(__webpack_require__(70921));
18079
+ var FilterOptions_vue_1 = tslib_1.__importDefault(__webpack_require__(64126));
18080
18080
 
18081
18081
  var directives_1 = __webpack_require__(19748);
18082
18082
 
@@ -18237,6 +18237,8 @@ __webpack_require__(26699);
18237
18237
 
18238
18238
  __webpack_require__(32023);
18239
18239
 
18240
+ __webpack_require__(57327);
18241
+
18240
18242
  Object.defineProperty(exports, "X", ({
18241
18243
  value: true
18242
18244
  }));
@@ -18305,6 +18307,40 @@ var FilterOptions = /*#__PURE__*/function (_vue_property_decorat) {
18305
18307
  document.addEventListener('click', this.clickListener);
18306
18308
  document.addEventListener('keydown', this.keydownListener);
18307
18309
  }
18310
+ }, {
18311
+ key: "checkboxOptionsChanged",
18312
+ value: function checkboxOptionsChanged(newVal, oldVal) {
18313
+ var newEnabledFilters = newVal.filter(function (o) {
18314
+ return o.enabled;
18315
+ });
18316
+ var oldEnabledFilters = oldVal.filter(function (o) {
18317
+ return o.enabled;
18318
+ });
18319
+
18320
+ if (newEnabledFilters.length !== oldEnabledFilters.length) {
18321
+ this.$emit('input', newVal);
18322
+ }
18323
+ }
18324
+ }, {
18325
+ key: "checkboxOptionChanged",
18326
+ value: function checkboxOptionChanged(newVal) {
18327
+ this.checkboxOptions = _toConsumableArray(newVal);
18328
+ }
18329
+ }, {
18330
+ key: "radioOptionsChanged",
18331
+ value: function radioOptionsChanged(newVal, oldVal) {
18332
+ var newEnabledFilters = newVal;
18333
+ var oldEnabledFilters = oldVal;
18334
+
18335
+ if (newEnabledFilters.length !== oldEnabledFilters.length) {
18336
+ this.$emit('input', newVal);
18337
+ }
18338
+ }
18339
+ }, {
18340
+ key: "radioOptionChanged",
18341
+ value: function radioOptionChanged(newVal) {
18342
+ this.radioOptions = _toConsumableArray(newVal);
18343
+ }
18308
18344
  }]);
18309
18345
 
18310
18346
  return FilterOptions;
@@ -18330,6 +18366,14 @@ tslib_1.__decorate([(0, vue_property_decorator_1.Prop)({
18330
18366
  "default": false
18331
18367
  })], FilterOptions.prototype, "isDarkMode", void 0);
18332
18368
 
18369
+ tslib_1.__decorate([(0, vue_property_decorator_1.Watch)('checkboxOptions')], FilterOptions.prototype, "checkboxOptionsChanged", null);
18370
+
18371
+ tslib_1.__decorate([(0, vue_property_decorator_1.Watch)('checkboxEntries')], FilterOptions.prototype, "checkboxOptionChanged", null);
18372
+
18373
+ tslib_1.__decorate([(0, vue_property_decorator_1.Watch)('radioOptions')], FilterOptions.prototype, "radioOptionsChanged", null);
18374
+
18375
+ tslib_1.__decorate([(0, vue_property_decorator_1.Watch)('radioEntries')], FilterOptions.prototype, "radioOptionChanged", null);
18376
+
18333
18377
  FilterOptions = tslib_1.__decorate([(0, vue_property_decorator_1.Component)({
18334
18378
  components: {
18335
18379
  CheckboxOption: CheckboxOption_vue_1["default"],
@@ -25675,7 +25719,7 @@ var Slider_vue_1 = tslib_1.__importDefault(__webpack_require__(47507));
25675
25719
 
25676
25720
  var Button_vue_1 = tslib_1.__importDefault(__webpack_require__(58861));
25677
25721
 
25678
- var FilterOptions_vue_1 = tslib_1.__importDefault(__webpack_require__(70921));
25722
+ var FilterOptions_vue_1 = tslib_1.__importDefault(__webpack_require__(64126));
25679
25723
 
25680
25724
  var FilterDropdown_vue_1 = tslib_1.__importDefault(__webpack_require__(62803));
25681
25725